hexsha
stringlengths
40
40
size
int64
5
1.05M
ext
stringclasses
98 values
lang
stringclasses
21 values
max_stars_repo_path
stringlengths
3
945
max_stars_repo_name
stringlengths
4
118
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
945
max_issues_repo_name
stringlengths
4
118
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
134k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
945
max_forks_repo_name
stringlengths
4
135
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
5
1.05M
avg_line_length
float64
1
1.03M
max_line_length
int64
2
1.03M
alphanum_fraction
float64
0
1
d6a6bc371d154e6eb6d52242bdb47540ae4c37c4
539
swift
Swift
CashMashine/Internal/Input protocols/Accountable.swift
AnchorSmash/Cash-Machine-on-classes
925f5f35343597c6d6890615a9ef77802e3e2e7c
[ "MIT" ]
null
null
null
CashMashine/Internal/Input protocols/Accountable.swift
AnchorSmash/Cash-Machine-on-classes
925f5f35343597c6d6890615a9ef77802e3e2e7c
[ "MIT" ]
null
null
null
CashMashine/Internal/Input protocols/Accountable.swift
AnchorSmash/Cash-Machine-on-classes
925f5f35343597c6d6890615a9ef77802e3e2e7c
[ "MIT" ]
null
null
null
// // Taxable.swift // CashMashine // // Created by Виктор Кулаков on 03/11/2018. // Copyright © 2018 Виктор Кулаков. All rights reserved. // import Foundation enum TaxType { case fix case share } enum FixType: Int { case noType = 0 case cigaretts = 1 case alcohol = 2 } protocol Taxable { var priceValue: Double { get } var type: TaxType { get } var currentCountry : String { get } var fixType: FixType { get } } protocol Accounter { func calculateTax(forTaxable tax: Taxable) -> Double }
17.966667
57
0.651206
bdfe019c1c016d45641d0b34839ed1fbdc34a30f
77
sql
SQL
src/test/resources/sql/select/f573bde9.sql
Shuttl-Tech/antlr_psql
fcf83192300abe723f3fd3709aff5b0c8118ad12
[ "MIT" ]
66
2018-06-15T11:34:03.000Z
2022-03-16T09:24:49.000Z
src/test/resources/sql/select/f573bde9.sql
Shuttl-Tech/antlr_psql
fcf83192300abe723f3fd3709aff5b0c8118ad12
[ "MIT" ]
13
2019-03-19T11:56:28.000Z
2020-08-05T04:20:50.000Z
src/test/resources/sql/select/f573bde9.sql
Shuttl-Tech/antlr_psql
fcf83192300abe723f3fd3709aff5b0c8118ad12
[ "MIT" ]
28
2019-01-05T19:59:02.000Z
2022-03-24T11:55:50.000Z
-- file:regex.sql ln:46 expect:true select regexp_matches('abb', '(?<=a)b*')
25.666667
40
0.662338
eb82aefca9050ff25fe853e410ad6b32bfe94cd0
740
asm
Assembly
oeis/339/A339916.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/339/A339916.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/339/A339916.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A339916: The sum of 2^((d-1)/2) over all divisors of 2n+1. ; Submitted by Christian Krause ; 1,3,5,9,19,33,65,135,257,513,1035,2049,4101,8211,16385,32769,65571,131085,262145,524355,1048577,2097153,4194455,8388609,16777225,33554691,67108865,134217765,268435971,536870913,1073741825,2147484699,4294967365,8589934593,17179871235,34359738369,68719476737,137438957703,274877906985,549755813889,1099511635987,2199023255553,4398046511365,8796093038595,17592186044417,35184372088905,70368744210435,140737488355845,281474976710657,562949953486899,1125899906842625,2251799813685249,4503599627502735 mul $0,2 add $0,1 mov $2,$0 lpb $0 mul $1,2 mov $3,$2 dif $3,$0 sub $0,2 cmp $3,$2 cmp $3,0 add $1,$3 lpe mov $0,$1 mul $0,2 add $0,1
37
497
0.783784
99259f5a64cde14c8fa1eceb9f0f5509d5b0ca1c
3,569
h
C
visualizer/src/TimeLineConfig.h
vnikolai/perf-o-meter
f60f8c87ba04f2dd5da431e2e0632781a33b44c7
[ "MIT" ]
2
2020-05-21T07:03:15.000Z
2020-09-15T18:43:04.000Z
visualizer/src/TimeLineConfig.h
vnikolai/perf-o-meter
f60f8c87ba04f2dd5da431e2e0632781a33b44c7
[ "MIT" ]
null
null
null
visualizer/src/TimeLineConfig.h
vnikolai/perf-o-meter
f60f8c87ba04f2dd5da431e2e0632781a33b44c7
[ "MIT" ]
1
2021-10-04T19:11:20.000Z
2021-10-04T19:11:20.000Z
/* Copyright 2020-2021 Volodymyr Nikolaichuk Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #pragma once #include <QColor> namespace visualizer { using zoom_t = uint64_t; using coord_t = int64_t; constexpr int DefaultZoom = 1000; constexpr double ZoomWheelCoef = 1.25; constexpr double VisibleMargin = 0.1; // 10% of report time each size constexpr int RulerHeight = 24; constexpr int RulerDistReport = 12; constexpr int ThreadTitleHeight = 32; constexpr int TitleOffsetSmall = 2; constexpr int TitleOffset = 5; constexpr int RecordHeight = 16; constexpr int ScrolBarThickness = 24; constexpr zoom_t MinZoom = 10; constexpr zoom_t MaxZoom = 0x8000000000; constexpr int ZoomKeyboardStep = 2; constexpr int ZoomKeyboardLargeStep = 5; constexpr int OffsetKeyboardStep = 10; constexpr int OffsetKeyboardPageStep = 240; constexpr int RecordMinTextWidth = 10; constexpr int PixelsPerSecond = 128; constexpr int RecordInfoHeight = 32; constexpr int RecordInfoDist = 32; constexpr int RecordInfoTextDist = 12; constexpr int RecordInfoTimeWidth = 128; constexpr int StatusMessageWidth = 256; constexpr int StatusMessageTextDist = 12; constexpr int StatusMessageDist = 25; static QColor BackgroundColor (32, 32, 32, 255); static QColor StatusMessageBackgroundColor (16, 16, 16, 128); static QColor ComponentHighlightColor (48, 48, 48, 128); static QColor RulerBackgroundColor (228, 230, 241, 255); static QColor SelectionColor (128, 230, 128, 32); constexpr int NumColors = 8; static QColor Colors[NumColors] = { QColor(160, 96, 96, 255), // soft pink QColor(96, 160, 96, 255), // light green Qt::darkCyan, QColor(160, 160, 96, 255), // soft yellow QColor(160, 96, 160, 255), // soft magenta Qt::gray, Qt::lightGray, Qt::darkGray }; } // namespace visualizer
49.569444
87
0.600448
76cc38e06854d9997606599f387ba1b4ca9a1349
441
swift
Swift
Example/Services/Floor/FloorsService.swift
MarioIannotta/Nomosi
a66a370eb5309dc5fd629f03fe5f72c675898829
[ "MIT" ]
7
2018-10-28T21:18:07.000Z
2022-01-17T06:36:41.000Z
Example/Services/Floor/FloorsService.swift
MarioIannotta/Nomosi
a66a370eb5309dc5fd629f03fe5f72c675898829
[ "MIT" ]
null
null
null
Example/Services/Floor/FloorsService.swift
MarioIannotta/Nomosi
a66a370eb5309dc5fd629f03fe5f72c675898829
[ "MIT" ]
2
2021-05-12T23:38:33.000Z
2022-01-13T11:31:02.000Z
// // FloorsService.swift // Nomosi_Example // // Created by Mario on 12/10/2018. // Copyright © 2018 Mario Iannotta. All rights reserved. // import Foundation import Nomosi // This service has not deployed yet, we'll use a mock for now class FloorsService: HarvardArtMuseumService<[Floor]> { init() { super.init(resource: "floors") self.mockProvider = self } } extension FloorsService: MockProvider { }
19.173913
62
0.680272
ea3cf147c5e0c3a8fa76818e3d90810215b44445
905
swift
Swift
Interview/Interview/String/reverseString.swift
jackfrow/algorithm
fe57530f8c093c71ee4e132d6d8b843b6d9cc70f
[ "MIT" ]
null
null
null
Interview/Interview/String/reverseString.swift
jackfrow/algorithm
fe57530f8c093c71ee4e132d6d8b843b6d9cc70f
[ "MIT" ]
null
null
null
Interview/Interview/String/reverseString.swift
jackfrow/algorithm
fe57530f8c093c71ee4e132d6d8b843b6d9cc70f
[ "MIT" ]
null
null
null
// // reverseString.swift // Interview // // Created by jackfrow on 2019/5/30. // Copyright © 2019 jackfrow. All rights reserved. // import Foundation //给出一个字符串,要求将其按照单词顺序进行反转 fileprivate func reverse<T>(_ chars: inout [T] ,_ start : Int, _ end : Int) { var start = start, end = end while start < end { swap(&chars, start, end) start += 1 end -= 1 } } fileprivate func swap<T>(_ chars: inout [T] , _ p : Int ,_ q : Int) { (chars[p], chars[q]) = (chars[q] , chars[p]) } func reverWords(s : String?) -> String? { guard let s = s else { return nil } var chars = Array(s), start = 0 reverse(&chars, 0, chars.count - 1) for i in 0 ..< chars.count { if i == chars.count - 1 || chars[i + 1] == " "{ reverse(&chars, start, i) start = i + 2 } } return String(chars) }
20.568182
78
0.528177
70e210cef7a329e966f3da84d95d60abd07d79c1
962
go
Go
types/index/Index.go
drdreyworld/ddb
2665337ea02e5751b07178e07bd626e43e7a292f
[ "MIT" ]
null
null
null
types/index/Index.go
drdreyworld/ddb
2665337ea02e5751b07178e07bd626e43e7a292f
[ "MIT" ]
null
null
null
types/index/Index.go
drdreyworld/ddb
2665337ea02e5751b07178e07bd626e43e7a292f
[ "MIT" ]
null
null
null
package index import ( "ddb/types" "ddb/types/storage" "ddb/types/query" "ddb/types/key" "ddb/types/config" ) type Index interface { Init() SetTableName(table string) GetTableName() string GetName() string SetName(name string) GenerateName(prefix string) IsTemporary() bool SetTemporaryFlag(flag bool) Add(position int, columnsKeys map[string]key.BytesKey) GetColumns() config.ColumnsConfig SetColumns(columns config.ColumnsConfig) Traverse(orderColumns map[string]string, whereCallback func(column string, value key.BytesKey) bool, callback func(positions []int) bool) bool GetColumnsForIndex(columns config.ColumnsConfig, cond types.CompareConditions, order query.Order) config.ColumnsConfig BuildIndex(storage storage.Storage) Load() error Save() error } type Indexes []Index func (i *Indexes) Load() { for ii := range (*i) { (*i)[ii].Load() } } func (i *Indexes) Save() { for ii := range (*i) { (*i)[ii].Save() } }
18.5
143
0.725572
d8f29bb1ea809a49e904938022e46c48bb5c0908
505
sql
SQL
openGaussBase/testcase/KEYWORDS/release/Opengauss_Function_Keyword_Release_Case0023.sql
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/KEYWORDS/release/Opengauss_Function_Keyword_Release_Case0023.sql
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/KEYWORDS/release/Opengauss_Function_Keyword_Release_Case0023.sql
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
-- @testpoint: opengauss关键字release非保留),作为索引名,部分测试点合理报错 --前置条件,创建一个表 drop table if exists release_test; create table release_test(id int,name varchar(10)); --关键字不带引号-成功 drop index if exists release; create index release on release_test(id); drop index release; --关键字带双引号-成功 drop index if exists "release"; create index "release" on release_test(id); drop index "release"; --关键字带单引号-合理报错 drop index if exists 'release'; --关键字带反引号-合理报错 drop index if exists `release`; drop table if exists release_test;
21.956522
54
0.770297
f512f1d180b31f6f916ac4819dacde0974f0030a
1,525
swift
Swift
Tests/Mapping/DocumentSnapshot_Spec.swift
iDonJose/FireStore
65799bf9185366e9437ab8dd7c5e13a251c193be
[ "Apache-2.0" ]
5
2019-02-03T16:15:46.000Z
2021-06-03T18:40:51.000Z
Tests/Mapping/DocumentSnapshot_Spec.swift
iDonJose/FireStore
65799bf9185366e9437ab8dd7c5e13a251c193be
[ "Apache-2.0" ]
null
null
null
Tests/Mapping/DocumentSnapshot_Spec.swift
iDonJose/FireStore
65799bf9185366e9437ab8dd7c5e13a251c193be
[ "Apache-2.0" ]
4
2019-02-04T04:47:29.000Z
2020-08-03T07:53:45.000Z
// // DocumentSnapshot_Spec.swift // FireStore-Tests-iOS // // Created by José Donor on 02/02/2019. // // swiftlint:disable force_try import FirebaseFirestore @testable import FireStore import Nimble import Quick class DocumentSnapshot_Spec: QuickSpec { override func spec() { AsyncDefaults.Timeout = 3 var collection: CollectionPath! beforeEach { collection = CollectionPath(path: "documents")! waitUntil(timeout: 5) { done in store.batchDelete(path: collection, query: nil, batchSize: 10, source: .server, completed: { _ in done() }, failed: { _ in }) } } describe("DocumentSnapshot") { describe("map(_:)") { it("maps document snapshot to the given type") { let path = collection.document(withId: "id") var car = Car.default let data = try! car.data() car.id = "id" waitUntil(timeout: 3) { done in store.save(data: data, path: path, completed: { _ in done() }, failed: { _ in }) } var mapSucceeded = false let completed: (DocumentSnapshot?) -> Void = { document in if let document = document { if let value = document.map(Car.self).a, let mappedCar = value { mapSucceeded = mappedCar == car } } } store.get(path: path, source: .server, completed: completed, failed: Error.catchError) expect(mapSucceeded).toEventually(beTrue()) } } } } }
17.528736
63
0.58623
8bf0929ab98195ce66e12a2087d75df2337f1e7b
5,860
sql
SQL
hestabook_sameer/hestabook_sameer.sql
Sameer8409/hestabook_sameer
ee595af834f1769a38bb90d7f612b223995c38d2
[ "Apache-2.0" ]
null
null
null
hestabook_sameer/hestabook_sameer.sql
Sameer8409/hestabook_sameer
ee595af834f1769a38bb90d7f612b223995c38d2
[ "Apache-2.0" ]
null
null
null
hestabook_sameer/hestabook_sameer.sql
Sameer8409/hestabook_sameer
ee595af834f1769a38bb90d7f612b223995c38d2
[ "Apache-2.0" ]
null
null
null
-- Adminer 4.6.1 MySQL dump SET NAMES utf8; SET time_zone = '+00:00'; SET foreign_key_checks = 0; SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; USE `hestabook_sameer`; DROP TABLE IF EXISTS `feed`; CREATE TABLE `feed` ( `id` int(10) NOT NULL AUTO_INCREMENT, `post_id` int(10) NOT NULL, `email` varchar(30) NOT NULL, PRIMARY KEY (`id`), KEY `email` (`email`), KEY `post_id` (`post_id`), CONSTRAINT `feed_ibfk_2` FOREIGN KEY (`email`) REFERENCES `user` (`email`), CONSTRAINT `feed_ibfk_3` FOREIGN KEY (`post_id`) REFERENCES `post` (`post_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO `feed` (`id`, `post_id`, `email`) VALUES (13, 13, 'sam@gmail.com'), (14, 14, 'sameer@gmail.com'), (15, 15, 'sameer@gmail.com'), (16, 16, 'sameer@gmail.com'), (17, 17, 'sameer@gmail.com'), (18, 18, 'sameer@gmail.com'), (19, 19, 'sameer@gmail.com'), (22, 22, 'sameer@gmail.com'), (23, 23, 'sameer@gmail.com'), (24, 24, 'sameer@gmail.com'), (25, 25, 'sameer@gmail.com'); DROP TABLE IF EXISTS `loggedin`; CREATE TABLE `loggedin` ( `serial` int(10) NOT NULL AUTO_INCREMENT, `email` varchar(30) NOT NULL, PRIMARY KEY (`serial`), KEY `email` (`email`), CONSTRAINT `loggedin_ibfk_1` FOREIGN KEY (`email`) REFERENCES `user` (`email`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO `loggedin` (`serial`, `email`) VALUES (9, 'akash@gmail.com'), (25, 'sam@gmail.com'), (35, 'sameer@gmail.com'), (36, 'sameer@gmail.com'), (37, 'sameer@gmail.com'), (33, 'xyz@gmail.com'); DROP TABLE IF EXISTS `post`; CREATE TABLE `post` ( `post_id` int(10) NOT NULL AUTO_INCREMENT, `post_data` varchar(250) NOT NULL, `post_type` int(1) NOT NULL, `post_time` datetime NOT NULL, PRIMARY KEY (`post_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO `post` (`post_id`, `post_data`, `post_type`, `post_time`) VALUES (1, 'sdfhdfghdfgfg', 1, '2018-03-22 23:11:01'), (2, 'my first post', 1, '2018-03-23 06:52:57'), (3, 'https://pbs.twimg.com/profile_images/927446347879292930/Fi0D7FGJ_400x400.jpg', 0, '2018-03-23 06:56:29'), (4, 'https://pbs.twimg.com/profile_images/927446347879292930/Fi0D7FGJ_bigger.jpg', 0, '2018-03-23 07:03:11'), (5, 'this is new post', 1, '2018-03-23 09:32:16'), (6, 'asdfghjksdfghjkdfghjk', 1, '2018-03-23 10:14:49'), (7, 'ashdvashdvahsdas', 1, '2018-03-23 12:48:33'), (8, 'hello sameer', 1, '2018-03-23 16:05:12'), (9, 'asdfghjklkjh gfg hjklkjhgfgh jklkjhgf', 1, '2018-03-23 16:34:10'), (10, 'fghjkxdfghjdfghj', 1, '2018-03-26 09:34:42'), (11, 'hdjhcgsgdhjbdghjbfhfdh fjk hgfdhbhdgh', 1, '2018-03-26 11:16:09'), (12, 'dyujgfgh fghjdfgh guytygtiu', 1, '2018-03-26 14:42:46'), (13, 'Test post', 1, '2018-03-26 14:49:58'), (14, 'bhdghb hhj ghbhdg hs hhb sdjhfjsdjhjhfsjdhf', 1, '2018-03-27 00:14:24'), (15, 'jhdshsdhgsgdyyg hsguyghdsghsg gdhsh hj dh', 1, '2018-03-27 11:11:11'), (16, 'gfg jgh hg', 1, '2018-03-27 11:16:10'), (17, 'jksdgysgub gdyu yuuhg ysdgyc gydgydy', 1, '2018-03-27 12:20:09'), (18, 'jhhshhhjhjhjh bssjbj', 1, '2018-03-27 12:21:53'), (19, 'hg g gasdgyA GA SGASAS T GS ADAS Y', 1, '2018-03-27 12:30:12'), (21, 'saghga fgvgvgsbvsdha', 1, '2018-03-27 17:11:20'), (22, 'jhxdxggfhg f h fjdh', 1, '2018-03-27 17:11:40'), (23, '', 1, '2018-03-28 12:07:45'), (24, '', 1, '2018-03-28 12:09:52'), (25, '', 1, '2018-03-29 00:13:51'); DROP TABLE IF EXISTS `user`; CREATE TABLE `user` ( `user_id` int(10) NOT NULL AUTO_INCREMENT, `name` varchar(15) NOT NULL, `gender` char(6) NOT NULL, `mobile` bigint(10) NOT NULL, `email` varchar(30) NOT NULL, `address` varchar(250) NOT NULL, `dob` date NOT NULL, `password` varchar(16) NOT NULL, `Description` tinytext, `picture` varchar(255) DEFAULT NULL, PRIMARY KEY (`user_id`), UNIQUE KEY `email` (`email`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO `user` (`user_id`, `name`, `gender`, `mobile`, `email`, `address`, `dob`, `password`, `Description`, `picture`) VALUES (2, 'sameer', 'male', 0, 'sameer@gmail.com', '', '1970-01-01', 'qwe', 'Hellow', ''), (3, 'Kavish', 'male', 0, 'kavish@gmail.com', '', '1970-01-01', '123', 'I am a developer', ''), (4, 'akash', 'qqeqww', 0, 'akash@gmail.com', '', '1970-01-01', '12345', '', ''), (5, 'bhawna', 'female', 0, 'bhawna@gmail.com', '', '1970-01-01', '123', 'jhjj', ''), (7, 'Bhawna Sagar', 'f', 0, 'bhawnasagar@gmail.com', '', '1970-01-01', '123', 'dfghjdfghjkfghj', ''), (8, 'sam', 'male', 4567890345, 'sam@gmail.com', 'a 45 gnhv', '2018-03-05', '123456', 'rty fghj vhg hg hvh jhvk', '/var/www/html/hestabookproject/photo/'), (13, 'sameer', 'male', -764836282, 'xyz@gmail.com', 'fjnjhsjjh', '2018-03-14', '123456', 'dfghjkl', '/var/www/html/hestabookproject/photo/'), (14, 'fghj', 'male', -45678567, 'hgh@fgh.fgh', 'ghjk', '2018-03-26', '123456', 'dfghjk', '/var/www/html/hestabookproject/photo/'), (15, 'Sam', 'female', 7474847836, 'pk@gmail.com', 'sdfghj', '2018-03-20', '123456', 'dfghjsuhusgd ygyu yd', '/var/www/html/hestabookproject/photo/'), (16, 'sam', 'male', 34567890, '123@gmail.com', 'dfghjk', '2018-03-12', '123456', 'ertyughj', '/var/www/html/hestabookproject/photo/'), (18, 'hxhz', '', 0, 'acs@jhgh.jh', 'hjk', '1970-01-01', 'uyg', '', '/var/www/html/hestabookproject/photo/'), (21, 'yghjkl', 'male', 3456789, 'acs@jhgh.jhjscs', 'ghjkl', '2018-03-06', 'uyg', '', '/var/www/html/hestabookproject/photo/'), (22, 'kav', 'male', 56432134, 'kav@kav.kav', 'aasdfg', '1994-02-21', 'abcabc', 'fgdsa', '/var/www/html/hestabookproject/photo/'), (23, '', 'male', 0, '', '', '1970-01-01', '', '', '/var/www/html/hestabookproject/photo/'), (25, '', 'male', 0, 'kas@ghj.gh', '', '1970-01-01', '', '', '/var/www/html/hestabookproject/photo/'), (26, '', 'male', 0, 'fgyu@ghj.dg', '', '1970-01-01', '', '', '/var/www/html/hestabookproject/photo/'), (27, 'sameer', 'male', 536474676482, 'xvc@gmail.com', ' mn', '2018-03-13', '1234556', '', '/var/www/html/hestabookproject/photo/'); -- 2018-03-29 06:53:13
47.642276
154
0.637031
d1cf33783b53db53530c3c576d3161436f7d8292
771
asm
Assembly
oeis/177/A177728.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/177/A177728.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/177/A177728.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A177728: Expansion of (1 + 14*x) / ((1 - x)*(1 - 2*x)*(1 - 4*x)*(1 - 8*x)*(1 - 16*x)). ; Submitted by Christian Krause ; 1,45,1085,20925,366141,6120765,100080445,1618667325,26038501181,417737748285,6692790374205,107156587499325,1715081133346621,27445904805580605,439171333486530365,7027036201446788925,112434938199985606461,1798977883220621905725,28783797108521397636925,460541961555572465848125,7368681047456194405584701,117898974059888166630051645,1886384203363134221371821885,30182152201050380409073028925,482914474794731327181611585341,7726631913339116670795675586365,123626113146413244263044385853245 mov $2,$0 add $2,1 mov $3,$0 lpb $2 mov $0,$3 seq $0,28258 ; Expansion of 1/((1-2*x)*(1-4*x)(1-8*x)(1-16*x)). div $1,2 add $1,$0 sub $2,1 lpe mov $0,$1
48.1875
486
0.780804
2d79248f58298c46fe0de10d3dc8befdde62e06c
27
sql
SQL
migrations/post/000001_create_posts_table.down.sql
Andylixunan/blog-microservices
2743dfd84b809a399848c43f51c33ff18e37825f
[ "MIT" ]
83
2021-12-24T11:02:37.000Z
2022-03-26T15:00:40.000Z
migrations/post/000001_create_posts_table.down.sql
Andylixunan/blog-microservices
2743dfd84b809a399848c43f51c33ff18e37825f
[ "MIT" ]
5
2021-12-29T06:09:42.000Z
2022-03-24T06:26:08.000Z
migrations/post/000001_create_posts_table.down.sql
Andylixunan/blog-microservices
2743dfd84b809a399848c43f51c33ff18e37825f
[ "MIT" ]
19
2021-12-27T05:25:45.000Z
2022-03-04T17:00:08.000Z
drop table if exists posts;
27
27
0.814815
41187f2d8369b03c2702d0e38aa1fc895e21b589
2,322
h
C
monty.h
ralexrivero/monty
f1b2dfef4e8ff4b0ef9a74f4cf9c05281a19623e
[ "Apache-2.0" ]
1
2021-09-19T04:09:42.000Z
2021-09-19T04:09:42.000Z
monty.h
ralexrivero/monty
f1b2dfef4e8ff4b0ef9a74f4cf9c05281a19623e
[ "Apache-2.0" ]
null
null
null
monty.h
ralexrivero/monty
f1b2dfef4e8ff4b0ef9a74f4cf9c05281a19623e
[ "Apache-2.0" ]
2
2022-01-04T03:49:13.000Z
2022-01-13T18:25:01.000Z
#ifndef MONTY_H #define MONTY_H #define _POSIX_C_SOURCE 200809L /* libraries */ #include <stdio.h> #include <stdlib.h> /* exit status */ #include <unistd.h> #include <string.h> #include <stdbool.h> #define DELIM "\t\n " /** * struct stack_s - doubly linked list representation of a stack (or queue) * @n: integer * @prev: points to the previous element of the stack (or queue) * @next: points to the next element of the stack (or queue) * * Description: doubly linked list node structure * for stack, queues, LIFO, FIFO */ typedef struct stack_s { int n; struct stack_s *prev; struct stack_s *next; } stack_t; /** * struct instruction_s - opcode and its function * @opcode: the opcode * @f: function to handle the opcode * * Description: opcode and its function * for stack, queues, LIFO, FIFO */ typedef struct instruction_s { char *opcode; void (*f)(stack_t **stack, unsigned int line_number); } instruction_t; /** * struct glovar - global variable structs * @stackorqueue: value to switch between modes * Description: global variables to switch mode */ struct glovar { int stackorqueue; } glovar_t; /* prototypes */ void readfile(FILE *fp); bool push_validate(char *push_value, int line_n); int get_opcode(const char *opcode, stack_t **stack, unsigned int line_number); void free_stack(stack_t *stack); size_t lililen(stack_t **stack); /* function prototypes for opcodes */ void push(stack_t **stack, unsigned int line_number, int push_value); void pall(stack_t **stack, unsigned int line_number); void pint(stack_t **stack, unsigned int line_number); void pop(stack_t **stack, unsigned int line_number); void swap(stack_t **stack, unsigned int line_number); void nop(stack_t **stack, unsigned int line_number); void add(stack_t **stack, unsigned int line_number); void sub(stack_t **stack, unsigned int line_mnumber); void mul(stack_t **stack, unsigned int line_number); void _div(stack_t **stack, unsigned int line_number); void mod(stack_t **stack, unsigned int line_number); void rotl(stack_t **stack, unsigned int line_number); void rotr(stack_t **stack, unsigned int line_number); void pchar(stack_t **stack, unsigned int n); void pstr(stack_t **stack, unsigned int n); void stk(stack_t **stack, unsigned int n); void queue(stack_t **stack, unsigned int n); #endif /* MONTY_H */
28.317073
78
0.735142
bb88717815a62f589b2e21254780a0557b8c0ad6
1,309
kt
Kotlin
app/src/main/java/com/maproductions/mohamedalaa/shoestore/view_model/WelcomeViewModel.kt
MohamedAlaaEldin636/shoe-shop
2acf61e44be6be68c54b739f5b7bdff1e02250b2
[ "Apache-2.0" ]
null
null
null
app/src/main/java/com/maproductions/mohamedalaa/shoestore/view_model/WelcomeViewModel.kt
MohamedAlaaEldin636/shoe-shop
2acf61e44be6be68c54b739f5b7bdff1e02250b2
[ "Apache-2.0" ]
null
null
null
app/src/main/java/com/maproductions/mohamedalaa/shoestore/view_model/WelcomeViewModel.kt
MohamedAlaaEldin636/shoe-shop
2acf61e44be6be68c54b739f5b7bdff1e02250b2
[ "Apache-2.0" ]
null
null
null
/* * Copyright (c) 2019 Mohamed Alaa * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and limitations under the License. */ package com.maproductions.mohamedalaa.shoestore.view_model import android.app.Application import android.view.View import androidx.lifecycle.AndroidViewModel import androidx.navigation.findNavController import com.maproductions.mohamedalaa.shoestore.R import com.maproductions.mohamedalaa.shoestore.shared_pref.sharedPref_HiddenSettings_SetShowWelcomeScreen import mohamedalaa.mautils.core_android.extensions.application class WelcomeViewModel(application: Application) : AndroidViewModel(application) { fun onGetStartedClick(view: View) { application.sharedPref_HiddenSettings_SetShowWelcomeScreen(false) view.findNavController().navigate(R.id.action_global_instructions_dest) } }
37.4
105
0.797555
dd259c9561243a7c6959b6c7204b99636a079928
720
go
Go
user-service/server/router.go
kaatinga/blazewall
5d0a3c6e46aa802346d02ecd36bbd0a5676a7b88
[ "Apache-2.0" ]
12
2019-10-16T16:22:25.000Z
2022-01-15T17:54:02.000Z
user-service/server/router.go
kaatinga/blazewall
5d0a3c6e46aa802346d02ecd36bbd0a5676a7b88
[ "Apache-2.0" ]
1
2019-10-17T10:14:10.000Z
2019-10-17T10:14:10.000Z
user-service/server/router.go
kaatinga/blazewall
5d0a3c6e46aa802346d02ecd36bbd0a5676a7b88
[ "Apache-2.0" ]
3
2020-01-25T22:57:04.000Z
2021-11-09T00:37:12.000Z
package server import ( "github.com/gin-gonic/gin" "github.com/maximthomas/blazewall/user-service/controllers" ) func SetupRouter() *gin.Engine { uc := controllers.GetUserController() return SetupRouterWithController(uc) } func SetupRouterWithController(uc controllers.UserController) *gin.Engine { router := gin.Default() v1 := router.Group("/user-service/v1") { users := v1.Group("/users") { users.GET("/:realm/:id", uc.GetUser) users.POST("", uc.CreateUser) users.PUT("/:realm/:id", uc.UpdateUser) users.DELETE("/:realm/:id", uc.DeleteUser) users.POST("/:realm/:id/setpassword", uc.SetPassword) users.POST("/:realm/:id/validatepassword", uc.ValidatePassword) } } return router }
23.225806
75
0.701389
b99f7fe8bcb5fc3e602294ab72225b03dc730a17
813
c
C
change_char.c
alinegrance/c_projects
98be5d8c41fb6e7a8622403f9496ee0d9ef98079
[ "MIT" ]
null
null
null
change_char.c
alinegrance/c_projects
98be5d8c41fb6e7a8622403f9496ee0d9ef98079
[ "MIT" ]
null
null
null
change_char.c
alinegrance/c_projects
98be5d8c41fb6e7a8622403f9496ee0d9ef98079
[ "MIT" ]
null
null
null
#include <stdio.h> #include <string.h> int main() { FILE* file; char old, new, cursor; int replaced_char = 0; file = fopen("texto_original.txt", "r+"); if(file == NULL) { printf("error.\n"); return -1; } else { //printf("Success.\n"); printf("char to be replaced: "); scanf(" %c", &old); printf("Char to put instead: "); scanf(" %c", &new); while(!feof(file)) { cursor = getc(file); if(cursor == old) { replaced_char++; fseek(file, -1 * sizeof(char), SEEK_CUR); putc(new, file); fflush(file); } } fclose(file); printf("Number of replaced characters: %d", replaced_char); } return 0; }
23.228571
67
0.460025
2469e4b7ef9fe573084f6470c67a3bf66178a548
7,026
swift
Swift
Sources/CombineBonjour/NWBrowserPublisher.swift
luizmb/CombineBonjour
aea5bb76036549620a0d91a4a066ab2fcf8bd03d
[ "MIT" ]
null
null
null
Sources/CombineBonjour/NWBrowserPublisher.swift
luizmb/CombineBonjour
aea5bb76036549620a0d91a4a066ab2fcf8bd03d
[ "MIT" ]
null
null
null
Sources/CombineBonjour/NWBrowserPublisher.swift
luizmb/CombineBonjour
aea5bb76036549620a0d91a4a066ab2fcf8bd03d
[ "MIT" ]
null
null
null
// // NetworkServiceBrowser.swift // CombineBonjour // // Created by Thomas Mellenthin on 08.04.21. // Copyright © 2020 Lautsprecher Teufel GmbH. All rights reserved. // import Network import Combine import Foundation import NetworkExtensions extension NWBrowser { public var publisher: NWBrowserPublisher { .init(browser: self) } } public struct NWBrowserPublisher { private let browser: NWBrowser public init(browser: NWBrowser) { self.browser = browser } public init( serviceType: String, domain: String?, params: NWParameters = .tcp ) { self.browser = NWBrowser( for: NWBrowser.Descriptor.bonjourWithTXTRecord( type: serviceType, domain: domain ), using: params ) } public init( serviceDescription: ServiceDescription, params: NWParameters = .tcp ) { self.browser = NWBrowser( for: NWBrowser.Descriptor.bonjourWithTXTRecord( type: serviceDescription.serviceName, domain: serviceDescription.domain ), using: params ) } } extension NWBrowserPublisher: Publisher { public typealias Output = Event public typealias Failure = NWBrowserError public func receive<S>(subscriber: S) where S: Subscriber, Failure == S.Failure, Output == S.Input { let subscription = Subscription( subscriber: subscriber, browser: browser ) subscriber.receive(subscription: subscription) } } extension NWBrowserPublisher { private class Subscription<SubscriberType: Subscriber>: Combine.Subscription where SubscriberType.Input == Output, SubscriberType.Failure == Failure { private var buffer: DemandBuffer<SubscriberType>? private let browser: NWBrowser // We need a lock to update the state machine of this Subscription private let lock = NSRecursiveLock() // The state machine here is only a boolean checking if the bonjour is browsing or not // If should start browsing when there's demand for the first time (not necessarily on subscription) // Only demand starts the side-effect, so we have to be very lazy and postpone the side-effects as much as possible private var started: Bool = false init(subscriber: SubscriberType, browser: NWBrowser) { self.browser = browser self.buffer = DemandBuffer(subscriber: subscriber) browser.stateUpdateHandler = .some({ [weak self] state in switch state { case .setup: break case .ready: break case let .failed(error): self?.handleError(error: error) case .cancelled: break case let .waiting(error): self?.handleError(error: error) @unknown default: break } }) browser.browseResultsChangedHandler = .some({ [weak self] (_ , changes: Set<NWBrowser.Result.Change>) in changes.forEach { change in guard let strongSelf = self else { return } switch change { case .identical: break case let .added(result): strongSelf.serviceAdded(result: result) case let .removed(result): strongSelf.serviceRemoved(result: result) case .changed(old: let old, new: let new, flags: let flags): strongSelf.serviceChanged(from: old, to: new, with: flags) @unknown default: break } } }) } public func request(_ demand: Subscribers.Demand) { guard let buffer = self.buffer else { return } lock.lock() if !started && demand > .none { // There's demand, and it's the first demanded value, so we start browsing started = true lock.unlock() start() } else { lock.unlock() } // Flush buffer // If subscriber asked for 10 but we had only 3 in the buffer, it will return 7 representing the remaining demand // We actually don't care about that number, as once we buffer more items they will be flushed right away, so simply ignore it _ = buffer.demand(demand) } public func cancel() { buffer = nil started = false stop() } private func start() { browser.start(queue: .main) } private func stop() { browser.cancel() } // MARK: - NWBrowser helpers private func serviceAdded(result: NWBrowser.Result) { // we now can emit that we've found a service, but we may need to resolve it _ = buffer?.buffer(value: .didFind(endpoint: result.endpoint, txt: result.metadata.txt)) } private func serviceRemoved(result: NWBrowser.Result) { _ = buffer?.buffer(value: .didRemove(endpoint: result.endpoint, txt: result.metadata.txt)) } private func serviceChanged(from old: NWBrowser.Result, to new: NWBrowser.Result, with flags: NWBrowser.Result.Change.Flags) { _ = buffer?.buffer(value: .didUpdate(oldEndpoint: old.endpoint, newEndpoint: new.endpoint, txt: new.metadata.txt, flags: flags)) } private func handleError(error: NWError) { if case let .dns(dnsServiceErrorType) = error, dnsServiceErrorType == kDNSServiceErr_PolicyDenied { _ = buffer?.complete(completion: .failure(.bonjourPermissionDenied)) } else { _ = buffer?.complete(completion: .failure(.didNotSearch(error: error))) } } } } // MARK: - Model extension NWBrowserPublisher { public enum Event { /// A service was found. case didFind(endpoint: NWEndpoint, txt: [String: String]?) /// A previously discovered service is no longer published. case didRemove(endpoint: NWEndpoint, txt: [String: String]?) /// A previously discovered service changed. Usually this means, it was discovered or removed on another network interface. See flags. case didUpdate(oldEndpoint: NWEndpoint, newEndpoint: NWEndpoint, txt: [String: String]?, flags: NWBrowser.Result.Change.Flags) } public enum NWBrowserError: Error { /// The user needs to grant the app permissions to discover devices in the network. case bonjourPermissionDenied /// Any other error that can happen during discovery case didNotSearch(error: NWError) } }
34.782178
142
0.583974
500886cc2503a6fb73c2116de9c0a072e2dc67b6
422
asm
Assembly
oeis/299/A299920.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/299/A299920.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/299/A299920.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A299920: Motzkin numbers (A001006) mod 6. ; Submitted by Christian Krause ; 1,1,2,4,3,3,3,1,5,1,4,2,1,3,0,0,3,3,0,0,3,3,3,3,3,1,2,4,1,5,1,3,3,3,4,2,1,1,5,1,3,3,0,0,3,3,0,0,3,3,0,0,3,3,3,3,3,3,0,0,3,3,0,0,3,3,0,0,3,3,3,3,3,3,0,0,3,3,0,4,5,1,4,2,1,3,3,3,1,5,4,4,5,1,3,3,3,3,0,0 seq $0,1006 ; Motzkin numbers: number of ways of drawing any number of nonintersecting chords joining n (labeled) points on a circle. mod $0,6
60.285714
201
0.635071
9d3b15372238d6ce5692e060b756cb5239163fb9
201
html
HTML
client/src/app/app.component.html
ErwanLT/eweatherApp
5a89160e8d290cc781f86c90cf7635afaa5f5cbd
[ "MIT" ]
null
null
null
client/src/app/app.component.html
ErwanLT/eweatherApp
5a89160e8d290cc781f86c90cf7635afaa5f5cbd
[ "MIT" ]
3
2019-12-19T12:23:23.000Z
2021-04-26T19:12:17.000Z
client/src/app/app.component.html
ErwanLT/eweatherApp
5a89160e8d290cc781f86c90cf7635afaa5f5cbd
[ "MIT" ]
1
2019-05-23T06:27:06.000Z
2019-05-23T06:27:06.000Z
<app-form (forecast)="setForecast($event)"></app-form> <div *ngIf="display" class="container"> <app-forecast *ngIf="forecast" [forecast]="forecast"></app-forecast> </div> <app-footer></app-footer>
25.125
70
0.681592
36126ddbd3eb3e0f31aab104012b4cb58d323124
568
swift
Swift
FutureProofing/CoreData/NSPersistentStoreCoordinator.swift
Thomvis/FutureProofing
2d5c240dac1c71a6e4bca71834cf8448a6ea2e73
[ "MIT" ]
38
2015-01-23T01:12:42.000Z
2021-06-03T18:54:41.000Z
FutureProofing/CoreData/NSPersistentStoreCoordinator.swift
Thomvis/FutureProofing
2d5c240dac1c71a6e4bca71834cf8448a6ea2e73
[ "MIT" ]
8
2015-08-30T13:56:04.000Z
2021-07-12T22:19:34.000Z
FutureProofing/CoreData/NSPersistentStoreCoordinator.swift
Thomvis/FutureProofing
2d5c240dac1c71a6e4bca71834cf8448a6ea2e73
[ "MIT" ]
9
2015-08-30T10:16:28.000Z
2019-06-06T20:00:46.000Z
// // NSPersistentStoreCoordinator.swift // FutureProofing // // Created by phimage on 29/09/16. // Copyright © 2016 Thomas Visser. All rights reserved. // import CoreData import BrightFutures @available(iOS 10.0, *) @available(OSX 10.12, *) @available(tvOS 10.0, *) extension NSPersistentStoreCoordinator { open func addPersistentStore(with storeDescription: NSPersistentStoreDescription) -> Future<NSPersistentStoreDescription, AnyError> { return materialize { self.addPersistentStore(with: storeDescription, completionHandler: $0) } } }
25.818182
137
0.744718
ae8ee8d9dd3669bc303c4c0be47f927971cfb2f4
3,896
swift
Swift
PyrobaseTests/PlistReaderTest.swift
CenoX/pyrobase
6778e5dd88bc6dbe7389a36ec820966d8d3a8319
[ "MIT" ]
null
null
null
PyrobaseTests/PlistReaderTest.swift
CenoX/pyrobase
6778e5dd88bc6dbe7389a36ec820966d8d3a8319
[ "MIT" ]
null
null
null
PyrobaseTests/PlistReaderTest.swift
CenoX/pyrobase
6778e5dd88bc6dbe7389a36ec820966d8d3a8319
[ "MIT" ]
null
null
null
// // PlistReaderTest.swift // Pyrobase // // Created by Mounir Ybanez on 09/06/2017. // Copyright © 2017 Ner. All rights reserved. // import XCTest @testable import Pyrobase class PlistReaderTest: XCTestCase { func testInitWithErrorNotFound() { let resource = PlistReaderResourceMock() let content = PlistReaderContentMock() let format = PropertyListSerialization.PropertyListFormat.xml let serialization = PropertyListSerialization.self let isSucceeded: Bool resource.expectedPath = nil do { let _ = try PlistReader(name: "", resource: resource, content: content, format: format, serialization: serialization) isSucceeded = false } catch PlistReaderError.notFound { isSucceeded = true } catch { isSucceeded = false } XCTAssertTrue(isSucceeded) } func testInitWithErrorNoContent() { let resource = PlistReaderResourceMock() let content = PlistReaderContentMock() let format = PropertyListSerialization.PropertyListFormat.xml let serialization = PropertyListSerialization.self let isSucceeded: Bool resource.expectedPath = "path" content.expectedData = nil do { let _ = try PlistReader(name: "", resource: resource, content: content, format: format, serialization: serialization) isSucceeded = false } catch PlistReaderError.noContent { isSucceeded = true } catch { isSucceeded = false } XCTAssertTrue(isSucceeded) } func testInitWithErrorUnreadable() { let resource = PlistReaderResourceMock() let content = PlistReaderContentMock() let format = PropertyListSerialization.PropertyListFormat.xml let serialization = PlistSerializationMock.self let isSucceeded: Bool resource.expectedPath = "path" content.expectedData = Data(bytes: [1,2,3]) serialization.expectedInfo = nil do { let _ = try PlistReader(name: "", resource: resource, content: content, format: format, serialization: serialization) isSucceeded = false } catch PlistReaderError.unreadable { isSucceeded = true } catch { isSucceeded = false } XCTAssertTrue(isSucceeded) } func testInitWithNoErrors() { let resource = PlistReaderResourceMock() let content = PlistReaderContentMock() let format = PropertyListSerialization.PropertyListFormat.xml let serialization = PlistSerializationMock.self let isSucceeded: Bool resource.expectedPath = "path" content.expectedData = Data(bytes: [1,2,3]) serialization.expectedInfo = ["name": "Nina"] do { let reader = try PlistReader(name: "", resource: resource, content: content, format: format, serialization: serialization) XCTAssertNotNil(reader.data) XCTAssertTrue(reader.data is [String: String]) let readerInfo = reader.data as! [String: String] XCTAssertEqual(readerInfo.count, 1) XCTAssertEqual(readerInfo["name"], "Nina") isSucceeded = true } catch { isSucceeded = false } XCTAssertTrue(isSucceeded) } func testCreate() { let bundle = Bundle(for: type(of: self)) var reader = PlistReader.create(name: "PlistReaderSample", bundle: bundle) XCTAssertNotNil(reader) reader = PlistReader.create(name: "PlistReader-NonExisting") XCTAssertNil(reader) } }
31.934426
134
0.600873
3906249b3cadfc79e14766af06e4ca2c99eb7206
751
kt
Kotlin
kotlin/src/main/java/com/samelody/samples/kotlin/algorithms/quicksortInts.kt
belinwu/android-samples
dce2b98cb031df6bbf04cfc576541a2d96134b5d
[ "Apache-2.0" ]
1
2020-04-18T15:28:55.000Z
2020-04-18T15:28:55.000Z
kotlin/src/main/java/com/samelody/samples/kotlin/algorithms/quicksortInts.kt
belinwu/android-samples
dce2b98cb031df6bbf04cfc576541a2d96134b5d
[ "Apache-2.0" ]
null
null
null
kotlin/src/main/java/com/samelody/samples/kotlin/algorithms/quicksortInts.kt
belinwu/android-samples
dce2b98cb031df6bbf04cfc576541a2d96134b5d
[ "Apache-2.0" ]
null
null
null
package com.samelody.samples.kotlin.algorithms import com.samelody.samples.kotlin.swapAt fun IntArray.partition(low: Int, high: Int): Int { val pivot = this[low] var i = low - 1 var j = high + 1 while (true) { do { j -= 1 } while (this[j] > pivot) do { i += 1 } while (this[i] < pivot) if (i < j) swapAt(i, j) else return j } } fun IntArray.quicksort(low: Int, high: Int) { if (low >= high) return val pivot = partition(low, high) quicksort(low, pivot) quicksort(pivot + 1, high) } fun main() { val ints = intArrayOf(12, 0, 3, 9, 2, 21, 18, 27, 1, 5, 8, -1, 8) ints.forEach { print("$it ") } ints.quicksort(0, ints.size - 1) println() ints.forEach { print("$it ") } }
25.896552
69
0.57257
70ffb5613dde6b37f502285264d93e40cdb16fe6
3,949
go
Go
api/dispatch_api.go
zpsean/go4api
4a878a609d184d335a7879b1603a99f4d0dbfbd0
[ "MIT" ]
54
2018-08-06T08:45:28.000Z
2021-11-16T03:36:42.000Z
api/dispatch_api.go
zpsean/go4api
4a878a609d184d335a7879b1603a99f4d0dbfbd0
[ "MIT" ]
1
2018-09-11T16:39:46.000Z
2020-08-31T06:47:59.000Z
api/dispatch_api.go
zpsean/go4api
4a878a609d184d335a7879b1603a99f4d0dbfbd0
[ "MIT" ]
8
2019-01-10T02:59:38.000Z
2021-07-07T18:55:14.000Z
/* * go4api - an api testing tool written in Go * Created by: Ping Zhu 2018 * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * */ package api import ( // "fmt" "time" "sync" // "go4api/cmd" "go4api/lib/testcase" ) func DispatchApi(wg *sync.WaitGroup, resultsExeChan chan testcase.TestCaseExecutionInfo, baseUrl string, tcData *testcase.TestCaseDataInfo) { // ----------- defer wg.Done() tcDataStore := InitTcDataStore(tcData) tcSetUpResult, setUpTestMessages := tcDataStore.RunTcSetUp() // start_time := time.Now() start_str := start_time.Format("2006-01-02 15:04:05.999999999") var httpResult string var httpTestMessages []*testcase.TestMessage if IfValidHttp(tcData) == true { httpResult, httpTestMessages = tcDataStore.RunHttp(baseUrl) if httpResult == "Success" { tcDataStore.HandleHttpResultsForOut() } } else { httpResult = "NoHttp" tcDataStore.HttpActualStatusCode = 999 } end_time := time.Now() end_str := end_time.Format("2006-01-02 15:04:05.999999999") // tearDown tcTearDownResult, tearDownTestMessages := tcDataStore.RunTcTearDown() testResult := "Success" if tcSetUpResult == "Fail" || httpResult == "Fail" || tcTearDownResult == "Fail" { testResult = "Fail" } // get the TestCaseExecutionInfo tcExecution := testcase.TestCaseExecutionInfo { TestCaseDataInfo: tcDataStore.TcData, SetUpResult: tcSetUpResult, SetUpTestMessages: setUpTestMessages, HttpResult: httpResult, ActualStatusCode: tcDataStore.HttpActualStatusCode, StartTime: start_str, EndTime: end_str, HttpTestMessages: httpTestMessages, StartTimeUnixNano: start_time.UnixNano(), EndTimeUnixNano: end_time.UnixNano(), DurationUnixNano: end_time.UnixNano() - start_time.UnixNano(), ActualBody: tcDataStore.HttpActualBody, ActualHeader: tcDataStore.HttpActualHeader, HttpUrl: tcDataStore.HttpUrl, TearDownResult: tcTearDownResult, TearDownTestMessages: tearDownTestMessages, TestResult: testResult, LocalVariables: tcDataStore.TcLocalVariables, } // (6). write the channel to executor for scheduler and log resultsExeChan <- tcExecution } func IfValidHttp (tcData *testcase.TestCaseDataInfo) bool { ifValidHttp := true if tcData.TestCase.Request() == nil { ifValidHttp = false } return ifValidHttp } // Note: for each SetUp, TesrDown, it may have more than one Command (including sql) // for each Command, it may have more than one assertion func (tcDataStore *TcDataStore) RunTcSetUp () (string, [][]*testcase.TestMessage) { var finalResults string var finalTestMessages = [][]*testcase.TestMessage{} cmdGroup := tcDataStore.TcData.TestCase.SetUp() if len(cmdGroup) > 0 { tcDataStore.CmdGroupLength = len(cmdGroup) tcDataStore.CmdSection = "setUp" finalResults, finalTestMessages = tcDataStore.CommandGroup(cmdGroup) } else { finalResults = "NoSetUp" } return finalResults, finalTestMessages } func (tcDataStore *TcDataStore) RunTcTearDown () (string, [][]*testcase.TestMessage) { var finalResults string var finalTestMessages = [][]*testcase.TestMessage{} cmdGroup := tcDataStore.TcData.TestCase.TearDown() if len(cmdGroup) > 0 { tcDataStore.CmdGroupLength = len(cmdGroup) tcDataStore.CmdSection = "tearDown" finalResults, finalTestMessages = tcDataStore.CommandGroup(cmdGroup) } else { finalResults = "NoTearDown" } return finalResults, finalTestMessages }
30.851563
141
0.666751
a1de32b7a2aa5d618c7a778d6c81ec501f7f8aa9
1,210
h
C
wfouttoexcelApp.h
mikewolfli/wfouttoexcel
6818774639b464f16c3e402af9c9f06634402957
[ "Unlicense" ]
null
null
null
wfouttoexcelApp.h
mikewolfli/wfouttoexcel
6818774639b464f16c3e402af9c9f06634402957
[ "Unlicense" ]
null
null
null
wfouttoexcelApp.h
mikewolfli/wfouttoexcel
6818774639b464f16c3e402af9c9f06634402957
[ "Unlicense" ]
null
null
null
/*************************************************************** * Name: wfouttoexcelApp.h * Purpose: Defines Application Class * Author: () * Created: 2014-03-27 * Copyright: () * License: **************************************************************/ #ifndef WFOUTTOEXCELAPP_H #define WFOUTTOEXCELAPP_H #include <wx/app.h> #include "interface/wxPostgreSQL.h" #include "pugixml.hpp" typedef struct prog_para { wxString login_user; wxString login_role; wxString login_user_name; wxString plant; wxString lang_info; bool login_status; wxDateTime login_datetime; wxString server_host; wxString server_port; wxString server_dbname; wxString local_user; wxString local_ip; wxString local_pc_name; } para; extern para gr_para; class wfouttoexcelApp : public wxApp { public: virtual bool OnInit(); virtual int OnExit(); bool read_para(); wxPostgreSQL* conn; bool app_sql_update(wxString &_query);//include insert and update) wxPostgreSQLresult * app_sql_select(wxString & _query); private: wxString conn_str; }; DECLARE_APP(wfouttoexcelApp) #endif // WFOUTTOEXCELAPP_H
22.407407
74
0.618182
f042f18d33f05c333a291d256763c607089f137e
214
py
Python
answers/easy/single-number.py
kigawas/lintcode-python
c07177a9969abb3860c6c599fe1e4d8be9dd762e
[ "Apache-2.0" ]
1
2017-11-01T15:00:02.000Z
2017-11-01T15:00:02.000Z
answers/easy/single-number.py
kigawas/lintcode-python
c07177a9969abb3860c6c599fe1e4d8be9dd762e
[ "Apache-2.0" ]
null
null
null
answers/easy/single-number.py
kigawas/lintcode-python
c07177a9969abb3860c6c599fe1e4d8be9dd762e
[ "Apache-2.0" ]
null
null
null
class Solution: """ @param A : an integer array @return : a integer """ def singleNumber(self, A): # write your code here return reduce(lambda x, y: x ^ y, A) if A != [] else 0
21.4
62
0.537383
1691beeba82299c2dc559f4deb2c813b7d24bbc1
558
ts
TypeScript
packages/cs-core/src/utils/guid.ts
damylen/csnext
e9d7b720d2e2da1f0f4e697974aad08aaca9ceee
[ "MIT" ]
1
2018-04-19T08:42:38.000Z
2018-04-19T08:42:38.000Z
packages/cs-core/src/utils/guid.ts
damylen/csnext
e9d7b720d2e2da1f0f4e697974aad08aaca9ceee
[ "MIT" ]
38
2017-11-01T07:28:43.000Z
2020-04-16T19:00:21.000Z
packages/cs-core/src/utils/guid.ts
damylen/csnext
e9d7b720d2e2da1f0f4e697974aad08aaca9ceee
[ "MIT" ]
5
2017-06-08T10:49:47.000Z
2019-10-11T09:49:45.000Z
export function guidGenerator() { const S4 = () => { // tslint:disable-next-line:no-bitwise return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1); }; return (S4() + S4() + '-' + S4() + '-' + S4() + '-' + S4() + '-' + S4() + S4() + S4()); } export function idGenerator() { const S4 = () => { // tslint:disable-next-line:no-bitwise return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1); }; return (S4() + S4()); } export function numberGenerator() { return Math.round(Math.random() * 10000); }
27.9
89
0.550179
fbaf996458bb33226e6cb72a6f375ca0ceb2fc54
801
h
C
JuanFi-nodemcu/lan_definition.h
cargie/JuanFi
fbcf40bb14b144d80a68ba263726dc4f98537045
[ "Apache-2.0" ]
41
2021-08-09T13:22:29.000Z
2022-03-21T19:18:10.000Z
JuanFi-nodemcu/lan_definition.h
cargie/JuanFi
fbcf40bb14b144d80a68ba263726dc4f98537045
[ "Apache-2.0" ]
99
2021-08-10T22:54:13.000Z
2022-03-25T06:53:04.000Z
JuanFi-nodemcu/lan_definition.h
cargie/JuanFi
fbcf40bb14b144d80a68ba263726dc4f98537045
[ "Apache-2.0" ]
35
2021-08-22T14:09:27.000Z
2022-03-31T13:45:51.000Z
#ifndef defines_h #define defines_h #if !(ESP32) #error This code is intended to run on the ESP32 platform! Please check your Tools->Board setting. #endif #define DEBUG_ETHERNET_WEBSERVER_PORT Serial // Debug Level from 0 to 4 #define _ETHERNET_WEBSERVER_LOGLEVEL_ 3 #warning Use ESP32 architecture #define ETHERNET_USE_ESP32 #define BOARD_TYPE "ESP32" #define W5500_RST_PORT 21 #ifndef BOARD_NAME #define BOARD_NAME BOARD_TYPE #endif #include <SPI.h> #define USE_ETHERNET true #include "Ethernet.h" #warning Using Ethernet lib #define SHIELD_TYPE "W5x00 using Ethernet Library" #include <EthernetWebServer.h> #include <EthernetHttpClient.h> #ifndef SHIELD_TYPE #define SHIELD_TYPE "Unknown Ethernet shield/library" #endif #endif //defines_h
21.078947
100
0.751561
00d66a92291bb1fde556306a62af0a6f213ac953
14,410
sql
SQL
data/db/scripts/create-db.sql
rvep/dev_backend
384f689e9330dbedf3898b2fd0db6f0404ce3bfd
[ "MIT" ]
6
2016-08-31T07:29:29.000Z
2020-05-03T18:37:15.000Z
data/db/scripts/create-db.sql
jianngli/dev_backend
384f689e9330dbedf3898b2fd0db6f0404ce3bfd
[ "MIT" ]
2
2016-09-13T14:46:20.000Z
2016-09-14T17:48:01.000Z
data/db/scripts/create-db.sql
jianngli/dev_backend
384f689e9330dbedf3898b2fd0db6f0404ce3bfd
[ "MIT" ]
4
2017-05-29T14:37:25.000Z
2021-03-18T15:13:37.000Z
/* * * This is the mysql db create script. * Warning this script will drop the entire database. * Run using... * * $ mysql -u username -p < create-db.sql * * Warning: this will drop the existing database * */ -- ----------------------------------------------------- -- Schema rvep -- ----------------------------------------------------- DROP SCHEMA IF EXISTS `rvep` ; -- ----------------------------------------------------- -- Schema rvep -- ----------------------------------------------------- CREATE SCHEMA IF NOT EXISTS `rvep` DEFAULT CHARACTER SET utf8 ; USE `rvep` ; CREATE TABLE hibernate_sequence ( next_val BIGINT(20) ); CREATE TABLE rvep_user ( id INT(10) unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT, created_on DATETIME NOT NULL, enabled TINYINT(1) DEFAULT '1' NOT NULL ); CREATE TABLE rvep_user_profile ( id INT(10) unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT, email VARCHAR(255) NOT NULL, last_login DATETIME NOT NULL, rvep_user_id INT(10) unsigned NOT NULL, CONSTRAINT rvep_user_profile_rvep_user_id_fk FOREIGN KEY (rvep_user_id) REFERENCES rvep_user (id) ON DELETE CASCADE ); CREATE UNIQUE INDEX rvep_user_profile_email_uindex ON rvep_user_profile (email); CREATE INDEX rvep_user_profile_rvep_user_id_fk ON rvep_user_profile (rvep_user_id); CREATE TABLE auth_provider ( id INT(10) unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT, name VARCHAR(255) NOT NULL, enabled TINYINT(1) DEFAULT '1' NOT NULL ); CREATE TABLE rvep_user_auth_provider ( id INT(10) unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT, auth_provider_id INT(10) unsigned NOT NULL, rvep_user_id INT(10) unsigned NOT NULL, CONSTRAINT rvep_user_auth_provider_auth_provider_id_fk FOREIGN KEY (auth_provider_id) REFERENCES auth_provider (id), CONSTRAINT rvep_user_auth_provider_rvep_user_id_fk FOREIGN KEY (rvep_user_id) REFERENCES rvep_user (id) ON DELETE CASCADE ); CREATE INDEX rvep_user_auth_provider_auth_provider_id_fk ON rvep_user_auth_provider (auth_provider_id); CREATE INDEX rvep_user_auth_provider_rvep_user_id_fk ON rvep_user_auth_provider (rvep_user_id); CREATE TABLE role_category ( id INT(10) unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT, name VARCHAR(255) NOT NULL, enabled TINYINT(1) DEFAULT '1' NOT NULL ); CREATE UNIQUE INDEX role_category_name_uindex ON role_category (name); CREATE TABLE rvep_role ( id INT(10) unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT, name VARCHAR(255) NOT NULL, enabled TINYINT(1) DEFAULT '1' NOT NULL, role_category_id INT(10) unsigned NOT NULL, CONSTRAINT rvep_role_role_category_id_fk FOREIGN KEY (role_category_id) REFERENCES role_category (id) ON DELETE CASCADE ); CREATE UNIQUE INDEX role_name_uindex ON rvep_role (name); CREATE INDEX rvep_role_role_category_id_fk ON rvep_role (role_category_id); CREATE TABLE rvep_event ( id INT(10) unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT, created_on DATETIME NOT NULL, enabled TINYINT(1) DEFAULT '1' NOT NULL ); CREATE TABLE rvep_user_role ( id INT(10) unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT, rvep_role_id INT(10) unsigned NOT NULL, rvep_user_id INT(10) unsigned NOT NULL, CONSTRAINT rvep_user_role_rvep_role_id_fk FOREIGN KEY (rvep_role_id) REFERENCES rvep_role (id) ON DELETE CASCADE, CONSTRAINT rvep_user_role_rvep_user_rvep_user_id_fk FOREIGN KEY (rvep_user_id) REFERENCES rvep_user (id) ON DELETE CASCADE ); CREATE INDEX rvep_user_role_rvep_role_id_fk ON rvep_user_role (rvep_role_id); CREATE INDEX rvep_user_role_rvep_user_rvep_user_id_fk ON rvep_user_role (rvep_user_id); CREATE TABLE rvep_user_event_role ( id INT(10) unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT, rvep_role_id INT(10) unsigned NOT NULL, rvep_event_id INT(10) unsigned NOT NULL, rvep_user_id INT(10) unsigned NOT NULL, CONSTRAINT rvep_user_event_role_rvep_role_id_fk FOREIGN KEY (rvep_role_id) REFERENCES rvep_role (id) ON DELETE CASCADE, CONSTRAINT rvep_user_event_role_rvep_event_id_fk FOREIGN KEY (rvep_event_id) REFERENCES rvep_event (id) ON DELETE CASCADE, CONSTRAINT rvep_user_event_role_rvep_user_id_fk FOREIGN KEY (rvep_user_id) REFERENCES rvep_user (id) ON DELETE CASCADE ); CREATE INDEX rvep_user_event_role_rvep_role_id_fk ON rvep_user_event_role (rvep_role_id); CREATE INDEX rvep_user_event_role_rvep_event_id_fk ON rvep_user_event_role (rvep_event_id); CREATE INDEX rvep_user_event_role_rvep_user_id_fk ON rvep_user_event_role (rvep_user_id); CREATE TABLE rvep_user_contact ( id INT(10) unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT, rvep_user_id INT(10) unsigned NOT NULL, rvep_user_profile_id INT(10) unsigned NOT NULL, CONSTRAINT rvep_user_contact_rvep_user_id_fk FOREIGN KEY (rvep_user_id) REFERENCES rvep_user (id) ON DELETE CASCADE, CONSTRAINT rvep_user_contact_rvep_user_profile_id_fk FOREIGN KEY (rvep_user_profile_id) REFERENCES rvep_user_profile (id) ON DELETE CASCADE ); CREATE INDEX rvep_user_contact_rvep_user_id_fk ON rvep_user_contact (rvep_user_id); CREATE INDEX rvep_user_contact_rvep_user_profile_id_fk ON rvep_user_contact (rvep_user_profile_id); CREATE TABLE rolling_vote ( id INT(10) unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT, value INT(10) unsigned DEFAULT '0' NOT NULL, created_on DATETIME NOT NULL, updated_on DATETIME NOT NULL, enabled TINYINT(1) DEFAULT '1' NOT NULL ); CREATE TABLE rvep_user_event_rolling_vote ( id INT(10) unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT, rolling_vote_id INT(10) unsigned NOT NULL, rvep_event_id INT(10) unsigned NOT NULL, rvep_user_id INT(10) unsigned NOT NULL, CONSTRAINT rvep_user_event_rolling_vote_rolling_vote_id_fk FOREIGN KEY (rolling_vote_id) REFERENCES rolling_vote (id) ON DELETE CASCADE, CONSTRAINT rvep_user_event_rolling_vote_rvep_event_id_fk FOREIGN KEY (rvep_event_id) REFERENCES rvep_event (id) ON DELETE CASCADE, CONSTRAINT rvep_user_event_rolling_vote_rvep_user_id_fk FOREIGN KEY (rvep_user_id) REFERENCES rvep_user (id) ON DELETE CASCADE ); CREATE INDEX rvep_user_event_rolling_vote_rolling_vote_id_fk ON rvep_user_event_rolling_vote (rolling_vote_id); CREATE INDEX rvep_user_event_rolling_vote_rvep_event_id_fk ON rvep_user_event_rolling_vote (rvep_event_id); CREATE INDEX rvep_user_event_rolling_vote_rvep_user_id_fk ON rvep_user_event_rolling_vote (rvep_user_id); CREATE TABLE suggestion ( id INT(10) unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT, title VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, accepted TINYINT(1), created_on DATETIME NOT NULL, updated_on DATETIME NOT NULL ); CREATE TABLE rvep_event_suggestion ( id INT(10) unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT, rvep_event_id INT(10) unsigned NOT NULL, suggestion_id INT(10) unsigned NOT NULL, CONSTRAINT rvep_event_suggestion_rvep_event_id_fk FOREIGN KEY (rvep_event_id) REFERENCES rvep_event (id) ON DELETE CASCADE, CONSTRAINT rvep_event_suggestion_suggestion_id_fk FOREIGN KEY (suggestion_id) REFERENCES suggestion (id) ON DELETE CASCADE ); CREATE INDEX rvep_event_suggestion_rvep_event_id_fk ON rvep_event_suggestion (rvep_event_id); CREATE INDEX rvep_event_suggestion_suggestion_id_fk ON rvep_event_suggestion (suggestion_id); CREATE TABLE invite ( id INT(10) unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT, accepted TINYINT(1) DEFAULT '0' NOT NULL, created_on DATETIME NOT NULL, enabled TINYINT(1) DEFAULT '1' NOT NULL ); CREATE TABLE rvep_event_invite ( id INT(10) unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT, invite_id INT(10) unsigned NOT NULL, rvep_event_id INT(10) unsigned NOT NULL, rvep_user_id INT(10) unsigned NOT NULL, rvep_user_profile_id INT(10) unsigned NOT NULL, CONSTRAINT rvep_event_invite_invite_id_fk FOREIGN KEY (invite_id) REFERENCES invite (id) ON DELETE CASCADE, CONSTRAINT rvep_event_invite_rvep_event_id_fk FOREIGN KEY (rvep_event_id) REFERENCES rvep_event (id) ON DELETE CASCADE, CONSTRAINT rvep_event_invite_rvep_user_id_fk FOREIGN KEY (rvep_user_id) REFERENCES rvep_user (id), CONSTRAINT rvep_event_invite_rvep_user_profile_id_fk FOREIGN KEY (rvep_user_profile_id) REFERENCES rvep_user_profile (id) ON DELETE CASCADE ); CREATE INDEX rvep_event_invite_invite_id_fk ON rvep_event_invite (invite_id); CREATE INDEX rvep_event_invite_rvep_event_id_fk ON rvep_event_invite (rvep_event_id); CREATE INDEX rvep_event_invite_rvep_user_id_fk ON rvep_event_invite (rvep_user_id); CREATE INDEX rvep_event_invite_rvep_user_profile_id_fk ON rvep_event_invite (rvep_user_profile_id); CREATE TABLE rvep_user_contact_invite ( id INT(10) unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT, invite_id INT(10) unsigned NOT NULL, rvep_user_id INT(10) unsigned NOT NULL, rvep_user_profile_id INT(10) unsigned NOT NULL, CONSTRAINT rvep_user_contact_invite_rvep_user_id_fk FOREIGN KEY (rvep_user_id) REFERENCES rvep_user (id) ON DELETE CASCADE, CONSTRAINT rvep_user_contact_invite_rvep_user_profile_id_fk FOREIGN KEY (rvep_user_profile_id) REFERENCES rvep_user_profile (id) ON DELETE CASCADE ); CREATE INDEX rvep_user_contact_invite_rvep_user_id_fk ON rvep_user_contact_invite (rvep_user_id); CREATE INDEX rvep_user_contact_invite_rvep_user_profile_id_fk ON rvep_user_contact_invite (rvep_user_profile_id); CREATE TABLE rvep_location ( id INT(10) unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT, title VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, geolat FLOAT, geolng FLOAT, enabled TINYINT(1) DEFAULT '1' NOT NULL ); CREATE TABLE rvep_event_item ( id INT(10) unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT, title VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, date_time DATETIME NOT NULL, created_on DATETIME NOT NULL, updated_on DATETIME NOT NULL, enabled TINYINT(1) DEFAULT '1' NOT NULL, rvep_event_id INT(10) unsigned NOT NULL, rvep_location_id INT(10) unsigned NOT NULL, CONSTRAINT rvep_event_item_rvep_event_id_fk FOREIGN KEY (rvep_event_id) REFERENCES rvep_event (id), CONSTRAINT rvep_event_item_rvep_location_id_fk FOREIGN KEY (rvep_location_id) REFERENCES rvep_location (id) ); CREATE INDEX rvep_event_item_rvep_event_id_fk ON rvep_event_item (rvep_event_id); CREATE INDEX rvep_event_item_rvep_location_id_fk ON rvep_event_item (rvep_location_id); CREATE TABLE rvep_event_profile ( id INT(10) unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT, title VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, created_on DATETIME NOT NULL, updated_on DATETIME NOT NULL, enabled TINYINT(1) DEFAULT '1' NOT NULL, rvep_event_id INT(10) unsigned NOT NULL, CONSTRAINT rvep_event_profile_rvep_event_id_fk FOREIGN KEY (rvep_event_id) REFERENCES rvep_event (id) ON DELETE CASCADE ); CREATE INDEX rvep_event_profile_rvep_event_id_fk ON rvep_event_profile (rvep_event_id); CREATE TABLE todo_list ( id INT(10) unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT, title VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, created_on DATETIME NOT NULL, updated_on DATETIME NOT NULL, enabled TINYINT(1) DEFAULT '1' NOT NULL ); CREATE TABLE todo_list_item ( id INT(10) unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT, title VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, complete TINYINT(1) DEFAULT '0' NOT NULL, created_on DATETIME NOT NULL, updated_on DATETIME NOT NULL, enabled TINYINT(1) DEFAULT '1' NOT NULL, todo_list_id INT(10) unsigned NOT NULL, CONSTRAINT todo_list_item_todo_list_id_fk FOREIGN KEY (todo_list_id) REFERENCES todo_list (id) ON DELETE CASCADE ); CREATE INDEX todo_list_item_todo_list_id_fk ON todo_list_item (todo_list_id); CREATE TABLE rvep_event_todo_list ( id INT(10) unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT, rvep_event_id INT(10) unsigned, rvep_user_id INT(10) unsigned NOT NULL, todo_list_id INT(10) unsigned NOT NULL, CONSTRAINT rvep_event_todo_list_rvep_event_id_fk FOREIGN KEY (rvep_event_id) REFERENCES rvep_event (id), CONSTRAINT rvep_event_todo_list_rvep_user_id_fk FOREIGN KEY (rvep_user_id) REFERENCES rvep_user (id), CONSTRAINT rvep_event_todo_list_todo_list_id_fk FOREIGN KEY (todo_list_id) REFERENCES todo_list (id) ); CREATE INDEX rvep_event_todo_list_rvep_event_id_fk ON rvep_event_todo_list (rvep_event_id); CREATE INDEX rvep_event_todo_list_rvep_user_id_fk ON rvep_event_todo_list (rvep_user_id); CREATE INDEX rvep_event_todo_list_todo_list_id_fk ON rvep_event_todo_list (todo_list_id); CREATE TABLE rvep_event_item_todo_list ( id INT(10) unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT, rvep_event_id INT(10) unsigned NOT NULL, rvep_event_item_id INT(10) unsigned NOT NULL, todo_list_id INT(10) unsigned NOT NULL, CONSTRAINT rvep_event_item_todo_list_rvep_event_id_fk FOREIGN KEY (rvep_event_id) REFERENCES rvep_event (id), CONSTRAINT rvep_event_item_todo_list_rvep_event_item_id_fk FOREIGN KEY (rvep_event_item_id) REFERENCES rvep_event_item (id), CONSTRAINT rvep_event_item_todo_list_id_fk FOREIGN KEY (todo_list_id) REFERENCES todo_list (id) ); CREATE INDEX rvep_event_item_todo_list_id_fk ON rvep_event_item_todo_list (todo_list_id); CREATE INDEX rvep_event_item_todo_list_rvep_event_id_fk ON rvep_event_item_todo_list (rvep_event_id); CREATE INDEX rvep_event_item_todo_list_rvep_event_item_id_fk ON rvep_event_item_todo_list (rvep_event_item_id); CREATE TABLE todo_list_item_assignment ( id INT(10) unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT, rvep_user_id INT(10) unsigned NOT NULL, rvep_user_profile_id INT(10) unsigned NOT NULL, todo_list_item_id INT(10) unsigned NOT NULL, CONSTRAINT todo_list_item_assignment_rvep_user_id_fk FOREIGN KEY (rvep_user_id) REFERENCES rvep_user (id) ON DELETE CASCADE, CONSTRAINT todo_list_item_assignment_rvep_user_profile_id_fk FOREIGN KEY (rvep_user_profile_id) REFERENCES rvep_user_profile (id) ON DELETE CASCADE, CONSTRAINT todo_list_item_assignment_todo_list_item_id_fk FOREIGN KEY (todo_list_item_id) REFERENCES todo_list_item (id) ON DELETE CASCADE ); CREATE INDEX todo_list_item_assignment_rvep_user_id_fk ON todo_list_item_assignment (rvep_user_id); CREATE INDEX todo_list_item_assignment_rvep_user_profile_id_fk ON todo_list_item_assignment (rvep_user_profile_id); CREATE INDEX todo_list_item_assignment_todo_list_item_id_fk ON todo_list_item_assignment (todo_list_item_id);
50.209059
152
0.795975
7213a73d55725028a70327d987ec8d95529be38c
14,426
asm
Assembly
Library/Mailbox/Admin/adminCode.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Library/Mailbox/Admin/adminCode.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Library/Mailbox/Admin/adminCode.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) GeoWorks 1994 -- All Rights Reserved PROJECT: MODULE: FILE: adminCode.asm AUTHOR: Adam de Boor, May 9, 1994 ROUTINES: Name Description ---- ----------- REVISION HISTORY: Name Date Description ---- ---- ----------- Adam 5/ 9/94 Initial revision DESCRIPTION: $Id: adminCode.asm,v 1.1 97/04/05 01:20:42 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ Resident segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% MailboxGetAdminFile %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the handle of the admin file CALLED BY: (EXTERNAL) PASS: nothing RETURN: bx = file handle DESTROYED: nothing SIDE EFFECTS: fatal-error if file not open yet PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 5/ 9/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ MailboxGetAdminFile proc far uses ds, ax .enter segmov ds, dgroup, bx ; ; If we're on a mailbox thread, assume we're running init code. ; (If necessary, we can call ProcInfo to see if we're mailbox:0 and ; only use adminInitFile then...) ; call GeodeGetProcessHandle cmp bx, handle 0 je getInitFile PSem ds, adminFileSem, TRASH_AX_BX getFile: mov bx, ds:[adminFile] tst bx jnz done ; ; File not publicly available yet, so block on adminInitQueue until ; initialization is complete. ; mov ax, ds mov bx, offset adminInitQueue call ThreadBlockOnQueue jmp getFile done: VSem ds, adminFileSem, TRASH_AX exit: .leave ret getInitFile: mov bx, ds:[adminInitFile] EC < tst bx > EC < ERROR_Z ADMIN_FILE_NOT_OPEN_YET > jmp exit MailboxGetAdminFile endp Resident ends Admin segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AdminLockMap %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Lock down the admin file's map block CALLED BY: (INTERNAL) PASS: nothing RETURN: ds = locked map block bp = memory handle bx = admin file handle DESTROYED: nothing SIDE EFFECTS: none PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 5/ 9/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ AdminLockMap proc far uses ax .enter call MailboxGetAdminFile call VMGetMapBlock EC < push ax, cx, di > EC < call VMInfo > EC < ERROR_C ADMIN_MAP_BLOCK_NOT_VALID > EC < cmp di, MBVMID_MAP_BLOCK > EC < ERROR_NE ADMIN_MAP_BLOCK_NOT_VALID > EC < pop ax, cx, di > call VMLock mov ds, ax .leave ret AdminLockMap endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AdminGetMapWord %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Fetch a word from the admin file's map block. CALLED BY: (INTERNAL) PASS: ax = offset of word to fetch RETURN: bx = admin file ax = word from the map block DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 5/ 9/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ AdminGetMapWord proc near uses ds, bp .enter call AdminLockMap xchg ax, bp mov bp, ds:[bp] xchg ax, bp call VMUnlock .leave ret AdminGetMapWord endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AdminExit %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Close down the administrative file. Called only when no further use can possibly be made of the files, because the mailbox library is entirely unhooked from anything that might provoke it. CALLED BY: (EXTERNAL) PASS: nothing RETURN: nothing DESTROYED: nothing SIDE EFFECTS: adminFile is set to 0 after the file has been flushed to disk and closed PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 5/ 9/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ AdminExit proc far uses bx, ax, ds .enter call InboxExit mov ax, MSG_MA_STOP_ADMIN_FILE_UPDATE_TIMER call UtilSendToMailboxApp segmov ds, dgroup, ax clr ax, bx xchg ds:[adminFile], bx call VMClose .leave ret AdminExit endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AdminGetInbox %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Retrieve the inbox DBQ CALLED BY: (EXTERNAL) PASS: nothing RETURN: ^vbx:di = DBQ handle for the inbox DESTROYED: nothing SIDE EFFECTS: none PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 5/ 9/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ AdminGetInbox proc far uses ax .enter mov ax, offset AMB_inbox call AdminGetMapWord mov_tr di, ax .leave ret AdminGetInbox endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AdminGetOutbox %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Retrieve the outbox DBQ CALLED BY: (EXTERNAL) PASS: nothing RETURN: ^vbx:di = DBQ handle for the outbox DESTROYED: nothing SIDE EFFECTS: none PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 5/ 9/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ AdminGetOutbox proc far uses ax .enter mov ax, offset AMB_outbox call AdminGetMapWord mov_tr di, ax .leave ret AdminGetOutbox endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AdminGetDataDriverMap %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Retrieve the handle for the data driver map CALLED BY: (EXTERNAL) PASS: nothing RETURN: ax = DMap handle for the data driver map DESTROYED: nothing SIDE EFFECTS: none PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 5/ 9/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ AdminGetDataDriverMap proc far uses bx .enter mov ax, offset AMB_dataMap call AdminGetMapWord .leave ret AdminGetDataDriverMap endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AdminGetTransportDriverMap %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Retrieve the handle for the transport driver map CALLED BY: (EXTERNAL) PASS: nothing RETURN: ax = DMap handle for the transport driver map DESTROYED: nothing SIDE EFFECTS: none PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 5/ 9/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ AdminGetTransportDriverMap proc far uses bx .enter mov ax, offset AMB_transMap call AdminGetMapWord .leave ret AdminGetTransportDriverMap endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AdminGetVMStore %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Retrieve the handle for the vm storage map CALLED BY: (EXTERNAL) PASS: nothing RETURN: bx = admin file ax = handle for the vm storage map DESTROYED: nothing SIDE EFFECTS: none PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 5/ 9/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ AdminGetVMStore proc far .enter mov ax, offset AMB_vmStore call AdminGetMapWord .leave ret AdminGetVMStore endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AdminAllocTALID %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Allocate a talID for the caller. There is no guarantee that the ID is unique (i.e. that no message currently has an address marked with the ID), but it is probable that no message currently has an address marked with the ID. CALLED BY: (EXTERNAL) PASS: nothing RETURN: ax = talID DESTROYED: nothing SIDE EFFECTS: map block is dirtied and AMB_nextTALID is updated PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 5/ 9/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ AdminAllocTALID proc far uses bx, ds, bp .enter call AdminLockMap ; ; Compute the ID to return next time. The ID just cycles through the ; 15-bit space, hitting each number, other than 0, in turn. ; mov ax, ds:[AMB_nextTALID] inc ax and ax, mask TID_NUMBER jnz storeNext inc ax ; return 1 next time, not 0 storeNext: ; ; Get value we're supposed to return while setting what should be ; returned next time. ; xchg ds:[AMB_nextTALID], ax ; ; Map block is, of course, now dirty. ; call VMDirty call VMUnlock .leave ret AdminAllocTALID endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AdminGetOutboxMedia %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Retrieve the handle for the outbox media map CALLED BY: (EXTERNAL) PASS: nothing RETURN: bx = admin file ax = handle for the outbox media map DESTROYED: nothing SIDE EFFECTS: none PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 5/ 9/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ AdminGetOutboxMedia proc far .enter mov ax, offset AMB_outboxMedia call AdminGetMapWord .leave ret AdminGetOutboxMedia endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AdminGetAppTokens %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Retrieve the handle for the app tokens map CALLED BY: (EXTERNAL) PASS: nothing RETURN: bx = admin file ax = handle for the app tokens map DESTROYED: nothing SIDE EFFECTS: none PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 5/ 9/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ AdminGetAppTokens proc far .enter mov ax, offset AMB_appTokens call AdminGetMapWord .leave ret AdminGetAppTokens endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AdminGetReasons %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Retrieve the handle for the failure-reason map CALLED BY: (EXTERNAL) PASS: nothing RETURN: bx = admin file ax = handle for the failure-reason map DESTROYED: nothing SIDE EFFECTS: none PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 5/ 9/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ AdminGetReasons proc far .enter mov ax, offset AMB_outboxReasons call AdminGetMapWord .leave ret AdminGetReasons endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AdminGetMediaStatusMap %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Retrieve the handle for the media-status map CALLED BY: (EXTERNAL) PASS: nothing RETURN: bx = admin file ax = handle for the media-status map DESTROYED: nothing SIDE EFFECTS: none PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 5/ 9/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ AdminGetMediaStatusMap proc far .enter mov ax, offset AMB_media call AdminGetMapWord .leave ret AdminGetMediaStatusMap endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AdminGetMediaTransportMap %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Retrieve the handle for the media/transport map CALLED BY: (EXTERNAL) PASS: nothing RETURN: bx = admin file ax = handle for the media/transport map DESTROYED: nothing SIDE EFFECTS: none PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 5/ 9/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ AdminGetMediaTransportMap proc far .enter mov ax, offset AMB_mediaTrans call AdminGetMapWord .leave ret AdminGetMediaTransportMap endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AdminGetAutoDeliveryTimeout %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the time to wait before delivering a message automatically in the absence of user response. CALLED BY: (EXTERNAL) PASS: nothing RETURN: cx = # of ticks DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- AY 1/11/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ AdminGetAutoDeliveryTimeout proc far uses ds .enter segmov ds, dgroup, cx mov cx, ds:[adminAutoDeliveryTimeout] .leave ret AdminGetAutoDeliveryTimeout endp Admin ends
23.418831
79
0.498198
6d54042fd72cf9e3dd6f3f4437b577753009fe10
3,128
swift
Swift
Sources/LithoOperators/Classes/KeyPaths.swift
LithoByte/LithoOperators
518f40dd4c8e347b416bbe8faa96114f9eb09a3b
[ "MIT" ]
null
null
null
Sources/LithoOperators/Classes/KeyPaths.swift
LithoByte/LithoOperators
518f40dd4c8e347b416bbe8faa96114f9eb09a3b
[ "MIT" ]
1
2021-12-30T18:50:57.000Z
2021-12-30T18:51:13.000Z
Sources/LithoOperators/Classes/KeyPaths.swift
LithoByte/LithoOperators
518f40dd4c8e347b416bbe8faa96114f9eb09a3b
[ "MIT" ]
1
2021-06-23T15:45:29.000Z
2021-06-23T15:45:29.000Z
// // KeyPaths.swift // LithoOperators // // Created by Elliot Schrock on 6/23/21. // import Foundation /** An operator to create a function that, given a keypath for a type, will a function that will accept an object of that type and return the object's property's value. So for instance, `^\UIViewController.view` will return a function `(UIViewController) -> UIView` */ prefix operator ^ public prefix func ^ <Root, Value>(kp: KeyPath<Root, Value>) -> (Root) -> Value { return get(kp) } public prefix func ^ <Root, Value>(kp: WritableKeyPath<Root, Value>) -> (@escaping (Value) -> Value) -> (Root) -> Root { return prop(kp) } public prefix func ^ <Root, Value>(_ kp: WritableKeyPath<Root, Value>) -> (@escaping (inout Value) -> Void) -> (inout Root) -> Void { return { update in { root in update(&root[keyPath: kp]) } } } public func setter<Root, Value>(_ kp: WritableKeyPath<Root, Value>) -> (Root, Value) -> Void { return { root, val in var copy = root copy[keyPath: kp] = val } } public func toggle<Root>(_ kp: WritableKeyPath<Root, Bool>) -> (Root) -> Void { return { root in var copy = root copy[keyPath: kp].toggle() } } /** The following are from the excellent PointFree videos, and are used here and there above to implement some of functions. */ public func prop<Root, Value>(_ kp: WritableKeyPath<Root, Value>) -> (@escaping (Value) -> Value) -> (Root) -> Root { return { update in { root in var copy = root copy[keyPath: kp] = update(copy[keyPath: kp]) return copy } } } public func prop<Root, Value>( _ kp: WritableKeyPath<Root, Value>, _ f: @escaping (Value) -> Value ) -> (Root) -> Root { return prop(kp)(f) } public func prop<Root, Value>( _ kp: WritableKeyPath<Root, Value>, _ value: Value ) -> (Root) -> Root { return prop(kp) { _ in value } } public typealias Setter<S, T, A, B> = (@escaping (A) -> B) -> (S) -> T public func over<S, T, A, B>( _ setter: Setter<S, T, A, B>, _ set: @escaping (A) -> B ) -> (S) -> T { return setter(set) } public func set<S, T, A, B>( _ setter: Setter<S, T, A, B>, _ value: B ) -> (S) -> T { return over(setter) { _ in value } } public func set<Root, Value>(_ kp: WritableKeyPath<Root, Value>, _ value: Value) -> (Root) -> Void { return { var copy = $0 copy[keyPath: kp] = value } } public func get<Root, Value>(_ kp: KeyPath<Root, Value>) -> (Root) -> Value { return { root in root[keyPath: kp] } } public typealias MutableSetter<S, A> = (@escaping (inout A) -> Void) -> (inout S) -> Void public func mver<S, A>( _ setter: MutableSetter<S, A>, _ set: @escaping (inout A) -> Void ) -> (inout S) -> Void { return setter(set) } public func mut<S, A>( _ setter: MutableSetter<S, A>, _ value: A ) -> (inout S) -> Void { return mver(setter) { $0 = value } } public func mutEach<A>(_ f: @escaping (inout A) -> Void) -> (inout [A]) -> Void { return { for i in $0.indices { f(&$0[i]) } } }
22.028169
100
0.586317
489fee341d57ca675f00724226ea8a7de8c2cdcb
2,267
swift
Swift
iosApp/iosApp/Views/PlaybackProgressView.swift
lazy-engineer/Castaway
5679f5b70566b430a99af70a88a1e1b66736ef4a
[ "MIT" ]
4
2020-12-28T18:51:58.000Z
2022-01-26T11:58:44.000Z
iosApp/iosApp/Views/PlaybackProgressView.swift
lazy-engineer/Castaway
5679f5b70566b430a99af70a88a1e1b66736ef4a
[ "MIT" ]
null
null
null
iosApp/iosApp/Views/PlaybackProgressView.swift
lazy-engineer/Castaway
5679f5b70566b430a99af70a88a1e1b66736ef4a
[ "MIT" ]
null
null
null
import SwiftUI struct PlaybackProgressView: View { @EnvironmentObject var theme: ThemeNeumorphism let playbackProgress: CGFloat let offsetPadding: CGFloat public init( playbackProgress: CGFloat, offsetPadding: CGFloat = 0 ) { self.playbackProgress = playbackProgress self.offsetPadding = offsetPadding } var body: some View { ZStack(alignment: Alignment(horizontal: .leading, vertical: .center), content: { GeometryReader { geometry in Capsule() .fill(theme.colorPalette.background) .frame(height: 5) .overlay( Capsule() .stroke(theme.colorPalette.intenseDropShadow, lineWidth: 3) .blur(radius: 2) .mask(Capsule().fill(LinearGradient.init(gradient: Gradient(colors: [Color.black, Color.clear]), startPoint: .top, endPoint: .bottom))) ) .overlay( Capsule() .stroke(theme.colorPalette.intenseReflection, lineWidth: 1) .offset(y: -1) .blur(radius: 1) .mask(Capsule().fill(LinearGradient.init(gradient: Gradient(colors: [Color.black, Color.clear]), startPoint: .bottom, endPoint: .top))) ) .padding(.leading, offsetPadding) .padding(.trailing, offsetPadding) Capsule() .fill(LinearGradient(theme.colorPalette.primaryVariant, theme.colorPalette.primary)) .frame(width: playbackProgress > 1 ? (geometry.size.width - offsetPadding * 2) * 1 : (geometry.size.width - offsetPadding * 2) * playbackProgress, height: 5) .padding(.leading, offsetPadding) .padding(.trailing, offsetPadding) } }) } } #if DEBUG struct PlaybackProgressView_Previews: PreviewProvider { static var previews: some View { PlaybackProgressView(playbackProgress: 0.25) .environmentObject(ThemeNeumorphism()) } } #endif
39.086207
177
0.541685
40221c730b773017947d608f12781d45293947a9
8,324
py
Python
tag2hierarchy/inference/training.py
cesarali/Tag2Hierarchy
182bc948a1b4c497a991b12a29ff56023f98c05a
[ "MIT" ]
null
null
null
tag2hierarchy/inference/training.py
cesarali/Tag2Hierarchy
182bc948a1b4c497a991b12a29ff56023f98c05a
[ "MIT" ]
1
2017-06-13T13:08:12.000Z
2017-06-13T13:08:12.000Z
tag2hierarchy/inference/training.py
cesarali/Tag2Hierarchy
182bc948a1b4c497a991b12a29ff56023f98c05a
[ "MIT" ]
null
null
null
''' Created on Mar 11, 2016 @author: cesar ''' from tag2hierarchy.datatypes.hierarchies import Node from tag2hierarchy.inference.tuplesStatistics import cooccuranceBlock,nodesInTuples from tag2hierarchy.inference.tupleGenerator import generateNTuples from tag2hierarchy.hierarchy.treeHandlers import nodeNames, setBranch, obtainDescendantsFromNode, obtainDescendantsFromNode2 def initialize(tupleSet): """ Obtain the initial structures needed for the tuplesToTree algorithm Return: ------ nodesList,Block,nodesObjectList """ #tupleSet = set(tupleSet) nodesList = nodesInTuples(tupleSet) Block = cooccuranceBlock(tupleSet, nodesList)[::-1] nodesObjectList = [Node(name[0],[],cargo=i) for i,name in enumerate(Block)] return nodesList,Block,nodesObjectList def obtainTree(tupleSet,verbose=False): """ This algorithms aims at obtaining a tree structure from a set of tuples if follows: 1. Obtain all nodes in the list of tuples 2. Initialize NodeList: this list contains all the nodes with empty children While len(NodeList) > 1: take smallest node in cooccurance block insert this node as a children in the next node in the block which contains the selected node as coocurring """ nodesList,Block,nodesObjectList = initialize(tupleSet) if verbose: print "Number of nodes: ",len(nodesList) while(len(Block) > 1): smallestNodeBlock = Block.pop() smallestNode = nodesObjectList.pop() for block, node in zip(Block[::-1],nodesObjectList[::-1]): if verbose: print "Looking for parent of {0}".format(smallestNode.name) if smallestNode.name in block[1][1]: if verbose: print "Inserting node {0} in node {1}".format(smallestNode.name,node.name) if smallestNode.children == []: smallestNode.name smallestNode.children = None node.children.append(smallestNode) break return nodesObjectList def obtainParentToDescendantsRatio(smallestNode,node,Block): """ Obtains how many of the descendants of a given node to merge coccur with the parent to insert """ blockPlacesOfDescendants = obtainDescendantsFromNode2([smallestNode],smallestNode.name,cargo=True) parentToDescendants = 0. for b in blockPlacesOfDescendants: if node.name in Block[b][1][1]: parentToDescendants += 1. try: parentToDescendants = parentToDescendants/len(blockPlacesOfDescendants) except: parentToDescendants = 0. return parentToDescendants def obtainTreeNoise(tupleSet,parentToDescendantBound=0.4,verbose=False): """ This algorithms aims at obtaining a tree structure from a set of tuples if follows: 1. Obtain all nodes in the list of tuples 2. Initialize NodeList: this list contains all the nodes with empty children While len(NodeList) > 1: take smallest node in cooccurance block insert this node as a children in the next node in the block which contains the selected node as coocurring 3. Upon mergin it checks that the parent also coocurs with the children """ nodesList,Block,nodesObjectList = initialize(tupleSet) if verbose: print "Number of nodes: ",len(nodesList) parentToDescendantStats = [] k = len(Block) - 1 while(k >=0): smallestNodeBlock = Block[k] smallestNode = nodesObjectList[k] backCount = 0 included = False bestParentToDescendant = 0. smallestFound = None for block, node in zip(Block[:k][::-1],nodesObjectList[:k][::-1]): if verbose: print "Looking for parent of {0}".format(smallestNode.name) if smallestNode.name in block[1][1]: #CHECK COOCURRANCE OF THIS CHILDREN NODES WITH THE PARENT parentToDescendants = obtainParentToDescendantsRatio(smallestNode,node,Block) parentToDescendantStats.append(parentToDescendants) if parentToDescendants > parentToDescendantBound: if verbose: print "Inserting node {0} in node {1}".format(smallestNode.name,node.name) if smallestNode.children == []: smallestNode.name smallestNode.children = None node.children.append(smallestNode) #Here is where we make the insertion included = True break else: if parentToDescendants > bestParentToDescendant: smallestFound = backCount bestParentToDescendant = parentToDescendants backCount +=1 # index to follow the possible parents if not included and smallestFound != None: blockSection = Block[:k][::-1][smallestFound] node = nodesObjectList[:k][::-1][smallestFound] k-=1 return [nodesObjectList[0]], parentToDescendantStats def obtainTreeNoise2(tupleSet,parentToDescendantBound=0.4,verbose=False): """ This algorithms aims at obtaining a tree structure from a set of tuples if follows: 1. Obtain all nodes in the list of tuples 2. Initialize NodeList: this list contains all the nodes with empty children While len(NodeList) > 1: take smallest node in cooccurance block insert this node as a children in the next node in the block which contains the selected node as coocurring 3. Upon mergin it checks that the parent also coocurs with the children """ nodesList,Block,nodesObjectList = initialize(tupleSet) if verbose: print "Number of nodes: ",len(nodesList) rootsSet = [] parentToDescendantStats = [] bestParentToDescendantStats = [] k = len(Block) - 1 while(k >=0): smallestNodeBlock = Block[k] smallestNode = nodesObjectList[k] bestParentToDescendant = 0. for j,block, node in zip(range(len(Block[:k][::-1])),Block[:k][::-1],nodesObjectList[:k][::-1]): if verbose: print "Looking for parent of {0}".format(smallestNode.name) if smallestNode.name in block[1][1]: #CHECK COOCURRANCE OF THIS CHILDREN NODES WITH THE PARENT parentToDescendants = obtainParentToDescendantsRatio(smallestNode,node,Block) parentToDescendantStats.append(parentToDescendants) if parentToDescendants > bestParentToDescendant: bestParentToDescendant = parentToDescendants bestIndexFound = j bestParentToDescendantStats.append(bestParentToDescendant) if bestParentToDescendant > parentToDescendantBound: if verbose: print "Inserting node {0} in node {1}".format(smallestNode.name,node.name) if smallestNode.children == []: smallestNode.name smallestNode.children = None node = nodesObjectList[:k][::-1][bestIndexFound] node.children.append(smallestNode) #Here is where we make the insertion else: rootsSet.append(k) k-=1 allTrees = [] homeless = [] for k in rootsSet: rootNode = nodesObjectList[k] if rootNode.children == []: homeless.append(rootNode.name) else: allTrees.append(rootNode) return allTrees,homeless, parentToDescendantStats, bestParentToDescendantStats def treeToTupleAndBack(objectTree,numberOfTuples): """ This generates tuples from a tree and then trains from those tuples """ tupleSet = generateNTuples(objectTree,numberOfTuples) return obtainTree(tupleSet) def calculatePurity(truthTree,trainedTree,setTheBranches=True): """ """ if setTheBranches: setBranch(truthTree) setBranch(trainedTree)
39.827751
124
0.627102
f0294e1732618a69f9d971426940492f81d9c285
8,227
js
JavaScript
db/seeds/08_strings.js
danylomaster/node-knex-swagger-northwind
29033df8111746604aaf8faaf59a704f2a2a6e09
[ "MIT" ]
null
null
null
db/seeds/08_strings.js
danylomaster/node-knex-swagger-northwind
29033df8111746604aaf8faaf59a704f2a2a6e09
[ "MIT" ]
null
null
null
db/seeds/08_strings.js
danylomaster/node-knex-swagger-northwind
29033df8111746604aaf8faaf59a704f2a2a6e09
[ "MIT" ]
null
null
null
exports.seed = function(knex, Promise) { // Deletes ALL existing entries return knex("strings") .del() .then(function() { // Inserts seed entries return knex("strings").insert([ { string_id: 2, string_data: "Northwind Traders" }, { string_id: 3, string_data: "Cannot remove posted inventory!" }, { string_id: 4, string_data: "Back ordered product filled for Order #|" }, { string_id: 5, string_data: "Discounted price below cost!" }, { string_id: 6, string_data: "Insufficient inventory." }, { string_id: 7, string_data: "Insufficient inventory. Do you want to create a purchase order?" }, { string_id: 8, string_data: "Purchase orders were successfully created for | products" }, { string_id: 9, string_data: "There are no products below their respective reorder levels" }, { string_id: 10, string_data: "Must specify customer name!" }, { string_id: 11, string_data: "Restocking will generate purchase orders for all products below desired inventory levels. Do you want to continue?" }, { string_id: 12, string_data: "Cannot create purchase order. No suppliers listed for specified product" }, { string_id: 13, string_data: "Discounted price is below cost!" }, { string_id: 14, string_data: "Do you want to continue?" }, { string_id: 15, string_data: "Order is already invoiced. Do you want to print the invoice?" }, { string_id: 16, string_data: "Order does not contain any line items" }, { string_id: 17, string_data: "Cannot create invoice! Inventory has not been allocated for each specified product." }, { string_id: 18, string_data: "Sorry, there are no sales in the specified time period" }, { string_id: 19, string_data: "Product successfully restocked." }, { string_id: 21, string_data: "Product does not need restocking! Product is already at desired inventory level." }, { string_id: 22, string_data: "Product restocking failed!" }, { string_id: 23, string_data: "Invalid login specified!" }, { string_id: 24, string_data: "Must first select reported!" }, { string_id: 25, string_data: "Changing supplier will remove purchase line items, continue?" }, { string_id: 26, string_data: "Purchase orders were successfully submitted for | products. Do you want to view the restocking report?" }, { string_id: 27, string_data: "There was an error attempting to restock inventory levels." }, { string_id: 28, string_data: "| product(s) were successfully restocked. Do you want to view the restocking report?" }, { string_id: 29, string_data: "You cannot remove purchase line items already posted to inventory!" }, { string_id: 30, string_data: "There was an error removing one or more purchase line items." }, { string_id: 31, string_data: "You cannot modify quantity for purchased product already received or posted to inventory." }, { string_id: 32, string_data: "You cannot modify price for purchased product already received or posted to inventory." }, { string_id: 33, string_data: "Product has been successfully posted to inventory." }, { string_id: 34, string_data: "Sorry, product cannot be successfully posted to inventory." }, { string_id: 35, string_data: "There are orders with this product on back order. Would you like to fill them now?" }, { string_id: 36, string_data: "Cannot post product to inventory without specifying received date!" }, { string_id: 37, string_data: "Do you want to post received product to inventory?" }, { string_id: 38, string_data: "Initialize purchase, orders, and inventory data?" }, { string_id: 39, string_data: "Must first specify employee name!" }, { string_id: 40, string_data: "Specified user must be logged in to approve purchase!" }, { string_id: 41, string_data: "Purchase order must contain completed line items before it can be approved" }, { string_id: 42, string_data: "Sorry, you do not have permission to approve purchases." }, { string_id: 43, string_data: "Purchase successfully approved" }, { string_id: 44, string_data: "Purchase cannot be approved" }, { string_id: 45, string_data: "Purchase successfully submitted for approval" }, { string_id: 46, string_data: "Purchase cannot be submitted for approval" }, { string_id: 47, string_data: "Sorry, purchase order does not contain line items" }, { string_id: 48, string_data: "Do you want to cancel this order?" }, { string_id: 49, string_data: "Canceling an order will permanently delete the order. Are you sure you want to cancel?" }, { string_id: 100, string_data: "Your order was successfully canceled." }, { string_id: 101, string_data: "Cannot cancel an order that has items received and posted to inventory." }, { string_id: 102, string_data: "There was an error trying to cancel this order." }, { string_id: 103, string_data: "The invoice for this order has not yet been created." }, { string_id: 104, string_data: "Shipping information is not complete. Please specify all shipping information and try again." }, { string_id: 105, string_data: "Cannot mark as shipped. Order must first be invoiced!" }, { string_id: 106, string_data: "Cannot cancel an order that has already shipped!" }, { string_id: 107, string_data: "Must first specify salesperson!" }, { string_id: 108, string_data: "Order is now marked closed." }, { string_id: 109, string_data: "Order must first be marked shipped before closing." }, { string_id: 110, string_data: "Must first specify payment information!" }, { string_id: 111, string_data: "There was an error attempting to restock inventory levels. | product(s) were successfully restocked." }, { string_id: 112, string_data: "You must supply a Unit Cost." }, { string_id: 113, string_data: "Fill back ordered product, Order #|" }, { string_id: 114, string_data: "Purchase generated based on Order #|" } ]); }); };
29.070671
129
0.511973
54213cd9cd4ad61273ad648a4fa6628b51f0ae89
1,953
go
Go
http_server/http_server.go
DeAccountSystems/das-account-indexer
fe1450c4acd22278ab5bc78bce03b9720539abc6
[ "MIT" ]
10
2021-12-16T10:51:14.000Z
2022-01-20T14:31:53.000Z
http_server/http_server.go
dotbitHQ/das-account-indexer
8c25d90b88ec6287a15f9bb8942a4712fc9fa389
[ "MIT" ]
2
2022-01-21T05:16:55.000Z
2022-02-14T07:11:13.000Z
http_server/http_server.go
dotbitHQ/das-account-indexer
8c25d90b88ec6287a15f9bb8942a4712fc9fa389
[ "MIT" ]
1
2022-03-15T03:19:29.000Z
2022-03-15T03:19:29.000Z
package http_server import ( "context" "das-account-indexer/http_server/handle" "github.com/gin-gonic/gin" "github.com/scorpiotzh/mylog" "net/http" ) var ( log = mylog.NewLogger("http_server", mylog.LevelDebug) ) type HttpServer struct { Ctx context.Context Address string AddressIndexer string AddressReverse string H *handle.HttpHandle engine *gin.Engine engineIndexer *gin.Engine engineReverse *gin.Engine srv *http.Server srvIndexer *http.Server srvReverse *http.Server } func (h *HttpServer) Run() { if h.Address != "" { h.engine = gin.New() } if h.AddressIndexer != "" { h.engineIndexer = gin.New() } if h.AddressReverse != "" { h.engineReverse = gin.New() } h.initRouter() if h.Address != "" { h.srv = &http.Server{ Addr: h.Address, Handler: h.engine, } go func() { if err := h.srv.ListenAndServe(); err != nil { log.Error("http_server old api run err:", err) } }() } if h.AddressIndexer != "" { h.srvIndexer = &http.Server{ Addr: h.AddressIndexer, Handler: h.engineIndexer, } go func() { if err := h.srvIndexer.ListenAndServe(); err != nil { log.Error("http_server indexer api run err:", err) } }() } if h.AddressReverse != "" { h.srvReverse = &http.Server{ Addr: h.AddressReverse, Handler: h.engineReverse, } go func() { if err := h.srvReverse.ListenAndServe(); err != nil { log.Error("http_server reverse api run err:", err) } }() } } func (h *HttpServer) Shutdown() { if h.srv != nil { log.Warn("http server Shutdown ... ") if err := h.srv.Shutdown(h.Ctx); err != nil { log.Error("http server Shutdown err:", err.Error()) } if err := h.srvIndexer.Shutdown(h.Ctx); err != nil { log.Error("http server Shutdown err:", err.Error()) } if err := h.srvReverse.Shutdown(h.Ctx); err != nil { log.Error("http server Shutdown err:", err.Error()) } } }
20.134021
56
0.616999
85c205b281ec2d62a8476118ffc01160b5e76156
445
c
C
lchen79_HW1/log2.c
lichen545/School-Projects
41db9817d1395372ccb0e45e50364c4367caf4a2
[ "MIT" ]
1
2017-07-19T19:56:54.000Z
2017-07-19T19:56:54.000Z
lchen79_HW1/log2.c
lichen545/School-Projects
41db9817d1395372ccb0e45e50364c4367caf4a2
[ "MIT" ]
null
null
null
lchen79_HW1/log2.c
lichen545/School-Projects
41db9817d1395372ccb0e45e50364c4367caf4a2
[ "MIT" ]
null
null
null
/* CS 141 Liyuan Chen lchen79 HW1:log2 v1.0 Returns the largest value of log(2) < n for any given n. */ #include <stdio.h> #include <stdlib.h> int log_2(int n) { if (n<2) return 0; else return log_2(n/2) + 1; } int main() { int *input; input = (int *) malloc(sizeof(int)); printf("Please input a non-negative integer.\n"); scanf("%d", input); printf("The largest integer x such that 2^x <= %d is %d\n", *input, log_2(*input)); }
15.344828
84
0.631461
d0235ca06e1230dfd55c2f82ac4e70e9d0edd0a4
364
rb
Ruby
app/interactors/beach_api_core/reward_create.rb
beachio/beach-api-core
17555159991074f2fc2c06d1c196138e16888114
[ "MIT" ]
3
2018-06-15T07:57:56.000Z
2020-01-20T12:11:29.000Z
app/interactors/beach_api_core/reward_create.rb
beachio/beach-api-core
17555159991074f2fc2c06d1c196138e16888114
[ "MIT" ]
5
2020-02-24T20:23:45.000Z
2020-08-18T14:24:07.000Z
app/interactors/beach_api_core/reward_create.rb
beachio/beach-api-core
17555159991074f2fc2c06d1c196138e16888114
[ "MIT" ]
null
null
null
class BeachApiCore::RewardCreate include Interactor def call context.reward = BeachApiCore::Reward.new context.params context.reward.reward_to = context.reward_to if context.reward.save context.status = :created else context.status = :bad_request context.fail! message: context.reward.errors.full_messages end end end
22.75
64
0.725275
557b986b4e64125f41ea5594e88750eff41cfc2d
3,230
sql
SQL
DQUEEN/extra/extras/archive_sqlcode/meta/dev_observation_final_script.sql
AEW0330/DataQualityCollaboration
a8b203ca13fcfb96ad478d0e1aec483091030bdc
[ "Apache-2.0" ]
null
null
null
DQUEEN/extra/extras/archive_sqlcode/meta/dev_observation_final_script.sql
AEW0330/DataQualityCollaboration
a8b203ca13fcfb96ad478d0e1aec483091030bdc
[ "Apache-2.0" ]
null
null
null
DQUEEN/extra/extras/archive_sqlcode/meta/dev_observation_final_script.sql
AEW0330/DataQualityCollaboration
a8b203ca13fcfb96ad478d0e1aec483091030bdc
[ "Apache-2.0" ]
1
2020-01-07T04:03:43.000Z
2020-01-07T04:03:43.000Z
--> step 1 select 'observation_emr' as tbnm ,o1.* , case when d1.death_dt is not null and (o1.meddate > d1.death_dt or o1.MEDTIME > d1.death_dt or o1.FRMDT > d1.death_dt ) then 'Y' else 'N' end as Death_error , case when o1.meddate is not null and o1.meddate < p1.Btdt then 'Y' when o1.MEDTIME is not null and o1.MEDTIME < p1.Btdt then 'Y' when o1.FRMDT is not null and o1.FRMDT < p1.Btdt then 'Y' else 'N' end as Birth_error , case when o1.meddate > o1.medtime then 'Y' when o1.meddate > o1.frmdt then 'Y' else 'N' end as date_Err into Byun_meta_1M.dbo.Dev_observation_step1 from (select ROW_NUMBER() over(order by newid()) AS uniq_no ,FRMCLN_KEY as frm_no ,PTNT_NO as patno ,CLN_TYPE as patfg ,MED_DATE as meddate ,MED_TIME as medtime ,FRM_DT as frmdt ,frm_key as frmkey ,FRM_NM as frm_nm ,MRIT_KEY as item_key ,MRIT_NM as item_nm ,ATTR_KEY ,ATTR_NM ,CONT_NM ,INS_TYPE as rslt_typ ,STUS_CD as rslt_cd ,ADD_TXT as rlst_txt ,null as rslt_num ,null as unit ,MED_DEPT as meddept ,MED_DR as meddr ,VLD_GB as include_yn ,source_value from BYUN_SOURCE_DATA.dbo.Observation_EMR) as o1 inner join (select PATNO, Btdt from BYUN_META_1M.dbo.Dev_person) as p1 on p1.PATNO = o1.patno left join (select PATNO,death_dt from BYUN_META_1M.dbo.Dev_death) as d1 on d1.PATNO = o1.patno --> [2019-10-30 20:41:52] 2,095,760 rows affected in 8 s 13 ms --> step2 select * into Byun_meta_1M.dbo.dev_observation from (select distinct o1.*,v1.uniq_no as visit_id from (select * from Byun_meta_1M.dbo.Dev_observation_step1 where patfg in ('H','O') and include_yn = 'Y') as o1 left join (select uniq_no,patno, visit_date, visit_time, dsch_date, dsch_time, med_dr, med_dept, patfg,cancel_yn from BYUN_META_1M.dbo.Dev_visit where PATFG = 'O' and tbnm in ('AOOPDLST')) as v1 on v1.patno = o1.PATNO and v1.visit_date = o1.MEDDATE and v1.med_dept = o1.MEDDEPT and v1.med_dr = o1.meddr union all select distinct o1.*,v1.uniq_no as visit_id from (select * from Byun_meta_1M.dbo.Dev_observation_step1 where patfg in ('E','I','D') and include_yn = 'Y') as o1 left join (select uniq_no, patno, visit_date, visit_time, dsch_date, dsch_time, med_dr, med_dept, patfg,cancel_yn from BYUN_META_1M.dbo.Dev_visit where PATFG in ('E','I','D') and tbnm in ('APIPDSLT')) as v1 on v1.patno = o1.PATNO and v1.visit_time = o1.MEDDATE and v1.med_dept = o1.MEDDEPT and v1.patfg = o1.patfg union all select distinct o1.*,v1.uniq_no as visit_id from (select * from Byun_meta_1M.dbo.Dev_observation_step1 where patfg in ('E','I','D') and include_yn = 'Y') as o1 left join (select patno, visit_date, visit_time, dsch_date, dsch_time,med_dr, med_dept, uniq_no,cancel_yn, case when patfg ='S' then 'M' else patfg end as patfg from BYUN_META_1M.dbo.Dev_visit where PATFG in ('G','S')) as v1 on v1.patno = o1.PATNO and (cast(v1.visit_date as date) = cast(o1.MEDDATE as date)) and v1.patfg = o1.patfg)v -- [2019-10-30 20:48:51] 4,163,001 rows affected in 13 s 314 ms (visit때문에 테이블이 늘어난듯)
36.704545
160
0.681734
aed359ae8670be89fa3b485194a91b90284711cb
96
rs
Rust
books/intro2p/src/chapters/mod.rs
yspace/rust_climb
a9b5524713e363169fd2c3c7f9acff109f8cb903
[ "MIT" ]
null
null
null
books/intro2p/src/chapters/mod.rs
yspace/rust_climb
a9b5524713e363169fd2c3c7f9acff109f8cb903
[ "MIT" ]
null
null
null
books/intro2p/src/chapters/mod.rs
yspace/rust_climb
a9b5524713e363169fd2c3c7f9acff109f8cb903
[ "MIT" ]
null
null
null
pub mod types_and_values; pub mod variables_and_boxes; pub mod functions; pub mod control_flow;
19.2
28
0.833333
f75ee160b2189fbcc92914b72e725800eb454f45
9,215
c
C
src/test/utility/compress.c
PSP-Archive/System-Interface-Library
42bfd5b1f0e767215010365894cfa9598915ea55
[ "X11" ]
null
null
null
src/test/utility/compress.c
PSP-Archive/System-Interface-Library
42bfd5b1f0e767215010365894cfa9598915ea55
[ "X11" ]
null
null
null
src/test/utility/compress.c
PSP-Archive/System-Interface-Library
42bfd5b1f0e767215010365894cfa9598915ea55
[ "X11" ]
null
null
null
/* * System Interface Library for games * Copyright (c) 2007-2020 Andrew Church <achurch@achurch.org> * Released under the GNU GPL version 3 or later; NO WARRANTY is provided. * See the file COPYING.txt for details. * * src/test/utility/compress.c: Tests for compression/decompression utility * functions. */ /* * Since we test the individual library interfaces separately, this source * file only checks that the compress() and decompress*() wrappers function * as advertised. */ #include "src/base.h" #include "src/memory.h" #include "src/test/base.h" #include "src/utility/compress.h" #include "src/utility/tinflate.h" /*************************************************************************/ /******************************* Test data *******************************/ /*************************************************************************/ /* Input string for compression tests. */ static const char original_data[] = "test"; /* Input compressed data for decompression tests. */ static const uint8_t compressed_data[] = { 0x78, 0x01, 0x2B, 0x49, 0x2D, 0x2E, 0x61, 0x00, 0x00, #ifdef SIL_UTILITY_INCLUDE_ZLIB // tinflate doesn't process these bytes. 0x06, 0x1E, 0x01, 0xC1, #endif }; /*************************************************************************/ /***************************** Test routines *****************************/ /*************************************************************************/ DEFINE_GENERIC_TEST_RUNNER(test_utility_compress) /*-----------------------------------------------------------------------*/ TEST(test_compress) { void *compressed; int32_t comp_size; #ifdef SIL_UTILITY_INCLUDE_ZLIB char decompressed[5]; long decomp_size; CHECK_TRUE(compressed = compress(original_data, sizeof(original_data), &comp_size, 0, -1)); decomp_size = tinflate(compressed, comp_size, decompressed, sizeof(decompressed), NULL); mem_free(compressed); CHECK_INTEQUAL(decomp_size, sizeof(original_data)); CHECK_STREQUAL(decompressed, original_data); #else CHECK_FALSE(compressed = compress(original_data, sizeof(original_data), &comp_size, 0, -1)); #endif return 1; } /*-----------------------------------------------------------------------*/ TEST(test_compress_memory_failure) { #ifdef SIL_UTILITY_INCLUDE_ZLIB void *compressed; int32_t comp_size; char decompressed[5]; long decomp_size; CHECK_MEMORY_FAILURES(compressed = compress( original_data, sizeof(original_data), &comp_size, 0, -1)); decomp_size = tinflate(compressed, comp_size, decompressed, sizeof(decompressed), NULL); mem_free(compressed); CHECK_INTEQUAL(decomp_size, sizeof(original_data)); CHECK_STREQUAL(decompressed, original_data); #endif return 1; } /*-----------------------------------------------------------------------*/ TEST(test_decompress) { const uint8_t compressed[] = "\x78\x01\x2B\x49\x2D\x2E\x61\x00\x00\x06\x1E\x01\xC1"; char *decompressed; int32_t decomp_size; CHECK_TRUE(decompressed = decompress(compressed, sizeof(compressed), &decomp_size, 0)); CHECK_INTEQUAL(decomp_size, sizeof(original_data)); CHECK_STREQUAL(decompressed, original_data); mem_free(decompressed); return 1; } /*-----------------------------------------------------------------------*/ TEST(test_decompress_memory_failures) { const uint8_t compressed[] = "\x78\x01\x2B\x49\x2D\x2E\x61\x00\x00\x06\x1E\x01\xC1"; char *decompressed; int32_t decomp_size; CHECK_MEMORY_FAILURES(decompressed = decompress( compressed, sizeof(compressed), &decomp_size, 0)); CHECK_INTEQUAL(decomp_size, sizeof(original_data)); CHECK_STREQUAL(decompressed, original_data); mem_free(decompressed); return 1; } /*-----------------------------------------------------------------------*/ TEST(test_decompress_to) { char decompressed[5]; int32_t decomp_size; CHECK_TRUE(decompress_to(compressed_data, sizeof(compressed_data), decompressed, sizeof(decompressed), &decomp_size)); CHECK_INTEQUAL(decomp_size, sizeof(original_data)); CHECK_STREQUAL(decompressed, original_data); return 1; } /*-----------------------------------------------------------------------*/ TEST(test_decompress_to_failure) { char decompressed[5]; CHECK_FALSE(decompress_to(compressed_data, 1, decompressed, sizeof(decompressed), NULL)); return 1; } /*-----------------------------------------------------------------------*/ TEST(test_decompress_to_buffer_overflow) { char decompressed[2] = {'x', 'x'}; CHECK_FALSE(decompress_to(compressed_data, sizeof(compressed_data), decompressed, 1, NULL)); CHECK_INTEQUAL(decompressed[0], original_data[0]); CHECK_INTEQUAL(decompressed[1], 'x'); return 1; } /*-----------------------------------------------------------------------*/ TEST(test_decompress_partial) { char decompressed[5]; int32_t decomp_size; void *state; CHECK_TRUE(state = decompress_create_state()); for (int i = 0; i < (int)sizeof(compressed_data) - 1; i++) { const int result = decompress_partial( state, &compressed_data[i], 1, decompressed, sizeof(decompressed), &decomp_size); if (result != -1) { FAIL("decompress_partial() for byte %d was %d but should have" " been -1", i, result); } } CHECK_INTEQUAL(decompress_partial( state, &compressed_data[sizeof(compressed_data)-1], 1, decompressed, sizeof(decompressed), &decomp_size), 1); decompress_destroy_state(state); CHECK_INTEQUAL(decomp_size, sizeof(original_data)); CHECK_STREQUAL(decompressed, original_data); return 1; } /*-----------------------------------------------------------------------*/ TEST(test_decompress_partial_memory_failure) { char decompressed[5]; int32_t decomp_size; void *state; CHECK_MEMORY_FAILURES(state = decompress_create_state()); for (int i = 0; i < (int)sizeof(compressed_data) - 1; i++) { const int result = decompress_partial( state, &compressed_data[i], 1, decompressed, sizeof(decompressed), &decomp_size); if (result != -1) { FAIL("decompress_partial() for byte %d was %d but should have" " been -1", i, result); } } CHECK_INTEQUAL(decompress_partial( state, &compressed_data[sizeof(compressed_data)-1], 1, decompressed, sizeof(decompressed), &decomp_size), 1); decompress_destroy_state(state); CHECK_INTEQUAL(decomp_size, sizeof(original_data)); CHECK_STREQUAL(decompressed, original_data); return 1; } /*-----------------------------------------------------------------------*/ TEST(test_decompress_partial_no_size) { char decompressed[5]; void *state; CHECK_TRUE(state = decompress_create_state()); for (int i = 0; i < (int)sizeof(compressed_data) - 1; i++) { const int result = decompress_partial( state, &compressed_data[i], 1, decompressed, sizeof(decompressed), NULL); if (result != -1) { FAIL("decompress_partial() for byte %d was %d but should have" " been -1", i, result); } } CHECK_INTEQUAL(decompress_partial( state, &compressed_data[sizeof(compressed_data)-1], 1, decompressed, sizeof(decompressed), NULL), 1); decompress_destroy_state(state); CHECK_STREQUAL(decompressed, original_data); return 1; } /*-----------------------------------------------------------------------*/ TEST(test_decompress_partial_no_size_buffer_overflow) { char decompressed[2] = {'x', 'x'}; void *state; CHECK_TRUE(state = decompress_create_state()); for (int i = 0; i < (int)sizeof(compressed_data) - 1; i++) { const int result = decompress_partial( state, &compressed_data[i], 1, decompressed, 1, NULL); if (result == 1) { FAIL("decompress_partial() for byte %d was 1 but should have" " been 0 or -1", i); } } CHECK_INTEQUAL(decompress_partial( state, &compressed_data[sizeof(compressed_data)-1], 1, decompressed, 1, NULL), 0); decompress_destroy_state(state); CHECK_INTEQUAL(decompressed[0], original_data[0]); CHECK_INTEQUAL(decompressed[1], 'x'); return 1; } /*-----------------------------------------------------------------------*/ TEST(test_decompress_destroy_state_null) { decompress_destroy_state(NULL); return 1; } /*************************************************************************/ /*************************************************************************/
31.996528
85
0.538687
7146e2d8dacc75c67d1131b585028d9114b1d895
1,870
ts
TypeScript
apps/todos/todos-web/src/app/+state/app.effects.spec.ts
jonathonadams/zero-to-production
c386f67fd6e6d44a1d22b6fbb44110634fd22494
[ "MIT" ]
1
2019-08-21T05:40:16.000Z
2019-08-21T05:40:16.000Z
apps/todos/todos-web/src/app/+state/app.effects.spec.ts
jonathonadams/zero-to-production
c386f67fd6e6d44a1d22b6fbb44110634fd22494
[ "MIT" ]
54
2020-05-20T00:54:05.000Z
2020-09-15T00:19:29.000Z
apps/todos/todos-web/src/app/+state/app.effects.spec.ts
jonathonadams/zero-to-production
c386f67fd6e6d44a1d22b6fbb44110634fd22494
[ "MIT" ]
2
2020-02-05T22:26:58.000Z
2020-02-06T08:06:53.000Z
import { TestBed } from '@angular/core/testing'; import { Observable } from 'rxjs'; import { Actions } from '@ngrx/effects'; import { hot, Scheduler } from 'jest-marbles'; import { provideMockActions } from '@ngrx/effects/testing'; import { createSpyObj } from '@ztp/tests/client'; import { AppEffects } from './app.effects'; import { NotificationService } from '@ztp/common/utils/notifications'; import { loginFailure, registerSuccess } from '@ztp/common/auth/data-access'; describe('AppEffects', () => { let effects: AppEffects; let actions$: Observable<any>; let ns: NotificationService; const nsSpy = createSpyObj('NotificationService', ['emit']); beforeEach(() => { TestBed.configureTestingModule({ providers: [ AppEffects, { provide: NotificationService, useValue: nsSpy }, provideMockActions(() => actions$), ], }); effects = TestBed.inject<AppEffects>(AppEffects); actions$ = TestBed.inject<Actions>(Actions); ns = TestBed.inject<NotificationService>(NotificationService); }); describe('loginFailure$', () => { it('should notify the user of login failure', () => { const spy = jest.spyOn(ns, 'emit'); jest.resetAllMocks(); const action = loginFailure({ error: 'Nope!!' }); actions$ = hot('-a---', { a: action }); effects.loginFailure$.subscribe(); Scheduler.get().flush(); expect(spy).toHaveBeenCalled(); }); }); describe('registerSuccess$', () => { it('should notify the user of successful registration', () => { const spy = jest.spyOn(ns, 'emit'); jest.resetAllMocks(); const action = registerSuccess({ user: {} as any }); actions$ = hot('-a---', { a: action }); effects.registerSuccess$.subscribe(); Scheduler.get().flush(); expect(spy).toHaveBeenCalled(); }); }); });
29.21875
77
0.628877
ecf1121279c6de7d354d658282248eeea9af0bbb
2,455
swift
Swift
Wordist/Wordist/Views/WDNavigationHeader.swift
AamirAnwar/Wordist
d6b527dc0488d0be514e028fd8525eb4b7fa3975
[ "MIT" ]
null
null
null
Wordist/Wordist/Views/WDNavigationHeader.swift
AamirAnwar/Wordist
d6b527dc0488d0be514e028fd8525eb4b7fa3975
[ "MIT" ]
2
2019-03-13T19:47:59.000Z
2019-03-14T10:23:10.000Z
Wordist/Wordist/Views/WDNavigationHeader.swift
AamirAnwar/Wordist
d6b527dc0488d0be514e028fd8525eb4b7fa3975
[ "MIT" ]
1
2019-03-13T08:58:22.000Z
2019-03-13T08:58:22.000Z
// // WDNavigationHeader.swift // Wordist // // Created by Aamir on 10/09/17. // Copyright © 2017 AamirAnwar. All rights reserved. // import UIKit protocol WDNavigationHeaderDelegate { func didTapBackButton() } class WDNavigationHeader: UIView { fileprivate let backButton = UIButton(type: .system) var delegate:WDNavigationHeaderDelegate? required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) createViews() } override init(frame: CGRect) { super.init(frame: frame) createViews() } func createViews() { backButton.translatesAutoresizingMaskIntoConstraints = false backButton.addTarget(self, action: #selector(backButtonPressed), for: .touchUpInside) backButton.titleEdgeInsets = UIEdgeInsetsMake(-5, -15, -5, -15) self.addSubview(backButton) NSLayoutConstraint.activate([ backButton.leadingAnchor.constraint(equalTo: self.leadingAnchor, constant: kSidePadding), backButton.topAnchor.constraint(equalTo: self.topAnchor), backButton.bottomAnchor.constraint(equalTo: self.bottomAnchor), ]) } @objc func backButtonPressed() { delegate?.didTapBackButton() } func setBackButton(title:String) { var fontIconString:String? do { try fontIconString = "&#xf124;".convertHtmlSymbols() } catch { print("Fatal error") } if let fontIconString = fontIconString { let attributedTitle = NSMutableAttributedString.init(string: fontIconString, attributes: [NSAttributedStringKey.font:WDIconFont, NSAttributedStringKey.foregroundColor:WDMainTheme, NSAttributedStringKey.baselineOffset:-1]) attributedTitle.append(NSMutableAttributedString.init(string: " \(title)", attributes: [NSAttributedStringKey.font:WDFontSectionHeader, NSAttributedStringKey.foregroundColor:WDMainTheme])) backButton.setAttributedTitle(attributedTitle, for: .normal) } } }
33.175676
152
0.572709
d36182531059c2924322ece27b71f4b32525e389
2,766
swift
Swift
DIT-Timetable-V2/Extensions/Utils.swift
collegboi/DIT-Timetable-iOS
cfe1a06d37f18299ccabf506481e439936668840
[ "MIT" ]
1
2016-10-03T10:00:59.000Z
2016-10-03T10:00:59.000Z
DIT-Timetable-V2/Extensions/Utils.swift
collegboi/DIT-Timetable-iOS
cfe1a06d37f18299ccabf506481e439936668840
[ "MIT" ]
null
null
null
DIT-Timetable-V2/Extensions/Utils.swift
collegboi/DIT-Timetable-iOS
cfe1a06d37f18299ccabf506481e439936668840
[ "MIT" ]
null
null
null
// // Utils.swift // DIT-Timetable-V2 // // Created by Timothy Barnard on 16/09/2017. // Copyright © 2017 Timothy Barnard. All rights reserved. // import Foundation class Utils { class func using12hClockFormat() -> Bool { let formatter = DateFormatter() formatter.locale = Locale.current formatter.dateStyle = .none formatter.timeStyle = .short let dateString = formatter.string(from: Date()) let amRange = dateString.range(of: formatter.amSymbol) let pmRange = dateString.range(of: formatter.pmSymbol) return !(pmRange == nil && amRange == nil) } class func create12HourTo24HourStr(time: String) -> String { let timeParts1 = time.components(separatedBy: " ") if(timeParts1.count >= 2) { let amPM = timeParts1[1] let timePart = timeParts1[0] let timeParts = timePart.components(separatedBy: ":") if(timeParts.count == 2) { guard let hour = Int(timeParts[0]) else { return time } guard let min = Int(timeParts[1]) else { return time } var newHour = hour if(amPM.lowercased() == "p.m.") { newHour = hour + 12 } return String(newHour) + ":" + String(min) } else { return time } } else { return time } } class func create12HourTimeStr(time: String, showAMPM: Bool = true) -> String { let timeParts = time.components(separatedBy: ":") if(timeParts.count == 2) { guard let hour = Int(timeParts[0]) else { return time } guard let min = Int(timeParts[1]) else { return time } var amPM: String = "a.m." if(hour > 12) { amPM = "p.m." } var newHour = 12 if(hour != 12) { newHour = hour % 12 } var newMinString = String(min) if(min < 10) { newMinString = "0" + String(min) } if(showAMPM) { return String(newHour) + ":" + newMinString + " " + amPM } else { return String(newHour) + ":" + newMinString } } else { return time } } }
26.342857
83
0.42914
25da81f2ce72dcae92e31e7762a4deaeac9f3728
16,419
sql
SQL
file sql/tarian_db.sql
WisnuDwiP/Laravel
675984d5bd8bb12f2767c5a30c86fd2660a80b5a
[ "MIT" ]
null
null
null
file sql/tarian_db.sql
WisnuDwiP/Laravel
675984d5bd8bb12f2767c5a30c86fd2660a80b5a
[ "MIT" ]
null
null
null
file sql/tarian_db.sql
WisnuDwiP/Laravel
675984d5bd8bb12f2767c5a30c86fd2660a80b5a
[ "MIT" ]
null
null
null
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Sep 29, 2019 at 09:54 PM -- Server version: 10.3.16-MariaDB -- PHP Version: 7.3.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `id9577352_tarian_db` -- -- -------------------------------------------------------- -- -- Table structure for table `data_tarian` -- CREATE TABLE `data_tarian` ( `id_tarian` bigint(20) UNSIGNED NOT NULL, `nama_tarian` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `foto` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `provinsi` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `deskripsi` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL, `video` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `data_tarian` -- INSERT INTO `data_tarian` (`id_tarian`, `nama_tarian`, `foto`, `provinsi`, `deskripsi`, `video`, `created_at`, `updated_at`) VALUES (7, 'Bajidor Kahot Dance', '01.jpg', 'Jawa Barat', 'Bajidor Kahot Dance is one of the traditional dances originating from West Java. Bajidor Kahot Dance is a combination of Tap Tilu Dance and Jaipongan Dance as the basis of the movement. What distinguishes Bajidor Kahot Dance is not to optimize the shoulders in movement as well as on Jaipongan Dance and Tap Tilu Dance. In Bajidor Kahot Dance, hips, arms, shoulders, head, and hands are dynamically moved. Steps from the foot became part of Bajidor Kahot Dance. \r\n\r\nThe dancers bajidor kahot usually wear kebaya typical Pasundan land. With the kebaya in the design fit with the body shape, the dancers bajidor kahot look very charming. Moreover, the clothes worn wear bright colors. Additional accessories such as scarves and fans also make the show from Bajidor Kahot Dance looks very beautiful.', 'https://www.youtube.com/embed/kEw2ON35UDg', '2019-08-02 06:58:42', '2019-08-02 06:58:42'), (8, 'Bambang Cakil Dance', '02.jpg', 'Yogyakarta', 'The Bambangan Cakil dance is one of the classical dances in Java, especially Central Java. This dance was actually adopted from one of the scenes in the performance of Wayang Kulit or Wayang Kulit, the Flower War or Flower War. \r\n\r\nThis dance is telling about the battle between the knights that fight giants. The knight is a character that is subtle and gentle, while the giant figures is illustrate the rough and cruel. In Leather puppet performances, Perang Kembang scenes are usually performed at the middle or the show or at Pathet Sanga stage. The war between the knights (Bambangan) against the giant is very attractive, in this scene can also be used as a place of assessment of a puppeteer in moving the puppet. The meaning that contained in this dance is that all forms of crime and wrath which definitely inferior to the good.', 'https://www.youtube.com/embed/pO_EstNJcF4', '2019-08-02 07:01:06', '2019-08-07 21:56:49'), (9, 'Bedhaya Dance', '03.jpg', 'Surakarta', 'The bedhaya (also written as bedoyo, beḍaya, and various other transliterations) is a sacred ritualized dance of Java, Indonesia, associated with the royal palaces of Yogyakarta and Surakarta. Along with the serimpi, the bedhaya epitomized the elegant (alus) character of the royal court, and the dance became an important symbol of the ruler\'s power. \r\n\r\nThe bedhaya has different forms in the two court cities, the bedhaya Ketawang in Surakarta (Solo), and the bedhaya Semang in Yogyakarta, the latter of which has not been performed for more than 20 years. The Solonese dance continues to be performed once per year, on the second day of the Javanese month of Ruwah (during May in the Gregorian calendar), to commemorate the ascension of the current Susuhunan (prince) of Surakarta. Nine females, relatives or wives of the Susuhunan, perform the dance before a private audience. An invitation to anyone outside of the inner circle of the court is a considerable honor. \r\n\r\nSome kind of female dance known as bedhaya existed on Java at least as early as the Majapahit Empire. Indeed, some of the steps of the modern dance are said to be as old as the 3rd century. However, the modern form is traditionally dated to the court of Sultan Agung of Mataram (reigned 1613–1645). Unfortunately there is almost no historical evidence to back up the claims made about the advances in the arts in Sultan Agung\'s courts, and the existence of the dance is not clearly documented until the late 18th century.', 'https://www.youtube.com/embed/HzItCtW6cCk', '2019-08-02 07:02:33', '2019-08-02 07:02:33'), (10, 'Ciwa Nataraja Dance', '04.jpg', 'Bali', 'The Çiwa Nataraja is a master dance of the Institute, of which is commonly carried out and performed by 9 (nine) female dancers. A dancer embodies and acts as the Lord Śiva, while eight (8) other dancers embody and act as the bright effulgence of the Lord Śiva. \r\n\r\nIn hindu myhtology, Siwa Nataraja is a form of the God Siwa, who is known as the king of dance. As the highest dancer. Siwa dances continuously to maintain rhythm and balance in the cosmos. The movements in this dancing are so powerful that it creates and combines this world realm. \r\n\r\nThis dance is a compatible fusion between Balinese and several elements of Bharata Natyam dance from India, which have been extracted and reconstructed into its total entirety. Çiwa Nataraja itself is the manifestation of the Lord Śiva Himself, or the personality of Godhead as the Supreme Dancer. Being a god of dance, he constantly moves leading to the rhythm and regularity in the cosmos. \r\n\r\nThis master dance describes the effulgence of the Lord Śiva as the supreme powers, and then those supreme powers are accumulated into a supreme unity of which causing and creating the creatures in the universe. This master dance is often performed together with the institute Hymn and Mars in several occasions of academic ceremonies. Dance Composer: N.L.N. Swasthi Widjaja, and Music Art: I Nyoman Windha.', 'https://www.youtube.com/embed/TnkVMNNXz84', '2019-08-02 07:07:03', '2019-08-02 07:07:03'), (11, 'Deguq Dance', '05.jpg', 'Kalimantan Timur', 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don\'t look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be.', 'https://www.youtube.com/embed/0IxMdR-26Zo', '2019-08-02 07:36:38', '2019-08-02 07:36:38'), (12, 'Gabor Dance', '07.jpg', 'Bali', 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don\'t look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be.', 'https://www.youtube.com/embed/QR9bjN4jAVM', '2019-08-02 07:38:01', '2019-08-02 07:38:01'), (13, 'Iswara Gandrung Dance', '07.jpg', 'Jawa Barat', 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don\'t look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be.', 'https://www.youtube.com/embed/i_D-daDsFS4', '2019-08-02 07:45:05', '2019-08-02 07:45:05'), (14, 'Jemparingan Dance', '08.jpg', 'Yogyakarta', 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don\'t look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be.', 'https://www.youtube.com/embed/x55RvYhMzew', '2019-08-02 07:46:26', '2019-08-02 07:46:26'), (15, 'Kedempling Dance', '09.jpg', 'Jawa Barat', 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don\'t look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be.', 'https://www.youtube.com/embed/3YauV-GrSYY', '2019-08-02 07:48:16', '2019-08-02 07:48:16'), (16, 'Kidung Asmara Dance', '10.jpg', 'Jawa Timur', 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don\'t look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be.', 'https://www.youtube.com/embed/-iX_Wgt14Lw', '2019-08-02 08:05:42', '2019-08-02 08:05:42'), (17, 'Ngarojeng Dance', '11.jpg', 'Jawa Barat', 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don\'t look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be.', 'https://www.youtube.com/embed/Y-xyRvXGgKY', '2019-08-02 08:10:58', '2019-08-02 08:10:58'), (18, 'Ofalangga Dance', '12.jpg', 'Nusa Tenggara Timur', 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don\'t look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be.', 'https://www.youtube.com/embed/OelheN_CJmk', '2019-08-02 08:17:23', '2019-08-02 08:17:23'), (19, 'Paksi Tuwung Dance', '13.jpg', 'Jawa Barat', 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don\'t look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be.', 'https://www.youtube.com/embed/VsF8d9yX9nI', '2019-08-02 08:19:12', '2019-08-02 08:19:12'), (20, 'Ratoh Rajoe Dance', '14.jpg', 'Aceh', 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don\'t look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be.', 'https://www.youtube.com/embed/8fTHblviKi8', '2019-08-02 08:21:50', '2019-08-02 08:21:50'), (21, 'Pendet Dance', '15.jpg', 'Bali', 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don\'t look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be.', 'https://www.youtube.com/embed/fV8vYwbNYCA', '2019-08-02 08:23:40', '2019-08-02 08:23:40'); -- -------------------------------------------------------- -- -- Table structure for table `migrations` -- CREATE TABLE `migrations` ( `id` int(10) UNSIGNED NOT NULL, `migration` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `batch` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `migrations` -- INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (1, '2014_10_12_000000_create_users_table', 1), (2, '2014_10_12_100000_create_password_resets_table', 1), (3, '2019_04_09_101529_komentar', 1), (5, '2019_08_01_071247_data_tarian', 2); -- -------------------------------------------------------- -- -- Table structure for table `password_resets` -- CREATE TABLE `password_resets` ( `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `token` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE `users` ( `id` bigint(20) UNSIGNED NOT NULL, `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `email_verified_at` timestamp NULL DEFAULT NULL, `password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, `role` enum('admin','user') COLLATE utf8mb4_unicode_ci NOT NULL, `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `users` -- INSERT INTO `users` (`id`, `name`, `email`, `email_verified_at`, `password`, `role`, `remember_token`, `created_at`, `updated_at`) VALUES (1, 'admin', 'admin@admin.com', NULL, '$2y$10$oTFhH2ptr4mY3IeutW1t3O4rxyFuQayDgdR3gz7fu.AUS9zQlSJxe', 'admin', NULL, '2019-07-27 12:51:33', '2019-07-27 12:51:33'), (2, 'Virna', 'admin@virna.com', NULL, '$2y$10$wm3JSqr3yRHxMNmOkTpZ9eJfXXTWP93pm7I4R72lli4vhRIW.wxPm', 'admin', 'YRuZAPxYpQtjSflspMGxpwYWGndOnQ2qAuB6UEqCGfdKpTTA3UTVgwoRNKnz', '2019-08-02 01:36:47', '2019-08-02 01:36:47'); -- -- Indexes for dumped tables -- -- -- Indexes for table `data_tarian` -- ALTER TABLE `data_tarian` ADD PRIMARY KEY (`id_tarian`); -- -- Indexes for table `migrations` -- ALTER TABLE `migrations` ADD PRIMARY KEY (`id`); -- -- Indexes for table `password_resets` -- ALTER TABLE `password_resets` ADD KEY `password_resets_email_index` (`email`); -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `users_email_unique` (`email`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `data_tarian` -- ALTER TABLE `data_tarian` MODIFY `id_tarian` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24; -- -- AUTO_INCREMENT for table `migrations` -- ALTER TABLE `migrations` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
92.241573
1,646
0.75437
e8035f8a40a71bf656641240506d28ce268b96d3
463
css
CSS
client/src/admin/pages/main/components/navigation/Navigation.css
Cerberrus/aic-test
d8064d5a47ceb295d871d8de1025576e93b66bbc
[ "MIT" ]
3
2020-12-24T11:32:07.000Z
2021-06-06T09:33:41.000Z
client/src/admin/pages/main/components/navigation/Navigation.css
Cerberrus/aic-test
d8064d5a47ceb295d871d8de1025576e93b66bbc
[ "MIT" ]
null
null
null
client/src/admin/pages/main/components/navigation/Navigation.css
Cerberrus/aic-test
d8064d5a47ceb295d871d8de1025576e93b66bbc
[ "MIT" ]
1
2021-06-06T09:33:48.000Z
2021-06-06T09:33:48.000Z
.navigation { margin-right: 48px; } .navigation__link { display: block; margin-bottom: 16px; padding: 12px 0 12px 16px; width: 250px; border-bottom: 1px solid var(--color-darkGray); color: var(--color-darkGray); transition: .2s; } .navigation__link:hover { color: var(--color-black); border-color: var(--color-yellow); } .navigation__link.active { color: var(--color-black); border-color: var(--color-yellow); }
19.291667
51
0.641469
ddb42d1d990e4baf877941f8d0da19bfe36f06fb
3,505
php
PHP
frontend/views/profile/index.php
MissAnnah95/tours
03e01625953be0fd68f5570aae17af118517d82d
[ "BSD-3-Clause" ]
null
null
null
frontend/views/profile/index.php
MissAnnah95/tours
03e01625953be0fd68f5570aae17af118517d82d
[ "BSD-3-Clause" ]
1
2020-11-16T21:16:58.000Z
2020-11-16T21:16:58.000Z
frontend/views/profile/index.php
MissAnnah95/tours
03e01625953be0fd68f5570aae17af118517d82d
[ "BSD-3-Clause" ]
1
2020-11-17T06:36:48.000Z
2020-11-17T06:36:48.000Z
<?php use yii\helpers\Html; use common\models\User; use frontend\models\Profile; use yii\helpers\Url; /* @var $this yii\web\View */ /* @var $searchModel frontend\models\ProfileSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = 'Profiles'; $this->params['breadcrumbs'][] = $this->title; ?> <div class="profile-index"> <h1><?= Html::encode($this->title) ?></h1> <?php // echo $this->render('_search', ['model' => $searchModel]); ?> <div class="container"> <div class = "row"> <div class = "col-3"> <div class="card border shadow-sm" style="width: 18rem;"> <img class="card-img-top" src="<?= Yii::$app->request->baseUrl ?>/listingsimages/profile.jpg" alt="Card image cap"> <div class="card-body"> <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p> </div> </div> <br></br> <div class="card border shadow-sm" style="width: 18rem;"> <div class="card-body"> <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p> </div> </div> </div> <div class = "col-6"> <div class="card border text-left"> <div class="card-header1" id="profile"> My Profile </div> <div class="card-body"> <tbody> <tr> <td>User Name</td> <td>:</td> <td>Maryann Kamau</td> </tr> <hr> <tr> <td>Password</td> <td>:</td> <td>mypasswordtour</td> </tr> <hr> <tr> <td>Email</td> <td>:</td> <td>sam_anderson@gmail.com</td> </tr> <hr> <tr> <td>Phone</td> <td>:</td> <td>+01 4561 3214</td> </tr> <hr> <tr> <td>Date of birth</td> <td>:</td> <td>03 Jun 1980</td> </tr> <hr> <tr> <td>Address</td> <td>:</td> <td>8800 Orchard Lake Road, Suite 180 Farmington Hills, U.S.A.</td> </tr> <hr> <tr> <td>Status</td> <td>:</td> <td><button class="light">Active</button> </td> </tr> </tbody> </div> <div class="card-footer text-muted"> <p class="card-text">It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters </p> <a href="<?= Url::to(['/profile/create'])?>" class="btn btn-primary">Edit Profile</a> </div> </div> </div> <div class="col-3"> <div class="card border text-center" style="margin-right:20px"> <div class="card-header1"> Notifications </div> <div class="card-body"> <h5 class="card-title">Special title treatment</h5> <p class="card-text">With supporting text below as a natural lead-in to additional content.</p> <a href="#" class="btn btn-primary">Go somewhere</a> </div> </div> </div> </div> </div> </div>
27.382813
253
0.48816
45e46885f66a834a8dfea384ab0e0e4179e07177
496
kt
Kotlin
users/src/main/java/com/upreality/expensesspringbackend/users/domain/models/Credentials.kt
denisrebrof/expenses-spring-backend
77aeaf800255f2031d1c1cb38e3d11191f030d33
[ "Apache-2.0" ]
null
null
null
users/src/main/java/com/upreality/expensesspringbackend/users/domain/models/Credentials.kt
denisrebrof/expenses-spring-backend
77aeaf800255f2031d1c1cb38e3d11191f030d33
[ "Apache-2.0" ]
null
null
null
users/src/main/java/com/upreality/expensesspringbackend/users/domain/models/Credentials.kt
denisrebrof/expenses-spring-backend
77aeaf800255f2031d1c1cb38e3d11191f030d33
[ "Apache-2.0" ]
null
null
null
package com.upreality.expensesspringbackend.users.domain.models sealed class Credentials { sealed class Base : Credentials() { data class Email( val email: String, val verified: Boolean = false ) : Base() data class Phone( val phone: String, val verified: Boolean = false ) : Base() } sealed class ProviderBased : Credentials() { data class Google(val googleId: Long) : ProviderBased() } }
26.105263
63
0.590726
f0973dfadfcfd50dee9ba058cd9ea0591aaad66c
693
js
JavaScript
public/js/login.js
arncrn/brando_app
1f752868a79c34d4e9a9a5c05028f13afb917800
[ "0BSD" ]
null
null
null
public/js/login.js
arncrn/brando_app
1f752868a79c34d4e9a9a5c05028f13afb917800
[ "0BSD" ]
null
null
null
public/js/login.js
arncrn/brando_app
1f752868a79c34d4e9a9a5c05028f13afb917800
[ "0BSD" ]
null
null
null
document.addEventListener('DOMContentLoaded', () => { let form = document.querySelector('form') form.addEventListener('submit', (event) => { event.preventDefault() let XHR = new XMLHttpRequest(); XHR.open('POST', '/login') XHR.setRequestHeader('content-type', 'application/json') XHR.addEventListener('load', (event) => { if (event.target.status === 200) { window.localStorage.setItem('loggedIn', 'true'); window.location.pathname = '/clothing' } else { alert('invalid username/password'); } }) XHR.send(JSON.stringify({ username: form.username.value, password: form.password.value })); }) })
27.72
60
0.613276
974c4c180e4b78036f39137c063f1313f3e067d5
545
kt
Kotlin
custom-vu/src/main/kotlin/jces1209/vu/action/BrowseIssueTypes.kt
ssagnes/jces-1209
a2bcc10cca4b1fb04327dc189033dafe9b41d003
[ "Apache-2.0" ]
null
null
null
custom-vu/src/main/kotlin/jces1209/vu/action/BrowseIssueTypes.kt
ssagnes/jces-1209
a2bcc10cca4b1fb04327dc189033dafe9b41d003
[ "Apache-2.0" ]
25
2020-03-03T15:32:59.000Z
2021-02-02T03:25:25.000Z
custom-vu/src/main/kotlin/jces1209/vu/action/BrowseIssueTypes.kt
ssagnes/jces-1209
a2bcc10cca4b1fb04327dc189033dafe9b41d003
[ "Apache-2.0" ]
9
2020-02-14T10:17:12.000Z
2021-09-06T22:49:39.000Z
package jces1209.vu.action import com.atlassian.performance.tools.jiraactions.api.action.Action import jces1209.vu.Measure import jces1209.vu.MeasureType import jces1209.vu.page.admin.issuetypes.BrowseIssueTypesPage class BrowseIssueTypes( private val measure: Measure, private val browseIssueTypesPage: BrowseIssueTypesPage ) : Action { override fun run() { measure.measure(MeasureType.BROWSE_ISSUE_TYPES) { browseIssueTypesPage .open() .waitForBeingLoaded() } } }
25.952381
68
0.711927
a9c91d0776bbb09a5ce7d8f05e3ba27a026b86dc
946
html
HTML
manuscript/page-54/body.html
marvindanig/latin-for-beginners
1f7e98094c187c4d8dbc559ded8641f90b95d568
[ "BlueOak-1.0.0", "MIT" ]
null
null
null
manuscript/page-54/body.html
marvindanig/latin-for-beginners
1f7e98094c187c4d8dbc559ded8641f90b95d568
[ "BlueOak-1.0.0", "MIT" ]
null
null
null
manuscript/page-54/body.html
marvindanig/latin-for-beginners
1f7e98094c187c4d8dbc559ded8641f90b95d568
[ "BlueOak-1.0.0", "MIT" ]
null
null
null
<div class="leaf "><div class="inner justify"><ol style="--start:7" start="7"><li>Iūlia est puella pulchra Julia is (a) girl pretty</li><li>Domina fīliam pulchram habet (The) lady (a) daughter beautiful has</li></ol><p><em>a.</em> The sentences above show that Latin does not express some words which are necessary in English. First of all, <em>Latin has no article theor a</em>; thus <em>agricola</em> may mean <em>the farmer, a farmer</em>, or simply <em>farmer</em>. Then, too, the personal pronouns, <em>I, you, he, she</em>, etc., and the possessive pronouns, <em>my, your, his, her</em>, etc., are not expressed if the meaning of the sentence is clear without them.</p><h5>Lesson Ii</h5><h6>First Principles (<Em>continued</em>)</h6><p class=" stretch-last-line ">Inflection. Words may change their forms to indicate some change in sense or use, as, <em>is, are; was, were; who, whose, whom; farmer, farmer’s; woman,</em></p></div> </div>
315.333333
775
0.704017
f794c6beadf9611162d77d3809400e688b004272
41
kts
Kotlin
AdventOfCodeDay03/settings.gradle.kts
bdlepla/AdventOfCode2020
043d0cfe3971c83921a489ded3bd45048f02ce83
[ "Unlicense" ]
null
null
null
AdventOfCodeDay03/settings.gradle.kts
bdlepla/AdventOfCode2020
043d0cfe3971c83921a489ded3bd45048f02ce83
[ "Unlicense" ]
null
null
null
AdventOfCodeDay03/settings.gradle.kts
bdlepla/AdventOfCode2020
043d0cfe3971c83921a489ded3bd45048f02ce83
[ "Unlicense" ]
null
null
null
rootProject.name = "AdventOfCodeDay03"
10.25
38
0.780488
877568811b78138b6680134846b6e95d0c4c81d6
4,220
html
HTML
home/home.html
KisanThapa/CS-615-UI-UX
8520f08483c07a0b2b89203f0ad20d2f256a4687
[ "MIT" ]
null
null
null
home/home.html
KisanThapa/CS-615-UI-UX
8520f08483c07a0b2b89203f0ad20d2f256a4687
[ "MIT" ]
null
null
null
home/home.html
KisanThapa/CS-615-UI-UX
8520f08483c07a0b2b89203f0ad20d2f256a4687
[ "MIT" ]
null
null
null
<!DOCTYPE html> <html> <head> <link rel="stylesheet" type="text/css" href="../style/main.css"> <link rel="stylesheet" type="text/css" href="style.css"> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Inter&family=Karla&display=swap" rel="stylesheet"> </head> <body class="screen"> <!-- <div class="statusBar"> <img class="time" src="../imgs/time.svg" alt="Time" /> <img class="mobileSignal" src="../imgs/mobile_signal.svg" alt="Mobile Signal" /> <img class="wifi" src="../imgs/wifi.svg" alt="Wifi" /> <img class="battery" src="../imgs/battery.svg" alt="Battery" /> </div> --> <div class="container"> <h2 class="title">Welcome</h2> <span class="welcome">Check out the recent new postings in your area below!</span> <form class="searchForm"> <input class="search" type="text" name="Search location" placeholder="Search location"> </form> <span class="sortBy">Recent</span> <a href="../filterpage/filterpage.html"> <img class="filter" src="../imgs/filter.svg"> </a> <a href="../roomDetails/roomDetailsEthan.html"> <div class="room1"></div> <img class="pic1" src="../imgs/ethan_room.jpg"> <img class="marker1" src="../imgs/map_marker.svg"> <span class="location1">123 Main St, Quincy</span> <img class ="heart1" src="../imgs/heart.svg"> <img class="person1" src="../imgs/person.svg"> <span class="name1">Ethan Hunt</span> <img class="dollar1" src="../imgs/dollar_sign.svg"> <span class="amount1">1000/mo</span> <span class="time1">23 hours ago</span> </a> <a href="../roomDetails/roomDetailsJillianJacob.html"> <div class="room2"></div> <img class="pic2" src="../imgs/jill_room.jpg"> <img class="marker2" src="../imgs/map_marker.svg"> <span class="location2">456 Maple Lane, Cambridge</span> <img class ="heart2" src="../imgs/heart.svg"> <img class="person2" src="../imgs/person.svg"> <span class="name2">Jillian Jacobs</span> <img class="dollar2" src="../imgs/dollar_sign.svg"> <span class="amount2">1200/mo</span> <span class="time2">1 day ago</span> </a> </div> <div id="homeBar"> <a href="../home/home.html"> <div class="home"> <object class="homeIcon" id="active" type="image/svg+xml" data="../imgs/house_active.svg"></object> <span class="homeLabel" id="active">Home</span> </div> </a> <a href="../messages/messages.html"> <div class="home"> <object class="homeIcon" type="image/svg+xml" data="../imgs/msg.svg"></object> <span class="homeLabel">Messages</span> </div> </a> <a href="../postRooms/postRooms.html"> <div class="home"> <object class="homeIcon" type="image/svg+xml" data="../imgs/plus.svg"></object> <span class="homeLabel">Post Room</span> </div> </a> <a href="../savedRooms/savedRooms.html"> <div class="home"> <object class="homeIcon" type="image/svg+xml" data="../imgs/heart.svg"></object> <span class="homeLabel">Saved</span> </div> <a href="../profile/profile.html"> <div class="home"> <object class="homeIcon" type="image/svg+xml" data="../imgs/person.svg"></object> <span class="homeLabel">Profile</span> </div> </a> </div> <!-- <div class="footer"> <img class="bottomSeperator" src="../imgs/bottom_seperator.svg" alt="Bottom Seperator Line" /> </div> --> </body> </html>
41.782178
119
0.52109
a5923e43eeafa546d23cd2fe2199553115b33eaa
1,953
kt
Kotlin
src/main/kotlin/org/rust/lang/core/psi/CustomAttributes.kt
normalchaos/intellij-rust
d307813d869cc84f89bbebeacfc2ec9f6cc4ce25
[ "MIT" ]
4,168
2015-11-28T19:55:12.000Z
2022-03-31T18:47:12.000Z
src/main/kotlin/org/rust/lang/core/psi/CustomAttributes.kt
normalchaos/intellij-rust
d307813d869cc84f89bbebeacfc2ec9f6cc4ce25
[ "MIT" ]
8,336
2015-11-28T11:40:22.000Z
2022-03-31T15:56:54.000Z
src/main/kotlin/org/rust/lang/core/psi/CustomAttributes.kt
normalchaos/intellij-rust
d307813d869cc84f89bbebeacfc2ec9f6cc4ce25
[ "MIT" ]
522
2015-11-28T17:17:39.000Z
2022-03-07T07:09:06.000Z
/* * Use of this source code is governed by the MIT license that can be * found in the LICENSE file. */ package org.rust.lang.core.psi import com.intellij.psi.util.CachedValueProvider import com.intellij.psi.util.CachedValuesManager import org.rust.lang.core.crate.Crate import org.rust.lang.core.psi.ext.getQueryAttributes import org.rust.lang.core.psi.ext.name /** * `#![register_attr()]` and `#![register_tool()]` crate-root attributes */ data class CustomAttributes( val customAttrs: Set<String>, val customTools: Set<String>, ) { companion object { val EMPTY: CustomAttributes = CustomAttributes(emptySet(), emptySet()) fun fromCrate(crate: Crate): CustomAttributes { val project = crate.project return CachedValuesManager.getManager(project).getCachedValue(crate) { CachedValueProvider.Result.create(doGetFromCrate(crate), project.rustStructureModificationTracker) } } private fun doGetFromCrate(crate: Crate): CustomAttributes { val rootMod = crate.rootMod ?: return EMPTY return fromRootModule(rootMod, crate) } private fun fromRootModule(rootMod: RsFile, crate: Crate): CustomAttributes { val attrs = mutableSetOf<String>() val tools = mutableSetOf<String>() for (meta in rootMod.getQueryAttributes(crate).metaItems) { when (meta.name) { "register_attr" -> collectMetaItemArgNames(meta, attrs::add) "register_tool" -> collectMetaItemArgNames(meta, tools::add) } } return CustomAttributes(attrs, tools) } private inline fun collectMetaItemArgNames(meta: RsMetaItem, collector: (String) -> Unit) { for (attr in meta.metaItemArgs?.metaItemList.orEmpty()) { attr.name?.let { collector(it) } } } } }
34.875
114
0.639017
71a0cd7e460069b59743d3200b1976f7ad06c64d
1,485
ts
TypeScript
src/app/feature/cliente/components/listar-cliente/listar-cliente.component.ts
krlosjn/adnceibafront
8bbabfd796d745ca4cad923072da1c3153580307
[ "Apache-2.0" ]
null
null
null
src/app/feature/cliente/components/listar-cliente/listar-cliente.component.ts
krlosjn/adnceibafront
8bbabfd796d745ca4cad923072da1c3153580307
[ "Apache-2.0" ]
null
null
null
src/app/feature/cliente/components/listar-cliente/listar-cliente.component.ts
krlosjn/adnceibafront
8bbabfd796d745ca4cad923072da1c3153580307
[ "Apache-2.0" ]
null
null
null
import { Component, OnInit } from '@angular/core'; import { MatTableDataSource } from '@angular/material/table'; import { Router } from '@angular/router'; import { Observable } from 'rxjs'; import { Cliente } from '../../shared/model/cliente'; import { ClienteService } from '../../shared/services/cliente.service'; @Component({ selector: 'app-listar-cliente', templateUrl: './listar-cliente.component.html', styleUrls: ['./listar-cliente.component.css'] }) export class ListarClienteComponent implements OnInit { public dataSource = new MatTableDataSource<Cliente>(); public listaCliente: Observable<Cliente[]>; public cliente: Cliente; public displayedColumns: string[] = [ 'id', 'nombre', 'tipoIdentificacion', 'numeroIdentificacion', 'acciones', 'accionesDos']; public clientesArray: Array<Cliente>; constructor( protected clienteService: ClienteService, private router: Router, ) { console.log('Constructor cliente'); } ngOnInit(): void { this.listaCliente = this.clienteService.consultar(); this.listaCliente.subscribe(data => { this.dataSource.data = data; }); } public enviarInformacion(element: any): void{ console.log(element); this.router.navigate(['/clientes/crear', {obj: JSON.stringify(element)}]); } public eliminarInformacion(cliente: Cliente) { this.clienteService.eliminar(cliente) .subscribe(() => { this.router.navigate(['clientes/crear']); } ); } }
27.5
129
0.687542
e55450fdfbd4872d6e5a3a46059136d5a568da32
121
ts
TypeScript
cli/packages/prisma-generate-schema/src/databaseType.ts
ajesse11x/prisma
aa183a02777db9d0077eee05c501f9d42d2a2e05
[ "Apache-2.0" ]
2
2018-09-24T06:27:26.000Z
2018-09-27T20:58:10.000Z
cli/packages/prisma-generate-schema/src/databaseType.ts
ajesse11x/prisma
aa183a02777db9d0077eee05c501f9d42d2a2e05
[ "Apache-2.0" ]
2
2021-09-02T20:55:24.000Z
2022-03-24T09:43:52.000Z
cli/packages/prisma-generate-schema/src/databaseType.ts
ajesse11x/prisma
aa183a02777db9d0077eee05c501f9d42d2a2e05
[ "Apache-2.0" ]
1
2018-09-04T03:28:13.000Z
2018-09-04T03:28:13.000Z
// Please replace this type as needed. export enum DatabaseType { document = 'document', relational = 'relational' }
20.166667
38
0.719008
5619391173c23cfdbaa09e570f8a11368c55c5b2
1,998
go
Go
mocks/FakeRequestFailure.go
bertux/driftctl
938a336f550899dc0654d97719e939fc2f2be16d
[ "Apache-2.0" ]
null
null
null
mocks/FakeRequestFailure.go
bertux/driftctl
938a336f550899dc0654d97719e939fc2f2be16d
[ "Apache-2.0" ]
1
2021-04-12T23:43:44.000Z
2021-04-12T23:43:44.000Z
mocks/FakeRequestFailure.go
luismayta/driftctl
7994c6fd8efd5dd6714712bd4d3b317c891d075c
[ "Apache-2.0" ]
null
null
null
// Code generated by mockery v2.3.0. DO NOT EDIT. package mocks import mock "github.com/stretchr/testify/mock" // FakeRequestFailure is an autogenerated mock type for the FakeRequestFailure type type FakeRequestFailure struct { mock.Mock } // Code provides a mock function with given fields: func (_m *FakeRequestFailure) Code() string { ret := _m.Called() var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() } else { r0 = ret.Get(0).(string) } return r0 } // Error provides a mock function with given fields: func (_m *FakeRequestFailure) Error() string { ret := _m.Called() var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() } else { r0 = ret.Get(0).(string) } return r0 } // HostID provides a mock function with given fields: func (_m *FakeRequestFailure) HostID() string { ret := _m.Called() var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() } else { r0 = ret.Get(0).(string) } return r0 } // Message provides a mock function with given fields: func (_m *FakeRequestFailure) Message() string { ret := _m.Called() var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() } else { r0 = ret.Get(0).(string) } return r0 } // OrigErr provides a mock function with given fields: func (_m *FakeRequestFailure) OrigErr() error { ret := _m.Called() var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() } else { r0 = ret.Error(0) } return r0 } // RequestID provides a mock function with given fields: func (_m *FakeRequestFailure) RequestID() string { ret := _m.Called() var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() } else { r0 = ret.Get(0).(string) } return r0 } // StatusCode provides a mock function with given fields: func (_m *FakeRequestFailure) StatusCode() int { ret := _m.Called() var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() } else { r0 = ret.Get(0).(int) } return r0 }
18.330275
83
0.639139
0b72374ff1f0c05184c363dcfc881dd0ee234e7e
13,807
py
Python
unn/models/heads/utils/loss.py
zongdaoming/TinyTransformer
8e64f8816117048c388b4b20e3a56760ce149fe3
[ "Apache-2.0" ]
2
2021-08-08T11:23:14.000Z
2021-09-16T04:05:23.000Z
unn/models/heads/utils/loss.py
zongdaoming/TinyTransformer
8e64f8816117048c388b4b20e3a56760ce149fe3
[ "Apache-2.0" ]
1
2021-08-08T11:25:47.000Z
2021-08-08T11:26:15.000Z
unn/models/heads/utils/loss.py
zongdaoming/TinyTransformer
8e64f8816117048c388b4b20e3a56760ce149fe3
[ "Apache-2.0" ]
null
null
null
import logging import torch import torch.nn as nn import torch.nn.functional as F from .... import extensions as E from . import accuracy as A logger = logging.getLogger('global') def _reduce(loss, reduction, **kwargs): if reduction == 'none': ret = loss elif reduction == 'mean': normalizer = loss.numel() if kwargs.get('normalizer', None): normalizer = kwargs['normalizer'] ret = loss.sum() / normalizer elif reduction == 'sum': ret = loss.sum() else: raise ValueError(reduction + ' is not valid') return ret def l1_loss(input, target, scale_type='linear', reduction='mean', normalizer=None): if scale_type == 'linear': input = input target = target elif scale_type == 'log': input = torch.log(input) target = torch.log(target) else: raise NotImplementedError loss = torch.abs(input - target) loss = _reduce(loss, reduction=reduction, normalizer=normalizer) return loss def balanced_l1_loss(input, target, sigma=1.0, alpha=0.5, gamma=1.5, reduction='mean', normalizer=None): beta = 1. / (sigma**2) diff = torch.abs(input - target) b = np.e**(gamma / alpha) - 1 loss = torch.where( diff < beta, alpha / b * (b * diff + 1) * torch.log(b * diff / beta + 1) - alpha * diff, gamma * diff + gamma / b - alpha * beta) loss = _reduce(loss, reduction, normalizer=normalizer) return loss def smooth_l1_loss(input, target, sigma, reduce=True, normalizer=1.0): beta = 1. / (sigma**2) diff = torch.abs(input - target) cond = diff < beta loss = torch.where(cond, 0.5 * diff**2 / beta, diff - 0.5 * beta) if reduce: return torch.sum(loss) / normalizer return torch.sum(loss, dim=1) / normalizer def cross_entropy_weight(input, target, sample_weight=None, cls_weight=None): if sample_weight is None: return F.cross_entropy(input, target, weight=cls_weight) sample_num = target.size()[0] log_input = F.log_softmax(input, 1) loss = F.nll_loss(log_input * sample_weight.reshape(sample_num, 1), target, cls_weight) return loss * sample_num / sample_weight.sum() # normal def ohem_loss(batch_size, cls_pred, cls_target, loc_pred, loc_target, cls_type='softmax', smooth_l1_sigma=1.0): """ Arguments: batch_size (int): number of sampled rois for bbox head training loc_pred (FloatTensor): [R, 4], location of positive rois loc_target (FloatTensor): [R, 4], location of positive rois pos_mask (FloatTensor): [R], binary mask for sampled positive rois cls_pred (FloatTensor): [R, C] cls_target (LongTensor): [R] Returns: cls_loss, loc_loss (FloatTensor) """ if cls_type == 'softmax': ohem_cls_loss = F.cross_entropy(cls_pred, cls_target, reduction='none', ignore_index=-1) else: ohem_cls_loss = F.binary_cross_entropy_with_logits(cls_pred, cls_target, reduction='none') if loc_pred is None: ohem_loc_loss = torch.zeros_like(ohem_cls_loss) else: ohem_loc_loss = smooth_l1_loss(loc_pred, loc_target, sigma=smooth_l1_sigma, reduce=False) loss = ohem_cls_loss + ohem_loc_loss sorted_ohem_loss, idx = torch.sort(loss, descending=True) keep_num = min(sorted_ohem_loss.size()[0], batch_size) if keep_num <= sorted_ohem_loss.size()[0]: keep_idx_cuda = idx[:keep_num] ohem_cls_loss = ohem_cls_loss[keep_idx_cuda] ohem_loc_loss = ohem_loc_loss[keep_idx_cuda] cls_loss = ohem_cls_loss.sum() / keep_num loc_loss = ohem_loc_loss.sum() / keep_num return cls_loss, loc_loss, keep_idx_cuda def get_rpn_cls_loss(cls_pred, cls_target, sample_cls_mask, loss_type): """ Arguments: cls_pred (FloatTensor): [B*K, C] cls_target (LongTensor): [B*K] sample_cls_mask (ByteTensor): [B, K], binary mask for sampled rois loss_type (str): sigmoid or softmax Returns: cls_loss, acc (FloatTensor) """ sample_cls_mask = sample_cls_mask.reshape(-1) if loss_type == "softmax": cls_pred = cls_pred.reshape(cls_target.numel(), -1) cls_target = cls_target.reshape(-1) cls_loss = F.cross_entropy(cls_pred, cls_target.long(), ignore_index=-1) acc = A.accuracy(cls_pred, cls_target)[0] elif loss_type == "sigmoid": cls_pred = cls_pred.reshape(-1) cls_target = cls_target.reshape(-1) normalizer = (sample_cls_mask > 0).float().sum() normalizer = max(1, normalizer.item()) cls_loss = F.binary_cross_entropy_with_logits(cls_pred, cls_target.float(), reduction='none') cls_loss = (cls_loss * sample_cls_mask.float()).sum() / normalizer # acc = torch.tensor([0]).cuda().float() # for sigmoid, there is a bug in A.accuracy acc = A.binary_accuracy(cls_pred, cls_target)[0] return cls_loss, acc def get_rpn_loc_loss(loc_pred, loc_target, sample_loc_mask, sigma, normalizer): """ Arguments: loc_pred (FloatTensor): [B*K, 4] loc_target (LongTensor): [B*K, 4] sample_loc_mask (ByteTensor): [B, K], binary mask for sampled poitive rois Returns: loc_loss (FloatTensor) """ sample_loc_mask = sample_loc_mask.reshape(-1) loc_target = loc_target.reshape(-1, 4)[sample_loc_mask] loc_pred = loc_pred.reshape(-1, 4)[sample_loc_mask] loc_loss = smooth_l1_loss(loc_pred, loc_target, sigma, normalizer=normalizer) return loc_loss def get_focal_loss(cls_pred, cls_target, normalizer, num_classes, cfg_loss): """ Arguments: cls_pred (FloatTensor): [B*K, C] cls_target (LongTensor): [B*K] cfg_loss: config for focal loss Returns: cls_loss, acc (FloatTensor) """ alpha = cfg_loss['alpha'] gamma = cfg_loss['gamma'] loss_type = cfg_loss['type'] C = {'sigmoid': -1, 'softmax': 0}[loss_type] + num_classes cls_pred = cls_pred.float().view(-1, C) cls_target = cls_target.int().view(-1) normalizer = torch.cuda.FloatTensor([normalizer]) loss_fn = {'sigmoid': E.SigmoidFocalLossFunction, 'softmax': E.SoftmaxFocalLossFunction}[loss_type] loss_fn = loss_fn(gamma, alpha, C) cls_loss = loss_fn(cls_pred, cls_target, normalizer) if loss_type == 'softmax': acc = A.accuracy(cls_pred, cls_target.long())[0] elif loss_type == 'sigmoid': acc = A.accuracy(cls_pred, cls_target.long() - 1, ignore_indices=[-1, -2])[0] else: raise NotImplementedError('{} is not supported for focal loss'.format(loss_type)) return cls_loss, acc class FocalLoss(nn.Module): def __init__(self, class_num, alpha=None, gamma=2, use_alpha=False, size_average=True): super(FocalLoss, self).__init__() self.class_num = class_num self.alpha = alpha self.gamma = gamma if use_alpha: self.alpha = torch.tensor(alpha).cuda() self.softmax = nn.Softmax(dim=1) self.use_alpha = use_alpha self.size_average = size_average def forward(self, pred, target): prob = self.softmax(pred.view(-1,self.class_num)) prob = prob.clamp(min=0.0001,max=1.0) target_ = torch.zeros(target.size(0),self.class_num).cuda() target_.scatter_(1, target.view(-1, 1).long(), 1.) if self.use_alpha: batch_loss = - self.alpha.double() * torch.pow(1-prob,self.gamma).double() * prob.log().double() * target_.double() else: batch_loss = - torch.pow(1-prob,self.gamma).double() * prob.log().double() * target_.double() batch_loss = batch_loss.sum(dim=1) if self.size_average: loss = batch_loss.mean() else: loss = batch_loss.sum() return loss class GHMCLoss(nn.Module): def __init__(self, bins=10, momentum=0, loss_weight=1.0): super(GHMCLoss, self).__init__() self.bins = bins self.momentum = momentum self.edges = [float(x) / bins for x in range(bins + 1)] self.edges[-1] += 1e-6 self.loss_weight = loss_weight if momentum > 0: self.acc_sum = [0.0 for _ in range(bins)] def binarize_target(self, input, target): """ convert target index to one-hot target Args: input: [B, A, C] target: [B, A] Returns: target: [B, A, C] mask: [B, A, C] """ binary_targets = torch.zeros_like(input) mask = torch.zeros_like(input) pos_inds = target > 0 cls_inds = target[pos_inds] - 1 binary_targets[pos_inds, cls_inds] = 1 mask[target > -1, :] = 1 return binary_targets, mask def forward(self, input, target, mlvl_shapes=None): """ Args: input [batch_num, anchor_num, C]: The direct prediction of classification fc layer. target [batch_num, anchor_num]: Binary target (0 or 1) for each sample each class. The value is -1 when the sample is ignored. """ target, mask = self.binarize_target(input, target) if mlvl_shapes is None: return self.forward_single(input, target, mask) mlvl_size = [_[-1] for _ in mlvl_shapes] assert input.ndimension() == 3 assert target.ndimension() == 3 assert mask.ndimension() == 3 inputs = input.split(mlvl_size, dim=1) targets = target.split(mlvl_size, dim=1) masks = mask.split(mlvl_size, dim=1) loss = 0 for i, t, m in zip(inputs, targets, masks): loss += self.forward_single(i, t, m) return loss def forward_single(self, input, target, mask): edges = self.edges mmt = self.momentum weights = torch.zeros_like(input) # gradient length g = torch.abs(input.sigmoid().detach() - target) valid = mask > 0 tot = max(valid.float().sum().item(), 1.0) n = 0 # n valid bins for i in range(self.bins): inds = (g >= edges[i]) & (g < edges[i + 1]) & valid num_in_bin = inds.sum().item() if num_in_bin > 0: if mmt > 0: self.acc_sum[i] = mmt * self.acc_sum[i] \ + (1 - mmt) * num_in_bin weights[inds] = tot / self.acc_sum[i] else: weights[inds] = tot / num_in_bin n += 1 if n > 0: weights = weights / n loss = F.binary_cross_entropy_with_logits(input, target, weights, reduction='sum') / tot return loss * self.loss_weight @classmethod def from_params(cls, params): bins = params['bins'] momentum = params['momentum'] loss_weight = params['loss_weight'] return cls(bins, momentum, loss_weight) class GHMRLoss(nn.Module): def __init__(self, mu=0.02, bins=10, momentum=0, loss_weight=1.0): super(GHMRLoss, self).__init__() self.mu = mu self.bins = bins self.edges = [float(x) / bins for x in range(bins + 1)] self.edges[-1] = 1e3 self.momentum = momentum self.loss_weight = loss_weight if momentum > 0: self.acc_sum = [0.0 for _ in range(bins)] def forward(self, input, target, mask, mlvl_shapes=None): """ Args: input [batch_num, anchor_num, 4]: The prediction of box regression layer. Channel number can be 4 or (4 * class_num) depending on whether it is class-agnostic. target [batch_num, anchor_num, 4]: The target regression values with the same size of input. mask [batch_num, anchor_num]: mask for each anchor """ # expand to each coordinate mask = mask.float().reshape(input.shape[0], input.shape[1], 1).repeat(1, 1, 4) if mlvl_shapes is None: return self.forward_single(input, target, mask) mlvl_size = [_[-1] for _ in mlvl_shapes] assert input.ndimension() == 3 assert target.ndimension() == 3 assert mask.ndimension() == 3 inputs = input.split(mlvl_size, dim=1) targets = target.split(mlvl_size, dim=1) masks = mask.split(mlvl_size, dim=1) loss = 0 for i, t, m in zip(inputs, targets, masks): loss += self.forward_single(i, t, m) return loss def forward_single(self, input, target, mask): mu = self.mu edges = self.edges mmt = self.momentum # ASL1 loss diff = input - target loss = torch.sqrt(diff * diff + mu * mu) - mu # gradient length g = torch.abs(diff / torch.sqrt(mu * mu + diff * diff)).detach() weights = torch.zeros_like(g) valid = mask > 0 tot = max(mask.float().sum().item(), 1.0) n = 0 # n: valid bins for i in range(self.bins): inds = (g >= edges[i]) & (g < edges[i + 1]) & valid num_in_bin = inds.sum().item() if num_in_bin > 0: n += 1 if mmt > 0: self.acc_sum[i] = mmt * self.acc_sum[i] \ + (1 - mmt) * num_in_bin weights[inds] = tot / self.acc_sum[i] else: weights[inds] = tot / num_in_bin if n > 0: weights /= n loss = loss * weights loss = loss.sum() / tot return loss * self.loss_weight @classmethod def from_params(cls, params): mu = params['mu'] bins = params['bins'] momentum = params['momentum'] loss_weight = params['loss_weight'] return cls(mu, bins, momentum, loss_weight)
35.043147
127
0.599768
5b514661943c4b7981360e74e5ce9552a0fb448d
390
h
C
ios/include/FatosDevelopBridge.h
devfatoscorp/react-native-fatos-sdk
e660087b84b6f81fbc1733afe6413ade04ca3304
[ "MIT" ]
2
2019-08-01T09:05:39.000Z
2021-08-22T14:16:29.000Z
ios/include/FatosDevelopBridge.h
devfatoscorp/react-native-fatos-sdk
e660087b84b6f81fbc1733afe6413ade04ca3304
[ "MIT" ]
1
2019-07-19T06:52:08.000Z
2019-07-19T06:52:08.000Z
ios/include/FatosDevelopBridge.h
devfatoscorp/react-native-fatos-sdk
e660087b84b6f81fbc1733afe6413ade04ca3304
[ "MIT" ]
null
null
null
// // FatosDevelopBridge.h // Fatos // // Created by 심규빈 on 2020/02/24. // Copyright © 2020 유춘성. All rights reserved. // #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN @interface FatosDevelopBridge : NSObject + (void) SetSimulGps:(BOOL)value; + (void) SetDrawGpsPoint:(BOOL)value; + (NSString *) GetSimulGps; + (NSString *) GetDrawGpsPoint; @end NS_ASSUME_NONNULL_END
16.25
46
0.723077
710539d016ae820d7a1e840012932cc0fae14585
66
ts
TypeScript
lib/src/util/escapePath.d.ts
cavylabs/ra-core
323d72ae579e0f277f7e869a0a9c6ce7189f6b16
[ "MIT" ]
null
null
null
lib/src/util/escapePath.d.ts
cavylabs/ra-core
323d72ae579e0f277f7e869a0a9c6ce7189f6b16
[ "MIT" ]
null
null
null
lib/src/util/escapePath.d.ts
cavylabs/ra-core
323d72ae579e0f277f7e869a0a9c6ce7189f6b16
[ "MIT" ]
null
null
null
declare var _default: (url: any) => any; export default _default;
22
40
0.727273
162b5d9647ea446891c66de34087d181cc05234d
92
ts
TypeScript
src/services/giftingEvents/index.ts
Angulaaaaaargh2018M2/backend
4a5e6b7cb43a5a0dfd5864de009aab12188aa677
[ "MIT" ]
null
null
null
src/services/giftingEvents/index.ts
Angulaaaaaargh2018M2/backend
4a5e6b7cb43a5a0dfd5864de009aab12188aa677
[ "MIT" ]
null
null
null
src/services/giftingEvents/index.ts
Angulaaaaaargh2018M2/backend
4a5e6b7cb43a5a0dfd5864de009aab12188aa677
[ "MIT" ]
null
null
null
export * from './gifting-events.service'; export * from './giftingEvents-document.service';
30.666667
49
0.73913
b2464a8327f5b5c04a600ac71e724a5f2a1a42aa
1,174
sql
SQL
db/seeds.sql
Amit-Ranjan22/Employee-Tracker
8689f2f3d93ba8341f4d536d11d808533c4bb123
[ "MIT" ]
null
null
null
db/seeds.sql
Amit-Ranjan22/Employee-Tracker
8689f2f3d93ba8341f4d536d11d808533c4bb123
[ "MIT" ]
null
null
null
db/seeds.sql
Amit-Ranjan22/Employee-Tracker
8689f2f3d93ba8341f4d536d11d808533c4bb123
[ "MIT" ]
null
null
null
INSERT INTO department (name) VALUES ('Legal-Dep'), ('Sales-Dep'), ('Eng-Dep'), ('Manuf-Dep'); INSERT INTO roles (title,salary,department_id) VALUES ('Legal_Team_Head', 185000, 1), ('Attorney', 150000, 1), ('Sales_Lead', 140000, 2), ('Sales_Person', 110000, 2), ('Chief_Engineer', 130000, 3), ('Junior_Engineer', 112000, 3), ('Plant_Manager', 161000, 4), ('Assembly_Supervisor', 70000, 4); INSERT INTO employee (first_name,last_name,role_id,manager_id,confirm_manager) VALUES ('Tom', 'hanks', 1, null, true), ('leonardo', 'Decaprio', 2, 1, false), ('Scarlett', 'Johansson', 2, 1, false), ('WIll', 'Smith', 3, null, true), ('Tom', 'Cruise', 4, 2, false), ('Johnny', 'Depp', 4, 2, false), ('Robert', 'Downey', 4, 2, false), ('Dwayne', 'Johnson', 5, null, true), ('Brad', 'Pitt', 6, 3, false), ('Samuel', 'Jackson', 6, 3, false), ('Denzel', 'Washington', 7, null, true), ('Morgan', 'Freeman', 7, 4, false); INSERT INTO manager (first_name, last_name) SELECT first_name, last_name FROM employee WHERE confirm_manager = 1;
33.542857
78
0.57155
dd9244a3ac58db17bd795a1afdfd50ea9cafc228
1,295
php
PHP
Houdini/src/app.php
Natkeeran/Crayfish
d41371bc1e702c4686746bdabb139f9178584c16
[ "MIT" ]
null
null
null
Houdini/src/app.php
Natkeeran/Crayfish
d41371bc1e702c4686746bdabb139f9178584c16
[ "MIT" ]
1
2017-04-03T21:05:00.000Z
2017-04-04T01:52:13.000Z
Houdini/src/app.php
dannylamb/Crayfish
38c6211039c16843450a2bba833e0e9454705c66
[ "MIT" ]
null
null
null
<?php require_once __DIR__.'/../vendor/autoload.php'; use Islandora\Crayfish\Commons\Provider\IslandoraServiceProvider; use Islandora\Crayfish\Commons\Provider\YamlConfigServiceProvider; use Islandora\Houdini\Controller\HoudiniController; use Silex\Application; use Symfony\Component\HttpFoundation\Request; $app = new Application(); $app->register(new IslandoraServiceProvider()); $app->register(new YamlConfigServiceProvider(__DIR__ . '/../cfg/config.yaml')); $app['houdini.controller'] = function ($app) { return new HoudiniController( $app['crayfish.cmd_execute_service'], $app['crayfish.houdini.formats.valid'], $app['crayfish.houdini.formats.default'], $app['crayfish.houdini.executable'], $app['monolog'] ); }; $app->options('/convert', "houdini.controller:convertOptions"); $app->get('/convert', "houdini.controller:convert") ->before(function (Request $request, Application $app) { return $app['crayfish.apix_middleware']->before($request); }); $app->options('/identify', "houdini.controller:identifyOptions"); $app->get('/identify', "houdini.controller:identify") ->before(function (Request $request, Application $app) { return $app['crayfish.apix_middleware']->before($request); }); return $app;
33.205128
79
0.711197
200d4d0ca9fbbd0099810764e031b07c705c352a
434
asm
Assembly
oeis/129/A129824.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/129/A129824.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/129/A129824.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A129824: a(n) = Product_{k=0..n} (1 + binomial(n,k)). ; Submitted by Jamie Morken(s2) ; 2,4,12,64,700,17424,1053696,160579584,62856336636,63812936890000,168895157342195152,1169048914836855865344,21209591746609937928524800,1010490883477487017627972550656,126641164340871500483202065902080000,41817338589698457759723104703370865147904 mov $1,2 mov $2,$0 lpb $0 sub $0,1 mov $3,$2 bin $3,$0 add $3,1 mul $1,$3 lpe mov $0,$1
28.933333
246
0.762673
1aedbd471e7bebba8e6905566ce46b13edbeb4f6
277
lua
Lua
src/Libs/Cryo/List/foldRight.lua
Sonar-Studios/sonar-brushtool
9a06dc1ebf59438f328fb0219e89c186cc0bcba0
[ "MIT" ]
null
null
null
src/Libs/Cryo/List/foldRight.lua
Sonar-Studios/sonar-brushtool
9a06dc1ebf59438f328fb0219e89c186cc0bcba0
[ "MIT" ]
null
null
null
src/Libs/Cryo/List/foldRight.lua
Sonar-Studios/sonar-brushtool
9a06dc1ebf59438f328fb0219e89c186cc0bcba0
[ "MIT" ]
null
null
null
--[[ Performs a right-fold of the list with the given initial value and callback. ]] local function foldRight(list, initial, callback) local accum = initial for i = #list, 1, -1 do accum = callback(accum, list[i], i) end return accum end return foldRight
19.785714
78
0.6787
e77ff524919fcd90b8b7693dbd1651c92c38730f
603
js
JavaScript
lib/icon/TrashOutlineIcon.js
sambacha/ui
46617fb4d2e35502bc373fb034a4ad41d95be108
[ "MIT" ]
null
null
null
lib/icon/TrashOutlineIcon.js
sambacha/ui
46617fb4d2e35502bc373fb034a4ad41d95be108
[ "MIT" ]
null
null
null
lib/icon/TrashOutlineIcon.js
sambacha/ui
46617fb4d2e35502bc373fb034a4ad41d95be108
[ "MIT" ]
null
null
null
import * as React from "react"; import { SvgIcon } from "../util/react/SvgIcon"; export class TrashOutlineIcon extends React.Component { render() { return React.createElement(SvgIcon, Object.assign({}, this.props, { viewBoxSize: 512 }), React.createElement("g", { transform: "translate(64, 64) scale(0.75)" }, React.createElement("path", { d: "m85 455c0 31 26 57 57 57l228 0c31 0 57-26 57-57l0-341-342 0z m57-284l228 0 0 284-228 0z m214-143l-29-28-142 0-29 28-99 0 0 57 398 0 0-57z", fill: "currentColor" }))); } } //# sourceMappingURL=TrashOutlineIcon.js.map
60.3
216
0.661692
9ddff0f878dd984e501a464335ff320f58d4bef7
187
sql
SQL
Membership Provider DB/Schema Objects/Schemas/membership/Tables/Keys/FK_Actions_Modules.fkey.sql
carlos-takeapps/bafactoryfx
aa962b0addce09af7539192ac90e41a965270ee0
[ "Apache-2.0" ]
null
null
null
Membership Provider DB/Schema Objects/Schemas/membership/Tables/Keys/FK_Actions_Modules.fkey.sql
carlos-takeapps/bafactoryfx
aa962b0addce09af7539192ac90e41a965270ee0
[ "Apache-2.0" ]
null
null
null
Membership Provider DB/Schema Objects/Schemas/membership/Tables/Keys/FK_Actions_Modules.fkey.sql
carlos-takeapps/bafactoryfx
aa962b0addce09af7539192ac90e41a965270ee0
[ "Apache-2.0" ]
null
null
null
ALTER TABLE [membership].[Actions] ADD CONSTRAINT [FK_Actions_Modules] FOREIGN KEY ([IdModule]) REFERENCES [membership].[Modules] ([Id]) ON DELETE NO ACTION ON UPDATE NO ACTION;
46.75
147
0.73262
e588fceca56c4f412686e780ce926191d9d08560
1,616
ts
TypeScript
packages/employee-triple-a/producer/dist/modules/employee-auth/employee-auth.controller.d.ts
faizulkhan-sys/triplea-monorepo
8a46a214efd4cc4c9ff9bb1a04ff0d47b6177e2b
[ "MIT" ]
1
2022-03-11T05:57:57.000Z
2022-03-11T05:57:57.000Z
packages/employee-triple-a/producer/dist/modules/employee-auth/employee-auth.controller.d.ts
faizulkhan-sys/triplea-monorepo
8a46a214efd4cc4c9ff9bb1a04ff0d47b6177e2b
[ "MIT" ]
null
null
null
packages/employee-triple-a/producer/dist/modules/employee-auth/employee-auth.controller.d.ts
faizulkhan-sys/triplea-monorepo
8a46a214efd4cc4c9ff9bb1a04ff0d47b6177e2b
[ "MIT" ]
null
null
null
import { IResponse } from '@common/interfaces/response.interface'; import { EmployeeLoginDto } from '@dtos/employeeLogin.dto'; import { TokensService } from '@modules/token/tokens.service'; import { EmployeeAuthService } from './employee-auth.service'; import { Customer } from '@entities/Customer.entity'; import { ChangePassword, ForgotPassword, OtpDto, SetMpin as MpinDto, RefreshRequest, ResetPassword, SignUpEmployee, ChangeMpin, ResetMpin } from '@dtos/Derived.dto'; export declare class EmployeeAuthController { private readonly employeeAuthService; private readonly tokenService; constructor(employeeAuthService: EmployeeAuthService, tokenService: TokensService); login(emplLogin: EmployeeLoginDto): Promise<any>; resetMpin(resetMpinDto: ResetMpin): Promise<IResponse>; forgetMpin(employee: Customer): Promise<IResponse>; changeMpin(employee: Customer, mpinDto: ChangeMpin): Promise<IResponse>; changePassword(changePassword: ChangePassword, employee: Customer): Promise<IResponse>; resetPassword(resetPassword: ResetPassword): Promise<IResponse>; verifyMpin(employee: Customer, mpinDto: MpinDto): Promise<IResponse>; setMpin(employee: Customer, mpinDto: MpinDto): Promise<IResponse>; verifyOtp(otp: OtpDto): Promise<IResponse>; forgotPassword(forgotPassword: ForgotPassword): Promise<IResponse>; refresh(body: RefreshRequest): Promise<any>; signUpEmployee(signupDto: SignUpEmployee): Promise<any>; logout(employee: Customer, refreshToken?: RefreshRequest, fromAll?: boolean): Promise<IResponse>; chnage(idx: string): Promise<IResponse>; }
62.153846
165
0.774134
2f28950d73462b73102ba1d7aee83a761c844631
2,620
php
PHP
src/AppBundle/Controller/Rest/PersonaRestController.php
sergiosanabria/resto
38e2d440fade8e200b5b44313c6afb376d0fee28
[ "MIT" ]
null
null
null
src/AppBundle/Controller/Rest/PersonaRestController.php
sergiosanabria/resto
38e2d440fade8e200b5b44313c6afb376d0fee28
[ "MIT" ]
null
null
null
src/AppBundle/Controller/Rest/PersonaRestController.php
sergiosanabria/resto
38e2d440fade8e200b5b44313c6afb376d0fee28
[ "MIT" ]
null
null
null
<?php namespace AppBundle\Controller\Rest; use AppBundle\Entity\Image; use AppBundle\Entity\Persona; use AppBundle\Form\PersonaType; use FOS\RestBundle\Controller\FOSRestController; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\BrowserKit\Response; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\Request; use UsuarioBundle\Entity\Usuario; class PersonaRestController extends FOSRestController { public function putPersonaAction(Request $request) { $em = $this->getDoctrine()->getManager(); $persona = $em->getRepository("AppBundle:Persona")->findOneBy(array('usuario' => $this->getUser())); $fecha = new \DateTime($request->get('fechaNacimiento')); $persona->setFechaNacimiento($fecha); $request->request->remove('fechaNacimiento'); $form = $this->createForm(PersonaType::class, $persona, ['method' => 'put']); $form->handleRequest($request); if ($form->isValid()) { $em->flush(); $vista = $this->view($this->getUser(), 200); } else { $vista = $this->view(false, 555); } return $this->handleView($vista); } public function putPersonaBackgroundAction(Request $request) { $em = $this->getDoctrine()->getManager(); /** * @var $persona Persona */ $persona = $em->getRepository("AppBundle:Persona")->findOneBy(array('usuario' => $this->getUser())); $persona->setBackground($request->get('bg')); $em->flush(); $vista = $this->view($this->getUser(), 200); return $this->handleView($vista); } public function postPersonaImageAction(Request $request) { $em = $this->getDoctrine()->getManager(); $persona = $em->getRepository("AppBundle:Persona")->findOneBy(array('usuario' => $this->getUser())); if ($persona) { $imagenFile = $request->files->get('file'); if ($persona->getImage()) { $image = $persona->getImage(); } else { $image = new Image(); } $image->setImageFile($imagenFile); $persona->setImage($image); $em->flush(); } $vista = $this->view('ok', 200); return $this->handleView($vista); } public function getCheckAction() { $vista = $this->view($this->getUser(), 200); return $this->handleView($vista); } }
24.485981
108
0.575954
291227388fc90b51ab04fdf1a57a5ee909590e8c
3,436
py
Python
tests/test_logging.py
friarswood/python-client
0f0e993501c5ed4006a8710dcc8bd3e0d249086d
[ "MIT" ]
8
2021-06-26T10:47:09.000Z
2022-03-24T02:34:33.000Z
tests/test_logging.py
disruptive-technologies/disruptive-python
5b04c62278950abc415e3f6c62d27a1eed74d0f4
[ "MIT" ]
4
2021-06-26T08:16:29.000Z
2021-11-03T15:10:50.000Z
tests/test_logging.py
disruptive-technologies/disruptive-python
5b04c62278950abc415e3f6c62d27a1eed74d0f4
[ "MIT" ]
1
2021-08-22T11:43:57.000Z
2021-08-22T11:43:57.000Z
import pytest from unittest.mock import patch import disruptive import disruptive.logging as dtlog import disruptive.errors as dterrors class TestLogging(): def _check_level_called(self, msg, debug=True, info=True, warning=True, error=True, critical=True): with patch('disruptive.logging._fmt_log') as log_mock: dtlog.debug(msg) if debug: log_mock.assert_called_with(msg, 'DEBUG') else: assert log_mock.call_count == 0 with patch('disruptive.logging._fmt_log') as log_mock: dtlog.info(msg) if info: log_mock.assert_called_with(msg, 'INFO') else: assert log_mock.call_count == 0 with patch('disruptive.logging._fmt_log') as log_mock: dtlog.warning(msg) if warning: log_mock.assert_called_with(msg, 'WARNING') else: assert log_mock.call_count == 0 with patch('disruptive.logging._fmt_log') as log_mock: dtlog.error(msg) if error: log_mock.assert_called_with(msg, 'ERROR') else: assert log_mock.call_count == 0 with patch('disruptive.logging._fmt_log') as log_mock: dtlog.critical(msg) if critical: log_mock.assert_called_with(msg, 'CRITICAL') else: assert log_mock.call_count == 0 def test_flag_debug(self): disruptive.log_level = 'debug' self._check_level_called('Test message.') disruptive.log_level = None def test_flag_info(self): disruptive.log_level = 'info' self._check_level_called('Test message.', debug=False) disruptive.log_level = None def test_flag_warning(self): disruptive.log_level = 'warning' self._check_level_called( msg='Test message.', debug=False, info=False, ) disruptive.log_level = None def test_flag_error(self): disruptive.log_level = 'error' self._check_level_called( msg='Test message.', debug=False, info=False, warning=False, ) disruptive.log_level = None def test_flag_critical(self): disruptive.log_level = 'critical' self._check_level_called( msg='Test message.', debug=False, info=False, warning=False, error=False, ) disruptive.log_level = None def test_case_insensitive(self): disruptive.log_level = "CRITICAL" self._check_level_called( msg='Test message.', debug=False, info=False, warning=False, error=False, ) disruptive.log_level = None def test_invalid_level_reset(self): disruptive.log_level = "SOME_INVALID_STRING" with pytest.raises(dterrors.ConfigurationError): self._check_level_called( msg='Test message.', debug=False, info=False, warning=False, error=False, critical=False, ) # Log level should be reset to default. assert disruptive.log_level == 'info' disruptive.log_level = None
29.62069
69
0.561991
e9f2b77e9764f48f34bb01a71f040c053ffcc13f
12,508
go
Go
server/app/controllers/admin/task.go
luffy-boy/devops-tools
a9e77401bfb297f9bd83870c72a2eed2d81783e7
[ "Artistic-2.0" ]
10
2020-07-09T14:19:36.000Z
2021-08-09T04:27:11.000Z
server/app/controllers/admin/task.go
luffy-boy/devops-tools
a9e77401bfb297f9bd83870c72a2eed2d81783e7
[ "Artistic-2.0" ]
null
null
null
server/app/controllers/admin/task.go
luffy-boy/devops-tools
a9e77401bfb297f9bd83870c72a2eed2d81783e7
[ "Artistic-2.0" ]
null
null
null
package admin import ( "encoding/json" "github.com/astaxie/beego/validation" "strconv" "strings" "tools/server/app/common" "tools/server/app/response" "tools/server/app/service" ) //任务管理 type TaskController struct { BaseController } // @Title 任务列表 // @Description 获取任务列表 // @Success 200 {object} Res {"code":1,"data":null,"msg":"ok"} // @Param page query int false "当前页数" // @Param limit query int false "查询条数" // @Failure 400 no enough input // @Failure 500 server error // @router /group_list [get] func (c *TaskController) GroupList() { var ( list []map[string]interface{} result map[string]interface{} ) result = make(map[string]interface{}, 1) for _, value := range service.TaskGroupList { list = append(list, value) } result["list"] = list c.ResponseToJson(response.Success, result) } // @Title 任务列表 // @Description 获取服务器列表 // @Success 200 {object} Res {"code":1,"data":null,"msg":"ok"} // @Param page query int false "当前页数" // @Param limit query int false "查询条数" // @Param audit query int false "审核状态" // @Failure 400 no enough input // @Failure 500 server error // @router /list [get] func (c *TaskController) List() { var ( params *service.TaskParams //查询信息 err error data *service.TaskListData ) page, _ := c.GetInt("page", 1) limit, _ := c.GetInt("limit", 20) audit, _ := c.GetInt8("audit", 20) params = &service.TaskParams{ Page: page, Limit: limit, Audit: audit, } //获取管理员列表 if err, data = service.TaskList(params); err != nil { c.ResponseToJson(response.DbQueryErr, nil, err.Error()) return } c.ResponseToJson(response.Success, data) } // @Title 创建任务 // @Description 创建任务 // @Success 200 {object} Res {"code":1,"data":null,"msg":"ok"} // @Param Task_name body string true "路由名称" // @Param Task body string true "路由url" // @Param request body string false "请求类型" // @Param parent_id body uint true "上级路由id" // @Param status body int8 true "状态 0.无效 1.有效" // @Failure 400 no enough input // @Failure 500 server error // @router / [put] func (c *TaskController) Put() { var ( Task *service.TaskDetail err error ) form := c.Ctx.Input.RequestBody err = json.Unmarshal(form, &Task) if err != nil { c.ResponseToJson(response.ParamsErr, nil) return } valid := validation.Validation{} b, errValid := valid.Valid(Task) if errValid != nil { c.ResponseToJson(response.ParamsErr, nil) return } if !b { for _, err := range valid.Errors { msg := err.Key + ": " + err.Message c.ResponseToJson(response.ParamsErr, nil, msg) return } } if err = service.TaskCreateOrUpdate(Task, c.userId); err != nil { c.ResponseToJson(response.DbReadErr, nil, err.Error()) return } c.ResponseToJson(response.Success, nil) } // @Title 修改任务 // @Description 修改任务 // @Success 200 {object} Res {"code":1,"data":null,"msg":"ok"} // @Param Task_id body uint true "路由id" // @Param Task_name body string false "路由角色" // @Param Task body string false "路由url" // @Param request body string false "请求类型" // @Param parent_id body uint true "上级路由id" // @Param status body int8 false "状态 0.无效 1.有效" // @Param is_delete body int8 false "删除状态 0.正常 1.删除" // @Failure 400 no enough input // @Failure 500 server error // @router / [post] func (c *TaskController) Post() { var ( Task *service.TaskDetail err error ) form := c.Ctx.Input.RequestBody err = json.Unmarshal(form, &Task) if err != nil { c.ResponseToJson(response.ParamsErr, nil) return } valid := validation.Validation{} b, errValid := valid.Valid(Task) if errValid != nil { c.ResponseToJson(response.ParamsErr, nil) return } if !b { for _, err := range valid.Errors { msg := err.Key + ": " + err.Message c.ResponseToJson(response.ParamsErr, nil, msg) return } } if err = service.TaskCreateOrUpdate(Task, c.userId); err != nil { c.ResponseToJson(response.DbReadErr, nil, err.Error()) return } c.ResponseToJson(response.Success, nil) } // @Title 获取详细信息 // @Description // @Param task_id body int false "任务id" // @Success 200 {object} Res {"code":1,"data":null,"msg":"ok"} // @Failure 400 no enough input // @Failure 500 server error // @router /detail [get] func (c *TaskController) Detail() { var ( data *service.TaskDetail err error ) taskId, _ := c.GetInt("task_id") if taskId < 1 { c.ResponseToJson(response.ParamsErr, data) return } if data, err = service.TaskDetailById(taskId); err != nil { c.ResponseToJson(response.DbQueryErr, nil) return } c.ResponseToJson(response.Success, data) } // @Title 审核任务 // @Description 审核任务 // @Success 200 {object} Res {"code":1,"data":null,"msg":"ok"} // @Param task_id body int int "任务id" // @Param audit body int8 int "审核状态 1.通过 2.不通过" // @Failure 400 no enough input // @Failure 500 server error // @router /audit [post] func (c *TaskController) Audit() { var ( TaskOperation service.TaskOperation taskId int err error ) form := c.Ctx.Input.RequestBody err = json.Unmarshal(form, &TaskOperation) if err != nil { c.ResponseToJson(response.ParamsErr, nil) return } checkArray := make([]interface{}, 2) checkArray[0], checkArray[1] = int8(1), int8(2) if !common.InArray(TaskOperation.Audit, checkArray) { c.ResponseToJson(response.ParamsErr, nil, "audit不在范围内") return } if TaskOperation.TaskIds == "" { c.ResponseToJson(response.ParamsErr, nil, "缺少task_id") return } taskIdArr := strings.Split(TaskOperation.TaskIds, ",") for _, val := range taskIdArr { taskId, _ = strconv.Atoi(val) if err := service.TaskAudit(taskId, TaskOperation.Audit); err != nil { c.ResponseToJson(response.DevOpsTaskAuditErr, nil, err.Error()) return } } c.ResponseToJson(response.Success, nil) } // @Title 任务 执行一次 // @Description 任务执行 // @Success 200 {object} Res {"code":1,"data":null,"msg":"ok"} // @Param task_id body int int "任务id" // @Failure 400 no enough input // @Failure 500 server error // @router /execute [get] func (c *TaskController) ExecuteTask() { taskId, _ := c.GetInt("task_id") if taskId == 0 { c.ResponseToJson(response.ParamsErr, nil, "缺少task_id") return } if err := service.ExecuteTask(taskId); err != nil { c.ResponseToJson(response.DevOpsTaskRunErr, nil, err.Error()) return } c.ResponseToJson(response.Success, nil) } // @Title 任务 启动-停止 // @Description 审核任务 // @Success 200 {object} Res {"code":1,"data":null,"msg":"ok"} // @Param task_id body int int "任务id" // @Param status body int8 int "任务状态 0.无效 1.有效" // @Failure 400 no enough input // @Failure 500 server error // @router /running [post] func (c *TaskController) TaskRunning() { var ( TaskOperation service.TaskOperation taskId int err error ) form := c.Ctx.Input.RequestBody err = json.Unmarshal(form, &TaskOperation) if err != nil { c.ResponseToJson(response.ParamsErr, nil) return } checkArray := make([]interface{}, 2) checkArray[0], checkArray[1] = int8(0), int8(1) if !common.InArray(TaskOperation.Status, checkArray) { c.ResponseToJson(response.ParamsErr, nil, "status不在范围内") return } if TaskOperation.TaskIds == "" { c.ResponseToJson(response.ParamsErr, nil, "缺少task_id") return } taskIdArr := strings.Split(TaskOperation.TaskIds, ",") for _, val := range taskIdArr { taskId, _ = strconv.Atoi(val) if err := service.SetTaskState(taskId, TaskOperation.Status); err != nil { c.ResponseToJson(response.DevOpsTaskStartErr, nil, err.Error()) return } } c.ResponseToJson(response.Success, nil) } // @Title 删除任务 // @Description 删除任务 // @Success 200 {object} Res {"code":1,"data":null,"msg":"ok"} // @Param task_id body int int "任务id" // @Failure 400 no enough input // @Failure 500 server error // @router / [delete] func (c *TaskController) Delete() { taskId, _ := c.GetInt("task_id") if taskId == 0 { c.ResponseToJson(response.ParamsErr, nil, "缺少task_id") return } if err := service.TaskDelete(taskId); err != nil { c.ResponseToJson(response.DbReadErr, nil, err.Error()) return } c.ResponseToJson(response.Success, nil) } // @Title 任务日志 // @Description 获取任务日志列表 // @Success 200 {object} Res {"code":1,"data":null,"msg":"ok"} // @Param page query int false "当前页数" // @Param limit query int false "查询条数" // @Param audit query int false "审核状态" // @Failure 400 no enough input // @Failure 500 server error // @router /log [get] func (c *TaskController) Log() { var ( params *service.TaskLogParams //查询信息 err error data *service.TaskLogListData ) page, _ := c.GetInt("page", 1) limit, _ := c.GetInt("limit", 20) TaskId, _ := c.GetInt("task_id") if TaskId <= 0 { c.ResponseToJson(response.ParamsErr, nil, "task_id必传") return } params = &service.TaskLogParams{ Page: page, Limit: limit, TaskId: TaskId, } if err, data = service.TaskLogList(params); err != nil { c.ResponseToJson(response.MgoQueryErr, nil, err.Error()) return } c.ResponseToJson(response.Success, data) } // @Title 任务日志详细 // @Description 获取任务日志详细 // @Success 200 {object} Res {"code":1,"data":null,"msg":"ok"} // @Param page query int false "当前页数" // @Param limit query int false "查询条数" // @Param audit query int false "审核状态" // @Failure 400 no enough input // @Failure 500 server error // @router /log_detail [get] func (c *TaskController) LogDetail() { var ( data *service.TaskLogData err error ) logId := c.GetString("log_id") if logId == "" { c.ResponseToJson(response.ParamsErr, data) return } if data, err = service.TaskLogDetailById(logId); err != nil { c.ResponseToJson(response.MgoQueryErr, err.Error()) return } c.ResponseToJson(response.Success, data) } // @Title 获取禁用命令列表 // @Description 获取禁用命令列表 // @Success 200 {object} Res {"code":1,"data":null,"msg":"ok"} // @Failure 400 no enough input // @Failure 500 server error // @router /ban_list [get] func (c *TaskController) BanList() { var ( err error data interface{} ) if data, err = service.BanList(); err != nil && (err.Error() != "mongo: no documents in result") { c.ResponseToJson(response.MgoQueryErr, nil, err.Error()) return } c.ResponseToJson(response.Success, data) } // @Title 编辑禁用命令 // @Description 编辑禁用命令 // @Success 200 {object} Res {"code":1,"data":null,"msg":"ok"} // @Param ban_list body array true "禁用命令" // @Param id body string false "id" // @Failure 400 no enough input // @Failure 500 server error // @router /edit_ban [post] func (c *TaskController) EditBan() { var err error data := c.GetStrings("ban_list[]") id := c.GetString("id", "") if len(data) > 0 { if err = service.EditBan(data, id); err != nil { if err.Error() == "hasChinese" { c.ResponseToJson(response.DevBanHasChinese, nil, err.Error()) } else { c.ResponseToJson(response.DbReadErr, nil, err.Error()) } return } } else { c.ResponseToJson(response.ParamsErr, nil) return } c.ResponseToJson(response.Success, nil) } // @Title 是否为禁用命令 // @Description 是否为禁用命令 // @Success 200 {object} Res {"code":1,"data":null,"msg":"ok"} // @Param ban_order body string true "禁用命令" // @Failure 400 no enough input // @Failure 500 server error // @router /is_ban [get] func (c *TaskController) IsBan() { var err error order := c.GetString("ban_order", "") if order != "" { if err = service.IsBan(order); err != nil && (err.Error() != "mongo: no documents in result") { if err.Error() == "isBan" { c.ResponseToJson(response.DevIsBan, nil) } else { c.ResponseToJson(response.MgoQueryErr, nil, err.Error()) } return } } else { c.ResponseToJson(response.ParamsErr, nil) return } c.ResponseToJson(response.Success, nil) } // @Title 通知数据集合 // @Description 通知所需要的数据信息 // @Success 200 {object} Res {"code":1,"data":null,"msg":"ok"} // @Param expand body string false "扩展信息、 admin,notify_type,notify_tpl" // @Failure 400 no enough input // @Failure 500 server error // @router /notify_data [get] func (c *TaskController) NotifyData() { expand := c.GetString("expand", "admin,notify_type,notify_tpl") data := service.GetNotifyData(expand) c.ResponseToJson(response.Success, data) }
26.004158
99
0.646146
c4a9bef27411328e1e66c5669cee2123b4bcacf8
4,677
h
C
libwebserv/protocol_handler.h
MIPS/system-webservd
205bca472f0b8434fdeefa0d02852f48610448a5
[ "Apache-2.0" ]
5
2019-01-19T15:38:48.000Z
2021-10-06T03:59:46.000Z
libwebserv/protocol_handler.h
MIPS/system-webservd
205bca472f0b8434fdeefa0d02852f48610448a5
[ "Apache-2.0" ]
null
null
null
libwebserv/protocol_handler.h
MIPS/system-webservd
205bca472f0b8434fdeefa0d02852f48610448a5
[ "Apache-2.0" ]
1
2019-02-15T23:05:30.000Z
2019-02-15T23:05:30.000Z
// Copyright 2015 The Android Open Source Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #ifndef WEBSERVER_LIBWEBSERV_PROTOCOL_HANDLER_H_ #define WEBSERVER_LIBWEBSERV_PROTOCOL_HANDLER_H_ #include <memory> #include <set> #include <string> #include <base/callback_forward.h> #include <base/macros.h> #include <brillo/secure_blob.h> #include <libwebserv/export.h> #include <libwebserv/request_handler_interface.h> namespace libwebserv { // Wrapper around a protocol handler (e.g. HTTP or HTTPs). // ProtocolHandler allows consumers to add request handlers on a given protocol. // When the ProtocolHandler is connected, allows users to read port and protocol // information. class LIBWEBSERV_EXPORT ProtocolHandler { public: ProtocolHandler() = default; virtual ~ProtocolHandler() = default; // Returns true if the protocol handler object is backed by a ProtocolHandler // on the remote web server and is capable of processing incoming requests. virtual bool IsConnected() const = 0; // Handler's name identifier (as provided in "name" setting of config file). // Standard/default handler names are "http" and "https". virtual std::string GetName() const = 0; // Returns the ports the handler is bound to. There could be multiple. // If the handler is not connected to the server, this will return an empty // set. virtual std::set<uint16_t> GetPorts() const = 0; // Returns the transport protocol that is served by this handler. // Can be either "http" or "https". // If the handler is not connected to the server, this will return an empty // set. virtual std::set<std::string> GetProtocols() const = 0; // Returns a SHA-256 fingerprint of HTTPS certificate used. Returns an empty // byte buffer if this handler does not serve the HTTPS protocol. // If the handler is not connected to the server, this will return an empty // array. virtual brillo::Blob GetCertificateFingerprint() const = 0; // Adds a request handler for given |url|. If the |url| ends with a '/', this // makes the handler respond to any URL beneath this path. // Note that it is not possible to add a specific handler just for the root // path "/". Doing so means "respond to any URL". // |method| is optional request method verb, such as "GET" or "POST". // If |method| is empty, the handler responds to any request verb. // If there are more than one handler for a given request, the most specific // match is chosen. For example, if there are the following handlers provided: // - A["/foo/", ""] // - B["/foo/bar", "GET"] // - C["/foo/bar", ""] // Here is what handlers are called when making certain requests: // - GET("/foo/bar") => B[] // - POST("/foo/bar") => C[] // - PUT("/foo/bar") => C[] // - GET("/foo/baz") => A[] // - GET("/foo") => 404 Not Found // This functions returns a handler ID which can be used later to remove // the handler. // // The handler registration information is stored inside ProtocolHandler and // is used to register the handlers with the web server daemon when it becomes // available. This also happens when the web server goes away and then comes // back (e.g. restarted). So, there is no need to re-register the handlers // once the web server process is restarted. virtual int AddHandler(const std::string& url, const std::string& method, std::unique_ptr<RequestHandlerInterface> handler) = 0; // Similar to AddHandler() above but the handler is just a callback function. virtual int AddHandlerCallback( const std::string& url, const std::string& method, const base::Callback<RequestHandlerInterface::HandlerSignature>& handler_callback) = 0; // Removes the handler with the specified |handler_id|. // Returns false if the handler with the given ID is not found. virtual bool RemoveHandler(int handler_id) = 0; static const char kHttp[]; static const char kHttps[]; private: DISALLOW_COPY_AND_ASSIGN(ProtocolHandler); }; } // namespace libwebserv #endif // WEBSERVER_LIBWEBSERV_PROTOCOL_HANDLER_H_
40.669565
80
0.705367
e27c5b047e454b564069e348c7ad9a1304ec9ae0
523
asm
Assembly
programs/oeis/104/A104765.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/104/A104765.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/104/A104765.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A104765: Triangle T(n,k) read by rows: row n contains the first n Lucas numbers A000204. ; 1,1,3,1,3,4,1,3,4,7,1,3,4,7,11,1,3,4,7,11,18,1,3,4,7,11,18,29,1,3,4,7,11,18,29,47,1,3,4,7,11,18,29,47,76,1,3,4,7,11,18,29,47,76,123,1,3,4,7,11,18,29,47,76,123,199,1,3,4,7,11,18,29,47,76,123,199,322,1,3,4,7,11,18,29,47,76,123,199,322,521,1,3,4,7,11,18,29,47,76 seq $0,25675 ; Exponent of 8 (value of j) in n-th number of form 7^i*8^j. seq $0,204 ; Lucas numbers (beginning with 1): L(n) = L(n-1) + L(n-2) with L(1) = 1, L(2) = 3.
87.166667
261
0.627151
1668de3922ee195d0ddea57d23001c5d298adb66
1,111
c
C
crypt_register_hash.c
zhaobingss/go-sqlcipher
d15a8f4023dff1d1e3fd4719100fcb04b1e49943
[ "Unlicense" ]
1,180
2015-01-11T20:55:07.000Z
2022-03-30T14:09:35.000Z
crypt_register_hash.c
zhaobingss/go-sqlcipher
d15a8f4023dff1d1e3fd4719100fcb04b1e49943
[ "Unlicense" ]
431
2015-01-29T10:42:58.000Z
2022-03-16T19:52:36.000Z
crypt_register_hash.c
zhaobingss/go-sqlcipher
d15a8f4023dff1d1e3fd4719100fcb04b1e49943
[ "Unlicense" ]
397
2015-01-07T14:05:17.000Z
2022-03-27T03:15:46.000Z
/* LibTomCrypt, modular cryptographic library -- Tom St Denis */ /* SPDX-License-Identifier: Unlicense */ #include "tomcrypt_private.h" /** @file crypt_register_hash.c Register a HASH, Tom St Denis */ /** Register a hash with the descriptor table @param hash The hash you wish to register @return value >= 0 if successfully added (or already present), -1 if unsuccessful */ int register_hash(const struct ltc_hash_descriptor *hash) { int x; LTC_ARGCHK(hash != NULL); /* is it already registered? */ LTC_MUTEX_LOCK(&ltc_hash_mutex); for (x = 0; x < TAB_SIZE; x++) { if (XMEMCMP(&hash_descriptor[x], hash, sizeof(struct ltc_hash_descriptor)) == 0) { LTC_MUTEX_UNLOCK(&ltc_hash_mutex); return x; } } /* find a blank spot */ for (x = 0; x < TAB_SIZE; x++) { if (hash_descriptor[x].name == NULL) { XMEMCPY(&hash_descriptor[x], hash, sizeof(struct ltc_hash_descriptor)); LTC_MUTEX_UNLOCK(&ltc_hash_mutex); return x; } } /* no spot */ LTC_MUTEX_UNLOCK(&ltc_hash_mutex); return -1; }
25.837209
89
0.635464
1643261775c4345c2fd6676a47554f6eebe4edac
207
ts
TypeScript
src/plugin.ts
metonym/posthtml-plugin-template
a7d1254a6dea3682451f27becaaaf3c4f54c7b8a
[ "MIT" ]
null
null
null
src/plugin.ts
metonym/posthtml-plugin-template
a7d1254a6dea3682451f27becaaaf3c4f54c7b8a
[ "MIT" ]
null
null
null
src/plugin.ts
metonym/posthtml-plugin-template
a7d1254a6dea3682451f27becaaaf3c4f54c7b8a
[ "MIT" ]
null
null
null
import { PostHTML } from "posthtml"; function plugin() { return function posthtmlPlugin(tree: PostHTML.Node) { return tree; }; } export default plugin; export { plugin, plugin as posthtmlPlugin };
18.818182
55
0.710145
6628562b3d6243e888ad2a45d1c9a3384533a369
301
css
CSS
css/style.css
drawan06/drawan06.github.io
bab12249ceb87ad4250b334ef740316e36da5bea
[ "MIT" ]
null
null
null
css/style.css
drawan06/drawan06.github.io
bab12249ceb87ad4250b334ef740316e36da5bea
[ "MIT" ]
null
null
null
css/style.css
drawan06/drawan06.github.io
bab12249ceb87ad4250b334ef740316e36da5bea
[ "MIT" ]
null
null
null
body { background-color: lightblue; } h1 { color: black; margin-left: 20px; } h2 { padding: 5px; } #titel { background: red; width: 600px; } h1 { font-size: 40px; } p { padding-top: 50px; } #douglas { background: red; } #hi { background: red; }
7.341463
32
0.524917
e5018ed4bd1f087351e10262313e7620e65552b0
1,848
tsx
TypeScript
src/components/collection-center/list.tsx
fossabot/cropcert-ui
8c3f090567c23fff247f63b3e8a9719f04d07c90
[ "Apache-2.0" ]
null
null
null
src/components/collection-center/list.tsx
fossabot/cropcert-ui
8c3f090567c23fff247f63b3e8a9719f04d07c90
[ "Apache-2.0" ]
null
null
null
src/components/collection-center/list.tsx
fossabot/cropcert-ui
8c3f090567c23fff247f63b3e8a9719f04d07c90
[ "Apache-2.0" ]
null
null
null
import { axListCC } from "@services/cc.service"; import { isBrowser, MAP } from "@utils/constants"; import L from "leaflet"; import React, { useEffect, useState } from "react"; import DataTable from "react-data-table-component"; import { Map, Marker, Popup, TileLayer } from "react-leaflet"; import ListColumns from "./list-columns"; export default function CollectionCenterListPage() { const [CCList, setCCList] = useState({ success: false, data: [] as any, }); useEffect(() => { delete L.Icon.Default.prototype["_getIconUrl"]; L.Icon.Default.mergeOptions(MAP.MARKER_MERGEOPTIONS); axListCC().then(d => setCCList(d)); }, []); return ( <> <h1 className="eco--title">Collection Centers</h1> {CCList.data.length > 0 && ( <div className="bx--row"> <div className="bx--col-lg-6 bx--col-md-12"> <DataTable keyField="ccId" columns={ListColumns()} noHeader={true} data={CCList.data} fixedHeader={true} fixedHeaderScrollHeight="calc( 70vh - 48px )" /> </div> <div className="bx--col-lg-6 bx--col-md-12"> {isBrowser && ( <Map center={MAP.MAP_CENTER} zoom={9}> <TileLayer attribution={MAP.TILE.ATTRIBUTION} url={MAP.TILE.URL} /> {CCList.data.map(cc => ( <Marker key={cc["id"]} position={[cc["latitude"], cc["longitude"]]} > <Popup>{`${cc.ccName} - ${ cc.village }`}</Popup> </Marker> ))} </Map> )} </div> </div> )} </> ); }
29.806452
64
0.484307
fb703dc22e9b94a1a0d4486bc68a480a68ac2359
645
h
C
kern/include/synch_queue.h
computist/os161
ade7922890379032c6040277d39a8991a07da92c
[ "MIT" ]
null
null
null
kern/include/synch_queue.h
computist/os161
ade7922890379032c6040277d39a8991a07da92c
[ "MIT" ]
null
null
null
kern/include/synch_queue.h
computist/os161
ade7922890379032c6040277d39a8991a07da92c
[ "MIT" ]
null
null
null
#ifndef _SYNCH_QUEUE_H_ #define _SYNCH_QUEUE_H_ #include <queue.h> struct synch_queue; struct synch_queue* synch_queue_create(void); int synch_queue_push(struct synch_queue* sq, void* newval); void* synch_queue_pop(struct synch_queue* sq); void* synch_queue_pop_wait(struct synch_queue* sq); /*void* synch_queue_front(struct synch_queue* sq); void* synch_queue_front_wait(struct synch_queue* sq);*/ int synch_queue_isempty(struct synch_queue* sq); unsigned int synch_queue_getsize(struct synch_queue* sq); void synch_queue_destroy(struct synch_queue* sq); //void synch_queue_assertvalid(struct synch_queue* sq); #endif /* _SYNCH_QUEUE_H_ */
32.25
59
0.810853
3d086fd2929c7b553e93469e1a36fe78c94e1214
308
go
Go
pkg/lyricsMaker/mainWindow/body/body.go
EternallyAscend/WebsiteDeveloper
20703b3ec4c57439e82752bc453f065f7f72f482
[ "Apache-2.0" ]
null
null
null
pkg/lyricsMaker/mainWindow/body/body.go
EternallyAscend/WebsiteDeveloper
20703b3ec4c57439e82752bc453f065f7f72f482
[ "Apache-2.0" ]
null
null
null
pkg/lyricsMaker/mainWindow/body/body.go
EternallyAscend/WebsiteDeveloper
20703b3ec4c57439e82752bc453f065f7f72f482
[ "Apache-2.0" ]
null
null
null
package body import ( "fyne.io/fyne/v2" "fyne.io/fyne/v2/container" "fyne.io/fyne/v2/widget" ) type Body struct { Object fyne.CanvasObject } func GenerateBody() *Body { return &Body{} } func (that *Body) Combine() { that.Object = container.NewBorder(nil, nil, nil, nil, widget.NewLabel("Body!")) }
15.4
80
0.685065
aace8c7b4dec3755223496c41036edee8fa4371c
532
kt
Kotlin
app/src/main/java/chat/rocket/android/authentication/di/AuthenticationModule.kt
luckcoolla/Rocket.Chat.Android
aaf1beddd6ebc4f0e85541566f8b5182fe34d317
[ "MIT" ]
2
2018-09-14T13:33:13.000Z
2019-10-23T21:53:51.000Z
app/src/main/java/chat/rocket/android/authentication/di/AuthenticationModule.kt
luckcoolla/Rocket.Chat.Android
aaf1beddd6ebc4f0e85541566f8b5182fe34d317
[ "MIT" ]
null
null
null
app/src/main/java/chat/rocket/android/authentication/di/AuthenticationModule.kt
luckcoolla/Rocket.Chat.Android
aaf1beddd6ebc4f0e85541566f8b5182fe34d317
[ "MIT" ]
1
2018-09-23T23:00:38.000Z
2018-09-23T23:00:38.000Z
package chat.rocket.android.authentication.di import chat.rocket.android.authentication.presentation.AuthenticationNavigator import chat.rocket.android.authentication.ui.AuthenticationActivity import chat.rocket.android.dagger.qualifier.ForAuthentication import chat.rocket.android.dagger.scope.PerActivity import dagger.Module import dagger.Provides @Module class AuthenticationModule { @Provides @PerActivity fun provideAuthenticationNavigator(activity: AuthenticationActivity) = AuthenticationNavigator(activity) }
33.25
108
0.855263
e78758167e5e61e4462971ac9561a97633f9c524
81
js
JavaScript
app/src/browser/js/deewave.js
Evaneos/welean3-deewave
0df6a8da7721f15804fb71a9e5f1afbd16724a37
[ "MIT" ]
null
null
null
app/src/browser/js/deewave.js
Evaneos/welean3-deewave
0df6a8da7721f15804fb71a9e5f1afbd16724a37
[ "MIT" ]
null
null
null
app/src/browser/js/deewave.js
Evaneos/welean3-deewave
0df6a8da7721f15804fb71a9e5f1afbd16724a37
[ "MIT" ]
null
null
null
document.addEventListener('DOMContentLoaded', main, false); function main() { }
16.2
59
0.753086
d1f60c538ae6f0ab052c14cfa15378b5d57e48cc
401
kt
Kotlin
NomadFinal/app/src/main/java/com/example/nomadfinal/data/Request.kt
alexandersuglio/AndroidFinalProject
a96b94edffbebdd4a6da9772d5ab2cfe1d49ba64
[ "MIT" ]
null
null
null
NomadFinal/app/src/main/java/com/example/nomadfinal/data/Request.kt
alexandersuglio/AndroidFinalProject
a96b94edffbebdd4a6da9772d5ab2cfe1d49ba64
[ "MIT" ]
null
null
null
NomadFinal/app/src/main/java/com/example/nomadfinal/data/Request.kt
alexandersuglio/AndroidFinalProject
a96b94edffbebdd4a6da9772d5ab2cfe1d49ba64
[ "MIT" ]
null
null
null
package com.example.nomadfinal.data import android.util.Log import java.net.URL // Request handles the network request based on the url and // reads the text response and returns in a string format. class Request (private val url: String) { fun run():String { val forecastJson = URL(url).readText() Log.d(javaClass.simpleName, forecastJson) return forecastJson } }
23.588235
59
0.708229
56c2da028184defb0028acd44739a08f3290347d
203
go
Go
pkg/database/errors.go
alobatonavantica/golang-seed
655f30d5c9510e8cf79ef63e2d4395565cb9020d
[ "MIT" ]
3
2019-02-18T22:03:46.000Z
2021-05-04T19:53:36.000Z
pkg/database/errors.go
alobatonavantica/golang-seed
655f30d5c9510e8cf79ef63e2d4395565cb9020d
[ "MIT" ]
2
2019-02-21T18:30:00.000Z
2021-04-17T17:00:56.000Z
pkg/database/errors.go
alobatonavantica/golang-seed
655f30d5c9510e8cf79ef63e2d4395565cb9020d
[ "MIT" ]
null
null
null
package database import "gorm.io/gorm" var ( // ErrRecordNotFound record not found error ErrRecordNotFound = gorm.ErrRecordNotFound // ErrRegistered registered ErrRegistered = gorm.ErrRegistered )
18.454545
44
0.793103
e38b1a1d571b8ef31abd5def2928e3d5ae3277a1
296
asm
Assembly
WEEK-3/8.asm
ShruKin/Microprocessor-and-Microcontroller-Lab
279c1432f0dee01fae37dc8fcb1dcb798e5725d8
[ "MIT" ]
null
null
null
WEEK-3/8.asm
ShruKin/Microprocessor-and-Microcontroller-Lab
279c1432f0dee01fae37dc8fcb1dcb798e5725d8
[ "MIT" ]
null
null
null
WEEK-3/8.asm
ShruKin/Microprocessor-and-Microcontroller-Lab
279c1432f0dee01fae37dc8fcb1dcb798e5725d8
[ "MIT" ]
null
null
null
// Let us assume, 9060H and 9061H be two consecutive memory locations where 0AH and 07H data is stored Now, write an 8085 assembly language program to XOR operation between them and transfer the result in 9071H memory location LDA 9060 MOV B,A LDA 9061 XRA B STA 9071 HLT
37
226
0.733108
3fd1631a1c7f878820aff02dd99f2a269e541084
1,248
c
C
A1-2.c
memesmerized/ECE220
f0c93b7f84c8cb6bc6ca1289920e061e710965bf
[ "Apache-2.0" ]
null
null
null
A1-2.c
memesmerized/ECE220
f0c93b7f84c8cb6bc6ca1289920e061e710965bf
[ "Apache-2.0" ]
null
null
null
A1-2.c
memesmerized/ECE220
f0c93b7f84c8cb6bc6ca1289920e061e710965bf
[ "Apache-2.0" ]
null
null
null
//Name: Prasad Uchil //Student ID: 1616764 #include<stdio.h> int main() { float balance=1000000; float withdrawal=100000; float int_rate=0.08/12; float interest; int year=0, month=1;// initializing variables while(balance>0)//while loop begins as long as bank balance is greater than 0 { interest=balance*int_rate;//interest is calculated on the money in account balance=balance+interest;//new balance is created including the interest calculated if(month==6)//checking to see if July { if((balance-withdrawal)<0)//checking if 100000 cannot be withdrawn { withdrawal=balance;//storing value of last withdrawal } balance=balance-withdrawal;//calculating balance after withdrawall } month++;//changing month number if(month>12)//restarting year { month=1;//restarting year with month 1 year++;//number of year it takes to empty account } } printf("The number of year it takes to empty the account is: %d\n",year); printf("The amount of last withdrawal would be: $%.2f\n",withdrawal);//displaying calculated values }
36.705882
104
0.623397
b2f4e0a17b1d50d9e628464d9c96026fcbff615c
20,063
py
Python
datetimeparser/enums.py
aridevelopment-de/datetimeparser
df63d6f7ed0c362f6d6b4e55d61b973b7fcf3f56
[ "MIT" ]
12
2021-11-05T21:17:21.000Z
2022-03-30T17:53:50.000Z
datetimeparser/enums.py
aridevelopment-de/datetimeparser
df63d6f7ed0c362f6d6b4e55d61b973b7fcf3f56
[ "MIT" ]
45
2021-11-14T16:05:04.000Z
2022-03-29T18:51:31.000Z
datetimeparser/enums.py
aridevelopment-de/datetimeparser
df63d6f7ed0c362f6d6b4e55d61b973b7fcf3f56
[ "MIT" ]
1
2021-11-14T13:44:37.000Z
2021-11-14T13:44:37.000Z
from datetime import datetime, timedelta from enum import Enum, auto from dateutil.relativedelta import relativedelta from .baseclasses import Constant, MethodEnum from .formulars import days_feb, eastern_calc, thanksgiving_calc, year_start class ConstantOption(Enum): TIME_VARIABLE = auto() DATE_VARIABLE = auto() YEAR_VARIABLE = auto() class Constants: CHRISTMAS = Constant('christmas', ['xmas'], options=[ConstantOption.YEAR_VARIABLE], time_value=lambda year_time: datetime(year=year_time, month=12, day=25)) HOLY_EVE = Constant('holy eve', options=[ConstantOption.YEAR_VARIABLE], time_value=lambda year_time: datetime(year=year_time, month=12, day=24)) SILVESTER = Constant('silvester', ['new years eve'], options=[ConstantOption.YEAR_VARIABLE], time_value=lambda year_time: datetime(year=year_time, month=12, day=31)) EASTERN = Constant('eastern', ['easter'], options=[ConstantOption.YEAR_VARIABLE], time_value=eastern_calc) NICHOLAS = Constant('nicholas', ['nicholas day'], options=[ConstantOption.YEAR_VARIABLE], time_value=lambda year_time: datetime(year=year_time, month=12, day=6)) HALLOWEEN = Constant('halloween', options=[ConstantOption.YEAR_VARIABLE], time_value=lambda year_time: datetime(year=year_time, month=10, day=31)) APRIL_FOOLS_DAY = Constant('april fools day', ['april fool day'], options=[ConstantOption.YEAR_VARIABLE], time_value=lambda year_time: datetime(year=year_time, month=4, day=1)) THANKSGIVING = Constant('thanksgiving', options=[ConstantOption.YEAR_VARIABLE], time_value=thanksgiving_calc) SAINT_PATRICKS_DAY = Constant('saint patrick\'s day', ['saint patricks day', 'st. patrick\'s day', 'saint pt. day', 'st patrick\'s day', 'st patricks day'], options=[ConstantOption.YEAR_VARIABLE], time_value=lambda year_time: datetime(year=year_time, month=3, day=17)) VALENTINES_DAY = Constant('valentines day', ['valentine', 'valentine day'], options=[ConstantOption.YEAR_VARIABLE], time_value=lambda year_time: datetime(year=year_time, month=2, day=14)) PI_DAY = Constant("pi day", ["piday", "pi-day"], options=[ConstantOption.YEAR_VARIABLE], time_value=lambda year_time: datetime(year=year_time, month=3, day=14)) TAU_DAY = Constant("tau day", ["tauday", "tau-day"], options=[ConstantOption.YEAR_VARIABLE], time_value=lambda year_time: datetime(year=year_time, month=6, day=28)) SUMMER_BEGIN = Constant('summer begin', ['summer', 'begin of summer', 'begin of the summer'], options=[ConstantOption.YEAR_VARIABLE], time_value=lambda year_time: datetime(year=year_time, month=6, day=1)) WINTER_BEGIN = Constant('winter begin', ['winter', 'begin of winter', 'begin of the winter'], options=[ConstantOption.YEAR_VARIABLE], time_value=lambda year_time: datetime(year=year_time, month=12, day=1)) SPRING_BEGIN = Constant('spring begin', ['spring', 'begin of spring', 'begin of the spring'], options=[ConstantOption.YEAR_VARIABLE], time_value=lambda year_time: datetime(year=year_time, month=3, day=1)) FALL_BEGIN = Constant('fall begin', ['fall', 'begin of fall', 'begin of the fall', 'autumn begin', 'autumn', 'begin of autumn', 'begin of the autumn'], options=[ConstantOption.YEAR_VARIABLE], time_value=lambda year_time: datetime(year=year_time, month=9, day=1)) SUMMER_END = Constant('summer end', ['end of summer', 'end of the summer'], options=[ConstantOption.YEAR_VARIABLE], time_value=lambda year_time: datetime(year=year_time, month=8, day=31, hour=23, minute=59, second=59)) WINTER_END = Constant('winter end', ['end of winter', 'end of the winter'], options=[ConstantOption.YEAR_VARIABLE], time_value=lambda year_time: datetime(year=year_time, month=2, day=days_feb(year_time), hour=23, minute=59, second=59)) SPRING_END = Constant('spring end', ['end of spring', 'end of the spring'], options=[ConstantOption.YEAR_VARIABLE], time_value=lambda year_time: datetime(year=year_time, month=5, day=31, hour=23, minute=59, second=59)) FALL_END = Constant('fall end', ['end of fall', 'end of the fall', 'autumn end', 'end of autumn', 'end of the autumn'], options=[ConstantOption.YEAR_VARIABLE], time_value=lambda year_time: datetime(year=year_time, month=11, day=30, hour=23, minute=59, second=59)) MORNING = Constant('morning', ['at morning'], options=[ConstantOption.YEAR_VARIABLE, ConstantOption.DATE_VARIABLE]) EVENING = Constant('evening', ['at evening'], options=[ConstantOption.YEAR_VARIABLE, ConstantOption.DATE_VARIABLE]) LUNCHTIME = Constant('lunchtime', ['lunch'], options=[ConstantOption.YEAR_VARIABLE, ConstantOption.DATE_VARIABLE]) # advent of code always starts at midnight 1st december in SET (5 hours negative UTC offset) BEGIN_AOC = Constant('aoc begin', ['aoc', 'begin of aoc', 'begin of the aoc', 'advent of code begin', 'advent of code', 'begin of advent of code', 'begin of the advent of code'], options=[ConstantOption.YEAR_VARIABLE], time_value=lambda year_time: datetime(year=year_time, month=12, day=1, hour=0), offset=-5) END_AOC = Constant('aoc end', ['end of aoc', 'end of the aoc', 'advent of code end', 'end of advent of code', 'end of the advent of code'], options=[ConstantOption.YEAR_VARIABLE], time_value=lambda year_time: datetime(year=year_time, month=12, day=26, hour=0), offset=-5) END_OF_YEAR = Constant('end of year', ['the end of year', 'the end of the year', 'end of the year'], options=[ConstantOption.YEAR_VARIABLE], time_value=lambda year_time: datetime(year=year_time, month=12, day=31, hour=23, minute=59, second=59)) BEGIN_OF_YEAR = Constant('begin of year', ['the begin of year', 'the begin of the year', 'begin of the year'], options=[ConstantOption.YEAR_VARIABLE], time_value=year_start) INFINITY = Constant('infinity', ['inf'], value=None) TODAY = Constant('today', options=[ConstantOption.TIME_VARIABLE], time_value=lambda _: datetime(datetime.today().year, datetime.today().month, datetime.today().day)) TOMORROW = Constant('tomorrow', options=[ConstantOption.TIME_VARIABLE], time_value=lambda _: datetime(datetime.today().year, datetime.today().month, datetime.today().day) + relativedelta( days=1)) YESTERDAY = Constant('yesterday', options=[ConstantOption.TIME_VARIABLE], time_value=lambda _: datetime(datetime.today().year, datetime.today().month, datetime.today().day) - relativedelta( days=1)) NOW = Constant('now', ['at the moment', 'current time', 'current time now'], time_value=lambda _: datetime.now()) ALL = [ CHRISTMAS, HOLY_EVE, SILVESTER, EASTERN, NICHOLAS, HALLOWEEN, APRIL_FOOLS_DAY, THANKSGIVING, SAINT_PATRICKS_DAY, VALENTINES_DAY, PI_DAY, TAU_DAY, SUMMER_END, WINTER_END, SPRING_END, FALL_END, SUMMER_BEGIN, WINTER_BEGIN, SPRING_BEGIN, FALL_BEGIN, MORNING, EVENING, LUNCHTIME, BEGIN_AOC, END_AOC, END_OF_YEAR, BEGIN_OF_YEAR, INFINITY, TODAY, TOMORROW, YESTERDAY, NOW ] ALL_RELATIVE_CONSTANTS = [TODAY, TOMORROW, YESTERDAY, NOW] class DatetimeDeltaConstants: # time_value is a tuple containing (hours, minutes, seconds) MIDNIGHT = Constant('midnight', value=0, options=[ConstantOption.DATE_VARIABLE], time_value=lambda _: (0, 0, 0)) NIGHT = Constant('night', value=0, options=[ConstantOption.DATE_VARIABLE], time_value=lambda _: (21, 0, 0)) MORNING_NIGHT = Constant('morning night', value=0, options=[ConstantOption.DATE_VARIABLE], time_value=lambda _: (3, 0, 0)) DAYLIGHT_CHANGE = Constant('daylight change', ['daylight saving', 'daylight saving time'], value=0, options=[ConstantOption.YEAR_VARIABLE, ConstantOption.DATE_VARIABLE], time_value=lambda _: (6, 0, 0)) SUNRISE = Constant('sunrise', value=0, options=[ConstantOption.DATE_VARIABLE], time_value=lambda _: (7, 0, 0)) MORNING = Constant('morning', value=0, options=[ConstantOption.DATE_VARIABLE], time_value=lambda _: (6, 0, 0)) BREAKFAST = Constant('breakfast', value=0, options=[ConstantOption.DATE_VARIABLE], time_value=lambda _: (8, 0, 0)) MIDDAY = Constant('midday', value=12, options=[ConstantOption.DATE_VARIABLE], time_value=lambda _: (12, 0, 0)) LUNCH = Constant('lunch', ['lunchtime'], value=12, options=[ConstantOption.DATE_VARIABLE], time_value=lambda _: (12, 0, 0)) AFTERNOON = Constant('afternoon', value=12, options=[ConstantOption.DATE_VARIABLE], time_value=lambda _: (15, 0, 0)) EVENING = Constant('evening', value=12, options=[ConstantOption.DATE_VARIABLE], time_value=lambda _: (18, 0, 0)) DINNER = Constant('dinner', ['dinnertime'], value=12, options=[ConstantOption.DATE_VARIABLE], time_value=lambda _: (19, 0, 0)) DAWN = Constant('dawn', value=12, options=[ConstantOption.DATE_VARIABLE], time_value=lambda _: (6, 0, 0)) DUSK = Constant('dusk', value=12, options=[ConstantOption.DATE_VARIABLE], time_value=lambda _: (20, 0, 0)) SUNSET = Constant('sunset', value=12, options=[ConstantOption.DATE_VARIABLE], time_value=lambda _: (18, 30, 0)) ALL = [ MORNING, AFTERNOON, EVENING, NIGHT, MORNING_NIGHT, DAYLIGHT_CHANGE, MIDNIGHT, MIDDAY, DAWN, DUSK, SUNRISE, SUNSET, LUNCH, DINNER, BREAKFAST ] class NumberConstants: # Presented to you by github copilot ONE = Constant('one', value=1) TWO = Constant('two', value=2) THREE = Constant('three', value=3) FOUR = Constant('four', value=4) FIVE = Constant('five', value=5) SIX = Constant('six', value=6) SEVEN = Constant('seven', value=7) EIGHT = Constant('eight', value=8) NINE = Constant('nine', value=9) TEN = Constant('ten', value=10) ELEVEN = Constant('eleven', value=11) TWELVE = Constant('twelve', value=12) THIRTEEN = Constant('thirteen', value=13) FOURTEEN = Constant('fourteen', value=14) FIFTEEN = Constant('fifteen', value=15) SIXTEEN = Constant('sixteen', value=16) SEVENTEEN = Constant('seventeen', value=17) EIGHTEEN = Constant('eighteen', value=18) NINETEEN = Constant('nineteen', value=19) TWENTY = Constant('twenty', value=20) TWENTY_ONE = Constant('twenty one', alias=["twentyone", "twenty-one"], value=21) TWENTY_TWO = Constant('twenty two', alias=["twentytwo", "twenty-two"], value=22) TWENTY_THREE = Constant('twenty three', alias=["twentythree", "twenty-three"], value=23) TWENTY_FOUR = Constant('twenty four', alias=["twentyfour", "twenty-four"], value=24) TWENTY_FIVE = Constant('twenty five', alias=["twentyfive", "twenty-five"], value=25) TWENTY_SIX = Constant('twenty six', alias=["twentysix", "twenty-six"], value=26) TWENTY_SEVEN = Constant('twenty seven', alias=["twentyseven", "twenty-seven"], value=27) TWENTY_EIGHT = Constant('twenty eight', alias=["twentyeight", "twenty-eight"], value=28) TWENTY_NINE = Constant('twenty nine', alias=["twentynine", "twenty-nine"], value=29) THIRTY = Constant('thirty', value=30) THIRTY_ONE = Constant('thirty one', alias=["thirtyone", "thirty-one"], value=31) # Reversed to avoid conflicts with other constants (one is included in twenty one) ALL = [ONE, TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE, TEN, ELEVEN, TWELVE, THIRTEEN, FOURTEEN, FIFTEEN, SIXTEEN, SEVENTEEN, EIGHTEEN, NINETEEN, TWENTY, TWENTY_ONE, TWENTY_TWO, TWENTY_THREE, TWENTY_FOUR, TWENTY_FIVE, TWENTY_SIX, TWENTY_SEVEN, TWENTY_EIGHT, TWENTY_NINE, THIRTY, THIRTY_ONE][::-1] class NumberCountConstants: # Presented to you by github copilot FIRST = Constant('first', alias=['1st', '1.'], value=1) SECOND = Constant('second', alias=['2nd', '2.'], value=2) THIRD = Constant('third', alias=['3rd', '3.'], value=3) FOURTH = Constant('fourth', alias=['4th', '4.'], value=4) FIFTH = Constant('fifth', alias=['5th', '5.'], value=5) SIXTH = Constant('sixth', alias=['6th', '6.'], value=6) SEVENTH = Constant('seventh', alias=['7th', '7.'], value=7) EIGHTH = Constant('eighth', alias=['8th', '8.'], value=8) NINTH = Constant('ninth', alias=['9th', '9.'], value=9) TENTH = Constant('tenth', alias=['10th', '10.'], value=10) ELEVENTH = Constant('eleventh', alias=['11th', '11.'], value=11) TWELFTH = Constant('twelfth', alias=['12th', '12.'], value=12) THIRTEENTH = Constant('thirteenth', alias=['13th', '13.'], value=13) FOURTEENTH = Constant('fourteenth', alias=['14th', '14.'], value=14) FIFTEENTH = Constant('fifteenth', alias=['15th', '15.'], value=15) SIXTEENTH = Constant('sixteenth', alias=['16th', '16.'], value=16) SEVENTEENTH = Constant('seventeenth', alias=['17th', '17.'], value=17) EIGHTEENTH = Constant('eighteenth', alias=['18th', '18.'], value=18) NINETEENTH = Constant('nineteenth', alias=['19th', '19.'], value=19) TWENTIETH = Constant('twentieth', alias=['20th', '20.'], value=20) TWENTY_FIRST = Constant('twenty first', alias=['21st', '21.', 'twentyfirst', 'twenty-first'], value=21) TWENTY_SECOND = Constant('twenty second', alias=['22nd', '22.', 'twentysecond', 'twenty-second'], value=22) TWENTY_THIRD = Constant('twenty third', alias=['23rd', '23.', 'twentythird', 'twenty-third'], value=23) TWENTY_FOURTH = Constant('twenty fourth', alias=['24th', '24.', 'twentyfourth', 'twenty-fourth'], value=24) TWENTY_FIFTH = Constant('twenty fifth', alias=['25th', '25.', 'twentyfifth', 'twenty-fifth'], value=25) TWENTY_SIXTH = Constant('twenty sixth', alias=['26th', '26.', 'twentysixth', 'twenty-sixth'], value=26) TWENTY_SEVENTH = Constant('twenty seventh', alias=['27th', '27.', 'twentyseventh', 'twenty-seventh'], value=27) TWENTY_EIGHTH = Constant('twenty eighth', alias=['28th', '28.', 'twentyeighth', 'twenty-eighth'], value=28) TWENTY_NINTH = Constant('twenty ninth', alias=['29th', '29.', 'twentyninth', 'twenty-ninth'], value=29) THIRTIETH = Constant('thirtieth', alias=['30th', '30.'], value=30) THIRTY_FIRST = Constant('thirty first', alias=['31st', '31.', 'thirthyfirst', "thirty-first"], value=31) # Reversed to avoid conflicts with other constants ALL = [FIRST, SECOND, THIRD, FOURTH, FIFTH, SIXTH, SEVENTH, EIGHTH, NINTH, TENTH, ELEVENTH, TWELFTH, THIRTEENTH, FOURTEENTH, FIFTEENTH, SIXTEENTH, SEVENTEENTH, EIGHTEENTH, NINETEENTH, TWENTIETH, TWENTY_FIRST, TWENTY_SECOND, TWENTY_THIRD, TWENTY_FOURTH, TWENTY_FIFTH, TWENTY_SIXTH, TWENTY_SEVENTH, TWENTY_EIGHTH, TWENTY_NINTH, THIRTIETH, THIRTY_FIRST][::-1] class DatetimeConstants: SECONDS = Constant('seconds', ['second', 'sec', 'secs']) MINUTES = Constant('minutes', ['minute', 'min', 'mins']) QUARTERS = Constant('quarters', ['quarter', 'qtr', 'qtrs']) HOURS = Constant('hours', ['hour']) DAYS = Constant('days', ['day']) WEEKS = Constant('weeks', ['week']) MONTHS = Constant('months', ['month']) YEARS = Constant('years', ['year']) OLYMPIADS = Constant('olympiads', ['olympiad']) # 4 years DECADES = Constant('decades', ['decade']) # 10 years CENTURIES = Constant('centuries', ['century']) # 100 years MILLENNIUMS = Constant('millenniums', ['millennium']) # 1,000 years MEGAANNUMS = Constant('megaannuums', ['megaannuum']) # 1,000,000 years GIGAANNUMS = Constant('gigaannuums', ['gigaannuum']) # 1,000,000,000 years TIME = [SECONDS, MINUTES, QUARTERS, HOURS] DATE = [DAYS, WEEKS, MONTHS, YEARS, DECADES, CENTURIES, MILLENNIUMS, MEGAANNUMS, GIGAANNUMS] ALL = [*DATE, *TIME] @classmethod def convert_from_mini_date(cls, md): if md.lower() == "s": return cls.SECONDS elif md.lower() == "m": return cls.MINUTES elif md.lower() == "h": return cls.HOURS elif md.lower() == "w": return cls.WEEKS elif md.lower() == "d": return cls.DAYS elif md.lower() == "y": return cls.YEARS class WeekdayConstants: MONDAY = Constant('monday', time_value=lambda date: f"{date + timedelta((0 - date.weekday()) % 7)}") TUESDAY = Constant('tuesday', time_value=lambda date: f"{date + timedelta((1 - date.weekday()) % 7)}") WEDNESDAY = Constant('wednesday', time_value=lambda date: f"{date + timedelta((2 - date.weekday()) % 7)}") THURSDAY = Constant('thursday', time_value=lambda date: f"{date + timedelta((3 - date.weekday()) % 7)}") FRIDAY = Constant('friday', time_value=lambda date: f"{date + timedelta((4 - date.weekday()) % 7)}") SATURDAY = Constant('saturday', time_value=lambda date: f"{date + timedelta((5 - date.weekday()) % 7)}") SUNDAY = Constant('sunday', time_value=lambda date: f"{date + timedelta((6 - date.weekday()) % 7)}") ALL = [MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY] class MonthConstants: JANUARY = Constant('january', ['jan'], time_value=lambda year_time: datetime(year=year_time, month=1, day=1)) FEBRUARY = Constant('february', ['feb'], time_value=lambda year_time: datetime(year=year_time, month=2, day=1)) MARCH = Constant('march', ['mar'], time_value=lambda year_time: datetime(year=year_time, month=3, day=1)) APRIL = Constant('april', ['apr'], time_value=lambda year_time: datetime(year=year_time, month=4, day=1)) MAY = Constant('may', time_value=lambda year_time: datetime(year=year_time, month=5, day=1)) JUNE = Constant('june', ['jun'], time_value=lambda year_time: datetime(year=year_time, month=6, day=1)) JULY = Constant('july', ['jul'], time_value=lambda year_time: datetime(year=year_time, month=7, day=1)) AUGUST = Constant('august', ['aug'], time_value=lambda year_time: datetime(year=year_time, month=8, day=1)) SEPTEMBER = Constant('september', ['sep'], time_value=lambda year_time: datetime(year=year_time, month=9, day=1)) OCTOBER = Constant('october', ['oct'], time_value=lambda year_time: datetime(year=year_time, month=10, day=1)) NOVEMBER = Constant('november', ['nov'], time_value=lambda year_time: datetime(year=year_time, month=11, day=1)) DECEMBER = Constant('december', ['dec'], time_value=lambda year_time: datetime(year=year_time, month=12, day=1)) ALL = [JANUARY, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER] class Keywords: OF = Constant('of') AFTER = Constant('after') BEFORE = Constant('before') NEXT = Constant('next') IN = Constant('in') FOR = Constant('for') PAST = Constant('past') ALL = [OF, AFTER, BEFORE, NEXT, IN, FOR, PAST] class Method: ABSOLUTE_PREPOSITIONS = MethodEnum('absolute_prepositions') ABSOLUTE_DATE_FORMATS = MethodEnum('absolute_date_formats') CONSTANTS = MethodEnum('constants') CONSTANTS_RELATIVE_EXTENSIONS = MethodEnum('constants_relative_extensions') DATETIME_DELTA_CONSTANTS = MethodEnum('datetime_delta_constants') RELATIVE_DATETIMES = MethodEnum('relative_datetimes')
64.719355
140
0.648358
6b8ccadc4d38611973c75b3b2e63149d69d15939
8,097
h
C
deps/kb_meme/meme-5.0.1/src/meme-sax.h
arwyer/MotifFinderGibbs
a428a71716b3c0040bd7825dcbea3fc7fbb6823b
[ "MIT" ]
1
2019-07-19T04:33:43.000Z
2019-07-19T04:33:43.000Z
deps/kb_meme/meme-5.0.1/src/meme-sax.h
man4ish/MotifFinderMdscan
2cf60b028963be22389717329a7ed28e0a489274
[ "MIT" ]
1
2019-07-08T17:54:26.000Z
2019-07-08T17:54:26.000Z
deps/kb_meme/meme-5.0.1/src/meme-sax.h
man4ish/MotifFinderMdscan
2cf60b028963be22389717329a7ed28e0a489274
[ "MIT" ]
1
2019-06-13T17:45:17.000Z
2019-06-13T17:45:17.000Z
#ifndef MEME_SAX_H #define MEME_SAX_H #include <libxml/parser.h> #include <stdarg.h> typedef struct meme_io_xml_callbacks MEME_IO_XML_CALLBACKS_T; typedef enum { MEME_IO_XML_ALPH_DNA, MEME_IO_XML_ALPH_PROTEIN, MEME_IO_XML_ALPH_CUSTOM } MEME_IO_XML_ALPH_T; struct meme_io_xml_callbacks { void (*error)(void *, char *, va_list); void (*start_meme)(void *, int, int, int, char *); //major version, minor version, patch version, release date void (*end_meme)(void *); //start meme void (*start_training_set)(void *, char *, int, int); // datafile, length, positions void (*end_training_set)(void *); //start training_set void (*start_alphabet)(void *, MEME_IO_XML_ALPH_T, char *, int); // alphabet type, name, extends flag void (*end_alphabet)(void *); //start alphabet void (*handle_alphabet_letter)(void *, char *, char, char*, char, char *, char*, int); // id, symbol, aliases, complement, equals, name, colour //end alphabet // note that new meme outputs do not have the <ambigs><letter.../>...</ambigs> section void (*start_ambigs)(void *); void (*end_ambigs)(void *); //start ambigs void (*handle_ambigs_letter)(void *, char *, char); // id, symbol //end ambigs void (*handle_sequence)(void *, char *, char *, int, double); // id, name, length, weight void (*start_letter_frequencies)(void *); void (*end_letter_frequencies)(void *); //start letter_frequencies void (*start_lf_alphabet_array)(void *); void (*end_lf_alphabet_array)(void *); //start alphabet_array void (*handle_lf_aa_value)(void *, char *, double); //end alphabet_array //end letter_frequencies //end training_set void (*start_model)(void *); void (*end_model)(void *); //start model void (*handle_command_line)(void *, char *); //command line void (*handle_host)(void *, char *); //host void (*handle_type)(void *, int); //type - TODO investigate void (*handle_nmotifs)(void *, int); //nmotifs void (*handle_evalue_threshold)(void *, double); //evalue threshold (in log base 10) void (*handle_object_function)(void *, char *); // object function - TODO investigate void (*handle_spfun)(void *, char *); // starting point function void (*handle_min_width)(void *, int); // min width of motifs void (*handle_max_width)(void *, int); // max width of motifs void (*handle_minic)(void *, double); // min information content of motifs void (*handle_use_llr)(void *, int); // use_llr void (*handle_wg)(void *, double); // wg - TODO investigate (guessing some kind of weight?) void (*handle_ws)(void *, double); // ws - TODO investigate (guessing some kind of weight?) void (*handle_endgaps)(void *, int); //allow gaps on end (boolean) void (*handle_substring)(void *, int); // EM starting points are substrings of data void (*handle_minsites)(void *, int); // minimum sites for motif void (*handle_maxsites)(void *, int); // maximum sites for motif void (*handle_wnsites)(void *, int); // wnsites - TODO void (*handle_prob)(void *, double); // prob - TODO void (*handle_spmap)(void *, int); // type of spmap void (*handle_spfuzz)(void *, double); // spfuzz (weight?) TODO void (*handle_prior)(void *, int); // type of prior void (*handle_beta)(void *, double); // beta (weight?) TODO void (*handle_maxiter)(void *, int); // maxiter TODO void (*handle_distance)(void *, double); // distance (weight?) TODO void (*handle_num_sequences)(void *, int); // num sequences TODO void (*handle_num_positions)(void *, int); // num positions TODO void (*handle_seed)(void *, long); // seed void (*handle_seqfrac)(void *, double); //seqfrac TODO void (*handle_hsfrac)(void *, double); //hsfrac TODO void (*handle_maxwords)(void *, double); //maxwords TODO void (*handle_searchsize)(void *, double); //searchsize TODO void (*handle_maxsize)(void *, double); //maxsize TODO void (*handle_norand)(void *, char *); //norand TODO void (*handle_csites)(void *, double); //csites TODO void (*handle_strands)(void *, int); // strands 0 = NA, 1 = Forward strand only, 2 = Both strands void (*handle_brief)(void *, int); // brief 0 = normal output, 1 = suppress output of large tables void (*handle_psp_file)(void *, char *); // PSP file void (*handle_priors_file)(void *, char *); // priors file void (*handle_reason_for_stopping)(void *, char *); // reason for stopping void (*handle_back_order)(void *, int); // Markov background model order void (*start_background_frequencies)(void *, char *); // source of data void (*end_background_frequencies)(void *); //start background frequencies void (*start_bf_alphabet_array)(void *); void (*end_bf_alphabet_array)(void *); //start alphabet_array void (*handle_bf_aa_value)(void *, char *, double); //end alphabet_array //end background frequencies //end model void (*start_motifs)(void *); void (*end_motifs)(void *); //start motifs void (*start_motif)(void *, char *, char *, char *, int, double, double, //ctx, id, name, alt, width, sites, llr double, double, double, double, double, char *); //ic, re, bayes_threshold, e_value (in log10), elpased_time, url void (*end_motif)(void *); //start motif void (*start_scores)(void *); void (*end_scores)(void *); //start scores void (*start_sc_alphabet_matrix)(void *); void (*end_sc_alphabet_matrix)(void *); //start alphabet matrix void (*start_sc_am_alphabet_array)(void *); void (*end_sc_am_alphabet_array)(void *); //start alphabet array void (*handle_sc_am_aa_value)(void *, char *, double); //end alphabet array //end alphabet matrix //end scores void (*start_probabilities)(void *); void (*end_probabilities)(void *); //start probabilities void (*start_pr_alphabet_matrix)(void *); void (*end_pr_alphabet_matrix)(void *); //start alphabet matrix void (*start_pr_am_alphabet_array)(void *); void (*end_pr_am_alphabet_array)(void *); //start alphabet array void (*handle_pr_am_aa_value)(void *, char *, double); //end alphabet array //end alphabet matrix //end probabilities void (*handle_regular_expression)(void *, char *); void (*start_contributing_sites)(void *); void (*end_contributing_sites)(void *); //start contributing sites void (*start_contributing_site)(void *, char *, int, char, double); // sequence id, position, strand, pvalue (in log 10) void (*end_contributing_site)(void *); //start contributing site void (*handle_left_flank)(void *, char *); void (*start_site)(void *); void (*end_site)(void *); //start site void (*handle_letter_ref)(void *, char *); //end site void (*handle_right_flank)(void *, char *); //end contributing site //end contributing sites //end motif //end motifs void (*start_scanned_sites_summary)(void *, double); // pvalue threshold for scanned sites void (*end_scanned_sites_summary)(void *); //start scanned_sites_summary void (*start_scanned_sites)(void *, char *, double, int); // sequence id, pvalue (in log 10), number of sites void (*end_scanned_sites)(void *); //start scanned_sites void (*handle_scanned_site)(void *, char *, char, int, double); // motif id, strand, position, pvalue (in log 10) //end scanned_sites //end scanned_sites_summary //end meme }; /***************************************************************************** * Register handlers on the xmlSAXHandler structure ****************************************************************************/ void register_meme_io_xml_sax_handlers(xmlSAXHandler *handler); /***************************************************************************** * Creates the data to be passed to the SAX parser ****************************************************************************/ void* create_meme_io_xml_sax_context(void *user_data, MEME_IO_XML_CALLBACKS_T *callbacks); /***************************************************************************** * Destroys the data used by the SAX parser ****************************************************************************/ void destroy_meme_io_xml_sax_context(void *context); #endif
44.983333
145
0.65234
6c3d58771b5de19d988af961b125f8db9d5ee2a1
713
go
Go
main.go
JimPatterson/404-placerholder
05bb1493a0624917ee7299dc531701c942832631
[ "MIT" ]
null
null
null
main.go
JimPatterson/404-placerholder
05bb1493a0624917ee7299dc531701c942832631
[ "MIT" ]
null
null
null
main.go
JimPatterson/404-placerholder
05bb1493a0624917ee7299dc531701c942832631
[ "MIT" ]
null
null
null
package main import ( "fmt" "io" "net/http" "os" ) func main() { if (len(os.Args) != 3) { os.Stderr.WriteString("Usage: " + os.Args[0] + "<listen-addr> <health endpoint>\n") os.Exit(1) } listenAddr := os.Args[1] // e.g. :8080 healthPath := os.Args[2] // e.g. /health_check healthy := func(w http.ResponseWriter, req *http.Request) { w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusOK) io.WriteString(w, "{}") } // one explicit endpoint http.HandleFunc(healthPath, healthy) // everything else gets an error http.Handle("/", http.NotFoundHandler()) err := http.ListenAndServe(listenAddr, nil) if (err != nil) { fmt.Println(err) os.Exit(2) } }
18.282051
60
0.633941
9b6b33ea49cb64c344303c9a951ce74fe6bba465
90,377
swift
Swift
GithubStargazers/Application/environments/Environment+mock.swift
jrBordet/GithubStargazers
d7a82117a0896f97e5f982687f6c45cee4e2d7e7
[ "MIT" ]
null
null
null
GithubStargazers/Application/environments/Environment+mock.swift
jrBordet/GithubStargazers
d7a82117a0896f97e5f982687f6c45cee4e2d7e7
[ "MIT" ]
null
null
null
GithubStargazers/Application/environments/Environment+mock.swift
jrBordet/GithubStargazers
d7a82117a0896f97e5f982687f6c45cee4e2d7e7
[ "MIT" ]
null
null
null
// // Environment+mock.swift // GithubStargazers // // Created by Jean Raphael Bordet on 25/05/21. // import Foundation // MAK - App extension AppEnvironment { static var mock = Self( stargazersEnv: StargazerViewEnvironment.mock ) } // MARK: - View (features composition) extension StargazerViewEnvironment { static var mock = Self( stargazersEnv: StargazersEnvironment.mock ) } // MARK: - Single feature extension StargazersEnvironment { static var mock = Self( fetch: { _, _, page in print("[StargazersEnvironment] mock \(page)") func map(_ model: StargazerRequestModel) -> StargazersModel { StargazersModel( id: model.id, name: model.login, imageUrl: URL(string: model.avatar_url ) ) } if page == 1 { return .just( Page().mock(from: page_1).map { map($0) } ) } else if page == 2 { return .just( Page().mock(from: page_2).map { map($0) } ) } else if page == 3 { return .just( Page().mock(from: page_3).map { map($0) } ) } else { return .just([]) } } ) } struct Page: Mockable { typealias Model = [StargazerRequestModel] } protocol Mockable { associatedtype Model: Codable } extension Mockable { func mock(from content: String) -> Model { do { return try JSONDecoder().decode(Model.self, from: content.data(using: .utf8)!) } catch { fatalError() } } } let page_1 = """ [ { "login": "schacon", "id": 70, "node_id": "MDQ6VXNlcjcw", "avatar_url": "https://avatars.githubusercontent.com/u/70?v=4", "gravatar_id": "", "url": "https://api.github.com/users/schacon", "html_url": "https://github.com/schacon", "followers_url": "https://api.github.com/users/schacon/followers", "following_url": "https://api.github.com/users/schacon/following{/other_user}", "gists_url": "https://api.github.com/users/schacon/gists{/gist_id}", "starred_url": "https://api.github.com/users/schacon/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/schacon/subscriptions", "organizations_url": "https://api.github.com/users/schacon/orgs", "repos_url": "https://api.github.com/users/schacon/repos", "events_url": "https://api.github.com/users/schacon/events{/privacy}", "received_events_url": "https://api.github.com/users/schacon/received_events", "type": "User", "site_admin": false }, { "login": "adelcambre", "id": 242, "node_id": "MDQ6VXNlcjI0Mg==", "avatar_url": "https://avatars.githubusercontent.com/u/242?v=4", "gravatar_id": "", "url": "https://api.github.com/users/adelcambre", "html_url": "https://github.com/adelcambre", "followers_url": "https://api.github.com/users/adelcambre/followers", "following_url": "https://api.github.com/users/adelcambre/following{/other_user}", "gists_url": "https://api.github.com/users/adelcambre/gists{/gist_id}", "starred_url": "https://api.github.com/users/adelcambre/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/adelcambre/subscriptions", "organizations_url": "https://api.github.com/users/adelcambre/orgs", "repos_url": "https://api.github.com/users/adelcambre/repos", "events_url": "https://api.github.com/users/adelcambre/events{/privacy}", "received_events_url": "https://api.github.com/users/adelcambre/received_events", "type": "User", "site_admin": false }, { "login": "usergenic", "id": 578, "node_id": "MDQ6VXNlcjU3OA==", "avatar_url": "https://avatars.githubusercontent.com/u/578?v=4", "gravatar_id": "", "url": "https://api.github.com/users/usergenic", "html_url": "https://github.com/usergenic", "followers_url": "https://api.github.com/users/usergenic/followers", "following_url": "https://api.github.com/users/usergenic/following{/other_user}", "gists_url": "https://api.github.com/users/usergenic/gists{/gist_id}", "starred_url": "https://api.github.com/users/usergenic/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/usergenic/subscriptions", "organizations_url": "https://api.github.com/users/usergenic/orgs", "repos_url": "https://api.github.com/users/usergenic/repos", "events_url": "https://api.github.com/users/usergenic/events{/privacy}", "received_events_url": "https://api.github.com/users/usergenic/received_events", "type": "User", "site_admin": false }, { "login": "fdb", "id": 8477, "node_id": "MDQ6VXNlcjg0Nzc=", "avatar_url": "https://avatars.githubusercontent.com/u/8477?v=4", "gravatar_id": "", "url": "https://api.github.com/users/fdb", "html_url": "https://github.com/fdb", "followers_url": "https://api.github.com/users/fdb/followers", "following_url": "https://api.github.com/users/fdb/following{/other_user}", "gists_url": "https://api.github.com/users/fdb/gists{/gist_id}", "starred_url": "https://api.github.com/users/fdb/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/fdb/subscriptions", "organizations_url": "https://api.github.com/users/fdb/orgs", "repos_url": "https://api.github.com/users/fdb/repos", "events_url": "https://api.github.com/users/fdb/events{/privacy}", "received_events_url": "https://api.github.com/users/fdb/received_events", "type": "User", "site_admin": false }, { "login": "darinel", "id": 29478, "node_id": "MDQ6VXNlcjI5NDc4", "avatar_url": "https://avatars.githubusercontent.com/u/29478?v=4", "gravatar_id": "", "url": "https://api.github.com/users/darinel", "html_url": "https://github.com/darinel", "followers_url": "https://api.github.com/users/darinel/followers", "following_url": "https://api.github.com/users/darinel/following{/other_user}", "gists_url": "https://api.github.com/users/darinel/gists{/gist_id}", "starred_url": "https://api.github.com/users/darinel/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/darinel/subscriptions", "organizations_url": "https://api.github.com/users/darinel/orgs", "repos_url": "https://api.github.com/users/darinel/repos", "events_url": "https://api.github.com/users/darinel/events{/privacy}", "received_events_url": "https://api.github.com/users/darinel/received_events", "type": "User", "site_admin": false }, { "login": "Willianvdv", "id": 102915, "node_id": "MDQ6VXNlcjEwMjkxNQ==", "avatar_url": "https://avatars.githubusercontent.com/u/102915?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Willianvdv", "html_url": "https://github.com/Willianvdv", "followers_url": "https://api.github.com/users/Willianvdv/followers", "following_url": "https://api.github.com/users/Willianvdv/following{/other_user}", "gists_url": "https://api.github.com/users/Willianvdv/gists{/gist_id}", "starred_url": "https://api.github.com/users/Willianvdv/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Willianvdv/subscriptions", "organizations_url": "https://api.github.com/users/Willianvdv/orgs", "repos_url": "https://api.github.com/users/Willianvdv/repos", "events_url": "https://api.github.com/users/Willianvdv/events{/privacy}", "received_events_url": "https://api.github.com/users/Willianvdv/received_events", "type": "User", "site_admin": false }, { "login": "sul4bh", "id": 109486, "node_id": "MDQ6VXNlcjEwOTQ4Ng==", "avatar_url": "https://avatars.githubusercontent.com/u/109486?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sul4bh", "html_url": "https://github.com/sul4bh", "followers_url": "https://api.github.com/users/sul4bh/followers", "following_url": "https://api.github.com/users/sul4bh/following{/other_user}", "gists_url": "https://api.github.com/users/sul4bh/gists{/gist_id}", "starred_url": "https://api.github.com/users/sul4bh/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sul4bh/subscriptions", "organizations_url": "https://api.github.com/users/sul4bh/orgs", "repos_url": "https://api.github.com/users/sul4bh/repos", "events_url": "https://api.github.com/users/sul4bh/events{/privacy}", "received_events_url": "https://api.github.com/users/sul4bh/received_events", "type": "User", "site_admin": false }, { "login": "preavy", "id": 131258, "node_id": "MDQ6VXNlcjEzMTI1OA==", "avatar_url": "https://avatars.githubusercontent.com/u/131258?v=4", "gravatar_id": "", "url": "https://api.github.com/users/preavy", "html_url": "https://github.com/preavy", "followers_url": "https://api.github.com/users/preavy/followers", "following_url": "https://api.github.com/users/preavy/following{/other_user}", "gists_url": "https://api.github.com/users/preavy/gists{/gist_id}", "starred_url": "https://api.github.com/users/preavy/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/preavy/subscriptions", "organizations_url": "https://api.github.com/users/preavy/orgs", "repos_url": "https://api.github.com/users/preavy/repos", "events_url": "https://api.github.com/users/preavy/events{/privacy}", "received_events_url": "https://api.github.com/users/preavy/received_events", "type": "User", "site_admin": false }, { "login": "benjic", "id": 135916, "node_id": "MDQ6VXNlcjEzNTkxNg==", "avatar_url": "https://avatars.githubusercontent.com/u/135916?v=4", "gravatar_id": "", "url": "https://api.github.com/users/benjic", "html_url": "https://github.com/benjic", "followers_url": "https://api.github.com/users/benjic/followers", "following_url": "https://api.github.com/users/benjic/following{/other_user}", "gists_url": "https://api.github.com/users/benjic/gists{/gist_id}", "starred_url": "https://api.github.com/users/benjic/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/benjic/subscriptions", "organizations_url": "https://api.github.com/users/benjic/orgs", "repos_url": "https://api.github.com/users/benjic/repos", "events_url": "https://api.github.com/users/benjic/events{/privacy}", "received_events_url": "https://api.github.com/users/benjic/received_events", "type": "User", "site_admin": false }, { "login": "hagiwaratakayuki", "id": 141513, "node_id": "MDQ6VXNlcjE0MTUxMw==", "avatar_url": "https://avatars.githubusercontent.com/u/141513?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hagiwaratakayuki", "html_url": "https://github.com/hagiwaratakayuki", "followers_url": "https://api.github.com/users/hagiwaratakayuki/followers", "following_url": "https://api.github.com/users/hagiwaratakayuki/following{/other_user}", "gists_url": "https://api.github.com/users/hagiwaratakayuki/gists{/gist_id}", "starred_url": "https://api.github.com/users/hagiwaratakayuki/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hagiwaratakayuki/subscriptions", "organizations_url": "https://api.github.com/users/hagiwaratakayuki/orgs", "repos_url": "https://api.github.com/users/hagiwaratakayuki/repos", "events_url": "https://api.github.com/users/hagiwaratakayuki/events{/privacy}", "received_events_url": "https://api.github.com/users/hagiwaratakayuki/received_events", "type": "User", "site_admin": false }, { "login": "stefanlasiewski", "id": 142752, "node_id": "MDQ6VXNlcjE0Mjc1Mg==", "avatar_url": "https://avatars.githubusercontent.com/u/142752?v=4", "gravatar_id": "", "url": "https://api.github.com/users/stefanlasiewski", "html_url": "https://github.com/stefanlasiewski", "followers_url": "https://api.github.com/users/stefanlasiewski/followers", "following_url": "https://api.github.com/users/stefanlasiewski/following{/other_user}", "gists_url": "https://api.github.com/users/stefanlasiewski/gists{/gist_id}", "starred_url": "https://api.github.com/users/stefanlasiewski/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/stefanlasiewski/subscriptions", "organizations_url": "https://api.github.com/users/stefanlasiewski/orgs", "repos_url": "https://api.github.com/users/stefanlasiewski/repos", "events_url": "https://api.github.com/users/stefanlasiewski/events{/privacy}", "received_events_url": "https://api.github.com/users/stefanlasiewski/received_events", "type": "User", "site_admin": false }, { "login": "hbjerry", "id": 174603, "node_id": "MDQ6VXNlcjE3NDYwMw==", "avatar_url": "https://avatars.githubusercontent.com/u/174603?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hbjerry", "html_url": "https://github.com/hbjerry", "followers_url": "https://api.github.com/users/hbjerry/followers", "following_url": "https://api.github.com/users/hbjerry/following{/other_user}", "gists_url": "https://api.github.com/users/hbjerry/gists{/gist_id}", "starred_url": "https://api.github.com/users/hbjerry/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hbjerry/subscriptions", "organizations_url": "https://api.github.com/users/hbjerry/orgs", "repos_url": "https://api.github.com/users/hbjerry/repos", "events_url": "https://api.github.com/users/hbjerry/events{/privacy}", "received_events_url": "https://api.github.com/users/hbjerry/received_events", "type": "User", "site_admin": false }, { "login": "Visgean", "id": 193832, "node_id": "MDQ6VXNlcjE5MzgzMg==", "avatar_url": "https://avatars.githubusercontent.com/u/193832?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Visgean", "html_url": "https://github.com/Visgean", "followers_url": "https://api.github.com/users/Visgean/followers", "following_url": "https://api.github.com/users/Visgean/following{/other_user}", "gists_url": "https://api.github.com/users/Visgean/gists{/gist_id}", "starred_url": "https://api.github.com/users/Visgean/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Visgean/subscriptions", "organizations_url": "https://api.github.com/users/Visgean/orgs", "repos_url": "https://api.github.com/users/Visgean/repos", "events_url": "https://api.github.com/users/Visgean/events{/privacy}", "received_events_url": "https://api.github.com/users/Visgean/received_events", "type": "User", "site_admin": false }, { "login": "jiska", "id": 210861, "node_id": "MDQ6VXNlcjIxMDg2MQ==", "avatar_url": "https://avatars.githubusercontent.com/u/210861?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jiska", "html_url": "https://github.com/jiska", "followers_url": "https://api.github.com/users/jiska/followers", "following_url": "https://api.github.com/users/jiska/following{/other_user}", "gists_url": "https://api.github.com/users/jiska/gists{/gist_id}", "starred_url": "https://api.github.com/users/jiska/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jiska/subscriptions", "organizations_url": "https://api.github.com/users/jiska/orgs", "repos_url": "https://api.github.com/users/jiska/repos", "events_url": "https://api.github.com/users/jiska/events{/privacy}", "received_events_url": "https://api.github.com/users/jiska/received_events", "type": "User", "site_admin": false }, { "login": "hittudiv", "id": 236097, "node_id": "MDQ6VXNlcjIzNjA5Nw==", "avatar_url": "https://avatars.githubusercontent.com/u/236097?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hittudiv", "html_url": "https://github.com/hittudiv", "followers_url": "https://api.github.com/users/hittudiv/followers", "following_url": "https://api.github.com/users/hittudiv/following{/other_user}", "gists_url": "https://api.github.com/users/hittudiv/gists{/gist_id}", "starred_url": "https://api.github.com/users/hittudiv/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hittudiv/subscriptions", "organizations_url": "https://api.github.com/users/hittudiv/orgs", "repos_url": "https://api.github.com/users/hittudiv/repos", "events_url": "https://api.github.com/users/hittudiv/events{/privacy}", "received_events_url": "https://api.github.com/users/hittudiv/received_events", "type": "User", "site_admin": false }, { "login": "paulomichael", "id": 237418, "node_id": "MDQ6VXNlcjIzNzQxOA==", "avatar_url": "https://avatars.githubusercontent.com/u/237418?v=4", "gravatar_id": "", "url": "https://api.github.com/users/paulomichael", "html_url": "https://github.com/paulomichael", "followers_url": "https://api.github.com/users/paulomichael/followers", "following_url": "https://api.github.com/users/paulomichael/following{/other_user}", "gists_url": "https://api.github.com/users/paulomichael/gists{/gist_id}", "starred_url": "https://api.github.com/users/paulomichael/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/paulomichael/subscriptions", "organizations_url": "https://api.github.com/users/paulomichael/orgs", "repos_url": "https://api.github.com/users/paulomichael/repos", "events_url": "https://api.github.com/users/paulomichael/events{/privacy}", "received_events_url": "https://api.github.com/users/paulomichael/received_events", "type": "User", "site_admin": false }, { "login": "garbagemonster", "id": 243775, "node_id": "MDQ6VXNlcjI0Mzc3NQ==", "avatar_url": "https://avatars.githubusercontent.com/u/243775?v=4", "gravatar_id": "", "url": "https://api.github.com/users/garbagemonster", "html_url": "https://github.com/garbagemonster", "followers_url": "https://api.github.com/users/garbagemonster/followers", "following_url": "https://api.github.com/users/garbagemonster/following{/other_user}", "gists_url": "https://api.github.com/users/garbagemonster/gists{/gist_id}", "starred_url": "https://api.github.com/users/garbagemonster/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/garbagemonster/subscriptions", "organizations_url": "https://api.github.com/users/garbagemonster/orgs", "repos_url": "https://api.github.com/users/garbagemonster/repos", "events_url": "https://api.github.com/users/garbagemonster/events{/privacy}", "received_events_url": "https://api.github.com/users/garbagemonster/received_events", "type": "User", "site_admin": false }, { "login": "minamipj9", "id": 243983, "node_id": "MDQ6VXNlcjI0Mzk4Mw==", "avatar_url": "https://avatars.githubusercontent.com/u/243983?v=4", "gravatar_id": "", "url": "https://api.github.com/users/minamipj9", "html_url": "https://github.com/minamipj9", "followers_url": "https://api.github.com/users/minamipj9/followers", "following_url": "https://api.github.com/users/minamipj9/following{/other_user}", "gists_url": "https://api.github.com/users/minamipj9/gists{/gist_id}", "starred_url": "https://api.github.com/users/minamipj9/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/minamipj9/subscriptions", "organizations_url": "https://api.github.com/users/minamipj9/orgs", "repos_url": "https://api.github.com/users/minamipj9/repos", "events_url": "https://api.github.com/users/minamipj9/events{/privacy}", "received_events_url": "https://api.github.com/users/minamipj9/received_events", "type": "User", "site_admin": false }, { "login": "coolhead", "id": 245313, "node_id": "MDQ6VXNlcjI0NTMxMw==", "avatar_url": "https://avatars.githubusercontent.com/u/245313?v=4", "gravatar_id": "", "url": "https://api.github.com/users/coolhead", "html_url": "https://github.com/coolhead", "followers_url": "https://api.github.com/users/coolhead/followers", "following_url": "https://api.github.com/users/coolhead/following{/other_user}", "gists_url": "https://api.github.com/users/coolhead/gists{/gist_id}", "starred_url": "https://api.github.com/users/coolhead/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/coolhead/subscriptions", "organizations_url": "https://api.github.com/users/coolhead/orgs", "repos_url": "https://api.github.com/users/coolhead/repos", "events_url": "https://api.github.com/users/coolhead/events{/privacy}", "received_events_url": "https://api.github.com/users/coolhead/received_events", "type": "User", "site_admin": false }, { "login": "Spaceghost", "id": 251370, "node_id": "MDQ6VXNlcjI1MTM3MA==", "avatar_url": "https://avatars.githubusercontent.com/u/251370?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Spaceghost", "html_url": "https://github.com/Spaceghost", "followers_url": "https://api.github.com/users/Spaceghost/followers", "following_url": "https://api.github.com/users/Spaceghost/following{/other_user}", "gists_url": "https://api.github.com/users/Spaceghost/gists{/gist_id}", "starred_url": "https://api.github.com/users/Spaceghost/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Spaceghost/subscriptions", "organizations_url": "https://api.github.com/users/Spaceghost/orgs", "repos_url": "https://api.github.com/users/Spaceghost/repos", "events_url": "https://api.github.com/users/Spaceghost/events{/privacy}", "received_events_url": "https://api.github.com/users/Spaceghost/received_events", "type": "User", "site_admin": false }, { "login": "RustyF", "id": 277341, "node_id": "MDQ6VXNlcjI3NzM0MQ==", "avatar_url": "https://avatars.githubusercontent.com/u/277341?v=4", "gravatar_id": "", "url": "https://api.github.com/users/RustyF", "html_url": "https://github.com/RustyF", "followers_url": "https://api.github.com/users/RustyF/followers", "following_url": "https://api.github.com/users/RustyF/following{/other_user}", "gists_url": "https://api.github.com/users/RustyF/gists{/gist_id}", "starred_url": "https://api.github.com/users/RustyF/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/RustyF/subscriptions", "organizations_url": "https://api.github.com/users/RustyF/orgs", "repos_url": "https://api.github.com/users/RustyF/repos", "events_url": "https://api.github.com/users/RustyF/events{/privacy}", "received_events_url": "https://api.github.com/users/RustyF/received_events", "type": "User", "site_admin": false }, { "login": "chexee", "id": 285836, "node_id": "MDQ6VXNlcjI4NTgzNg==", "avatar_url": "https://avatars.githubusercontent.com/u/285836?v=4", "gravatar_id": "", "url": "https://api.github.com/users/chexee", "html_url": "https://github.com/chexee", "followers_url": "https://api.github.com/users/chexee/followers", "following_url": "https://api.github.com/users/chexee/following{/other_user}", "gists_url": "https://api.github.com/users/chexee/gists{/gist_id}", "starred_url": "https://api.github.com/users/chexee/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/chexee/subscriptions", "organizations_url": "https://api.github.com/users/chexee/orgs", "repos_url": "https://api.github.com/users/chexee/repos", "events_url": "https://api.github.com/users/chexee/events{/privacy}", "received_events_url": "https://api.github.com/users/chexee/received_events", "type": "User", "site_admin": false }, { "login": "adrianbarbic", "id": 296263, "node_id": "MDQ6VXNlcjI5NjI2Mw==", "avatar_url": "https://avatars.githubusercontent.com/u/296263?v=4", "gravatar_id": "", "url": "https://api.github.com/users/adrianbarbic", "html_url": "https://github.com/adrianbarbic", "followers_url": "https://api.github.com/users/adrianbarbic/followers", "following_url": "https://api.github.com/users/adrianbarbic/following{/other_user}", "gists_url": "https://api.github.com/users/adrianbarbic/gists{/gist_id}", "starred_url": "https://api.github.com/users/adrianbarbic/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/adrianbarbic/subscriptions", "organizations_url": "https://api.github.com/users/adrianbarbic/orgs", "repos_url": "https://api.github.com/users/adrianbarbic/repos", "events_url": "https://api.github.com/users/adrianbarbic/events{/privacy}", "received_events_url": "https://api.github.com/users/adrianbarbic/received_events", "type": "User", "site_admin": false }, { "login": "yasirmturk", "id": 306691, "node_id": "MDQ6VXNlcjMwNjY5MQ==", "avatar_url": "https://avatars.githubusercontent.com/u/306691?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yasirmturk", "html_url": "https://github.com/yasirmturk", "followers_url": "https://api.github.com/users/yasirmturk/followers", "following_url": "https://api.github.com/users/yasirmturk/following{/other_user}", "gists_url": "https://api.github.com/users/yasirmturk/gists{/gist_id}", "starred_url": "https://api.github.com/users/yasirmturk/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yasirmturk/subscriptions", "organizations_url": "https://api.github.com/users/yasirmturk/orgs", "repos_url": "https://api.github.com/users/yasirmturk/repos", "events_url": "https://api.github.com/users/yasirmturk/events{/privacy}", "received_events_url": "https://api.github.com/users/yasirmturk/received_events", "type": "User", "site_admin": false }, { "login": "moonshadows", "id": 313279, "node_id": "MDQ6VXNlcjMxMzI3OQ==", "avatar_url": "https://avatars.githubusercontent.com/u/313279?v=4", "gravatar_id": "", "url": "https://api.github.com/users/moonshadows", "html_url": "https://github.com/moonshadows", "followers_url": "https://api.github.com/users/moonshadows/followers", "following_url": "https://api.github.com/users/moonshadows/following{/other_user}", "gists_url": "https://api.github.com/users/moonshadows/gists{/gist_id}", "starred_url": "https://api.github.com/users/moonshadows/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/moonshadows/subscriptions", "organizations_url": "https://api.github.com/users/moonshadows/orgs", "repos_url": "https://api.github.com/users/moonshadows/repos", "events_url": "https://api.github.com/users/moonshadows/events{/privacy}", "received_events_url": "https://api.github.com/users/moonshadows/received_events", "type": "User", "site_admin": false }, { "login": "ff6347", "id": 315106, "node_id": "MDQ6VXNlcjMxNTEwNg==", "avatar_url": "https://avatars.githubusercontent.com/u/315106?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ff6347", "html_url": "https://github.com/ff6347", "followers_url": "https://api.github.com/users/ff6347/followers", "following_url": "https://api.github.com/users/ff6347/following{/other_user}", "gists_url": "https://api.github.com/users/ff6347/gists{/gist_id}", "starred_url": "https://api.github.com/users/ff6347/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ff6347/subscriptions", "organizations_url": "https://api.github.com/users/ff6347/orgs", "repos_url": "https://api.github.com/users/ff6347/repos", "events_url": "https://api.github.com/users/ff6347/events{/privacy}", "received_events_url": "https://api.github.com/users/ff6347/received_events", "type": "User", "site_admin": false }, { "login": "LunaticNeko", "id": 327290, "node_id": "MDQ6VXNlcjMyNzI5MA==", "avatar_url": "https://avatars.githubusercontent.com/u/327290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/LunaticNeko", "html_url": "https://github.com/LunaticNeko", "followers_url": "https://api.github.com/users/LunaticNeko/followers", "following_url": "https://api.github.com/users/LunaticNeko/following{/other_user}", "gists_url": "https://api.github.com/users/LunaticNeko/gists{/gist_id}", "starred_url": "https://api.github.com/users/LunaticNeko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/LunaticNeko/subscriptions", "organizations_url": "https://api.github.com/users/LunaticNeko/orgs", "repos_url": "https://api.github.com/users/LunaticNeko/repos", "events_url": "https://api.github.com/users/LunaticNeko/events{/privacy}", "received_events_url": "https://api.github.com/users/LunaticNeko/received_events", "type": "User", "site_admin": false }, { "login": "saadrehman", "id": 338472, "node_id": "MDQ6VXNlcjMzODQ3Mg==", "avatar_url": "https://avatars.githubusercontent.com/u/338472?v=4", "gravatar_id": "", "url": "https://api.github.com/users/saadrehman", "html_url": "https://github.com/saadrehman", "followers_url": "https://api.github.com/users/saadrehman/followers", "following_url": "https://api.github.com/users/saadrehman/following{/other_user}", "gists_url": "https://api.github.com/users/saadrehman/gists{/gist_id}", "starred_url": "https://api.github.com/users/saadrehman/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/saadrehman/subscriptions", "organizations_url": "https://api.github.com/users/saadrehman/orgs", "repos_url": "https://api.github.com/users/saadrehman/repos", "events_url": "https://api.github.com/users/saadrehman/events{/privacy}", "received_events_url": "https://api.github.com/users/saadrehman/received_events", "type": "User", "site_admin": false }, { "login": "allanmaio", "id": 345807, "node_id": "MDQ6VXNlcjM0NTgwNw==", "avatar_url": "https://avatars.githubusercontent.com/u/345807?v=4", "gravatar_id": "", "url": "https://api.github.com/users/allanmaio", "html_url": "https://github.com/allanmaio", "followers_url": "https://api.github.com/users/allanmaio/followers", "following_url": "https://api.github.com/users/allanmaio/following{/other_user}", "gists_url": "https://api.github.com/users/allanmaio/gists{/gist_id}", "starred_url": "https://api.github.com/users/allanmaio/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/allanmaio/subscriptions", "organizations_url": "https://api.github.com/users/allanmaio/orgs", "repos_url": "https://api.github.com/users/allanmaio/repos", "events_url": "https://api.github.com/users/allanmaio/events{/privacy}", "received_events_url": "https://api.github.com/users/allanmaio/received_events", "type": "User", "site_admin": false }, { "login": "kapare", "id": 349579, "node_id": "MDQ6VXNlcjM0OTU3OQ==", "avatar_url": "https://avatars.githubusercontent.com/u/349579?v=4", "gravatar_id": "", "url": "https://api.github.com/users/kapare", "html_url": "https://github.com/kapare", "followers_url": "https://api.github.com/users/kapare/followers", "following_url": "https://api.github.com/users/kapare/following{/other_user}", "gists_url": "https://api.github.com/users/kapare/gists{/gist_id}", "starred_url": "https://api.github.com/users/kapare/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kapare/subscriptions", "organizations_url": "https://api.github.com/users/kapare/orgs", "repos_url": "https://api.github.com/users/kapare/repos", "events_url": "https://api.github.com/users/kapare/events{/privacy}", "received_events_url": "https://api.github.com/users/kapare/received_events", "type": "User", "site_admin": false } ] """ let page_2 = """ [ { "login": "kjaikeerthi", "id": 351510, "node_id": "MDQ6VXNlcjM1MTUxMA==", "avatar_url": "https://avatars.githubusercontent.com/u/351510?v=4", "gravatar_id": "", "url": "https://api.github.com/users/kjaikeerthi", "html_url": "https://github.com/kjaikeerthi", "followers_url": "https://api.github.com/users/kjaikeerthi/followers", "following_url": "https://api.github.com/users/kjaikeerthi/following{/other_user}", "gists_url": "https://api.github.com/users/kjaikeerthi/gists{/gist_id}", "starred_url": "https://api.github.com/users/kjaikeerthi/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kjaikeerthi/subscriptions", "organizations_url": "https://api.github.com/users/kjaikeerthi/orgs", "repos_url": "https://api.github.com/users/kjaikeerthi/repos", "events_url": "https://api.github.com/users/kjaikeerthi/events{/privacy}", "received_events_url": "https://api.github.com/users/kjaikeerthi/received_events", "type": "User", "site_admin": false }, { "login": "TheFox", "id": 353709, "node_id": "MDQ6VXNlcjM1MzcwOQ==", "avatar_url": "https://avatars.githubusercontent.com/u/353709?v=4", "gravatar_id": "", "url": "https://api.github.com/users/TheFox", "html_url": "https://github.com/TheFox", "followers_url": "https://api.github.com/users/TheFox/followers", "following_url": "https://api.github.com/users/TheFox/following{/other_user}", "gists_url": "https://api.github.com/users/TheFox/gists{/gist_id}", "starred_url": "https://api.github.com/users/TheFox/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/TheFox/subscriptions", "organizations_url": "https://api.github.com/users/TheFox/orgs", "repos_url": "https://api.github.com/users/TheFox/repos", "events_url": "https://api.github.com/users/TheFox/events{/privacy}", "received_events_url": "https://api.github.com/users/TheFox/received_events", "type": "User", "site_admin": false }, { "login": "farhang", "id": 363150, "node_id": "MDQ6VXNlcjM2MzE1MA==", "avatar_url": "https://avatars.githubusercontent.com/u/363150?v=4", "gravatar_id": "", "url": "https://api.github.com/users/farhang", "html_url": "https://github.com/farhang", "followers_url": "https://api.github.com/users/farhang/followers", "following_url": "https://api.github.com/users/farhang/following{/other_user}", "gists_url": "https://api.github.com/users/farhang/gists{/gist_id}", "starred_url": "https://api.github.com/users/farhang/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/farhang/subscriptions", "organizations_url": "https://api.github.com/users/farhang/orgs", "repos_url": "https://api.github.com/users/farhang/repos", "events_url": "https://api.github.com/users/farhang/events{/privacy}", "received_events_url": "https://api.github.com/users/farhang/received_events", "type": "User", "site_admin": false }, { "login": "jiqihuman", "id": 370387, "node_id": "MDQ6VXNlcjM3MDM4Nw==", "avatar_url": "https://avatars.githubusercontent.com/u/370387?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jiqihuman", "html_url": "https://github.com/jiqihuman", "followers_url": "https://api.github.com/users/jiqihuman/followers", "following_url": "https://api.github.com/users/jiqihuman/following{/other_user}", "gists_url": "https://api.github.com/users/jiqihuman/gists{/gist_id}", "starred_url": "https://api.github.com/users/jiqihuman/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/jiqihuman/subscriptions", "organizations_url": "https://api.github.com/users/jiqihuman/orgs", "repos_url": "https://api.github.com/users/jiqihuman/repos", "events_url": "https://api.github.com/users/jiqihuman/events{/privacy}", "received_events_url": "https://api.github.com/users/jiqihuman/received_events", "type": "User", "site_admin": false }, { "login": "chrislatimer1", "id": 371310, "node_id": "MDQ6VXNlcjM3MTMxMA==", "avatar_url": "https://avatars.githubusercontent.com/u/371310?v=4", "gravatar_id": "", "url": "https://api.github.com/users/chrislatimer1", "html_url": "https://github.com/chrislatimer1", "followers_url": "https://api.github.com/users/chrislatimer1/followers", "following_url": "https://api.github.com/users/chrislatimer1/following{/other_user}", "gists_url": "https://api.github.com/users/chrislatimer1/gists{/gist_id}", "starred_url": "https://api.github.com/users/chrislatimer1/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/chrislatimer1/subscriptions", "organizations_url": "https://api.github.com/users/chrislatimer1/orgs", "repos_url": "https://api.github.com/users/chrislatimer1/repos", "events_url": "https://api.github.com/users/chrislatimer1/events{/privacy}", "received_events_url": "https://api.github.com/users/chrislatimer1/received_events", "type": "User", "site_admin": false }, { "login": "chrisbelyea", "id": 387922, "node_id": "MDQ6VXNlcjM4NzkyMg==", "avatar_url": "https://avatars.githubusercontent.com/u/387922?v=4", "gravatar_id": "", "url": "https://api.github.com/users/chrisbelyea", "html_url": "https://github.com/chrisbelyea", "followers_url": "https://api.github.com/users/chrisbelyea/followers", "following_url": "https://api.github.com/users/chrisbelyea/following{/other_user}", "gists_url": "https://api.github.com/users/chrisbelyea/gists{/gist_id}", "starred_url": "https://api.github.com/users/chrisbelyea/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/chrisbelyea/subscriptions", "organizations_url": "https://api.github.com/users/chrisbelyea/orgs", "repos_url": "https://api.github.com/users/chrisbelyea/repos", "events_url": "https://api.github.com/users/chrisbelyea/events{/privacy}", "received_events_url": "https://api.github.com/users/chrisbelyea/received_events", "type": "User", "site_admin": false }, { "login": "josuesasilva", "id": 390852, "node_id": "MDQ6VXNlcjM5MDg1Mg==", "avatar_url": "https://avatars.githubusercontent.com/u/390852?v=4", "gravatar_id": "", "url": "https://api.github.com/users/josuesasilva", "html_url": "https://github.com/josuesasilva", "followers_url": "https://api.github.com/users/josuesasilva/followers", "following_url": "https://api.github.com/users/josuesasilva/following{/other_user}", "gists_url": "https://api.github.com/users/josuesasilva/gists{/gist_id}", "starred_url": "https://api.github.com/users/josuesasilva/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/josuesasilva/subscriptions", "organizations_url": "https://api.github.com/users/josuesasilva/orgs", "repos_url": "https://api.github.com/users/josuesasilva/repos", "events_url": "https://api.github.com/users/josuesasilva/events{/privacy}", "received_events_url": "https://api.github.com/users/josuesasilva/received_events", "type": "User", "site_admin": false }, { "login": "BedlamB", "id": 392331, "node_id": "MDQ6VXNlcjM5MjMzMQ==", "avatar_url": "https://avatars.githubusercontent.com/u/392331?v=4", "gravatar_id": "", "url": "https://api.github.com/users/BedlamB", "html_url": "https://github.com/BedlamB", "followers_url": "https://api.github.com/users/BedlamB/followers", "following_url": "https://api.github.com/users/BedlamB/following{/other_user}", "gists_url": "https://api.github.com/users/BedlamB/gists{/gist_id}", "starred_url": "https://api.github.com/users/BedlamB/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/BedlamB/subscriptions", "organizations_url": "https://api.github.com/users/BedlamB/orgs", "repos_url": "https://api.github.com/users/BedlamB/repos", "events_url": "https://api.github.com/users/BedlamB/events{/privacy}", "received_events_url": "https://api.github.com/users/BedlamB/received_events", "type": "User", "site_admin": false }, { "login": "NeutralAngel", "id": 396876, "node_id": "MDQ6VXNlcjM5Njg3Ng==", "avatar_url": "https://avatars.githubusercontent.com/u/396876?v=4", "gravatar_id": "", "url": "https://api.github.com/users/NeutralAngel", "html_url": "https://github.com/NeutralAngel", "followers_url": "https://api.github.com/users/NeutralAngel/followers", "following_url": "https://api.github.com/users/NeutralAngel/following{/other_user}", "gists_url": "https://api.github.com/users/NeutralAngel/gists{/gist_id}", "starred_url": "https://api.github.com/users/NeutralAngel/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/NeutralAngel/subscriptions", "organizations_url": "https://api.github.com/users/NeutralAngel/orgs", "repos_url": "https://api.github.com/users/NeutralAngel/repos", "events_url": "https://api.github.com/users/NeutralAngel/events{/privacy}", "received_events_url": "https://api.github.com/users/NeutralAngel/received_events", "type": "User", "site_admin": false }, { "login": "laschweinski", "id": 399687, "node_id": "MDQ6VXNlcjM5OTY4Nw==", "avatar_url": "https://avatars.githubusercontent.com/u/399687?v=4", "gravatar_id": "", "url": "https://api.github.com/users/laschweinski", "html_url": "https://github.com/laschweinski", "followers_url": "https://api.github.com/users/laschweinski/followers", "following_url": "https://api.github.com/users/laschweinski/following{/other_user}", "gists_url": "https://api.github.com/users/laschweinski/gists{/gist_id}", "starred_url": "https://api.github.com/users/laschweinski/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/laschweinski/subscriptions", "organizations_url": "https://api.github.com/users/laschweinski/orgs", "repos_url": "https://api.github.com/users/laschweinski/repos", "events_url": "https://api.github.com/users/laschweinski/events{/privacy}", "received_events_url": "https://api.github.com/users/laschweinski/received_events", "type": "User", "site_admin": false }, { "login": "yhippa", "id": 420309, "node_id": "MDQ6VXNlcjQyMDMwOQ==", "avatar_url": "https://avatars.githubusercontent.com/u/420309?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yhippa", "html_url": "https://github.com/yhippa", "followers_url": "https://api.github.com/users/yhippa/followers", "following_url": "https://api.github.com/users/yhippa/following{/other_user}", "gists_url": "https://api.github.com/users/yhippa/gists{/gist_id}", "starred_url": "https://api.github.com/users/yhippa/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yhippa/subscriptions", "organizations_url": "https://api.github.com/users/yhippa/orgs", "repos_url": "https://api.github.com/users/yhippa/repos", "events_url": "https://api.github.com/users/yhippa/events{/privacy}", "received_events_url": "https://api.github.com/users/yhippa/received_events", "type": "User", "site_admin": false }, { "login": "korrawit", "id": 459124, "node_id": "MDQ6VXNlcjQ1OTEyNA==", "avatar_url": "https://avatars.githubusercontent.com/u/459124?v=4", "gravatar_id": "", "url": "https://api.github.com/users/korrawit", "html_url": "https://github.com/korrawit", "followers_url": "https://api.github.com/users/korrawit/followers", "following_url": "https://api.github.com/users/korrawit/following{/other_user}", "gists_url": "https://api.github.com/users/korrawit/gists{/gist_id}", "starred_url": "https://api.github.com/users/korrawit/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/korrawit/subscriptions", "organizations_url": "https://api.github.com/users/korrawit/orgs", "repos_url": "https://api.github.com/users/korrawit/repos", "events_url": "https://api.github.com/users/korrawit/events{/privacy}", "received_events_url": "https://api.github.com/users/korrawit/received_events", "type": "User", "site_admin": false }, { "login": "clwang", "id": 459714, "node_id": "MDQ6VXNlcjQ1OTcxNA==", "avatar_url": "https://avatars.githubusercontent.com/u/459714?v=4", "gravatar_id": "", "url": "https://api.github.com/users/clwang", "html_url": "https://github.com/clwang", "followers_url": "https://api.github.com/users/clwang/followers", "following_url": "https://api.github.com/users/clwang/following{/other_user}", "gists_url": "https://api.github.com/users/clwang/gists{/gist_id}", "starred_url": "https://api.github.com/users/clwang/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/clwang/subscriptions", "organizations_url": "https://api.github.com/users/clwang/orgs", "repos_url": "https://api.github.com/users/clwang/repos", "events_url": "https://api.github.com/users/clwang/events{/privacy}", "received_events_url": "https://api.github.com/users/clwang/received_events", "type": "User", "site_admin": false }, { "login": "claytonbench", "id": 468061, "node_id": "MDQ6VXNlcjQ2ODA2MQ==", "avatar_url": "https://avatars.githubusercontent.com/u/468061?v=4", "gravatar_id": "", "url": "https://api.github.com/users/claytonbench", "html_url": "https://github.com/claytonbench", "followers_url": "https://api.github.com/users/claytonbench/followers", "following_url": "https://api.github.com/users/claytonbench/following{/other_user}", "gists_url": "https://api.github.com/users/claytonbench/gists{/gist_id}", "starred_url": "https://api.github.com/users/claytonbench/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/claytonbench/subscriptions", "organizations_url": "https://api.github.com/users/claytonbench/orgs", "repos_url": "https://api.github.com/users/claytonbench/repos", "events_url": "https://api.github.com/users/claytonbench/events{/privacy}", "received_events_url": "https://api.github.com/users/claytonbench/received_events", "type": "User", "site_admin": false }, { "login": "inspiration", "id": 475262, "node_id": "MDQ6VXNlcjQ3NTI2Mg==", "avatar_url": "https://avatars.githubusercontent.com/u/475262?v=4", "gravatar_id": "", "url": "https://api.github.com/users/inspiration", "html_url": "https://github.com/inspiration", "followers_url": "https://api.github.com/users/inspiration/followers", "following_url": "https://api.github.com/users/inspiration/following{/other_user}", "gists_url": "https://api.github.com/users/inspiration/gists{/gist_id}", "starred_url": "https://api.github.com/users/inspiration/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/inspiration/subscriptions", "organizations_url": "https://api.github.com/users/inspiration/orgs", "repos_url": "https://api.github.com/users/inspiration/repos", "events_url": "https://api.github.com/users/inspiration/events{/privacy}", "received_events_url": "https://api.github.com/users/inspiration/received_events", "type": "User", "site_admin": false }, { "login": "rotaris", "id": 476871, "node_id": "MDQ6VXNlcjQ3Njg3MQ==", "avatar_url": "https://avatars.githubusercontent.com/u/476871?v=4", "gravatar_id": "", "url": "https://api.github.com/users/rotaris", "html_url": "https://github.com/rotaris", "followers_url": "https://api.github.com/users/rotaris/followers", "following_url": "https://api.github.com/users/rotaris/following{/other_user}", "gists_url": "https://api.github.com/users/rotaris/gists{/gist_id}", "starred_url": "https://api.github.com/users/rotaris/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/rotaris/subscriptions", "organizations_url": "https://api.github.com/users/rotaris/orgs", "repos_url": "https://api.github.com/users/rotaris/repos", "events_url": "https://api.github.com/users/rotaris/events{/privacy}", "received_events_url": "https://api.github.com/users/rotaris/received_events", "type": "User", "site_admin": false }, { "login": "henkisdabro", "id": 477513, "node_id": "MDQ6VXNlcjQ3NzUxMw==", "avatar_url": "https://avatars.githubusercontent.com/u/477513?v=4", "gravatar_id": "", "url": "https://api.github.com/users/henkisdabro", "html_url": "https://github.com/henkisdabro", "followers_url": "https://api.github.com/users/henkisdabro/followers", "following_url": "https://api.github.com/users/henkisdabro/following{/other_user}", "gists_url": "https://api.github.com/users/henkisdabro/gists{/gist_id}", "starred_url": "https://api.github.com/users/henkisdabro/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/henkisdabro/subscriptions", "organizations_url": "https://api.github.com/users/henkisdabro/orgs", "repos_url": "https://api.github.com/users/henkisdabro/repos", "events_url": "https://api.github.com/users/henkisdabro/events{/privacy}", "received_events_url": "https://api.github.com/users/henkisdabro/received_events", "type": "User", "site_admin": false }, { "login": "e2kaneko", "id": 480139, "node_id": "MDQ6VXNlcjQ4MDEzOQ==", "avatar_url": "https://avatars.githubusercontent.com/u/480139?v=4", "gravatar_id": "", "url": "https://api.github.com/users/e2kaneko", "html_url": "https://github.com/e2kaneko", "followers_url": "https://api.github.com/users/e2kaneko/followers", "following_url": "https://api.github.com/users/e2kaneko/following{/other_user}", "gists_url": "https://api.github.com/users/e2kaneko/gists{/gist_id}", "starred_url": "https://api.github.com/users/e2kaneko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/e2kaneko/subscriptions", "organizations_url": "https://api.github.com/users/e2kaneko/orgs", "repos_url": "https://api.github.com/users/e2kaneko/repos", "events_url": "https://api.github.com/users/e2kaneko/events{/privacy}", "received_events_url": "https://api.github.com/users/e2kaneko/received_events", "type": "User", "site_admin": false }, { "login": "joshp1", "id": 481110, "node_id": "MDQ6VXNlcjQ4MTExMA==", "avatar_url": "https://avatars.githubusercontent.com/u/481110?v=4", "gravatar_id": "", "url": "https://api.github.com/users/joshp1", "html_url": "https://github.com/joshp1", "followers_url": "https://api.github.com/users/joshp1/followers", "following_url": "https://api.github.com/users/joshp1/following{/other_user}", "gists_url": "https://api.github.com/users/joshp1/gists{/gist_id}", "starred_url": "https://api.github.com/users/joshp1/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/joshp1/subscriptions", "organizations_url": "https://api.github.com/users/joshp1/orgs", "repos_url": "https://api.github.com/users/joshp1/repos", "events_url": "https://api.github.com/users/joshp1/events{/privacy}", "received_events_url": "https://api.github.com/users/joshp1/received_events", "type": "User", "site_admin": false }, { "login": "mqmtech", "id": 487274, "node_id": "MDQ6VXNlcjQ4NzI3NA==", "avatar_url": "https://avatars.githubusercontent.com/u/487274?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mqmtech", "html_url": "https://github.com/mqmtech", "followers_url": "https://api.github.com/users/mqmtech/followers", "following_url": "https://api.github.com/users/mqmtech/following{/other_user}", "gists_url": "https://api.github.com/users/mqmtech/gists{/gist_id}", "starred_url": "https://api.github.com/users/mqmtech/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mqmtech/subscriptions", "organizations_url": "https://api.github.com/users/mqmtech/orgs", "repos_url": "https://api.github.com/users/mqmtech/repos", "events_url": "https://api.github.com/users/mqmtech/events{/privacy}", "received_events_url": "https://api.github.com/users/mqmtech/received_events", "type": "User", "site_admin": false }, { "login": "zankyr", "id": 503447, "node_id": "MDQ6VXNlcjUwMzQ0Nw==", "avatar_url": "https://avatars.githubusercontent.com/u/503447?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zankyr", "html_url": "https://github.com/zankyr", "followers_url": "https://api.github.com/users/zankyr/followers", "following_url": "https://api.github.com/users/zankyr/following{/other_user}", "gists_url": "https://api.github.com/users/zankyr/gists{/gist_id}", "starred_url": "https://api.github.com/users/zankyr/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/zankyr/subscriptions", "organizations_url": "https://api.github.com/users/zankyr/orgs", "repos_url": "https://api.github.com/users/zankyr/repos", "events_url": "https://api.github.com/users/zankyr/events{/privacy}", "received_events_url": "https://api.github.com/users/zankyr/received_events", "type": "User", "site_admin": false }, { "login": "rnowotniak", "id": 503834, "node_id": "MDQ6VXNlcjUwMzgzNA==", "avatar_url": "https://avatars.githubusercontent.com/u/503834?v=4", "gravatar_id": "", "url": "https://api.github.com/users/rnowotniak", "html_url": "https://github.com/rnowotniak", "followers_url": "https://api.github.com/users/rnowotniak/followers", "following_url": "https://api.github.com/users/rnowotniak/following{/other_user}", "gists_url": "https://api.github.com/users/rnowotniak/gists{/gist_id}", "starred_url": "https://api.github.com/users/rnowotniak/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/rnowotniak/subscriptions", "organizations_url": "https://api.github.com/users/rnowotniak/orgs", "repos_url": "https://api.github.com/users/rnowotniak/repos", "events_url": "https://api.github.com/users/rnowotniak/events{/privacy}", "received_events_url": "https://api.github.com/users/rnowotniak/received_events", "type": "User", "site_admin": false }, { "login": "hpointu", "id": 503906, "node_id": "MDQ6VXNlcjUwMzkwNg==", "avatar_url": "https://avatars.githubusercontent.com/u/503906?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hpointu", "html_url": "https://github.com/hpointu", "followers_url": "https://api.github.com/users/hpointu/followers", "following_url": "https://api.github.com/users/hpointu/following{/other_user}", "gists_url": "https://api.github.com/users/hpointu/gists{/gist_id}", "starred_url": "https://api.github.com/users/hpointu/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hpointu/subscriptions", "organizations_url": "https://api.github.com/users/hpointu/orgs", "repos_url": "https://api.github.com/users/hpointu/repos", "events_url": "https://api.github.com/users/hpointu/events{/privacy}", "received_events_url": "https://api.github.com/users/hpointu/received_events", "type": "User", "site_admin": false }, { "login": "BourneID", "id": 517431, "node_id": "MDQ6VXNlcjUxNzQzMQ==", "avatar_url": "https://avatars.githubusercontent.com/u/517431?v=4", "gravatar_id": "", "url": "https://api.github.com/users/BourneID", "html_url": "https://github.com/BourneID", "followers_url": "https://api.github.com/users/BourneID/followers", "following_url": "https://api.github.com/users/BourneID/following{/other_user}", "gists_url": "https://api.github.com/users/BourneID/gists{/gist_id}", "starred_url": "https://api.github.com/users/BourneID/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/BourneID/subscriptions", "organizations_url": "https://api.github.com/users/BourneID/orgs", "repos_url": "https://api.github.com/users/BourneID/repos", "events_url": "https://api.github.com/users/BourneID/events{/privacy}", "received_events_url": "https://api.github.com/users/BourneID/received_events", "type": "User", "site_admin": false }, { "login": "am-cornelis", "id": 517959, "node_id": "MDQ6VXNlcjUxNzk1OQ==", "avatar_url": "https://avatars.githubusercontent.com/u/517959?v=4", "gravatar_id": "", "url": "https://api.github.com/users/am-cornelis", "html_url": "https://github.com/am-cornelis", "followers_url": "https://api.github.com/users/am-cornelis/followers", "following_url": "https://api.github.com/users/am-cornelis/following{/other_user}", "gists_url": "https://api.github.com/users/am-cornelis/gists{/gist_id}", "starred_url": "https://api.github.com/users/am-cornelis/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/am-cornelis/subscriptions", "organizations_url": "https://api.github.com/users/am-cornelis/orgs", "repos_url": "https://api.github.com/users/am-cornelis/repos", "events_url": "https://api.github.com/users/am-cornelis/events{/privacy}", "received_events_url": "https://api.github.com/users/am-cornelis/received_events", "type": "User", "site_admin": false }, { "login": "joelklee", "id": 520544, "node_id": "MDQ6VXNlcjUyMDU0NA==", "avatar_url": "https://avatars.githubusercontent.com/u/520544?v=4", "gravatar_id": "", "url": "https://api.github.com/users/joelklee", "html_url": "https://github.com/joelklee", "followers_url": "https://api.github.com/users/joelklee/followers", "following_url": "https://api.github.com/users/joelklee/following{/other_user}", "gists_url": "https://api.github.com/users/joelklee/gists{/gist_id}", "starred_url": "https://api.github.com/users/joelklee/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/joelklee/subscriptions", "organizations_url": "https://api.github.com/users/joelklee/orgs", "repos_url": "https://api.github.com/users/joelklee/repos", "events_url": "https://api.github.com/users/joelklee/events{/privacy}", "received_events_url": "https://api.github.com/users/joelklee/received_events", "type": "User", "site_admin": false }, { "login": "chnlkw", "id": 536313, "node_id": "MDQ6VXNlcjUzNjMxMw==", "avatar_url": "https://avatars.githubusercontent.com/u/536313?v=4", "gravatar_id": "", "url": "https://api.github.com/users/chnlkw", "html_url": "https://github.com/chnlkw", "followers_url": "https://api.github.com/users/chnlkw/followers", "following_url": "https://api.github.com/users/chnlkw/following{/other_user}", "gists_url": "https://api.github.com/users/chnlkw/gists{/gist_id}", "starred_url": "https://api.github.com/users/chnlkw/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/chnlkw/subscriptions", "organizations_url": "https://api.github.com/users/chnlkw/orgs", "repos_url": "https://api.github.com/users/chnlkw/repos", "events_url": "https://api.github.com/users/chnlkw/events{/privacy}", "received_events_url": "https://api.github.com/users/chnlkw/received_events", "type": "User", "site_admin": false }, { "login": "fuho", "id": 539452, "node_id": "MDQ6VXNlcjUzOTQ1Mg==", "avatar_url": "https://avatars.githubusercontent.com/u/539452?v=4", "gravatar_id": "", "url": "https://api.github.com/users/fuho", "html_url": "https://github.com/fuho", "followers_url": "https://api.github.com/users/fuho/followers", "following_url": "https://api.github.com/users/fuho/following{/other_user}", "gists_url": "https://api.github.com/users/fuho/gists{/gist_id}", "starred_url": "https://api.github.com/users/fuho/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/fuho/subscriptions", "organizations_url": "https://api.github.com/users/fuho/orgs", "repos_url": "https://api.github.com/users/fuho/repos", "events_url": "https://api.github.com/users/fuho/events{/privacy}", "received_events_url": "https://api.github.com/users/fuho/received_events", "type": "User", "site_admin": false }, { "login": "iamnilay3", "id": 546613, "node_id": "MDQ6VXNlcjU0NjYxMw==", "avatar_url": "https://avatars.githubusercontent.com/u/546613?v=4", "gravatar_id": "", "url": "https://api.github.com/users/iamnilay3", "html_url": "https://github.com/iamnilay3", "followers_url": "https://api.github.com/users/iamnilay3/followers", "following_url": "https://api.github.com/users/iamnilay3/following{/other_user}", "gists_url": "https://api.github.com/users/iamnilay3/gists{/gist_id}", "starred_url": "https://api.github.com/users/iamnilay3/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/iamnilay3/subscriptions", "organizations_url": "https://api.github.com/users/iamnilay3/orgs", "repos_url": "https://api.github.com/users/iamnilay3/repos", "events_url": "https://api.github.com/users/iamnilay3/events{/privacy}", "received_events_url": "https://api.github.com/users/iamnilay3/received_events", "type": "User", "site_admin": false }, { "login": "fcaraujo", "id": 553927, "node_id": "MDQ6VXNlcjU1MzkyNw==", "avatar_url": "https://avatars.githubusercontent.com/u/553927?v=4", "gravatar_id": "", "url": "https://api.github.com/users/fcaraujo", "html_url": "https://github.com/fcaraujo", "followers_url": "https://api.github.com/users/fcaraujo/followers", "following_url": "https://api.github.com/users/fcaraujo/following{/other_user}", "gists_url": "https://api.github.com/users/fcaraujo/gists{/gist_id}", "starred_url": "https://api.github.com/users/fcaraujo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/fcaraujo/subscriptions", "organizations_url": "https://api.github.com/users/fcaraujo/orgs", "repos_url": "https://api.github.com/users/fcaraujo/repos", "events_url": "https://api.github.com/users/fcaraujo/events{/privacy}", "received_events_url": "https://api.github.com/users/fcaraujo/received_events", "type": "User", "site_admin": false } ] """ let page_3 = """ [ { "login": "ryagas", "id": 553981, "node_id": "MDQ6VXNlcjU1Mzk4MQ==", "avatar_url": "https://avatars.githubusercontent.com/u/553981?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ryagas", "html_url": "https://github.com/ryagas", "followers_url": "https://api.github.com/users/ryagas/followers", "following_url": "https://api.github.com/users/ryagas/following{/other_user}", "gists_url": "https://api.github.com/users/ryagas/gists{/gist_id}", "starred_url": "https://api.github.com/users/ryagas/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ryagas/subscriptions", "organizations_url": "https://api.github.com/users/ryagas/orgs", "repos_url": "https://api.github.com/users/ryagas/repos", "events_url": "https://api.github.com/users/ryagas/events{/privacy}", "received_events_url": "https://api.github.com/users/ryagas/received_events", "type": "User", "site_admin": false }, { "login": "hydrogen2005", "id": 557010, "node_id": "MDQ6VXNlcjU1NzAxMA==", "avatar_url": "https://avatars.githubusercontent.com/u/557010?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hydrogen2005", "html_url": "https://github.com/hydrogen2005", "followers_url": "https://api.github.com/users/hydrogen2005/followers", "following_url": "https://api.github.com/users/hydrogen2005/following{/other_user}", "gists_url": "https://api.github.com/users/hydrogen2005/gists{/gist_id}", "starred_url": "https://api.github.com/users/hydrogen2005/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hydrogen2005/subscriptions", "organizations_url": "https://api.github.com/users/hydrogen2005/orgs", "repos_url": "https://api.github.com/users/hydrogen2005/repos", "events_url": "https://api.github.com/users/hydrogen2005/events{/privacy}", "received_events_url": "https://api.github.com/users/hydrogen2005/received_events", "type": "User", "site_admin": false }, { "login": "octocat", "id": 583231, "node_id": "MDQ6VXNlcjU4MzIzMQ==", "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4", "gravatar_id": "", "url": "https://api.github.com/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://api.github.com/users/octocat/followers", "following_url": "https://api.github.com/users/octocat/following{/other_user}", "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", "organizations_url": "https://api.github.com/users/octocat/orgs", "repos_url": "https://api.github.com/users/octocat/repos", "events_url": "https://api.github.com/users/octocat/events{/privacy}", "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "site_admin": false }, { "login": "lukemcnally84", "id": 583444, "node_id": "MDQ6VXNlcjU4MzQ0NA==", "avatar_url": "https://avatars.githubusercontent.com/u/583444?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lukemcnally84", "html_url": "https://github.com/lukemcnally84", "followers_url": "https://api.github.com/users/lukemcnally84/followers", "following_url": "https://api.github.com/users/lukemcnally84/following{/other_user}", "gists_url": "https://api.github.com/users/lukemcnally84/gists{/gist_id}", "starred_url": "https://api.github.com/users/lukemcnally84/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lukemcnally84/subscriptions", "organizations_url": "https://api.github.com/users/lukemcnally84/orgs", "repos_url": "https://api.github.com/users/lukemcnally84/repos", "events_url": "https://api.github.com/users/lukemcnally84/events{/privacy}", "received_events_url": "https://api.github.com/users/lukemcnally84/received_events", "type": "User", "site_admin": false }, { "login": "abhimit04", "id": 586662, "node_id": "MDQ6VXNlcjU4NjY2Mg==", "avatar_url": "https://avatars.githubusercontent.com/u/586662?v=4", "gravatar_id": "", "url": "https://api.github.com/users/abhimit04", "html_url": "https://github.com/abhimit04", "followers_url": "https://api.github.com/users/abhimit04/followers", "following_url": "https://api.github.com/users/abhimit04/following{/other_user}", "gists_url": "https://api.github.com/users/abhimit04/gists{/gist_id}", "starred_url": "https://api.github.com/users/abhimit04/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/abhimit04/subscriptions", "organizations_url": "https://api.github.com/users/abhimit04/orgs", "repos_url": "https://api.github.com/users/abhimit04/repos", "events_url": "https://api.github.com/users/abhimit04/events{/privacy}", "received_events_url": "https://api.github.com/users/abhimit04/received_events", "type": "User", "site_admin": false }, { "login": "warashina", "id": 598031, "node_id": "MDQ6VXNlcjU5ODAzMQ==", "avatar_url": "https://avatars.githubusercontent.com/u/598031?v=4", "gravatar_id": "", "url": "https://api.github.com/users/warashina", "html_url": "https://github.com/warashina", "followers_url": "https://api.github.com/users/warashina/followers", "following_url": "https://api.github.com/users/warashina/following{/other_user}", "gists_url": "https://api.github.com/users/warashina/gists{/gist_id}", "starred_url": "https://api.github.com/users/warashina/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/warashina/subscriptions", "organizations_url": "https://api.github.com/users/warashina/orgs", "repos_url": "https://api.github.com/users/warashina/repos", "events_url": "https://api.github.com/users/warashina/events{/privacy}", "received_events_url": "https://api.github.com/users/warashina/received_events", "type": "User", "site_admin": false }, { "login": "marcinant", "id": 604561, "node_id": "MDQ6VXNlcjYwNDU2MQ==", "avatar_url": "https://avatars.githubusercontent.com/u/604561?v=4", "gravatar_id": "", "url": "https://api.github.com/users/marcinant", "html_url": "https://github.com/marcinant", "followers_url": "https://api.github.com/users/marcinant/followers", "following_url": "https://api.github.com/users/marcinant/following{/other_user}", "gists_url": "https://api.github.com/users/marcinant/gists{/gist_id}", "starred_url": "https://api.github.com/users/marcinant/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/marcinant/subscriptions", "organizations_url": "https://api.github.com/users/marcinant/orgs", "repos_url": "https://api.github.com/users/marcinant/repos", "events_url": "https://api.github.com/users/marcinant/events{/privacy}", "received_events_url": "https://api.github.com/users/marcinant/received_events", "type": "User", "site_admin": false }, { "login": "flavionbc", "id": 605209, "node_id": "MDQ6VXNlcjYwNTIwOQ==", "avatar_url": "https://avatars.githubusercontent.com/u/605209?v=4", "gravatar_id": "", "url": "https://api.github.com/users/flavionbc", "html_url": "https://github.com/flavionbc", "followers_url": "https://api.github.com/users/flavionbc/followers", "following_url": "https://api.github.com/users/flavionbc/following{/other_user}", "gists_url": "https://api.github.com/users/flavionbc/gists{/gist_id}", "starred_url": "https://api.github.com/users/flavionbc/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/flavionbc/subscriptions", "organizations_url": "https://api.github.com/users/flavionbc/orgs", "repos_url": "https://api.github.com/users/flavionbc/repos", "events_url": "https://api.github.com/users/flavionbc/events{/privacy}", "received_events_url": "https://api.github.com/users/flavionbc/received_events", "type": "User", "site_admin": false }, { "login": "juhaelee", "id": 606411, "node_id": "MDQ6VXNlcjYwNjQxMQ==", "avatar_url": "https://avatars.githubusercontent.com/u/606411?v=4", "gravatar_id": "", "url": "https://api.github.com/users/juhaelee", "html_url": "https://github.com/juhaelee", "followers_url": "https://api.github.com/users/juhaelee/followers", "following_url": "https://api.github.com/users/juhaelee/following{/other_user}", "gists_url": "https://api.github.com/users/juhaelee/gists{/gist_id}", "starred_url": "https://api.github.com/users/juhaelee/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/juhaelee/subscriptions", "organizations_url": "https://api.github.com/users/juhaelee/orgs", "repos_url": "https://api.github.com/users/juhaelee/repos", "events_url": "https://api.github.com/users/juhaelee/events{/privacy}", "received_events_url": "https://api.github.com/users/juhaelee/received_events", "type": "User", "site_admin": false }, { "login": "mschoepf", "id": 608531, "node_id": "MDQ6VXNlcjYwODUzMQ==", "avatar_url": "https://avatars.githubusercontent.com/u/608531?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mschoepf", "html_url": "https://github.com/mschoepf", "followers_url": "https://api.github.com/users/mschoepf/followers", "following_url": "https://api.github.com/users/mschoepf/following{/other_user}", "gists_url": "https://api.github.com/users/mschoepf/gists{/gist_id}", "starred_url": "https://api.github.com/users/mschoepf/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mschoepf/subscriptions", "organizations_url": "https://api.github.com/users/mschoepf/orgs", "repos_url": "https://api.github.com/users/mschoepf/repos", "events_url": "https://api.github.com/users/mschoepf/events{/privacy}", "received_events_url": "https://api.github.com/users/mschoepf/received_events", "type": "User", "site_admin": false }, { "login": "olamedia", "id": 611624, "node_id": "MDQ6VXNlcjYxMTYyNA==", "avatar_url": "https://avatars.githubusercontent.com/u/611624?v=4", "gravatar_id": "", "url": "https://api.github.com/users/olamedia", "html_url": "https://github.com/olamedia", "followers_url": "https://api.github.com/users/olamedia/followers", "following_url": "https://api.github.com/users/olamedia/following{/other_user}", "gists_url": "https://api.github.com/users/olamedia/gists{/gist_id}", "starred_url": "https://api.github.com/users/olamedia/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/olamedia/subscriptions", "organizations_url": "https://api.github.com/users/olamedia/orgs", "repos_url": "https://api.github.com/users/olamedia/repos", "events_url": "https://api.github.com/users/olamedia/events{/privacy}", "received_events_url": "https://api.github.com/users/olamedia/received_events", "type": "User", "site_admin": false }, { "login": "riichard", "id": 616976, "node_id": "MDQ6VXNlcjYxNjk3Ng==", "avatar_url": "https://avatars.githubusercontent.com/u/616976?v=4", "gravatar_id": "", "url": "https://api.github.com/users/riichard", "html_url": "https://github.com/riichard", "followers_url": "https://api.github.com/users/riichard/followers", "following_url": "https://api.github.com/users/riichard/following{/other_user}", "gists_url": "https://api.github.com/users/riichard/gists{/gist_id}", "starred_url": "https://api.github.com/users/riichard/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/riichard/subscriptions", "organizations_url": "https://api.github.com/users/riichard/orgs", "repos_url": "https://api.github.com/users/riichard/repos", "events_url": "https://api.github.com/users/riichard/events{/privacy}", "received_events_url": "https://api.github.com/users/riichard/received_events", "type": "User", "site_admin": false }, { "login": "kangmin", "id": 621626, "node_id": "MDQ6VXNlcjYyMTYyNg==", "avatar_url": "https://avatars.githubusercontent.com/u/621626?v=4", "gravatar_id": "", "url": "https://api.github.com/users/kangmin", "html_url": "https://github.com/kangmin", "followers_url": "https://api.github.com/users/kangmin/followers", "following_url": "https://api.github.com/users/kangmin/following{/other_user}", "gists_url": "https://api.github.com/users/kangmin/gists{/gist_id}", "starred_url": "https://api.github.com/users/kangmin/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kangmin/subscriptions", "organizations_url": "https://api.github.com/users/kangmin/orgs", "repos_url": "https://api.github.com/users/kangmin/repos", "events_url": "https://api.github.com/users/kangmin/events{/privacy}", "received_events_url": "https://api.github.com/users/kangmin/received_events", "type": "User", "site_admin": false }, { "login": "moebious", "id": 624602, "node_id": "MDQ6VXNlcjYyNDYwMg==", "avatar_url": "https://avatars.githubusercontent.com/u/624602?v=4", "gravatar_id": "", "url": "https://api.github.com/users/moebious", "html_url": "https://github.com/moebious", "followers_url": "https://api.github.com/users/moebious/followers", "following_url": "https://api.github.com/users/moebious/following{/other_user}", "gists_url": "https://api.github.com/users/moebious/gists{/gist_id}", "starred_url": "https://api.github.com/users/moebious/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/moebious/subscriptions", "organizations_url": "https://api.github.com/users/moebious/orgs", "repos_url": "https://api.github.com/users/moebious/repos", "events_url": "https://api.github.com/users/moebious/events{/privacy}", "received_events_url": "https://api.github.com/users/moebious/received_events", "type": "User", "site_admin": false }, { "login": "siva001", "id": 627895, "node_id": "MDQ6VXNlcjYyNzg5NQ==", "avatar_url": "https://avatars.githubusercontent.com/u/627895?v=4", "gravatar_id": "", "url": "https://api.github.com/users/siva001", "html_url": "https://github.com/siva001", "followers_url": "https://api.github.com/users/siva001/followers", "following_url": "https://api.github.com/users/siva001/following{/other_user}", "gists_url": "https://api.github.com/users/siva001/gists{/gist_id}", "starred_url": "https://api.github.com/users/siva001/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/siva001/subscriptions", "organizations_url": "https://api.github.com/users/siva001/orgs", "repos_url": "https://api.github.com/users/siva001/repos", "events_url": "https://api.github.com/users/siva001/events{/privacy}", "received_events_url": "https://api.github.com/users/siva001/received_events", "type": "User", "site_admin": false }, { "login": "MaxNanasy", "id": 628032, "node_id": "MDQ6VXNlcjYyODAzMg==", "avatar_url": "https://avatars.githubusercontent.com/u/628032?v=4", "gravatar_id": "", "url": "https://api.github.com/users/MaxNanasy", "html_url": "https://github.com/MaxNanasy", "followers_url": "https://api.github.com/users/MaxNanasy/followers", "following_url": "https://api.github.com/users/MaxNanasy/following{/other_user}", "gists_url": "https://api.github.com/users/MaxNanasy/gists{/gist_id}", "starred_url": "https://api.github.com/users/MaxNanasy/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/MaxNanasy/subscriptions", "organizations_url": "https://api.github.com/users/MaxNanasy/orgs", "repos_url": "https://api.github.com/users/MaxNanasy/repos", "events_url": "https://api.github.com/users/MaxNanasy/events{/privacy}", "received_events_url": "https://api.github.com/users/MaxNanasy/received_events", "type": "User", "site_admin": false }, { "login": "borsi", "id": 632613, "node_id": "MDQ6VXNlcjYzMjYxMw==", "avatar_url": "https://avatars.githubusercontent.com/u/632613?v=4", "gravatar_id": "", "url": "https://api.github.com/users/borsi", "html_url": "https://github.com/borsi", "followers_url": "https://api.github.com/users/borsi/followers", "following_url": "https://api.github.com/users/borsi/following{/other_user}", "gists_url": "https://api.github.com/users/borsi/gists{/gist_id}", "starred_url": "https://api.github.com/users/borsi/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/borsi/subscriptions", "organizations_url": "https://api.github.com/users/borsi/orgs", "repos_url": "https://api.github.com/users/borsi/repos", "events_url": "https://api.github.com/users/borsi/events{/privacy}", "received_events_url": "https://api.github.com/users/borsi/received_events", "type": "User", "site_admin": false }, { "login": "youwannaknow", "id": 646452, "node_id": "MDQ6VXNlcjY0NjQ1Mg==", "avatar_url": "https://avatars.githubusercontent.com/u/646452?v=4", "gravatar_id": "", "url": "https://api.github.com/users/youwannaknow", "html_url": "https://github.com/youwannaknow", "followers_url": "https://api.github.com/users/youwannaknow/followers", "following_url": "https://api.github.com/users/youwannaknow/following{/other_user}", "gists_url": "https://api.github.com/users/youwannaknow/gists{/gist_id}", "starred_url": "https://api.github.com/users/youwannaknow/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/youwannaknow/subscriptions", "organizations_url": "https://api.github.com/users/youwannaknow/orgs", "repos_url": "https://api.github.com/users/youwannaknow/repos", "events_url": "https://api.github.com/users/youwannaknow/events{/privacy}", "received_events_url": "https://api.github.com/users/youwannaknow/received_events", "type": "User", "site_admin": false }, { "login": "fukuball", "id": 646843, "node_id": "MDQ6VXNlcjY0Njg0Mw==", "avatar_url": "https://avatars.githubusercontent.com/u/646843?v=4", "gravatar_id": "", "url": "https://api.github.com/users/fukuball", "html_url": "https://github.com/fukuball", "followers_url": "https://api.github.com/users/fukuball/followers", "following_url": "https://api.github.com/users/fukuball/following{/other_user}", "gists_url": "https://api.github.com/users/fukuball/gists{/gist_id}", "starred_url": "https://api.github.com/users/fukuball/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/fukuball/subscriptions", "organizations_url": "https://api.github.com/users/fukuball/orgs", "repos_url": "https://api.github.com/users/fukuball/repos", "events_url": "https://api.github.com/users/fukuball/events{/privacy}", "received_events_url": "https://api.github.com/users/fukuball/received_events", "type": "User", "site_admin": false }, { "login": "sai-manoj-kumar", "id": 647333, "node_id": "MDQ6VXNlcjY0NzMzMw==", "avatar_url": "https://avatars.githubusercontent.com/u/647333?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sai-manoj-kumar", "html_url": "https://github.com/sai-manoj-kumar", "followers_url": "https://api.github.com/users/sai-manoj-kumar/followers", "following_url": "https://api.github.com/users/sai-manoj-kumar/following{/other_user}", "gists_url": "https://api.github.com/users/sai-manoj-kumar/gists{/gist_id}", "starred_url": "https://api.github.com/users/sai-manoj-kumar/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sai-manoj-kumar/subscriptions", "organizations_url": "https://api.github.com/users/sai-manoj-kumar/orgs", "repos_url": "https://api.github.com/users/sai-manoj-kumar/repos", "events_url": "https://api.github.com/users/sai-manoj-kumar/events{/privacy}", "received_events_url": "https://api.github.com/users/sai-manoj-kumar/received_events", "type": "User", "site_admin": false }, { "login": "CarsonGallo", "id": 648783, "node_id": "MDQ6VXNlcjY0ODc4Mw==", "avatar_url": "https://avatars.githubusercontent.com/u/648783?v=4", "gravatar_id": "", "url": "https://api.github.com/users/CarsonGallo", "html_url": "https://github.com/CarsonGallo", "followers_url": "https://api.github.com/users/CarsonGallo/followers", "following_url": "https://api.github.com/users/CarsonGallo/following{/other_user}", "gists_url": "https://api.github.com/users/CarsonGallo/gists{/gist_id}", "starred_url": "https://api.github.com/users/CarsonGallo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/CarsonGallo/subscriptions", "organizations_url": "https://api.github.com/users/CarsonGallo/orgs", "repos_url": "https://api.github.com/users/CarsonGallo/repos", "events_url": "https://api.github.com/users/CarsonGallo/events{/privacy}", "received_events_url": "https://api.github.com/users/CarsonGallo/received_events", "type": "User", "site_admin": false }, { "login": "kwalker1977", "id": 651216, "node_id": "MDQ6VXNlcjY1MTIxNg==", "avatar_url": "https://avatars.githubusercontent.com/u/651216?v=4", "gravatar_id": "", "url": "https://api.github.com/users/kwalker1977", "html_url": "https://github.com/kwalker1977", "followers_url": "https://api.github.com/users/kwalker1977/followers", "following_url": "https://api.github.com/users/kwalker1977/following{/other_user}", "gists_url": "https://api.github.com/users/kwalker1977/gists{/gist_id}", "starred_url": "https://api.github.com/users/kwalker1977/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kwalker1977/subscriptions", "organizations_url": "https://api.github.com/users/kwalker1977/orgs", "repos_url": "https://api.github.com/users/kwalker1977/repos", "events_url": "https://api.github.com/users/kwalker1977/events{/privacy}", "received_events_url": "https://api.github.com/users/kwalker1977/received_events", "type": "User", "site_admin": false }, { "login": "anohmead", "id": 652487, "node_id": "MDQ6VXNlcjY1MjQ4Nw==", "avatar_url": "https://avatars.githubusercontent.com/u/652487?v=4", "gravatar_id": "", "url": "https://api.github.com/users/anohmead", "html_url": "https://github.com/anohmead", "followers_url": "https://api.github.com/users/anohmead/followers", "following_url": "https://api.github.com/users/anohmead/following{/other_user}", "gists_url": "https://api.github.com/users/anohmead/gists{/gist_id}", "starred_url": "https://api.github.com/users/anohmead/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/anohmead/subscriptions", "organizations_url": "https://api.github.com/users/anohmead/orgs", "repos_url": "https://api.github.com/users/anohmead/repos", "events_url": "https://api.github.com/users/anohmead/events{/privacy}", "received_events_url": "https://api.github.com/users/anohmead/received_events", "type": "User", "site_admin": false }, { "login": "drkirkland86", "id": 657003, "node_id": "MDQ6VXNlcjY1NzAwMw==", "avatar_url": "https://avatars.githubusercontent.com/u/657003?v=4", "gravatar_id": "", "url": "https://api.github.com/users/drkirkland86", "html_url": "https://github.com/drkirkland86", "followers_url": "https://api.github.com/users/drkirkland86/followers", "following_url": "https://api.github.com/users/drkirkland86/following{/other_user}", "gists_url": "https://api.github.com/users/drkirkland86/gists{/gist_id}", "starred_url": "https://api.github.com/users/drkirkland86/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/drkirkland86/subscriptions", "organizations_url": "https://api.github.com/users/drkirkland86/orgs", "repos_url": "https://api.github.com/users/drkirkland86/repos", "events_url": "https://api.github.com/users/drkirkland86/events{/privacy}", "received_events_url": "https://api.github.com/users/drkirkland86/received_events", "type": "User", "site_admin": false }, { "login": "hyesushin", "id": 659539, "node_id": "MDQ6VXNlcjY1OTUzOQ==", "avatar_url": "https://avatars.githubusercontent.com/u/659539?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hyesushin", "html_url": "https://github.com/hyesushin", "followers_url": "https://api.github.com/users/hyesushin/followers", "following_url": "https://api.github.com/users/hyesushin/following{/other_user}", "gists_url": "https://api.github.com/users/hyesushin/gists{/gist_id}", "starred_url": "https://api.github.com/users/hyesushin/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/hyesushin/subscriptions", "organizations_url": "https://api.github.com/users/hyesushin/orgs", "repos_url": "https://api.github.com/users/hyesushin/repos", "events_url": "https://api.github.com/users/hyesushin/events{/privacy}", "received_events_url": "https://api.github.com/users/hyesushin/received_events", "type": "User", "site_admin": false }, { "login": "mj001", "id": 660559, "node_id": "MDQ6VXNlcjY2MDU1OQ==", "avatar_url": "https://avatars.githubusercontent.com/u/660559?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mj001", "html_url": "https://github.com/mj001", "followers_url": "https://api.github.com/users/mj001/followers", "following_url": "https://api.github.com/users/mj001/following{/other_user}", "gists_url": "https://api.github.com/users/mj001/gists{/gist_id}", "starred_url": "https://api.github.com/users/mj001/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mj001/subscriptions", "organizations_url": "https://api.github.com/users/mj001/orgs", "repos_url": "https://api.github.com/users/mj001/repos", "events_url": "https://api.github.com/users/mj001/events{/privacy}", "received_events_url": "https://api.github.com/users/mj001/received_events", "type": "User", "site_admin": false }, { "login": "yvo", "id": 662631, "node_id": "MDQ6VXNlcjY2MjYzMQ==", "avatar_url": "https://avatars.githubusercontent.com/u/662631?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yvo", "html_url": "https://github.com/yvo", "followers_url": "https://api.github.com/users/yvo/followers", "following_url": "https://api.github.com/users/yvo/following{/other_user}", "gists_url": "https://api.github.com/users/yvo/gists{/gist_id}", "starred_url": "https://api.github.com/users/yvo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yvo/subscriptions", "organizations_url": "https://api.github.com/users/yvo/orgs", "repos_url": "https://api.github.com/users/yvo/repos", "events_url": "https://api.github.com/users/yvo/events{/privacy}", "received_events_url": "https://api.github.com/users/yvo/received_events", "type": "User", "site_admin": false }, { "login": "sori", "id": 665404, "node_id": "MDQ6VXNlcjY2NTQwNA==", "avatar_url": "https://avatars.githubusercontent.com/u/665404?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sori", "html_url": "https://github.com/sori", "followers_url": "https://api.github.com/users/sori/followers", "following_url": "https://api.github.com/users/sori/following{/other_user}", "gists_url": "https://api.github.com/users/sori/gists{/gist_id}", "starred_url": "https://api.github.com/users/sori/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sori/subscriptions", "organizations_url": "https://api.github.com/users/sori/orgs", "repos_url": "https://api.github.com/users/sori/repos", "events_url": "https://api.github.com/users/sori/events{/privacy}", "received_events_url": "https://api.github.com/users/sori/received_events", "type": "User", "site_admin": false }, { "login": "ngreader", "id": 666639, "node_id": "MDQ6VXNlcjY2NjYzOQ==", "avatar_url": "https://avatars.githubusercontent.com/u/666639?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ngreader", "html_url": "https://github.com/ngreader", "followers_url": "https://api.github.com/users/ngreader/followers", "following_url": "https://api.github.com/users/ngreader/following{/other_user}", "gists_url": "https://api.github.com/users/ngreader/gists{/gist_id}", "starred_url": "https://api.github.com/users/ngreader/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ngreader/subscriptions", "organizations_url": "https://api.github.com/users/ngreader/orgs", "repos_url": "https://api.github.com/users/ngreader/repos", "events_url": "https://api.github.com/users/ngreader/events{/privacy}", "received_events_url": "https://api.github.com/users/ngreader/received_events", "type": "User", "site_admin": false }, { "login": "justinstewart", "id": 667956, "node_id": "MDQ6VXNlcjY2Nzk1Ng==", "avatar_url": "https://avatars.githubusercontent.com/u/667956?v=4", "gravatar_id": "", "url": "https://api.github.com/users/justinstewart", "html_url": "https://github.com/justinstewart", "followers_url": "https://api.github.com/users/justinstewart/followers", "following_url": "https://api.github.com/users/justinstewart/following{/other_user}", "gists_url": "https://api.github.com/users/justinstewart/gists{/gist_id}", "starred_url": "https://api.github.com/users/justinstewart/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/justinstewart/subscriptions", "organizations_url": "https://api.github.com/users/justinstewart/orgs", "repos_url": "https://api.github.com/users/justinstewart/repos", "events_url": "https://api.github.com/users/justinstewart/events{/privacy}", "received_events_url": "https://api.github.com/users/justinstewart/received_events", "type": "User", "site_admin": false } ] """
47.667194
90
0.702546
053edf8bd3977a49d0a9be532f8b0138118d4924
341
sql
SQL
luciddb/test/sql/VI/tbs/q7000_10K.sql
alexavila150/luciddb
e3125564eb18238677e6efb384b630cab17bb472
[ "Apache-2.0" ]
14
2015-07-21T06:31:22.000Z
2020-05-13T14:18:33.000Z
luciddb/test/sql/VI/tbs/q7000_10K.sql
alexavila150/luciddb
e3125564eb18238677e6efb384b630cab17bb472
[ "Apache-2.0" ]
1
2020-05-04T23:08:51.000Z
2020-05-04T23:08:51.000Z
luciddb/test/sql/VI/tbs/q7000_10K.sql
alexavila150/luciddb
e3125564eb18238677e6efb384b630cab17bb472
[ "Apache-2.0" ]
22
2015-01-03T14:27:36.000Z
2021-09-14T02:09:13.000Z
set schema 's'; select KSEQ, K2, K4 from BENCH10K where K2 = 2 and K4 = 2 and K5 = 2 and K10 = 2 order by 1; SELECT KSEQ FROM BENCH10K WHERE (k2 = 2 or k4 = 2 or k5 = 2) and k100 = 2 order by 1; SELECT KSEQ, K2, K4 FROM BENCH10K WHERE K2 = 2 AND K4 = 2 order by 1; SELECT KSEQ, K2, K5 FROM BENCH10K WHERE K2 = 2 AND K5 = 2 order by 1;
21.3125
57
0.653959
7b7886b318e0e3a14e6aeec3846292f2aef2d481
360
css
CSS
3party/gtk+-3.12.1/testsuite/reftests/entry-progress-coloring.css
kongaraju/antkorp
3453d543d659e3420d5bc4b536016bb1d097d7ec
[ "CC-BY-3.0", "Apache-2.0" ]
1
2016-01-02T14:39:07.000Z
2016-01-02T14:39:07.000Z
3party/gtk+-3.12.1/testsuite/reftests/entry-progress-coloring.css
kongaraju/antkorp
3453d543d659e3420d5bc4b536016bb1d097d7ec
[ "CC-BY-3.0", "Apache-2.0" ]
4
2019-12-20T06:13:24.000Z
2021-07-03T16:28:18.000Z
3party/gtk+-3.12.1/testsuite/reftests/entry-progress-coloring.css
kongaraju/antkorp
3453d543d659e3420d5bc4b536016bb1d097d7ec
[ "CC-BY-3.0", "Apache-2.0" ]
2
2015-09-17T16:40:10.000Z
2016-11-17T15:56:42.000Z
@import "reset-to-defaults.css"; * { -GtkWidget-interior-focus: false; -GtkWidget-focus-line-width: 10; font: Monospace; } GtkEntry #padded { -GtkWidget-interior-focus: true; padding: 10px; } .progressbar { background-color: rgba(0,0,0,0); background-image: none; border-color: rgba(0,0,0,0); color: red; } #reference { color: red; }
15
35
0.658333
abc7a209b6703a20ce66b6d7d72d106fb3fe407c
566
sql
SQL
sql/_13_issues/_11_1h/cases/bug_bts_5385.sql
Zhaojia2019/cubrid-testcases
475a828e4d7cf74aaf2611fcf791a6028ddd107d
[ "BSD-3-Clause" ]
9
2016-03-24T09:51:52.000Z
2022-03-23T10:49:47.000Z
sql/_13_issues/_11_1h/cases/bug_bts_5385.sql
Zhaojia2019/cubrid-testcases
475a828e4d7cf74aaf2611fcf791a6028ddd107d
[ "BSD-3-Clause" ]
173
2016-04-13T01:16:54.000Z
2022-03-16T07:50:58.000Z
sql/_13_issues/_11_1h/cases/bug_bts_5385.sql
Zhaojia2019/cubrid-testcases
475a828e4d7cf74aaf2611fcf791a6028ddd107d
[ "BSD-3-Clause" ]
38
2016-03-24T17:10:31.000Z
2021-10-30T22:55:45.000Z
create table foo(id varchar(15), parent_id varchar(10), rdate datetime); insert into foo values('UMN_000223', 'UMN_000222',null); insert into foo values('UMN_000224', 'UMN_000222',null); insert into foo values('UMN_000225', 'UMN_000222',null); insert into foo values('UMN_000221', 'UMN_000221',null); UPDATE foo SET rdate = '1999-12-12 12:12:12.123' WHERE id IN (SELECT id FROM foo START WITH parent_id = 'UMN_000222' CONNECT BY PRIOR id = parent_id); select * from foo order by 1; drop table foo;
33.294118
72
0.657244
90530ac7399661d663eb0780c3041143253710c2
6,713
py
Python
src/pycropml/render_fortran.py
sielenk-yara/PyCrop2ML
dfcab79061fa71d4343120573b50b6232812999e
[ "MIT" ]
null
null
null
src/pycropml/render_fortran.py
sielenk-yara/PyCrop2ML
dfcab79061fa71d4343120573b50b6232812999e
[ "MIT" ]
null
null
null
src/pycropml/render_fortran.py
sielenk-yara/PyCrop2ML
dfcab79061fa71d4343120573b50b6232812999e
[ "MIT" ]
null
null
null
"""Add License, Header. Use pkglts Problems: - name of a model unit? """ from __future__ import print_function from __future__ import absolute_import from path import Path from pycropml.formater_f90 import formater import six import os from pycropml.composition import model_parser class Model2Package(object): """ TODO """ DATATYPE = {} DATATYPE['FLOAT'] = 'REAL' DATATYPE['INT'] = 'INTEGER' DATATYPE['STRING'] = 'CHARACTER(65)' DATATYPE['DATE'] = 'CHARACTER(65)' DATATYPE['DOUBLE'] = 'REAL' DATATYPE['DOUBLELIST'] = 'REAL, ALLOCATABLE, DIMENSION(:)' DATATYPE['INTLIST'] = 'INTEGER, ALLOCATABLE, DIMENSION(:)' DATATYPE['STRINGLIST'] = 'CHARACTER(65), ALLOCATABLE, DIMENSION(:)' DATATYPE['INTARRAY'] = 'INTEGER, ALLOCATABLE, DIMENSION' DATATYPE['DOUBLEARRAY'] = 'REAL, ALLOCATABLE, DIMENSION' DATATYPE['STRINGARRAY'] = 'CHARACTER(65), ALLOCATABLE, DIMENSION' DATATYPE['BOOLEAN'] = 'LOGICAL' DATATYPE['DATELIST'] = 'CHARACTER(65), ALLOCATABLE, DIMENSION(:)' num = 0 def __init__(self, models, directory=None, pkg_name=None): """TODO.""" self.models = models self.directory = directory self.with_import = True if pkg_name is None: self.pkg_name = "CropModel" else: self.pkg_name = pkg_name def my_input(self,_input): name = _input.name _type = _input.datatype if _type=="DOUBLEARRAY" or _type=="INTARRAY" or _type =="STRINGARRAY": size = _input.len return ("%s(%s) :: %s \n"%(self.DATATYPE[_type],size, name)) else: return ("%s:: %s\n"%(self.DATATYPE[_type], name)) def generate_test(self, model_unit): tab = ' '*4 m = model_unit model_name = signature(m) psets = m.parametersets list_var=[] list_inouts=[] for inp in m.inputs: list_var.append(inp.name) list_inouts.append(inp) for out in m.outputs: if out.name not in list_var: list_var.append(out.name) list_inouts.append(out) self.codetest = "PROGRAM test\n" self.codetest += tab+ "USE" + " %smod\n"%model_unit.name.capitalize() test_codes = [] decl_ins= [ tab + self.my_input(var) for var in list_inouts] test_codes.append(''.join(decl_ins)) for v_tests in m.testsets: test_runs = v_tests.test # different run in the thest test_paramsets = v_tests.parameterset # name of paramsets # map the paramsets params = {} if test_paramsets.strip()!="" and test_paramsets not in list(psets.keys()): print(' Unknow parameter %s'%test_paramsets) else: if test_paramsets.strip()!="" : params.update(psets[test_paramsets].params) for each_run in test_runs : # make a function that transforms a title into a function name tname = list(each_run.keys())[0].replace(' ', '_') tname = tname.replace('-', '_') (run, inouts) = list(each_run.items())[0] ins = inouts['inputs'] outs = inouts['outputs'] #code = "PROGRAM test_%s_%s \n"%(tname,m.name) #code += tab+ "USE" + " %smod"%model_unit.name.capitalize() #test_codes.append(code) #test_codes.append('\n'.join(decl_ins)) code = tab +'print *, "--------test_%s_%s-------" \n'%(tname,m.name) run_param = params.copy() run_param.update(ins) for testinp in m.inputs: if testinp.name not in list(run_param.keys()): run_param[testinp.name]=testinp.default for k, v in six.iteritems(run_param): typ = [inp.datatype for inp in list_inouts if inp.name == k][0] if typ == "STRING" or typ == "DATE": code += ' %s = "%s"\n'%(k,v.replace('"', '')) elif typ != "BOOLEAN" and typ != "STRINGLIST" and typ!= "DATELIST": code += " %s = %s\n"%(k,v) elif typ == "BOOLEAN": code +=" %s = .%s.\n"%(k, v.capitalize()) else: value = "" for val in eval(v): value += ' CALL Add(%s, "%s")\n'%(k,val) code += value test_codes.append(code) code=" call model_{0}({1})\n".format(model_name, ', '.join(list_var)) for k, v in six.iteritems(outs): type_o = [out.datatype for out in m.outputs if out.name==k][0] code += tab + "!%s: %s\n"%(k, v[0]) code += tab + 'print *, "%s estimated :" \n'%(k) if type_o.find("LIST")!=-1: code += tab +"Do i_cyml = %s, %s\n"%(1, len(eval(v[0]))) code += 2*tab + "print *, %s(i_cyml);\n"%(k) code += tab + "END DO\n" else: code += tab + "print *, %s\n"%(k) test_codes.append(code) code = ''.join(test_codes) self.codetest += code+'\nEND PROGRAM\n\n' return formater(self.codetest) def write_tests(self): """ TODO: Manage several models rather than just one. """ files = [] count = 0 for model in self.models: codetest = self.generate_test(model) filename = Path(self.directory/"test_%s.f90"%signature(model)) codetest = "!Test generation\n\n"+codetest with open(filename, "wb") as f90_file: f90_file.write(codetest.encode('utf-8')) files.append(filename) count +=1 return files def signature(model): name = model.name name = name.strip() name = name.replace(' ', '_').lower() return name def generate_doc(model): desc = model.description _doc = """ %s Author: %s Reference: %s Institution: %s Abstract: %s """ %(desc.Title, desc.Authors, desc.Reference, desc.Institution, desc.Abstract) code = '\n' code += _doc return code
39.721893
129
0.496648
0be94a5b2bb9944ff66cc2eed932f97c6fb77ef5
1,136
js
JavaScript
App/Admin/ClaimPriceRules/Module.js
Hem/Bootstrap3x
f9e35bee9563cbb0a8d065ad1965319e33e0f50d
[ "MIT" ]
null
null
null
App/Admin/ClaimPriceRules/Module.js
Hem/Bootstrap3x
f9e35bee9563cbb0a8d065ad1965319e33e0f50d
[ "MIT" ]
null
null
null
App/Admin/ClaimPriceRules/Module.js
Hem/Bootstrap3x
f9e35bee9563cbb0a8d065ad1965319e33e0f50d
[ "MIT" ]
null
null
null
(function() { "use strict"; angular.module('app') .config(function ($urlMatcherFactoryProvider, $stateProvider /*, $urlRouterProvider, $locationProvider*/) { $urlMatcherFactoryProvider.caseInsensitive(true); $urlMatcherFactoryProvider.strictMode(false); // when the route is /parts redirect to list! // $urlRouterProvider.when('/CatalogAdmin/Index', '/CatalogAdmin'); $stateProvider .state('claimPriceRuleGroups', { url: '/RuleGroupList', templateUrl: '~/App/Admin/ClaimPriceRules/Views/ClaimPriceRuleGroupListView.html', controller: 'ClaimPriceRuleGroupListController' }) .state('claimPriceRuleGroups.detail', { url: '/:mode/:id', // #/RuleGroupList/view/1234565 OR #/RuleGroupList/edit/1234565 templateUrl: '~/App/Admin/ClaimPriceRules/Views/ClaimPriceRuleGroupDetailView.html', controller: 'ClaimPriceRuleGroupDetailViewController' }); }); })();
37.866667
115
0.583627
072466f3574310bc6971fddefb23cfbf2a8c3faa
401
swift
Swift
Raise/Utility/Extensions/UIScrollViewExtensions.swift
RaiseSoftware/Raise-iOS
d8fbe36f9fb4d8c5b401f6ddc1f515051d80203b
[ "MIT" ]
3
2018-02-01T02:22:54.000Z
2018-02-03T22:21:38.000Z
Raise/Utility/Extensions/UIScrollViewExtensions.swift
RaiseSoftware/Raise-iOS
d8fbe36f9fb4d8c5b401f6ddc1f515051d80203b
[ "MIT" ]
1
2019-03-12T00:56:28.000Z
2019-03-12T00:56:28.000Z
Raise/Utility/Extensions/UIScrollViewExtensions.swift
RaiseSoftware/Raise-iOS
d8fbe36f9fb4d8c5b401f6ddc1f515051d80203b
[ "MIT" ]
null
null
null
// // UIScrollViewExtensions.swift // Raise // // Created by Stephen Hayes on 3/3/19. // Copyright © 2019 Raise Software. All rights reserved. // import UIKit extension UIScrollView { func scrollToPage(page: Int, animated: Bool = true) { var frame = self.frame frame.origin.x = frame.size.width * CGFloat(page) scrollRectToVisible(frame, animated: animated) } }
21.105263
57
0.665835
967e69adcc1633f59f3f1bbacbaaff113cd82b95
1,191
php
PHP
common/modules/app/models/Options.php
MComScience/santipabprint
e64855a201a311ec73b6bba84bde12be4186247d
[ "BSD-3-Clause" ]
null
null
null
common/modules/app/models/Options.php
MComScience/santipabprint
e64855a201a311ec73b6bba84bde12be4186247d
[ "BSD-3-Clause" ]
null
null
null
common/modules/app/models/Options.php
MComScience/santipabprint
e64855a201a311ec73b6bba84bde12be4186247d
[ "BSD-3-Clause" ]
null
null
null
<?php /** * Created by PhpStorm. * User: Tanakorn * Date: 20/1/2562 * Time: 21:35 */ namespace common\modules\app\models; use yii\base\Model; class Options extends Model { public $paper_size; public $diecut; public $before_print; public $after_print; public $coating; public $fold; public $foil; public $book_binding; public $embossing; public $page_qty; public $land_orient; public $print_two_page; public $print_one_page; public $label; public $required; public $value; public function attributeLabels() { return [ 'paper_size' => 'ขนาด', 'diecut' => 'ไดคัท', 'before_print' => 'ด้านหน้าพิมพ์', 'after_print' => 'ด้านหลังพิมพ์', 'coating' => 'เคลือบ', 'fold' => 'วิธีพับ', 'foil' => 'สีฟอยล์', 'book_binding' => 'เข้าเล่ม', 'embossing' => 'ปั๊มนูน', 'page_qty' => 'จำนวนหน้า/แผ่น', 'land_orient' => 'แนวตั้ง/แนวนอน', 'print_two_page' => 'พิมพ์หน้าหลัง', 'print_one_page' => 'พิมพ์หน้าเดียว', 'required' => 'บังคับ' ]; } }
23.82
49
0.518052
2038332fd5885a2e218add629c0fd213fedec642
1,819
swift
Swift
GeofencingRegion/Classes/GeofencingModel.swift
sreenathtv18/GeofencingRegion
f02e2c70a4b489db50224dc21e123efbb9a548e9
[ "MIT" ]
null
null
null
GeofencingRegion/Classes/GeofencingModel.swift
sreenathtv18/GeofencingRegion
f02e2c70a4b489db50224dc21e123efbb9a548e9
[ "MIT" ]
null
null
null
GeofencingRegion/Classes/GeofencingModel.swift
sreenathtv18/GeofencingRegion
f02e2c70a4b489db50224dc21e123efbb9a548e9
[ "MIT" ]
null
null
null
// // GeofencingModel.swift // Geofencing Demo // // Created by Sreenath on 17/12/19. // Copyright © 2019 Sreenath. All rights reserved. // import CoreLocation public struct Coordinate { public let latitude: CLLocationDegrees public let longitude: CLLocationDegrees let radius: CLLocationDistance let identifier: String } public class CircularRegion { public var coordinate: Coordinate var distance: Double = 0.0 lazy var region: CLCircularRegion = { [unowned self] in let geofenceRegionCenter = CLLocationCoordinate2DMake(coordinate.latitude, coordinate.longitude) let geofenceRegion = CLCircularRegion(center: geofenceRegionCenter, radius: coordinate.radius, identifier: coordinate.identifier) return geofenceRegion }() public init(location: Coordinate) { self.coordinate = location } public static func loadDummyData() -> [CircularRegion] { // Dummy data let region1 = CircularRegion(location: Coordinate(latitude: 10.015142, longitude: 76.345530, radius: 1000, identifier: "1")) let region2 = CircularRegion(location: Coordinate(latitude: 10.015142, longitude: 76.345530, radius: 1000, identifier: "2")) let region3 = CircularRegion(location: Coordinate(latitude: 9.994811, longitude: 76.353301, radius: 1000, identifier: "3")) let region4 = CircularRegion(location: Coordinate(latitude: 9.998886, longitude: 76.353301, radius: 1000, identifier: "4")) let region5 = CircularRegion(location: Coordinate(latitude: 10.015718, longitude: 76.364375, radius: 1000, identifier: "5")) return [region1, region2, region3, region4, region5] } }
35.666667
132
0.662452
5b50a9bfa0736d023c884be3b2be351dcd968cf5
1,167
h
C
OutPutHeaders/WCPayCreditPayFillAllIdentifierInfoViewController.h
cocos543/WeChatTimeLineRobot
1e93480e502e36ca9a21a506f481aa1fcb70ac4b
[ "MIT" ]
106
2016-04-09T01:16:14.000Z
2021-06-04T00:20:24.000Z
OutPutHeaders/WCPayCreditPayFillAllIdentifierInfoViewController.h
cocos543/WeChatTimeLineRobot
1e93480e502e36ca9a21a506f481aa1fcb70ac4b
[ "MIT" ]
2
2017-06-13T09:41:29.000Z
2018-03-26T03:32:07.000Z
OutPutHeaders/WCPayCreditPayFillAllIdentifierInfoViewController.h
cocos543/WeChatTimeLineRobot
1e93480e502e36ca9a21a506f481aa1fcb70ac4b
[ "MIT" ]
58
2016-04-28T09:52:08.000Z
2021-12-25T06:42:14.000Z
/** * This header is generated by class-dump-z 0.2a. * class-dump-z is Copyright (C) 2009 by KennyTM~, licensed under GPLv3. * * Source: (null) */ #import "WeChat-Structs.h" #import "WCPayBaseViewController.h" @class WCBaseKeyboardToolBar, WCPayTenpaySecureCtrlItem, WCBaseTextFieldItem, UIButton, WCBizInfoGroup; @protocol WCPayCreditPayFillAllIdentifierInfoViewControllerDelegate; @interface WCPayCreditPayFillAllIdentifierInfoViewController : WCPayBaseViewController { UIButton* m_footerButton; WCBaseKeyboardToolBar* m_keyboardBar; WCBaseTextFieldItem* m_nameTextFieldItem; WCPayTenpaySecureCtrlItem* m_idNumberTextFieldItem; WCBizInfoGroup* m_group; id<WCPayCreditPayFillAllIdentifierInfoViewControllerDelegate> m_delegate; } -(void).cxx_destruct; -(void)WCBaseInfoItemEditChanged:(id)changed; -(void)WCBaseInfoItemPressReturnKey:(id)key; -(void)onNext; -(void)setDelegate:(id)delegate; -(void)viewDidLayoutSubviews; -(void)viewWillLayoutSubviews; -(void)viewDidLoad; -(void)initNavigationBar; -(void)initTextFieldItem; -(void)initFooterView; -(void)makeInfoCell:(id)cell cellInfo:(id)info; -(void)reloadTableView; -(void)dealloc; -(id)init; @end
29.923077
103
0.810626
87908361e0cf128964a5127b532c1737e45382d0
901
html
HTML
manuscript/page-967/body.html
marvindanig/uncle-tom-s-cabin
70d4a8750aa95eb721156179b4aebf20dba0ed98
[ "CECILL-B" ]
null
null
null
manuscript/page-967/body.html
marvindanig/uncle-tom-s-cabin
70d4a8750aa95eb721156179b4aebf20dba0ed98
[ "CECILL-B" ]
null
null
null
manuscript/page-967/body.html
marvindanig/uncle-tom-s-cabin
70d4a8750aa95eb721156179b4aebf20dba0ed98
[ "CECILL-B" ]
null
null
null
<div class="leaf flex"><div class="inner justify"><p> The &ldquo;Emperor&rdquo; Dessalines, come to power in 1804, massacred all the whites on the island. Haitian bloodshed became an argument to show the barbarous nature of the Negro, a doctrine Wendell Phillips sought to combat in his celebrated lecture on Toussaint L&rsquo;Ouverture.</p><p>&ldquo;Well, there is a pretty fair infusion of Anglo Saxon blood among our slaves, now,&rdquo; said Augustine. &ldquo;There are plenty among them who have only enough of the African to give a sort of tropical warmth and fervor to our calculating firmness and foresight. If ever the San Domingo hour comes, Anglo Saxon blood will lead on the day. Sons of white fathers, with all our haughty feelings burning in their veins, will not always be bought and sold and traded. They will rise, and raise with them their mother&rsquo;s race.&rdquo;</p></div> </div>
901
901
0.782464
1cc1c1b47afd6f49c1a697b87cb3313f7d74ca3a
646
sql
SQL
backend/scripts/4 - SP_AddEdit_Specialist.sql
dnnxl/Project-snakes
d2c162d72a230f67634985c810de6751dc7bc7eb
[ "FTL" ]
null
null
null
backend/scripts/4 - SP_AddEdit_Specialist.sql
dnnxl/Project-snakes
d2c162d72a230f67634985c810de6751dc7bc7eb
[ "FTL" ]
null
null
null
backend/scripts/4 - SP_AddEdit_Specialist.sql
dnnxl/Project-snakes
d2c162d72a230f67634985c810de6751dc7bc7eb
[ "FTL" ]
null
null
null
CREATE DEFINER=`root`@`localhost` PROCEDURE `specialistAddOrEdit`( IN _nbSpecialist INT, IN _nameSpecialist varchar(45), IN _passwordSpecialist varchar(45), IN _authorAnswer varchar(45) ) BEGIN IF _nbSpecialist = 0 THEN INSERT INTO specialist(NameSpecialist, PaswordSpecialist, AuthorAnswer) VALUES(_nameSpecialist, _passwordSpecialist, _authorAnswer); SET _nbSpecialist = last_insert_id(); ELSE UPDATE specialist SET NameSpecialist = _nameSpecialist, PaswordSpecialist = _passwordSpecialist, AuthorAnswer = _authorAnswer WHERE NbSpecialist = _nbSpecialist; END IF; SELECT _nbSpecialist AS NbSpecialist; END
30.761905
73
0.78483
95b79caee2ec43bfbc2fd81ac3f01ca47be9685f
1,920
css
CSS
assest/css/home.css
dilipsuthar1999/music_mood
cf5bcd299bfb6ffa2a235aab59c7382bfc273c4f
[ "MIT" ]
null
null
null
assest/css/home.css
dilipsuthar1999/music_mood
cf5bcd299bfb6ffa2a235aab59c7382bfc273c4f
[ "MIT" ]
null
null
null
assest/css/home.css
dilipsuthar1999/music_mood
cf5bcd299bfb6ffa2a235aab59c7382bfc273c4f
[ "MIT" ]
null
null
null
body{ font-family: 'Sansita Swashed', cursive; } .navbar{ background-color: #FFFFFF; padding-right: 100px; padding-left: 100px; } .navbar-brand{ color: #4d4d4d; font-weight: bold; text-shadow: 2px 2px 2px #cccccc; font-size: 30px; } .navbar-brand:hover{ color: #4d4d4d; } .navbar-toggler{ border: 1px solid #4d4d4d; } .fa-bars{ width: 100%; color: #4d4d4d; } .nav-link{ color: #4d4d4d; } .login{ background-color: #1a53ff; padding: 5px 10px 5px 10px; color: #FFFFFF; border-radius: 5px; } .login:hover{ text-decoration: none; color: #FFFFFF; } .main-data{ margin-top: 30px; padding: 20px 100px 20px 100px; margin-bottom: 20px; } .language{ margin-bottom: 30px; } .title{ font-weight: bold; font-size: 20px; } .col-md-2, .col-sm-4, .col-6{ padding: 10px; } .img-fluid{ width: 100%; height: 150px; border: 1px solid #FFFFFF; border-radius: 8px; } .data{ text-decoration: none; color: #000000; font-family: 'Roboto', sans-serif; text-align: center; font-weight: bold; } .data:hover{ text-decoration: none; color: #000000; } .sm, .xsm{ display: none; } .carousel-control-next, .carousel-control-prev{ opacity: 0.8; } .fa-angle-left, .fa-angle-right{ font-size: 50px; border: 1px solid #4d4d4d; background-color: #4d4d4d; } @media (max-width: 575.98px) { .navbar, .main-data{ padding-left: 1rem; padding-right: 1rem; } .title{ text-align: center; } .xsm{ display: flex; } .md{ display: none; } } @media (min-width: 576px) and (max-width: 767.98px) { .navbar, .main-data{ padding-left: 1rem; padding-right: 1rem; } .title{ text-align: center; } .sm{ display: flex; margin } .md{ display: none; } } @media (min-width: 768px) and (max-width: 991.98px) { .navbar, .main-data{ padding-left: 50px; padding-right: 50px; } } @media (min-width: 992px) and (max-width: 1200px) { } @media (min-width: 1200px) { }
12.8
54
0.642188
39b7748fa544c560d1f4c10eff8d20b9678cca19
3,459
js
JavaScript
js/app/quad.js
felixpalmer/photo.gl
5c94015a80054192d6a11b5bf814f94a5e5d0b76
[ "MIT" ]
25
2015-02-04T10:42:43.000Z
2022-01-04T10:15:11.000Z
js/app/quad.js
mcanthony/photo.gl
5c94015a80054192d6a11b5bf814f94a5e5d0b76
[ "MIT" ]
null
null
null
js/app/quad.js
mcanthony/photo.gl
5c94015a80054192d6a11b5bf814f94a5e5d0b76
[ "MIT" ]
5
2015-10-04T06:22:46.000Z
2019-10-23T16:51:13.000Z
define( [ 'gl', 'params', 'utils', 'shader!examples.vert', 'shader!examples.frag', 'shader!image.frag', 'shader!simple.vert', 'shader!simple.frag'], function ( gl, params, utils, examplesVert, examplesFrag, imageFrag, simpleVert, simpleFrag ) { var quad = { init: function () { console.log( 'Initialized quad with context', gl ); // Create shader program for quad quad.program = utils.createProgram( simpleVert.value, simpleFrag.value ); gl.useProgram( quad.program ); // Get handle on coordinate attribute in shader var coordinate = gl.getAttribLocation( quad.program, 'aCoordinate' ); // Create a buffer to will hold the quad vertex data (defined in clip-space) var buffer = gl.createBuffer(); gl.bindBuffer( gl.ARRAY_BUFFER, buffer ); // Define 2 triangles that will form our quad quad.vertices = new Float32Array( [ -1.0, -1.0, 1.0, -1.0, -1.0, 1.0, // 1st triangle -1.0, 1.0, 1.0, -1.0, 1.0, 1.0 // 2nd triangle ] ); // Put vertices into buffer gl.bufferData( gl.ARRAY_BUFFER, quad.vertices, gl.STATIC_DRAW ); gl.enableVertexAttribArray( coordinate ); gl.vertexAttribPointer( coordinate, 2, gl.FLOAT, false, 0, 0 ); // Create texture that we will load image into quad.image = gl.createTexture(); }, loadImage: function ( url, onload ) { // Load image from url var image = new Image(); image.src = url; image.onload = function() { console.log( 'Loaded image', url ); //..and assign it to the texture gl.bindTexture( gl.TEXTURE_2D, quad.image ); gl.texParameteri( gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE ); gl.texParameteri( gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE ); gl.texParameteri( gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST ); gl.texParameteri( gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST ); gl.texImage2D( gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image ); if ( onload ) { onload(); } }; }, loadProgram: function ( program, onload ) { if ( program === 'simple' ) { quad.program = utils.createProgram( simpleVert.value, simpleFrag.value ); } else if ( program === 'image' ) { quad.program = utils.createProgram( examplesVert.value, imageFrag.value ); } else if ( program === 'examples' ) { quad.program = utils.createProgram( examplesVert.value, examplesFrag.value ); } else { console.log( 'Unknown program requested: ', program ); } gl.useProgram( quad.program ); if ( onload ) { onload(); } }, draw: function () { // Update uniforms from params object var p = gl.getUniformLocation( quad.program, 'uBlackAndWhite' ); gl.uniform1i( p, params.blackAndWhite ); p = gl.getUniformLocation( quad.program, 'uA' ); gl.uniform1f( p, params.a ); p = gl.getUniformLocation( quad.program, 'uB' ); gl.uniform1f( p, params.b ); p = gl.getUniformLocation( quad.program, 'uC' ); gl.uniform1f( p, params.c ); p = gl.getUniformLocation( quad.program, 'uD' ); gl.uniform1f( p, params.d ); p = gl.getUniformLocation( quad.program, 'uTime' ); gl.uniform1f( p, params.time ); gl.drawArrays( gl.TRIANGLES, 0, quad.vertices.length / 2 ); } }; quad.init(); return quad; } );
40.694118
148
0.618098