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
c591793598fe3c2087ee1586a13121c7a1426274
packages/tr/transformers-lift.yaml
packages/tr/transformers-lift.yaml
homepage: '' changelog-type: '' hash: dcc6d44fa2d58bcd6da22372824833aa78a5522a0d503e224ca03e428a2f664a test-bench-deps: {} maintainer: Vladislav Zavialov <vlad.z.4096@gmail.com> synopsis: Ad-hoc type classes for lifting changelog: '' basic-deps: base: ! '>=4.6 && <4.10' transformers: ! '>=0.4.2' all-versions: - '0.1.0.0' - '0.1.0.1' author: Vladislav Zavialov latest: '0.1.0.1' description-type: haddock description: ! 'This simple and lightweight library provides type classes for lifting monad transformer operations.' license-name: BSD3
homepage: '' changelog-type: '' hash: 804781f12dd171fcd499eb1fc6dd99253392447668e96b18030b95c759a42a94 test-bench-deps: {} maintainer: Vladislav Zavialov <vlad.z.4096@gmail.com> synopsis: Ad-hoc type classes for lifting changelog: '' basic-deps: writer-cps-transformers: ! '>=0.1.1.3' base: ! '>=4.6 && <4.11' transformers: ! '>=0.5.4.0' all-versions: - '0.1.0.0' - '0.1.0.1' - '0.2.0.0' author: Vladislav Zavialov latest: '0.2.0.0' description-type: haddock description: ! 'This simple and lightweight library provides type classes for lifting monad transformer operations.' license-name: BSD3
Update from Hackage at 2017-04-28T18:11:44Z
Update from Hackage at 2017-04-28T18:11:44Z
YAML
mit
commercialhaskell/all-cabal-metadata
yaml
## Code Before: homepage: '' changelog-type: '' hash: dcc6d44fa2d58bcd6da22372824833aa78a5522a0d503e224ca03e428a2f664a test-bench-deps: {} maintainer: Vladislav Zavialov <vlad.z.4096@gmail.com> synopsis: Ad-hoc type classes for lifting changelog: '' basic-deps: base: ! '>=4.6 && <4.10' transformers: ! '>=0.4.2' all-versions: - '0.1.0.0' - '0.1.0.1' author: Vladislav Zavialov latest: '0.1.0.1' description-type: haddock description: ! 'This simple and lightweight library provides type classes for lifting monad transformer operations.' license-name: BSD3 ## Instruction: Update from Hackage at 2017-04-28T18:11:44Z ## Code After: homepage: '' changelog-type: '' hash: 804781f12dd171fcd499eb1fc6dd99253392447668e96b18030b95c759a42a94 test-bench-deps: {} maintainer: Vladislav Zavialov <vlad.z.4096@gmail.com> synopsis: Ad-hoc type classes for lifting changelog: '' basic-deps: writer-cps-transformers: ! '>=0.1.1.3' base: ! '>=4.6 && <4.11' transformers: ! '>=0.5.4.0' all-versions: - '0.1.0.0' - '0.1.0.1' - '0.2.0.0' author: Vladislav Zavialov latest: '0.2.0.0' description-type: haddock description: ! 'This simple and lightweight library provides type classes for lifting monad transformer operations.' license-name: BSD3
homepage: '' changelog-type: '' - hash: dcc6d44fa2d58bcd6da22372824833aa78a5522a0d503e224ca03e428a2f664a + hash: 804781f12dd171fcd499eb1fc6dd99253392447668e96b18030b95c759a42a94 test-bench-deps: {} maintainer: Vladislav Zavialov <vlad.z.4096@gmail.com> synopsis: Ad-hoc type classes for lifting changelog: '' basic-deps: + writer-cps-transformers: ! '>=0.1.1.3' - base: ! '>=4.6 && <4.10' ? ^ + base: ! '>=4.6 && <4.11' ? ^ - transformers: ! '>=0.4.2' ? ^ + transformers: ! '>=0.5.4.0' ? ++ ^ all-versions: - '0.1.0.0' - '0.1.0.1' + - '0.2.0.0' author: Vladislav Zavialov - latest: '0.1.0.1' ? ^ ^ + latest: '0.2.0.0' ? ^ ^ description-type: haddock description: ! 'This simple and lightweight library provides type classes for lifting monad transformer operations.' license-name: BSD3
10
0.5
6
4
0509bf878c9b9a76153cb6503608f5778f02601b
.travis.yml
.travis.yml
language: cpp compiler: gcc sudo: required install: - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - sudo apt-get update - sudo apt-get install -yq build-essential gcc-4.8 g++-4.8 make bison flex libpthread-stubs0-dev - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6 - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8 - echo 2 | sudo update-alternatives --config gcc - | CMAKE_URL="http://www.cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz" mkdir ${TRAVIS_BUILD_DIR}/cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${TRAVIS_BUILD_DIR}/cmake export PATH=${TRAVIS_BUILD_DIR}/cmake/bin:${PATH} after_install: - g++ --version script: - cmake -G 'Unix Makefiles' - make -j2 - ./pbrt_test
language: cpp compiler: gcc sudo: required install: - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - sudo apt-get update - sudo apt-get install -yq build-essential gcc-4.8 g++-4.8 make bison flex libpthread-stubs0-dev - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6 - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8 - echo 2 | sudo update-alternatives --config gcc - | CMAKE_URL="http://www.cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz" mkdir ${TRAVIS_BUILD_DIR}/cmake-local && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${TRAVIS_BUILD_DIR}/cmake-local export PATH=${TRAVIS_BUILD_DIR}/cmake-local/bin:${PATH} after_install: - g++ --version script: - cmake -G 'Unix Makefiles' - make -j2 - ./pbrt_test
Update path where the local version of cmake lives.
Update path where the local version of cmake lives. This should fix the Travis CI build in PR #118.
YAML
bsd-2-clause
mmp/pbrt-v3,nyue/pbrt-v3,nispaur/pbrt-v3,nyue/pbrt-v3,shihchinw/pbrt-v3,mmp/pbrt-v3,mmp/pbrt-v3,shihchinw/pbrt-v3,mmp/pbrt-v3,nyue/pbrt-v3,nispaur/pbrt-v3,nispaur/pbrt-v3,nyue/pbrt-v3,shihchinw/pbrt-v3,shihchinw/pbrt-v3,nispaur/pbrt-v3
yaml
## Code Before: language: cpp compiler: gcc sudo: required install: - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - sudo apt-get update - sudo apt-get install -yq build-essential gcc-4.8 g++-4.8 make bison flex libpthread-stubs0-dev - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6 - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8 - echo 2 | sudo update-alternatives --config gcc - | CMAKE_URL="http://www.cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz" mkdir ${TRAVIS_BUILD_DIR}/cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${TRAVIS_BUILD_DIR}/cmake export PATH=${TRAVIS_BUILD_DIR}/cmake/bin:${PATH} after_install: - g++ --version script: - cmake -G 'Unix Makefiles' - make -j2 - ./pbrt_test ## Instruction: Update path where the local version of cmake lives. This should fix the Travis CI build in PR #118. ## Code After: language: cpp compiler: gcc sudo: required install: - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - sudo apt-get update - sudo apt-get install -yq build-essential gcc-4.8 g++-4.8 make bison flex libpthread-stubs0-dev - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6 - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8 - echo 2 | sudo update-alternatives --config gcc - | CMAKE_URL="http://www.cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz" mkdir ${TRAVIS_BUILD_DIR}/cmake-local && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${TRAVIS_BUILD_DIR}/cmake-local export PATH=${TRAVIS_BUILD_DIR}/cmake-local/bin:${PATH} after_install: - g++ --version script: - cmake -G 'Unix Makefiles' - make -j2 - ./pbrt_test
language: cpp compiler: gcc sudo: required install: - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - sudo apt-get update - sudo apt-get install -yq build-essential gcc-4.8 g++-4.8 make bison flex libpthread-stubs0-dev - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6 - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8 - echo 2 | sudo update-alternatives --config gcc - | CMAKE_URL="http://www.cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz" - mkdir ${TRAVIS_BUILD_DIR}/cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${TRAVIS_BUILD_DIR}/cmake + mkdir ${TRAVIS_BUILD_DIR}/cmake-local && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${TRAVIS_BUILD_DIR}/cmake-local ? ++++++ ++++++ - export PATH=${TRAVIS_BUILD_DIR}/cmake/bin:${PATH} + export PATH=${TRAVIS_BUILD_DIR}/cmake-local/bin:${PATH} ? ++++++ after_install: - g++ --version script: - cmake -G 'Unix Makefiles' - make -j2 - ./pbrt_test
4
0.2
2
2
1d0f638ac2b262a3719bedfe2a2d504d112e16a4
server/types/post.go
server/types/post.go
package types import ( "time" "github.com/joshheinrichs/geosource/server/types/fields" ) // "github.com/joshheinrichs/geosource/server/transactions" type PostInfo struct { Id string `json:"id" gorm:"column:p_postid"` CreatorId string `json:"creator" gorm:"column:p_userid_creator"` Channel string `json:"channel" gorm:"column:p_channelname"` Title string `json:"title" gorm:"column:p_title"` Time time.Time `json:"time" gorm:"column:p_time"` Location Location `json:"location" gorm:"column:p_location" sql:"type:POINT NOT NULL"` } func (postInfo *PostInfo) TableName() string { return "posts" } type Post struct { PostInfo Fields fields.Fields `json:"fields" gorm:"column:p_fields" sql:"type:JSONB NOT NULL"` } func (post *Post) TableName() string { return "posts" } type Submission struct { Title string `json:"title"` Channel string `json:"channel"` Location Location `json:"location"` Values []fields.Value `json:"values"` }
package types import ( "time" "github.com/joshheinrichs/geosource/server/types/fields" ) type PostInfo struct { Id string `json:"id" gorm:"column:p_postid"` CreatorId string `json:"creator" gorm:"column:p_userid_creator"` Channel string `json:"channel" gorm:"column:p_channelname"` Title string `json:"title" gorm:"column:p_title"` Time time.Time `json:"time" gorm:"column:p_time"` Location Location `json:"location" gorm:"column:p_location" sql:"type:POINT NOT NULL"` } func (postInfo *PostInfo) TableName() string { return "posts" } type Post struct { PostInfo Fields fields.Fields `json:"fields" gorm:"column:p_fields" sql:"type:JSONB NOT NULL"` } func (post *Post) TableName() string { return "posts" } type Submission struct { Title string `json:"title"` Channel string `json:"channel"` Location Location `json:"location"` Values []fields.Value `json:"values"` }
Remove a commented out, unused import
Remove a commented out, unused import
Go
mit
Decateron/geosource,Decateron/geosource,Decateron/geosource
go
## Code Before: package types import ( "time" "github.com/joshheinrichs/geosource/server/types/fields" ) // "github.com/joshheinrichs/geosource/server/transactions" type PostInfo struct { Id string `json:"id" gorm:"column:p_postid"` CreatorId string `json:"creator" gorm:"column:p_userid_creator"` Channel string `json:"channel" gorm:"column:p_channelname"` Title string `json:"title" gorm:"column:p_title"` Time time.Time `json:"time" gorm:"column:p_time"` Location Location `json:"location" gorm:"column:p_location" sql:"type:POINT NOT NULL"` } func (postInfo *PostInfo) TableName() string { return "posts" } type Post struct { PostInfo Fields fields.Fields `json:"fields" gorm:"column:p_fields" sql:"type:JSONB NOT NULL"` } func (post *Post) TableName() string { return "posts" } type Submission struct { Title string `json:"title"` Channel string `json:"channel"` Location Location `json:"location"` Values []fields.Value `json:"values"` } ## Instruction: Remove a commented out, unused import ## Code After: package types import ( "time" "github.com/joshheinrichs/geosource/server/types/fields" ) type PostInfo struct { Id string `json:"id" gorm:"column:p_postid"` CreatorId string `json:"creator" gorm:"column:p_userid_creator"` Channel string `json:"channel" gorm:"column:p_channelname"` Title string `json:"title" gorm:"column:p_title"` Time time.Time `json:"time" gorm:"column:p_time"` Location Location `json:"location" gorm:"column:p_location" sql:"type:POINT NOT NULL"` } func (postInfo *PostInfo) TableName() string { return "posts" } type Post struct { PostInfo Fields fields.Fields `json:"fields" gorm:"column:p_fields" sql:"type:JSONB NOT NULL"` } func (post *Post) TableName() string { return "posts" } type Submission struct { Title string `json:"title"` Channel string `json:"channel"` Location Location `json:"location"` Values []fields.Value `json:"values"` }
package types import ( "time" "github.com/joshheinrichs/geosource/server/types/fields" ) - - // "github.com/joshheinrichs/geosource/server/transactions" type PostInfo struct { Id string `json:"id" gorm:"column:p_postid"` CreatorId string `json:"creator" gorm:"column:p_userid_creator"` Channel string `json:"channel" gorm:"column:p_channelname"` Title string `json:"title" gorm:"column:p_title"` Time time.Time `json:"time" gorm:"column:p_time"` Location Location `json:"location" gorm:"column:p_location" sql:"type:POINT NOT NULL"` } func (postInfo *PostInfo) TableName() string { return "posts" } type Post struct { PostInfo Fields fields.Fields `json:"fields" gorm:"column:p_fields" sql:"type:JSONB NOT NULL"` } func (post *Post) TableName() string { return "posts" } type Submission struct { Title string `json:"title"` Channel string `json:"channel"` Location Location `json:"location"` Values []fields.Value `json:"values"` }
2
0.052632
0
2
7da561d7bf3affecce8b10b50818591ccebe0ba2
dog/core/cog.py
dog/core/cog.py
class Cog: """ The Cog baseclass that all cogs should inherit from. """ def __init__(self, bot): self.bot = bot
import logging class Cog: """ The Cog baseclass that all cogs should inherit from. """ def __init__(self, bot): self.bot = bot self.logger = logging.getLogger('cog.' + type(self).__name__.lower())
Add logger attribute in Cog baseclass
Add logger attribute in Cog baseclass I don't feel like refactoring all of my cog code to use this attribute at the moment, so I'll just leave this here for now.
Python
mit
sliceofcode/dogbot,slice/dogbot,slice/dogbot,sliceofcode/dogbot,slice/dogbot
python
## Code Before: class Cog: """ The Cog baseclass that all cogs should inherit from. """ def __init__(self, bot): self.bot = bot ## Instruction: Add logger attribute in Cog baseclass I don't feel like refactoring all of my cog code to use this attribute at the moment, so I'll just leave this here for now. ## Code After: import logging class Cog: """ The Cog baseclass that all cogs should inherit from. """ def __init__(self, bot): self.bot = bot self.logger = logging.getLogger('cog.' + type(self).__name__.lower())
+ import logging + + class Cog: """ The Cog baseclass that all cogs should inherit from. """ def __init__(self, bot): self.bot = bot + self.logger = logging.getLogger('cog.' + type(self).__name__.lower())
4
1
4
0
d44bdfb4525646027006aba95d05a6f8100afd2a
README.md
README.md
[![Build Status](https://travis-ci.org/julianhyde/optiq.png)](https://travis-ci.org/julianhyde/optiq) optiq ===== Optiq is a dynamic data management framework. On May 25th, 2014, Optiq entered the incubation process to become an Apache project. The home page is <a href="http://incubator.apache.org/projects/optiq.html">Apache Optiq</a>. This site is retained for historical interest. The original README file is <a href="README-old.md">here</a>.
[![Build Status](https://travis-ci.org/julianhyde/optiq.png)](https://travis-ci.org/julianhyde/optiq) optiq ===== Optiq is a dynamic data management framework. On May 25th, 2014, Optiq entered the incubation process to become an Apache project. On September 30, 2014, Apache Optiq was renamed to Apache Calcite. The home page is <a href="http://incubator.apache.org/projects/calcite.html">Apache Calcite</a>. This site is retained for historical interest. The original README file is <a href="README-old.md">here</a>.
Update link Apache Optiq -> Apache Calcite
Update link Apache Optiq -> Apache Calcite
Markdown
apache-2.0
julianhyde/optiq,julianhyde/optiq
markdown
## Code Before: [![Build Status](https://travis-ci.org/julianhyde/optiq.png)](https://travis-ci.org/julianhyde/optiq) optiq ===== Optiq is a dynamic data management framework. On May 25th, 2014, Optiq entered the incubation process to become an Apache project. The home page is <a href="http://incubator.apache.org/projects/optiq.html">Apache Optiq</a>. This site is retained for historical interest. The original README file is <a href="README-old.md">here</a>. ## Instruction: Update link Apache Optiq -> Apache Calcite ## Code After: [![Build Status](https://travis-ci.org/julianhyde/optiq.png)](https://travis-ci.org/julianhyde/optiq) optiq ===== Optiq is a dynamic data management framework. On May 25th, 2014, Optiq entered the incubation process to become an Apache project. On September 30, 2014, Apache Optiq was renamed to Apache Calcite. The home page is <a href="http://incubator.apache.org/projects/calcite.html">Apache Calcite</a>. This site is retained for historical interest. The original README file is <a href="README-old.md">here</a>.
[![Build Status](https://travis-ci.org/julianhyde/optiq.png)](https://travis-ci.org/julianhyde/optiq) optiq ===== Optiq is a dynamic data management framework. On May 25th, 2014, Optiq entered the incubation process to become an Apache project. + On September 30, 2014, Apache Optiq was renamed to Apache Calcite. - The home page is <a href="http://incubator.apache.org/projects/optiq.html">Apache Optiq</a>. ? ^^ ^^ ^^ ^^ + The home page is <a href="http://incubator.apache.org/projects/calcite.html">Apache Calcite</a>. ? ^^^^^ ^ ^^^^^ ^ This site is retained for historical interest. The original README file is <a href="README-old.md">here</a>.
3
0.25
2
1
27a1b639837fb2e05fc05ebe47a6173bfe56ea9d
annotator.module.ts
annotator.module.ts
import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { MdButtonModule, MdCoreModule, } from '@angular/material'; import { AnnotatorComponent } from './annotator.component'; import { PlayerComponent } from './player/player.component'; import { AnnotationsComponent } from './annotations/annotations.component'; import { AnnotationPipe } from './annotations/annotation.pipe'; import { DurationPipe } from './player/duration.pipe'; import { DurationShortPipe } from './player/duration.pipe'; import { PlayerControlService } from './shared/player-control.service'; @NgModule({ declarations: [ AnnotatorComponent, PlayerComponent, AnnotationsComponent, AnnotationPipe, DurationPipe, DurationShortPipe, ], imports: [ BrowserModule, FormsModule, MdButtonModule, ], exports: [ AnnotatorComponent, ], providers: [ PlayerControlService, ], }) export class AnnotatorModule { }
import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { MatButtonModule } from '@angular/material'; import { AnnotatorComponent } from './annotator.component'; import { PlayerComponent } from './player/player.component'; import { AnnotationsComponent } from './annotations/annotations.component'; import { AnnotationPipe } from './annotations/annotation.pipe'; import { DurationPipe } from './player/duration.pipe'; import { DurationShortPipe } from './player/duration.pipe'; import { PlayerControlService } from './shared/player-control.service'; @NgModule({ declarations: [ AnnotatorComponent, PlayerComponent, AnnotationsComponent, AnnotationPipe, DurationPipe, DurationShortPipe, ], imports: [ BrowserModule, FormsModule, MatButtonModule, ], exports: [ AnnotatorComponent, ], providers: [ PlayerControlService, ], }) export class AnnotatorModule { }
Support latest version of dependencies
Support latest version of dependencies
TypeScript
bsd-3-clause
Alveo/alveo-transcriber,Alveo/alveo-transcriber,Alveo/alveo-transcriber,Alveo/alveo-transcriber
typescript
## Code Before: import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { MdButtonModule, MdCoreModule, } from '@angular/material'; import { AnnotatorComponent } from './annotator.component'; import { PlayerComponent } from './player/player.component'; import { AnnotationsComponent } from './annotations/annotations.component'; import { AnnotationPipe } from './annotations/annotation.pipe'; import { DurationPipe } from './player/duration.pipe'; import { DurationShortPipe } from './player/duration.pipe'; import { PlayerControlService } from './shared/player-control.service'; @NgModule({ declarations: [ AnnotatorComponent, PlayerComponent, AnnotationsComponent, AnnotationPipe, DurationPipe, DurationShortPipe, ], imports: [ BrowserModule, FormsModule, MdButtonModule, ], exports: [ AnnotatorComponent, ], providers: [ PlayerControlService, ], }) export class AnnotatorModule { } ## Instruction: Support latest version of dependencies ## Code After: import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { MatButtonModule } from '@angular/material'; import { AnnotatorComponent } from './annotator.component'; import { PlayerComponent } from './player/player.component'; import { AnnotationsComponent } from './annotations/annotations.component'; import { AnnotationPipe } from './annotations/annotation.pipe'; import { DurationPipe } from './player/duration.pipe'; import { DurationShortPipe } from './player/duration.pipe'; import { PlayerControlService } from './shared/player-control.service'; @NgModule({ declarations: [ AnnotatorComponent, PlayerComponent, AnnotationsComponent, AnnotationPipe, DurationPipe, DurationShortPipe, ], imports: [ BrowserModule, FormsModule, MatButtonModule, ], exports: [ AnnotatorComponent, ], providers: [ PlayerControlService, ], }) export class AnnotatorModule { }
import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; + import { MatButtonModule } from '@angular/material'; - import { - MdButtonModule, - MdCoreModule, - } from '@angular/material'; import { AnnotatorComponent } from './annotator.component'; import { PlayerComponent } from './player/player.component'; import { AnnotationsComponent } from './annotations/annotations.component'; import { AnnotationPipe } from './annotations/annotation.pipe'; import { DurationPipe } from './player/duration.pipe'; import { DurationShortPipe } from './player/duration.pipe'; import { PlayerControlService } from './shared/player-control.service'; @NgModule({ declarations: [ AnnotatorComponent, PlayerComponent, AnnotationsComponent, AnnotationPipe, DurationPipe, DurationShortPipe, ], imports: [ BrowserModule, FormsModule, - MdButtonModule, ? ^ + MatButtonModule, ? ^^ ], exports: [ AnnotatorComponent, ], providers: [ PlayerControlService, ], }) export class AnnotatorModule { }
7
0.170732
2
5
b508c60c8b08fa2eb935a84452b48641d64db720
src/client/react/stages/Registration/Register.js
src/client/react/stages/Registration/Register.js
import React from 'react'; import RegisterForm from './RegisterForm'; import Title from '../Title'; import ScrollAnimation from 'react-animate-on-scroll'; import '../../scss/_register.scss'; class Register extends React.Component { render() { return ( <main> <Title/> <ScrollAnimation animateIn='zoomIn' offset={0}> <div className='registerform'> Register <RegisterForm/> </div> </ScrollAnimation> </main> ); } } export default Register;
import React from 'react'; import RegisterForm from './RegisterForm'; import Title from '../Title'; import ScrollAnimation from 'react-animate-on-scroll'; import '../../scss/_register.scss'; class Register extends React.Component { render() { return ( <main> <Title/> <ScrollAnimation animateOnce animateIn='zoomIn' offset={0}> <div className='registerform'> Register <RegisterForm/> </div> </ScrollAnimation> </main> ); } } export default Register;
Fix issue with register form being animated on scroll
[FIX] Fix issue with register form being animated on scroll
JavaScript
mit
bwyap/ptc-amazing-g-race,bwyap/ptc-amazing-g-race
javascript
## Code Before: import React from 'react'; import RegisterForm from './RegisterForm'; import Title from '../Title'; import ScrollAnimation from 'react-animate-on-scroll'; import '../../scss/_register.scss'; class Register extends React.Component { render() { return ( <main> <Title/> <ScrollAnimation animateIn='zoomIn' offset={0}> <div className='registerform'> Register <RegisterForm/> </div> </ScrollAnimation> </main> ); } } export default Register; ## Instruction: [FIX] Fix issue with register form being animated on scroll ## Code After: import React from 'react'; import RegisterForm from './RegisterForm'; import Title from '../Title'; import ScrollAnimation from 'react-animate-on-scroll'; import '../../scss/_register.scss'; class Register extends React.Component { render() { return ( <main> <Title/> <ScrollAnimation animateOnce animateIn='zoomIn' offset={0}> <div className='registerform'> Register <RegisterForm/> </div> </ScrollAnimation> </main> ); } } export default Register;
import React from 'react'; import RegisterForm from './RegisterForm'; import Title from '../Title'; import ScrollAnimation from 'react-animate-on-scroll'; import '../../scss/_register.scss'; class Register extends React.Component { render() { return ( <main> <Title/> - <ScrollAnimation animateIn='zoomIn' offset={0}> + <ScrollAnimation animateOnce animateIn='zoomIn' offset={0}> ? ++++++++++++ <div className='registerform'> Register <RegisterForm/> </div> </ScrollAnimation> </main> ); } } export default Register;
2
0.076923
1
1
9145a67c7427b41cef8f0c4518d2f39fc91d08b3
fedoracommunity/widgets/package/templates/details.mak
fedoracommunity/widgets/package/templates/details.mak
<div id="package-overview"> <div class="description-block"> <h3>Description</h3> <p class="package-description">${w.description}</p> </div> <div class="active-release-block"> <h3>Active Releases Overview</h3> <div>${w.children[0].display(package_name=w.package_info['name'])}</div> </div> <div class="upstream-block"> <h3>Upstream Summary</h3> <div class="homepage-block"> <h4>Project Homepage</h4> <% homepage = w.package_info.get('upstream_url', 'Unknown') %> <a href="${homepage}">${homepage}</a> </div> </div> </div>
<div id="package-overview"> <div class="description-block"> <h3>Description</h3> <p class="package-description">${w.description}</p> </div> <div class="active-release-block"> <h3>Active Releases Overview</h3> <div>${w.children[0].display(package_name=w.package_info['name'])}</div> </div> <% homepage = w.package_info.get('upstream_url', 'Unknown') %> % if homepage: <div class="upstream-block"> <h3>Upstream Summary</h3> <div class="homepage-block"> <h4>Project Homepage</h4> <a href="${homepage}">${homepage}</a> </div> </div> % endif </div>
Work with packages that don't have a URL in their spec (like autofs).
Work with packages that don't have a URL in their spec (like autofs).
Makefile
agpl-3.0
Fale/fedora-packages,fedora-infra/fedora-packages,fedora-infra/fedora-packages,fedora-infra/fedora-packages,fedora-infra/fedora-packages,Fale/fedora-packages,Fale/fedora-packages
makefile
## Code Before: <div id="package-overview"> <div class="description-block"> <h3>Description</h3> <p class="package-description">${w.description}</p> </div> <div class="active-release-block"> <h3>Active Releases Overview</h3> <div>${w.children[0].display(package_name=w.package_info['name'])}</div> </div> <div class="upstream-block"> <h3>Upstream Summary</h3> <div class="homepage-block"> <h4>Project Homepage</h4> <% homepage = w.package_info.get('upstream_url', 'Unknown') %> <a href="${homepage}">${homepage}</a> </div> </div> </div> ## Instruction: Work with packages that don't have a URL in their spec (like autofs). ## Code After: <div id="package-overview"> <div class="description-block"> <h3>Description</h3> <p class="package-description">${w.description}</p> </div> <div class="active-release-block"> <h3>Active Releases Overview</h3> <div>${w.children[0].display(package_name=w.package_info['name'])}</div> </div> <% homepage = w.package_info.get('upstream_url', 'Unknown') %> % if homepage: <div class="upstream-block"> <h3>Upstream Summary</h3> <div class="homepage-block"> <h4>Project Homepage</h4> <a href="${homepage}">${homepage}</a> </div> </div> % endif </div>
<div id="package-overview"> <div class="description-block"> <h3>Description</h3> <p class="package-description">${w.description}</p> </div> <div class="active-release-block"> <h3>Active Releases Overview</h3> <div>${w.children[0].display(package_name=w.package_info['name'])}</div> </div> + <% + homepage = w.package_info.get('upstream_url', 'Unknown') + %> + % if homepage: <div class="upstream-block"> <h3>Upstream Summary</h3> <div class="homepage-block"> <h4>Project Homepage</h4> - <% - homepage = w.package_info.get('upstream_url', 'Unknown') - %> <a href="${homepage}">${homepage}</a> </div> - </div> + </div> ? ++ + % endif </div>
10
0.47619
6
4
57f82b679035a10e2092d7e429f002c715cd6ee4
app/views/analog_inputs/show.html.erb
app/views/analog_inputs/show.html.erb
<ul> <li>Name: <%=h(@analog_input.name)%></li> <li>Address: <%=h(@analog_input.address)%></li> <li>Size: <%=h(@analog_input.size)%></li> <li>Reference: <%=h(@analog_input.reference)%></li> <li>Type: <%=h(@analog_input.type.title)%> (<%=h(@analog_input.type.code)%>)</li> </ul> <h3>Recent values</h3> <table> <thead> <th>Value</th> <th>Original</th> <th>Created</th> </thead> <tbody> <% tz = Time.zone if @analog_input.base_station.timezone and @analog_input.base_station.timezone != "" tz = TZInfo::Timezone.get(@analog_input.base_station.timezone) t = tz.utc_to_local(t) end if @logs.length == 0 %> <tr> <td colspan="100" class="noresults">No log entries yet</td> </tr> <% end @logs.each do |l| %> <tr> <td><%=l[:human_value].round(1)%>&deg;C</td> <td><%=l[:value]%></td> <td><%=tz.utc_to_local(l[:created_at])%></td> <% end %> </tbody> </table>
<ul> <li>Name: <%=h(@analog_input.name)%></li> <li>Address: <%=h(@analog_input.address)%></li> <li>Size: <%=h(@analog_input.size)%></li> <li>Reference: <%=h(@analog_input.reference)%></li> <li>Type: <%=h(@analog_input.type.title)%> (<%=h(@analog_input.type.code)%>)</li> </ul> <h3>Recent values</h3> <table> <thead> <th>Value</th> <th>Original</th> <th>Created</th> </thead> <tbody> <% tz = Time.zone if @analog_input.base_station.timezone and @analog_input.base_station.timezone != "" tz = TZInfo::Timezone.get(@analog_input.base_station.timezone) t = tz.utc_to_local(t) end if @logs.length == 0 %> <tr> <td colspan="100" class="noresults">No log entries yet</td> </tr> <% end @logs.each do |l| %> <tr> <td><%=l[:human_value].round(1)%>&deg;C</td> <td><%=l[:value]%></td> <td><%=tz.utc_to_local(l[:created_at]).to_s.gsub(/ ?UTC/,'')%></td> <% end %> </tbody> </table>
Remove UTC string from local times
Remove UTC string from local times
HTML+ERB
artistic-2.0
johnmckerrell/yahms-rails,johnmckerrell/yahms-rails
html+erb
## Code Before: <ul> <li>Name: <%=h(@analog_input.name)%></li> <li>Address: <%=h(@analog_input.address)%></li> <li>Size: <%=h(@analog_input.size)%></li> <li>Reference: <%=h(@analog_input.reference)%></li> <li>Type: <%=h(@analog_input.type.title)%> (<%=h(@analog_input.type.code)%>)</li> </ul> <h3>Recent values</h3> <table> <thead> <th>Value</th> <th>Original</th> <th>Created</th> </thead> <tbody> <% tz = Time.zone if @analog_input.base_station.timezone and @analog_input.base_station.timezone != "" tz = TZInfo::Timezone.get(@analog_input.base_station.timezone) t = tz.utc_to_local(t) end if @logs.length == 0 %> <tr> <td colspan="100" class="noresults">No log entries yet</td> </tr> <% end @logs.each do |l| %> <tr> <td><%=l[:human_value].round(1)%>&deg;C</td> <td><%=l[:value]%></td> <td><%=tz.utc_to_local(l[:created_at])%></td> <% end %> </tbody> </table> ## Instruction: Remove UTC string from local times ## Code After: <ul> <li>Name: <%=h(@analog_input.name)%></li> <li>Address: <%=h(@analog_input.address)%></li> <li>Size: <%=h(@analog_input.size)%></li> <li>Reference: <%=h(@analog_input.reference)%></li> <li>Type: <%=h(@analog_input.type.title)%> (<%=h(@analog_input.type.code)%>)</li> </ul> <h3>Recent values</h3> <table> <thead> <th>Value</th> <th>Original</th> <th>Created</th> </thead> <tbody> <% tz = Time.zone if @analog_input.base_station.timezone and @analog_input.base_station.timezone != "" tz = TZInfo::Timezone.get(@analog_input.base_station.timezone) t = tz.utc_to_local(t) end if @logs.length == 0 %> <tr> <td colspan="100" class="noresults">No log entries yet</td> </tr> <% end @logs.each do |l| %> <tr> <td><%=l[:human_value].round(1)%>&deg;C</td> <td><%=l[:value]%></td> <td><%=tz.utc_to_local(l[:created_at]).to_s.gsub(/ ?UTC/,'')%></td> <% end %> </tbody> </table>
<ul> <li>Name: <%=h(@analog_input.name)%></li> <li>Address: <%=h(@analog_input.address)%></li> <li>Size: <%=h(@analog_input.size)%></li> <li>Reference: <%=h(@analog_input.reference)%></li> <li>Type: <%=h(@analog_input.type.title)%> (<%=h(@analog_input.type.code)%>)</li> </ul> <h3>Recent values</h3> <table> <thead> <th>Value</th> <th>Original</th> <th>Created</th> </thead> <tbody> <% tz = Time.zone if @analog_input.base_station.timezone and @analog_input.base_station.timezone != "" tz = TZInfo::Timezone.get(@analog_input.base_station.timezone) t = tz.utc_to_local(t) end if @logs.length == 0 %> <tr> <td colspan="100" class="noresults">No log entries yet</td> </tr> <% end @logs.each do |l| %> <tr> <td><%=l[:human_value].round(1)%>&deg;C</td> <td><%=l[:value]%></td> - <td><%=tz.utc_to_local(l[:created_at])%></td> + <td><%=tz.utc_to_local(l[:created_at]).to_s.gsub(/ ?UTC/,'')%></td> ? ++++++++++++++++++++++ <% end %> </tbody> </table>
2
0.05
1
1
1b529b8dd0b78acdb66f55eaaeb2ce09b5b0c79a
guard-annotate.gemspec
guard-annotate.gemspec
$:.push File.expand_path("../lib", __FILE__) require "guard/annotate/version" Gem::Specification.new do |s| s.name = "guard-annotate" s.version = Guard::AnnotateVersion::VERSION s.platform = Gem::Platform::RUBY s.authors = ["Craig P Jolicoeur"] s.email = ["cpjolicoeur@gmail.com"] s.homepage = "http://craigjolicoeur.com" s.summary = %q{Guard gem for annotate} s.description = %q{Guard::Annotate automatically runs the annotate gem when needed} s.license = "MIT" s.rubyforge_project = "guard-annotate" s.add_dependency 'guard-compat', '~> 1.2.1' s.add_dependency 'annotate', '~> 2.4', '>= 2.4.0' s.add_development_dependency 'bundler', '~> 1.6' s.files = Dir.glob('{lib}/**/*') + %w[LICENSE README.rdoc] s.require_paths = ["lib"] s.rdoc_options = ["--charset=UTF-8", "--main=README.rdoc", "--exclude='(lib|test|spec)|(Gem|Guard|Rake)file'"] end
$:.push File.expand_path("../lib", __FILE__) require "guard/annotate/version" Gem::Specification.new do |s| s.name = "guard-annotate" s.version = Guard::AnnotateVersion::VERSION s.platform = Gem::Platform::RUBY s.authors = ["Craig P Jolicoeur"] s.email = ["cpjolicoeur@gmail.com"] s.homepage = "http://craigjolicoeur.com" s.summary = %q{Guard gem for annotate} s.description = %q{Guard::Annotate automatically runs the annotate gem when needed} s.license = "MIT" s.post_install_message = %Q(** guard-annotate is looking for maintainers. While I am still trying to accept and stay on top of new Pull Requests, I no longer personally actively use this guard plugin. If you are interested in becoming a maintainer please contact me via GitHub Issues at https://github.com/guard/guard-annotate. **) s.rubyforge_project = "guard-annotate" s.add_dependency 'guard-compat', '~> 1.2.1' s.add_dependency 'annotate', '~> 2.4', '>= 2.4.0' s.add_development_dependency 'bundler', '~> 1.6' s.files = Dir.glob('{lib}/**/*') + %w[LICENSE README.rdoc] s.require_paths = ["lib"] s.rdoc_options = ["--charset=UTF-8", "--main=README.rdoc", "--exclude='(lib|test|spec)|(Gem|Guard|Rake)file'"] end
Add post install message to gemspec
Add post install message to gemspec
Ruby
mit
cpjolicoeur/guard-annotate
ruby
## Code Before: $:.push File.expand_path("../lib", __FILE__) require "guard/annotate/version" Gem::Specification.new do |s| s.name = "guard-annotate" s.version = Guard::AnnotateVersion::VERSION s.platform = Gem::Platform::RUBY s.authors = ["Craig P Jolicoeur"] s.email = ["cpjolicoeur@gmail.com"] s.homepage = "http://craigjolicoeur.com" s.summary = %q{Guard gem for annotate} s.description = %q{Guard::Annotate automatically runs the annotate gem when needed} s.license = "MIT" s.rubyforge_project = "guard-annotate" s.add_dependency 'guard-compat', '~> 1.2.1' s.add_dependency 'annotate', '~> 2.4', '>= 2.4.0' s.add_development_dependency 'bundler', '~> 1.6' s.files = Dir.glob('{lib}/**/*') + %w[LICENSE README.rdoc] s.require_paths = ["lib"] s.rdoc_options = ["--charset=UTF-8", "--main=README.rdoc", "--exclude='(lib|test|spec)|(Gem|Guard|Rake)file'"] end ## Instruction: Add post install message to gemspec ## Code After: $:.push File.expand_path("../lib", __FILE__) require "guard/annotate/version" Gem::Specification.new do |s| s.name = "guard-annotate" s.version = Guard::AnnotateVersion::VERSION s.platform = Gem::Platform::RUBY s.authors = ["Craig P Jolicoeur"] s.email = ["cpjolicoeur@gmail.com"] s.homepage = "http://craigjolicoeur.com" s.summary = %q{Guard gem for annotate} s.description = %q{Guard::Annotate automatically runs the annotate gem when needed} s.license = "MIT" s.post_install_message = %Q(** guard-annotate is looking for maintainers. While I am still trying to accept and stay on top of new Pull Requests, I no longer personally actively use this guard plugin. If you are interested in becoming a maintainer please contact me via GitHub Issues at https://github.com/guard/guard-annotate. **) s.rubyforge_project = "guard-annotate" s.add_dependency 'guard-compat', '~> 1.2.1' s.add_dependency 'annotate', '~> 2.4', '>= 2.4.0' s.add_development_dependency 'bundler', '~> 1.6' s.files = Dir.glob('{lib}/**/*') + %w[LICENSE README.rdoc] s.require_paths = ["lib"] s.rdoc_options = ["--charset=UTF-8", "--main=README.rdoc", "--exclude='(lib|test|spec)|(Gem|Guard|Rake)file'"] end
$:.push File.expand_path("../lib", __FILE__) require "guard/annotate/version" Gem::Specification.new do |s| s.name = "guard-annotate" s.version = Guard::AnnotateVersion::VERSION s.platform = Gem::Platform::RUBY s.authors = ["Craig P Jolicoeur"] s.email = ["cpjolicoeur@gmail.com"] s.homepage = "http://craigjolicoeur.com" s.summary = %q{Guard gem for annotate} s.description = %q{Guard::Annotate automatically runs the annotate gem when needed} s.license = "MIT" + s.post_install_message = %Q(** guard-annotate is looking for maintainers. While I am still trying + to accept and stay on top of new Pull Requests, I no longer personally actively use this guard + plugin. If you are interested in becoming a maintainer please contact me via GitHub Issues at + https://github.com/guard/guard-annotate. **) + s.rubyforge_project = "guard-annotate" s.add_dependency 'guard-compat', '~> 1.2.1' s.add_dependency 'annotate', '~> 2.4', '>= 2.4.0' s.add_development_dependency 'bundler', '~> 1.6' s.files = Dir.glob('{lib}/**/*') + %w[LICENSE README.rdoc] s.require_paths = ["lib"] s.rdoc_options = ["--charset=UTF-8", "--main=README.rdoc", "--exclude='(lib|test|spec)|(Gem|Guard|Rake)file'"] end
5
0.192308
5
0
b8b3f919fd37abddf082e0af22bc28b0c3d7c1b2
app/views/groups/new.html.haml
app/views/groups/new.html.haml
- page_title 'New Group' - header_title "Groups", dashboard_groups_path %h3.page-title New Group %hr = form_for @group, html: { class: 'group-form form-horizontal' } do |f| = form_errors(@group) = render 'shared/group_form', f: f, autofocus: true .form-group.group-description-holder = f.label :avatar, "Group avatar", class: 'control-label' .col-sm-10 = render 'shared/choose_group_avatar_button', f: f = render 'shared/visibility_level', f: f, visibility_level: default_group_visibility, can_change_visibility_level: true, form_model: @group .form-group .col-sm-offset-2.col-sm-10 = render 'shared/group_tips' .form-actions = f.submit 'Create group', class: "btn btn-create", tabindex: 3 = link_to 'Cancel', dashboard_groups_path, class: 'btn btn-cancel'
- page_title 'New Group' - header_title "Groups", dashboard_groups_path %h3.page-title New Group %hr = form_for @group, html: { class: 'group-form form-horizontal gl-show-field-errors' } do |f| = form_errors(@group) = render 'shared/group_form', f: f, autofocus: true .form-group.group-description-holder = f.label :avatar, "Group avatar", class: 'control-label' .col-sm-10 = render 'shared/choose_group_avatar_button', f: f = render 'shared/visibility_level', f: f, visibility_level: default_group_visibility, can_change_visibility_level: true, form_model: @group .form-group .col-sm-offset-2.col-sm-10 = render 'shared/group_tips' .form-actions = f.submit 'Create group', class: "btn btn-create", tabindex: 3 = link_to 'Cancel', dashboard_groups_path, class: 'btn btn-cancel'
Initialize form validation on new group form.
Initialize form validation on new group form.
Haml
mit
stoplightio/gitlabhq,htve/GitlabForChinese,dreampet/gitlab,axilleas/gitlabhq,darkrasid/gitlabhq,openwide-java/gitlabhq,dreampet/gitlab,axilleas/gitlabhq,mmkassem/gitlabhq,daiyu/gitlab-zh,dreampet/gitlab,jirutka/gitlabhq,mmkassem/gitlabhq,dreampet/gitlab,LUMC/gitlabhq,LUMC/gitlabhq,t-zuehlsdorff/gitlabhq,iiet/iiet-git,axilleas/gitlabhq,daiyu/gitlab-zh,dplarson/gitlabhq,jirutka/gitlabhq,dplarson/gitlabhq,daiyu/gitlab-zh,openwide-java/gitlabhq,iiet/iiet-git,htve/GitlabForChinese,darkrasid/gitlabhq,jirutka/gitlabhq,iiet/iiet-git,stoplightio/gitlabhq,t-zuehlsdorff/gitlabhq,darkrasid/gitlabhq,iiet/iiet-git,mmkassem/gitlabhq,t-zuehlsdorff/gitlabhq,openwide-java/gitlabhq,t-zuehlsdorff/gitlabhq,darkrasid/gitlabhq,htve/GitlabForChinese,LUMC/gitlabhq,LUMC/gitlabhq,axilleas/gitlabhq,stoplightio/gitlabhq,jirutka/gitlabhq,dplarson/gitlabhq,openwide-java/gitlabhq,mmkassem/gitlabhq,stoplightio/gitlabhq,dplarson/gitlabhq,htve/GitlabForChinese,daiyu/gitlab-zh
haml
## Code Before: - page_title 'New Group' - header_title "Groups", dashboard_groups_path %h3.page-title New Group %hr = form_for @group, html: { class: 'group-form form-horizontal' } do |f| = form_errors(@group) = render 'shared/group_form', f: f, autofocus: true .form-group.group-description-holder = f.label :avatar, "Group avatar", class: 'control-label' .col-sm-10 = render 'shared/choose_group_avatar_button', f: f = render 'shared/visibility_level', f: f, visibility_level: default_group_visibility, can_change_visibility_level: true, form_model: @group .form-group .col-sm-offset-2.col-sm-10 = render 'shared/group_tips' .form-actions = f.submit 'Create group', class: "btn btn-create", tabindex: 3 = link_to 'Cancel', dashboard_groups_path, class: 'btn btn-cancel' ## Instruction: Initialize form validation on new group form. ## Code After: - page_title 'New Group' - header_title "Groups", dashboard_groups_path %h3.page-title New Group %hr = form_for @group, html: { class: 'group-form form-horizontal gl-show-field-errors' } do |f| = form_errors(@group) = render 'shared/group_form', f: f, autofocus: true .form-group.group-description-holder = f.label :avatar, "Group avatar", class: 'control-label' .col-sm-10 = render 'shared/choose_group_avatar_button', f: f = render 'shared/visibility_level', f: f, visibility_level: default_group_visibility, can_change_visibility_level: true, form_model: @group .form-group .col-sm-offset-2.col-sm-10 = render 'shared/group_tips' .form-actions = f.submit 'Create group', class: "btn btn-create", tabindex: 3 = link_to 'Cancel', dashboard_groups_path, class: 'btn btn-cancel'
- page_title 'New Group' - header_title "Groups", dashboard_groups_path %h3.page-title New Group %hr - = form_for @group, html: { class: 'group-form form-horizontal' } do |f| + = form_for @group, html: { class: 'group-form form-horizontal gl-show-field-errors' } do |f| ? +++++++++++++++++++++ = form_errors(@group) = render 'shared/group_form', f: f, autofocus: true .form-group.group-description-holder = f.label :avatar, "Group avatar", class: 'control-label' .col-sm-10 = render 'shared/choose_group_avatar_button', f: f = render 'shared/visibility_level', f: f, visibility_level: default_group_visibility, can_change_visibility_level: true, form_model: @group .form-group .col-sm-offset-2.col-sm-10 = render 'shared/group_tips' .form-actions = f.submit 'Create group', class: "btn btn-create", tabindex: 3 = link_to 'Cancel', dashboard_groups_path, class: 'btn btn-cancel'
2
0.08
1
1
7be1c5394e0bc5796b38f5515770c725bbe70712
assets/js/colette-iframeResizer.js
assets/js/colette-iframeResizer.js
colette.iframeResizer = (function() { 'use strict'; var pub = {}, cfg = { selector: '#iframeContent', el: null, delay: 0, resizeInternal: false }; pub.init = function(args) { cfg.delay = args.delay || cfg.delay; cfg.el = document.querySelector(args.selector || cfg.selector); window.addEventListener('message', function(e) { // resizeComplete if ('resizeComplete' === e.data) { iframeResizeComplete(); } }); window.addEventListener('load', function(e) { height(); }); window.addEventListener('resize', function(e) { height(); }); }; var iframeResizeComplete = function() { setTimeout(function() { cfg.resizeInternal = false; }, 500); }; var height = function() { if (!cfg.resizeInternal) { setTimeout(function() { sendHeight(); }, cfg.delay); } }; var sendHeight = function() { window.top.postMessage({type: 'doResize', height: cfg.el.offsetHeight}, '*'); cfg.resizeInternal = true; }; return pub; })();
colette.iframeResizer = (function() { 'use strict'; var pub = {}, cfg = { selector: '#iframeContent', el: null, delay: 0, resizeInternal: false, iframeId: 'iframeId' }; pub.init = function(args) { cfg.delay = args.delay || cfg.delay; cfg.iframeId = args.iframeId || cfg.iframeId; cfg.el = document.querySelector(args.selector || cfg.selector); window.addEventListener('message', function(e) { // resizeComplete if ('resizeComplete' === e.data) { iframeResizeComplete(); } }); window.addEventListener('load', function(e) { height(); }); window.addEventListener('resize', function(e) { height(); }); }; var iframeResizeComplete = function() { setTimeout(function() { cfg.resizeInternal = false; }, 500); }; var height = function() { if (!cfg.resizeInternal) { setTimeout(function() { sendHeight(); }, cfg.delay); } }; var sendHeight = function() { window.top.postMessage({type: 'doResize', height: cfg.el.offsetHeight, iframeId: cfg.iframeId}, '*'); cfg.resizeInternal = true; }; return pub; })();
Fix resizer for election's embeds
Fix resizer for election's embeds
JavaScript
mit
20minutes/colette
javascript
## Code Before: colette.iframeResizer = (function() { 'use strict'; var pub = {}, cfg = { selector: '#iframeContent', el: null, delay: 0, resizeInternal: false }; pub.init = function(args) { cfg.delay = args.delay || cfg.delay; cfg.el = document.querySelector(args.selector || cfg.selector); window.addEventListener('message', function(e) { // resizeComplete if ('resizeComplete' === e.data) { iframeResizeComplete(); } }); window.addEventListener('load', function(e) { height(); }); window.addEventListener('resize', function(e) { height(); }); }; var iframeResizeComplete = function() { setTimeout(function() { cfg.resizeInternal = false; }, 500); }; var height = function() { if (!cfg.resizeInternal) { setTimeout(function() { sendHeight(); }, cfg.delay); } }; var sendHeight = function() { window.top.postMessage({type: 'doResize', height: cfg.el.offsetHeight}, '*'); cfg.resizeInternal = true; }; return pub; })(); ## Instruction: Fix resizer for election's embeds ## Code After: colette.iframeResizer = (function() { 'use strict'; var pub = {}, cfg = { selector: '#iframeContent', el: null, delay: 0, resizeInternal: false, iframeId: 'iframeId' }; pub.init = function(args) { cfg.delay = args.delay || cfg.delay; cfg.iframeId = args.iframeId || cfg.iframeId; cfg.el = document.querySelector(args.selector || cfg.selector); window.addEventListener('message', function(e) { // resizeComplete if ('resizeComplete' === e.data) { iframeResizeComplete(); } }); window.addEventListener('load', function(e) { height(); }); window.addEventListener('resize', function(e) { height(); }); }; var iframeResizeComplete = function() { setTimeout(function() { cfg.resizeInternal = false; }, 500); }; var height = function() { if (!cfg.resizeInternal) { setTimeout(function() { sendHeight(); }, cfg.delay); } }; var sendHeight = function() { window.top.postMessage({type: 'doResize', height: cfg.el.offsetHeight, iframeId: cfg.iframeId}, '*'); cfg.resizeInternal = true; }; return pub; })();
colette.iframeResizer = (function() { 'use strict'; var pub = {}, cfg = { selector: '#iframeContent', el: null, delay: 0, - resizeInternal: false + resizeInternal: false, ? + + iframeId: 'iframeId' }; pub.init = function(args) { cfg.delay = args.delay || cfg.delay; + cfg.iframeId = args.iframeId || cfg.iframeId; cfg.el = document.querySelector(args.selector || cfg.selector); window.addEventListener('message', function(e) { // resizeComplete if ('resizeComplete' === e.data) { iframeResizeComplete(); } }); window.addEventListener('load', function(e) { height(); }); window.addEventListener('resize', function(e) { height(); }); }; var iframeResizeComplete = function() { setTimeout(function() { cfg.resizeInternal = false; }, 500); }; var height = function() { if (!cfg.resizeInternal) { setTimeout(function() { sendHeight(); }, cfg.delay); } }; var sendHeight = function() { - window.top.postMessage({type: 'doResize', height: cfg.el.offsetHeight}, '*'); + window.top.postMessage({type: 'doResize', height: cfg.el.offsetHeight, iframeId: cfg.iframeId}, '*'); ? ++++++++++++++++++++++++ cfg.resizeInternal = true; }; return pub; })();
6
0.105263
4
2
032d78e092b12d6bc73bcb787f50a9168ea3057a
README.md
README.md
> A open source content management system based on `Vue.js`. ## How to Copy `server/config.sample.json` to `server/config.json` and modify it as you need. ``` bash # install dependencies npm install # serve with hot reload at localhost:8080 npm run dev # build for production with minification npm run build # build for production and view the bundle analyzer report npm run build --report # run unit tests npm run unit # run e2e tests npm run e2e # run all tests npm test ``` For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
![Build Status](https://jenkins.limeishu.org.tw/job/LCMS/job/master/badge/icon) > A open source content management system based on `Vue.js`. ## How to Copy `server/config.sample.json` to `server/config.json` and modify it as you need. ``` bash # install dependencies npm install # serve with hot reload at localhost:8080 npm run dev # build for production with minification npm run build # build for production and view the bundle analyzer report npm run build --report # run unit tests npm run unit # run e2e tests npm run e2e # run all tests npm test ``` For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
Add build status icon from jenkins CI.
Add build status icon from jenkins CI.
Markdown
mit
Limeishu/LCMS,Limeishu/LCMS
markdown
## Code Before: > A open source content management system based on `Vue.js`. ## How to Copy `server/config.sample.json` to `server/config.json` and modify it as you need. ``` bash # install dependencies npm install # serve with hot reload at localhost:8080 npm run dev # build for production with minification npm run build # build for production and view the bundle analyzer report npm run build --report # run unit tests npm run unit # run e2e tests npm run e2e # run all tests npm test ``` For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). ## Instruction: Add build status icon from jenkins CI. ## Code After: ![Build Status](https://jenkins.limeishu.org.tw/job/LCMS/job/master/badge/icon) > A open source content management system based on `Vue.js`. ## How to Copy `server/config.sample.json` to `server/config.json` and modify it as you need. ``` bash # install dependencies npm install # serve with hot reload at localhost:8080 npm run dev # build for production with minification npm run build # build for production and view the bundle analyzer report npm run build --report # run unit tests npm run unit # run e2e tests npm run e2e # run all tests npm test ``` For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
+ + ![Build Status](https://jenkins.limeishu.org.tw/job/LCMS/job/master/badge/icon) > A open source content management system based on `Vue.js`. ## How to Copy `server/config.sample.json` to `server/config.json` and modify it as you need. ``` bash # install dependencies npm install # serve with hot reload at localhost:8080 npm run dev # build for production with minification npm run build # build for production and view the bundle analyzer report npm run build --report # run unit tests npm run unit # run e2e tests npm run e2e # run all tests npm test ``` For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
2
0.064516
2
0
b65da01298f11c787deaf08845f6bc3b7300eee4
system/path.zsh
system/path.zsh
export PATH=./bin:$DOTFILES/bin:$PATH export PYTHONPATH=$PYTHONPATH:/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages:$(brew --prefix)/lib/python2.7/site-packages
export PATH=./bin:$DOTFILES/bin:$PATH PYTHONPATH=$PYTHONPATH:/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages if [[ -a $(which brew) ]] then PYTHONPATH=$PYTHONPATH:$(brew --prefix)/lib/python2.7/site-packages fi export PYTHONPATH
Fix PYTHONPATH for when brew is not installed
Fix PYTHONPATH for when brew is not installed
Shell
mit
eyuelt/dotfiles,eyuelt/dotfiles
shell
## Code Before: export PATH=./bin:$DOTFILES/bin:$PATH export PYTHONPATH=$PYTHONPATH:/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages:$(brew --prefix)/lib/python2.7/site-packages ## Instruction: Fix PYTHONPATH for when brew is not installed ## Code After: export PATH=./bin:$DOTFILES/bin:$PATH PYTHONPATH=$PYTHONPATH:/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages if [[ -a $(which brew) ]] then PYTHONPATH=$PYTHONPATH:$(brew --prefix)/lib/python2.7/site-packages fi export PYTHONPATH
export PATH=./bin:$DOTFILES/bin:$PATH - export PYTHONPATH=$PYTHONPATH:/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages:$(brew --prefix)/lib/python2.7/site-packages ? ------- --------------------------------------------- + PYTHONPATH=$PYTHONPATH:/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages + if [[ -a $(which brew) ]] + then + PYTHONPATH=$PYTHONPATH:$(brew --prefix)/lib/python2.7/site-packages + fi + export PYTHONPATH
7
2.333333
6
1
25256e23f2892b7123337b14f99778e0964f1f25
README.md
README.md
Uptodate helps keep your timestamps up to date. You can read more about it, and see the documentation here: [http://prezjordan.github.io/uptodate](http://prezjordan.github.io/uptodate) &copy; 2013 [Jordan Scales](http://jordanscales.com) | MIT Licensed
[![build status](https://travis-ci.org/prezjordan/uptodate.png)](https://travis-ci.org/prezjordan/uptodate) Uptodate helps keep your timestamps up to date. You can read more about it, and see the documentation here: [http://prezjordan.github.io/uptodate](http://prezjordan.github.io/uptodate) ### Contributing * Install the development dependencies (`npm install`) * Checkout a feature branch (`git checkout -b feature/something-cool`) * Test your changes (`npm test`) * Commit your changes * Push your changes (`git push origin feature/something-cool`) * Open a pull request &copy; 2013 [Jordan Scales](http://jordanscales.com) | MIT Licensed
Build status and contributing instructions
Build status and contributing instructions
Markdown
mit
jdan/uptodate
markdown
## Code Before: Uptodate helps keep your timestamps up to date. You can read more about it, and see the documentation here: [http://prezjordan.github.io/uptodate](http://prezjordan.github.io/uptodate) &copy; 2013 [Jordan Scales](http://jordanscales.com) | MIT Licensed ## Instruction: Build status and contributing instructions ## Code After: [![build status](https://travis-ci.org/prezjordan/uptodate.png)](https://travis-ci.org/prezjordan/uptodate) Uptodate helps keep your timestamps up to date. You can read more about it, and see the documentation here: [http://prezjordan.github.io/uptodate](http://prezjordan.github.io/uptodate) ### Contributing * Install the development dependencies (`npm install`) * Checkout a feature branch (`git checkout -b feature/something-cool`) * Test your changes (`npm test`) * Commit your changes * Push your changes (`git push origin feature/something-cool`) * Open a pull request &copy; 2013 [Jordan Scales](http://jordanscales.com) | MIT Licensed
+ + [![build status](https://travis-ci.org/prezjordan/uptodate.png)](https://travis-ci.org/prezjordan/uptodate) Uptodate helps keep your timestamps up to date. You can read more about it, and see the documentation here: [http://prezjordan.github.io/uptodate](http://prezjordan.github.io/uptodate) + ### Contributing + + * Install the development dependencies (`npm install`) + * Checkout a feature branch (`git checkout -b feature/something-cool`) + * Test your changes (`npm test`) + * Commit your changes + * Push your changes (`git push origin feature/something-cool`) + * Open a pull request + &copy; 2013 [Jordan Scales](http://jordanscales.com) | MIT Licensed
11
1.833333
11
0
be10a8712bcaf535a8dfed414ef6a536adc66c50
server/server.js
server/server.js
// BASE SETUP // ============================================================================= var express = require('express'); var server = express(); var port = process.env.PORT || 4000; var bodyParser = require('body-parser'); var router = express.Router(); var apiRouter = express.Router(); // BODY PARSER SETUP // ============================================================================= server.use(bodyParser.urlencoded({ extended: true })); server.use(bodyParser.json()); // SERVER ROUTES // ============================================================================= // Middleware router.use(function(req, res, next) { console.log('Connection detected: ' + req.method + ' on ' + req.url); next(); }); // Browser routes router.get('/', function(req, res) { res.send('<h1>Welcome to The Ape Butler Server!</h1>'); }); server.use('/', router); // Api Routes apiRouter.get('/', function(req, res) { res.send('<h1>Welcome to The Ape Butler API!</h1>'); }) server.use('/api', apiRouter); server.listen(port); console.log('The Butler Server is running on port: ' + port);
// BASE SETUP // ============================================================================= var express = require('express'); var server = express(); var port = process.env.PORT || 4000; var bodyParser = require('body-parser'); var router = express.Router(); var apiRouter = express.Router(); // BODY PARSER SETUP // ============================================================================= server.use(bodyParser.urlencoded({ extended: true })); server.use(bodyParser.json()); // SERVER ROUTES // ============================================================================= // Middleware router.use(function(req, res, next) { console.log('Connection detected: ' + req.method + ' on ' + req.url); next(); }); // Browser routes router.get('/', function(req, res) { // res.send('<h1>Welcome to The Ape Butler Server!</h1>'); }); server.use('/', express.static('client')); // server.use('/', express.static(path.join(__dirname, 'client'))); // Api Routes apiRouter.get('/', function(req, res) { res.send('<h1>Welcome to The Ape Butler API!</h1>'); }) server.use('/api', apiRouter); server.listen(port); console.log('The Butler Server is running on port: ' + port);
Add root route for serving index.html
Add root route for serving index.html
JavaScript
mit
andersberg/the-butler,andersberg/the-butler
javascript
## Code Before: // BASE SETUP // ============================================================================= var express = require('express'); var server = express(); var port = process.env.PORT || 4000; var bodyParser = require('body-parser'); var router = express.Router(); var apiRouter = express.Router(); // BODY PARSER SETUP // ============================================================================= server.use(bodyParser.urlencoded({ extended: true })); server.use(bodyParser.json()); // SERVER ROUTES // ============================================================================= // Middleware router.use(function(req, res, next) { console.log('Connection detected: ' + req.method + ' on ' + req.url); next(); }); // Browser routes router.get('/', function(req, res) { res.send('<h1>Welcome to The Ape Butler Server!</h1>'); }); server.use('/', router); // Api Routes apiRouter.get('/', function(req, res) { res.send('<h1>Welcome to The Ape Butler API!</h1>'); }) server.use('/api', apiRouter); server.listen(port); console.log('The Butler Server is running on port: ' + port); ## Instruction: Add root route for serving index.html ## Code After: // BASE SETUP // ============================================================================= var express = require('express'); var server = express(); var port = process.env.PORT || 4000; var bodyParser = require('body-parser'); var router = express.Router(); var apiRouter = express.Router(); // BODY PARSER SETUP // ============================================================================= server.use(bodyParser.urlencoded({ extended: true })); server.use(bodyParser.json()); // SERVER ROUTES // ============================================================================= // Middleware router.use(function(req, res, next) { console.log('Connection detected: ' + req.method + ' on ' + req.url); next(); }); // Browser routes router.get('/', function(req, res) { // res.send('<h1>Welcome to The Ape Butler Server!</h1>'); }); server.use('/', express.static('client')); // server.use('/', express.static(path.join(__dirname, 'client'))); // Api Routes apiRouter.get('/', function(req, res) { res.send('<h1>Welcome to The Ape Butler API!</h1>'); }) server.use('/api', apiRouter); server.listen(port); console.log('The Butler Server is running on port: ' + port);
// BASE SETUP // ============================================================================= var express = require('express'); var server = express(); var port = process.env.PORT || 4000; var bodyParser = require('body-parser'); var router = express.Router(); var apiRouter = express.Router(); // BODY PARSER SETUP // ============================================================================= server.use(bodyParser.urlencoded({ extended: true })); server.use(bodyParser.json()); // SERVER ROUTES // ============================================================================= // Middleware router.use(function(req, res, next) { console.log('Connection detected: ' + req.method + ' on ' + req.url); next(); }); // Browser routes router.get('/', function(req, res) { - res.send('<h1>Welcome to The Ape Butler Server!</h1>'); + // res.send('<h1>Welcome to The Ape Butler Server!</h1>'); ? +++ + }); - server.use('/', router); + server.use('/', express.static('client')); + // server.use('/', express.static(path.join(__dirname, 'client'))); // Api Routes apiRouter.get('/', function(req, res) { res.send('<h1>Welcome to The Ape Butler API!</h1>'); }) server.use('/api', apiRouter); server.listen(port); console.log('The Butler Server is running on port: ' + port);
6
0.157895
4
2
3fb0489208bbe943b05be80e0d56dd065f1e8270
archive/index.html
archive/index.html
--- layout: archive title: Archivo - Comicgram --- <div id="archive" class="container"> <div class="row"> <div class="col-xs-12 col-sm-8 col-sm-offset-4"> {% for post in site.posts %} {% capture currentyear %}{{ post.date | date: "%Y" }}{% endcapture %} {% if currentyear != year %} {% unless forloop.first %} </ul> {% endunless %} <h2>{{ currentyear }}</h2> <ul> {% capture year %}{{ currentyear }}{% endcapture %} {% endif %} <li><a href="{{ post.url }}">{{ post.title }}</a></li> {% endfor %} </div> </div> </div>
--- layout: archive title: Archivo - Comicgram --- <div id="archive" class="container"> <div class="row"> <div class="col-xs-12 col-sm-8 col-sm-offset-3 col-md-6 col-md-offset-4"> {% for post in site.posts %} {% capture currentyear %}{{ post.date | date: "%Y" }}{% endcapture %} {% if currentyear != year %} {% unless forloop.first %} </ul> {% endunless %} <h2>{{ currentyear }}</h2> <ul> {% capture year %}{{ currentyear }}{% endcapture %} {% endif %} <li><a href="{{ post.url }}">{{ post.title }}</a></li> {% endfor %} </div> </div> </div>
Fix the mobile version of the archive page
Fix the mobile version of the archive page
HTML
mit
comicgram/newsletter-landing
html
## Code Before: --- layout: archive title: Archivo - Comicgram --- <div id="archive" class="container"> <div class="row"> <div class="col-xs-12 col-sm-8 col-sm-offset-4"> {% for post in site.posts %} {% capture currentyear %}{{ post.date | date: "%Y" }}{% endcapture %} {% if currentyear != year %} {% unless forloop.first %} </ul> {% endunless %} <h2>{{ currentyear }}</h2> <ul> {% capture year %}{{ currentyear }}{% endcapture %} {% endif %} <li><a href="{{ post.url }}">{{ post.title }}</a></li> {% endfor %} </div> </div> </div> ## Instruction: Fix the mobile version of the archive page ## Code After: --- layout: archive title: Archivo - Comicgram --- <div id="archive" class="container"> <div class="row"> <div class="col-xs-12 col-sm-8 col-sm-offset-3 col-md-6 col-md-offset-4"> {% for post in site.posts %} {% capture currentyear %}{{ post.date | date: "%Y" }}{% endcapture %} {% if currentyear != year %} {% unless forloop.first %} </ul> {% endunless %} <h2>{{ currentyear }}</h2> <ul> {% capture year %}{{ currentyear }}{% endcapture %} {% endif %} <li><a href="{{ post.url }}">{{ post.title }}</a></li> {% endfor %} </div> </div> </div>
--- layout: archive title: Archivo - Comicgram --- <div id="archive" class="container"> <div class="row"> - <div class="col-xs-12 col-sm-8 col-sm-offset-4"> + <div class="col-xs-12 col-sm-8 col-sm-offset-3 col-md-6 col-md-offset-4"> ? +++++++++++++++++++++++++ {% for post in site.posts %} {% capture currentyear %}{{ post.date | date: "%Y" }}{% endcapture %} {% if currentyear != year %} {% unless forloop.first %} </ul> {% endunless %} <h2>{{ currentyear }}</h2> <ul> {% capture year %}{{ currentyear }}{% endcapture %} {% endif %} <li><a href="{{ post.url }}">{{ post.title }}</a></li> {% endfor %} </div> </div> </div>
2
0.086957
1
1
2ef0ccfbf337d0ef1870c5a1191b2bcdcffd1f9e
dbaas/backup/admin/log_configuration.py
dbaas/backup/admin/log_configuration.py
from __future__ import absolute_import, unicode_literals from django.contrib import admin import logging LOG = logging.getLogger(__name__) class LogConfigurationAdmin(admin.ModelAdmin): list_filter = ("environment", "engine_type") list_display = ("environment", "engine_type", "retention_days", "filer_path", "mount_point_path", "log_path")
from __future__ import absolute_import, unicode_literals from django.contrib import admin import logging LOG = logging.getLogger(__name__) class LogConfigurationAdmin(admin.ModelAdmin): list_filter = ("environment", "engine_type") list_display = ("environment", "engine_type", "retention_days", "filer_path", "mount_point_path", "log_path", "cron_minute", "cron_hour")
Add new fields on LogConfiguration model
Add new fields on LogConfiguration model
Python
bsd-3-clause
globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service
python
## Code Before: from __future__ import absolute_import, unicode_literals from django.contrib import admin import logging LOG = logging.getLogger(__name__) class LogConfigurationAdmin(admin.ModelAdmin): list_filter = ("environment", "engine_type") list_display = ("environment", "engine_type", "retention_days", "filer_path", "mount_point_path", "log_path") ## Instruction: Add new fields on LogConfiguration model ## Code After: from __future__ import absolute_import, unicode_literals from django.contrib import admin import logging LOG = logging.getLogger(__name__) class LogConfigurationAdmin(admin.ModelAdmin): list_filter = ("environment", "engine_type") list_display = ("environment", "engine_type", "retention_days", "filer_path", "mount_point_path", "log_path", "cron_minute", "cron_hour")
from __future__ import absolute_import, unicode_literals from django.contrib import admin import logging LOG = logging.getLogger(__name__) class LogConfigurationAdmin(admin.ModelAdmin): list_filter = ("environment", "engine_type") list_display = ("environment", "engine_type", "retention_days", - "filer_path", "mount_point_path", "log_path") ? ^ + "filer_path", "mount_point_path", "log_path", ? ^ + "cron_minute", "cron_hour")
3
0.214286
2
1
94f96da108d2be39238b868a28c4948b39e279d0
background.js
background.js
/* global browser:readonly */ "use strict"; function parseReceivedHeader(headerStr, regexp) { const capturedSubstr = headerStr.match(new RegExp(regexp)); if (capturedSubstr === null || typeof capturedSubstr[1] === "undefined") return null; return capturedSubstr[1]; } function parseReceivedHeaders(headers, regexp) { const received = []; headers.forEach(function (header) { const parsed = parseReceivedHeader(header, regexp); if (parsed !== null) received.push(parsed); }); return received; } browser.storage.local.get().then((res) => { if (!res.regexp) { browser.storage.local.set({regexp: "(.*)"}); } }); browser.messageDisplay.onMessageDisplayed.addListener((tab, message) => { browser.messages.getFull(message.id).then((messagepart) => { const headers = messagepart.headers.received; if (headers) { browser.storage.local.get().then((res) => { const parsed = parseReceivedHeaders(headers, res.regexp); browser.displayReceivedHeader.setReceivedHeaderValue(tab.id, parsed); browser.displayReceivedHeader.setReceivedHeaderHidden(tab.id, false); }); } else { browser.displayReceivedHeader.setReceivedHeaderHidden(tab.id, true); } }); }); browser.displayReceivedHeader.init();
/* global browser:readonly */ "use strict"; function parseReceivedHeader(headerStr, regexp) { const capturedSubstr = headerStr.match(new RegExp(regexp)); if (capturedSubstr === null || typeof capturedSubstr[1] === "undefined") return null; return capturedSubstr[1]; } function parseReceivedHeaders(headers, regexp) { const received = []; headers.forEach(function (header) { const parsed = parseReceivedHeader(header, regexp); if (parsed !== null) received.push(parsed); }); return received; } browser.storage.local.get().then((res) => { if (!res.regexp) { browser.storage.local.set({regexp: "(.*)"}); } }); browser.messageDisplay.onMessageDisplayed.addListener((tab, message) => { browser.messages.getFull(message.id).then((messagepart) => { const headers = messagepart.headers.received; if (headers) { browser.storage.local.get().then((res) => { const parsed = parseReceivedHeaders(headers, res.regexp); browser.displayReceivedHeader.setReceivedHeaderValue(tab.id, parsed); browser.displayReceivedHeader.setReceivedHeaderHidden(tab.id, !parsed.length); }); } else { browser.displayReceivedHeader.setReceivedHeaderHidden(tab.id, true); } }); }); browser.displayReceivedHeader.init();
Hide header if no matches found
Hide header if no matches found
JavaScript
bsd-3-clause
moisseev/received,moisseev/received
javascript
## Code Before: /* global browser:readonly */ "use strict"; function parseReceivedHeader(headerStr, regexp) { const capturedSubstr = headerStr.match(new RegExp(regexp)); if (capturedSubstr === null || typeof capturedSubstr[1] === "undefined") return null; return capturedSubstr[1]; } function parseReceivedHeaders(headers, regexp) { const received = []; headers.forEach(function (header) { const parsed = parseReceivedHeader(header, regexp); if (parsed !== null) received.push(parsed); }); return received; } browser.storage.local.get().then((res) => { if (!res.regexp) { browser.storage.local.set({regexp: "(.*)"}); } }); browser.messageDisplay.onMessageDisplayed.addListener((tab, message) => { browser.messages.getFull(message.id).then((messagepart) => { const headers = messagepart.headers.received; if (headers) { browser.storage.local.get().then((res) => { const parsed = parseReceivedHeaders(headers, res.regexp); browser.displayReceivedHeader.setReceivedHeaderValue(tab.id, parsed); browser.displayReceivedHeader.setReceivedHeaderHidden(tab.id, false); }); } else { browser.displayReceivedHeader.setReceivedHeaderHidden(tab.id, true); } }); }); browser.displayReceivedHeader.init(); ## Instruction: Hide header if no matches found ## Code After: /* global browser:readonly */ "use strict"; function parseReceivedHeader(headerStr, regexp) { const capturedSubstr = headerStr.match(new RegExp(regexp)); if (capturedSubstr === null || typeof capturedSubstr[1] === "undefined") return null; return capturedSubstr[1]; } function parseReceivedHeaders(headers, regexp) { const received = []; headers.forEach(function (header) { const parsed = parseReceivedHeader(header, regexp); if (parsed !== null) received.push(parsed); }); return received; } browser.storage.local.get().then((res) => { if (!res.regexp) { browser.storage.local.set({regexp: "(.*)"}); } }); browser.messageDisplay.onMessageDisplayed.addListener((tab, message) => { browser.messages.getFull(message.id).then((messagepart) => { const headers = messagepart.headers.received; if (headers) { browser.storage.local.get().then((res) => { const parsed = parseReceivedHeaders(headers, res.regexp); browser.displayReceivedHeader.setReceivedHeaderValue(tab.id, parsed); browser.displayReceivedHeader.setReceivedHeaderHidden(tab.id, !parsed.length); }); } else { browser.displayReceivedHeader.setReceivedHeaderHidden(tab.id, true); } }); }); browser.displayReceivedHeader.init();
/* global browser:readonly */ "use strict"; function parseReceivedHeader(headerStr, regexp) { const capturedSubstr = headerStr.match(new RegExp(regexp)); if (capturedSubstr === null || typeof capturedSubstr[1] === "undefined") return null; return capturedSubstr[1]; } function parseReceivedHeaders(headers, regexp) { const received = []; headers.forEach(function (header) { const parsed = parseReceivedHeader(header, regexp); if (parsed !== null) received.push(parsed); }); return received; } browser.storage.local.get().then((res) => { if (!res.regexp) { browser.storage.local.set({regexp: "(.*)"}); } }); browser.messageDisplay.onMessageDisplayed.addListener((tab, message) => { browser.messages.getFull(message.id).then((messagepart) => { const headers = messagepart.headers.received; if (headers) { browser.storage.local.get().then((res) => { const parsed = parseReceivedHeaders(headers, res.regexp); browser.displayReceivedHeader.setReceivedHeaderValue(tab.id, parsed); - browser.displayReceivedHeader.setReceivedHeaderHidden(tab.id, false); ? ^ ^ + browser.displayReceivedHeader.setReceivedHeaderHidden(tab.id, !parsed.length); ? ^^ ^ ++++++++ }); } else { browser.displayReceivedHeader.setReceivedHeaderHidden(tab.id, true); } }); }); browser.displayReceivedHeader.init();
2
0.046512
1
1
9ec3af3174aea04aec8891a427b8b570eb3d7f41
lib/nigel/commands/flood.rb
lib/nigel/commands/flood.rb
module Nigel module Commands class Flood def self.process(options) Google::Search::Image.new( query: 'Nigel Thornberry').each_with_index do |image, i| threads = [] if(image.uri.include? '.gif') puts "Nigel spotted at #{ image.uri }!" threads << self.fetch(image.uri, "#{ i }.gif") end threads.each(&:join) end end private def self.fetch(uri, name) Thread.new do File.open(name, "wb") do |saved_file| open(uri, 'rb') do |read_file| saved_file.write(read_file.read) end end end end end end end
module Nigel module Commands class Flood def self.process(options) threads = [] Google::Search::Image.new( query: 'Nigel Thornberry').each_with_index do |image, i| if(image.uri.include? '.gif') puts "Nigel spotted at #{ image.uri }!" threads << self.fetch(image.uri, "#{ i }.gif") end end threads.each(&:join) end private def self.fetch(uri, name) Thread.new do File.open(name, "wb") do |saved_file| open(uri, 'rb') do |read_file| saved_file.write(read_file.read) end end end end end end end
Fix bug with threads not running concurrently.
Fix bug with threads not running concurrently.
Ruby
mit
zachlatta/nigel
ruby
## Code Before: module Nigel module Commands class Flood def self.process(options) Google::Search::Image.new( query: 'Nigel Thornberry').each_with_index do |image, i| threads = [] if(image.uri.include? '.gif') puts "Nigel spotted at #{ image.uri }!" threads << self.fetch(image.uri, "#{ i }.gif") end threads.each(&:join) end end private def self.fetch(uri, name) Thread.new do File.open(name, "wb") do |saved_file| open(uri, 'rb') do |read_file| saved_file.write(read_file.read) end end end end end end end ## Instruction: Fix bug with threads not running concurrently. ## Code After: module Nigel module Commands class Flood def self.process(options) threads = [] Google::Search::Image.new( query: 'Nigel Thornberry').each_with_index do |image, i| if(image.uri.include? '.gif') puts "Nigel spotted at #{ image.uri }!" threads << self.fetch(image.uri, "#{ i }.gif") end end threads.each(&:join) end private def self.fetch(uri, name) Thread.new do File.open(name, "wb") do |saved_file| open(uri, 'rb') do |read_file| saved_file.write(read_file.read) end end end end end end end
module Nigel module Commands class Flood def self.process(options) + threads = [] + Google::Search::Image.new( query: 'Nigel Thornberry').each_with_index do |image, i| - threads = [] if(image.uri.include? '.gif') puts "Nigel spotted at #{ image.uri }!" threads << self.fetch(image.uri, "#{ i }.gif") end + end - threads.each(&:join) ? -- + threads.each(&:join) - end end private def self.fetch(uri, name) Thread.new do File.open(name, "wb") do |saved_file| open(uri, 'rb') do |read_file| saved_file.write(read_file.read) end end end end end end end
7
0.2
4
3
aad56c9ea62167863b3a0cca17b050c886fe7697
user-scripts/katia/masks.sh
user-scripts/katia/masks.sh
set -e dir="/Volumes/Macintosh HD/Users/ricardog/tmp/katia" islands=KS_layers/Islands_fromIgor_edited.shp mainland=KS_layers/Mainland_fromIgor_edited.shp gdal_rasterize -tap -init 0 -burn 1 -a FID_1 \ -ot Byte -tr 0.008333333333333 0.008333333333333 \ -co "COMPRESS=lzw" -co "PREDICTOR=2" \ "${dir}/${islands}" islands_fromIgor_edited.tif gdal_rasterize -tap -init 0 -burn 1 -a FID_1 \ -ot Byte -tr 0.008333333333333 0.008333333333333 \ -co "COMPRESS=lzw" -co "PREDICTOR=2" \ "${dir}/${mainland}" mainland_fromIgor_edited.tif
set -e at=-at dir="/Volumes/Macintosh HD/Users/ricardog/tmp/katia" islands=KS_layers/Islands_fromIgor_edited.shp mainland=KS_layers/Mainland_fromIgor_edited.shp gdal_rasterize -tap -init 0 -burn 1 -a FID_1 ${at} \ -ot Byte -tr 0.008333333333333 0.008333333333333 \ -co "COMPRESS=lzw" -co "PREDICTOR=2" \ "${dir}/${islands}" islands-from-igor-edited${at}.tif gdal_rasterize -tap -init 0 -burn 1 -a FID_1 ${at} \ -ot Byte -tr 0.008333333333333 0.008333333333333 \ -co "COMPRESS=lzw" -co "PREDICTOR=2" \ "${dir}/${mainland}" mainland-from-igor-edited${at}.tif
Add support for selection of all-touched or not
Add support for selection of all-touched or not
Shell
apache-2.0
ricardog/raster-project,ricardog/raster-project,ricardog/raster-project,ricardog/raster-project,ricardog/raster-project
shell
## Code Before: set -e dir="/Volumes/Macintosh HD/Users/ricardog/tmp/katia" islands=KS_layers/Islands_fromIgor_edited.shp mainland=KS_layers/Mainland_fromIgor_edited.shp gdal_rasterize -tap -init 0 -burn 1 -a FID_1 \ -ot Byte -tr 0.008333333333333 0.008333333333333 \ -co "COMPRESS=lzw" -co "PREDICTOR=2" \ "${dir}/${islands}" islands_fromIgor_edited.tif gdal_rasterize -tap -init 0 -burn 1 -a FID_1 \ -ot Byte -tr 0.008333333333333 0.008333333333333 \ -co "COMPRESS=lzw" -co "PREDICTOR=2" \ "${dir}/${mainland}" mainland_fromIgor_edited.tif ## Instruction: Add support for selection of all-touched or not ## Code After: set -e at=-at dir="/Volumes/Macintosh HD/Users/ricardog/tmp/katia" islands=KS_layers/Islands_fromIgor_edited.shp mainland=KS_layers/Mainland_fromIgor_edited.shp gdal_rasterize -tap -init 0 -burn 1 -a FID_1 ${at} \ -ot Byte -tr 0.008333333333333 0.008333333333333 \ -co "COMPRESS=lzw" -co "PREDICTOR=2" \ "${dir}/${islands}" islands-from-igor-edited${at}.tif gdal_rasterize -tap -init 0 -burn 1 -a FID_1 ${at} \ -ot Byte -tr 0.008333333333333 0.008333333333333 \ -co "COMPRESS=lzw" -co "PREDICTOR=2" \ "${dir}/${mainland}" mainland-from-igor-edited${at}.tif
set -e + at=-at dir="/Volumes/Macintosh HD/Users/ricardog/tmp/katia" islands=KS_layers/Islands_fromIgor_edited.shp mainland=KS_layers/Mainland_fromIgor_edited.shp - gdal_rasterize -tap -init 0 -burn 1 -a FID_1 \ + gdal_rasterize -tap -init 0 -burn 1 -a FID_1 ${at} \ ? ++++++ -ot Byte -tr 0.008333333333333 0.008333333333333 \ -co "COMPRESS=lzw" -co "PREDICTOR=2" \ - "${dir}/${islands}" islands_fromIgor_edited.tif ? ^ ^ ^ + "${dir}/${islands}" islands-from-igor-edited${at}.tif ? ^ ^^ ^ +++++ - gdal_rasterize -tap -init 0 -burn 1 -a FID_1 \ + gdal_rasterize -tap -init 0 -burn 1 -a FID_1 ${at} \ ? ++++++ -ot Byte -tr 0.008333333333333 0.008333333333333 \ -co "COMPRESS=lzw" -co "PREDICTOR=2" \ - "${dir}/${mainland}" mainland_fromIgor_edited.tif ? ^ ^ ^ + "${dir}/${mainland}" mainland-from-igor-edited${at}.tif ? ^ ^^ ^ +++++
9
0.5
5
4
5cb779e574b76cf15f8b87459135a97ef0269ebf
roles/docker/tasks/main.yml
roles/docker/tasks/main.yml
--- - name: Install prerrequisites apt: name={{item}} state=latest with_items: - linux-image-generic - linux-image-extra-{{ansible_kernel}} - linux-image-extra-virtual - name: Setup repo sources apt_repository: \ repo='deb https://apt.dockerproject.org/repo ubuntu-xenial main' state=present - name: Setup apt key apt_key: keyserver=hkp://ha.pool.sks-keyservers.net:80 id=58118E89F3A912897C070ADBF76221572C52609D state=present - name: Install apt: name=docker-engine update_cache=yes state=latest - name: Startup service: name=docker state=started - name: Add group group: name=docker state=present - name: Configure for non-root usage (requires manual re-login) user: name={{lookup('env', 'USER')}} groups=docker append=yes - name: Download docker-compose get_url: url={{compose_url}} dest=/usr/local/bin/docker-compose mode=0755
--- - name: Install prerrequisites apt: name={{item}} state=latest with_items: - linux-image-generic - linux-image-extra-{{ansible_kernel}} - linux-image-extra-virtual - name: Setup repo sources apt_repository: \ repo='deb https://apt.dockerproject.org/repo ubuntu-xenial main' state=present - name: Setup apt key apt_key: keyserver=hkp://ha.pool.sks-keyservers.net:80 id=58118E89F3A912897C070ADBF76221572C52609D state=present - name: Install apt: name=docker-engine state=latest - name: Startup service: name=docker state=started - name: Add group group: name=docker state=present - name: Configure for non-root usage (requires manual re-login) user: name={{lookup('env', 'USER')}} groups=docker append=yes - name: Download docker-compose get_url: url={{compose_url}} dest=/usr/local/bin/docker-compose mode=0755
Remove unnecessary cache update in ansible setup
Remove unnecessary cache update in ansible setup
YAML
mit
deivid-rodriguez/dotfiles,deivid-rodriguez/dotfiles
yaml
## Code Before: --- - name: Install prerrequisites apt: name={{item}} state=latest with_items: - linux-image-generic - linux-image-extra-{{ansible_kernel}} - linux-image-extra-virtual - name: Setup repo sources apt_repository: \ repo='deb https://apt.dockerproject.org/repo ubuntu-xenial main' state=present - name: Setup apt key apt_key: keyserver=hkp://ha.pool.sks-keyservers.net:80 id=58118E89F3A912897C070ADBF76221572C52609D state=present - name: Install apt: name=docker-engine update_cache=yes state=latest - name: Startup service: name=docker state=started - name: Add group group: name=docker state=present - name: Configure for non-root usage (requires manual re-login) user: name={{lookup('env', 'USER')}} groups=docker append=yes - name: Download docker-compose get_url: url={{compose_url}} dest=/usr/local/bin/docker-compose mode=0755 ## Instruction: Remove unnecessary cache update in ansible setup ## Code After: --- - name: Install prerrequisites apt: name={{item}} state=latest with_items: - linux-image-generic - linux-image-extra-{{ansible_kernel}} - linux-image-extra-virtual - name: Setup repo sources apt_repository: \ repo='deb https://apt.dockerproject.org/repo ubuntu-xenial main' state=present - name: Setup apt key apt_key: keyserver=hkp://ha.pool.sks-keyservers.net:80 id=58118E89F3A912897C070ADBF76221572C52609D state=present - name: Install apt: name=docker-engine state=latest - name: Startup service: name=docker state=started - name: Add group group: name=docker state=present - name: Configure for non-root usage (requires manual re-login) user: name={{lookup('env', 'USER')}} groups=docker append=yes - name: Download docker-compose get_url: url={{compose_url}} dest=/usr/local/bin/docker-compose mode=0755
--- - name: Install prerrequisites apt: name={{item}} state=latest with_items: - linux-image-generic - linux-image-extra-{{ansible_kernel}} - linux-image-extra-virtual - name: Setup repo sources apt_repository: \ repo='deb https://apt.dockerproject.org/repo ubuntu-xenial main' state=present - name: Setup apt key apt_key: keyserver=hkp://ha.pool.sks-keyservers.net:80 id=58118E89F3A912897C070ADBF76221572C52609D state=present - name: Install - apt: name=docker-engine update_cache=yes state=latest ? ----------------- + apt: name=docker-engine state=latest - name: Startup service: name=docker state=started - name: Add group group: name=docker state=present - name: Configure for non-root usage (requires manual re-login) user: name={{lookup('env', 'USER')}} groups=docker append=yes - name: Download docker-compose get_url: url={{compose_url}} dest=/usr/local/bin/docker-compose mode=0755
2
0.060606
1
1
e904ae2bf7b780e063a6eb668c475337acae7a1a
cas-server-core-authentication/src/main/java/org/jasig/cas/authentication/handler/SpringSecurityDelegatingPasswordEncoder.java
cas-server-core-authentication/src/main/java/org/jasig/cas/authentication/handler/SpringSecurityDelegatingPasswordEncoder.java
package org.jasig.cas.authentication.handler; import org.springframework.stereotype.Component; import javax.validation.constraints.NotNull; /** * Pass the encode/decode responsibility to a delegated Spring Security * password encoder. * * @author Joe McCall * @since 4.3 */ @Component("springSecurityDelegatingPasswordEncoder") public class SpringSecurityDelegatingPasswordEncoder implements PasswordEncoder { @NotNull private org.springframework.security.crypto.password.PasswordEncoder delegate; public void setDelegate(final org.springframework.security.crypto.password.PasswordEncoder delegate) { this.delegate = delegate; } @Override public String encode(final String password) { return delegate.encode(password); } @Override public boolean matches(final CharSequence rawPassword, final String encodedPassword) { return delegate.matches(rawPassword, encodedPassword); } }
package org.jasig.cas.authentication.handler; import javax.validation.constraints.NotNull; /** * Pass the encode/decode responsibility to a delegated Spring Security * password encoder. * * @author Joe McCall * @since 4.3 */ public class SpringSecurityDelegatingPasswordEncoder implements PasswordEncoder { @NotNull private org.springframework.security.crypto.password.PasswordEncoder delegate; public void setDelegate(final org.springframework.security.crypto.password.PasswordEncoder delegate) { this.delegate = delegate; } @Override public String encode(final String password) { return delegate.encode(password); } @Override public boolean matches(final CharSequence rawPassword, final String encodedPassword) { return delegate.matches(rawPassword, encodedPassword); } }
Remove @Component for optional encoder
Remove @Component for optional encoder Instantiation is optional as to avoid introducing a hard dependency on spring-security.
Java
apache-2.0
fogbeam/cas_mirror,apereo/cas,philliprower/cas,Jasig/cas,philliprower/cas,apereo/cas,fogbeam/cas_mirror,rkorn86/cas,apereo/cas,pdrados/cas,pdrados/cas,philliprower/cas,fogbeam/cas_mirror,pdrados/cas,rkorn86/cas,apereo/cas,leleuj/cas,fogbeam/cas_mirror,apereo/cas,leleuj/cas,rkorn86/cas,leleuj/cas,rkorn86/cas,leleuj/cas,philliprower/cas,pdrados/cas,philliprower/cas,Jasig/cas,pdrados/cas,Jasig/cas,pdrados/cas,philliprower/cas,leleuj/cas,leleuj/cas,Jasig/cas,fogbeam/cas_mirror,apereo/cas,philliprower/cas,apereo/cas,fogbeam/cas_mirror
java
## Code Before: package org.jasig.cas.authentication.handler; import org.springframework.stereotype.Component; import javax.validation.constraints.NotNull; /** * Pass the encode/decode responsibility to a delegated Spring Security * password encoder. * * @author Joe McCall * @since 4.3 */ @Component("springSecurityDelegatingPasswordEncoder") public class SpringSecurityDelegatingPasswordEncoder implements PasswordEncoder { @NotNull private org.springframework.security.crypto.password.PasswordEncoder delegate; public void setDelegate(final org.springframework.security.crypto.password.PasswordEncoder delegate) { this.delegate = delegate; } @Override public String encode(final String password) { return delegate.encode(password); } @Override public boolean matches(final CharSequence rawPassword, final String encodedPassword) { return delegate.matches(rawPassword, encodedPassword); } } ## Instruction: Remove @Component for optional encoder Instantiation is optional as to avoid introducing a hard dependency on spring-security. ## Code After: package org.jasig.cas.authentication.handler; import javax.validation.constraints.NotNull; /** * Pass the encode/decode responsibility to a delegated Spring Security * password encoder. * * @author Joe McCall * @since 4.3 */ public class SpringSecurityDelegatingPasswordEncoder implements PasswordEncoder { @NotNull private org.springframework.security.crypto.password.PasswordEncoder delegate; public void setDelegate(final org.springframework.security.crypto.password.PasswordEncoder delegate) { this.delegate = delegate; } @Override public String encode(final String password) { return delegate.encode(password); } @Override public boolean matches(final CharSequence rawPassword, final String encodedPassword) { return delegate.matches(rawPassword, encodedPassword); } }
package org.jasig.cas.authentication.handler; - - import org.springframework.stereotype.Component; import javax.validation.constraints.NotNull; /** * Pass the encode/decode responsibility to a delegated Spring Security * password encoder. * * @author Joe McCall * @since 4.3 */ - @Component("springSecurityDelegatingPasswordEncoder") public class SpringSecurityDelegatingPasswordEncoder implements PasswordEncoder { @NotNull private org.springframework.security.crypto.password.PasswordEncoder delegate; public void setDelegate(final org.springframework.security.crypto.password.PasswordEncoder delegate) { this.delegate = delegate; } @Override public String encode(final String password) { return delegate.encode(password); } @Override public boolean matches(final CharSequence rawPassword, final String encodedPassword) { return delegate.matches(rawPassword, encodedPassword); } - - }
5
0.142857
0
5
c377370be9d8396a837d972cf9eb0a6220f8fabf
spec/unit/defines/tablespace_spec.rb
spec/unit/defines/tablespace_spec.rb
require 'spec_helper' describe 'postgresql::tablespace', :type => :define do let :facts do { :postgres_default_version => '8.4', :osfamily => 'Debian', } end let :title do 'test' end it { should include_class("postgresql::params") } end
require 'spec_helper' describe 'postgresql::tablespace', :type => :define do let :facts do { :postgres_default_version => '8.4', :osfamily => 'Debian', } end let :title do 'test' end let :params do { :location => '/srv/data/foo', } end it { should include_class("postgresql::params") } end
Include location in postgresql::tablespace test
Include location in postgresql::tablespace test Signed-off-by: Ken Barber <470bc578162732ac7f9d387d34c4af4ca6e1b6f7@bob.sh>
Ruby
apache-2.0
hunner/puppetlabs-postgresql,phervieux/puppetlabs-postgresql,jantman/puppetlabs-postgresql,fuel-infra/puppetlabs-postgresql,underscorgan/puppetlabs-postgresql,mhaskel/puppetlabs-postgresql,puppetlabs/puppetlabs-postgresql,gfokkema/puppetlabs-postgresql,cybercom-finland/puppetlabs-postgresql,puppetlabs/puppetlabs-postgresql,tdevelioglu/puppetlabs-postgresql,researchgate/puppetlabs-postgresql,npwalker/puppetlabs-postgresql,cavaliercoder/puppetlabs-postgresql,theforeman/puppetlabs-postgresql,jbehrends/puppetlabs-postgresql,david-caro/puppetlabs-postgresql,jantman/puppetlabs-postgresql,GoozeyX/puppetlabs-postgresql,javierwilson/puppetlabs-postgresql,tphoney/puppetlabs-postgresql,downsj2/puppetlabs-postgresql,javierwilson/puppetlabs-postgresql,genome/puppetlabs-postgresql,dealnews/puppetlabs-postgresql,DSI-Ville-Noumea/puppetlabs-postgresql,researchgate/puppetlabs-postgresql,PierreR/puppetlabs-postgresql,nickchappell/puppetlabs-postgresql,Puppet-Finland/puppetlabs-postgresql,Puppet-Finland/puppetlabs-postgresql,petems/puppetlabs-postgresql,qha/puppetlabs-postgresql,BobVanB/puppetlabs-postgresql,cavaliercoder/puppetlabs-postgresql,kbarber/puppetlabs-postgresql,krishnaod/puppet-postgresql,BobVanB/puppetlabs-postgresql,mhaskel/puppetlabs-postgresql,duritong/puppetlabs-postgresql,david-caro/puppetlabs-postgresql,cyberious/puppetlabs-postgresql,holstvoogd/puppetlabs-postgresql,SUNET/puppetlabs-postgresql,cybercom-finland/puppetlabs-postgresql,mhaskel/puppetlabs-postgresql,BobVanB/puppetlabs-postgresql,cdenneen/puppetlabs-postgresql,GoozeyX/puppetlabs-postgresql,hasegeli/puppetlabs-postgresql,gfokkema/puppetlabs-postgresql,infopro-digital/puppetlabs-postgresql,paneidos/puppetlabs-postgresql,nickchappell/puppetlabs-postgresql,buzzdeee/puppetlabs-postgresql,david-caro/puppetlabs-postgresql,phervieux/puppetlabs-postgresql,MelanieGault/puppetlabs-postgresql,DSI-Ville-Noumea/puppetlabs-postgresql,infopro-digital/puppetlabs-postgresql,PierreR/puppetlabs-postgresql,tdevelioglu/puppetlabs-postgresql,covermymeds/puppetlabs-postgresql,buzzdeee/puppetlabs-postgresql,thunderkeys/puppetlabs-postgresql,MelanieGault/puppetlabs-postgresql,cyberious/puppetlabs-postgresql,skyscrapers/puppetlabs-postgresql,paneidos/puppetlabs-postgresql,cdenneen/puppetlabs-postgresql,DavidS/puppetlabs-postgresql,underscorgan/puppetlabs-postgresql,hunner/puppetlabs-postgresql,MelanieGault/puppetlabs-postgresql,SUNET/puppetlabs-postgresql,progserega/puppetlabs-postgresql,PierreR/puppetlabs-postgresql,redhat-cip/puppetlabs-postgresql,tdevelioglu/puppetlabs-postgresql,npwalker/puppetlabs-postgresql,DavidS/puppetlabs-postgresql,covermymeds/puppetlabs-postgresql,underscorgan/puppetlabs-postgresql,SUNET/puppetlabs-postgresql,progserega/puppetlabs-postgresql,infoxchange/puppetlabs-postgresql,cavaliercoder/puppetlabs-postgresql,kbarber/puppetlabs-postgresql,genome/puppetlabs-postgresql,puppetlabs/puppetlabs-postgresql,javierwilson/puppetlabs-postgresql,krishnaod/puppet-postgresql,GoozeyX/puppetlabs-postgresql,petems/puppetlabs-postgresql,holstvoogd/puppetlabs-postgresql,npwalker/puppetlabs-postgresql,infoxchange/puppetlabs-postgresql,covermymeds/puppetlabs-postgresql,mcanevet/puppet-postgresql,downsj2/puppetlabs-postgresql,buzzdeee/puppetlabs-postgresql,qha/puppetlabs-postgresql,fuel-infra/puppetlabs-postgresql,redhat-cip/puppetlabs-postgresql,cybercom-finland/puppetlabs-postgresql,bmjen/puppetlabs-postgresql,tphoney/puppetlabs-postgresql,hasegeli/puppetlabs-postgresql,qha/puppetlabs-postgresql,downsj2/puppetlabs-postgresql,holstvoogd/puppetlabs-postgresql,phervieux/puppetlabs-postgresql,Puppet-Finland/puppetlabs-postgresql,skyscrapers/puppetlabs-postgresql,cyberious/puppetlabs-postgresql,redhat-cip/puppetlabs-postgresql,fuel-infra/puppetlabs-postgresql,theforeman/puppetlabs-postgresql,jbehrends/puppetlabs-postgresql,tphoney/puppetlabs-postgresql,thunderkeys/puppetlabs-postgresql,thunderkeys/puppetlabs-postgresql,cdenneen/puppetlabs-postgresql,gfokkema/puppetlabs-postgresql,kbarber/puppetlabs-postgresql,nickchappell/puppetlabs-postgresql,dealnews/puppetlabs-postgresql,bmjen/puppetlabs-postgresql,researchgate/puppetlabs-postgresql,infopro-digital/puppetlabs-postgresql,dealnews/puppetlabs-postgresql,petems/puppetlabs-postgresql,jbehrends/puppetlabs-postgresql,bmjen/puppetlabs-postgresql,progserega/puppetlabs-postgresql,DavidS/puppetlabs-postgresql,hasegeli/puppetlabs-postgresql,infoxchange/puppetlabs-postgresql,skyscrapers/puppetlabs-postgresql,theforeman/puppetlabs-postgresql,DSI-Ville-Noumea/puppetlabs-postgresql
ruby
## Code Before: require 'spec_helper' describe 'postgresql::tablespace', :type => :define do let :facts do { :postgres_default_version => '8.4', :osfamily => 'Debian', } end let :title do 'test' end it { should include_class("postgresql::params") } end ## Instruction: Include location in postgresql::tablespace test Signed-off-by: Ken Barber <470bc578162732ac7f9d387d34c4af4ca6e1b6f7@bob.sh> ## Code After: require 'spec_helper' describe 'postgresql::tablespace', :type => :define do let :facts do { :postgres_default_version => '8.4', :osfamily => 'Debian', } end let :title do 'test' end let :params do { :location => '/srv/data/foo', } end it { should include_class("postgresql::params") } end
require 'spec_helper' describe 'postgresql::tablespace', :type => :define do let :facts do { :postgres_default_version => '8.4', :osfamily => 'Debian', } end let :title do 'test' end + let :params do + { + :location => '/srv/data/foo', + } + end it { should include_class("postgresql::params") } end
5
0.357143
5
0
929cab42aec7b23a42037e5c723069c5f8697227
.travis.yml
.travis.yml
languages: - c++ - scala addons: apt: sources: - ubuntu-toolchain-r-test packages: - gcc-4.8 - g++-4.8 - gperf - autoconf - automake - autotools-dev - libmpc-dev - libmpfr-dev - libgmp-dev - gawk - build-essential - bison - flex - texinfo before_install: - export CXX=g++-4.8 - export CC=gcc-4.8 - export MAKEFLAGS=-j3 - export SCHEDULER=travis_wait script: - make makefrags - make soc-verilog
languages: - c++ - scala addons: apt: sources: - ubuntu-toolchain-r-test packages: - gcc-4.8 - g++-4.8 - gperf - autoconf - automake - autotools-dev - libmpc-dev - libmpfr-dev - libgmp-dev - gawk - build-essential - bison - flex - texinfo before_install: - export CXX=g++-4.8 - export CC=gcc-4.8 - export MAKEFLAGS=-j3 - export SCHEDULER=travis_wait script: - make makefrags - make core-verilog core-simulator - make soc-verilog soc-simulator
Build the simulators on Travis
Build the simulators on Travis This will at least make sure I generate valid Verilog, and it's a whole lot faster.
YAML
bsd-3-clause
ucb-bar/plsi,ucb-bar/plsi
yaml
## Code Before: languages: - c++ - scala addons: apt: sources: - ubuntu-toolchain-r-test packages: - gcc-4.8 - g++-4.8 - gperf - autoconf - automake - autotools-dev - libmpc-dev - libmpfr-dev - libgmp-dev - gawk - build-essential - bison - flex - texinfo before_install: - export CXX=g++-4.8 - export CC=gcc-4.8 - export MAKEFLAGS=-j3 - export SCHEDULER=travis_wait script: - make makefrags - make soc-verilog ## Instruction: Build the simulators on Travis This will at least make sure I generate valid Verilog, and it's a whole lot faster. ## Code After: languages: - c++ - scala addons: apt: sources: - ubuntu-toolchain-r-test packages: - gcc-4.8 - g++-4.8 - gperf - autoconf - automake - autotools-dev - libmpc-dev - libmpfr-dev - libgmp-dev - gawk - build-essential - bison - flex - texinfo before_install: - export CXX=g++-4.8 - export CC=gcc-4.8 - export MAKEFLAGS=-j3 - export SCHEDULER=travis_wait script: - make makefrags - make core-verilog core-simulator - make soc-verilog soc-simulator
languages: - c++ - scala addons: apt: sources: - ubuntu-toolchain-r-test packages: - gcc-4.8 - g++-4.8 - gperf - autoconf - automake - autotools-dev - libmpc-dev - libmpfr-dev - libgmp-dev - gawk - build-essential - bison - flex - texinfo before_install: - export CXX=g++-4.8 - export CC=gcc-4.8 - export MAKEFLAGS=-j3 - export SCHEDULER=travis_wait script: - make makefrags - - make soc-verilog + - make core-verilog core-simulator + - make soc-verilog soc-simulator
3
0.090909
2
1
6dc73998d6a504c8494234a078a35ac119672332
demo.yml
demo.yml
dumper: Sql output: rows_per_statement: 100 file: php://stdout gzip: false database: driver: pdo_mysql host: 127.0.0.1 user: root password: '' dbname: demo charset: UTF8 pdo_options: !php/const PDO::MYSQL_ATTR_SSL_CA: './path-to-ca.pem' !php/const PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT: true table_white_list: - foo - bla - foo_no_content - foo_ignored tables: foo_ignored: ignore_table: true foo_no_content: ignore_content: true foo: order_by: id ASC limit: 100 converters: name: - JohnDoe street: - StreetName website: - Conditional: condition: "$website != ''" if_true: 'http://www.google.de' # nested conditional role: - Conditional: condition: "$name == 'John Doe'" # if true, keep the original value if_false_converters: - Conditional: condition: "$role == 'programmer'" if_true: - 'super employee' if_false_converters: - 'employee' filters: - [in, 'id', [1, 2, 3]] # only select rows which id is 1, 2 or 3 - [like, 'name', 'Markus %'] # only select rows which column "name" starts with Markus foo_custom: query: > SELECT *, bar.value1 AS xyz FROM foo_custom JOIN bar WHERE $autoConditions converters: name: - JohnDoe
dumper: Sql output: rows_per_statement: 100 file: php://stdout gzip: false database: driver: pdo_mysql host: 127.0.0.1 user: root password: '' dbname: demo charset: UTF8 pdo_options: !php/const PDO::MYSQL_ATTR_SSL_CA: './path-to-ca.pem' !php/const PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT: true table_white_list: - foo - bla - foo_no_content - foo_ignored tables: foo_ignored: ignore_table: true foo_no_content: ignore_content: true foo: order_by: id ASC limit: 100 converters: name: - JohnDoe street: - StreetName website: - Conditional: condition: "$website != ''" if_true: 'http://www.google.de' filters: - [in, 'id', [1, 2, 3]] # only select rows which id is 1, 2 or 3 - [like, 'name', 'Markus %'] # only select rows which column "name" starts with Markus foo_custom: query: > SELECT *, bar.value1 AS xyz FROM foo_custom JOIN bar WHERE $autoConditions converters: name: - JohnDoe
Revert "Added an example of a nested conditional"
Revert "Added an example of a nested conditional" This reverts commit d7d6e271cba663ddf6523d111de961b9d3b39d82.
YAML
mit
digilist/SnakeDumper
yaml
## Code Before: dumper: Sql output: rows_per_statement: 100 file: php://stdout gzip: false database: driver: pdo_mysql host: 127.0.0.1 user: root password: '' dbname: demo charset: UTF8 pdo_options: !php/const PDO::MYSQL_ATTR_SSL_CA: './path-to-ca.pem' !php/const PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT: true table_white_list: - foo - bla - foo_no_content - foo_ignored tables: foo_ignored: ignore_table: true foo_no_content: ignore_content: true foo: order_by: id ASC limit: 100 converters: name: - JohnDoe street: - StreetName website: - Conditional: condition: "$website != ''" if_true: 'http://www.google.de' # nested conditional role: - Conditional: condition: "$name == 'John Doe'" # if true, keep the original value if_false_converters: - Conditional: condition: "$role == 'programmer'" if_true: - 'super employee' if_false_converters: - 'employee' filters: - [in, 'id', [1, 2, 3]] # only select rows which id is 1, 2 or 3 - [like, 'name', 'Markus %'] # only select rows which column "name" starts with Markus foo_custom: query: > SELECT *, bar.value1 AS xyz FROM foo_custom JOIN bar WHERE $autoConditions converters: name: - JohnDoe ## Instruction: Revert "Added an example of a nested conditional" This reverts commit d7d6e271cba663ddf6523d111de961b9d3b39d82. ## Code After: dumper: Sql output: rows_per_statement: 100 file: php://stdout gzip: false database: driver: pdo_mysql host: 127.0.0.1 user: root password: '' dbname: demo charset: UTF8 pdo_options: !php/const PDO::MYSQL_ATTR_SSL_CA: './path-to-ca.pem' !php/const PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT: true table_white_list: - foo - bla - foo_no_content - foo_ignored tables: foo_ignored: ignore_table: true foo_no_content: ignore_content: true foo: order_by: id ASC limit: 100 converters: name: - JohnDoe street: - StreetName website: - Conditional: condition: "$website != ''" if_true: 'http://www.google.de' filters: - [in, 'id', [1, 2, 3]] # only select rows which id is 1, 2 or 3 - [like, 'name', 'Markus %'] # only select rows which column "name" starts with Markus foo_custom: query: > SELECT *, bar.value1 AS xyz FROM foo_custom JOIN bar WHERE $autoConditions converters: name: - JohnDoe
dumper: Sql output: rows_per_statement: 100 file: php://stdout gzip: false database: driver: pdo_mysql host: 127.0.0.1 user: root password: '' dbname: demo charset: UTF8 pdo_options: !php/const PDO::MYSQL_ATTR_SSL_CA: './path-to-ca.pem' !php/const PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT: true table_white_list: - foo - bla - foo_no_content - foo_ignored tables: foo_ignored: ignore_table: true foo_no_content: ignore_content: true foo: order_by: id ASC limit: 100 converters: name: - JohnDoe street: - StreetName website: - Conditional: condition: "$website != ''" if_true: 'http://www.google.de' - - # nested conditional - role: - - Conditional: - condition: "$name == 'John Doe'" - # if true, keep the original value - if_false_converters: - - Conditional: - condition: "$role == 'programmer'" - if_true: - - 'super employee' - if_false_converters: - - 'employee' - filters: - [in, 'id', [1, 2, 3]] # only select rows which id is 1, 2 or 3 - [like, 'name', 'Markus %'] # only select rows which column "name" starts with Markus foo_custom: query: > SELECT *, bar.value1 AS xyz FROM foo_custom JOIN bar WHERE $autoConditions converters: name: - JohnDoe
14
0.215385
0
14
023910376668c98b53622cfc99d4aae725070f1f
deploy.sh
deploy.sh
rsync -rtvz \ -e 'ssh -i /tmp/deploy_rsa' \ --checksum \ --delete \ _site/ \ macops-ca-deploy@macops.ca:/var/www/macops.ca/
rsync -rtvz \ --checksum \ --delete \ _site/ \ macops-ca-deploy@macops.ca:/var/www/macops.ca/
Remove unneeded ssh -i since we add the identity in travis yml
Remove unneeded ssh -i since we add the identity in travis yml
Shell
mit
timsutton/macops.ca,timsutton/macops.ca,timsutton/macops.ca
shell
## Code Before: rsync -rtvz \ -e 'ssh -i /tmp/deploy_rsa' \ --checksum \ --delete \ _site/ \ macops-ca-deploy@macops.ca:/var/www/macops.ca/ ## Instruction: Remove unneeded ssh -i since we add the identity in travis yml ## Code After: rsync -rtvz \ --checksum \ --delete \ _site/ \ macops-ca-deploy@macops.ca:/var/www/macops.ca/
rsync -rtvz \ - -e 'ssh -i /tmp/deploy_rsa' \ --checksum \ --delete \ _site/ \ macops-ca-deploy@macops.ca:/var/www/macops.ca/
1
0.166667
0
1
4872f3311075cfa7eadb5949d5de884191d8d601
lib/rubocop/cop/rspec/any_instance.rb
lib/rubocop/cop/rspec/any_instance.rb
module RuboCop module Cop module RSpec # Pefer instance doubles over stubbing any instance of a class # # @example # # bad # describe MyClass do # before { allow_any_instance_of(MyClass).to receive(:foo) } # end # # # good # describe MyClass do # let(:my_instance) { instance_double(MyClass) } # # before do # allow(MyClass).to receive(:new).and_return(my_instance) # allow(my_instance).to receive(:foo) # end # end class AnyInstance < Cop MESSAGE = 'Avoid stubbing using `%{method}`'.freeze ANY_INSTANCE_METHODS = [ :any_instance, :allow_any_instance_of, :expect_any_instance_of ].freeze def on_send(node) _receiver, method_name, *_args = *node return unless ANY_INSTANCE_METHODS.include?(method_name) add_offense( node, :expression, format( MESSAGE % { method: method_name }, node.loc.expression.source ) ) end end end end end
module RuboCop module Cop module RSpec # Pefer instance doubles over stubbing any instance of a class # # @example # # bad # describe MyClass do # before { allow_any_instance_of(MyClass).to receive(:foo) } # end # # # good # describe MyClass do # let(:my_instance) { instance_double(MyClass) } # # before do # allow(MyClass).to receive(:new).and_return(my_instance) # allow(my_instance).to receive(:foo) # end # end class AnyInstance < Cop MESSAGE = 'Avoid stubbing using `%{method}`'.freeze ANY_INSTANCE_METHODS = [ :any_instance, :allow_any_instance_of, :expect_any_instance_of ].freeze def on_send(node) _receiver, method_name, *_args = *node return unless ANY_INSTANCE_METHODS.include?(method_name) add_offense( node, :expression, format( MESSAGE % { method: method_name }, ) ) end end end end end
Remove unnecessary source range in AnyInstance
Remove unnecessary source range in AnyInstance This is the entire send node so we don't have to specify the range
Ruby
mit
andyw8/rubocop-rspec,backus/rubocop-rspec,tjchambers/rubocop-rspec,backus/rubocop-rspec,nevir/rubocop-rspec,andyw8/rubocop-rspec,bquorning/rubocop-rspec
ruby
## Code Before: module RuboCop module Cop module RSpec # Pefer instance doubles over stubbing any instance of a class # # @example # # bad # describe MyClass do # before { allow_any_instance_of(MyClass).to receive(:foo) } # end # # # good # describe MyClass do # let(:my_instance) { instance_double(MyClass) } # # before do # allow(MyClass).to receive(:new).and_return(my_instance) # allow(my_instance).to receive(:foo) # end # end class AnyInstance < Cop MESSAGE = 'Avoid stubbing using `%{method}`'.freeze ANY_INSTANCE_METHODS = [ :any_instance, :allow_any_instance_of, :expect_any_instance_of ].freeze def on_send(node) _receiver, method_name, *_args = *node return unless ANY_INSTANCE_METHODS.include?(method_name) add_offense( node, :expression, format( MESSAGE % { method: method_name }, node.loc.expression.source ) ) end end end end end ## Instruction: Remove unnecessary source range in AnyInstance This is the entire send node so we don't have to specify the range ## Code After: module RuboCop module Cop module RSpec # Pefer instance doubles over stubbing any instance of a class # # @example # # bad # describe MyClass do # before { allow_any_instance_of(MyClass).to receive(:foo) } # end # # # good # describe MyClass do # let(:my_instance) { instance_double(MyClass) } # # before do # allow(MyClass).to receive(:new).and_return(my_instance) # allow(my_instance).to receive(:foo) # end # end class AnyInstance < Cop MESSAGE = 'Avoid stubbing using `%{method}`'.freeze ANY_INSTANCE_METHODS = [ :any_instance, :allow_any_instance_of, :expect_any_instance_of ].freeze def on_send(node) _receiver, method_name, *_args = *node return unless ANY_INSTANCE_METHODS.include?(method_name) add_offense( node, :expression, format( MESSAGE % { method: method_name }, ) ) end end end end end
module RuboCop module Cop module RSpec # Pefer instance doubles over stubbing any instance of a class # # @example # # bad # describe MyClass do # before { allow_any_instance_of(MyClass).to receive(:foo) } # end # # # good # describe MyClass do # let(:my_instance) { instance_double(MyClass) } # # before do # allow(MyClass).to receive(:new).and_return(my_instance) # allow(my_instance).to receive(:foo) # end # end class AnyInstance < Cop MESSAGE = 'Avoid stubbing using `%{method}`'.freeze ANY_INSTANCE_METHODS = [ :any_instance, :allow_any_instance_of, :expect_any_instance_of ].freeze def on_send(node) _receiver, method_name, *_args = *node return unless ANY_INSTANCE_METHODS.include?(method_name) add_offense( node, :expression, format( MESSAGE % { method: method_name }, - node.loc.expression.source ) ) end end end end end
1
0.021739
0
1
4c22716706b8a05a3798503a6883bacc26ede556
config/forum.php
config/forum.php
<?php return [ /* |-------------------------------------------------------------------------- | User Model |-------------------------------------------------------------------------- | | Set your eloquent model for your users. | */ 'user' => App\User::class, /* |-------------------------------------------------------------------------- | Group Mode |-------------------------------------------------------------------------- | | Set the group mode to either "nested" or "flat" for a different forum | experience. | */ 'group_mode' => 'nested', /* |-------------------------------------------------------------------------- | Discussion Group Limit |-------------------------------------------------------------------------- | | Set the maximum number of groups that a discussion can be created in. | Only applicable if group_mode is set to 'flat'. | */ 'discussion_group_limit' => 3, /* |-------------------------------------------------------------------------- | Pagination Limits |-------------------------------------------------------------------------- | | Set the maximum number of resources that will be shown per page. | */ 'pagination' => [ 'discussions' => 20, 'posts' => 15, ], /* |-------------------------------------------------------------------------- | API and Web |-------------------------------------------------------------------------- | | Include whichever middleware and namespace(s) you want here. | */ 'api' => [ 'enabled' => false, 'prefix' => 'api/forum', 'namespace' => '\Bitporch\Forum\Controllers\Api', 'middleware' => 'auth:api', ], 'web' => [ 'enabled' => true, 'prefix' => 'forum', 'namespace' => '\Bitporch\Forum\Controllers', 'middleware' => [ \Illuminate\Routing\Middleware\SubstituteBindings::class, \Illuminate\Session\Middleware\StartSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, ], ], ];
<?php return [ /* |-------------------------------------------------------------------------- | User Model |-------------------------------------------------------------------------- | | Set your eloquent model for your users. | */ 'user' => App\User::class, /* |-------------------------------------------------------------------------- | Group Mode |-------------------------------------------------------------------------- | | Set the group mode to either "nested" or "flat" for a different forum | experience. | */ 'group_mode' => 'nested', /* |-------------------------------------------------------------------------- | Discussion Group Limit |-------------------------------------------------------------------------- | | Set the maximum number of groups that a discussion can be created in. | Only applicable if group_mode is set to 'flat'. | */ 'discussion_group_limit' => 3, /* |-------------------------------------------------------------------------- | Pagination Limits |-------------------------------------------------------------------------- | | Set the maximum number of resources that will be shown per page. | */ 'pagination' => [ 'discussions' => 20, 'posts' => 15, ], /* |-------------------------------------------------------------------------- | API and Web |-------------------------------------------------------------------------- | | Include whichever middleware and namespace(s) you want here. | */ 'api' => [ 'enabled' => false, 'prefix' => 'api/forum', 'namespace' => '\Bitporch\Forum\Controllers\Api', 'middleware' => 'auth:api', ], 'web' => [ 'enabled' => true, 'prefix' => 'forum', 'namespace' => '\Bitporch\Forum\Controllers', 'middleware' => 'web', ], ];
Use the `web` middleware group by default in the web config
Use the `web` middleware group by default in the web config
PHP
mit
bitporch/laravel-forum,bitporch/laravel-firefly,deleugpn/laravel-forum,bitporch/laravel-firefly,deleugpn/laravel-forum,bitporch/laravel-forum
php
## Code Before: <?php return [ /* |-------------------------------------------------------------------------- | User Model |-------------------------------------------------------------------------- | | Set your eloquent model for your users. | */ 'user' => App\User::class, /* |-------------------------------------------------------------------------- | Group Mode |-------------------------------------------------------------------------- | | Set the group mode to either "nested" or "flat" for a different forum | experience. | */ 'group_mode' => 'nested', /* |-------------------------------------------------------------------------- | Discussion Group Limit |-------------------------------------------------------------------------- | | Set the maximum number of groups that a discussion can be created in. | Only applicable if group_mode is set to 'flat'. | */ 'discussion_group_limit' => 3, /* |-------------------------------------------------------------------------- | Pagination Limits |-------------------------------------------------------------------------- | | Set the maximum number of resources that will be shown per page. | */ 'pagination' => [ 'discussions' => 20, 'posts' => 15, ], /* |-------------------------------------------------------------------------- | API and Web |-------------------------------------------------------------------------- | | Include whichever middleware and namespace(s) you want here. | */ 'api' => [ 'enabled' => false, 'prefix' => 'api/forum', 'namespace' => '\Bitporch\Forum\Controllers\Api', 'middleware' => 'auth:api', ], 'web' => [ 'enabled' => true, 'prefix' => 'forum', 'namespace' => '\Bitporch\Forum\Controllers', 'middleware' => [ \Illuminate\Routing\Middleware\SubstituteBindings::class, \Illuminate\Session\Middleware\StartSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, ], ], ]; ## Instruction: Use the `web` middleware group by default in the web config ## Code After: <?php return [ /* |-------------------------------------------------------------------------- | User Model |-------------------------------------------------------------------------- | | Set your eloquent model for your users. | */ 'user' => App\User::class, /* |-------------------------------------------------------------------------- | Group Mode |-------------------------------------------------------------------------- | | Set the group mode to either "nested" or "flat" for a different forum | experience. | */ 'group_mode' => 'nested', /* |-------------------------------------------------------------------------- | Discussion Group Limit |-------------------------------------------------------------------------- | | Set the maximum number of groups that a discussion can be created in. | Only applicable if group_mode is set to 'flat'. | */ 'discussion_group_limit' => 3, /* |-------------------------------------------------------------------------- | Pagination Limits |-------------------------------------------------------------------------- | | Set the maximum number of resources that will be shown per page. | */ 'pagination' => [ 'discussions' => 20, 'posts' => 15, ], /* |-------------------------------------------------------------------------- | API and Web |-------------------------------------------------------------------------- | | Include whichever middleware and namespace(s) you want here. | */ 'api' => [ 'enabled' => false, 'prefix' => 'api/forum', 'namespace' => '\Bitporch\Forum\Controllers\Api', 'middleware' => 'auth:api', ], 'web' => [ 'enabled' => true, 'prefix' => 'forum', 'namespace' => '\Bitporch\Forum\Controllers', 'middleware' => 'web', ], ];
<?php return [ /* |-------------------------------------------------------------------------- | User Model |-------------------------------------------------------------------------- | | Set your eloquent model for your users. | */ 'user' => App\User::class, /* |-------------------------------------------------------------------------- | Group Mode |-------------------------------------------------------------------------- | | Set the group mode to either "nested" or "flat" for a different forum | experience. | */ 'group_mode' => 'nested', /* |-------------------------------------------------------------------------- | Discussion Group Limit |-------------------------------------------------------------------------- | | Set the maximum number of groups that a discussion can be created in. | Only applicable if group_mode is set to 'flat'. | */ 'discussion_group_limit' => 3, /* |-------------------------------------------------------------------------- | Pagination Limits |-------------------------------------------------------------------------- | | Set the maximum number of resources that will be shown per page. | */ 'pagination' => [ 'discussions' => 20, 'posts' => 15, ], /* |-------------------------------------------------------------------------- | API and Web |-------------------------------------------------------------------------- | | Include whichever middleware and namespace(s) you want here. | */ 'api' => [ 'enabled' => false, 'prefix' => 'api/forum', 'namespace' => '\Bitporch\Forum\Controllers\Api', 'middleware' => 'auth:api', ], 'web' => [ 'enabled' => true, 'prefix' => 'forum', 'namespace' => '\Bitporch\Forum\Controllers', - 'middleware' => [ ? ^ + 'middleware' => 'web', ? ^^^^^^ - \Illuminate\Routing\Middleware\SubstituteBindings::class, - \Illuminate\Session\Middleware\StartSession::class, - \Illuminate\View\Middleware\ShareErrorsFromSession::class, - ], ], ];
6
0.074074
1
5
fb165bfc340d31ce87d89db400090c8f330226e7
.travis.yml
.travis.yml
sudo: false language: ruby cache: directories: - vendor/bundle rvm: - '2.3.0' - '2.2' - '2.1' env: - REDMINE_VERSION=3.2.1 - REDMINE_VERSION=3.1.4 - REDMINE_VERSION=2.6.10 - REDMINE_VERSION=master matrix: allow_failures: - env: REDMINE_VERSION=master branches: except: - debian install: - export BUNDLE_GEMFILE="" - export BUNDLE_PATH="$(pwd)/vendor/bundle" - ./redmine update - bundle install --jobs=3 --retry=3 --path $BUNDLE_PATH script: - bundle exec rake spec
sudo: false language: ruby cache: directories: - vendor/bundle rvm: - '2.3.0' - '2.2' - '2.1' env: - REDMINE_VERSION=3.2.1 - REDMINE_VERSION=3.1.4 - REDMINE_VERSION=2.6.10 - REDMINE_VERSION=master matrix: allow_failures: - env: REDMINE_VERSION=master branches: except: - debian before_install: - gem install bundler --pre install: - export BUNDLE_GEMFILE="" - export BUNDLE_PATH="$(pwd)/vendor/bundle" - ./redmine update - bundle install --jobs=3 --retry=3 --path $BUNDLE_PATH script: - bundle exec rake spec
Install newest bundler on CI to resolve with matching ruby version
Install newest bundler on CI to resolve with matching ruby version
YAML
apache-2.0
jgraichen/redmine_dashboard,jgraichen/redmine_dashboard,jgraichen/redmine_dashboard
yaml
## Code Before: sudo: false language: ruby cache: directories: - vendor/bundle rvm: - '2.3.0' - '2.2' - '2.1' env: - REDMINE_VERSION=3.2.1 - REDMINE_VERSION=3.1.4 - REDMINE_VERSION=2.6.10 - REDMINE_VERSION=master matrix: allow_failures: - env: REDMINE_VERSION=master branches: except: - debian install: - export BUNDLE_GEMFILE="" - export BUNDLE_PATH="$(pwd)/vendor/bundle" - ./redmine update - bundle install --jobs=3 --retry=3 --path $BUNDLE_PATH script: - bundle exec rake spec ## Instruction: Install newest bundler on CI to resolve with matching ruby version ## Code After: sudo: false language: ruby cache: directories: - vendor/bundle rvm: - '2.3.0' - '2.2' - '2.1' env: - REDMINE_VERSION=3.2.1 - REDMINE_VERSION=3.1.4 - REDMINE_VERSION=2.6.10 - REDMINE_VERSION=master matrix: allow_failures: - env: REDMINE_VERSION=master branches: except: - debian before_install: - gem install bundler --pre install: - export BUNDLE_GEMFILE="" - export BUNDLE_PATH="$(pwd)/vendor/bundle" - ./redmine update - bundle install --jobs=3 --retry=3 --path $BUNDLE_PATH script: - bundle exec rake spec
sudo: false language: ruby cache: directories: - vendor/bundle rvm: - '2.3.0' - '2.2' - '2.1' env: - REDMINE_VERSION=3.2.1 - REDMINE_VERSION=3.1.4 - REDMINE_VERSION=2.6.10 - REDMINE_VERSION=master matrix: allow_failures: - env: REDMINE_VERSION=master branches: except: - debian + before_install: + - gem install bundler --pre install: - export BUNDLE_GEMFILE="" - export BUNDLE_PATH="$(pwd)/vendor/bundle" - ./redmine update - bundle install --jobs=3 --retry=3 --path $BUNDLE_PATH script: - bundle exec rake spec
2
0.074074
2
0
b90954b027dea683d71cc63178fc38daa1818631
client/source/main.cpp
client/source/main.cpp
int main(int argc, char *argv[]) { if(argc != 3) { std::cout << "USAGE: " << argv[0] << " <filesource> <filedestination>" << std::endl; return 1; } else { filecopy target1(argv[2], argv[1]); std::cout << "TARGET ASSIGNED" << std::endl; std::cout << "EXECUTE FILEWORKER" << std::endl; } return 0; }
int main(int argc, char *argv[]) { if(argc != 3) { std::cout << "USAGE: " << argv[0] << " <filesource> <filedestination>" << std::endl; return 1; } else { filecopy target1(argv[2], argv[1]); std::cout << "TARGET ASSIGNED" << std::endl; target1.filecopy_worker(); std::cout << "EXECUTE FILEWORKER" << std::endl; } return 0; }
Fix client for not executing fileworker
Fix client for not executing fileworker
C++
mit
paulkramme/backup
c++
## Code Before: int main(int argc, char *argv[]) { if(argc != 3) { std::cout << "USAGE: " << argv[0] << " <filesource> <filedestination>" << std::endl; return 1; } else { filecopy target1(argv[2], argv[1]); std::cout << "TARGET ASSIGNED" << std::endl; std::cout << "EXECUTE FILEWORKER" << std::endl; } return 0; } ## Instruction: Fix client for not executing fileworker ## Code After: int main(int argc, char *argv[]) { if(argc != 3) { std::cout << "USAGE: " << argv[0] << " <filesource> <filedestination>" << std::endl; return 1; } else { filecopy target1(argv[2], argv[1]); std::cout << "TARGET ASSIGNED" << std::endl; target1.filecopy_worker(); std::cout << "EXECUTE FILEWORKER" << std::endl; } return 0; }
int main(int argc, char *argv[]) { if(argc != 3) { std::cout << "USAGE: " << argv[0] << " <filesource> <filedestination>" << std::endl; return 1; } else { filecopy target1(argv[2], argv[1]); std::cout << "TARGET ASSIGNED" << std::endl; + target1.filecopy_worker(); std::cout << "EXECUTE FILEWORKER" << std::endl; } return 0; }
1
0.0625
1
0
3776b2420e7297423a0058fb57f923cda4c9028b
clang-tidy/mpi/CMakeLists.txt
clang-tidy/mpi/CMakeLists.txt
set(LLVM_LINK_COMPONENTS support) add_clang_library(clangTidyMPIModule BufferDerefCheck.cpp MPITidyModule.cpp TypeMismatchCheck.cpp LINK_LIBS clangAST clangASTMatchers clangBasic clangLex clangTidy clangTidyUtils clangTooling clangStaticAnalyzerCheckers )
set(LLVM_LINK_COMPONENTS support) add_clang_library(clangTidyMPIModule BufferDerefCheck.cpp MPITidyModule.cpp TypeMismatchCheck.cpp LINK_LIBS clangAnalysis clangAST clangASTMatchers clangBasic clangLex clangTidy clangTidyUtils clangTooling clangStaticAnalyzerCheckers )
Add dependency to clangAnalysis after rC343160
[clang-tidy] Add dependency to clangAnalysis after rC343160 git-svn-id: a34e9779ed74578ad5922b3306b3d80a0c825546@343168 91177308-0d34-0410-b5e6-96231b3b80d8
Text
apache-2.0
llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra
text
## Code Before: set(LLVM_LINK_COMPONENTS support) add_clang_library(clangTidyMPIModule BufferDerefCheck.cpp MPITidyModule.cpp TypeMismatchCheck.cpp LINK_LIBS clangAST clangASTMatchers clangBasic clangLex clangTidy clangTidyUtils clangTooling clangStaticAnalyzerCheckers ) ## Instruction: [clang-tidy] Add dependency to clangAnalysis after rC343160 git-svn-id: a34e9779ed74578ad5922b3306b3d80a0c825546@343168 91177308-0d34-0410-b5e6-96231b3b80d8 ## Code After: set(LLVM_LINK_COMPONENTS support) add_clang_library(clangTidyMPIModule BufferDerefCheck.cpp MPITidyModule.cpp TypeMismatchCheck.cpp LINK_LIBS clangAnalysis clangAST clangASTMatchers clangBasic clangLex clangTidy clangTidyUtils clangTooling clangStaticAnalyzerCheckers )
set(LLVM_LINK_COMPONENTS support) add_clang_library(clangTidyMPIModule BufferDerefCheck.cpp MPITidyModule.cpp TypeMismatchCheck.cpp LINK_LIBS + clangAnalysis clangAST clangASTMatchers clangBasic clangLex clangTidy clangTidyUtils clangTooling clangStaticAnalyzerCheckers )
1
0.058824
1
0
5c8a56b559aec524661a468691b8b7730af1dca7
.travis.yml
.travis.yml
language: java sudo: false jdk: - oraclejdk8 - openjdk11 - openjdk7 cache: directories: - '$HOME/.m2/repository' branches: except: - gh-pages
language: java sudo: false jdk: - openjdk8 - openjdk11 cache: directories: - '$HOME/.m2/repository' branches: except: - gh-pages
Remove JDK7 as it is no longer supported by TravisCI
Remove JDK7 as it is no longer supported by TravisCI
YAML
mit
jmxtrans/jmxtrans-agent,jmxtrans/jmxtrans-agent,jmxtrans/jmxtrans-agent
yaml
## Code Before: language: java sudo: false jdk: - oraclejdk8 - openjdk11 - openjdk7 cache: directories: - '$HOME/.m2/repository' branches: except: - gh-pages ## Instruction: Remove JDK7 as it is no longer supported by TravisCI ## Code After: language: java sudo: false jdk: - openjdk8 - openjdk11 cache: directories: - '$HOME/.m2/repository' branches: except: - gh-pages
language: java sudo: false jdk: - - oraclejdk8 ? ^^^^ + - openjdk8 ? ^ + - openjdk11 - - openjdk7 cache: directories: - '$HOME/.m2/repository' branches: except: - gh-pages
3
0.25
1
2
2511ab928503fdcdc278562ab85559e107b4c360
CHANGES.md
CHANGES.md
- <Change the version, date, and this text.>
- TBD
Deploy Travis CI build 628 to GitHub
Deploy Travis CI build 628 to GitHub
Markdown
mit
jacebrowning/template-python-demo
markdown
## Code Before: - <Change the version, date, and this text.> ## Instruction: Deploy Travis CI build 628 to GitHub ## Code After: - TBD
- - <Change the version, date, and this text.> + - TBD
2
1
1
1
588c7b9bff1252392edaf438cc50683c81206bc2
app/controllers/concerns/open_id_connect_support.rb
app/controllers/concerns/open_id_connect_support.rb
module Concerns module OpenIdConnectSupport extend ActiveSupport::Concern protected def build_response(state, params, nonce) # The request doesn't contain any information to help us find the right application instance # so we have to use predefined URLs uri = URI.parse(current_application.oidc_url(params["iss"])) uri_params = Rack::Utils.parse_query(uri.query) auth_params = { response_type: "id_token", redirect_uri: params[:target_link_uri], response_mode: "form_post", client_id: current_application.client_id(params["iss"]), scope: "openid", state: state, login_hint: params[:login_hint], prompt: "none", lti_message_hint: params[:lti_message_hint], nonce: nonce, }.merge(uri_params) uri.fragment = uri.query = nil [uri.to_s, "?", auth_params.to_query].join end end end
module Concerns module OpenIdConnectSupport extend ActiveSupport::Concern protected def build_response(state, params, nonce) # The request doesn't contain any information to help us find the right application instance # so we have to use predefined URLs uri = URI.parse(current_application.oidc_url(params["iss"])) uri_params = Rack::Utils.parse_query(uri.query) auth_params = { response_type: "id_token", redirect_uri: params[:target_link_uri], response_mode: "form_post", client_id: params[:client_id], scope: "openid", state: state, login_hint: params[:login_hint], prompt: "none", lti_message_hint: params[:lti_message_hint], nonce: nonce, }.merge(uri_params) uri.fragment = uri.query = nil [uri.to_s, "?", auth_params.to_query].join end end end
Use client_id from params in OpenID initialization
fix: Use client_id from params in OpenID initialization We were previously pulling the `client_id` from the first `LtiInstall` record with a matching `iss`. This approach only works if there's only one `LtiInstall` record with a matching `iss` though. In practice, we may very well have multiple `LtiInstall` records with the same `iss`. The request parameters include the `client_id` for the tool being launched. We can use this `client_id` instead of pulling it from the `LtiInstall` record and then we don't have to worry about `iss` collisions.
Ruby
mit
atomicjolt/adhesion,atomicjolt/lti_starter_app,atomicjolt/adhesion,atomicjolt/adhesion,atomicjolt/adhesion,atomicjolt/lti_starter_app,atomicjolt/lti_starter_app,atomicjolt/lti_starter_app
ruby
## Code Before: module Concerns module OpenIdConnectSupport extend ActiveSupport::Concern protected def build_response(state, params, nonce) # The request doesn't contain any information to help us find the right application instance # so we have to use predefined URLs uri = URI.parse(current_application.oidc_url(params["iss"])) uri_params = Rack::Utils.parse_query(uri.query) auth_params = { response_type: "id_token", redirect_uri: params[:target_link_uri], response_mode: "form_post", client_id: current_application.client_id(params["iss"]), scope: "openid", state: state, login_hint: params[:login_hint], prompt: "none", lti_message_hint: params[:lti_message_hint], nonce: nonce, }.merge(uri_params) uri.fragment = uri.query = nil [uri.to_s, "?", auth_params.to_query].join end end end ## Instruction: fix: Use client_id from params in OpenID initialization We were previously pulling the `client_id` from the first `LtiInstall` record with a matching `iss`. This approach only works if there's only one `LtiInstall` record with a matching `iss` though. In practice, we may very well have multiple `LtiInstall` records with the same `iss`. The request parameters include the `client_id` for the tool being launched. We can use this `client_id` instead of pulling it from the `LtiInstall` record and then we don't have to worry about `iss` collisions. ## Code After: module Concerns module OpenIdConnectSupport extend ActiveSupport::Concern protected def build_response(state, params, nonce) # The request doesn't contain any information to help us find the right application instance # so we have to use predefined URLs uri = URI.parse(current_application.oidc_url(params["iss"])) uri_params = Rack::Utils.parse_query(uri.query) auth_params = { response_type: "id_token", redirect_uri: params[:target_link_uri], response_mode: "form_post", client_id: params[:client_id], scope: "openid", state: state, login_hint: params[:login_hint], prompt: "none", lti_message_hint: params[:lti_message_hint], nonce: nonce, }.merge(uri_params) uri.fragment = uri.query = nil [uri.to_s, "?", auth_params.to_query].join end end end
module Concerns module OpenIdConnectSupport extend ActiveSupport::Concern protected def build_response(state, params, nonce) # The request doesn't contain any information to help us find the right application instance # so we have to use predefined URLs uri = URI.parse(current_application.oidc_url(params["iss"])) uri_params = Rack::Utils.parse_query(uri.query) auth_params = { response_type: "id_token", redirect_uri: params[:target_link_uri], response_mode: "form_post", - client_id: current_application.client_id(params["iss"]), + client_id: params[:client_id], scope: "openid", state: state, login_hint: params[:login_hint], prompt: "none", lti_message_hint: params[:lti_message_hint], nonce: nonce, }.merge(uri_params) uri.fragment = uri.query = nil [uri.to_s, "?", auth_params.to_query].join end end end
2
0.071429
1
1
e6220ea1be33c56ceebef1dea1b275bd8268a1a7
.travis.yml
.travis.yml
language: ruby rvm: - 2.0.0 - 1.9.3 services: - redis-server - memcached - postgresql before_script: - cp config/database.travis.yml config/database.yml - psql -c 'create database photographerio_test;' -U postgres
language: ruby rvm: - 2.0.0 services: - redis-server - memcached - postgresql before_script: - cp config/database.travis.yml config/database.yml - psql -c 'create database photographerio_test;' -U postgres
Drop 1.9.3 testing for now
Drop 1.9.3 testing for now
YAML
mit
arnkorty/photographer-io,robotmay/photographer-io,xuewenfei/photographer-io,laputaer/photographer-io,wangjun/photographer-io,xuewenfei/photographer-io,laputaer/photographer-io,damoguyan8844/photographer-io,xuewenfei/photographer-io,arnkorty/photographer-io,wangjun/photographer-io,damoguyan8844/photographer-io,damoguyan8844/photographer-io,robotmay/photographer-io,wangjun/photographer-io,laputaer/photographer-io,robotmay/photographer-io,arnkorty/photographer-io
yaml
## Code Before: language: ruby rvm: - 2.0.0 - 1.9.3 services: - redis-server - memcached - postgresql before_script: - cp config/database.travis.yml config/database.yml - psql -c 'create database photographerio_test;' -U postgres ## Instruction: Drop 1.9.3 testing for now ## Code After: language: ruby rvm: - 2.0.0 services: - redis-server - memcached - postgresql before_script: - cp config/database.travis.yml config/database.yml - psql -c 'create database photographerio_test;' -U postgres
language: ruby rvm: - 2.0.0 - - 1.9.3 services: - redis-server - memcached - postgresql before_script: - cp config/database.travis.yml config/database.yml - psql -c 'create database photographerio_test;' -U postgres
1
0.076923
0
1
bc3bff6df2e8eb52e641dbd0bdf85e24a92a1514
testsuite/tests/RunTestTH.hs
testsuite/tests/RunTestTH.hs
{-# LANGUAGE TemplateHaskell #-} module Main where import Test.HUnit import Control.Monad.Trans import Shaker.TestTH import Test.QuickCheck import Shaker.Cabal.CabalInfoTest import Shaker.Action.CompileTest import Shaker.CliTest import Shaker.ListenerTest import Shaker.ParserTest import Shaker.RegexTest import Shaker.IoTest import Shaker.ReflexiviteTest import Shaker.SourceHelperTest main :: IO() main = do mapM_ liftIO propLists _ <- testLists return () propLists :: [IO()] propLists = $(thListProperties) testLists :: IO Counts testLists = runTestTT $ TestList $(thListHunit)
{-# LANGUAGE TemplateHaskell #-} module Main where import Shaker.TestTH import Shaker.Cabal.CabalInfoTest import Shaker.Action.CompileTest import Shaker.CliTest import Shaker.ListenerTest import Shaker.ParserTest import Shaker.RegexTest import Shaker.IoTest import Shaker.ReflexiviteTest import Shaker.SourceHelperTest import Test.Framework import Test.Framework.Providers.HUnit import Test.Framework.Providers.QuickCheck2 main :: IO() main = defaultMain $(thListTestFramework)
Switch test execution to test-framework
Switch test execution to test-framework
Haskell
isc
bonnefoa/Shaker
haskell
## Code Before: {-# LANGUAGE TemplateHaskell #-} module Main where import Test.HUnit import Control.Monad.Trans import Shaker.TestTH import Test.QuickCheck import Shaker.Cabal.CabalInfoTest import Shaker.Action.CompileTest import Shaker.CliTest import Shaker.ListenerTest import Shaker.ParserTest import Shaker.RegexTest import Shaker.IoTest import Shaker.ReflexiviteTest import Shaker.SourceHelperTest main :: IO() main = do mapM_ liftIO propLists _ <- testLists return () propLists :: [IO()] propLists = $(thListProperties) testLists :: IO Counts testLists = runTestTT $ TestList $(thListHunit) ## Instruction: Switch test execution to test-framework ## Code After: {-# LANGUAGE TemplateHaskell #-} module Main where import Shaker.TestTH import Shaker.Cabal.CabalInfoTest import Shaker.Action.CompileTest import Shaker.CliTest import Shaker.ListenerTest import Shaker.ParserTest import Shaker.RegexTest import Shaker.IoTest import Shaker.ReflexiviteTest import Shaker.SourceHelperTest import Test.Framework import Test.Framework.Providers.HUnit import Test.Framework.Providers.QuickCheck2 main :: IO() main = defaultMain $(thListTestFramework)
{-# LANGUAGE TemplateHaskell #-} module Main where - import Test.HUnit - import Control.Monad.Trans import Shaker.TestTH - import Test.QuickCheck import Shaker.Cabal.CabalInfoTest import Shaker.Action.CompileTest import Shaker.CliTest import Shaker.ListenerTest import Shaker.ParserTest import Shaker.RegexTest import Shaker.IoTest import Shaker.ReflexiviteTest import Shaker.SourceHelperTest + import Test.Framework + import Test.Framework.Providers.HUnit + import Test.Framework.Providers.QuickCheck2 main :: IO() + main = defaultMain $(thListTestFramework) - main = do - mapM_ liftIO propLists - _ <- testLists - return () - propLists :: [IO()] - propLists = $(thListProperties) - - testLists :: IO Counts - testLists = runTestTT $ TestList $(thListHunit) - -
18
0.580645
4
14
5d374aa0cf5c96b49046fc3c8b0e5c085ca77a3d
script/centos7/01-install-utils.sh
script/centos7/01-install-utils.sh
yum -y install epel-release yum -y install psmisc yum -y install mc telnet nano traceroute yum -y install wget net-tools yum -y install bind-utils ntpdate dstat yum -y install rdiff-backup rsync sshpass sshfs yum -y install policycoreutils-python setools yum -y install pwgen yum -y install supervisor yum -y install unzip p7zip yum -y install yum-utils yum -y install aspell-en yum -y install certbot yum -y install smartmontools dmidecode lm_sensors yum -y install python-pip yum -y install deltarpm yum -y install sysstat yum -y install ffmpeg yum -y install p7zip systemctl enable sysstat systemctl start sysstat mkdir /etc/linux.feature chmod 700 /etc/linux.feature chcon -t admin_home_t /etc/linux.feature mkdir /var/backup chmod 700 /var/backup chcon -t admin_home_t /var/backup mkdir /iso/
yum -y install epel-release yum -y install psmisc yum -y install mc telnet nano traceroute yum -y install wget net-tools yum -y install bind-utils ntpdate dstat yum -y install rdiff-backup rsync sshpass sshfs yum -y install policycoreutils-python setools yum -y install pwgen yum -y install supervisor yum -y install unzip p7zip yum -y install yum-utils yum -y install aspell-en yum -y install certbot yum -y install smartmontools dmidecode lm_sensors yum -y install python-pip yum -y install deltarpm yum -y install sysstat cd /tmp wget http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm rpm -Uvh /tmp/nux-dextop-release-0-5.el7.nux.noarch.rpm yum -y install ffmpeg systemctl enable sysstat systemctl start sysstat mkdir /etc/linux.feature chmod 700 /etc/linux.feature chcon -t admin_home_t /etc/linux.feature mkdir /var/backup chmod 700 /var/backup chcon -t admin_home_t /var/backup mkdir /iso/
Fix ffmpeg, now not install from epel
Fix ffmpeg, now not install from epel
Shell
apache-2.0
faew/linux.feature,faew/linux.feature,faew/linux.feature
shell
## Code Before: yum -y install epel-release yum -y install psmisc yum -y install mc telnet nano traceroute yum -y install wget net-tools yum -y install bind-utils ntpdate dstat yum -y install rdiff-backup rsync sshpass sshfs yum -y install policycoreutils-python setools yum -y install pwgen yum -y install supervisor yum -y install unzip p7zip yum -y install yum-utils yum -y install aspell-en yum -y install certbot yum -y install smartmontools dmidecode lm_sensors yum -y install python-pip yum -y install deltarpm yum -y install sysstat yum -y install ffmpeg yum -y install p7zip systemctl enable sysstat systemctl start sysstat mkdir /etc/linux.feature chmod 700 /etc/linux.feature chcon -t admin_home_t /etc/linux.feature mkdir /var/backup chmod 700 /var/backup chcon -t admin_home_t /var/backup mkdir /iso/ ## Instruction: Fix ffmpeg, now not install from epel ## Code After: yum -y install epel-release yum -y install psmisc yum -y install mc telnet nano traceroute yum -y install wget net-tools yum -y install bind-utils ntpdate dstat yum -y install rdiff-backup rsync sshpass sshfs yum -y install policycoreutils-python setools yum -y install pwgen yum -y install supervisor yum -y install unzip p7zip yum -y install yum-utils yum -y install aspell-en yum -y install certbot yum -y install smartmontools dmidecode lm_sensors yum -y install python-pip yum -y install deltarpm yum -y install sysstat cd /tmp wget http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm rpm -Uvh /tmp/nux-dextop-release-0-5.el7.nux.noarch.rpm yum -y install ffmpeg systemctl enable sysstat systemctl start sysstat mkdir /etc/linux.feature chmod 700 /etc/linux.feature chcon -t admin_home_t /etc/linux.feature mkdir /var/backup chmod 700 /var/backup chcon -t admin_home_t /var/backup mkdir /iso/
yum -y install epel-release yum -y install psmisc yum -y install mc telnet nano traceroute yum -y install wget net-tools yum -y install bind-utils ntpdate dstat yum -y install rdiff-backup rsync sshpass sshfs yum -y install policycoreutils-python setools yum -y install pwgen yum -y install supervisor yum -y install unzip p7zip yum -y install yum-utils yum -y install aspell-en yum -y install certbot yum -y install smartmontools dmidecode lm_sensors yum -y install python-pip yum -y install deltarpm yum -y install sysstat + + cd /tmp + wget http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm + rpm -Uvh /tmp/nux-dextop-release-0-5.el7.nux.noarch.rpm yum -y install ffmpeg - yum -y install p7zip systemctl enable sysstat systemctl start sysstat mkdir /etc/linux.feature chmod 700 /etc/linux.feature chcon -t admin_home_t /etc/linux.feature mkdir /var/backup chmod 700 /var/backup chcon -t admin_home_t /var/backup mkdir /iso/
5
0.151515
4
1
da96a9166c835a562939a39dbbae02cadc46a6a5
README.md
README.md
About ===== Dyonisos is a Django based web application that was developed for the Jonge Democraten. The JD organized events with some regularity where guests have to subscribe and sometimes pay for entry. This is what Dyonisos was made for. It should be easy to create a form for an event, easy for guests to subscribe and pay and easy for the organizers of the event to see who is subscribed to what. Quick install ============ 1. `$ ./clean_env.sh` 1. `$ ./build_env.sh` 1. `$ source ./env/bin/activate` 1. `$ cp events/local_settings_example.py events/local_settings.py` 1. Modify `events/local_settings.py` with appropriate values for `SECRET_KEY` and `MOLLIE_KEY`. 1. `$ python manage.py migrate` 1. `$ python manage.py createsuperuser` 1. `$ python manage.py runserver` ### System dependencies On Ubuntu, the following packages need to be installed before running `build_env.sh`, - python-dev - python-pycurl - libcurl4-openssl-dev - libmysqlclient-dev Special credits =============== Mathijs Kleijnen: Suggesting the name Dyonisos Jonge Democraten: Supporting development
[![Dependency Status](https://gemnasium.com/jonge-democraten/dyonisos.svg)](https://gemnasium.com/jonge-democraten/dyonisos) About ===== Dyonisos is a Django based web application that was developed for the Jonge Democraten. The JD organized events with some regularity where guests have to subscribe and sometimes pay for entry. This is what Dyonisos was made for. It should be easy to create a form for an event, easy for guests to subscribe and pay and easy for the organizers of the event to see who is subscribed to what. Quick install ============ 1. `$ ./clean_env.sh` 1. `$ ./build_env.sh` 1. `$ source ./env/bin/activate` 1. `$ cp events/local_settings_example.py events/local_settings.py` 1. Modify `events/local_settings.py` with appropriate values for `SECRET_KEY` and `MOLLIE_KEY`. 1. `$ python manage.py migrate` 1. `$ python manage.py createsuperuser` 1. `$ python manage.py runserver` ### System dependencies On Ubuntu, the following packages need to be installed before running `build_env.sh`, - python-dev - python-pycurl - libcurl4-openssl-dev - libmysqlclient-dev Special credits =============== Mathijs Kleijnen: Suggesting the name Dyonisos Jonge Democraten: Supporting development
Add gemnasium dependency status badge
Add gemnasium dependency status badge
Markdown
mit
jonge-democraten/dyonisos,jonge-democraten/dyonisos,jonge-democraten/dyonisos
markdown
## Code Before: About ===== Dyonisos is a Django based web application that was developed for the Jonge Democraten. The JD organized events with some regularity where guests have to subscribe and sometimes pay for entry. This is what Dyonisos was made for. It should be easy to create a form for an event, easy for guests to subscribe and pay and easy for the organizers of the event to see who is subscribed to what. Quick install ============ 1. `$ ./clean_env.sh` 1. `$ ./build_env.sh` 1. `$ source ./env/bin/activate` 1. `$ cp events/local_settings_example.py events/local_settings.py` 1. Modify `events/local_settings.py` with appropriate values for `SECRET_KEY` and `MOLLIE_KEY`. 1. `$ python manage.py migrate` 1. `$ python manage.py createsuperuser` 1. `$ python manage.py runserver` ### System dependencies On Ubuntu, the following packages need to be installed before running `build_env.sh`, - python-dev - python-pycurl - libcurl4-openssl-dev - libmysqlclient-dev Special credits =============== Mathijs Kleijnen: Suggesting the name Dyonisos Jonge Democraten: Supporting development ## Instruction: Add gemnasium dependency status badge ## Code After: [![Dependency Status](https://gemnasium.com/jonge-democraten/dyonisos.svg)](https://gemnasium.com/jonge-democraten/dyonisos) About ===== Dyonisos is a Django based web application that was developed for the Jonge Democraten. The JD organized events with some regularity where guests have to subscribe and sometimes pay for entry. This is what Dyonisos was made for. It should be easy to create a form for an event, easy for guests to subscribe and pay and easy for the organizers of the event to see who is subscribed to what. Quick install ============ 1. `$ ./clean_env.sh` 1. `$ ./build_env.sh` 1. `$ source ./env/bin/activate` 1. `$ cp events/local_settings_example.py events/local_settings.py` 1. Modify `events/local_settings.py` with appropriate values for `SECRET_KEY` and `MOLLIE_KEY`. 1. `$ python manage.py migrate` 1. `$ python manage.py createsuperuser` 1. `$ python manage.py runserver` ### System dependencies On Ubuntu, the following packages need to be installed before running `build_env.sh`, - python-dev - python-pycurl - libcurl4-openssl-dev - libmysqlclient-dev Special credits =============== Mathijs Kleijnen: Suggesting the name Dyonisos Jonge Democraten: Supporting development
+ [![Dependency Status](https://gemnasium.com/jonge-democraten/dyonisos.svg)](https://gemnasium.com/jonge-democraten/dyonisos) About ===== Dyonisos is a Django based web application that was developed for the Jonge Democraten. The JD organized events with some regularity where guests have to subscribe and sometimes pay for entry. This is what Dyonisos was made for. It should be easy to create a form for an event, easy for guests to subscribe and pay and easy for the organizers of the event to see who is subscribed to what. Quick install ============ 1. `$ ./clean_env.sh` 1. `$ ./build_env.sh` 1. `$ source ./env/bin/activate` 1. `$ cp events/local_settings_example.py events/local_settings.py` 1. Modify `events/local_settings.py` with appropriate values for `SECRET_KEY` and `MOLLIE_KEY`. 1. `$ python manage.py migrate` 1. `$ python manage.py createsuperuser` 1. `$ python manage.py runserver` ### System dependencies On Ubuntu, the following packages need to be installed before running `build_env.sh`, - python-dev - python-pycurl - libcurl4-openssl-dev - libmysqlclient-dev Special credits =============== Mathijs Kleijnen: Suggesting the name Dyonisos Jonge Democraten: Supporting development
1
0.030303
1
0
eef628750711b8bb4b08eb5f913b731d76541ab1
shop_catalog/filters.py
shop_catalog/filters.py
from __future__ import unicode_literals from django.contrib.admin import SimpleListFilter from django.utils.translation import ugettext_lazy as _ from shop_catalog.models import Product class ProductParentListFilter(SimpleListFilter): title = _('Parent') parameter_name = 'parent' def lookups(self, request, model_admin): lookups = () for product in Product.objects.all(): if product.is_group: lookups += (product.pk, product.get_name()), return lookups def queryset(self, request, queryset): if self.value(): try: return queryset.get(pk=self.value()).variants.all() except Product.DoesNotExist: pass return queryset
from __future__ import unicode_literals from django.db.models import Q from django.contrib.admin import SimpleListFilter from django.utils.translation import ugettext_lazy as _ from shop_catalog.models import Product class ProductParentListFilter(SimpleListFilter): title = _('Parent') parameter_name = 'parent' def lookups(self, request, model_admin): lookups = () for product in Product.objects.all(): if product.is_group: lookups += (product.pk, product.get_name()), return lookups def queryset(self, request, queryset): if self.value(): queryset = queryset.filter( Q(pk=self.value()) | Q(parent_id=self.value())) return queryset
Modify parent filter to return variants and self
Modify parent filter to return variants and self
Python
bsd-3-clause
dinoperovic/django-shop-catalog,dinoperovic/django-shop-catalog
python
## Code Before: from __future__ import unicode_literals from django.contrib.admin import SimpleListFilter from django.utils.translation import ugettext_lazy as _ from shop_catalog.models import Product class ProductParentListFilter(SimpleListFilter): title = _('Parent') parameter_name = 'parent' def lookups(self, request, model_admin): lookups = () for product in Product.objects.all(): if product.is_group: lookups += (product.pk, product.get_name()), return lookups def queryset(self, request, queryset): if self.value(): try: return queryset.get(pk=self.value()).variants.all() except Product.DoesNotExist: pass return queryset ## Instruction: Modify parent filter to return variants and self ## Code After: from __future__ import unicode_literals from django.db.models import Q from django.contrib.admin import SimpleListFilter from django.utils.translation import ugettext_lazy as _ from shop_catalog.models import Product class ProductParentListFilter(SimpleListFilter): title = _('Parent') parameter_name = 'parent' def lookups(self, request, model_admin): lookups = () for product in Product.objects.all(): if product.is_group: lookups += (product.pk, product.get_name()), return lookups def queryset(self, request, queryset): if self.value(): queryset = queryset.filter( Q(pk=self.value()) | Q(parent_id=self.value())) return queryset
from __future__ import unicode_literals + from django.db.models import Q from django.contrib.admin import SimpleListFilter from django.utils.translation import ugettext_lazy as _ from shop_catalog.models import Product class ProductParentListFilter(SimpleListFilter): title = _('Parent') parameter_name = 'parent' def lookups(self, request, model_admin): lookups = () for product in Product.objects.all(): if product.is_group: lookups += (product.pk, product.get_name()), return lookups def queryset(self, request, queryset): if self.value(): + queryset = queryset.filter( + Q(pk=self.value()) | Q(parent_id=self.value())) + - try: - return queryset.get(pk=self.value()).variants.all() - except Product.DoesNotExist: - pass return queryset
8
0.285714
4
4
d6b4ba2940797aecaf07d56e74514a3ede8640e6
vendor.cmake
vendor.cmake
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(SOURCES ${SOURCES} ${CMAKE_CURRENT_LIST_DIR}/src/plugin.h ${CMAKE_CURRENT_LIST_DIR}/src/core/device.h ${CMAKE_CURRENT_LIST_DIR}/src/core/units.h ${CMAKE_CURRENT_LIST_DIR}/src/plugin.cpp ${CMAKE_CURRENT_LIST_DIR}/src/core/device.cpp ${CMAKE_CURRENT_LIST_DIR}/src/core/units.cpp ${CMAKE_CURRENT_LIST_DIR}/src/material.qrc ${CMAKE_CURRENT_LIST_DIR}/src/components/components.qrc ${CMAKE_CURRENT_LIST_DIR}/src/controls/controls.qrc ${CMAKE_CURRENT_LIST_DIR}/src/core/core.qrc ${CMAKE_CURRENT_LIST_DIR}/src/extras/extras.qrc ${CMAKE_CURRENT_LIST_DIR}/src/listitems/listitems.qrc ${CMAKE_CURRENT_LIST_DIR}/src/popups/popups.qrc ${CMAKE_CURRENT_LIST_DIR}/src/styles/styles.qrc ${CMAKE_CURRENT_LIST_DIR}/src/window/window.qrc ${CMAKE_CURRENT_LIST_DIR}/icons/core_icons.qrc)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(VENDOR_SOURCES ${VENDOR_SOURCES} ${CMAKE_CURRENT_LIST_DIR}/src/plugin.h ${CMAKE_CURRENT_LIST_DIR}/src/core/device.h ${CMAKE_CURRENT_LIST_DIR}/src/core/units.h ${CMAKE_CURRENT_LIST_DIR}/src/plugin.cpp ${CMAKE_CURRENT_LIST_DIR}/src/core/device.cpp ${CMAKE_CURRENT_LIST_DIR}/src/core/units.cpp ${CMAKE_CURRENT_LIST_DIR}/src/material.qrc ${CMAKE_CURRENT_LIST_DIR}/src/components/components.qrc ${CMAKE_CURRENT_LIST_DIR}/src/controls/controls.qrc ${CMAKE_CURRENT_LIST_DIR}/src/core/core.qrc ${CMAKE_CURRENT_LIST_DIR}/src/extras/extras.qrc ${CMAKE_CURRENT_LIST_DIR}/src/listitems/listitems.qrc ${CMAKE_CURRENT_LIST_DIR}/src/popups/popups.qrc ${CMAKE_CURRENT_LIST_DIR}/src/styles/styles.qrc ${CMAKE_CURRENT_LIST_DIR}/src/window/window.qrc ${CMAKE_CURRENT_LIST_DIR}/icons/core_icons.qrc)
Use VENDOR_SOURCES instead of SOURCES
fix(cmake): Use VENDOR_SOURCES instead of SOURCES
CMake
lgpl-2.1
benevo-qml/qml-material,hunt978/qml-material,hunt978/qml-material,papyros/qml-material,benevo-qml/qml-material,papyros/qml-material,benevo-qml/qml-material,papyros/qml-material,hunt978/qml-material,hunt978/qml-material,benevo-qml/qml-material,papyros/qml-material
cmake
## Code Before: set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(SOURCES ${SOURCES} ${CMAKE_CURRENT_LIST_DIR}/src/plugin.h ${CMAKE_CURRENT_LIST_DIR}/src/core/device.h ${CMAKE_CURRENT_LIST_DIR}/src/core/units.h ${CMAKE_CURRENT_LIST_DIR}/src/plugin.cpp ${CMAKE_CURRENT_LIST_DIR}/src/core/device.cpp ${CMAKE_CURRENT_LIST_DIR}/src/core/units.cpp ${CMAKE_CURRENT_LIST_DIR}/src/material.qrc ${CMAKE_CURRENT_LIST_DIR}/src/components/components.qrc ${CMAKE_CURRENT_LIST_DIR}/src/controls/controls.qrc ${CMAKE_CURRENT_LIST_DIR}/src/core/core.qrc ${CMAKE_CURRENT_LIST_DIR}/src/extras/extras.qrc ${CMAKE_CURRENT_LIST_DIR}/src/listitems/listitems.qrc ${CMAKE_CURRENT_LIST_DIR}/src/popups/popups.qrc ${CMAKE_CURRENT_LIST_DIR}/src/styles/styles.qrc ${CMAKE_CURRENT_LIST_DIR}/src/window/window.qrc ${CMAKE_CURRENT_LIST_DIR}/icons/core_icons.qrc) ## Instruction: fix(cmake): Use VENDOR_SOURCES instead of SOURCES ## Code After: set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(VENDOR_SOURCES ${VENDOR_SOURCES} ${CMAKE_CURRENT_LIST_DIR}/src/plugin.h ${CMAKE_CURRENT_LIST_DIR}/src/core/device.h ${CMAKE_CURRENT_LIST_DIR}/src/core/units.h ${CMAKE_CURRENT_LIST_DIR}/src/plugin.cpp ${CMAKE_CURRENT_LIST_DIR}/src/core/device.cpp ${CMAKE_CURRENT_LIST_DIR}/src/core/units.cpp ${CMAKE_CURRENT_LIST_DIR}/src/material.qrc ${CMAKE_CURRENT_LIST_DIR}/src/components/components.qrc ${CMAKE_CURRENT_LIST_DIR}/src/controls/controls.qrc ${CMAKE_CURRENT_LIST_DIR}/src/core/core.qrc ${CMAKE_CURRENT_LIST_DIR}/src/extras/extras.qrc ${CMAKE_CURRENT_LIST_DIR}/src/listitems/listitems.qrc ${CMAKE_CURRENT_LIST_DIR}/src/popups/popups.qrc ${CMAKE_CURRENT_LIST_DIR}/src/styles/styles.qrc ${CMAKE_CURRENT_LIST_DIR}/src/window/window.qrc ${CMAKE_CURRENT_LIST_DIR}/icons/core_icons.qrc)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") - set(SOURCES ${SOURCES} + set(VENDOR_SOURCES ${VENDOR_SOURCES} ? +++++++ +++++++ ${CMAKE_CURRENT_LIST_DIR}/src/plugin.h ${CMAKE_CURRENT_LIST_DIR}/src/core/device.h ${CMAKE_CURRENT_LIST_DIR}/src/core/units.h ${CMAKE_CURRENT_LIST_DIR}/src/plugin.cpp ${CMAKE_CURRENT_LIST_DIR}/src/core/device.cpp ${CMAKE_CURRENT_LIST_DIR}/src/core/units.cpp ${CMAKE_CURRENT_LIST_DIR}/src/material.qrc ${CMAKE_CURRENT_LIST_DIR}/src/components/components.qrc ${CMAKE_CURRENT_LIST_DIR}/src/controls/controls.qrc ${CMAKE_CURRENT_LIST_DIR}/src/core/core.qrc ${CMAKE_CURRENT_LIST_DIR}/src/extras/extras.qrc ${CMAKE_CURRENT_LIST_DIR}/src/listitems/listitems.qrc ${CMAKE_CURRENT_LIST_DIR}/src/popups/popups.qrc ${CMAKE_CURRENT_LIST_DIR}/src/styles/styles.qrc ${CMAKE_CURRENT_LIST_DIR}/src/window/window.qrc ${CMAKE_CURRENT_LIST_DIR}/icons/core_icons.qrc)
2
0.105263
1
1
3dc00e5fdba6c19287142ca807cc381b3363c72c
field_types/core/user/user_cell.rb
field_types/core/user/user_cell.rb
module Cortex module FieldTypes module Core module User class UserCell < FieldCell def dropdown render end private def value if data data['user_id'] || @options[:default_value] else @options[:default_value] end end def render_select_options options = "" @options[:user_data].each do |user_info| options += "<option value='#{user_info[1]}'>#{user_info[0]}</option>" end options.html_safe end end end end end end
module Cortex module FieldTypes module Core module User class UserCell < FieldCell def dropdown render end private def value if data data['user_id'] || @options[:default_value] else @options[:default_value] end end def render_select_options @options[:form].select 'data[user_id]', options_for_select: user_data_for_select, selected: {} end def user_data_for_select @options[:user_data].map{ |user| [user.fullname, user.id] } end end end end end end
Refactor FieldItem New form to no longer use uninstantiated Fields to generate FieldItem form, remove author from ContentItem grids, extract user_data_for_select from ContentItem New view, fix some autoloading issues caused by newline in application config
Refactor FieldItem New form to no longer use uninstantiated Fields to generate FieldItem form, remove author from ContentItem grids, extract user_data_for_select from ContentItem New view, fix some autoloading issues caused by newline in application config
Ruby
apache-2.0
cortex-cms/cortex-plugins-core,cortex-cms/cortex-field_types-core,cortex-cms/cortex-plugins-core,cortex-cms/cortex-field_types-core,cortex-cms/cortex-field_types-core,cortex-cms/cortex-plugins-core
ruby
## Code Before: module Cortex module FieldTypes module Core module User class UserCell < FieldCell def dropdown render end private def value if data data['user_id'] || @options[:default_value] else @options[:default_value] end end def render_select_options options = "" @options[:user_data].each do |user_info| options += "<option value='#{user_info[1]}'>#{user_info[0]}</option>" end options.html_safe end end end end end end ## Instruction: Refactor FieldItem New form to no longer use uninstantiated Fields to generate FieldItem form, remove author from ContentItem grids, extract user_data_for_select from ContentItem New view, fix some autoloading issues caused by newline in application config ## Code After: module Cortex module FieldTypes module Core module User class UserCell < FieldCell def dropdown render end private def value if data data['user_id'] || @options[:default_value] else @options[:default_value] end end def render_select_options @options[:form].select 'data[user_id]', options_for_select: user_data_for_select, selected: {} end def user_data_for_select @options[:user_data].map{ |user| [user.fullname, user.id] } end end end end end end
module Cortex module FieldTypes module Core module User class UserCell < FieldCell - def dropdown render end private def value if data data['user_id'] || @options[:default_value] else @options[:default_value] end end def render_select_options + @options[:form].select 'data[user_id]', options_for_select: user_data_for_select, selected: {} - options = "" - @options[:user_data].each do |user_info| - options += "<option value='#{user_info[1]}'>#{user_info[0]}</option>" - end - options.html_safe end + def user_data_for_select + @options[:user_data].map{ |user| [user.fullname, user.id] } + end end end end end end
10
0.30303
4
6
fe56bc52fe8e310e85e748e6b0e358be3c39b35e
php72-nginx-alpine/etc/php/7.2/php.ini
php72-nginx-alpine/etc/php/7.2/php.ini
apc.enable_cli = 0 date.timezone = Europe/Paris session.auto_start = Off short_open_tag = Off # http://symfony.com/doc/current/performance.html opcache.max_accelerated_files = 20000 realpath_cache_size = 4096K realpath_cache_ttl = 600 memory_limit = 512M post_max_size = 64M upload_max_filesize = 64M expose_php = Off display_errors = On
apc.enable_cli = 0 date.timezone = Europe/Paris session.auto_start = Off # **PREVENTING SESSION FIXATION** # Session ID cannot be passed through URLs session.use_only_cookies = On # Uses a secure connection (HTTPS) if possible session.cookie_secure = On short_open_tag = Off # http://symfony.com/doc/current/performance.html opcache.max_accelerated_files = 20000 realpath_cache_size = 4096K realpath_cache_ttl = 600 memory_limit = 512M post_max_size = 64M upload_max_filesize = 64M expose_php = Off display_errors = On
Enforce secure cookies (requires HTTPS)
Enforce secure cookies (requires HTTPS)
INI
mit
ambroisemaupate/docker
ini
## Code Before: apc.enable_cli = 0 date.timezone = Europe/Paris session.auto_start = Off short_open_tag = Off # http://symfony.com/doc/current/performance.html opcache.max_accelerated_files = 20000 realpath_cache_size = 4096K realpath_cache_ttl = 600 memory_limit = 512M post_max_size = 64M upload_max_filesize = 64M expose_php = Off display_errors = On ## Instruction: Enforce secure cookies (requires HTTPS) ## Code After: apc.enable_cli = 0 date.timezone = Europe/Paris session.auto_start = Off # **PREVENTING SESSION FIXATION** # Session ID cannot be passed through URLs session.use_only_cookies = On # Uses a secure connection (HTTPS) if possible session.cookie_secure = On short_open_tag = Off # http://symfony.com/doc/current/performance.html opcache.max_accelerated_files = 20000 realpath_cache_size = 4096K realpath_cache_ttl = 600 memory_limit = 512M post_max_size = 64M upload_max_filesize = 64M expose_php = Off display_errors = On
apc.enable_cli = 0 date.timezone = Europe/Paris session.auto_start = Off + + # **PREVENTING SESSION FIXATION** + # Session ID cannot be passed through URLs + session.use_only_cookies = On + # Uses a secure connection (HTTPS) if possible + session.cookie_secure = On + short_open_tag = Off # http://symfony.com/doc/current/performance.html opcache.max_accelerated_files = 20000 realpath_cache_size = 4096K realpath_cache_ttl = 600 memory_limit = 512M post_max_size = 64M upload_max_filesize = 64M expose_php = Off display_errors = On
7
0.5
7
0
74d6c37c8bb4e8a7f5e1606ed9655933162d6fb5
src/testing/testing-module.ts
src/testing/testing-module.ts
import * as optional from 'optional'; import { NestContainer } from '@nestjs/core/injector/container'; import { NestModuleMetatype } from '@nestjs/common/interfaces/modules/module-metatype.interface'; import { NestApplication, NestApplicationContext } from '@nestjs/core'; import { INestApplication, INestMicroservice } from '@nestjs/common'; import { MicroserviceConfiguration } from '@nestjs/common/interfaces/microservices/microservice-configuration.interface'; import { MicroservicesPackageNotFoundException } from '@nestjs/core/errors/exceptions/microservices-package-not-found.exception'; const { NestMicroservice } = optional('@nestjs/microservices/nest-microservice') || ({} as any); export class TestingModule extends NestApplicationContext { constructor( container: NestContainer, scope: NestModuleMetatype[], contextModule, ) { super(container, scope, contextModule); } public createNestApplication(express?): INestApplication { return new NestApplication(this.container, express); } public createNestMicroservice( config: MicroserviceConfiguration, ): INestMicroservice { if (!NestMicroservice) { throw new MicroservicesPackageNotFoundException(); } return new NestMicroservice(this.container, config); } }
import * as express from 'express'; import * as optional from 'optional'; import { NestContainer } from '@nestjs/core/injector/container'; import { NestModuleMetatype } from '@nestjs/common/interfaces/modules/module-metatype.interface'; import { NestApplication, NestApplicationContext } from '@nestjs/core'; import { INestApplication, INestMicroservice } from '@nestjs/common'; import { MicroserviceConfiguration } from '@nestjs/common/interfaces/microservices/microservice-configuration.interface'; import { MicroservicesPackageNotFoundException } from '@nestjs/core/errors/exceptions/microservices-package-not-found.exception'; const { NestMicroservice } = optional('@nestjs/microservices/nest-microservice') || ({} as any); export class TestingModule extends NestApplicationContext { constructor( container: NestContainer, scope: NestModuleMetatype[], contextModule, ) { super(container, scope, contextModule); } public createNestApplication(express = express()): INestApplication { return new NestApplication(this.container, express); } public createNestMicroservice( config: MicroserviceConfiguration, ): INestMicroservice { if (!NestMicroservice) { throw new MicroservicesPackageNotFoundException(); } return new NestMicroservice(this.container, config); } }
Create express server if not provided in testing
Create express server if not provided in testing
TypeScript
mit
kamilmysliwiec/nest,kamilmysliwiec/nest
typescript
## Code Before: import * as optional from 'optional'; import { NestContainer } from '@nestjs/core/injector/container'; import { NestModuleMetatype } from '@nestjs/common/interfaces/modules/module-metatype.interface'; import { NestApplication, NestApplicationContext } from '@nestjs/core'; import { INestApplication, INestMicroservice } from '@nestjs/common'; import { MicroserviceConfiguration } from '@nestjs/common/interfaces/microservices/microservice-configuration.interface'; import { MicroservicesPackageNotFoundException } from '@nestjs/core/errors/exceptions/microservices-package-not-found.exception'; const { NestMicroservice } = optional('@nestjs/microservices/nest-microservice') || ({} as any); export class TestingModule extends NestApplicationContext { constructor( container: NestContainer, scope: NestModuleMetatype[], contextModule, ) { super(container, scope, contextModule); } public createNestApplication(express?): INestApplication { return new NestApplication(this.container, express); } public createNestMicroservice( config: MicroserviceConfiguration, ): INestMicroservice { if (!NestMicroservice) { throw new MicroservicesPackageNotFoundException(); } return new NestMicroservice(this.container, config); } } ## Instruction: Create express server if not provided in testing ## Code After: import * as express from 'express'; import * as optional from 'optional'; import { NestContainer } from '@nestjs/core/injector/container'; import { NestModuleMetatype } from '@nestjs/common/interfaces/modules/module-metatype.interface'; import { NestApplication, NestApplicationContext } from '@nestjs/core'; import { INestApplication, INestMicroservice } from '@nestjs/common'; import { MicroserviceConfiguration } from '@nestjs/common/interfaces/microservices/microservice-configuration.interface'; import { MicroservicesPackageNotFoundException } from '@nestjs/core/errors/exceptions/microservices-package-not-found.exception'; const { NestMicroservice } = optional('@nestjs/microservices/nest-microservice') || ({} as any); export class TestingModule extends NestApplicationContext { constructor( container: NestContainer, scope: NestModuleMetatype[], contextModule, ) { super(container, scope, contextModule); } public createNestApplication(express = express()): INestApplication { return new NestApplication(this.container, express); } public createNestMicroservice( config: MicroserviceConfiguration, ): INestMicroservice { if (!NestMicroservice) { throw new MicroservicesPackageNotFoundException(); } return new NestMicroservice(this.container, config); } }
+ import * as express from 'express'; import * as optional from 'optional'; import { NestContainer } from '@nestjs/core/injector/container'; import { NestModuleMetatype } from '@nestjs/common/interfaces/modules/module-metatype.interface'; import { NestApplication, NestApplicationContext } from '@nestjs/core'; import { INestApplication, INestMicroservice } from '@nestjs/common'; import { MicroserviceConfiguration } from '@nestjs/common/interfaces/microservices/microservice-configuration.interface'; import { MicroservicesPackageNotFoundException } from '@nestjs/core/errors/exceptions/microservices-package-not-found.exception'; const { NestMicroservice } = optional('@nestjs/microservices/nest-microservice') || ({} as any); export class TestingModule extends NestApplicationContext { constructor( container: NestContainer, scope: NestModuleMetatype[], contextModule, ) { super(container, scope, contextModule); } - public createNestApplication(express?): INestApplication { ? ^ + public createNestApplication(express = express()): INestApplication { ? ^^^^^^^^^^^^ return new NestApplication(this.container, express); } public createNestMicroservice( config: MicroserviceConfiguration, ): INestMicroservice { if (!NestMicroservice) { throw new MicroservicesPackageNotFoundException(); } return new NestMicroservice(this.container, config); } }
3
0.090909
2
1
cee8a5a202b92034cf04ef6021d652967d6d1100
lib/rails_admin/config/fields/types/bson_object_id.rb
lib/rails_admin/config/fields/types/bson_object_id.rb
require 'rails_admin/config/fields/types/string' begin require 'mongoid' rescue LoadError => e puts "[RailsAdmin] #{e.message}" end module RailsAdmin module Config module Fields module Types class BsonObjectId < RailsAdmin::Config::Fields::Types::String # Register field type for the type loader RailsAdmin::Config::Fields::Types.register(self) OBJECT_ID ||= begin if defined?(Moped::BSON) Moped::BSON::ObjectId elsif defined?(BSON::ObjectId) BSON::ObjectId end end register_instance_option :label do label = ((@label ||= {})[::I18n.locale] ||= abstract_model.model.human_attribute_name name) label = 'Id' if label == '' label end def generic_help 'BSON::ObjectId' end register_instance_option :read_only do true end register_instance_option :sort_reverse? do serial? end def parse_value(value) value.present? ? OBJECT_ID.from_string(value) : nil rescue BSON::ObjectId::Invalid nil rescue => e unless ['BSON::InvalidObjectId', 'Moped::Errors::InvalidObjectId'].include? e.class.to_s raise e end end def parse_input(params) params[name] = parse_value(params[name]) if params[name].is_a?(::String) end end end end end end
require 'rails_admin/config/fields/types/string' module RailsAdmin module Config module Fields module Types class BsonObjectId < RailsAdmin::Config::Fields::Types::String # Register field type for the type loader RailsAdmin::Config::Fields::Types.register(self) OBJECT_ID ||= begin if defined?(Moped::BSON) Moped::BSON::ObjectId elsif defined?(BSON::ObjectId) BSON::ObjectId end end register_instance_option :label do label = ((@label ||= {})[::I18n.locale] ||= abstract_model.model.human_attribute_name name) label = 'Id' if label == '' label end def generic_help 'BSON::ObjectId' end register_instance_option :read_only do true end register_instance_option :sort_reverse? do serial? end def parse_value(value) value.present? ? OBJECT_ID.from_string(value) : nil rescue BSON::ObjectId::Invalid nil rescue => e unless ['BSON::InvalidObjectId', 'Moped::Errors::InvalidObjectId'].include? e.class.to_s raise e end end def parse_input(params) params[name] = parse_value(params[name]) if params[name].is_a?(::String) end end end end end end
Remove useless require mongoid directive
Remove useless require mongoid directive
Ruby
mit
hut8/rails_admin,voyera/rails_admin,lokalebasen/rails_admin,soupmatt/rails_admin,jasnow/rails_admin,engel/rails_admin,rayzhng/rails_admin,aliada-mx/rails_admin,sferik/rails_admin,dmilisic/rails_admin,cob3/rails_admin,widgetworks/rails_admin,dmitrypol/rails_admin,glooko/rails_admin,GeorgeZhukov/rails_admin,patleb/admineer,sferik/rails_admin,LevoLeague/rails_admin,sogilis/rails_admin,LevoLeague/rails_admin,lokalebasen/rails_admin,allori/rails_admin,patleb/admineer,ipmobiletech/rails_admin,zambot/rails_admin,ipmobiletech/rails_admin,DonCuponesInternet/rails_admin,DonCuponesInternet/rails_admin,igorkasyanchuk/rails_admin,soupmatt/rails_admin,dmitrypol/rails_admin,corbt/rails_admin,corbt/rails_admin,ombulabs/rails_admin,rayzhng/rails_admin,lokalebasen/rails_admin,LevoLeague/rails_admin,jasnow/rails_admin,aliada-mx/rails_admin,Balaraju/rails_admin,rayzhng/rails_admin,glooko/rails_admin,patleb/admineer,dalpo/rails_admin,VoroninNick/rails_admin_sigma,dalpo/rails_admin,VoroninNick/rails_admin_sigma,JailtonSampaio/annotations_clone_rails_admin,arturbrasil/rails_admin,DonCuponesInternet/rails_admin,wkirschbaum/rails_admin,corbt/rails_admin,jasnow/rails_admin,laurelandwolf/rails_admin,johanneskrtek/rails_admin,markprzepiora-forks/rails_admin,aliada-mx/rails_admin,cob3/rails_admin,impurist/rails_admin,sortlist/rails_admin,widgetworks/rails_admin,hut8/rails_admin,aquajach/rails_admin,hut8/rails_admin,laurelandwolf/rails_admin,dmitrypol/rails_admin,sogilis/rails_admin,engel/rails_admin,ombulabs/rails_admin,impurist/rails_admin,cob3/rails_admin,sortlist/rails_admin,sferik/rails_admin,engel/rails_admin,Balaraju/rails_admin,vincentwoo/rails_admin,rubiety/rails_admin,Versanity/ruby,laurelandwolf/rails_admin,dalpo/rails_admin,arturbrasil/rails_admin,vanbumi/rails_admin,JailtonSampaio/annotations_clone_rails_admin,ipmobiletech/rails_admin,vanbumi/rails_admin,vincentwoo/rails_admin,igorkasyanchuk/rails_admin,Versanity/ruby,igorkasyanchuk/rails_admin,sogilis/rails_admin,diowa/rails_admin,allori/rails_admin,wkirschbaum/rails_admin,ombulabs/rails_admin,rubiety/rails_admin,soupmatt/rails_admin,rubiety/rails_admin,diowa/rails_admin,zambot/rails_admin,zambot/rails_admin,dmilisic/rails_admin,dmilisic/rails_admin,aquajach/rails_admin,Balaraju/rails_admin,diowa/rails_admin,markprzepiora-forks/rails_admin,aquajach/rails_admin,vanbumi/rails_admin,GeorgeZhukov/rails_admin,arturbrasil/rails_admin,allori/rails_admin,glooko/rails_admin,impurist/rails_admin,vincentwoo/rails_admin,VoroninNick/rails_admin_sigma,sortlist/rails_admin,voyera/rails_admin,markprzepiora-forks/rails_admin,widgetworks/rails_admin,Versanity/ruby,johanneskrtek/rails_admin,wkirschbaum/rails_admin,voyera/rails_admin,johanneskrtek/rails_admin,GeorgeZhukov/rails_admin,JailtonSampaio/annotations_clone_rails_admin
ruby
## Code Before: require 'rails_admin/config/fields/types/string' begin require 'mongoid' rescue LoadError => e puts "[RailsAdmin] #{e.message}" end module RailsAdmin module Config module Fields module Types class BsonObjectId < RailsAdmin::Config::Fields::Types::String # Register field type for the type loader RailsAdmin::Config::Fields::Types.register(self) OBJECT_ID ||= begin if defined?(Moped::BSON) Moped::BSON::ObjectId elsif defined?(BSON::ObjectId) BSON::ObjectId end end register_instance_option :label do label = ((@label ||= {})[::I18n.locale] ||= abstract_model.model.human_attribute_name name) label = 'Id' if label == '' label end def generic_help 'BSON::ObjectId' end register_instance_option :read_only do true end register_instance_option :sort_reverse? do serial? end def parse_value(value) value.present? ? OBJECT_ID.from_string(value) : nil rescue BSON::ObjectId::Invalid nil rescue => e unless ['BSON::InvalidObjectId', 'Moped::Errors::InvalidObjectId'].include? e.class.to_s raise e end end def parse_input(params) params[name] = parse_value(params[name]) if params[name].is_a?(::String) end end end end end end ## Instruction: Remove useless require mongoid directive ## Code After: require 'rails_admin/config/fields/types/string' module RailsAdmin module Config module Fields module Types class BsonObjectId < RailsAdmin::Config::Fields::Types::String # Register field type for the type loader RailsAdmin::Config::Fields::Types.register(self) OBJECT_ID ||= begin if defined?(Moped::BSON) Moped::BSON::ObjectId elsif defined?(BSON::ObjectId) BSON::ObjectId end end register_instance_option :label do label = ((@label ||= {})[::I18n.locale] ||= abstract_model.model.human_attribute_name name) label = 'Id' if label == '' label end def generic_help 'BSON::ObjectId' end register_instance_option :read_only do true end register_instance_option :sort_reverse? do serial? end def parse_value(value) value.present? ? OBJECT_ID.from_string(value) : nil rescue BSON::ObjectId::Invalid nil rescue => e unless ['BSON::InvalidObjectId', 'Moped::Errors::InvalidObjectId'].include? e.class.to_s raise e end end def parse_input(params) params[name] = parse_value(params[name]) if params[name].is_a?(::String) end end end end end end
require 'rails_admin/config/fields/types/string' - begin - require 'mongoid' - rescue LoadError => e - puts "[RailsAdmin] #{e.message}" - end module RailsAdmin module Config module Fields module Types class BsonObjectId < RailsAdmin::Config::Fields::Types::String # Register field type for the type loader RailsAdmin::Config::Fields::Types.register(self) OBJECT_ID ||= begin if defined?(Moped::BSON) Moped::BSON::ObjectId elsif defined?(BSON::ObjectId) BSON::ObjectId end end register_instance_option :label do label = ((@label ||= {})[::I18n.locale] ||= abstract_model.model.human_attribute_name name) label = 'Id' if label == '' label end def generic_help 'BSON::ObjectId' end register_instance_option :read_only do true end register_instance_option :sort_reverse? do serial? end def parse_value(value) value.present? ? OBJECT_ID.from_string(value) : nil rescue BSON::ObjectId::Invalid nil rescue => e unless ['BSON::InvalidObjectId', 'Moped::Errors::InvalidObjectId'].include? e.class.to_s raise e end end def parse_input(params) params[name] = parse_value(params[name]) if params[name].is_a?(::String) end end end end end end
5
0.084746
0
5
101d5e8af93e5800917c7335d552ee9356b13b67
sample/spec/spec_helper.rb
sample/spec/spec_helper.rb
ENV["RAILS_ENV"] ||= 'test' require File.expand_path("../dummy/config/environment", __FILE__) require 'rspec/rails' require 'ffaker' RSpec.configure do |config| config.color = true config.mock_with :rspec # If you're not using ActiveRecord, or you'd prefer not to run each of your # examples within a transaction, comment the following line or assign false # instead of true. config.use_transactional_fixtures = true config.include FactoryGirl::Syntax::Methods config.fail_fast = ENV['FAIL_FAST'] || false end
ENV["RAILS_ENV"] ||= 'test' require File.expand_path("../dummy/config/environment", __FILE__) require 'rspec/rails' require 'ffaker' require 'spree_sample' RSpec.configure do |config| config.color = true config.mock_with :rspec # If you're not using ActiveRecord, or you'd prefer not to run each of your # examples within a transaction, comment the following line or assign false # instead of true. config.use_transactional_fixtures = true config.include FactoryGirl::Syntax::Methods config.fail_fast = ENV['FAIL_FAST'] || false end
Add require spree_sample to spec helper to prevent failure when running build.sh.
Add require spree_sample to spec helper to prevent failure when running build.sh.
Ruby
bsd-3-clause
cutefrank/spree,caiqinghua/spree,firman/spree,useiichi/spree,Migweld/spree,mindvolt/spree,groundctrl/spree,NerdsvilleCEO/spree,ramkumar-kr/spree,degica/spree,yiqing95/spree,rakibulislam/spree,net2b/spree,urimikhli/spree,nooysters/spree,piousbox/spree,rajeevriitm/spree,ujai/spree,shioyama/spree,radarseesradar/spree,azranel/spree,Arpsara/solidus,dotandbo/spree,ahmetabdi/spree,yushine/spree,scottcrawford03/solidus,njerrywerry/spree,bjornlinder/Spree,patdec/spree,alvinjean/spree,LBRapid/spree,carlesjove/spree,reidblomquist/spree,athal7/solidus,siddharth28/spree,agient/agientstorefront,locomotivapro/spree,Engeltj/spree,jordan-brough/spree,locomotivapro/spree,robodisco/spree,beni55/spree,sunny2601/spree,sunny2601/spree,devilcoders/solidus,edgward/spree,Migweld/spree,Nevensoft/spree,yushine/spree,archSeer/spree,abhishekjain16/spree,lsirivong/spree,bonobos/solidus,welitonfreitas/spree,jaspreet21anand/spree,raow/spree,vmatekole/spree,azclick/spree,KMikhaylovCTG/spree,tesserakt/clean_spree,SadTreeFriends/spree,shaywood2/spree,imella/spree,DarkoP/spree,freerunningtech/spree,jeffboulet/spree,forkata/solidus,adaddeo/spree,radarseesradar/spree,Migweld/spree,Senjai/solidus,lyzxsc/spree,madetech/spree,trigrass2/spree,shekibobo/spree,wolfieorama/spree,progsri/spree,berkes/spree,Mayvenn/spree,vmatekole/spree,jparr/spree,jordan-brough/solidus,yiqing95/spree,project-eutopia/spree,CJMrozek/spree,Lostmyname/spree,KMikhaylovCTG/spree,TrialGuides/spree,edgward/spree,Boomkat/spree,kewaunited/spree,project-eutopia/spree,wolfieorama/spree,keatonrow/spree,sideci-sample/sideci-sample-spree,reinaris/spree,builtbybuffalo/spree,cutefrank/spree,lsirivong/spree,lyzxsc/spree,keatonrow/spree,delphsoft/spree-store-ballchair,welitonfreitas/spree,fahidnasir/spree,grzlus/spree,quentinuys/spree,maybii/spree,jasonfb/spree,ahmetabdi/spree,jasonfb/spree,softr8/spree,net2b/spree,moneyspyder/spree,jspizziri/spree,wolfieorama/spree,miyazawatomoka/spree,robodisco/spree,vmatekole/spree,TimurTarasenko/spree,madetech/spree,yomishra/pce,vinsol/spree,calvinl/spree,jsurdilla/solidus,locomotivapro/spree,Arpsara/solidus,Machpowersystems/spree_mach,Engeltj/spree,orenf/spree,priyank-gupta/spree,nooysters/spree,CJMrozek/spree,Mayvenn/spree,camelmasa/spree,DynamoMTL/spree,dafontaine/spree,assembledbrands/spree,reinaris/spree,urimikhli/spree,dandanwei/spree,moneyspyder/spree,rbngzlv/spree,vinayvinsol/spree,vinsol/spree,joanblake/spree,pulkit21/spree,njerrywerry/spree,radarseesradar/spree,karlitxo/spree,sfcgeorge/spree,grzlus/spree,jordan-brough/solidus,rbngzlv/spree,richardnuno/solidus,CiscoCloud/spree,JDutil/spree,hoanghiep90/spree,CiscoCloud/spree,ckk-scratch/solidus,joanblake/spree,freerunningtech/spree,reidblomquist/spree,lsirivong/solidus,omarsar/spree,surfdome/spree,devilcoders/solidus,tancnle/spree,PhoenixTeam/spree_phoenix,derekluo/spree,priyank-gupta/spree,vulk/spree,mleglise/spree,rajeevriitm/spree,FadliKun/spree,DarkoP/spree,sunny2601/spree,tesserakt/clean_spree,calvinl/spree,kewaunited/spree,JDutil/spree,Senjai/solidus,volpejoaquin/spree,ahmetabdi/spree,derekluo/spree,dandanwei/spree,vinsol/spree,volpejoaquin/spree,brchristian/spree,SadTreeFriends/spree,progsri/spree,reidblomquist/spree,karlitxo/spree,pervino/spree,dotandbo/spree,thogg4/spree,azranel/spree,brchristian/spree,tailic/spree,AgilTec/spree,locomotivapro/spree,jspizziri/spree,dandanwei/spree,kewaunited/spree,degica/spree,shaywood2/spree,orenf/spree,berkes/spree,firman/spree,agient/agientstorefront,piousbox/spree,beni55/spree,omarsar/spree,gautamsawhney/spree,thogg4/spree,tailic/spree,vinayvinsol/spree,APohio/spree,patdec/spree,alejandromangione/spree,builtbybuffalo/spree,sliaquat/spree,bonobos/solidus,ramkumar-kr/spree,alejandromangione/spree,tomash/spree,zaeznet/spree,cutefrank/spree,net2b/spree,Hates/spree,yiqing95/spree,delphsoft/spree-store-ballchair,maybii/spree,tesserakt/clean_spree,useiichi/spree,Hawaiideveloper/shoppingcart,jimblesm/spree,adaddeo/spree,watg/spree,gregoryrikson/spree-sample,tailic/spree,bricesanchez/spree,keatonrow/spree,woboinc/spree,agient/agientstorefront,Kagetsuki/spree,grzlus/solidus,ramkumar-kr/spree,odk211/spree,pervino/spree,NerdsvilleCEO/spree,zaeznet/spree,DynamoMTL/spree,volpejoaquin/spree,ujai/spree,athal7/solidus,odk211/spree,knuepwebdev/FloatTubeRodHolders,patdec/spree,ckk-scratch/solidus,jhawthorn/spree,Ropeney/spree,pervino/spree,tesserakt/clean_spree,TimurTarasenko/spree,biagidp/spree,adaddeo/spree,softr8/spree,edgward/spree,CiscoCloud/spree,FadliKun/spree,watg/spree,pervino/spree,Boomkat/spree,miyazawatomoka/spree,xuewenfei/solidus,Boomkat/spree,lsirivong/solidus,berkes/spree,jsurdilla/solidus,ckk-scratch/solidus,beni55/spree,rakibulislam/spree,yiqing95/spree,richardnuno/solidus,athal7/solidus,jaspreet21anand/spree,bricesanchez/spree,sfcgeorge/spree,jordan-brough/spree,grzlus/solidus,archSeer/spree,reidblomquist/spree,useiichi/spree,Senjai/solidus,grzlus/spree,Hates/spree,azclick/spree,njerrywerry/spree,wolfieorama/spree,beni55/spree,progsri/spree,net2b/spree,JDutil/spree,moneyspyder/spree,azclick/spree,piousbox/spree,jspizziri/spree,TrialGuides/spree,sideci-sample/sideci-sample-spree,dotandbo/spree,dotandbo/spree,dafontaine/spree,siddharth28/spree,forkata/solidus,lsirivong/solidus,Senjai/spree,camelmasa/spree,imella/spree,bonobos/solidus,Migweld/spree,vulk/spree,RatioClothing/spree,cutefrank/spree,freerunningtech/spree,carlesjove/spree,volpejoaquin/spree,gautamsawhney/spree,alepore/spree,ayb/spree,jimblesm/spree,xuewenfei/solidus,radarseesradar/spree,KMikhaylovCTG/spree,ujai/spree,vcavallo/spree,Nevensoft/spree,shekibobo/spree,hifly/spree,welitonfreitas/spree,softr8/spree,azranel/spree,tomash/spree,JuandGirald/spree,devilcoders/solidus,KMikhaylovCTG/spree,nooysters/spree,madetech/spree,jspizziri/spree,softr8/spree,jordan-brough/solidus,mindvolt/spree,scottcrawford03/solidus,Ropeney/spree,urimikhli/spree,vulk/spree,Machpowersystems/spree_mach,imella/spree,xuewenfei/solidus,groundctrl/spree,fahidnasir/spree,jparr/spree,Hawaiideveloper/shoppingcart,maybii/spree,siddharth28/spree,alvinjean/spree,FadliKun/spree,assembledbrands/spree,edgward/spree,piousbox/spree,miyazawatomoka/spree,DarkoP/spree,welitonfreitas/spree,trigrass2/spree,Senjai/spree,bjornlinder/Spree,JuandGirald/spree,rajeevriitm/spree,scottcrawford03/solidus,TrialGuides/spree,brchristian/spree,alvinjean/spree,zamiang/spree,dafontaine/spree,odk211/spree,joanblake/spree,sideci-sample/sideci-sample-spree,caiqinghua/spree,Hates/spree,LBRapid/spree,bjornlinder/Spree,RatioClothing/spree,DarkoP/spree,Lostmyname/spree,yomishra/pce,grzlus/solidus,yushine/spree,SadTreeFriends/spree,kitwalker12/spree,sfcgeorge/spree,CJMrozek/spree,quentinuys/spree,Arpsara/solidus,abhishekjain16/spree,builtbybuffalo/spree,vinayvinsol/spree,LBRapid/spree,forkata/solidus,Kagetsuki/spree,hoanghiep90/spree,gregoryrikson/spree-sample,fahidnasir/spree,Ropeney/spree,Boomkat/spree,njerrywerry/spree,watg/spree,richardnuno/solidus,jsurdilla/solidus,alvinjean/spree,rajeevriitm/spree,woboinc/spree,hoanghiep90/spree,Lostmyname/spree,carlesjove/spree,Kagetsuki/spree,jhawthorn/spree,dafontaine/spree,jaspreet21anand/spree,Hawaiideveloper/shoppingcart,Nevensoft/spree,moneyspyder/spree,brchristian/spree,TimurTarasenko/spree,quentinuys/spree,adaddeo/spree,vcavallo/spree,tancnle/spree,fahidnasir/spree,Hates/spree,FadliKun/spree,Ropeney/spree,rbngzlv/spree,camelmasa/spree,jhawthorn/spree,sfcgeorge/spree,alejandromangione/spree,lyzxsc/spree,shioyama/spree,gregoryrikson/spree-sample,maybii/spree,yomishra/pce,hoanghiep90/spree,useiichi/spree,keatonrow/spree,lsirivong/spree,APohio/spree,Kagetsuki/spree,jimblesm/spree,mleglise/spree,NerdsvilleCEO/spree,pervino/solidus,jaspreet21anand/spree,vinsol/spree,Senjai/solidus,xuewenfei/solidus,Engeltj/spree,grzlus/solidus,alejandromangione/spree,ahmetabdi/spree,Hawaiideveloper/shoppingcart,surfdome/spree,madetech/spree,surfdome/spree,project-eutopia/spree,PhoenixTeam/spree_phoenix,hifly/spree,ayb/spree,archSeer/spree,berkes/spree,Mayvenn/spree,groundctrl/spree,mindvolt/spree,devilcoders/solidus,vcavallo/spree,DynamoMTL/spree,JDutil/spree,ayb/spree,sliaquat/spree,shioyama/spree,bricesanchez/spree,jeffboulet/spree,sunny2601/spree,shekibobo/spree,builtbybuffalo/spree,zamiang/spree,JuandGirald/spree,Machpowersystems/spree_mach,ckk-scratch/solidus,scottcrawford03/solidus,groundctrl/spree,pulkit21/spree,tancnle/spree,Nevensoft/spree,mleglise/spree,thogg4/spree,forkata/solidus,Arpsara/solidus,jasonfb/spree,azclick/spree,knuepwebdev/FloatTubeRodHolders,jordan-brough/solidus,pulkit21/spree,PhoenixTeam/spree_phoenix,shaywood2/spree,sliaquat/spree,woboinc/spree,thogg4/spree,zaeznet/spree,AgilTec/spree,delphsoft/spree-store-ballchair,richardnuno/solidus,patdec/spree,rakibulislam/spree,odk211/spree,tomash/spree,kitwalker12/spree,pjmj777/spree,robodisco/spree,abhishekjain16/spree,miyazawatomoka/spree,vcavallo/spree,CiscoCloud/spree,Engeltj/spree,priyank-gupta/spree,yushine/spree,progsri/spree,zaeznet/spree,pervino/solidus,JuandGirald/spree,orenf/spree,StemboltHQ/spree,vmatekole/spree,jeffboulet/spree,jparr/spree,firman/spree,pulkit21/spree,zamiang/spree,jasonfb/spree,athal7/solidus,Mayvenn/spree,alepore/spree,calvinl/spree,alepore/spree,lsirivong/solidus,Lostmyname/spree,siddharth28/spree,DynamoMTL/spree,archSeer/spree,zamiang/spree,TimurTarasenko/spree,rbngzlv/spree,hifly/spree,pjmj777/spree,trigrass2/spree,vinayvinsol/spree,azranel/spree,raow/spree,TrialGuides/spree,ayb/spree,agient/agientstorefront,orenf/spree,gregoryrikson/spree-sample,surfdome/spree,assembledbrands/spree,camelmasa/spree,nooysters/spree,biagidp/spree,StemboltHQ/spree,StemboltHQ/spree,abhishekjain16/spree,jimblesm/spree,sliaquat/spree,reinaris/spree,reinaris/spree,NerdsvilleCEO/spree,raow/spree,AgilTec/spree,rakibulislam/spree,omarsar/spree,PhoenixTeam/spree_phoenix,robodisco/spree,hifly/spree,dandanwei/spree,caiqinghua/spree,jeffboulet/spree,degica/spree,pjmj777/spree,shekibobo/spree,joanblake/spree,quentinuys/spree,carlesjove/spree,pervino/solidus,ramkumar-kr/spree,RatioClothing/spree,kewaunited/spree,derekluo/spree,project-eutopia/spree,derekluo/spree,gautamsawhney/spree,jordan-brough/spree,tomash/spree,priyank-gupta/spree,bonobos/solidus,tancnle/spree,pervino/solidus,SadTreeFriends/spree,APohio/spree,APohio/spree,lsirivong/spree,delphsoft/spree-store-ballchair,mindvolt/spree,caiqinghua/spree,knuepwebdev/FloatTubeRodHolders,karlitxo/spree,trigrass2/spree,firman/spree,raow/spree,gautamsawhney/spree,grzlus/spree,mleglise/spree,lyzxsc/spree,Senjai/spree,AgilTec/spree,kitwalker12/spree,karlitxo/spree,omarsar/spree,jparr/spree,calvinl/spree,CJMrozek/spree,jsurdilla/solidus,biagidp/spree,vulk/spree,shaywood2/spree
ruby
## Code Before: ENV["RAILS_ENV"] ||= 'test' require File.expand_path("../dummy/config/environment", __FILE__) require 'rspec/rails' require 'ffaker' RSpec.configure do |config| config.color = true config.mock_with :rspec # If you're not using ActiveRecord, or you'd prefer not to run each of your # examples within a transaction, comment the following line or assign false # instead of true. config.use_transactional_fixtures = true config.include FactoryGirl::Syntax::Methods config.fail_fast = ENV['FAIL_FAST'] || false end ## Instruction: Add require spree_sample to spec helper to prevent failure when running build.sh. ## Code After: ENV["RAILS_ENV"] ||= 'test' require File.expand_path("../dummy/config/environment", __FILE__) require 'rspec/rails' require 'ffaker' require 'spree_sample' RSpec.configure do |config| config.color = true config.mock_with :rspec # If you're not using ActiveRecord, or you'd prefer not to run each of your # examples within a transaction, comment the following line or assign false # instead of true. config.use_transactional_fixtures = true config.include FactoryGirl::Syntax::Methods config.fail_fast = ENV['FAIL_FAST'] || false end
ENV["RAILS_ENV"] ||= 'test' require File.expand_path("../dummy/config/environment", __FILE__) require 'rspec/rails' require 'ffaker' + require 'spree_sample' RSpec.configure do |config| config.color = true config.mock_with :rspec # If you're not using ActiveRecord, or you'd prefer not to run each of your # examples within a transaction, comment the following line or assign false # instead of true. config.use_transactional_fixtures = true config.include FactoryGirl::Syntax::Methods config.fail_fast = ENV['FAIL_FAST'] || false end
1
0.058824
1
0
ed5d15cca2c9e6869c665b66d7a8545aa78b82dc
errors.js
errors.js
'use strict'; var util = require('util'); /** * Generic Primus error. * * @constructor * @param {String} message The reason for the error * @param {EventEmitter} logger Optional EventEmitter to emit a `log` event on. * @api public */ function PrimusError(message, logger) { Error.call(this); Error.captureStackTrace(this, this.constructor); this.message = message; this.name = this.constructor.name; if (logger) { logger.emit('log', 'error', this); } } util.inherits(PrimusError, Error); /** * There was an error while parsing incoming or outgoing data. * * @param {String} message The reason for the error. * @param {Spark} spark The spark that caused the error. * @api public */ function ParserError(message, spark) { Error.call(this); Error.captureStackTrace(this, this.constructor); this.message = message; this.name = this.constructor.name; if (spark) { if (spark.listeners('error').length) spark.emit('error', this); spark.primus.emit('log', 'error', this); } } util.inherits(ParserError, Error); // // Expose our custom events. // exports.PrimusError = PrimusError; exports.ParserError = ParserError;
'use strict'; var util = require('util'); /** * Generic Primus error. * * @constructor * @param {String} message The reason for the error * @param {EventEmitter} logger Optional EventEmitter to emit a `log` event on. * @api public */ function PrimusError(message, logger) { Error.captureStackTrace(this, this.constructor); this.message = message; this.name = this.constructor.name; if (logger) { logger.emit('log', 'error', this); } } util.inherits(PrimusError, Error); /** * There was an error while parsing incoming or outgoing data. * * @param {String} message The reason for the error. * @param {Spark} spark The spark that caused the error. * @api public */ function ParserError(message, spark) { Error.captureStackTrace(this, this.constructor); this.message = message; this.name = this.constructor.name; if (spark) { if (spark.listeners('error').length) spark.emit('error', this); spark.primus.emit('log', 'error', this); } } util.inherits(ParserError, Error); // // Expose our custom events. // exports.PrimusError = PrimusError; exports.ParserError = ParserError;
Remove useless calls to `Error` constructor
[minor] Remove useless calls to `Error` constructor
JavaScript
mit
primus/primus,primus/primus,STRML/primus,STRML/primus,primus/primus,STRML/primus
javascript
## Code Before: 'use strict'; var util = require('util'); /** * Generic Primus error. * * @constructor * @param {String} message The reason for the error * @param {EventEmitter} logger Optional EventEmitter to emit a `log` event on. * @api public */ function PrimusError(message, logger) { Error.call(this); Error.captureStackTrace(this, this.constructor); this.message = message; this.name = this.constructor.name; if (logger) { logger.emit('log', 'error', this); } } util.inherits(PrimusError, Error); /** * There was an error while parsing incoming or outgoing data. * * @param {String} message The reason for the error. * @param {Spark} spark The spark that caused the error. * @api public */ function ParserError(message, spark) { Error.call(this); Error.captureStackTrace(this, this.constructor); this.message = message; this.name = this.constructor.name; if (spark) { if (spark.listeners('error').length) spark.emit('error', this); spark.primus.emit('log', 'error', this); } } util.inherits(ParserError, Error); // // Expose our custom events. // exports.PrimusError = PrimusError; exports.ParserError = ParserError; ## Instruction: [minor] Remove useless calls to `Error` constructor ## Code After: 'use strict'; var util = require('util'); /** * Generic Primus error. * * @constructor * @param {String} message The reason for the error * @param {EventEmitter} logger Optional EventEmitter to emit a `log` event on. * @api public */ function PrimusError(message, logger) { Error.captureStackTrace(this, this.constructor); this.message = message; this.name = this.constructor.name; if (logger) { logger.emit('log', 'error', this); } } util.inherits(PrimusError, Error); /** * There was an error while parsing incoming or outgoing data. * * @param {String} message The reason for the error. * @param {Spark} spark The spark that caused the error. * @api public */ function ParserError(message, spark) { Error.captureStackTrace(this, this.constructor); this.message = message; this.name = this.constructor.name; if (spark) { if (spark.listeners('error').length) spark.emit('error', this); spark.primus.emit('log', 'error', this); } } util.inherits(ParserError, Error); // // Expose our custom events. // exports.PrimusError = PrimusError; exports.ParserError = ParserError;
'use strict'; var util = require('util'); /** * Generic Primus error. * * @constructor * @param {String} message The reason for the error * @param {EventEmitter} logger Optional EventEmitter to emit a `log` event on. * @api public */ function PrimusError(message, logger) { - Error.call(this); Error.captureStackTrace(this, this.constructor); this.message = message; this.name = this.constructor.name; if (logger) { logger.emit('log', 'error', this); } } util.inherits(PrimusError, Error); /** * There was an error while parsing incoming or outgoing data. * * @param {String} message The reason for the error. * @param {Spark} spark The spark that caused the error. * @api public */ function ParserError(message, spark) { - Error.call(this); Error.captureStackTrace(this, this.constructor); this.message = message; this.name = this.constructor.name; if (spark) { if (spark.listeners('error').length) spark.emit('error', this); spark.primus.emit('log', 'error', this); } } util.inherits(ParserError, Error); // // Expose our custom events. // exports.PrimusError = PrimusError; exports.ParserError = ParserError;
2
0.037736
0
2
0dac6fe88a0c361854fa059502dea2f63f0c3384
test/liquid/i18n_test.rb
test/liquid/i18n_test.rb
require 'test_helper' class I18nTest < Test::Unit::TestCase include Liquid def setup @i18n = I18n.new("./test/fixtures/en_locale.yml") end def test_simple_translate_string assert_equal "less is more", @i18n.translate("simple") end def test_nested_translate_string assert_equal "something wasn't right", @i18n.translate("errors.syntax.oops") end def test_single_string_interpolation assert_equal "something different", @i18n.translate("whatever", :something => "different") end def test_raises_keyerror_on_undefined_interpolation_key assert_raise I18n::TranslationError do @i18n.translate("whatever", :oopstypos => "yes") end end def test_raises_unknown_translation assert_raise I18n::TranslationError do @i18n.translate("doesnt_exist") end end end
require 'test_helper' class I18nTest < Test::Unit::TestCase include Liquid def en_locale_path File.join(File.expand_path(File.dirname(__FILE__)), "..", "fixtures", "en_locale.yml") end def setup @i18n = I18n.new en_locale_path end def test_simple_translate_string assert_equal "less is more", @i18n.translate("simple") end def test_nested_translate_string assert_equal "something wasn't right", @i18n.translate("errors.syntax.oops") end def test_single_string_interpolation assert_equal "something different", @i18n.translate("whatever", :something => "different") end def test_raises_keyerror_on_undefined_interpolation_key assert_raise I18n::TranslationError do @i18n.translate("whatever", :oopstypos => "yes") end end def test_raises_unknown_translation assert_raise I18n::TranslationError do @i18n.translate("doesnt_exist") end end end
Change to absolute path in localization test
Change to absolute path in localization test
Ruby
mit
tim-vandecasteele/liquid,xiaoliw7/liquid,Wirachmat/liquid,Richardphp/liquid,insales/liquid,howkj1/liquid,Shopify/liquid,PMArtz92/liquid,bettyblocks/liquid,boobooninja/liquid,locomotivecms/liquid,bibio/liquid,ilovezy/liquid,mcary/liquid,siteleaf/liquid,tdg5/liquid,ipmobiletech/Shopify-liquid,zhangkuaiji/liquid,Tiger66639/liquid,SOFTPOWER1991/liquid,knu/liquid,lastobelus/liquid,vietlq/liquid,bluerail/liquid,sideci-sample/sideci-sample-liquid,illMadeKnight/liquid-1,evulse/liquid,mrmanc/liquid,djreimer/liquid
ruby
## Code Before: require 'test_helper' class I18nTest < Test::Unit::TestCase include Liquid def setup @i18n = I18n.new("./test/fixtures/en_locale.yml") end def test_simple_translate_string assert_equal "less is more", @i18n.translate("simple") end def test_nested_translate_string assert_equal "something wasn't right", @i18n.translate("errors.syntax.oops") end def test_single_string_interpolation assert_equal "something different", @i18n.translate("whatever", :something => "different") end def test_raises_keyerror_on_undefined_interpolation_key assert_raise I18n::TranslationError do @i18n.translate("whatever", :oopstypos => "yes") end end def test_raises_unknown_translation assert_raise I18n::TranslationError do @i18n.translate("doesnt_exist") end end end ## Instruction: Change to absolute path in localization test ## Code After: require 'test_helper' class I18nTest < Test::Unit::TestCase include Liquid def en_locale_path File.join(File.expand_path(File.dirname(__FILE__)), "..", "fixtures", "en_locale.yml") end def setup @i18n = I18n.new en_locale_path end def test_simple_translate_string assert_equal "less is more", @i18n.translate("simple") end def test_nested_translate_string assert_equal "something wasn't right", @i18n.translate("errors.syntax.oops") end def test_single_string_interpolation assert_equal "something different", @i18n.translate("whatever", :something => "different") end def test_raises_keyerror_on_undefined_interpolation_key assert_raise I18n::TranslationError do @i18n.translate("whatever", :oopstypos => "yes") end end def test_raises_unknown_translation assert_raise I18n::TranslationError do @i18n.translate("doesnt_exist") end end end
require 'test_helper' class I18nTest < Test::Unit::TestCase include Liquid + def en_locale_path + File.join(File.expand_path(File.dirname(__FILE__)), "..", "fixtures", "en_locale.yml") + end + def setup - @i18n = I18n.new("./test/fixtures/en_locale.yml") + @i18n = I18n.new en_locale_path end def test_simple_translate_string assert_equal "less is more", @i18n.translate("simple") end def test_nested_translate_string assert_equal "something wasn't right", @i18n.translate("errors.syntax.oops") end def test_single_string_interpolation assert_equal "something different", @i18n.translate("whatever", :something => "different") end def test_raises_keyerror_on_undefined_interpolation_key assert_raise I18n::TranslationError do @i18n.translate("whatever", :oopstypos => "yes") end end def test_raises_unknown_translation assert_raise I18n::TranslationError do @i18n.translate("doesnt_exist") end end end
6
0.181818
5
1
0cecc65ff84a6fdcb4063dab48081d1120e825fa
.travis.yml
.travis.yml
language: java sudo: false install: true jdk: - oraclejdk8 script: - "./gradlew clean build jacocoTestReport" after_success: - bash <(curl -s https://codecov.io/bash) deploy: provider: openshift user: $OPENSHIFT_USER password: secure: $OPENSHIFT_PASSWORD app: kotlinmicroservice domain: $OPENSHIFT_DOMAIN on: repo: fcostaa/kotlin-microservice cache: directories: - $HOME/.gradle
language: java sudo: false install: true jdk: - oraclejdk8 script: - "./gradlew clean build jacocoTestReport" after_success: - bash <(curl -s https://codecov.io/bash) deploy: provider: openshift user: felipe.h.j.costa@gmail.com password: secure: mm3bB0X7oPzesnJ2AgYDi6jMSQkpoEQsiZQJ6/B3LUysWOu1CQPUOXsJCoLhVhhAFqqZA10TNk4fs88CQSR3nUuXvqosxok+VgmFTghxqan0oBgaEjtZMAB6wevsPuAohTAEFu3PXlIHKO55iALXB1feXFlllMqZIbx9W/mv9r5d3UrAKJVLX3mUxiyIMqbZxd0IwhdvHB7p7w3qR4rQc8cyCupeg64PW26cM7l8TVlY40hDbsRRulWwsCHdFWuR+dxZ0jn4993foAMKNCEoge21E8NI7dSrHs8N62k0rNz9CT0lkuwmaygzI/9dhUzCXraZqlEp1z5LcoVhTpkwju189BW4mzfGIreaEwyZgNh/S3a+tk6zUovEloTf2Z9PvBHW9fPLiOxenM4xi2RYp8VlNH2EtAjEpe6TMAJtOCvf8k5h0blfDg9lZSW16w+H13nk90w2JqDISSoXVDscSw16W5UYpoHJb3RCsFhk3nTIpwUnkSGZubAj3V9qN3d4vMMUuWBFPayVvy2dA4BOzNkAxM0nVGmnEWI7hs8P3m+Zql78TbCYRKffAdrRq9I+E7QJzh7JUCFll2eY2gDnxFC2hx7Ureb+8GxEyluKxA+sdq7ES4WKy5SZYoCiWBlBz9zYmLxvnJPIYU39sYRTp03MVZ+xmv6pRzyMp36UNXs= app: kotlinmicroservice domain: fcosta on: repo: fcostaa/kotlin-microservice cache: directories: - $HOME/.gradle
Revert "Move some deploy keys to Travis"
Revert "Move some deploy keys to Travis" This reverts commit bf95c864140144c50d7b9cb34b1363adfffbb1c4.
YAML
mit
fcostaa/kotlin-microservice,fcostaa/kotlin-microservice,fcostaa/kotlin-microservice
yaml
## Code Before: language: java sudo: false install: true jdk: - oraclejdk8 script: - "./gradlew clean build jacocoTestReport" after_success: - bash <(curl -s https://codecov.io/bash) deploy: provider: openshift user: $OPENSHIFT_USER password: secure: $OPENSHIFT_PASSWORD app: kotlinmicroservice domain: $OPENSHIFT_DOMAIN on: repo: fcostaa/kotlin-microservice cache: directories: - $HOME/.gradle ## Instruction: Revert "Move some deploy keys to Travis" This reverts commit bf95c864140144c50d7b9cb34b1363adfffbb1c4. ## Code After: language: java sudo: false install: true jdk: - oraclejdk8 script: - "./gradlew clean build jacocoTestReport" after_success: - bash <(curl -s https://codecov.io/bash) deploy: provider: openshift user: felipe.h.j.costa@gmail.com password: secure: mm3bB0X7oPzesnJ2AgYDi6jMSQkpoEQsiZQJ6/B3LUysWOu1CQPUOXsJCoLhVhhAFqqZA10TNk4fs88CQSR3nUuXvqosxok+VgmFTghxqan0oBgaEjtZMAB6wevsPuAohTAEFu3PXlIHKO55iALXB1feXFlllMqZIbx9W/mv9r5d3UrAKJVLX3mUxiyIMqbZxd0IwhdvHB7p7w3qR4rQc8cyCupeg64PW26cM7l8TVlY40hDbsRRulWwsCHdFWuR+dxZ0jn4993foAMKNCEoge21E8NI7dSrHs8N62k0rNz9CT0lkuwmaygzI/9dhUzCXraZqlEp1z5LcoVhTpkwju189BW4mzfGIreaEwyZgNh/S3a+tk6zUovEloTf2Z9PvBHW9fPLiOxenM4xi2RYp8VlNH2EtAjEpe6TMAJtOCvf8k5h0blfDg9lZSW16w+H13nk90w2JqDISSoXVDscSw16W5UYpoHJb3RCsFhk3nTIpwUnkSGZubAj3V9qN3d4vMMUuWBFPayVvy2dA4BOzNkAxM0nVGmnEWI7hs8P3m+Zql78TbCYRKffAdrRq9I+E7QJzh7JUCFll2eY2gDnxFC2hx7Ureb+8GxEyluKxA+sdq7ES4WKy5SZYoCiWBlBz9zYmLxvnJPIYU39sYRTp03MVZ+xmv6pRzyMp36UNXs= app: kotlinmicroservice domain: fcosta on: repo: fcostaa/kotlin-microservice cache: directories: - $HOME/.gradle
language: java sudo: false install: true jdk: - oraclejdk8 script: - "./gradlew clean build jacocoTestReport" after_success: - bash <(curl -s https://codecov.io/bash) deploy: provider: openshift - user: $OPENSHIFT_USER + user: felipe.h.j.costa@gmail.com password: - secure: $OPENSHIFT_PASSWORD + secure: mm3bB0X7oPzesnJ2AgYDi6jMSQkpoEQsiZQJ6/B3LUysWOu1CQPUOXsJCoLhVhhAFqqZA10TNk4fs88CQSR3nUuXvqosxok+VgmFTghxqan0oBgaEjtZMAB6wevsPuAohTAEFu3PXlIHKO55iALXB1feXFlllMqZIbx9W/mv9r5d3UrAKJVLX3mUxiyIMqbZxd0IwhdvHB7p7w3qR4rQc8cyCupeg64PW26cM7l8TVlY40hDbsRRulWwsCHdFWuR+dxZ0jn4993foAMKNCEoge21E8NI7dSrHs8N62k0rNz9CT0lkuwmaygzI/9dhUzCXraZqlEp1z5LcoVhTpkwju189BW4mzfGIreaEwyZgNh/S3a+tk6zUovEloTf2Z9PvBHW9fPLiOxenM4xi2RYp8VlNH2EtAjEpe6TMAJtOCvf8k5h0blfDg9lZSW16w+H13nk90w2JqDISSoXVDscSw16W5UYpoHJb3RCsFhk3nTIpwUnkSGZubAj3V9qN3d4vMMUuWBFPayVvy2dA4BOzNkAxM0nVGmnEWI7hs8P3m+Zql78TbCYRKffAdrRq9I+E7QJzh7JUCFll2eY2gDnxFC2hx7Ureb+8GxEyluKxA+sdq7ES4WKy5SZYoCiWBlBz9zYmLxvnJPIYU39sYRTp03MVZ+xmv6pRzyMp36UNXs= app: kotlinmicroservice - domain: $OPENSHIFT_DOMAIN + domain: fcosta on: repo: fcostaa/kotlin-microservice cache: directories: - $HOME/.gradle
6
0.214286
3
3
9d759bc8f7980ad4fa9707b2d6425ceac616460a
backend/post_handler/__init__.py
backend/post_handler/__init__.py
from flask import Flask app = Flask(__name__) @app.route("/", methods=["GET", "POST"]) def hello(): from flask import request # print dir(request) print request.values print request.form.get('sdp') return 'ok' if __name__ == "__main__": app.run('0.0.0.0')
from flask import Flask app = Flask(__name__) @app.route("/", methods=["GET", "POST"]) def hello(): from flask import request # print dir(request) # print request.values sdp_headers = request.form.get('sdp') with open('./stream.sdp', 'w') as f: f.write(sdp_headers) cmd = "ffmpeg -i stream.sdp -vcodec libx264 -acodec aac -strict -2 -y ~/tmp/out.mp4 &" import os # os.spawnl(os.P_DETACH, cmd) os.system(cmd) return 'ok' if __name__ == "__main__": app.run('0.0.0.0')
Add handling of incoming requests to post_handler
Add handling of incoming requests to post_handler
Python
mit
optimus-team/optimus-video,optimus-team/optimus-video,optimus-team/optimus-video,optimus-team/optimus-video
python
## Code Before: from flask import Flask app = Flask(__name__) @app.route("/", methods=["GET", "POST"]) def hello(): from flask import request # print dir(request) print request.values print request.form.get('sdp') return 'ok' if __name__ == "__main__": app.run('0.0.0.0') ## Instruction: Add handling of incoming requests to post_handler ## Code After: from flask import Flask app = Flask(__name__) @app.route("/", methods=["GET", "POST"]) def hello(): from flask import request # print dir(request) # print request.values sdp_headers = request.form.get('sdp') with open('./stream.sdp', 'w') as f: f.write(sdp_headers) cmd = "ffmpeg -i stream.sdp -vcodec libx264 -acodec aac -strict -2 -y ~/tmp/out.mp4 &" import os # os.spawnl(os.P_DETACH, cmd) os.system(cmd) return 'ok' if __name__ == "__main__": app.run('0.0.0.0')
from flask import Flask app = Flask(__name__) @app.route("/", methods=["GET", "POST"]) def hello(): from flask import request # print dir(request) - print request.values + # print request.values ? +++ - print request.form.get('sdp') ? ^^^ + sdp_headers = request.form.get('sdp') ? ++ ++++++ ^^^ + + with open('./stream.sdp', 'w') as f: + f.write(sdp_headers) + cmd = "ffmpeg -i stream.sdp -vcodec libx264 -acodec aac -strict -2 -y ~/tmp/out.mp4 &" + import os + # os.spawnl(os.P_DETACH, cmd) + os.system(cmd) + return 'ok' if __name__ == "__main__": app.run('0.0.0.0')
12
0.857143
10
2
4767ab2a1741dedfd3da2be96104b309f54215e3
.travis.yml
.travis.yml
before_install: - gem install bundler before_script: - "sh -e /etc/init.d/xvfb start" - "bundle exec rake test_app" env: - DB=sqlite - DB=mysql - DB=postgres script: - "export DISPLAY=:99.0" - "alias set_gemfile='export BUNDLE_GEMFILE=\"`pwd`/Gemfile\"'" - "cd api; set_gemfile; bundle install --quiet; bundle exec rspec spec" - "cd ../core; set_gemfile; bundle install --quiet; bundle exec rspec spec" - "cd ../dash; set_gemfile; bundle install --quiet; bundle exec rspec spec" - "cd ../promo; set_gemfile; bundle install --quiet; bundle exec rspec spec" notifications: email: - ryan@spreecommerce.com irc: use_notice: true skip_join: true channels: - "irc.freenode.org#spree" rvm: - 1.9.3 - 2.0.0 matrix: allow_failures: - rvm: 2.0.0
before_script: - "sh -e /etc/init.d/xvfb start" - "bundle exec rake test_app" env: - DB=sqlite - DB=mysql - DB=postgres script: - "export DISPLAY=:99.0" - "alias set_gemfile='export BUNDLE_GEMFILE=\"`pwd`/Gemfile\"'" - "cd api; set_gemfile; bundle install --quiet; bundle exec rspec spec" - "cd ../core; set_gemfile; bundle install --quiet; bundle exec rspec spec" - "cd ../dash; set_gemfile; bundle install --quiet; bundle exec rspec spec" - "cd ../promo; set_gemfile; bundle install --quiet; bundle exec rspec spec" notifications: email: - ryan@spreecommerce.com irc: use_notice: true skip_join: true channels: - "irc.freenode.org#spree" rvm: - 1.9.3
Revert "Now Travis has officially supported Ruby 2.0.0, time to give it a test drive"
Revert "Now Travis has officially supported Ruby 2.0.0, time to give it a test drive" I am feeling very lame now, turns out Spree Travis worker boxes doesn't run latest VM in which RVM is bumped to latest. This reverts commit 3f0228ed88d5cb9a3f9f131382fa85497c92b1ce.
YAML
bsd-3-clause
miyazawatomoka/spree,raow/spree,omarsar/spree,robodisco/spree,tailic/spree,berkes/spree,assembledbrands/spree,locomotivapro/spree,tailic/spree,Hawaiideveloper/shoppingcart,DynamoMTL/spree,JDutil/spree,lsirivong/spree,vmatekole/spree,dafontaine/spree,progsri/spree,pervino/spree,dandanwei/spree,locomotivapro/spree,vmatekole/spree,vinsol/spree,LBRapid/spree,dandanwei/spree,jspizziri/spree,archSeer/spree,piousbox/spree,karlitxo/spree,TrialGuides/spree,caiqinghua/spree,rakibulislam/spree,Lostmyname/spree,miyazawatomoka/spree,jordan-brough/spree,edgward/spree,scottcrawford03/solidus,kitwalker12/spree,Lostmyname/spree,tancnle/spree,vcavallo/spree,xuewenfei/solidus,volpejoaquin/spree,shioyama/spree,assembledbrands/spree,FadliKun/spree,reinaris/spree,alepore/spree,karlitxo/spree,trigrass2/spree,grzlus/spree,sfcgeorge/spree,xuewenfei/solidus,Kagetsuki/spree,woboinc/spree,gregoryrikson/spree-sample,lsirivong/solidus,CJMrozek/spree,vinayvinsol/spree,DarkoP/spree,orenf/spree,sfcgeorge/spree,adaddeo/spree,jaspreet21anand/spree,tancnle/spree,LBRapid/spree,yiqing95/spree,moneyspyder/spree,Antdesk/karpal-spree,delphsoft/spree-store-ballchair,jparr/spree,rbngzlv/spree,builtbybuffalo/spree,alepore/spree,mleglise/spree,softr8/spree,jimblesm/spree,richardnuno/solidus,AgilTec/spree,Boomkat/spree,volpejoaquin/spree,shioyama/spree,Migweld/spree,groundctrl/spree,lyzxsc/spree,codesavvy/sandbox,NerdsvilleCEO/spree,project-eutopia/spree,nooysters/spree,dandanwei/spree,shaywood2/spree,pervino/spree,net2b/spree,AgilTec/spree,Kagetsuki/spree,Engeltj/spree,vcavallo/spree,bjornlinder/Spree,yomishra/pce,jparr/spree,jasonfb/spree,kitwalker12/spree,odk211/spree,SadTreeFriends/spree,bricesanchez/spree,lsirivong/solidus,carlesjove/spree,watg/spree,codesavvy/sandbox,ujai/spree,tesserakt/clean_spree,builtbybuffalo/spree,Engeltj/spree,gautamsawhney/spree,reinaris/spree,Machpowersystems/spree_mach,dotandbo/spree,mindvolt/spree,adaddeo/spree,CiscoCloud/spree,woboinc/spree,Arpsara/solidus,bonobos/solidus,Engeltj/spree,DarkoP/spree,TimurTarasenko/spree,knuepwebdev/FloatTubeRodHolders,rajeevriitm/spree,Lostmyname/spree,knuepwebdev/FloatTubeRodHolders,firman/spree,agient/agientstorefront,ayb/spree,surfdome/spree,zamiang/spree,lzcabrera/spree-1-3-stable,Hawaiideveloper/shoppingcart,jsurdilla/solidus,zaeznet/spree,zaeznet/spree,vinayvinsol/spree,pervino/solidus,KMikhaylovCTG/spree,tancnle/spree,reidblomquist/spree,volpejoaquin/spree,net2b/spree,SadTreeFriends/spree,lyzxsc/spree,abhishekjain16/spree,softr8/spree,alvinjean/spree,beni55/spree,reinaris/spree,siddharth28/spree,locomotivapro/spree,devilcoders/solidus,bjornlinder/Spree,carlesjove/spree,adaddeo/spree,Hawaiideveloper/shoppingcart,JuandGirald/spree,mleglise/spree,cutefrank/spree,mindvolt/spree,trigrass2/spree,orenf/spree,Nevensoft/spree,shekibobo/spree,jeffboulet/spree,rbngzlv/spree,biagidp/spree,Migweld/spree,judaro13/spree-fork,biagidp/spree,sideci-sample/sideci-sample-spree,Machpowersystems/spree_mach,ahmetabdi/spree,DynamoMTL/spree,sideci-sample/sideci-sample-spree,urimikhli/spree,softr8/spree,brchristian/spree,PhoenixTeam/spree_phoenix,edgward/spree,jimblesm/spree,radarseesradar/spree,JDutil/spree,Boomkat/spree,JuandGirald/spree,quentinuys/spree,trigrass2/spree,scottcrawford03/solidus,berkes/spree,yiqing95/spree,CiscoCloud/spree,Machpowersystems/spree_mach,progsri/spree,dafontaine/spree,CJMrozek/spree,ckk-scratch/solidus,mindvolt/spree,useiichi/spree,gautamsawhney/spree,welitonfreitas/spree,jaspreet21anand/spree,lsirivong/spree,Hawaiideveloper/shoppingcart,dafontaine/spree,raow/spree,devilcoders/solidus,hifly/spree,madetech/spree,agient/agientstorefront,Ropeney/spree,patdec/spree,knuepwebdev/FloatTubeRodHolders,odk211/spree,wolfieorama/spree,joanblake/spree,mleglise/spree,azclick/spree,JDutil/spree,keatonrow/spree,project-eutopia/spree,rbngzlv/spree,volpejoaquin/spree,progsri/spree,rakibulislam/spree,delphsoft/spree-store-ballchair,Antdesk/karpal-spree,Antdesk/karpal-spree,radarseesradar/spree,gautamsawhney/spree,mleglise/spree,beni55/spree,sunny2601/spree,jhawthorn/spree,shekibobo/spree,kewaunited/spree,alejandromangione/spree,azranel/spree,Ropeney/spree,TrialGuides/spree,degica/spree,pulkit21/spree,urimikhli/spree,priyank-gupta/spree,LBRapid/spree,DynamoMTL/spree,rakibulislam/spree,Senjai/solidus,njerrywerry/spree,Lostmyname/spree,vcavallo/spree,karlitxo/spree,dandanwei/spree,delphsoft/spree-store-ballchair,dotandbo/spree,athal7/solidus,welitonfreitas/spree,delphsoft/spree-store-ballchair,gregoryrikson/spree-sample,degica/spree,patdec/spree,pulkit21/spree,welitonfreitas/spree,maybii/spree,vcavallo/spree,vinayvinsol/spree,TrialGuides/spree,azclick/spree,Senjai/solidus,joanblake/spree,vulk/spree,vulk/spree,forkata/solidus,beni55/spree,kewaunited/spree,Arpsara/solidus,Senjai/spree,builtbybuffalo/spree,brchristian/spree,joanblake/spree,ujai/spree,calvinl/spree,Nevensoft/spree,reidblomquist/spree,hoanghiep90/spree,groundctrl/spree,net2b/spree,edgward/spree,rakibulislam/spree,lsirivong/spree,vulk/spree,zamiang/spree,jordan-brough/solidus,RatioClothing/spree,orenf/spree,jordan-brough/spree,surfdome/spree,jimblesm/spree,alvinjean/spree,Hates/spree,madetech/spree,sfcgeorge/spree,radarseesradar/spree,camelmasa/spree,gregoryrikson/spree-sample,abhishekjain16/spree,lsirivong/spree,watg/spree,TimurTarasenko/spree,keatonrow/spree,abhishekjain16/spree,vmatekole/spree,alvinjean/spree,thogg4/spree,HealthWave/spree,caiqinghua/spree,robodisco/spree,quentinuys/spree,gautamsawhney/spree,hifly/spree,pjmj777/spree,orenf/spree,azclick/spree,yushine/spree,priyank-gupta/spree,azranel/spree,jimblesm/spree,DarkoP/spree,pervino/spree,keatonrow/spree,quentinuys/spree,ckk-scratch/solidus,jasonfb/spree,Ropeney/spree,APohio/spree,alejandromangione/spree,biagidp/spree,surfdome/spree,project-eutopia/spree,assembledbrands/spree,SadTreeFriends/spree,reidblomquist/spree,grzlus/solidus,derekluo/spree,ayb/spree,yomishra/pce,jspizziri/spree,softr8/spree,forkata/solidus,judaro13/spree-fork,FadliKun/spree,thogg4/spree,abhishekjain16/spree,judaro13/spree-fork,fahidnasir/spree,tancnle/spree,athal7/solidus,Boomkat/spree,jeffboulet/spree,rajeevriitm/spree,adaddeo/spree,watg/spree,lzcabrera/spree-1-3-stable,nooysters/spree,Hates/spree,ramkumar-kr/spree,jasonfb/spree,progsri/spree,jsurdilla/solidus,sliaquat/spree,shekibobo/spree,jeffboulet/spree,tomash/spree,grzlus/solidus,omarsar/spree,zamiang/spree,rbngzlv/spree,StemboltHQ/spree,sliaquat/spree,tailic/spree,wolfieorama/spree,calvinl/spree,codesavvy/sandbox,zaeznet/spree,jaspreet21anand/spree,sunny2601/spree,Senjai/spree,cutefrank/spree,omarsar/spree,carlesjove/spree,priyank-gupta/spree,sliaquat/spree,forkata/solidus,athal7/solidus,pervino/solidus,agient/agientstorefront,odk211/spree,firman/spree,jparr/spree,madetech/spree,pjmj777/spree,richardnuno/solidus,Nevensoft/spree,Migweld/spree,priyank-gupta/spree,bricesanchez/spree,athal7/solidus,PhoenixTeam/spree_phoenix,wolfieorama/spree,Nevensoft/spree,raow/spree,jordan-brough/solidus,kitwalker12/spree,alejandromangione/spree,joanblake/spree,rajeevriitm/spree,jordan-brough/solidus,shekibobo/spree,camelmasa/spree,nooysters/spree,scottcrawford03/solidus,yushine/spree,ramkumar-kr/spree,shaywood2/spree,TimurTarasenko/spree,kewaunited/spree,caiqinghua/spree,jsurdilla/solidus,grzlus/solidus,jhawthorn/spree,alepore/spree,derekluo/spree,Arpsara/solidus,StemboltHQ/spree,lyzxsc/spree,CJMrozek/spree,bonobos/solidus,beni55/spree,Engeltj/spree,omarsar/spree,Senjai/solidus,derekluo/spree,scottcrawford03/solidus,Mayvenn/spree,ahmetabdi/spree,imella/spree,project-eutopia/spree,Kagetsuki/spree,siddharth28/spree,lyzxsc/spree,pulkit21/spree,carlesjove/spree,ckk-scratch/solidus,yiqing95/spree,zamiang/spree,devilcoders/solidus,HealthWave/spree,jaspreet21anand/spree,vinsol/spree,pervino/spree,moneyspyder/spree,raow/spree,useiichi/spree,surfdome/spree,tesserakt/clean_spree,richardnuno/solidus,JuandGirald/spree,urimikhli/spree,patdec/spree,FadliKun/spree,KMikhaylovCTG/spree,Boomkat/spree,alejandromangione/spree,sideci-sample/sideci-sample-spree,maybii/spree,gregoryrikson/spree-sample,jhawthorn/spree,hoanghiep90/spree,SadTreeFriends/spree,HealthWave/spree,sunny2601/spree,devilcoders/solidus,sunny2601/spree,camelmasa/spree,maybii/spree,archSeer/spree,Hates/spree,nooysters/spree,groundctrl/spree,woboinc/spree,TrialGuides/spree,firman/spree,vmatekole/spree,bonobos/solidus,DarkoP/spree,AgilTec/spree,Kagetsuki/spree,reidblomquist/spree,tesserakt/clean_spree,rajeevriitm/spree,yiqing95/spree,vinsol/spree,jsurdilla/solidus,berkes/spree,piousbox/spree,Mayvenn/spree,vinayvinsol/spree,njerrywerry/spree,brchristian/spree,miyazawatomoka/spree,grzlus/spree,reinaris/spree,jspizziri/spree,pervino/solidus,Mayvenn/spree,cutefrank/spree,azclick/spree,mindvolt/spree,radarseesradar/spree,lzcabrera/spree-1-3-stable,calvinl/spree,patdec/spree,sliaquat/spree,dafontaine/spree,hoanghiep90/spree,robodisco/spree,shioyama/spree,azranel/spree,quentinuys/spree,groundctrl/spree,Hates/spree,freerunningtech/spree,moneyspyder/spree,lsirivong/solidus,pjmj777/spree,ayb/spree,ujai/spree,JDutil/spree,jeffboulet/spree,pervino/solidus,camelmasa/spree,yomishra/pce,builtbybuffalo/spree,CiscoCloud/spree,PhoenixTeam/spree_phoenix,fahidnasir/spree,tesserakt/clean_spree,AgilTec/spree,ahmetabdi/spree,useiichi/spree,bonobos/solidus,APohio/spree,APohio/spree,Migweld/spree,KMikhaylovCTG/spree,TimurTarasenko/spree,ramkumar-kr/spree,freerunningtech/spree,hifly/spree,jasonfb/spree,azranel/spree,thogg4/spree,NerdsvilleCEO/spree,njerrywerry/spree,hoanghiep90/spree,grzlus/solidus,derekluo/spree,robodisco/spree,RatioClothing/spree,calvinl/spree,degica/spree,brchristian/spree,grzlus/spree,StemboltHQ/spree,miyazawatomoka/spree,imella/spree,welitonfreitas/spree,piousbox/spree,moneyspyder/spree,njerrywerry/spree,ahmetabdi/spree,wolfieorama/spree,Mayvenn/spree,ayb/spree,shaywood2/spree,bricesanchez/spree,Ropeney/spree,xuewenfei/solidus,useiichi/spree,tomash/spree,firman/spree,vulk/spree,trigrass2/spree,codesavvy/sandbox,xuewenfei/solidus,ramkumar-kr/spree,ckk-scratch/solidus,APohio/spree,jordan-brough/solidus,maybii/spree,piousbox/spree,jspizziri/spree,jordan-brough/spree,cutefrank/spree,dotandbo/spree,NerdsvilleCEO/spree,caiqinghua/spree,tomash/spree,archSeer/spree,Arpsara/solidus,fahidnasir/spree,NerdsvilleCEO/spree,vinsol/spree,Senjai/solidus,shaywood2/spree,FadliKun/spree,yushine/spree,agient/agientstorefront,archSeer/spree,zaeznet/spree,RatioClothing/spree,lsirivong/solidus,kewaunited/spree,berkes/spree,hifly/spree,CJMrozek/spree,siddharth28/spree,PhoenixTeam/spree_phoenix,tomash/spree,forkata/solidus,keatonrow/spree,thogg4/spree,JuandGirald/spree,bjornlinder/Spree,Senjai/spree,madetech/spree,karlitxo/spree,odk211/spree,siddharth28/spree,sfcgeorge/spree,KMikhaylovCTG/spree,edgward/spree,alvinjean/spree,imella/spree,fahidnasir/spree,locomotivapro/spree,pulkit21/spree,freerunningtech/spree,richardnuno/solidus,DynamoMTL/spree,dotandbo/spree,jparr/spree,grzlus/spree,yushine/spree,CiscoCloud/spree,net2b/spree
yaml
## Code Before: before_install: - gem install bundler before_script: - "sh -e /etc/init.d/xvfb start" - "bundle exec rake test_app" env: - DB=sqlite - DB=mysql - DB=postgres script: - "export DISPLAY=:99.0" - "alias set_gemfile='export BUNDLE_GEMFILE=\"`pwd`/Gemfile\"'" - "cd api; set_gemfile; bundle install --quiet; bundle exec rspec spec" - "cd ../core; set_gemfile; bundle install --quiet; bundle exec rspec spec" - "cd ../dash; set_gemfile; bundle install --quiet; bundle exec rspec spec" - "cd ../promo; set_gemfile; bundle install --quiet; bundle exec rspec spec" notifications: email: - ryan@spreecommerce.com irc: use_notice: true skip_join: true channels: - "irc.freenode.org#spree" rvm: - 1.9.3 - 2.0.0 matrix: allow_failures: - rvm: 2.0.0 ## Instruction: Revert "Now Travis has officially supported Ruby 2.0.0, time to give it a test drive" I am feeling very lame now, turns out Spree Travis worker boxes doesn't run latest VM in which RVM is bumped to latest. This reverts commit 3f0228ed88d5cb9a3f9f131382fa85497c92b1ce. ## Code After: before_script: - "sh -e /etc/init.d/xvfb start" - "bundle exec rake test_app" env: - DB=sqlite - DB=mysql - DB=postgres script: - "export DISPLAY=:99.0" - "alias set_gemfile='export BUNDLE_GEMFILE=\"`pwd`/Gemfile\"'" - "cd api; set_gemfile; bundle install --quiet; bundle exec rspec spec" - "cd ../core; set_gemfile; bundle install --quiet; bundle exec rspec spec" - "cd ../dash; set_gemfile; bundle install --quiet; bundle exec rspec spec" - "cd ../promo; set_gemfile; bundle install --quiet; bundle exec rspec spec" notifications: email: - ryan@spreecommerce.com irc: use_notice: true skip_join: true channels: - "irc.freenode.org#spree" rvm: - 1.9.3
- before_install: - - gem install bundler before_script: - "sh -e /etc/init.d/xvfb start" - "bundle exec rake test_app" env: - DB=sqlite - DB=mysql - DB=postgres script: - "export DISPLAY=:99.0" - "alias set_gemfile='export BUNDLE_GEMFILE=\"`pwd`/Gemfile\"'" - "cd api; set_gemfile; bundle install --quiet; bundle exec rspec spec" - "cd ../core; set_gemfile; bundle install --quiet; bundle exec rspec spec" - "cd ../dash; set_gemfile; bundle install --quiet; bundle exec rspec spec" - "cd ../promo; set_gemfile; bundle install --quiet; bundle exec rspec spec" + notifications: email: - ryan@spreecommerce.com irc: use_notice: true skip_join: true channels: - "irc.freenode.org#spree" rvm: - 1.9.3 - - 2.0.0 - matrix: - allow_failures: - - rvm: 2.0.0
7
0.233333
1
6
b260f27e0176f2615236e78e06c8af045f5b0680
scripts/build.js
scripts/build.js
const buildBaseCss = require(`./_build-base-css.js`); const buildBaseHtml = require(`./_build-base-html.js`); const buildPackageCss = require(`./_build-package-css.js`); const buildPackageHtml = require(`./_build-package-html.js`); const getDirectories = require(`./_get-directories.js`); const packages = getDirectories(`avalanche/packages`); const data = {}; buildBaseHtml({}); buildBaseCss(); packages.forEach((packageName) => { data.title = packageName; data.css = `<link rel="stylesheet" href="css/index.css">`; data.scripts = ``; buildPackageHtml(packageName, data); buildPackageCss(packageName); });
const buildBaseCss = require(`./_build-base-css.js`); const buildBaseHtml = require(`./_build-base-html.js`); const buildPackageCss = require(`./_build-package-css.js`); const buildPackageHtml = require(`./_build-package-html.js`); const getDirectories = require(`./_get-directories.js`); const packages = getDirectories(`avalanche/packages`); const data = { css: `<link rel="stylesheet" href="/base/css/global.css">` }; buildBaseHtml(data); buildBaseCss(); packages.forEach((packageName) => { data.title = packageName; data.css += `<link rel="stylesheet" href="css/index.css">`; data.scripts = ``; buildPackageHtml(packageName, data); buildPackageCss(packageName); });
Add global.css file to pages by default
Add global.css file to pages by default
JavaScript
mit
avalanchesass/avalanche-website,avalanchesass/avalanche-website
javascript
## Code Before: const buildBaseCss = require(`./_build-base-css.js`); const buildBaseHtml = require(`./_build-base-html.js`); const buildPackageCss = require(`./_build-package-css.js`); const buildPackageHtml = require(`./_build-package-html.js`); const getDirectories = require(`./_get-directories.js`); const packages = getDirectories(`avalanche/packages`); const data = {}; buildBaseHtml({}); buildBaseCss(); packages.forEach((packageName) => { data.title = packageName; data.css = `<link rel="stylesheet" href="css/index.css">`; data.scripts = ``; buildPackageHtml(packageName, data); buildPackageCss(packageName); }); ## Instruction: Add global.css file to pages by default ## Code After: const buildBaseCss = require(`./_build-base-css.js`); const buildBaseHtml = require(`./_build-base-html.js`); const buildPackageCss = require(`./_build-package-css.js`); const buildPackageHtml = require(`./_build-package-html.js`); const getDirectories = require(`./_get-directories.js`); const packages = getDirectories(`avalanche/packages`); const data = { css: `<link rel="stylesheet" href="/base/css/global.css">` }; buildBaseHtml(data); buildBaseCss(); packages.forEach((packageName) => { data.title = packageName; data.css += `<link rel="stylesheet" href="css/index.css">`; data.scripts = ``; buildPackageHtml(packageName, data); buildPackageCss(packageName); });
const buildBaseCss = require(`./_build-base-css.js`); const buildBaseHtml = require(`./_build-base-html.js`); const buildPackageCss = require(`./_build-package-css.js`); const buildPackageHtml = require(`./_build-package-html.js`); const getDirectories = require(`./_get-directories.js`); const packages = getDirectories(`avalanche/packages`); - const data = {}; ? -- + const data = { + css: `<link rel="stylesheet" href="/base/css/global.css">` + }; - buildBaseHtml({}); ? ^^ + buildBaseHtml(data); ? ^^^^ buildBaseCss(); packages.forEach((packageName) => { data.title = packageName; - data.css = `<link rel="stylesheet" href="css/index.css">`; + data.css += `<link rel="stylesheet" href="css/index.css">`; ? + data.scripts = ``; buildPackageHtml(packageName, data); buildPackageCss(packageName); });
8
0.380952
5
3
0dab4acbf0b8c8c14bce3518cf47fb566a7e839d
static/js/main.js
static/js/main.js
/** * Created by jonathan on 3/7/15. */ var CameraApp = function() {}; CameraApp.prototype = { framesPerSecond: 1, setup: function() { this.image = document.getElementById('CameraImage'); this.imageSource = 'http://104.206.193.11:49709/dcnvr/video/live/image/2?w=320&h=240'; this.loadImage(); }, loadImage: function() { var calculatedDelay = 1000 / this.framesPerSecond; var currentTime = new Date().getTime(); if (this.lastLoadTime != undefined){ calculatedDelay = calculatedDelay - (currentTime - this.lastLoadTime); } this.lastLoadTime = currentTime; if (calculatedDelay <= 0) { this.image.src = this.imageSource + '&random=' + Math.random(); } else { var cameraApp = this; this.timer = setTimeout(function() { cameraApp.image.src = cameraApp.imageSource + '&random=' + Math.random(); }, calculatedDelay); } } }; var cameraApp = null; $(document).ready(function () { cameraApp = new CameraApp(); $('#CameraImage').load(function() { cameraApp.loadImage(); }); cameraApp.setup(); });
/** * Created by jonathan on 3/7/15. */ var CameraApp = function() {}; CameraApp.prototype = { framesPerSecond: 1, timeoutInMinutes: 1, setup: function() { this.startTime = new Date().getTime(); this.image = document.getElementById('CameraImage'); this.imageSource = 'http://104.206.193.11:49709/dcnvr/video/live/image/2?w=320&h=240'; this.loadImage(); }, loadImage: function() { var calculatedDelay = 1000 / this.framesPerSecond; var currentTime = new Date().getTime(); if (currentTime - this.startTime > this.timeoutInMinutes * 60000) { if (!confirm('Live video viewing has timed out. Do you want to continue viewing?')) { return; } else { this.startTime = new Date().getTime(); } } if (this.lastLoadTime != undefined){ calculatedDelay = calculatedDelay - (currentTime - this.lastLoadTime); } this.lastLoadTime = currentTime; if (calculatedDelay <= 0) { this.image.src = this.imageSource + '&random=' + Math.random(); } else { var cameraApp = this; this.timer = setTimeout(function() { cameraApp.image.src = cameraApp.imageSource + '&random=' + Math.random(); }, calculatedDelay); } } }; var cameraApp = null; $(document).ready(function () { cameraApp = new CameraApp(); $('#CameraImage').load(function() { cameraApp.loadImage(); }); cameraApp.setup(); });
Add live video feed timeout
Add live video feed timeout
JavaScript
mit
bytedreamer/LollypopCatToy,bytedreamer/LollypopCatToy,bytedreamer/LollypopCatToy
javascript
## Code Before: /** * Created by jonathan on 3/7/15. */ var CameraApp = function() {}; CameraApp.prototype = { framesPerSecond: 1, setup: function() { this.image = document.getElementById('CameraImage'); this.imageSource = 'http://104.206.193.11:49709/dcnvr/video/live/image/2?w=320&h=240'; this.loadImage(); }, loadImage: function() { var calculatedDelay = 1000 / this.framesPerSecond; var currentTime = new Date().getTime(); if (this.lastLoadTime != undefined){ calculatedDelay = calculatedDelay - (currentTime - this.lastLoadTime); } this.lastLoadTime = currentTime; if (calculatedDelay <= 0) { this.image.src = this.imageSource + '&random=' + Math.random(); } else { var cameraApp = this; this.timer = setTimeout(function() { cameraApp.image.src = cameraApp.imageSource + '&random=' + Math.random(); }, calculatedDelay); } } }; var cameraApp = null; $(document).ready(function () { cameraApp = new CameraApp(); $('#CameraImage').load(function() { cameraApp.loadImage(); }); cameraApp.setup(); }); ## Instruction: Add live video feed timeout ## Code After: /** * Created by jonathan on 3/7/15. */ var CameraApp = function() {}; CameraApp.prototype = { framesPerSecond: 1, timeoutInMinutes: 1, setup: function() { this.startTime = new Date().getTime(); this.image = document.getElementById('CameraImage'); this.imageSource = 'http://104.206.193.11:49709/dcnvr/video/live/image/2?w=320&h=240'; this.loadImage(); }, loadImage: function() { var calculatedDelay = 1000 / this.framesPerSecond; var currentTime = new Date().getTime(); if (currentTime - this.startTime > this.timeoutInMinutes * 60000) { if (!confirm('Live video viewing has timed out. Do you want to continue viewing?')) { return; } else { this.startTime = new Date().getTime(); } } if (this.lastLoadTime != undefined){ calculatedDelay = calculatedDelay - (currentTime - this.lastLoadTime); } this.lastLoadTime = currentTime; if (calculatedDelay <= 0) { this.image.src = this.imageSource + '&random=' + Math.random(); } else { var cameraApp = this; this.timer = setTimeout(function() { cameraApp.image.src = cameraApp.imageSource + '&random=' + Math.random(); }, calculatedDelay); } } }; var cameraApp = null; $(document).ready(function () { cameraApp = new CameraApp(); $('#CameraImage').load(function() { cameraApp.loadImage(); }); cameraApp.setup(); });
/** * Created by jonathan on 3/7/15. */ var CameraApp = function() {}; CameraApp.prototype = { framesPerSecond: 1, + timeoutInMinutes: 1, setup: function() { + this.startTime = new Date().getTime(); this.image = document.getElementById('CameraImage'); this.imageSource = 'http://104.206.193.11:49709/dcnvr/video/live/image/2?w=320&h=240'; this.loadImage(); }, loadImage: function() { var calculatedDelay = 1000 / this.framesPerSecond; var currentTime = new Date().getTime(); + + if (currentTime - this.startTime > this.timeoutInMinutes * 60000) + { + if (!confirm('Live video viewing has timed out. Do you want to continue viewing?')) + { + return; + } else { + this.startTime = new Date().getTime(); + } + } + + if (this.lastLoadTime != undefined){ calculatedDelay = calculatedDelay - (currentTime - this.lastLoadTime); } this.lastLoadTime = currentTime; if (calculatedDelay <= 0) { this.image.src = this.imageSource + '&random=' + Math.random(); } else { var cameraApp = this; this.timer = setTimeout(function() { cameraApp.image.src = cameraApp.imageSource + '&random=' + Math.random(); }, calculatedDelay); } } }; var cameraApp = null; $(document).ready(function () { cameraApp = new CameraApp(); $('#CameraImage').load(function() { cameraApp.loadImage(); }); cameraApp.setup(); });
14
0.304348
14
0
38c860b3d1eb8cc156560c9e946f3e8f89922063
test/start.sh
test/start.sh
TEST="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" ROOT="$TEST/.." # Start selenium server in the background and record its PID. java -jar "$TEST/selenium.jar" -Dphantomjs.binary.path="$ROOT/node_modules/.bin/phantomjs" > /dev/null 2>&1 & # Start the node server in the background and record its PID. node "$TEST/server.js" > /dev/null 2>&1 & printf "\nWaiting for servers to start..." while true; do if ! curl --output /dev/null --silent --head --fail http://localhost:4444/wd/hub || ! curl --output /dev/null --silent --head --fail http://localhost:4000; then sleep 1; printf "." else printf "Done\n" break fi done printf "\nRunning tests with WebDriver...\n" "$ROOT/node_modules/.bin/wdio" "$TEST/wdio.conf.js" printf "\nKilling background processes..." kill $(jobs -rp) && wait $(jobs -rp) > /dev/null 2>&1 printf "Done\n"
TEST="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" ROOT="$TEST/.." # Start selenium server in the background and record its PID. java -jar "$TEST/selenium.jar" -Dphantomjs.binary.path="$ROOT/node_modules/.bin/phantomjs" > /dev/null 2>&1 & # Start the node server in the background and record its PID. node "$TEST/server.js" > /dev/null 2>&1 & printf "\nWaiting for servers to start..." while true; do if ! curl --output /dev/null --silent --head --fail http://localhost:4444/wd/hub || ! curl --output /dev/null --silent --head --fail http://localhost:4000; then sleep 1; printf "." else printf "Done\n" break fi done printf "\nRunning tests with WebDriver...\n" "$ROOT/node_modules/.bin/wdio" "$TEST/wdio.conf.js" RESULT=$? printf "\nKilling background processes..." kill $(jobs -rp) && wait $(jobs -rp) > /dev/null 2>&1 printf "Done\n" exit $RESULT
Save the exit code of the tests and pass it to parent.
Save the exit code of the tests and pass it to parent.
Shell
apache-2.0
Zodiase/map-visualizer,Zodiase/map-visualizer,Zodiase/map-visualizer
shell
## Code Before: TEST="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" ROOT="$TEST/.." # Start selenium server in the background and record its PID. java -jar "$TEST/selenium.jar" -Dphantomjs.binary.path="$ROOT/node_modules/.bin/phantomjs" > /dev/null 2>&1 & # Start the node server in the background and record its PID. node "$TEST/server.js" > /dev/null 2>&1 & printf "\nWaiting for servers to start..." while true; do if ! curl --output /dev/null --silent --head --fail http://localhost:4444/wd/hub || ! curl --output /dev/null --silent --head --fail http://localhost:4000; then sleep 1; printf "." else printf "Done\n" break fi done printf "\nRunning tests with WebDriver...\n" "$ROOT/node_modules/.bin/wdio" "$TEST/wdio.conf.js" printf "\nKilling background processes..." kill $(jobs -rp) && wait $(jobs -rp) > /dev/null 2>&1 printf "Done\n" ## Instruction: Save the exit code of the tests and pass it to parent. ## Code After: TEST="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" ROOT="$TEST/.." # Start selenium server in the background and record its PID. java -jar "$TEST/selenium.jar" -Dphantomjs.binary.path="$ROOT/node_modules/.bin/phantomjs" > /dev/null 2>&1 & # Start the node server in the background and record its PID. node "$TEST/server.js" > /dev/null 2>&1 & printf "\nWaiting for servers to start..." while true; do if ! curl --output /dev/null --silent --head --fail http://localhost:4444/wd/hub || ! curl --output /dev/null --silent --head --fail http://localhost:4000; then sleep 1; printf "." else printf "Done\n" break fi done printf "\nRunning tests with WebDriver...\n" "$ROOT/node_modules/.bin/wdio" "$TEST/wdio.conf.js" RESULT=$? printf "\nKilling background processes..." kill $(jobs -rp) && wait $(jobs -rp) > /dev/null 2>&1 printf "Done\n" exit $RESULT
TEST="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" ROOT="$TEST/.." # Start selenium server in the background and record its PID. java -jar "$TEST/selenium.jar" -Dphantomjs.binary.path="$ROOT/node_modules/.bin/phantomjs" > /dev/null 2>&1 & # Start the node server in the background and record its PID. node "$TEST/server.js" > /dev/null 2>&1 & printf "\nWaiting for servers to start..." while true; do if ! curl --output /dev/null --silent --head --fail http://localhost:4444/wd/hub || ! curl --output /dev/null --silent --head --fail http://localhost:4000; then sleep 1; printf "." else printf "Done\n" break fi done printf "\nRunning tests with WebDriver...\n" "$ROOT/node_modules/.bin/wdio" "$TEST/wdio.conf.js" + RESULT=$? printf "\nKilling background processes..." kill $(jobs -rp) && wait $(jobs -rp) > /dev/null 2>&1 printf "Done\n" + + exit $RESULT
3
0.115385
3
0
26a6eacd5341ea92f957752f8b8e86009337f714
.travis.yml
.travis.yml
language: objective-c osx_image: xcode8.2 xcode_workspace: TextInputKit.xcworkspace
language: objective-c osx_image: xcode8.2 xcode_workspace: TextInputKit.xcworkspace script: - export
Print Travis CI environment variables.
Print Travis CI environment variables.
YAML
mit
artyom-stv/TextInputKit,artyom-stv/TextInputKit,artyom-stv/TextInputKit
yaml
## Code Before: language: objective-c osx_image: xcode8.2 xcode_workspace: TextInputKit.xcworkspace ## Instruction: Print Travis CI environment variables. ## Code After: language: objective-c osx_image: xcode8.2 xcode_workspace: TextInputKit.xcworkspace script: - export
language: objective-c osx_image: xcode8.2 xcode_workspace: TextInputKit.xcworkspace + script: + - export
2
0.666667
2
0
438ea00ebb6c0f0e5134f1223120939ce743adf8
ci/travis.cfg
ci/travis.cfg
[buildout] extends = ../buildout.cfg develop = .. bin-directory = ../bin parts-directory = ../parts eggs-directory = ../eggs develop-eggs-directory = ../develop-eggs parts = test coveralls eggs -= tweepy gdata feedparser South akismet PyMollom pdbpp nosexcover nose-progressive [test] defaults = --with-sfd --with-coverage --cover-package=zinnia [coveralls] recipe = zc.recipe.egg eggs = python-coveralls scripts = coveralls entry-points = coveralls=coveralls:wear
[buildout] extends = ../buildout.cfg develop = .. bin-directory = ../bin parts-directory = ../parts eggs-directory = ../eggs develop-eggs-directory = ../develop-eggs parts = test coveralls eggs -= tweepy gdata feedparser South akismet PyMollom pdbpp nosexcover nose-progressive [test] defaults = --with-sfd --with-coverage [coveralls] recipe = zc.recipe.egg eggs = python-coveralls scripts = coveralls entry-points = coveralls=coveralls:wear
Remove cover-package option on test, because has become redundant
Remove cover-package option on test, because has become redundant
INI
bsd-3-clause
1844144/django-blog-zinnia,Zopieux/django-blog-zinnia,Zopieux/django-blog-zinnia,ZuluPro/django-blog-zinnia,ghachey/django-blog-zinnia,extertioner/django-blog-zinnia,petecummings/django-blog-zinnia,Fantomas42/django-blog-zinnia,aorzh/django-blog-zinnia,aorzh/django-blog-zinnia,marctc/django-blog-zinnia,ZuluPro/django-blog-zinnia,Fantomas42/django-blog-zinnia,ghachey/django-blog-zinnia,Zopieux/django-blog-zinnia,extertioner/django-blog-zinnia,ghachey/django-blog-zinnia,bywbilly/django-blog-zinnia,marctc/django-blog-zinnia,ZuluPro/django-blog-zinnia,Maplecroft/django-blog-zinnia,petecummings/django-blog-zinnia,extertioner/django-blog-zinnia,Fantomas42/django-blog-zinnia,marctc/django-blog-zinnia,bywbilly/django-blog-zinnia,dapeng0802/django-blog-zinnia,bywbilly/django-blog-zinnia,Maplecroft/django-blog-zinnia,aorzh/django-blog-zinnia,petecummings/django-blog-zinnia,Maplecroft/django-blog-zinnia,dapeng0802/django-blog-zinnia,1844144/django-blog-zinnia,dapeng0802/django-blog-zinnia,1844144/django-blog-zinnia
ini
## Code Before: [buildout] extends = ../buildout.cfg develop = .. bin-directory = ../bin parts-directory = ../parts eggs-directory = ../eggs develop-eggs-directory = ../develop-eggs parts = test coveralls eggs -= tweepy gdata feedparser South akismet PyMollom pdbpp nosexcover nose-progressive [test] defaults = --with-sfd --with-coverage --cover-package=zinnia [coveralls] recipe = zc.recipe.egg eggs = python-coveralls scripts = coveralls entry-points = coveralls=coveralls:wear ## Instruction: Remove cover-package option on test, because has become redundant ## Code After: [buildout] extends = ../buildout.cfg develop = .. bin-directory = ../bin parts-directory = ../parts eggs-directory = ../eggs develop-eggs-directory = ../develop-eggs parts = test coveralls eggs -= tweepy gdata feedparser South akismet PyMollom pdbpp nosexcover nose-progressive [test] defaults = --with-sfd --with-coverage [coveralls] recipe = zc.recipe.egg eggs = python-coveralls scripts = coveralls entry-points = coveralls=coveralls:wear
[buildout] extends = ../buildout.cfg develop = .. bin-directory = ../bin parts-directory = ../parts eggs-directory = ../eggs develop-eggs-directory = ../develop-eggs parts = test coveralls eggs -= tweepy gdata feedparser South akismet PyMollom pdbpp nosexcover nose-progressive [test] defaults = --with-sfd --with-coverage - --cover-package=zinnia [coveralls] recipe = zc.recipe.egg eggs = python-coveralls scripts = coveralls entry-points = coveralls=coveralls:wear
1
0.027778
0
1
9fd80eed1425197d42b872c2a769f8c6e08c628a
src/labsome/frontend/src/templates/partials/main-site/views/labs/index.jade
src/labsome/frontend/src/templates/partials/main-site/views/labs/index.jade
mixin no_labs .big-message h3.text-center(ng-if='curUser.is_admin') i.icon-ghost.x6 h3.text-center(ng-if='!curUser.is_admin') i.icon-clock.x6 p.text-center.x2 | No labs were added yet p.text-center.x12(ng-if='curUser.is_admin') | To add servers and other types of hardware, start by creating a lab. p.text-center.x2(ng-if='curUser.is_admin') button.btn.btn-lg.btn-success(ng-click='create_lab()') | Create a New Lab p.text-center.x12(ng-if='!curUser.is_admin') | Your administrator is now creating your first lab, it will show up as soon as it's ready .page-layout(ng-if='!allLabs.ready') .page-layout-content-no-nav(style={'opacity': '0.5'}) .text-center three-bounce-spinner .page-layout(ng-if='allLabs.ready && (allLabs.all.length == 0)') .page-layout-content-no-nav +no_labs ui-view(ng-if='allLabs.ready && (allLabs.all.length > 0)')
mixin no_labs h1 | &nbsp; .big-message h3.text-center(ng-if='curUser.is_admin') i.icon-ghost.x6 h3.text-center(ng-if='!curUser.is_admin') i.icon-clock.x6 p.text-center.x2 | No labs were added yet p.text-center.x12(ng-if='curUser.is_admin') | To add servers and other types of hardware, start by creating a lab. p.text-center.x2(ng-if='curUser.is_admin') button.btn.btn-lg.btn-success(ng-click='create_lab()') | Create a New Lab p.text-center.x12(ng-if='!curUser.is_admin') | Your administrator is now creating your first lab, it will show up as soon as it's ready .page-layout(ng-if='!allLabs.ready') .page-layout-content-no-nav(style={'opacity': '0.5'}) .text-center three-bounce-spinner .page-layout(ng-if='allLabs.ready && (allLabs.all.length == 0)') .page-layout-content-no-nav +no_labs ui-view(ng-if='allLabs.ready && (allLabs.all.length > 0)')
Add spacing to top of 'no labs' message
Add spacing to top of 'no labs' message
Jade
agpl-3.0
labsome/labsome,warehaus/warehaus,labsome/labsome,warehaus/warehaus,labsome/labsome,warehaus/warehaus
jade
## Code Before: mixin no_labs .big-message h3.text-center(ng-if='curUser.is_admin') i.icon-ghost.x6 h3.text-center(ng-if='!curUser.is_admin') i.icon-clock.x6 p.text-center.x2 | No labs were added yet p.text-center.x12(ng-if='curUser.is_admin') | To add servers and other types of hardware, start by creating a lab. p.text-center.x2(ng-if='curUser.is_admin') button.btn.btn-lg.btn-success(ng-click='create_lab()') | Create a New Lab p.text-center.x12(ng-if='!curUser.is_admin') | Your administrator is now creating your first lab, it will show up as soon as it's ready .page-layout(ng-if='!allLabs.ready') .page-layout-content-no-nav(style={'opacity': '0.5'}) .text-center three-bounce-spinner .page-layout(ng-if='allLabs.ready && (allLabs.all.length == 0)') .page-layout-content-no-nav +no_labs ui-view(ng-if='allLabs.ready && (allLabs.all.length > 0)') ## Instruction: Add spacing to top of 'no labs' message ## Code After: mixin no_labs h1 | &nbsp; .big-message h3.text-center(ng-if='curUser.is_admin') i.icon-ghost.x6 h3.text-center(ng-if='!curUser.is_admin') i.icon-clock.x6 p.text-center.x2 | No labs were added yet p.text-center.x12(ng-if='curUser.is_admin') | To add servers and other types of hardware, start by creating a lab. p.text-center.x2(ng-if='curUser.is_admin') button.btn.btn-lg.btn-success(ng-click='create_lab()') | Create a New Lab p.text-center.x12(ng-if='!curUser.is_admin') | Your administrator is now creating your first lab, it will show up as soon as it's ready .page-layout(ng-if='!allLabs.ready') .page-layout-content-no-nav(style={'opacity': '0.5'}) .text-center three-bounce-spinner .page-layout(ng-if='allLabs.ready && (allLabs.all.length == 0)') .page-layout-content-no-nav +no_labs ui-view(ng-if='allLabs.ready && (allLabs.all.length > 0)')
mixin no_labs + h1 + | &nbsp; .big-message h3.text-center(ng-if='curUser.is_admin') i.icon-ghost.x6 h3.text-center(ng-if='!curUser.is_admin') i.icon-clock.x6 p.text-center.x2 | No labs were added yet p.text-center.x12(ng-if='curUser.is_admin') | To add servers and other types of hardware, start by creating a lab. p.text-center.x2(ng-if='curUser.is_admin') button.btn.btn-lg.btn-success(ng-click='create_lab()') | Create a New Lab p.text-center.x12(ng-if='!curUser.is_admin') | Your administrator is now creating your first lab, it will show up as soon as it's ready .page-layout(ng-if='!allLabs.ready') .page-layout-content-no-nav(style={'opacity': '0.5'}) .text-center three-bounce-spinner .page-layout(ng-if='allLabs.ready && (allLabs.all.length == 0)') .page-layout-content-no-nav +no_labs ui-view(ng-if='allLabs.ready && (allLabs.all.length > 0)')
2
0.076923
2
0
7f007ddde48722619f9c7e858eadb0e6870e155a
README.md
README.md
Beacon scanner for ESP32 ================================ [![Build Status](https://travis-ci.org/rcaelers/esp32-beacon-scanner.svg?branch=master)](https://travis-ci.org/rcaelers/esp32-beacon-scanner) A BLE scanner application for ESP32 that publishes all detected BLE devices using MQTT. The ultimate goal of the project is server-side indoor positioning using multiple ESP32 devices that detect beacons. NOTE: This is work in progress. NOTE: You need a recent version of ESP-IDF from the master branch of https://github.com/espressif/esp-idf. The latest released version (2.1) is not supported.
Beacon scanner for ESP32 ================================ [![Build Status](https://travis-ci.org/rcaelers/esp32-beacon-scanner.svg?branch=master)](https://travis-ci.org/rcaelers/esp32-beacon-scanner) A BLE scanner application for ESP32 that publishes all detected BLE devices using MQTT. The ultimate goal of the project is server-side indoor positioning using multiple ESP32 devices that detect beacons. NOTE: This is work in progress.
Remove note about ESP-IDF 2.1 from readme
Remove note about ESP-IDF 2.1 from readme Signed-off-by: Rob Caelers <3af403030f0678adda0645888f405305e69409fe@gmail.com>
Markdown
mit
rcaelers/esp32-beacon-scanner,rcaelers/esp32-beacon-scanner,rcaelers/esp32-beacon-scanner,rcaelers/esp32-beacon-scanner,rcaelers/esp32-beacon-scanner
markdown
## Code Before: Beacon scanner for ESP32 ================================ [![Build Status](https://travis-ci.org/rcaelers/esp32-beacon-scanner.svg?branch=master)](https://travis-ci.org/rcaelers/esp32-beacon-scanner) A BLE scanner application for ESP32 that publishes all detected BLE devices using MQTT. The ultimate goal of the project is server-side indoor positioning using multiple ESP32 devices that detect beacons. NOTE: This is work in progress. NOTE: You need a recent version of ESP-IDF from the master branch of https://github.com/espressif/esp-idf. The latest released version (2.1) is not supported. ## Instruction: Remove note about ESP-IDF 2.1 from readme Signed-off-by: Rob Caelers <3af403030f0678adda0645888f405305e69409fe@gmail.com> ## Code After: Beacon scanner for ESP32 ================================ [![Build Status](https://travis-ci.org/rcaelers/esp32-beacon-scanner.svg?branch=master)](https://travis-ci.org/rcaelers/esp32-beacon-scanner) A BLE scanner application for ESP32 that publishes all detected BLE devices using MQTT. The ultimate goal of the project is server-side indoor positioning using multiple ESP32 devices that detect beacons. NOTE: This is work in progress.
Beacon scanner for ESP32 ================================ [![Build Status](https://travis-ci.org/rcaelers/esp32-beacon-scanner.svg?branch=master)](https://travis-ci.org/rcaelers/esp32-beacon-scanner) A BLE scanner application for ESP32 that publishes all detected BLE devices using MQTT. The ultimate goal of the project is server-side indoor positioning using multiple ESP32 devices that detect beacons. NOTE: This is work in progress. - - NOTE: You need a recent version of ESP-IDF from the master branch of https://github.com/espressif/esp-idf. The latest released version (2.1) is not supported.
2
0.166667
0
2
4ff206b7fcd9ad0ed571444eb88cc83fb42f2d99
circle.yml
circle.yml
machine: environment: ANDROID_HOME: /home/ubuntu/android java: version: oraclejdk8 dependencies: cache_directories: - ~/.android - ~/android - ~/.gradle override: - .buildscript/install-dependencies.sh test: override: - TERM=dumb ./gradlew build
general: artifacts: - analytics-core/build/test-report - analytics-integrations/*/build/test-report machine: environment: ANDROID_HOME: /home/ubuntu/android java: version: oraclejdk8 dependencies: cache_directories: - ~/.android - ~/android - ~/.gradle override: - .buildscript/install-dependencies.sh test: override: - TERM=dumb ./gradlew build
Save build artifacts for Circle CI
Save build artifacts for Circle CI
YAML
mit
segmentio/analytics-android,amplitude/analytics-android,happysir/analytics-android,jtomson-mdsol/analytics-android,segmentio/analytics-android,graingert/analytics-android,rayleeriver/analytics-android,palaniyappanBala/analytics-android,TorreyKahuna/analytics-android,rayleeriver/analytics-android,graingert/analytics-android,segmentio/analytics-android,TorreyKahuna/analytics-android,amplitude/analytics-android,jmgamboa/analytics-android,happysir/analytics-android,jtomson-mdsol/analytics-android,jmgamboa/analytics-android,palaniyappanBala/analytics-android
yaml
## Code Before: machine: environment: ANDROID_HOME: /home/ubuntu/android java: version: oraclejdk8 dependencies: cache_directories: - ~/.android - ~/android - ~/.gradle override: - .buildscript/install-dependencies.sh test: override: - TERM=dumb ./gradlew build ## Instruction: Save build artifacts for Circle CI ## Code After: general: artifacts: - analytics-core/build/test-report - analytics-integrations/*/build/test-report machine: environment: ANDROID_HOME: /home/ubuntu/android java: version: oraclejdk8 dependencies: cache_directories: - ~/.android - ~/android - ~/.gradle override: - .buildscript/install-dependencies.sh test: override: - TERM=dumb ./gradlew build
+ general: + artifacts: + - analytics-core/build/test-report + - analytics-integrations/*/build/test-report + machine: environment: ANDROID_HOME: /home/ubuntu/android java: version: oraclejdk8 + dependencies: cache_directories: - ~/.android - ~/android - ~/.gradle override: - .buildscript/install-dependencies.sh + test: override: - TERM=dumb ./gradlew build
7
0.466667
7
0
e39a51394c8d065f3fa761f072a13523cf052914
2-3-tree/2-3-tree.lisp
2-3-tree/2-3-tree.lisp
(cl:in-package #:clump-2-3-tree) (defclass tree () ((%contents :initform nil :accessor contents))) (defclass node () ((%parent :initarg :parent :accessor parent)))
(cl:in-package #:clump-2-3-tree) (defclass tree () ((%contents :initform nil :accessor contents))) (defclass node () ((%parent :initarg :parent :accessor parent))) (defclass leaf (node) ((%contents :initform nil :accessor contents)))
Define new class LEAF for the leaves of the 2-3 tree.
Define new class LEAF for the leaves of the 2-3 tree.
Common Lisp
bsd-2-clause
robert-strandh/Clump
common-lisp
## Code Before: (cl:in-package #:clump-2-3-tree) (defclass tree () ((%contents :initform nil :accessor contents))) (defclass node () ((%parent :initarg :parent :accessor parent))) ## Instruction: Define new class LEAF for the leaves of the 2-3 tree. ## Code After: (cl:in-package #:clump-2-3-tree) (defclass tree () ((%contents :initform nil :accessor contents))) (defclass node () ((%parent :initarg :parent :accessor parent))) (defclass leaf (node) ((%contents :initform nil :accessor contents)))
(cl:in-package #:clump-2-3-tree) (defclass tree () ((%contents :initform nil :accessor contents))) (defclass node () ((%parent :initarg :parent :accessor parent))) + + (defclass leaf (node) + ((%contents :initform nil :accessor contents)))
3
0.428571
3
0
3d323792888b8ce5a018a8b14a75049b358dd0ee
cookbooks/cumulus/CHANGELOG.md
cookbooks/cumulus/CHANGELOG.md
cumulus-cl-ports-chef CHANGELOG =============================== This file is used to list changes made in each version of the cumulus-cl-ports-chef cookbook. 0.1.0 ----- - [your_name] - Initial release of cumulus-cl-ports-chef - - - Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown. The [Github Flavored Markdown page](http://github.github.com/github-flavored-markdown/) describes the differences between markdown on github and standard markdown.
cumulus-linux-chef-modules CHANGELOG ==================================== This file is used to list changes made in each version of the cumulus-linux-chef-modules cookbook. 0.1.0 ----- - Kristian Van Der Vliet - Initial release of cumulus-linux-chef-modules
Update the Changelog to something sensible
Update the Changelog to something sensible
Markdown
apache-2.0
Vanders/ifupdown2,Vanders/ifupdown2
markdown
## Code Before: cumulus-cl-ports-chef CHANGELOG =============================== This file is used to list changes made in each version of the cumulus-cl-ports-chef cookbook. 0.1.0 ----- - [your_name] - Initial release of cumulus-cl-ports-chef - - - Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown. The [Github Flavored Markdown page](http://github.github.com/github-flavored-markdown/) describes the differences between markdown on github and standard markdown. ## Instruction: Update the Changelog to something sensible ## Code After: cumulus-linux-chef-modules CHANGELOG ==================================== This file is used to list changes made in each version of the cumulus-linux-chef-modules cookbook. 0.1.0 ----- - Kristian Van Der Vliet - Initial release of cumulus-linux-chef-modules
- cumulus-cl-ports-chef CHANGELOG + cumulus-linux-chef-modules CHANGELOG - =============================== + ==================================== ? +++++ - This file is used to list changes made in each version of the cumulus-cl-ports-chef cookbook. ? - ^^^^^^ + This file is used to list changes made in each version of the cumulus-linux-chef-modules cookbook. ? ^^^^ ++++++++ 0.1.0 ----- + - Kristian Van Der Vliet - Initial release of cumulus-linux-chef-modules - - [your_name] - Initial release of cumulus-cl-ports-chef - - - - - - Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown. - - The [Github Flavored Markdown page](http://github.github.com/github-flavored-markdown/) describes the differences between markdown on github and standard markdown.
13
1
4
9
06a2f874b4ca896c262d77bb745a5021c5bc6873
README.md
README.md
Freetalks ========= Freetalks is a video catalog of talks and lectures. ### Licenses This work is licensed under the MIT License (see the LICENSE file).
Freetalks ========= Freetalks is a video catalog of talks and lectures. ### Development Data Go to [http://localhost:8080/_ah/admin/interactive Development Console] and run the follow: from tests.fixtures import dataset dataset.setup() ### Licenses This work is licensed under the MIT License (see the LICENSE file).
Add instructions for setting up development data
Add instructions for setting up development data
Markdown
mit
preichenberger/freetalks,preichenberger/freetalks
markdown
## Code Before: Freetalks ========= Freetalks is a video catalog of talks and lectures. ### Licenses This work is licensed under the MIT License (see the LICENSE file). ## Instruction: Add instructions for setting up development data ## Code After: Freetalks ========= Freetalks is a video catalog of talks and lectures. ### Development Data Go to [http://localhost:8080/_ah/admin/interactive Development Console] and run the follow: from tests.fixtures import dataset dataset.setup() ### Licenses This work is licensed under the MIT License (see the LICENSE file).
Freetalks ========= Freetalks is a video catalog of talks and lectures. + ### Development Data + + Go to [http://localhost:8080/_ah/admin/interactive Development Console] and run + the follow: + + from tests.fixtures import dataset + dataset.setup() + ### Licenses This work is licensed under the MIT License (see the LICENSE file).
8
1
8
0
b90167055df78fcf1449593df7986f1d507eeffe
README.md
README.md
This provides ability to confirm that the mail is really safe to be sent, before sending. When *ALL* of following conditions are satisfied, a confirmation dialog will be shown: * The sending mail has one or more attachments. * There are one or more recipients which are not matched to the list of "Exceptional domains". * No matching regular expression is given, or the subject or the body match to the given regexp. Until you verify all recipients are correct, you cannot send the mail actually. ## Bypassing of confirmation dialogs provided by other addons There are some addons similar to this. When you use them with this addon, you'll see similar confirmations again and again. To avoid such an annoying result, this provides ability to bypass other confirmations if you confirmed with this addon. Currently this supports bypassing for only following addons: * [Check and Send](https://addons.mozilla.org/thunderbird/addon/check-and-send/)
This provides ability to confirm that the mail is really safe to be sent, before sending. When *ALL* of following conditions are satisfied, a confirmation dialog will be shown: * The sending mail has one or more attachments. * There are one or more recipients which are not matched to the list of "Exceptional domains". * No matching regular expression is given, or the subject or the body match to the given regexp. Until you verify all recipients are correct, you cannot send the mail actually. ## Bypassing of confirmation dialogs provided by other addons There are some addons similar to this. When you use them with this addon, you'll see similar confirmations again and again. To avoid such an annoying result, this provides ability to bypass other confirmations if you confirmed with this addon. Currently this supports bypassing for only following addons: * [Check and Send](https://addons.mozilla.org/thunderbird/addon/check-and-send/) ## Custom confirmation messages You can change the title and description text of the confirmation dialog, by changing two secret preferences; * `extensions.check-attachment-before-send@clear-code.com.confirm.title` * `extensions.check-attachment-before-send@clear-code.com.confirm.description`
Add description for the dialog
Add description for the dialog
Markdown
mpl-2.0
clear-code/tb-check-attachment-before-send,clear-code/tb-check-attachment-before-send
markdown
## Code Before: This provides ability to confirm that the mail is really safe to be sent, before sending. When *ALL* of following conditions are satisfied, a confirmation dialog will be shown: * The sending mail has one or more attachments. * There are one or more recipients which are not matched to the list of "Exceptional domains". * No matching regular expression is given, or the subject or the body match to the given regexp. Until you verify all recipients are correct, you cannot send the mail actually. ## Bypassing of confirmation dialogs provided by other addons There are some addons similar to this. When you use them with this addon, you'll see similar confirmations again and again. To avoid such an annoying result, this provides ability to bypass other confirmations if you confirmed with this addon. Currently this supports bypassing for only following addons: * [Check and Send](https://addons.mozilla.org/thunderbird/addon/check-and-send/) ## Instruction: Add description for the dialog ## Code After: This provides ability to confirm that the mail is really safe to be sent, before sending. When *ALL* of following conditions are satisfied, a confirmation dialog will be shown: * The sending mail has one or more attachments. * There are one or more recipients which are not matched to the list of "Exceptional domains". * No matching regular expression is given, or the subject or the body match to the given regexp. Until you verify all recipients are correct, you cannot send the mail actually. ## Bypassing of confirmation dialogs provided by other addons There are some addons similar to this. When you use them with this addon, you'll see similar confirmations again and again. To avoid such an annoying result, this provides ability to bypass other confirmations if you confirmed with this addon. Currently this supports bypassing for only following addons: * [Check and Send](https://addons.mozilla.org/thunderbird/addon/check-and-send/) ## Custom confirmation messages You can change the title and description text of the confirmation dialog, by changing two secret preferences; * `extensions.check-attachment-before-send@clear-code.com.confirm.title` * `extensions.check-attachment-before-send@clear-code.com.confirm.description`
This provides ability to confirm that the mail is really safe to be sent, before sending. When *ALL* of following conditions are satisfied, a confirmation dialog will be shown: * The sending mail has one or more attachments. * There are one or more recipients which are not matched to the list of "Exceptional domains". * No matching regular expression is given, or the subject or the body match to the given regexp. Until you verify all recipients are correct, you cannot send the mail actually. ## Bypassing of confirmation dialogs provided by other addons There are some addons similar to this. When you use them with this addon, you'll see similar confirmations again and again. To avoid such an annoying result, this provides ability to bypass other confirmations if you confirmed with this addon. Currently this supports bypassing for only following addons: * [Check and Send](https://addons.mozilla.org/thunderbird/addon/check-and-send/) + + ## Custom confirmation messages + + You can change the title and description text of the confirmation dialog, by changing two secret preferences; + + * `extensions.check-attachment-before-send@clear-code.com.confirm.title` + * `extensions.check-attachment-before-send@clear-code.com.confirm.description`
7
0.368421
7
0
00d1e5b7a1c9d74c1193131a60187cf46c0e17e9
generator/templates/generator/delete_songbook.html
generator/templates/generator/delete_songbook.html
{% extends "generator/layout/full_layout.html" %} {% load i18n %} {% block title %} {% blocktrans with songbook=songbook.title%} Suppression du carnet <em>{{songbook}}</em> {% endblocktrans %} {% endblock %} {% block appmenu %} {% include "generator/menu/songbook.html" %} {% endblock %} {% block content %} <p> {% trans "Êtes-vous sur de vouloir supprimer ce carnet ?" %} <strong>{% trans "Cette action est irréversible !" %}</strong> </p> <form method="post" action=""> {% csrf_token %} - <a href="{% url "songbook_private_list" %}">{% trans 'Revenir aux carnets' %}</a> <p> <input type="submit" value="{% trans 'Confirmer la suppression' %}" /> </p> </form> {% endblock %}
{% extends "generator/layout/full_layout.html" %} {% load i18n %} {% block title %} {% blocktrans with songbook=songbook.title%} Suppression {% endblocktrans %} {% endblock %} {% block appmenu %} {% include "generator/menu/songbook.html" %} {% endblock %} {% block content %} <a href="{% url "songbook_private_list" %}" class="back">{% trans 'Mes carnets' %}</a> <p> {% blocktrans with songbook=songbook.title%} Êtes-vous sur de vouloir supprimer le carnet <em><strong>{{songbook}}</strong></em> ? {% endblocktrans %} <br/> <strong>{% trans "Cette action est irréversible !" %}</strong> </p> <form method="post" action=""> {% csrf_token %} <p> <input type="submit" value="{% trans 'Confirmer la suppression' %}" /> </p> </form> {% endblock %}
Delete songbook form minor changes
Delete songbook form minor changes
HTML
agpl-3.0
patacrep/patanet,patacrep/patanet,patacrep/patanet
html
## Code Before: {% extends "generator/layout/full_layout.html" %} {% load i18n %} {% block title %} {% blocktrans with songbook=songbook.title%} Suppression du carnet <em>{{songbook}}</em> {% endblocktrans %} {% endblock %} {% block appmenu %} {% include "generator/menu/songbook.html" %} {% endblock %} {% block content %} <p> {% trans "Êtes-vous sur de vouloir supprimer ce carnet ?" %} <strong>{% trans "Cette action est irréversible !" %}</strong> </p> <form method="post" action=""> {% csrf_token %} - <a href="{% url "songbook_private_list" %}">{% trans 'Revenir aux carnets' %}</a> <p> <input type="submit" value="{% trans 'Confirmer la suppression' %}" /> </p> </form> {% endblock %} ## Instruction: Delete songbook form minor changes ## Code After: {% extends "generator/layout/full_layout.html" %} {% load i18n %} {% block title %} {% blocktrans with songbook=songbook.title%} Suppression {% endblocktrans %} {% endblock %} {% block appmenu %} {% include "generator/menu/songbook.html" %} {% endblock %} {% block content %} <a href="{% url "songbook_private_list" %}" class="back">{% trans 'Mes carnets' %}</a> <p> {% blocktrans with songbook=songbook.title%} Êtes-vous sur de vouloir supprimer le carnet <em><strong>{{songbook}}</strong></em> ? {% endblocktrans %} <br/> <strong>{% trans "Cette action est irréversible !" %}</strong> </p> <form method="post" action=""> {% csrf_token %} <p> <input type="submit" value="{% trans 'Confirmer la suppression' %}" /> </p> </form> {% endblock %}
{% extends "generator/layout/full_layout.html" %} {% load i18n %} {% block title %} {% blocktrans with songbook=songbook.title%} - Suppression du carnet <em>{{songbook}}</em> + Suppression {% endblocktrans %} {% endblock %} {% block appmenu %} {% include "generator/menu/songbook.html" %} {% endblock %} {% block content %} + <a href="{% url "songbook_private_list" %}" class="back">{% trans 'Mes carnets' %}</a> <p> - {% trans "Êtes-vous sur de vouloir supprimer ce carnet ?" %} + {% blocktrans with songbook=songbook.title%} + Êtes-vous sur de vouloir supprimer le carnet <em><strong>{{songbook}}</strong></em> ? + {% endblocktrans %} + <br/> <strong>{% trans "Cette action est irréversible !" %}</strong> </p> <form method="post" action=""> {% csrf_token %} - - - <a href="{% url "songbook_private_list" %}">{% trans 'Revenir aux carnets' %}</a> <p> <input type="submit" value="{% trans 'Confirmer la suppression' %}" /> </p> </form> {% endblock %}
10
0.384615
6
4
41796d0a7d46a32a4c6bfedf964ac8e7de6d710f
tfhub_dev/assets/agripredict/disease-classification/lite/1.md
tfhub_dev/assets/agripredict/disease-classification/lite/1.md
A deployment format of Lite agripredict/disease-classification/1 <!-- asset-path: https://storage.googleapis.com/visionkit/agripredict/classifier/crop_disease_V0/2/quantized_input_uint8/ecc386e717b5696a35bdf37071cbc2463723320f-model-with-metadata.tflite --> <!-- parent-model: agripredict/disease-classification/1 --> ## Overview This is a TF Lite model for use with TF Lite library. ## Latency Benchmarks Mean latency benchmarks for the TF Lite deployment of `agripredict/disease-classification/1` are presented below for a variety of mobile devices. ![Mean Latency (ms)](https://www.gstatic.com/aihub/tfhub/charts/disease-classification/1/mean_latency_ms.png) ### Additional details * CPU latency was measured running the model on a single thread.
A deployment format of Lite agripredict/disease-classification/1 <!-- asset-path: https://storage.googleapis.com/visionkit/agripredict/classifier/crop_disease_V0/2/quantized_input_uint8/ecc386e717b5696a35bdf37071cbc2463723320f-model-with-metadata.tflite --> <!-- parent-model: agripredict/disease-classification/1 --> <!-- fine-tunable: false --> <!-- module-type: image-classification --> ## Overview This is a TF Lite model for use with TF Lite library. ## Latency Benchmarks Mean latency benchmarks for the TF Lite deployment of `agripredict/disease-classification/1` are presented below for a variety of mobile devices. ![Mean Latency (ms)](https://www.gstatic.com/aihub/tfhub/charts/disease-classification/1/mean_latency_ms.png) ### Additional details * CPU latency was measured running the model on a single thread.
Add missing metadata to Markdown file
Add missing metadata to Markdown file PiperOrigin-RevId: 319843798
Markdown
apache-2.0
tensorflow/hub,tensorflow/hub
markdown
## Code Before: A deployment format of Lite agripredict/disease-classification/1 <!-- asset-path: https://storage.googleapis.com/visionkit/agripredict/classifier/crop_disease_V0/2/quantized_input_uint8/ecc386e717b5696a35bdf37071cbc2463723320f-model-with-metadata.tflite --> <!-- parent-model: agripredict/disease-classification/1 --> ## Overview This is a TF Lite model for use with TF Lite library. ## Latency Benchmarks Mean latency benchmarks for the TF Lite deployment of `agripredict/disease-classification/1` are presented below for a variety of mobile devices. ![Mean Latency (ms)](https://www.gstatic.com/aihub/tfhub/charts/disease-classification/1/mean_latency_ms.png) ### Additional details * CPU latency was measured running the model on a single thread. ## Instruction: Add missing metadata to Markdown file PiperOrigin-RevId: 319843798 ## Code After: A deployment format of Lite agripredict/disease-classification/1 <!-- asset-path: https://storage.googleapis.com/visionkit/agripredict/classifier/crop_disease_V0/2/quantized_input_uint8/ecc386e717b5696a35bdf37071cbc2463723320f-model-with-metadata.tflite --> <!-- parent-model: agripredict/disease-classification/1 --> <!-- fine-tunable: false --> <!-- module-type: image-classification --> ## Overview This is a TF Lite model for use with TF Lite library. ## Latency Benchmarks Mean latency benchmarks for the TF Lite deployment of `agripredict/disease-classification/1` are presented below for a variety of mobile devices. ![Mean Latency (ms)](https://www.gstatic.com/aihub/tfhub/charts/disease-classification/1/mean_latency_ms.png) ### Additional details * CPU latency was measured running the model on a single thread.
A deployment format of Lite agripredict/disease-classification/1 <!-- asset-path: https://storage.googleapis.com/visionkit/agripredict/classifier/crop_disease_V0/2/quantized_input_uint8/ecc386e717b5696a35bdf37071cbc2463723320f-model-with-metadata.tflite --> <!-- parent-model: agripredict/disease-classification/1 --> + <!-- fine-tunable: false --> + <!-- module-type: image-classification --> ## Overview This is a TF Lite model for use with TF Lite library. ## Latency Benchmarks Mean latency benchmarks for the TF Lite deployment of `agripredict/disease-classification/1` are presented below for a variety of mobile devices. ![Mean Latency (ms)](https://www.gstatic.com/aihub/tfhub/charts/disease-classification/1/mean_latency_ms.png) ### Additional details * CPU latency was measured running the model on a single thread.
2
0.1
2
0
3690a15fc48242d95456fabd1f923f121dc0a2db
app/components/add-expense.js
app/components/add-expense.js
import Ember from 'ember'; // import $ from 'jquery'; export default Ember.Component.extend({ expense: { sum: '', category: '', name: '' }, currency: '£', expenseCategories: [ 'Charity', 'Clothing', 'Education', 'Events', 'Food', 'Gifts', 'Healthcare', 'Household', 'Leisure', 'Hobbies', 'Trasportation', 'Utilities', 'Vacation' ], errorMessagesSum: { emRequired: 'This field can\'t be blank', emPattern: 'Must be a number!' }, errorMessagesCategory: { emRequired: 'Must select a category' }, init () { this._super(); Ember.TextSupport.reopen({ attributeBindings: ['em-required', 'em-min', 'em-max', 'em-pattern'] }); }, didInsertElement () { componentHandler.upgradeAllRegistered(); }, actions: { clearInputs () { this.set('expense', { sum: '', category: '', name: '' }); this.$('.mdl-textfield').removeClass('is-dirty is-invalid is-touched'); }, addExpense () { this.sendAction('action', this.get('expense')); this.send('clearInputs'); } } });
import Ember from 'ember'; // import $ from 'jquery'; export default Ember.Component.extend({ expense: { sum: '', category: '', name: '' }, currency: '£', expenseCategories: [ 'Charity', 'Clothing', 'Education', 'Events', 'Food', 'Gifts', 'Healthcare', 'Household', 'Leisure', 'Hobbies', 'Trasportation', 'Utilities', 'Vacation' ], errorMessagesSum: { emRequired: 'This field can\'t be blank', emPattern: 'Must be a number!' }, errorMessagesCategory: { emRequired: 'Must select a category' }, init () { this._super(); Ember.TextSupport.reopen({ attributeBindings: ['em-required', 'em-min', 'em-max', 'em-pattern'] }); }, didInsertElement () { componentHandler.upgradeAllRegistered(); }, actions: { clearInputs () { this.set('expense', { sum: '', category: '', name: '' }); this.$('.mdl-textfield').removeClass('is-dirty is-invalid is-touched'); }, addExpense () { Ember.run.later(() => { if (!this.$().find('.is-invalid').length) { this.sendAction('action', this.get('expense')); this.send('clearInputs'); } }, 200); } } });
Check if form is valid and then send save action to parent
refactor: Check if form is valid and then send save action to parent
JavaScript
mit
pe1te3son/spendings-tracker,pe1te3son/spendings-tracker
javascript
## Code Before: import Ember from 'ember'; // import $ from 'jquery'; export default Ember.Component.extend({ expense: { sum: '', category: '', name: '' }, currency: '£', expenseCategories: [ 'Charity', 'Clothing', 'Education', 'Events', 'Food', 'Gifts', 'Healthcare', 'Household', 'Leisure', 'Hobbies', 'Trasportation', 'Utilities', 'Vacation' ], errorMessagesSum: { emRequired: 'This field can\'t be blank', emPattern: 'Must be a number!' }, errorMessagesCategory: { emRequired: 'Must select a category' }, init () { this._super(); Ember.TextSupport.reopen({ attributeBindings: ['em-required', 'em-min', 'em-max', 'em-pattern'] }); }, didInsertElement () { componentHandler.upgradeAllRegistered(); }, actions: { clearInputs () { this.set('expense', { sum: '', category: '', name: '' }); this.$('.mdl-textfield').removeClass('is-dirty is-invalid is-touched'); }, addExpense () { this.sendAction('action', this.get('expense')); this.send('clearInputs'); } } }); ## Instruction: refactor: Check if form is valid and then send save action to parent ## Code After: import Ember from 'ember'; // import $ from 'jquery'; export default Ember.Component.extend({ expense: { sum: '', category: '', name: '' }, currency: '£', expenseCategories: [ 'Charity', 'Clothing', 'Education', 'Events', 'Food', 'Gifts', 'Healthcare', 'Household', 'Leisure', 'Hobbies', 'Trasportation', 'Utilities', 'Vacation' ], errorMessagesSum: { emRequired: 'This field can\'t be blank', emPattern: 'Must be a number!' }, errorMessagesCategory: { emRequired: 'Must select a category' }, init () { this._super(); Ember.TextSupport.reopen({ attributeBindings: ['em-required', 'em-min', 'em-max', 'em-pattern'] }); }, didInsertElement () { componentHandler.upgradeAllRegistered(); }, actions: { clearInputs () { this.set('expense', { sum: '', category: '', name: '' }); this.$('.mdl-textfield').removeClass('is-dirty is-invalid is-touched'); }, addExpense () { Ember.run.later(() => { if (!this.$().find('.is-invalid').length) { this.sendAction('action', this.get('expense')); this.send('clearInputs'); } }, 200); } } });
import Ember from 'ember'; // import $ from 'jquery'; export default Ember.Component.extend({ expense: { sum: '', category: '', name: '' }, currency: '£', expenseCategories: [ 'Charity', 'Clothing', 'Education', 'Events', 'Food', 'Gifts', 'Healthcare', 'Household', 'Leisure', 'Hobbies', 'Trasportation', 'Utilities', 'Vacation' ], errorMessagesSum: { emRequired: 'This field can\'t be blank', emPattern: 'Must be a number!' }, errorMessagesCategory: { emRequired: 'Must select a category' }, init () { this._super(); Ember.TextSupport.reopen({ attributeBindings: ['em-required', 'em-min', 'em-max', 'em-pattern'] }); }, didInsertElement () { componentHandler.upgradeAllRegistered(); }, actions: { clearInputs () { this.set('expense', { sum: '', category: '', name: '' }); this.$('.mdl-textfield').removeClass('is-dirty is-invalid is-touched'); }, addExpense () { + Ember.run.later(() => { + if (!this.$().find('.is-invalid').length) { - this.sendAction('action', this.get('expense')); + this.sendAction('action', this.get('expense')); ? ++++ - this.send('clearInputs'); + this.send('clearInputs'); ? ++++ + } + }, 200); } } });
8
0.131148
6
2
8fa3f18f2145a9c6578c0f5184d9ecb442c57a71
.travis.yml
.travis.yml
language: node_js sudo: required os: - linux node_js: - "7" before_install: - export CHROME_BIN=chromium-browser - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start script: - npm install --silent - npm run test:node - npm run test:browser - npm run test:typings - npm run test:deps - npm run build - npm run lint - (cd ./examples/angular2 && npm install --silent && npm run build && npm run test:build) - (cd ./examples/vue && npm install --silent && npm run lint && npm run build && npm run test) - npm run build:size
language: node_js sudo: required os: - linux node_js: - "7" before_install: - export CHROME_BIN=chromium-browser - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start script: - npm install --depth 0 --silent - npm run test:node - npm run test:browser - npm run test:typings - npm run test:deps - npm run build - npm run lint - (cd ./examples/angular2 && npm install --depth 0 --silent && npm run build && npm run test:build) - (cd ./examples/vue && npm install --depth 0 --silent && npm run lint && npm run build && npm run test) - npm run build:size
OPTIMIZE reduce verbocity of npm install
OPTIMIZE reduce verbocity of npm install
YAML
apache-2.0
pubkey/rxdb,pubkey/rxdb,pubkey/rxdb,pubkey/rxdb,pubkey/rxdb
yaml
## Code Before: language: node_js sudo: required os: - linux node_js: - "7" before_install: - export CHROME_BIN=chromium-browser - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start script: - npm install --silent - npm run test:node - npm run test:browser - npm run test:typings - npm run test:deps - npm run build - npm run lint - (cd ./examples/angular2 && npm install --silent && npm run build && npm run test:build) - (cd ./examples/vue && npm install --silent && npm run lint && npm run build && npm run test) - npm run build:size ## Instruction: OPTIMIZE reduce verbocity of npm install ## Code After: language: node_js sudo: required os: - linux node_js: - "7" before_install: - export CHROME_BIN=chromium-browser - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start script: - npm install --depth 0 --silent - npm run test:node - npm run test:browser - npm run test:typings - npm run test:deps - npm run build - npm run lint - (cd ./examples/angular2 && npm install --depth 0 --silent && npm run build && npm run test:build) - (cd ./examples/vue && npm install --depth 0 --silent && npm run lint && npm run build && npm run test) - npm run build:size
language: node_js sudo: required os: - linux node_js: - "7" before_install: - export CHROME_BIN=chromium-browser - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start script: - - npm install --silent + - npm install --depth 0 --silent ? ++++++++++ - npm run test:node - npm run test:browser - npm run test:typings - npm run test:deps - npm run build - npm run lint - - (cd ./examples/angular2 && npm install --silent && npm run build && npm run test:build) + - (cd ./examples/angular2 && npm install --depth 0 --silent && npm run build && npm run test:build) ? ++++++++++ - - (cd ./examples/vue && npm install --silent && npm run lint && npm run build && npm run test) + - (cd ./examples/vue && npm install --depth 0 --silent && npm run lint && npm run build && npm run test) ? ++++++++++ - npm run build:size
6
0.272727
3
3
0209bdc69a55a104e52b9d21356b20b95268dd84
.vsts-ci.yml
.vsts-ci.yml
variables: deployment: deploy nuget: packages steps: - task: NuGetCommand@2 inputs: command: 'restore' packDestination: $(nuget) projects: WhiteLibrary - script: | pip install -r requirements.txt displayName: Install needed compoments from PyPi - task: VSBuild@1 inputs: solution: UIAutomationTest\UIAutomationTest.csproj - task: Bash@3 inputs: targetType: inline script: echo $BUILD_BUILDNUMBER >> build.info - script: | set DEPLOYMENT=$(deployment) deploy.cmd continueOnError: false displayName: Copy build artifacts to deployment directory - script: | set DEPLOYMENT=$(deployment) run_tests.cmd --exclude no_ci --xunit xunit.xml continueOnError: true displayName: Execute Acceptance tests - task: PublishTestResults@2 inputs: testRunner: JUnit testResultsFiles: output/xunit.xml - task: PublishBuildArtifacts@1 displayName: Publish Robot Framework logs and results inputs: PathtoPublish: output ArtifactType: container TargetPath: "" ArtifactName: Robot Test results - task: PublishBuildArtifacts@1 displayName: Publish WhiteLibrary inputs: PathToPublish: $(deployment) ArtifactType: container TargetPath: "" ArtifactName: WhiteLibrary
variables: deployment: deploy nuget: packages steps: - task: NuGetCommand@2 inputs: command: 'restore' packDestination: $(nuget) projects: WhiteLibrary - script: | pip install -r requirements.txt displayName: Install needed compoments from PyPi - task: VSBuild@1 inputs: solution: UIAutomationTest\UIAutomationTest.csproj - task: Bash@3 inputs: targetType: inline script: echo $BUILD_BUILDNUMBER >> build.info displayName: Generate build.info - script: | set DEPLOYMENT=$(deployment) deploy.cmd continueOnError: false displayName: Copy build artifacts to deployment directory - script: | set DEPLOYMENT=$(deployment) run_tests.cmd --exclude no_ci --xunit xunit.xml continueOnError: true displayName: Execute Acceptance tests - task: PublishTestResults@2 inputs: testRunner: JUnit testResultsFiles: output/xunit.xml - task: PublishBuildArtifacts@1 displayName: Publish Robot Framework logs and results inputs: PathtoPublish: output ArtifactType: container TargetPath: "" ArtifactName: Robot Test results - task: PublishBuildArtifacts@1 displayName: Publish WhiteLibrary inputs: PathToPublish: $(deployment) ArtifactType: container TargetPath: "" ArtifactName: WhiteLibrary
Add display name to bash step
Add display name to bash step
YAML
apache-2.0
Omenia/robotframework-whitelibrary,Omenia/robotframework-whitelibrary
yaml
## Code Before: variables: deployment: deploy nuget: packages steps: - task: NuGetCommand@2 inputs: command: 'restore' packDestination: $(nuget) projects: WhiteLibrary - script: | pip install -r requirements.txt displayName: Install needed compoments from PyPi - task: VSBuild@1 inputs: solution: UIAutomationTest\UIAutomationTest.csproj - task: Bash@3 inputs: targetType: inline script: echo $BUILD_BUILDNUMBER >> build.info - script: | set DEPLOYMENT=$(deployment) deploy.cmd continueOnError: false displayName: Copy build artifacts to deployment directory - script: | set DEPLOYMENT=$(deployment) run_tests.cmd --exclude no_ci --xunit xunit.xml continueOnError: true displayName: Execute Acceptance tests - task: PublishTestResults@2 inputs: testRunner: JUnit testResultsFiles: output/xunit.xml - task: PublishBuildArtifacts@1 displayName: Publish Robot Framework logs and results inputs: PathtoPublish: output ArtifactType: container TargetPath: "" ArtifactName: Robot Test results - task: PublishBuildArtifacts@1 displayName: Publish WhiteLibrary inputs: PathToPublish: $(deployment) ArtifactType: container TargetPath: "" ArtifactName: WhiteLibrary ## Instruction: Add display name to bash step ## Code After: variables: deployment: deploy nuget: packages steps: - task: NuGetCommand@2 inputs: command: 'restore' packDestination: $(nuget) projects: WhiteLibrary - script: | pip install -r requirements.txt displayName: Install needed compoments from PyPi - task: VSBuild@1 inputs: solution: UIAutomationTest\UIAutomationTest.csproj - task: Bash@3 inputs: targetType: inline script: echo $BUILD_BUILDNUMBER >> build.info displayName: Generate build.info - script: | set DEPLOYMENT=$(deployment) deploy.cmd continueOnError: false displayName: Copy build artifacts to deployment directory - script: | set DEPLOYMENT=$(deployment) run_tests.cmd --exclude no_ci --xunit xunit.xml continueOnError: true displayName: Execute Acceptance tests - task: PublishTestResults@2 inputs: testRunner: JUnit testResultsFiles: output/xunit.xml - task: PublishBuildArtifacts@1 displayName: Publish Robot Framework logs and results inputs: PathtoPublish: output ArtifactType: container TargetPath: "" ArtifactName: Robot Test results - task: PublishBuildArtifacts@1 displayName: Publish WhiteLibrary inputs: PathToPublish: $(deployment) ArtifactType: container TargetPath: "" ArtifactName: WhiteLibrary
variables: deployment: deploy nuget: packages steps: - task: NuGetCommand@2 inputs: command: 'restore' packDestination: $(nuget) projects: WhiteLibrary - script: | pip install -r requirements.txt displayName: Install needed compoments from PyPi - task: VSBuild@1 inputs: solution: UIAutomationTest\UIAutomationTest.csproj - task: Bash@3 inputs: targetType: inline script: echo $BUILD_BUILDNUMBER >> build.info + displayName: Generate build.info - script: | set DEPLOYMENT=$(deployment) deploy.cmd continueOnError: false displayName: Copy build artifacts to deployment directory - script: | set DEPLOYMENT=$(deployment) run_tests.cmd --exclude no_ci --xunit xunit.xml continueOnError: true displayName: Execute Acceptance tests - task: PublishTestResults@2 inputs: testRunner: JUnit testResultsFiles: output/xunit.xml - task: PublishBuildArtifacts@1 displayName: Publish Robot Framework logs and results inputs: PathtoPublish: output ArtifactType: container TargetPath: "" ArtifactName: Robot Test results - task: PublishBuildArtifacts@1 displayName: Publish WhiteLibrary inputs: PathToPublish: $(deployment) ArtifactType: container TargetPath: "" ArtifactName: WhiteLibrary
1
0.017857
1
0
9c28816b48cdbb5278b5e30d977b332eefc1e4b3
src/pusher/class-http.php
src/pusher/class-http.php
<?php namespace Isotop\Cargo\Pusher; class HTTP extends Abstract_Pusher { /** * Send data to receiver. * * @param mixed $data * * @return mixed */ public function send( $data ) { $options = $this->cargo->config( 'pusher.http', ['url' => ''] ); $options = is_array( $options ) ? $options : ['url' => '']; $json = $this->to_json( $data ); if ( empty( $json ) ) { return false; } $args = array_merge( [ 'headers' => [ 'Content-Type' => 'application/json; charset=utf-8' ], 'body' => $json, 'timeout' => 30 ], $options ); $res = wp_remote_post( $options['url'], $args ); if ( is_wp_error( $res ) ) { $this->save( $args['body'], $res ); return $res; } $body = (array) json_decode( $res['body'] ); if ( empty( $body ) ) { return false; } if ( $body['success'] ) { return true; } $this->save( $args['body'], $res ); return false; } }
<?php namespace Isotop\Cargo\Pusher; class HTTP extends Abstract_Pusher { /** * Send data to receiver. * * @param mixed $data * * @return mixed */ public function send( $data ) { $options = $this->cargo->config( 'pusher.http', ['url' => ''] ); $options = is_array( $options ) ? $options : ['url' => '']; $json = $this->to_json( $data ); if ( empty( $json ) ) { return false; } $args = array_merge( [ 'headers' => [ 'Content-Type' => 'application/json; charset=utf-8' ], 'body' => $json, 'timeout' => 30 ], $options ); $res = wp_remote_post( $options['url'], $args ); if ( is_wp_error( $res ) ) { $this->save( $args['body'], $res ); return $res; } $body = (array) json_decode( $res['body'] ); if ( empty( $body ) ) { return false; } if ( isset( $body['success'] ) && $body['success'] ) { return true; } $this->save( $args['body'], $res ); return false; } }
Check success exists before using it
Check success exists before using it
PHP
mit
isotopsweden/wp-cargo
php
## Code Before: <?php namespace Isotop\Cargo\Pusher; class HTTP extends Abstract_Pusher { /** * Send data to receiver. * * @param mixed $data * * @return mixed */ public function send( $data ) { $options = $this->cargo->config( 'pusher.http', ['url' => ''] ); $options = is_array( $options ) ? $options : ['url' => '']; $json = $this->to_json( $data ); if ( empty( $json ) ) { return false; } $args = array_merge( [ 'headers' => [ 'Content-Type' => 'application/json; charset=utf-8' ], 'body' => $json, 'timeout' => 30 ], $options ); $res = wp_remote_post( $options['url'], $args ); if ( is_wp_error( $res ) ) { $this->save( $args['body'], $res ); return $res; } $body = (array) json_decode( $res['body'] ); if ( empty( $body ) ) { return false; } if ( $body['success'] ) { return true; } $this->save( $args['body'], $res ); return false; } } ## Instruction: Check success exists before using it ## Code After: <?php namespace Isotop\Cargo\Pusher; class HTTP extends Abstract_Pusher { /** * Send data to receiver. * * @param mixed $data * * @return mixed */ public function send( $data ) { $options = $this->cargo->config( 'pusher.http', ['url' => ''] ); $options = is_array( $options ) ? $options : ['url' => '']; $json = $this->to_json( $data ); if ( empty( $json ) ) { return false; } $args = array_merge( [ 'headers' => [ 'Content-Type' => 'application/json; charset=utf-8' ], 'body' => $json, 'timeout' => 30 ], $options ); $res = wp_remote_post( $options['url'], $args ); if ( is_wp_error( $res ) ) { $this->save( $args['body'], $res ); return $res; } $body = (array) json_decode( $res['body'] ); if ( empty( $body ) ) { return false; } if ( isset( $body['success'] ) && $body['success'] ) { return true; } $this->save( $args['body'], $res ); return false; } }
<?php namespace Isotop\Cargo\Pusher; class HTTP extends Abstract_Pusher { /** * Send data to receiver. * * @param mixed $data * * @return mixed */ public function send( $data ) { $options = $this->cargo->config( 'pusher.http', ['url' => ''] ); $options = is_array( $options ) ? $options : ['url' => '']; $json = $this->to_json( $data ); if ( empty( $json ) ) { return false; } $args = array_merge( [ 'headers' => [ 'Content-Type' => 'application/json; charset=utf-8' ], 'body' => $json, 'timeout' => 30 ], $options ); $res = wp_remote_post( $options['url'], $args ); if ( is_wp_error( $res ) ) { $this->save( $args['body'], $res ); return $res; } $body = (array) json_decode( $res['body'] ); if ( empty( $body ) ) { return false; } - if ( $body['success'] ) { + if ( isset( $body['success'] ) && $body['success'] ) { return true; } $this->save( $args['body'], $res ); return false; } }
2
0.037037
1
1
8bb95cb151b733f8263485aa80c6a40a25652bdf
admin/admin.go
admin/admin.go
package admin import ( "net" "net/http" "strings" "github.com/rakyll/statik/fs" _ "github.com/influxdb/influxdb/statik" ) type HttpServer struct { port string listener net.Listener closed bool } // port should be a string that looks like ":8083" or whatever port to serve on. func NewHttpServer(port string) *HttpServer { return &HttpServer{port: port, closed: true} } func (s *HttpServer) ListenAndServe() { if s.port == "" { return } s.closed = false var err error s.listener, _ = net.Listen("tcp", s.port) statikFS, _ := fs.New() err = http.Serve(s.listener, http.FileServer(statikFS)) if !strings.Contains(err.Error(), "closed") { panic(err) } } func (s *HttpServer) Close() { if s.closed { return } s.closed = true s.listener.Close() }
package admin import ( "net" "net/http" "strings" "github.com/rakyll/statik/fs" _ "github.com/influxdb/influxdb/statik" ) type HttpServer struct { port string listener net.Listener closed bool } // port should be a string that looks like ":8083" or whatever port to serve on. func NewHttpServer(port string) *HttpServer { return &HttpServer{port: port, closed: true} } func (s *HttpServer) ListenAndServe() { if s.port == "" { return } s.closed = false var err error s.listener, _ = net.Listen("tcp", s.port) if err != nil { return } statikFS, _ := fs.New() err = http.Serve(s.listener, http.FileServer(statikFS)) if !strings.Contains(err.Error(), "closed") { panic(err) } } func (s *HttpServer) Close() { if s.closed { return } s.closed = true s.listener.Close() }
Stop setting up the listener on an error.
Stop setting up the listener on an error.
Go
mit
jgeiger/influxdb,apigee/influxdb,nickrobinson/influxdb,runcom/influxdb,n1tr0g/influxdb,Yong-Lee/influxdb,mash0304/influxdb,no2key/influxdb,nickrobinson/influxdb,chenziliang/influxdb,toorop/influxdb,atyenoria/influxdb,nickrobinson/influxdb,imcom/influxdb,Yong-Lee/influxdb,paulstuart/influxdb,chenziliang/influxdb,Venu4thFeb/influxdb,Sotfo/influxdb,archsaber/influxdb,benbjohnson/influxdb,jonseymour/influxdb,DanielMorsing/influxdb,daachi/influxdb,tuxmonteiro/influxdb,n1tr0g/influxdb,luciotorre/influxdb,mengjinglei/influxdb,GoIncremental/influxdb,joaopedrotaveira/influxdb,bspline/influxdb,ASAPPinc/influxdb,josephcopenhaver/influxdb,mnuessler/influxdb,mre/influxdb,runner-mei/influxdb,influxdb/influxdb,jipperinbham/influxdb,rnubel/influxdb,pablolmiranda/influxdb,alexiri/influxdb,nickrobinson/influxdb,luciotorre/influxdb,fxstein/influxdb,marcosnils/influxdb,samaitra/influxdb,neonstalwart/influxdb,slachiewicz/influxdb,pablolmiranda/influxdb,pablolmiranda/influxdb,runner-mei/influxdb,dneuman64/influxdb,samaitra/influxdb,kingland/influxdb,Sotfo/influxdb,121watts/influxdb,joaopedrotaveira/influxdb,dneuman64/influxdb,paulstuart/influxdb,arussellsaw/influxdb,121watts/influxdb,trigrass2/influxdb,luciotorre/influxdb,timraymond/influxdb,Tony133/influxdb,mark-rushakoff/influxdb,kingland/influxdb,pkittenis/influxdb,GoIncremental/influxdb,m4ce/influxdb,michaelsproul/influxdb,samaitra/influxdb,bspline/influxdb,stvnwrgs/influxdb,jipperinbham/influxdb,mmaul/influxdb,jonseymour/influxdb,GoIncremental/influxdb,alexiri/influxdb,bluebreezecf/influxdb,haim0n/influxdb,DanielMorsing/influxdb,mmaul/influxdb,li-ang/influxdb,mark-rushakoff/influxdb,CVTJNII/influxdb-tjnii,CrazyJvm/influxdb,brunoqc/influxdb,imcom/influxdb,timraymond/influxdb,bspline/influxdb,runcom/influxdb,CVTJNII/influxdb-tjnii,nckturner/influxdb,runcom/influxdb,pkittenis/influxdb,samaitra/influxdb,timraymond/influxdb,vladlopes/influxdb,linfangrong/influxdb,n1tr0g/influxdb,haim0n/influxdb,mark-rushakoff/influxdb,bluebreezecf/influxdb,eminden/influxdb,brunoqc/influxdb,lgpeterson/influxdb,lgpeterson/influxdb,arussellsaw/influxdb,nooproblem/influxdb,cannium/influxdb,tommymei/influxdb,paulstuart/influxdb,mcanthony/influxdb,tommymei/influxdb,stvnwrgs/influxdb,linearb/influxdb,otoolep/influxdb,egymgmbh/influxdb,jonseymour/influxdb,Mindera/influxdb,mmaul/influxdb,apigee/influxdb,mcanthony/influxdb,timraymond/influxdb,DanielMorsing/influxdb,ASAPPinc/influxdb,luciotorre/influxdb,lenko-d/influxdb,tuxmonteiro/influxdb,apigee/influxdb,alexiri/influxdb,CrazyJvm/influxdb,otoolep/influxdb,IMCG/InfluxDB,cnelissen/influxdb,wxdublin/influxdb,ASAPPinc/influxdb,arussellsaw/influxdb,evanphx/influxdb,mark-rushakoff/influxdb,nickscript0/influxdb,slachiewicz/influxdb,atyenoria/influxdb,arussellsaw/influxdb,neonstalwart/influxdb,jportoles/influxdb092,archsaber/influxdb,influxdb/influxdb,nickrobinson/influxdb,cnelissen/influxdb,mash0304/influxdb,s7v7nislands/influxdb,fxstein/influxdb,bspline/influxdb,CrazyJvm/influxdb,opavader/influxdb,Ancillas/influxdb,mnuessler/influxdb,pdf/influxdb,fg2it/influxdb,CVTJNII/influxdb-tjnii,timraymond/influxdb,mre/influxdb,arussellsaw/influxdb,eminden/influxdb,pkittenis/influxdb,otoolep/influxdb,slavau/influxdb,IMCG/InfluxDB,apigee/influxdb,sudabon/influxdb,GoIncremental/influxdb,nickscript0/influxdb,cnelissen/influxdb,apriendeau/influxdb,influxdb/influxdb,no2key/influxdb,apriendeau/influxdb,jportoles/influxdb092,GoIncremental/influxdb,CVTJNII/influxdb-tjnii,lgpeterson/influxdb,jportoles/influxdb092,trigrass2/influxdb,linfangrong/influxdb,Tony133/influxdb,Sotfo/influxdb,egymgmbh/influxdb,marcosnils/influxdb,nooproblem/influxdb,cannium/influxdb,ninjasphere/influxdb,roobert/influxdb,m4ce/influxdb,trigrass2/influxdb,runner-mei/influxdb,GrimDerp/influxdb,nickscript0/influxdb,ASAPPinc/influxdb,ninjasphere/influxdb,runner-mei/influxdb,endophage/influxdb,runcom/influxdb,runcom/influxdb,opavader/influxdb,mark-rushakoff/influxdb,ASAPPinc/influxdb,archsaber/influxdb,brunoqc/influxdb,bluebreezecf/influxdb,linearb/influxdb,daachi/influxdb,trigrass2/influxdb,s7v7nislands/influxdb,Sotfo/influxdb,jgeiger/influxdb,fxstein/influxdb,wxdublin/influxdb,endophage/influxdb,n1tr0g/influxdb,ninjasphere/influxdb,sudabon/influxdb,chenziliang/influxdb,apriendeau/influxdb,mcanthony/influxdb,paulstuart/influxdb,apriendeau/influxdb,linfangrong/influxdb,CVTJNII/influxdb-tjnii,mre/influxdb,cnelissen/influxdb,apriendeau/influxdb,joaopedrotaveira/influxdb,Tony133/influxdb,egymgmbh/influxdb,evanphx/influxdb,haim0n/influxdb,pdf/influxdb,kingland/influxdb,samaitra/influxdb,jonseymour/influxdb,CrazyJvm/influxdb,archsaber/influxdb,nckturner/influxdb,eminden/influxdb,ezotrank/influxdb,jportoles/influxdb092,Mindera/influxdb,mnuessler/influxdb,roobert/influxdb,otoolep/influxdb,nickscript0/influxdb,GrimDerp/influxdb,opavader/influxdb,endophage/influxdb,jipperinbham/influxdb,cnelissen/influxdb,Ancillas/influxdb,jgeiger/influxdb,cannium/influxdb,marcosnils/influxdb,vladlopes/influxdb,apigee/influxdb,toorop/influxdb,jipperinbham/influxdb,s7v7nislands/influxdb,dneuman64/influxdb,Mindera/influxdb,nooproblem/influxdb,ninjasphere/influxdb,influxdata/influxdb,Mindera/influxdb,eminden/influxdb,influxdata/influxdb,nickscript0/influxdb,samaitra/influxdb,mvadu/influxdb,michaelsproul/influxdb,lenko-d/influxdb,neonstalwart/influxdb,toorop/influxdb,pkittenis/influxdb,121watts/influxdb,lenko-d/influxdb,roobert/influxdb,tommymei/influxdb,benbjohnson/influxdb,ezotrank/influxdb,alexiri/influxdb,fxstein/influxdb,evanphx/influxdb,influxdb/influxdb,brunoqc/influxdb,dneuman64/influxdb,sudabon/influxdb,pablolmiranda/influxdb,nckturner/influxdb,tommymei/influxdb,vladlopes/influxdb,michaelsproul/influxdb,jgeiger/influxdb,Yong-Lee/influxdb,trigrass2/influxdb,brunoqc/influxdb,fg2it/influxdb,mash0304/influxdb,roobert/influxdb,GrimDerp/influxdb,mre/influxdb,kingland/influxdb,wxdublin/influxdb,nckturner/influxdb,rnubel/influxdb,fg2it/influxdb,chenziliang/influxdb,tjyang/influxdb,neonstalwart/influxdb,michaelsproul/influxdb,apigee/influxdb,egymgmbh/influxdb,mre/influxdb,imcom/influxdb,ninjasphere/influxdb,nooproblem/influxdb,daachi/influxdb,Venu4thFeb/influxdb,linfangrong/influxdb,m4ce/influxdb,jonseymour/influxdb,jportoles/influxdb092,nooproblem/influxdb,michaelsproul/influxdb,vladlopes/influxdb,alexiri/influxdb,mash0304/influxdb,otoolep/influxdb,opavader/influxdb,slavau/influxdb,slavau/influxdb,mnuessler/influxdb,mash0304/influxdb,joaopedrotaveira/influxdb,mvadu/influxdb,Ancillas/influxdb,josephcopenhaver/influxdb,linearb/influxdb,pablolmiranda/influxdb,mnuessler/influxdb,pkittenis/influxdb,kingland/influxdb,tuxmonteiro/influxdb,lgpeterson/influxdb,toorop/influxdb,daachi/influxdb,influxdb/influxdb,slachiewicz/influxdb,benbjohnson/influxdb,mark-rushakoff/influxdb,DanielMorsing/influxdb,mengjinglei/influxdb,rnubel/influxdb,tjyang/influxdb,mengjinglei/influxdb,no2key/influxdb,joaopedrotaveira/influxdb,atyenoria/influxdb,ezotrank/influxdb,tuxmonteiro/influxdb,bluebreezecf/influxdb,Venu4thFeb/influxdb,jipperinbham/influxdb,roobert/influxdb,josephcopenhaver/influxdb,slavau/influxdb,stvnwrgs/influxdb,influxdb/influxdb,endophage/influxdb,opavader/influxdb,Mindera/influxdb,121watts/influxdb,mvadu/influxdb,fg2it/influxdb,Venu4thFeb/influxdb,Yong-Lee/influxdb,lenko-d/influxdb,cannium/influxdb,jipperinbham/influxdb,mmaul/influxdb,pdf/influxdb,atyenoria/influxdb,linearb/influxdb,mmaul/influxdb,IMCG/InfluxDB,Yong-Lee/influxdb,nckturner/influxdb,benbjohnson/influxdb,daachi/influxdb,s7v7nislands/influxdb,dneuman64/influxdb,bspline/influxdb,li-ang/influxdb,Tony133/influxdb,jgeiger/influxdb,Tony133/influxdb,marcosnils/influxdb,jonseymour/influxdb,luciotorre/influxdb,Ancillas/influxdb,sudabon/influxdb,stvnwrgs/influxdb,Mindera/influxdb,no2key/influxdb,haim0n/influxdb,mvadu/influxdb,n1tr0g/influxdb,evanphx/influxdb,josephcopenhaver/influxdb,Venu4thFeb/influxdb,mnuessler/influxdb,josephcopenhaver/influxdb,m4ce/influxdb,m4ce/influxdb,pkittenis/influxdb,toorop/influxdb,sudabon/influxdb,marcosnils/influxdb,tjyang/influxdb,wxdublin/influxdb,fg2it/influxdb,daachi/influxdb,linearb/influxdb,mcanthony/influxdb,tuxmonteiro/influxdb,no2key/influxdb,tjyang/influxdb,stvnwrgs/influxdb,Sotfo/influxdb,imcom/influxdb,egymgmbh/influxdb,pdf/influxdb,jgeiger/influxdb,linfangrong/influxdb,IMCG/InfluxDB,ezotrank/influxdb,paulstuart/influxdb,m4ce/influxdb,otoolep/influxdb,IMCG/InfluxDB,GrimDerp/influxdb,GrimDerp/influxdb,lenko-d/influxdb,mcanthony/influxdb,mvadu/influxdb,slavau/influxdb,Ancillas/influxdb,rnubel/influxdb,atyenoria/influxdb,wxdublin/influxdb,arussellsaw/influxdb,n1tr0g/influxdb,bluebreezecf/influxdb,eminden/influxdb,mvadu/influxdb,slachiewicz/influxdb,sudabon/influxdb,DanielMorsing/influxdb,endophage/influxdb,slachiewicz/influxdb,pdf/influxdb,CVTJNII/influxdb-tjnii,fxstein/influxdb,lgpeterson/influxdb,tommymei/influxdb,rnubel/influxdb,mengjinglei/influxdb,imcom/influxdb
go
## Code Before: package admin import ( "net" "net/http" "strings" "github.com/rakyll/statik/fs" _ "github.com/influxdb/influxdb/statik" ) type HttpServer struct { port string listener net.Listener closed bool } // port should be a string that looks like ":8083" or whatever port to serve on. func NewHttpServer(port string) *HttpServer { return &HttpServer{port: port, closed: true} } func (s *HttpServer) ListenAndServe() { if s.port == "" { return } s.closed = false var err error s.listener, _ = net.Listen("tcp", s.port) statikFS, _ := fs.New() err = http.Serve(s.listener, http.FileServer(statikFS)) if !strings.Contains(err.Error(), "closed") { panic(err) } } func (s *HttpServer) Close() { if s.closed { return } s.closed = true s.listener.Close() } ## Instruction: Stop setting up the listener on an error. ## Code After: package admin import ( "net" "net/http" "strings" "github.com/rakyll/statik/fs" _ "github.com/influxdb/influxdb/statik" ) type HttpServer struct { port string listener net.Listener closed bool } // port should be a string that looks like ":8083" or whatever port to serve on. func NewHttpServer(port string) *HttpServer { return &HttpServer{port: port, closed: true} } func (s *HttpServer) ListenAndServe() { if s.port == "" { return } s.closed = false var err error s.listener, _ = net.Listen("tcp", s.port) if err != nil { return } statikFS, _ := fs.New() err = http.Serve(s.listener, http.FileServer(statikFS)) if !strings.Contains(err.Error(), "closed") { panic(err) } } func (s *HttpServer) Close() { if s.closed { return } s.closed = true s.listener.Close() }
package admin import ( "net" "net/http" "strings" "github.com/rakyll/statik/fs" _ "github.com/influxdb/influxdb/statik" ) type HttpServer struct { port string listener net.Listener closed bool } // port should be a string that looks like ":8083" or whatever port to serve on. func NewHttpServer(port string) *HttpServer { return &HttpServer{port: port, closed: true} } func (s *HttpServer) ListenAndServe() { if s.port == "" { return } s.closed = false var err error s.listener, _ = net.Listen("tcp", s.port) + if err != nil { + return + } statikFS, _ := fs.New() err = http.Serve(s.listener, http.FileServer(statikFS)) if !strings.Contains(err.Error(), "closed") { panic(err) } } func (s *HttpServer) Close() { if s.closed { return } s.closed = true s.listener.Close() }
3
0.0625
3
0
cc80f90a4f003c0967c31d5177971061350ee683
pycall/call.py
pycall/call.py
"""A simple wrapper for Asterisk calls.""" class Call(object): """Stores and manipulates Asterisk calls.""" def __init__(self, channel, callerid=None, account=None, wait_time=None, max_retries=None): """Create a new `Call` object. :param str channel: The Asterisk channel to call. Should be in standard Asterisk format. :param str callerid: CallerID to use. :param str account: Account code to associate with this call. :param int wait_time: Amount of time to wait (in seconds) between retry attempts. :param int max_retries: Maximum amount of retry attempts. """ self.channel = channel self.callerid = callerid self.account = account self.wait_time = int(wait_time) self.max_retries = int(max_retries)
"""A simple wrapper for Asterisk calls.""" class Call(object): """Stores and manipulates Asterisk calls.""" def __init__(self, channel, callerid=None, account=None, wait_time=None, max_retries=None): """Create a new `Call` object. :param str channel: The Asterisk channel to call. Should be in standard Asterisk format. :param str callerid: CallerID to use. :param str account: Account code to associate with this call. :param int wait_time: Amount of time to wait (in seconds) between retry attempts. :param int max_retries: Maximum amount of retry attempts. """ self.channel = channel self.callerid = callerid self.account = account self.wait_time = wait_time self.max_retries = max_retries
Revert "Forcing type coersion for int params."
Revert "Forcing type coersion for int params." This is a pointless bit of code. Since we lazy-evaluate them anyhow, it's a duplicate effort. This reverts commit 1ca6b96d492f8f33ac3b3a520937378effb66744.
Python
unlicense
rdegges/pycall
python
## Code Before: """A simple wrapper for Asterisk calls.""" class Call(object): """Stores and manipulates Asterisk calls.""" def __init__(self, channel, callerid=None, account=None, wait_time=None, max_retries=None): """Create a new `Call` object. :param str channel: The Asterisk channel to call. Should be in standard Asterisk format. :param str callerid: CallerID to use. :param str account: Account code to associate with this call. :param int wait_time: Amount of time to wait (in seconds) between retry attempts. :param int max_retries: Maximum amount of retry attempts. """ self.channel = channel self.callerid = callerid self.account = account self.wait_time = int(wait_time) self.max_retries = int(max_retries) ## Instruction: Revert "Forcing type coersion for int params." This is a pointless bit of code. Since we lazy-evaluate them anyhow, it's a duplicate effort. This reverts commit 1ca6b96d492f8f33ac3b3a520937378effb66744. ## Code After: """A simple wrapper for Asterisk calls.""" class Call(object): """Stores and manipulates Asterisk calls.""" def __init__(self, channel, callerid=None, account=None, wait_time=None, max_retries=None): """Create a new `Call` object. :param str channel: The Asterisk channel to call. Should be in standard Asterisk format. :param str callerid: CallerID to use. :param str account: Account code to associate with this call. :param int wait_time: Amount of time to wait (in seconds) between retry attempts. :param int max_retries: Maximum amount of retry attempts. """ self.channel = channel self.callerid = callerid self.account = account self.wait_time = wait_time self.max_retries = max_retries
"""A simple wrapper for Asterisk calls.""" class Call(object): """Stores and manipulates Asterisk calls.""" def __init__(self, channel, callerid=None, account=None, wait_time=None, max_retries=None): """Create a new `Call` object. :param str channel: The Asterisk channel to call. Should be in standard Asterisk format. :param str callerid: CallerID to use. :param str account: Account code to associate with this call. :param int wait_time: Amount of time to wait (in seconds) between retry attempts. :param int max_retries: Maximum amount of retry attempts. """ self.channel = channel self.callerid = callerid self.account = account - self.wait_time = int(wait_time) ? ---- - + self.wait_time = wait_time - self.max_retries = int(max_retries) ? ---- - + self.max_retries = max_retries
4
0.173913
2
2
38af40addf7c52504e3a37d60ed843c07adb07e5
spec/feels_spec.rb
spec/feels_spec.rb
ENV['RACK_ENV'] = 'test' require_relative '../app/feels' # <-- your sinatra app require 'rspec' require 'rack/test' describe 'Test the routes' do include Rack::Test::Methods def app Sinatra::Application end it "has a main page" do get '/' expect(last_response).to be_ok end it "has a code of conduct" do get '/conduct' expect(last_response).to be_ok end it "has a diversity statement" do get '/diversity' expect(last_response).to be_ok end it "has a prospectus page" do get '/prospectus' expect(last_response).to be_ok end it "has a schedule page" do get '/schedule' expect(last_response).to be_ok end it "has a speakers page" do get '/speakers' expect(last_response).to be_ok end it "has a sponsors page" do get '/sponsors' expect(last_response).to be_ok end it "has a tickets page" do get '/tickets' expect(last_response).to be_ok end it "has a talk ideas page" do get '/talk-ideas' expect(last_response).to be_ok end it "has a visiting page" do get '/visiting' expect(last_response).to be_ok end end
ENV['RACK_ENV'] = 'test' require_relative '../app/feels' require 'rspec' require 'rack/test' describe 'Test the routes' do include Rack::Test::Methods def app Sinatra::Application end it "has a main page" do get '/' expect(last_response).to be_ok end routes = %w( conduct diversity prospectus schedule speakers sponsors talk-ideas tickets visiting ) routes.each do |route| it "has a #{route} page" do get "/#{route}" expect(last_response).to be_ok end end end
Make the specs shorter by listing routes in word array.
Make the specs shorter by listing routes in word array.
Ruby
mit
OSFeels/OSFeels.com-2015,OSFeels/OSFeels.com-2015,OSFeels/OSFeels.com,OSFeels/OSFeels.com-2015,OSFeels/OSFeels.com,OSFeels/OSFeels.com
ruby
## Code Before: ENV['RACK_ENV'] = 'test' require_relative '../app/feels' # <-- your sinatra app require 'rspec' require 'rack/test' describe 'Test the routes' do include Rack::Test::Methods def app Sinatra::Application end it "has a main page" do get '/' expect(last_response).to be_ok end it "has a code of conduct" do get '/conduct' expect(last_response).to be_ok end it "has a diversity statement" do get '/diversity' expect(last_response).to be_ok end it "has a prospectus page" do get '/prospectus' expect(last_response).to be_ok end it "has a schedule page" do get '/schedule' expect(last_response).to be_ok end it "has a speakers page" do get '/speakers' expect(last_response).to be_ok end it "has a sponsors page" do get '/sponsors' expect(last_response).to be_ok end it "has a tickets page" do get '/tickets' expect(last_response).to be_ok end it "has a talk ideas page" do get '/talk-ideas' expect(last_response).to be_ok end it "has a visiting page" do get '/visiting' expect(last_response).to be_ok end end ## Instruction: Make the specs shorter by listing routes in word array. ## Code After: ENV['RACK_ENV'] = 'test' require_relative '../app/feels' require 'rspec' require 'rack/test' describe 'Test the routes' do include Rack::Test::Methods def app Sinatra::Application end it "has a main page" do get '/' expect(last_response).to be_ok end routes = %w( conduct diversity prospectus schedule speakers sponsors talk-ideas tickets visiting ) routes.each do |route| it "has a #{route} page" do get "/#{route}" expect(last_response).to be_ok end end end
ENV['RACK_ENV'] = 'test' - require_relative '../app/feels' # <-- your sinatra app + require_relative '../app/feels' require 'rspec' require 'rack/test' describe 'Test the routes' do include Rack::Test::Methods def app Sinatra::Application end it "has a main page" do get '/' expect(last_response).to be_ok end - it "has a code of conduct" do + routes = %w( - get '/conduct' ? ------ - + conduct - expect(last_response).to be_ok - end + diversity + prospectus + schedule + speakers + sponsors + talk-ideas + tickets + visiting + ) - it "has a diversity statement" do - get '/diversity' + routes.each do |route| + it "has a #{route} page" do + get "/#{route}" - expect(last_response).to be_ok + expect(last_response).to be_ok ? ++ - end + end ? ++ - - it "has a prospectus page" do - get '/prospectus' - expect(last_response).to be_ok - end - - it "has a schedule page" do - get '/schedule' - expect(last_response).to be_ok - end - - it "has a speakers page" do - get '/speakers' - expect(last_response).to be_ok - end - - it "has a sponsors page" do - get '/sponsors' - expect(last_response).to be_ok - end - - it "has a tickets page" do - get '/tickets' - expect(last_response).to be_ok - end - - it "has a talk ideas page" do - get '/talk-ideas' - expect(last_response).to be_ok - end - - it "has a visiting page" do - get '/visiting' - expect(last_response).to be_ok end end
60
0.952381
17
43
252ead3216962c2791c530b19f694c7ce369ed5e
README.md
README.md
pytomaton: State Machines in Python ========= Example ------- import pytomaton class ConnectionMachine(statemachine): states = ['waiting_for_connection', 'waiting_for_ready', 'all_ready'] start_state = 'state1' def on_connect(self): self.transition('waiting_for_ready') @on_transition('waiting_for_connection', 'waiting_for_ready') def send_ready_prompt(self): self.broadcast('are you ready?') def receive_ready_confirm(self): if self.all_ready(): self.transition('all_ready') @on_enter('all_ready') def send_all_ready(self): self.broadcase('everyone is ready!')
pytomaton: State Machines in Python ========= Brief ----- Often, a state machine is a convenient way to implement a stateful protocol, but they often involve a lot of messy boilerplate for managing how you transition from one state to the next, or what exactly happens when you enter a state. `pytomaton` was created to reduce this boilerplate code. Just as in a theoretical automaton, a `pytomaton.statemachine` has a list of states, a start state. At any given time, a state machine is in one single state. The programmer can invoke `statemachine.transition(new_state_name)` to transition to a new state; when this happens, the state machine checks to see if there are any actions which are triggered by this transition. Currently, actions can be triggered by entering a specific state (`on_enter`), or by transitioning from one specific state to another (`on_transition`). Methods are decorated as being triggered by transitions, as shown in the example below. Example ------- from pytomaton import statemachine, on_transition, on_enter class ConnectionMachine(statemachine): states = ['waiting_for_connection', 'waiting_for_ready', 'all_ready'] start_state = 'waiting_for_connection' def on_connect(self): self.transition('waiting_for_ready') @on_transition('waiting_for_connection', 'waiting_for_ready') def send_ready_prompt(self): self.broadcast('are you ready?') def receive_ready_confirm(self): if self.all_ready(): self.transition('all_ready') @on_enter('all_ready') def send_all_ready(self): self.broadcast('everyone is ready!') In this example, we define a `ConnectionMachine` that has three states. It starts in the `waiting_for_connection` state. When a user connects, in transitions to the `waiting_for_ready` state, which triggers a call to `send_ready_prompt`. When a user confirms that they're ready, we transition to the `on_ready` state, which triggers a call to `send_all_ready`.
Update the readme to be useful
Update the readme to be useful
Markdown
mit
haldean/pytomaton
markdown
## Code Before: pytomaton: State Machines in Python ========= Example ------- import pytomaton class ConnectionMachine(statemachine): states = ['waiting_for_connection', 'waiting_for_ready', 'all_ready'] start_state = 'state1' def on_connect(self): self.transition('waiting_for_ready') @on_transition('waiting_for_connection', 'waiting_for_ready') def send_ready_prompt(self): self.broadcast('are you ready?') def receive_ready_confirm(self): if self.all_ready(): self.transition('all_ready') @on_enter('all_ready') def send_all_ready(self): self.broadcase('everyone is ready!') ## Instruction: Update the readme to be useful ## Code After: pytomaton: State Machines in Python ========= Brief ----- Often, a state machine is a convenient way to implement a stateful protocol, but they often involve a lot of messy boilerplate for managing how you transition from one state to the next, or what exactly happens when you enter a state. `pytomaton` was created to reduce this boilerplate code. Just as in a theoretical automaton, a `pytomaton.statemachine` has a list of states, a start state. At any given time, a state machine is in one single state. The programmer can invoke `statemachine.transition(new_state_name)` to transition to a new state; when this happens, the state machine checks to see if there are any actions which are triggered by this transition. Currently, actions can be triggered by entering a specific state (`on_enter`), or by transitioning from one specific state to another (`on_transition`). Methods are decorated as being triggered by transitions, as shown in the example below. Example ------- from pytomaton import statemachine, on_transition, on_enter class ConnectionMachine(statemachine): states = ['waiting_for_connection', 'waiting_for_ready', 'all_ready'] start_state = 'waiting_for_connection' def on_connect(self): self.transition('waiting_for_ready') @on_transition('waiting_for_connection', 'waiting_for_ready') def send_ready_prompt(self): self.broadcast('are you ready?') def receive_ready_confirm(self): if self.all_ready(): self.transition('all_ready') @on_enter('all_ready') def send_all_ready(self): self.broadcast('everyone is ready!') In this example, we define a `ConnectionMachine` that has three states. It starts in the `waiting_for_connection` state. When a user connects, in transitions to the `waiting_for_ready` state, which triggers a call to `send_ready_prompt`. When a user confirms that they're ready, we transition to the `on_ready` state, which triggers a call to `send_all_ready`.
pytomaton: State Machines in Python ========= + + Brief + ----- + Often, a state machine is a convenient way to implement a stateful protocol, but + they often involve a lot of messy boilerplate for managing how you transition + from one state to the next, or what exactly happens when you enter a state. + `pytomaton` was created to reduce this boilerplate code. + + Just as in a theoretical automaton, a `pytomaton.statemachine` has a list of + states, a start state. At any given time, a state machine is in one single + state. The programmer can invoke `statemachine.transition(new_state_name)` to + transition to a new state; when this happens, the state machine checks to see if + there are any actions which are triggered by this transition. Currently, actions + can be triggered by entering a specific state (`on_enter`), or by transitioning + from one specific state to another (`on_transition`). Methods are decorated as + being triggered by transitions, as shown in the example below. Example ------- - import pytomaton + from pytomaton import statemachine, on_transition, on_enter class ConnectionMachine(statemachine): states = ['waiting_for_connection', 'waiting_for_ready', 'all_ready'] - start_state = 'state1' + start_state = 'waiting_for_connection' def on_connect(self): self.transition('waiting_for_ready') @on_transition('waiting_for_connection', 'waiting_for_ready') def send_ready_prompt(self): self.broadcast('are you ready?') def receive_ready_confirm(self): if self.all_ready(): self.transition('all_ready') @on_enter('all_ready') def send_all_ready(self): - self.broadcase('everyone is ready!') ? ^ + self.broadcast('everyone is ready!') ? ^ + + In this example, we define a `ConnectionMachine` that has three states. It + starts in the `waiting_for_connection` state. When a user connects, in + transitions to the `waiting_for_ready` state, which triggers a call to + `send_ready_prompt`. When a user confirms that they're ready, we transition to + the `on_ready` state, which triggers a call to `send_all_ready`.
28
1.076923
25
3
bc6716fc9ffb2ceace37a923a7c8017eca58caac
.travis.yml
.travis.yml
language: python sudo: false env: - TOXENV=py27 addons: apt: packages: - libgmp3-dev install: - pip install tox - pip install coveralls script: tox -- --ignore hydrachain/tests/test_sim_failures.py --ignore hydrachain/tests/test_sim_syncing.py after_success: coveralls
language: python sudo: false env: - TOXENV=py27 addons: apt: packages: - libgmp3-dev install: - pip install tox - pip install coveralls script: tox -- --ignore hydrachain/tests/test_sim_failures.py --ignore hydrachain/tests/test_sim_syncing.py after_success: coveralls deploy: provider: pypi user: ethereum_pypi_automated password: secure: BoK2BzNSPO/tYi2wk39zxaLrn+UaN/ThAszyvFhL6Ki2Bcd8DNMDVwzXrludbAGuQ0u/FRzRzFPpTdhFlXr9/jxbxIgSJ5NF/4coC96Y0+j3d597yLgAbHx0O0cw24iRroN7ngz81udXdDEC/LIpJhGAAZCEHwN27PDo1bsqyzYfeR5LbaiAj7f7syRi2BTdxTZN7pijP6EgHNzTTfRL4eG+V12JJ8IKnWwtftrWWsR7f/LA/+fTP7wJ1+RYx226xQe/5CW04n3A5DZhGZlC8hwg7TJzHGhO1QpFpMz33b3kMBsmPtbMdrhNvXIpm68VnLSrjG5KOfccI91BCBEY2KNx9sYMqMgETpbAIc6SQOP1EziTb6V6h/FZr0X0srerv7KiQihf3o6VuCeo6njr4pqFS1x1e5wLyhRszUZP7NQY8LersHSKhF92rvLNZQ05cngTbRF3dCKakeQpDALhWAsI05cJjeqHUpXJOiIWiSPpi2RG1B07JRU6e1V+nqiyCY8CfDDGtsimcaXzReTsOAHJAY+2V32rVik4ZGkBnghH5gvgirrJHOBe4eeuoJkoYQZKmW+QuyI5dLnISj0bqgRT3u9mjI2wsd+FbEUm2rjf0JC67GP5vNiADZV7H05Y6nWD94SDd9aPqjc5VZ/UGfNgybLu1wHqfAHalcjM1Oc= on: tags: true repo: HydraChain/hydrachain branch: develop
Enable automatic Travis CI -> PyPI deployments
Enable automatic Travis CI -> PyPI deployments
YAML
mit
wangkangda/hydrachain,wangkangda/hydrachain,HydraChain/hydrachain,HydraChain/hydrachain
yaml
## Code Before: language: python sudo: false env: - TOXENV=py27 addons: apt: packages: - libgmp3-dev install: - pip install tox - pip install coveralls script: tox -- --ignore hydrachain/tests/test_sim_failures.py --ignore hydrachain/tests/test_sim_syncing.py after_success: coveralls ## Instruction: Enable automatic Travis CI -> PyPI deployments ## Code After: language: python sudo: false env: - TOXENV=py27 addons: apt: packages: - libgmp3-dev install: - pip install tox - pip install coveralls script: tox -- --ignore hydrachain/tests/test_sim_failures.py --ignore hydrachain/tests/test_sim_syncing.py after_success: coveralls deploy: provider: pypi user: ethereum_pypi_automated password: secure: BoK2BzNSPO/tYi2wk39zxaLrn+UaN/ThAszyvFhL6Ki2Bcd8DNMDVwzXrludbAGuQ0u/FRzRzFPpTdhFlXr9/jxbxIgSJ5NF/4coC96Y0+j3d597yLgAbHx0O0cw24iRroN7ngz81udXdDEC/LIpJhGAAZCEHwN27PDo1bsqyzYfeR5LbaiAj7f7syRi2BTdxTZN7pijP6EgHNzTTfRL4eG+V12JJ8IKnWwtftrWWsR7f/LA/+fTP7wJ1+RYx226xQe/5CW04n3A5DZhGZlC8hwg7TJzHGhO1QpFpMz33b3kMBsmPtbMdrhNvXIpm68VnLSrjG5KOfccI91BCBEY2KNx9sYMqMgETpbAIc6SQOP1EziTb6V6h/FZr0X0srerv7KiQihf3o6VuCeo6njr4pqFS1x1e5wLyhRszUZP7NQY8LersHSKhF92rvLNZQ05cngTbRF3dCKakeQpDALhWAsI05cJjeqHUpXJOiIWiSPpi2RG1B07JRU6e1V+nqiyCY8CfDDGtsimcaXzReTsOAHJAY+2V32rVik4ZGkBnghH5gvgirrJHOBe4eeuoJkoYQZKmW+QuyI5dLnISj0bqgRT3u9mjI2wsd+FbEUm2rjf0JC67GP5vNiADZV7H05Y6nWD94SDd9aPqjc5VZ/UGfNgybLu1wHqfAHalcjM1Oc= on: tags: true repo: HydraChain/hydrachain branch: develop
language: python sudo: false env: - TOXENV=py27 addons: apt: packages: - libgmp3-dev install: - pip install tox - pip install coveralls script: tox -- --ignore hydrachain/tests/test_sim_failures.py --ignore hydrachain/tests/test_sim_syncing.py after_success: coveralls + deploy: + provider: pypi + user: ethereum_pypi_automated + password: + secure: BoK2BzNSPO/tYi2wk39zxaLrn+UaN/ThAszyvFhL6Ki2Bcd8DNMDVwzXrludbAGuQ0u/FRzRzFPpTdhFlXr9/jxbxIgSJ5NF/4coC96Y0+j3d597yLgAbHx0O0cw24iRroN7ngz81udXdDEC/LIpJhGAAZCEHwN27PDo1bsqyzYfeR5LbaiAj7f7syRi2BTdxTZN7pijP6EgHNzTTfRL4eG+V12JJ8IKnWwtftrWWsR7f/LA/+fTP7wJ1+RYx226xQe/5CW04n3A5DZhGZlC8hwg7TJzHGhO1QpFpMz33b3kMBsmPtbMdrhNvXIpm68VnLSrjG5KOfccI91BCBEY2KNx9sYMqMgETpbAIc6SQOP1EziTb6V6h/FZr0X0srerv7KiQihf3o6VuCeo6njr4pqFS1x1e5wLyhRszUZP7NQY8LersHSKhF92rvLNZQ05cngTbRF3dCKakeQpDALhWAsI05cJjeqHUpXJOiIWiSPpi2RG1B07JRU6e1V+nqiyCY8CfDDGtsimcaXzReTsOAHJAY+2V32rVik4ZGkBnghH5gvgirrJHOBe4eeuoJkoYQZKmW+QuyI5dLnISj0bqgRT3u9mjI2wsd+FbEUm2rjf0JC67GP5vNiADZV7H05Y6nWD94SDd9aPqjc5VZ/UGfNgybLu1wHqfAHalcjM1Oc= + on: + tags: true + repo: HydraChain/hydrachain + branch: develop
9
0.692308
9
0
efc86ce1b23632b2dc70e4f90fdd1cf4ffca588e
.travis.yml
.travis.yml
language: node_js node_js: - 4 - 6 sudo: false cache: yarn: true before_install: - curl -o- -L https://yarnpkg.com/install.sh | bash - export PATH=$HOME/.yarn/bin:$PATH install: - yarn install --no-lockfile script: - yarn test deploy: provider: npm email: ghedamat@gmail.com api_key: secure: MDGspGYSoGecqxePVz9c9MCuTA0L0NhNv1HaHzuLeq6/DTb4TqpIcgAx7tG3fnMOG8IvIv60J3fAD/GY6eYfrdWp0RwfrXbihsEM5VNVdeT4t++eV1bkWNk2CvmASyPCQt3nrchkkth+W2pV2NrZok+hFyvTOxIUdMzKgOEvPjE= on: tags: true repo: ember-cli-deploy/ember-cli-deploy-redis
language: node_js node_js: - '4' - '6' - '8' - '10' sudo: false cache: yarn: true before_install: - curl -o- -L https://yarnpkg.com/install.sh | bash - export PATH=$HOME/.yarn/bin:$PATH install: - yarn install --no-lockfile script: - yarn test deploy: provider: npm email: ghedamat@gmail.com api_key: secure: MDGspGYSoGecqxePVz9c9MCuTA0L0NhNv1HaHzuLeq6/DTb4TqpIcgAx7tG3fnMOG8IvIv60J3fAD/GY6eYfrdWp0RwfrXbihsEM5VNVdeT4t++eV1bkWNk2CvmASyPCQt3nrchkkth+W2pV2NrZok+hFyvTOxIUdMzKgOEvPjE= on: tags: true repo: ember-cli-deploy/ember-cli-deploy-redis
Test against Node 8 and 10
Test against Node 8 and 10
YAML
mit
ember-cli-deploy/ember-cli-deploy-redis,ember-cli-deploy/ember-cli-deploy-redis
yaml
## Code Before: language: node_js node_js: - 4 - 6 sudo: false cache: yarn: true before_install: - curl -o- -L https://yarnpkg.com/install.sh | bash - export PATH=$HOME/.yarn/bin:$PATH install: - yarn install --no-lockfile script: - yarn test deploy: provider: npm email: ghedamat@gmail.com api_key: secure: MDGspGYSoGecqxePVz9c9MCuTA0L0NhNv1HaHzuLeq6/DTb4TqpIcgAx7tG3fnMOG8IvIv60J3fAD/GY6eYfrdWp0RwfrXbihsEM5VNVdeT4t++eV1bkWNk2CvmASyPCQt3nrchkkth+W2pV2NrZok+hFyvTOxIUdMzKgOEvPjE= on: tags: true repo: ember-cli-deploy/ember-cli-deploy-redis ## Instruction: Test against Node 8 and 10 ## Code After: language: node_js node_js: - '4' - '6' - '8' - '10' sudo: false cache: yarn: true before_install: - curl -o- -L https://yarnpkg.com/install.sh | bash - export PATH=$HOME/.yarn/bin:$PATH install: - yarn install --no-lockfile script: - yarn test deploy: provider: npm email: ghedamat@gmail.com api_key: secure: MDGspGYSoGecqxePVz9c9MCuTA0L0NhNv1HaHzuLeq6/DTb4TqpIcgAx7tG3fnMOG8IvIv60J3fAD/GY6eYfrdWp0RwfrXbihsEM5VNVdeT4t++eV1bkWNk2CvmASyPCQt3nrchkkth+W2pV2NrZok+hFyvTOxIUdMzKgOEvPjE= on: tags: true repo: ember-cli-deploy/ember-cli-deploy-redis
language: node_js node_js: - - 4 + - '4' ? + + - - 6 + - '6' ? + + + - '8' + - '10' sudo: false cache: yarn: true before_install: - curl -o- -L https://yarnpkg.com/install.sh | bash - export PATH=$HOME/.yarn/bin:$PATH install: - yarn install --no-lockfile script: - yarn test deploy: provider: npm email: ghedamat@gmail.com api_key: secure: MDGspGYSoGecqxePVz9c9MCuTA0L0NhNv1HaHzuLeq6/DTb4TqpIcgAx7tG3fnMOG8IvIv60J3fAD/GY6eYfrdWp0RwfrXbihsEM5VNVdeT4t++eV1bkWNk2CvmASyPCQt3nrchkkth+W2pV2NrZok+hFyvTOxIUdMzKgOEvPjE= on: tags: true repo: ember-cli-deploy/ember-cli-deploy-redis
6
0.230769
4
2
f7d593233b95e1e024a248f026f4484040f82c2b
reviewboard/templates/accounts/password_reset.html
reviewboard/templates/accounts/password_reset.html
{% extends "base.html" %} {% load djblets_deco i18n %} {% block title %}{% trans "Recover Password" %}{% endblock %} {% block content %} {% box "passwordreset" %} <form method="post" action="."> {# This should really use {% csrf_token %}, but we can't until we #} {# move to Django 1.2 in a future release. #} {% if csrf_token %} {% if csrf_token != "NOTPROVIDED" %} <div style="display: none;"><input type="hidden" name="csrfmiddlewaretoken" value="{{csrf_token}}" /></div> {% endif %} {% endif %} <div class="box-head"> <h1 class="box-title">{% trans "Recover Password" %}</h1> </div> <div class="box-main"> <p>{% blocktrans %}Forgotten your password? Enter your e-mail address, and we'll send you instructions for creating a new one.{% endblocktrans %}</p> <table> <tr> <td class="label"><label for="id_email">{% trans "E-mail address" %}</label></td> <td class="field"><input type="text" name="email" id="id_email" /></td> <td class="field"><input type="submit" value="{% trans "Recover" %}" /></td> </tr> </table> </div> </form> {% endbox %} {% endblock %}
{% extends "base.html" %} {% load djblets_deco i18n %} {% block title %}{% trans "Recover Password" %}{% endblock %} {% block content %} {% box "passwordreset" %} <form method="post" action="."> {% csrf_token %} <div class="box-head"> <h1 class="box-title">{% trans "Recover Password" %}</h1> </div> <div class="box-main"> <p>{% blocktrans %}Forgotten your password? Enter your e-mail address, and we'll send you instructions for creating a new one.{% endblocktrans %}</p> <table> <tr> <td class="label"><label for="id_email">{% trans "E-mail address" %}</label></td> <td class="field"><input type="text" name="email" id="id_email" /></td> <td class="field"><input type="submit" value="{% trans "Recover" %}" /></td> </tr> </table> </div> </form> {% endbox %} {% endblock %}
Fix up password reset template to use modern CSRF protection.
Fix up password reset template to use modern CSRF protection. Once upon a time, we rolled our own CSRF protection. This file was somehow never updated for it, and still had a comment about what we should do when moving to Django 1.2(!). Testing done: Went through complete password reset flow. Reviewed at https://reviews.reviewboard.org/r/6405/
HTML
mit
reviewboard/reviewboard,KnowNo/reviewboard,bkochendorfer/reviewboard,reviewboard/reviewboard,davidt/reviewboard,KnowNo/reviewboard,beol/reviewboard,beol/reviewboard,sgallagher/reviewboard,davidt/reviewboard,brennie/reviewboard,custode/reviewboard,davidt/reviewboard,sgallagher/reviewboard,chipx86/reviewboard,beol/reviewboard,bkochendorfer/reviewboard,KnowNo/reviewboard,chipx86/reviewboard,brennie/reviewboard,bkochendorfer/reviewboard,chipx86/reviewboard,reviewboard/reviewboard,custode/reviewboard,bkochendorfer/reviewboard,beol/reviewboard,custode/reviewboard,brennie/reviewboard,KnowNo/reviewboard,brennie/reviewboard,reviewboard/reviewboard,chipx86/reviewboard,davidt/reviewboard,custode/reviewboard,sgallagher/reviewboard,sgallagher/reviewboard
html
## Code Before: {% extends "base.html" %} {% load djblets_deco i18n %} {% block title %}{% trans "Recover Password" %}{% endblock %} {% block content %} {% box "passwordreset" %} <form method="post" action="."> {# This should really use {% csrf_token %}, but we can't until we #} {# move to Django 1.2 in a future release. #} {% if csrf_token %} {% if csrf_token != "NOTPROVIDED" %} <div style="display: none;"><input type="hidden" name="csrfmiddlewaretoken" value="{{csrf_token}}" /></div> {% endif %} {% endif %} <div class="box-head"> <h1 class="box-title">{% trans "Recover Password" %}</h1> </div> <div class="box-main"> <p>{% blocktrans %}Forgotten your password? Enter your e-mail address, and we'll send you instructions for creating a new one.{% endblocktrans %}</p> <table> <tr> <td class="label"><label for="id_email">{% trans "E-mail address" %}</label></td> <td class="field"><input type="text" name="email" id="id_email" /></td> <td class="field"><input type="submit" value="{% trans "Recover" %}" /></td> </tr> </table> </div> </form> {% endbox %} {% endblock %} ## Instruction: Fix up password reset template to use modern CSRF protection. Once upon a time, we rolled our own CSRF protection. This file was somehow never updated for it, and still had a comment about what we should do when moving to Django 1.2(!). Testing done: Went through complete password reset flow. Reviewed at https://reviews.reviewboard.org/r/6405/ ## Code After: {% extends "base.html" %} {% load djblets_deco i18n %} {% block title %}{% trans "Recover Password" %}{% endblock %} {% block content %} {% box "passwordreset" %} <form method="post" action="."> {% csrf_token %} <div class="box-head"> <h1 class="box-title">{% trans "Recover Password" %}</h1> </div> <div class="box-main"> <p>{% blocktrans %}Forgotten your password? Enter your e-mail address, and we'll send you instructions for creating a new one.{% endblocktrans %}</p> <table> <tr> <td class="label"><label for="id_email">{% trans "E-mail address" %}</label></td> <td class="field"><input type="text" name="email" id="id_email" /></td> <td class="field"><input type="submit" value="{% trans "Recover" %}" /></td> </tr> </table> </div> </form> {% endbox %} {% endblock %}
{% extends "base.html" %} {% load djblets_deco i18n %} {% block title %}{% trans "Recover Password" %}{% endblock %} {% block content %} - {% box "passwordreset" %} + {% box "passwordreset" %} ? + <form method="post" action="."> + {% csrf_token %} - {# This should really use {% csrf_token %}, but we can't until we #} - {# move to Django 1.2 in a future release. #} - {% if csrf_token %} - {% if csrf_token != "NOTPROVIDED" %} - <div style="display: none;"><input type="hidden" name="csrfmiddlewaretoken" value="{{csrf_token}}" /></div> - {% endif %} - - {% endif %} <div class="box-head"> <h1 class="box-title">{% trans "Recover Password" %}</h1> </div> <div class="box-main"> <p>{% blocktrans %}Forgotten your password? Enter your e-mail address, and we'll send you instructions for creating a new one.{% endblocktrans %}</p> <table> <tr> <td class="label"><label for="id_email">{% trans "E-mail address" %}</label></td> <td class="field"><input type="text" name="email" id="id_email" /></td> <td class="field"><input type="submit" value="{% trans "Recover" %}" /></td> </tr> </table> </div> </form> - {% endbox %} + {% endbox %} ? + {% endblock %}
13
0.382353
3
10
b05aed1ba4ec2a9d4177850c2fe06d4992614a59
Changes.md
Changes.md
v 0.3.1 ------- - add CSRF tags to forms so it will work with sidekiq >= 3.4.2 - remove tilt dependency v 0.3.0 ------- - suport for Active Job - sidekiq cron web ui needs to be loaded by: require 'sidekiq/cron/web' - add load_from_hash! and load_from_array! which cleanup jobs before adding new ones v 0.1.1 ------- - add Web fontend with enabled/disable job, unqueue now, delete job - add cron poller - enqueu cro jobs - add cron job - save all needed data to redis
v 0.4.0 ------- - enable to work with sidekiq >= 4.0.0 - fix readme v 0.3.1 ------- - add CSRF tags to forms so it will work with sidekiq >= 3.4.2 - remove tilt dependency v 0.3.0 ------- - suport for Active Job - sidekiq cron web ui needs to be loaded by: require 'sidekiq/cron/web' - add load_from_hash! and load_from_array! which cleanup jobs before adding new ones v 0.1.1 ------- - add Web fontend with enabled/disable job, unqueue now, delete job - add cron poller - enqueu cro jobs - add cron job - save all needed data to redis
Update change log with information for version 0.4.0
Update change log with information for version 0.4.0
Markdown
mit
ondrejbartas/sidekiq-cron,ondrejbartas/sidekiq-cron,farainc/sidekiq-cron,farainc/sidekiq-cron
markdown
## Code Before: v 0.3.1 ------- - add CSRF tags to forms so it will work with sidekiq >= 3.4.2 - remove tilt dependency v 0.3.0 ------- - suport for Active Job - sidekiq cron web ui needs to be loaded by: require 'sidekiq/cron/web' - add load_from_hash! and load_from_array! which cleanup jobs before adding new ones v 0.1.1 ------- - add Web fontend with enabled/disable job, unqueue now, delete job - add cron poller - enqueu cro jobs - add cron job - save all needed data to redis ## Instruction: Update change log with information for version 0.4.0 ## Code After: v 0.4.0 ------- - enable to work with sidekiq >= 4.0.0 - fix readme v 0.3.1 ------- - add CSRF tags to forms so it will work with sidekiq >= 3.4.2 - remove tilt dependency v 0.3.0 ------- - suport for Active Job - sidekiq cron web ui needs to be loaded by: require 'sidekiq/cron/web' - add load_from_hash! and load_from_array! which cleanup jobs before adding new ones v 0.1.1 ------- - add Web fontend with enabled/disable job, unqueue now, delete job - add cron poller - enqueu cro jobs - add cron job - save all needed data to redis
+ v 0.4.0 + ------- + + - enable to work with sidekiq >= 4.0.0 + - fix readme + v 0.3.1 ------- - add CSRF tags to forms so it will work with sidekiq >= 3.4.2 - remove tilt dependency v 0.3.0 ------- - suport for Active Job - sidekiq cron web ui needs to be loaded by: require 'sidekiq/cron/web' - add load_from_hash! and load_from_array! which cleanup jobs before adding new ones v 0.1.1 ------- - add Web fontend with enabled/disable job, unqueue now, delete job - add cron poller - enqueu cro jobs - add cron job - save all needed data to redis
6
0.315789
6
0
56e285cdeebc64007e8135b930f43389e038510d
dygraphs-gwt/src/main/java/com/github/timeu/dygraphsgwt/client/callbacks/PointClickCallback.java
dygraphs-gwt/src/main/java/com/github/timeu/dygraphsgwt/client/callbacks/PointClickCallback.java
package com.github.timeu.dygraphsgwt.client.callbacks; import com.google.gwt.event.dom.client.MouseEvent; import jsinterop.annotations.JsFunction; /** * Created by uemit.seren on 7/30/15. */ @FunctionalInterface @JsFunction public interface PointClickCallback { /** * A function to call when a data point is clicked. and the point that was clicked. * * @param event Mousevent * @param point Point that was clicked */ void onClick(MouseEvent event,Point point); }
package com.github.timeu.dygraphsgwt.client.callbacks; import com.google.gwt.dom.client.NativeEvent; import com.google.gwt.event.dom.client.MouseEvent; import jsinterop.annotations.JsFunction; /** * Created by uemit.seren on 7/30/15. */ @FunctionalInterface @JsFunction public interface PointClickCallback { /** * A function to call when a data point is clicked. and the point that was clicked. * * @param event Mousevent * @param point Point that was clicked */ void onClick(NativeEvent event, Point point); }
Use NativEvent instead of MouseEvent
Bugfix: Use NativEvent instead of MouseEvent
Java
mit
timeu/dygraphs-gwt,timeu/dygraphs-gwt,timeu/dygraphs-gwt
java
## Code Before: package com.github.timeu.dygraphsgwt.client.callbacks; import com.google.gwt.event.dom.client.MouseEvent; import jsinterop.annotations.JsFunction; /** * Created by uemit.seren on 7/30/15. */ @FunctionalInterface @JsFunction public interface PointClickCallback { /** * A function to call when a data point is clicked. and the point that was clicked. * * @param event Mousevent * @param point Point that was clicked */ void onClick(MouseEvent event,Point point); } ## Instruction: Bugfix: Use NativEvent instead of MouseEvent ## Code After: package com.github.timeu.dygraphsgwt.client.callbacks; import com.google.gwt.dom.client.NativeEvent; import com.google.gwt.event.dom.client.MouseEvent; import jsinterop.annotations.JsFunction; /** * Created by uemit.seren on 7/30/15. */ @FunctionalInterface @JsFunction public interface PointClickCallback { /** * A function to call when a data point is clicked. and the point that was clicked. * * @param event Mousevent * @param point Point that was clicked */ void onClick(NativeEvent event, Point point); }
package com.github.timeu.dygraphsgwt.client.callbacks; + import com.google.gwt.dom.client.NativeEvent; import com.google.gwt.event.dom.client.MouseEvent; import jsinterop.annotations.JsFunction; /** * Created by uemit.seren on 7/30/15. */ @FunctionalInterface @JsFunction public interface PointClickCallback { /** * A function to call when a data point is clicked. and the point that was clicked. * * @param event Mousevent * @param point Point that was clicked */ - void onClick(MouseEvent event,Point point); ? ^^^^ + void onClick(NativeEvent event, Point point); ? ^^^^^ + }
3
0.157895
2
1
8aeed91e8ac690eb24e74b3cca5b714b69a3a85d
utils/websockettracker.go
utils/websockettracker.go
package utils import ( "github.com/gorilla/websocket" ) type WebSocketManager interface { Register(ws *websocket.Conn) Write(msg []byte) (n int, e error) } type wsManager struct { sockets []websocket.Conn } func CreateWSManager() WebSocketManager { return &wsManager{sockets: make([]websocket.Conn, 0)} } func (ws *wsManager) Register(conn *websocket.Conn) { ws.sockets = append(ws.sockets, *conn) } func (ws *wsManager) Write(msg []byte) (n int, e error) { invalid := make([]int, 0) for k, v := range ws.sockets { err := v.WriteMessage(websocket.TextMessage, msg) if err != nil { invalid = append(invalid, k) } } if len(invalid) > 0 { for b := range invalid { ws.sockets = append(ws.sockets[:b], ws.sockets[b+1:]...) } } n = len(msg) return }
package utils import ( "github.com/gorilla/websocket" ) type WebSocketManager interface { Register(ws *websocket.Conn) Write(msg []byte) (n int, e error) } type wsManager struct { sockets []websocket.Conn } func CreateWSManager() WebSocketManager { return &wsManager{sockets: make([]websocket.Conn, 0)} } func (ws *wsManager) Register(conn *websocket.Conn) { ws.sockets = append(ws.sockets, *conn) } func (ws *wsManager) Write(msg []byte) (n int, e error) { invalid := make([]int, 0) for k, v := range ws.sockets { err := v.WriteMessage(websocket.TextMessage, msg) if err != nil { invalid = append(invalid, k) } } if len(invalid) > 0 { for b := range invalid { if len(ws.sockets) == 1 { ws.sockets = make([]websocket.Conn, 0) } else { ws.sockets = append(ws.sockets[:b], ws.sockets[b+1:]...) } } } n = len(msg) return }
Fix bug when only one websocket was connected
Fix bug when only one websocket was connected
Go
apache-2.0
PufferPanel/pufferd
go
## Code Before: package utils import ( "github.com/gorilla/websocket" ) type WebSocketManager interface { Register(ws *websocket.Conn) Write(msg []byte) (n int, e error) } type wsManager struct { sockets []websocket.Conn } func CreateWSManager() WebSocketManager { return &wsManager{sockets: make([]websocket.Conn, 0)} } func (ws *wsManager) Register(conn *websocket.Conn) { ws.sockets = append(ws.sockets, *conn) } func (ws *wsManager) Write(msg []byte) (n int, e error) { invalid := make([]int, 0) for k, v := range ws.sockets { err := v.WriteMessage(websocket.TextMessage, msg) if err != nil { invalid = append(invalid, k) } } if len(invalid) > 0 { for b := range invalid { ws.sockets = append(ws.sockets[:b], ws.sockets[b+1:]...) } } n = len(msg) return } ## Instruction: Fix bug when only one websocket was connected ## Code After: package utils import ( "github.com/gorilla/websocket" ) type WebSocketManager interface { Register(ws *websocket.Conn) Write(msg []byte) (n int, e error) } type wsManager struct { sockets []websocket.Conn } func CreateWSManager() WebSocketManager { return &wsManager{sockets: make([]websocket.Conn, 0)} } func (ws *wsManager) Register(conn *websocket.Conn) { ws.sockets = append(ws.sockets, *conn) } func (ws *wsManager) Write(msg []byte) (n int, e error) { invalid := make([]int, 0) for k, v := range ws.sockets { err := v.WriteMessage(websocket.TextMessage, msg) if err != nil { invalid = append(invalid, k) } } if len(invalid) > 0 { for b := range invalid { if len(ws.sockets) == 1 { ws.sockets = make([]websocket.Conn, 0) } else { ws.sockets = append(ws.sockets[:b], ws.sockets[b+1:]...) } } } n = len(msg) return }
package utils import ( "github.com/gorilla/websocket" ) type WebSocketManager interface { Register(ws *websocket.Conn) Write(msg []byte) (n int, e error) } type wsManager struct { sockets []websocket.Conn } func CreateWSManager() WebSocketManager { return &wsManager{sockets: make([]websocket.Conn, 0)} } func (ws *wsManager) Register(conn *websocket.Conn) { ws.sockets = append(ws.sockets, *conn) } func (ws *wsManager) Write(msg []byte) (n int, e error) { invalid := make([]int, 0) for k, v := range ws.sockets { err := v.WriteMessage(websocket.TextMessage, msg) if err != nil { invalid = append(invalid, k) } } if len(invalid) > 0 { for b := range invalid { + if len(ws.sockets) == 1 { + ws.sockets = make([]websocket.Conn, 0) + } else { - ws.sockets = append(ws.sockets[:b], ws.sockets[b+1:]...) + ws.sockets = append(ws.sockets[:b], ws.sockets[b+1:]...) ? + + } } } n = len(msg) return }
6
0.15
5
1
fdf3cf5062d7c4464a25e969eb4d8fad8dc36056
appveyor.yml
appveyor.yml
version: 0.0.{build} configuration: Release platform: Any CPU clone_depth: 1 assembly_info: patch: true file: '**\AssemblyInfo.*' assembly_version: '{version}' assembly_file_version: '{version}' assembly_informational_version: '{version}' cache: C:\Users\appveyor\AppData\Local\NuGet\Cache before_build: - nuget restore Saucy.sln build: project: Saucy.sln verbosity: normal after_build: - .\packages\ilmerge.2.14.1208\tools\ilmerge.exe /allowDup /wildcards /out:saucy.exe src\Saucy\bin\Release\Saucy.exe src\Saucy\bin\Release\*.dll - nuget pack Saucy.nuspec -Version "%APPVEYOR_BUILD_VERSION%" -Properties "Configuration=Release;Platform=AnyCPU" artifacts: - path: Saucy.nupkg - path: ConsoleOut.log - path: ConsoleError.log deploy: - provider: NuGet api_key: secure: 4eGPThK/wSpRmfINQgAGQZD/e8r6FKRfp0SN4nB5/FBTHKJ1xIf/BK3/Iz5csDFm artifact: /.*\.nupkg/
version: 0.0.{build} configuration: Release platform: Any CPU clone_depth: 1 assembly_info: patch: true file: '**\AssemblyInfo.*' assembly_version: '{version}' assembly_file_version: '{version}' assembly_informational_version: '{version}' cache: C:\Users\appveyor\AppData\Local\NuGet\Cache before_build: - nuget restore Saucy.sln build: project: Saucy.sln verbosity: normal after_build: - .\packages\ilmerge.2.14.1208\tools\ilmerge.exe /allowDup /wildcards /out:saucy.exe src\Saucy\bin\Release\Saucy.exe src\Saucy\bin\Release\*.dll - nuget pack Saucy.nuspec -Version "%APPVEYOR_BUILD_VERSION%" -Properties "Configuration=Release;Platform=AnyCPU" artifacts: - path: Saucy.%APPVEYOR_BUILD_VERSION%.nupkg deploy: - provider: NuGet api_key: secure: 4eGPThK/wSpRmfINQgAGQZD/e8r6FKRfp0SN4nB5/FBTHKJ1xIf/BK3/Iz5csDFm artifact: /.*\.nupkg/
Fix identification of nupkg artifact
Fix identification of nupkg artifact
YAML
mit
acraven/saucy
yaml
## Code Before: version: 0.0.{build} configuration: Release platform: Any CPU clone_depth: 1 assembly_info: patch: true file: '**\AssemblyInfo.*' assembly_version: '{version}' assembly_file_version: '{version}' assembly_informational_version: '{version}' cache: C:\Users\appveyor\AppData\Local\NuGet\Cache before_build: - nuget restore Saucy.sln build: project: Saucy.sln verbosity: normal after_build: - .\packages\ilmerge.2.14.1208\tools\ilmerge.exe /allowDup /wildcards /out:saucy.exe src\Saucy\bin\Release\Saucy.exe src\Saucy\bin\Release\*.dll - nuget pack Saucy.nuspec -Version "%APPVEYOR_BUILD_VERSION%" -Properties "Configuration=Release;Platform=AnyCPU" artifacts: - path: Saucy.nupkg - path: ConsoleOut.log - path: ConsoleError.log deploy: - provider: NuGet api_key: secure: 4eGPThK/wSpRmfINQgAGQZD/e8r6FKRfp0SN4nB5/FBTHKJ1xIf/BK3/Iz5csDFm artifact: /.*\.nupkg/ ## Instruction: Fix identification of nupkg artifact ## Code After: version: 0.0.{build} configuration: Release platform: Any CPU clone_depth: 1 assembly_info: patch: true file: '**\AssemblyInfo.*' assembly_version: '{version}' assembly_file_version: '{version}' assembly_informational_version: '{version}' cache: C:\Users\appveyor\AppData\Local\NuGet\Cache before_build: - nuget restore Saucy.sln build: project: Saucy.sln verbosity: normal after_build: - .\packages\ilmerge.2.14.1208\tools\ilmerge.exe /allowDup /wildcards /out:saucy.exe src\Saucy\bin\Release\Saucy.exe src\Saucy\bin\Release\*.dll - nuget pack Saucy.nuspec -Version "%APPVEYOR_BUILD_VERSION%" -Properties "Configuration=Release;Platform=AnyCPU" artifacts: - path: Saucy.%APPVEYOR_BUILD_VERSION%.nupkg deploy: - provider: NuGet api_key: secure: 4eGPThK/wSpRmfINQgAGQZD/e8r6FKRfp0SN4nB5/FBTHKJ1xIf/BK3/Iz5csDFm artifact: /.*\.nupkg/
version: 0.0.{build} configuration: Release platform: Any CPU clone_depth: 1 assembly_info: patch: true file: '**\AssemblyInfo.*' assembly_version: '{version}' assembly_file_version: '{version}' assembly_informational_version: '{version}' cache: C:\Users\appveyor\AppData\Local\NuGet\Cache before_build: - nuget restore Saucy.sln build: project: Saucy.sln verbosity: normal after_build: - .\packages\ilmerge.2.14.1208\tools\ilmerge.exe /allowDup /wildcards /out:saucy.exe src\Saucy\bin\Release\Saucy.exe src\Saucy\bin\Release\*.dll - nuget pack Saucy.nuspec -Version "%APPVEYOR_BUILD_VERSION%" -Properties "Configuration=Release;Platform=AnyCPU" artifacts: + - path: Saucy.%APPVEYOR_BUILD_VERSION%.nupkg - - path: Saucy.nupkg - - path: ConsoleOut.log - - path: ConsoleError.log deploy: - provider: NuGet api_key: secure: 4eGPThK/wSpRmfINQgAGQZD/e8r6FKRfp0SN4nB5/FBTHKJ1xIf/BK3/Iz5csDFm artifact: /.*\.nupkg/
4
0.142857
1
3
aefd972c7fb423396f59da03a1d460cd3559d1e1
duplicate_questions/data/tokenizers/word_tokenizers.py
duplicate_questions/data/tokenizers/word_tokenizers.py
class SpacyWordTokenizer(): """ A Tokenizer splits strings into word tokens. """ def __init__(self): # Import is here it's slow, and can be unnecessary. import spacy self.en_nlp = spacy.load('en') # def tokenize(self, sentence: str) -> List[str]: def tokenize(self, sentence): return [str(token.lower_) for token in self.en_nlp.tokenizer(sentence)] # def get_words_for_indexer(self, text: str) -> List[str]: def get_words_for_indexer(self, text): return self.tokenize(text) # def index_text(self, text: str, data_indexer: DataIndexer) -> List: def index_text(self, text, data_indexer): return [data_indexer.get_word_index(word) for word in self.get_words_for_indexer(text)]
class SpacyWordTokenizer(): """ A Tokenizer splits strings into word tokens. """ def __init__(self): # Import is here it's slow, and can be unnecessary. import spacy self.en_nlp = spacy.load('en') def tokenize(self, sentence): return [str(token.lower_) for token in self.en_nlp.tokenizer(sentence)] def get_words_for_indexer(self, text): return self.tokenize(text) def index_text(self, text, data_indexer): return [data_indexer.get_word_index(word) for word in self.get_words_for_indexer(text)]
Remove unnecesssary comments of old function signatures
Remove unnecesssary comments of old function signatures
Python
mit
nelson-liu/paraphrase-id-tensorflow,nelson-liu/paraphrase-id-tensorflow
python
## Code Before: class SpacyWordTokenizer(): """ A Tokenizer splits strings into word tokens. """ def __init__(self): # Import is here it's slow, and can be unnecessary. import spacy self.en_nlp = spacy.load('en') # def tokenize(self, sentence: str) -> List[str]: def tokenize(self, sentence): return [str(token.lower_) for token in self.en_nlp.tokenizer(sentence)] # def get_words_for_indexer(self, text: str) -> List[str]: def get_words_for_indexer(self, text): return self.tokenize(text) # def index_text(self, text: str, data_indexer: DataIndexer) -> List: def index_text(self, text, data_indexer): return [data_indexer.get_word_index(word) for word in self.get_words_for_indexer(text)] ## Instruction: Remove unnecesssary comments of old function signatures ## Code After: class SpacyWordTokenizer(): """ A Tokenizer splits strings into word tokens. """ def __init__(self): # Import is here it's slow, and can be unnecessary. import spacy self.en_nlp = spacy.load('en') def tokenize(self, sentence): return [str(token.lower_) for token in self.en_nlp.tokenizer(sentence)] def get_words_for_indexer(self, text): return self.tokenize(text) def index_text(self, text, data_indexer): return [data_indexer.get_word_index(word) for word in self.get_words_for_indexer(text)]
class SpacyWordTokenizer(): """ A Tokenizer splits strings into word tokens. """ def __init__(self): # Import is here it's slow, and can be unnecessary. import spacy self.en_nlp = spacy.load('en') - # def tokenize(self, sentence: str) -> List[str]: def tokenize(self, sentence): return [str(token.lower_) for token in self.en_nlp.tokenizer(sentence)] - # def get_words_for_indexer(self, text: str) -> List[str]: def get_words_for_indexer(self, text): return self.tokenize(text) - # def index_text(self, text: str, data_indexer: DataIndexer) -> List: def index_text(self, text, data_indexer): return [data_indexer.get_word_index(word) for word in self.get_words_for_indexer(text)]
3
0.142857
0
3
d1b8a31c76ca6aa5bbbb0dab98e9590bd4e14b6e
Cargo.toml
Cargo.toml
[package] name = "wifi" version = "0.1.0" authors = ["Tim Whitaker <camp4climber@gmail.com>"] description = "Library for getting wifi information" repository = "https://github.com/camp4climber/wifi" homepage = "https://github.com/camp4climber/wifi" license = "MIT" readme = "README.md" [dependencies]
[package] name = "wifi" version = "0.1.0" authors = ["Tim Whitaker <camp4climber@gmail.com>"] description = "Library for getting wifi information" repository = "https://github.com/camp4climber/wifi" homepage = "https://github.com/camp4climber/wifi" license = "MIT" readme = "README.md" [dependencies] os = "0.1.0"
Add os crate as a dependency
Add os crate as a dependency
TOML
mit
camp4climber/wifi
toml
## Code Before: [package] name = "wifi" version = "0.1.0" authors = ["Tim Whitaker <camp4climber@gmail.com>"] description = "Library for getting wifi information" repository = "https://github.com/camp4climber/wifi" homepage = "https://github.com/camp4climber/wifi" license = "MIT" readme = "README.md" [dependencies] ## Instruction: Add os crate as a dependency ## Code After: [package] name = "wifi" version = "0.1.0" authors = ["Tim Whitaker <camp4climber@gmail.com>"] description = "Library for getting wifi information" repository = "https://github.com/camp4climber/wifi" homepage = "https://github.com/camp4climber/wifi" license = "MIT" readme = "README.md" [dependencies] os = "0.1.0"
[package] name = "wifi" version = "0.1.0" authors = ["Tim Whitaker <camp4climber@gmail.com>"] description = "Library for getting wifi information" repository = "https://github.com/camp4climber/wifi" homepage = "https://github.com/camp4climber/wifi" license = "MIT" readme = "README.md" [dependencies] + os = "0.1.0"
1
0.083333
1
0
0afc147bc04e490cf2a2e1c2ce103b41fc3bb866
gistory.sh
gistory.sh
repos=(membership_ruby_wrapper membership_api) for repo in "${repos[@]}" do echo ${repo} cd ${repo} git pull git log --since `date -d "-14 day" "+%F"` --pretty=format:'%Cgreen %an: %Creset %s' --abbrev-commit cd .. #and go back done
base="git@git.xogrp.com:membership/" repos=(membership_ruby_wrapper membership_api the_knot_membership_rails favorites_api xo_favorites) if ! git up ; then gem install git-up fi if [ ! -d "repos" ]; then mkdir "repos" fi cd "repos" for repo in "${repos[@]}" do echo ${repo} if [ ! -d "$repo" ]; then git clone "$base$repo.git" fi cd ${repo} git fetch --all git pull git up git log --since `date -d "-14 day" "+%F"` --pretty=format:'%Cgreen %an: %Creset %s' --abbrev-commit cd .. #and go back done
Add dependency checks and git-up gem
Add dependency checks and git-up gem
Shell
apache-2.0
dmitrinesterenko/gistory
shell
## Code Before: repos=(membership_ruby_wrapper membership_api) for repo in "${repos[@]}" do echo ${repo} cd ${repo} git pull git log --since `date -d "-14 day" "+%F"` --pretty=format:'%Cgreen %an: %Creset %s' --abbrev-commit cd .. #and go back done ## Instruction: Add dependency checks and git-up gem ## Code After: base="git@git.xogrp.com:membership/" repos=(membership_ruby_wrapper membership_api the_knot_membership_rails favorites_api xo_favorites) if ! git up ; then gem install git-up fi if [ ! -d "repos" ]; then mkdir "repos" fi cd "repos" for repo in "${repos[@]}" do echo ${repo} if [ ! -d "$repo" ]; then git clone "$base$repo.git" fi cd ${repo} git fetch --all git pull git up git log --since `date -d "-14 day" "+%F"` --pretty=format:'%Cgreen %an: %Creset %s' --abbrev-commit cd .. #and go back done
+ base="git@git.xogrp.com:membership/" + repos=(membership_ruby_wrapper membership_api the_knot_membership_rails favorites_api xo_favorites) - repos=(membership_ruby_wrapper membership_api) + if ! git up ; then + gem install git-up + fi + + if [ ! -d "repos" ]; then + mkdir "repos" + fi + cd "repos" for repo in "${repos[@]}" do echo ${repo} + if [ ! -d "$repo" ]; then + git clone "$base$repo.git" + fi cd ${repo} + git fetch --all git pull + git up git log --since `date -d "-14 day" "+%F"` --pretty=format:'%Cgreen %an: %Creset %s' --abbrev-commit cd .. #and go back done
16
1.454545
15
1
228e64096902f6bcd14aca8be5333fc69cbc80bc
server/database.c
server/database.c
static sqlite3 *db; int _mqtt_db_create_tables(void); int mqtt_db_open(const char *filename) { if(sqlite3_open(filename, &db) != SQLITE_OK){ fprintf(stderr, "Error: %s\n", sqlite3_errmsg(db)); return 1; } return _mqtt_db_create_tables(); } int mqtt_db_close(void) { sqlite3_close(db); db = NULL; return 0; } int _mqtt_db_create_tables(void) { int rc; char *errmsg = NULL; rc = sqlite3_exec(db, "CREATE TABLE IF NOT EXISTS clients(" "id TEXT, " "will INTEGER, will_retain INTEGER, will_qos " "will_topic TEXT, will_message TEXT)", NULL, NULL, &errmsg); if(errmsg) sqlite3_free(errmsg); if(rc == SQLITE_OK){ return 0; }else{ return 1; } }
static sqlite3 *db; int _mqtt_db_create_tables(void); int mqtt_db_open(const char *filename) { if(sqlite3_open(filename, &db) != SQLITE_OK){ fprintf(stderr, "Error: %s\n", sqlite3_errmsg(db)); return 1; } return _mqtt_db_create_tables(); } int mqtt_db_close(void) { sqlite3_close(db); db = NULL; return 0; } int _mqtt_db_create_tables(void) { int rc = 0; char *errmsg = NULL; if(sqlite3_exec(db, "CREATE TABLE IF NOT EXISTS clients(" "id TEXT, " "will INTEGER, will_retain INTEGER, will_qos " "will_topic TEXT, will_message TEXT)", NULL, NULL, &errmsg) != SQLITE_OK){ rc = 1; } if(errmsg) sqlite3_free(errmsg); if(sqlite3_exec(db, "CREATE TABLE IF NOT EXISTS subs(" "client_id TEXT, sub TEXT, qos INTEGER)", NULL, NULL, &errmsg) != SQLITE_OK){ rc = 1; } if(errmsg) sqlite3_free(errmsg); return rc; }
Create db table for subscriptions.
Create db table for subscriptions.
C
bsd-3-clause
zlargon/mosquitto,zlargon/mosquitto,tempbottle/mosquitto,tempbottle/mosquitto,zlargon/mosquitto,tempbottle/mosquitto,zlargon/mosquitto,zlargon/mosquitto,tempbottle/mosquitto,tempbottle/mosquitto
c
## Code Before: static sqlite3 *db; int _mqtt_db_create_tables(void); int mqtt_db_open(const char *filename) { if(sqlite3_open(filename, &db) != SQLITE_OK){ fprintf(stderr, "Error: %s\n", sqlite3_errmsg(db)); return 1; } return _mqtt_db_create_tables(); } int mqtt_db_close(void) { sqlite3_close(db); db = NULL; return 0; } int _mqtt_db_create_tables(void) { int rc; char *errmsg = NULL; rc = sqlite3_exec(db, "CREATE TABLE IF NOT EXISTS clients(" "id TEXT, " "will INTEGER, will_retain INTEGER, will_qos " "will_topic TEXT, will_message TEXT)", NULL, NULL, &errmsg); if(errmsg) sqlite3_free(errmsg); if(rc == SQLITE_OK){ return 0; }else{ return 1; } } ## Instruction: Create db table for subscriptions. ## Code After: static sqlite3 *db; int _mqtt_db_create_tables(void); int mqtt_db_open(const char *filename) { if(sqlite3_open(filename, &db) != SQLITE_OK){ fprintf(stderr, "Error: %s\n", sqlite3_errmsg(db)); return 1; } return _mqtt_db_create_tables(); } int mqtt_db_close(void) { sqlite3_close(db); db = NULL; return 0; } int _mqtt_db_create_tables(void) { int rc = 0; char *errmsg = NULL; if(sqlite3_exec(db, "CREATE TABLE IF NOT EXISTS clients(" "id TEXT, " "will INTEGER, will_retain INTEGER, will_qos " "will_topic TEXT, will_message TEXT)", NULL, NULL, &errmsg) != SQLITE_OK){ rc = 1; } if(errmsg) sqlite3_free(errmsg); if(sqlite3_exec(db, "CREATE TABLE IF NOT EXISTS subs(" "client_id TEXT, sub TEXT, qos INTEGER)", NULL, NULL, &errmsg) != SQLITE_OK){ rc = 1; } if(errmsg) sqlite3_free(errmsg); return rc; }
static sqlite3 *db; int _mqtt_db_create_tables(void); int mqtt_db_open(const char *filename) { if(sqlite3_open(filename, &db) != SQLITE_OK){ fprintf(stderr, "Error: %s\n", sqlite3_errmsg(db)); return 1; } return _mqtt_db_create_tables(); } int mqtt_db_close(void) { sqlite3_close(db); db = NULL; return 0; } int _mqtt_db_create_tables(void) { - int rc; + int rc = 0; ? ++++ char *errmsg = NULL; - rc = sqlite3_exec(db, ? ^^^^^ + if(sqlite3_exec(db, ? ^^^ "CREATE TABLE IF NOT EXISTS clients(" "id TEXT, " "will INTEGER, will_retain INTEGER, will_qos " "will_topic TEXT, will_message TEXT)", - NULL, NULL, &errmsg); + NULL, NULL, &errmsg) != SQLITE_OK){ + + rc = 1; + } if(errmsg) sqlite3_free(errmsg); - if(rc == SQLITE_OK){ - return 0; - }else{ - return 1; + if(sqlite3_exec(db, + "CREATE TABLE IF NOT EXISTS subs(" + "client_id TEXT, sub TEXT, qos INTEGER)", + NULL, NULL, &errmsg) != SQLITE_OK){ + + rc = 1; } + + if(errmsg) sqlite3_free(errmsg); + + return rc; }
23
0.511111
16
7
b5efc289cfa73dc74161d027d840307c3171b69e
src/AppBundle/Resources/views/Media/gettag.html.twig
src/AppBundle/Resources/views/Media/gettag.html.twig
<div id="wrap" class="container"> <div class="panel panel-default panel-horizontal"> {% if entities is empty %} <p><small>{{ result }}</small></p> {% else %} <div class="panel-body" style="text-align: center;"> <canvas id="tags-canvas" width="1100" height="200"></canvas> <div id="tags"> <ul> {% for entity in entities %} <li><a href="{{ path('document_show', { 'slug': entity.medias[0].slug }) }}">{{entity.word}}</a></li> {% endfor %} </ul> </div> </div> {% endif %} </div> </div>
<div id="wrap" class="container"> <div class="panel panel-default panel-horizontal"> {% if entities is empty %} <p><small>{{ result }}</small></p> {% else %} <div class="panel-body" style="text-align: center;"> <canvas id="tags-canvas"></canvas> <div id="tags"> <ul> {% for entity in entities %} <li><a href="{{ path('document_show', { 'slug': entity.medias[0].slug }) }}">{{entity.word}}</a></li> {% endfor %} </ul> </div> </div> {% endif %} </div> </div>
Remove canvas width and height for responsive
Remove canvas width and height for responsive
Twig
unlicense
ariescdi/documentio,ariescdi/documentio
twig
## Code Before: <div id="wrap" class="container"> <div class="panel panel-default panel-horizontal"> {% if entities is empty %} <p><small>{{ result }}</small></p> {% else %} <div class="panel-body" style="text-align: center;"> <canvas id="tags-canvas" width="1100" height="200"></canvas> <div id="tags"> <ul> {% for entity in entities %} <li><a href="{{ path('document_show', { 'slug': entity.medias[0].slug }) }}">{{entity.word}}</a></li> {% endfor %} </ul> </div> </div> {% endif %} </div> </div> ## Instruction: Remove canvas width and height for responsive ## Code After: <div id="wrap" class="container"> <div class="panel panel-default panel-horizontal"> {% if entities is empty %} <p><small>{{ result }}</small></p> {% else %} <div class="panel-body" style="text-align: center;"> <canvas id="tags-canvas"></canvas> <div id="tags"> <ul> {% for entity in entities %} <li><a href="{{ path('document_show', { 'slug': entity.medias[0].slug }) }}">{{entity.word}}</a></li> {% endfor %} </ul> </div> </div> {% endif %} </div> </div>
<div id="wrap" class="container"> <div class="panel panel-default panel-horizontal"> {% if entities is empty %} <p><small>{{ result }}</small></p> {% else %} <div class="panel-body" style="text-align: center;"> - <canvas id="tags-canvas" width="1100" height="200"></canvas> ? -------------------------- + <canvas id="tags-canvas"></canvas> <div id="tags"> <ul> {% for entity in entities %} <li><a href="{{ path('document_show', { 'slug': entity.medias[0].slug }) }}">{{entity.word}}</a></li> {% endfor %} </ul> </div> </div> {% endif %} </div> </div>
2
0.111111
1
1
3bcd36a063b112edb657a739287c6a2db3141746
appolo/models.py
appolo/models.py
from django.db import models class Locatie(models.Model): def __unicode__(self): return self.naam naam = models.CharField(max_length=200) lat = models.FloatField() long = models.FloatField() class Dag(models.Model): def __unicode__(self): return unicode(self.datum) datum = models.DateField() class Activiteit(models.Model): def __unicode__(self): return self.naam naam = models.CharField(max_length=200) begintijd = models.DateTimeField() eindtijd = models.DateTimeField() dag = models.ForeignKey(Dag) locatie = models.ForeignKey(Locatie) class Nieuwsitem(models.Model): def __unicode__(self): return self.titel titel = models.CharField(max_length=200) tekst = models.TextField() class Hashtag(models.Model): def __unicode__(self): return self.tekst tekst = models.CharField(max_length=200)
from django.db import models class Locatie(models.Model): def __unicode__(self): return self.naam naam = models.CharField(max_length=200) lat = models.FloatField() long = models.FloatField() class Meta: verbose_name_plural = 'locaties' class Dag(models.Model): def __unicode__(self): return unicode(self.datum) datum = models.DateField() class Meta: verbose_name_plural = 'dagen' class Activiteit(models.Model): def __unicode__(self): return self.naam naam = models.CharField(max_length=200) begintijd = models.DateTimeField() eindtijd = models.DateTimeField() dag = models.ForeignKey(Dag) locatie = models.ForeignKey(Locatie) class Meta: verbose_name_plural = 'activiteiten' class Nieuwsitem(models.Model): def __unicode__(self): return self.titel titel = models.CharField(max_length=200) tekst = models.TextField() class Meta: verbose_name_plural = 'nieuwsitems' class Hashtag(models.Model): def __unicode__(self): return self.tekst tekst = models.CharField(max_length=200) class Meta: verbose_name_plural = 'hashtags'
Correct meervoud modellen van appolo
Correct meervoud modellen van appolo
Python
mit
jonge-democraten/zues,jonge-democraten/zues,jonge-democraten/zues
python
## Code Before: from django.db import models class Locatie(models.Model): def __unicode__(self): return self.naam naam = models.CharField(max_length=200) lat = models.FloatField() long = models.FloatField() class Dag(models.Model): def __unicode__(self): return unicode(self.datum) datum = models.DateField() class Activiteit(models.Model): def __unicode__(self): return self.naam naam = models.CharField(max_length=200) begintijd = models.DateTimeField() eindtijd = models.DateTimeField() dag = models.ForeignKey(Dag) locatie = models.ForeignKey(Locatie) class Nieuwsitem(models.Model): def __unicode__(self): return self.titel titel = models.CharField(max_length=200) tekst = models.TextField() class Hashtag(models.Model): def __unicode__(self): return self.tekst tekst = models.CharField(max_length=200) ## Instruction: Correct meervoud modellen van appolo ## Code After: from django.db import models class Locatie(models.Model): def __unicode__(self): return self.naam naam = models.CharField(max_length=200) lat = models.FloatField() long = models.FloatField() class Meta: verbose_name_plural = 'locaties' class Dag(models.Model): def __unicode__(self): return unicode(self.datum) datum = models.DateField() class Meta: verbose_name_plural = 'dagen' class Activiteit(models.Model): def __unicode__(self): return self.naam naam = models.CharField(max_length=200) begintijd = models.DateTimeField() eindtijd = models.DateTimeField() dag = models.ForeignKey(Dag) locatie = models.ForeignKey(Locatie) class Meta: verbose_name_plural = 'activiteiten' class Nieuwsitem(models.Model): def __unicode__(self): return self.titel titel = models.CharField(max_length=200) tekst = models.TextField() class Meta: verbose_name_plural = 'nieuwsitems' class Hashtag(models.Model): def __unicode__(self): return self.tekst tekst = models.CharField(max_length=200) class Meta: verbose_name_plural = 'hashtags'
from django.db import models class Locatie(models.Model): def __unicode__(self): return self.naam naam = models.CharField(max_length=200) lat = models.FloatField() long = models.FloatField() + class Meta: + verbose_name_plural = 'locaties' + class Dag(models.Model): def __unicode__(self): return unicode(self.datum) datum = models.DateField() + + class Meta: + verbose_name_plural = 'dagen' class Activiteit(models.Model): def __unicode__(self): return self.naam naam = models.CharField(max_length=200) begintijd = models.DateTimeField() eindtijd = models.DateTimeField() dag = models.ForeignKey(Dag) locatie = models.ForeignKey(Locatie) + class Meta: + verbose_name_plural = 'activiteiten' + class Nieuwsitem(models.Model): def __unicode__(self): return self.titel titel = models.CharField(max_length=200) tekst = models.TextField() + class Meta: + verbose_name_plural = 'nieuwsitems' + class Hashtag(models.Model): def __unicode__(self): return self.tekst tekst = models.CharField(max_length=200) + + class Meta: + verbose_name_plural = 'hashtags'
15
0.454545
15
0
12463adfa6d9816f489ae70166c01dd1f70d5633
st2client/in-requirements.txt
st2client/in-requirements.txt
argcomplete prettytable pytz python-dateutil pyyaml jsonschema jsonpath-rw requests six sseclient python-editor prompt-toolkit
argcomplete prettytable pytz python-dateutil pyyaml jsonschema jsonpath-rw requests six sseclient python-editor prompt-toolkit cryptography
Add cryptography dependency to st2client in requirements.
Add cryptography dependency to st2client in requirements.
Text
apache-2.0
Plexxi/st2,nzlosh/st2,StackStorm/st2,Plexxi/st2,StackStorm/st2,Plexxi/st2,StackStorm/st2,StackStorm/st2,nzlosh/st2,nzlosh/st2,Plexxi/st2,nzlosh/st2
text
## Code Before: argcomplete prettytable pytz python-dateutil pyyaml jsonschema jsonpath-rw requests six sseclient python-editor prompt-toolkit ## Instruction: Add cryptography dependency to st2client in requirements. ## Code After: argcomplete prettytable pytz python-dateutil pyyaml jsonschema jsonpath-rw requests six sseclient python-editor prompt-toolkit cryptography
argcomplete prettytable pytz python-dateutil pyyaml jsonschema jsonpath-rw requests six sseclient python-editor prompt-toolkit + cryptography
1
0.083333
1
0
bbcd2d47f75726d42edcf7ef7db29f7ceb07cd81
css/styleoumar.css
css/styleoumar.css
/* Très petits écrans (smartphones, moins de 768px) */ /* Pas besoin de media-query, c'est le style par défaut */ address { background-color: blue; width: 100%; height: 100%; } map iframe { width: 100%; } .message { height: 35px; } /* Petits écrans (tablettes, 768px et plus) */ @media (min-width: 768px) { } /* Ecrans moyens (desktops, 992px et plus) */ @media (min-width: 992px) { }
/* Très petits écrans (smartphones, moins de 768px) */ /* Pas besoin de media-query, c'est le style par défaut */ address { background-color: blue; width: 100%; height: 100%; } map iframe { width: 100%; } .message { height: 35px; } .NavPc { display: none; } /* Petits écrans (tablettes, 768px et plus) */ @media (min-width: 768px) { } /* Ecrans moyens (desktops, 992px et plus) */ @media (min-width: 992px) { }
Add header to mobile in contact
Add header to mobile in contact
CSS
mit
anassbt/YOAS,anassbt/YOAS
css
## Code Before: /* Très petits écrans (smartphones, moins de 768px) */ /* Pas besoin de media-query, c'est le style par défaut */ address { background-color: blue; width: 100%; height: 100%; } map iframe { width: 100%; } .message { height: 35px; } /* Petits écrans (tablettes, 768px et plus) */ @media (min-width: 768px) { } /* Ecrans moyens (desktops, 992px et plus) */ @media (min-width: 992px) { } ## Instruction: Add header to mobile in contact ## Code After: /* Très petits écrans (smartphones, moins de 768px) */ /* Pas besoin de media-query, c'est le style par défaut */ address { background-color: blue; width: 100%; height: 100%; } map iframe { width: 100%; } .message { height: 35px; } .NavPc { display: none; } /* Petits écrans (tablettes, 768px et plus) */ @media (min-width: 768px) { } /* Ecrans moyens (desktops, 992px et plus) */ @media (min-width: 992px) { }
/* Très petits écrans (smartphones, moins de 768px) */ /* Pas besoin de media-query, c'est le style par défaut */ address { background-color: blue; width: 100%; height: 100%; } map iframe { width: 100%; } .message { height: 35px; } + .NavPc { + display: none; + } /* Petits écrans (tablettes, 768px et plus) */ @media (min-width: 768px) { } /* Ecrans moyens (desktops, 992px et plus) */ @media (min-width: 992px) { }
3
0.09375
3
0
18b55365843272136c0a31876cdf43fab4c53151
www/js/app.js
www/js/app.js
// Ionic Starter App // angular.module is a global place for creating, registering and retrieving Angular modules // 'starter' is the name of this angular module example (also set in a <body> attribute in index.html) // the 2nd parameter is an array of 'requires' angular.module('starter', ['ionic']) .run(function($ionicPlatform) { $ionicPlatform.ready(function() { if (window.cordova && window.cordova.plugins.Keyboard) { // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard // for form inputs) cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); // Don't remove this line unless you know what you are doing. It stops the viewport // from snapping when text inputs are focused. Ionic handles this internally for // a much nicer keyboard experience. cordova.plugins.Keyboard.disableScroll(true); } if (window.StatusBar) { StatusBar.styleDefault(); } }); }) .controller('ClientController', ['$scope', function($scope) { $scope.sendGetRequest = function() { } $scope.sendGetRequestNews = function() { } $scope.sendGetRequestNewsWithAmount = function(amount) { } $scope.sendPostRequest = function(keyword) { } }])
// Ionic Starter App // angular.module is a global place for creating, registering and retrieving Angular modules // 'starter' is the name of this angular module example (also set in a <body> attribute in index.html) // the 2nd parameter is an array of 'requires' angular.module('starter', ['ionic']) .run(function($ionicPlatform) { $ionicPlatform.ready(function() { if (window.cordova && window.cordova.plugins.Keyboard) { // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard // for form inputs) cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); // Don't remove this line unless you know what you are doing. It stops the viewport // from snapping when text inputs are focused. Ionic handles this internally for // a much nicer keyboard experience. cordova.plugins.Keyboard.disableScroll(true); } if (window.StatusBar) { StatusBar.styleDefault(); } }); }) .controller('ClientController', ['$scope', '$http', function($scope, $http) { $scope.sendGetRequest = function() { var url = "http://localhost:8888/myapi/"; $http.get(url) .success(function(data) { console.log('OK: ' + data); }) .error(function(error, status) { console.error(error + ' ' + status); }); } $scope.sendGetRequestNews = function() { } $scope.sendGetRequestNewsWithAmount = function(amount) { } $scope.sendPostRequest = function(keyword) { } }])
Implement get request in controller
Implement get request in controller
JavaScript
apache-2.0
teerasej/Training-Ionic-MyAPI-App,teerasej/Training-Ionic-MyAPI-App
javascript
## Code Before: // Ionic Starter App // angular.module is a global place for creating, registering and retrieving Angular modules // 'starter' is the name of this angular module example (also set in a <body> attribute in index.html) // the 2nd parameter is an array of 'requires' angular.module('starter', ['ionic']) .run(function($ionicPlatform) { $ionicPlatform.ready(function() { if (window.cordova && window.cordova.plugins.Keyboard) { // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard // for form inputs) cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); // Don't remove this line unless you know what you are doing. It stops the viewport // from snapping when text inputs are focused. Ionic handles this internally for // a much nicer keyboard experience. cordova.plugins.Keyboard.disableScroll(true); } if (window.StatusBar) { StatusBar.styleDefault(); } }); }) .controller('ClientController', ['$scope', function($scope) { $scope.sendGetRequest = function() { } $scope.sendGetRequestNews = function() { } $scope.sendGetRequestNewsWithAmount = function(amount) { } $scope.sendPostRequest = function(keyword) { } }]) ## Instruction: Implement get request in controller ## Code After: // Ionic Starter App // angular.module is a global place for creating, registering and retrieving Angular modules // 'starter' is the name of this angular module example (also set in a <body> attribute in index.html) // the 2nd parameter is an array of 'requires' angular.module('starter', ['ionic']) .run(function($ionicPlatform) { $ionicPlatform.ready(function() { if (window.cordova && window.cordova.plugins.Keyboard) { // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard // for form inputs) cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); // Don't remove this line unless you know what you are doing. It stops the viewport // from snapping when text inputs are focused. Ionic handles this internally for // a much nicer keyboard experience. cordova.plugins.Keyboard.disableScroll(true); } if (window.StatusBar) { StatusBar.styleDefault(); } }); }) .controller('ClientController', ['$scope', '$http', function($scope, $http) { $scope.sendGetRequest = function() { var url = "http://localhost:8888/myapi/"; $http.get(url) .success(function(data) { console.log('OK: ' + data); }) .error(function(error, status) { console.error(error + ' ' + status); }); } $scope.sendGetRequestNews = function() { } $scope.sendGetRequestNewsWithAmount = function(amount) { } $scope.sendPostRequest = function(keyword) { } }])
// Ionic Starter App // angular.module is a global place for creating, registering and retrieving Angular modules // 'starter' is the name of this angular module example (also set in a <body> attribute in index.html) // the 2nd parameter is an array of 'requires' angular.module('starter', ['ionic']) .run(function($ionicPlatform) { $ionicPlatform.ready(function() { if (window.cordova && window.cordova.plugins.Keyboard) { // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard // for form inputs) cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); // Don't remove this line unless you know what you are doing. It stops the viewport // from snapping when text inputs are focused. Ionic handles this internally for // a much nicer keyboard experience. cordova.plugins.Keyboard.disableScroll(true); } if (window.StatusBar) { StatusBar.styleDefault(); } }); }) - .controller('ClientController', ['$scope', function($scope) { + .controller('ClientController', ['$scope', '$http', function($scope, $http) { ? +++++++++ +++++++ $scope.sendGetRequest = function() { - + var url = "http://localhost:8888/myapi/"; + + $http.get(url) + .success(function(data) { + console.log('OK: ' + data); + }) + .error(function(error, status) { + console.error(error + ' ' + status); + }); } $scope.sendGetRequestNews = function() { - + } $scope.sendGetRequestNewsWithAmount = function(amount) { - + } $scope.sendPostRequest = function(keyword) { - + } }])
18
0.409091
13
5
c39038695ab460cf813a6d20a23019e45787c73e
index.html
index.html
<html> <head> <title>Homepage</title> </head> <body> <a href="/tileslide">Tileslide</a> <br> <a href="/life">Conway's Game of Life</a> </body> </html>
<html> <head> <title>Homepage</title> </head> <body> <a href="tileslide/index.html">Tileslide</a> <br> <a href="life/index.html">Conway's Game of Life</a> </body> </html>
Change href to link properly in github pages
Change href to link properly in github pages
HTML
mit
M-shin/homepage,M-shin/homepage,M-shin/homepage
html
## Code Before: <html> <head> <title>Homepage</title> </head> <body> <a href="/tileslide">Tileslide</a> <br> <a href="/life">Conway's Game of Life</a> </body> </html> ## Instruction: Change href to link properly in github pages ## Code After: <html> <head> <title>Homepage</title> </head> <body> <a href="tileslide/index.html">Tileslide</a> <br> <a href="life/index.html">Conway's Game of Life</a> </body> </html>
<html> <head> <title>Homepage</title> </head> <body> - <a href="/tileslide">Tileslide</a> ? - + <a href="tileslide/index.html">Tileslide</a> ? +++++++++++ <br> - <a href="/life">Conway's Game of Life</a> ? - + <a href="life/index.html">Conway's Game of Life</a> ? +++++++++++ </body> </html>
4
0.4
2
2
d6cff2ae3baf9de7f8156545fda5bb67361c36c2
components/Header.js
components/Header.js
import Head from 'next/head'; export default () => <header> <Head> <style>{` body { font-family: "Helvetica Neue", Arial, sans-serif; } `}</style> </Head> </header>;
import Head from 'next/head'; export default () => <header> <Head> <style global jsx>{` body { font-family: "Helvetica Neue", Arial, sans-serif; } `}</style> </Head> </header>;
Fix flash of unstyled text
Fix flash of unstyled text
JavaScript
mit
pmdarrow/react-todo
javascript
## Code Before: import Head from 'next/head'; export default () => <header> <Head> <style>{` body { font-family: "Helvetica Neue", Arial, sans-serif; } `}</style> </Head> </header>; ## Instruction: Fix flash of unstyled text ## Code After: import Head from 'next/head'; export default () => <header> <Head> <style global jsx>{` body { font-family: "Helvetica Neue", Arial, sans-serif; } `}</style> </Head> </header>;
import Head from 'next/head'; export default () => <header> <Head> - <style>{` + <style global jsx>{` body { font-family: "Helvetica Neue", Arial, sans-serif; } `}</style> </Head> </header>;
2
0.166667
1
1
6ddb8f21ade3d9b18ab8979a9d74aa1bb36ad43c
src/main/resources/public/js/app.js
src/main/resources/public/js/app.js
(function(){ var app = angular.module('runnersNotes',[]); app.controller('NoteController',['$http',function($http){ var rn = this; rn.success = false; rn.errors = []; rn.notes = []; rn.note = {}; $http.get('http://localhost:8080/notes').success(function(data){ rn.notes = data.items; }); this.addNote = function() { rn.note.created = new Date(rn.note.date).getTime(); $http.post('http://localhost:8080/notes',rn.note). then(function(response){ //if (response.status === 201) { rn.notes.push(rn.note); rn.note = {}; rn.success = true; rn.errors = []; $("#addForm").collapse('hide'); //} }, function(response) { rn.success = false; for (var i=0; i < response.data.length; i++) { rn.errors.push(response.data[i]); } console.log(response); }); }; }]); })();
(function(){ var app = angular.module('runnersNotes',[]); app.controller('NoteController',['$http',function($http){ var rn = this; rn.success = false; rn.errors = []; rn.notes = []; rn.note = {}; $http.get('http://localhost:8080/notes').success(function(data){ rn.notes = data.items; }); this.clearAlerts = function() { rn.errors = []; rn.success = false; }; this.addNote = function() { rn.note.created = new Date(rn.note.date).getTime(); $http.post('http://localhost:8080/notes',rn.note). then(function(response){ rn.notes.push(rn.note); rn.note = {}; rn.success = true; rn.errors = []; $("#addForm").collapse('hide'); }, function(response) { rn.success = false; for (var i=0; i < response.data.length; i++) { rn.errors.push(response.data[i]); } }); }; }]); })();
Remove alerts when clicking link or button
Remove alerts when clicking link or button
JavaScript
mit
marsojm/runnersnotes.rest-api,marsojm/runnersnotes.rest-api,marsojm/runnersnotes.rest-api
javascript
## Code Before: (function(){ var app = angular.module('runnersNotes',[]); app.controller('NoteController',['$http',function($http){ var rn = this; rn.success = false; rn.errors = []; rn.notes = []; rn.note = {}; $http.get('http://localhost:8080/notes').success(function(data){ rn.notes = data.items; }); this.addNote = function() { rn.note.created = new Date(rn.note.date).getTime(); $http.post('http://localhost:8080/notes',rn.note). then(function(response){ //if (response.status === 201) { rn.notes.push(rn.note); rn.note = {}; rn.success = true; rn.errors = []; $("#addForm").collapse('hide'); //} }, function(response) { rn.success = false; for (var i=0; i < response.data.length; i++) { rn.errors.push(response.data[i]); } console.log(response); }); }; }]); })(); ## Instruction: Remove alerts when clicking link or button ## Code After: (function(){ var app = angular.module('runnersNotes',[]); app.controller('NoteController',['$http',function($http){ var rn = this; rn.success = false; rn.errors = []; rn.notes = []; rn.note = {}; $http.get('http://localhost:8080/notes').success(function(data){ rn.notes = data.items; }); this.clearAlerts = function() { rn.errors = []; rn.success = false; }; this.addNote = function() { rn.note.created = new Date(rn.note.date).getTime(); $http.post('http://localhost:8080/notes',rn.note). then(function(response){ rn.notes.push(rn.note); rn.note = {}; rn.success = true; rn.errors = []; $("#addForm").collapse('hide'); }, function(response) { rn.success = false; for (var i=0; i < response.data.length; i++) { rn.errors.push(response.data[i]); } }); }; }]); })();
(function(){ var app = angular.module('runnersNotes',[]); app.controller('NoteController',['$http',function($http){ var rn = this; rn.success = false; rn.errors = []; rn.notes = []; rn.note = {}; $http.get('http://localhost:8080/notes').success(function(data){ rn.notes = data.items; }); + this.clearAlerts = function() { + rn.errors = []; + rn.success = false; + }; + this.addNote = function() { rn.note.created = new Date(rn.note.date).getTime(); $http.post('http://localhost:8080/notes',rn.note). then(function(response){ - //if (response.status === 201) { - rn.notes.push(rn.note); ? ---- + rn.notes.push(rn.note); - rn.note = {}; ? ---- + rn.note = {}; - rn.success = true; ? ---- + rn.success = true; - rn.errors = []; ? ---- + rn.errors = []; - $("#addForm").collapse('hide'); ? ---- + $("#addForm").collapse('hide'); - //} }, function(response) { rn.success = false; for (var i=0; i < response.data.length; i++) { rn.errors.push(response.data[i]); } - console.log(response); }); }; }]); })();
18
0.514286
10
8
09c4b6084b872e64b460f3b26b7470030fa56e63
docs/pages/running-tests.markdown
docs/pages/running-tests.markdown
--- title: Running the tests prev: writing-tests.html --- Tests written using *libutest* are meant to be compiled into a separate executable file. Therefore to be able to run it, the needs to be a `main` function. There is a default main provided which you can insert into your program with `UT_DEFAULT_MAIN` (now deprecated). Starting from version 0.2, there is no need to manually include `UT_DEFAULT_MAIN` anymore, as the default `main` function is included in the library and is used unless your code defines your own entry point function. * `UT_DEFAULT_MAIN` However, if you are not satisfied with it and want something more complex, you can write your own entrypoint. In that case you will need `ut_run_all_tests` function to run the tests. * `ut_run_all_tests`
--- title: Running the tests prev: writing-tests.html --- Tests written using *libutest* are meant to be compiled into a separate executable file. Therefore to be able to run it, the needs to be a `main` function. There is a default main provided which you can insert into your program with `UT_DEFAULT_MAIN` (now deprecated). Starting from version 0.2, there is no need to manually include `UT_DEFAULT_MAIN` anymore, as the default `main` function is included in the library and is used unless your code defines your own entry point function. `UT_DEFAULT_MAIN` : Deprecated. This macro expands to definition of a `main()` function. However, if you are not satisfied with it and want something more complex, you can write your own entrypoint. In that case you will need `ut_run_all_tests` function to run the tests. `int ut_run_all_tests (void)` : Run all registered tests from all suites. This function returns number of failed tests.
Update page about running tests
Update page about running tests
Markdown
bsd-3-clause
lubomir/libutest,lubomir/libutest,lubomir/libutest
markdown
## Code Before: --- title: Running the tests prev: writing-tests.html --- Tests written using *libutest* are meant to be compiled into a separate executable file. Therefore to be able to run it, the needs to be a `main` function. There is a default main provided which you can insert into your program with `UT_DEFAULT_MAIN` (now deprecated). Starting from version 0.2, there is no need to manually include `UT_DEFAULT_MAIN` anymore, as the default `main` function is included in the library and is used unless your code defines your own entry point function. * `UT_DEFAULT_MAIN` However, if you are not satisfied with it and want something more complex, you can write your own entrypoint. In that case you will need `ut_run_all_tests` function to run the tests. * `ut_run_all_tests` ## Instruction: Update page about running tests ## Code After: --- title: Running the tests prev: writing-tests.html --- Tests written using *libutest* are meant to be compiled into a separate executable file. Therefore to be able to run it, the needs to be a `main` function. There is a default main provided which you can insert into your program with `UT_DEFAULT_MAIN` (now deprecated). Starting from version 0.2, there is no need to manually include `UT_DEFAULT_MAIN` anymore, as the default `main` function is included in the library and is used unless your code defines your own entry point function. `UT_DEFAULT_MAIN` : Deprecated. This macro expands to definition of a `main()` function. However, if you are not satisfied with it and want something more complex, you can write your own entrypoint. In that case you will need `ut_run_all_tests` function to run the tests. `int ut_run_all_tests (void)` : Run all registered tests from all suites. This function returns number of failed tests.
--- title: Running the tests prev: writing-tests.html --- Tests written using *libutest* are meant to be compiled into a separate executable file. Therefore to be able to run it, the needs to be a `main` function. There is a default main provided which you can insert into your program with `UT_DEFAULT_MAIN` (now deprecated). Starting from version 0.2, there is no need to manually include `UT_DEFAULT_MAIN` anymore, as the default `main` function is included in the library and is used unless your code defines your own entry point function. - * `UT_DEFAULT_MAIN` ? --- + `UT_DEFAULT_MAIN` + + : Deprecated. This macro expands to definition of a `main()` function. However, if you are not satisfied with it and want something more complex, you can write your own entrypoint. In that case you will need `ut_run_all_tests` function to run the tests. - * `ut_run_all_tests` + `int ut_run_all_tests (void)` + : Run all registered tests from all suites. This function returns number of + failed tests.
8
0.347826
6
2
e3be81811501d10971aae35f2353bc16b577b360
tests/kernel/test_pool/testcase.ini
tests/kernel/test_pool/testcase.ini
[test] tags = bat_commit core kernel = micro platform_exclude = olimexino_stm32 nucleo_f103rb
[test] tags = bat_commit core unified_capable kernel = micro platform_exclude = olimexino_stm32 nucleo_f103rb
Make memory pool test unified capable
unified: Make memory pool test unified capable Add the tag for unified kernel Change-Id: I56953ade864580a68786fd39c459ed70bde0787c Signed-off-by: Dmitriy Korovkin <236c6d6726c42916ff3b3577f1e4a2ded1fbf8fe@windriver.com>
INI
apache-2.0
GiulianoFranchetto/zephyr,pklazy/zephyr,explora26/zephyr,finikorg/zephyr,fractalclone/zephyr-riscv,sharronliu/zephyr,ldts/zephyr,erwango/zephyr,fbsder/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,runchip/zephyr-cc3220,erwango/zephyr,runchip/zephyr-cc3220,tidyjiang8/zephyr-doc,pklazy/zephyr,pklazy/zephyr,runchip/zephyr-cc3220,bboozzoo/zephyr,GiulianoFranchetto/zephyr,kraj/zephyr,zephyriot/zephyr,aceofall/zephyr-iotos,holtmann/zephyr,bigdinotech/zephyr,aceofall/zephyr-iotos,mbolivar/zephyr,sharronliu/zephyr,punitvara/zephyr,mbolivar/zephyr,kraj/zephyr,runchip/zephyr-cc3200,pklazy/zephyr,erwango/zephyr,runchip/zephyr-cc3200,galak/zephyr,mbolivar/zephyr,finikorg/zephyr,rsalveti/zephyr,punitvara/zephyr,holtmann/zephyr,holtmann/zephyr,kraj/zephyr,bigdinotech/zephyr,rsalveti/zephyr,mbolivar/zephyr,erwango/zephyr,fractalclone/zephyr-riscv,sharronliu/zephyr,fractalclone/zephyr-riscv,aceofall/zephyr-iotos,ldts/zephyr,finikorg/zephyr,Vudentz/zephyr,fractalclone/zephyr-riscv,nashif/zephyr,kraj/zephyr,kraj/zephyr,zephyriot/zephyr,runchip/zephyr-cc3220,zephyriot/zephyr,tidyjiang8/zephyr-doc,punitvara/zephyr,mbolivar/zephyr,runchip/zephyr-cc3220,zephyrproject-rtos/zephyr,explora26/zephyr,fbsder/zephyr,aceofall/zephyr-iotos,bigdinotech/zephyr,bboozzoo/zephyr,tidyjiang8/zephyr-doc,explora26/zephyr,nashif/zephyr,ldts/zephyr,zephyriot/zephyr,nashif/zephyr,punitvara/zephyr,fbsder/zephyr,sharronliu/zephyr,holtmann/zephyr,finikorg/zephyr,bigdinotech/zephyr,galak/zephyr,bigdinotech/zephyr,holtmann/zephyr,explora26/zephyr,galak/zephyr,Vudentz/zephyr,pklazy/zephyr,galak/zephyr,GiulianoFranchetto/zephyr,finikorg/zephyr,tidyjiang8/zephyr-doc,explora26/zephyr,zephyrproject-rtos/zephyr,fbsder/zephyr,ldts/zephyr,bboozzoo/zephyr,rsalveti/zephyr,sharronliu/zephyr,aceofall/zephyr-iotos,nashif/zephyr,bboozzoo/zephyr,Vudentz/zephyr,GiulianoFranchetto/zephyr,zephyrproject-rtos/zephyr,runchip/zephyr-cc3200,Vudentz/zephyr,runchip/zephyr-cc3200,ldts/zephyr,nashif/zephyr,punitvara/zephyr,GiulianoFranchetto/zephyr,runchip/zephyr-cc3200,erwango/zephyr,fbsder/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,Vudentz/zephyr,rsalveti/zephyr,fractalclone/zephyr-riscv,bboozzoo/zephyr,tidyjiang8/zephyr-doc,rsalveti/zephyr,zephyriot/zephyr
ini
## Code Before: [test] tags = bat_commit core kernel = micro platform_exclude = olimexino_stm32 nucleo_f103rb ## Instruction: unified: Make memory pool test unified capable Add the tag for unified kernel Change-Id: I56953ade864580a68786fd39c459ed70bde0787c Signed-off-by: Dmitriy Korovkin <236c6d6726c42916ff3b3577f1e4a2ded1fbf8fe@windriver.com> ## Code After: [test] tags = bat_commit core unified_capable kernel = micro platform_exclude = olimexino_stm32 nucleo_f103rb
[test] - tags = bat_commit core + tags = bat_commit core unified_capable kernel = micro platform_exclude = olimexino_stm32 nucleo_f103rb
2
0.5
1
1
b733cef85e239ff77b10852df310df0e9728051f
.github/workflows/php-qa.yml
.github/workflows/php-qa.yml
name: PHP Quality Assurance on: [push] jobs: qa: runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, 'ci skip')" strategy: fail-fast: true matrix: php-versions: ['7.4', '7.3', '7.2', '7.1', '7.0', '5.6', '8.0'] steps: - uses: actions/checkout@v2 - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} - name: Check syntax error in sources run: find ./src/ ./tests/ -type f -name '*.php' -print0 | xargs -0 -L 1 -P 4 -- php -l - name: Install dependencies run: composer install -q -n -a --no-progress --prefer-dist - name: Check cross-version PHP compatibility if: ${{ matrix.php-versions == '7.4' }} # results is same across versions, do it once run: composer phpcompat - name: Run unit tests run: ./vendor/bin/phpunit --coverage-clover=coverage.xml - name: Update codecov.io uses: codecov/codecov-action@v1 if: ${{ matrix.php-versions == '7.4' }} # upload coverage once is enough with: file: ./coverage.xml
name: PHP Quality Assurance on: [push] jobs: qa: runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, 'ci skip')" strategy: fail-fast: true matrix: php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0'] steps: - uses: actions/checkout@v2 - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} - name: Check syntax error in sources run: find ./src/ ./tests/ -type f -name '*.php' -print0 | xargs -0 -L 1 -P 4 -- php -l - name: Install dependencies run: composer install -q -n -a --no-progress --prefer-dist - name: Check cross-version PHP compatibility if: ${{ matrix.php-versions == '7.4' }} # results is same across versions, do it once run: composer phpcompat - name: Run unit tests run: ./vendor/bin/phpunit --migrate-configuration --coverage-clover=coverage.xml - name: Update codecov.io uses: codecov/codecov-action@v1 if: ${{ matrix.php-versions == '7.4' }} # upload coverage once is enough with: file: ./coverage.xml
Use --migrate-configuration for PHPUnit in Actions
Use --migrate-configuration for PHPUnit in Actions
YAML
mit
Brain-WP/BrainMonkey
yaml
## Code Before: name: PHP Quality Assurance on: [push] jobs: qa: runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, 'ci skip')" strategy: fail-fast: true matrix: php-versions: ['7.4', '7.3', '7.2', '7.1', '7.0', '5.6', '8.0'] steps: - uses: actions/checkout@v2 - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} - name: Check syntax error in sources run: find ./src/ ./tests/ -type f -name '*.php' -print0 | xargs -0 -L 1 -P 4 -- php -l - name: Install dependencies run: composer install -q -n -a --no-progress --prefer-dist - name: Check cross-version PHP compatibility if: ${{ matrix.php-versions == '7.4' }} # results is same across versions, do it once run: composer phpcompat - name: Run unit tests run: ./vendor/bin/phpunit --coverage-clover=coverage.xml - name: Update codecov.io uses: codecov/codecov-action@v1 if: ${{ matrix.php-versions == '7.4' }} # upload coverage once is enough with: file: ./coverage.xml ## Instruction: Use --migrate-configuration for PHPUnit in Actions ## Code After: name: PHP Quality Assurance on: [push] jobs: qa: runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, 'ci skip')" strategy: fail-fast: true matrix: php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0'] steps: - uses: actions/checkout@v2 - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} - name: Check syntax error in sources run: find ./src/ ./tests/ -type f -name '*.php' -print0 | xargs -0 -L 1 -P 4 -- php -l - name: Install dependencies run: composer install -q -n -a --no-progress --prefer-dist - name: Check cross-version PHP compatibility if: ${{ matrix.php-versions == '7.4' }} # results is same across versions, do it once run: composer phpcompat - name: Run unit tests run: ./vendor/bin/phpunit --migrate-configuration --coverage-clover=coverage.xml - name: Update codecov.io uses: codecov/codecov-action@v1 if: ${{ matrix.php-versions == '7.4' }} # upload coverage once is enough with: file: ./coverage.xml
name: PHP Quality Assurance on: [push] jobs: qa: runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, 'ci skip')" strategy: fail-fast: true matrix: - php-versions: ['7.4', '7.3', '7.2', '7.1', '7.0', '5.6', '8.0'] + php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0'] steps: - uses: actions/checkout@v2 - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} - name: Check syntax error in sources run: find ./src/ ./tests/ -type f -name '*.php' -print0 | xargs -0 -L 1 -P 4 -- php -l - name: Install dependencies run: composer install -q -n -a --no-progress --prefer-dist - name: Check cross-version PHP compatibility if: ${{ matrix.php-versions == '7.4' }} # results is same across versions, do it once run: composer phpcompat - name: Run unit tests - run: ./vendor/bin/phpunit --coverage-clover=coverage.xml + run: ./vendor/bin/phpunit --migrate-configuration --coverage-clover=coverage.xml ? ++++++++++++++++++++++++ - name: Update codecov.io uses: codecov/codecov-action@v1 if: ${{ matrix.php-versions == '7.4' }} # upload coverage once is enough with: file: ./coverage.xml
4
0.111111
2
2
d14964436ee66918b55393b14111dceae27c7280
.github/workflows/shellcheck.yml
.github/workflows/shellcheck.yml
on: - push - pull_request jobs: shellcheck: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - env: PIPELINECOMPONENTS_GLOBASSIST: true uses: pipeline-components/shellcheck@v0.10.0 with: directory: "**/*.sh" options: --format=gcc --external-sources
on: - push - pull_request # Cancels all previous workflow runs for the same branch that have not yet completed. concurrency: # The concurrency group contains the workflow name and the branch name. group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: shellcheck: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - env: PIPELINECOMPONENTS_GLOBASSIST: true uses: pipeline-components/shellcheck@v0.10.0 with: directory: "**/*.sh" options: --format=gcc --external-sources
Change Shellcheck GitHub action to cancel already running actions on same branch.
Change Shellcheck GitHub action to cancel already running actions on same branch.
YAML
mit
bpkg/bpkg
yaml
## Code Before: on: - push - pull_request jobs: shellcheck: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - env: PIPELINECOMPONENTS_GLOBASSIST: true uses: pipeline-components/shellcheck@v0.10.0 with: directory: "**/*.sh" options: --format=gcc --external-sources ## Instruction: Change Shellcheck GitHub action to cancel already running actions on same branch. ## Code After: on: - push - pull_request # Cancels all previous workflow runs for the same branch that have not yet completed. concurrency: # The concurrency group contains the workflow name and the branch name. group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: shellcheck: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - env: PIPELINECOMPONENTS_GLOBASSIST: true uses: pipeline-components/shellcheck@v0.10.0 with: directory: "**/*.sh" options: --format=gcc --external-sources
on: - push - pull_request + + # Cancels all previous workflow runs for the same branch that have not yet completed. + concurrency: + # The concurrency group contains the workflow name and the branch name. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: shellcheck: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - env: PIPELINECOMPONENTS_GLOBASSIST: true uses: pipeline-components/shellcheck@v0.10.0 with: directory: "**/*.sh" options: --format=gcc --external-sources
6
0.4
6
0
f99986f8476651014bec6c5aec44cddcc3b56319
pykeg/web/templates/registration/login.html
pykeg/web/templates/registration/login.html
{% extends "page-twocol.html" %} {% load kegweblib %} {% load crispy_forms_tags %} {% block title %}Log In to {{kbsite.name}}{% endblock %} {% block pagetitle %}Log In{% endblock %} {% block kb-extrajs %} {% if USE_FACEBOOK %} {% load facebook %} {% endif %} {% endblock %} {% block col-1 %} <div class="well"> <form action="" method="POST"> {% csrf_token %} {{ form|crispy }} <button type="submit" class="btn btn-success small" name="tweet-form-submit">Log In</button> <p> <span style="font-size:0.8em;"> (did you <a href="{% url "password-reset" %}">forget your username or password?</a>) </span> </p> {% endblock col-1 %} {% block col-2 %} {% if USE_FACEBOOK %} <div class="kb-contentbox-head"> login using facebook </div> <div class="kb-contentbox"> {% facebook_button %} </div> <p/> {% endif %} {% if USE_TWITTER %} <div class="kb-contentbox-head"> login using twitter </div> <div class="kb-contentbox"> {% load twitter_tags %} {% twitter_button %} </div> {% endif %} {% endblock %}
{% extends "page-twocol.html" %} {% load kegweblib %} {% load crispy_forms_tags %} {% block title %}Log In to {{kbsite.name}}{% endblock %} {% block pagetitle %}Log In{% endblock %} {% block kb-extrajs %} {% if USE_FACEBOOK %} {% load facebook %} {% endif %} {% endblock %} {% block col-1 %} <div class="well"> <form action="" method="POST"> {% csrf_token %} {{ form|crispy }} <button type="submit" class="btn btn-success small" name="tweet-form-submit">Log In</button> <p> <span style="font-size:0.8em;"> (did you <a href="{% url "password-reset" %}">forget your username or password?</a>) </span> </p> {% endblock col-1 %} {% block col-2 %} {% if USE_FACEBOOK %} <div class="kb-contentbox-head"> login using facebook </div> <div class="kb-contentbox"> {% facebook_button %} </div> <p/> {% endif %} {% endblock %}
Delete stale twitter signon hooks.
web: Delete stale twitter signon hooks. Closes #147.
HTML
mit
Kegbot/kegbot-server,Kegbot/kegbot-server,Kegbot/kegbot-server,Kegbot/kegbot-server,Kegbot/kegbot-server
html
## Code Before: {% extends "page-twocol.html" %} {% load kegweblib %} {% load crispy_forms_tags %} {% block title %}Log In to {{kbsite.name}}{% endblock %} {% block pagetitle %}Log In{% endblock %} {% block kb-extrajs %} {% if USE_FACEBOOK %} {% load facebook %} {% endif %} {% endblock %} {% block col-1 %} <div class="well"> <form action="" method="POST"> {% csrf_token %} {{ form|crispy }} <button type="submit" class="btn btn-success small" name="tweet-form-submit">Log In</button> <p> <span style="font-size:0.8em;"> (did you <a href="{% url "password-reset" %}">forget your username or password?</a>) </span> </p> {% endblock col-1 %} {% block col-2 %} {% if USE_FACEBOOK %} <div class="kb-contentbox-head"> login using facebook </div> <div class="kb-contentbox"> {% facebook_button %} </div> <p/> {% endif %} {% if USE_TWITTER %} <div class="kb-contentbox-head"> login using twitter </div> <div class="kb-contentbox"> {% load twitter_tags %} {% twitter_button %} </div> {% endif %} {% endblock %} ## Instruction: web: Delete stale twitter signon hooks. Closes #147. ## Code After: {% extends "page-twocol.html" %} {% load kegweblib %} {% load crispy_forms_tags %} {% block title %}Log In to {{kbsite.name}}{% endblock %} {% block pagetitle %}Log In{% endblock %} {% block kb-extrajs %} {% if USE_FACEBOOK %} {% load facebook %} {% endif %} {% endblock %} {% block col-1 %} <div class="well"> <form action="" method="POST"> {% csrf_token %} {{ form|crispy }} <button type="submit" class="btn btn-success small" name="tweet-form-submit">Log In</button> <p> <span style="font-size:0.8em;"> (did you <a href="{% url "password-reset" %}">forget your username or password?</a>) </span> </p> {% endblock col-1 %} {% block col-2 %} {% if USE_FACEBOOK %} <div class="kb-contentbox-head"> login using facebook </div> <div class="kb-contentbox"> {% facebook_button %} </div> <p/> {% endif %} {% endblock %}
{% extends "page-twocol.html" %} {% load kegweblib %} {% load crispy_forms_tags %} {% block title %}Log In to {{kbsite.name}}{% endblock %} {% block pagetitle %}Log In{% endblock %} {% block kb-extrajs %} {% if USE_FACEBOOK %} {% load facebook %} {% endif %} {% endblock %} {% block col-1 %} <div class="well"> <form action="" method="POST"> {% csrf_token %} {{ form|crispy }} <button type="submit" class="btn btn-success small" name="tweet-form-submit">Log In</button> <p> <span style="font-size:0.8em;"> (did you <a href="{% url "password-reset" %}">forget your username or password?</a>) </span> </p> {% endblock col-1 %} {% block col-2 %} {% if USE_FACEBOOK %} <div class="kb-contentbox-head"> login using facebook </div> <div class="kb-contentbox"> {% facebook_button %} </div> <p/> {% endif %} - {% if USE_TWITTER %} - <div class="kb-contentbox-head"> - login using twitter - </div> - <div class="kb-contentbox"> - {% load twitter_tags %} - {% twitter_button %} - </div> - {% endif %} - {% endblock %}
10
0.196078
0
10
156c44b2a0a492f27fa7d3afed93533b761fb441
CMakeLists.txt
CMakeLists.txt
cmake_minimum_required(VERSION 3.16) # KDE Application Version, managed by release script set (RELEASE_SERVICE_VERSION_MAJOR "22") set (RELEASE_SERVICE_VERSION_MINOR "11") set (RELEASE_SERVICE_VERSION_MICRO "70") set(KTP_APPROVER_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}") project(ktp-approver VERSION ${KTP_APPROVER_VERSION}) find_package(ECM 1.6.0 REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_MODULE_PATH}) include(KDEInstallDirs) include(KDECMakeSettings) include(KDECompilerSettings) include(FeatureSummary) find_package (Qt5 REQUIRED COMPONENTS Widgets Network) find_package (KF5 REQUIRED COMPONENTS DBusAddons Config I18n Notifications Service) find_package(TelepathyQt5 0.9.8 REQUIRED) configure_file(version.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/version.h @ONLY) add_subdirectory(src) install(FILES ktp-approver.desktop DESTINATION ${KDE_INSTALL_KSERVICETYPES5DIR}) ki18n_install(po) feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
cmake_minimum_required(VERSION 3.16) # KDE Application Version, managed by release script set (RELEASE_SERVICE_VERSION_MAJOR "22") set (RELEASE_SERVICE_VERSION_MINOR "11") set (RELEASE_SERVICE_VERSION_MICRO "70") set(KTP_APPROVER_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}") project(ktp-approver VERSION ${KTP_APPROVER_VERSION}) find_package(ECM 1.6.0 REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_MODULE_PATH}) include(KDEInstallDirs) include(KDECMakeSettings) include(KDECompilerSettings) include(FeatureSummary) find_package (Qt5 REQUIRED COMPONENTS Widgets Network) find_package (KF5 REQUIRED COMPONENTS DBusAddons Config I18n Notifications Service) find_package(TelepathyQt5 0.9.8 REQUIRED) configure_file(version.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/version.h @ONLY) add_subdirectory(src) install(FILES ktp-approver.desktop DESTINATION ${KDE_INSTALL_KSERVICETYPES5DIR}) ki18n_install(po) feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
Remove explicit use of ECM_KDE_MODULE_DIR, is part of ECM_MODULE_PATH
Remove explicit use of ECM_KDE_MODULE_DIR, is part of ECM_MODULE_PATH GIT_SILENT
Text
lgpl-2.1
KDE/ktp-approver,KDE/ktp-approver,KDE/ktp-approver
text
## Code Before: cmake_minimum_required(VERSION 3.16) # KDE Application Version, managed by release script set (RELEASE_SERVICE_VERSION_MAJOR "22") set (RELEASE_SERVICE_VERSION_MINOR "11") set (RELEASE_SERVICE_VERSION_MICRO "70") set(KTP_APPROVER_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}") project(ktp-approver VERSION ${KTP_APPROVER_VERSION}) find_package(ECM 1.6.0 REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_MODULE_PATH}) include(KDEInstallDirs) include(KDECMakeSettings) include(KDECompilerSettings) include(FeatureSummary) find_package (Qt5 REQUIRED COMPONENTS Widgets Network) find_package (KF5 REQUIRED COMPONENTS DBusAddons Config I18n Notifications Service) find_package(TelepathyQt5 0.9.8 REQUIRED) configure_file(version.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/version.h @ONLY) add_subdirectory(src) install(FILES ktp-approver.desktop DESTINATION ${KDE_INSTALL_KSERVICETYPES5DIR}) ki18n_install(po) feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) ## Instruction: Remove explicit use of ECM_KDE_MODULE_DIR, is part of ECM_MODULE_PATH GIT_SILENT ## Code After: cmake_minimum_required(VERSION 3.16) # KDE Application Version, managed by release script set (RELEASE_SERVICE_VERSION_MAJOR "22") set (RELEASE_SERVICE_VERSION_MINOR "11") set (RELEASE_SERVICE_VERSION_MICRO "70") set(KTP_APPROVER_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}") project(ktp-approver VERSION ${KTP_APPROVER_VERSION}) find_package(ECM 1.6.0 REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_MODULE_PATH}) include(KDEInstallDirs) include(KDECMakeSettings) include(KDECompilerSettings) include(FeatureSummary) find_package (Qt5 REQUIRED COMPONENTS Widgets Network) find_package (KF5 REQUIRED COMPONENTS DBusAddons Config I18n Notifications Service) find_package(TelepathyQt5 0.9.8 REQUIRED) configure_file(version.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/version.h @ONLY) add_subdirectory(src) install(FILES ktp-approver.desktop DESTINATION ${KDE_INSTALL_KSERVICETYPES5DIR}) ki18n_install(po) feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
cmake_minimum_required(VERSION 3.16) # KDE Application Version, managed by release script set (RELEASE_SERVICE_VERSION_MAJOR "22") set (RELEASE_SERVICE_VERSION_MINOR "11") set (RELEASE_SERVICE_VERSION_MICRO "70") set(KTP_APPROVER_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}") project(ktp-approver VERSION ${KTP_APPROVER_VERSION}) find_package(ECM 1.6.0 REQUIRED NO_MODULE) - set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_MODULE_PATH}) ? ---------------------- + set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_MODULE_PATH}) include(KDEInstallDirs) include(KDECMakeSettings) include(KDECompilerSettings) include(FeatureSummary) find_package (Qt5 REQUIRED COMPONENTS Widgets Network) find_package (KF5 REQUIRED COMPONENTS DBusAddons Config I18n Notifications Service) find_package(TelepathyQt5 0.9.8 REQUIRED) configure_file(version.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/version.h @ONLY) add_subdirectory(src) install(FILES ktp-approver.desktop DESTINATION ${KDE_INSTALL_KSERVICETYPES5DIR}) ki18n_install(po) feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
2
0.060606
1
1
3578193151e2f48ce8848d2e953e48f64abef2a9
.travis.yml
.travis.yml
language: objective-c osx_image: xcode7.3 before_install: true install: true git: submodules: false script: script/cibuild ReactiveCocoa-Mac ReactiveCocoa-iOS notifications: email: false slack: secure: C9QTry5wUG9CfeH3rm3Z19R5rDWqDO7EhHAqHDXBxT6CpGRkTPFliJexpjBYB4sroJ8CiY5ZgTI2sjRBiAdGoE5ZQkfnwSoKQhWXkwo19TnbSnufr3cKO2SZkUhBqOlZcA+mgfjZ7rm2wm7RhpCR/4z8oBXDN4/xv0U5R2fLCLE=
language: objective-c osx_image: xcode7.3 before_install: - brew update - brew uninstall xctool && brew install --HEAD xctool install: true git: submodules: false script: script/cibuild ReactiveCocoa-Mac ReactiveCocoa-iOS notifications: email: false slack: secure: C9QTry5wUG9CfeH3rm3Z19R5rDWqDO7EhHAqHDXBxT6CpGRkTPFliJexpjBYB4sroJ8CiY5ZgTI2sjRBiAdGoE5ZQkfnwSoKQhWXkwo19TnbSnufr3cKO2SZkUhBqOlZcA+mgfjZ7rm2wm7RhpCR/4z8oBXDN4/xv0U5R2fLCLE=
Use HEAD of xctool for Xcode 7.3
[Travis] Use HEAD of xctool for Xcode 7.3
YAML
mit
ReactiveCocoa/ReactiveSwift,tzongw/ReactiveCocoa,smilypeda/ReactiveCocoa,ReactiveCocoa/ReactiveSwift,ReactiveCocoa/ReactiveSwift,smilypeda/ReactiveCocoa,tzongw/ReactiveCocoa,calebd/ReactiveCocoa,sandyway/ReactiveCocoa,victorlin/ReactiveCocoa,ohwutup/ReactiveCocoa,rpowelll/ReactiveCocoa,ikesyo/ReactiveCocoa,ohwutup/ReactiveCocoa,andersio/ReactiveCocoa,walkingsmarts/ReactiveCocoa,RuiAAPeres/ReactiveCocoa,Juraldinio/ReactiveCocoa,RuiAAPeres/ReactiveCocoa,sandyway/ReactiveCocoa,Juraldinio/ReactiveCocoa,walkingsmarts/ReactiveCocoa,RuiAAPeres/ReactiveCocoa,ikesyo/ReactiveCocoa,ohwutup/ReactiveCocoa,rpowelll/ReactiveCocoa,smilypeda/ReactiveCocoa,victorlin/ReactiveCocoa,tzongw/ReactiveCocoa,calebd/ReactiveCocoa,andersio/ReactiveCocoa,victorlin/ReactiveCocoa,Juraldinio/ReactiveCocoa,andersio/ReactiveCocoa,calebd/ReactiveCocoa,rpowelll/ReactiveCocoa,sandyway/ReactiveCocoa,walkingsmarts/ReactiveCocoa
yaml
## Code Before: language: objective-c osx_image: xcode7.3 before_install: true install: true git: submodules: false script: script/cibuild ReactiveCocoa-Mac ReactiveCocoa-iOS notifications: email: false slack: secure: C9QTry5wUG9CfeH3rm3Z19R5rDWqDO7EhHAqHDXBxT6CpGRkTPFliJexpjBYB4sroJ8CiY5ZgTI2sjRBiAdGoE5ZQkfnwSoKQhWXkwo19TnbSnufr3cKO2SZkUhBqOlZcA+mgfjZ7rm2wm7RhpCR/4z8oBXDN4/xv0U5R2fLCLE= ## Instruction: [Travis] Use HEAD of xctool for Xcode 7.3 ## Code After: language: objective-c osx_image: xcode7.3 before_install: - brew update - brew uninstall xctool && brew install --HEAD xctool install: true git: submodules: false script: script/cibuild ReactiveCocoa-Mac ReactiveCocoa-iOS notifications: email: false slack: secure: C9QTry5wUG9CfeH3rm3Z19R5rDWqDO7EhHAqHDXBxT6CpGRkTPFliJexpjBYB4sroJ8CiY5ZgTI2sjRBiAdGoE5ZQkfnwSoKQhWXkwo19TnbSnufr3cKO2SZkUhBqOlZcA+mgfjZ7rm2wm7RhpCR/4z8oBXDN4/xv0U5R2fLCLE=
language: objective-c osx_image: xcode7.3 - before_install: true ? ----- + before_install: + - brew update + - brew uninstall xctool && brew install --HEAD xctool install: true git: submodules: false script: script/cibuild ReactiveCocoa-Mac ReactiveCocoa-iOS notifications: email: false slack: secure: C9QTry5wUG9CfeH3rm3Z19R5rDWqDO7EhHAqHDXBxT6CpGRkTPFliJexpjBYB4sroJ8CiY5ZgTI2sjRBiAdGoE5ZQkfnwSoKQhWXkwo19TnbSnufr3cKO2SZkUhBqOlZcA+mgfjZ7rm2wm7RhpCR/4z8oBXDN4/xv0U5R2fLCLE=
4
0.363636
3
1
f254b169fd0c6d2682d68a4cc4b6a00332ba38ef
polygerrit-ui/app/styles/gr-icon-styles.ts
polygerrit-ui/app/styles/gr-icon-styles.ts
/** * @license * Copyright 2022 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import {css} from 'lit'; export const iconStyles = css` iron-icon { display: inline-block; vertical-align: top; width: 20px; height: 20px; } /* expected to be used in a 20px line-height inline context */ iron-icon.size-16 { width: 16px; height: 16px; position: relative; top: 2px; } .material-icon { color: var(--deemphasized-text-color); font-family: 'Material Symbols Outlined'; font-weight: normal; font-style: normal; font-size: 20px; line-height: 1; letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; word-wrap: normal; direction: ltr; font-variation-settings: 'FILL' 0; vertical-align: top; } .material-icon.filled { font-variation-settings: 'FILL' 1; } `;
/** * @license * Copyright 2022 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import {css} from 'lit'; export const iconStyles = css` iron-icon { display: inline-block; vertical-align: top; width: 20px; height: 20px; } /* expected to be used in a 20px line-height inline context */ iron-icon.size-16 { width: 16px; height: 16px; position: relative; top: 2px; } .material-icon { color: var(--deemphasized-text-color); font-family: var(--icon-font-family, 'Material Symbols Outlined'); font-weight: normal; font-style: normal; font-size: 20px; line-height: 1; letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; word-wrap: normal; direction: ltr; font-variation-settings: 'FILL' 0; vertical-align: top; } .material-icon.filled { font-variation-settings: 'FILL' 1; } `;
Make the icon-font-family for icons be a CSS var.
Make the icon-font-family for icons be a CSS var. This is necessary for our internal tool as it uses a different font-family. Release-Notes: skip Change-Id: I65c404387804a246539c41ef9d01f0208176db48
TypeScript
apache-2.0
GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit
typescript
## Code Before: /** * @license * Copyright 2022 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import {css} from 'lit'; export const iconStyles = css` iron-icon { display: inline-block; vertical-align: top; width: 20px; height: 20px; } /* expected to be used in a 20px line-height inline context */ iron-icon.size-16 { width: 16px; height: 16px; position: relative; top: 2px; } .material-icon { color: var(--deemphasized-text-color); font-family: 'Material Symbols Outlined'; font-weight: normal; font-style: normal; font-size: 20px; line-height: 1; letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; word-wrap: normal; direction: ltr; font-variation-settings: 'FILL' 0; vertical-align: top; } .material-icon.filled { font-variation-settings: 'FILL' 1; } `; ## Instruction: Make the icon-font-family for icons be a CSS var. This is necessary for our internal tool as it uses a different font-family. Release-Notes: skip Change-Id: I65c404387804a246539c41ef9d01f0208176db48 ## Code After: /** * @license * Copyright 2022 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import {css} from 'lit'; export const iconStyles = css` iron-icon { display: inline-block; vertical-align: top; width: 20px; height: 20px; } /* expected to be used in a 20px line-height inline context */ iron-icon.size-16 { width: 16px; height: 16px; position: relative; top: 2px; } .material-icon { color: var(--deemphasized-text-color); font-family: var(--icon-font-family, 'Material Symbols Outlined'); font-weight: normal; font-style: normal; font-size: 20px; line-height: 1; letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; word-wrap: normal; direction: ltr; font-variation-settings: 'FILL' 0; vertical-align: top; } .material-icon.filled { font-variation-settings: 'FILL' 1; } `;
/** * @license * Copyright 2022 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import {css} from 'lit'; export const iconStyles = css` iron-icon { display: inline-block; vertical-align: top; width: 20px; height: 20px; } /* expected to be used in a 20px line-height inline context */ iron-icon.size-16 { width: 16px; height: 16px; position: relative; top: 2px; } .material-icon { color: var(--deemphasized-text-color); - font-family: 'Material Symbols Outlined'; + font-family: var(--icon-font-family, 'Material Symbols Outlined'); ? ++++++++++++++++++++++++ + font-weight: normal; font-style: normal; font-size: 20px; line-height: 1; letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; word-wrap: normal; direction: ltr; font-variation-settings: 'FILL' 0; vertical-align: top; } .material-icon.filled { font-variation-settings: 'FILL' 1; } `;
2
0.046512
1
1