commit
stringlengths
40
40
old_file
stringlengths
4
237
new_file
stringlengths
4
237
old_contents
stringlengths
1
4.24k
new_contents
stringlengths
5
4.84k
subject
stringlengths
15
778
message
stringlengths
16
6.86k
lang
stringlengths
1
30
license
stringclasses
13 values
repos
stringlengths
5
116k
config
stringlengths
1
30
content
stringlengths
105
8.72k
f4649acdc37a914560eca2d6cd0d2bb550f39ce4
tasks/persist-redhat.yml
tasks/persist-redhat.yml
--- - name: Ensure iptables service is installed yum: name=iptables-services state=present - name: Ensure iptables service is enabled & started service: name=iptables enabled=yes state=started
--- - name: Ensure iptables service is installed yum: name=iptables-services state=present when: ansible_distribution_major_version >= '7' - name: Ensure iptables service is installed yum: name=iptables state=present when: ansible_distribution_major_version < '7' - name: Ensure iptables service is enabled & started service: name=iptables enabled=yes state=started
Add support for rhel/centos < 7
Add support for rhel/centos < 7 In at least rhel/centos 6 the package providing iptables is called "iptables"
YAML
bsd-2-clause
mikegleasonjr/ansible-role-firewall
yaml
## Code Before: --- - name: Ensure iptables service is installed yum: name=iptables-services state=present - name: Ensure iptables service is enabled & started service: name=iptables enabled=yes state=started ## Instruction: Add support for rhel/centos < 7 In at least rhel/centos 6 the package providing iptables is called "iptables" ## Code After: --- - name: Ensure iptables service is installed yum: name=iptables-services state=present when: ansible_distribution_major_version >= '7' - name: Ensure iptables service is installed yum: name=iptables state=present when: ansible_distribution_major_version < '7' - name: Ensure iptables service is enabled & started service: name=iptables enabled=yes state=started
3c1245b31011d25f7c660592d456cf9109766195
libyaul/math/color.h
libyaul/math/color.h
typedef union { struct { unsigned int r:5; unsigned int g:5; unsigned int b:5; unsigned int :1; } __packed; uint8_t comp[3]; uint16_t raw; } __aligned (4) color_rgb_t; typedef union { struct { fix16_t h; fix16_t s; fix16_t v; }; fix16_t comp[3]; } __aligned (4) color_fix16_hsv_t; typedef union { struct { uint8_t h; uint8_t s; uint8_t v; }; uint8_t comp[3]; } __aligned (4) color_uint8_hsv_t; extern void color_rgb_hsv_convert(const color_rgb_t *, color_fix16_hsv_t *); extern void color_hsv_lerp(const color_fix16_hsv_t *, const color_fix16_hsv_t *, fix16_t, color_fix16_hsv_t *); #endif /* !__libfixmath_color_h__ */
typedef union { struct { unsigned int :1; unsigned int b:5; unsigned int g:5; unsigned int r:5; } __packed; uint8_t comp[3]; uint16_t raw; } __aligned (4) color_rgb_t; typedef union { struct { fix16_t v; fix16_t s; fix16_t h; }; fix16_t comp[3]; } __aligned (4) color_fix16_hsv_t; typedef union { struct { uint8_t v; uint8_t s; uint8_t h; }; uint8_t comp[3]; } __aligned (4) color_uint8_hsv_t; extern void color_rgb_hsv_convert(const color_rgb_t *, color_fix16_hsv_t *); extern void color_hsv_lerp(const color_fix16_hsv_t *, const color_fix16_hsv_t *, fix16_t, color_fix16_hsv_t *); #endif /* !__libfixmath_color_h__ */
Change R and B components
Change R and B components
C
mit
ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul
c
## Code Before: typedef union { struct { unsigned int r:5; unsigned int g:5; unsigned int b:5; unsigned int :1; } __packed; uint8_t comp[3]; uint16_t raw; } __aligned (4) color_rgb_t; typedef union { struct { fix16_t h; fix16_t s; fix16_t v; }; fix16_t comp[3]; } __aligned (4) color_fix16_hsv_t; typedef union { struct { uint8_t h; uint8_t s; uint8_t v; }; uint8_t comp[3]; } __aligned (4) color_uint8_hsv_t; extern void color_rgb_hsv_convert(const color_rgb_t *, color_fix16_hsv_t *); extern void color_hsv_lerp(const color_fix16_hsv_t *, const color_fix16_hsv_t *, fix16_t, color_fix16_hsv_t *); #endif /* !__libfixmath_color_h__ */ ## Instruction: Change R and B components ## Code After: typedef union { struct { unsigned int :1; unsigned int b:5; unsigned int g:5; unsigned int r:5; } __packed; uint8_t comp[3]; uint16_t raw; } __aligned (4) color_rgb_t; typedef union { struct { fix16_t v; fix16_t s; fix16_t h; }; fix16_t comp[3]; } __aligned (4) color_fix16_hsv_t; typedef union { struct { uint8_t v; uint8_t s; uint8_t h; }; uint8_t comp[3]; } __aligned (4) color_uint8_hsv_t; extern void color_rgb_hsv_convert(const color_rgb_t *, color_fix16_hsv_t *); extern void color_hsv_lerp(const color_fix16_hsv_t *, const color_fix16_hsv_t *, fix16_t, color_fix16_hsv_t *); #endif /* !__libfixmath_color_h__ */
2df979c6533fa7b5301e5ca0135da177bab3ed97
scripts/pip-install.sh
scripts/pip-install.sh
_python_version=`python -c 'import sys; version=sys.version_info[:3]; print("{0}.{1}.{2}".format(*version))'` if [ "$_python_version" == "2.6.6" ] then pip install -r pyinstaller-requirements-2.6.txt else pip install -r pyinstaller-requirements.txt fi
_python_version=`python -c 'import sys; version=sys.version_info[:3]; print("{0}.{1}.{2}".format(*version))'` if [ "$_python_version" == "2.6.6" ] then pip install -r pyinstaller-requirements-2.6.txt pip uninstall jinja2 else pip install -r pyinstaller-requirements.txt fi
Remove the Jinja2 package since it cannot work with python2.6 and fails the packaging
Remove the Jinja2 package since it cannot work with python2.6 and fails the packaging
Shell
apache-2.0
madchills/hubble,madchills/hubble,basepi/hubble,basepi/hubble
shell
## Code Before: _python_version=`python -c 'import sys; version=sys.version_info[:3]; print("{0}.{1}.{2}".format(*version))'` if [ "$_python_version" == "2.6.6" ] then pip install -r pyinstaller-requirements-2.6.txt else pip install -r pyinstaller-requirements.txt fi ## Instruction: Remove the Jinja2 package since it cannot work with python2.6 and fails the packaging ## Code After: _python_version=`python -c 'import sys; version=sys.version_info[:3]; print("{0}.{1}.{2}".format(*version))'` if [ "$_python_version" == "2.6.6" ] then pip install -r pyinstaller-requirements-2.6.txt pip uninstall jinja2 else pip install -r pyinstaller-requirements.txt fi
3598313c087651a85dce5e31d9fdc227dea0ccf4
binary-search.py
binary-search.py
def binary_search(arr, data): low = 0 # first element in array high = len(arr) - 1 # last item in array while low <= high: # iterate through "entire" array middle = (low + high)/2 if arr[middle] == data: return middle elif arr[middle] < data: low = middle + 1 # narrow down search to upper half else: high = middle - 1 # narrow down search to bottom half return -1 # data not in array
def binary_search(arr, data): low = 0 # first element position in array high = len(arr) - 1 # last element position in array while low <= high: # iterate through "entire" array middle = (low + high)/2 if arr[middle] == data: return middle elif arr[middle] < data: low = middle + 1 # narrow down search to upper half else: high = middle - 1 # narrow down search to bottom half return -1 # data not in array # test cases test = [1, 4, 5, 7, 8, 9, 11, 17, 19, 26, 32, 35, 36] data_one = 11 data_two = 4 data_three = 35 data_four = 27 data_five = 38 print binary_search(test, data_one) # prints 6 print binary_search(test, data_two) # prints 1 print binary_search(test, data_three) # prints 11 print binary_search(test, data_four) # prints -1 print binary_search(test, data_five) # prints -1
Add test cases for python implementation of binary search function
Add test cases for python implementation of binary search function
Python
mit
derekmpham/interview-prep,derekmpham/interview-prep
python
## Code Before: def binary_search(arr, data): low = 0 # first element in array high = len(arr) - 1 # last item in array while low <= high: # iterate through "entire" array middle = (low + high)/2 if arr[middle] == data: return middle elif arr[middle] < data: low = middle + 1 # narrow down search to upper half else: high = middle - 1 # narrow down search to bottom half return -1 # data not in array ## Instruction: Add test cases for python implementation of binary search function ## Code After: def binary_search(arr, data): low = 0 # first element position in array high = len(arr) - 1 # last element position in array while low <= high: # iterate through "entire" array middle = (low + high)/2 if arr[middle] == data: return middle elif arr[middle] < data: low = middle + 1 # narrow down search to upper half else: high = middle - 1 # narrow down search to bottom half return -1 # data not in array # test cases test = [1, 4, 5, 7, 8, 9, 11, 17, 19, 26, 32, 35, 36] data_one = 11 data_two = 4 data_three = 35 data_four = 27 data_five = 38 print binary_search(test, data_one) # prints 6 print binary_search(test, data_two) # prints 1 print binary_search(test, data_three) # prints 11 print binary_search(test, data_four) # prints -1 print binary_search(test, data_five) # prints -1
61d09b41736051532c6fac0d2a987b442726d31a
src/Illuminate/Foundation/Inspiring.php
src/Illuminate/Foundation/Inspiring.php
<?php namespace Illuminate\Foundation; use Illuminate\Support\Collection; class Inspiring { /** * Get an inspiring quote. * * Taylor & Dayle made this commit from Jungfraujoch. (11,333 ft.) * * @return string */ public static function quote() { return Collection::make([ 'When there is no desire, all things are at peace. - Laozi', ])->random(); } }
<?php namespace Illuminate\Foundation; use Illuminate\Support\Collection; class Inspiring { /** * Get an inspiring quote. * * Taylor & Dayle made this commit from Jungfraujoch. (11,333 ft.) * * @return string */ public static function quote() { return Collection::make([ 'When there is no desire, all things are at peace. - Laozi', 'Simplicity is the ultimate sophistication. - Leonardo da Vinci', 'Simplicity is the essence of happiness. - Cedric Bledsoe', 'Smile, breathe, and go slowly. - Thich Nhat Hanh', 'Simplicity is an aquired taste. - Katharine Gerould', ])->random(); } }
Add a few more quotes.
Add a few more quotes.
PHP
mit
andersonef/framework,willrowe/laravel-framework,5outh/framework,RobvH/framework,xiphiaz/framework,deefour/framework,timfeid/framework-1,jarnovanleeuwen/framework,CurosMJ/framework,moura137/framework,stevebauman/framework,antonybudianto/framework,5outh/framework,mbernson/framework,proshanto/framework,mul14/laravel-framework,kelixlabs/laravel-framework,n7olkachev/framework,rogue780/framework,ironxu/framework,srmkliveforks/framework,behzadsh/framework,blazeworx/framework,ruuter/laravel-framework,franzliedke/framework,devsalman/framework,jimrubenstein/laravel-framework,miclf/framework,miclf/framework,alnutile/framework,captbrogers/framework,danilobrinu/framework,DougSisk/framework,wiltosoft/laravel,rodrigopedra/framework,OzanKurt/framework,moura137/framework,danilobrinu/framework,kelixlabs/laravel-framework,SebastianBerc/framework,renekoch/framework,xiphiaz/framework,hpolthof/framework,cillosis/framework,irfanevrens/framework,proshanto/framework,windevalley/framework,lvht/framework,adamgoose/framework,GreenLightt/laravel-framework,john-main-croud/framework,joko-wandiro/framework,omar-dev/framework,usm4n/laravel-patch,srenauld/framework,bdsoha/framework,thomasruiz/laravel-framework,mightydes/framework,JesusContributions/laravel-framework,patrickcarlohickman/framework,jmarcher/framework,mortenhauberg/framework,anteriovieira/framework,ezeql/framework,neva-dev/laravel-framework,bmitch/framework,TheGIBSON/framework,noikiy/framework-1,samlev/framework,Talean-dev/framework,filipeaclima/framework,JesusContributions/laravel-framework,tjbp/framework,SelimSalihovic/framework,tills13/framework,gaaarfild/framework,dwightwatson/framework,mmauri04/framework,genvideo/framework,samuel-cloete/framework,Fenzland/laravel,mickaelandrieu/framework,mightydes/framework,miclf/framework,shandy05/framework,jorgemurta/framework,cjaoude/framework,srmkliveforks/framework,rleger/framework,aeryaguzov/framework,blazeworx/framework,RobvH/framework,franzliedke/framework,greabock/framework,wujingke/framework,ameliaikeda/framework,GreenLightt/laravel-framework,cviebrock/framework,jorgemurta/framework,JesusContributions/laravel-framework,herberk/framework,alnutile/framework,antonioribeiro/framework,srmkliveforks/framework,colindecarlo/framework,john-main-croud/framework,wiltosoft/laravel,valeryq/framework,gms8994/framework,mickaelandrieu/framework,pouya-parsa/framework,thecrypticace/framework,wujingke/framework,laracasts/framework,billmn/framework,rkgrep/framework,pouya-parsa/framework,spyric/framework,rodrigopedra/framework,ncusoho/framework,djae138/framework,stidges/framework,nhowell/laravel-framework,nahid/framework,mateusjatenee/framework,lvht/framework,antonybudianto/framework,captbrogers/framework,simensen/laravel-framework,likerRr/framework,djtarazona/laravel-framework,rap2hpoutre/framework,garygreen/framework,Garbee/framework,mlantz/framework,cybercog/framework,sileence/laravel-framework,ImaginationSydney/Laravel,isiryder/framework,sileence/framework,maxverbeek/framework,driesvints/framework,nelson6e65/framework,behzadsh/framework,ChristopheB/framework,HipsterJazzbo/framework,SebastianBerc/framework,rogue780/framework,jarektkaczyk/framework,tillkruss/framework,sileence/framework,michael-repka/framework,jwdeitch/framework,jarektkaczyk/framework,laracasts/framework,bancur/framework,claar/framework,SebastianBerc/framework,pakogn/framework,kcalliauw/framework,bmitch/framework,AndreasHeiberg/framework,irfanevrens/framework,fragglebob/framework,leo108/laravel_framework,devsalman/framework,phanan/framework,Evertt/framework,drbyte/framework,guiwoda/framework,mortenhauberg/framework,timfeid/framework-1,adamgoose/framework,renekoch/framework,mwain/framework,bytestream/framework,tadejkan/framework,loduis/laravel-framework,cviebrock/framework,drbyte/framework,isiryder/framework,BePsvPT/framework,jerguslejko/framework,nahid/framework,Garbee/framework,claar/framework,nhowell/laravel-framework,freejavaster/framework,atorscho/framework,SecureCloud-biz/framework,kevinsimard/framework,rodrigopedra/framework,jaimz22/framework,rkgrep/framework,cwt137/laravel-framework,noikiy/framework-1,laravel/framework,mwain/framework,Denniskevin/framework,nerijunior/framework,dwightwatson/framework,alexgalletti/framework,bastiaan89/framework,colindecarlo/framework,hosmelq/framework,usm4n/laravel-patch,numa-engineering/framework,djae138/framework,rleger/framework,ExpoTV/framework,jaimz22/framework,tadejkan/framework,neva-dev/laravel-framework,acasar/framework,wujingke/framework,christoffertyrefors/framework,katcountiss/framework,Nikita240/framework,hutushen222/framework,nhowell/laravel-framework,tomcastleman/framework,jchamberlain/framework,rafaelbeckel/framework,guiwoda/framework,anteriovieira/framework,martinbean/laravel-framework,dan-har/framework,MladenJanjetovic/framework,Elandril/framework,bobbybouwmann/framework,tills13/framework,BePsvPT-Fork/framework,BePsvPT-Fork/framework,Modelizer/framework,zcwilt/framework,alepeino/framework,AllysonSilva/LaravelKernel,ncaneldiee/laravel-framework,harrygr/framework,billmn/framework,arturock/framework,rentalhost/framework,mateusjatenee/framework,piokom123/framework,MedAhamada/framework,stevebauman/framework,leo108/laravel_framework,yadakhov/framework,samuel-cloete/framework,SecureCloud-biz/framework,HipsterJazzbo/framework,osiux/framework,hpolthof/framework,cjaoude/framework,crynobone/framework,vlakoff/framework,kamazee/laravel-framework,aeryaguzov/framework,jtgrimes/framework,numa-engineering/framework,arturock/framework,zcwilt/framework,FooBarQuaxx/framework,KhaledSMQ/framework,valeryq/framework,rkgrep/framework,rentalhost/framework,srenauld/framework,vlakoff/framework,yadakhov/framework,katcountiss/framework,mmauri04/framework,jimrubenstein/laravel-framework,thomasruiz/laravel-framework,samlev/framework,halaei/framework,j42/framework,rafaelbeckel/framework,fungku/framework,tomschlick/framework,ImaginationSydney/Laravel,GreenLightt/laravel-framework,scrubmx/framework,jerguslejko/framework,cviebrock/framework,tillkruss/framework,lvht/framework,moura137/framework,ChristopheB/framework,rentalhost/framework,alexgalletti/framework,bmitch/framework,OzanKurt/framework,andersonef/framework,willrowe/laravel-framework,nerijunior/framework,brti/framework,deefour/framework,AndreasHeiberg/framework,arturock/framework,michael-repka/framework,Fenzland/laravel,CurosMJ/framework,rsanchez/laravel-framework,CurosMJ/framework,piokom123/framework,Luceos/framework,jtgrimes/framework,ps92/framework,kevinsimard/framework,MladenJanjetovic/framework,euoia/framework,GiantCowFilms/framework,gaaarfild/framework,RyansForks/laravel-framework,5outh/framework,genvideo/framework,djtarazona/laravel-framework,jmarcher/framework,ruuter/laravel-framework,tomschlick/framework,lucasmichot/laravel--framework,cmazx/framework,lukasgeiter/laravel-framework,cillosis/framework,DougSisk/framework,fisharebest/framework,maxbublik/framework,peterpan666/framework,notebowl/laravel-framework,yadakhov/framework,Talean-dev/framework,rsanchez/laravel-framework,jwdeitch/framework,djae138/framework,Belphemur/framework,rleger/framework,alepeino/framework,KluVerKamp/framework,titiushko/framework,cybercog/framework,peterpan666/framework,amenk/framework,JosephSilber/framework,jackson-dean/framework,ps92/framework,renekoch/framework,mortenhauberg/framework,rap2hpoutre/framework,mlantz/framework,irfanevrens/framework,nelson6e65/framework,jarektkaczyk/framework,Fenzland/laravel,captbrogers/framework,omar-dev/framework,joel-james/framework,spyric/framework,MedAhamada/framework,MarkRedeman/framework,antonioribeiro/framework,ncusoho/framework,rsanchez/laravel-framework,tamnil/framework,vetruvet/framework,maxverbeek/framework,tillkruss/framework,sileence/laravel-framework,hosmelq/framework,ExpoTV/framework,reinink/framework,jarnovanleeuwen/framework,joecohens/framework,guanhui07/framework,ironxu/framework,tamnil/framework,omar-dev/framework,martinssipenko/framework,dan-har/framework,sileence/laravel-framework,litvinchuk/framework,tomzx/laravex,phanan/framework,yesdevnull/framework,vetruvet/framework,windevalley/framework,ncaneldiee/laravel-framework,jchamberlain/framework,rogue780/framework,JamesForks/framework,lucasmichot/laravel--framework,devsalman/framework,brti/framework,nerijunior/framework,jrean/framework,kamazee/laravel-framework,zhenkondrat/framework,euoia/framework,timfeid/framework-1,ncusoho/framework,FireEngineRed/framework,willrowe/laravel-framework,noikiy/framework-1,ironxu/framework,blazeworx/framework,morrislaptop/framework,nelson6e65/framework,joel-james/framework,yesdevnull/framework,gaaarfild/framework,reinink/framework,titiushko/framework,KluVerKamp/framework,branall1/framework,cwt137/laravel-framework,JosephSilber/framework,herberk/framework,RobvH/framework,crynobone/framework,loduis/laravel-framework,tuupke/framework,mcgrogan91/framework,branall1/framework,cmazx/framework,adamgoose/framework,gms8994/framework,djtarazona/laravel-framework,Feijs/framework,markhemstead/framework,Feijs/framework,JamesForks/framework,maddhatter/framework,PantherDD/laravel-framework,john-main-croud/framework,ameliaikeda/framework,windevalley/framework,morrislaptop/framework,laracasts/framework,david-ridgeonnet/framework,TheGIBSON/framework,freejavaster/framework,fragglebob/framework,lucasmichot/framework,acasar/framework,rafaelbeckel/framework,yesdevnull/framework,scrubmx/framework,jack-webster/framework,kevindoole/framework,cillosis/framework,sileence/framework,jackson-dean/framework,Elandril/framework,hpolthof/framework,jtgrimes/framework,thecrypticace/framework,RatkoR/framework,tomcastleman/framework,jwdeitch/framework,deefour/framework,Hugome/framework,hafezdivandari/framework,martinbean/laravel-framework,harrygr/framework,rocketpastsix/framework,pakogn/framework,mightydes/framework,numa-engineering/framework,bastiaan89/framework,Modelizer/framework,DougSisk/framework,FooBarQuaxx/framework,jrean/framework,GiantCowFilms/framework,amenk/framework,zhenkondrat/framework,kevindoole/framework,atorscho/framework,Elandril/framework,lguima/framework,danilobrinu/framework,harrygr/framework,hosmelq/framework,euoia/framework,Wellington475/framework,Modelizer/framework,thecrypticace/framework,fungku/framework,barryvdh/framework,FooBarQuaxx/framework,smb/framework,lucasmichot/laravel--framework,dan-har/framework,barryvdh/framework,BePsvPT-Fork/framework,markhemstead/framework,ezeql/framework,herberk/framework,kcalliauw/framework,SecureCloud-biz/framework,jack-webster/framework,martinbean/laravel-framework,pouya-parsa/framework,halaei/framework,maxbublik/framework,lguima/framework,Luceos/framework,shandy05/framework,RatkoR/framework,BePsvPT-Fork/framework,jaimz22/framework,Denniskevin/framework,smb/framework,simensen/laravel-framework,jimrubenstein/laravel-framework,max-kovpak/framework,RyansForks/laravel-framework,david-ridgeonnet/framework,FireEngineRed/framework,SelimSalihovic/framework,ImaginationSydney/Laravel,MarkRedeman/framework,lucasmichot/framework,jack-webster/framework,olsgreen/framework,pakogn/framework,tomschlick/framework,ameliaikeda/framework,tills13/framework,KhaledSMQ/framework,ezeql/framework,hutushen222/framework,hutushen222/framework,j42/framework,bastiaan89/framework,phanan/framework,bobbybouwmann/framework,laravel/framework,isiryder/framework,olsgreen/framework,proshanto/framework,freejavaster/framework,scrubmx/framework,ps92/framework,mxaddict/framework,billmn/framework,brti/framework,tuupke/framework,SelimSalihovic/framework,fisharebest/framework,fisharebest/framework,jorgemurta/framework,rodrigopedra/framework,bdsoha/framework,joecohens/framework,barryvdh/framework,Wellington475/framework,PantherDD/laravel-framework,antonybudianto/framework,mwain/framework,likerRr/framework,MarkRedeman/framework,christoffertyrefors/framework,filipeaclima/framework,mul14/laravel-framework,christoffertyrefors/framework,anteriovieira/framework,OzanKurt/framework,maddhatter/framework,jrean/framework,peterpan666/framework,greabock/framework,mmauri04/framework,max-kovpak/framework,zcwilt/framework,srenauld/framework,bytestream/framework,kevinsimard/framework,cybercog/framework,Garbee/framework,xiphiaz/framework,AllysonSilva/LaravelKernel,kamazee/laravel-framework,claar/framework,simensen/laravel-framework,jerguslejko/framework,jchamberlain/framework,maxverbeek/framework,tomcastleman/framework,bancur/framework,fungku/framework,tuupke/framework,Feijs/framework,phroggyy/framework,martinssipenko/framework,litvinchuk/framework,Hugome/framework,jerguslejko/framework,behzadsh/framework,n7olkachev/framework,litvinchuk/framework,colindecarlo/framework,neva-dev/laravel-framework,Belphemur/framework,loduis/laravel-framework,michael-repka/framework,nahid/framework,stidges/framework,kevindoole/framework,Denniskevin/framework,lguima/framework,bancur/framework,fragglebob/framework,Evertt/framework,HipsterJazzbo/framework,vetruvet/framework,greabock/framework,ruuter/laravel-framework,branall1/framework,notebowl/laravel-framework,antonioribeiro/framework,rap2hpoutre/framework,ChristopheB/framework,drbyte/framework,BePsvPT/framework,phroggyy/framework,mcgrogan91/framework,mbernson/framework,mbernson/framework,usm4n/laravel-patch,mul14/laravel-framework,thomasruiz/laravel-framework,mxaddict/framework,joel-james/framework,genvideo/framework,garygreen/framework,atorscho/framework,aeryaguzov/framework,mlantz/framework,garygreen/framework,joecohens/framework,Nikita240/framework,alepeino/framework,cjaoude/framework,mcgrogan91/framework,cmazx/framework,alexgalletti/framework,Evertt/framework,zhenkondrat/framework,mxaddict/framework,acasar/framework,osiux/framework,joko-wandiro/framework,maxbublik/framework,patrickcarlohickman/framework,jackson-dean/framework,bdsoha/framework,Wellington475/framework,jmarcher/framework,kelixlabs/laravel-framework,olsgreen/framework,tomzx/laravex,ExpoTV/framework,Hugome/framework,andersonef/framework,bobbybouwmann/framework,smb/framework,barryvdh/framework,RyansForks/laravel-framework,tamnil/framework,TheGIBSON/framework,osiux/framework,gms8994/framework,reinink/framework,piokom123/framework,n7olkachev/framework,stidges/framework,titiushko/framework,EspadaV8/framework,rocketpastsix/framework,shandy05/framework,KhaledSMQ/framework,kcalliauw/framework,Talean-dev/framework,likerRr/framework,EspadaV8/framework,j42/framework,spyric/framework,gms8994/framework,phroggyy/framework,max-kovpak/framework,valeryq/framework,mickaelandrieu/framework,ncaneldiee/laravel-framework,amenk/framework,GiantCowFilms/framework,katcountiss/framework,Nikita240/framework,MedAhamada/framework,driesvints/framework,jarnovanleeuwen/framework,Belphemur/framework,lukasgeiter/laravel-framework,cwt137/laravel-framework,FireEngineRed/framework,maddhatter/framework,srmkliveforks/framework,wiltosoft/laravel,cviebrock/framework,stidges/framework,AllysonSilva/LaravelKernel,vlakoff/framework,lukasgeiter/laravel-framework,martinssipenko/framework,tjbp/framework,mul14/laravel-framework,PantherDD/laravel-framework,david-ridgeonnet/framework,alnutile/framework,RatkoR/framework,samuel-cloete/framework,mateusjatenee/framework,hafezdivandari/framework,KluVerKamp/framework,AndreasHeiberg/framework,tadejkan/framework,guiwoda/framework,BePsvPT/framework,guanhui07/framework,MladenJanjetovic/framework,patrickcarlohickman/framework,halaei/framework,guanhui07/framework,tjbp/framework,Luceos/framework,EspadaV8/framework,franzliedke/framework,filipeaclima/framework
php
## Code Before: <?php namespace Illuminate\Foundation; use Illuminate\Support\Collection; class Inspiring { /** * Get an inspiring quote. * * Taylor & Dayle made this commit from Jungfraujoch. (11,333 ft.) * * @return string */ public static function quote() { return Collection::make([ 'When there is no desire, all things are at peace. - Laozi', ])->random(); } } ## Instruction: Add a few more quotes. ## Code After: <?php namespace Illuminate\Foundation; use Illuminate\Support\Collection; class Inspiring { /** * Get an inspiring quote. * * Taylor & Dayle made this commit from Jungfraujoch. (11,333 ft.) * * @return string */ public static function quote() { return Collection::make([ 'When there is no desire, all things are at peace. - Laozi', 'Simplicity is the ultimate sophistication. - Leonardo da Vinci', 'Simplicity is the essence of happiness. - Cedric Bledsoe', 'Smile, breathe, and go slowly. - Thich Nhat Hanh', 'Simplicity is an aquired taste. - Katharine Gerould', ])->random(); } }
e8cfba38eeee88123f2de9022aee974f8a86a39a
CHANGELOG.md
CHANGELOG.md
All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning]. <!-- references --> [Keep a Changelog]: https://keepachangelog.com/en/1.0.0/ [Semantic Versioning]: https://semver.org/spec/v2.0.0.html ## [Unreleased] - Initial release <!-- references --> [Unreleased]: https://github.com/dialekt-lang/dialekt-php <!-- version template ## [0.0.1] - YYYY-MM-DD ### Added ### Changed ### Deprecated ### Removed ### Fixed ### Security -->
All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning]. <!-- references --> [Keep a Changelog]: https://keepachangelog.com/en/1.0.0/ [Semantic Versioning]: https://semver.org/spec/v2.0.0.html ## [0.1.0] - 2020-09-02 - Initial release <!-- references --> [Unreleased]: https://github.com/dialekt-lang/dialekt-php [0.1.0]: https://github.com/dialekt-lang/dialekt-php/releases/tag/v0.1.0 <!-- version template ## [0.0.1] - YYYY-MM-DD ### Added ### Changed ### Deprecated ### Removed ### Fixed ### Security -->
Add v0.1.0 release to changelog.
Add v0.1.0 release to changelog.
Markdown
mit
IcecaveStudios/dialekt
markdown
## Code Before: All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning]. <!-- references --> [Keep a Changelog]: https://keepachangelog.com/en/1.0.0/ [Semantic Versioning]: https://semver.org/spec/v2.0.0.html ## [Unreleased] - Initial release <!-- references --> [Unreleased]: https://github.com/dialekt-lang/dialekt-php <!-- version template ## [0.0.1] - YYYY-MM-DD ### Added ### Changed ### Deprecated ### Removed ### Fixed ### Security --> ## Instruction: Add v0.1.0 release to changelog. ## Code After: All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning]. <!-- references --> [Keep a Changelog]: https://keepachangelog.com/en/1.0.0/ [Semantic Versioning]: https://semver.org/spec/v2.0.0.html ## [0.1.0] - 2020-09-02 - Initial release <!-- references --> [Unreleased]: https://github.com/dialekt-lang/dialekt-php [0.1.0]: https://github.com/dialekt-lang/dialekt-php/releases/tag/v0.1.0 <!-- version template ## [0.0.1] - YYYY-MM-DD ### Added ### Changed ### Deprecated ### Removed ### Fixed ### Security -->
67f4b60b3a2a2fcaedebfe028453f6592af6c509
tools/python.mk
tools/python.mk
.ONESHELL: SHELL = bash CPU_CORES = $(shell nproc) # PIP_INSTALL = --editable . # PYLINT_ARG = # MYPY_ARG = # PYTEST_ARG = SHARED_DEV_REQUIREMENTS = \ black \ isort \ mypy \ pylint \ pytest \ pytest-cov \ pytest-xdist VENV = venv $(VENV): python3 -m venv $(VENV) source $(VENV)/bin/activate pip install --upgrade pip setuptools wheel pip install $(SHARED_DEV_REQUIREMENTS) $(PIP_INSTALL) .PHONY: .format .format: $(VENV) source $(VENV)/bin/activate black . isort --profile black . .PHONY: .pylint .pylint: $(VENV) source $(VENV)/bin/activate pylint --output-format=colorized $(PYLINT_ARG) || true .PHONY: .mypy .mypy: $(VENV) source $(VENV)/bin/activate mypy $(MYPY_ARG) || true .PHONY: .pytest .pytest: $(VENV) source venv/bin/activate pytest -n $(CPU_CORES) --color=yes -v $(PYTEST_ARG) .PHONY: .clean .clean: rm -Rf $(VENV)
.ONESHELL: SHELL = bash CPU_CORES = $(shell nproc) # PIP_INSTALL = --editable . # PYLINT_ARG = # MYPY_ARG = # PYTEST_ARG = SHARED_DEV_REQUIREMENTS = \ black \ isort \ mypy \ pylint \ pytest \ pytest-cov \ pytest-xdist VENV = venv $(VENV): python3 -m venv $(VENV) source $(VENV)/bin/activate $(MAKE) install install: venv source $(VENV)/bin/activate pip install --upgrade pip setuptools wheel pip install $(SHARED_DEV_REQUIREMENTS) $(PIP_INSTALL) .PHONY: .format .format: $(VENV) source $(VENV)/bin/activate black . isort --profile black . .PHONY: .pylint .pylint: $(VENV) source $(VENV)/bin/activate pylint --output-format=colorized $(PYLINT_ARG) || true .PHONY: .mypy .mypy: $(VENV) source $(VENV)/bin/activate mypy $(MYPY_ARG) || true .PHONY: .pytest .pytest: $(VENV) source venv/bin/activate pytest -n $(CPU_CORES) --color=yes -v $(PYTEST_ARG) .PHONY: .clean .clean: rm -Rf $(VENV)
Split venv setup and package install targets
Split venv setup and package install targets This allow to reinstall the packages without rebuilding the venv in case of dependencies change.
Makefile
agpl-3.0
LibreTime/libretime,LibreTime/libretime,LibreTime/libretime,LibreTime/libretime,LibreTime/libretime,LibreTime/libretime
makefile
## Code Before: .ONESHELL: SHELL = bash CPU_CORES = $(shell nproc) # PIP_INSTALL = --editable . # PYLINT_ARG = # MYPY_ARG = # PYTEST_ARG = SHARED_DEV_REQUIREMENTS = \ black \ isort \ mypy \ pylint \ pytest \ pytest-cov \ pytest-xdist VENV = venv $(VENV): python3 -m venv $(VENV) source $(VENV)/bin/activate pip install --upgrade pip setuptools wheel pip install $(SHARED_DEV_REQUIREMENTS) $(PIP_INSTALL) .PHONY: .format .format: $(VENV) source $(VENV)/bin/activate black . isort --profile black . .PHONY: .pylint .pylint: $(VENV) source $(VENV)/bin/activate pylint --output-format=colorized $(PYLINT_ARG) || true .PHONY: .mypy .mypy: $(VENV) source $(VENV)/bin/activate mypy $(MYPY_ARG) || true .PHONY: .pytest .pytest: $(VENV) source venv/bin/activate pytest -n $(CPU_CORES) --color=yes -v $(PYTEST_ARG) .PHONY: .clean .clean: rm -Rf $(VENV) ## Instruction: Split venv setup and package install targets This allow to reinstall the packages without rebuilding the venv in case of dependencies change. ## Code After: .ONESHELL: SHELL = bash CPU_CORES = $(shell nproc) # PIP_INSTALL = --editable . # PYLINT_ARG = # MYPY_ARG = # PYTEST_ARG = SHARED_DEV_REQUIREMENTS = \ black \ isort \ mypy \ pylint \ pytest \ pytest-cov \ pytest-xdist VENV = venv $(VENV): python3 -m venv $(VENV) source $(VENV)/bin/activate $(MAKE) install install: venv source $(VENV)/bin/activate pip install --upgrade pip setuptools wheel pip install $(SHARED_DEV_REQUIREMENTS) $(PIP_INSTALL) .PHONY: .format .format: $(VENV) source $(VENV)/bin/activate black . isort --profile black . .PHONY: .pylint .pylint: $(VENV) source $(VENV)/bin/activate pylint --output-format=colorized $(PYLINT_ARG) || true .PHONY: .mypy .mypy: $(VENV) source $(VENV)/bin/activate mypy $(MYPY_ARG) || true .PHONY: .pytest .pytest: $(VENV) source venv/bin/activate pytest -n $(CPU_CORES) --color=yes -v $(PYTEST_ARG) .PHONY: .clean .clean: rm -Rf $(VENV)
31b70041a9fc7da87774bffd59a9f93917200f18
setup.py
setup.py
from setuptools import setup, find_packages with open('README.rst') as readme: long_description = ''.join(readme).strip() setup( name='rsocks', version='0.3.3', author='Jiangge Zhang', author_email='[email protected]', description='A SOCKS reverse proxy server.', long_description=long_description, url='https://github.com/tonyseek/rsocks', license='MIT', classifiers=[ 'Development Status :: 3 - Alpha', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: Implementation :: PyPy', ], packages=find_packages(), platforms=['Any'], install_requires=[ 'PySocks>=1.5,<1.6', 'eventlet>=0.31,<0.34', 'click>=3.3,<3.4', 'toml.py>=0.1,<0.2', 'six', ], entry_points={ 'console_scripts': [ 'rsocks=rsocks.cli:main', ], }, )
from setuptools import setup, find_packages with open('README.rst') as readme: long_description = ''.join(readme).strip() setup( name='rsocks', version='0.3.3', author='Jiangge Zhang', author_email='[email protected]', description='A SOCKS reverse proxy server.', long_description=long_description, url='https://github.com/tonyseek/rsocks', license='MIT', classifiers=[ 'Development Status :: 3 - Alpha', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: Implementation :: PyPy', ], packages=find_packages(), platforms=['Any'], install_requires=[ 'PySocks>=1.7.1,<1.8', 'eventlet>=0.31,<0.34', 'click>=3.3,<3.4', 'toml.py>=0.1,<0.2', 'six', ], entry_points={ 'console_scripts': [ 'rsocks=rsocks.cli:main', ], }, )
Upgrade PySocks to fix Python 3.10 compatbility
Upgrade PySocks to fix Python 3.10 compatbility
Python
mit
tonyseek/rsocks,tonyseek/rsocks
python
## Code Before: from setuptools import setup, find_packages with open('README.rst') as readme: long_description = ''.join(readme).strip() setup( name='rsocks', version='0.3.3', author='Jiangge Zhang', author_email='[email protected]', description='A SOCKS reverse proxy server.', long_description=long_description, url='https://github.com/tonyseek/rsocks', license='MIT', classifiers=[ 'Development Status :: 3 - Alpha', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: Implementation :: PyPy', ], packages=find_packages(), platforms=['Any'], install_requires=[ 'PySocks>=1.5,<1.6', 'eventlet>=0.31,<0.34', 'click>=3.3,<3.4', 'toml.py>=0.1,<0.2', 'six', ], entry_points={ 'console_scripts': [ 'rsocks=rsocks.cli:main', ], }, ) ## Instruction: Upgrade PySocks to fix Python 3.10 compatbility ## Code After: from setuptools import setup, find_packages with open('README.rst') as readme: long_description = ''.join(readme).strip() setup( name='rsocks', version='0.3.3', author='Jiangge Zhang', author_email='[email protected]', description='A SOCKS reverse proxy server.', long_description=long_description, url='https://github.com/tonyseek/rsocks', license='MIT', classifiers=[ 'Development Status :: 3 - Alpha', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: Implementation :: PyPy', ], packages=find_packages(), platforms=['Any'], install_requires=[ 'PySocks>=1.7.1,<1.8', 'eventlet>=0.31,<0.34', 'click>=3.3,<3.4', 'toml.py>=0.1,<0.2', 'six', ], entry_points={ 'console_scripts': [ 'rsocks=rsocks.cli:main', ], }, )
7ab465aaaf69ba114b3411204dd773781a147c41
longclaw/project_template/products/models.py
longclaw/project_template/products/models.py
from django.db import models from wagtail.wagtailcore.fields import RichTextField from longclaw.longclawproducts.models import ProductVariantBase class ProductVariant(ProductVariantBase): # Enter your custom product variant fields here # e.g. colour, size, stock and so on. # Remember, ProductVariantBase provides 'price', 'ref', 'slug' fields # and the parental key to the Product model. description = RichTextField() stock = models.IntegerField(default=0)
from django.db import models from wagtail.wagtailcore.fields import RichTextField from longclaw.longclawproducts.models import ProductVariantBase class ProductVariant(ProductVariantBase): # Enter your custom product variant fields here # e.g. colour, size, stock and so on. # Remember, ProductVariantBase provides 'price', 'ref', 'slug' fields # and the parental key to the Product model. description = RichTextField()
Remove 'stock' field from template products
Remove 'stock' field from template products
Python
mit
JamesRamm/longclaw,JamesRamm/longclaw,JamesRamm/longclaw,JamesRamm/longclaw
python
## Code Before: from django.db import models from wagtail.wagtailcore.fields import RichTextField from longclaw.longclawproducts.models import ProductVariantBase class ProductVariant(ProductVariantBase): # Enter your custom product variant fields here # e.g. colour, size, stock and so on. # Remember, ProductVariantBase provides 'price', 'ref', 'slug' fields # and the parental key to the Product model. description = RichTextField() stock = models.IntegerField(default=0) ## Instruction: Remove 'stock' field from template products ## Code After: from django.db import models from wagtail.wagtailcore.fields import RichTextField from longclaw.longclawproducts.models import ProductVariantBase class ProductVariant(ProductVariantBase): # Enter your custom product variant fields here # e.g. colour, size, stock and so on. # Remember, ProductVariantBase provides 'price', 'ref', 'slug' fields # and the parental key to the Product model. description = RichTextField()
c1785e0713a5af6b849baaa1b314a13ac777f3f5
tests/test_str_py3.py
tests/test_str_py3.py
from os import SEEK_SET from random import choice, seed from string import ascii_uppercase, digits import fastavro from fastavro.compat import BytesIO letters = ascii_uppercase + digits id_size = 100 seed('str_py3') # Repeatable results def gen_id(): return ''.join(choice(letters) for _ in range(id_size)) keys = ['first', 'second', 'third', 'fourth'] testdata = [dict((key, gen_id()) for key in keys) for _ in range(50)] schema = { "fields": [{'name': key, 'type': 'string'} for key in keys], "namespace": "namespace", "name": "zerobyte", "type": "record" } def test_str_py3(): buf = BytesIO() fastavro.writer(buf, schema, testdata) buf.seek(0, SEEK_SET) for i, rec in enumerate(fastavro.iter_avro(buf), 1): pass size = len(testdata) assert i == size, 'bad number of records' assert rec == testdata[-1], 'bad last record' if __name__ == '__main__': test_str_py3()
"""Python3 string tests for fastavro""" from __future__ import absolute_import from os import SEEK_SET from random import choice, seed from string import ascii_uppercase, digits try: from cStringIO import StringIO as BytesIO except ImportError: from io import BytesIO import fastavro letters = ascii_uppercase + digits id_size = 100 seed('str_py3') # Repeatable results def gen_id(): return ''.join(choice(letters) for _ in range(id_size)) keys = ['first', 'second', 'third', 'fourth'] testdata = [dict((key, gen_id()) for key in keys) for _ in range(50)] schema = { "fields": [{'name': key, 'type': 'string'} for key in keys], "namespace": "namespace", "name": "zerobyte", "type": "record" } def test_str_py3(): buf = BytesIO() fastavro.writer(buf, schema, testdata) buf.seek(0, SEEK_SET) for i, rec in enumerate(fastavro.iter_avro(buf), 1): pass size = len(testdata) assert i == size, 'bad number of records' assert rec == testdata[-1], 'bad last record' if __name__ == '__main__': test_str_py3()
Test files shouldn't import 'fastavro.compat'. Just import BytesIO manually.
Test files shouldn't import 'fastavro.compat'. Just import BytesIO manually.
Python
mit
e-heller/fastavro,e-heller/fastavro
python
## Code Before: from os import SEEK_SET from random import choice, seed from string import ascii_uppercase, digits import fastavro from fastavro.compat import BytesIO letters = ascii_uppercase + digits id_size = 100 seed('str_py3') # Repeatable results def gen_id(): return ''.join(choice(letters) for _ in range(id_size)) keys = ['first', 'second', 'third', 'fourth'] testdata = [dict((key, gen_id()) for key in keys) for _ in range(50)] schema = { "fields": [{'name': key, 'type': 'string'} for key in keys], "namespace": "namespace", "name": "zerobyte", "type": "record" } def test_str_py3(): buf = BytesIO() fastavro.writer(buf, schema, testdata) buf.seek(0, SEEK_SET) for i, rec in enumerate(fastavro.iter_avro(buf), 1): pass size = len(testdata) assert i == size, 'bad number of records' assert rec == testdata[-1], 'bad last record' if __name__ == '__main__': test_str_py3() ## Instruction: Test files shouldn't import 'fastavro.compat'. Just import BytesIO manually. ## Code After: """Python3 string tests for fastavro""" from __future__ import absolute_import from os import SEEK_SET from random import choice, seed from string import ascii_uppercase, digits try: from cStringIO import StringIO as BytesIO except ImportError: from io import BytesIO import fastavro letters = ascii_uppercase + digits id_size = 100 seed('str_py3') # Repeatable results def gen_id(): return ''.join(choice(letters) for _ in range(id_size)) keys = ['first', 'second', 'third', 'fourth'] testdata = [dict((key, gen_id()) for key in keys) for _ in range(50)] schema = { "fields": [{'name': key, 'type': 'string'} for key in keys], "namespace": "namespace", "name": "zerobyte", "type": "record" } def test_str_py3(): buf = BytesIO() fastavro.writer(buf, schema, testdata) buf.seek(0, SEEK_SET) for i, rec in enumerate(fastavro.iter_avro(buf), 1): pass size = len(testdata) assert i == size, 'bad number of records' assert rec == testdata[-1], 'bad last record' if __name__ == '__main__': test_str_py3()
5506af9cae733f4089e32e33e9d7436b6b3bf112
spec/helper.rb
spec/helper.rb
require 'webmock/rspec' require "yaml" def stub_api_key file = File.dirname(__FILE__) + '/support/fanfeedr.yml' YAML::load( File.open(file) )["key"] end def json_fixture(file) filename = File.dirname(__FILE__) + "/fixtures/#{file}" File.open(filename).read end def stub_json_request(url, file) json = json_fixture(file) stub_request(:get, url). with(:headers => {'Accept'=>'*/*', 'User-Agent'=>'Ruby'}). to_return(:status => 200, :body => json, :headers => {}) end
require 'webmock/rspec' require "yaml" def stub_api_key file = File.dirname(__FILE__) + '/support/fanfeedr.yml' YAML::load( File.open(file) )["key"] end def stub_api_endpoint 'http://ffapi.fanfeedr.com/basic/api' end def stub_leagues_url "#{stub_api_endpoint}/leagues?api_key=#{stub_api_key}" end def stub_league_url(league) "#{stub_api_endpoint}/league/#{league['id']}?api_key=#{stub_api_key}" end def stub_nfl leagues = JSON.parse(json_fixture('leagues.json')) leagues.select {|league| league["name"] == "NFL" }.first end def json_fixture(file) filename = File.dirname(__FILE__) + "/fixtures/#{file}" File.open(filename).read end def stub_json_request(url, file) json = json_fixture(file) stub_request(:get, url). with(:headers => {'Accept'=>'*/*', 'User-Agent'=>'Ruby'}). to_return(:status => 200, :body => json, :headers => {}) end
Add stub methods for league specs
Add stub methods for league specs
Ruby
mit
chip/fanfeedr
ruby
## Code Before: require 'webmock/rspec' require "yaml" def stub_api_key file = File.dirname(__FILE__) + '/support/fanfeedr.yml' YAML::load( File.open(file) )["key"] end def json_fixture(file) filename = File.dirname(__FILE__) + "/fixtures/#{file}" File.open(filename).read end def stub_json_request(url, file) json = json_fixture(file) stub_request(:get, url). with(:headers => {'Accept'=>'*/*', 'User-Agent'=>'Ruby'}). to_return(:status => 200, :body => json, :headers => {}) end ## Instruction: Add stub methods for league specs ## Code After: require 'webmock/rspec' require "yaml" def stub_api_key file = File.dirname(__FILE__) + '/support/fanfeedr.yml' YAML::load( File.open(file) )["key"] end def stub_api_endpoint 'http://ffapi.fanfeedr.com/basic/api' end def stub_leagues_url "#{stub_api_endpoint}/leagues?api_key=#{stub_api_key}" end def stub_league_url(league) "#{stub_api_endpoint}/league/#{league['id']}?api_key=#{stub_api_key}" end def stub_nfl leagues = JSON.parse(json_fixture('leagues.json')) leagues.select {|league| league["name"] == "NFL" }.first end def json_fixture(file) filename = File.dirname(__FILE__) + "/fixtures/#{file}" File.open(filename).read end def stub_json_request(url, file) json = json_fixture(file) stub_request(:get, url). with(:headers => {'Accept'=>'*/*', 'User-Agent'=>'Ruby'}). to_return(:status => 200, :body => json, :headers => {}) end
5936c2ebe246d603ccd1a01610ddbfbada8a9a9e
importScripts/sql/transformations/ImportMediaDirectoryListing.sql
importScripts/sql/transformations/ImportMediaDirectoryListing.sql
DROP TABLE IF EXISTS MediaDirectoryListing; CREATE TABLE MediaDirectoryListing( FileName VARCHAR(255) NOT NULL PRIMARY KEY ); LOAD DATA LOCAL INFILE 'source/media-list.txt' INTO TABLE MediaDirectoryListing;
DROP TABLE IF EXISTS MediaDirectoryListing; CREATE TABLE MediaDirectoryListing( FileName VARCHAR(255) NOT NULL PRIMARY KEY ); LOAD DATA LOCAL INFILE 'source/media-list.txt' INTO TABLE MediaDirectoryListing; DELETE FROM MediaDirectoryListing WHERE FileName IS NULL OR FileName = '';
Remove blank images from directory listing
Remove blank images from directory listing
SQL
mit
rwahs/import-scripts
sql
## Code Before: DROP TABLE IF EXISTS MediaDirectoryListing; CREATE TABLE MediaDirectoryListing( FileName VARCHAR(255) NOT NULL PRIMARY KEY ); LOAD DATA LOCAL INFILE 'source/media-list.txt' INTO TABLE MediaDirectoryListing; ## Instruction: Remove blank images from directory listing ## Code After: DROP TABLE IF EXISTS MediaDirectoryListing; CREATE TABLE MediaDirectoryListing( FileName VARCHAR(255) NOT NULL PRIMARY KEY ); LOAD DATA LOCAL INFILE 'source/media-list.txt' INTO TABLE MediaDirectoryListing; DELETE FROM MediaDirectoryListing WHERE FileName IS NULL OR FileName = '';
59badfa50d645ac64c70fc6a0c2f7fe826999a1f
xpath.gemspec
xpath.gemspec
lib = File.expand_path('lib', File.dirname(__FILE__)) $:.unshift lib unless $:.include?(lib) require 'xpath/version' Gem::Specification.new do |s| s.name = "xpath" s.rubyforge_project = "xpath" s.version = XPath::VERSION s.authors = ["Jonas Nicklas"] s.email = ["[email protected]"] s.description = "XPath is a Ruby DSL for generating XPath expressions" s.files = Dir.glob("{lib,spec}/**/*") + %w(README.md) s.extra_rdoc_files = ["README.md"] s.homepage = "http://github.com/jnicklas/xpath" s.rdoc_options = ["--main", "README.md"] s.require_paths = ["lib"] s.rubygems_version = "1.3.6" s.summary = "Generate XPath expressions from Ruby" s.add_dependency("nokogiri", ["~> 1.3"]) s.add_development_dependency("rspec", ["~> 2.0"]) s.add_development_dependency("yard", [">= 0.5.8"]) s.add_development_dependency("rake") if File.exist?("gem-private_key.pem") s.signing_key = 'gem-private_key.pem' end s.cert_chain = ['gem-public_cert.pem'] end
lib = File.expand_path('lib', File.dirname(__FILE__)) $:.unshift lib unless $:.include?(lib) require 'xpath/version' Gem::Specification.new do |s| s.name = "xpath" s.rubyforge_project = "xpath" s.version = XPath::VERSION s.authors = ["Jonas Nicklas"] s.email = ["[email protected]"] s.description = "XPath is a Ruby DSL for generating XPath expressions" s.license = "MIT" s.files = Dir.glob("{lib,spec}/**/*") + %w(README.md) s.extra_rdoc_files = ["README.md"] s.homepage = "http://github.com/jnicklas/xpath" s.rdoc_options = ["--main", "README.md"] s.require_paths = ["lib"] s.rubygems_version = "1.3.6" s.summary = "Generate XPath expressions from Ruby" s.add_dependency("nokogiri", ["~> 1.3"]) s.add_development_dependency("rspec", ["~> 2.0"]) s.add_development_dependency("yard", [">= 0.5.8"]) s.add_development_dependency("rake") if File.exist?("gem-private_key.pem") s.signing_key = 'gem-private_key.pem' end s.cert_chain = ['gem-public_cert.pem'] end
Document project license in gemspec
Document project license in gemspec
Ruby
mit
teamcapybara/xpath
ruby
## Code Before: lib = File.expand_path('lib', File.dirname(__FILE__)) $:.unshift lib unless $:.include?(lib) require 'xpath/version' Gem::Specification.new do |s| s.name = "xpath" s.rubyforge_project = "xpath" s.version = XPath::VERSION s.authors = ["Jonas Nicklas"] s.email = ["[email protected]"] s.description = "XPath is a Ruby DSL for generating XPath expressions" s.files = Dir.glob("{lib,spec}/**/*") + %w(README.md) s.extra_rdoc_files = ["README.md"] s.homepage = "http://github.com/jnicklas/xpath" s.rdoc_options = ["--main", "README.md"] s.require_paths = ["lib"] s.rubygems_version = "1.3.6" s.summary = "Generate XPath expressions from Ruby" s.add_dependency("nokogiri", ["~> 1.3"]) s.add_development_dependency("rspec", ["~> 2.0"]) s.add_development_dependency("yard", [">= 0.5.8"]) s.add_development_dependency("rake") if File.exist?("gem-private_key.pem") s.signing_key = 'gem-private_key.pem' end s.cert_chain = ['gem-public_cert.pem'] end ## Instruction: Document project license in gemspec ## Code After: lib = File.expand_path('lib', File.dirname(__FILE__)) $:.unshift lib unless $:.include?(lib) require 'xpath/version' Gem::Specification.new do |s| s.name = "xpath" s.rubyforge_project = "xpath" s.version = XPath::VERSION s.authors = ["Jonas Nicklas"] s.email = ["[email protected]"] s.description = "XPath is a Ruby DSL for generating XPath expressions" s.license = "MIT" s.files = Dir.glob("{lib,spec}/**/*") + %w(README.md) s.extra_rdoc_files = ["README.md"] s.homepage = "http://github.com/jnicklas/xpath" s.rdoc_options = ["--main", "README.md"] s.require_paths = ["lib"] s.rubygems_version = "1.3.6" s.summary = "Generate XPath expressions from Ruby" s.add_dependency("nokogiri", ["~> 1.3"]) s.add_development_dependency("rspec", ["~> 2.0"]) s.add_development_dependency("yard", [">= 0.5.8"]) s.add_development_dependency("rake") if File.exist?("gem-private_key.pem") s.signing_key = 'gem-private_key.pem' end s.cert_chain = ['gem-public_cert.pem'] end
6ab44c4d5dbbff49f0ae5afce90bf4d85dd0ebb4
app/templates/user/sign_in.htm
app/templates/user/sign_in.htm
{% from "macros/form.htm" import render_form %} {% extends "content.htm" %} {% block content %} <legend>{{_('Log in')}}</legend> {{ render_form(form) }} {% endblock %}
{% from "macros/form.htm" import render_form %} {% extends "content.htm" %} {% block content %} <legend>{{_('Log in')}}</legend> {{ render_form(form) }} <ul class='list-unstyled' id='dropmenu-list'> <li><a href="{{ url_for('user.sign_up')}}">{{_('Register new user')}}</a></li> <li><a href="{{ url_for('user.request_password')}}">{{_('Forgot password?')}}</a></li> </ul> {% endblock %}
Add new user signup and forgot password links
Add new user signup and forgot password links
HTML
mit
viaict/viaduct,viaict/viaduct,viaict/viaduct,viaict/viaduct,viaict/viaduct
html
## Code Before: {% from "macros/form.htm" import render_form %} {% extends "content.htm" %} {% block content %} <legend>{{_('Log in')}}</legend> {{ render_form(form) }} {% endblock %} ## Instruction: Add new user signup and forgot password links ## Code After: {% from "macros/form.htm" import render_form %} {% extends "content.htm" %} {% block content %} <legend>{{_('Log in')}}</legend> {{ render_form(form) }} <ul class='list-unstyled' id='dropmenu-list'> <li><a href="{{ url_for('user.sign_up')}}">{{_('Register new user')}}</a></li> <li><a href="{{ url_for('user.request_password')}}">{{_('Forgot password?')}}</a></li> </ul> {% endblock %}
24093369bb1dbd2e9034db9425920ffdc14ee070
abusehelper/bots/abusech/feodoccbot.py
abusehelper/bots/abusech/feodoccbot.py
from abusehelper.core import bot from . import host_or_ip, split_description, AbuseCHFeedBot class FeodoCcBot(AbuseCHFeedBot): feed_type = "c&c" feed_name = "feodo c&c" feeds = bot.ListParam(default=["https://feodotracker.abuse.ch/feodotracker.rss"]) # The timestamp in the title appears to be the firstseen timestamp, # skip including it as the "source time". parse_title = None def parse_description(self, description): got_version = False for key, value in split_description(description): if key == "version": yield "malware family", "feodo." + value.strip().lower() got_version = True elif key == "host": yield host_or_ip(value) if not got_version: yield "malware family", "feodo" if __name__ == "__main__": FeodoCcBot.from_command_line().execute()
from abusehelper.core import bot from . import host_or_ip, split_description, AbuseCHFeedBot class FeodoCcBot(AbuseCHFeedBot): feed_type = "c&c" feed_name = "feodo c&c" feeds = bot.ListParam(default=["https://feodotracker.abuse.ch/feodotracker.rss"]) # The timestamp in the title appears to be the firstseen timestamp, # skip including it as the "source time". parse_title = None def parse_description(self, description): got_version = False for key, value in split_description(description): if key == "version": yield "malware family", "feodo." + value.strip().lower() got_version = True elif key == "status": yield "status", value elif key == "host": yield host_or_ip(value) if not got_version: yield "malware family", "feodo" if __name__ == "__main__": FeodoCcBot.from_command_line().execute()
Include status information in abuse.ch's Feodo C&C feed
Include status information in abuse.ch's Feodo C&C feed
Python
mit
abusesa/abusehelper
python
## Code Before: from abusehelper.core import bot from . import host_or_ip, split_description, AbuseCHFeedBot class FeodoCcBot(AbuseCHFeedBot): feed_type = "c&c" feed_name = "feodo c&c" feeds = bot.ListParam(default=["https://feodotracker.abuse.ch/feodotracker.rss"]) # The timestamp in the title appears to be the firstseen timestamp, # skip including it as the "source time". parse_title = None def parse_description(self, description): got_version = False for key, value in split_description(description): if key == "version": yield "malware family", "feodo." + value.strip().lower() got_version = True elif key == "host": yield host_or_ip(value) if not got_version: yield "malware family", "feodo" if __name__ == "__main__": FeodoCcBot.from_command_line().execute() ## Instruction: Include status information in abuse.ch's Feodo C&C feed ## Code After: from abusehelper.core import bot from . import host_or_ip, split_description, AbuseCHFeedBot class FeodoCcBot(AbuseCHFeedBot): feed_type = "c&c" feed_name = "feodo c&c" feeds = bot.ListParam(default=["https://feodotracker.abuse.ch/feodotracker.rss"]) # The timestamp in the title appears to be the firstseen timestamp, # skip including it as the "source time". parse_title = None def parse_description(self, description): got_version = False for key, value in split_description(description): if key == "version": yield "malware family", "feodo." + value.strip().lower() got_version = True elif key == "status": yield "status", value elif key == "host": yield host_or_ip(value) if not got_version: yield "malware family", "feodo" if __name__ == "__main__": FeodoCcBot.from_command_line().execute()
de68f2c753e5608d9624b80de3390936e2043076
app/stylesheets/partials/_people.sass
app/stylesheets/partials/_people.sass
.people-section #person dl +clearfix dt clear: left float: left width: 100px font-weight: bold dd.gender margin-bottom: 10px .siblings margin-top: 10px p font-weight: bold ul list-style: disc #comments textarea width: 500px height: 150px li padding: 10px &:nth-child(odd) background-color: #e7cddc .info font-size: 0.8em ul.people li +clearfix margin-bottom: 10px .person .image float: left margin-right: 5px .name a color: #333 .village color: #666 font-size: 0.7em line-height: 1em a color: #666
.people-section .student-status margin-bottom: 5px #person dl +clearfix dt clear: left float: left width: 100px font-weight: bold dd.gender margin-bottom: 10px .siblings margin-top: 10px p font-weight: bold ul list-style: disc #comments textarea width: 500px height: 150px li padding: 10px &:nth-child(odd) background-color: #e7cddc .info font-size: 0.8em ul.people li +clearfix margin-bottom: 10px .person .image float: left margin-right: 5px .name a color: #333 .village color: #666 font-size: 0.7em line-height: 1em a color: #666
Add margin to 'make student' button
Add margin to 'make student' button
Sass
mit
edendevelopment/cfi,edendevelopment/cfi,edendevelopment/cfi,edendevelopment/cfi
sass
## Code Before: .people-section #person dl +clearfix dt clear: left float: left width: 100px font-weight: bold dd.gender margin-bottom: 10px .siblings margin-top: 10px p font-weight: bold ul list-style: disc #comments textarea width: 500px height: 150px li padding: 10px &:nth-child(odd) background-color: #e7cddc .info font-size: 0.8em ul.people li +clearfix margin-bottom: 10px .person .image float: left margin-right: 5px .name a color: #333 .village color: #666 font-size: 0.7em line-height: 1em a color: #666 ## Instruction: Add margin to 'make student' button ## Code After: .people-section .student-status margin-bottom: 5px #person dl +clearfix dt clear: left float: left width: 100px font-weight: bold dd.gender margin-bottom: 10px .siblings margin-top: 10px p font-weight: bold ul list-style: disc #comments textarea width: 500px height: 150px li padding: 10px &:nth-child(odd) background-color: #e7cddc .info font-size: 0.8em ul.people li +clearfix margin-bottom: 10px .person .image float: left margin-right: 5px .name a color: #333 .village color: #666 font-size: 0.7em line-height: 1em a color: #666
5fd23d7b20f08d0af47ba74f3d814769c0612ebc
static/views/dashboard.jade
static/views/dashboard.jade
include top_menu.jade .col-lg-12.row.top-row.enabled-projects-row.dashboard-row h2 | Enabled projects a.btn.btn-default.add-project-button( href='#/projects/manage/', tooltip='Add new project', tooltip-placement='right' ) i.icon-plus table.table.table-hover tr(ng-repeat="project in projects") td img.project-icon(ng-src='{{project.icon}}') i.icon-lock(ng-show="project.is_private") a(href='#/projects/{{project.name}}') {{project.name}} br canvas( fullfill, linechart, options='project.chart.options', data='project.chart.data', height=100 ) .col-lg-12.row.last-tasks-row.dashboard-row h2 Last performed tasks table.table.table-hover( infinite-scroll='tasks.load()', infinite-scroll-distance='2' ) tr( ng-repeat='task in tasks.items' class='{{task.status == 1 && "success" || "failed"}}' ) td a(href='#/projects/{{task.project}}/') {{task.project}} | :&nbsp; a(href='#/tasks/{{task.id}}/'). {{task.commit.branch}}\#{{task.commit.range}} td {{task.success_percent}}% td span.pull-right {{task.created}}
include top_menu.jade .col-lg-12.row.top-row.enabled-projects-row.dashboard-row h2 | Enabled projects a.btn.btn-default.add-project-button( href='#/projects/manage/', tooltip='Add new project', tooltip-placement='right' ) i.icon-plus table.table.table-hover tr(ng-repeat="project in projects") td img.project-icon(ng-src='{{project.icon}}') i.icon-lock(ng-show="project.is_private") a(href='#/projects/{{project.name}}') {{project.name}} br canvas( fullfill, linechart, options='project.chart.options', data='project.chart.data', height=100 ) tr(ng-show='!projects.length') td You don't have enabled projects. .col-lg-12.row.last-tasks-row.dashboard-row h2 Last performed tasks table.table.table-hover( infinite-scroll='tasks.load()', infinite-scroll-distance='2' ) tr( ng-repeat='task in tasks.items' class='{{task.status == 1 && "success" || "failed"}}' ) td a(href='#/projects/{{task.project}}/') {{task.project}} | :&nbsp; a(href='#/tasks/{{task.id}}/'). {{task.commit.branch}}\#{{task.commit.range}} td {{task.success_percent}}% td span.pull-right {{task.created}}
Add you don't have enabled projects badge
Add you don't have enabled projects badge
Jade
mit
nvbn/coviolations_web,nvbn/coviolations_web
jade
## Code Before: include top_menu.jade .col-lg-12.row.top-row.enabled-projects-row.dashboard-row h2 | Enabled projects a.btn.btn-default.add-project-button( href='#/projects/manage/', tooltip='Add new project', tooltip-placement='right' ) i.icon-plus table.table.table-hover tr(ng-repeat="project in projects") td img.project-icon(ng-src='{{project.icon}}') i.icon-lock(ng-show="project.is_private") a(href='#/projects/{{project.name}}') {{project.name}} br canvas( fullfill, linechart, options='project.chart.options', data='project.chart.data', height=100 ) .col-lg-12.row.last-tasks-row.dashboard-row h2 Last performed tasks table.table.table-hover( infinite-scroll='tasks.load()', infinite-scroll-distance='2' ) tr( ng-repeat='task in tasks.items' class='{{task.status == 1 && "success" || "failed"}}' ) td a(href='#/projects/{{task.project}}/') {{task.project}} | :&nbsp; a(href='#/tasks/{{task.id}}/'). {{task.commit.branch}}\#{{task.commit.range}} td {{task.success_percent}}% td span.pull-right {{task.created}} ## Instruction: Add you don't have enabled projects badge ## Code After: include top_menu.jade .col-lg-12.row.top-row.enabled-projects-row.dashboard-row h2 | Enabled projects a.btn.btn-default.add-project-button( href='#/projects/manage/', tooltip='Add new project', tooltip-placement='right' ) i.icon-plus table.table.table-hover tr(ng-repeat="project in projects") td img.project-icon(ng-src='{{project.icon}}') i.icon-lock(ng-show="project.is_private") a(href='#/projects/{{project.name}}') {{project.name}} br canvas( fullfill, linechart, options='project.chart.options', data='project.chart.data', height=100 ) tr(ng-show='!projects.length') td You don't have enabled projects. .col-lg-12.row.last-tasks-row.dashboard-row h2 Last performed tasks table.table.table-hover( infinite-scroll='tasks.load()', infinite-scroll-distance='2' ) tr( ng-repeat='task in tasks.items' class='{{task.status == 1 && "success" || "failed"}}' ) td a(href='#/projects/{{task.project}}/') {{task.project}} | :&nbsp; a(href='#/tasks/{{task.id}}/'). {{task.commit.branch}}\#{{task.commit.range}} td {{task.success_percent}}% td span.pull-right {{task.created}}
86a9d0b78131e819960c0f8b93290dc360d48b65
lib/pipedrive_api/organization.rb
lib/pipedrive_api/organization.rb
module PipedriveAPI class Organization < Base class << self end end end
module PipedriveAPI class Organization < Base class << self def deals(id, **params) response = get "#{resource_path}/#{id}/deals", query: params handle response end end end end
Add deals method to Organization
Add deals method to Organization
Ruby
mit
bitbond/pipedrive_api,bitbond/pipedrive_api
ruby
## Code Before: module PipedriveAPI class Organization < Base class << self end end end ## Instruction: Add deals method to Organization ## Code After: module PipedriveAPI class Organization < Base class << self def deals(id, **params) response = get "#{resource_path}/#{id}/deals", query: params handle response end end end end
c0039c5d46814c355a12c4fb5af520e6c9eea476
source/manual/alerts/whitehall-scheduled-publishing.html.md
source/manual/alerts/whitehall-scheduled-publishing.html.md
--- owner_slack: "#2ndline" title: Whitehall scheduled publishing parent: "/manual.html" layout: manual_layout section: Icinga alerts last_reviewed_on: 2017-09-14 review_in: 6 months --- ### 'overdue publications in Whitehall' This alert means that there are scheduled editions which have passed their publication due date but haven't been published by the scheduled publishing workers. Scheduled publishing is performed by sidekiq workers picking up jobs from a scheduled queue. You can see whether sidekiq picked up the job for processing, and the current state of the job using [Sidekiq monitoring apps](applications/sidekiq-monitoring.html). You can verify that there are overdue published documents using: $ fab $environment whitehall.overdue_scheduled_publications You'll see output like this: ID Scheduled date Title If there are overdue publications you can publish by running the following: $ fab $environment whitehall.schedule_publications
--- owner_slack: "#2ndline" title: Whitehall scheduled publishing parent: "/manual.html" layout: manual_layout section: Icinga alerts last_reviewed_on: 2018-03-22 review_in: 6 months --- ### 'overdue publications in Whitehall' This alert means that there are scheduled editions which have passed their publication due date but haven't been published by the scheduled publishing workers. Scheduled publishing is performed by sidekiq workers picking up jobs from a scheduled queue. You can see whether sidekiq picked up the job for processing, and the current state of the job using [Sidekiq monitoring apps](applications/sidekiq-monitoring.html). You can verify that there are overdue published documents using: $ fab $environment whitehall.overdue_scheduled_publications You'll see output like this: ID Scheduled date Title If there are overdue publications you can publish by running the following: $ fab $environment whitehall.schedule_publications #### After a database restore If the above rake tasks aren't working, it could be because the database was recently restored, perhaps due to the data sync. In that case, you can try running the following Rake task on a `whitehall_backend` machine: ```bash $ sudo -u deploy govuk_setenv whitehall bundle exec rake publishing:scheduled:requeue_all_jobs ```
Add info about requeueing from a database restore
Add info about requeueing from a database restore The process is slightly different.
Markdown
mit
alphagov/govuk-developer-docs,alphagov/govuk-developer-docs,alphagov/govuk-developer-docs,alphagov/govuk-developer-docs
markdown
## Code Before: --- owner_slack: "#2ndline" title: Whitehall scheduled publishing parent: "/manual.html" layout: manual_layout section: Icinga alerts last_reviewed_on: 2017-09-14 review_in: 6 months --- ### 'overdue publications in Whitehall' This alert means that there are scheduled editions which have passed their publication due date but haven't been published by the scheduled publishing workers. Scheduled publishing is performed by sidekiq workers picking up jobs from a scheduled queue. You can see whether sidekiq picked up the job for processing, and the current state of the job using [Sidekiq monitoring apps](applications/sidekiq-monitoring.html). You can verify that there are overdue published documents using: $ fab $environment whitehall.overdue_scheduled_publications You'll see output like this: ID Scheduled date Title If there are overdue publications you can publish by running the following: $ fab $environment whitehall.schedule_publications ## Instruction: Add info about requeueing from a database restore The process is slightly different. ## Code After: --- owner_slack: "#2ndline" title: Whitehall scheduled publishing parent: "/manual.html" layout: manual_layout section: Icinga alerts last_reviewed_on: 2018-03-22 review_in: 6 months --- ### 'overdue publications in Whitehall' This alert means that there are scheduled editions which have passed their publication due date but haven't been published by the scheduled publishing workers. Scheduled publishing is performed by sidekiq workers picking up jobs from a scheduled queue. You can see whether sidekiq picked up the job for processing, and the current state of the job using [Sidekiq monitoring apps](applications/sidekiq-monitoring.html). You can verify that there are overdue published documents using: $ fab $environment whitehall.overdue_scheduled_publications You'll see output like this: ID Scheduled date Title If there are overdue publications you can publish by running the following: $ fab $environment whitehall.schedule_publications #### After a database restore If the above rake tasks aren't working, it could be because the database was recently restored, perhaps due to the data sync. In that case, you can try running the following Rake task on a `whitehall_backend` machine: ```bash $ sudo -u deploy govuk_setenv whitehall bundle exec rake publishing:scheduled:requeue_all_jobs ```
bff61be70a5ee73c69de92c72b65475e471de445
.travis.yml
.travis.yml
language: java addons: sonarcloud: organization: "hobynye" token: ${SONAR_TOKEN} before_cache: - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock - rm -f $HOME/.gradle/caches/*/plugin-resolution cache: directories: - $HOME/.gradle/caches - $HOME/.gradle/wrapper before_install: - git fetch origin - chmod +x ./gradlew jobs: include: - stage: "Quality Checks" name: "Quality checking" - script: ./gradlew sonarqube - stage: "Deploy" name: "Deploy" script: skip deploy: provider: releases token: ${GITHUB_TOKEN} on: tags: true
language: java addons: sonarcloud: organization: "hobynye" token: ${SONAR_TOKEN} before_cache: - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock - rm -f $HOME/.gradle/caches/*/plugin-resolution cache: directories: - $HOME/.gradle/caches - $HOME/.gradle/wrapper before_install: - chmod +x ./gradlew jobs: include: - stage: "Quality Checks" name: "Quality checking" - script: ./gradlew sonarqube - stage: "Deploy" name: "Deploy" script: skip deploy: provider: releases token: ${GITHUB_TOKEN} on: tags: true
Revert "Testing sonar warning about refs/head not containing main"
Revert "Testing sonar warning about refs/head not containing main" This reverts commit 49d6f940
YAML
epl-1.0
HOBY-NYE/thank-you-matcher
yaml
## Code Before: language: java addons: sonarcloud: organization: "hobynye" token: ${SONAR_TOKEN} before_cache: - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock - rm -f $HOME/.gradle/caches/*/plugin-resolution cache: directories: - $HOME/.gradle/caches - $HOME/.gradle/wrapper before_install: - git fetch origin - chmod +x ./gradlew jobs: include: - stage: "Quality Checks" name: "Quality checking" - script: ./gradlew sonarqube - stage: "Deploy" name: "Deploy" script: skip deploy: provider: releases token: ${GITHUB_TOKEN} on: tags: true ## Instruction: Revert "Testing sonar warning about refs/head not containing main" This reverts commit 49d6f940 ## Code After: language: java addons: sonarcloud: organization: "hobynye" token: ${SONAR_TOKEN} before_cache: - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock - rm -f $HOME/.gradle/caches/*/plugin-resolution cache: directories: - $HOME/.gradle/caches - $HOME/.gradle/wrapper before_install: - chmod +x ./gradlew jobs: include: - stage: "Quality Checks" name: "Quality checking" - script: ./gradlew sonarqube - stage: "Deploy" name: "Deploy" script: skip deploy: provider: releases token: ${GITHUB_TOKEN} on: tags: true
a57208656a8bc822202a050cb04b4372989196f1
app/config.json
app/config.json
{ "global": {}, "env:development": {}, "env:test": {}, "env:production": {}, "os:android": {}, "os:blackberry": {}, "os:ios": {}, "os:mobileweb": {}, "dependencies": {} }
{ "global": {}, "env:development": {}, "env:test": {}, "env:production": {}, "os:android": {}, "os:blackberry": {}, "os:ios": {}, "os:mobileweb": {}, "dependencies": { "nl.fokkezb.button": "1.2.1" } }
Add dependency for button widget.
Add dependency for button widget.
JSON
apache-2.0
joliva/piglet,joliva/piglet
json
## Code Before: { "global": {}, "env:development": {}, "env:test": {}, "env:production": {}, "os:android": {}, "os:blackberry": {}, "os:ios": {}, "os:mobileweb": {}, "dependencies": {} } ## Instruction: Add dependency for button widget. ## Code After: { "global": {}, "env:development": {}, "env:test": {}, "env:production": {}, "os:android": {}, "os:blackberry": {}, "os:ios": {}, "os:mobileweb": {}, "dependencies": { "nl.fokkezb.button": "1.2.1" } }
68be3d63ab5a5a99ef66f3cb49314e72533bec0b
ee-design/ee.json
ee-design/ee.json
{ "files" : { "ee-design\\src-gen\\main\\kotlin\\ee\\design\\DesignIfcBase.kt" : { "path" : "ee-design\\src-gen\\main\\kotlin\\ee\\design\\DesignIfcBase.kt", "date" : 1516729229440 }, "ee-design\\src-gen\\main\\kotlin\\ee\\design\\DesignApiBase.kt" : { "path" : "ee-design\\src-gen\\main\\kotlin\\ee\\design\\DesignApiBase.kt", "date" : 1516729229532 }, "ee-design/src-gen/main/kotlin/ee/design/DesignIfcBase.kt" : { "path" : "ee-design/src-gen/main/kotlin/ee/design/DesignIfcBase.kt", "date" : 1514307202000 }, "ee-design/src-gen/main/kotlin/ee/design/DesignApiBase.kt" : { "path" : "ee-design/src-gen/main/kotlin/ee/design/DesignApiBase.kt", "date" : 1514307202000 } } }
{ "files" : { "ee-design\\src-gen\\main\\kotlin\\ee\\design\\DesignIfcBase.kt" : { "path" : "ee-design\\src-gen\\main\\kotlin\\ee\\design\\DesignIfcBase.kt", "date" : 1516975256618 }, "ee-design\\src-gen\\main\\kotlin\\ee\\design\\DesignApiBase.kt" : { "path" : "ee-design\\src-gen\\main\\kotlin\\ee\\design\\DesignApiBase.kt", "date" : 1516975256718 }, "ee-design/src-gen/main/kotlin/ee/design/DesignIfcBase.kt" : { "path" : "ee-design/src-gen/main/kotlin/ee/design/DesignIfcBase.kt", "date" : 1514307202000 }, "ee-design/src-gen/main/kotlin/ee/design/DesignApiBase.kt" : { "path" : "ee-design/src-gen/main/kotlin/ee/design/DesignApiBase.kt", "date" : 1514307202000 } } }
Work on Checks(Predicates) for conditions/checks of state machine
Work on Checks(Predicates) for conditions/checks of state machine
JSON
apache-2.0
eugeis/ee,eugeis/ee
json
## Code Before: { "files" : { "ee-design\\src-gen\\main\\kotlin\\ee\\design\\DesignIfcBase.kt" : { "path" : "ee-design\\src-gen\\main\\kotlin\\ee\\design\\DesignIfcBase.kt", "date" : 1516729229440 }, "ee-design\\src-gen\\main\\kotlin\\ee\\design\\DesignApiBase.kt" : { "path" : "ee-design\\src-gen\\main\\kotlin\\ee\\design\\DesignApiBase.kt", "date" : 1516729229532 }, "ee-design/src-gen/main/kotlin/ee/design/DesignIfcBase.kt" : { "path" : "ee-design/src-gen/main/kotlin/ee/design/DesignIfcBase.kt", "date" : 1514307202000 }, "ee-design/src-gen/main/kotlin/ee/design/DesignApiBase.kt" : { "path" : "ee-design/src-gen/main/kotlin/ee/design/DesignApiBase.kt", "date" : 1514307202000 } } } ## Instruction: Work on Checks(Predicates) for conditions/checks of state machine ## Code After: { "files" : { "ee-design\\src-gen\\main\\kotlin\\ee\\design\\DesignIfcBase.kt" : { "path" : "ee-design\\src-gen\\main\\kotlin\\ee\\design\\DesignIfcBase.kt", "date" : 1516975256618 }, "ee-design\\src-gen\\main\\kotlin\\ee\\design\\DesignApiBase.kt" : { "path" : "ee-design\\src-gen\\main\\kotlin\\ee\\design\\DesignApiBase.kt", "date" : 1516975256718 }, "ee-design/src-gen/main/kotlin/ee/design/DesignIfcBase.kt" : { "path" : "ee-design/src-gen/main/kotlin/ee/design/DesignIfcBase.kt", "date" : 1514307202000 }, "ee-design/src-gen/main/kotlin/ee/design/DesignApiBase.kt" : { "path" : "ee-design/src-gen/main/kotlin/ee/design/DesignApiBase.kt", "date" : 1514307202000 } } }
83f28da821e1f4f08cca4091a02c82f48533288b
test/elf2/relocation-absolute.s
test/elf2/relocation-absolute.s
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/abs.s -o %tabs // RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t // RUN: lld -flavor gnu2 %tabs %t -o %tout // RUN: llvm-objdump -s %tout // REQUIRES: x86 .global _start _start: movl $abs, %edx #CHECK: Contents of section .text: #CHECK-NEXT: {{[0-1a-f]+}} ba420000 00
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/abs.s -o %tabs // RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t // RUN: lld -flavor gnu2 %tabs %t -o %tout // RUN: llvm-objdump -d %tout | FileCheck %s // REQUIRES: x86 .global _start _start: movl $abs, %edx //CHECK: start: //CHECK-NEXT: movl $66, %edx
Fix test to actually test something.
Fix test to actually test something. git-svn-id: f6089bf0e6284f307027cef4f64114ee9ebb0424@247790 91177308-0d34-0410-b5e6-96231b3b80d8
GAS
apache-2.0
llvm-mirror/lld,llvm-mirror/lld
gas
## Code Before: // RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/abs.s -o %tabs // RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t // RUN: lld -flavor gnu2 %tabs %t -o %tout // RUN: llvm-objdump -s %tout // REQUIRES: x86 .global _start _start: movl $abs, %edx #CHECK: Contents of section .text: #CHECK-NEXT: {{[0-1a-f]+}} ba420000 00 ## Instruction: Fix test to actually test something. git-svn-id: f6089bf0e6284f307027cef4f64114ee9ebb0424@247790 91177308-0d34-0410-b5e6-96231b3b80d8 ## Code After: // RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/abs.s -o %tabs // RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t // RUN: lld -flavor gnu2 %tabs %t -o %tout // RUN: llvm-objdump -d %tout | FileCheck %s // REQUIRES: x86 .global _start _start: movl $abs, %edx //CHECK: start: //CHECK-NEXT: movl $66, %edx
3874ca578c52879d9861213e321f6ece9e67f10b
sopel/modules/ping.py
sopel/modules/ping.py
from __future__ import unicode_literals import random from sopel.module import rule, priority, thread @rule(r'(?i)(hi|hello|hey),? $nickname[ \t]*$') def hello(bot, trigger): if trigger.owner: greeting = random.choice(('Fuck off,', 'Screw you,', 'Go away')) else: greeting = random.choice(('Hi', 'Hey', 'Hello')) punctuation = random.choice(('', '!')) bot.say(greeting + ' ' + trigger.nick + punctuation) @rule(r'(?i)(Fuck|Screw) you,? $nickname[ \t]*$') def rude(bot, trigger): bot.say('Watch your mouth, ' + trigger.nick + ', or I\'ll tell your mother!') @rule('$nickname!') @priority('high') @thread(False) def interjection(bot, trigger): bot.say(trigger.nick + '!')
from __future__ import unicode_literals import random from sopel.module import rule, priority, thread @rule(r'(?i)(hi|hello|hey),? $nickname[ \t]*$') def hello(bot, trigger): greeting = random.choice(('Hi', 'Hey', 'Hello')) punctuation = random.choice(('', '!')) bot.say(greeting + ' ' + trigger.nick + punctuation) @rule(r'(?i)(Fuck|Screw) you,? $nickname[ \t]*$') def rude(bot, trigger): bot.say('Watch your mouth, ' + trigger.nick + ', or I\'ll tell your mother!') @rule('$nickname!') @priority('high') @thread(False) def interjection(bot, trigger): bot.say(trigger.nick + '!')
Stop Sopel from relying rudely to the bot's owner.
Stop Sopel from relying rudely to the bot's owner.
Python
mit
Uname-a/knife_scraper,Uname-a/knife_scraper,Uname-a/knife_scraper
python
## Code Before: from __future__ import unicode_literals import random from sopel.module import rule, priority, thread @rule(r'(?i)(hi|hello|hey),? $nickname[ \t]*$') def hello(bot, trigger): if trigger.owner: greeting = random.choice(('Fuck off,', 'Screw you,', 'Go away')) else: greeting = random.choice(('Hi', 'Hey', 'Hello')) punctuation = random.choice(('', '!')) bot.say(greeting + ' ' + trigger.nick + punctuation) @rule(r'(?i)(Fuck|Screw) you,? $nickname[ \t]*$') def rude(bot, trigger): bot.say('Watch your mouth, ' + trigger.nick + ', or I\'ll tell your mother!') @rule('$nickname!') @priority('high') @thread(False) def interjection(bot, trigger): bot.say(trigger.nick + '!') ## Instruction: Stop Sopel from relying rudely to the bot's owner. ## Code After: from __future__ import unicode_literals import random from sopel.module import rule, priority, thread @rule(r'(?i)(hi|hello|hey),? $nickname[ \t]*$') def hello(bot, trigger): greeting = random.choice(('Hi', 'Hey', 'Hello')) punctuation = random.choice(('', '!')) bot.say(greeting + ' ' + trigger.nick + punctuation) @rule(r'(?i)(Fuck|Screw) you,? $nickname[ \t]*$') def rude(bot, trigger): bot.say('Watch your mouth, ' + trigger.nick + ', or I\'ll tell your mother!') @rule('$nickname!') @priority('high') @thread(False) def interjection(bot, trigger): bot.say(trigger.nick + '!')
1bdc83cd1d651a3c96868f3e7b6fc4e9ad83e93d
src/Resources/views/CRUD/base_edit_form_macro.html.twig
src/Resources/views/CRUD/base_edit_form_macro.html.twig
{% macro render_groups(admin, form, groups, has_tab) %} <div class="row"> {% for code in groups if admin.formgroups[code] is defined %} {% set form_group = admin.formgroups[code] %} <div class="{{ form_group.class|default('col-md-12') }}"> <div class="{{ form_group.box_class }}"> <div class="box-header"> <h4 class="box-title"> {{ form_group.label|trans({}, form_group.translation_domain ?: admin.translationDomain) }} </h4> </div> <div class="box-body"> <div class="sonata-ba-collapsed-fields"> {% if form_group.description %} <p>{{ form_group.description|raw }}</p> {% endif %} {% for field_name in form_group.fields if form[field_name] is defined %} {{ form_row(form[field_name])}} {% else %} <em>{{ 'message_form_group_empty'|trans({}, 'SonataAdminBundle') }}</em> {% endfor %} </div> </div> </div> </div> {% endfor %} </div> {% endmacro %}
{% macro render_groups(admin, form, groups, has_tab) %} <div class="row"> {% for code in groups if admin.formgroups[code] is defined %} {% set form_group = admin.formgroups[code] %} <div class="{{ form_group.class|default('col-md-12') }}"> <div class="{{ form_group.box_class }}"> <div class="box-header"> <h4 class="box-title"> {{ form_group.label|trans({}, form_group.translation_domain ?: admin.translationDomain) }} </h4> </div> <div class="box-body"> <div class="sonata-ba-collapsed-fields"> {% if form_group.description %} <p>{{ form_group.description|trans({}, form_group.translation_domain ?: admin.translationDomain) }}</p> {% endif %} {% for field_name in form_group.fields if form[field_name] is defined %} {{ form_row(form[field_name])}} {% else %} <em>{{ 'message_form_group_empty'|trans({}, 'SonataAdminBundle') }}</em> {% endfor %} </div> </div> </div> </div> {% endfor %} </div> {% endmacro %}
Add trans filter to form_group description
Add trans filter to form_group description
Twig
mit
ossinkine/SonataAdminBundle,Armstrong1992/SonataAdminBundle,peter-gribanov/SonataAdminBundle,sonata-project/SonataAdminBundle,greg0ire/SonataAdminBundle,Armstrong1992/SonataAdminBundle,ARTACK/SonataAdminBundle,OskarStark/SonataAdminBundle,mweimerskirch/SonataAdminBundle,osavchenko/SonataAdminBundle,osavchenko/SonataAdminBundle,OskarStark/SonataAdminBundle,mweimerskirch/SonataAdminBundle,sonata-project/SonataAdminBundle,greg0ire/SonataAdminBundle,dmarkowicz/SonataAdminBundle,ossinkine/SonataAdminBundle,peter-gribanov/SonataAdminBundle,jordisala1991/SonataAdminBundle,jordisala1991/SonataAdminBundle,OskarStark/SonataAdminBundle,ARTACK/SonataAdminBundle,jordisala1991/SonataAdminBundle,ARTACK/SonataAdminBundle,peter-gribanov/SonataAdminBundle,osavchenko/SonataAdminBundle,osavchenko/SonataAdminBundle,dmarkowicz/SonataAdminBundle,OskarStark/SonataAdminBundle,greg0ire/SonataAdminBundle,ARTACK/SonataAdminBundle,ossinkine/SonataAdminBundle,greg0ire/SonataAdminBundle,dmarkowicz/SonataAdminBundle,ossinkine/SonataAdminBundle,jordisala1991/SonataAdminBundle,dmarkowicz/SonataAdminBundle,mweimerskirch/SonataAdminBundle,peter-gribanov/SonataAdminBundle,dmarkowicz/SonataAdminBundle,mweimerskirch/SonataAdminBundle,osavchenko/SonataAdminBundle
twig
## Code Before: {% macro render_groups(admin, form, groups, has_tab) %} <div class="row"> {% for code in groups if admin.formgroups[code] is defined %} {% set form_group = admin.formgroups[code] %} <div class="{{ form_group.class|default('col-md-12') }}"> <div class="{{ form_group.box_class }}"> <div class="box-header"> <h4 class="box-title"> {{ form_group.label|trans({}, form_group.translation_domain ?: admin.translationDomain) }} </h4> </div> <div class="box-body"> <div class="sonata-ba-collapsed-fields"> {% if form_group.description %} <p>{{ form_group.description|raw }}</p> {% endif %} {% for field_name in form_group.fields if form[field_name] is defined %} {{ form_row(form[field_name])}} {% else %} <em>{{ 'message_form_group_empty'|trans({}, 'SonataAdminBundle') }}</em> {% endfor %} </div> </div> </div> </div> {% endfor %} </div> {% endmacro %} ## Instruction: Add trans filter to form_group description ## Code After: {% macro render_groups(admin, form, groups, has_tab) %} <div class="row"> {% for code in groups if admin.formgroups[code] is defined %} {% set form_group = admin.formgroups[code] %} <div class="{{ form_group.class|default('col-md-12') }}"> <div class="{{ form_group.box_class }}"> <div class="box-header"> <h4 class="box-title"> {{ form_group.label|trans({}, form_group.translation_domain ?: admin.translationDomain) }} </h4> </div> <div class="box-body"> <div class="sonata-ba-collapsed-fields"> {% if form_group.description %} <p>{{ form_group.description|trans({}, form_group.translation_domain ?: admin.translationDomain) }}</p> {% endif %} {% for field_name in form_group.fields if form[field_name] is defined %} {{ form_row(form[field_name])}} {% else %} <em>{{ 'message_form_group_empty'|trans({}, 'SonataAdminBundle') }}</em> {% endfor %} </div> </div> </div> </div> {% endfor %} </div> {% endmacro %}
d503494d18b3af9df9e27ddcc8eaa4c97914e9b8
example/webpack.config.server.js
example/webpack.config.server.js
var api = require("./webpack.config.defaults") .entry("./src/server.js") // @TODO Auto-installed deps aren't in node_modules (yet), // so let's see if this is a problem or not .externals(/^@?\w[a-z\-0-9\./]+$/) // .externals(...require("fs").readdirSync("./node_modules")) .output("build/server") .target("node") .when("development", function(api) { return api .entry({ server: [ "webpack/hot/poll?1000", "./src/server.js", ], }) .sourcemap("source-map") .plugin("start-server-webpack-plugin") .plugin("webpack.BannerPlugin", { banner: `require("source-map-support").install();`, raw: true, }) ; }) ; module.exports = api.getConfig();
var api = require("./webpack.config.defaults") .entry("./src/server.js") .externals(/^@?\w[a-z\-0-9\./]+$/) .output("build/server") .target("node") .when("development", function(api) { return api .entry({ server: [ "webpack/hot/poll?1000", "./src/server.js", ], }) .sourcemap("source-map") .plugin("start-server-webpack-plugin") .plugin("webpack.BannerPlugin", { banner: `require("source-map-support").install();`, raw: true, }) ; }) ; module.exports = api.getConfig();
Add comment that externals RegExp does work
Add comment that externals RegExp does work
JavaScript
mit
ericclemmons/terse-webpack
javascript
## Code Before: var api = require("./webpack.config.defaults") .entry("./src/server.js") // @TODO Auto-installed deps aren't in node_modules (yet), // so let's see if this is a problem or not .externals(/^@?\w[a-z\-0-9\./]+$/) // .externals(...require("fs").readdirSync("./node_modules")) .output("build/server") .target("node") .when("development", function(api) { return api .entry({ server: [ "webpack/hot/poll?1000", "./src/server.js", ], }) .sourcemap("source-map") .plugin("start-server-webpack-plugin") .plugin("webpack.BannerPlugin", { banner: `require("source-map-support").install();`, raw: true, }) ; }) ; module.exports = api.getConfig(); ## Instruction: Add comment that externals RegExp does work ## Code After: var api = require("./webpack.config.defaults") .entry("./src/server.js") .externals(/^@?\w[a-z\-0-9\./]+$/) .output("build/server") .target("node") .when("development", function(api) { return api .entry({ server: [ "webpack/hot/poll?1000", "./src/server.js", ], }) .sourcemap("source-map") .plugin("start-server-webpack-plugin") .plugin("webpack.BannerPlugin", { banner: `require("source-map-support").install();`, raw: true, }) ; }) ; module.exports = api.getConfig();
c86d4265b09058f647729dd612035810cbaad8e3
app/config/phansible/boxes.yml
app/config/phansible/boxes.yml
boxes: virtualbox: trusty32: name: Ubuntu Trusty Tahr (14.04) [LTS] 32 deb: trusty cloud: ubuntu/trusty32 url: https://vagrantcloud.com/ubuntu/boxes/trusty32/versions/14.04/providers/virtualbox.box trusty64: name: Ubuntu Trusty Tahr (14.04) [LTS] 64 deb: trusty cloud: ubuntu/trusty64 url: https://vagrantcloud.com/ubuntu/boxes/trusty64/versions/14.04/providers/virtualbox.box xenial32: name: Ubuntu Xenial Xerus (16.04) [LTS] 32 deb: xenial cloud: ubuntu/xenial32 url: https://atlas.hashicorp.com/ubuntu/boxes/xenial32/versions/20160507.0.0/providers/virtualbox.box xenial64: name: Ubuntu Xenial Xerus (16.04) [LTS] 64 deb: xenial cloud: ubuntu/xenial64 url: https://atlas.hashicorp.com/ubuntu/boxes/xenial64/versions/20160507.0.0/providers/virtualbox.box
boxes: virtualbox: trusty32: name: Ubuntu Trusty Tahr (14.04) [LTS] 32 deb: trusty cloud: ubuntu/trusty32 url: https://atlas.hashicorp.com/ubuntu/boxes/trusty32/versions/20160406.0.0/providers/virtualbox.box trusty64: name: Ubuntu Trusty Tahr (14.04) [LTS] 64 deb: trusty cloud: ubuntu/trusty64 url: https://atlas.hashicorp.com/ubuntu/boxes/trusty32/versions/20160406.0.0/providers/virtualbox.box xenial32: name: Ubuntu Xenial Xerus (16.04) [LTS] 32 deb: xenial cloud: ubuntu/xenial32 url: https://atlas.hashicorp.com/ubuntu/boxes/xenial32/versions/20160507.0.0/providers/virtualbox.box xenial64: name: Ubuntu Xenial Xerus (16.04) [LTS] 64 deb: xenial cloud: ubuntu/xenial64 url: https://atlas.hashicorp.com/ubuntu/boxes/xenial64/versions/20160507.0.0/providers/virtualbox.box
Update Ubuntu LTS Trusty origin
Update Ubuntu LTS Trusty origin
YAML
mit
phansible/phansible,phansible/phansible,phansible/phansible,phansible/phansible,phansible/phansible
yaml
## Code Before: boxes: virtualbox: trusty32: name: Ubuntu Trusty Tahr (14.04) [LTS] 32 deb: trusty cloud: ubuntu/trusty32 url: https://vagrantcloud.com/ubuntu/boxes/trusty32/versions/14.04/providers/virtualbox.box trusty64: name: Ubuntu Trusty Tahr (14.04) [LTS] 64 deb: trusty cloud: ubuntu/trusty64 url: https://vagrantcloud.com/ubuntu/boxes/trusty64/versions/14.04/providers/virtualbox.box xenial32: name: Ubuntu Xenial Xerus (16.04) [LTS] 32 deb: xenial cloud: ubuntu/xenial32 url: https://atlas.hashicorp.com/ubuntu/boxes/xenial32/versions/20160507.0.0/providers/virtualbox.box xenial64: name: Ubuntu Xenial Xerus (16.04) [LTS] 64 deb: xenial cloud: ubuntu/xenial64 url: https://atlas.hashicorp.com/ubuntu/boxes/xenial64/versions/20160507.0.0/providers/virtualbox.box ## Instruction: Update Ubuntu LTS Trusty origin ## Code After: boxes: virtualbox: trusty32: name: Ubuntu Trusty Tahr (14.04) [LTS] 32 deb: trusty cloud: ubuntu/trusty32 url: https://atlas.hashicorp.com/ubuntu/boxes/trusty32/versions/20160406.0.0/providers/virtualbox.box trusty64: name: Ubuntu Trusty Tahr (14.04) [LTS] 64 deb: trusty cloud: ubuntu/trusty64 url: https://atlas.hashicorp.com/ubuntu/boxes/trusty32/versions/20160406.0.0/providers/virtualbox.box xenial32: name: Ubuntu Xenial Xerus (16.04) [LTS] 32 deb: xenial cloud: ubuntu/xenial32 url: https://atlas.hashicorp.com/ubuntu/boxes/xenial32/versions/20160507.0.0/providers/virtualbox.box xenial64: name: Ubuntu Xenial Xerus (16.04) [LTS] 64 deb: xenial cloud: ubuntu/xenial64 url: https://atlas.hashicorp.com/ubuntu/boxes/xenial64/versions/20160507.0.0/providers/virtualbox.box
2b39012dd4a75fc6e9222b95ae68a5cf30d377c6
README.md
README.md
These tiny scripts add the ability to quickly show a button in the inspector for any zero-argument method. ## How to use 1. Clone the repo or download the latest release 2. Add the EasyButtons folder to your Unity project or import the .unitypackage 3. Add the Button attribute to a method ![Code example](/Images/example.png) 4. You should now see a button at the top of the component with the same name as the method ![Button in the inspector](/Images/inspector.png) ![Result](/Images/console.png) ## Install via Git URL Project supports Unity Package Manager. To install project as Git package do following: Close Unity project and open the `Packages/manifest.json` file. Update dependencies to have `com.madsbangh.easybuttons` package: ```json { "dependencies": { "com.madsbangh.easybuttons": "https://github.com/madsbangh/EasyButtons.git#upm" } } ``` Open Unity project. ## Notes - As mentioned in Issue [#4](https://github.com/madsbangh/EasyButtons/issues/4) custom editors don't play well with EasyButtons. As a workaround you can Inherit from ObjectEditor instead of Editor, or manually draw the buttons using extension `DrawEasyButtons` method.
These tiny scripts add the ability to quickly show a button in the inspector for any zero-argument method. ## How to use ### Install via Git URL Project supports Unity Package Manager. To install project as Git package do the following: 1. Close the Unity project and open the `Packages/manifest.json` file. 2. Update dependencies to have `com.madsbangh.easybuttons` package: ```json { "dependencies": { "com.madsbangh.easybuttons": "https://github.com/madsbangh/EasyButtons.git#upm" } } ``` 3. Open Unity project. ### Add to project Assets Alternatively add the code directly to te project: 1. Clone the repo or download the latest release 2. Add the EasyButtons folder to your Unity project or import the .unitypackage 3. Add the Button attribute to a method ![Code example](/Images/example.png) 4. You should now see a button at the top of the component with the same name as the method ![Button in the inspector](/Images/inspector.png) ![Result](/Images/console.png) ## Notes - As mentioned in Issue [#4](https://github.com/madsbangh/EasyButtons/issues/4) custom editors don't play well with EasyButtons. As a workaround you can Inherit from ObjectEditor instead of Editor, or manually draw the buttons using extension `DrawEasyButtons` method. - Older versions of Unity might not understand the reference to EasyButtons runtime in tbe EasyButtons editor assembly definition. If you experience issues, you can re-add the reference, or remove the asmdefs completely.
Restructure readme to focus on package manager based installation first
Restructure readme to focus on package manager based installation first
Markdown
mit
madsbangh/EasyButtons
markdown
## Code Before: These tiny scripts add the ability to quickly show a button in the inspector for any zero-argument method. ## How to use 1. Clone the repo or download the latest release 2. Add the EasyButtons folder to your Unity project or import the .unitypackage 3. Add the Button attribute to a method ![Code example](/Images/example.png) 4. You should now see a button at the top of the component with the same name as the method ![Button in the inspector](/Images/inspector.png) ![Result](/Images/console.png) ## Install via Git URL Project supports Unity Package Manager. To install project as Git package do following: Close Unity project and open the `Packages/manifest.json` file. Update dependencies to have `com.madsbangh.easybuttons` package: ```json { "dependencies": { "com.madsbangh.easybuttons": "https://github.com/madsbangh/EasyButtons.git#upm" } } ``` Open Unity project. ## Notes - As mentioned in Issue [#4](https://github.com/madsbangh/EasyButtons/issues/4) custom editors don't play well with EasyButtons. As a workaround you can Inherit from ObjectEditor instead of Editor, or manually draw the buttons using extension `DrawEasyButtons` method. ## Instruction: Restructure readme to focus on package manager based installation first ## Code After: These tiny scripts add the ability to quickly show a button in the inspector for any zero-argument method. ## How to use ### Install via Git URL Project supports Unity Package Manager. To install project as Git package do the following: 1. Close the Unity project and open the `Packages/manifest.json` file. 2. Update dependencies to have `com.madsbangh.easybuttons` package: ```json { "dependencies": { "com.madsbangh.easybuttons": "https://github.com/madsbangh/EasyButtons.git#upm" } } ``` 3. Open Unity project. ### Add to project Assets Alternatively add the code directly to te project: 1. Clone the repo or download the latest release 2. Add the EasyButtons folder to your Unity project or import the .unitypackage 3. Add the Button attribute to a method ![Code example](/Images/example.png) 4. You should now see a button at the top of the component with the same name as the method ![Button in the inspector](/Images/inspector.png) ![Result](/Images/console.png) ## Notes - As mentioned in Issue [#4](https://github.com/madsbangh/EasyButtons/issues/4) custom editors don't play well with EasyButtons. As a workaround you can Inherit from ObjectEditor instead of Editor, or manually draw the buttons using extension `DrawEasyButtons` method. - Older versions of Unity might not understand the reference to EasyButtons runtime in tbe EasyButtons editor assembly definition. If you experience issues, you can re-add the reference, or remove the asmdefs completely.
37cd1ccffc782631ef71ba366652e453de428bae
docker-compose.yml
docker-compose.yml
processor: build: . volumes: - .:/myapp ports: - "3000:3000" external_links: - champaign_db_1 environment: PG_USERNAME: postgres PG_HOST: champaign_db_1 env_file: - env.yml db: image: postgres ports: - "5432" environment: POSTGRES_DB: champaign
processor: build: . volumes: - .:/myapp ports: - "3000" external_links: - champaign_db_1 - champaign_redis_1 environment: PG_USERNAME: postgres PG_HOST: champaign_db_1 env_file: - env.yml
Use redis ran by champaign with an external link
Use redis ran by champaign with an external link
YAML
mit
SumOfUs/champaign-ak-processor,SumOfUs/champaign-ak-processor,SumOfUs/champaign-ak-processor
yaml
## Code Before: processor: build: . volumes: - .:/myapp ports: - "3000:3000" external_links: - champaign_db_1 environment: PG_USERNAME: postgres PG_HOST: champaign_db_1 env_file: - env.yml db: image: postgres ports: - "5432" environment: POSTGRES_DB: champaign ## Instruction: Use redis ran by champaign with an external link ## Code After: processor: build: . volumes: - .:/myapp ports: - "3000" external_links: - champaign_db_1 - champaign_redis_1 environment: PG_USERNAME: postgres PG_HOST: champaign_db_1 env_file: - env.yml
745be759705ac4816f39e13c310604395af5e1d7
rhvm-backup/tasks/main.yml
rhvm-backup/tasks/main.yml
--- - name: mount backup filesystem mount: fstype=nfs path=/mnt src='192.168.1.127:/volume2/backup' state=mounted notify: unmount backup filesystem - name: age out old backups command: find /mnt/rhvm -mtime +8 -delete - name: run engine-backup command: engine-backup --mode=backup --scope=all --file="/mnt/rhvm/engine-backup-{{ timestamp }}.tar.bz2" --log=/var/log/ovirt-engine-backups.log
--- - name: mount backup filesystem mount: fstype=nfs path=/mnt src='192.168.1.127:/volume2/backup' state=mounted notify: unmount backup filesystem - name: create rhvm backup directory file: path=/mnt/rhvm state=directory - name: run engine-backup command: engine-backup --mode=backup --scope=all --file="/mnt/rhvm/engine-backup-{{ timestamp }}.tar.bz2" --log=/var/log/ovirt-engine-backups.log - name: age out old backups command: find /mnt/rhvm -mtime +8 -delete
Add rhvm backup directory if missing
Add rhvm backup directory if missing
YAML
apache-2.0
atgreen/GreenLab-Maintenance
yaml
## Code Before: --- - name: mount backup filesystem mount: fstype=nfs path=/mnt src='192.168.1.127:/volume2/backup' state=mounted notify: unmount backup filesystem - name: age out old backups command: find /mnt/rhvm -mtime +8 -delete - name: run engine-backup command: engine-backup --mode=backup --scope=all --file="/mnt/rhvm/engine-backup-{{ timestamp }}.tar.bz2" --log=/var/log/ovirt-engine-backups.log ## Instruction: Add rhvm backup directory if missing ## Code After: --- - name: mount backup filesystem mount: fstype=nfs path=/mnt src='192.168.1.127:/volume2/backup' state=mounted notify: unmount backup filesystem - name: create rhvm backup directory file: path=/mnt/rhvm state=directory - name: run engine-backup command: engine-backup --mode=backup --scope=all --file="/mnt/rhvm/engine-backup-{{ timestamp }}.tar.bz2" --log=/var/log/ovirt-engine-backups.log - name: age out old backups command: find /mnt/rhvm -mtime +8 -delete
83459aedbc24813969bd0ed8212bbd9f665e843d
tests/regression/02-base/71-pthread-once.c
tests/regression/02-base/71-pthread-once.c
//PARAM: --disable sem.unknown_function.spawn #include <pthread.h> #include <assert.h> int g; pthread_once_t once = PTHREAD_ONCE_INIT; void *t_fun(void *arg) { assert(1); // reachable! return NULL; } int main() { pthread_once(&once,t_fun); return 0; }
//PARAM: --disable sem.unknown_function.spawn #include <pthread.h> #include <assert.h> int g; pthread_once_t once = PTHREAD_ONCE_INIT; void t_fun() { assert(1); // reachable! return NULL; } int main() { pthread_once(&once,t_fun); return 0; }
Correct type of `pthread_once` argument
02/71: Correct type of `pthread_once` argument Co-authored-by: Simmo Saan <[email protected]>
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
c
## Code Before: //PARAM: --disable sem.unknown_function.spawn #include <pthread.h> #include <assert.h> int g; pthread_once_t once = PTHREAD_ONCE_INIT; void *t_fun(void *arg) { assert(1); // reachable! return NULL; } int main() { pthread_once(&once,t_fun); return 0; } ## Instruction: 02/71: Correct type of `pthread_once` argument Co-authored-by: Simmo Saan <[email protected]> ## Code After: //PARAM: --disable sem.unknown_function.spawn #include <pthread.h> #include <assert.h> int g; pthread_once_t once = PTHREAD_ONCE_INIT; void t_fun() { assert(1); // reachable! return NULL; } int main() { pthread_once(&once,t_fun); return 0; }
8a101461a5a113858870b5bd54ec2192ecab740f
.github/pull_request_template.md
.github/pull_request_template.md
<!-- Thank you for your pull request. Please provide a description above and review the requirements below. Bug fixes and new features should include tests and possibly benchmarks. Contributors guide: ./CONTRIBUTING.md --> <!-- _Please make sure to review and check all of these items:_ --> ##### Checklist <!-- Remove items that do not apply. For completed items, change [ ] to [x]. --> - [ ] `make test-all` (UNIX) passes. CI will also test this. - [ ] unit and/or integration tests are included - [ ] documentation is changed or added <!-- _NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open._ --> ### Description of change <!-- Please provide a description of the change here. -->
<!-- Thank you for your pull request. Please provide a description above and review the requirements below. Bug fixes and new features should include tests and possibly benchmarks. Contributors guide: ./CONTRIBUTING.md --> <!-- _Please make sure to review and check all of these items:_ --> ##### Checklist <!-- Remove items that do not apply. For completed items, change [ ] to [x]. --> - [ ] `make test-all` (UNIX) passes. CI will also test this. - [ ] unit and/or integration tests are included - [ ] documentation is changed or added <!-- _NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open._ --> ### Description of change <!-- Please provide a description of the change here. Be sure to use issue references when applicable: https://help.github.com/en/github/managing-your-work-on-github/closing-issues-using-keywords -->
Add Issue reference message to PR template
Add Issue reference message to PR template
Markdown
apache-2.0
aelsabbahy/goss,aelsabbahy/goss
markdown
## Code Before: <!-- Thank you for your pull request. Please provide a description above and review the requirements below. Bug fixes and new features should include tests and possibly benchmarks. Contributors guide: ./CONTRIBUTING.md --> <!-- _Please make sure to review and check all of these items:_ --> ##### Checklist <!-- Remove items that do not apply. For completed items, change [ ] to [x]. --> - [ ] `make test-all` (UNIX) passes. CI will also test this. - [ ] unit and/or integration tests are included - [ ] documentation is changed or added <!-- _NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open._ --> ### Description of change <!-- Please provide a description of the change here. --> ## Instruction: Add Issue reference message to PR template ## Code After: <!-- Thank you for your pull request. Please provide a description above and review the requirements below. Bug fixes and new features should include tests and possibly benchmarks. Contributors guide: ./CONTRIBUTING.md --> <!-- _Please make sure to review and check all of these items:_ --> ##### Checklist <!-- Remove items that do not apply. For completed items, change [ ] to [x]. --> - [ ] `make test-all` (UNIX) passes. CI will also test this. - [ ] unit and/or integration tests are included - [ ] documentation is changed or added <!-- _NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open._ --> ### Description of change <!-- Please provide a description of the change here. Be sure to use issue references when applicable: https://help.github.com/en/github/managing-your-work-on-github/closing-issues-using-keywords -->
888354be1b65ccd9d008e19f537cbf3ba7594dba
src/CoverageBase.jl
src/CoverageBase.jl
module CoverageBase using Coverage export testnames, runtests const need_inlining = ["reflection", "meta"] function julia_top() dir = joinpath(JULIA_HOME, "..", "share", "julia") if isdir(joinpath(dir,"base")) && isdir(joinpath(dir,"test")) return dir end dir = JULIA_HOME while !isdir(joinpath(dir,"base")) dir, _ = splitdir(dir) if dir == "/" error("Error parsing top dir; JULIA_HOME = $JULIA_HOME") end end dir end const topdir = julia_top() const basedir = joinpath(topdir, "base") const testdir = joinpath(topdir, "test") include(joinpath(testdir, "choosetests.jl")) function testnames() Base.JLOptions().can_inline == 1 && return need_inlining names, _ = choosetests() filter!(x -> !in(x, need_inlining), names) # Manually add in `pkg`, which is disabled so that `make testall` passes on machines without internet access push!(names, "pkg") names end function runtests(names) cd(testdir) do for tst in names println(tst) include(tst*".jl") end end end end # module
module CoverageBase using Coverage export testnames, runtests const need_inlining = [] function julia_top() dir = joinpath(JULIA_HOME, "..", "share", "julia") if isdir(joinpath(dir,"base")) && isdir(joinpath(dir,"test")) return dir end dir = JULIA_HOME while !isdir(joinpath(dir,"base")) dir, _ = splitdir(dir) if dir == "/" error("Error parsing top dir; JULIA_HOME = $JULIA_HOME") end end dir end const topdir = julia_top() const basedir = joinpath(topdir, "base") const testdir = joinpath(topdir, "test") include(joinpath(testdir, "choosetests.jl")) function testnames() names, _ = choosetests() if Base.JLOptions().can_inline == 0 filter!(x -> !in(x, need_inlining), names) end # Manually add in `pkg`, which is disabled so that `make testall` passes on machines without internet access push!(names, "pkg") names end function runtests(names) cd(testdir) do for tst in names println(tst) include(tst*".jl") end end end end # module
Remove need_inline tests and enable coverage run with inlining on
Remove need_inline tests and enable coverage run with inlining on Fix #18
Julia
mit
timholy/CoverageBase.jl
julia
## Code Before: module CoverageBase using Coverage export testnames, runtests const need_inlining = ["reflection", "meta"] function julia_top() dir = joinpath(JULIA_HOME, "..", "share", "julia") if isdir(joinpath(dir,"base")) && isdir(joinpath(dir,"test")) return dir end dir = JULIA_HOME while !isdir(joinpath(dir,"base")) dir, _ = splitdir(dir) if dir == "/" error("Error parsing top dir; JULIA_HOME = $JULIA_HOME") end end dir end const topdir = julia_top() const basedir = joinpath(topdir, "base") const testdir = joinpath(topdir, "test") include(joinpath(testdir, "choosetests.jl")) function testnames() Base.JLOptions().can_inline == 1 && return need_inlining names, _ = choosetests() filter!(x -> !in(x, need_inlining), names) # Manually add in `pkg`, which is disabled so that `make testall` passes on machines without internet access push!(names, "pkg") names end function runtests(names) cd(testdir) do for tst in names println(tst) include(tst*".jl") end end end end # module ## Instruction: Remove need_inline tests and enable coverage run with inlining on Fix #18 ## Code After: module CoverageBase using Coverage export testnames, runtests const need_inlining = [] function julia_top() dir = joinpath(JULIA_HOME, "..", "share", "julia") if isdir(joinpath(dir,"base")) && isdir(joinpath(dir,"test")) return dir end dir = JULIA_HOME while !isdir(joinpath(dir,"base")) dir, _ = splitdir(dir) if dir == "/" error("Error parsing top dir; JULIA_HOME = $JULIA_HOME") end end dir end const topdir = julia_top() const basedir = joinpath(topdir, "base") const testdir = joinpath(topdir, "test") include(joinpath(testdir, "choosetests.jl")) function testnames() names, _ = choosetests() if Base.JLOptions().can_inline == 0 filter!(x -> !in(x, need_inlining), names) end # Manually add in `pkg`, which is disabled so that `make testall` passes on machines without internet access push!(names, "pkg") names end function runtests(names) cd(testdir) do for tst in names println(tst) include(tst*".jl") end end end end # module
eab9fb83aed7c061551afd5d7b07147f5cefbdc7
CMake/hoomd/HOOMDMacros.cmake
CMake/hoomd/HOOMDMacros.cmake
macro(fix_cudart_rpath target) if (ENABLE_CUDA AND APPLE) get_target_property(_target_exe ${target} LOCATION) add_custom_command(TARGET ${target} POST_BUILD COMMAND install_name_tool ARGS -change @rpath/libcudart.dylib ${CUDA_CUDART_LIBRARY} ${_target_exe}) add_custom_command(TARGET ${target} POST_BUILD COMMAND install_name_tool ARGS -change @rpath/libcufft.dylib ${CUDA_CUDART_EMU_LIBRARY} ${_target_exe}) endif (ENABLE_CUDA AND APPLE) endmacro(fix_cudart_rpath)
macro(fix_cudart_rpath target) if (ENABLE_CUDA AND APPLE) get_target_property(_target_exe ${target} LOCATION) add_custom_command(TARGET ${target} POST_BUILD COMMAND install_name_tool ARGS -change @rpath/libcudart.dylib ${CUDA_CUDART_LIBRARY} ${_target_exe}) add_custom_command(TARGET ${target} POST_BUILD COMMAND install_name_tool ARGS -change @rpath/libcufft.dylib ${CUDA_cufft_LIBRARY} ${_target_exe}) endif (ENABLE_CUDA AND APPLE) endmacro(fix_cudart_rpath)
Fix bug that prevented mac os x builds from running in the build directory
Fix bug that prevented mac os x builds from running in the build directory git-svn-id: 4ba210d0a933e3fb1aa9ab096f190cd38965d92a@3903 fa922fa7-2fde-0310-acd8-f43f465a7996
CMake
bsd-3-clause
joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue
cmake
## Code Before: macro(fix_cudart_rpath target) if (ENABLE_CUDA AND APPLE) get_target_property(_target_exe ${target} LOCATION) add_custom_command(TARGET ${target} POST_BUILD COMMAND install_name_tool ARGS -change @rpath/libcudart.dylib ${CUDA_CUDART_LIBRARY} ${_target_exe}) add_custom_command(TARGET ${target} POST_BUILD COMMAND install_name_tool ARGS -change @rpath/libcufft.dylib ${CUDA_CUDART_EMU_LIBRARY} ${_target_exe}) endif (ENABLE_CUDA AND APPLE) endmacro(fix_cudart_rpath) ## Instruction: Fix bug that prevented mac os x builds from running in the build directory git-svn-id: 4ba210d0a933e3fb1aa9ab096f190cd38965d92a@3903 fa922fa7-2fde-0310-acd8-f43f465a7996 ## Code After: macro(fix_cudart_rpath target) if (ENABLE_CUDA AND APPLE) get_target_property(_target_exe ${target} LOCATION) add_custom_command(TARGET ${target} POST_BUILD COMMAND install_name_tool ARGS -change @rpath/libcudart.dylib ${CUDA_CUDART_LIBRARY} ${_target_exe}) add_custom_command(TARGET ${target} POST_BUILD COMMAND install_name_tool ARGS -change @rpath/libcufft.dylib ${CUDA_cufft_LIBRARY} ${_target_exe}) endif (ENABLE_CUDA AND APPLE) endmacro(fix_cudart_rpath)
255d7025283d0bd939d8e83520b29d9aa0d0eb6d
source/partials/_nav.html.erb
source/partials/_nav.html.erb
<nav class="navbar" role="navigation" aria-label="main navigation"> <ul class="navbar-list"> <%# <li class="navbar-item"> <a href="#" title="Sobre">Sobre</a> </li> %> <li class="navbar-item"> <a href="#speakers" title="Palestrantes">Palestrantes</a> </li> <li class="navbar-item"> <a href="#schedule" title="Agenda">Agenda</a> </li> <%# <li class="navbar-item"> <a href="#" title="Local">Local</a> </li> %> <%# <li class="navbar-item"> <a href="#" title="Patrocinadores">Patrocinadores</a> </li> %> <li class="navbar-item"> <a href="#presented" title="Realização">Realização</a> </li> <li class="navbar-item"> <%= link_to 'Garanta Seu Ingresso', data.site.tickets, class: 'button' , title: 'Garanta seu ingresso' %> </li> </ul> </nav>
<nav class="navbar" role="navigation" aria-label="main navigation"> <ul class="navbar-list"> <%# <li class="navbar-item"> <a href="#" title="Sobre">Sobre</a> </li> %> <li class="navbar-item"> <a href="#speakers" title="Palestrantes">Palestrantes</a> </li> <li class="navbar-item"> <a href="#schedule" title="Agenda">Agenda</a> </li> <%# <li class="navbar-item"> <a href="#" title="Local">Local</a> </li> %> <%# <li class="navbar-item"> <a href="#" title="Patrocinadores">Patrocinadores</a> </li> %> <li class="navbar-item"> <a href="#presented" title="Realização">Realização</a> </li> <li class="navbar-item"> <%= link_to 'Garanta Seu Ingresso', data.site.tickets, class: 'button' , title: 'Garanta seu ingresso', target: '_blank' %> </li> </ul> </nav>
Add target blank to buy tickets link
Add target blank to buy tickets link
HTML+ERB
mit
insiter/insiter.io,insiter/insiter.io,insiter/insiter.io
html+erb
## Code Before: <nav class="navbar" role="navigation" aria-label="main navigation"> <ul class="navbar-list"> <%# <li class="navbar-item"> <a href="#" title="Sobre">Sobre</a> </li> %> <li class="navbar-item"> <a href="#speakers" title="Palestrantes">Palestrantes</a> </li> <li class="navbar-item"> <a href="#schedule" title="Agenda">Agenda</a> </li> <%# <li class="navbar-item"> <a href="#" title="Local">Local</a> </li> %> <%# <li class="navbar-item"> <a href="#" title="Patrocinadores">Patrocinadores</a> </li> %> <li class="navbar-item"> <a href="#presented" title="Realização">Realização</a> </li> <li class="navbar-item"> <%= link_to 'Garanta Seu Ingresso', data.site.tickets, class: 'button' , title: 'Garanta seu ingresso' %> </li> </ul> </nav> ## Instruction: Add target blank to buy tickets link ## Code After: <nav class="navbar" role="navigation" aria-label="main navigation"> <ul class="navbar-list"> <%# <li class="navbar-item"> <a href="#" title="Sobre">Sobre</a> </li> %> <li class="navbar-item"> <a href="#speakers" title="Palestrantes">Palestrantes</a> </li> <li class="navbar-item"> <a href="#schedule" title="Agenda">Agenda</a> </li> <%# <li class="navbar-item"> <a href="#" title="Local">Local</a> </li> %> <%# <li class="navbar-item"> <a href="#" title="Patrocinadores">Patrocinadores</a> </li> %> <li class="navbar-item"> <a href="#presented" title="Realização">Realização</a> </li> <li class="navbar-item"> <%= link_to 'Garanta Seu Ingresso', data.site.tickets, class: 'button' , title: 'Garanta seu ingresso', target: '_blank' %> </li> </ul> </nav>
95fa71c4439343764cac95a1667e08dc21cb6ebe
plugins.py
plugins.py
from fabric.api import * import os import re __all__ = [] @task def test(plugin_path): """ Symbolically link a host file that contains a redcap plugin into the ./redcap/plugins folder :param plugin_path: path to plugin folder relative to VagrantFile :return: """ if not os.path.exists(plugin_path): abort("The folder %s does not exist. Please provide a relative path to a plugin folder you would like to test in the local vm" % plugin_path) redcap_root = env.live_project_full_path source_path = "/vagrant/" + plugin_path target_folder = "/".join([redcap_root, env.plugins_path]) run("ln -sf %s %s" % (source_path, target_folder))
from fabric.api import * import os import re __all__ = [] @task def test(plugin_path): """ Symbolically link a host file that contains a redcap plugin into the ./redcap/plugins folder :param plugin_path: path to plugin folder relative to VagrantFile :return: """ if not os.path.exists(plugin_path): abort("The folder %s does not exist. Please provide a relative path to a plugin folder you would like to test in the local vm" % plugin_path) redcap_root = env.live_project_full_path source_path = "/vagrant/" + plugin_path target_folder = "/".join([redcap_root, env.plugins_path]) with settings(user=env.deploy_user): run("ln -sf %s %s" % (source_path, target_folder))
Fix plugin test by running scripts as user deploy
Fix plugin test by running scripts as user deploy
Python
bsd-3-clause
ctsit/redcap_deployment,ctsit/redcap_deployment,ctsit/redcap_deployment,ctsit/redcap_deployment
python
## Code Before: from fabric.api import * import os import re __all__ = [] @task def test(plugin_path): """ Symbolically link a host file that contains a redcap plugin into the ./redcap/plugins folder :param plugin_path: path to plugin folder relative to VagrantFile :return: """ if not os.path.exists(plugin_path): abort("The folder %s does not exist. Please provide a relative path to a plugin folder you would like to test in the local vm" % plugin_path) redcap_root = env.live_project_full_path source_path = "/vagrant/" + plugin_path target_folder = "/".join([redcap_root, env.plugins_path]) run("ln -sf %s %s" % (source_path, target_folder)) ## Instruction: Fix plugin test by running scripts as user deploy ## Code After: from fabric.api import * import os import re __all__ = [] @task def test(plugin_path): """ Symbolically link a host file that contains a redcap plugin into the ./redcap/plugins folder :param plugin_path: path to plugin folder relative to VagrantFile :return: """ if not os.path.exists(plugin_path): abort("The folder %s does not exist. Please provide a relative path to a plugin folder you would like to test in the local vm" % plugin_path) redcap_root = env.live_project_full_path source_path = "/vagrant/" + plugin_path target_folder = "/".join([redcap_root, env.plugins_path]) with settings(user=env.deploy_user): run("ln -sf %s %s" % (source_path, target_folder))
f7351c4ef617866123546c9b4f715e3f1ef2ee89
README.md
README.md
github-flow-demo ================
github-flow-demo ================ [![Build Status](https://travis-ci.org/linjunpop/github-flow-demo.png?branch=master)](https://travis-ci.org/linjunpop/github-flow-demo)
Add Travis CI status image.
Add Travis CI status image. [CI skip]
Markdown
mit
linjunpop/github-flow-demo
markdown
## Code Before: github-flow-demo ================ ## Instruction: Add Travis CI status image. [CI skip] ## Code After: github-flow-demo ================ [![Build Status](https://travis-ci.org/linjunpop/github-flow-demo.png?branch=master)](https://travis-ci.org/linjunpop/github-flow-demo)
9790776a3df7304f60800a96cd47ee84f25b29f6
pivot/templates/handlebars/distribution-help-popover.html
pivot/templates/handlebars/distribution-help-popover.html
<!-- Template for the distribution help popover (explaining quartiles/median) --> {% load templatetag_handlebars %} {% tplhandlebars "distribution-help-popover" %} <p> <b>Distribution</b> </p> <p> <img src="{{ boxplot_image }}" alt="GPA distribution graph, called Boxplot, shows 50% of GPAs fall in between lower quartile and upper quartile. "> </p> <p> <a href="/about/" title="More about the boxplot"> Learn more about the Lower Quartile, Median GPA, and Upper Quartile.</a> </p> {% endtplhandlebars %}
<!-- Template for the distribution help popover (explaining quartiles/median) --> {% load templatetag_handlebars %} {% tplhandlebars "distribution-help-popover" %} <p> <b>Distribution</b> </p> <p> <!-- Note: Hardcoded the width/height of the image so bootstrap popover would recognize it. If the image/popover dimensions are changed you have to change the width/height here to be accurate as well --> <img src="{{ boxplot_image }}" style="width:244px;height:197.617px;" alt="GPA distribution graph, called Boxplot, shows 50% of GPAs fall in between lower quartile and upper quartile. "> </p> <p> <a href="/about/" title="More about the boxplot"> Learn more about the Lower Quartile, Median GPA, and Upper Quartile.</a> </p> {% endtplhandlebars %}
Fix for GPS-215. Hardcoded distribution popover image width/height
Fix for GPS-215. Hardcoded distribution popover image width/height
HTML
apache-2.0
uw-it-aca/pivot,uw-it-aca/pivot,uw-it-aca/pivot,uw-it-aca/pivot,uw-it-aca/pivot
html
## Code Before: <!-- Template for the distribution help popover (explaining quartiles/median) --> {% load templatetag_handlebars %} {% tplhandlebars "distribution-help-popover" %} <p> <b>Distribution</b> </p> <p> <img src="{{ boxplot_image }}" alt="GPA distribution graph, called Boxplot, shows 50% of GPAs fall in between lower quartile and upper quartile. "> </p> <p> <a href="/about/" title="More about the boxplot"> Learn more about the Lower Quartile, Median GPA, and Upper Quartile.</a> </p> {% endtplhandlebars %} ## Instruction: Fix for GPS-215. Hardcoded distribution popover image width/height ## Code After: <!-- Template for the distribution help popover (explaining quartiles/median) --> {% load templatetag_handlebars %} {% tplhandlebars "distribution-help-popover" %} <p> <b>Distribution</b> </p> <p> <!-- Note: Hardcoded the width/height of the image so bootstrap popover would recognize it. If the image/popover dimensions are changed you have to change the width/height here to be accurate as well --> <img src="{{ boxplot_image }}" style="width:244px;height:197.617px;" alt="GPA distribution graph, called Boxplot, shows 50% of GPAs fall in between lower quartile and upper quartile. "> </p> <p> <a href="/about/" title="More about the boxplot"> Learn more about the Lower Quartile, Median GPA, and Upper Quartile.</a> </p> {% endtplhandlebars %}
9dddc4d6af970d789277f6e84a87eb664e882bb3
xadmin/templates/xadmin/blocks/model_list.top_toolbar.saveorder.html
xadmin/templates/xadmin/blocks/model_list.top_toolbar.saveorder.html
{% load i18n %} <div class="btn-group"> <a href="#" id="save-order" class="btn btn-primary btn-sm" style="display: None" post-url="{{ save_order_url }}"> {% trans "Save Order" %} </a> </div>
{% load i18n %} <div class="btn-group"> <a href="#" id="save-order" class="btn btn-success btn-sm" style="display: None" post-url="{{ save_order_url }}"> <i class="fa fa-save">&nbsp;</i>{% trans "Save Order" %} </a> </div>
Add icon sotablelist; Change buttom theme.
Add icon sotablelist; Change buttom theme.
HTML
bsd-3-clause
alexsilva/django-xadmin,alexsilva/django-xadmin,alexsilva/django-xadmin,alexsilva/django-xadmin
html
## Code Before: {% load i18n %} <div class="btn-group"> <a href="#" id="save-order" class="btn btn-primary btn-sm" style="display: None" post-url="{{ save_order_url }}"> {% trans "Save Order" %} </a> </div> ## Instruction: Add icon sotablelist; Change buttom theme. ## Code After: {% load i18n %} <div class="btn-group"> <a href="#" id="save-order" class="btn btn-success btn-sm" style="display: None" post-url="{{ save_order_url }}"> <i class="fa fa-save">&nbsp;</i>{% trans "Save Order" %} </a> </div>
73f3741631465c490117974a896accf18008e486
config/resources.php
config/resources.php
<?php /** * Resources. Each consists of: * 'resource' - url on which the data you'll be requested * 'controller' - name of the controller * 'action' - name of the action */ return array( array( 'resource' => 'group', 'controller' => 'AuxiliaryDataController', 'action' => 'getGroups' ), array( 'resource' => 'shippers', 'controller' => 'AuxiliaryDataController', 'action' => 'getShippers' ), array( 'resource' => 'products', 'controller' => 'ProductController', 'action' => 'products' ), array( 'resource' => 'check_unique_value', 'controller' => 'ProductController', 'action' => 'checkUniqueProduct' ), );
<?php /** * Resources. Each consists of: * 'resource' - url on which the data you'll be requested * 'method' - method of the request * 'controller' - name of the controller * 'action' - name of the action */ return array( array( 'resource' => 'groups', 'method' => 'GET', 'controller' => 'AuxiliaryDataController', 'action' => 'getGroups' ), array( 'resource' => 'shippers', 'method' => 'GET', 'controller' => 'AuxiliaryDataController', 'action' => 'getShippers' ), array( 'resource' => 'products', 'method' => 'GET', 'controller' => 'ProductController', 'action' => 'getProducts' ), array( 'resource' => 'product/:id', 'method' => 'GET', 'controller' => 'ProductController', 'action' => 'getProduct' ), array( 'resource' => 'products', 'method' => 'POST', 'controller' => 'ProductController', 'action' => 'createProduct' ), array( 'resource' => 'product/:id', 'method' => 'PUT', 'controller' => 'ProductController', 'action' => 'updateProduct' ), array( 'resource' => 'product/:id', 'method' => 'DELETE', 'controller' => 'ProductController', 'action' => 'removeProduct' ), array( 'resource' => 'product/check_unique_value', 'method' => 'GET', 'controller' => 'ProductController', 'action' => 'checkUniqueProduct' ), );
Change structure of the 'resource' file according to new routing
Change structure of the 'resource' file according to new routing
PHP
unlicense
DanilBaibak/rest_api
php
## Code Before: <?php /** * Resources. Each consists of: * 'resource' - url on which the data you'll be requested * 'controller' - name of the controller * 'action' - name of the action */ return array( array( 'resource' => 'group', 'controller' => 'AuxiliaryDataController', 'action' => 'getGroups' ), array( 'resource' => 'shippers', 'controller' => 'AuxiliaryDataController', 'action' => 'getShippers' ), array( 'resource' => 'products', 'controller' => 'ProductController', 'action' => 'products' ), array( 'resource' => 'check_unique_value', 'controller' => 'ProductController', 'action' => 'checkUniqueProduct' ), ); ## Instruction: Change structure of the 'resource' file according to new routing ## Code After: <?php /** * Resources. Each consists of: * 'resource' - url on which the data you'll be requested * 'method' - method of the request * 'controller' - name of the controller * 'action' - name of the action */ return array( array( 'resource' => 'groups', 'method' => 'GET', 'controller' => 'AuxiliaryDataController', 'action' => 'getGroups' ), array( 'resource' => 'shippers', 'method' => 'GET', 'controller' => 'AuxiliaryDataController', 'action' => 'getShippers' ), array( 'resource' => 'products', 'method' => 'GET', 'controller' => 'ProductController', 'action' => 'getProducts' ), array( 'resource' => 'product/:id', 'method' => 'GET', 'controller' => 'ProductController', 'action' => 'getProduct' ), array( 'resource' => 'products', 'method' => 'POST', 'controller' => 'ProductController', 'action' => 'createProduct' ), array( 'resource' => 'product/:id', 'method' => 'PUT', 'controller' => 'ProductController', 'action' => 'updateProduct' ), array( 'resource' => 'product/:id', 'method' => 'DELETE', 'controller' => 'ProductController', 'action' => 'removeProduct' ), array( 'resource' => 'product/check_unique_value', 'method' => 'GET', 'controller' => 'ProductController', 'action' => 'checkUniqueProduct' ), );
5f49fb8c7c0f9e7a05d4f9b730d7f3e872229d60
test/completion/definition.py
test/completion/definition.py
#? isinstance isinstance( ) #? isinstance isinstance(None, ) #? isinstance isinstance(None, )
#? isinstance isinstance( ) #? isinstance isinstance(None, ) #? isinstance isinstance(None, ) # Note: len('isinstance(') == 11 #? 11 isinstance isinstance() # Note: len('isinstance(None,') == 16 ##? 16 isinstance isinstance(None,) # Note: len('isinstance(None,') == 16 ##? 16 isinstance isinstance(None, ) # Note: len('isinstance(None, ') == 17 ##? 17 isinstance isinstance(None, ) # Note: len('isinstance( ') == 12 ##? 12 isinstance isinstance( )
Add blackbox tests using column number
Add blackbox tests using column number
Python
mit
flurischt/jedi,WoLpH/jedi,mfussenegger/jedi,dwillmer/jedi,tjwei/jedi,jonashaag/jedi,jonashaag/jedi,tjwei/jedi,flurischt/jedi,dwillmer/jedi,mfussenegger/jedi,WoLpH/jedi
python
## Code Before: #? isinstance isinstance( ) #? isinstance isinstance(None, ) #? isinstance isinstance(None, ) ## Instruction: Add blackbox tests using column number ## Code After: #? isinstance isinstance( ) #? isinstance isinstance(None, ) #? isinstance isinstance(None, ) # Note: len('isinstance(') == 11 #? 11 isinstance isinstance() # Note: len('isinstance(None,') == 16 ##? 16 isinstance isinstance(None,) # Note: len('isinstance(None,') == 16 ##? 16 isinstance isinstance(None, ) # Note: len('isinstance(None, ') == 17 ##? 17 isinstance isinstance(None, ) # Note: len('isinstance( ') == 12 ##? 12 isinstance isinstance( )
82cf63a97093841af49b13e19b19f59c90f33da8
wercker-step.yml
wercker-step.yml
name: pretty-slack-notify version: 0.0.1 description: Posts wercker build/deploy status to a Slack channel keywords: - notification - slack - webhook properties:
name: pretty-slack-notify version: 0.0.1 description: Posts wercker build/deploy status to a Slack channel keywords: - notification - slack - webhook properties: team: type: string required: true token: type: string required: true channel: type: string required: true username: type: string required: false
Add properties to this step
Add properties to this step
YAML
mit
dlanileonardo/step-pretty-slack-notify,dlanileonardo/step-pretty-slack-notify,wantedly/step-pretty-slack-notify,wantedly/step-pretty-slack-notify,wantedly/step-pretty-slack-notify,dlanileonardo/step-pretty-slack-notify
yaml
## Code Before: name: pretty-slack-notify version: 0.0.1 description: Posts wercker build/deploy status to a Slack channel keywords: - notification - slack - webhook properties: ## Instruction: Add properties to this step ## Code After: name: pretty-slack-notify version: 0.0.1 description: Posts wercker build/deploy status to a Slack channel keywords: - notification - slack - webhook properties: team: type: string required: true token: type: string required: true channel: type: string required: true username: type: string required: false
a2ce7f991405e10886ecbe83c6577526a7480ca6
views/teams/show.html.erb
views/teams/show.html.erb
<% content_for(:title) { "#{I18n.t('.teams_page.title')} #{I18n.t(".teams.#{team.iso_code}")}" } %> <div class="row"> <div class="col-12 col-md-8 ml-auto mr-auto"> <div class="card"> <div class="card-header"> <div class="select-team row form-group"> <div class="col-6 col-sm-4 ml-auto pr-1"> <select id="teams-filter" class="form-control"> <% teams.each do |v_team|%> <option value="<%= v_team.iso_code %>" <%= v_team.iso_code == team.iso_code ? 'selected' : '' %>><%= I18n.t(".teams.#{v_team.iso_code}") %></option> <% end %> </select> </div> </div> </div> <div class="card-body table-full-width" id="matches-root"> <table class="table table-striped match-table table-responsive"> <tbody> <% matches.each do |match| %> <%= partial("shared/_match_row_small.html", match: Match[match.id]) %> <% end %> </tbody> </table> </div> </div> </div> </div> <%= render("views/shared/_prediction_modal.html.erb", id: current_user.id, redirect: req.path[1..req.path.size]) %>
<% content_for(:title) { "#{I18n.t('.teams_page.title')} #{I18n.t(".teams.#{team.iso_code}")}" } %> <div class="row"> <div class="col-12 col-md-8 ml-auto mr-auto"> <div class="card"> <div class="card-header"> <div class="select-team row form-group"> <div class="col-6 col-sm-4 ml-auto pr-1"> <select id="teams-filter" class="form-control"> <% teams.each do |v_team|%> <option value="<%= v_team.iso_code %>" <%= v_team.iso_code == team.iso_code ? 'selected' : '' %>><%= I18n.t(".teams.#{v_team.iso_code}") %></option> <% end %> </select> </div> </div> </div> <div class="card-body table-full-width" id="matches-root"> <table class="table match-table table-responsive"> <tbody> <% matches.each do |match| %> <%= partial("shared/_match_row_small.html", match: Match[match.id]) %> <% end %> </tbody> </table> </div> </div> </div> </div> <%= render("views/shared/_prediction_modal.html.erb", id: current_user.id, redirect: req.path[1..req.path.size]) %>
Remove table-striped for team matches.
Remove table-striped for team matches.
HTML+ERB
mit
threefunkymonkeys/funky-world-cup,threefunkymonkeys/funky-world-cup,threefunkymonkeys/funky-world-cup,threefunkymonkeys/funky-world-cup
html+erb
## Code Before: <% content_for(:title) { "#{I18n.t('.teams_page.title')} #{I18n.t(".teams.#{team.iso_code}")}" } %> <div class="row"> <div class="col-12 col-md-8 ml-auto mr-auto"> <div class="card"> <div class="card-header"> <div class="select-team row form-group"> <div class="col-6 col-sm-4 ml-auto pr-1"> <select id="teams-filter" class="form-control"> <% teams.each do |v_team|%> <option value="<%= v_team.iso_code %>" <%= v_team.iso_code == team.iso_code ? 'selected' : '' %>><%= I18n.t(".teams.#{v_team.iso_code}") %></option> <% end %> </select> </div> </div> </div> <div class="card-body table-full-width" id="matches-root"> <table class="table table-striped match-table table-responsive"> <tbody> <% matches.each do |match| %> <%= partial("shared/_match_row_small.html", match: Match[match.id]) %> <% end %> </tbody> </table> </div> </div> </div> </div> <%= render("views/shared/_prediction_modal.html.erb", id: current_user.id, redirect: req.path[1..req.path.size]) %> ## Instruction: Remove table-striped for team matches. ## Code After: <% content_for(:title) { "#{I18n.t('.teams_page.title')} #{I18n.t(".teams.#{team.iso_code}")}" } %> <div class="row"> <div class="col-12 col-md-8 ml-auto mr-auto"> <div class="card"> <div class="card-header"> <div class="select-team row form-group"> <div class="col-6 col-sm-4 ml-auto pr-1"> <select id="teams-filter" class="form-control"> <% teams.each do |v_team|%> <option value="<%= v_team.iso_code %>" <%= v_team.iso_code == team.iso_code ? 'selected' : '' %>><%= I18n.t(".teams.#{v_team.iso_code}") %></option> <% end %> </select> </div> </div> </div> <div class="card-body table-full-width" id="matches-root"> <table class="table match-table table-responsive"> <tbody> <% matches.each do |match| %> <%= partial("shared/_match_row_small.html", match: Match[match.id]) %> <% end %> </tbody> </table> </div> </div> </div> </div> <%= render("views/shared/_prediction_modal.html.erb", id: current_user.id, redirect: req.path[1..req.path.size]) %>
11206608bc55609f22837f1f56a85edbd781dd85
app/views/articles/show.html.erb
app/views/articles/show.html.erb
<h1><%= @article.title %></h1> <p><%= @article.body %></p> <div> <%= link_to 'delete', article_path(@article), method: :delete %> </div> <%= link_to "<< Back to Articles List", articles_path %>
<h1><%= @article.title %></h1> <p><%= @article.body %></p> <div> <%= link_to 'delete', article_path(@article), method: :delete, data: {confirm: "Are you sure you want to delete this article?"} %> </div> <%= link_to "<< Back to Articles List", articles_path %>
Add article deletion confirmation to show view
Add article deletion confirmation to show view
HTML+ERB
mit
xenochrysalis/shippers_bay_fandom_blogger,eksmith/shippers_bay_fandom_blogger,xenochrysalis/shippers_bay_fandom_blogger,eksmith/shippers_bay_fandom_blogger,eksmith/shippers_bay_fandom_blogger,xenochrysalis/shippers_bay_fandom_blogger
html+erb
## Code Before: <h1><%= @article.title %></h1> <p><%= @article.body %></p> <div> <%= link_to 'delete', article_path(@article), method: :delete %> </div> <%= link_to "<< Back to Articles List", articles_path %> ## Instruction: Add article deletion confirmation to show view ## Code After: <h1><%= @article.title %></h1> <p><%= @article.body %></p> <div> <%= link_to 'delete', article_path(@article), method: :delete, data: {confirm: "Are you sure you want to delete this article?"} %> </div> <%= link_to "<< Back to Articles List", articles_path %>
85ef4d2fb654499079a33326166146dbcd134f37
requirements.txt
requirements.txt
Flask==0.10.1 PyYAML==3.11 matterhook==0.1 py-trello==0.4.3 python-slugify==1.2.0 pyopenssl==0.14 ndg-httpsclient==0.4.1 pyasn1==0.1.9
Flask==0.10.1 PyYAML==3.11 matterhook==0.1 ndg-httpsclient==0.4.1 py-trello==0.4.3 pyasn1==0.1.9 pyopenssl==0.14 python-slugify==1.2.0 urllib3==1.16
Add the missing urllib3 dependancy
Add the missing urllib3 dependancy
Text
mit
Lujeni/matterllo,Lujeni/matterllo,Lujeni/matterllo,Lujeni/matterllo
text
## Code Before: Flask==0.10.1 PyYAML==3.11 matterhook==0.1 py-trello==0.4.3 python-slugify==1.2.0 pyopenssl==0.14 ndg-httpsclient==0.4.1 pyasn1==0.1.9 ## Instruction: Add the missing urllib3 dependancy ## Code After: Flask==0.10.1 PyYAML==3.11 matterhook==0.1 ndg-httpsclient==0.4.1 py-trello==0.4.3 pyasn1==0.1.9 pyopenssl==0.14 python-slugify==1.2.0 urllib3==1.16
7782fc4d22078f0b741d20678143bd8d80876609
git/routes.js
git/routes.js
var router = require("express").Router(); var db = require("./db"); router.get("/", function (req, res) { var o = { map: function () { if (this.parents.length === 1) { for (var i = 0; i < this.files.length; i++) { emit(this.author, { additions: this.files[i].additions, deletions: this.files[i].deletions }); } } }, reduce: function (key, values) { var obj = {additions: 0, deletions: 0}; values.map(function (value) { obj.additions += value.additions; obj.deletions += value.deletions; }); return obj; } }; db.Commit.mapReduce(o, function (err, results) { if (err) { res.send(err); } else { res.send(results); } }); }); module.exports = router;
var router = require("express").Router(); var db = require("./db"); router.get("/", function (req, res) { var o = { map: function () { if (this.parents.length === 1) { for (var i = 0; i < this.files.length; i++) { emit(this.author, { additions: this.files[i].additions, deletions: this.files[i].deletions }); } } }, reduce: function (key, values) { var obj = {additions: 0, deletions: 0}; values.map(function (value) { obj.additions += value.additions; obj.deletions += value.deletions; }); return obj; }, out: { replace: 'PersonReduce' } }; db.Commit.mapReduce(o, function (err, model) { if (err) { res.send(err); } else { model.find().populate({ path: "_id", model: "Person" }).exec(function (err, results) { if (err) { res.send(err); } else { var data = results.map(function (result) { return { author: result._id.name, additions: result.value.additions, deletions: result.value.deletions }; }); res.send(data); } }); } }); }); module.exports = router;
Return more sane data through API
Return more sane data through API
JavaScript
mit
bjornarg/dev-dashboard,bjornarg/dev-dashboard
javascript
## Code Before: var router = require("express").Router(); var db = require("./db"); router.get("/", function (req, res) { var o = { map: function () { if (this.parents.length === 1) { for (var i = 0; i < this.files.length; i++) { emit(this.author, { additions: this.files[i].additions, deletions: this.files[i].deletions }); } } }, reduce: function (key, values) { var obj = {additions: 0, deletions: 0}; values.map(function (value) { obj.additions += value.additions; obj.deletions += value.deletions; }); return obj; } }; db.Commit.mapReduce(o, function (err, results) { if (err) { res.send(err); } else { res.send(results); } }); }); module.exports = router; ## Instruction: Return more sane data through API ## Code After: var router = require("express").Router(); var db = require("./db"); router.get("/", function (req, res) { var o = { map: function () { if (this.parents.length === 1) { for (var i = 0; i < this.files.length; i++) { emit(this.author, { additions: this.files[i].additions, deletions: this.files[i].deletions }); } } }, reduce: function (key, values) { var obj = {additions: 0, deletions: 0}; values.map(function (value) { obj.additions += value.additions; obj.deletions += value.deletions; }); return obj; }, out: { replace: 'PersonReduce' } }; db.Commit.mapReduce(o, function (err, model) { if (err) { res.send(err); } else { model.find().populate({ path: "_id", model: "Person" }).exec(function (err, results) { if (err) { res.send(err); } else { var data = results.map(function (result) { return { author: result._id.name, additions: result.value.additions, deletions: result.value.deletions }; }); res.send(data); } }); } }); }); module.exports = router;
bc0022c32ef912eba9cc3d9683c1649443d6aa35
pyfibot/modules/module_btc.py
pyfibot/modules/module_btc.py
from __future__ import unicode_literals, print_function, division def command_btc(bot, user, channel, args): """Display current BTC exchange rates from mtgox. Usage: btc [whitespace separated list of currency codes]""" currencies = ["EUR"] if args: currencies = args.split(" ") rates = [] for currency in currencies: rate = gen_string(bot, currency) if rate: rates.append(rate) if rates: return bot.say(channel, "1 BTC = %s" % " | ".join(rates)) def gen_string(bot, currency): r = bot.get_url("http://data.mtgox.com/api/1/BTC%s/ticker" % currency) if r.json()['result'] != 'success': return None data = r.json()['return'] avg = data['avg']['display_short'] low = data['low']['display_short'] high = data['high']['display_short'] vol = data['vol']['display_short'] return "%s avg:%s low:%s high:%s vol:%s" % (currency.upper(), avg, low, high, vol)
from __future__ import unicode_literals, print_function, division def command_btc(bot, user, channel, args): """Display current BTC exchange rates from mtgox. Usage: btc [whitespace separated list of currency codes]""" currencies = ["EUR"] if args: currencies = args.split(" ") return bot.say(channel, get_coin_value(bot, "BTC", currencies)) def command_ltc(bot, user, channel, args): """Display current LTC exchange rates from mtgox. Usage: ltc [whitespace separated list of currency codes]""" currencies = ["EUR"] if args: currencies = args.split(" ") return bot.say(channel, get_coin_value(bot, "LTC", currencies)) def get_coin_value(bot, coin, currencies): rates = [] for currency in currencies: rate = gen_string(bot, coin, currency) if rate: rates.append(rate) if rates: return "1 %s = %s" % (coin, " | ".join(rates)) else: return None def gen_string(bot, coin="BTC", currency="EUR"): r = bot.get_url("http://data.mtgox.com/api/1/%s%s/ticker" % (coin, currency)) if r.json()['result'] != 'success': return None data = r.json()['return'] avg = data['avg']['display_short'] low = data['low']['display_short'] high = data['high']['display_short'] vol = data['vol']['display_short'] return "%s avg:%s low:%s high:%s vol:%s" % (currency.upper(), avg, low, high, vol)
Add support for LTC in mtgox
Add support for LTC in mtgox
Python
bsd-3-clause
rnyberg/pyfibot,EArmour/pyfibot,EArmour/pyfibot,aapa/pyfibot,lepinkainen/pyfibot,huqa/pyfibot,rnyberg/pyfibot,huqa/pyfibot,aapa/pyfibot,lepinkainen/pyfibot
python
## Code Before: from __future__ import unicode_literals, print_function, division def command_btc(bot, user, channel, args): """Display current BTC exchange rates from mtgox. Usage: btc [whitespace separated list of currency codes]""" currencies = ["EUR"] if args: currencies = args.split(" ") rates = [] for currency in currencies: rate = gen_string(bot, currency) if rate: rates.append(rate) if rates: return bot.say(channel, "1 BTC = %s" % " | ".join(rates)) def gen_string(bot, currency): r = bot.get_url("http://data.mtgox.com/api/1/BTC%s/ticker" % currency) if r.json()['result'] != 'success': return None data = r.json()['return'] avg = data['avg']['display_short'] low = data['low']['display_short'] high = data['high']['display_short'] vol = data['vol']['display_short'] return "%s avg:%s low:%s high:%s vol:%s" % (currency.upper(), avg, low, high, vol) ## Instruction: Add support for LTC in mtgox ## Code After: from __future__ import unicode_literals, print_function, division def command_btc(bot, user, channel, args): """Display current BTC exchange rates from mtgox. Usage: btc [whitespace separated list of currency codes]""" currencies = ["EUR"] if args: currencies = args.split(" ") return bot.say(channel, get_coin_value(bot, "BTC", currencies)) def command_ltc(bot, user, channel, args): """Display current LTC exchange rates from mtgox. Usage: ltc [whitespace separated list of currency codes]""" currencies = ["EUR"] if args: currencies = args.split(" ") return bot.say(channel, get_coin_value(bot, "LTC", currencies)) def get_coin_value(bot, coin, currencies): rates = [] for currency in currencies: rate = gen_string(bot, coin, currency) if rate: rates.append(rate) if rates: return "1 %s = %s" % (coin, " | ".join(rates)) else: return None def gen_string(bot, coin="BTC", currency="EUR"): r = bot.get_url("http://data.mtgox.com/api/1/%s%s/ticker" % (coin, currency)) if r.json()['result'] != 'success': return None data = r.json()['return'] avg = data['avg']['display_short'] low = data['low']['display_short'] high = data['high']['display_short'] vol = data['vol']['display_short'] return "%s avg:%s low:%s high:%s vol:%s" % (currency.upper(), avg, low, high, vol)
94ce4240f2ec1c0e76950467ecbc698b74a66a47
src/test/java/com/reduks/reduks/StoreTest.kt
src/test/java/com/reduks/reduks/StoreTest.kt
package com.reduks.reduks import com.reduks.reduks.repository.FakeActions import com.reduks.reduks.repository.FakeData import com.reduks.reduks.repository.FakeState import com.reduks.reduks.subscription.Subscriber import com.reduks.reduks.subscription.Subscription import org.jetbrains.spek.api.Spek import org.jetbrains.spek.api.dsl.given import org.jetbrains.spek.api.dsl.it import org.junit.platform.runner.JUnitPlatform import org.junit.runner.RunWith import kotlin.test.assertTrue @RunWith(JUnitPlatform::class) class StoreTest : Spek({ given("subscriptions") { val subscription = Subscription { print("\nunsubscribed") assertTrue(true) } val subscriber = Subscriber<FakeState> { state -> print("\n$state") assertTrue(state.name.toLowerCase().trim() == "bloder") } beforeEach { FakeData.store.subscribe(subscriber) print("\nsubscribed") } it("should return a transformed state in subscriber state changed action") { FakeData.store.dispatch(FakeActions.SetValidState()) } it("confirm that unsubscribing works") { subscription.unsubscribe() } } })
package com.reduks.reduks import com.reduks.reduks.repository.FakeActions import com.reduks.reduks.repository.FakeData import com.reduks.reduks.repository.FakeState import com.reduks.reduks.subscription.Subscriber import com.reduks.reduks.subscription.Subscription import org.jetbrains.spek.api.Spek import org.jetbrains.spek.api.dsl.given import org.jetbrains.spek.api.dsl.it import org.junit.platform.runner.JUnitPlatform import org.junit.runner.RunWith import kotlin.test.assertTrue @RunWith(JUnitPlatform::class) class StoreTest : Spek({ given("subscriptions") { val subscription = Subscription { assertTrue(true) } val subscriber = Subscriber<FakeState> { state -> assertTrue(state.name.toLowerCase().trim() == "bloder") } beforeEach { FakeData.store.subscribe(subscriber) } it("should return a transformed state in subscriber state changed action") { FakeData.store.dispatch(FakeActions.SetValidState()) } it("confirm that unsubscribing works") { subscription.unsubscribe() } it("should return updated state when I get it from store") { FakeData.store.subscribe(Subscriber {}) FakeData.store.dispatch(FakeActions.SetValidState()) assertTrue { FakeData.store.getState().name.trim().toLowerCase() == "bloder" } } } })
Create store get state test
Create store get state test
Kotlin
mit
Reduks/Reduks
kotlin
## Code Before: package com.reduks.reduks import com.reduks.reduks.repository.FakeActions import com.reduks.reduks.repository.FakeData import com.reduks.reduks.repository.FakeState import com.reduks.reduks.subscription.Subscriber import com.reduks.reduks.subscription.Subscription import org.jetbrains.spek.api.Spek import org.jetbrains.spek.api.dsl.given import org.jetbrains.spek.api.dsl.it import org.junit.platform.runner.JUnitPlatform import org.junit.runner.RunWith import kotlin.test.assertTrue @RunWith(JUnitPlatform::class) class StoreTest : Spek({ given("subscriptions") { val subscription = Subscription { print("\nunsubscribed") assertTrue(true) } val subscriber = Subscriber<FakeState> { state -> print("\n$state") assertTrue(state.name.toLowerCase().trim() == "bloder") } beforeEach { FakeData.store.subscribe(subscriber) print("\nsubscribed") } it("should return a transformed state in subscriber state changed action") { FakeData.store.dispatch(FakeActions.SetValidState()) } it("confirm that unsubscribing works") { subscription.unsubscribe() } } }) ## Instruction: Create store get state test ## Code After: package com.reduks.reduks import com.reduks.reduks.repository.FakeActions import com.reduks.reduks.repository.FakeData import com.reduks.reduks.repository.FakeState import com.reduks.reduks.subscription.Subscriber import com.reduks.reduks.subscription.Subscription import org.jetbrains.spek.api.Spek import org.jetbrains.spek.api.dsl.given import org.jetbrains.spek.api.dsl.it import org.junit.platform.runner.JUnitPlatform import org.junit.runner.RunWith import kotlin.test.assertTrue @RunWith(JUnitPlatform::class) class StoreTest : Spek({ given("subscriptions") { val subscription = Subscription { assertTrue(true) } val subscriber = Subscriber<FakeState> { state -> assertTrue(state.name.toLowerCase().trim() == "bloder") } beforeEach { FakeData.store.subscribe(subscriber) } it("should return a transformed state in subscriber state changed action") { FakeData.store.dispatch(FakeActions.SetValidState()) } it("confirm that unsubscribing works") { subscription.unsubscribe() } it("should return updated state when I get it from store") { FakeData.store.subscribe(Subscriber {}) FakeData.store.dispatch(FakeActions.SetValidState()) assertTrue { FakeData.store.getState().name.trim().toLowerCase() == "bloder" } } } })
04b49aa57b2141b3c032318d5c4125134157642b
widgy/contrib/page_builder/templates/widgy/page_builder/image/render.html
widgy/contrib/page_builder/templates/widgy/page_builder/image/render.html
{% load thumbnail_libs %} {% sorl_thumbnail self.image.file.name "500x500" upscale=False as im %} <img src="{% media im.name %}"> {% endthumbnail %}
{% load thumbnail_libs %} {% sorl_thumbnail self.image.file.name "500x500" upscale=False as im %} <img src="{% media im.name %}" alt="{{ self.image.label }}"> {% endthumbnail %}
Add alt text for image widget
Add alt text for image widget
HTML
apache-2.0
j00bar/django-widgy,j00bar/django-widgy,j00bar/django-widgy
html
## Code Before: {% load thumbnail_libs %} {% sorl_thumbnail self.image.file.name "500x500" upscale=False as im %} <img src="{% media im.name %}"> {% endthumbnail %} ## Instruction: Add alt text for image widget ## Code After: {% load thumbnail_libs %} {% sorl_thumbnail self.image.file.name "500x500" upscale=False as im %} <img src="{% media im.name %}" alt="{{ self.image.label }}"> {% endthumbnail %}
9f7a4a72eaa37c32105889b8cfd4786c4a6895f3
examples/hello_world.rs
examples/hello_world.rs
extern crate rouille; use std::io; fn main() { rouille::start_server("localhost:8000", move |request| { let _entry = rouille::LogEntry::start(io::stdout(), request); if let Ok(r) = rouille::match_assets(request, "examples") { return r; } let response = router!(request, GET (/) => (|| { Ok(rouille::Response::redirect("/hello/world")) }), GET (/hello/world) => (|| { println!("hello world"); Ok(rouille::Response::text("hello world")) }), GET (/{id}) => (|id: u32| { println!("u32 {:?}", id); Err(rouille::RouteError::WrongInput) }), GET (/{id}) => (|id: String| { println!("String {:?}", id); Ok(rouille::Response::text(format!("hello, {}", id))) }), _ => || Err(rouille::RouteError::NoRouteFound) ); response.unwrap_or_else(|err| rouille::Response::from_error(&err)) }); }
extern crate rouille; use std::io; fn main() { rouille::start_server("localhost:8000", move |request| { let _entry = rouille::LogEntry::start(io::stdout(), request); if let Ok(r) = rouille::match_assets(request, "examples") { return r; } let response = router!(request, GET (/) => (|| { Ok(rouille::Response::redirect("/hello/world")) }), GET (/hello/world) => (|| { println!("hello world"); Ok(rouille::Response::text("hello world")) }), GET (/panic) => (|| { panic!("Oops!") }), GET (/{id}) => (|id: u32| { println!("u32 {:?}", id); Err(rouille::RouteError::WrongInput) }), GET (/{id}) => (|id: String| { println!("String {:?}", id); Ok(rouille::Response::text(format!("hello, {}", id))) }), _ => || Err(rouille::RouteError::NoRouteFound) ); response.unwrap_or_else(|err| rouille::Response::from_error(&err)) }); }
Add a "/panic" route in the hello world example
Add a "/panic" route in the hello world example
Rust
apache-2.0
tomaka/rouille
rust
## Code Before: extern crate rouille; use std::io; fn main() { rouille::start_server("localhost:8000", move |request| { let _entry = rouille::LogEntry::start(io::stdout(), request); if let Ok(r) = rouille::match_assets(request, "examples") { return r; } let response = router!(request, GET (/) => (|| { Ok(rouille::Response::redirect("/hello/world")) }), GET (/hello/world) => (|| { println!("hello world"); Ok(rouille::Response::text("hello world")) }), GET (/{id}) => (|id: u32| { println!("u32 {:?}", id); Err(rouille::RouteError::WrongInput) }), GET (/{id}) => (|id: String| { println!("String {:?}", id); Ok(rouille::Response::text(format!("hello, {}", id))) }), _ => || Err(rouille::RouteError::NoRouteFound) ); response.unwrap_or_else(|err| rouille::Response::from_error(&err)) }); } ## Instruction: Add a "/panic" route in the hello world example ## Code After: extern crate rouille; use std::io; fn main() { rouille::start_server("localhost:8000", move |request| { let _entry = rouille::LogEntry::start(io::stdout(), request); if let Ok(r) = rouille::match_assets(request, "examples") { return r; } let response = router!(request, GET (/) => (|| { Ok(rouille::Response::redirect("/hello/world")) }), GET (/hello/world) => (|| { println!("hello world"); Ok(rouille::Response::text("hello world")) }), GET (/panic) => (|| { panic!("Oops!") }), GET (/{id}) => (|id: u32| { println!("u32 {:?}", id); Err(rouille::RouteError::WrongInput) }), GET (/{id}) => (|id: String| { println!("String {:?}", id); Ok(rouille::Response::text(format!("hello, {}", id))) }), _ => || Err(rouille::RouteError::NoRouteFound) ); response.unwrap_or_else(|err| rouille::Response::from_error(&err)) }); }
a8057b98c51fd1c0532090cc8575e86e60990ac0
st2tests/st2tests/fixtures/generic/executions/execution1.yaml
st2tests/st2tests/fixtures/generic/executions/execution1.yaml
--- action: enabled: true entry_point: '' id: 54c6bb640640fd5211edef0c name: local pack: core parameters: sudo: immutable: true runner_type: run-local end_timestamp: '2014-09-01T00:00:05.000000Z' id: 54c6bb640640fd5211edef0d liveaction: action: core.someworkflow callback: {} context: user: system end_timestamp: '2014-09-01T00:00:05.000000Z' id: 54c6b6d60640fd4f5354e74a parameters: {} result: {} start_timestamp: '2014-09-01T00:00:01.000000Z' status: scheduled parameters: {} result: {} runner: description: A runner for launching linear action chains. enabled: true id: 54c6bb640640fd5211edef0b name: action-chain runner_module: st2actions.runners.actionchainrunner runner_parameters: {} start_timestamp: '2014-09-01T00:00:01.000000Z' status: scheduled
--- action: enabled: true entry_point: '' id: 54c6bb640640fd5211edef0c uid: action:core:local ref: core.local name: local pack: core parameters: sudo: immutable: true runner_type: run-local end_timestamp: '2014-09-01T00:00:05.000000Z' id: 54c6bb640640fd5211edef0d liveaction: action: core.someworkflow callback: {} context: user: system end_timestamp: '2014-09-01T00:00:05.000000Z' id: 54c6b6d60640fd4f5354e74a parameters: {} result: {} start_timestamp: '2014-09-01T00:00:01.000000Z' status: scheduled parameters: {} result: {} runner: description: A runner for launching linear action chains. enabled: true id: 54c6bb640640fd5211edef0b name: action-chain runner_module: st2actions.runners.actionchainrunner runner_parameters: {} start_timestamp: '2014-09-01T00:00:01.000000Z' status: scheduled
Update out of date fixture.
Update out of date fixture.
YAML
apache-2.0
armab/st2,pixelrebel/st2,lakshmi-kannan/st2,tonybaloney/st2,lakshmi-kannan/st2,tonybaloney/st2,peak6/st2,Plexxi/st2,pixelrebel/st2,punalpatel/st2,nzlosh/st2,alfasin/st2,peak6/st2,punalpatel/st2,StackStorm/st2,armab/st2,alfasin/st2,Plexxi/st2,nzlosh/st2,dennybaa/st2,peak6/st2,lakshmi-kannan/st2,emedvedev/st2,pixelrebel/st2,StackStorm/st2,punalpatel/st2,Plexxi/st2,alfasin/st2,nzlosh/st2,StackStorm/st2,nzlosh/st2,Plexxi/st2,armab/st2,dennybaa/st2,emedvedev/st2,StackStorm/st2,emedvedev/st2,dennybaa/st2,tonybaloney/st2
yaml
## Code Before: --- action: enabled: true entry_point: '' id: 54c6bb640640fd5211edef0c name: local pack: core parameters: sudo: immutable: true runner_type: run-local end_timestamp: '2014-09-01T00:00:05.000000Z' id: 54c6bb640640fd5211edef0d liveaction: action: core.someworkflow callback: {} context: user: system end_timestamp: '2014-09-01T00:00:05.000000Z' id: 54c6b6d60640fd4f5354e74a parameters: {} result: {} start_timestamp: '2014-09-01T00:00:01.000000Z' status: scheduled parameters: {} result: {} runner: description: A runner for launching linear action chains. enabled: true id: 54c6bb640640fd5211edef0b name: action-chain runner_module: st2actions.runners.actionchainrunner runner_parameters: {} start_timestamp: '2014-09-01T00:00:01.000000Z' status: scheduled ## Instruction: Update out of date fixture. ## Code After: --- action: enabled: true entry_point: '' id: 54c6bb640640fd5211edef0c uid: action:core:local ref: core.local name: local pack: core parameters: sudo: immutable: true runner_type: run-local end_timestamp: '2014-09-01T00:00:05.000000Z' id: 54c6bb640640fd5211edef0d liveaction: action: core.someworkflow callback: {} context: user: system end_timestamp: '2014-09-01T00:00:05.000000Z' id: 54c6b6d60640fd4f5354e74a parameters: {} result: {} start_timestamp: '2014-09-01T00:00:01.000000Z' status: scheduled parameters: {} result: {} runner: description: A runner for launching linear action chains. enabled: true id: 54c6bb640640fd5211edef0b name: action-chain runner_module: st2actions.runners.actionchainrunner runner_parameters: {} start_timestamp: '2014-09-01T00:00:01.000000Z' status: scheduled
dde1e8a05d93b83abbd3821cb4bd352ef8263b58
mkdocs.yml
mkdocs.yml
site_name: LARA Interactive API theme: readthedocs site_dir: dist/docs repo_name: Github repo_url: https://github.com/concord-consortium/lara-interactive-api sute_url: http://concord-consortium.github.io/lara-interactive-api/ pages: - ['index.md','LARA API'] - ['about-mkdocs.md','About the documentation generator':W ]
site_name: LARA Interactive API theme: readthedocs site_dir: dist/docs repo_name: Github repo_url: https://github.com/concord-consortium/lara-interactive-api site_url: http://concord-consortium.github.io/lara-interactive-api/ pages: - LARA API: 'index.md' - About the documentation generator: 'about-mkdocs.md'
Fix some docs config typos/deprecation
Fix some docs config typos/deprecation
YAML
mit
concord-consortium/lara-interactive-api,concord-consortium/lara-interactive-api,concord-consortium/lara-interactive-api
yaml
## Code Before: site_name: LARA Interactive API theme: readthedocs site_dir: dist/docs repo_name: Github repo_url: https://github.com/concord-consortium/lara-interactive-api sute_url: http://concord-consortium.github.io/lara-interactive-api/ pages: - ['index.md','LARA API'] - ['about-mkdocs.md','About the documentation generator':W ] ## Instruction: Fix some docs config typos/deprecation ## Code After: site_name: LARA Interactive API theme: readthedocs site_dir: dist/docs repo_name: Github repo_url: https://github.com/concord-consortium/lara-interactive-api site_url: http://concord-consortium.github.io/lara-interactive-api/ pages: - LARA API: 'index.md' - About the documentation generator: 'about-mkdocs.md'
300c0376b5a85233dea9b1c9414a60ba585751d1
tests/parser/tcommand_as_expr.nim
tests/parser/tcommand_as_expr.nim
proc optarg(x:int):int = x proc singlearg(x:int):int = 20*x echo optarg 1, singlearg 2 proc foo(x: int): int = x-1 proc foo(x, y: int): int = x-y let x = optarg foo 7.foo let y = singlearg foo(1, foo 8) echo x, y
import math proc optarg(x:int, y:int = 0):int = x + 3 * y proc singlearg(x:int):int = 20*x echo optarg 1, singlearg 2 proc foo(x: int): int = x-1 proc foo(x, y: int): int = x-y let x = optarg foo 7.foo let y = singlearg foo(1, foo 8) let z = singlearg 1.foo foo 8 echo x, y, z let a = [2,4,8].map do (d:int) -> int: d + 1 echo a[0], a[1], a[2]
Fix optarg() and added two more tests.
Fix optarg() and added two more tests. One for 'do notation' in a single function in an expression, another the trick of using the method call syntax to pass two parameters.
Nimrod
mit
BlaXpirit/nim,tmm1/Nim,nanoant/Nim,jsanjuas/Nim,JCavallo/Nim,russpowers/Nim,msmith491/Nim,sferik/Nim,bvssvni/Nim,sarvex/Nim-lang,Dhertz/Nim,mbaulch/Nim,Dhertz/Nim,Salafit/Nim,reactormonk/nim,haiodo/Nim,Matt14916/Nim,dom96/Nim,jsanjuas/Nim,SSPkrolik/Nim,SSPkrolik/Nim,fredericksilva/Nim,dom96/Nim,Matt14916/Nim,sarvex/Nim-lang,Senketsu/Nim,JCavallo/Nim,Senketsu/Nim,endragor/Nim,russpowers/Nim,kirbyfan64/Nim,BlaXpirit/nim,Senketsu/Nim,singularperturbation/Nim,zachaysan/Nim,Matt14916/Nim,judofyr/Nim,mbaulch/Nim,MrJohz/Nim,sferik/Nim,sferik/Nim,MrJohz/Nim,nafsaka/Nim,BlaXpirit/nim,MrJohz/Nim,judofyr/Nim,xland/Nim,jfhg/Nim,tulayang/Nim,greyanubis/Nim,xland/Nim,gokr/Nim,tmm1/Nim,fredericksilva/Nim,singularperturbation/Nim,jfhg/Nim,nafsaka/Nim,xland/Nim,singularperturbation/Nim,JCavallo/Nim,MrJohz/Nim,BlaXpirit/nim,nanoant/Nim,kirbyfan64/Nim,douglas-larocca/Nim,xland/Nim,kirbyfan64/Nim,msmith491/Nim,JCavallo/Nim,xland/Nim,greyanubis/Nim,reactormonk/nim,greyanubis/Nim,gokr/Nim,Senketsu/Nim,russpowers/Nim,zachaysan/Nim,fredericksilva/Nim,jfhg/Nim,sferik/Nim,tulayang/Nim,mbaulch/Nim,JCavallo/Nim,Salafit/Nim,jfhg/Nim,nafsaka/Nim,msmith491/Nim,msmith491/Nim,tulayang/Nim,fredericksilva/Nim,judofyr/Nim,SSPkrolik/Nim,bvssvni/Nim,mbaulch/Nim,sferik/Nim,BlaXpirit/nim,JCavallo/Nim,sarvex/Nim-lang,tulayang/Nim,gokr/Nim,zachaysan/Nim,BlaXpirit/nim,SSPkrolik/Nim,singularperturbation/Nim,MrJohz/Nim,Matt14916/Nim,fredericksilva/Nim,fredericksilva/Nim,haiodo/Nim,douglas-larocca/Nim,judofyr/Nim,Dhertz/Nim,judofyr/Nim,nafsaka/Nim,fmamud/Nim,bvssvni/Nim,sferik/Nim,nafsaka/Nim,SSPkrolik/Nim,SSPkrolik/Nim,endragor/Nim,sferik/Nim,msmith491/Nim,nimLuckyBull/Nim,russpowers/Nim,bvssvni/Nim,jsanjuas/Nim,kirbyfan64/Nim,msmith491/Nim,reactormonk/nim,nanoant/Nim,nanoant/Nim,Matt14916/Nim,xland/Nim,judofyr/Nim,tmm1/Nim,JCavallo/Nim,fredericksilva/Nim,haiodo/Nim,jfhg/Nim,endragor/Nim,Salafit/Nim,jsanjuas/Nim,nanoant/Nim,russpowers/Nim,Salafit/Nim,judofyr/Nim,Matt14916/Nim,haiodo/Nim,fmamud/Nim,tmm1/Nim,douglas-larocca/Nim,sferik/Nim,douglas-larocca/Nim,zachaysan/Nim,nafsaka/Nim,kirbyfan64/Nim,jfhg/Nim,MrJohz/Nim,kirbyfan64/Nim,SSPkrolik/Nim,nafsaka/Nim,gokr/Nim,douglas-larocca/Nim,Dhertz/Nim,zachaysan/Nim,reactormonk/nim,greyanubis/Nim,tmm1/Nim,mbaulch/Nim,judofyr/Nim,BlaXpirit/nim,Salafit/Nim,kirbyfan64/Nim,BlaXpirit/nim,reactormonk/nim,fmamud/Nim,douglas-larocca/Nim,fredericksilva/Nim,dom96/Nim,nimLuckyBull/Nim,Senketsu/Nim,fmamud/Nim,singularperturbation/Nim,dom96/Nim,SSPkrolik/Nim,sarvex/Nim-lang,Senketsu/Nim,xland/Nim,nimLuckyBull/Nim,gokr/Nim,gokr/Nim,gokr/Nim,reactormonk/nim,fmamud/Nim,haiodo/Nim,mbaulch/Nim,MrJohz/Nim,tulayang/Nim,jsanjuas/Nim,douglas-larocca/Nim,bvssvni/Nim,bvssvni/Nim,sarvex/Nim-lang,endragor/Nim,Salafit/Nim,dom96/Nim,Dhertz/Nim,haiodo/Nim,russpowers/Nim,msmith491/Nim,Salafit/Nim,jsanjuas/Nim,sarvex/Nim-lang,sarvex/Nim-lang,greyanubis/Nim,Dhertz/Nim,nanoant/Nim,nimLuckyBull/Nim,douglas-larocca/Nim,endragor/Nim,tmm1/Nim,singularperturbation/Nim,greyanubis/Nim,mbaulch/Nim,nimLuckyBull/Nim,Matt14916/Nim,bvssvni/Nim,endragor/Nim,endragor/Nim,russpowers/Nim,zachaysan/Nim,nimLuckyBull/Nim,reactormonk/nim,nanoant/Nim,reactormonk/nim,tulayang/Nim,nimLuckyBull/Nim,greyanubis/Nim,zachaysan/Nim,singularperturbation/Nim,jsanjuas/Nim,kirbyfan64/Nim,dom96/Nim,jfhg/Nim,fmamud/Nim,Dhertz/Nim,haiodo/Nim,tmm1/Nim,fmamud/Nim,dom96/Nim,Senketsu/Nim,gokr/Nim
nimrod
## Code Before: proc optarg(x:int):int = x proc singlearg(x:int):int = 20*x echo optarg 1, singlearg 2 proc foo(x: int): int = x-1 proc foo(x, y: int): int = x-y let x = optarg foo 7.foo let y = singlearg foo(1, foo 8) echo x, y ## Instruction: Fix optarg() and added two more tests. One for 'do notation' in a single function in an expression, another the trick of using the method call syntax to pass two parameters. ## Code After: import math proc optarg(x:int, y:int = 0):int = x + 3 * y proc singlearg(x:int):int = 20*x echo optarg 1, singlearg 2 proc foo(x: int): int = x-1 proc foo(x, y: int): int = x-y let x = optarg foo 7.foo let y = singlearg foo(1, foo 8) let z = singlearg 1.foo foo 8 echo x, y, z let a = [2,4,8].map do (d:int) -> int: d + 1 echo a[0], a[1], a[2]
97a2106826809947182af00f734415bab1336008
lib/node_modules/@stdlib/math/base/special/riemann-zeta/docs/repl.txt
lib/node_modules/@stdlib/math/base/special/riemann-zeta/docs/repl.txt
{{alias}}( x ) Evaluates the Riemann zeta function as a function of a real variable `s` (i.e., `t = 0`). The Riemann zeta function is the analytic continuation of the infinite series __ oo 1 zeta(s) = \ ----- /__ k = 1 s k where `s` is a complex variable equal to `σ + ti`. The series is only convergent when the real part of `s`, `σ`, is greater than `1`. Parameters ---------- x: number Input value. Returns ------- y: number Function value. Examples -------- > var v = {{alias}}( 1.1 ) ~10.584 > v = {{alias}}( -4.0 ) 0.0 > v = {{alias}}( 70.0 ) 1.0 > v = {{alias}}( 0.5 ) ~-1.46 > v = {{alias}}( 1.0 ) // pole NaN > v = {{alias}}( NaN ) NaN See Also --------
{{alias}}( s ) Evaluates the Riemann zeta function as a function of a real variable `s`. Parameters ---------- s: number Input value. Returns ------- y: number Function value. Examples -------- > var y = {{alias}}( 1.1 ) ~10.584 > y = {{alias}}( -4.0 ) 0.0 > y = {{alias}}( 70.0 ) 1.0 > y = {{alias}}( 0.5 ) ~-1.46 > y = {{alias}}( NaN ) NaN // Evaluate at a pole: > y = {{alias}}( 1.0 ) NaN See Also --------
Rename parameter, remove ASCII equation, and update example
Rename parameter, remove ASCII equation, and update example
Text
apache-2.0
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
text
## Code Before: {{alias}}( x ) Evaluates the Riemann zeta function as a function of a real variable `s` (i.e., `t = 0`). The Riemann zeta function is the analytic continuation of the infinite series __ oo 1 zeta(s) = \ ----- /__ k = 1 s k where `s` is a complex variable equal to `σ + ti`. The series is only convergent when the real part of `s`, `σ`, is greater than `1`. Parameters ---------- x: number Input value. Returns ------- y: number Function value. Examples -------- > var v = {{alias}}( 1.1 ) ~10.584 > v = {{alias}}( -4.0 ) 0.0 > v = {{alias}}( 70.0 ) 1.0 > v = {{alias}}( 0.5 ) ~-1.46 > v = {{alias}}( 1.0 ) // pole NaN > v = {{alias}}( NaN ) NaN See Also -------- ## Instruction: Rename parameter, remove ASCII equation, and update example ## Code After: {{alias}}( s ) Evaluates the Riemann zeta function as a function of a real variable `s`. Parameters ---------- s: number Input value. Returns ------- y: number Function value. Examples -------- > var y = {{alias}}( 1.1 ) ~10.584 > y = {{alias}}( -4.0 ) 0.0 > y = {{alias}}( 70.0 ) 1.0 > y = {{alias}}( 0.5 ) ~-1.46 > y = {{alias}}( NaN ) NaN // Evaluate at a pole: > y = {{alias}}( 1.0 ) NaN See Also --------
dae06edc35abb18aea05d2d6e24bb44977301dd3
lib/git_release_notes/cli.rb
lib/git_release_notes/cli.rb
require "thor" module GitReleaseNotes class CLI < Thor include Thor::Actions desc "html", "Generates a HTML release notes document" method_option :from, type: :string, required: true, aliases: "-f" method_option :to, type: :string, required: true, aliases: "-t" method_option :git_web_url, type: :string, required: true, aliases: "-u" method_option :exclude_submodules_without_changes, type: :boolean, aliases: "-e" def html whats_in_the_deploy = GitParentRange.new(options[:from], options[:to], options[:git_web_url], !options[:exclude_submodules_without_changes]) puts whats_in_the_deploy.generate_html end end end
require "thor" module GitReleaseNotes class CLI < Thor include Thor::Actions desc "html", "Generates an HTML release notes document showing all commits between two refs\n" + "including commits within submodules" method_option :from, desc: "SHA, tag, or other tree-ish reference for the start of the range", banner: "SHA, tag, or other tree-ish reference for the start of the range", type: :string, required: true, aliases: "-f" method_option :to, desc: "SHA, tag, or other tree-ish reference for the end of the range", banner: "SHA, tag, or other tree-ish reference for the end of the range", type: :string, required: true, aliases: "-t" method_option :git_web_url, desc: "URL of the root repository, used to create links in the generated HTML doc", banner: "URL of the root repository, used to create links in the generated HTML doc", type: :string, default: "https://github.com/cloudfoundry/cf-release", aliases: "-u" method_option :exclude_submodules_without_changes, desc: "Exclude showing submodules in HTML doc if there are 0 commits to it in the given range", banner: "Exclude showing submodules in HTML doc if there are 0 commits to it in the given range", type: :boolean, default: false, aliases: "-e" def html puts GitParentRange.new( options[:from], options[:to], options[:git_web_url], options[:exclude_submodules_without_changes], ).generate_html end end end
Improve usage, and make github.com/cloudfoundry/cf-release default web URL
Improve usage, and make github.com/cloudfoundry/cf-release default web URL
Ruby
mit
cloudfoundry/git-release-notes,cloudfoundry/git-release-notes
ruby
## Code Before: require "thor" module GitReleaseNotes class CLI < Thor include Thor::Actions desc "html", "Generates a HTML release notes document" method_option :from, type: :string, required: true, aliases: "-f" method_option :to, type: :string, required: true, aliases: "-t" method_option :git_web_url, type: :string, required: true, aliases: "-u" method_option :exclude_submodules_without_changes, type: :boolean, aliases: "-e" def html whats_in_the_deploy = GitParentRange.new(options[:from], options[:to], options[:git_web_url], !options[:exclude_submodules_without_changes]) puts whats_in_the_deploy.generate_html end end end ## Instruction: Improve usage, and make github.com/cloudfoundry/cf-release default web URL ## Code After: require "thor" module GitReleaseNotes class CLI < Thor include Thor::Actions desc "html", "Generates an HTML release notes document showing all commits between two refs\n" + "including commits within submodules" method_option :from, desc: "SHA, tag, or other tree-ish reference for the start of the range", banner: "SHA, tag, or other tree-ish reference for the start of the range", type: :string, required: true, aliases: "-f" method_option :to, desc: "SHA, tag, or other tree-ish reference for the end of the range", banner: "SHA, tag, or other tree-ish reference for the end of the range", type: :string, required: true, aliases: "-t" method_option :git_web_url, desc: "URL of the root repository, used to create links in the generated HTML doc", banner: "URL of the root repository, used to create links in the generated HTML doc", type: :string, default: "https://github.com/cloudfoundry/cf-release", aliases: "-u" method_option :exclude_submodules_without_changes, desc: "Exclude showing submodules in HTML doc if there are 0 commits to it in the given range", banner: "Exclude showing submodules in HTML doc if there are 0 commits to it in the given range", type: :boolean, default: false, aliases: "-e" def html puts GitParentRange.new( options[:from], options[:to], options[:git_web_url], options[:exclude_submodules_without_changes], ).generate_html end end end
1b6111755eed270dda4fd5e33afb24522465ba0d
resources/styles/services/windowService.css
resources/styles/services/windowService.css
.l-popup { height: 600px; width: 700px; max-width: 80%; max-height: 80%; min-height: 300px; margin: auto; padding: 20px 30px; position: absolute; top: 0; bottom: 0; left: 0; right: 0; background: #fff; } .fadingPanel { background-color: #023f67; position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: 100; display: none; } .fadingPanel_open { opacity: .5; display: block; } .popup-fade { z-index: 101; position: absolute; left: 0; right: 0; top: 0; bottom: 0; }
.l-popup { height: 600px; width: 700px; max-width: 80%; max-height: 80%; min-height: 300px; margin: auto; padding: 20px 30px; position: absolute; top: 0; bottom: 0; left: 0; right: 0; background: #fff; } .fadingPanel { background-color: #023f67; position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: 100; visibility: hidden; transition: visibility 0, opacity 0.1s; } .fadingPanel_open { opacity: .5; visibility: visible; transition: visibility 0, opacity 0.1s; } .popup-fade { z-index: 101; position: absolute; left: 0; right: 0; top: 0; bottom: 0; }
Add transition to fading mask.
Add transition to fading mask.
CSS
mit
comindware/core-ui,comindware/core-ui,comindware/core-ui,comindware/core-ui
css
## Code Before: .l-popup { height: 600px; width: 700px; max-width: 80%; max-height: 80%; min-height: 300px; margin: auto; padding: 20px 30px; position: absolute; top: 0; bottom: 0; left: 0; right: 0; background: #fff; } .fadingPanel { background-color: #023f67; position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: 100; display: none; } .fadingPanel_open { opacity: .5; display: block; } .popup-fade { z-index: 101; position: absolute; left: 0; right: 0; top: 0; bottom: 0; } ## Instruction: Add transition to fading mask. ## Code After: .l-popup { height: 600px; width: 700px; max-width: 80%; max-height: 80%; min-height: 300px; margin: auto; padding: 20px 30px; position: absolute; top: 0; bottom: 0; left: 0; right: 0; background: #fff; } .fadingPanel { background-color: #023f67; position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: 100; visibility: hidden; transition: visibility 0, opacity 0.1s; } .fadingPanel_open { opacity: .5; visibility: visible; transition: visibility 0, opacity 0.1s; } .popup-fade { z-index: 101; position: absolute; left: 0; right: 0; top: 0; bottom: 0; }
4c218793f11a73662f47db0b9b543f6f8fc12238
web_external/templates/body/listingPage.jade
web_external/templates/body/listingPage.jade
.isic-listing-header .isic-listing-title h2 block title = title h4 if loaded if models.length === 0 | (no items) else if models.length === 1 | 1 item else = models.length + ' items' else .isic-listing-loading-animation-container .isic-listing-container each model, index in models .isic-listing-panel-group.panel-group(id="#{'panel-group-' + model.cid}") .isic-listing-panel.panel.panel-default .isic-listing-panel-heading.panel-heading( data-toggle="collapse", data-parent="#{'#panel-group-' + model.cid}", data-target="#{'#panel-' + model.cid}" ) a.collapsed | #{model.get('name')} span.isic-listing-panel-heading-indicator.pull-right i.icon-right-open .isic-listing-panel-collapse.panel-collapse.collapse( id="#{'panel-' + model.cid}" data-model-index="#{index}" ) .isic-listing-panel-body.panel-body
.isic-listing-header .isic-listing-title h2 block title = title h4 if loaded if models.length === 0 | (no items) else if models.length === 1 | 1 item else = models.length + ' items' else .isic-listing-loading-animation-container .isic-listing-container each model, index in models .isic-listing-panel-group.panel-group(id="#{'panel-group-' + model.cid}") .isic-listing-panel.panel.panel-default .isic-listing-panel-heading.panel-heading( data-toggle="collapse", data-parent="#{'#panel-group-' + model.cid}", data-target="#{'#panel-' + model.cid}" ) a.collapsed block heading = model.get('name') span.isic-listing-panel-heading-indicator.pull-right i.icon-right-open .isic-listing-panel-collapse.panel-collapse.collapse( id="#{'panel-' + model.cid}" data-model-index="#{index}" ) .isic-listing-panel-body.panel-body
Allow templates to customize listing page heading
Allow templates to customize listing page heading
Jade
apache-2.0
ImageMarkup/isic-archive,ImageMarkup/isic-archive,ImageMarkup/isic-archive,ImageMarkup/isic-archive
jade
## Code Before: .isic-listing-header .isic-listing-title h2 block title = title h4 if loaded if models.length === 0 | (no items) else if models.length === 1 | 1 item else = models.length + ' items' else .isic-listing-loading-animation-container .isic-listing-container each model, index in models .isic-listing-panel-group.panel-group(id="#{'panel-group-' + model.cid}") .isic-listing-panel.panel.panel-default .isic-listing-panel-heading.panel-heading( data-toggle="collapse", data-parent="#{'#panel-group-' + model.cid}", data-target="#{'#panel-' + model.cid}" ) a.collapsed | #{model.get('name')} span.isic-listing-panel-heading-indicator.pull-right i.icon-right-open .isic-listing-panel-collapse.panel-collapse.collapse( id="#{'panel-' + model.cid}" data-model-index="#{index}" ) .isic-listing-panel-body.panel-body ## Instruction: Allow templates to customize listing page heading ## Code After: .isic-listing-header .isic-listing-title h2 block title = title h4 if loaded if models.length === 0 | (no items) else if models.length === 1 | 1 item else = models.length + ' items' else .isic-listing-loading-animation-container .isic-listing-container each model, index in models .isic-listing-panel-group.panel-group(id="#{'panel-group-' + model.cid}") .isic-listing-panel.panel.panel-default .isic-listing-panel-heading.panel-heading( data-toggle="collapse", data-parent="#{'#panel-group-' + model.cid}", data-target="#{'#panel-' + model.cid}" ) a.collapsed block heading = model.get('name') span.isic-listing-panel-heading-indicator.pull-right i.icon-right-open .isic-listing-panel-collapse.panel-collapse.collapse( id="#{'panel-' + model.cid}" data-model-index="#{index}" ) .isic-listing-panel-body.panel-body
5fdaab3a80bd031851fa030112e704fae7c4971a
.travis.yml
.travis.yml
language: go go: - 1.3 before_install: - sudo pip install codecov install: - go get code.google.com/p/go.tools/cmd/cover - go get github.com/smartystreets/goconvey - go get ./... script: - go test -v -coverprofile=coverage.txt -covermode=count after_success: - codecov env: - TEST_PARSE_APPLICATION_ID=ABn7cwPXMCDU6eAy8wLIMRRwww73OGG7e8fQ3EKu TEST_PARSE_REST_API_KEY=6eRwDWn5qnLEMd1V5xvDBxRq4QlXbBin78TSWpnK
language: go go: - 1.4.1 env: global: - TEST_PARSE_APPLICATION_ID=ABn7cwPXMCDU6eAy8wLIMRRwww73OGG7e8fQ3EKu - TEST_PARSE_REST_API_KEY=6eRwDWn5qnLEMd1V5xvDBxRq4QlXbBin78TSWpnK - secure: RUZJ39ewNwMP/XCyygTeByd6boi5jGprA9++6yIuM7Q0bX0tz5uCO95wpq3a7TX0rMgg07TLUUz58w+Twkc0vThLnZnuGRFAaBeE+lzGEUjlHyimWTZHPzXS8M1FXis0wSJidEddoQanVvyMNtKniBgOVloJIbha6V99msynAKc= before_install: - sudo pip install codecov install: - go get golang.org/x/tools/cmd/cover - go get github.com/smartystreets/goconvey - go get ./... script: - echo $TEST_PARSE_MASTER_KEY - go test -v -coverprofile=coverage.txt -covermode=count after_success: - codecov
Add secure key for Parse
Add secure key for Parse
YAML
mit
dogenzaka/goparse,suzujun/goparse
yaml
## Code Before: language: go go: - 1.3 before_install: - sudo pip install codecov install: - go get code.google.com/p/go.tools/cmd/cover - go get github.com/smartystreets/goconvey - go get ./... script: - go test -v -coverprofile=coverage.txt -covermode=count after_success: - codecov env: - TEST_PARSE_APPLICATION_ID=ABn7cwPXMCDU6eAy8wLIMRRwww73OGG7e8fQ3EKu TEST_PARSE_REST_API_KEY=6eRwDWn5qnLEMd1V5xvDBxRq4QlXbBin78TSWpnK ## Instruction: Add secure key for Parse ## Code After: language: go go: - 1.4.1 env: global: - TEST_PARSE_APPLICATION_ID=ABn7cwPXMCDU6eAy8wLIMRRwww73OGG7e8fQ3EKu - TEST_PARSE_REST_API_KEY=6eRwDWn5qnLEMd1V5xvDBxRq4QlXbBin78TSWpnK - secure: RUZJ39ewNwMP/XCyygTeByd6boi5jGprA9++6yIuM7Q0bX0tz5uCO95wpq3a7TX0rMgg07TLUUz58w+Twkc0vThLnZnuGRFAaBeE+lzGEUjlHyimWTZHPzXS8M1FXis0wSJidEddoQanVvyMNtKniBgOVloJIbha6V99msynAKc= before_install: - sudo pip install codecov install: - go get golang.org/x/tools/cmd/cover - go get github.com/smartystreets/goconvey - go get ./... script: - echo $TEST_PARSE_MASTER_KEY - go test -v -coverprofile=coverage.txt -covermode=count after_success: - codecov
1fbf7513c94fa3f7466ecba2256a276455b7ab0b
src/plugins/system.js
src/plugins/system.js
export default function systemPlugin () { return (mp) => { function onMessage (text) { mp.emit('systemMessage', text) } mp.on('connected', () => { mp.ws.on('plugMessage', onMessage) }) } }
export default function systemPlugin () { return (mp) => { function onMessage (text) { mp.emit('systemMessage', text) } function onMaintenanceAlert (minutesLeft) { mp.emit('maintenanceAlert', minutesLeft) } function onMaintenance () { mp.emit('maintenance') } mp.on('connected', () => { mp.ws.on('plugMessage', onMessage) mp.ws.on('plugMaintenanceAlert', onMaintenanceAlert) mp.ws.on('plugMaintenance', onMaintenance) }) } }
Implement `maintenance` and `maintenanceAlert` events.
Implement `maintenance` and `maintenanceAlert` events.
JavaScript
mit
goto-bus-stop/miniplug
javascript
## Code Before: export default function systemPlugin () { return (mp) => { function onMessage (text) { mp.emit('systemMessage', text) } mp.on('connected', () => { mp.ws.on('plugMessage', onMessage) }) } } ## Instruction: Implement `maintenance` and `maintenanceAlert` events. ## Code After: export default function systemPlugin () { return (mp) => { function onMessage (text) { mp.emit('systemMessage', text) } function onMaintenanceAlert (minutesLeft) { mp.emit('maintenanceAlert', minutesLeft) } function onMaintenance () { mp.emit('maintenance') } mp.on('connected', () => { mp.ws.on('plugMessage', onMessage) mp.ws.on('plugMaintenanceAlert', onMaintenanceAlert) mp.ws.on('plugMaintenance', onMaintenance) }) } }
a06739083e48bdc11823e5299823aefc54c5501f
lib/fog/google/models/compute/images.rb
lib/fog/google/models/compute/images.rb
require 'fog/core/collection' require 'fog/google/models/compute/image' module Fog module Compute class Google class Images < Fog::Collection model Fog::Compute::Google::Image GLOBAL_PROJECTS = [ 'google', 'debian-cloud', 'centos-cloud', ] def all data = [] all_projects = GLOBAL_PROJECTS + [ self.service.project ] all_projects.each do |project| images = service.list_images(project).body["items"] || [] # Keep track of the project in which we found the image(s) images.each { |img| img[:project] = project } data += images end load(data) end def get(identity) # Search own project before global projects all_projects = [ self.service.project ] + GLOBAL_PROJECTS data = nil all_projects.each do |project| begin data = service.get_image(identity, project).body data[:project] = project rescue Fog::Errors::Error next else break end end # If it wasn't found in any project, raise if data.nil? raise Fog::Errors::Error.new('Unable to find the specified image '\ 'in the following projects: '\ "#{all_projects.join(', ')}") end new(data) end end end end end
require 'fog/core/collection' require 'fog/google/models/compute/image' module Fog module Compute class Google class Images < Fog::Collection model Fog::Compute::Google::Image GLOBAL_PROJECTS = [ 'google', 'debian-cloud', 'centos-cloud', 'rhel-cloud', ] def all data = [] all_projects = GLOBAL_PROJECTS + [ self.service.project ] all_projects.each do |project| images = service.list_images(project).body["items"] || [] # Keep track of the project in which we found the image(s) images.each { |img| img[:project] = project } data += images end load(data) end def get(identity) # Search own project before global projects all_projects = [ self.service.project ] + GLOBAL_PROJECTS data = nil all_projects.each do |project| begin data = service.get_image(identity, project).body data[:project] = project rescue Fog::Errors::Error next else break end end # If it wasn't found in any project, raise if data.nil? raise Fog::Errors::Error.new('Unable to find the specified image '\ 'in the following projects: '\ "#{all_projects.join(', ')}") end new(data) end end end end end
Add rhel-cloud to project search list
[google][compute] Add rhel-cloud to project search list
Ruby
mit
github/fog,NETWAYS/fog,ack/fog,covario-cdiaz/fog,sapcc/fog,surminus/fog,bryanl/fog,martinb3/fog,brandondunne/fog,dhague/fog,b0ric/fog,brilliomsinterop/fog,MSOpenTech/fog,lwander/fog,mavenlink/fog,yyuu/fog,unorthodoxgeek/fog,phillbaker/fog,eLobato/fog,petems/fog,phillbaker/fog,pravi/fog,joshmyers/fog,covario-cdiaz/fog,ManageIQ/fog,icco/fog,adamleff/fog,petems/fog,brilliomsinterop/fog,theforeman/fog,pravi/fog,ack/fog,ManageIQ/fog,mohitsethi/fog,dLobatog/fog,zephyrean/fog,fog/fog,Programatica/fog,github/fog,dhague/fog,alphagov/fog,rackspace/fog,theforeman/fog,mitchlloyd/fog,papedaniel/fog,backupify/fog,mitchlloyd/fog,runtimerevolution/fog,joshmyers/fog,sapcc/fog,brilliomsinterop/fog,pyama86/fog,runtimerevolution/fog,dustacio/fog,lwander/fog,glennpratt/fog,unorthodoxgeek/fog,asebastian-r7/fog,eLobato/fog,surminus/fog,plribeiro3000/fog,nandhanurrevanth/fog,MSOpenTech/fog,alphagov/fog,sideci-sample/sideci-sample-fog,icco/fog,adecarolis/fog,Ladas/fog,dtdream/fog,SpryBTS/fog,glennpratt/fog,plribeiro3000/fog,nandhanurrevanth/fog,joshisa/fog,SpryBTS/fog,nicolasbrechet/fog,NETWAYS/fog,mavenlink/fog,phillbaker/fog,asebastian-r7/fog,rackspace/fog,bdunne/fog,nalabjp/fog,kongslund/fog,cocktail-io/fog,yyuu/fog,duhast/fog,adamleff/fog,displague/fog,dustacio/fog,mohitsethi/fog,papedaniel/fog,10io/fog,duhast/fog,TerryHowe/fog,joshisa/fog,seanhandley/fog,kongslund/fog,pyama86/fog,TerryHowe/fog,nicolasbrechet/fog,nandhanurrevanth/fog,backupify/fog,b0ric/fog,zephyrean/fog,dtdream/fog,Ladas/fog,zephyrean/fog,Programatica/fog,fog/fog,dLobatog/fog,martinb3/fog,seanhandley/fog,cocktail-io/fog,10io/fog,nalabjp/fog,adecarolis/fog,bryanl/fog,displague/fog,sideci-sample/sideci-sample-fog
ruby
## Code Before: require 'fog/core/collection' require 'fog/google/models/compute/image' module Fog module Compute class Google class Images < Fog::Collection model Fog::Compute::Google::Image GLOBAL_PROJECTS = [ 'google', 'debian-cloud', 'centos-cloud', ] def all data = [] all_projects = GLOBAL_PROJECTS + [ self.service.project ] all_projects.each do |project| images = service.list_images(project).body["items"] || [] # Keep track of the project in which we found the image(s) images.each { |img| img[:project] = project } data += images end load(data) end def get(identity) # Search own project before global projects all_projects = [ self.service.project ] + GLOBAL_PROJECTS data = nil all_projects.each do |project| begin data = service.get_image(identity, project).body data[:project] = project rescue Fog::Errors::Error next else break end end # If it wasn't found in any project, raise if data.nil? raise Fog::Errors::Error.new('Unable to find the specified image '\ 'in the following projects: '\ "#{all_projects.join(', ')}") end new(data) end end end end end ## Instruction: [google][compute] Add rhel-cloud to project search list ## Code After: require 'fog/core/collection' require 'fog/google/models/compute/image' module Fog module Compute class Google class Images < Fog::Collection model Fog::Compute::Google::Image GLOBAL_PROJECTS = [ 'google', 'debian-cloud', 'centos-cloud', 'rhel-cloud', ] def all data = [] all_projects = GLOBAL_PROJECTS + [ self.service.project ] all_projects.each do |project| images = service.list_images(project).body["items"] || [] # Keep track of the project in which we found the image(s) images.each { |img| img[:project] = project } data += images end load(data) end def get(identity) # Search own project before global projects all_projects = [ self.service.project ] + GLOBAL_PROJECTS data = nil all_projects.each do |project| begin data = service.get_image(identity, project).body data[:project] = project rescue Fog::Errors::Error next else break end end # If it wasn't found in any project, raise if data.nil? raise Fog::Errors::Error.new('Unable to find the specified image '\ 'in the following projects: '\ "#{all_projects.join(', ')}") end new(data) end end end end end
427a4e5669781af0ee66e3c61414bc9d74510ae8
src/main/java/net/techcable/jstruct/JStruct.java
src/main/java/net/techcable/jstruct/JStruct.java
package net.techcable.jstruct; /** * All classes annotated with this field will be <href a=https://wikipedia.org/wiki/PassByValue>pass by value</href> * <p/> * In order to preserve the contract of objects in the java language, JStructs can only have final fields. * Otherwise modifications to a JStruct would not be reflected in all objects. * <p/> * Certain operations can't be performed on a JStruct and will throw an {@link UnsupportedOperationException}: * <ul> * <li>Synchronization</li> * <li>wait() and notify()</li> * <li>Identity Comparison (o1 == o2)</li> * </ul> * <p/> * The current implementation of JStruct makes everything pass by value, so the * If your JVM does not support escape analysis {@code JStruct} should <b>not</b> be used. * Otherwise memory usage will skyrocket, as every struct will be re-allocated on the heap for every method call. */ public @interface JStruct {}
package net.techcable.jstruct; /** * All classes annotated with this field will be <href a=https://wikipedia.org/wiki/PassByValue>pass by value</href> * <p/> * In order to preserve the contract of objects in the java language, JStructs can only have final fields. * Otherwise modifications to a JStruct would not be reflected in all objects. * <p/> * Certain operations can't be performed on a JStruct and will throw an {@link UnsupportedOperationException}: * <ul> * <li>Synchronization</li> * <li>wait() and notify()</li> * <li>Identity Comparison (o1 == o2)</li> * </ul> * <p/> * If your JVM does not support escape analysis {@code JStruct} should <b>not</b> be used. * Otherwise memory usage will skyrocket, as every struct will be re-allocated on the heap for every method call. */ public @interface JStruct {}
Remove some in completed documentation.
Remove some in completed documentation. Fixes #1
Java
mit
Techcable/JStruct
java
## Code Before: package net.techcable.jstruct; /** * All classes annotated with this field will be <href a=https://wikipedia.org/wiki/PassByValue>pass by value</href> * <p/> * In order to preserve the contract of objects in the java language, JStructs can only have final fields. * Otherwise modifications to a JStruct would not be reflected in all objects. * <p/> * Certain operations can't be performed on a JStruct and will throw an {@link UnsupportedOperationException}: * <ul> * <li>Synchronization</li> * <li>wait() and notify()</li> * <li>Identity Comparison (o1 == o2)</li> * </ul> * <p/> * The current implementation of JStruct makes everything pass by value, so the * If your JVM does not support escape analysis {@code JStruct} should <b>not</b> be used. * Otherwise memory usage will skyrocket, as every struct will be re-allocated on the heap for every method call. */ public @interface JStruct {} ## Instruction: Remove some in completed documentation. Fixes #1 ## Code After: package net.techcable.jstruct; /** * All classes annotated with this field will be <href a=https://wikipedia.org/wiki/PassByValue>pass by value</href> * <p/> * In order to preserve the contract of objects in the java language, JStructs can only have final fields. * Otherwise modifications to a JStruct would not be reflected in all objects. * <p/> * Certain operations can't be performed on a JStruct and will throw an {@link UnsupportedOperationException}: * <ul> * <li>Synchronization</li> * <li>wait() and notify()</li> * <li>Identity Comparison (o1 == o2)</li> * </ul> * <p/> * If your JVM does not support escape analysis {@code JStruct} should <b>not</b> be used. * Otherwise memory usage will skyrocket, as every struct will be re-allocated on the heap for every method call. */ public @interface JStruct {}
b4bb6ffbe4d5836f2513d02b7d70734664988674
scripts/bootstrap.sh
scripts/bootstrap.sh
git submodule update --init --recursive if [[ ! "$(type -p lessc)" ]]; then printf "\e[0;32mlessc not found! less must be installed and lessc on your path to build socorro.\e[0m\n" && exit 1 fi if [ ! -d "$VIRTUAL_ENV" ]; then virtualenv -p python2.6 ${PWD}/socorro-virtualenv source ${PWD}/socorro-virtualenv/bin/activate export VIRTUAL_ENV fi # install dev + prod dependencies ${VIRTUAL_ENV}/bin/pip install tools/peep-1.2.tar.gz ${VIRTUAL_ENV}/bin/peep install --download-cache=./pip-cache -r requirements.txt # bootstrap webapp cd webapp-django; ./bin/bootstrap.sh
export VIRTUAL_ENV=${VIRTUAL_ENV:-"$PWD/socorro-virtualenv"} git submodule update --init --recursive if [[ ! "$(type -p lessc)" ]]; then printf "\e[0;32mlessc not found! less must be installed and lessc on your path to build socorro.\e[0m\n" && exit 1 fi if [ ! -d "$VIRTUAL_ENV" ]; then virtualenv -p python2.6 ${VIRTUAL_ENV} fi source "$VIRTUAL_ENV/bin/activate" # install dev + prod dependencies ${VIRTUAL_ENV}/bin/pip install tools/peep-1.2.tar.gz ${VIRTUAL_ENV}/bin/peep install --download-cache=./pip-cache -r requirements.txt # bootstrap webapp cd webapp-django; ./bin/bootstrap.sh
Set a default for VIRTUAL_ENV
Set a default for VIRTUAL_ENV
Shell
mpl-2.0
luser/socorro,linearregression/socorro,lonnen/socorro,KaiRo-at/socorro,linearregression/socorro,Tayamarn/socorro,lonnen/socorro,spthaolt/socorro,cliqz/socorro,rhelmer/socorro,spthaolt/socorro,yglazko/socorro,m8ttyB/socorro,Tchanders/socorro,KaiRo-at/socorro,adngdb/socorro,m8ttyB/socorro,Tchanders/socorro,twobraids/socorro,adngdb/socorro,rhelmer/socorro,KaiRo-at/socorro,cliqz/socorro,mozilla/socorro,adngdb/socorro,Tayamarn/socorro,mozilla/socorro,yglazko/socorro,cliqz/socorro,pcabido/socorro,twobraids/socorro,rhelmer/socorro,rhelmer/socorro,AdrianGaudebert/socorro,lonnen/socorro,Serg09/socorro,AdrianGaudebert/socorro,Tchanders/socorro,luser/socorro,m8ttyB/socorro,twobraids/socorro,Tchanders/socorro,rhelmer/socorro,luser/socorro,mozilla/socorro,AdrianGaudebert/socorro,mozilla/socorro,Tayamarn/socorro,AdrianGaudebert/socorro,Serg09/socorro,adngdb/socorro,pcabido/socorro,linearregression/socorro,adngdb/socorro,rhelmer/socorro,linearregression/socorro,Serg09/socorro,mozilla/socorro,KaiRo-at/socorro,linearregression/socorro,spthaolt/socorro,twobraids/socorro,twobraids/socorro,lonnen/socorro,Serg09/socorro,adngdb/socorro,Tayamarn/socorro,pcabido/socorro,AdrianGaudebert/socorro,yglazko/socorro,m8ttyB/socorro,yglazko/socorro,yglazko/socorro,spthaolt/socorro,Tchanders/socorro,spthaolt/socorro,luser/socorro,Tayamarn/socorro,twobraids/socorro,Tayamarn/socorro,luser/socorro,m8ttyB/socorro,yglazko/socorro,linearregression/socorro,pcabido/socorro,pcabido/socorro,KaiRo-at/socorro,Serg09/socorro,luser/socorro,AdrianGaudebert/socorro,m8ttyB/socorro,cliqz/socorro,spthaolt/socorro,cliqz/socorro,cliqz/socorro,Tchanders/socorro,Serg09/socorro,KaiRo-at/socorro,pcabido/socorro,mozilla/socorro
shell
## Code Before: git submodule update --init --recursive if [[ ! "$(type -p lessc)" ]]; then printf "\e[0;32mlessc not found! less must be installed and lessc on your path to build socorro.\e[0m\n" && exit 1 fi if [ ! -d "$VIRTUAL_ENV" ]; then virtualenv -p python2.6 ${PWD}/socorro-virtualenv source ${PWD}/socorro-virtualenv/bin/activate export VIRTUAL_ENV fi # install dev + prod dependencies ${VIRTUAL_ENV}/bin/pip install tools/peep-1.2.tar.gz ${VIRTUAL_ENV}/bin/peep install --download-cache=./pip-cache -r requirements.txt # bootstrap webapp cd webapp-django; ./bin/bootstrap.sh ## Instruction: Set a default for VIRTUAL_ENV ## Code After: export VIRTUAL_ENV=${VIRTUAL_ENV:-"$PWD/socorro-virtualenv"} git submodule update --init --recursive if [[ ! "$(type -p lessc)" ]]; then printf "\e[0;32mlessc not found! less must be installed and lessc on your path to build socorro.\e[0m\n" && exit 1 fi if [ ! -d "$VIRTUAL_ENV" ]; then virtualenv -p python2.6 ${VIRTUAL_ENV} fi source "$VIRTUAL_ENV/bin/activate" # install dev + prod dependencies ${VIRTUAL_ENV}/bin/pip install tools/peep-1.2.tar.gz ${VIRTUAL_ENV}/bin/peep install --download-cache=./pip-cache -r requirements.txt # bootstrap webapp cd webapp-django; ./bin/bootstrap.sh
413146be21307805c67d982f77ceeb3f760b38ad
recipes-multimedia/libdce/libdce_3.00.12.00.bb
recipes-multimedia/libdce/libdce_3.00.12.00.bb
DESCRIPTION = "Library used for remotely invoking the hw accelerated codec on IVA-HD" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://libdce.h;beginline=1;endline=31;md5=0a398cf815b8b5f31f552266cd453dae" inherit autotools pkgconfig DEPENDS = "libdrm ti-ipc" SRC_URI = "git://git.omapzoom.org/repo/libdce.git;protocol=git" SRCREV = "1b1b5a2e5e995f607c22651579b49aa98d08610a" S = "${WORKDIR}/git" EXTRA_OECONF += "IPC_HEADERS=${STAGING_INCDIR}/ti/ipc/mm"
DESCRIPTION = "Library used for remotely invoking the hw accelerated codec on IVA-HD" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://libdce.h;beginline=1;endline=31;md5=0a398cf815b8b5f31f552266cd453dae" inherit autotools pkgconfig DEPENDS = "libdrm ti-ipc" SRC_URI = "git://git.omapzoom.org/repo/libdce.git;protocol=git" SRCREV = "c51f144b079836afb868bff44afe7308248a0217" PR = "r1" S = "${WORKDIR}/git" EXTRA_OECONF += "IPC_HEADERS=${STAGING_INCDIR}/ti/ipc/mm"
Update SRCREV add MJPEG Encoder support
libdce: Update SRCREV add MJPEG Encoder support Signed-off-by: Karthik Ramanan <[email protected]> Signed-off-by: Denys Dmytriyenko <[email protected]>
BitBake
mit
rcn-ee/meta-ti,rcn-ee/meta-ti,rcn-ee/meta-ti,rcn-ee/meta-ti
bitbake
## Code Before: DESCRIPTION = "Library used for remotely invoking the hw accelerated codec on IVA-HD" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://libdce.h;beginline=1;endline=31;md5=0a398cf815b8b5f31f552266cd453dae" inherit autotools pkgconfig DEPENDS = "libdrm ti-ipc" SRC_URI = "git://git.omapzoom.org/repo/libdce.git;protocol=git" SRCREV = "1b1b5a2e5e995f607c22651579b49aa98d08610a" S = "${WORKDIR}/git" EXTRA_OECONF += "IPC_HEADERS=${STAGING_INCDIR}/ti/ipc/mm" ## Instruction: libdce: Update SRCREV add MJPEG Encoder support Signed-off-by: Karthik Ramanan <[email protected]> Signed-off-by: Denys Dmytriyenko <[email protected]> ## Code After: DESCRIPTION = "Library used for remotely invoking the hw accelerated codec on IVA-HD" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://libdce.h;beginline=1;endline=31;md5=0a398cf815b8b5f31f552266cd453dae" inherit autotools pkgconfig DEPENDS = "libdrm ti-ipc" SRC_URI = "git://git.omapzoom.org/repo/libdce.git;protocol=git" SRCREV = "c51f144b079836afb868bff44afe7308248a0217" PR = "r1" S = "${WORKDIR}/git" EXTRA_OECONF += "IPC_HEADERS=${STAGING_INCDIR}/ti/ipc/mm"
e9ac9dbb5e454f09e7bc798718de1101448ec812
data/main_topics.json
data/main_topics.json
[ { "title": "Culture", "url": "culture" }, { "title": "Economie & Travail", "url": "economie-travail" }, { "title": "Éducation & Recherche", "url": "education-et-recherche" }, { "title": "État, Europe & International", "url": "etat-europe-et-international" }, { "title": "Habitat & Écologie", "url": "habitat-ecologie" }, { "title": "Santé & Social", "url": "sante-social" }, { "title": "Société", "url": "societe" }, { "title": "Territoires", "url": "territoires" } ]
[ { "title": "Culture", "url": "{group}/culture" }, { "title": "Economie & Travail", "url": "{group}/economie-travail" }, { "title": "Éducation & Recherche", "url": "{group}/education-et-recherche" }, { "title": "État, Europe & International", "url": "{group}/etat-europe-et-international" }, { "title": "Habitat & Écologie", "url": "{group}/habitat-ecologie" }, { "title": "Santé & Social", "url": "{group}/sante-social" }, { "title": "Société", "url": "{group}/societe" }, { "title": "Territoires", "url": "{group}/territoires" } ]
Include url prefix (either {group} or {wiki}
Include url prefix (either {group} or {wiki}
JSON
agpl-3.0
etalab/etalab-assets
json
## Code Before: [ { "title": "Culture", "url": "culture" }, { "title": "Economie & Travail", "url": "economie-travail" }, { "title": "Éducation & Recherche", "url": "education-et-recherche" }, { "title": "État, Europe & International", "url": "etat-europe-et-international" }, { "title": "Habitat & Écologie", "url": "habitat-ecologie" }, { "title": "Santé & Social", "url": "sante-social" }, { "title": "Société", "url": "societe" }, { "title": "Territoires", "url": "territoires" } ] ## Instruction: Include url prefix (either {group} or {wiki} ## Code After: [ { "title": "Culture", "url": "{group}/culture" }, { "title": "Economie & Travail", "url": "{group}/economie-travail" }, { "title": "Éducation & Recherche", "url": "{group}/education-et-recherche" }, { "title": "État, Europe & International", "url": "{group}/etat-europe-et-international" }, { "title": "Habitat & Écologie", "url": "{group}/habitat-ecologie" }, { "title": "Santé & Social", "url": "{group}/sante-social" }, { "title": "Société", "url": "{group}/societe" }, { "title": "Territoires", "url": "{group}/territoires" } ]
6ccd4bc210966fd4347082c419109678e14d5a92
blender/CMakeLists.txt
blender/CMakeLists.txt
set(INC ../render ../device ../kernel ../kernel/svm ../util ../subd ../../guardedalloc ../../mikktspace ../../../source/blender/makesdna ../../../source/blender/makesrna ../../../source/blender/blenlib ${CMAKE_BINARY_DIR}/source/blender/makesrna/intern ) set(INC_SYS ${PYTHON_INCLUDE_DIRS} ${GLEW_INCLUDE_PATH} ) set(SRC blender_camera.cpp blender_mesh.cpp blender_object.cpp blender_particles.cpp blender_curves.cpp blender_python.cpp blender_session.cpp blender_shader.cpp blender_sync.cpp CCL_api.h blender_sync.h blender_session.h blender_util.h ) set(ADDON_FILES addon/__init__.py addon/engine.py addon/osl.py addon/presets.py addon/properties.py addon/ui.py ) blender_add_lib(bf_intern_cycles "${SRC}" "${INC}" "${INC_SYS}") add_dependencies(bf_intern_cycles bf_rna) delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${ADDON_FILES}" ${CYCLES_INSTALL_PATH})
set(INC ../render ../device ../kernel ../kernel/svm ../util ../subd ../../guardedalloc ../../mikktspace ../../../source/blender/makesdna ../../../source/blender/makesrna ../../../source/blender/blenlib ${CMAKE_BINARY_DIR}/source/blender/makesrna/intern ) set(INC_SYS ${PYTHON_INCLUDE_DIRS} ${GLEW_INCLUDE_PATH} ) set(SRC blender_camera.cpp blender_mesh.cpp blender_object.cpp blender_particles.cpp blender_curves.cpp blender_python.cpp blender_session.cpp blender_shader.cpp blender_sync.cpp CCL_api.h blender_sync.h blender_session.h blender_util.h ) set(ADDON_FILES addon/__init__.py addon/engine.py addon/osl.py addon/presets.py addon/properties.py addon/ui.py ) add_definitions(-DGLEW_STATIC) blender_add_lib(bf_intern_cycles "${SRC}" "${INC}" "${INC_SYS}") add_dependencies(bf_intern_cycles bf_rna) delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${ADDON_FILES}" ${CYCLES_INSTALL_PATH})
Add GLEW_STATIC definition for CMake as well.
Add GLEW_STATIC definition for CMake as well.
Text
apache-2.0
tangent-opensource/coreBlackbird,pyrochlore/cycles,pyrochlore/cycles,pyrochlore/cycles,tangent-opensource/coreBlackbird,tangent-opensource/coreBlackbird
text
## Code Before: set(INC ../render ../device ../kernel ../kernel/svm ../util ../subd ../../guardedalloc ../../mikktspace ../../../source/blender/makesdna ../../../source/blender/makesrna ../../../source/blender/blenlib ${CMAKE_BINARY_DIR}/source/blender/makesrna/intern ) set(INC_SYS ${PYTHON_INCLUDE_DIRS} ${GLEW_INCLUDE_PATH} ) set(SRC blender_camera.cpp blender_mesh.cpp blender_object.cpp blender_particles.cpp blender_curves.cpp blender_python.cpp blender_session.cpp blender_shader.cpp blender_sync.cpp CCL_api.h blender_sync.h blender_session.h blender_util.h ) set(ADDON_FILES addon/__init__.py addon/engine.py addon/osl.py addon/presets.py addon/properties.py addon/ui.py ) blender_add_lib(bf_intern_cycles "${SRC}" "${INC}" "${INC_SYS}") add_dependencies(bf_intern_cycles bf_rna) delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${ADDON_FILES}" ${CYCLES_INSTALL_PATH}) ## Instruction: Add GLEW_STATIC definition for CMake as well. ## Code After: set(INC ../render ../device ../kernel ../kernel/svm ../util ../subd ../../guardedalloc ../../mikktspace ../../../source/blender/makesdna ../../../source/blender/makesrna ../../../source/blender/blenlib ${CMAKE_BINARY_DIR}/source/blender/makesrna/intern ) set(INC_SYS ${PYTHON_INCLUDE_DIRS} ${GLEW_INCLUDE_PATH} ) set(SRC blender_camera.cpp blender_mesh.cpp blender_object.cpp blender_particles.cpp blender_curves.cpp blender_python.cpp blender_session.cpp blender_shader.cpp blender_sync.cpp CCL_api.h blender_sync.h blender_session.h blender_util.h ) set(ADDON_FILES addon/__init__.py addon/engine.py addon/osl.py addon/presets.py addon/properties.py addon/ui.py ) add_definitions(-DGLEW_STATIC) blender_add_lib(bf_intern_cycles "${SRC}" "${INC}" "${INC_SYS}") add_dependencies(bf_intern_cycles bf_rna) delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${ADDON_FILES}" ${CYCLES_INSTALL_PATH})
fe1ea08a709a290702b9a252a37b999b2dac1063
app/views/course/assessment/question/programming/_form_test_cases.html.slim
app/views/course/assessment/question/programming/_form_test_cases.html.slim
- public_test_cases = test_cases.select(&:public_test?) - private_test_cases = test_cases.select(&:private_test?) - evaluation_test_cases = test_cases.select(&:evaluation_test?) h2 = t('.test_cases') table.table.table-striped.table-hover thead tr th = t('.identifier') th = t('.expression') th = t('.expected') th = t('.hint') tbody tr th colspan=4 = t('.public') - public_test_cases.each do |test_case| = content_tag_for(:tr, test_case) do th = test_case.identifier td = test_case.expression td = test_case.expected td = test_case.hint tbody tr th colspan=4 = t('.private') - private_test_cases.each do |test_case| = content_tag_for(:tr, test_case) do th = test_case.identifier td = test_case.expression td = test_case.expected td = test_case.hint td tbody tr th colspan=4 = t('.evaluation') - evaluation_test_cases.each do |test_case| = content_tag_for(:tr, test_case) do th = test_case.identifier td = test_case.expression td = test_case.expected td = test_case.hint td
- public_test_cases = test_cases.select(&:public_test?) - private_test_cases = test_cases.select(&:private_test?) - evaluation_test_cases = test_cases.select(&:evaluation_test?) h2 = t('.test_cases') table.table.table-striped.table-hover thead tr th = t('.identifier') th = t('.expression') th = t('.expected') th = t('.hint') tbody tr th colspan=4 = t('.public') - public_test_cases.each do |test_case| = content_tag_for(:tr, test_case) do th = test_case.identifier td = test_case.expression td div.expected = test_case.expected td = test_case.hint tbody tr th colspan=4 = t('.private') - private_test_cases.each do |test_case| = content_tag_for(:tr, test_case) do th = test_case.identifier td = test_case.expression td div.expected = test_case.expected td = test_case.hint td tbody tr th colspan=4 = t('.evaluation') - evaluation_test_cases.each do |test_case| = content_tag_for(:tr, test_case) do th = test_case.identifier td = test_case.expression td div.expected = test_case.expected td = test_case.hint td
Apply expected div to test case question form.
Apply expected div to test case question form. Allows the expected value of the test cases on the question edit form to be shortened.
Slim
mit
Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,cysjonathan/coursemology2,cysjonathan/coursemology2,cysjonathan/coursemology2
slim
## Code Before: - public_test_cases = test_cases.select(&:public_test?) - private_test_cases = test_cases.select(&:private_test?) - evaluation_test_cases = test_cases.select(&:evaluation_test?) h2 = t('.test_cases') table.table.table-striped.table-hover thead tr th = t('.identifier') th = t('.expression') th = t('.expected') th = t('.hint') tbody tr th colspan=4 = t('.public') - public_test_cases.each do |test_case| = content_tag_for(:tr, test_case) do th = test_case.identifier td = test_case.expression td = test_case.expected td = test_case.hint tbody tr th colspan=4 = t('.private') - private_test_cases.each do |test_case| = content_tag_for(:tr, test_case) do th = test_case.identifier td = test_case.expression td = test_case.expected td = test_case.hint td tbody tr th colspan=4 = t('.evaluation') - evaluation_test_cases.each do |test_case| = content_tag_for(:tr, test_case) do th = test_case.identifier td = test_case.expression td = test_case.expected td = test_case.hint td ## Instruction: Apply expected div to test case question form. Allows the expected value of the test cases on the question edit form to be shortened. ## Code After: - public_test_cases = test_cases.select(&:public_test?) - private_test_cases = test_cases.select(&:private_test?) - evaluation_test_cases = test_cases.select(&:evaluation_test?) h2 = t('.test_cases') table.table.table-striped.table-hover thead tr th = t('.identifier') th = t('.expression') th = t('.expected') th = t('.hint') tbody tr th colspan=4 = t('.public') - public_test_cases.each do |test_case| = content_tag_for(:tr, test_case) do th = test_case.identifier td = test_case.expression td div.expected = test_case.expected td = test_case.hint tbody tr th colspan=4 = t('.private') - private_test_cases.each do |test_case| = content_tag_for(:tr, test_case) do th = test_case.identifier td = test_case.expression td div.expected = test_case.expected td = test_case.hint td tbody tr th colspan=4 = t('.evaluation') - evaluation_test_cases.each do |test_case| = content_tag_for(:tr, test_case) do th = test_case.identifier td = test_case.expression td div.expected = test_case.expected td = test_case.hint td
12fc327a90f7ff6dcb372728270a6275215bb52a
gulpfile.js
gulpfile.js
var gulp = require('gulp'), istanbul = require('gulp-istanbul'), jasmine = require('gulp-jasmine'), jshint = require('gulp-jshint'), plumber = require('gulp-plumber'); var paths = { src: ['index.js'], test: ['spec/**/*.spec.js'], coverage: './coverage' }; gulp.task('lint', function() { return gulp.src([__filename].concat(paths.src).concat(paths.test)) .pipe(plumber()) .pipe(jshint()) .pipe(jshint.reporter('jshint-stylish')); }); gulp.task('test', function() { return gulp.src(paths.test) .pipe(plumber()) .pipe(jasmine({ verbose: true, includeStackTrace: true })); }); gulp.task('coverage', function(cb) { return gulp.src(paths.src) .pipe(plumber()) .pipe(istanbul()) .on('finish', function() { gulp.src(paths.test) .pipe(jasmine()) .pipe(istanbul.writeReports({ dir: paths.coverage, reporters: ['lcov', 'text-summary'] })) .on('end', cb); }); }); gulp.task('watch', function() { gulp.watch(paths.src, [ 'lint', 'test', ]); }); gulp.task('default', [ 'lint', 'coverage', ]);
var gulp = require('gulp'), istanbul = require('gulp-istanbul'), jasmine = require('gulp-jasmine'), jshint = require('gulp-jshint'), plumber = require('gulp-plumber'); var paths = { src: ['index.js'], test: ['spec/**/*.spec.js'], coverage: './coverage' }; gulp.task('lint', function() { return gulp.src([__filename].concat(paths.src).concat(paths.test)) .pipe(plumber()) .pipe(jshint()) .pipe(jshint.reporter('jshint-stylish')); }); gulp.task('test', function() { return gulp.src(paths.test) .pipe(plumber()) .pipe(jasmine({ verbose: true, includeStackTrace: true })); }); gulp.task('coverage', function() { return gulp.src(paths.src) .pipe(plumber()) .pipe(istanbul()) .on('finish', function() { gulp.src(paths.test) .pipe(jasmine()) .pipe(istanbul.writeReports({ dir: paths.coverage, reporters: ['lcov', 'text-summary'] })); }); }); gulp.task('watch', function() { gulp.watch(paths.src, [ 'lint', 'test', ]); }); gulp.task('default', [ 'lint', 'coverage', ]);
Remove task completion callback from the `coverage` task
Remove task completion callback from the `coverage` task
JavaScript
mit
yuanqing/mitch
javascript
## Code Before: var gulp = require('gulp'), istanbul = require('gulp-istanbul'), jasmine = require('gulp-jasmine'), jshint = require('gulp-jshint'), plumber = require('gulp-plumber'); var paths = { src: ['index.js'], test: ['spec/**/*.spec.js'], coverage: './coverage' }; gulp.task('lint', function() { return gulp.src([__filename].concat(paths.src).concat(paths.test)) .pipe(plumber()) .pipe(jshint()) .pipe(jshint.reporter('jshint-stylish')); }); gulp.task('test', function() { return gulp.src(paths.test) .pipe(plumber()) .pipe(jasmine({ verbose: true, includeStackTrace: true })); }); gulp.task('coverage', function(cb) { return gulp.src(paths.src) .pipe(plumber()) .pipe(istanbul()) .on('finish', function() { gulp.src(paths.test) .pipe(jasmine()) .pipe(istanbul.writeReports({ dir: paths.coverage, reporters: ['lcov', 'text-summary'] })) .on('end', cb); }); }); gulp.task('watch', function() { gulp.watch(paths.src, [ 'lint', 'test', ]); }); gulp.task('default', [ 'lint', 'coverage', ]); ## Instruction: Remove task completion callback from the `coverage` task ## Code After: var gulp = require('gulp'), istanbul = require('gulp-istanbul'), jasmine = require('gulp-jasmine'), jshint = require('gulp-jshint'), plumber = require('gulp-plumber'); var paths = { src: ['index.js'], test: ['spec/**/*.spec.js'], coverage: './coverage' }; gulp.task('lint', function() { return gulp.src([__filename].concat(paths.src).concat(paths.test)) .pipe(plumber()) .pipe(jshint()) .pipe(jshint.reporter('jshint-stylish')); }); gulp.task('test', function() { return gulp.src(paths.test) .pipe(plumber()) .pipe(jasmine({ verbose: true, includeStackTrace: true })); }); gulp.task('coverage', function() { return gulp.src(paths.src) .pipe(plumber()) .pipe(istanbul()) .on('finish', function() { gulp.src(paths.test) .pipe(jasmine()) .pipe(istanbul.writeReports({ dir: paths.coverage, reporters: ['lcov', 'text-summary'] })); }); }); gulp.task('watch', function() { gulp.watch(paths.src, [ 'lint', 'test', ]); }); gulp.task('default', [ 'lint', 'coverage', ]);
463359038908a85f8624483473b29fe720050c06
lib/markdown.js
lib/markdown.js
/* globals atom:false */ 'use strict'; exports.provideBuilder = function () { return { niceName: 'Markdown', isEligable: function () { var textEditor = atom.workspace.getActiveTextEditor(); if (!textEditor || !textEditor.getPath()) { return false; } var path = textEditor.getPath(); return path.endsWith('.md') || path.endsWith('.mkd'); }, settings: function () { return [ { name: 'Markdown: view', exec: 'mark', args: [ '{FILE_ACTIVE}' ] }]; } }; };
/* globals atom:false */ 'use strict'; exports.provideBuilder = function () { return { niceName: 'Markdown', isEligable: function () { var textEditor = atom.workspace.getActiveTextEditor(); if (!textEditor || !textEditor.getPath()) { return false; } var path = textEditor.getPath(); return path.endsWith('.md') || path.endsWith('.mkd'); }, settings: function () { return [ { name: 'Markdown: view', exec: 'open', args: [ '-a', 'Marked.app', '{FILE_ACTIVE}' ] }]; } }; };
Use `open` to find Marked.app, because of path problems finding the `mark` command.
Use `open` to find Marked.app, because of path problems finding the `mark` command.
JavaScript
mpl-2.0
bwinton/atom-build-markdown
javascript
## Code Before: /* globals atom:false */ 'use strict'; exports.provideBuilder = function () { return { niceName: 'Markdown', isEligable: function () { var textEditor = atom.workspace.getActiveTextEditor(); if (!textEditor || !textEditor.getPath()) { return false; } var path = textEditor.getPath(); return path.endsWith('.md') || path.endsWith('.mkd'); }, settings: function () { return [ { name: 'Markdown: view', exec: 'mark', args: [ '{FILE_ACTIVE}' ] }]; } }; }; ## Instruction: Use `open` to find Marked.app, because of path problems finding the `mark` command. ## Code After: /* globals atom:false */ 'use strict'; exports.provideBuilder = function () { return { niceName: 'Markdown', isEligable: function () { var textEditor = atom.workspace.getActiveTextEditor(); if (!textEditor || !textEditor.getPath()) { return false; } var path = textEditor.getPath(); return path.endsWith('.md') || path.endsWith('.mkd'); }, settings: function () { return [ { name: 'Markdown: view', exec: 'open', args: [ '-a', 'Marked.app', '{FILE_ACTIVE}' ] }]; } }; };
e0525e140bddc9f3a4d4071bf725d69260e8ae85
src/main/java/de/prob2/ui/states/ClassBlacklist.java
src/main/java/de/prob2/ui/states/ClassBlacklist.java
package de.prob2.ui.states; import java.util.HashSet; import com.google.inject.Inject; import com.google.inject.Singleton; import com.sun.javafx.collections.ObservableSetWrapper; import de.prob.model.representation.AbstractElement; import javafx.collections.ObservableSet; @Singleton public class ClassBlacklist { private final ObservableSet<Class<? extends AbstractElement>> blacklist; private final ObservableSet<Class<? extends AbstractElement>> knownClasses; @Inject private ClassBlacklist() { super(); this.blacklist = new ObservableSetWrapper<>(new HashSet<>()); this.knownClasses = new ObservableSetWrapper<>(new HashSet<>()); } public ObservableSet<Class<? extends AbstractElement>> getBlacklist() { return this.blacklist; } public ObservableSet<Class<? extends AbstractElement>> getKnownClasses() { return this.knownClasses; } }
package de.prob2.ui.states; import com.google.inject.Inject; import com.google.inject.Singleton; import de.prob.model.representation.AbstractElement; import javafx.collections.FXCollections; import javafx.collections.ObservableSet; @Singleton public final class ClassBlacklist { private final ObservableSet<Class<? extends AbstractElement>> blacklist; private final ObservableSet<Class<? extends AbstractElement>> knownClasses; @Inject @SuppressWarnings("unchecked") private ClassBlacklist() { super(); this.blacklist = FXCollections.observableSet(); this.knownClasses = FXCollections.observableSet(); } public ObservableSet<Class<? extends AbstractElement>> getBlacklist() { return this.blacklist; } public ObservableSet<Class<? extends AbstractElement>> getKnownClasses() { return this.knownClasses; } }
Replace use of com.sun ObservableSetWrapper with FXCollections
Replace use of com.sun ObservableSetWrapper with FXCollections
Java
epl-1.0
bendisposto/prob2-ui,bendisposto/prob2-ui,bendisposto/prob2-ui,bendisposto/prob2-ui
java
## Code Before: package de.prob2.ui.states; import java.util.HashSet; import com.google.inject.Inject; import com.google.inject.Singleton; import com.sun.javafx.collections.ObservableSetWrapper; import de.prob.model.representation.AbstractElement; import javafx.collections.ObservableSet; @Singleton public class ClassBlacklist { private final ObservableSet<Class<? extends AbstractElement>> blacklist; private final ObservableSet<Class<? extends AbstractElement>> knownClasses; @Inject private ClassBlacklist() { super(); this.blacklist = new ObservableSetWrapper<>(new HashSet<>()); this.knownClasses = new ObservableSetWrapper<>(new HashSet<>()); } public ObservableSet<Class<? extends AbstractElement>> getBlacklist() { return this.blacklist; } public ObservableSet<Class<? extends AbstractElement>> getKnownClasses() { return this.knownClasses; } } ## Instruction: Replace use of com.sun ObservableSetWrapper with FXCollections ## Code After: package de.prob2.ui.states; import com.google.inject.Inject; import com.google.inject.Singleton; import de.prob.model.representation.AbstractElement; import javafx.collections.FXCollections; import javafx.collections.ObservableSet; @Singleton public final class ClassBlacklist { private final ObservableSet<Class<? extends AbstractElement>> blacklist; private final ObservableSet<Class<? extends AbstractElement>> knownClasses; @Inject @SuppressWarnings("unchecked") private ClassBlacklist() { super(); this.blacklist = FXCollections.observableSet(); this.knownClasses = FXCollections.observableSet(); } public ObservableSet<Class<? extends AbstractElement>> getBlacklist() { return this.blacklist; } public ObservableSet<Class<? extends AbstractElement>> getKnownClasses() { return this.knownClasses; } }
49ad1e4378f81738f8ed59ab94dc603c4d5c1938
webpack.config.js
webpack.config.js
const path = require("path"); module.exports = { entry: path.resolve(__dirname, "./source/index.js"), externals: { buttercup: "buttercup" }, module: { rules : [ { test: /\.(js|esm)$/, use: { loader: "babel-loader", options: { "presets": [ ["@babel/preset-env", { "corejs": 3, "useBuiltIns": "entry", "targets": { "node": "6" } }] ], "plugins": [ ["@babel/plugin-proposal-object-rest-spread", { "useBuiltIns": true }] ] } } } ] }, output: { filename: "buttercup-importer.js", libraryTarget: "commonjs2", path: path.resolve(__dirname, "./dist") }, target: "node" };
const path = require("path"); module.exports = { entry: path.resolve(__dirname, "./source/index.js"), externals: { argon2: "argon2", buttercup: "buttercup", kdbxweb: "kdbxweb" }, module: { rules : [ { test: /\.(js|esm)$/, use: { loader: "babel-loader", options: { "presets": [ ["@babel/preset-env", { "corejs": 3, "useBuiltIns": "entry", "targets": { "node": "6" } }] ], "plugins": [ ["@babel/plugin-proposal-object-rest-spread", { "useBuiltIns": true }] ] } } } ] }, output: { filename: "buttercup-importer.js", libraryTarget: "commonjs2", path: path.resolve(__dirname, "./dist") }, target: "node" };
Split dependencies out in webpack to reduce bundle size
Split dependencies out in webpack to reduce bundle size
JavaScript
mit
perry-mitchell/buttercup-importer
javascript
## Code Before: const path = require("path"); module.exports = { entry: path.resolve(__dirname, "./source/index.js"), externals: { buttercup: "buttercup" }, module: { rules : [ { test: /\.(js|esm)$/, use: { loader: "babel-loader", options: { "presets": [ ["@babel/preset-env", { "corejs": 3, "useBuiltIns": "entry", "targets": { "node": "6" } }] ], "plugins": [ ["@babel/plugin-proposal-object-rest-spread", { "useBuiltIns": true }] ] } } } ] }, output: { filename: "buttercup-importer.js", libraryTarget: "commonjs2", path: path.resolve(__dirname, "./dist") }, target: "node" }; ## Instruction: Split dependencies out in webpack to reduce bundle size ## Code After: const path = require("path"); module.exports = { entry: path.resolve(__dirname, "./source/index.js"), externals: { argon2: "argon2", buttercup: "buttercup", kdbxweb: "kdbxweb" }, module: { rules : [ { test: /\.(js|esm)$/, use: { loader: "babel-loader", options: { "presets": [ ["@babel/preset-env", { "corejs": 3, "useBuiltIns": "entry", "targets": { "node": "6" } }] ], "plugins": [ ["@babel/plugin-proposal-object-rest-spread", { "useBuiltIns": true }] ] } } } ] }, output: { filename: "buttercup-importer.js", libraryTarget: "commonjs2", path: path.resolve(__dirname, "./dist") }, target: "node" };
2210f88687219f2b5d1d92731d6a7aaa9ba25c8b
_layouts/post.html
_layouts/post.html
--- layout: default --- <article class="post"> <h1 class="post-title">{{ page.title }}</h1> <time datetime="{{ page.date | date_to_xmlschema }}" class="post-date">{{ page.date | date_to_string }}</time> {{ content }} </article> {% include comments.html %}
--- layout: default --- <article class="post"> <h1 class="post-title">{{ page.title }}</h1> <time datetime="{{ page.date | date_to_xmlschema }}" class="post-date">{{ page.date | date_to_string }}</time> {{ content }} </article> <div id="page-navigation"> <div class="clear">&nbsp;</div> <div class="left"> {% if page.previous.url %} <a href="{{page.previous.url}}" title="Previous Post: {{page.previous.title}}">&laquo; {{page.previous.title}}</a> {% endif %} </div> <div class="right"> {% if page.next.url %} <a href="{{page.next.url}}" title="next Post: {{page.next.title}}">{{page.next.title}} &raquo; </a> {% endif %} </div> <div class="clear">&nbsp;</div> </div> {% include comments.html %}
Add next and previous links
Add next and previous links
HTML
mit
reducingwip/reducingwip.github.io,reducingwip/reducingwip.github.io
html
## Code Before: --- layout: default --- <article class="post"> <h1 class="post-title">{{ page.title }}</h1> <time datetime="{{ page.date | date_to_xmlschema }}" class="post-date">{{ page.date | date_to_string }}</time> {{ content }} </article> {% include comments.html %} ## Instruction: Add next and previous links ## Code After: --- layout: default --- <article class="post"> <h1 class="post-title">{{ page.title }}</h1> <time datetime="{{ page.date | date_to_xmlschema }}" class="post-date">{{ page.date | date_to_string }}</time> {{ content }} </article> <div id="page-navigation"> <div class="clear">&nbsp;</div> <div class="left"> {% if page.previous.url %} <a href="{{page.previous.url}}" title="Previous Post: {{page.previous.title}}">&laquo; {{page.previous.title}}</a> {% endif %} </div> <div class="right"> {% if page.next.url %} <a href="{{page.next.url}}" title="next Post: {{page.next.title}}">{{page.next.title}} &raquo; </a> {% endif %} </div> <div class="clear">&nbsp;</div> </div> {% include comments.html %}
2c53233bfe77601c6fc0a4a50226d5641709863a
lib/data_mapper/relationship/one_to_many.rb
lib/data_mapper/relationship/one_to_many.rb
module DataMapper class Relationship class OneToMany < self module Iterator # Iterate over the loaded domain objects # # TODO: refactor this and add support for multi-include # # @see Mapper::Relation#each # # @example # # DataMapper[Person].include(:tasks).each do |person| # person.tasks.each do |task| # puts task.name # end # end # # @yield [object] the loaded domain objects # # @yieldparam [Object] object # the loaded domain object that is yielded # # @return [self] # # @api public def each return to_enum unless block_given? tuples = @relation.to_a parent_key = @attributes.key name = @attributes.detect { |attribute| attribute.kind_of?(Mapper::Attribute::EmbeddedCollection) }.name parents = tuples.each_with_object({}) do |tuple, hash| key = parent_key.map { |attribute| tuple[attribute.field] } hash[key] = @attributes.primitives.each_with_object({}) { |attribute, parent| parent[attribute.field] = tuple[attribute.field] } end parents.each do |key, parent| parent[name] = tuples.map do |tuple| current_key = parent_key.map { |attribute| tuple[attribute.field] } if key == current_key tuple end end.compact end parents.each_value { |parent| yield(load(parent)) } self end end # module Iterator # Returns if the relationship has collection target # # @return [Boolean] # # @api private def collection_target? true end # @see Options#default_source_key # def default_source_key :id end # @see Options#default_target_key # def default_target_key self.class.foreign_key_name(source_model.name) end end # class OneToMany end # class Relationship end # module DataMapper
module DataMapper class Relationship class OneToMany < self # Returns if the relationship has collection target # # @return [Boolean] # # @api private def collection_target? true end # @see Options#default_source_key # def default_source_key :id end # @see Options#default_target_key # def default_target_key self.class.foreign_key_name(source_model.name) end end # class OneToMany end # class Relationship end # module DataMapper
Remove Iterator from OneToMany since it was moved to a separate file
Remove Iterator from OneToMany since it was moved to a separate file
Ruby
mit
cored/rom,pvcarrera/rom,denyago/rom,endash/rom,pdswan/rom,dcarral/rom,pxlpnk/rom,dekz/rom,rom-rb/rom,rom-rb/rom,Snuff/rom,jeremyf/rom,vrish88/rom,kwando/rom,rom-rb/rom
ruby
## Code Before: module DataMapper class Relationship class OneToMany < self module Iterator # Iterate over the loaded domain objects # # TODO: refactor this and add support for multi-include # # @see Mapper::Relation#each # # @example # # DataMapper[Person].include(:tasks).each do |person| # person.tasks.each do |task| # puts task.name # end # end # # @yield [object] the loaded domain objects # # @yieldparam [Object] object # the loaded domain object that is yielded # # @return [self] # # @api public def each return to_enum unless block_given? tuples = @relation.to_a parent_key = @attributes.key name = @attributes.detect { |attribute| attribute.kind_of?(Mapper::Attribute::EmbeddedCollection) }.name parents = tuples.each_with_object({}) do |tuple, hash| key = parent_key.map { |attribute| tuple[attribute.field] } hash[key] = @attributes.primitives.each_with_object({}) { |attribute, parent| parent[attribute.field] = tuple[attribute.field] } end parents.each do |key, parent| parent[name] = tuples.map do |tuple| current_key = parent_key.map { |attribute| tuple[attribute.field] } if key == current_key tuple end end.compact end parents.each_value { |parent| yield(load(parent)) } self end end # module Iterator # Returns if the relationship has collection target # # @return [Boolean] # # @api private def collection_target? true end # @see Options#default_source_key # def default_source_key :id end # @see Options#default_target_key # def default_target_key self.class.foreign_key_name(source_model.name) end end # class OneToMany end # class Relationship end # module DataMapper ## Instruction: Remove Iterator from OneToMany since it was moved to a separate file ## Code After: module DataMapper class Relationship class OneToMany < self # Returns if the relationship has collection target # # @return [Boolean] # # @api private def collection_target? true end # @see Options#default_source_key # def default_source_key :id end # @see Options#default_target_key # def default_target_key self.class.foreign_key_name(source_model.name) end end # class OneToMany end # class Relationship end # module DataMapper
0d815d9386dce4406bff727fe8f9b82f247485aa
config/passport-jwt-config.js
config/passport-jwt-config.js
'use strict'; const Passport = require('passport'); const JwtStrategy = require('passport-jwt').Strategy; const ExtractJwt = require('passport-jwt').ExtractJwt; const SecurityConfig = require('./security-config'); const User = require('../models/user'); const CustomErrors = require('../helpers/custom-errors'); module.exports = function() { const opts = {}; opts.jwtFromRequest = ExtractJwt.fromAuthHeader(); opts.secretOrKey = SecurityConfig.jwtSecret; Passport.use(new JwtStrategy(opts, function(jwt_payload, done) { User.where('id', jwt_payload.id).refresh({ withRelated: 'role' }) .then(user => user ? done(null, user) : done(null, false)) .catch(err => done(err, false)); })); };
'use strict'; const Passport = require('passport'); const JwtStrategy = require('passport-jwt').Strategy; const ExtractJwt = require('passport-jwt').ExtractJwt; const SecurityConfig = require('./security-config'); const User = require('../models/user'); module.exports = function() { const opts = {}; opts.jwtFromRequest = ExtractJwt.fromAuthHeader(); opts.secretOrKey = SecurityConfig.jwtSecret; Passport.use(new JwtStrategy(opts, function(jwt_payload, done) { User.where('id', jwt_payload.id).refresh({ withRelated: 'role' }) .then(user => user ? done(null, user) : done(null, false)) .catch(err => done(err, false)); })); };
Remove useless CustomErrors from passport config
Remove useless CustomErrors from passport config
JavaScript
mit
IlalaSwinGolf/sg_api
javascript
## Code Before: 'use strict'; const Passport = require('passport'); const JwtStrategy = require('passport-jwt').Strategy; const ExtractJwt = require('passport-jwt').ExtractJwt; const SecurityConfig = require('./security-config'); const User = require('../models/user'); const CustomErrors = require('../helpers/custom-errors'); module.exports = function() { const opts = {}; opts.jwtFromRequest = ExtractJwt.fromAuthHeader(); opts.secretOrKey = SecurityConfig.jwtSecret; Passport.use(new JwtStrategy(opts, function(jwt_payload, done) { User.where('id', jwt_payload.id).refresh({ withRelated: 'role' }) .then(user => user ? done(null, user) : done(null, false)) .catch(err => done(err, false)); })); }; ## Instruction: Remove useless CustomErrors from passport config ## Code After: 'use strict'; const Passport = require('passport'); const JwtStrategy = require('passport-jwt').Strategy; const ExtractJwt = require('passport-jwt').ExtractJwt; const SecurityConfig = require('./security-config'); const User = require('../models/user'); module.exports = function() { const opts = {}; opts.jwtFromRequest = ExtractJwt.fromAuthHeader(); opts.secretOrKey = SecurityConfig.jwtSecret; Passport.use(new JwtStrategy(opts, function(jwt_payload, done) { User.where('id', jwt_payload.id).refresh({ withRelated: 'role' }) .then(user => user ? done(null, user) : done(null, false)) .catch(err => done(err, false)); })); };
34c257a9053fb68677a94ba0dcbbe99838379844
db/migrate/20101108134714_add_generation_to_stops.rb
db/migrate/20101108134714_add_generation_to_stops.rb
class AddGenerationToStops < ActiveRecord::Migration def self.up add_column :stops, :generation_high, :integer add_column :stops, :generation_low, :integer end def self.down remove_column :stops, :generation end end
class AddGenerationToStops < ActiveRecord::Migration def self.up add_column :stops, :generation_high, :integer add_column :stops, :generation_low, :integer end def self.down remove_column :stops, :generation_low remove_column :stops, :generation_high end end
Fix down method to match up.
Fix down method to match up.
Ruby
agpl-3.0
mysociety/fixmytransport,mysociety/fixmytransport,mysociety/fixmytransport,mysociety/fixmytransport,mysociety/fixmytransport,mysociety/fixmytransport
ruby
## Code Before: class AddGenerationToStops < ActiveRecord::Migration def self.up add_column :stops, :generation_high, :integer add_column :stops, :generation_low, :integer end def self.down remove_column :stops, :generation end end ## Instruction: Fix down method to match up. ## Code After: class AddGenerationToStops < ActiveRecord::Migration def self.up add_column :stops, :generation_high, :integer add_column :stops, :generation_low, :integer end def self.down remove_column :stops, :generation_low remove_column :stops, :generation_high end end
bd50f1db3fc4a8da919a9ff52eac4f32ec9ec966
components/font_icon/index.jsx
components/font_icon/index.jsx
/* global React */ import { addons } from 'react/addons'; import style from './style'; import CSSModules from 'react-css-modules'; const FontIcon = React.createClass({ mixins: [addons.PureRenderMixin], displayName: 'FontIcon', propTypes: { className: React.PropTypes.string, value: React.PropTypes.string }, getDefaultProps () { return { className: '' }; }, onClick (event) { if (this.props.onClick) { this.props.onClick(event); } }, render () { return ( <span data-toolbox='icon' className={this.props.className} styleName={this.props.value} onClick={this.props.onClick} /> ); } }); export default CSSModules(FontIcon, style);
/* global React */ import { addons } from 'react/addons'; import style from './style'; export default React.createClass({ mixins: [addons.PureRenderMixin], displayName: 'FontIcon', propTypes: { className: React.PropTypes.string, value: React.PropTypes.string }, getDefaultProps () { return { className: '' }; }, onClick (event) { if (this.props.onClick) { this.props.onClick(event); } }, render () { let className = style[this.props.value]; if (this.props.className) className += ` ${this.props.className}`; return <span data-toolbox='icon' className={className} onClick={this.props.onClick} />; } });
Remove react css modules from font ico
Remove react css modules from font ico
JSX
mit
jasonleibowitz/react-toolbox,showings/react-toolbox,showings/react-toolbox,KerenChandran/react-toolbox,rubenmoya/react-toolbox,rubenmoya/react-toolbox,react-toolbox/react-toolbox,react-toolbox/react-toolbox,jasonleibowitz/react-toolbox,Magneticmagnum/react-atlas,rubenmoya/react-toolbox,react-toolbox/react-toolbox,soyjavi/react-toolbox,soyjavi/react-toolbox,DigitalRiver/react-atlas,KerenChandran/react-toolbox
jsx
## Code Before: /* global React */ import { addons } from 'react/addons'; import style from './style'; import CSSModules from 'react-css-modules'; const FontIcon = React.createClass({ mixins: [addons.PureRenderMixin], displayName: 'FontIcon', propTypes: { className: React.PropTypes.string, value: React.PropTypes.string }, getDefaultProps () { return { className: '' }; }, onClick (event) { if (this.props.onClick) { this.props.onClick(event); } }, render () { return ( <span data-toolbox='icon' className={this.props.className} styleName={this.props.value} onClick={this.props.onClick} /> ); } }); export default CSSModules(FontIcon, style); ## Instruction: Remove react css modules from font ico ## Code After: /* global React */ import { addons } from 'react/addons'; import style from './style'; export default React.createClass({ mixins: [addons.PureRenderMixin], displayName: 'FontIcon', propTypes: { className: React.PropTypes.string, value: React.PropTypes.string }, getDefaultProps () { return { className: '' }; }, onClick (event) { if (this.props.onClick) { this.props.onClick(event); } }, render () { let className = style[this.props.value]; if (this.props.className) className += ` ${this.props.className}`; return <span data-toolbox='icon' className={className} onClick={this.props.onClick} />; } });
c774414e1486450a965dee7c1dd2e40f1cd6cf15
appveyor.yml
appveyor.yml
version: 1.0.{build}+{branch} branches: except: - gh-pages image: Visual Studio 2017 before_build: - nuget restore - npm install
version: 1.0.{build}+{branch} branches: except: - gh-pages image: Visual Studio 2017 before_build: - nuget restore - cd "src/seriView" && npm install
Change Path for npm install
Change Path for npm install
YAML
mit
SebastianLng/SerilogMSSqlLogViewer,SebastianLng/SerilogMSSqlLogViewer,SebastianLng/SerilogMSSqlLogViewer
yaml
## Code Before: version: 1.0.{build}+{branch} branches: except: - gh-pages image: Visual Studio 2017 before_build: - nuget restore - npm install ## Instruction: Change Path for npm install ## Code After: version: 1.0.{build}+{branch} branches: except: - gh-pages image: Visual Studio 2017 before_build: - nuget restore - cd "src/seriView" && npm install
906d60089dbe6b263ae55d91ba73d6b6e41ebbb5
api/admin.py
api/admin.py
from django.contrib import admin from .models import MaintenanceRecord, UserPreferences @admin.register(UserPreferences) class UserPreferencesAdmin(admin.ModelAdmin): list_display = ["user", "show_beta_interface", "airport_ui", "created_date", "modified_date"] list_filter = [ "show_beta_interface", "airport_ui", ] # Register your models here. admin.site.register(MaintenanceRecord)
from django.contrib import admin from .models import MaintenanceRecord, UserPreferences, HelpLink @admin.register(UserPreferences) class UserPreferencesAdmin(admin.ModelAdmin): list_display = ["user", "show_beta_interface", "airport_ui", "created_date", "modified_date"] list_filter = [ "show_beta_interface", "airport_ui", ] @admin.register(HelpLink) class HelpLinkAdmin(admin.ModelAdmin): actions = None # disable the `delete selected` action list_display = ["link_key", "topic", "context", "href"] def get_readonly_fields(self, request, obj=None): if obj: # editing an existing object return self.readonly_fields + ("link_key", ) return self.readonly_fields def has_add_permission(self, request): return False def has_delete_permission(self, request, obj=None): return False # Register your models here. admin.site.register(MaintenanceRecord)
Add entire in Admin for managing HelpLink
Add entire in Admin for managing HelpLink An admin can _only_ modify the hyperlink associated with a HelpLink. As a consequence, you cannot add new instances of the model nor delete them. Only the existing HelpLinks can be modified because their inclusion (or existence) is dependent upon the usage within the UI. If one *must* do something to add or delete or override what is allowed via Django Admin, they will _need_ database/SQL level access given this current implementation. See ATMO-1230 & ATMO-1270 for more context.
Python
apache-2.0
CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend
python
## Code Before: from django.contrib import admin from .models import MaintenanceRecord, UserPreferences @admin.register(UserPreferences) class UserPreferencesAdmin(admin.ModelAdmin): list_display = ["user", "show_beta_interface", "airport_ui", "created_date", "modified_date"] list_filter = [ "show_beta_interface", "airport_ui", ] # Register your models here. admin.site.register(MaintenanceRecord) ## Instruction: Add entire in Admin for managing HelpLink An admin can _only_ modify the hyperlink associated with a HelpLink. As a consequence, you cannot add new instances of the model nor delete them. Only the existing HelpLinks can be modified because their inclusion (or existence) is dependent upon the usage within the UI. If one *must* do something to add or delete or override what is allowed via Django Admin, they will _need_ database/SQL level access given this current implementation. See ATMO-1230 & ATMO-1270 for more context. ## Code After: from django.contrib import admin from .models import MaintenanceRecord, UserPreferences, HelpLink @admin.register(UserPreferences) class UserPreferencesAdmin(admin.ModelAdmin): list_display = ["user", "show_beta_interface", "airport_ui", "created_date", "modified_date"] list_filter = [ "show_beta_interface", "airport_ui", ] @admin.register(HelpLink) class HelpLinkAdmin(admin.ModelAdmin): actions = None # disable the `delete selected` action list_display = ["link_key", "topic", "context", "href"] def get_readonly_fields(self, request, obj=None): if obj: # editing an existing object return self.readonly_fields + ("link_key", ) return self.readonly_fields def has_add_permission(self, request): return False def has_delete_permission(self, request, obj=None): return False # Register your models here. admin.site.register(MaintenanceRecord)
b541846e3bf608cd17b596be05bf6b62c93c94ec
src/themes/apex/toolgroups/MenuToolgroup.less
src/themes/apex/toolgroups/MenuToolgroup.less
.oo-ui-menuToolGroup { border-color: rgba(0,0,0,0.1); &.oo-ui-widget-enabled { &:hover { border-color: rgba(0,0,0,0.2); } } &.oo-ui-popupToolGroup-active { border-color: rgba(0,0,0,0.25); } .oo-ui-tool { &.oo-ui-widget-enabled { &:hover { background-color: #e1f3ff; } } &.oo-ui-widget-disabled { .oo-ui-tool-link .oo-ui-tool-title { color: #ccc; } .oo-ui-tool-link .oo-ui-iconedElement-icon { opacity: 0.2; } } } &.oo-ui-widget-disabled { color: #ccc; text-shadow: 0 1px 1px #fff; border-color: #ddd; background-color: #f3f3f3; .oo-ui-indicatedElement-indicator, .oo-ui-iconedElement-icon { opacity: 0.2; } } }
.oo-ui-menuToolGroup { border-color: rgba(0,0,0,0.1); &.oo-ui-widget-enabled { &:hover { border-color: rgba(0,0,0,0.2); } } &.oo-ui-popupToolGroup-active { border-color: rgba(0,0,0,0.25); } .oo-ui-tool { &.oo-ui-widget-enabled { &:hover { background-color: #e1f3ff; } } &.oo-ui-widget-disabled { .oo-ui-tool-link .oo-ui-tool-title { color: #ccc; } .oo-ui-tool-link .oo-ui-iconedElement-icon { opacity: 0.2; } } } &.oo-ui-widget-disabled { color: #ccc; text-shadow: 0 1px 1px #fff; border-color: rgba(0,0,0,0.05); .oo-ui-indicatedElement-indicator, .oo-ui-iconedElement-icon { opacity: 0.2; } } }
Remove grey background from disabled MenuToolgrop in apex
Remove grey background from disabled MenuToolgrop in apex Also use transparency on border, like enabled state. Change-Id: I7bd77de49745fc54568810fe1a9cefa942805fb6
Less
mit
wikimedia/oojs-ui,wikimedia/oojs-ui,wikimedia/oojs-ui,wikimedia/oojs-ui
less
## Code Before: .oo-ui-menuToolGroup { border-color: rgba(0,0,0,0.1); &.oo-ui-widget-enabled { &:hover { border-color: rgba(0,0,0,0.2); } } &.oo-ui-popupToolGroup-active { border-color: rgba(0,0,0,0.25); } .oo-ui-tool { &.oo-ui-widget-enabled { &:hover { background-color: #e1f3ff; } } &.oo-ui-widget-disabled { .oo-ui-tool-link .oo-ui-tool-title { color: #ccc; } .oo-ui-tool-link .oo-ui-iconedElement-icon { opacity: 0.2; } } } &.oo-ui-widget-disabled { color: #ccc; text-shadow: 0 1px 1px #fff; border-color: #ddd; background-color: #f3f3f3; .oo-ui-indicatedElement-indicator, .oo-ui-iconedElement-icon { opacity: 0.2; } } } ## Instruction: Remove grey background from disabled MenuToolgrop in apex Also use transparency on border, like enabled state. Change-Id: I7bd77de49745fc54568810fe1a9cefa942805fb6 ## Code After: .oo-ui-menuToolGroup { border-color: rgba(0,0,0,0.1); &.oo-ui-widget-enabled { &:hover { border-color: rgba(0,0,0,0.2); } } &.oo-ui-popupToolGroup-active { border-color: rgba(0,0,0,0.25); } .oo-ui-tool { &.oo-ui-widget-enabled { &:hover { background-color: #e1f3ff; } } &.oo-ui-widget-disabled { .oo-ui-tool-link .oo-ui-tool-title { color: #ccc; } .oo-ui-tool-link .oo-ui-iconedElement-icon { opacity: 0.2; } } } &.oo-ui-widget-disabled { color: #ccc; text-shadow: 0 1px 1px #fff; border-color: rgba(0,0,0,0.05); .oo-ui-indicatedElement-indicator, .oo-ui-iconedElement-icon { opacity: 0.2; } } }
b6f361870410774ff41f7de25fa9a2e1e637f0ca
tenets/codelingo/code-review-comments/context-first-arg/codelingo.yaml
tenets/codelingo/code-review-comments/context-first-arg/codelingo.yaml
tenets: - name: context-first-arg flows: codelingo/docs: title: Context as First Argument body: | Values of the context.Context type carry security credentials, tracing information, deadlines, and cancellation signals across API and process boundaries. Go programs pass Contexts explicitly along the entire function call chain from incoming RPCs and HTTP requests to outgoing requests. Most functions that use a Context should accept it as their first parameter. codelingo/review: comment: | Most functions that use a Context should accept it as their first parameter. Consider moving Context to the front. query: | import codelingo/ast/go go.field_list(depth = any): sibling_order == 0 go.field: go.names: go.ident @review comment go.selector_expr: go.ident: name == "context" go.ident: name == "Context"
tenets: - name: context-first-arg flows: codelingo/docs: title: Context as First Argument body: | Values of the context.Context type carry security credentials, tracing information, deadlines, and cancellation signals across API and process boundaries. Go programs pass Contexts explicitly along the entire function call chain from incoming RPCs and HTTP requests to outgoing requests. Most functions that use a Context should accept it as their first parameter. codelingo/review: comment: | Most functions that use a Context should accept it as their first parameter. Consider moving Context to the front. query: | import codelingo/ast/go go.field_list(depth = any): sibling_order == 0 go.field: sibling_order == 0 go.names: go.ident @review comment go.selector_expr: go.ident: name == "context" go.ident: name == "Context"
Exclude first param in list as it is valid
Exclude first param in list as it is valid
YAML
agpl-3.0
lingo-reviews/lingo,lingo-reviews/lingo
yaml
## Code Before: tenets: - name: context-first-arg flows: codelingo/docs: title: Context as First Argument body: | Values of the context.Context type carry security credentials, tracing information, deadlines, and cancellation signals across API and process boundaries. Go programs pass Contexts explicitly along the entire function call chain from incoming RPCs and HTTP requests to outgoing requests. Most functions that use a Context should accept it as their first parameter. codelingo/review: comment: | Most functions that use a Context should accept it as their first parameter. Consider moving Context to the front. query: | import codelingo/ast/go go.field_list(depth = any): sibling_order == 0 go.field: go.names: go.ident @review comment go.selector_expr: go.ident: name == "context" go.ident: name == "Context" ## Instruction: Exclude first param in list as it is valid ## Code After: tenets: - name: context-first-arg flows: codelingo/docs: title: Context as First Argument body: | Values of the context.Context type carry security credentials, tracing information, deadlines, and cancellation signals across API and process boundaries. Go programs pass Contexts explicitly along the entire function call chain from incoming RPCs and HTTP requests to outgoing requests. Most functions that use a Context should accept it as their first parameter. codelingo/review: comment: | Most functions that use a Context should accept it as their first parameter. Consider moving Context to the front. query: | import codelingo/ast/go go.field_list(depth = any): sibling_order == 0 go.field: sibling_order == 0 go.names: go.ident @review comment go.selector_expr: go.ident: name == "context" go.ident: name == "Context"
6ccec05a0ae4d6e0c65d8791ed6666a4c559446e
angularjs-rails.gemspec
angularjs-rails.gemspec
require File.expand_path('../lib/angularjs-rails/version', __FILE__) Gem::Specification.new do |s| s.name = 'angularjs-rails' s.version = AngularJS::Rails::VERSION s.date = '2013-09-06' s.summary = 'Angular.js on Rails' s.description = 'Injects Angular.js into your asset pipeline as well as other Angular modules.' s.authors = ["Hirav Gandhi"] s.email = '[email protected]' s.files = Dir["{lib,vendor}/**/*"] + ["MIT-LICENSE", "README.md"] s.homepage = 'https://github.com/hiravgandhi/angularjs-rails/' s.license = 'MIT' s.add_development_dependency 'rake' s.add_development_dependency 'versionomy' end
require File.expand_path('../lib/angularjs-rails/version', __FILE__) Gem::Specification.new do |s| s.name = 'angularjs-rails' s.version = AngularJS::Rails::VERSION s.date = '2013-09-06' s.summary = 'Angular.js on Rails' s.description = 'Injects Angular.js into your asset pipeline as well as other Angular modules.' s.authors = ["Hirav Gandhi"] s.email = '[email protected]' s.files = Dir["{lib,vendor}/**/*"] + ["MIT-LICENSE", "README.md"] s.homepage = 'https://github.com/hiravgandhi/angularjs-rails/' s.license = 'MIT' s.add_development_dependency 'rake' s.add_development_dependency 'versionomy' s.add_development_dependency 'nokogiri' end
Add forgotten dev dependency. Needed for updater to work.
Add forgotten dev dependency. Needed for updater to work.
Ruby
mit
jedisct1/angularjs-rails,hiravgandhi/angularjs-rails,nbrookie/angularjs-rails
ruby
## Code Before: require File.expand_path('../lib/angularjs-rails/version', __FILE__) Gem::Specification.new do |s| s.name = 'angularjs-rails' s.version = AngularJS::Rails::VERSION s.date = '2013-09-06' s.summary = 'Angular.js on Rails' s.description = 'Injects Angular.js into your asset pipeline as well as other Angular modules.' s.authors = ["Hirav Gandhi"] s.email = '[email protected]' s.files = Dir["{lib,vendor}/**/*"] + ["MIT-LICENSE", "README.md"] s.homepage = 'https://github.com/hiravgandhi/angularjs-rails/' s.license = 'MIT' s.add_development_dependency 'rake' s.add_development_dependency 'versionomy' end ## Instruction: Add forgotten dev dependency. Needed for updater to work. ## Code After: require File.expand_path('../lib/angularjs-rails/version', __FILE__) Gem::Specification.new do |s| s.name = 'angularjs-rails' s.version = AngularJS::Rails::VERSION s.date = '2013-09-06' s.summary = 'Angular.js on Rails' s.description = 'Injects Angular.js into your asset pipeline as well as other Angular modules.' s.authors = ["Hirav Gandhi"] s.email = '[email protected]' s.files = Dir["{lib,vendor}/**/*"] + ["MIT-LICENSE", "README.md"] s.homepage = 'https://github.com/hiravgandhi/angularjs-rails/' s.license = 'MIT' s.add_development_dependency 'rake' s.add_development_dependency 'versionomy' s.add_development_dependency 'nokogiri' end
6805b5e5d39b2d0268690817ad65ac0d9451c0bc
tool/_upversion.sh
tool/_upversion.sh
MAJOR=$1 MINOR=$2 PATCH=$3 HOTFIX=$4 cd $OLDPWD "$(dirname "${BASH_SOURCE}")" readonly CURRENT_BRANCH=`git rev-parse --abbrev-ref HEAD` readonly SERVER_ALIAS="origin" if [[ "$CURRENT_BRANCH" != "master" ]]; then >&2 echo "Update version is available only for master branch." exit 1 fi current_version=`sh version.sh` pattern='([[:digit:]]*)\.([[:digit:]]*)\.([[:digit:]]*)$' if [[ "$current_version" != "" ]]; then if [[ "$current_version" =~ $pattern ]]; then major="${BASH_REMATCH[1]}" minor="${BASH_REMATCH[2]}" patch="${BASH_REMATCH[3]}" major=$((MAJOR+major)) minor=$((MINOR+minor)) patch=$((PATCH+patch)) version="$major.$minor.$patch" if [[ MAJOR -ne 0 ]] || [[ MINOR -ne 0 ]] || [[ PATCH -ne 0 ]]; then echo "Next version: v$version" # Update pubspec. sed -i '' "s/^version:.*/version: $version/g" "./../pubspec.yaml" && echo "Updated v$current_version => v$version" sh ./_pushversion.sh current_version fi fi else >&2 echo "Error occurred. Please set first version in your pubspec." fi
MAJOR=$1 MINOR=$2 PATCH=$3 HOTFIX=$4 cd $OLDPWD "$(dirname "${BASH_SOURCE}")" readonly CURRENT_BRANCH=`git rev-parse --abbrev-ref HEAD` readonly SERVER_ALIAS="origin" if [[ "$CURRENT_BRANCH" != "master" ]]; then >&2 echo "Update version is available only for master branch." exit 1 fi current_version=`sh version.sh` pattern='([[:digit:]]*)\.([[:digit:]]*)\.([[:digit:]]*)$' if [[ "$current_version" != "" ]]; then if [[ "$current_version" =~ $pattern ]]; then major="${BASH_REMATCH[1]}" minor="${BASH_REMATCH[2]}" patch="${BASH_REMATCH[3]}" major=$((MAJOR+major)) minor=$((MINOR+minor)) patch=$((PATCH+patch)) version="$major.$minor.$patch" if [[ MAJOR -ne 0 ]] || [[ MINOR -ne 0 ]] || [[ PATCH -ne 0 ]]; then # Update pubspec. sed -i '' "s/^version:.*/version: $version/g" "./../pubspec.yaml" && echo "Updated v$current_version => v$version" sh ./_pushversion.sh $current_version fi fi else >&2 echo "Error occurred. Please set first version in your pubspec." fi
Fix stdout message on up version
Fix stdout message on up version
Shell
bsd-3-clause
AndyTyurin/ose,AndyTyurin/ose,AndyTyurin/ose
shell
## Code Before: MAJOR=$1 MINOR=$2 PATCH=$3 HOTFIX=$4 cd $OLDPWD "$(dirname "${BASH_SOURCE}")" readonly CURRENT_BRANCH=`git rev-parse --abbrev-ref HEAD` readonly SERVER_ALIAS="origin" if [[ "$CURRENT_BRANCH" != "master" ]]; then >&2 echo "Update version is available only for master branch." exit 1 fi current_version=`sh version.sh` pattern='([[:digit:]]*)\.([[:digit:]]*)\.([[:digit:]]*)$' if [[ "$current_version" != "" ]]; then if [[ "$current_version" =~ $pattern ]]; then major="${BASH_REMATCH[1]}" minor="${BASH_REMATCH[2]}" patch="${BASH_REMATCH[3]}" major=$((MAJOR+major)) minor=$((MINOR+minor)) patch=$((PATCH+patch)) version="$major.$minor.$patch" if [[ MAJOR -ne 0 ]] || [[ MINOR -ne 0 ]] || [[ PATCH -ne 0 ]]; then echo "Next version: v$version" # Update pubspec. sed -i '' "s/^version:.*/version: $version/g" "./../pubspec.yaml" && echo "Updated v$current_version => v$version" sh ./_pushversion.sh current_version fi fi else >&2 echo "Error occurred. Please set first version in your pubspec." fi ## Instruction: Fix stdout message on up version ## Code After: MAJOR=$1 MINOR=$2 PATCH=$3 HOTFIX=$4 cd $OLDPWD "$(dirname "${BASH_SOURCE}")" readonly CURRENT_BRANCH=`git rev-parse --abbrev-ref HEAD` readonly SERVER_ALIAS="origin" if [[ "$CURRENT_BRANCH" != "master" ]]; then >&2 echo "Update version is available only for master branch." exit 1 fi current_version=`sh version.sh` pattern='([[:digit:]]*)\.([[:digit:]]*)\.([[:digit:]]*)$' if [[ "$current_version" != "" ]]; then if [[ "$current_version" =~ $pattern ]]; then major="${BASH_REMATCH[1]}" minor="${BASH_REMATCH[2]}" patch="${BASH_REMATCH[3]}" major=$((MAJOR+major)) minor=$((MINOR+minor)) patch=$((PATCH+patch)) version="$major.$minor.$patch" if [[ MAJOR -ne 0 ]] || [[ MINOR -ne 0 ]] || [[ PATCH -ne 0 ]]; then # Update pubspec. sed -i '' "s/^version:.*/version: $version/g" "./../pubspec.yaml" && echo "Updated v$current_version => v$version" sh ./_pushversion.sh $current_version fi fi else >&2 echo "Error occurred. Please set first version in your pubspec." fi
56415d857b49a427736679050a0b59cddbbfb65f
index.js
index.js
'use strict' const driver = require('node-phantom-simple') function genPromiseFunc(originalFunc) { return function () { const _args = Array.prototype.slice.call(arguments) const _this = this return new Promise(function (resolve, reject) { _args.push(function () { const _args2 = Array.prototype.slice.call(arguments) const err = _args2.shift() if (err) { reject(err) } else { const _arg3 = _args2.map(function (arg) { return promisifyAll(arg) }) resolve.apply(null, _arg3) } }) originalFunc.apply(_this, _args) }) } } function promisifyAll(target) { if (typeof target !== 'object' || Array.isArray(target)) { return target } const promisifiedTarget = {} for (let targetPropName of Object.keys(target)) { if (typeof target[targetPropName] !== 'function') { promisifiedTarget[targetPropName] = target[targetPropName] continue } promisifiedTarget[targetPropName] = genPromiseFunc(target[targetPropName]) } return promisifiedTarget } return promisifyAll(driver)
'use strict' const driver = require('node-phantom-simple') function genPromiseFunc(originalFunc) { return function () { const _args = Array.prototype.slice.call(arguments) const _this = this return new Promise(function (resolve, reject) { _args.push(function () { const _args2 = Array.prototype.slice.call(arguments) const err = _args2.shift() if (err) { reject(err) } else { const _arg3 = _args2.map(function (arg) { return promisifyAll(arg) }) resolve.apply(null, _arg3) } }) originalFunc.apply(_this, _args) }) } } function promisifyAll(target) { if (typeof target !== 'object' || Array.isArray(target)) { return target } const promisifiedTarget = {} for (let targetPropName of Object.keys(target)) { if (typeof target[targetPropName] !== 'function') { promisifiedTarget[targetPropName] = target[targetPropName] continue } promisifiedTarget[targetPropName] = genPromiseFunc(target[targetPropName]) } return promisifiedTarget } module.exports = promisifyAll(driver)
Use module.exports instead of return
Use module.exports instead of return
JavaScript
mit
foray1010/node-phantom-promise
javascript
## Code Before: 'use strict' const driver = require('node-phantom-simple') function genPromiseFunc(originalFunc) { return function () { const _args = Array.prototype.slice.call(arguments) const _this = this return new Promise(function (resolve, reject) { _args.push(function () { const _args2 = Array.prototype.slice.call(arguments) const err = _args2.shift() if (err) { reject(err) } else { const _arg3 = _args2.map(function (arg) { return promisifyAll(arg) }) resolve.apply(null, _arg3) } }) originalFunc.apply(_this, _args) }) } } function promisifyAll(target) { if (typeof target !== 'object' || Array.isArray(target)) { return target } const promisifiedTarget = {} for (let targetPropName of Object.keys(target)) { if (typeof target[targetPropName] !== 'function') { promisifiedTarget[targetPropName] = target[targetPropName] continue } promisifiedTarget[targetPropName] = genPromiseFunc(target[targetPropName]) } return promisifiedTarget } return promisifyAll(driver) ## Instruction: Use module.exports instead of return ## Code After: 'use strict' const driver = require('node-phantom-simple') function genPromiseFunc(originalFunc) { return function () { const _args = Array.prototype.slice.call(arguments) const _this = this return new Promise(function (resolve, reject) { _args.push(function () { const _args2 = Array.prototype.slice.call(arguments) const err = _args2.shift() if (err) { reject(err) } else { const _arg3 = _args2.map(function (arg) { return promisifyAll(arg) }) resolve.apply(null, _arg3) } }) originalFunc.apply(_this, _args) }) } } function promisifyAll(target) { if (typeof target !== 'object' || Array.isArray(target)) { return target } const promisifiedTarget = {} for (let targetPropName of Object.keys(target)) { if (typeof target[targetPropName] !== 'function') { promisifiedTarget[targetPropName] = target[targetPropName] continue } promisifiedTarget[targetPropName] = genPromiseFunc(target[targetPropName]) } return promisifiedTarget } module.exports = promisifyAll(driver)
1ee42d314c26c5d5f25146ecb2979f19e3b5cc5e
templates/blog/_post_tags.html.twig
templates/blog/_post_tags.html.twig
{% if not post.tags.empty %} <p class="post-tags"> {% for tag in post.tags %} <a href="{{ path('blog_index', {'tag': tag.name}) }}" class="label label-{{ tag.name == app.request.query.get('tag') ? 'success' : 'default' }}" > <i class="fa fa-tag"></i> {{ tag.name }} </a> {% endfor %} </p> {% endif %}
{% if not post.tags.empty %} <p class="post-tags"> {% for tag in post.tags %} <a href="{{ path('blog_index', {'tag': tag.name == app.request.query.get('tag') ? null : tag.name}) }}" class="label label-{{ tag.name == app.request.query.get('tag') ? 'success' : 'default' }}" > <i class="fa fa-tag"></i> {{ tag.name }} </a> {% endfor %} </p> {% endif %}
Reset tag filter if it's link was clicked again
Reset tag filter if it's link was clicked again
Twig
mit
TomasVotruba/symfony-demo,javiereguiluz/symfony-demo,symfony/symfony-demo,Codeception/symfony-demo,javiereguiluz/symfony-demo,Codeception/symfony-demo,voronkovich/symfony-demo,symfony/symfony-demo,javiereguiluz/symfony-demo,voronkovich/symfony-demo,yceruto/symfony-demo,Codeception/symfony-demo,yceruto/symfony-demo,bocharsky-bw/symfony-demo,symfony/symfony-demo,TomasVotruba/symfony-demo,bocharsky-bw/symfony-demo,TomasVotruba/symfony-demo,yceruto/symfony-demo,bocharsky-bw/symfony-demo,voronkovich/symfony-demo
twig
## Code Before: {% if not post.tags.empty %} <p class="post-tags"> {% for tag in post.tags %} <a href="{{ path('blog_index', {'tag': tag.name}) }}" class="label label-{{ tag.name == app.request.query.get('tag') ? 'success' : 'default' }}" > <i class="fa fa-tag"></i> {{ tag.name }} </a> {% endfor %} </p> {% endif %} ## Instruction: Reset tag filter if it's link was clicked again ## Code After: {% if not post.tags.empty %} <p class="post-tags"> {% for tag in post.tags %} <a href="{{ path('blog_index', {'tag': tag.name == app.request.query.get('tag') ? null : tag.name}) }}" class="label label-{{ tag.name == app.request.query.get('tag') ? 'success' : 'default' }}" > <i class="fa fa-tag"></i> {{ tag.name }} </a> {% endfor %} </p> {% endif %}
774fb9f3a435a2e28c29237bfc743d59f7b7d881
setup/setup_dotfiles.sh
setup/setup_dotfiles.sh
set -u BASH_ALIASES=~/.bash_aliases if [ ! -f $BASH_ALIASES ]; then cat > $BASH_ALIASES <<EOF alias ll='ls -l' alias lla='ls -la' alias la='ls -A' alias l='ls -CF' alias rt='ls -lsrta' CDPATH="." for dir in \\ /home/pi/ \\ /home/pi/develop \\ /home/pi/develop/raspi_code/ \\ /home/pi/develop/raspi_code/hardware/ \\ /home/pi/develop/raspi_code/programming/ ; do if [ ! -d "\$dir" ]; then continue fi CDPATH="\$CDPATH:\$dir" done EOF fi
set -u # to force this script to run: # \rm ~/.bash_aliases # ./setup_dotfiles.sh # . ~/.bash_aliases BASH_ALIASES=~/.bash_aliases if [ ! -f $BASH_ALIASES ]; then cat > $BASH_ALIASES <<EOF alias ll='ls -l' alias lla='ls -la' alias la='ls -A' alias l='ls -CF' alias rt='ls -lsrta' alias gstat='for dir in * ; do cd $dir; git status; echo $dir; echo " " ; cd ..; done' alias gdiff='for dir in * ; do cd $dir; git status; echo $dir; echo " " ; cd ..; done' CDPATH="." for dir in \\ /home/pi/ \\ /home/pi/develop \\ /home/pi/develop/raspi_code/ \\ /home/pi/develop/raspi_code/hardware/ \\ /home/pi/develop/raspi_code/programming/ ; do if [ ! -d "\$dir" ]; then continue fi CDPATH="\$CDPATH:\$dir" done EOF fi
Add some git aliases and some comments
Add some git aliases and some comments
Shell
mit
claremacrae/raspi_code,claremacrae/raspi_code,claremacrae/raspi_code
shell
## Code Before: set -u BASH_ALIASES=~/.bash_aliases if [ ! -f $BASH_ALIASES ]; then cat > $BASH_ALIASES <<EOF alias ll='ls -l' alias lla='ls -la' alias la='ls -A' alias l='ls -CF' alias rt='ls -lsrta' CDPATH="." for dir in \\ /home/pi/ \\ /home/pi/develop \\ /home/pi/develop/raspi_code/ \\ /home/pi/develop/raspi_code/hardware/ \\ /home/pi/develop/raspi_code/programming/ ; do if [ ! -d "\$dir" ]; then continue fi CDPATH="\$CDPATH:\$dir" done EOF fi ## Instruction: Add some git aliases and some comments ## Code After: set -u # to force this script to run: # \rm ~/.bash_aliases # ./setup_dotfiles.sh # . ~/.bash_aliases BASH_ALIASES=~/.bash_aliases if [ ! -f $BASH_ALIASES ]; then cat > $BASH_ALIASES <<EOF alias ll='ls -l' alias lla='ls -la' alias la='ls -A' alias l='ls -CF' alias rt='ls -lsrta' alias gstat='for dir in * ; do cd $dir; git status; echo $dir; echo " " ; cd ..; done' alias gdiff='for dir in * ; do cd $dir; git status; echo $dir; echo " " ; cd ..; done' CDPATH="." for dir in \\ /home/pi/ \\ /home/pi/develop \\ /home/pi/develop/raspi_code/ \\ /home/pi/develop/raspi_code/hardware/ \\ /home/pi/develop/raspi_code/programming/ ; do if [ ! -d "\$dir" ]; then continue fi CDPATH="\$CDPATH:\$dir" done EOF fi
a41c8b8f9d3901e8d2794981c6cec050bf086e92
conjureup/controllers/clouds/common.py
conjureup/controllers/clouds/common.py
import asyncio from juju.utils import run_with_interrupt from conjureup import events from conjureup.models.provider import LocalhostError, LocalhostJSONError class BaseCloudController: cancel_monitor = asyncio.Event() async def _monitor_localhost(self, provider, cb): """ Checks that localhost/lxd is available and listening, updates widget accordingly """ while not self.cancel_monitor.is_set(): try: compatible = await provider.is_server_compatible() if compatible: events.LXDAvailable.set() self.cancel_monitor.set() cb() return except (LocalhostError, LocalhostJSONError): provider._set_lxd_dir_env() except FileNotFoundError: pass await run_with_interrupt(asyncio.sleep(2), self.cancel_monitor)
import asyncio from juju.utils import run_with_interrupt from conjureup import events from conjureup.models.provider import LocalhostError, LocalhostJSONError class BaseCloudController: cancel_monitor = asyncio.Event() async def _monitor_localhost(self, provider, cb): """ Checks that localhost/lxd is available and listening, updates widget accordingly """ while not self.cancel_monitor.is_set(): try: provider._set_lxd_dir_env() compatible = await provider.is_server_compatible() if compatible: events.LXDAvailable.set() self.cancel_monitor.set() cb() return except (LocalhostError, LocalhostJSONError, FileNotFoundError): pass await run_with_interrupt(asyncio.sleep(2), self.cancel_monitor)
Make sure _set_lxd_dir_env is always called in monitor loop
Make sure _set_lxd_dir_env is always called in monitor loop Signed-off-by: Adam Stokes <49c255c1d074742f60d19fdba5e2aa5a34add567@users.noreply.github.com>
Python
mit
Ubuntu-Solutions-Engineering/conjure,ubuntu/conjure-up,ubuntu/conjure-up,conjure-up/conjure-up,Ubuntu-Solutions-Engineering/conjure,conjure-up/conjure-up
python
## Code Before: import asyncio from juju.utils import run_with_interrupt from conjureup import events from conjureup.models.provider import LocalhostError, LocalhostJSONError class BaseCloudController: cancel_monitor = asyncio.Event() async def _monitor_localhost(self, provider, cb): """ Checks that localhost/lxd is available and listening, updates widget accordingly """ while not self.cancel_monitor.is_set(): try: compatible = await provider.is_server_compatible() if compatible: events.LXDAvailable.set() self.cancel_monitor.set() cb() return except (LocalhostError, LocalhostJSONError): provider._set_lxd_dir_env() except FileNotFoundError: pass await run_with_interrupt(asyncio.sleep(2), self.cancel_monitor) ## Instruction: Make sure _set_lxd_dir_env is always called in monitor loop Signed-off-by: Adam Stokes <49c255c1d074742f60d19fdba5e2aa5a34add567@users.noreply.github.com> ## Code After: import asyncio from juju.utils import run_with_interrupt from conjureup import events from conjureup.models.provider import LocalhostError, LocalhostJSONError class BaseCloudController: cancel_monitor = asyncio.Event() async def _monitor_localhost(self, provider, cb): """ Checks that localhost/lxd is available and listening, updates widget accordingly """ while not self.cancel_monitor.is_set(): try: provider._set_lxd_dir_env() compatible = await provider.is_server_compatible() if compatible: events.LXDAvailable.set() self.cancel_monitor.set() cb() return except (LocalhostError, LocalhostJSONError, FileNotFoundError): pass await run_with_interrupt(asyncio.sleep(2), self.cancel_monitor)
1f1d294a1a5a467554d873b4c076d79fbf7b42fb
Sources/FluentTester/Tester+InsertAndFind.swift
Sources/FluentTester/Tester+InsertAndFind.swift
extension Tester { public func testInsertAndFind() throws { Atom.database = database try Atom.prepare(database) defer { try! Atom.revert(database) } let hydrogen = Atom(id: "asdf", name: "Hydrogen", protons: 1, weight: 1.007) guard hydrogen.exists == false else { throw Error.failed("Exists should be false since not yet saved.") } try hydrogen.save() guard hydrogen.id?.string == "asdf" else { throw Error.failed("Saved ID not equal to set id.") } guard hydrogen.exists == true else { throw Error.failed("Exists should be true since just saved.") } guard let id = hydrogen.id else { throw Error.failed("ID not set on Atom after save.") } guard let found = try Atom.find(id) else { throw Error.failed("Could not find Atom by id.") } guard hydrogen.id == found.id else { throw Error.failed("ID retrieved different than what was saved.") } guard hydrogen.name == found.name else { throw Error.failed("Name retrieved different than what was saved.") } guard hydrogen.protons == found.protons else { throw Error.failed("Protons retrieved different than what was saved.") } guard hydrogen.weight == found.weight else { throw Error.failed("Weight retrieved different than what was saved.") } } }
extension Tester { public func testInsertAndFind() throws { Atom.database = database try Atom.prepare(database) defer { try! Atom.revert(database) } let uuid = UUID() let hydrogen = Atom(id: Identifier(uuid.uuidString), name: "Hydrogen", protons: 1, weight: 1.007) guard hydrogen.exists == false else { throw Error.failed("Exists should be false since not yet saved.") } try hydrogen.save() guard hydrogen.id?.string?.lowercased() == uuid.uuidString.lowercased() else { throw Error.failed("Saved ID not equal to set id.") } guard hydrogen.exists == true else { throw Error.failed("Exists should be true since just saved.") } guard let id = hydrogen.id else { throw Error.failed("ID not set on Atom after save.") } guard let found = try Atom.find(id) else { throw Error.failed("Could not find Atom by id.") } guard hydrogen.id == found.id else { throw Error.failed("ID retrieved different than what was saved.") } guard hydrogen.name == found.name else { throw Error.failed("Name retrieved different than what was saved.") } guard hydrogen.protons == found.protons else { throw Error.failed("Protons retrieved different than what was saved.") } guard hydrogen.weight == found.weight else { throw Error.failed("Weight retrieved different than what was saved.") } } }
Use valid UUID for insert-and-fix
Use valid UUID for insert-and-fix Postgres – unlike MySQL – actually validates the UUIDs sent as values, so the tests of postgresql-driver were silently broken by the Fluent 2.0.1 release. This commit fixes the test by using a valid UUID instead of just `"asdf"`. I noticed that PG returns UUID fields as all lowercase, so I changed the comparison to be case insensitive. (It shouldn't be a problem as we're talking about the string representation of an otherwise fixed binary entity and the hex numbers still match.)
Swift
mit
qutheory/fluent,vapor/fluent
swift
## Code Before: extension Tester { public func testInsertAndFind() throws { Atom.database = database try Atom.prepare(database) defer { try! Atom.revert(database) } let hydrogen = Atom(id: "asdf", name: "Hydrogen", protons: 1, weight: 1.007) guard hydrogen.exists == false else { throw Error.failed("Exists should be false since not yet saved.") } try hydrogen.save() guard hydrogen.id?.string == "asdf" else { throw Error.failed("Saved ID not equal to set id.") } guard hydrogen.exists == true else { throw Error.failed("Exists should be true since just saved.") } guard let id = hydrogen.id else { throw Error.failed("ID not set on Atom after save.") } guard let found = try Atom.find(id) else { throw Error.failed("Could not find Atom by id.") } guard hydrogen.id == found.id else { throw Error.failed("ID retrieved different than what was saved.") } guard hydrogen.name == found.name else { throw Error.failed("Name retrieved different than what was saved.") } guard hydrogen.protons == found.protons else { throw Error.failed("Protons retrieved different than what was saved.") } guard hydrogen.weight == found.weight else { throw Error.failed("Weight retrieved different than what was saved.") } } } ## Instruction: Use valid UUID for insert-and-fix Postgres – unlike MySQL – actually validates the UUIDs sent as values, so the tests of postgresql-driver were silently broken by the Fluent 2.0.1 release. This commit fixes the test by using a valid UUID instead of just `"asdf"`. I noticed that PG returns UUID fields as all lowercase, so I changed the comparison to be case insensitive. (It shouldn't be a problem as we're talking about the string representation of an otherwise fixed binary entity and the hex numbers still match.) ## Code After: extension Tester { public func testInsertAndFind() throws { Atom.database = database try Atom.prepare(database) defer { try! Atom.revert(database) } let uuid = UUID() let hydrogen = Atom(id: Identifier(uuid.uuidString), name: "Hydrogen", protons: 1, weight: 1.007) guard hydrogen.exists == false else { throw Error.failed("Exists should be false since not yet saved.") } try hydrogen.save() guard hydrogen.id?.string?.lowercased() == uuid.uuidString.lowercased() else { throw Error.failed("Saved ID not equal to set id.") } guard hydrogen.exists == true else { throw Error.failed("Exists should be true since just saved.") } guard let id = hydrogen.id else { throw Error.failed("ID not set on Atom after save.") } guard let found = try Atom.find(id) else { throw Error.failed("Could not find Atom by id.") } guard hydrogen.id == found.id else { throw Error.failed("ID retrieved different than what was saved.") } guard hydrogen.name == found.name else { throw Error.failed("Name retrieved different than what was saved.") } guard hydrogen.protons == found.protons else { throw Error.failed("Protons retrieved different than what was saved.") } guard hydrogen.weight == found.weight else { throw Error.failed("Weight retrieved different than what was saved.") } } }
115f43890213cb3ae22e87fed8a30ab724a04c28
spec/commands/deploy_spec.rb
spec/commands/deploy_spec.rb
describe "Invoking the 'vh' command in a project" do before :each do Dir.chdir root('test_env') end describe "to do a simulated deploy" do before :each do vh 'deploy', 'simulate=1' end it "should take care of the lockfile" do stdout.should =~ /ERROR: another deployment is ongoing/ stdout.should =~ /touch ".*deploy\.lock"/ stdout.should =~ /rm -f ".*deploy\.lock"/ end it "should honor releases_path" do stdout.should include "#{Dir.pwd}/deploy/releases" end it "should symlink the current_path" do stdout.should =~ /ln .*current/ end it "should include deploy directives" do stdout.should include "bundle exec rake db:migrate" end it "should include 'to :restart' directives" do stdout.should include "touch tmp/restart.txt" end end end
describe "Invoking the 'vh' command in a project" do before :each do Dir.chdir root('test_env') end describe "to do a simulated deploy" do before :each do vh 'deploy', 'simulate=1' end it "should take care of the lockfile" do stdout.should =~ /ERROR: another deployment is ongoing/ stdout.should =~ /touch ".*deploy\.lock"/ stdout.should =~ /rm -f ".*deploy\.lock"/ end it "should honor releases_path" do stdout.should include "releases/" end it "should symlink the current_path" do stdout.should =~ /ln .*current/ end it "should include deploy directives" do stdout.should include "bundle exec rake db:migrate" end it "should include 'to :restart' directives" do stdout.should include "touch tmp/restart.txt" end end end
Update the deploy spec which got outta sync.
Update the deploy spec which got outta sync.
Ruby
mit
scalp42/mina,Zhomart/mina,dcalixto/mina,flowerett/mina,openaustralia/mina,scalp42/mina,ianks/mina,cyberwolfru/mina,ianks/mina,Zhomart/mina,allantatter/mina,openaustralia/mina,mfinelli/mina,cyberwolfru/mina,chip/mina,mfinelli/mina,estum/mina,allantatter/mina,flowerett/mina,dcalixto/mina,stereodenis/mina,whhx/mina,whhx/mina,estum/mina
ruby
## Code Before: describe "Invoking the 'vh' command in a project" do before :each do Dir.chdir root('test_env') end describe "to do a simulated deploy" do before :each do vh 'deploy', 'simulate=1' end it "should take care of the lockfile" do stdout.should =~ /ERROR: another deployment is ongoing/ stdout.should =~ /touch ".*deploy\.lock"/ stdout.should =~ /rm -f ".*deploy\.lock"/ end it "should honor releases_path" do stdout.should include "#{Dir.pwd}/deploy/releases" end it "should symlink the current_path" do stdout.should =~ /ln .*current/ end it "should include deploy directives" do stdout.should include "bundle exec rake db:migrate" end it "should include 'to :restart' directives" do stdout.should include "touch tmp/restart.txt" end end end ## Instruction: Update the deploy spec which got outta sync. ## Code After: describe "Invoking the 'vh' command in a project" do before :each do Dir.chdir root('test_env') end describe "to do a simulated deploy" do before :each do vh 'deploy', 'simulate=1' end it "should take care of the lockfile" do stdout.should =~ /ERROR: another deployment is ongoing/ stdout.should =~ /touch ".*deploy\.lock"/ stdout.should =~ /rm -f ".*deploy\.lock"/ end it "should honor releases_path" do stdout.should include "releases/" end it "should symlink the current_path" do stdout.should =~ /ln .*current/ end it "should include deploy directives" do stdout.should include "bundle exec rake db:migrate" end it "should include 'to :restart' directives" do stdout.should include "touch tmp/restart.txt" end end end
53de3acce6562e1d48265dcf31ddbac533d4ba3d
rust/core-lib/Cargo.toml
rust/core-lib/Cargo.toml
[package] name = "xi-core-lib" version = "0.2.0" license = "Apache-2.0" authors = ["Raph Levien <[email protected]>"] description = "Library module for xi-core" repository = "https://github.com/google/xi-editor" [dependencies] serde = "1.0" serde_json = "1.0" serde_derive = "1.0" time = "0.1" xi-rope = { path = "../rope", version = "0.2" } xi-unicode = { path = "../unicode", version = "0.1.0" } xi-rpc = { path = "../rpc", version = "0.2.0" } [dependencies.syntect] version = "1.6" default-features = false features = ["assets"] [target."cfg(target_os = \"fuchsia\")".dependencies] sha2 = "0.5" [features] avx-accel = ["xi-rope/avx-accel"] simd-accel = ["xi-rope/simd-accel"]
[package] name = "xi-core-lib" version = "0.2.0" license = "Apache-2.0" authors = ["Raph Levien <[email protected]>"] description = "Library module for xi-core" repository = "https://github.com/google/xi-editor" [dependencies] serde = "1.0" serde_json = "1.0" serde_derive = "1.0" time = "0.1" xi-rope = { path = "../rope", version = "0.2" } xi-unicode = { path = "../unicode", version = "0.1.0" } xi-rpc = { path = "../rpc", version = "0.2.0" } [dependencies.syntect] version = "1.7" default-features = false features = ["assets","dump-load-rs"] [target."cfg(target_os = \"fuchsia\")".dependencies] sha2 = "0.5" [features] avx-accel = ["xi-rope/avx-accel"] simd-accel = ["xi-rope/simd-accel"]
Use new pure Rust syntect config
Use new pure Rust syntect config Bumps the syntect version so that we can use the new dump-load-rs feature, avoiding an indirect dependency on miniz-sys, so that we can build on Fuchsia without any transitive dependencies on C.
TOML
apache-2.0
modelorganism/xi-editor,fuchsia-mirror/third_party-xi-editor,google/xi-editor,modelorganism/xi-editor,google/xi-editor,modelorganism/xi-editor,google/xi-editor,fuchsia-mirror/third_party-xi-editor,google/xi-editor,fuchsia-mirror/third_party-xi-editor,fuchsia-mirror/third_party-xi-editor
toml
## Code Before: [package] name = "xi-core-lib" version = "0.2.0" license = "Apache-2.0" authors = ["Raph Levien <[email protected]>"] description = "Library module for xi-core" repository = "https://github.com/google/xi-editor" [dependencies] serde = "1.0" serde_json = "1.0" serde_derive = "1.0" time = "0.1" xi-rope = { path = "../rope", version = "0.2" } xi-unicode = { path = "../unicode", version = "0.1.0" } xi-rpc = { path = "../rpc", version = "0.2.0" } [dependencies.syntect] version = "1.6" default-features = false features = ["assets"] [target."cfg(target_os = \"fuchsia\")".dependencies] sha2 = "0.5" [features] avx-accel = ["xi-rope/avx-accel"] simd-accel = ["xi-rope/simd-accel"] ## Instruction: Use new pure Rust syntect config Bumps the syntect version so that we can use the new dump-load-rs feature, avoiding an indirect dependency on miniz-sys, so that we can build on Fuchsia without any transitive dependencies on C. ## Code After: [package] name = "xi-core-lib" version = "0.2.0" license = "Apache-2.0" authors = ["Raph Levien <[email protected]>"] description = "Library module for xi-core" repository = "https://github.com/google/xi-editor" [dependencies] serde = "1.0" serde_json = "1.0" serde_derive = "1.0" time = "0.1" xi-rope = { path = "../rope", version = "0.2" } xi-unicode = { path = "../unicode", version = "0.1.0" } xi-rpc = { path = "../rpc", version = "0.2.0" } [dependencies.syntect] version = "1.7" default-features = false features = ["assets","dump-load-rs"] [target."cfg(target_os = \"fuchsia\")".dependencies] sha2 = "0.5" [features] avx-accel = ["xi-rope/avx-accel"] simd-accel = ["xi-rope/simd-accel"]
54514ac4146823f16835a914af01c2b55dd7a1cf
src/views/editProfile.blade.php
src/views/editProfile.blade.php
@extends('panelViews::mainTemplate') @section('page-wrapper') @if (!empty($message)) <div class="alert-box success"> <h2>{{ $message }}</h2> </div> @endif <div class="row"> <div class="col-xs-4" > {!! Form::model($admin, array( $admin->id)) !!} {!! Form::label('first_name', \Lang::get('panel::fields.FirstName')) !!} {!! Form::text('first_name', $admin->first_name, array('class' => 'form-control')) !!} <br /> {!! Form::label('last_name', \Lang::get('panel::fields.LastName')) !!} {!! Form::text('last_name', $admin->last_name, array('class' => 'form-control')) !!} <br /> <!-- email --> {!! Form::label('email', 'Email') !!} {!! Form::email('email', $admin->email, array('class' => 'form-control')) !!} <br /> {!! Form::submit(\Lang::get('panel::fields.updateProfile'), array('class' => 'btn btn-primary')) !!} {!! Form::close() !!} </div> </div> @stop
@extends('panelViews::mainTemplate') @section('page-wrapper') @if (!empty($message)) <div class="alert-box success"> <h2>{{ $message }}</h2> </div> @endif @if ($demo_status == true) <h4>You are not allowed to edit the profile in demo version of panel.</h4> @else <div class="row"> <div class="col-xs-4" > {!! Form::model($admin, array( $admin->id)) !!} {!! Form::label('first_name', \Lang::get('panel::fields.FirstName')) !!} {!! Form::text('first_name', $admin->first_name, array('class' => 'form-control')) !!} <br /> {!! Form::label('last_name', \Lang::get('panel::fields.LastName')) !!} {!! Form::text('last_name', $admin->last_name, array('class' => 'form-control')) !!} <br /> <!-- email --> {!! Form::label('email', 'Email') !!} {!! Form::email('email', $admin->email, array('class' => 'form-control')) !!} <br /> {!! Form::submit(\Lang::get('panel::fields.updateProfile'), array('class' => 'btn btn-primary')) !!} {!! Form::close() !!} @endif </div> </div> @stop
Edit Profile feature is removed in demo status.
Edit Profile feature is removed in demo status.
PHP
mit
serverfireteam/panel,serverfireteam/panel,serverfireteam/panel
php
## Code Before: @extends('panelViews::mainTemplate') @section('page-wrapper') @if (!empty($message)) <div class="alert-box success"> <h2>{{ $message }}</h2> </div> @endif <div class="row"> <div class="col-xs-4" > {!! Form::model($admin, array( $admin->id)) !!} {!! Form::label('first_name', \Lang::get('panel::fields.FirstName')) !!} {!! Form::text('first_name', $admin->first_name, array('class' => 'form-control')) !!} <br /> {!! Form::label('last_name', \Lang::get('panel::fields.LastName')) !!} {!! Form::text('last_name', $admin->last_name, array('class' => 'form-control')) !!} <br /> <!-- email --> {!! Form::label('email', 'Email') !!} {!! Form::email('email', $admin->email, array('class' => 'form-control')) !!} <br /> {!! Form::submit(\Lang::get('panel::fields.updateProfile'), array('class' => 'btn btn-primary')) !!} {!! Form::close() !!} </div> </div> @stop ## Instruction: Edit Profile feature is removed in demo status. ## Code After: @extends('panelViews::mainTemplate') @section('page-wrapper') @if (!empty($message)) <div class="alert-box success"> <h2>{{ $message }}</h2> </div> @endif @if ($demo_status == true) <h4>You are not allowed to edit the profile in demo version of panel.</h4> @else <div class="row"> <div class="col-xs-4" > {!! Form::model($admin, array( $admin->id)) !!} {!! Form::label('first_name', \Lang::get('panel::fields.FirstName')) !!} {!! Form::text('first_name', $admin->first_name, array('class' => 'form-control')) !!} <br /> {!! Form::label('last_name', \Lang::get('panel::fields.LastName')) !!} {!! Form::text('last_name', $admin->last_name, array('class' => 'form-control')) !!} <br /> <!-- email --> {!! Form::label('email', 'Email') !!} {!! Form::email('email', $admin->email, array('class' => 'form-control')) !!} <br /> {!! Form::submit(\Lang::get('panel::fields.updateProfile'), array('class' => 'btn btn-primary')) !!} {!! Form::close() !!} @endif </div> </div> @stop
9f7fb134ac04f889a2e6482e0eb6a916b93242df
.zuul.yml
.zuul.yml
ui: tape browsers: - name: chrome version: 34..latest # - name: safari # version: latest # - name: ie # version: 9..latest - name: firefox version: 30..latest
ui: tape browsers: - name: firefox version: 30..latest - name: chrome version: [35,36,beta]
Fix chrome versions so chrome testing works again
Fix chrome versions so chrome testing works again
YAML
apache-2.0
rtc-io/rtc-dcstream
yaml
## Code Before: ui: tape browsers: - name: chrome version: 34..latest # - name: safari # version: latest # - name: ie # version: 9..latest - name: firefox version: 30..latest ## Instruction: Fix chrome versions so chrome testing works again ## Code After: ui: tape browsers: - name: firefox version: 30..latest - name: chrome version: [35,36,beta]
0526df95deb81c409af3b78251b5fd66f3e5c9e9
config/initializers/s3_direct_upload.rb
config/initializers/s3_direct_upload.rb
S3DirectUpload.config do |c| c.access_key_id = ENV['AWS_ACCESS_KEY'] c.secret_access_key = ENV['AWS_SECRET_KEY'] c.bucket = ENV['AWS_BUCKET'], c.region = 'sa-east-1' c.url = "https://#{ENV['AWS_BUCKET']}.s3.amazonaws.com" end
S3DirectUpload.config do |c| c.access_key_id = ENV['AWS_ACCESS_KEY'] c.secret_access_key = ENV['AWS_SECRET_KEY'] c.bucket = ENV['AWS_BUCKET'] c.region = 'sa-east-1' c.url = "https://#{c.bucket}.s3.amazonaws.com" end
Fix typo on S3 Direct Upload configuration
Fix typo on S3 Direct Upload configuration An unecessary comma caused an Invalid Policy error while trying to upload files do Amazon S3.
Ruby
mit
engageis/juntos.com.vc,juntos-com-vc/juntos.com.vc,juntos-com-vc/juntos.com.vc,engageis/juntos.com.vc,juntos-com-vc/juntos.com.vc,engageis/juntos.com.vc
ruby
## Code Before: S3DirectUpload.config do |c| c.access_key_id = ENV['AWS_ACCESS_KEY'] c.secret_access_key = ENV['AWS_SECRET_KEY'] c.bucket = ENV['AWS_BUCKET'], c.region = 'sa-east-1' c.url = "https://#{ENV['AWS_BUCKET']}.s3.amazonaws.com" end ## Instruction: Fix typo on S3 Direct Upload configuration An unecessary comma caused an Invalid Policy error while trying to upload files do Amazon S3. ## Code After: S3DirectUpload.config do |c| c.access_key_id = ENV['AWS_ACCESS_KEY'] c.secret_access_key = ENV['AWS_SECRET_KEY'] c.bucket = ENV['AWS_BUCKET'] c.region = 'sa-east-1' c.url = "https://#{c.bucket}.s3.amazonaws.com" end
b101ee7b8f89ba5d8b557d19a0507b4bf43b671e
app/views/layouts/_footer.html.erb
app/views/layouts/_footer.html.erb
<div id="footer"> <%= link_to 'donebox', home_path %> <% if logged_in? %> <%= link_to 'logout', logout_path %> <% else %> <%= link_to 'login', login_path %> <%= link_to 'sign up', signup_path %> <% end %> <%= link_to 'about', about_path %> <%= link_to 'syntax', syntax_path %> <%= link_to 'api', api_path %> <%= link_to 'tools', tools_path %> - &copy; <%= link_to 'macournoyer', 'http://macournoyer.com' %> </div>
<div id="footer"> <%= link_to 'donebox', home_path %> <% if logged_in? %> <%= link_to 'logout', logout_path %> <% else %> <%= link_to 'login', login_path %> <%= link_to 'sign up', signup_path %> <% end %> <%= link_to 'about', about_path %> <%= link_to 'syntax', syntax_path %> <%= link_to 'api', api_path %> <%= link_to 'tools', tools_path %> - &copy; <%= link_to 'macournoyer', 'http://macournoyer.com' %> &amp;&amp; <%= link_to 'ook', 'http://blog.ookook.fr' %> </div>
Add my little nickname in the footer, just after marcournoyer... :x
Add my little nickname in the footer, just after marcournoyer... :x
HTML+ERB
mit
ook/donebox,ook/donebox
html+erb
## Code Before: <div id="footer"> <%= link_to 'donebox', home_path %> <% if logged_in? %> <%= link_to 'logout', logout_path %> <% else %> <%= link_to 'login', login_path %> <%= link_to 'sign up', signup_path %> <% end %> <%= link_to 'about', about_path %> <%= link_to 'syntax', syntax_path %> <%= link_to 'api', api_path %> <%= link_to 'tools', tools_path %> - &copy; <%= link_to 'macournoyer', 'http://macournoyer.com' %> </div> ## Instruction: Add my little nickname in the footer, just after marcournoyer... :x ## Code After: <div id="footer"> <%= link_to 'donebox', home_path %> <% if logged_in? %> <%= link_to 'logout', logout_path %> <% else %> <%= link_to 'login', login_path %> <%= link_to 'sign up', signup_path %> <% end %> <%= link_to 'about', about_path %> <%= link_to 'syntax', syntax_path %> <%= link_to 'api', api_path %> <%= link_to 'tools', tools_path %> - &copy; <%= link_to 'macournoyer', 'http://macournoyer.com' %> &amp;&amp; <%= link_to 'ook', 'http://blog.ookook.fr' %> </div>
940303e9c596aa6a526f4844f8adf6cc1643a13d
lib/core/types/media_type.dart
lib/core/types/media_type.dart
enum MediaType { album, clip, collection, episode, movie, photo, playlist, season, show, track, unknown, }
enum MediaType { album, artist, clip, collection, episode, movie, photo, playlist, season, show, track, unknown, }
Add artist option to MediaType type.
Add artist option to MediaType type.
Dart
mit
wcomartin/PlexPy-Remote
dart
## Code Before: enum MediaType { album, clip, collection, episode, movie, photo, playlist, season, show, track, unknown, } ## Instruction: Add artist option to MediaType type. ## Code After: enum MediaType { album, artist, clip, collection, episode, movie, photo, playlist, season, show, track, unknown, }
43f856b99f0aa01f8c4db0e0be4771b0d8958105
config.toml
config.toml
baseurl = "https://fallthrough.io" languageCode = "en-us" title = "Usman Mahmood" theme = "hyde" copyright = "Usman Mahmood" [Author] name = "Usman Mahmood" [Permalinks] blog = "/:year/:month/:filename/" [Taxonomies] tag = "tags" series = "series" series-desc = "series-desc" [params] description = "Algorithms + Data Structures = Programs" github = "https://github.com/umahmood" twitter = "https://twitter.com/make_slice" keybase = "https://keybase.io/usman"
baseurl = "https://www.usman.me.uk" languageCode = "en-us" title = "Usman Mahmood" theme = "hyde" copyright = "Usman Mahmood" [Author] name = "Usman Mahmood" [Permalinks] blog = "/:year/:month/:filename/" [Taxonomies] tag = "tags" series = "series" series-desc = "series-desc" [params] description = "Algorithms + Data Structures = Programs" github = "https://github.com/umahmood" twitter = "https://twitter.com/make_slice" keybase = "https://keybase.io/usman"
Update baseurl to new domain
Update baseurl to new domain
TOML
mit
umahmood/fallthrough
toml
## Code Before: baseurl = "https://fallthrough.io" languageCode = "en-us" title = "Usman Mahmood" theme = "hyde" copyright = "Usman Mahmood" [Author] name = "Usman Mahmood" [Permalinks] blog = "/:year/:month/:filename/" [Taxonomies] tag = "tags" series = "series" series-desc = "series-desc" [params] description = "Algorithms + Data Structures = Programs" github = "https://github.com/umahmood" twitter = "https://twitter.com/make_slice" keybase = "https://keybase.io/usman" ## Instruction: Update baseurl to new domain ## Code After: baseurl = "https://www.usman.me.uk" languageCode = "en-us" title = "Usman Mahmood" theme = "hyde" copyright = "Usman Mahmood" [Author] name = "Usman Mahmood" [Permalinks] blog = "/:year/:month/:filename/" [Taxonomies] tag = "tags" series = "series" series-desc = "series-desc" [params] description = "Algorithms + Data Structures = Programs" github = "https://github.com/umahmood" twitter = "https://twitter.com/make_slice" keybase = "https://keybase.io/usman"
4bfb27abdf865f3701a05b3e9bf40cd35cc63836
home/.config/fish/functions/fish_prompt.fish
home/.config/fish/functions/fish_prompt.fish
function fish_prompt --description 'Write out the prompt' set -l home_escaped (echo -n $HOME | sed 's/\//\\\\\//g') set -l pwd (echo -n $PWD | sed "s/^$home_escaped/~/" | sed 's/ /%20/g') # SSH test $SSH_TTY and printf (set_color red)$USER(set_color brwhite)'@'(set_color yellow)(prompt_hostname)' ' test "$USER" = 'root' and echo (set_color red)"#" # Main printf "%s%s %s " (set_color cyan) $pwd (set_color red)'❯'(set_color yellow)'❯'(set_color green)'❯' end
function fish_prompt --description 'Write out the prompt' set -l last_status $status set -l home_escaped (echo -n $HOME | sed 's/\//\\\\\//g') set -l pwd (echo -n $PWD | sed "s/^$home_escaped/~/" | sed 's/ /%20/g') # SSH test $SSH_TTY and printf (set_color red)$USER(set_color brwhite)'@'(set_color yellow)(prompt_hostname)' ' test "$USER" = 'root' and echo (set_color red)"#" # Main set -l prompt_color if test $last_status -eq 0 set prompt_color green else set prompt_color red end printf "%s%s %s " (set_color cyan) $pwd (set_color $prompt_color)'❯❯❯' set_color normal end
Change prompt color by latest exit code
Change prompt color by latest exit code
fish
mit
s-osa/dotfiles
fish
## Code Before: function fish_prompt --description 'Write out the prompt' set -l home_escaped (echo -n $HOME | sed 's/\//\\\\\//g') set -l pwd (echo -n $PWD | sed "s/^$home_escaped/~/" | sed 's/ /%20/g') # SSH test $SSH_TTY and printf (set_color red)$USER(set_color brwhite)'@'(set_color yellow)(prompt_hostname)' ' test "$USER" = 'root' and echo (set_color red)"#" # Main printf "%s%s %s " (set_color cyan) $pwd (set_color red)'❯'(set_color yellow)'❯'(set_color green)'❯' end ## Instruction: Change prompt color by latest exit code ## Code After: function fish_prompt --description 'Write out the prompt' set -l last_status $status set -l home_escaped (echo -n $HOME | sed 's/\//\\\\\//g') set -l pwd (echo -n $PWD | sed "s/^$home_escaped/~/" | sed 's/ /%20/g') # SSH test $SSH_TTY and printf (set_color red)$USER(set_color brwhite)'@'(set_color yellow)(prompt_hostname)' ' test "$USER" = 'root' and echo (set_color red)"#" # Main set -l prompt_color if test $last_status -eq 0 set prompt_color green else set prompt_color red end printf "%s%s %s " (set_color cyan) $pwd (set_color $prompt_color)'❯❯❯' set_color normal end
cf52726065dad37205ab0874ec179087d4556e24
server/contentSecurityPolicy.js
server/contentSecurityPolicy.js
// @flow /** * Part of GDL gdl-frontend. * Copyright (C) 2018 GDL * * See LICENSE */ const directives = { defaultSrc: ["'self'"], scriptSrc: [ "'self'", "'unsafe-inline'", 'https://cdn.polyfill.io', 'https://www.google-analytics.com' ], styleSrc: ["'self'", "'unsafe-inline'"], imgSrc: ["'self'", 'https://*.digitallibrary.io'], connectSrc: [ "'self'", 'https://*.digitallibrary.io', 'https://digitallibrary.eu.auth0.com' ], reportUri: '/csp-report' }; module.exports = { directives };
// @flow /** * Part of GDL gdl-frontend. * Copyright (C) 2018 GDL * * See LICENSE */ const googleAnalytics = 'www.google-analytics.com'; const directives = { defaultSrc: ["'self'"], scriptSrc: [ "'self'", "'unsafe-inline'", 'https://cdn.polyfill.io', googleAnalytics ], styleSrc: ["'self'", "'unsafe-inline'"], imgSrc: ["'self'", 'https://*.digitallibrary.io', googleAnalytics], connectSrc: [ "'self'", 'https://*.digitallibrary.io', 'https://digitallibrary.eu.auth0.com' ], reportUri: '/csp-report' }; module.exports = { directives };
Add google analytics to CSP img-src
Add google analytics to CSP img-src
JavaScript
apache-2.0
GlobalDigitalLibraryio/gdl-frontend,GlobalDigitalLibraryio/gdl-frontend
javascript
## Code Before: // @flow /** * Part of GDL gdl-frontend. * Copyright (C) 2018 GDL * * See LICENSE */ const directives = { defaultSrc: ["'self'"], scriptSrc: [ "'self'", "'unsafe-inline'", 'https://cdn.polyfill.io', 'https://www.google-analytics.com' ], styleSrc: ["'self'", "'unsafe-inline'"], imgSrc: ["'self'", 'https://*.digitallibrary.io'], connectSrc: [ "'self'", 'https://*.digitallibrary.io', 'https://digitallibrary.eu.auth0.com' ], reportUri: '/csp-report' }; module.exports = { directives }; ## Instruction: Add google analytics to CSP img-src ## Code After: // @flow /** * Part of GDL gdl-frontend. * Copyright (C) 2018 GDL * * See LICENSE */ const googleAnalytics = 'www.google-analytics.com'; const directives = { defaultSrc: ["'self'"], scriptSrc: [ "'self'", "'unsafe-inline'", 'https://cdn.polyfill.io', googleAnalytics ], styleSrc: ["'self'", "'unsafe-inline'"], imgSrc: ["'self'", 'https://*.digitallibrary.io', googleAnalytics], connectSrc: [ "'self'", 'https://*.digitallibrary.io', 'https://digitallibrary.eu.auth0.com' ], reportUri: '/csp-report' }; module.exports = { directives };
5cc35c18b5b3eeb5cc78ffb74f4fc893dc39646b
src/controllers/version.js
src/controllers/version.js
const slaveService = require('../services/slave'); const versionService = require('../services/version'); const version = { currentVersion(req, res) { const {slaveUID, slaveVersion} = req.params, remoteAddress = req.headers['x-forwarded-for'] || req.connection.remoteAddress, tag = versionService.getCurrent(); const respondWithTag = () => { res.json(200, {tag}); }; slaveService.updateSlave(slaveUID, slaveVersion, remoteAddress) .then(respondWithTag) .catch(error => { console.error(`An error occurred when updating ${slaveUID}: ${error}`); // send back current version regardless respondWithTag(); }); } } module.exports = version;
const slaveService = require('../services/slave'); const versionService = require('../services/version'); const version = { currentVersion(req, res) { const {slaveUID, slaveVersion} = req.params, remoteAddress = req.headers['x-forwarded-for'] || req.connection.remoteAddress, tag = versionService.getCurrent(); const respondWithTag = () => { res.json(200, {tag}); }; slaveService.updateSlave(slaveUID, slaveVersion, remoteAddress) .catch(error => { console.error(`An error occurred when updating ${slaveUID}: ${error}`); }); // send back current version regardless of success or failure of db entry respondWithTag(); } } module.exports = version;
Send response while database is still updating
Send response while database is still updating
JavaScript
mit
4minitz/version-check
javascript
## Code Before: const slaveService = require('../services/slave'); const versionService = require('../services/version'); const version = { currentVersion(req, res) { const {slaveUID, slaveVersion} = req.params, remoteAddress = req.headers['x-forwarded-for'] || req.connection.remoteAddress, tag = versionService.getCurrent(); const respondWithTag = () => { res.json(200, {tag}); }; slaveService.updateSlave(slaveUID, slaveVersion, remoteAddress) .then(respondWithTag) .catch(error => { console.error(`An error occurred when updating ${slaveUID}: ${error}`); // send back current version regardless respondWithTag(); }); } } module.exports = version; ## Instruction: Send response while database is still updating ## Code After: const slaveService = require('../services/slave'); const versionService = require('../services/version'); const version = { currentVersion(req, res) { const {slaveUID, slaveVersion} = req.params, remoteAddress = req.headers['x-forwarded-for'] || req.connection.remoteAddress, tag = versionService.getCurrent(); const respondWithTag = () => { res.json(200, {tag}); }; slaveService.updateSlave(slaveUID, slaveVersion, remoteAddress) .catch(error => { console.error(`An error occurred when updating ${slaveUID}: ${error}`); }); // send back current version regardless of success or failure of db entry respondWithTag(); } } module.exports = version;
18d87c64dd7353edaac41f4f07b22e100f751f9e
patches/minecraft/net/minecraft/client/renderer/RenderEngine.java.patch
patches/minecraft/net/minecraft/client/renderer/RenderEngine.java.patch
--- ../src_base/minecraft/net/minecraft/client/renderer/RenderEngine.java +++ ../src_work/minecraft/net/minecraft/client/renderer/RenderEngine.java @@ -28,6 +28,8 @@ import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; +import net.minecraftforge.client.ForgeHooksClient; + @SideOnly(Side.CLIENT) public class RenderEngine { @@ -186,6 +188,7 @@ try { + ForgeHooksClient.onTextureLoadPre(par1Str); int i = GLAllocation.generateTextureNames(); TextureFXManager.instance().bindTextureToName(par1Str, i); boolean flag = par1Str.startsWith("%blur%"); @@ -216,6 +219,7 @@ } this.textureMap.put(s1, Integer.valueOf(i)); + ForgeHooksClient.onTextureLoad(par1Str, texturePack.getSelectedTexturePack()); return i; } catch (Exception exception)
--- ../src_base/minecraft/net/minecraft/client/renderer/RenderEngine.java +++ ../src_work/minecraft/net/minecraft/client/renderer/RenderEngine.java @@ -28,6 +28,8 @@ import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; +import net.minecraftforge.client.ForgeHooksClient; + @SideOnly(Side.CLIENT) public class RenderEngine { @@ -186,6 +188,7 @@ try { + ForgeHooksClient.onTextureLoadPre(par1Str); int i = GLAllocation.generateTextureNames(); TextureFXManager.instance().bindTextureToName(par1Str, i); boolean flag = par1Str.startsWith("%blur%"); @@ -216,6 +219,7 @@ } this.textureMap.put(s1, Integer.valueOf(i)); + ForgeHooksClient.onTextureLoad(par1Str, texturePack.getSelectedTexturePack()); return i; } catch (Exception exception) @@ -417,6 +421,7 @@ { this.textureMapBlocks.updateAnimations(); this.textureMapItems.updateAnimations(); + this.resetBoundTexture(); //Forge: BugFix, Animations don't use our bindTexture, and thus don't change the cached texture. } /** @@ -515,6 +520,7 @@ { this.textureMapBlocks.refreshTextures(); this.textureMapItems.refreshTextures(); + this.resetBoundTexture(); //Forge: BugFix, Animations don't use our bindTexture, and thus don't change the cached texture. } public Icon getMissingIcon(int par1)
Fix potential GL issue when atlas animations bind textures without informating RenderEngine.
Fix potential GL issue when atlas animations bind textures without informating RenderEngine.
Diff
lgpl-2.1
RainWarrior/MinecraftForge,Ghostlyr/MinecraftForge,dmf444/MinecraftForge,ThiagoGarciaAlves/MinecraftForge,blay09/MinecraftForge,brubo1/MinecraftForge,shadekiller666/MinecraftForge,simon816/MinecraftForge,Theerapak/MinecraftForge,Vorquel/MinecraftForge,bonii-xx/MinecraftForge,CrafterKina/MinecraftForge,Mathe172/MinecraftForge,jdpadrnos/MinecraftForge,karlthepagan/MinecraftForge,mickkay/MinecraftForge,luacs1998/MinecraftForge,fcjailybo/MinecraftForge,Zaggy1024/MinecraftForge
diff
## Code Before: --- ../src_base/minecraft/net/minecraft/client/renderer/RenderEngine.java +++ ../src_work/minecraft/net/minecraft/client/renderer/RenderEngine.java @@ -28,6 +28,8 @@ import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; +import net.minecraftforge.client.ForgeHooksClient; + @SideOnly(Side.CLIENT) public class RenderEngine { @@ -186,6 +188,7 @@ try { + ForgeHooksClient.onTextureLoadPre(par1Str); int i = GLAllocation.generateTextureNames(); TextureFXManager.instance().bindTextureToName(par1Str, i); boolean flag = par1Str.startsWith("%blur%"); @@ -216,6 +219,7 @@ } this.textureMap.put(s1, Integer.valueOf(i)); + ForgeHooksClient.onTextureLoad(par1Str, texturePack.getSelectedTexturePack()); return i; } catch (Exception exception) ## Instruction: Fix potential GL issue when atlas animations bind textures without informating RenderEngine. ## Code After: --- ../src_base/minecraft/net/minecraft/client/renderer/RenderEngine.java +++ ../src_work/minecraft/net/minecraft/client/renderer/RenderEngine.java @@ -28,6 +28,8 @@ import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; +import net.minecraftforge.client.ForgeHooksClient; + @SideOnly(Side.CLIENT) public class RenderEngine { @@ -186,6 +188,7 @@ try { + ForgeHooksClient.onTextureLoadPre(par1Str); int i = GLAllocation.generateTextureNames(); TextureFXManager.instance().bindTextureToName(par1Str, i); boolean flag = par1Str.startsWith("%blur%"); @@ -216,6 +219,7 @@ } this.textureMap.put(s1, Integer.valueOf(i)); + ForgeHooksClient.onTextureLoad(par1Str, texturePack.getSelectedTexturePack()); return i; } catch (Exception exception) @@ -417,6 +421,7 @@ { this.textureMapBlocks.updateAnimations(); this.textureMapItems.updateAnimations(); + this.resetBoundTexture(); //Forge: BugFix, Animations don't use our bindTexture, and thus don't change the cached texture. } /** @@ -515,6 +520,7 @@ { this.textureMapBlocks.refreshTextures(); this.textureMapItems.refreshTextures(); + this.resetBoundTexture(); //Forge: BugFix, Animations don't use our bindTexture, and thus don't change the cached texture. } public Icon getMissingIcon(int par1)
029ba91b90dd6971e9c9ff5eca53f537218d709f
nvd-cli.go
nvd-cli.go
package main import ( "fmt" "github.com/docopt/docopt-go" ) func main() { usage := `Usage: nvd-search [-c CVE | -k KEY] [-v VENDOR] [-p PRODUCT] [-n NVD] Options: -h --help show this -c CVE --cve CVE CVE-ID of the vulnerability [default: ] -k KEY --key KEY keyword search [default: ] -v VENDOR --vendor VENDOR CPE vendor name [default: ] -p PRODUCT --product PRODUCT CPE product name [default: ] -n NVD --nvd NVD Location of the local NVD [default: ~/.config/nvd-cli/db] ` args, _ := docopt.Parse(usage, nil, true, "nvd-cli 0.1", false) fmt.Println(args) }
package main import ( "log" "github.com/docopt/docopt-go" "github.com/mitchellh/go-homedir" ) func main() { usage := `Usage: nvd-search [-c CVE | -k KEY] [-v VENDOR] [-p PRODUCT] [-n NVD] Options: -h --help show this -c CVE --cve CVE CVE-ID of the vulnerability [default: ] -k KEY --key KEY keyword search [default: ] -v VENDOR --vendor VENDOR CPE vendor name [default: ] -p PRODUCT --product PRODUCT CPE product name [default: ] -n NVD --nvd NVD Location of the local NVD [default: ~/.config/nvd-cli/db] ` args, _ := docopt.Parse(usage, nil, true, "nvd-cli 0.1", false) path, err := homedir.Expand(args["--nvd"].(string)) if err != nil { log.Fatal(err) } log.Println(path) }
Clean the local NVD dir using homedir.Expand
Clean the local NVD dir using homedir.Expand
Go
mit
okuuva/nvd-search-cli
go
## Code Before: package main import ( "fmt" "github.com/docopt/docopt-go" ) func main() { usage := `Usage: nvd-search [-c CVE | -k KEY] [-v VENDOR] [-p PRODUCT] [-n NVD] Options: -h --help show this -c CVE --cve CVE CVE-ID of the vulnerability [default: ] -k KEY --key KEY keyword search [default: ] -v VENDOR --vendor VENDOR CPE vendor name [default: ] -p PRODUCT --product PRODUCT CPE product name [default: ] -n NVD --nvd NVD Location of the local NVD [default: ~/.config/nvd-cli/db] ` args, _ := docopt.Parse(usage, nil, true, "nvd-cli 0.1", false) fmt.Println(args) } ## Instruction: Clean the local NVD dir using homedir.Expand ## Code After: package main import ( "log" "github.com/docopt/docopt-go" "github.com/mitchellh/go-homedir" ) func main() { usage := `Usage: nvd-search [-c CVE | -k KEY] [-v VENDOR] [-p PRODUCT] [-n NVD] Options: -h --help show this -c CVE --cve CVE CVE-ID of the vulnerability [default: ] -k KEY --key KEY keyword search [default: ] -v VENDOR --vendor VENDOR CPE vendor name [default: ] -p PRODUCT --product PRODUCT CPE product name [default: ] -n NVD --nvd NVD Location of the local NVD [default: ~/.config/nvd-cli/db] ` args, _ := docopt.Parse(usage, nil, true, "nvd-cli 0.1", false) path, err := homedir.Expand(args["--nvd"].(string)) if err != nil { log.Fatal(err) } log.Println(path) }
5e231666a8c611fcac4683c33f6d92920b6b024d
setup.py
setup.py
import os import re from setuptools import setup, find_packages def get_ini_variable(name): with open(os.path.join(os.path.dirname(__file__), 'src', 'ros_get', '__init__.py')) as f: return re.compile(r".*%s = '(.*?)'" % name, re.S).match(f.read()).group(1) with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as r_file: readme = r_file.read() setup( name='ros_get', license='MIT', version=get_ini_variable('__version__'), url=get_ini_variable('__url__'), author=get_ini_variable('__author__'), author_email=get_ini_variable('__email__'), description='Simple tools for working with ROS source packages', long_description=readme, package_dir={'': 'src'}, # tell distutils packages are under src packages=find_packages('src'), # include all packages under src install_requires=[ 'argcomplete', 'catkin_pkg', 'catkin_tools', 'colorlog', 'future', 'mock', 'rosdep', 'rosdistro >= 0.6.8', 'rosinstall_generator', 'vcstools', 'xdg==1.0.7', ], entry_points={'console_scripts': ['ros-get=ros_get.__main__:main']}, )
import os import re from setuptools import setup, find_packages def get_ini_variable(name): with open(os.path.join(os.path.dirname(__file__), 'src', 'ros_get', '__init__.py')) as f: return re.compile(r".*%s = '(.*?)'" % name, re.S).match(f.read()).group(1) with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as r_file: readme = r_file.read() setup( name='ros_get', license='MIT', version=get_ini_variable('__version__'), url=get_ini_variable('__url__'), author=get_ini_variable('__author__'), author_email=get_ini_variable('__email__'), description='Simple tools for working with ROS source packages', long_description=readme, package_dir={'': 'src'}, # tell distutils packages are under src packages=find_packages('src'), # include all packages under src install_requires=[ 'argcomplete', 'catkin_pkg', 'catkin_tools', 'colorlog', 'future', 'mock', 'rosdep', 'rosdistro >= 0.6.8', 'rosinstall_generator', 'trollius', # remove when catkin>0.4.4 is released 'vcstools', 'xdg==1.0.7', ], entry_points={'console_scripts': ['ros-get=ros_get.__main__:main']}, )
Revert "Remove dependency that was fixed upstream"
Revert "Remove dependency that was fixed upstream" This reverts commit 9ee219d85849629eac53a28e72fa374a6c805ea4.
Python
mit
Rayman/ros-get,Rayman/ros-get
python
## Code Before: import os import re from setuptools import setup, find_packages def get_ini_variable(name): with open(os.path.join(os.path.dirname(__file__), 'src', 'ros_get', '__init__.py')) as f: return re.compile(r".*%s = '(.*?)'" % name, re.S).match(f.read()).group(1) with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as r_file: readme = r_file.read() setup( name='ros_get', license='MIT', version=get_ini_variable('__version__'), url=get_ini_variable('__url__'), author=get_ini_variable('__author__'), author_email=get_ini_variable('__email__'), description='Simple tools for working with ROS source packages', long_description=readme, package_dir={'': 'src'}, # tell distutils packages are under src packages=find_packages('src'), # include all packages under src install_requires=[ 'argcomplete', 'catkin_pkg', 'catkin_tools', 'colorlog', 'future', 'mock', 'rosdep', 'rosdistro >= 0.6.8', 'rosinstall_generator', 'vcstools', 'xdg==1.0.7', ], entry_points={'console_scripts': ['ros-get=ros_get.__main__:main']}, ) ## Instruction: Revert "Remove dependency that was fixed upstream" This reverts commit 9ee219d85849629eac53a28e72fa374a6c805ea4. ## Code After: import os import re from setuptools import setup, find_packages def get_ini_variable(name): with open(os.path.join(os.path.dirname(__file__), 'src', 'ros_get', '__init__.py')) as f: return re.compile(r".*%s = '(.*?)'" % name, re.S).match(f.read()).group(1) with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as r_file: readme = r_file.read() setup( name='ros_get', license='MIT', version=get_ini_variable('__version__'), url=get_ini_variable('__url__'), author=get_ini_variable('__author__'), author_email=get_ini_variable('__email__'), description='Simple tools for working with ROS source packages', long_description=readme, package_dir={'': 'src'}, # tell distutils packages are under src packages=find_packages('src'), # include all packages under src install_requires=[ 'argcomplete', 'catkin_pkg', 'catkin_tools', 'colorlog', 'future', 'mock', 'rosdep', 'rosdistro >= 0.6.8', 'rosinstall_generator', 'trollius', # remove when catkin>0.4.4 is released 'vcstools', 'xdg==1.0.7', ], entry_points={'console_scripts': ['ros-get=ros_get.__main__:main']}, )