hexsha
string | size
int64 | ext
string | lang
string | max_stars_repo_path
string | max_stars_repo_name
string | max_stars_repo_head_hexsha
string | max_stars_repo_licenses
list | max_stars_count
int64 | max_stars_repo_stars_event_min_datetime
string | max_stars_repo_stars_event_max_datetime
string | max_issues_repo_path
string | max_issues_repo_name
string | max_issues_repo_head_hexsha
string | max_issues_repo_licenses
list | max_issues_count
int64 | max_issues_repo_issues_event_min_datetime
string | max_issues_repo_issues_event_max_datetime
string | max_forks_repo_path
string | max_forks_repo_name
string | max_forks_repo_head_hexsha
string | max_forks_repo_licenses
list | max_forks_count
int64 | max_forks_repo_forks_event_min_datetime
string | max_forks_repo_forks_event_max_datetime
string | content
string | avg_line_length
float64 | max_line_length
int64 | alphanum_fraction
float64 | qsc_code_num_words_quality_signal
int64 | qsc_code_num_chars_quality_signal
float64 | qsc_code_mean_word_length_quality_signal
float64 | qsc_code_frac_words_unique_quality_signal
float64 | qsc_code_frac_chars_top_2grams_quality_signal
float64 | qsc_code_frac_chars_top_3grams_quality_signal
float64 | qsc_code_frac_chars_top_4grams_quality_signal
float64 | qsc_code_frac_chars_dupe_5grams_quality_signal
float64 | qsc_code_frac_chars_dupe_6grams_quality_signal
float64 | qsc_code_frac_chars_dupe_7grams_quality_signal
float64 | qsc_code_frac_chars_dupe_8grams_quality_signal
float64 | qsc_code_frac_chars_dupe_9grams_quality_signal
float64 | qsc_code_frac_chars_dupe_10grams_quality_signal
float64 | qsc_code_frac_chars_replacement_symbols_quality_signal
float64 | qsc_code_frac_chars_digital_quality_signal
float64 | qsc_code_frac_chars_whitespace_quality_signal
float64 | qsc_code_size_file_byte_quality_signal
float64 | qsc_code_num_lines_quality_signal
float64 | qsc_code_num_chars_line_max_quality_signal
float64 | qsc_code_num_chars_line_mean_quality_signal
float64 | qsc_code_frac_chars_alphabet_quality_signal
float64 | qsc_code_frac_chars_comments_quality_signal
float64 | qsc_code_cate_xml_start_quality_signal
float64 | qsc_code_frac_lines_dupe_lines_quality_signal
float64 | qsc_code_cate_autogen_quality_signal
float64 | qsc_code_frac_lines_long_string_quality_signal
float64 | qsc_code_frac_chars_string_length_quality_signal
float64 | qsc_code_frac_chars_long_word_length_quality_signal
float64 | qsc_code_frac_lines_string_concat_quality_signal
float64 | qsc_code_cate_encoded_data_quality_signal
float64 | qsc_code_frac_chars_hex_words_quality_signal
float64 | qsc_code_frac_lines_prompt_comments_quality_signal
float64 | qsc_code_frac_lines_assert_quality_signal
float64 | qsc_codepython_cate_ast_quality_signal
float64 | qsc_codepython_frac_lines_func_ratio_quality_signal
float64 | qsc_codepython_cate_var_zero_quality_signal
bool | qsc_codepython_frac_lines_pass_quality_signal
float64 | qsc_codepython_frac_lines_import_quality_signal
float64 | qsc_codepython_frac_lines_simplefunc_quality_signal
float64 | qsc_codepython_score_lines_no_logic_quality_signal
float64 | qsc_codepython_frac_lines_print_quality_signal
float64 | qsc_code_num_words
int64 | qsc_code_num_chars
int64 | qsc_code_mean_word_length
int64 | qsc_code_frac_words_unique
null | qsc_code_frac_chars_top_2grams
int64 | qsc_code_frac_chars_top_3grams
int64 | qsc_code_frac_chars_top_4grams
int64 | qsc_code_frac_chars_dupe_5grams
int64 | qsc_code_frac_chars_dupe_6grams
int64 | qsc_code_frac_chars_dupe_7grams
int64 | qsc_code_frac_chars_dupe_8grams
int64 | qsc_code_frac_chars_dupe_9grams
int64 | qsc_code_frac_chars_dupe_10grams
int64 | qsc_code_frac_chars_replacement_symbols
int64 | qsc_code_frac_chars_digital
int64 | qsc_code_frac_chars_whitespace
int64 | qsc_code_size_file_byte
int64 | qsc_code_num_lines
int64 | qsc_code_num_chars_line_max
int64 | qsc_code_num_chars_line_mean
int64 | qsc_code_frac_chars_alphabet
int64 | qsc_code_frac_chars_comments
int64 | qsc_code_cate_xml_start
int64 | qsc_code_frac_lines_dupe_lines
int64 | qsc_code_cate_autogen
int64 | qsc_code_frac_lines_long_string
int64 | qsc_code_frac_chars_string_length
int64 | qsc_code_frac_chars_long_word_length
int64 | qsc_code_frac_lines_string_concat
null | qsc_code_cate_encoded_data
int64 | qsc_code_frac_chars_hex_words
int64 | qsc_code_frac_lines_prompt_comments
int64 | qsc_code_frac_lines_assert
int64 | qsc_codepython_cate_ast
int64 | qsc_codepython_frac_lines_func_ratio
int64 | qsc_codepython_cate_var_zero
int64 | qsc_codepython_frac_lines_pass
int64 | qsc_codepython_frac_lines_import
int64 | qsc_codepython_frac_lines_simplefunc
int64 | qsc_codepython_score_lines_no_logic
int64 | qsc_codepython_frac_lines_print
int64 | effective
string | hits
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c274cb2e9e6b5776f2651a05ef5679043e80273d
| 200
|
py
|
Python
|
lista_ex3.py/exercicio11.py
|
robinson-1985/mentoria_exercises
|
8359cead6ee5351851b04cb45f252e3881b79117
|
[
"MIT"
] | null | null | null |
lista_ex3.py/exercicio11.py
|
robinson-1985/mentoria_exercises
|
8359cead6ee5351851b04cb45f252e3881b79117
|
[
"MIT"
] | null | null | null |
lista_ex3.py/exercicio11.py
|
robinson-1985/mentoria_exercises
|
8359cead6ee5351851b04cb45f252e3881b79117
|
[
"MIT"
] | null | null | null |
''' 11. Faça um algoritmo que receba o preço de custo de um produto e mostre o valor
de venda. Sabe-se que o preço de custo receberá um acréscimo de acordo com um percentual
informado pelo usuário.'''
| 66.666667
| 88
| 0.77
| 37
| 200
| 4.162162
| 0.675676
| 0.077922
| 0.103896
| 0.168831
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012195
| 0.18
| 200
| 3
| 89
| 66.666667
| 0.926829
| 0.965
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
c2835349007dd22fea16e005f8581425de979ba6
| 119
|
py
|
Python
|
django_app/urls.py
|
LeoCR/django-basics
|
a8dade78f2231eeadb1035edb426fb198cc50235
|
[
"BSD-2-Clause"
] | null | null | null |
django_app/urls.py
|
LeoCR/django-basics
|
a8dade78f2231eeadb1035edb426fb198cc50235
|
[
"BSD-2-Clause"
] | null | null | null |
django_app/urls.py
|
LeoCR/django-basics
|
a8dade78f2231eeadb1035edb426fb198cc50235
|
[
"BSD-2-Clause"
] | null | null | null |
from django.conf.urls import url
from django_app import views
urlpatterns=[
url(r'^$',views.index,name='index'),
]
| 19.833333
| 40
| 0.722689
| 18
| 119
| 4.722222
| 0.666667
| 0.235294
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12605
| 119
| 6
| 41
| 19.833333
| 0.817308
| 0
| 0
| 0
| 0
| 0
| 0.058333
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
c298a546093c5163773723f0ee0329b1aeb65831
| 300
|
py
|
Python
|
utils/losses/__init__.py
|
Pyten/pytorch-auto-drive
|
fabc82252918ddeb8e9518964c97e905241daaf7
|
[
"BSD-3-Clause"
] | 1
|
2022-03-25T02:26:31.000Z
|
2022-03-25T02:26:31.000Z
|
utils/losses/__init__.py
|
Pyten/pytorch-auto-drive
|
fabc82252918ddeb8e9518964c97e905241daaf7
|
[
"BSD-3-Clause"
] | null | null | null |
utils/losses/__init__.py
|
Pyten/pytorch-auto-drive
|
fabc82252918ddeb8e9518964c97e905241daaf7
|
[
"BSD-3-Clause"
] | null | null | null |
# Implementation based on pytorch 1.6.0
from .lane_seg_loss import LaneLoss, SADLoss
from .hungarian_loss import HungarianLoss
from .hungarian_bezier_loss import HungarianBezierLoss
from .weighted_ce_loss import WeightedCrossEntropyLoss
from .torch_loss import torch_loss
from .builder import LOSSES
| 37.5
| 54
| 0.863333
| 41
| 300
| 6.097561
| 0.585366
| 0.2
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011152
| 0.103333
| 300
| 7
| 55
| 42.857143
| 0.918216
| 0.123333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
c2c22053a0a99bada8d776bbfe3e965c08b041df
| 121
|
py
|
Python
|
personal_stats.py
|
OskaRRRitoS/osu_ranked_score_progress
|
380a05ad2711c6a1a591fbc4247a4a196e126f9f
|
[
"MIT"
] | null | null | null |
personal_stats.py
|
OskaRRRitoS/osu_ranked_score_progress
|
380a05ad2711c6a1a591fbc4247a4a196e126f9f
|
[
"MIT"
] | null | null | null |
personal_stats.py
|
OskaRRRitoS/osu_ranked_score_progress
|
380a05ad2711c6a1a591fbc4247a4a196e126f9f
|
[
"MIT"
] | null | null | null |
class PersonalStats:
"""Main class responsible for preparing personal stats info to be filled into Google Sheets."""
| 40.333333
| 99
| 0.768595
| 16
| 121
| 5.8125
| 0.9375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.165289
| 121
| 2
| 100
| 60.5
| 0.920792
| 0.735537
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
c2d0b471379eab3f71679c2a6f3ad3698d061ac2
| 344
|
py
|
Python
|
EWS/pcrasterModules/__init__.py
|
KoenvanLoon/EWS
|
3447921ec2140f29fd69d5b140b5eba2f244bccd
|
[
"MIT"
] | null | null | null |
EWS/pcrasterModules/__init__.py
|
KoenvanLoon/EWS
|
3447921ec2140f29fd69d5b140b5eba2f244bccd
|
[
"MIT"
] | null | null | null |
EWS/pcrasterModules/__init__.py
|
KoenvanLoon/EWS
|
3447921ec2140f29fd69d5b140b5eba2f244bccd
|
[
"MIT"
] | null | null | null |
from .component import *
from .interceptionuptomaxstore import *
from .surfacestore import *
from .infiltrationgreenandampt import *
from .subsurfacewateronelayer import *
from .evapotranspirationpenman import *
from .runoffaccuthreshold import *
from .shading import *
from .generalfunctions import *
from .randomparameters import *
| 31.272727
| 40
| 0.796512
| 30
| 344
| 9.133333
| 0.4
| 0.328467
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.145349
| 344
| 10
| 41
| 34.4
| 0.931973
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
6c0a8d7ca656f5bcc1395c039b00dc7434ff71e7
| 230
|
py
|
Python
|
Dataset/Leetcode/valid/62/279.py
|
kkcookies99/UAST
|
fff81885aa07901786141a71e5600a08d7cb4868
|
[
"MIT"
] | null | null | null |
Dataset/Leetcode/valid/62/279.py
|
kkcookies99/UAST
|
fff81885aa07901786141a71e5600a08d7cb4868
|
[
"MIT"
] | null | null | null |
Dataset/Leetcode/valid/62/279.py
|
kkcookies99/UAST
|
fff81885aa07901786141a71e5600a08d7cb4868
|
[
"MIT"
] | null | null | null |
class Solution:
def XXX(self, m: int, n: int) -> int:
dp = [1 for _ in range(n)]
for row in range(1, m):
for col in range(1,n):
dp[col] = dp[col] + dp[col-1]
return dp[-1]
| 25.555556
| 45
| 0.452174
| 38
| 230
| 2.710526
| 0.421053
| 0.203884
| 0.15534
| 0.194175
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.035971
| 0.395652
| 230
| 8
| 46
| 28.75
| 0.705036
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6c1aea4fe1b81d24dd13c0dfbe5c7e81dc5c7ab1
| 186
|
py
|
Python
|
src/service/abc_P1data_reader.py
|
HansKappert/net_balancer
|
36f09057a11cb1c7742f8c0764de66233d6cbe9a
|
[
"MIT"
] | null | null | null |
src/service/abc_P1data_reader.py
|
HansKappert/net_balancer
|
36f09057a11cb1c7742f8c0764de66233d6cbe9a
|
[
"MIT"
] | null | null | null |
src/service/abc_P1data_reader.py
|
HansKappert/net_balancer
|
36f09057a11cb1c7742f8c0764de66233d6cbe9a
|
[
"MIT"
] | null | null | null |
from abc import ABC, abstractmethod
class P1data_reader(ABC):
@abstractmethod
def __init__(self, port):
pass
@abstractmethod
def read_data(self):
pass
| 15.5
| 35
| 0.655914
| 21
| 186
| 5.52381
| 0.666667
| 0.293103
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007407
| 0.274194
| 186
| 11
| 36
| 16.909091
| 0.851852
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0.25
| 0.125
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
6c2c3dfdeff450217e43fd7bbaa151e70dbd0373
| 120
|
py
|
Python
|
cinspect/__init__.py
|
punchagan/cinspect
|
23834b9d02511a88cba8ca0aa1397eef927822c3
|
[
"BSD-3-Clause"
] | 100
|
2015-01-06T21:27:41.000Z
|
2022-03-01T06:58:55.000Z
|
cinspect/__init__.py
|
punchagan/cinspect
|
23834b9d02511a88cba8ca0aa1397eef927822c3
|
[
"BSD-3-Clause"
] | 4
|
2015-01-16T21:41:48.000Z
|
2020-06-25T18:29:29.000Z
|
cinspect/__init__.py
|
punchagan/cinspect
|
23834b9d02511a88cba8ca0aa1397eef927822c3
|
[
"BSD-3-Clause"
] | 3
|
2015-08-14T14:57:36.000Z
|
2017-12-29T11:59:13.000Z
|
from __future__ import absolute_import, print_function
from .cinspect import getfile, getsource
__version__ = '0.2.1'
| 20
| 54
| 0.808333
| 16
| 120
| 5.4375
| 0.8125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.028571
| 0.125
| 120
| 5
| 55
| 24
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0.041667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0.333333
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
6c392e2cbcac6c429c37985ccf7eaf32bacc477d
| 40,427
|
py
|
Python
|
pacu/models/awsapi/route53resolver.py
|
RyanJarv/Pacu2
|
27df4bcf296fc8f467d3dc671a47bf9519ce7a24
|
[
"MIT"
] | 1
|
2022-03-09T14:51:54.000Z
|
2022-03-09T14:51:54.000Z
|
pacu/models/awsapi/route53resolver.py
|
RyanJarv/Pacu2
|
27df4bcf296fc8f467d3dc671a47bf9519ce7a24
|
[
"MIT"
] | null | null | null |
pacu/models/awsapi/route53resolver.py
|
RyanJarv/Pacu2
|
27df4bcf296fc8f467d3dc671a47bf9519ce7a24
|
[
"MIT"
] | null | null | null |
# generated by datamodel-codegen:
# filename: openapi.yaml
# timestamp: 2021-12-31T02:55:05+00:00
from __future__ import annotations
from enum import Enum
from typing import Annotated, Any, List, Optional
from pydantic import BaseModel, Field
class ResourceNotFoundException(BaseModel):
__root__: Any
class ValidationException(ResourceNotFoundException):
pass
class LimitExceededException(ResourceNotFoundException):
pass
class ConflictException(ResourceNotFoundException):
pass
class AccessDeniedException(ResourceNotFoundException):
pass
class InternalServiceErrorException(ResourceNotFoundException):
pass
class ThrottlingException(ResourceNotFoundException):
pass
class InvalidParameterException(ResourceNotFoundException):
pass
class InvalidRequestException(ResourceNotFoundException):
pass
class ResourceExistsException(ResourceNotFoundException):
pass
class ResourceUnavailableException(ResourceNotFoundException):
pass
class ResourceInUseException(ResourceNotFoundException):
pass
class UnknownResourceException(ResourceNotFoundException):
pass
class InvalidNextTokenException(ResourceNotFoundException):
pass
class InvalidPolicyDocument(ResourceNotFoundException):
pass
class TagResourceResponse(BaseModel):
pass
class InvalidTagException(ResourceNotFoundException):
pass
class UntagResourceResponse(TagResourceResponse):
pass
class AccountId(BaseModel):
__root__: Annotated[str, Field(max_length=32, min_length=12)]
class Action(Enum):
ALLOW = 'ALLOW'
BLOCK = 'BLOCK'
ALERT = 'ALERT'
class Arn(BaseModel):
__root__: Annotated[str, Field(max_length=255, min_length=1)]
class CreatorRequestId(Arn):
pass
class ResourceId(BaseModel):
__root__: Annotated[str, Field(max_length=64, min_length=1)]
class Priority(BaseModel):
__root__: int
class Name(BaseModel):
__root__: Annotated[
str, Field(max_length=64, regex="(?!^[0-9]+$)([a-zA-Z0-9\\-_' ']+)")
]
class MutationProtectionStatus(Enum):
ENABLED = 'ENABLED'
DISABLED = 'DISABLED'
class BlockOverrideDnsType(Enum):
CNAME = 'CNAME'
class BlockOverrideDomain(Arn):
pass
class BlockOverrideTtl(BaseModel):
__root__: Annotated[int, Field(ge=0.0, le=604800.0)]
class BlockResponse(Enum):
NODATA = 'NODATA'
NXDOMAIN = 'NXDOMAIN'
OVERRIDE = 'OVERRIDE'
class Boolean(BaseModel):
__root__: bool
class Count(Priority):
pass
class SecurityGroupIds(BaseModel):
__root__: List[ResourceId]
class ResolverEndpointDirection(Enum):
INBOUND = 'INBOUND'
OUTBOUND = 'OUTBOUND'
class ResolverQueryLogConfigName(BaseModel):
__root__: Annotated[
str,
Field(max_length=64, min_length=1, regex="(?!^[0-9]+$)([a-zA-Z0-9\\-_' ']+)"),
]
class DestinationArn(BaseModel):
__root__: Annotated[str, Field(max_length=600, min_length=1)]
class RuleTypeOption(Enum):
FORWARD = 'FORWARD'
SYSTEM = 'SYSTEM'
RECURSIVE = 'RECURSIVE'
class DomainName(BaseModel):
__root__: Annotated[str, Field(max_length=256, min_length=1)]
class DomainListFileUrl(BaseModel):
__root__: Annotated[str, Field(max_length=1024, min_length=1)]
class FilterName(ResourceId):
pass
class FilterValue(DestinationArn):
pass
class FirewallConfig(BaseModel):
"""
Configuration of the firewall behavior provided by DNS Firewall for a single VPC from Amazon Virtual Private Cloud (Amazon VPC).
"""
Id: Optional[ResourceId] = None
ResourceId: Optional[ResourceId] = None
OwnerId: Optional[AccountId] = None
FirewallFailOpen: Optional[MutationProtectionStatus] = None
class FirewallConfigList(BaseModel):
__root__: List[FirewallConfig]
class FirewallDomainImportOperation(Enum):
REPLACE = 'REPLACE'
class Unsigned(Priority):
pass
class FirewallDomainListStatus(Enum):
COMPLETE = 'COMPLETE'
COMPLETE_IMPORT_FAILED = 'COMPLETE_IMPORT_FAILED'
IMPORTING = 'IMPORTING'
DELETING = 'DELETING'
UPDATING = 'UPDATING'
class StatusMessage(BaseModel):
__root__: Annotated[str, Field(max_length=255)]
class ServicePrinciple(BaseModel):
__root__: Annotated[str, Field(max_length=512, min_length=1)]
class Rfc3339TimeString(BaseModel):
__root__: Annotated[str, Field(max_length=40, min_length=20)]
class FirewallDomainListMetadata(BaseModel):
"""
<p>Minimal high-level information for a firewall domain list. The action <a>ListFirewallDomainLists</a> returns an array of these objects. </p> <p>To retrieve full information for a firewall domain list, call <a>GetFirewallDomainList</a> and <a>ListFirewallDomains</a>.</p>
"""
Id: Optional[ResourceId] = None
Arn: Optional[Arn] = None
Name: Optional[Name] = None
CreatorRequestId: Optional[CreatorRequestId] = None
ManagedOwnerName: Optional[ServicePrinciple] = None
class FirewallDomainListMetadataList(BaseModel):
__root__: List[FirewallDomainListMetadata]
class FirewallDomainName(Arn):
pass
class FirewallDomainUpdateOperation(Enum):
ADD = 'ADD'
REMOVE = 'REMOVE'
REPLACE = 'REPLACE'
class FirewallDomains(BaseModel):
__root__: List[FirewallDomainName]
class FirewallRuleGroupStatus(Enum):
COMPLETE = 'COMPLETE'
DELETING = 'DELETING'
UPDATING = 'UPDATING'
class ShareStatus(Enum):
NOT_SHARED = 'NOT_SHARED'
SHARED_WITH_ME = 'SHARED_WITH_ME'
SHARED_BY_ME = 'SHARED_BY_ME'
class FirewallRuleGroupMetadata(BaseModel):
"""
<p>Minimal high-level information for a firewall rule group. The action <a>ListFirewallRuleGroups</a> returns an array of these objects. </p> <p>To retrieve full information for a firewall rule group, call <a>GetFirewallRuleGroup</a> and <a>ListFirewallRules</a>.</p>
"""
Id: Optional[ResourceId] = None
Arn: Optional[Arn] = None
Name: Optional[Name] = None
OwnerId: Optional[AccountId] = None
CreatorRequestId: Optional[CreatorRequestId] = None
ShareStatus: Optional[ShareStatus] = None
class FirewallRuleGroupMetadataList(BaseModel):
__root__: List[FirewallRuleGroupMetadata]
class FirewallRuleGroupPolicy(BaseModel):
__root__: Annotated[str, Field(max_length=5000)]
class ResolverQueryLogConfigPolicy(FirewallRuleGroupPolicy):
pass
class ResolverRulePolicy(FirewallRuleGroupPolicy):
pass
class Ip(BaseModel):
__root__: Annotated[str, Field(max_length=36, min_length=7)]
class IpAddressCount(Priority):
pass
class SubnetId(BaseModel):
__root__: Annotated[str, Field(max_length=32, min_length=1)]
class IpAddressRequest(BaseModel):
"""
In a <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_CreateResolverEndpoint.html">CreateResolverEndpoint</a> request, the IP address that DNS queries originate from (for outbound endpoints) or that you forward DNS queries to (for inbound endpoints). <code>IpAddressRequest</code> also includes the ID of the subnet that contains the IP address.
"""
SubnetId: SubnetId
Ip: Optional[Ip] = None
class IpAddressStatus(Enum):
CREATING = 'CREATING'
FAILED_CREATION = 'FAILED_CREATION'
ATTACHING = 'ATTACHING'
ATTACHED = 'ATTACHED'
REMAP_DETACHING = 'REMAP_DETACHING'
REMAP_ATTACHING = 'REMAP_ATTACHING'
DETACHING = 'DETACHING'
FAILED_RESOURCE_GONE = 'FAILED_RESOURCE_GONE'
DELETING = 'DELETING'
DELETE_FAILED_FAS_EXPIRED = 'DELETE_FAILED_FAS_EXPIRED'
class IpAddressResponse(BaseModel):
"""
In the response to a <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_GetResolverEndpoint.html">GetResolverEndpoint</a> request, information about the IP addresses that the Resolver endpoint uses for DNS queries.
"""
IpId: Optional[ResourceId] = None
SubnetId: Optional[SubnetId] = None
Ip: Optional[Ip] = None
Status: Optional[IpAddressStatus] = None
StatusMessage: Optional[StatusMessage] = None
CreationTime: Optional[Rfc3339TimeString] = None
ModificationTime: Optional[Rfc3339TimeString] = None
class IpAddressesResponse(BaseModel):
__root__: List[IpAddressResponse]
class ListDomainMaxResults(BaseModel):
__root__: Annotated[int, Field(ge=1.0, le=5000.0)]
class ListFirewallConfigsMaxResult(BaseModel):
__root__: Annotated[int, Field(ge=5.0, le=10.0)]
class NextToken(BaseModel):
__root__: str
class MaxResults(BaseModel):
__root__: Annotated[int, Field(ge=1.0, le=100.0)]
class SortByKey(ResourceId):
pass
class SortOrder(Enum):
ASCENDING = 'ASCENDING'
DESCENDING = 'DESCENDING'
class Port(BaseModel):
__root__: Annotated[int, Field(ge=0.0, le=65535.0)]
class ResolverDNSSECValidationStatus(Enum):
ENABLING = 'ENABLING'
ENABLED = 'ENABLED'
DISABLING = 'DISABLING'
DISABLED = 'DISABLED'
class ResolverEndpointStatus(Enum):
CREATING = 'CREATING'
OPERATIONAL = 'OPERATIONAL'
UPDATING = 'UPDATING'
AUTO_RECOVERING = 'AUTO_RECOVERING'
ACTION_NEEDED = 'ACTION_NEEDED'
DELETING = 'DELETING'
class ResolverQueryLogConfigStatus(Enum):
CREATING = 'CREATING'
CREATED = 'CREATED'
DELETING = 'DELETING'
FAILED = 'FAILED'
class ResolverQueryLogConfigAssociationStatus(Enum):
CREATING = 'CREATING'
ACTIVE = 'ACTIVE'
ACTION_NEEDED = 'ACTION_NEEDED'
DELETING = 'DELETING'
FAILED = 'FAILED'
class ResolverQueryLogConfigAssociationError(Enum):
NONE = 'NONE'
DESTINATION_NOT_FOUND = 'DESTINATION_NOT_FOUND'
ACCESS_DENIED = 'ACCESS_DENIED'
INTERNAL_SERVICE_ERROR = 'INTERNAL_SERVICE_ERROR'
class ResolverQueryLogConfigAssociationErrorMessage(NextToken):
pass
class ResolverRuleStatus(Enum):
COMPLETE = 'COMPLETE'
DELETING = 'DELETING'
UPDATING = 'UPDATING'
FAILED = 'FAILED'
class ResolverRuleAssociationStatus(Enum):
CREATING = 'CREATING'
COMPLETE = 'COMPLETE'
DELETING = 'DELETING'
FAILED = 'FAILED'
OVERRIDDEN = 'OVERRIDDEN'
class TagKey(BaseModel):
__root__: Annotated[str, Field(max_length=128, min_length=1)]
class TagValue(BaseModel):
__root__: Annotated[str, Field(max_length=256, min_length=0)]
class Tag(BaseModel):
"""
One tag that you want to add to the specified resource. A tag consists of a <code>Key</code> (a name for the tag) and a <code>Value</code>.
"""
Key: TagKey
Value: TagValue
class TagKeyList(BaseModel):
__root__: Annotated[List[TagKey], Field(max_items=200)]
class TargetAddress(BaseModel):
"""
In a <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_CreateResolverRule.html">CreateResolverRule</a> request, an array of the IPs that you want to forward DNS queries to.
"""
Ip: Ip
Port: Optional[Port] = None
class Validation(Enum):
ENABLE = 'ENABLE'
DISABLE = 'DISABLE'
class AssociateResolverQueryLogConfigRequest(BaseModel):
ResolverQueryLogConfigId: ResourceId
ResourceId: ResourceId
class AssociateResolverRuleRequest(BaseModel):
ResolverRuleId: ResourceId
Name: Optional[Name] = None
VPCId: ResourceId
class CreateFirewallRuleRequest(BaseModel):
CreatorRequestId: CreatorRequestId
FirewallRuleGroupId: ResourceId
FirewallDomainListId: ResourceId
Priority: Priority
Action: Action
BlockResponse: Optional[BlockResponse] = None
BlockOverrideDomain: Optional[BlockOverrideDomain] = None
BlockOverrideDnsType: Optional[BlockOverrideDnsType] = None
BlockOverrideTtl: Optional[BlockOverrideTtl] = None
Name: Name
class DeleteFirewallDomainListRequest(BaseModel):
FirewallDomainListId: ResourceId
class DeleteFirewallRuleRequest(BaseModel):
FirewallRuleGroupId: ResourceId
FirewallDomainListId: ResourceId
class DeleteFirewallRuleGroupRequest(BaseModel):
FirewallRuleGroupId: ResourceId
class DeleteResolverEndpointRequest(BaseModel):
ResolverEndpointId: ResourceId
class DeleteResolverQueryLogConfigRequest(BaseModel):
ResolverQueryLogConfigId: ResourceId
class DeleteResolverRuleRequest(BaseModel):
ResolverRuleId: ResourceId
class DisassociateFirewallRuleGroupRequest(BaseModel):
FirewallRuleGroupAssociationId: ResourceId
class DisassociateResolverQueryLogConfigRequest(BaseModel):
ResolverQueryLogConfigId: ResourceId
ResourceId: ResourceId
class DisassociateResolverRuleRequest(BaseModel):
VPCId: ResourceId
ResolverRuleId: ResourceId
class GetFirewallConfigResponse(BaseModel):
FirewallConfig: Optional[FirewallConfig] = None
class GetFirewallConfigRequest(BaseModel):
ResourceId: ResourceId
class GetFirewallDomainListRequest(BaseModel):
FirewallDomainListId: ResourceId
class GetFirewallRuleGroupRequest(BaseModel):
FirewallRuleGroupId: ResourceId
class GetFirewallRuleGroupAssociationRequest(BaseModel):
FirewallRuleGroupAssociationId: ResourceId
class GetFirewallRuleGroupPolicyResponse(BaseModel):
FirewallRuleGroupPolicy: Optional[FirewallRuleGroupPolicy] = None
class GetFirewallRuleGroupPolicyRequest(BaseModel):
Arn: Arn
class GetResolverDnssecConfigRequest(BaseModel):
ResourceId: ResourceId
class GetResolverEndpointRequest(BaseModel):
ResolverEndpointId: ResourceId
class GetResolverQueryLogConfigRequest(BaseModel):
ResolverQueryLogConfigId: ResourceId
class GetResolverQueryLogConfigAssociationRequest(BaseModel):
ResolverQueryLogConfigAssociationId: ResourceId
class GetResolverQueryLogConfigPolicyResponse(BaseModel):
ResolverQueryLogConfigPolicy: Optional[ResolverQueryLogConfigPolicy] = None
class GetResolverQueryLogConfigPolicyRequest(BaseModel):
Arn: Arn
class GetResolverRuleRequest(BaseModel):
ResolverRuleId: ResourceId
class GetResolverRuleAssociationRequest(BaseModel):
ResolverRuleAssociationId: ResourceId
class GetResolverRulePolicyResponse(BaseModel):
ResolverRulePolicy: Optional[ResolverRulePolicy] = None
class GetResolverRulePolicyRequest(BaseModel):
Arn: Arn
class ImportFirewallDomainsResponse(BaseModel):
Id: Optional[ResourceId] = None
Name: Optional[Name] = None
Status: Optional[FirewallDomainListStatus] = None
StatusMessage: Optional[StatusMessage] = None
class ImportFirewallDomainsRequest(BaseModel):
FirewallDomainListId: ResourceId
Operation: FirewallDomainImportOperation
DomainFileUrl: DomainListFileUrl
class ListFirewallConfigsResponse(BaseModel):
NextToken: Optional[NextToken] = None
FirewallConfigs: Optional[FirewallConfigList] = None
class ListFirewallConfigsRequest(BaseModel):
MaxResults: Optional[ListFirewallConfigsMaxResult] = None
NextToken: Optional[NextToken] = None
class ListFirewallDomainListsResponse(BaseModel):
NextToken: Optional[NextToken] = None
FirewallDomainLists: Optional[FirewallDomainListMetadataList] = None
class ListFirewallDomainListsRequest(BaseModel):
MaxResults: Optional[MaxResults] = None
NextToken: Optional[NextToken] = None
class ListFirewallDomainsResponse(BaseModel):
NextToken: Optional[NextToken] = None
Domains: Optional[FirewallDomains] = None
class ListFirewallDomainsRequest(BaseModel):
FirewallDomainListId: ResourceId
MaxResults: Optional[ListDomainMaxResults] = None
NextToken: Optional[NextToken] = None
class ListFirewallRuleGroupAssociationsRequest(BaseModel):
FirewallRuleGroupId: Optional[ResourceId] = None
VpcId: Optional[ResourceId] = None
Priority: Optional[Priority] = None
Status: Optional[FirewallRuleGroupStatus] = None
MaxResults: Optional[MaxResults] = None
NextToken: Optional[NextToken] = None
class ListFirewallRuleGroupsResponse(BaseModel):
NextToken: Optional[NextToken] = None
FirewallRuleGroups: Optional[FirewallRuleGroupMetadataList] = None
class ListFirewallRuleGroupsRequest(BaseModel):
MaxResults: Optional[MaxResults] = None
NextToken: Optional[NextToken] = None
class ListFirewallRulesRequest(BaseModel):
FirewallRuleGroupId: ResourceId
Priority: Optional[Priority] = None
Action: Optional[Action] = None
MaxResults: Optional[MaxResults] = None
NextToken: Optional[NextToken] = None
class ListResolverEndpointIpAddressesResponse(BaseModel):
NextToken: Optional[NextToken] = None
MaxResults: Optional[MaxResults] = None
IpAddresses: Optional[IpAddressesResponse] = None
class ListResolverEndpointIpAddressesRequest(BaseModel):
ResolverEndpointId: ResourceId
MaxResults: Optional[MaxResults] = None
NextToken: Optional[NextToken] = None
class ListTagsForResourceRequest(BaseModel):
ResourceArn: Arn
MaxResults: Optional[MaxResults] = None
NextToken: Optional[NextToken] = None
class PutFirewallRuleGroupPolicyResponse(BaseModel):
ReturnValue: Optional[Boolean] = None
class PutFirewallRuleGroupPolicyRequest(BaseModel):
Arn: Arn
FirewallRuleGroupPolicy: FirewallRuleGroupPolicy
class PutResolverQueryLogConfigPolicyResponse(PutFirewallRuleGroupPolicyResponse):
"""
The response to a <code>PutResolverQueryLogConfigPolicy</code> request.
"""
pass
class PutResolverQueryLogConfigPolicyRequest(BaseModel):
Arn: Arn
ResolverQueryLogConfigPolicy: ResolverQueryLogConfigPolicy
class PutResolverRulePolicyResponse(PutFirewallRuleGroupPolicyResponse):
"""
The response to a <code>PutResolverRulePolicy</code> request.
"""
pass
class PutResolverRulePolicyRequest(BaseModel):
Arn: Arn
ResolverRulePolicy: ResolverRulePolicy
class UntagResourceRequest(BaseModel):
ResourceArn: Arn
TagKeys: TagKeyList
class UpdateFirewallConfigResponse(GetFirewallConfigResponse):
pass
class UpdateFirewallConfigRequest(BaseModel):
ResourceId: ResourceId
FirewallFailOpen: MutationProtectionStatus
class UpdateFirewallDomainsResponse(ImportFirewallDomainsResponse):
pass
class UpdateFirewallDomainsRequest(BaseModel):
FirewallDomainListId: ResourceId
Operation: FirewallDomainUpdateOperation
Domains: FirewallDomains
class UpdateFirewallRuleRequest(BaseModel):
FirewallRuleGroupId: ResourceId
FirewallDomainListId: ResourceId
Priority: Optional[Priority] = None
Action: Optional[Action] = None
BlockResponse: Optional[BlockResponse] = None
BlockOverrideDomain: Optional[BlockOverrideDomain] = None
BlockOverrideDnsType: Optional[BlockOverrideDnsType] = None
BlockOverrideTtl: Optional[BlockOverrideTtl] = None
Name: Optional[Name] = None
class UpdateFirewallRuleGroupAssociationRequest(BaseModel):
FirewallRuleGroupAssociationId: ResourceId
Priority: Optional[Priority] = None
MutationProtection: Optional[MutationProtectionStatus] = None
Name: Optional[Name] = None
class UpdateResolverDnssecConfigRequest(BaseModel):
ResourceId: ResourceId
Validation: Validation
class UpdateResolverEndpointRequest(BaseModel):
ResolverEndpointId: ResourceId
Name: Optional[Name] = None
class TagList(BaseModel):
__root__: Annotated[List[Tag], Field(max_items=200)]
class FirewallRuleGroupAssociation(BaseModel):
"""
An association between a firewall rule group and a VPC, which enables DNS filtering for the VPC.
"""
Id: Optional[ResourceId] = None
Arn: Optional[Arn] = None
FirewallRuleGroupId: Optional[ResourceId] = None
VpcId: Optional[ResourceId] = None
Name: Optional[Name] = None
Priority: Optional[Priority] = None
MutationProtection: Optional[MutationProtectionStatus] = None
ManagedOwnerName: Optional[ServicePrinciple] = None
Status: Optional[FirewallRuleGroupStatus] = None
StatusMessage: Optional[StatusMessage] = None
CreatorRequestId: Optional[CreatorRequestId] = None
CreationTime: Optional[Rfc3339TimeString] = None
ModificationTime: Optional[Rfc3339TimeString] = None
class IpAddressUpdate(BaseModel):
"""
In an <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_UpdateResolverEndpoint.html">UpdateResolverEndpoint</a> request, information about an IP address to update.
"""
IpId: Optional[ResourceId] = None
SubnetId: Optional[SubnetId] = None
Ip: Optional[Ip] = None
class ResolverEndpoint(BaseModel):
"""
In the response to a <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_CreateResolverEndpoint.html">CreateResolverEndpoint</a>, <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_DeleteResolverEndpoint.html">DeleteResolverEndpoint</a>, <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_GetResolverEndpoint.html">GetResolverEndpoint</a>, <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverEndpoints.html">ListResolverEndpoints</a>, or <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_UpdateResolverEndpoint.html">UpdateResolverEndpoint</a> request, a complex type that contains settings for an existing inbound or outbound Resolver endpoint.
"""
Id: Optional[ResourceId] = None
CreatorRequestId: Optional[CreatorRequestId] = None
Arn: Optional[Arn] = None
Name: Optional[Name] = None
SecurityGroupIds: Optional[SecurityGroupIds] = None
Direction: Optional[ResolverEndpointDirection] = None
IpAddressCount: Optional[IpAddressCount] = None
HostVPCId: Optional[ResourceId] = None
Status: Optional[ResolverEndpointStatus] = None
StatusMessage: Optional[StatusMessage] = None
CreationTime: Optional[Rfc3339TimeString] = None
ModificationTime: Optional[Rfc3339TimeString] = None
class ResolverQueryLogConfigAssociation(BaseModel):
"""
In the response to an <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_AssociateResolverQueryLogConfig.html">AssociateResolverQueryLogConfig</a>, <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_DisassociateResolverQueryLogConfig.html">DisassociateResolverQueryLogConfig</a>, <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_GetResolverQueryLogConfigAssociation.html">GetResolverQueryLogConfigAssociation</a>, or <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverQueryLogConfigAssociations.html">ListResolverQueryLogConfigAssociations</a>, request, a complex type that contains settings for a specified association between an Amazon VPC and a query logging configuration.
"""
Id: Optional[ResourceId] = None
ResolverQueryLogConfigId: Optional[ResourceId] = None
ResourceId: Optional[ResourceId] = None
Status: Optional[ResolverQueryLogConfigAssociationStatus] = None
Error: Optional[ResolverQueryLogConfigAssociationError] = None
ErrorMessage: Optional[ResolverQueryLogConfigAssociationErrorMessage] = None
CreationTime: Optional[Rfc3339TimeString] = None
class ResolverRuleAssociation(BaseModel):
"""
In the response to an <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_AssociateResolverRule.html">AssociateResolverRule</a>, <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_DisassociateResolverRule.html">DisassociateResolverRule</a>, or <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverRuleAssociations.html">ListResolverRuleAssociations</a> request, provides information about an association between a Resolver rule and a VPC. The association determines which DNS queries that originate in the VPC are forwarded to your network.
"""
Id: Optional[ResourceId] = None
ResolverRuleId: Optional[ResourceId] = None
Name: Optional[Name] = None
VPCId: Optional[ResourceId] = None
Status: Optional[ResolverRuleAssociationStatus] = None
StatusMessage: Optional[StatusMessage] = None
class FirewallDomainList(BaseModel):
"""
<p>High-level information about a list of firewall domains for use in a <a>FirewallRule</a>. This is returned by <a>GetFirewallDomainList</a>.</p> <p>To retrieve the domains that are defined for this domain list, call <a>ListFirewallDomains</a>.</p>
"""
Id: Optional[ResourceId] = None
Arn: Optional[Arn] = None
Name: Optional[Name] = None
DomainCount: Optional[Unsigned] = None
Status: Optional[FirewallDomainListStatus] = None
StatusMessage: Optional[StatusMessage] = None
ManagedOwnerName: Optional[ServicePrinciple] = None
CreatorRequestId: Optional[CreatorRequestId] = None
CreationTime: Optional[Rfc3339TimeString] = None
ModificationTime: Optional[Rfc3339TimeString] = None
class FirewallRuleGroup(BaseModel):
"""
High-level information for a firewall rule group. A firewall rule group is a collection of rules that DNS Firewall uses to filter DNS network traffic for a VPC. To retrieve the rules for the rule group, call <a>ListFirewallRules</a>.
"""
Id: Optional[ResourceId] = None
Arn: Optional[Arn] = None
Name: Optional[Name] = None
RuleCount: Optional[Unsigned] = None
Status: Optional[FirewallRuleGroupStatus] = None
StatusMessage: Optional[StatusMessage] = None
OwnerId: Optional[AccountId] = None
CreatorRequestId: Optional[CreatorRequestId] = None
ShareStatus: Optional[ShareStatus] = None
CreationTime: Optional[Rfc3339TimeString] = None
ModificationTime: Optional[Rfc3339TimeString] = None
class FirewallRule(BaseModel):
"""
A single firewall rule in a rule group.
"""
FirewallRuleGroupId: Optional[ResourceId] = None
FirewallDomainListId: Optional[ResourceId] = None
Name: Optional[Name] = None
Priority: Optional[Priority] = None
Action: Optional[Action] = None
BlockResponse: Optional[BlockResponse] = None
BlockOverrideDomain: Optional[BlockOverrideDomain] = None
BlockOverrideDnsType: Optional[BlockOverrideDnsType] = None
BlockOverrideTtl: Optional[Unsigned] = None
CreatorRequestId: Optional[CreatorRequestId] = None
CreationTime: Optional[Rfc3339TimeString] = None
ModificationTime: Optional[Rfc3339TimeString] = None
class IpAddressesRequest(BaseModel):
__root__: Annotated[List[IpAddressRequest], Field(max_items=10, min_items=1)]
class ResolverQueryLogConfig(BaseModel):
"""
In the response to a <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_CreateResolverQueryLogConfig.html">CreateResolverQueryLogConfig</a>, <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_DeleteResolverQueryLogConfig.html">DeleteResolverQueryLogConfig</a>, <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_GetResolverQueryLogConfig.html">GetResolverQueryLogConfig</a>, or <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverQueryLogConfigs.html">ListResolverQueryLogConfigs</a> request, a complex type that contains settings for one query logging configuration.
"""
Id: Optional[ResourceId] = None
OwnerId: Optional[AccountId] = None
Status: Optional[ResolverQueryLogConfigStatus] = None
ShareStatus: Optional[ShareStatus] = None
AssociationCount: Optional[Count] = None
Arn: Optional[Arn] = None
Name: Optional[ResolverQueryLogConfigName] = None
DestinationArn: Optional[DestinationArn] = None
CreatorRequestId: Optional[CreatorRequestId] = None
CreationTime: Optional[Rfc3339TimeString] = None
class TargetList(BaseModel):
__root__: Annotated[List[TargetAddress], Field(min_items=1)]
class ResolverRule(BaseModel):
"""
For queries that originate in your VPC, detailed information about a Resolver rule, which specifies how to route DNS queries out of the VPC. The <code>ResolverRule</code> parameter appears in the response to a <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_CreateResolverRule.html">CreateResolverRule</a>, <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_DeleteResolverRule.html">DeleteResolverRule</a>, <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_GetResolverRule.html">GetResolverRule</a>, <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverRules.html">ListResolverRules</a>, or <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_UpdateResolverRule.html">UpdateResolverRule</a> request.
"""
Id: Optional[ResourceId] = None
CreatorRequestId: Optional[CreatorRequestId] = None
Arn: Optional[Arn] = None
DomainName: Optional[DomainName] = None
Status: Optional[ResolverRuleStatus] = None
StatusMessage: Optional[StatusMessage] = None
RuleType: Optional[RuleTypeOption] = None
Name: Optional[Name] = None
TargetIps: Optional[TargetList] = None
ResolverEndpointId: Optional[ResourceId] = None
OwnerId: Optional[AccountId] = None
ShareStatus: Optional[ShareStatus] = None
CreationTime: Optional[Rfc3339TimeString] = None
ModificationTime: Optional[Rfc3339TimeString] = None
class FilterValues(BaseModel):
__root__: List[FilterValue]
class Filter(BaseModel):
"""
<p>For Resolver list operations (<a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverEndpoints.html">ListResolverEndpoints</a>, <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverRules.html">ListResolverRules</a>, <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverRuleAssociations.html">ListResolverRuleAssociations</a>, <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverQueryLogConfigs.html">ListResolverQueryLogConfigs</a>, <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverQueryLogConfigAssociations.html">ListResolverQueryLogConfigAssociations</a>), and <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverDnssecConfigs.html">ListResolverDnssecConfigs</a>), an optional specification to return a subset of objects.</p> <p>To filter objects, such as Resolver endpoints or Resolver rules, you specify <code>Name</code> and <code>Values</code>. For example, to list only inbound Resolver endpoints, specify <code>Direction</code> for <code>Name</code> and specify <code>INBOUND</code> for <code>Values</code>. </p>
"""
Name: Optional[FilterName] = None
Values: Optional[FilterValues] = None
class Filters(BaseModel):
__root__: List[Filter]
class FirewallRuleGroupAssociations(BaseModel):
__root__: List[FirewallRuleGroupAssociation]
class FirewallRules(BaseModel):
__root__: List[FirewallRule]
class ResolverDnssecConfig(BaseModel):
"""
A complex type that contains information about a configuration for DNSSEC validation.
"""
Id: Optional[ResourceId] = None
OwnerId: Optional[AccountId] = None
ResourceId: Optional[ResourceId] = None
ValidationStatus: Optional[ResolverDNSSECValidationStatus] = None
class ResolverDnssecConfigList(BaseModel):
__root__: List[ResolverDnssecConfig]
class ResolverEndpoints(BaseModel):
__root__: List[ResolverEndpoint]
class ResolverQueryLogConfigAssociationList(BaseModel):
__root__: List[ResolverQueryLogConfigAssociation]
class ResolverQueryLogConfigList(BaseModel):
__root__: List[ResolverQueryLogConfig]
class ResolverRuleAssociations(BaseModel):
__root__: List[ResolverRuleAssociation]
class ResolverRules(BaseModel):
__root__: List[ResolverRule]
class ResolverRuleConfig(BaseModel):
"""
In an <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_UpdateResolverRule.html">UpdateResolverRule</a> request, information about the changes that you want to make.
"""
Name: Optional[Name] = None
TargetIps: Optional[TargetList] = None
ResolverEndpointId: Optional[ResourceId] = None
class AssociateFirewallRuleGroupResponse(BaseModel):
FirewallRuleGroupAssociation: Optional[FirewallRuleGroupAssociation] = None
class AssociateFirewallRuleGroupRequest(BaseModel):
CreatorRequestId: CreatorRequestId
FirewallRuleGroupId: ResourceId
VpcId: ResourceId
Priority: Priority
Name: Name
MutationProtection: Optional[MutationProtectionStatus] = None
Tags: Optional[TagList] = None
class AssociateResolverEndpointIpAddressResponse(BaseModel):
ResolverEndpoint: Optional[ResolverEndpoint] = None
class AssociateResolverEndpointIpAddressRequest(BaseModel):
ResolverEndpointId: ResourceId
IpAddress: IpAddressUpdate
class AssociateResolverQueryLogConfigResponse(BaseModel):
ResolverQueryLogConfigAssociation: Optional[
ResolverQueryLogConfigAssociation
] = None
class AssociateResolverRuleResponse(BaseModel):
ResolverRuleAssociation: Optional[ResolverRuleAssociation] = None
class CreateFirewallDomainListResponse(BaseModel):
FirewallDomainList: Optional[FirewallDomainList] = None
class CreateFirewallDomainListRequest(BaseModel):
CreatorRequestId: CreatorRequestId
Name: Name
Tags: Optional[TagList] = None
class CreateFirewallRuleResponse(BaseModel):
FirewallRule: Optional[FirewallRule] = None
class CreateFirewallRuleGroupResponse(BaseModel):
FirewallRuleGroup: Optional[FirewallRuleGroup] = None
class CreateFirewallRuleGroupRequest(BaseModel):
CreatorRequestId: CreatorRequestId
Name: Name
Tags: Optional[TagList] = None
class CreateResolverEndpointResponse(AssociateResolverEndpointIpAddressResponse):
pass
class CreateResolverEndpointRequest(BaseModel):
CreatorRequestId: CreatorRequestId
Name: Optional[Name] = None
SecurityGroupIds: SecurityGroupIds
Direction: ResolverEndpointDirection
IpAddresses: IpAddressesRequest
Tags: Optional[TagList] = None
class CreateResolverQueryLogConfigResponse(BaseModel):
ResolverQueryLogConfig: Optional[ResolverQueryLogConfig] = None
class CreateResolverQueryLogConfigRequest(BaseModel):
Name: ResolverQueryLogConfigName
DestinationArn: DestinationArn
CreatorRequestId: CreatorRequestId
Tags: Optional[TagList] = None
class CreateResolverRuleResponse(BaseModel):
ResolverRule: Optional[ResolverRule] = None
class CreateResolverRuleRequest(BaseModel):
CreatorRequestId: CreatorRequestId
Name: Optional[Name] = None
RuleType: RuleTypeOption
DomainName: DomainName
TargetIps: Optional[TargetList] = None
ResolverEndpointId: Optional[ResourceId] = None
Tags: Optional[TagList] = None
class DeleteFirewallDomainListResponse(CreateFirewallDomainListResponse):
pass
class DeleteFirewallRuleResponse(CreateFirewallRuleResponse):
pass
class DeleteFirewallRuleGroupResponse(CreateFirewallRuleGroupResponse):
pass
class DeleteResolverEndpointResponse(AssociateResolverEndpointIpAddressResponse):
pass
class DeleteResolverQueryLogConfigResponse(CreateResolverQueryLogConfigResponse):
pass
class DeleteResolverRuleResponse(CreateResolverRuleResponse):
pass
class DisassociateFirewallRuleGroupResponse(AssociateFirewallRuleGroupResponse):
pass
class DisassociateResolverEndpointIpAddressResponse(
AssociateResolverEndpointIpAddressResponse
):
pass
class DisassociateResolverEndpointIpAddressRequest(BaseModel):
ResolverEndpointId: ResourceId
IpAddress: IpAddressUpdate
class DisassociateResolverQueryLogConfigResponse(
AssociateResolverQueryLogConfigResponse
):
pass
class DisassociateResolverRuleResponse(AssociateResolverRuleResponse):
pass
class GetFirewallDomainListResponse(CreateFirewallDomainListResponse):
pass
class GetFirewallRuleGroupResponse(CreateFirewallRuleGroupResponse):
pass
class GetFirewallRuleGroupAssociationResponse(AssociateFirewallRuleGroupResponse):
pass
class GetResolverDnssecConfigResponse(BaseModel):
ResolverDNSSECConfig: Optional[ResolverDnssecConfig] = None
class GetResolverEndpointResponse(AssociateResolverEndpointIpAddressResponse):
pass
class GetResolverQueryLogConfigResponse(CreateResolverQueryLogConfigResponse):
pass
class GetResolverQueryLogConfigAssociationResponse(
AssociateResolverQueryLogConfigResponse
):
pass
class GetResolverRuleResponse(CreateResolverRuleResponse):
pass
class GetResolverRuleAssociationResponse(AssociateResolverRuleResponse):
pass
class ListFirewallRuleGroupAssociationsResponse(BaseModel):
NextToken: Optional[NextToken] = None
FirewallRuleGroupAssociations: Optional[FirewallRuleGroupAssociations] = None
class ListFirewallRulesResponse(BaseModel):
NextToken: Optional[NextToken] = None
FirewallRules: Optional[FirewallRules] = None
class ListResolverDnssecConfigsResponse(BaseModel):
NextToken: Optional[NextToken] = None
ResolverDnssecConfigs: Optional[ResolverDnssecConfigList] = None
class ListResolverDnssecConfigsRequest(BaseModel):
MaxResults: Optional[MaxResults] = None
NextToken: Optional[NextToken] = None
Filters: Optional[Filters] = None
class ListResolverEndpointsResponse(BaseModel):
NextToken: Optional[NextToken] = None
MaxResults: Optional[MaxResults] = None
ResolverEndpoints: Optional[ResolverEndpoints] = None
class ListResolverEndpointsRequest(BaseModel):
MaxResults: Optional[MaxResults] = None
NextToken: Optional[NextToken] = None
Filters: Optional[Filters] = None
class ListResolverQueryLogConfigAssociationsResponse(BaseModel):
NextToken: Optional[NextToken] = None
TotalCount: Optional[Count] = None
TotalFilteredCount: Optional[Count] = None
ResolverQueryLogConfigAssociations: Optional[
ResolverQueryLogConfigAssociationList
] = None
class ListResolverQueryLogConfigAssociationsRequest(BaseModel):
MaxResults: Optional[MaxResults] = None
NextToken: Optional[NextToken] = None
Filters: Optional[Filters] = None
SortBy: Optional[SortByKey] = None
SortOrder: Optional[SortOrder] = None
class ListResolverQueryLogConfigsResponse(BaseModel):
NextToken: Optional[NextToken] = None
TotalCount: Optional[Count] = None
TotalFilteredCount: Optional[Count] = None
ResolverQueryLogConfigs: Optional[ResolverQueryLogConfigList] = None
class ListResolverQueryLogConfigsRequest(BaseModel):
MaxResults: Optional[MaxResults] = None
NextToken: Optional[NextToken] = None
Filters: Optional[Filters] = None
SortBy: Optional[SortByKey] = None
SortOrder: Optional[SortOrder] = None
class ListResolverRuleAssociationsResponse(BaseModel):
NextToken: Optional[NextToken] = None
MaxResults: Optional[MaxResults] = None
ResolverRuleAssociations: Optional[ResolverRuleAssociations] = None
class ListResolverRuleAssociationsRequest(BaseModel):
MaxResults: Optional[MaxResults] = None
NextToken: Optional[NextToken] = None
Filters: Optional[Filters] = None
class ListResolverRulesResponse(BaseModel):
NextToken: Optional[NextToken] = None
MaxResults: Optional[MaxResults] = None
ResolverRules: Optional[ResolverRules] = None
class ListResolverRulesRequest(BaseModel):
MaxResults: Optional[MaxResults] = None
NextToken: Optional[NextToken] = None
Filters: Optional[Filters] = None
class ListTagsForResourceResponse(BaseModel):
Tags: Optional[TagList] = None
NextToken: Optional[NextToken] = None
class TagResourceRequest(BaseModel):
ResourceArn: Arn
Tags: TagList
class UpdateFirewallRuleResponse(CreateFirewallRuleResponse):
pass
class UpdateFirewallRuleGroupAssociationResponse(AssociateFirewallRuleGroupResponse):
pass
class UpdateResolverDnssecConfigResponse(GetResolverDnssecConfigResponse):
pass
class UpdateResolverEndpointResponse(AssociateResolverEndpointIpAddressResponse):
pass
class UpdateResolverRuleResponse(CreateResolverRuleResponse):
pass
class UpdateResolverRuleRequest(BaseModel):
ResolverRuleId: ResourceId
Config_: Annotated[ResolverRuleConfig, Field(alias='Config')]
| 30.191934
| 1,296
| 0.775497
| 3,583
| 40,427
| 8.65755
| 0.153224
| 0.02089
| 0.010316
| 0.014442
| 0.420793
| 0.37392
| 0.346744
| 0.319439
| 0.297582
| 0.256254
| 0
| 0.009354
| 0.140599
| 40,427
| 1,338
| 1,297
| 30.214499
| 0.883487
| 0.202464
| 0
| 0.465296
| 1
| 0
| 0.023912
| 0.004576
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.09126
| 0.014139
| 0
| 0.916452
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
6c56c27a841008e4d849450b5953cbdc40a13b09
| 131
|
py
|
Python
|
picamera2/__init__.py
|
IanTBlack/picamera2
|
4d31a56cdb0d8360e71927e754fc6bef50bec360
|
[
"BSD-2-Clause"
] | 71
|
2022-02-15T14:24:34.000Z
|
2022-03-29T16:36:46.000Z
|
picamera2/__init__.py
|
IanTBlack/picamera2
|
4d31a56cdb0d8360e71927e754fc6bef50bec360
|
[
"BSD-2-Clause"
] | 37
|
2022-02-16T12:35:45.000Z
|
2022-03-31T13:18:42.000Z
|
picamera2/__init__.py
|
IanTBlack/picamera2
|
4d31a56cdb0d8360e71927e754fc6bef50bec360
|
[
"BSD-2-Clause"
] | 15
|
2022-02-16T12:12:57.000Z
|
2022-03-31T15:17:58.000Z
|
from .picamera2 import Picamera2, Preview
from .request import CompletedRequest, MappedArray
from .converters import YUV420_to_RGB
| 32.75
| 50
| 0.854962
| 16
| 131
| 6.875
| 0.6875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.042735
| 0.10687
| 131
| 3
| 51
| 43.666667
| 0.897436
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
6c5fa31b3d8e710b2b9d8edc370d490c564dfba2
| 153
|
py
|
Python
|
store/urls.py
|
Sonwalkar/apiforstore
|
1f845f4bb071cfed8f08f7d113a64fe22ec54ad7
|
[
"MIT"
] | null | null | null |
store/urls.py
|
Sonwalkar/apiforstore
|
1f845f4bb071cfed8f08f7d113a64fe22ec54ad7
|
[
"MIT"
] | null | null | null |
store/urls.py
|
Sonwalkar/apiforstore
|
1f845f4bb071cfed8f08f7d113a64fe22ec54ad7
|
[
"MIT"
] | null | null | null |
from django.urls import path
from django.urls.resolvers import URLPattern
from . import views
urlpatterns = [
path("", views.index, name="index")
]
| 19.125
| 44
| 0.732026
| 20
| 153
| 5.6
| 0.55
| 0.178571
| 0.25
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.156863
| 153
| 8
| 45
| 19.125
| 0.868217
| 0
| 0
| 0
| 0
| 0
| 0.032468
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
6c7e422c7d6422949d25588435c41847c728218e
| 949
|
py
|
Python
|
revscoring/languages/tests/util.py
|
mariushoch/revscoring
|
5ecd54d31c4088b6f142c0ef54116cc5bdce0ff2
|
[
"MIT"
] | null | null | null |
revscoring/languages/tests/util.py
|
mariushoch/revscoring
|
5ecd54d31c4088b6f142c0ef54116cc5bdce0ff2
|
[
"MIT"
] | null | null | null |
revscoring/languages/tests/util.py
|
mariushoch/revscoring
|
5ecd54d31c4088b6f142c0ef54116cc5bdce0ff2
|
[
"MIT"
] | null | null | null |
def compare_extraction(extractor, examples, counter_examples,
lwrap="", rwrap=""):
for example in examples:
wrapped = lwrap + example + rwrap
# print(extractor.process(wrapped), example)
assert extractor.process(wrapped) == [example]
assert extractor.process(
"Sentence " +
wrapped +
" sandwich.") == [example]
assert extractor.process("Sentence end " + wrapped + ".") == [example]
assert extractor.process(wrapped + " start of sentence.") == [example]
for example in counter_examples:
wrapped = lwrap + example + rwrap
assert extractor.process(wrapped) == [], str(extractor.process(wrapped))
assert extractor.process("Sentence " + wrapped + " sandwich.") == []
assert extractor.process("Sentence end " + wrapped + ".") == []
assert extractor.process(wrapped + " start of sentence.") == []
| 41.26087
| 80
| 0.595364
| 85
| 949
| 6.611765
| 0.247059
| 0.284698
| 0.313167
| 0.206406
| 0.715302
| 0.588968
| 0.313167
| 0
| 0
| 0
| 0
| 0
| 0.271865
| 949
| 22
| 81
| 43.136364
| 0.813314
| 0.044257
| 0
| 0.117647
| 0
| 0
| 0.115172
| 0
| 0
| 0
| 0
| 0
| 0.470588
| 1
| 0.058824
| false
| 0
| 0
| 0
| 0.058824
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
668f0217bbcc3803bb9b45c06db4bfdb6eac6366
| 440
|
py
|
Python
|
djmail/utils.py
|
CuriousLearner/djmail
|
da4cd3d4749f116b714f5f509cadc0a5d2cfb9c4
|
[
"BSD-3-Clause"
] | 53
|
2015-06-22T11:24:00.000Z
|
2021-08-30T21:00:08.000Z
|
djmail/utils.py
|
CuriousLearner/djmail
|
da4cd3d4749f116b714f5f509cadc0a5d2cfb9c4
|
[
"BSD-3-Clause"
] | 28
|
2015-11-04T16:11:00.000Z
|
2021-02-24T17:48:14.000Z
|
djmail/utils.py
|
CuriousLearner/djmail
|
da4cd3d4749f116b714f5f509cadc0a5d2cfb9c4
|
[
"BSD-3-Clause"
] | 22
|
2015-07-29T15:53:53.000Z
|
2020-12-21T04:32:26.000Z
|
import base64
import pickle
from django.utils.encoding import force_bytes
from django.utils.encoding import force_str
__all__ = ('force_bytes', 'force_str',
'deserialize_email_message', 'serialize_email_message')
def deserialize_email_message(data):
return pickle.loads(base64.b64decode(force_bytes(data)))
def serialize_email_message(email_message):
return force_str(base64.b64encode(pickle.dumps(email_message)))
| 25.882353
| 67
| 0.793182
| 57
| 440
| 5.77193
| 0.385965
| 0.218845
| 0.091185
| 0.139818
| 0.206687
| 0.206687
| 0
| 0
| 0
| 0
| 0
| 0.025707
| 0.115909
| 440
| 16
| 68
| 27.5
| 0.820051
| 0
| 0
| 0
| 0
| 0
| 0.154545
| 0.109091
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.4
| 0.2
| 0.8
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
66a685c5e4439740be2a0194efdb2486d27b9855
| 210
|
py
|
Python
|
byslib/__init__.py
|
bayashi-cl/byslib-python
|
d7cbb1cb75904e85c353227def7c99a2bceea12c
|
[
"CC0-1.0"
] | null | null | null |
byslib/__init__.py
|
bayashi-cl/byslib-python
|
d7cbb1cb75904e85c353227def7c99a2bceea12c
|
[
"CC0-1.0"
] | null | null | null |
byslib/__init__.py
|
bayashi-cl/byslib-python
|
d7cbb1cb75904e85c353227def7c99a2bceea12c
|
[
"CC0-1.0"
] | null | null | null |
"""
procon library by bayashi-cl
github repository: https://github.com/bayashi-cl/byslib-python
This library can be expanded with expander.
- https://github.com/bayashi-cl/expander
"""
__version__ = "0.1.0"
| 21
| 62
| 0.742857
| 31
| 210
| 4.903226
| 0.645161
| 0.177632
| 0.184211
| 0.276316
| 0.302632
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016129
| 0.114286
| 210
| 9
| 63
| 23.333333
| 0.801075
| 0.847619
| 0
| 0
| 0
| 0
| 0.208333
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
66c35eb3bc8fc33142e422bd174bbbcd02c99455
| 108
|
py
|
Python
|
config.py
|
JCarlosR/WhatsApp-bot-selenium
|
2c8698c60f43d529d45ba021fde9bfeb42d8726c
|
[
"MIT"
] | 1
|
2021-08-09T05:19:00.000Z
|
2021-08-09T05:19:00.000Z
|
config.py
|
marceluphd/WhatsApp-bot-selenium
|
2c8698c60f43d529d45ba021fde9bfeb42d8726c
|
[
"MIT"
] | null | null | null |
config.py
|
marceluphd/WhatsApp-bot-selenium
|
2c8698c60f43d529d45ba021fde9bfeb42d8726c
|
[
"MIT"
] | 1
|
2019-10-13T15:27:05.000Z
|
2019-10-13T15:27:05.000Z
|
executable_path='/var/www/WhatsAppBot/drivers/chromedriver'
user_data_dir='D:\Python\WhatsAppBot\DataChrome'
| 54
| 59
| 0.851852
| 14
| 108
| 6.357143
| 0.928571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009259
| 108
| 2
| 60
| 54
| 0.831776
| 0
| 0
| 0
| 0
| 0
| 0.669725
| 0.669725
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
66c4b626973f1bd493567b55ac19a4287c5592c8
| 123
|
py
|
Python
|
dataloader/transforms_utils/__init__.py
|
UESTC-Liuxin/SkmtSeg
|
1251de57fae967aca395644d1c70a9ba0bb52271
|
[
"Apache-2.0"
] | 2
|
2020-12-22T08:40:05.000Z
|
2021-03-30T08:09:44.000Z
|
dataloader/transforms_utils/__init__.py
|
UESTC-Liuxin/SkmtSeg
|
1251de57fae967aca395644d1c70a9ba0bb52271
|
[
"Apache-2.0"
] | null | null | null |
dataloader/transforms_utils/__init__.py
|
UESTC-Liuxin/SkmtSeg
|
1251de57fae967aca395644d1c70a9ba0bb52271
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
@description:
@author: LiuXin
@contact: xinliu1996@163.com
@Created on: 2020/11/20 上午11:41
"""
| 15.375
| 31
| 0.642276
| 17
| 123
| 4.647059
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.186916
| 0.130081
| 123
| 8
| 32
| 15.375
| 0.551402
| 0.926829
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
66cc3d822e6b317c963f1dd04e7a14fb567ddc72
| 470
|
py
|
Python
|
busgokr/exceptions.py
|
izolight/python-busgokr
|
9aa9a24ed8831421253cddfd30656a44957b8aea
|
[
"BSD-2-Clause-FreeBSD"
] | 1
|
2015-06-30T06:43:15.000Z
|
2015-06-30T06:43:15.000Z
|
busgokr/exceptions.py
|
izolight/python-busgokr
|
9aa9a24ed8831421253cddfd30656a44957b8aea
|
[
"BSD-2-Clause-FreeBSD"
] | null | null | null |
busgokr/exceptions.py
|
izolight/python-busgokr
|
9aa9a24ed8831421253cddfd30656a44957b8aea
|
[
"BSD-2-Clause-FreeBSD"
] | null | null | null |
#!/usr/env/bin python3
class BaseError(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return self.value
class MissingParameters(BaseError):
pass
class ApiError(BaseError):
pass
class IDNotFound(BaseError):
pass
class NameNotFound(BaseError):
pass
class BusRouteNotFound(BaseError):
pass
class NoStationAtPosition(BaseError):
pass
class NoRouteAtPosition(BaseError):
pass
| 12.368421
| 37
| 0.695745
| 48
| 470
| 6.645833
| 0.4375
| 0.285266
| 0.338558
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.002732
| 0.221277
| 470
| 37
| 38
| 12.702703
| 0.868852
| 0.044681
| 0
| 0.368421
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.105263
| false
| 0.368421
| 0
| 0.052632
| 0.578947
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
66d81eac7257d900f2942433511398f58cf52ac4
| 119
|
py
|
Python
|
Proyecto/simulation/set_off_classes/riders/joan_mir.py
|
arnel-sanchez/IA-Sim-Com
|
22023342f20202b260caa759af9cce71d803663e
|
[
"MIT"
] | 2
|
2021-11-20T23:35:20.000Z
|
2021-12-10T17:45:56.000Z
|
Proyecto/simulation/set_off_classes/riders/joan_mir.py
|
arnel-sanchez/IA-Sim-Com
|
22023342f20202b260caa759af9cce71d803663e
|
[
"MIT"
] | null | null | null |
Proyecto/simulation/set_off_classes/riders/joan_mir.py
|
arnel-sanchez/IA-Sim-Com
|
22023342f20202b260caa759af9cce71d803663e
|
[
"MIT"
] | 1
|
2022-02-11T07:24:50.000Z
|
2022-02-11T07:24:50.000Z
|
from simulation.rider import Rider
class Mir(Rider):
def __init__(self):
super().__init__("Mir36", 8, 8)
| 17
| 39
| 0.655462
| 16
| 119
| 4.375
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.042553
| 0.210084
| 119
| 6
| 40
| 19.833333
| 0.702128
| 0
| 0
| 0
| 0
| 0
| 0.042017
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
66de80a1b74ef8d2c4042d9ae2299f7194cf1c12
| 2,063
|
py
|
Python
|
grow/pods/urls_test.py
|
denmojo/pygrow
|
95d32eed8c13a6beb900effa4d18d9fe1e37d2b4
|
[
"MIT"
] | null | null | null |
grow/pods/urls_test.py
|
denmojo/pygrow
|
95d32eed8c13a6beb900effa4d18d9fe1e37d2b4
|
[
"MIT"
] | null | null | null |
grow/pods/urls_test.py
|
denmojo/pygrow
|
95d32eed8c13a6beb900effa4d18d9fe1e37d2b4
|
[
"MIT"
] | null | null | null |
from . import urls
from grow.pods import pods
from grow.testing import testing
import os
import unittest
class UrlTest(unittest.TestCase):
def setUp(self):
dir_path = testing.create_test_pod_dir()
self.pod = pods.Pod(dir_path)
def test_relative_path(self):
relative_path = urls.Url.create_relative_path(
'/foo/bar/baz/', relative_to='/test/dir/')
self.assertEqual('../../foo/bar/baz/', relative_path)
relative_path = urls.Url.create_relative_path(
'/foo/bar/baz/', relative_to='/test/dir/foo/')
self.assertEqual('../../../foo/bar/baz/', relative_path)
relative_path = urls.Url.create_relative_path(
'/', relative_to='/test/dir/foo/')
self.assertEqual('../../../', relative_path)
relative_path = urls.Url.create_relative_path(
'/foo/bar/', relative_to='/')
self.assertEqual('./foo/bar/', relative_path)
relative_path = urls.Url.create_relative_path(
'/foo/bar/', relative_to='/foo/')
self.assertEqual('./bar/', relative_path)
relative_path = urls.Url.create_relative_path(
'http://www.example.com/', relative_to='/foo/')
self.assertEqual('http://www.example.com/', relative_path)
relative_path = urls.Url.create_relative_path(
'https://www.example.com/', relative_to='/foo/')
self.assertEqual('https://www.example.com/', relative_path)
url = urls.Url('/foo/')
relative_path = urls.Url.create_relative_path(
url, relative_to='/foo/')
self.assertEqual('./', relative_path)
url = urls.Url('/foo/test.html')
relative_path = urls.Url.create_relative_path(
url, relative_to='/foo/')
self.assertEqual('./test.html', relative_path)
url = urls.Url('/test.html')
relative_path = urls.Url.create_relative_path(
url, relative_to='/foo/')
self.assertEqual('../test.html', relative_path)
if __name__ == '__main__':
unittest.main()
| 33.819672
| 67
| 0.618517
| 248
| 2,063
| 4.883065
| 0.141129
| 0.307184
| 0.132122
| 0.156895
| 0.801817
| 0.742362
| 0.701073
| 0.669694
| 0.601982
| 0.561519
| 0
| 0
| 0.222492
| 2,063
| 60
| 68
| 34.383333
| 0.754988
| 0
| 0
| 0.288889
| 0
| 0
| 0.1619
| 0.010179
| 0
| 0
| 0
| 0
| 0.222222
| 1
| 0.044444
| false
| 0
| 0.111111
| 0
| 0.177778
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
dd334bdf674f33f7d162f7263d948441cde7805c
| 169
|
py
|
Python
|
bk_library/ebook/forms.py
|
puspita-sahoo/social_library
|
a3918686c86bdb4a4c0f4ce5a7b32be9a19b4c6a
|
[
"MIT"
] | null | null | null |
bk_library/ebook/forms.py
|
puspita-sahoo/social_library
|
a3918686c86bdb4a4c0f4ce5a7b32be9a19b4c6a
|
[
"MIT"
] | null | null | null |
bk_library/ebook/forms.py
|
puspita-sahoo/social_library
|
a3918686c86bdb4a4c0f4ce5a7b32be9a19b4c6a
|
[
"MIT"
] | null | null | null |
from django import forms
from .models import EBooksModel
class UploadBookForm(forms.ModelForm):
class Meta:
model = EBooksModel
fields = "__all__"
| 18.777778
| 38
| 0.704142
| 18
| 169
| 6.388889
| 0.722222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.236686
| 169
| 8
| 39
| 21.125
| 0.891473
| 0
| 0
| 0
| 0
| 0
| 0.04142
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
dd6e9023445efd6c34401ce191795021ca42d272
| 168
|
py
|
Python
|
cerberus_collections/versions.py
|
funkyfuture/cerberuse-collections
|
b6d5c9035e02375fb933c1077221659d483db348
|
[
"ISC"
] | 2
|
2017-08-04T15:01:28.000Z
|
2020-05-15T11:40:25.000Z
|
cerberus_collections/versions.py
|
funkyfuture/cerberuse-collections
|
b6d5c9035e02375fb933c1077221659d483db348
|
[
"ISC"
] | 5
|
2016-09-03T15:25:00.000Z
|
2020-08-31T19:00:44.000Z
|
cerberus_collections/versions.py
|
funkyfuture/cerberuse-collections
|
b6d5c9035e02375fb933c1077221659d483db348
|
[
"ISC"
] | 1
|
2020-01-03T09:37:13.000Z
|
2020-01-03T09:37:13.000Z
|
import cerberus
CERBERUS_VERSION = cerberus.__version__
COLLECTIONS_RELEASE = '2016.09-a1'
__version__ = CERBERUS_VERSION.split('.', 1)[0] + '.' + COLLECTIONS_RELEASE
| 28
| 75
| 0.767857
| 19
| 168
| 6.157895
| 0.578947
| 0.384615
| 0.376068
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.059603
| 0.10119
| 168
| 5
| 76
| 33.6
| 0.715232
| 0
| 0
| 0
| 0
| 0
| 0.071429
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.25
| 0
| 0.25
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
dd72f812bd36b9bef37313d78cca267684f46296
| 230
|
py
|
Python
|
backend/rating/serializers.py
|
ankile/budbua-classifieds
|
5e85edab4747501b0110cf56e1bfea524308dfff
|
[
"MIT"
] | null | null | null |
backend/rating/serializers.py
|
ankile/budbua-classifieds
|
5e85edab4747501b0110cf56e1bfea524308dfff
|
[
"MIT"
] | null | null | null |
backend/rating/serializers.py
|
ankile/budbua-classifieds
|
5e85edab4747501b0110cf56e1bfea524308dfff
|
[
"MIT"
] | null | null | null |
from rest_framework import serializers
from rating.models import Rating
class RatingSerializer(serializers.ModelSerializer):
class Meta:
model = Rating
fields = ('rating_receiver', 'rating_giver', 'rating')
| 23
| 62
| 0.734783
| 24
| 230
| 6.916667
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.186957
| 230
| 9
| 63
| 25.555556
| 0.887701
| 0
| 0
| 0
| 0
| 0
| 0.143478
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
dd7a360361d078acefc19e4532dc2e4dd1e3f05a
| 115
|
py
|
Python
|
regolith/__init__.py
|
yevgenyr/regolith
|
4fc6c7bb2d24d9caf75e977b8e39637f62e5d584
|
[
"CC0-1.0"
] | null | null | null |
regolith/__init__.py
|
yevgenyr/regolith
|
4fc6c7bb2d24d9caf75e977b8e39637f62e5d584
|
[
"CC0-1.0"
] | null | null | null |
regolith/__init__.py
|
yevgenyr/regolith
|
4fc6c7bb2d24d9caf75e977b8e39637f62e5d584
|
[
"CC0-1.0"
] | null | null | null |
# stup import hooks
import xonsh.imphooks
xonsh.imphooks.install_import_hooks()
__version__ = '0.5.0'
del xonsh
| 12.777778
| 37
| 0.773913
| 17
| 115
| 4.882353
| 0.588235
| 0.26506
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.03
| 0.130435
| 115
| 8
| 38
| 14.375
| 0.8
| 0.147826
| 0
| 0
| 0
| 0
| 0.052083
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
dd7b8b503ac787f67382b41d7eb920907d950d6e
| 210
|
py
|
Python
|
LanguageBasics/functions/function_two.py
|
Vamsi-TM/jubilant-train
|
a3ca0216e161ead4f59d923a36587098790beb5d
|
[
"MIT"
] | null | null | null |
LanguageBasics/functions/function_two.py
|
Vamsi-TM/jubilant-train
|
a3ca0216e161ead4f59d923a36587098790beb5d
|
[
"MIT"
] | null | null | null |
LanguageBasics/functions/function_two.py
|
Vamsi-TM/jubilant-train
|
a3ca0216e161ead4f59d923a36587098790beb5d
|
[
"MIT"
] | null | null | null |
"""This is another example for function"""
def print_names(first_name, last_name):
print("this firstname is:" + first_name)
print("The second name is" + last_name)
print_names('Vamsi', 'Mandapati')
| 21
| 44
| 0.704762
| 30
| 210
| 4.733333
| 0.566667
| 0.190141
| 0.183099
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.161905
| 210
| 9
| 45
| 23.333333
| 0.806818
| 0.171429
| 0
| 0
| 0
| 0
| 0.297619
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0
| 0.25
| 1
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
dd9826e4f813beee59688670042cd8b5308c9b0f
| 318
|
py
|
Python
|
section-06-operators/4-logical/2-or.py
|
mugan86/bootcamp-basic-to-expert-from-scratch
|
028aab243386e5a75d84aea319c480ec54913c53
|
[
"MIT"
] | 31
|
2022-01-19T18:33:40.000Z
|
2022-03-29T16:24:44.000Z
|
section-06-operators/4-logical/2-or.py
|
mugan86/bootcamp-basic-to-expert-from-scratch
|
028aab243386e5a75d84aea319c480ec54913c53
|
[
"MIT"
] | 1
|
2022-02-09T17:47:17.000Z
|
2022-02-09T17:47:17.000Z
|
section-06-operators/4-logical/2-or.py
|
mugan86/bootcamp-basic-to-expert-from-scratch
|
028aab243386e5a75d84aea319c480ec54913c53
|
[
"MIT"
] | 4
|
2022-01-20T15:41:09.000Z
|
2022-03-29T16:25:08.000Z
|
# Operadores lógicos OR
a = 1 == 1 or 1 < 0 # True
a = 2 != 2 or 1 == 0 or 45 > 90 # False
a = 56 != 23 or 1 > 0 or 45 > 90 # True
a = 23 > 2 or 1 > 0 or 45 > 90 or 45 > 78 # True
a = 1 > 2 or 1 < 0 or 45 > 90 or 45 > 78 # False
print("Final")
| 31.8
| 55
| 0.393082
| 58
| 318
| 2.155172
| 0.275862
| 0.192
| 0.16
| 0.192
| 0.44
| 0.44
| 0.36
| 0.272
| 0.272
| 0.272
| 0
| 0.29375
| 0.496855
| 318
| 9
| 56
| 35.333333
| 0.4875
| 0.150943
| 0
| 0
| 0
| 0
| 0.019011
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.166667
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
06c2b727072b4da4b7797934d7d4e6fc2b83491e
| 1,110
|
py
|
Python
|
doc/source/examples/verify_binary.py
|
FareHarbor/python-xmlsec
|
c8dc41afd28a8f9ecf3e954f0cc306641f20d434
|
[
"MIT"
] | 81
|
2015-03-20T20:27:58.000Z
|
2022-03-21T03:19:13.000Z
|
doc/source/examples/verify_binary.py
|
visuman/python-xmlsec
|
dac04aa07e1248a4aab4281f418b4b976d91d54d
|
[
"MIT"
] | 162
|
2015-03-05T18:34:49.000Z
|
2022-03-28T10:08:47.000Z
|
doc/source/examples/verify_binary.py
|
visuman/python-xmlsec
|
dac04aa07e1248a4aab4281f418b4b976d91d54d
|
[
"MIT"
] | 92
|
2015-02-08T22:40:38.000Z
|
2022-03-22T11:08:12.000Z
|
from lxml import etree
import xmlsec
ctx = xmlsec.SignatureContext()
key = xmlsec.Key.from_file('rsakey.pem', xmlsec.constants.KeyDataFormatPem)
ctx.key = key
data = b'\xa8f4dP\x82\x02\xd3\xf5.\x02\xc1\x03\xef\xc4\x86\xabC\xec\xb7>\x8e\x1f\xa3\xa3\xc5\xb9qc\xc2\x81\xb1-\xa4B\xdf\x03>\xba\xd1'
sign = b"h\xcb\xb1\x82\xfa`e\x89x\xe5\xc5ir\xd6\xd1Q\x9a\x0b\xeaU_G\xcc'\xa4c\xa3>\x9b27\xbf^`\xa7p\xfb\x98\xcb\x81\xd2\xb1\x0c'\x9d\xe2\n\xec\xb2<\xcf@\x98=\xe0}O8}fy\xc2\xc4\xe9\xec\x87\xf6\xc1\xde\xfd\x96*o\xab\xae\x12\xc9{\xcc\x0e\x93y\x9a\x16\x80o\x92\xeb\x02^h|\xa0\x9b<\x99_\x97\xcb\xe27\xe9u\xc3\xfa_\xcct/sTb\xa0\t\xd3\x93'\xb4\xa4\x0ez\xcbL\x14D\xdb\xe3\x84\x886\xe9J[\xe7\xce\xc0\xb1\x99\x07\x17{\xc6:\xff\x1dt\xfd\xab^2\xf7\x9e\xa4\xccT\x8e~b\xdb\x9a\x04\x04\xbaM\xfa\xbd\xec)z\xbb\x89\xd7\xb2Q\xac\xaf\x13\xdcD\xcd\n6\x92\xfao\xb9\xd9\x96$\xce\xa6\xcf\xf8\xe4Bb60\xf5\xd2a\xb1o\x8c\x0f\x8bl\x88vh\xb5h\xfa\xfa\xb66\xedQ\x10\xc4\xef\xfa\x81\xf0\xc9.^\x98\x1ePQS\x9e\xafAy\x90\xe4\x95\x03V\xc2\xa0\x18\xa5d\xc2\x15*\xb6\xd7$\xc0\t2\xa1"
ctx.verify_binary(data, xmlsec.constants.TransformRsaSha1, sign)
| 92.5
| 747
| 0.745946
| 236
| 1,110
| 3.487288
| 0.70339
| 0.036452
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.179298
| 0.025225
| 1,110
| 11
| 748
| 100.909091
| 0.581331
| 0
| 0
| 0
| 0
| 0.25
| 0.784685
| 0.775676
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.25
| 0
| 0.25
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
06ef26900ef025f550d0714f3b45027e46f6151e
| 4,010
|
py
|
Python
|
release/stubs.min/Rhino/DocObjects/__init___parts/HistoryRecord.py
|
htlcnn/ironpython-stubs
|
780d829e2104b2789d5f4d6f32b0ec9f2930ca03
|
[
"MIT"
] | 182
|
2017-06-27T02:26:15.000Z
|
2022-03-30T18:53:43.000Z
|
release/stubs.min/Rhino/DocObjects/__init___parts/HistoryRecord.py
|
htlcnn/ironpython-stubs
|
780d829e2104b2789d5f4d6f32b0ec9f2930ca03
|
[
"MIT"
] | 28
|
2017-06-27T13:38:23.000Z
|
2022-03-15T11:19:44.000Z
|
release/stubs.min/Rhino/DocObjects/__init___parts/HistoryRecord.py
|
htlcnn/ironpython-stubs
|
780d829e2104b2789d5f4d6f32b0ec9f2930ca03
|
[
"MIT"
] | 67
|
2017-06-28T09:43:59.000Z
|
2022-03-20T21:17:10.000Z
|
class HistoryRecord(object,IDisposable):
""" HistoryRecord(command: Command,version: int) """
def Dispose(self):
"""
Dispose(self: HistoryRecord)
Actively reclaims unmanaged resources that this instance uses.
"""
pass
def SetBool(self,id,value):
""" SetBool(self: HistoryRecord,id: int,value: bool) -> bool """
pass
def SetBools(self,id,values):
""" SetBools(self: HistoryRecord,id: int,values: IEnumerable[bool]) -> bool """
pass
def SetBrep(self,id,value):
""" SetBrep(self: HistoryRecord,id: int,value: Brep) -> bool """
pass
def SetColor(self,id,value):
""" SetColor(self: HistoryRecord,id: int,value: Color) -> bool """
pass
def SetColors(self,id,values):
""" SetColors(self: HistoryRecord,id: int,values: IEnumerable[Color]) -> bool """
pass
def SetCurve(self,id,value):
""" SetCurve(self: HistoryRecord,id: int,value: Curve) -> bool """
pass
def SetDouble(self,id,value):
""" SetDouble(self: HistoryRecord,id: int,value: float) -> bool """
pass
def SetDoubles(self,id,values):
""" SetDoubles(self: HistoryRecord,id: int,values: IEnumerable[float]) -> bool """
pass
def SetGuid(self,id,value):
""" SetGuid(self: HistoryRecord,id: int,value: Guid) -> bool """
pass
def SetGuids(self,id,values):
""" SetGuids(self: HistoryRecord,id: int,values: IEnumerable[Guid]) -> bool """
pass
def SetInt(self,id,value):
""" SetInt(self: HistoryRecord,id: int,value: int) -> bool """
pass
def SetInts(self,id,values):
""" SetInts(self: HistoryRecord,id: int,values: IEnumerable[int]) -> bool """
pass
def SetMesh(self,id,value):
""" SetMesh(self: HistoryRecord,id: int,value: Mesh) -> bool """
pass
def SetObjRef(self,id,value):
""" SetObjRef(self: HistoryRecord,id: int,value: ObjRef) -> bool """
pass
def SetPoint3d(self,id,value):
""" SetPoint3d(self: HistoryRecord,id: int,value: Point3d) -> bool """
pass
def SetPoint3dOnObject(self,id,objref,value):
""" SetPoint3dOnObject(self: HistoryRecord,id: int,objref: ObjRef,value: Point3d) -> bool """
pass
def SetPoint3ds(self,id,values):
""" SetPoint3ds(self: HistoryRecord,id: int,values: IEnumerable[Point3d]) -> bool """
pass
def SetString(self,id,value):
""" SetString(self: HistoryRecord,id: int,value: str) -> bool """
pass
def SetStrings(self,id,values):
""" SetStrings(self: HistoryRecord,id: int,values: IEnumerable[str]) -> bool """
pass
def SetSurface(self,id,value):
""" SetSurface(self: HistoryRecord,id: int,value: Surface) -> bool """
pass
def SetTransorm(self,id,value):
""" SetTransorm(self: HistoryRecord,id: int,value: Transform) -> bool """
pass
def SetVector3d(self,id,value):
""" SetVector3d(self: HistoryRecord,id: int,value: Vector3d) -> bool """
pass
def SetVector3ds(self,id,values):
""" SetVector3ds(self: HistoryRecord,id: int,values: IEnumerable[Vector3d]) -> bool """
pass
def __enter__(self,*args):
"""
__enter__(self: IDisposable) -> object
Provides the implementation of __enter__ for objects which implement IDisposable.
"""
pass
def __exit__(self,*args):
"""
__exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object)
Provides the implementation of __exit__ for objects which implement IDisposable.
"""
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod
def __new__(self,command,version):
""" __new__(cls: type,command: Command,version: int) """
pass
def __repr__(self,*args):
""" __repr__(self: object) -> str """
pass
Handle=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Wrapped native C++ pointer to CRhinoHistory instance
Get: Handle(self: HistoryRecord) -> IntPtr
"""
| 34.273504
| 215
| 0.670324
| 483
| 4,010
| 5.393375
| 0.200828
| 0.072553
| 0.167754
| 0.194242
| 0.381574
| 0.195393
| 0.075624
| 0.043378
| 0.043378
| 0.043378
| 0
| 0.004503
| 0.169327
| 4,010
| 116
| 216
| 34.568966
| 0.777544
| 0.561845
| 0
| 0.47541
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.47541
| false
| 0.47541
| 0
| 0
| 0.508197
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
6642b264b404cd23bc880fdbba1cbb47c6a8e58a
| 191
|
py
|
Python
|
PiCN/Layers/NFNLayer/NFNExecutor/__init__.py
|
NikolaiRutz/PiCN
|
7775c61caae506a88af2e4ec34349e8bd9098459
|
[
"BSD-3-Clause"
] | null | null | null |
PiCN/Layers/NFNLayer/NFNExecutor/__init__.py
|
NikolaiRutz/PiCN
|
7775c61caae506a88af2e4ec34349e8bd9098459
|
[
"BSD-3-Clause"
] | 5
|
2020-07-15T09:01:42.000Z
|
2020-09-28T08:45:21.000Z
|
PiCN/Layers/NFNLayer/NFNExecutor/__init__.py
|
NikolaiRutz/PiCN
|
7775c61caae506a88af2e4ec34349e8bd9098459
|
[
"BSD-3-Clause"
] | null | null | null |
"""Executor Modules for PiCN NFN
REQUIRE SANDBOXING """
from .BaseNFNExecutor import BaseNFNExecutor
from .NFNPythonExecutor import NFNPythonExecutor
from .x86Executor import x86Executor
| 31.833333
| 48
| 0.827225
| 19
| 191
| 8.315789
| 0.631579
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.023952
| 0.125654
| 191
| 6
| 49
| 31.833333
| 0.922156
| 0.251309
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
664dd92511c522d3a345b710b3466e2b3473f576
| 4,945
|
py
|
Python
|
z2/part2/interactive/jm/random_normal_1/843287845.py
|
kozakusek/ipp-2020-testy
|
09aa008fa53d159672cc7cbf969a6b237e15a7b8
|
[
"MIT"
] | 1
|
2020-04-16T12:13:47.000Z
|
2020-04-16T12:13:47.000Z
|
z2/part2/interactive/jm/random_normal_1/843287845.py
|
kozakusek/ipp-2020-testy
|
09aa008fa53d159672cc7cbf969a6b237e15a7b8
|
[
"MIT"
] | 18
|
2020-03-06T17:50:15.000Z
|
2020-05-19T14:58:30.000Z
|
z2/part2/interactive/jm/random_normal_1/843287845.py
|
kozakusek/ipp-2020-testy
|
09aa008fa53d159672cc7cbf969a6b237e15a7b8
|
[
"MIT"
] | 18
|
2020-03-06T17:45:13.000Z
|
2020-06-09T19:18:31.000Z
|
from part1 import (
gamma_board,
gamma_busy_fields,
gamma_delete,
gamma_free_fields,
gamma_golden_move,
gamma_golden_possible,
gamma_move,
gamma_new,
)
"""
scenario: test_random_actions
uuid: 843287845
"""
"""
random actions, total chaos
"""
board = gamma_new(7, 4, 4, 8)
assert board is not None
assert gamma_move(board, 1, 2, 3) == 1
assert gamma_move(board, 2, 1, 5) == 0
assert gamma_move(board, 2, 4, 1) == 1
assert gamma_move(board, 4, 3, 0) == 1
assert gamma_golden_move(board, 4, 3, 2) == 0
assert gamma_move(board, 1, 2, 3) == 0
assert gamma_move(board, 1, 4, 2) == 1
assert gamma_free_fields(board, 1) == 24
assert gamma_move(board, 2, 1, 3) == 1
assert gamma_move(board, 3, 2, 0) == 1
assert gamma_move(board, 4, 0, 6) == 0
assert gamma_move(board, 1, 0, 5) == 0
assert gamma_move(board, 2, 0, 0) == 1
assert gamma_busy_fields(board, 2) == 3
assert gamma_move(board, 3, 2, 2) == 1
assert gamma_move(board, 4, 1, 3) == 0
assert gamma_move(board, 4, 4, 2) == 0
board880443772 = gamma_board(board)
assert board880443772 is not None
assert board880443772 == (".21....\n"
"..3.1..\n"
"....2..\n"
"2.34...\n")
del board880443772
board880443772 = None
assert gamma_move(board, 1, 2, 0) == 0
assert gamma_move(board, 1, 6, 1) == 1
assert gamma_move(board, 2, 2, 1) == 1
assert gamma_move(board, 3, 1, 1) == 1
assert gamma_move(board, 4, 2, 0) == 0
assert gamma_move(board, 1, 4, 3) == 1
assert gamma_golden_possible(board, 1) == 1
assert gamma_move(board, 3, 2, 1) == 0
assert gamma_move(board, 4, 2, 0) == 0
assert gamma_move(board, 4, 6, 3) == 1
assert gamma_golden_move(board, 4, 3, 1) == 0
assert gamma_move(board, 1, 1, 0) == 1
assert gamma_move(board, 1, 0, 3) == 1
assert gamma_move(board, 2, 0, 0) == 0
assert gamma_move(board, 2, 0, 3) == 0
assert gamma_move(board, 3, 1, 3) == 0
assert gamma_move(board, 3, 6, 0) == 1
assert gamma_move(board, 4, 4, 3) == 0
assert gamma_move(board, 1, 4, 2) == 0
assert gamma_move(board, 1, 5, 3) == 1
assert gamma_golden_possible(board, 1) == 1
assert gamma_move(board, 2, 2, 0) == 0
assert gamma_move(board, 2, 1, 2) == 1
assert gamma_move(board, 3, 3, 3) == 1
assert gamma_move(board, 4, 1, 5) == 0
assert gamma_busy_fields(board, 4) == 2
assert gamma_move(board, 1, 4, 0) == 1
assert gamma_move(board, 1, 6, 0) == 0
assert gamma_move(board, 2, 1, 0) == 0
assert gamma_move(board, 3, 2, 0) == 0
assert gamma_move(board, 3, 3, 2) == 1
assert gamma_move(board, 4, 0, 1) == 1
board911028010 = gamma_board(board)
assert board911028010 is not None
assert board911028010 == ("1213114\n"
".2331..\n"
"432.2.1\n"
"21341.3\n")
del board911028010
board911028010 = None
assert gamma_move(board, 1, 2, 6) == 0
assert gamma_move(board, 2, 2, 5) == 0
assert gamma_move(board, 2, 2, 2) == 0
assert gamma_busy_fields(board, 2) == 5
assert gamma_golden_possible(board, 2) == 1
assert gamma_move(board, 3, 2, 6) == 0
assert gamma_move(board, 4, 1, 3) == 0
assert gamma_move(board, 4, 2, 0) == 0
assert gamma_golden_possible(board, 4) == 1
assert gamma_move(board, 1, 1, 3) == 0
assert gamma_move(board, 1, 5, 0) == 1
assert gamma_move(board, 2, 4, 2) == 0
board961307088 = gamma_board(board)
assert board961307088 is not None
assert board961307088 == ("1213114\n"
".2331..\n"
"432.2.1\n"
"2134113\n")
del board961307088
board961307088 = None
assert gamma_move(board, 3, 2, 5) == 0
assert gamma_move(board, 3, 2, 2) == 0
assert gamma_move(board, 4, 1, 5) == 0
assert gamma_move(board, 4, 2, 3) == 0
assert gamma_move(board, 1, 0, 1) == 0
assert gamma_move(board, 2, 2, 6) == 0
assert gamma_move(board, 2, 6, 0) == 0
assert gamma_move(board, 3, 2, 0) == 0
assert gamma_move(board, 3, 5, 1) == 1
assert gamma_move(board, 4, 2, 3) == 0
assert gamma_move(board, 2, 2, 0) == 0
assert gamma_free_fields(board, 2) == 4
assert gamma_move(board, 3, 2, 6) == 0
assert gamma_move(board, 4, 2, 6) == 0
assert gamma_busy_fields(board, 4) == 3
assert gamma_move(board, 1, 2, 6) == 0
assert gamma_move(board, 2, 1, 3) == 0
assert gamma_move(board, 2, 0, 3) == 0
assert gamma_move(board, 3, 3, 3) == 0
assert gamma_move(board, 3, 1, 3) == 0
board132777314 = gamma_board(board)
assert board132777314 is not None
assert board132777314 == ("1213114\n"
".2331..\n"
"432.231\n"
"2134113\n")
del board132777314
board132777314 = None
assert gamma_move(board, 4, 1, 2) == 0
assert gamma_move(board, 4, 3, 1) == 1
assert gamma_move(board, 1, 2, 6) == 0
assert gamma_golden_possible(board, 1) == 1
board366120167 = gamma_board(board)
assert board366120167 is not None
assert board366120167 == ("1213114\n"
".2331..\n"
"4324231\n"
"2134113\n")
del board366120167
board366120167 = None
assert gamma_move(board, 2, 2, 6) == 0
assert gamma_move(board, 3, 2, 5) == 0
assert gamma_move(board, 3, 3, 1) == 0
assert gamma_golden_possible(board, 3) == 1
assert gamma_move(board, 4, 2, 5) == 0
gamma_delete(board)
| 29.789157
| 46
| 0.664914
| 881
| 4,945
| 3.590238
| 0.057889
| 0.312994
| 0.360417
| 0.480556
| 0.727474
| 0.694278
| 0.620613
| 0.405311
| 0.34619
| 0.330383
| 0
| 0.16679
| 0.177958
| 4,945
| 165
| 47
| 29.969697
| 0.611316
| 0
| 0
| 0.265734
| 0
| 0
| 0.03706
| 0
| 0
| 0
| 0
| 0
| 0.706294
| 1
| 0
| false
| 0
| 0.006993
| 0
| 0.006993
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
664ed8dc879bd576fdc9571ad7355bf8735db3f3
| 235
|
py
|
Python
|
apps/manufacturers/urls.py
|
theSoloBrewer/Project_Management
|
20db0abc400568da593bdea075b414dfde89f564
|
[
"Apache-2.0"
] | null | null | null |
apps/manufacturers/urls.py
|
theSoloBrewer/Project_Management
|
20db0abc400568da593bdea075b414dfde89f564
|
[
"Apache-2.0"
] | null | null | null |
apps/manufacturers/urls.py
|
theSoloBrewer/Project_Management
|
20db0abc400568da593bdea075b414dfde89f564
|
[
"Apache-2.0"
] | null | null | null |
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'(?P<mid>[0-9]*)/', views.manufactureDetailsView, name='manufactureDetails'),
url(r'^$', views.manufactureDetailsView, name='hardwareSelect'),
]
| 29.375
| 87
| 0.685106
| 26
| 235
| 6.192308
| 0.653846
| 0.049689
| 0.385093
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.00995
| 0.144681
| 235
| 8
| 88
| 29.375
| 0.791045
| 0
| 0
| 0
| 0
| 0
| 0.218341
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
664f9d6a17319014ace7410b9dd65a5ebab9d6b9
| 2,572
|
py
|
Python
|
python/problem25.py
|
mo/project-euler
|
7d6e59c0d82216b9a1d59e4f2472e53b8f330574
|
[
"MIT"
] | null | null | null |
python/problem25.py
|
mo/project-euler
|
7d6e59c0d82216b9a1d59e4f2472e53b8f330574
|
[
"MIT"
] | null | null | null |
python/problem25.py
|
mo/project-euler
|
7d6e59c0d82216b9a1d59e4f2472e53b8f330574
|
[
"MIT"
] | null | null | null |
# Correct answer was:
# the 4782th fibonacci number which is 1070066266382758936764980584457396885083683896632151665013235203375314520604694040621889147582489792657804694888177591957484336466672569959512996030461262748092482186144069433051234774442750273781753087579391666192149259186759553966422837148943113074699503439547001985432609723067290192870526447243726117715821825548491120525013201478612965931381792235559657452039506137551467837543229119602129934048260706175397706847068202895486902666185435124521900369480641357447470911707619766945691070098024393439617474103736912503231365532164773697023167755051595173518460579954919410967778373229665796581646513903488154256310184224190259846088000110186255550245493937113651657039447629584714548523425950428582425306083544435428212611008992863795048006894330309773217834864543113205765659868456288616808718693835297350643986297640660000723562917905207051164077614812491885830945940566688339109350944456576357666151619317753792891661581327159616877487983821820492520348473874384736771934512787029218636250627816
#
# * the dumb recursive solution took way too long (recomputing and discarding all the time)
# * the closed form formula failed because python choked with floating point overflow or something like that for fibonacci number 1475 and above
# * finally, just caching the computed values and reusing those for a not recursive computation worked great (it took around 25 secs to compute the answer using this method)
#
import math
def fibonacci_recursive(n):
if n == 1:
return 1
if n == 2:
return 1
return fibonacci_recursive(n - 2) + fibonacci_recursive(n - 1)
fibonacci_cache = {1: 1, 2: 1}
def fibonacci_recursive_cached(n):
cached_fibonacci_value = fibonacci_cache.get(n, -1)
if cached_fibonacci_value != -1:
return cached_fibonacci_value
computed_fibonacci = fibonacci_recursive_cached(n - 2) + fibonacci_recursive_cached(n - 1)
fibonacci_cache[n] = computed_fibonacci
return computed_fibonacci
golden_ratio = (1 + math.sqrt(5)) / 2
def fibonacci_binet(n):
# compute fibonacci number using binet's formula (see Wikipedia)
return int((golden_ratio**n - (1 - golden_ratio)**n) / math.sqrt(5))
def fibonacci(n):
return fibonacci_recursive_cached(n)
def fibonacci_unittest():
for n in xrange(1, 30):
assert fibonacci_recursive(n) == fibonacci_binet(n)
assert fibonacci_binet(n) == fibonacci_recursive_cached(n)
#
# main program starts here
#
fibonacci_unittest()
n = 0
fibonacci_n = 0
while len(str(fibonacci_n)) < 1000:
n += 1
fibonacci_n = fibonacci(n)
print n, fibonacci_n
| 49.461538
| 1,039
| 0.850311
| 238
| 2,572
| 9.029412
| 0.407563
| 0.075384
| 0.05584
| 0.058167
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.447266
| 0.096812
| 2,572
| 51
| 1,040
| 50.431373
| 0.47783
| 0.60381
| 0
| 0.064516
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.064516
| 0
| null | null | 0
| 0.032258
| null | null | 0.032258
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b0ab58f0fcedff86a080c7d5d7d29e4e6a2340e3
| 38
|
py
|
Python
|
twistedchecker/core/__init__.py
|
twisted/twistedchecker
|
4a69f3f7d80f2f42d915bc128d4257a2e15804e4
|
[
"MIT"
] | 10
|
2015-01-06T14:59:50.000Z
|
2021-01-10T19:06:16.000Z
|
twistedchecker/core/__init__.py
|
twisted/twistedchecker
|
4a69f3f7d80f2f42d915bc128d4257a2e15804e4
|
[
"MIT"
] | 76
|
2015-02-07T13:00:22.000Z
|
2020-04-14T02:10:37.000Z
|
twistedchecker/core/__init__.py
|
twisted/twistedchecker
|
4a69f3f7d80f2f42d915bc128d4257a2e15804e4
|
[
"MIT"
] | 11
|
2015-05-24T15:55:49.000Z
|
2017-10-15T11:34:35.000Z
|
"""
Core files of twistedchecker.
"""
| 9.5
| 29
| 0.657895
| 4
| 38
| 6.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157895
| 38
| 3
| 30
| 12.666667
| 0.78125
| 0.763158
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
9fd98f16aa9650382ea4f1d10564e800914907b5
| 118
|
py
|
Python
|
script_codes/apps.py
|
kingsdigitallab/django-script-codes
|
65bbed5ca582d49c6b3d10ee00d980c4d87b17fe
|
[
"MIT"
] | null | null | null |
script_codes/apps.py
|
kingsdigitallab/django-script-codes
|
65bbed5ca582d49c6b3d10ee00d980c4d87b17fe
|
[
"MIT"
] | null | null | null |
script_codes/apps.py
|
kingsdigitallab/django-script-codes
|
65bbed5ca582d49c6b3d10ee00d980c4d87b17fe
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8
from django.apps import AppConfig
class ScriptCodesConfig(AppConfig):
name = 'script_codes'
| 16.857143
| 35
| 0.728814
| 14
| 118
| 6.071429
| 0.928571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010101
| 0.161017
| 118
| 6
| 36
| 19.666667
| 0.848485
| 0.144068
| 0
| 0
| 0
| 0
| 0.121212
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
9ff75f9ec2c96e2bddea691d27287f65bf4e441b
| 1,661
|
py
|
Python
|
Persona.py
|
PikaGuty/Proyecto2F_IPC1
|
52f2ce93682886c477106cb06ffb9cee7f8e9d84
|
[
"MIT"
] | null | null | null |
Persona.py
|
PikaGuty/Proyecto2F_IPC1
|
52f2ce93682886c477106cb06ffb9cee7f8e9d84
|
[
"MIT"
] | null | null | null |
Persona.py
|
PikaGuty/Proyecto2F_IPC1
|
52f2ce93682886c477106cb06ffb9cee7f8e9d84
|
[
"MIT"
] | null | null | null |
class Persona:
def __init__(self,id,nombre,apellido,fechan,sexo,nombre_us,contraseña,especialidad,telefono,tipo):
self.id = id
self.nombre = nombre
self.apellido = apellido
self.fechan = fechan
self.sexo = sexo
self.nombre_us = nombre_us
self.contraseña = contraseña
self.especialidad = especialidad
self.telefono = telefono
self.tipo = tipo
# METODOS GET
def getId(self):
return self.id
def getNombre(self):
return self.nombre
def getApellido(self):
return self.apellido
def getFechan(self):
return self.fechan
def getSexo(self):
return self.sexo
def getNombre_us(self):
return self.nombre_us
def getContraseña(self):
return self.contraseña
def getEspecialidad(self):
return self.especialidad
def getTelefono(self):
return self.telefono
def getTipo(self):
return self.tipo
# METODOS SET
def setId(self, id):
self.id = id
def setNombre(self, nombre):
self.nombre = nombre
def setApellido(self, apellido):
self.apellido = apellido
def setFechan(self,fechan):
return self.fechan
def setSexo(self,sexo):
return self.sexo
def setNombre_us(self,nombre_us):
return self.nombre_us
def setContraseña(self,contraseña):
return self.contraseña
def setEspecialidad(self,especialidad):
return self.especialidad
def setTelefono(self,telefono):
return self.telefono
def setTipo(self,tipo):
return self.tipo
| 22.445946
| 102
| 0.624323
| 187
| 1,661
| 5.481283
| 0.197861
| 0.165854
| 0.136585
| 0.039024
| 0.040976
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.298013
| 1,661
| 74
| 103
| 22.445946
| 0.879074
| 0.013847
| 0
| 0.384615
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013514
| 0
| 1
| 0.403846
| false
| 0
| 0
| 0.326923
| 0.75
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
b00ffbed29fa7041a975abf00434d572c8310f4c
| 58
|
py
|
Python
|
__init__.py
|
lucasgsfelix/storehouse
|
424bb7a0bc9e48fc195d3f583239986b6d7ccbc1
|
[
"MIT"
] | 1
|
2018-05-17T10:11:55.000Z
|
2018-05-17T10:11:55.000Z
|
__init__.py
|
lucasgsfelix/storehouse
|
424bb7a0bc9e48fc195d3f583239986b6d7ccbc1
|
[
"MIT"
] | 33
|
2018-02-02T17:41:57.000Z
|
2021-02-19T20:15:10.000Z
|
__init__.py
|
lucasgsfelix/storehouse
|
424bb7a0bc9e48fc195d3f583239986b6d7ccbc1
|
[
"MIT"
] | 15
|
2018-02-02T17:39:52.000Z
|
2021-06-01T12:16:48.000Z
|
"""This NApp performs operations for data persistence."""
| 29
| 57
| 0.758621
| 7
| 58
| 6.285714
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12069
| 58
| 1
| 58
| 58
| 0.862745
| 0.87931
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b017538a6f3fdf8446352a77979be73c5930c277
| 37
|
py
|
Python
|
Greeting.py
|
maleich/In-class-coding-practice
|
fbbfaf9afacec65d97dbb46926f0cd3377938fab
|
[
"Apache-2.0"
] | null | null | null |
Greeting.py
|
maleich/In-class-coding-practice
|
fbbfaf9afacec65d97dbb46926f0cd3377938fab
|
[
"Apache-2.0"
] | null | null | null |
Greeting.py
|
maleich/In-class-coding-practice
|
fbbfaf9afacec65d97dbb46926f0cd3377938fab
|
[
"Apache-2.0"
] | null | null | null |
name = 'Maria'
print ('Hello', name)
| 12.333333
| 21
| 0.621622
| 5
| 37
| 4.6
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.162162
| 37
| 2
| 22
| 18.5
| 0.741935
| 0
| 0
| 0
| 0
| 0
| 0.27027
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
b03a1961a68656e10a7902c242f60904acc9dba9
| 214
|
py
|
Python
|
gr/model/notificacao/TipoNotificacao.py
|
Aresjr/Guerreiro
|
c378836d8d5b41cba8585170459a070eed673356
|
[
"Apache-2.0"
] | null | null | null |
gr/model/notificacao/TipoNotificacao.py
|
Aresjr/Guerreiro
|
c378836d8d5b41cba8585170459a070eed673356
|
[
"Apache-2.0"
] | 4
|
2020-07-11T00:20:57.000Z
|
2020-08-06T11:58:23.000Z
|
gr/model/notificacao/TipoNotificacao.py
|
Aresjr/Guerreiro
|
c378836d8d5b41cba8585170459a070eed673356
|
[
"Apache-2.0"
] | null | null | null |
from app import db
class TipoNotificacao(db.Model):
id = db.Column(db.Integer, primary_key=True)
descricao = db.Column(db.String(255), nullable=False)
icone = db.Column(db.String(128), default=False)
| 26.75
| 57
| 0.714953
| 32
| 214
| 4.75
| 0.65625
| 0.157895
| 0.197368
| 0.210526
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.032967
| 0.149533
| 214
| 7
| 58
| 30.571429
| 0.802198
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
b041df27887e541aae05968f7ef4bd8d4308c6c2
| 175,641
|
py
|
Python
|
cpims/cpovc_forms/forms.py
|
sizler20/cpims_update
|
23b86e40ca779b751383e268ad4fbf6a321ab211
|
[
"MIT"
] | null | null | null |
cpims/cpovc_forms/forms.py
|
sizler20/cpims_update
|
23b86e40ca779b751383e268ad4fbf6a321ab211
|
[
"MIT"
] | null | null | null |
cpims/cpovc_forms/forms.py
|
sizler20/cpims_update
|
23b86e40ca779b751383e268ad4fbf6a321ab211
|
[
"MIT"
] | 1
|
2022-02-27T13:36:47.000Z
|
2022-02-27T13:36:47.000Z
|
from django import forms
from django.utils.translation import ugettext_lazy as _
from django.forms.widgets import RadioFieldRenderer
from django.utils.encoding import force_unicode
from django.utils.safestring import mark_safe
from cpovc_main.functions import get_list, get_org_units_list
from cpovc_registry.functions import (
get_geo_list, get_all_geo_list, get_all_location_list,
get_all_sublocation_list)
from cpovc_registry.models import RegOrgUnit
from .functions import get_questions
YESNO_CHOICES = (('AYES', 'Yes'), ('ANNO', 'No'))
bursary_school_type_list = (('STPR', 'Private'), ('STPU', 'Public'))
bursary_school_category_list = (('SCNA', 'National'), ('SCCT', 'County'),
('SCSC', 'Sub-County'))
status_of_student_list = (('dropped_out', 'Dropped out'),
('completed', 'Completed'),
('transferred', 'Transferred'))
bursary_school_enrolled_list = (('SEDY', 'Day'), ('SEBO', 'Boarding'),
('SESP', 'Special'))
principal_list = (('PRNC', 'Principal'), ('DPRN', 'Deputy Principal'))
chief_list = (('CHIF', 'Chief'), ('SCHF', 'Sub-Chief'))
bank_list = (('', 'Please Select'), ('1', 'Equity Bank'))
loc = get_all_location_list()
sub_loc = get_all_sublocation_list()
# -------------------------------- CPIMS-------------------------------------
person_type_list = get_list('person_type_id', 'Please Select')
psearch_criteria_list = get_list('psearch_criteria_type_id', 'Select Criteria')
povcsearch_criteria_list = get_list(
'povcsearch_criteria_type_id', 'Select Criteria')
form_type_list = get_list('form_type_id', 'Please Select')
religion_type_list = get_list('religion_type_id', 'Please Select')
yesno_list = get_list('yesno_id', 'Please Select')
household_economics_list = get_list('household_economics', 'Please Select')
school_category_list = get_list('school_category_id', 'Please Select')
class_list = get_list('class_level_id', 'Please Select')
family_status_list = get_list('family_status_id', '')
mental_condition_list = get_list('mental_condition_id', 'Please Select')
mental_subcondition_list = get_list('mental_subcondition_id', 'Please Select')
physical_condition_list = get_list('physical_condition_id', 'Please Select')
physical_subcondition_list = get_list(
'physical_subcondition_id', 'Please Select')
other_condition_list = get_list('other_condition_id', 'Please Select')
other_subcondition_list = get_list('other_subcondition_id', 'Please Select')
perpetrator_status_list = get_list('perpetrator_status_id', 'Please Select')
sex_id_list = get_list('sex_id', 'Please Select')
relationship_type_list = get_list('relationship_type_id', 'Please Select')
perpetrator_type_list = get_list('perpetrator_id', 'Please Select')
case_nature_list = get_list('case_nature_id', 'Please Select')
case_category_list = get_list('case_category_id', 'Please Select')
intervention_list = get_list('intervention_id', 'Please Select')
risk_level_list = get_list('risk_level_id', 'Please Select')
event_place_list = get_list('event_place_id', 'Please Select')
referral_destination_list = get_list(
'referral_destination_id', 'Please Select')
referral_destination_classification_list = get_list(
'referral_destination_classification', 'Please Select')
geo_list = get_geo_list(get_all_geo_list(), 'GDIS')
referral_to_list = get_list('referral_type_id', 'Please Select')
core_item_list = get_list('core_item_id', '')
court_order_list = get_list('court_order_id', '')
residential_status_list = get_list('residential_status_id', 'Please Select')
document_type_list = get_list('document_tag_id', 'Please Select Document')
all_list = get_all_geo_list()
county_list = [('', 'Please Select')] + list(get_geo_list(all_list, 'GPRV'))
sub_county_list = [('', 'Please Select')] + \
list(get_geo_list(all_list, 'GDIS'))
ward_list = [('', 'Please Select')] + list(get_geo_list(all_list, 'GWRD'))
institution_type_list = get_list('institution_type_id', 'Please Select')
admission_type_list = get_list('admission_type_id', 'Please Select')
# admission_reason_list = get_list('placement_reason_id', 'Please Select')
admission_reason_list = get_list('admission_reason_id', 'Please Select')
adverse_events_list = get_list('adverse_event_id', 'Please Select')
adverse_offence_list = get_list('offender_id', 'Please Select')
adverse_medical_list = get_list('new_condition_id', 'Please Select')
attendance_type_list = get_list('type_of_attendance', 'Please Select')
hospital_referral_type_list = get_list(
'hospital_referral_type_id', 'Please Select')
discharge_type_list = get_list('discharge_type_id', 'Please Select')
# admission_class_list = get_list('admission_class_id', 'Please Select')
admission_class_list = get_list('class_level_id', 'Please Select')
vocational_training_list = get_list('vocational_training_id', 'Please Select')
service_provider_list = get_list('service_provider_id', 'Please Select')
services_list = get_list('core_item_id', 'Please Select')
court_outcome_list = get_list('court_outcome_id', 'Please Select')
application_outcome_list = get_list('application_outcome_id', 'Please Select')
courtsession_type_list = get_list('courtsession_type_id', 'Please Select')
plea_type_list = get_list('plea_type_id', 'Please Select')
case_reporter_list = get_list('case_reporter_id', 'Please Select')
placementfollowup_type_list = get_list(
'follow_up_type_id', 'Please Select Followup Type')
alternative_family_care_type_list = get_list(
'alternative_family_care_type_id', 'Please Select')
type_of_adoption_list = get_list('adoption_id', 'Please Select')
bursary_type_list = get_list('bursary_type_id', 'Select Bursary Type')
school_type_list = get_list('school_category_id', 'Please Select')
term_list = get_list('school_term_id', 'Select Term Awarded')
schoolout_reason_list = get_list('out_of_school_id', 'Please Select')
school_admission_type_list = get_list('school_type_id', 'Please Select')
education_level_list = get_list('class_level_id', 'Please Select')
longterm_needs_list = get_list('long_term_support_id', '')
shortterm_needs_list = get_list('immediate_need_id', '')
period_list = get_list('period_id', 'Please Select Unit')
parental_status_list = get_list('parental_status_id', 'Please Select')
caseoutcome_list = get_list('closure_outcome_id', 'Please Select')
# Additions
si_services_list = get_list(
'si_services_id', 'Please Select Service')
# ----------------------------------OLMIS-------------------------------------~
csi_grade_list = get_list('csi_grade_id', 'Please Select')
olmis_domain_list = get_list('olmis_domain_id', 'Please Select')
olmis_assessment_domain_list = get_list(
'olmis_assessment_domain_id', 'Please Select')
olmis_service_provider_list = get_list(
'olmis_service_provider_id', 'Please Select')
olmis_critical_events_list = get_list(
'olmis_critical_event_id', 'Please Select')
olmis_ha5_list = get_list('olmis_ha5_id', 'Please Select')
olmis_ha6_list = get_list('olmis_ha6_id', 'Please Select')
olmis_ha7_list = get_list('olmis_ha7_id', 'Please Select')
olmis_ha8_list = get_list('olmis_ha8_id', 'Please Select')
olmis_ha9_list = get_list('olmis_ha9_id', 'Please Select')
olmis_ha10_type_list = get_list('olmis_ha10_type_id', 'Please Select')
olmis_ha10_condition_list = get_list('olmis_ha10_condition_id', 'Please Select')
olmis_ha11_list = get_list('olmis_ha11_id', 'Please Select')
olmis_ha12_list = get_list('olmis_ha12_id', 'Please Select')
olmis_ha13_list = get_list('olmis_ha13_id', 'Please Select')
olmis_ha14_list = get_list('olmis_ha14_id', 'Please Select')
olmis_ha15_list = get_list('olmis_ha15_id', 'Please Select')
olmis_ha16_list = get_list('olmis_ha16_id', 'Please Select')
olmis_ha17_list = get_list('olmis_ha17_id', 'Please Select')
olmis_ha18_list = get_list('olmis_ha18_id', 'Please Select')
olmis_ha19_list = get_list('olmis_ha19_id', 'Please Select')
olmis_ha20_list = get_list('olmis_ha20_id', 'Please Select')
olmis_ha21_list = get_list('olmis_ha21_id', 'Please Select')
olmis_ha22_list = get_list('olmis_ha22_id', 'Please Select')
olmis_ha23_list = get_list('olmis_ha23_id', 'Please Select')
olmis_ha24_list = get_list('olmis_ha24_id', 'Please Select')
olmis_ha25_list = get_list('olmis_ha25_id', 'Please Select')
olmis_ha28_list = get_list('olmis_ha28_id', 'Please Select')
olmis_ha29_list = get_list('olmis_ha29_id', 'Please Select')
olmis_ha30_list = get_list('olmis_ha30_id', 'Please Select')
olmis_ha31_list = get_list('olmis_ha31_id', 'Please Select')
class OVCSchoolForm(forms.Form):
school_name = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Name of School'),
'class': 'form-control',
'id': 'school_name',
'data-parsley-required': "true",
'data-parsley-group': 'group0'
}))
type_of_school = forms.ChoiceField(choices=school_type_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'type_of_school',
'data-parsley-required': "true",
'data-parsley-group': 'group0'
}))
school_subcounty = forms.ChoiceField(
choices=sub_county_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'school_subcounty',
'data-parsley-required': "true",
'data-parsley-group': "group0"}))
school_ward = forms.ChoiceField(
choices=ward_list, label=_('Select ward'),
initial='',
widget=forms.Select(
attrs={'id': 'school_ward',
'class': 'form-control',
'data-parsley-required': "true",
'data-parsley-group': "group0"}))
class OVCBursaryForm(forms.Form):
bursary_type = forms.ChoiceField(choices=bursary_type_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'bursary_type',
'data-parsley-required': "true",
'data-parsley-group': 'group0'
}))
disbursement_date = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Disbursement Date'),
'class': 'form-control',
'id': 'disbursement_date',
'data-parsley-required': "true",
'data-parsley-group': 'group0'
# type': 'hidden'
}))
amount = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Amount(Ksh)'),
'class': 'form-control',
'id': 'amount',
'data-parsley-required': "true",
'data-parsley-type': "digits",
'data-parsley-group': 'group0'
}))
year = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Year Awarded(YYYY)'),
'class': 'form-control',
'id': 'year',
'data-parsley-required': "true",
'data-parsley-group': 'group0'
}))
term = forms.ChoiceField(choices=term_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'term',
'data-parsley-required': "true",
'data-parsley-group': 'group0'
}))
person_id = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'person_id',
'type': 'hidden'
}))
bursary_id = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'bursary_id',
'type': 'hidden'}))
operation_mode = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'operation_mode',
'type': 'hidden'
}))
class BackgroundDetailsForm(forms.Form):
def __init__(self, *args, **kwargs):
super(BackgroundDetailsForm, self).__init__(*args, **kwargs)
# schools_list = [('', 'Please Select')] + list(SchoolList.objects.filter().values_list('school_id', 'school_name'))
name_of_school = forms.ChoiceField(choices=(),
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'name_of_school',
'data-parsley-required': "true",
'data-parsley-group': 'group0'}))
self.fields['name_of_school'] = name_of_school
admmitted_to_school = forms.ChoiceField(choices=yesno_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'admmitted_to_school',
'data-parsley-required': "true",
'data-parsley-group': 'group0'
}))
not_in_school_reason = forms.ChoiceField(choices=schoolout_reason_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'not_in_school_reason',
'data-parsley-required': "true",
'data-parsley-group': 'group0'
}))
admmission_type = forms.ChoiceField(choices=school_admission_type_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'admmission_type',
'data-parsley-required': "true",
'data-parsley-group': 'group0'
}))
admmission_class = forms.ChoiceField(choices=admission_class_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'admmission_class',
'data-parsley-required': "true",
'data-parsley-group': 'group0'
}))
admmission_subclass = forms.ChoiceField(choices=vocational_training_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'admmission_subclass',
'data-parsley-required': "true",
'data-parsley-group': 'group0'
}))
admission_date = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date Of Admission'),
'class': 'form-control',
'id': 'admission_date',
'data-parsley-required': "true",
'data-parsley-group': 'group0'
}))
education_comments = forms.CharField(widget=forms.Textarea(
attrs={'placeholder': _('Education Comments'),
'class': 'form-control',
'id': 'education_comments',
'data-parsley-group': 'group0',
'rows': '2'}))
school_name = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Name of School'),
'class': 'form-control',
'id': 'school_name',
'data-parsley-required': "true",
'data-parsley-group': 'group0'
}))
type_of_school = forms.ChoiceField(choices=school_type_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'type_of_school',
'data-parsley-required': "true",
'data-parsley-group': 'group0'
}))
school_subcounty = forms.ChoiceField(
choices=sub_county_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'school_subcounty',
'data-parsley-required': "true",
'data-parsley-group': "group0"}))
school_ward = forms.ChoiceField(
choices=(), label=_('Select ward'),
initial='',
widget=forms.Select(
attrs={'id': 'school_ward',
'class': 'form-control',
'data-parsley-required': "true",
'data-parsley-group': "group0"}))
child_age = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'child_age',
'type': 'hidden'
}))
class DocumentsManager(forms.Form):
document_type = forms.ChoiceField(choices=document_type_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'document_type',
'data-parsley-required': 'true'})
)
document_description = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Document Description'),
'class': 'form-control',
'id': 'document_description',
'data-parsley-required': 'true'}))
search_name = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Enter Child Name(s)'),
'class': 'form-control',
'id': 'search_name',
'data-parsley-required': 'true'}))
file_name = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('File Name'),
'class': 'form-control',
'readonly': 'true',
'id': 'file_name'}))
search_criteria = forms.ChoiceField(choices=psearch_criteria_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'search_criteria',
'data-parsley-required': 'true'})
)
person = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'person',
'type': 'hidden',
'data-parsley-required': "true",
'data-parsley-group': 'group0'
}))
class SearchForm(forms.Form):
form_type = forms.ChoiceField(choices=form_type_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'form_type',
'data-parsley-required': 'true'})
)
form_person = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Enter Child Name'),
'class': 'form-control',
'id': 'form_person',
'data-parsley-required': 'true'}))
case_serial = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('CCO/XX/XXX/5/29/XX/YYYY'),
'class': 'form-control',
'id': 'case_serial',
'data-parsley-required': 'false'}))
class OVCSearchForm(forms.Form):
person_type = forms.ChoiceField(choices=person_type_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'person_type',
'data-parsley-required': 'true'})
)
search_name = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Enter Child Name(s)'),
'class': 'form-control',
'id': 'search_name',
'data-parsley-group': 'primary_',
'data-parsley-required': 'true'}))
search_criteria = forms.ChoiceField(choices=psearch_criteria_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'search_criteria',
# 'readonly':'true',
'data-parsley-required': 'true'})
)
form_type_search = forms.ChoiceField(choices=form_type_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'form_type_search',
'data-parsley-required': 'true'})
)
class ResidentialFollowupForm(forms.Form):
def __init__(self, *args, **kwargs):
super(ResidentialFollowupForm, self).__init__(*args, **kwargs)
# schools_list = [('', 'Please Select')] + list(SchoolList.objects
# .filter().values_list('school_id', 'school_name'))
org_unit_ids = ['TNRH', 'TNRR', 'TNAP', 'TNRS', 'TNRB']
org_units_list = [('', 'Please Select')] + list(RegOrgUnit.objects.filter(
org_unit_type_id__in=org_unit_ids).values_list('id', 'org_unit_name'))
discharge_destination = forms.ChoiceField(choices=org_units_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'discharge_destination'}))
self.fields['discharge_destination'] = discharge_destination
name_of_school = forms.ChoiceField(choices=(),
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'name_of_school'
# 'data-parsley-required': "true",
# 'data-parsley-group': 'group0'
}))
self.fields['name_of_school'] = name_of_school
casecategorys = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'casecategorys',
'type': 'hidden'
#'data-parsley-required': "true",
#'data-parsley-group': 'group0'
}))
person = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'person',
'type': 'hidden'
#'data-parsley-required': "true",
#'data-parsley-group': 'group0'
}))
child_age = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'child_age',
'type': 'hidden'
}))
placement_id = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'placement_id',
'type': 'hidden'
}))
placementfollowup_id = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'placementfollowup_id',
'type': 'hidden'
}))
placementfollowup_type = forms.ChoiceField(choices=placementfollowup_type_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'placementfollowup_type'
}))
placementfollowup_date = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date Of Followup'),
'class': 'form-control',
'id': 'placementfollowup_date'
}))
placementfollowup_outcome = forms.CharField(widget=forms.Textarea(
attrs={'placeholder': _('Outcome Of Followup'),
'class': 'form-control',
'rows': '2',
'id': 'placementfollowup_outcome'}))
placementfollowup_details = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Details Of Followup'),
'class': 'form-control',
'id': 'placementfollowup_details'
}))
adverse_events = forms.ChoiceField(choices=adverse_events_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'adverse_events'
#'data-parsley-required': "true",
#'data-parsley-group': 'group0'
}))
adverse_event_date = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date Of Adverse Event'),
'class': 'form-control',
'id': 'adverse_event_date'
#'data-parsley-required': "true",
#'data-parsley-group': 'group0'
}))
adverse_medical_events = forms.ChoiceField(choices=adverse_medical_list,
initial='0',
widget=forms.SelectMultiple(
attrs={'class': 'form-control',
'id': 'adverse_medical_events'
#'data-parsley-required': "true",
#'data-parsley-group': 'group0'
}))
attendance_type = forms.ChoiceField(choices=attendance_type_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'attendance_type'
#'data-parsley-required': "true",
#'data-parsley-group': 'group0'
}))
hospital_referral_type = forms.ChoiceField(choices=hospital_referral_type_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'hospital_referral_type'
#'data-parsley-required': "true",
#'data-parsley-group': 'group0'
}))
adverse_offences = forms.ChoiceField(choices=adverse_offence_list,
initial='0',
widget=forms.SelectMultiple(
attrs={'class': 'form-control',
'id': 'adverse_offences'
#'data-parsley-required': "true",
#'data-parsley-group': 'group0'
}))
discharge_date = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date Of Discharge'),
'class': 'form-control',
'id': 'discharge_date'
#'data-parsley-required': "true",
#'data-parsley-group': 'group0'
}))
expected_return_date = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Expected Return Date'),
'class': 'form-control',
'id': 'expected_return_date'
#'data-parsley-required': "true",
#'data-parsley-group': 'group0'
}))
actual_return_date = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Actual Return Date'),
'class': 'form-control',
'id': 'actual_return_date'
#'data-parsley-required': "true",
#'data-parsley-group': 'group0'
}))
discharge_type = forms.ChoiceField(choices=discharge_type_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'discharge_type'
#'data-parsley-required': "true",
#'data-parsley-group': 'group0'
}))
discharge_reason = forms.CharField(widget=forms.Textarea(
attrs={'placeholder': _('Discharge Reason'),
'class': 'form-control',
'id': 'discharge_reason',
#'data-parsley-required': "true",
#'data-parsley-group': 'group0',
'rows': '2'}))
discharge_comments = forms.CharField(widget=forms.Textarea(
attrs={'placeholder': _('Discharge Comments'),
'class': 'form-control',
'id': 'discharge_comments',
#'data-parsley-required': "true",
#'data-parsley-group': 'group0',
'rows': '2'}))
admmitted_to_school = forms.ChoiceField(choices=yesno_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'admmitted_to_school'
#'data-parsley-required': "true",
#'data-parsley-group': 'group0'
}))
school_name = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Name of School'),
'class': 'form-control',
'id': 'school_name'
}))
type_of_school = forms.ChoiceField(choices=school_type_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'type_of_school'
}))
school_subcounty = forms.ChoiceField(
choices=sub_county_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'school_subcounty'}))
school_ward = forms.ChoiceField(
choices=ward_list, label=_('Select ward'),
initial='',
widget=forms.Select(
attrs={'id': 'school_ward',
'class': 'form-control'}))
not_in_school_reason = forms.ChoiceField(choices=schoolout_reason_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'not_in_school_reason'
# 'data-parsley-required': "true",
# 'data-parsley-group': 'group0'
}))
admmission_type = forms.ChoiceField(choices=school_admission_type_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'admmission_type'
# 'data-parsley-required': "true",
# 'data-parsley-group': 'group0'
}))
admmission_class = forms.ChoiceField(choices=admission_class_list,
initial='0',
widget=forms.SelectMultiple(
attrs={'class': 'form-control',
'id': 'admmission_class'
#'data-parsley-required': "true",
#'data-parsley-group': 'group0'
}))
admmission_subclass = forms.ChoiceField(choices=vocational_training_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'admmission_subclass'
#'data-parsley-required': "true",
#'data-parsley-group': 'group0'
}))
admmission_subclass_other = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Other Vocational'),
'class': 'form-control',
'id': 'admmission_subclass_other'}))
admmission_to_school_date = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date Of Admission'),
'class': 'form-control',
'id': 'admmission_to_school_date'
#'data-parsley-required': "true",
#'data-parsley-group': 'group0'
}))
education_comments = forms.CharField(widget=forms.Textarea(
attrs={'placeholder': _('Education Comments'),
'class': 'form-control',
'id': 'education_comments',
#'data-parsley-required': "true",
#'data-parsley-group': 'group0',
'rows': '2'}))
# Court Session
case_event_id_court = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'case_event_id_court',
'type': 'hidden'
}))
court_outcome = forms.ChoiceField(choices=court_outcome_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'court_outcome'
}))
application_outcome = forms.ChoiceField(choices=application_outcome_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'application_outcome'
}))
next_hearing_date = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Next Hearing Date'),
'class': 'form-control',
'id': 'next_hearing_date'
# type': 'hidden'
}))
next_mention_date = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Next Mention Date'),
'class': 'form-control',
'id': 'next_mention_date'
# type': 'hidden'
}))
court_session_case = forms.ChoiceField(initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'court_session_case'
}))
court_session_type = forms.ChoiceField(initial='0',
choices=courtsession_type_list,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'court_session_type'
}))
plea_taken = forms.ChoiceField(initial='0',
choices=plea_type_list,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'plea_taken'
}))
date_of_court_event = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date Of Court Session'),
'class': 'form-control',
'id': 'date_of_court_event'
}))
court_order = forms.ChoiceField(choices=court_order_list,
initial='0',
widget=forms.SelectMultiple(
attrs={'class': 'form-control',
'id': 'court_order'
}))
court_notes = forms.CharField(widget=forms.Textarea(
attrs={'placeholder': _('Notes'),
'class': 'form-control',
'rows': '2',
'id': 'court_notes'}))
workforce_member_court = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Workforce Member/SCCO Name'),
'class': 'form-control',
'id': 'workforce_member_court'}))
service_type = forms.ChoiceField(
choices=si_services_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'service_type'}))
service_date = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date Of Service'),
'class': 'form-control',
'id': 'service_date'
}))
service_outcome = forms.CharField(widget=forms.Textarea(
attrs={'placeholder': _('Service Outcome'),
'class': 'form-control',
'rows': '2',
'id': 'service_outcome'}))
class ResidentialForm(forms.Form):
# OVCCaseEventPlacement
def __init__(self, *args, **kwargs):
super(ResidentialForm, self).__init__(*args, **kwargs)
org_unit_ids = ['TNRH', 'TNRR', 'TNAP', 'TNRS', 'TNRB', 'TNRC']
org_units_list = [('', 'Please Select')] + list(
RegOrgUnit.objects.filter(
org_unit_type_id__in=org_unit_ids).values_list(
'id', 'org_unit_name'))
residential_institution_name = forms.ChoiceField(
choices=org_units_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'residential_institution_name',
'data-parsley-required': "true",
'data-parsley-group': 'group1'}))
self.fields[
'residential_institution_name'] = residential_institution_name
transfer_from = forms.ChoiceField(
choices=org_units_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'transfer_from',
'data-parsley-required': "true",
'data-parsley-group': 'group1'}))
self.fields['transfer_from'] = transfer_from
placement_type = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'placement_type',
'type': 'hidden'
}))
person_id = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'person_id',
'type': 'hidden'
}))
child_firstname = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('FirstName'),
'class': 'form-control',
'id': 'child_firstname',
'data-parsley-required': "true",
'data-parsley-group': 'group0'
}))
child_lastname = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('LastName'),
'class': 'form-control',
'id': 'child_lastname',
# 'data-parsley-required': "true",
'data-parsley-group': 'group0'
}))
child_surname = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Surname'),
'class': 'form-control',
'id': 'child_surname',
'data-parsley-required': "true",
'data-parsley-group': 'group0'
}))
child_gender = forms.ChoiceField(
choices=sex_id_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'child_gender',
'data-parsley-required': "true",
'data-parsley-group': 'group0'}))
child_dob = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date Of Birth'),
'class': 'form-control',
'id': 'child_dob',
'data-parsley-required': "true",
'data-parsley-group': 'group0'
}))
case_category = forms.ChoiceField(
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'case_category',
# 'data-parsley-required': "true",
'data-parsley-group': 'group1'}))
residential_institution_type = forms.ChoiceField(
choices=institution_type_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'residential_institution_type',
'data-parsley-required': "true",
'data-parsley-group': 'group1'}))
admission_date = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date Of Admission'),
'class': 'form-control',
'id': 'admission_date',
'data-parsley-required': "true",
'data-parsley-group': 'group1'
# type': 'hidden'
}))
admission_number = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Admission Number'),
'class': 'form-control',
'id': 'admission_number',
'data-parsley-required': "true",
'data-parsley-group': 'group1'
# type': 'hidden'
}))
admission_type = forms.ChoiceField(choices=admission_type_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'admission_type',
'data-parsley-required': "true",
'data-parsley-group': 'group1'
}))
admission_reason = forms.ChoiceField(choices=admission_reason_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'admission_reason',
'data-parsley-required': "true",
'data-parsley-group': 'group1'
}))
holding_period = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Holding Period(days)'),
'class': 'form-control',
'id': 'holding_period',
'data-parsley-required': "true",
'data-parsley-type': "digits",
'data-parsley-group': 'group2'
}))
"""
current_residential_status = forms.ChoiceField(choices=residential_status_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'current_residential_status'
}))
"""
has_court_committal_order = forms.ChoiceField(choices=yesno_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'has_court_committal_order',
'data-parsley-required': "true",
'data-parsley-group': 'group2'
}))
court_order_number = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Court Order Number'),
'class': 'form-control',
'id': 'court_order_number',
'data-parsley-required': "true",
'data-parsley-group': 'group2'
}))
court_order_issue_date = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date Of Court Order'),
'class': 'form-control',
'id': 'court_order_issue_date',
'data-parsley-required': "true",
'data-parsley-group': 'group2'
# type': 'hidden'
}))
committing_court = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Committing Court'),
'class': 'form-control',
'id': 'committing_court',
'data-parsley-required': "true",
'data-parsley-group': 'group2'
}))
committing_period_units = forms.ChoiceField(choices=period_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'committing_period_units',
'data-parsley-required': "true",
'data-parsley-group': 'group2'
}))
committing_period = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Committing Period(Days/Weeks/Months/Years'),
'class': 'form-control',
'id': 'committing_period',
'data-parsley-required': "true",
'data-parsley-type': "digits",
'data-parsley-group': 'group2'
}))
ob_number = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('OB Number'),
'class': 'form-control',
'id': 'ob_number',
'data-parsley-required': "true",
'data-parsley-group': 'group2'
}))
free_for_adoption = forms.ChoiceField(choices=yesno_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'free_for_adoption',
# 'data-parsley-required': "true",
'data-parsley-group': 'group2'
}))
workforce_member_plcmnt = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Workforce Member/SCCO Name'),
'class': 'form-control',
'id': 'workforce_member_plcmnt',
'data-parsley-required': "true",
'data-parsley-group': 'group2'}))
placement_notes = forms.CharField(widget=forms.Textarea(
attrs={'placeholder': _('Notes'),
'class': 'form-control',
'rows': '2',
'id': 'placement_notes',
#'data-parsley-required': "true",
'data-parsley-group': 'group2'}))
user_id = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'user_id',
'type': 'hidden'
}))
class ResidentialSearchForm(forms.Form):
person_type = forms.ChoiceField(choices=person_type_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'person_type',
'data-parsley-required': 'true'})
)
search_name = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Enter Child Name(s)'),
'class': 'form-control',
'id': 'search_name',
'data-parsley-group': 'primary_',
'data-parsley-required': 'true'}))
search_criteria = forms.ChoiceField(choices=psearch_criteria_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'search_criteria',
# 'readonly':'true',
'data-parsley-required': 'true'})
)
form_type_search = forms.ChoiceField(choices=form_type_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'form_type_search',
'data-parsley-required': 'true'})
)
class OVC_FT3hForm(forms.Form):
# Logged in User
user_id = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'user_id',
'type': 'hidden'
}))
# Reporter
is_self_reporter = forms.CharField(
widget=forms.CheckboxInput(
attrs={'class': 'form-control', 'id': 'is_self_reporter'}))
date_case_opened = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date Of Case Opening'),
'class': 'form-control',
'id': 'date_case_opened',
'data-parsley-required': "true",
'data-parsley-group': "group0"
}))
case_reporter = forms.ChoiceField(
choices=case_reporter_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'case_reporter',
'data-parsley-required': "true",
'data-parsley-group': "group0"
}))
court_name = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Court Name'),
'class': 'form-control',
'id': 'court_name',
'data-parsley-required': "true",
'data-parsley-group': "group0"}))
court_number = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Court/File Number'),
'class': 'form-control',
'id': 'court_number',
'data-parsley-required': "true",
'data-parsley-group': "group0"}))
police_station = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Police Station'),
'class': 'form-control',
'id': 'police_station',
'data-parsley-required': "true",
'data-parsley-group': "group0"}))
ob_number = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('OB Number'),
'class': 'form-control',
'id': 'ob_number',
'data-parsley-required': "true",
'data-parsley-group': "group0"}))
case_reporter_first_name = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('First Name'),
'class': 'form-control',
'id': 'case_reporter_first_name',
'data-parsley-required': "true",
'data-parsley-group': "group0"}))
case_reporter_other_names = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Middle Names'),
'class': 'form-control',
'id': 'case_reporter_other_names',
'data-parsley-group': "group0"}))
case_reporter_surname = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Surname'),
'class': 'form-control',
'id': 'case_reporter_surname',
'data-parsley-required': "true",
'data-parsley-group': "group0"}))
case_reporter_contacts = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Reporter PhoneNumber'),
'class': 'form-control',
'id': 'case_reporter_contacts',
'data-parsley-pattern': '/^[0-9\+]{1,}[0-9\-]{3,15}$/',
#'data-parsley-required': "true",
'data-parsley-group': "group0"}))
case_reporter_relationship_to_child = forms.ChoiceField(
choices=relationship_type_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'case_reporter_relationship_to_child',
'data-parsley-required': "true",
'data-parsley-group': "group0"
}))
report_subcounty = forms.ChoiceField(
choices=sub_county_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'report_subcounty',
'data-parsley-required': "true",
'data-parsley-group': "group0"}))
report_ward = forms.ChoiceField(
choices=ward_list, label=_('Select ward'),
initial='',
widget=forms.Select(
attrs={'id': 'report_ward',
'class': 'form-control',
#'data-parsley-required': "true",
'data-parsley-group': "group0"}))
report_village = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Village/Estate'),
'class': 'form-control',
'id': 'report_village',
'data-parsley-group': "group0"}))
def __init__(self, *args, **kwargs):
super(OVC_FT3hForm, self).__init__(*args, **kwargs)
org_units_list___ = get_org_units_list('Please Select Unit')
report_orgunit = forms.ChoiceField(
choices=org_units_list___, label=_('Select orgunit'),
initial='0',
widget=forms.Select(
attrs={'id': 'report_orgunit',
'class': 'form-control',
'data-parsley-required': "true",
'data-parsley-group': "group0"}))
self.fields['report_orgunit'] = report_orgunit
occurence_county = forms.ChoiceField(
choices=county_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'occurence_county',
'data-parsley-required': "true",
'data-parsley-group': "group0"}))
occurence_subcounty = forms.ChoiceField(
choices=sub_county_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'occurence_subcounty',
'data-parsley-required': "true",
'data-parsley-group': "group0"}))
occurence_ward = forms.ChoiceField(
choices=ward_list, label=_('Select ward'),
initial='0',
widget=forms.Select(
attrs={'id': 'occurence_ward',
'class': 'form-control',
#'data-parsley-required': "true",
'data-parsley-group': "group0"}))
occurence_village = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Village/Estate'),
'class': 'form-control',
'id': 'occurence_village',
'data-parsley-group': "group0"}))
# About Child Info
person = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'person',
'type': 'hidden',
'data-parsley-required': "true",
'data-parsley-group': 'group0'
}))
case_id = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'uuid',
'type': 'hidden',
'data-parsley-required': "true",
'data-parsley-group': 'group0'
}))
case_category_id = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'uuid',
'type': 'hidden',
'data-parsley-required': "true",
'data-parsley-group': 'group0'
}))
friends = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Enter Friends and press ENTER'),
'class': 'form-control',
'id': 'friends',
'type': 'hidden',
'data-parsley-group': 'group1'}))
hobbies = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Enter Hobbies and press ENTER'),
'class': 'form-control',
'id': 'hobbies',
'type': 'hidden',
'data-parsley-group': 'group1'}))
case_grouping_id = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'person',
'type': 'hidden',
'data-parsley-group': 'group0'
}))
row_id = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'row_id',
'type': 'hidden',
'data-parsley-required': "true",
'data-parsley-group': 'group0'
}))
# Household Info
household_economics = forms.ChoiceField(choices=household_economics_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'household_economics',
'data-parsley-required': "true",
'data-parsley-group': 'group1'})
)
family_status = forms.ChoiceField(choices=family_status_list,
initial='0',
required=True,
widget=forms.SelectMultiple(
attrs={'class': 'form-control',
'id': 'family_status',
'data-parsley-required': "true",
'data-parsley-group': 'group1'})
)
# Medical Info
mental_condition = forms.ChoiceField(choices=mental_condition_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'mental_condition',
'data-parsley-required': "true",
'data-parsley-group': 'group2'})
)
mental_subcondition = forms.ChoiceField(choices=mental_subcondition_list,
initial='0',
required=True,
widget=forms.SelectMultiple(
attrs={'class': 'form-control',
'id': 'mental_subcondition',
#'data-parsley-required': "true",
'data-parsley-group': 'group2'})
)
physical_condition = forms.ChoiceField(choices=physical_condition_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'physical_condition',
'data-parsley-required': "true",
'data-parsley-group': 'group2'})
)
physical_subcondition = forms.ChoiceField(choices=physical_subcondition_list,
initial='0',
required=True,
widget=forms.SelectMultiple(
attrs={'class': 'form-control',
'id': 'physical_subcondition',
#'data-parsley-required': "true",
'data-parsley-group': 'group2'})
)
other_condition = forms.ChoiceField(choices=other_condition_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'other_condition',
'data-parsley-required': "true",
'data-parsley-group': 'group2'})
)
other_subcondition = forms.ChoiceField(choices=other_subcondition_list,
initial='0',
required=True,
widget=forms.SelectMultiple(
attrs={'class': 'form-control',
'id': 'other_subcondition',
#'data-parsley-required': "true",
'data-parsley-group': 'group2'})
)
# Case Data - OVCCaseRecord Model
serial_number = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Case Serial Number'),
'class': 'form-control',
'id': 'serial_number',
'data-parsley-required': "true",
'data-parsley-group': 'group3'}))
perpetrator_status = forms.ChoiceField(choices=perpetrator_status_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'perpetrator_status',
'data-parsley-required': "true",
'data-parsley-group': 'group3'})
)
perpetrator_first_name = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('First Name'),
'class': 'form-control',
'id': 'perpetrator_first_name',
'data-parsley-required': "true",
'data-parsley-group': "group3"}))
perpetrator_other_names = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Middle Name'),
'class': 'form-control',
'id': 'perpetrator_other_names',
'data-parsley-group': "group3"}))
perpetrator_surname = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Surname'),
'class': 'form-control',
'id': 'perpetrator_surname',
'data-parsley-required': "true",
'data-parsley-group': "group3"}))
perp_other_relation = forms.ChoiceField(
choices=perpetrator_type_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'perp_other_relation',
'data-parsley-required': "true",
'data-parsley-group': "group3"}))
perp_relation = forms.ChoiceField(
choices=relationship_type_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'perp_relation',
'data-parsley-required': "true",
'data-parsley-group': "group3"}))
perpetrator_relationship = forms.ChoiceField(choices=relationship_type_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'perpetrator_relationship',
'data-parsley-required': "true",
'data-parsley-group': "group3"
}))
place_of_event = forms.ChoiceField(choices=event_place_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'place_of_event'
#'data-parsley-required': "true",
#'data-parsley-group': "group3"
}))
case_nature = forms.ChoiceField(choices=case_nature_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'case_nature'
#'data-parsley-required': "true",
#'data-parsley-group': "group3"
}))
risk_level = forms.ChoiceField(choices=risk_level_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'risk_level',
'data-parsley-required': "true",
'data-parsley-group': "group3"
}))
immediate_needs = forms.ChoiceField(choices=shortterm_needs_list,
initial='0',
required=True,
widget=forms.SelectMultiple(
attrs={ # 'class': 'form-control',
'id': 'immediate_needs',
#'data-parsley-required': "true",
'data-parsley-group': 'group3'})
)
future_needs = forms.ChoiceField(choices=longterm_needs_list,
initial='0',
required=True,
widget=forms.SelectMultiple(
attrs={'class': 'form-control',
'id': 'future_needs',
#'data-parsley-required': "true",
'data-parsley-group': 'group3'})
)
case_remarks = forms.CharField(widget=forms.Textarea(
attrs={'placeholder': _('Case Remarks'),
'class': 'form-control',
'id': 'case_remarks',
'rows': '3',
'data-parsley-group': "group3"}))
# Refferals
refferal_present = forms.ChoiceField(choices=yesno_list,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'refferal_present',
'data-parsley-required': "true",
'data-parsley-group': "group3"}))
refferal_destination_type = forms.ChoiceField(choices=referral_destination_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'refferal_destination_type'
}))
# refferal_destination_description = forms.CharField(widget=forms.TextInput(
# attrs={'placeholder': _('Specify'),
# 'class': 'form-control',
# 'id': 'refferal_destination_description'}))
refferal_destination_description = forms.ChoiceField(choices=referral_destination_classification_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'refferal_destination_description'
}))
refferal_reason = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Referral Reason'),
'class': 'form-control',
'id': 'refferal_reason'}))
refferal_to = forms.ChoiceField(choices=referral_to_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'refferal_to'
}))
summon_issued = forms.ChoiceField(choices=yesno_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'summon_issued',
'data-parsley-required': "true",
'data-parsley-group': "group3"
}))
date_of_summon = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date Of Summon'),
'class': 'form-control',
'id': 'date_of_summon',
'data-parsley-required': "true",
'data-parsley-group': "group3"
}))
date_of_event = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date'),
'class': 'form-control',
'id': 'date_of_event',
#'data-parsley-required': "true",
'data-parsley-group': "group3"
}))
case_category = forms.ChoiceField(choices=case_category_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'case_category',
#'multiple': 'multiple',
#'data-parsley-required': "true",
'data-parsley-group': "group3"
}))
case_subcategory = forms.MultipleChoiceField(choices=(),
initial='',
widget=forms.SelectMultiple(
attrs={'class': 'form-control',
'id': 'case_subcategory',
#'multiple': 'multiple',
#'data-parsley-required': "true",
'data-parsley-group': "group3"
}))
case_category_list = forms.CharField(widget=forms.TextInput(
attrs={'id': 'case_category_list',
'type': 'hidden'
}))
referralactors_list = forms.CharField(widget=forms.TextInput(
attrs={'id': 'referralactors_list',
'type': 'hidden'
}))
clone_ids_list = forms.CharField(widget=forms.TextInput(
attrs={'id': 'clone_ids_list',
'type': 'hidden'
}))
intervention = forms.ChoiceField(choices=intervention_list,
initial='0',
widget=forms.SelectMultiple(
attrs={'class': 'form-control',
'id': 'intervention',
'multiple': 'multiple',
#'data-parsley-required': "true",
'data-parsley-group': "group3"
}))
class OVC_CaseEventForm(forms.Form):
service_provided_case = forms.ChoiceField(choices=case_category_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'service_provided_case'
}))
place_of_service = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Place of Service'),
'class': 'form-control',
'id': 'place_of_service'}))
court_session_case = forms.ChoiceField(initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'court_session_case'
}))
placement_case = forms.ChoiceField(initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'placement_case'
}))
refferal_case = forms.ChoiceField(initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'refferal_case'
}))
# Case ID
case_id = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'case_id',
'type': 'hidden'
}))
# Case Event ID
case_event_id = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'case_event_id',
'type': 'hidden'}))
case_event_id_svc = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'case_event_id_svc',
'type': 'hidden'
}))
case_event_id_court = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'case_event_id_court',
'type': 'hidden'
}))
case_event_id_plcmt = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'case_event_id_plcmt',
'type': 'hidden'
}))
case_event_id_summon = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'case_event_id_summon',
'type': 'hidden'
}))
case_event_id_closure = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'case_event_id_closure',
'type': 'hidden'
}))
case_event_type = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'case_event_type',
'type': 'hidden'
}))
operation_mode = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'operation_mode',
'type': 'hidden'
}))
# OVCCaseEventServices
workforce_member_svc = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Workforce Member/SCCO Name'),
'class': 'form-control',
'id': 'workforce_member_svc', }))
workforce_member_court = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Workforce Member/SCCO Name'),
'class': 'form-control',
'id': 'workforce_member_court'}))
workforce_member_plcmnt = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Workforce Member/SCCO Name'),
'class': 'form-control',
'id': 'workforce_member_plcmnt'}))
date_of_referral_event = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date Completed'),
'class': 'form-control',
'name': 'date_of_referral_event',
'id': 'date_of_referral_event'
}))
date_of_court_event = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date Of Court Session'),
'class': 'form-control',
'id': 'date_of_court_event'
}))
date_of_encounter_event = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date of Service'),
'class': 'form-control',
'id': 'date_of_encounter_event'
}))
date_of_placement_event = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date Of Placement'),
'class': 'form-control',
'id': 'date_of_placement_event'
}))
court_notes = forms.CharField(widget=forms.Textarea(
attrs={'placeholder': _('Notes'),
'class': 'form-control',
'rows': '2',
'id': 'court_notes'}))
encounter_notes = forms.CharField(widget=forms.Textarea(
attrs={'placeholder': _('Notes'),
'class': 'form-control',
'rows': '2',
'id': 'encounter_notes'}))
placement_notes = forms.CharField(widget=forms.Textarea(
attrs={'placeholder': _('Notes'),
'class': 'form-control',
'rows': '2',
'id': 'placement_notes'}))
service_provided = forms.ChoiceField(choices=services_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'service_provided'
}))
service_provider = forms.ChoiceField(choices=service_provider_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'service_provider'
}))
service_provided_list = forms.CharField(widget=forms.TextInput(
attrs={'type': 'hidden',
'id': 'service_provided_list'}))
refferals_made = forms.ChoiceField(choices=referral_to_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'refferals_made'
}))
refferals_actor = forms.ChoiceField(choices=referral_destination_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'refferals_actor'
}))
"""
refferals_actor_specify = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Specify'),
'class': 'form-control',
'id': 'refferals_actor_specify'}))
"""
refferals_actor_specify = forms.ChoiceField(choices=referral_destination_classification_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'refferals_actor_specify'
}))
refferals_completed = forms.ChoiceField(choices=referral_to_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'refferals_completed'
}))
# OVCCaseEventCourt
court_file_number = forms.CharField(widget=forms.Textarea(
attrs={'placeholder': _('Notes'),
'class': 'form-control',
'id': 'court_file_number'}))
court_outcome = forms.ChoiceField(choices=court_outcome_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'court_outcome'
}))
application_outcome = forms.ChoiceField(choices=application_outcome_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'application_outcome'
}))
court_session_type = forms.ChoiceField(initial='0',
choices=courtsession_type_list,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'court_session_type'
}))
plea_taken = forms.ChoiceField(initial='0',
choices=plea_type_list,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'plea_taken'
}))
next_hearing_date = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Next Hearing Date'),
'class': 'form-control',
'id': 'next_hearing_date'
# type': 'hidden'
}))
next_mention_date = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Next Mention Date'),
'class': 'form-control',
'id': 'next_mention_date'
# type': 'hidden'
}))
court_order = forms.ChoiceField(choices=court_order_list,
initial='0',
widget=forms.SelectMultiple(
attrs={'class': 'form-control',
'id': 'court_order'
}))
case_event_id_summon = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'case_event_id_summon',
'type': 'hidden'
}))
honoured = forms.ChoiceField(choices=yesno_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'honoured'
}))
visit_date = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Visit Date'),
'class': 'form-control',
'id': 'visit_date'
}))
honoured_date = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date Of Visit'),
'class': 'form-control',
'id': 'honoured_date'
}))
summon_date = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date Of Next Summon'),
'class': 'form-control',
'id': 'summon_date'
}))
summon_note = forms.CharField(widget=forms.Textarea(
attrs={'placeholder': _('Summon Notes'),
'class': 'form-control',
'rows': '2',
'id': 'summon_note'}))
reported_date = forms.DateField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'reported_date',
'type': 'hidden'
}))
# OVCCaseEventPlacement
def __init__(self, *args, **kwargs):
super(OVC_CaseEventForm, self).__init__(*args, **kwargs)
org_unit_ids = ['TICC', 'TICA', 'TICH', 'TIRS', 'TIRC', 'TIBI']
org_units_list = [('', 'Please Select')] + list(
RegOrgUnit.objects.filter(
org_unit_type_id__in=org_unit_ids).values_list(
'id', 'org_unit_name'))
residential_institution = forms.ChoiceField(
choices=org_units_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'residential_institution'}))
self.fields['residential_institution'] = residential_institution
org_units_list = [('', 'Please Select')] + \
list(RegOrgUnit.objects.all().values_list('id', 'org_unit_name'))
transfered_to = forms.ChoiceField(choices=org_units_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'transfered_to'}))
self.fields['transfered_to'] = transfered_to
current_residential_status = forms.ChoiceField(
choices=residential_status_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'current_residential_status'}))
has_court_committal_order = forms.ChoiceField(
choices=yesno_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'has_court_committal_order'}))
free_for_adoption = forms.ChoiceField(choices=yesno_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'free_for_adoption'
}))
admission_date = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date Of Admission'),
'class': 'form-control',
'id': 'admission_date'
}))
departure_date = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date Of Departure'),
'class': 'form-control',
'id': 'departure_date'
# type': 'hidden'
}))
# OVCCaseEventClosure
case_status = forms.ChoiceField(choices=yesno_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'case_status'
}))
case_outcome = forms.ChoiceField(choices=caseoutcome_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'case_outcome'
}))
date_of_case_closure = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date Of Outcome'),
'class': 'form-control',
'id': 'date_of_case_closure'
}))
case_closure_notes = forms.CharField(widget=forms.Textarea(
attrs={'placeholder': _('Case Closure Notes'),
'class': 'form-control',
'id': 'case_closure_notes',
'rows': '2'
}))
intervention = forms.ChoiceField(choices=intervention_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'intervention'
}))
intervention_list = forms.CharField(widget=forms.TextInput(
attrs={'type': 'hidden',
'id': 'intervention_list'}))
case_closure_case = forms.ChoiceField(initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'case_closure_case'
}))
class OVC_FTFCForm(forms.Form):
def __init__(self, *args, **kwargs):
super(OVC_FTFCForm, self).__init__(*args, **kwargs)
adopting_agency_list = [('', 'Please Select')] + list(RegOrgUnit.objects.filter(
org_unit_type_id='TNSA').values_list('id', 'org_unit_name'))
adopting_agency = forms.ChoiceField(choices=adopting_agency_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'adopting_agency',
'data-parsley-required': "true",
'data-parsley-group': "group0"}))
self.fields['adopting_agency'] = adopting_agency
org_unit_ids__ = ['TNGP', 'TNGD']
children_office_list = [('', 'Please Select')] + list(RegOrgUnit.objects.filter(
org_unit_type_id__in=org_unit_ids__).values_list('id', 'org_unit_name'))
children_office = forms.ChoiceField(choices=children_office_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'children_office',
'data-parsley-required': "true",
'data-parsley-group': "group0"}))
self.fields['children_office'] = children_office
# org_unit_ids___ = ['TICC']
org_unit_ids___ = ['TNSA', 'TNSI', 'TNCI', 'TNRH', 'TNRC', 'TNRR', 'TNAP']
familycare_institutions_list = [('', 'Please Select')] + list(RegOrgUnit.objects.filter(
org_unit_type_id__in=org_unit_ids___).values_list('id', 'org_unit_name'))
residential_institution_name = forms.ChoiceField(choices=familycare_institutions_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'residential_institution_name',
'data-parsley-required': "true",
'data-parsley-group': 'group0'
}))
self.fields[
'residential_institution_name'] = residential_institution_name
# org_unit_ids____ = ['TNSA', 'TNSI', 'TNCI', 'TNRH', 'TNRC', 'TNRR']
fostered_from_list = [('', 'Please Select')] + list(RegOrgUnit.objects.filter(
org_unit_type_id__in=org_unit_ids___).values_list('id', 'org_unit_name'))
fostered_from = forms.ChoiceField(choices=fostered_from_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'fostered_from',
'data-parsley-required': "true",
'data-parsley-group': 'group0'
}))
self.fields['fostered_from'] = fostered_from
contact_person = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Contact Person (Phone)'),
'class': 'form-control',
'id': 'contact_person',
'data-parsley-required': "true",
'data-parsley-group': "group0"}))
type_of_care = forms.ChoiceField(choices=alternative_family_care_type_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'type_of_care',
'data-parsley-required': "true",
'data-parsley-group': "group0"
}))
adoption_subcounty = forms.ChoiceField(choices=sub_county_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'adoption_subcounty',
'data-parsley-required': "true",
'data-parsley-group': "group0"
}))
adoption_country = forms.ChoiceField(choices=(),
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'adoption_country',
'data-parsley-required': "true",
'data-parsley-group': "group0"
}))
court_name = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Court Name'),
'class': 'form-control',
'id': 'court_name',
'data-parsley-required': "true",
'data-parsley-group': "group0"}))
court_file_number = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Court File Number'),
'class': 'form-control',
'id': 'court_file_number',
'data-parsley-required': "true",
'data-parsley-group': "group0"}))
certificate_number = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('P&C/Certificate Number'),
'class': 'form-control',
'id': 'certificate_number',
'data-parsley-required': "true",
'data-parsley-group': "group0"
}))
date_of_certificate_expiry = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date of Certificate Expiry'),
'class': 'form-control',
'id': 'date_of_certificate_expiry',
'data-parsley-required': "true",
'data-parsley-group': "group0"
}))
type_of_adoption = forms.ChoiceField(choices=type_of_adoption_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'type_of_adoption',
'data-parsley-required': "true",
'data-parsley-group': "group0"
}))
date_of_adoption = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date'),
'class': 'form-control',
'id': 'date_of_adoption',
'data-parsley-required': "true",
'data-parsley-group': "group0"
}))
parental_status = forms.ChoiceField(choices=parental_status_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'parental_status',
'data-parsley-required': "true",
'data-parsley-group': "group0"
}))
adopting_mother_firstname = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('FirstName'),
'class': 'form-control',
'id': 'adopting_mother_firstname',
'data-parsley-required': "true",
'data-parsley-group': "group0"
}))
adopting_mother_othernames = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Other Names'),
'class': 'form-control',
'id': 'adopting_mother_othernames',
'data-parsley-group': "group0"
}))
adopting_mother_surname = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Surname'),
'class': 'form-control',
'id': 'adopting_mother_surname',
'data-parsley-required': "true",
'data-parsley-group': "group0"
}))
adopting_mother_idnumber = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('ID/Passport Number'),
'class': 'form-control',
'id': 'adopting_mother_idnumber',
'data-parsley-group': "group0"
}))
adopting_mother_contacts = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Contacts'),
'class': 'form-control',
'id': 'adopting_mother_contacts',
'data-parsley-group': "group0"
}))
adopting_father_firstname = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('FirstName'),
'class': 'form-control',
'id': 'adopting_father_firstname',
'data-parsley-required': "true",
'data-parsley-group': "group0"
}))
adopting_father_othernames = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Other Names'),
'class': 'form-control',
'id': 'adopting_father_othernames',
'data-parsley-group': "group0"
}))
adopting_father_surname = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Surname'),
'class': 'form-control',
'id': 'adopting_father_surname',
'data-parsley-required': "true",
'data-parsley-group': "group0"
}))
adopting_father_idnumber = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('ID/Passport Number'),
'class': 'form-control',
'id': 'adopting_father_idnumber',
'data-parsley-group': "group0"
}))
adopting_father_contacts = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Contacts'),
'class': 'form-control',
'id': 'adopting_father_contacts',
'data-parsley-group': "group0"
}))
adoption_remarks = forms.CharField(widget=forms.Textarea(
attrs={'placeholder': _('Remarks'),
'class': 'form-control',
'id': 'adoption_remarks',
'rows': 3,
'data-parsley-group': "group0"
}))
# Demo API
class OVCSchoolForm(forms.Form):
school_name = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Name of School'),
'class': 'form-control',
'id': 'school_name',
'data-parsley-required': "true",
'data-parsley-group': 'group0'
}))
type_of_school = forms.ChoiceField(choices=school_type_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'type_of_school',
'data-parsley-required': "true",
'data-parsley-group': 'group0'
}))
school_subcounty = forms.ChoiceField(
choices=sub_county_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'school_subcounty',
'data-parsley-required': "true",
'data-parsley-group': "group0"}))
school_ward = forms.ChoiceField(
choices=ward_list, label=_('Select ward'),
initial='',
widget=forms.Select(
attrs={'id': 'school_ward',
'class': 'form-control',
'data-parsley-required': "true",
'data-parsley-group': "group0"}))
#------------------------------------------- OVCCare --------#
class OVCCareSearchForm(forms.Form):
search_name = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Enter Child / Household'),
'class': 'form-control',
'id': 'search_name',
'data-parsley-group': 'primary_',
'data-parsley-required': 'true'}))
search_criteria = forms.ChoiceField(choices=povcsearch_criteria_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'search_criteria',
# 'readonly':'true',
'data-parsley-required': 'true'})
)
"""
ovc_form_type = forms.ChoiceField(choices=ovc_form_type_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control input-sm',
'id': 'ovc_form_type',
'data-parsley-required': 'true'})
)
"""
class OVCCsiForm(forms.Form):
# CSI FORM ##
food_security = forms.ChoiceField(choices=csi_grade_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'food_security',
'data-parsley-required': 'true',
'data-parsley-group': 'group0'})
)
nutrition_growth = forms.ChoiceField(choices=csi_grade_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'nutrition_growth',
'data-parsley-required': 'true',
'data-parsley-group': 'group0'})
)
wellness = forms.ChoiceField(choices=csi_grade_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'wellness',
'data-parsley-required': 'true',
'data-parsley-group': 'group0'})
)
healthcare_services = forms.ChoiceField(choices=csi_grade_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'healthcare_services',
'data-parsley-required': 'true',
'data-parsley-group': 'group0'})
)
shelter = forms.ChoiceField(choices=csi_grade_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'shelter',
'data-parsley-required': 'true',
'data-parsley-group': 'group0'})
)
care = forms.ChoiceField(choices=csi_grade_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'care',
'data-parsley-required': 'true',
'data-parsley-group': 'group0'})
)
abuse_exploitation = forms.ChoiceField(choices=csi_grade_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'abuse_exploitation',
'data-parsley-required': 'true',
'data-parsley-group': 'group0'})
)
legal_protection = forms.ChoiceField(choices=csi_grade_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'legal_protection',
'data-parsley-required': 'true',
'data-parsley-group': 'group0'})
)
emotional_health = forms.ChoiceField(choices=csi_grade_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'emotional_health',
'data-parsley-required': 'true',
'data-parsley-group': 'group0'})
)
social_behaviour = forms.ChoiceField(choices=csi_grade_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'social_behaviour',
'data-parsley-required': 'true',
'data-parsley-group': 'group0'})
)
perfomance = forms.ChoiceField(choices=csi_grade_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'perfomance',
'data-parsley-required': 'true',
'data-parsley-group': 'group0'})
)
education_work = forms.ChoiceField(choices=csi_grade_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'education_work',
'data-parsley-required': 'true',
'data-parsley-group': 'group0'})
)
household_strengthening = forms.ChoiceField(choices=csi_grade_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'household_strengthening',
'data-parsley-required': 'true',
'data-parsley-group': 'group0'})
)
# OLMIS SERVICES ##
olmis_domain = forms.ChoiceField(choices=olmis_domain_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'olmis_domain'})
)
olmis_subdomain = forms.ChoiceField(choices=olmis_domain_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'olmis_subdomain'})
)
olmis_service = forms.MultipleChoiceField(choices=(),
initial='',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'olmis_service'
}))
olmis_service_provider = forms.ChoiceField(choices=olmis_service_provider_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'olmis_service_provider'})
)
olmis_service_date = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date Of Service'),
'class': 'form-control',
'id': 'olmis_service_date'
}))
olmis_place_of_service = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Place of Service'),
'class': 'form-control',
'id': 'olmis_place_of_service'}))
olmis_service_provided_list = forms.CharField(widget=forms.TextInput(
attrs={'type': 'hidden',
'id': 'olmis_service_provided_list'}))
## OLMIS PRIORITIES ##
olmis_priority_domain = forms.ChoiceField(choices=olmis_domain_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'olmis_priority_domain'})
)
olmis_priority_service = forms.ChoiceField(choices=(),
initial='',
widget=forms.SelectMultiple(
attrs={'class': 'form-control',
'id': 'olmis_priority_service'
}))
olmis_priority_service_provided_list = forms.CharField(widget=forms.TextInput(
attrs={'type': 'hidden',
'id': 'olmis_priority_service_provided_list'}))
date_of_csi = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date Of CSI'),
'class': 'form-control',
'name': 'date_of_csi',
'id': 'date_of_csi',
'data-parsley-required': "true",
'data-parsley-group': 'group2'
}))
person = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'person',
'type': 'hidden',
'data-parsley-required': "true",
'data-parsley-group': 'group0'
}))
class OVCF1AForm(forms.Form):
olmis_assessment_domain = forms.ChoiceField(choices=olmis_assessment_domain_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'olmis_assessment_domain'})
)
olmis_assessment_coreservice = forms.ChoiceField(choices=(),
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'olmis_assessment_coreservice'})
)
olmis_assessment_coreservice_status = forms.ChoiceField(choices=(),
initial='0',
widget=forms.SelectMultiple(
attrs={'class': 'form-control',
'id': 'olmis_assessment_coreservice_status'})
)
olmis_assessment_provided_list = forms.CharField(widget=forms.TextInput(
attrs={'type': 'hidden',
'id': 'olmis_assessment_provided_list'}))
## OLMIS SERVICES ##
olmis_domain = forms.ChoiceField(choices=olmis_domain_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'olmis_domain'})
)
olmis_subdomain = forms.ChoiceField(choices=olmis_domain_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'olmis_subdomain'})
)
olmis_service = forms.ChoiceField(choices=(),
initial='',
widget=forms.SelectMultiple(
attrs={'class': 'form-control',
'id': 'olmis_service'
}))
olmis_service_provider = forms.ChoiceField(choices=olmis_service_provider_list,
initial='0',
required=True,
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'olmis_service_provider'})
)
olmis_service_date = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date Of Service'),
'class': 'form-control',
'id': 'olmis_service_date'
}))
olmis_place_of_service = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': _('Place of Service'),
'class': 'form-control',
'id': 'olmis_place_of_service'}))
olmis_service_provided_list = forms.CharField(widget=forms.TextInput(
attrs={'type': 'hidden',
'id': 'olmis_service_provided_list'}))
## OLMIS PRIORITIES ##
olmis_priority_domain = forms.ChoiceField(choices=olmis_domain_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'olmis_priority_domain'})
)
olmis_priority_service = forms.MultipleChoiceField(choices=(),
initial='',
widget=forms.SelectMultiple(
attrs={'class': 'form-control',
'id': 'olmis_priority_service'
}))
olmis_priority_service_provided_list = forms.CharField(widget=forms.TextInput(
attrs={'type': 'hidden',
'id': 'olmis_priority_service_provided_list'}))
olmis_priority_health = forms.ChoiceField(choices=(),
initial='0',
widget=forms.SelectMultiple(
attrs={'class': 'form-control',
'id': 'olmis_priority_health',
'data-parsley-required': "true",
'data-parsley-group': 'group2'})
)
olmis_priority_shelter = forms.ChoiceField(choices=(),
initial='0',
widget=forms.SelectMultiple(
attrs={'class': 'form-control',
'id': 'olmis_priority_shelter',
'data-parsley-required': "true",
'data-parsley-group': 'group2'})
)
olmis_priority_education = forms.ChoiceField(choices=(),
initial='0',
widget=forms.SelectMultiple(
attrs={'class': 'form-control',
'id': 'olmis_priority_education',
'data-parsley-required': "true",
'data-parsley-group': 'group2'})
)
olmis_priority_protection = forms.ChoiceField(choices=(),
initial='0',
widget=forms.SelectMultiple(
attrs={'class': 'form-control',
'id': 'olmis_priority_protection',
'data-parsley-required': "true",
'data-parsley-group': 'group2'})
)
olmis_priority_pss = forms.ChoiceField(choices=(),
initial='0',
widget=forms.SelectMultiple(
attrs={'class': 'form-control',
'id': 'olmis_priority_pss',
'data-parsley-required': "true",
'data-parsley-group': 'group2'})
)
olmis_priority_hes = forms.ChoiceField(choices=(),
initial='0',
widget=forms.SelectMultiple(
attrs={
#'class': 'form-control',
'id': 'olmis_priority_hes',
'data-parsley-required': "true",
'data-parsley-group': 'group2'})
)
## OLMIS CRITICAL EVENTS ##
olmis_critical_event = forms.ChoiceField(choices=olmis_critical_events_list,
initial='0',
widget=forms.SelectMultiple(
attrs={'class': 'form-control',
'id': 'olmis_critical_event'
#'data-parsley-required': "true",
#'data-parsley-group': 'group3'
})
)
date_of_assessment = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date of Event'),
'class': 'form-control',
'name': 'date_of_assessment',
'id': 'date_of_assessment'
#'data-parsley-required': "true",
#'data-parsley-group': 'group3'
}))
date_of_service = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date of Event'),
'class': 'form-control',
'name': 'date_of_service',
'id': 'date_of_service'
#'data-parsley-required': "true",
#'data-parsley-group': 'group3'
}))
date_of_cevent = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date of Event'),
'class': 'form-control',
'name': 'date_of_cevent',
'id': 'date_of_cevent'
#'data-parsley-required': "true",
#'data-parsley-group': 'group3'
}))
date_of_priority = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date of Event'),
'class': 'form-control',
'name': 'date_of_priority',
'id': 'date_of_priority'
#'data-parsley-required': "true",
#'data-parsley-group': 'group3'
}))
person = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'person',
'type': 'hidden'
#'data-parsley-required': "true",
#'data-parsley-group': 'group3'
}))
caretaker_id = forms.CharField(widget=forms.HiddenInput(
attrs={'id': 'caretaker_id'}))
class OVCHHVAForm(forms.Form):
# Household Individuals
hhva_ha1_male = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Male'),
'class': 'form-control',
'id': 'hhva_ha1_male',
'data-parsley-type': "digits",
'data-parsley-required': "true",
'data-parsley-group': 'group0'})
)
hhva_ha1_female = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Female'),
'class': 'form-control',
'id': 'hhva_ha1_female',
'data-parsley-type': "digits",
'data-parsley-required': "true",
'data-parsley-group': 'group0'})
)
hhva_ha2_male = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Male'),
'class': 'form-control',
'id': 'hhva_ha2_male',
'data-parsley-type': "digits",
'data-parsley-required': "true",
'data-parsley-group': 'group0'})
)
hhva_ha2_female = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Female'),
'class': 'form-control',
'id': 'hhva_ha2_female',
'data-parsley-type': "digits",
'data-parsley-required': "true",
'data-parsley-group': 'group0'})
)
hhva_ha3_male = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Male'),
'class': 'form-control',
'id': 'hhva_ha3_male',
'data-parsley-type': "digits",
'data-parsley-required': "true",
'data-parsley-group': 'group0'})
)
hhva_ha3_female = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Female'),
'class': 'form-control',
'id': 'hhva_ha3_female',
'data-parsley-type': "digits",
'data-parsley-required': "true",
'data-parsley-group': 'group0'})
)
hhva_ha4_male = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Male'),
'class': 'form-control',
'id': 'hhva_ha4_male',
'data-parsley-type': "digits",
'data-parsley-required': "true",
'data-parsley-group': 'group0'})
)
hhva_ha4_female = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Female'),
'class': 'form-control',
'id': 'hhva_ha4_female',
'data-parsley-type': "digits",
'data-parsley-required': "true",
'data-parsley-group': 'group0'})
)
# Water Sanitation and Hygiene
hhva_ha5 = forms.ChoiceField(choices=olmis_ha5_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'hhva_ha5',
'data-parsley-required': "true",
'data-parsley-group': 'group1'})
)
hhva_ha6 = forms.ChoiceField(choices=olmis_ha6_list,
initial='0',
widget=forms.SelectMultiple(
attrs={'class': 'form-control',
'id': 'hhva_ha6',
'data-parsley-required': "true",
'data-parsley-group': 'group1'})
)
hhva_ha7 = forms.ChoiceField(choices=olmis_ha7_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'hhva_ha7',
'data-parsley-required': "true",
'data-parsley-group': 'group1'})
)
hhva_ha8 = forms.ChoiceField(choices=olmis_ha8_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'hhva_ha8',
'data-parsley-required': "true",
'data-parsley-group': 'group1'})
)
# Shelter and Care
hhva_ha9 = forms.ChoiceField(choices=olmis_ha9_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'hhva_ha9',
'data-parsley-required': "true",
'data-parsley-group': 'group2'})
)
hhva_ha10_type = forms.ChoiceField(choices=olmis_ha10_type_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'hhva_ha10_type'})
)
hhva_ha10_number = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Number'),
'class': 'form-control',
'id': 'hhva_ha10_number',
'data-parsley-type': "digits"})
)
hhva_ha10_condition = forms.ChoiceField(choices=olmis_ha10_condition_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'hhva_ha10_condition'})
)
hhva_wash_list = forms.CharField(widget=forms.TextInput(
attrs={'type': 'hidden',
'id': 'hhva_wash_list'}))
# Food Security and Nutrition
hhva_ha11 = forms.ChoiceField(choices=olmis_ha11_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'hhva_ha11',
'data-parsley-required': "true",
'data-parsley-group': 'group3'})
)
hhva_ha12 = forms.ChoiceField(choices=olmis_ha12_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'hhva_ha12',
'data-parsley-required': "true",
'data-parsley-group': 'group3'})
)
# Household Income & Property
hhva_ha13 = forms.ChoiceField(choices=olmis_ha13_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'hhva_ha13',
'data-parsley-required': "true",
'data-parsley-group': 'group4'})
)
hhva_ha14 = forms.ChoiceField(choices=olmis_ha14_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'hhva_ha14',
'data-parsley-required': "true",
'data-parsley-group': 'group4'})
)
hhva_ha15_asset = forms.ChoiceField(choices=olmis_ha15_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'hhva_ha15_asset'})
)
hhva_ha15_number = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Number'),
'class': 'form-control',
'id': 'hhva_ha15_number',
'data-parsley-type': "digits"})
)
hhva_ha15_size = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Size'),
'class': 'form-control',
'id': 'hhva_ha15_size',
'data-parsley-type': "digits"})
)
hhva_asset_list = forms.CharField(widget=forms.TextInput(
attrs={'type': 'hidden',
'id': 'hhva_asset_list'}))
hhva_ha16 = forms.ChoiceField(choices=olmis_ha16_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'hhva_ha16',
'data-parsley-required': "true",
'data-parsley-group': 'group4'})
)
hhva_ha17 = forms.ChoiceField(choices=olmis_ha17_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'hhva_ha17',
'data-parsley-required': "true",
'data-parsley-group': 'group4'})
)
hhva_ha18 = forms.ChoiceField(choices=olmis_ha18_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'hhva_ha18',
'data-parsley-required': "true",
'data-parsley-group': 'group4'})
)
hhva_ha19 = forms.ChoiceField(choices=olmis_ha19_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'hhva_ha19',
'data-parsley-required': "true",
'data-parsley-group': 'group4'})
)
hhva_ha20 = forms.ChoiceField(choices=olmis_ha20_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'hhva_ha20',
'data-parsley-required': "true",
'data-parsley-group': 'group4'})
)
hhva_ha21 = forms.ChoiceField(choices=olmis_ha21_list,
initial='0',
widget=forms.SelectMultiple(
attrs={'class': 'form-control',
'id': 'hhva_ha21',
'data-parsley-required': "true",
'data-parsley-group': 'group4'})
)
# Health Services and Health Seeking Behaviours
hhva_ha22 = forms.ChoiceField(choices=olmis_ha22_list,
initial='0',
widget=forms.SelectMultiple(
attrs={'class': 'form-control',
'id': 'hhva_ha22',
'data-parsley-required': "true",
'data-parsley-group': 'group5'})
)
hhva_ha23 = forms.ChoiceField(choices=olmis_ha23_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'hhva_ha23',
'data-parsley-required': "true",
'data-parsley-group': 'group5'})
)
hhva_ha24 = forms.ChoiceField(choices=olmis_ha24_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'hhva_ha24',
'data-parsley-required': "true",
'data-parsley-group': 'group5'})
)
hhva_ha25 = forms.ChoiceField(choices=olmis_ha25_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'hhva_ha25',
'data-parsley-required': "true",
'data-parsley-group': 'group5'})
)
hhva_ha26_male = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Male'),
'class': 'form-control',
'id': 'hhva_ha26_male',
'data-parsley-type': "digits",
'data-parsley-required': "true",
'data-parsley-group': 'group5'})
)
hhva_ha26_female = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Female'),
'class': 'form-control',
'id': 'hhva_ha26_female',
'data-parsley-type': "digits",
'data-parsley-required': "true",
'data-parsley-group': 'group5'})
)
hhva_ha27_male = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Male'),
'class': 'form-control',
'id': 'hhva_ha27_male',
'data-parsley-type': "digits",
'data-parsley-required': "true",
'data-parsley-group': 'group5'})
)
hhva_ha27_female = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Female'),
'class': 'form-control',
'id': 'hhva_ha27_female',
'data-parsley-type': "digits",
'data-parsley-required': "true",
'data-parsley-group': 'group5'})
)
# Protection
hhva_ha28 = forms.ChoiceField(choices=olmis_ha28_list,
initial='0',
widget=forms.SelectMultiple(
attrs={'class': 'form-control',
'id': 'hhva_ha28',
'data-parsley-required': "true",
'data-parsley-group': 'group6'})
)
# Other Services
hhva_ha29 = forms.ChoiceField(choices=olmis_ha29_list,
initial='0',
widget=forms.SelectMultiple(
attrs={'class': 'form-control',
'id': 'hhva_ha29',
'data-parsley-required': "true",
'data-parsley-group': 'group7'})
)
hhva_ha30 = forms.ChoiceField(choices=olmis_ha30_list,
initial='0',
widget=forms.SelectMultiple(
attrs={'class': 'form-control',
'id': 'hhva_ha30',
'data-parsley-required': "true",
'data-parsley-group': 'group7'})
)
# Household Priorities
hhva_ha31 = forms.ChoiceField(choices=olmis_ha31_list,
initial='0',
widget=forms.SelectMultiple(
attrs={'class': 'form-control',
'id': 'hhva_ha31',
'data-parsley-required': "true",
'data-parsley-group': 'group8'})
)
date_of_hhva = forms.DateField(widget=forms.TextInput(
attrs={'placeholder': _('Date Of HHVA'),
'class': 'form-control',
'name': 'date_of_hhva',
'id': 'date_of_hhva',
'data-parsley-required': "true",
'data-parsley-group': 'group0'
}))
person = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'person',
'type': 'hidden'
}))
household_id = forms.CharField(widget=forms.TextInput(
attrs={'class': 'form-control',
'id': 'household_id',
'type': 'hidden'
}))
class RadioCustomRenderer(RadioFieldRenderer):
"""Custom radio button renderer class."""
def render(self):
"""Renderer override method."""
return mark_safe(u'%s' % u'\n'.join(
[u'%s' % force_unicode(w) for w in self]))
class GOKBursaryForm(forms.Form):
# Household Individuals
error_container = 'data-parsley-errors-container'
kcpe_marks = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('KCPE Marks'),
'class': 'form-control',
'id': 'kcpe_marks',
'data-parsley-maxlength': "10",
'data-parsley-type': "digits",
'data-parsley-required': "true",
'data-parsley-group': 'group1'})
)
child_county = forms.ChoiceField(
choices=county_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'child_county',
'data-parsley-required': "true",
'data-parsley-group': "group1"}))
# sub_county_list = get_geo_list(all_list,
# 'GDIS', 'Please Select Sub-county')
child_constituency = forms.ChoiceField(
choices=sub_county_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'child_constituency',
'data-parsley-required': "true",
'data-parsley-group': "group1"}))
# Page - 1
child_sub_county = forms.ChoiceField(
choices=sub_county_list,
initial='',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'child_sub_county',
'data-parsley-required': 'true'}))
child_location = forms.ChoiceField(
choices=loc, label=_('Location'),
initial='',
widget=forms.Select(
attrs={'id': 'child_location',
'data-parsley-maxlength': "20",
'class': 'form-control'}))
child_sub_location = forms.ChoiceField(
choices=sub_loc, label=_('Sub Location'),
initial='',
widget=forms.Select(
attrs={'id': 'child_sub_location',
'class': 'form-control'}))
child_village = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Village'),
'class': 'form-control',
'data-parsley-required': "true",
'data-parsley-group': 'group1'})
)
nearest_school = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('School Name'),
'class': 'form-control',
'data-parsley-group': 'group1'})
)
nearest_worship = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Church / Mosque'),
'class': 'form-control',
'data-parsley-group': 'group1'})
)
school_name = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('School Name'),
'class': 'form-control',
'data-parsley-group': 'group1'})
)
school_class = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('School Class'),
'class': 'form-control',
'data-parsley-group': 'group1'})
)
in_school = forms.ChoiceField(
choices=YESNO_CHOICES,
widget=forms.RadioSelect(
renderer=RadioCustomRenderer,
attrs={'data-parsley-required': 'true',
'data-parsley-errors-container': "#in_school_error"})
)
pri_school_name = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Primary School Name'),
'class': 'form-control',
'data-parsley-group': 'group1'})
)
father_name = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Father Name'),
'class': 'form-control',
'data-parsley-required': 'true',
'data-parsley-group': 'group1'})
)
mother_name = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Mother Name'),
'class': 'form-control',
'data-parsley-required': 'true',
'data-parsley-group': 'group1'})
)
guardian_name = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Guardian Name'),
'class': 'form-control',
'data-parsley-group': 'group1'})
)
father_contact = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Father Phone'),
'class': 'form-control',
'data-parsley-type': "number",
'data-parsley-maxlength': "20",
'data-parsley-group': 'group1'})
)
father_alive = forms.ChoiceField(
choices=YESNO_CHOICES,
widget=forms.RadioSelect(
renderer=RadioCustomRenderer,
attrs={'data-parsley-required': 'true',
'data-parsley-errors-container': "#father_alive_error"}))
mother_contact = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Mother Phone'),
'class': 'form-control',
'data-parsley-type': "number",
'data-parsley-maxlength': "20",
'data-parsley-group': 'group1'})
)
guardian_contact = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Guardian Phone'),
'class': 'form-control',
'data-parsley-type': "number",
'data-parsley-maxlength': "20",
'data-parsley-group': 'group1'})
)
guardian_occupation = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Guardian Contact'),
'class': 'form-control',
'data-parsley-group': 'group1'})
)
guardian_id = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _("Guardian's ID No."),
'class': 'form-control',
'data-parsley-group': 'group1'})
)
father_id = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Father ID No.'),
'data-parsley-type': "digits",
'data-parsley-required': "true",
'data-parsley-maxlength': "10",
'class': 'form-control',
'data-parsley-group': 'group1'})
)
mother_id = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Mother ID No.'),
'data-parsley-type': "digits",
'data-parsley-required': "true",
'data-parsley-maxlength': "10",
'class': 'form-control',
'data-parsley-group': 'group1'})
)
mother_alive = forms.ChoiceField(
choices=YESNO_CHOICES,
widget=forms.RadioSelect(
renderer=RadioCustomRenderer,
attrs={'data-parsley-required': 'true',
'data-parsley-errors-container': "#mother_alive_error"}))
guardian_relation = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Guardian relation'),
'class': 'form-control',
'data-parsley-maxlength': "20",
'data-parsley-group': 'group1'})
)
living_with = forms.ChoiceField(
choices=YESNO_CHOICES,
widget=forms.RadioSelect(
renderer=RadioCustomRenderer,
attrs={'data-parsley-required': 'true',
'data-parsley-errors-container': "#living_with_error"}))
father_ill = forms.ChoiceField(
choices=YESNO_CHOICES,
widget=forms.RadioSelect(
renderer=RadioCustomRenderer,
attrs={'data-parsley-required': 'true',
'data-parsley-errors-container': "#father_ill_error"}))
mother_ill = forms.ChoiceField(
choices=YESNO_CHOICES,
widget=forms.RadioSelect(
renderer=RadioCustomRenderer,
attrs={'data-parsley-required': 'true',
'data-parsley-errors-container': "#mother_ill_error"}))
father_illness = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Father Illness'),
'class': 'form-control',
'data-parsley-group': 'group1'})
)
mother_illness = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Mother Illness'),
'class': 'form-control',
'data-parsley-group': 'group1'})
)
nemis_no = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('NEMIS No.'),
'class': 'form-control',
'data-parsley-type': "digits",
'data-parsley-required': "true",
'data-parsley-group': 'group1'})
)
year_of_bursary_award = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Year of Bursary Award'),
'data-parsley-type': "digits",
'data-parsley-required': "true",
'data-parsley-type': "number",
'data-parsley-maxlength': "4",
'class': 'form-control',
'data-parsley-group': 'group1'})
)
date_of_issue = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Date of Issue'),
'data-parsley-required': "true",
'class': 'form-control',
'data-parsley-group': 'group1'})
)
eligibility_scores = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('eligibility (scores)'),
'class': 'form-control',
'data-parsley-maxlength': "10",
'data-parsley-required': "true",
'data-parsley-group': 'group1'})
)
father_disabled = forms.ChoiceField(
choices=YESNO_CHOICES,
widget=forms.RadioSelect(
renderer=RadioCustomRenderer,
attrs={'data-parsley-required': 'true',
'data-parsley-errors-container': "#father_disabled_error"}))
mother_disabled = forms.ChoiceField(
choices=YESNO_CHOICES,
widget=forms.RadioSelect(
renderer=RadioCustomRenderer,
attrs={'data-parsley-required': 'true',
'data-parsley-errors-container': "#mother_disabled_error"}))
father_disability = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Father Disability'),
'class': 'form-control',
'data-parsley-group': 'group1'})
)
mother_disability = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Mother Disability'),
'class': 'form-control',
'data-parsley-group': 'group1'})
)
father_occupation = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Father Occupation'),
'class': 'form-control',
'data-parsley-required': "true",
'data-parsley-group': 'group1'})
)
father_pension = forms.ChoiceField(
choices=YESNO_CHOICES,
widget=forms.RadioSelect(
renderer=RadioCustomRenderer,
attrs={'data-parsley-required': 'true',
'data-parsley-errors-container': "#father_pension_error"}))
mother_occupation = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Mother Occupation'),
'class': 'form-control',
'data-parsley-required': "true",
'data-parsley-group': 'group1'})
)
mother_pension = forms.ChoiceField(
choices=YESNO_CHOICES,
widget=forms.RadioSelect(
renderer=RadioCustomRenderer,
attrs={'data-parsley-required': 'true',
'data-parsley-errors-container': "#mother_pension_error"}))
fees_amount = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Fees Amount'),
'class': 'form-control',
'data-parsley-type': "digits",
'data-parsley-maxlength': "10",
'data-parsley-required': "true",
'data-parsley-group': 'group1'})
)
balance_amount = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Balance Amount'),
'class': 'form-control',
'data-parsley-type': "digits",
'data-parsley-required': "true",
'data-parsley-maxlength': "10",
'data-parsley-group': 'group1'})
)
school_name = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('School Name.'),
'class': 'form-control',
'data-parsley-required': "true",
'data-parsley-group': 'group1'})
)
principal_name = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Principal Name.'),
'class': 'form-control',
'data-parsley-required': "true",
'data-parsley-group': 'group1'})
)
school_phone = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Phone No.'),
'class': 'form-control',
'data-parsley-group': 'group1'})
)
school_email = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Email.'),
'class': 'form-control',
'data-parsley-group': 'group1'})
)
school_county = forms.ChoiceField(
choices=county_list,
initial='',
widget=forms.Select(
attrs={'class': 'form-control',
'data-parsley-required': "true",
'id': 'school_county'}))
school_constituency = forms.ChoiceField(
choices=sub_county_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'school_constituency',
'data-parsley-required': "true",
'data-parsley-group': "group1"}))
school_sub_county = forms.ChoiceField(
choices=sub_county_list,
initial='',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'school_sub_county',
'data-parsley-required': 'true'}))
school_location = forms.ChoiceField(
choices=loc, label=_('Location'),
initial='',
widget=forms.Select(
attrs={'id': 'school_location_field',
'class': 'form-control'}))
school_sub_location = forms.ChoiceField(
choices=sub_loc, label=_('Sub Location'),
initial='',
widget=forms.Select(
attrs={'id': 'school_sub_location',
'class': 'form-control'}))
school_village = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Village'),
'class': 'form-control',
'data-parsley-group': 'group1'})
)
school_address = forms.CharField(widget=forms.Textarea(
attrs={'rows': '3', 'class': 'form-control'}))
school_type = forms.ChoiceField(
choices=bursary_school_type_list,
widget=forms.RadioSelect(
renderer=RadioCustomRenderer,
attrs={'data-parsley-required': 'true',
'data-parsley-maxlength': "5",
'data-parsley-errors-container': "#school_type_error"}))
school_category = forms.ChoiceField(
choices=bursary_school_category_list,
widget=forms.RadioSelect(
renderer=RadioCustomRenderer,
attrs={'data-parsley-required': 'true',
'data-parsley-maxlength': "5",
'data-parsley-errors-container': "#school_category_error"}))
status_of_student = forms.ChoiceField(
choices=status_of_student_list,
widget=forms.RadioSelect(
renderer=RadioCustomRenderer,
attrs={'data-parsley-required': 'true',
'data-parsley-errors-container': "#status_of_student_error"
}))
school_enrolled = forms.ChoiceField(
choices=bursary_school_enrolled_list,
widget=forms.RadioSelect(
renderer=RadioCustomRenderer,
attrs={'data-parsley-required': 'true',
'data-parsley-maxlength': "5",
'data-parsley-errors-container': "#school_enrolled_error"}))
bank = forms.ChoiceField(
choices=bank_list,
initial='0',
widget=forms.Select(attrs={'class': 'form-control'}))
bank_branch = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Bank Branch'),
'class': 'form-control',
'data-parsley-required': "true",
'data-parsley-group': 'group1'})
)
bank_account = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Account Number.'),
'class': 'form-control',
'data-parsley-maxlength': "50",
'data-parsley-required': "true",
'data-parsley-group': 'group1'})
)
approved_csac = forms.ChoiceField(
choices=YESNO_CHOICES,
widget=forms.RadioSelect(
renderer=RadioCustomRenderer,
attrs={'data-parsley-required': 'true',
'data-parsley-errors-container': "#approved_csac_error"}))
approved_amount = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Approved Amount'),
'class': 'form-control',
'data-parsley-type': "digits",
'data-parsley-maxlength': "10",
'data-parsley-required': "true",
'data-parsley-group': 'group1'})
)
signed_scco = forms.ChoiceField(
choices=YESNO_CHOICES,
widget=forms.RadioSelect(
renderer=RadioCustomRenderer,
attrs={'data-parsley-required': 'true',
'data-parsley-errors-container': "#signed_scco_error"}))
signed_csac = forms.ChoiceField(
choices=YESNO_CHOICES,
widget=forms.RadioSelect(
renderer=RadioCustomRenderer,
attrs={'data-parsley-required': 'true',
'data-parsley-errors-container': "#signed_csac_error"}))
date_signed_scco = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Date Signed'),
'class': 'form-control',
'data-parsley-required': "true",
'data-parsley-group': 'group1'})
)
date_signed_csac = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Date Signed'),
'class': 'form-control',
'data-parsley-required': "true",
'data-parsley-group': 'group1'})
)
school_reason = forms.CharField(widget=forms.Textarea(
attrs={'rows': '3', 'class': 'form-control'}))
recommend_principal = forms.ChoiceField(
choices=principal_list,
widget=forms.RadioSelect(
renderer=RadioCustomRenderer,
attrs={'data-parsley-required': 'true',
'data-parsley-maxlength': "5",
error_container: "#recommend_principal_error"
}))
recommend_chief = forms.ChoiceField(
choices=chief_list,
widget=forms.RadioSelect(
renderer=RadioCustomRenderer,
attrs={'data-parsley-required': 'true',
'data-parsley-maxlength': "5",
error_container: "#recommend_chief_error"}))
recommend_principal_date = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Date Recommended'),
'class': 'form-control',
'data-parsley-required': "true",
'data-parsley-group': 'group1'})
)
recommend_chief_date = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Date Recommended'),
'class': 'form-control',
'data-parsley-required': "true",
'data-parsley-group': 'group1'})
)
chief_telephone = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Telephone No'),
'class': 'form-control',
'data-parsley-maxlength': "10",
'data-parsley-group': 'group1'})
)
scco_name = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('SCCO Name'),
'class': 'form-control',
'data-parsley-required': "true",
'data-parsley-group': 'group1'})
)
csac_chair_name = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('CSAC Chair Name'),
'class': 'form-control',
'data-parsley-required': "true",
'data-parsley-group': 'group1'})
)
application_date = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Date of Application'),
'class': 'form-control',
'data-parsley-required': "true",
'data-parsley-group': 'group1'})
)
emergency_list = get_questions(set_id=1, default_txt=None)
class CaseInfoForm(forms.Form):
# Additional case information
emergency_detail = forms.CharField(widget=forms.TextInput(
attrs={
'placeholder': _('Emergency Details'),
'class': 'form-control',
'id': 'emergency_detail'})
)
emergency = forms.ChoiceField(
choices=emergency_list,
initial='0',
widget=forms.Select(
attrs={'class': 'form-control',
'id': 'emergency'}))
case_narration = forms.CharField(widget=forms.Textarea(
attrs={'placeholder': _('Case Narration'),
'class': 'form-control',
'id': 'case_narration',
'rows': '5'}))
| 49.770757
| 125
| 0.433259
| 12,916
| 175,641
| 5.688294
| 0.04266
| 0.090731
| 0.092773
| 0.085504
| 0.81338
| 0.779515
| 0.756105
| 0.730951
| 0.650892
| 0.591425
| 0
| 0.008269
| 0.450538
| 175,641
| 3,528
| 126
| 49.784864
| 0.753015
| 0.024778
| 0
| 0.650345
| 0
| 0
| 0.220211
| 0.049538
| 0
| 0
| 0
| 0
| 0
| 1
| 0.002197
| false
| 0.000628
| 0.002825
| 0
| 0.150659
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b05e90b496956717ded6467fb50244986a13deeb
| 200
|
py
|
Python
|
Python/Ex107/moeda.py
|
EspagueteTV/Meus-Estudos-CursoEmVideo
|
1bf3cc367bc754625a3fd59114ab63470e8d934b
|
[
"MIT"
] | null | null | null |
Python/Ex107/moeda.py
|
EspagueteTV/Meus-Estudos-CursoEmVideo
|
1bf3cc367bc754625a3fd59114ab63470e8d934b
|
[
"MIT"
] | null | null | null |
Python/Ex107/moeda.py
|
EspagueteTV/Meus-Estudos-CursoEmVideo
|
1bf3cc367bc754625a3fd59114ab63470e8d934b
|
[
"MIT"
] | null | null | null |
def metade(p):
return p / 2
def dobro(p):
return p * 2
def aumentar(p, au):
jur = au / 100
return p + (p * jur)
def diminuir(p, di):
jur = di / 100
return p - (p * jur)
| 11.111111
| 24
| 0.505
| 34
| 200
| 2.970588
| 0.352941
| 0.277228
| 0.158416
| 0.178218
| 0.514851
| 0
| 0
| 0
| 0
| 0
| 0
| 0.062016
| 0.355
| 200
| 17
| 25
| 11.764706
| 0.72093
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0
| 0
| 0.2
| 0.8
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
b061ac15f333cd0574c0050c07effc80a4b88170
| 102
|
py
|
Python
|
authorize_main/apps.py
|
Kevin1289/Clique.io_site
|
01e1d5505b293419da75aedb40bdefb9086696a6
|
[
"MIT"
] | 1
|
2020-09-01T05:15:33.000Z
|
2020-09-01T05:15:33.000Z
|
authorize_main/apps.py
|
Kevin1289/Clique.io_site
|
01e1d5505b293419da75aedb40bdefb9086696a6
|
[
"MIT"
] | null | null | null |
authorize_main/apps.py
|
Kevin1289/Clique.io_site
|
01e1d5505b293419da75aedb40bdefb9086696a6
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class AuthorizeMainConfig(AppConfig):
name = 'authorize_main'
| 17
| 37
| 0.784314
| 11
| 102
| 7.181818
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.147059
| 102
| 5
| 38
| 20.4
| 0.908046
| 0
| 0
| 0
| 0
| 0
| 0.137255
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
b066ee6346c275013056c5f5dc08465ae6a5978a
| 197
|
py
|
Python
|
core/modules/input_mod.py
|
p-panagiotis/venom-virtual-assistant
|
40db8cceedb71934e708624141da8e641460feb7
|
[
"MIT"
] | null | null | null |
core/modules/input_mod.py
|
p-panagiotis/venom-virtual-assistant
|
40db8cceedb71934e708624141da8e641460feb7
|
[
"MIT"
] | null | null | null |
core/modules/input_mod.py
|
p-panagiotis/venom-virtual-assistant
|
40db8cceedb71934e708624141da8e641460feb7
|
[
"MIT"
] | null | null | null |
import logging
from datetime import datetime
def take_input():
now = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
return input(f"{now} - {logging.getLevelName(logging.INFO)} - Master: ")
| 24.625
| 76
| 0.664975
| 28
| 197
| 4.642857
| 0.678571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.147208
| 197
| 7
| 77
| 28.142857
| 0.77381
| 0
| 0
| 0
| 0
| 0
| 0.365482
| 0.182741
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.4
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
b06acf8682f5c186e71d8089cc26781e2ee9a429
| 403
|
py
|
Python
|
src/pudgetool/entry_point.py
|
ThePolarNight/PipProject
|
5998e4f9721e9bc2efb8d2bfd09ab373a499f18f
|
[
"MIT"
] | null | null | null |
src/pudgetool/entry_point.py
|
ThePolarNight/PipProject
|
5998e4f9721e9bc2efb8d2bfd09ab373a499f18f
|
[
"MIT"
] | null | null | null |
src/pudgetool/entry_point.py
|
ThePolarNight/PipProject
|
5998e4f9721e9bc2efb8d2bfd09ab373a499f18f
|
[
"MIT"
] | null | null | null |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#author zhouh zhouhui295@163.com 2014-7-22
import os
import click
from .s3 import command as s3cmd
from .jump import command as jumpCmd
@click.group()
def entry_point():
pass
@click.command()
def help():
click.echo('command line tools help')
entry_point.add_command(help)
entry_point.add_command(s3cmd.s3)
entry_point.add_command(jumpCmd.jump)
| 17.521739
| 42
| 0.734491
| 63
| 403
| 4.587302
| 0.539683
| 0.138408
| 0.134948
| 0.207612
| 0.16609
| 0
| 0
| 0
| 0
| 0
| 0
| 0.054755
| 0.138958
| 403
| 22
| 43
| 18.318182
| 0.778098
| 0.203474
| 0
| 0
| 0
| 0
| 0.072327
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.153846
| true
| 0.076923
| 0.307692
| 0
| 0.461538
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
|
0
| 4
|
c675903c03eb6693ea712c23d503be6513496373
| 152
|
py
|
Python
|
python/testData/inspections/PyPep8NamingInspection/functionVariable.py
|
truthiswill/intellij-community
|
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
|
[
"Apache-2.0"
] | 2
|
2019-04-28T07:48:50.000Z
|
2020-12-11T14:18:08.000Z
|
python/testData/inspections/PyPep8NamingInspection/functionVariable.py
|
truthiswill/intellij-community
|
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
|
[
"Apache-2.0"
] | 173
|
2018-07-05T13:59:39.000Z
|
2018-08-09T01:12:03.000Z
|
python/testData/inspections/PyPep8NamingInspection/functionVariable.py
|
truthiswill/intellij-community
|
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
|
[
"Apache-2.0"
] | 2
|
2020-03-15T08:57:37.000Z
|
2020-04-07T04:48:14.000Z
|
def do_stuff(): pass
class A:
def foo(self):
<weak_warning descr="Variable in function should be lowercase">Abc</weak_warning> = do_stuff()
| 30.4
| 102
| 0.697368
| 23
| 152
| 4.434783
| 0.782609
| 0.137255
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.184211
| 152
| 5
| 102
| 30.4
| 0.822581
| 0
| 0
| 0
| 0
| 0
| 0.261438
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0.25
| 0
| null | null | 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
c69a5de81dae8f875e9fed6deba7365306d240d1
| 48
|
py
|
Python
|
banner/__init__.py
|
pincoin/rakmai
|
d9daa399aff50712a86b2dec9d94e622237b25b0
|
[
"MIT"
] | 11
|
2018-04-02T16:36:19.000Z
|
2019-07-10T05:54:58.000Z
|
banner/__init__.py
|
pincoin/rakmai
|
d9daa399aff50712a86b2dec9d94e622237b25b0
|
[
"MIT"
] | 22
|
2019-01-01T20:40:21.000Z
|
2022-02-10T08:06:39.000Z
|
banner/__init__.py
|
pincoin/rakmai
|
d9daa399aff50712a86b2dec9d94e622237b25b0
|
[
"MIT"
] | 4
|
2019-03-12T14:24:37.000Z
|
2022-01-07T16:20:22.000Z
|
default_app_config = 'banner.apps.BannerConfig'
| 24
| 47
| 0.833333
| 6
| 48
| 6.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.0625
| 48
| 1
| 48
| 48
| 0.844444
| 0
| 0
| 0
| 0
| 0
| 0.5
| 0.5
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
c69c5c6f5752e6bd633c3216dff7e159758a8fcb
| 48
|
py
|
Python
|
Class 11/11th Project/Assignment By Edward/Que 26.py
|
edwardmasih/Python-School-Level
|
545e8fcd87f540be2bbf01d3493bd84dd5504739
|
[
"MIT"
] | null | null | null |
Class 11/11th Project/Assignment By Edward/Que 26.py
|
edwardmasih/Python-School-Level
|
545e8fcd87f540be2bbf01d3493bd84dd5504739
|
[
"MIT"
] | null | null | null |
Class 11/11th Project/Assignment By Edward/Que 26.py
|
edwardmasih/Python-School-Level
|
545e8fcd87f540be2bbf01d3493bd84dd5504739
|
[
"MIT"
] | null | null | null |
#Que 26
s="Python"
print (s.replace("y",""))
| 12
| 26
| 0.541667
| 8
| 48
| 3.25
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.05
| 0.166667
| 48
| 3
| 27
| 16
| 0.6
| 0.125
| 0
| 0
| 0
| 0
| 0.184211
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
c6cf192d213dc1f976800c4e32db28ffca302da8
| 244
|
py
|
Python
|
tests/mocks/builtin.py
|
victorkohler/pwf
|
67f3c5990a12ce95377e953f3a96487ebd8bdce6
|
[
"MIT"
] | 1
|
2017-03-19T13:22:50.000Z
|
2017-03-19T13:22:50.000Z
|
tests/mocks/builtin.py
|
victorkohler/pwf
|
67f3c5990a12ce95377e953f3a96487ebd8bdce6
|
[
"MIT"
] | null | null | null |
tests/mocks/builtin.py
|
victorkohler/pwf
|
67f3c5990a12ce95377e953f3a96487ebd8bdce6
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
@author: Victor Kohler
@since: date 18/12/2016
@version: 0.1
"""
class MockOpen(object):
"""Simulate the builtin open function"""
def __init__(self):
pass
def close(self):
return True
| 14.352941
| 44
| 0.590164
| 31
| 244
| 4.516129
| 0.935484
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.060109
| 0.25
| 244
| 16
| 45
| 15.25
| 0.704918
| 0.483607
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0.2
| 0
| 0.2
| 0.8
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
c6d48af1e8cb0de1e5c727d22ecf31b44edbf8cd
| 6,876
|
py
|
Python
|
model.py
|
njacquelin/sports_field_registration
|
1a426b5fcf645da5d15185863bb971d2cb3ce310
|
[
"MIT"
] | null | null | null |
model.py
|
njacquelin/sports_field_registration
|
1a426b5fcf645da5d15185863bb971d2cb3ce310
|
[
"MIT"
] | null | null | null |
model.py
|
njacquelin/sports_field_registration
|
1a426b5fcf645da5d15185863bb971d2cb3ce310
|
[
"MIT"
] | null | null | null |
import torch
from torch import nn
from torchvision.transforms import Resize
from random import random
class deeper_Unet_like (nn.Module) :
def __init__(self):
super(deeper_Unet_like, self).__init__()
self.conv1 = nn.Sequential(
nn.Conv2d(3, 8, 5, 1, 2),
nn.MaxPool2d(2),
nn.ReLU(),
nn.BatchNorm2d(8),
)
self.conv2 = nn.Sequential(
nn.Conv2d(8, 16, 3, 1, 1),
nn.MaxPool2d(2),
nn.ReLU(),
nn.BatchNorm2d(16),
)
self.conv3 = nn.Sequential(
nn.Conv2d(16, 32, 3, 1, 1),
nn.MaxPool2d(2),
nn.ReLU(),
nn.BatchNorm2d(32),
)
self.conv4 = nn.Sequential(
nn.Conv2d(32, 64, 3, 1, 1),
nn.MaxPool2d(2),
nn.ReLU(),
nn.BatchNorm2d(64),
)
self.conv5 = nn.Sequential(
nn.Conv2d(64, 128, 3, 1, 1),
nn.MaxPool2d(2),
nn.ReLU(),
nn.BatchNorm2d(128),
)
self.bottleneck = nn.Sequential(
nn.Conv2d(128, 256, 1, padding=0, stride=1),
nn.ReLU(),
nn.BatchNorm2d(256),
nn.Conv2d(256, 128, 1, padding=0, stride=1),
nn.ReLU(),
nn.BatchNorm2d(128),
)
self.deconv5 = nn.Sequential(
nn.Upsample(scale_factor=(2, 2), mode="bilinear", align_corners=True),
nn.Conv2d(256, 64, 3, 1, 1),
nn.ReLU(),
nn.BatchNorm2d(64),
)
self.deconv4 = nn.Sequential(
nn.Upsample(scale_factor=(2, 2), mode="bilinear", align_corners=True),
nn.Conv2d(128, 32, 3, 1, 1),
nn.ReLU(),
nn.BatchNorm2d(32),
)
self.deconv3 = nn.Sequential(
nn.Upsample(scale_factor=(2, 2), mode="bilinear", align_corners=True),
nn.Conv2d(64, 16, 3, 1, 1),
nn.ReLU(),
nn.BatchNorm2d(16),
)
self.deconv2 = nn.Sequential(
nn.Upsample(scale_factor=(2, 2), mode="bilinear", align_corners=True),
nn.Conv2d(32, 24, 3, 1, 1),
nn.ReLU(),
nn.BatchNorm2d(24),
)
self.deconv1 = nn.Sequential(
nn.Upsample(scale_factor=(2, 2), mode="bilinear", align_corners=True),
nn.Conv2d(32, 32, 3, 1, 1),
nn.ReLU(),
nn.BatchNorm2d(32),
)
self.heatmap = nn.Sequential(
nn.Conv2d(32, 32, 3, 1, 1),
nn.ReLU(),
nn.BatchNorm2d(32),
nn.Conv2d(32, 32, 1, 1, 0),
nn.Sigmoid(),
# nn.Softmax(dim=1),
)
def forward(self, x, residual_connexions=False, rand_threshold=0.5):
z1 = self.conv1(x)
z2 = self.conv2(z1)
z3 = self.conv3(z2)
z4 = self.conv4(z3)
z5 = self.conv5(z4)
code = self.bottleneck(z5)
x_bottleneck = torch.cat((code, z5), dim=1)
x5 = self.deconv5(x_bottleneck)
x5 = torch.cat((x5, z4), dim=1)
x4 = self.deconv4(x5)
x4 = torch.cat((x4, z3), dim=1)
x3 = self.deconv3(x4)
x3 = torch.cat((x3, z2), dim=1)
x2 = self.deconv2(x3)
x2 = torch.cat((x2, z1), dim=1)
x1 = self.deconv1(x2)
x_out = self.heatmap(x1)
return x_out
class vanilla_Unet (nn.Module) :
def __init__(self, final_depth = 18):
super(vanilla_Unet, self).__init__()
self.conv1 = nn.Sequential(
nn.Conv2d(3, 64, 5, 1, 2),
nn.ReLU(),
nn.BatchNorm2d(64),
nn.Conv2d(64, 64, 5, 1, 2),
nn.MaxPool2d(2),
nn.ReLU(),
nn.BatchNorm2d(64),
)
self.conv2 = nn.Sequential(
nn.Conv2d(64, 128, 3, 1, 1),
nn.MaxPool2d(2),
nn.ReLU(),
nn.BatchNorm2d(128),
nn.Conv2d(128, 128, 3, 1, 1),
nn.ReLU(),
nn.BatchNorm2d(128),
)
self.conv3 = nn.Sequential(
nn.Conv2d(128, 256, 3, 1, 1),
nn.MaxPool2d(2),
nn.ReLU(),
nn.BatchNorm2d(256),
nn.Conv2d(256, 256, 3, 1, 1),
nn.ReLU(),
nn.BatchNorm2d(256),
)
self.conv4 = nn.Sequential(
# nn.Conv2d(256, 512, 3, 1, padding=3, dilation=3),
nn.Conv2d(256, 512, 3, 1, 1),
nn.MaxPool2d(2),
nn.ReLU(),
nn.BatchNorm2d(512),
# nn.Conv2d(512, 512, 3, 1, padding=2, dilation=2),
nn.Conv2d(512, 512, 3, 1, 1),
nn.ReLU(),
nn.BatchNorm2d(512),
)
self.bottleneck = nn.Sequential(
nn.Conv2d(512, 1024, 1, padding=0, stride=1),
nn.ReLU(),
nn.BatchNorm2d(1024),
nn.Conv2d(1024, 512, 1, padding=0, stride=1),
nn.ReLU(),
nn.BatchNorm2d(512),
)
self.deconv4 = nn.Sequential(
nn.Upsample(scale_factor=(2, 2), mode="bilinear", align_corners=True),
nn.Conv2d(1024, 512, 3, 1, 1),
nn.ReLU(),
nn.BatchNorm2d(512),
nn.Conv2d(512, 256, 3, 1, 1),
nn.ReLU(),
nn.BatchNorm2d(256),
)
self.deconv3 = nn.Sequential(
nn.Upsample(scale_factor=(2, 2), mode="bilinear", align_corners=True),
nn.Conv2d(512, 256, 3, 1, 1),
nn.ReLU(),
nn.BatchNorm2d(256),
nn.Conv2d(256, 128, 3, 1, 1),
nn.ReLU(),
nn.BatchNorm2d(128),
)
self.deconv2 = nn.Sequential(
nn.Upsample(scale_factor=(2, 2), mode="bilinear", align_corners=True),
nn.Conv2d(256, 128, 3, 1, 1),
nn.ReLU(),
nn.BatchNorm2d(128),
nn.Conv2d(128, 64, 3, 1, 1),
nn.ReLU(),
nn.BatchNorm2d(64),
)
self.deconv1 = nn.Sequential(
nn.Upsample(scale_factor=(2, 2), mode="bilinear", align_corners=True),
nn.Conv2d(128, 64, 1, 1),
nn.ReLU(),
nn.BatchNorm2d(64),
nn.Conv2d(64, 64, 3, 1, 1),
nn.ReLU(),
nn.BatchNorm2d(64),
nn.Conv2d(64, final_depth, 1, 1, 0),
nn.Sigmoid(),
)
def forward(self, x):
z1 = self.conv1(x)
z2 = self.conv2(z1)
z3 = self.conv3(z2)
z4 = self.conv4(z3)
code = self.bottleneck(z4)
x_bottleneck = torch.cat((code, z4), dim=1)
x4 = self.deconv4(x_bottleneck)
x4 = torch.cat((x4, z3), dim=1)
x3 = self.deconv3(x4)
x3 = torch.cat((x3, z2), dim=1)
x2 = self.deconv2(x3)
x2 = torch.cat((x2, z1), dim=1)
x1 = self.deconv1(x2)
return x1
| 30.290749
| 82
| 0.473677
| 850
| 6,876
| 3.772941
| 0.102353
| 0.087309
| 0.077331
| 0.183661
| 0.840661
| 0.798877
| 0.70502
| 0.686935
| 0.671344
| 0.577799
| 0
| 0.132929
| 0.376382
| 6,876
| 227
| 83
| 30.290749
| 0.614972
| 0.017161
| 0
| 0.621891
| 0
| 0
| 0.010659
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.019901
| false
| 0
| 0.019901
| 0
| 0.059701
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
05ef32dd5ec3a357d6da2f2ce687be012146ae51
| 87
|
py
|
Python
|
PyTests/Violet/indentation_error.py
|
LiarPrincess/Violet
|
0a4268649b0eec3ab631d19015d7043394c6571e
|
[
"MIT"
] | null | null | null |
PyTests/Violet/indentation_error.py
|
LiarPrincess/Violet
|
0a4268649b0eec3ab631d19015d7043394c6571e
|
[
"MIT"
] | 6
|
2021-10-14T15:55:16.000Z
|
2022-03-31T14:04:02.000Z
|
PyTests/Violet/indentation_error.py
|
LiarPrincess/Violet
|
0a4268649b0eec3ab631d19015d7043394c6571e
|
[
"MIT"
] | null | null | null |
try:
exec('''\
for i in range(0, 10):
xxx
''')
except IndentationError:
pass
| 10.875
| 24
| 0.574713
| 12
| 87
| 4.166667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.046154
| 0.252874
| 87
| 7
| 25
| 12.428571
| 0.723077
| 0
| 0
| 0
| 0
| 0
| 0.356322
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.142857
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
af152959436e3456aa8c0713bb3e63bf90e73be2
| 390
|
py
|
Python
|
challenge 2.py
|
HwangGoeun/pi
|
fe13e68578c9ffa95b32a37f5b19f472c8073c26
|
[
"MIT"
] | null | null | null |
challenge 2.py
|
HwangGoeun/pi
|
fe13e68578c9ffa95b32a37f5b19f472c8073c26
|
[
"MIT"
] | null | null | null |
challenge 2.py
|
HwangGoeun/pi
|
fe13e68578c9ffa95b32a37f5b19f472c8073c26
|
[
"MIT"
] | null | null | null |
###
#while문
###
ja = 4 #ja=분자
mo = 2 #mo=분모
pi = 3+(ja/(mo*(mo+1)*(mo+2))) #pi=파이값
re = 300 #re=반복횟수
while re>0:
ja *= -1
mo += 2
pi = pi+(ja/(mo*(mo+1)*(mo+2)))
re -= 1
print(f"pi={pi}")
###
#for문
###
ja = 4 #ja=분자
mo = 2 #mo=분모
pi = 3+(ja/(mo*(mo+1)*(mo+2))) #pi=파이값
for i in range(300):
ja *= -1
mo += 2
pi = pi+(ja/(mo*(mo+1)*(mo+2)))
print(f"pi={pi}")
| 13
| 38
| 0.435897
| 84
| 390
| 2.02381
| 0.27381
| 0.141176
| 0.141176
| 0.164706
| 0.611765
| 0.611765
| 0.611765
| 0.611765
| 0.611765
| 0.611765
| 0
| 0.088435
| 0.246154
| 390
| 30
| 39
| 13
| 0.489796
| 0.125641
| 0
| 0.777778
| 0
| 0
| 0.043614
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.111111
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
af42076c11a5278aa5ec8a5092a890be864a458d
| 117
|
py
|
Python
|
8_kyu/Short_Long_Short.py
|
UlrichBerntien/Codewars-Katas
|
bbd025e67aa352d313564d3862db19fffa39f552
|
[
"MIT"
] | null | null | null |
8_kyu/Short_Long_Short.py
|
UlrichBerntien/Codewars-Katas
|
bbd025e67aa352d313564d3862db19fffa39f552
|
[
"MIT"
] | null | null | null |
8_kyu/Short_Long_Short.py
|
UlrichBerntien/Codewars-Katas
|
bbd025e67aa352d313564d3862db19fffa39f552
|
[
"MIT"
] | null | null | null |
def solution(a:str, b:str) -> str:
short, long = (a,b) if len(a) < len(b) else (b,a)
return short+long+short
| 29.25
| 53
| 0.589744
| 23
| 117
| 3
| 0.478261
| 0.26087
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.213675
| 117
| 3
| 54
| 39
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
af4847b757cccf87de2f70897501f62fe8210359
| 2,336
|
py
|
Python
|
bluebottle/time_based/migrations/0026_auto_20201110_1558.py
|
terrameijar/bluebottle
|
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
|
[
"BSD-3-Clause"
] | 10
|
2015-05-28T18:26:40.000Z
|
2021-09-06T10:07:03.000Z
|
bluebottle/time_based/migrations/0026_auto_20201110_1558.py
|
terrameijar/bluebottle
|
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
|
[
"BSD-3-Clause"
] | 762
|
2015-01-15T10:00:59.000Z
|
2022-03-31T15:35:14.000Z
|
bluebottle/time_based/migrations/0026_auto_20201110_1558.py
|
terrameijar/bluebottle
|
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
|
[
"BSD-3-Clause"
] | 9
|
2015-02-20T13:19:30.000Z
|
2022-03-08T14:09:17.000Z
|
# -*- coding: utf-8 -*-
# Generated by Django 1.11.17 on 2020-11-10 14:58
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('time_based', '0025_auto_20201110_1526'),
]
operations = [
migrations.RenameModel(
old_name='OnADateActivity',
new_name='DateActivity',
),
migrations.RenameModel(
old_name='WithADeadlineActivity',
new_name='PeriodActivity',
),
migrations.AlterModelOptions(
name='dateactivity',
options={'permissions': (('api_read_dateactivity', 'Can view on a date activities through the API'), ('api_add_dateactivity', 'Can add on a date activities through the API'), ('api_change_dateactivity', 'Can change on a date activities through the API'), ('api_delete_dateactivity', 'Can delete on a date activities through the API'), ('api_read_own_dateactivity', 'Can view own on a date activities through the API'), ('api_add_own_dateactivity', 'Can add own on a date activities through the API'), ('api_change_own_dateactivity', 'Can change own on a date activities through the API'), ('api_delete_own_dateactivity', 'Can delete own on a date activities through the API')), 'verbose_name': 'On a date activity', 'verbose_name_plural': 'On A Date Activities'},
),
migrations.AlterModelOptions(
name='periodactivity',
options={'permissions': (('api_read_periodactivity', 'Can view during a period activities through the API'), ('api_add_periodactivity', 'Can add during a period activities through the API'), ('api_change_periodactivity', 'Can change during a period activities through the API'), ('api_delete_periodactivity', 'Can delete during a period activities through the API'), ('api_read_own_periodactivity', 'Can view own during a period activities through the API'), ('api_add_own_periodactivity', 'Can add own during a period activities through the API'), ('api_change_own_periodactivity', 'Can change own during a period activities through the API'), ('api_delete_own_periodactivity', 'Can delete own during a period activities through the API')), 'verbose_name': 'During a period activity', 'verbose_name_plural': 'During a period activities'},
),
]
| 73
| 851
| 0.714041
| 299
| 2,336
| 5.381271
| 0.200669
| 0.169049
| 0.198881
| 0.228713
| 0.440025
| 0.440025
| 0.426352
| 0.406464
| 0.316967
| 0
| 0
| 0.017801
| 0.182363
| 2,336
| 31
| 852
| 75.354839
| 0.824607
| 0.029538
| 0
| 0.333333
| 1
| 0
| 0.662986
| 0.185512
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.083333
| 0
| 0.208333
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
af9b8d2856264a9f078cf63430f6f66b396482bc
| 45
|
py
|
Python
|
BOJ1373.py
|
INYEONGKIM/BOJ
|
5e83d77a92d18b0d20d26645c7cfe4ba3e2d25bc
|
[
"MIT"
] | 2
|
2019-03-05T15:42:46.000Z
|
2019-07-24T15:52:36.000Z
|
BOJ1373.py
|
INYEONGKIM/BOJ
|
5e83d77a92d18b0d20d26645c7cfe4ba3e2d25bc
|
[
"MIT"
] | null | null | null |
BOJ1373.py
|
INYEONGKIM/BOJ
|
5e83d77a92d18b0d20d26645c7cfe4ba3e2d25bc
|
[
"MIT"
] | null | null | null |
s="0b"+input();print(format(int(s, 2), 'o'))
| 22.5
| 44
| 0.555556
| 9
| 45
| 2.777778
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.047619
| 0.066667
| 45
| 1
| 45
| 45
| 0.547619
| 0
| 0
| 0
| 0
| 0
| 0.066667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
afa511c78f9bfb930b1631dcbe07f91b2f9e1384
| 99
|
py
|
Python
|
src/config.py
|
rtlee9/MNIST-bounding-box
|
703d3e655def1a3dbe45197fc29aa96a1f1c74d8
|
[
"MIT"
] | 1
|
2021-10-01T10:03:26.000Z
|
2021-10-01T10:03:26.000Z
|
src/config.py
|
rtlee9/MNIST-bounding-box
|
703d3e655def1a3dbe45197fc29aa96a1f1c74d8
|
[
"MIT"
] | null | null | null |
src/config.py
|
rtlee9/MNIST-bounding-box
|
703d3e655def1a3dbe45197fc29aa96a1f1c74d8
|
[
"MIT"
] | 3
|
2018-05-09T04:27:24.000Z
|
2020-12-27T17:01:55.000Z
|
from os import path
path_main = path.abspath('..')
path_outputs = path.join(path_main, 'outputs')
| 19.8
| 46
| 0.727273
| 15
| 99
| 4.6
| 0.533333
| 0.231884
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121212
| 99
| 4
| 47
| 24.75
| 0.793103
| 0
| 0
| 0
| 0
| 0
| 0.090909
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
bb8bf4a51aa0fde40407cd1e79a28b6b4ac51e40
| 2,920
|
py
|
Python
|
core/projects/helpers/actions/formatters/utils.py
|
Nikita-Filonov/lama_logger
|
7b3f474ddf35685e6949ab00d7272d16c630295c
|
[
"Apache-2.0"
] | null | null | null |
core/projects/helpers/actions/formatters/utils.py
|
Nikita-Filonov/lama_logger
|
7b3f474ddf35685e6949ab00d7272d16c630295c
|
[
"Apache-2.0"
] | null | null | null |
core/projects/helpers/actions/formatters/utils.py
|
Nikita-Filonov/lama_logger
|
7b3f474ddf35685e6949ab00d7272d16c630295c
|
[
"Apache-2.0"
] | 1
|
2021-12-21T09:39:02.000Z
|
2021-12-21T09:39:02.000Z
|
from operator import attrgetter
def default(languages: dict, attr: str, **kwargs) -> dict:
"""
:param languages:
:param attr:
:param kwargs:
:return:
"""
return {
language: translate[attr](**kwargs)
for language, translate in languages.items()
}
def nullable(languages: dict, attr: str, **kwargs) -> dict:
"""
:param languages:
:param attr:
:param kwargs:
:return:
"""
to = kwargs['to']
__add = f'{attr}.add'
__delete = f'{attr}.delete'
__change = f'{attr}.change'
if kwargs['from'] is None:
return {
language: translate[__add](to)
for language, translate in languages.items()
}
if to is None:
return {
language: translate[__delete](**kwargs)
for language, translate in languages.items()
}
return {
language: translate[__change](**kwargs)
for language, translate in languages.items()
}
def many_to_many(languages: dict, attr: str, prop: str, **kwargs) -> dict:
"""
:param languages:
:param prop:
:param attr:
:param kwargs:
:return:
"""
state_from = kwargs['from']
state_to = kwargs['to']
delete = f'{attr}.delete'
add = f'{attr}.add'
if len(state_from) > len(state_to):
diff = [f'"{attrgetter(prop)(tag)}"' for tag in state_from if tag not in state_to]
return {
language: translate[delete](diff)
for language, translate in languages.items()
}
if len(state_from) < len(state_to):
diff = [f'"{attrgetter(prop)(tag)}"' for tag in state_to if tag not in state_from]
return {
language: translate[add](diff)
for language, translate in languages.items()
}
def json_list(languages: dict, attr: str, prop: str, **kwargs) -> dict:
"""
:param languages:
:param prop:
:param attr:
:param kwargs:
:return:
"""
state_from = kwargs['from']
state_to = kwargs['to']
delete = f'{attr}.delete'
add = f'{attr}.add'
change = f'{attr}.change'
if len(state_from) > len(state_to):
diff = [f'"{file[prop]}"' for file in state_from if file not in state_to]
return {
language: translate[delete](diff)
for language, translate in languages.items()
}
if len(state_from) < len(state_to):
diff = [f'"{file[prop]}"' for file in state_to if file not in state_from]
return {
language: translate[add](diff)
for language, translate in languages.items()
}
diff = [
{'from': f'"{state_from[index][prop]}"', 'to': f'"{file[prop]}"'}
for index, file in enumerate(state_to)
if file not in state_from
]
return {
language: translate[change](diff)
for language, translate in languages.items()
}
| 26.788991
| 90
| 0.566781
| 348
| 2,920
| 4.646552
| 0.112069
| 0.189239
| 0.128015
| 0.122449
| 0.840445
| 0.772418
| 0.772418
| 0.696351
| 0.640693
| 0.640693
| 0
| 0
| 0.29726
| 2,920
| 108
| 91
| 27.037037
| 0.788012
| 0.083904
| 0
| 0.492754
| 0
| 0
| 0.093041
| 0.030102
| 0
| 0
| 0
| 0
| 0
| 1
| 0.057971
| false
| 0
| 0.014493
| 0
| 0.202899
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
bb98db449de5a9f246cc055839785ca730f53895
| 111
|
py
|
Python
|
abc116/abc116_a.py
|
Vermee81/practice-coding-contests
|
78aada60fa75f208ee0eef337b33b27b1c260d18
|
[
"MIT"
] | null | null | null |
abc116/abc116_a.py
|
Vermee81/practice-coding-contests
|
78aada60fa75f208ee0eef337b33b27b1c260d18
|
[
"MIT"
] | null | null | null |
abc116/abc116_a.py
|
Vermee81/practice-coding-contests
|
78aada60fa75f208ee0eef337b33b27b1c260d18
|
[
"MIT"
] | null | null | null |
# https://atcoder.jp/contests/abc116/tasks/abc116_a
ab, bc, ca = map(int, input().split())
print(ab * bc // 2)
| 27.75
| 51
| 0.657658
| 19
| 111
| 3.789474
| 0.842105
| 0.111111
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.071429
| 0.117117
| 111
| 3
| 52
| 37
| 0.663265
| 0.441441
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
a52b7dec8803ec19cdf953f1eaea0dbaa8f8de59
| 530
|
py
|
Python
|
ex09_8.py
|
DexHunter/Think-Python-book-exercise-solutions
|
d0abae261eda1dca99043e17e8a1e614caad2140
|
[
"CC-BY-4.0"
] | 24
|
2019-05-07T15:11:28.000Z
|
2022-03-02T04:50:28.000Z
|
ex09_8.py
|
Dekzu/Think-Python-book-exercise-solutions
|
d0abae261eda1dca99043e17e8a1e614caad2140
|
[
"CC-BY-4.0"
] | null | null | null |
ex09_8.py
|
Dekzu/Think-Python-book-exercise-solutions
|
d0abae261eda1dca99043e17e8a1e614caad2140
|
[
"CC-BY-4.0"
] | 19
|
2019-08-05T20:59:04.000Z
|
2022-03-07T05:13:32.000Z
|
def is_palindrome(word):
return word == word[::-1]
def is_palindrome_num(num):
part_one = num[2:6]
num = str(int(num) + 1)
part_two = num[1:6]
num = str(int(num) + 1)
part_three = num[1:5]
num = str(int(num) + 1)
part_four = num
if is_palindrome(part_one):
if is_palindrome(part_two):
if is_palindrome(part_three):
if is_palindrome(part_four):
return True
return False
def check_num():
for i in range(100000, 999999):
if is_palindrome_num(str(i)):
print i
check_num()
#ans: 198888, 199999
| 20.384615
| 32
| 0.667925
| 92
| 530
| 3.641304
| 0.336957
| 0.250746
| 0.208955
| 0.214925
| 0.158209
| 0.158209
| 0.107463
| 0
| 0
| 0
| 0
| 0.079625
| 0.19434
| 530
| 26
| 33
| 20.384615
| 0.704918
| 0.035849
| 0
| 0.142857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.047619
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a52f7127241632a9de46965be1fd73a87e8b0794
| 418
|
py
|
Python
|
tests/subclass/primary/a.py
|
gufolabs/gufo_loader
|
ffb4e17b2e8f36d938a145d50b7bd27d976f9fce
|
[
"BSD-3-Clause"
] | 4
|
2022-03-04T07:49:18.000Z
|
2022-03-08T07:57:05.000Z
|
tests/subclass/primary/a.py
|
gufolabs/gufo_loader
|
ffb4e17b2e8f36d938a145d50b7bd27d976f9fce
|
[
"BSD-3-Clause"
] | null | null | null |
tests/subclass/primary/a.py
|
gufolabs/gufo_loader
|
ffb4e17b2e8f36d938a145d50b7bd27d976f9fce
|
[
"BSD-3-Clause"
] | 1
|
2022-03-08T07:57:07.000Z
|
2022-03-08T07:57:07.000Z
|
# ---------------------------------------------------------------------
# Gufo Labs Loader:
# a plugin class
# ---------------------------------------------------------------------
# Copyright (C) 2022, Gufo Labs
# ---------------------------------------------------------------------
from ..base import BasePlugin
class APlugin(BasePlugin):
name = "a"
def get_name(self) -> str:
return self.name
| 24.588235
| 71
| 0.313397
| 28
| 418
| 4.642857
| 0.714286
| 0.123077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.01105
| 0.133971
| 418
| 16
| 72
| 26.125
| 0.348066
| 0.650718
| 0
| 0
| 0
| 0
| 0.007194
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0.2
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
a53180a89eaf9beca1b3ee3cf306d2f89bd9dfc1
| 905
|
py
|
Python
|
blocksec2go/__init__.py
|
DhruvKhemani/BlockchainSecurity2Go-Python-Library
|
ed4e432a18ee203840d2aa963ec35dc82f3e1399
|
[
"MIT"
] | 14
|
2019-03-08T11:03:22.000Z
|
2021-12-31T07:20:52.000Z
|
blocksec2go/__init__.py
|
DhruvKhemani/BlockchainSecurity2Go-Python-Library
|
ed4e432a18ee203840d2aa963ec35dc82f3e1399
|
[
"MIT"
] | 13
|
2019-07-25T10:43:25.000Z
|
2021-12-22T13:55:41.000Z
|
blocksec2go/__init__.py
|
DhruvKhemani/BlockchainSecurity2Go-Python-Library
|
ed4e432a18ee203840d2aa963ec35dc82f3e1399
|
[
"MIT"
] | 6
|
2019-03-25T22:48:24.000Z
|
2021-12-07T15:53:52.000Z
|
"""
This library allows the user to communicate with the
Infineon Blockchain Security2GO Starterkit through python
or using a command line tool.
Command Line:
The command line tool installed is called ``blocksec2go``.
It is built as a binary with subcommands for the individual
commands to send to the card.
To see the supported commands, run:
$ blocksec2go -h
Help for individual commands can be seen by running
$ blocksec2go <command> -h
Library usage:
To interact with the library, an object to communicate with
the reader is needed. The library includes a wrapper for PC/SC
devices (using PyScard), for different readers custom wrappers
must be implemented.
All supported commands can then be sent using the functions
from the ``blocksec2go.commands`` module.
"""
from blocksec2go.commands import *
from blocksec2go.comm import *
| 32.321429
| 66
| 0.735912
| 126
| 905
| 5.285714
| 0.555556
| 0.031532
| 0.051051
| 0.06006
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009915
| 0.21989
| 905
| 28
| 67
| 32.321429
| 0.933428
| 0.918232
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
a55b949c471d1aa8115c6bfde92522ddf25e003f
| 184
|
py
|
Python
|
iamheadless_translate/loader.py
|
plain-ie/iamheadless_translate
|
385d22910eb742745301e28a75f4a9e93c0ea82d
|
[
"MIT"
] | null | null | null |
iamheadless_translate/loader.py
|
plain-ie/iamheadless_translate
|
385d22910eb742745301e28a75f4a9e93c0ea82d
|
[
"MIT"
] | null | null | null |
iamheadless_translate/loader.py
|
plain-ie/iamheadless_translate
|
385d22910eb742745301e28a75f4a9e93c0ea82d
|
[
"MIT"
] | null | null | null |
from importlib import import_module
def load(string):
parts = string.split('.')
cls = parts.pop()
module = import_module('.'.join(parts))
return getattr(module, cls)
| 20.444444
| 43
| 0.663043
| 23
| 184
| 5.217391
| 0.608696
| 0.2
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.195652
| 184
| 8
| 44
| 23
| 0.810811
| 0
| 0
| 0
| 0
| 0
| 0.01087
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
a56746b22e1e3f5789daaf768df5b3d92defa2cd
| 318
|
py
|
Python
|
gammapy/maps/__init__.py
|
QRemy/gammapy
|
fe799e8a8e792d216fdb11fb7abcb64d58f273dd
|
[
"BSD-3-Clause"
] | null | null | null |
gammapy/maps/__init__.py
|
QRemy/gammapy
|
fe799e8a8e792d216fdb11fb7abcb64d58f273dd
|
[
"BSD-3-Clause"
] | null | null | null |
gammapy/maps/__init__.py
|
QRemy/gammapy
|
fe799e8a8e792d216fdb11fb7abcb64d58f273dd
|
[
"BSD-3-Clause"
] | null | null | null |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Sky maps."""
from .base import *
from .geom import *
from .hpx import *
from .hpxmap import *
from .hpxnd import *
from .image_utils import *
from .plotting import *
from .profile import *
from .wcs import *
from .wcsmap import *
from .wcsnd import *
| 22.714286
| 63
| 0.716981
| 47
| 318
| 4.829787
| 0.553191
| 0.440529
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003831
| 0.179245
| 318
| 13
| 64
| 24.461538
| 0.8659
| 0.226415
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
a572ac017e6eb917b33ce5b162e88f26d0750d70
| 93
|
py
|
Python
|
codes_auto/413.arithmetic-slices.py
|
smartmark-pro/leetcode_record
|
6504b733d892a705571eb4eac836fb10e94e56db
|
[
"MIT"
] | null | null | null |
codes_auto/413.arithmetic-slices.py
|
smartmark-pro/leetcode_record
|
6504b733d892a705571eb4eac836fb10e94e56db
|
[
"MIT"
] | null | null | null |
codes_auto/413.arithmetic-slices.py
|
smartmark-pro/leetcode_record
|
6504b733d892a705571eb4eac836fb10e94e56db
|
[
"MIT"
] | null | null | null |
#
# @lc app=leetcode.cn id=413 lang=python3
#
# [413] arithmetic-slices
#
None
# @lc code=end
| 13.285714
| 41
| 0.677419
| 15
| 93
| 4.2
| 0.866667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.088608
| 0.150538
| 93
| 7
| 42
| 13.285714
| 0.708861
| 0.817204
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3c05e0018c44a0a488781bcf88b2b61f28b78d61
| 427
|
py
|
Python
|
src/python/stup/ring/container/item.py
|
Wizmann/STUP-Protocol
|
e06a3442082e5061d2be32be3ffd681675e7ffb5
|
[
"MIT"
] | 14
|
2017-05-06T10:14:32.000Z
|
2018-07-17T02:58:00.000Z
|
src/python/stup/ring/container/item.py
|
Wizmann/STUP-Protocol
|
e06a3442082e5061d2be32be3ffd681675e7ffb5
|
[
"MIT"
] | 2
|
2017-06-13T05:40:18.000Z
|
2017-06-13T16:23:01.000Z
|
src/python/stup/ring/container/item.py
|
Wizmann/STUP-Protocol
|
e06a3442082e5061d2be32be3ffd681675e7ffb5
|
[
"MIT"
] | 4
|
2017-06-09T20:20:54.000Z
|
2018-07-17T02:58:10.000Z
|
#coding=utf-8
from .. import Utils
class ContainerItem(object):
def __init__(self, range_l, range_r, payload):
self.range_l = Utils.to_u32(range_l)
self.range_r = Utils.to_u32(range_r)
self.payload = payload
def size(self):
return Utils.seq_sub(self.range_r, self.range_l)
def __str__(self):
return '[%d %d] %s' \
% (self.range_l, self.range_r, self.payload)
| 25.117647
| 56
| 0.627635
| 64
| 427
| 3.859375
| 0.390625
| 0.255061
| 0.161943
| 0.121457
| 0.129555
| 0
| 0
| 0
| 0
| 0
| 0
| 0.015528
| 0.245902
| 427
| 16
| 57
| 26.6875
| 0.751553
| 0.028103
| 0
| 0
| 0
| 0
| 0.024213
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.272727
| false
| 0
| 0.090909
| 0.181818
| 0.636364
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
3c37290bb87208798ce0a6cec6bac0b84207c687
| 707
|
py
|
Python
|
configs/tasks_default.py
|
f4ble/Arkon
|
b352c25968aed1b00e6d7fd58ac697c4ae6633ac
|
[
"Apache-2.0"
] | 1
|
2015-12-16T23:26:46.000Z
|
2015-12-16T23:26:46.000Z
|
configs/tasks_default.py
|
f4ble/Arkon
|
b352c25968aed1b00e6d7fd58ac697c4ae6633ac
|
[
"Apache-2.0"
] | 4
|
2015-12-23T02:46:56.000Z
|
2016-01-31T18:06:44.000Z
|
configs/tasks_default.py
|
f4ble/Arkon
|
b352c25968aed1b00e6d7fd58ac697c4ae6633ac
|
[
"Apache-2.0"
] | null | null | null |
from ark.tasks.task_check_for_update import Task_CheckForUpdates
from ark.tasks.task_list_players import Task_ListPlayers
from ark.tasks.task_get_chat import Task_GetChat
from ark.tasks.task_daily_restart import Task_DailyRestart
from ark.tasks.task_daily_restart import Task_DailyRestartRepopulate
from ark.tasks.task_sql_keep_alive import Task_SQL_keep_alive
def init():
#Part of Core Features:
Task_ListPlayers.run_interval(8,immediately=True)
Task_GetChat.run_interval(5,immediately=True)
Task_SQL_keep_alive.run_interval(60)
#Extras:
Task_CheckForUpdates.run_interval(1800)
Task_DailyRestart.run_daily('15:00:00')
Task_DailyRestartRepopulate.run_daily('06:00:00')
| 32.136364
| 68
| 0.824611
| 105
| 707
| 5.209524
| 0.380952
| 0.076782
| 0.131627
| 0.175503
| 0.13894
| 0.13894
| 0.13894
| 0.13894
| 0
| 0
| 0
| 0.031646
| 0.106082
| 707
| 21
| 69
| 33.666667
| 0.833861
| 0.041018
| 0
| 0
| 0
| 0
| 0.023704
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.076923
| true
| 0
| 0.461538
| 0
| 0.538462
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
3c3fa3ea575fac9c2f5a83b64577cd1ea21a1048
| 519
|
py
|
Python
|
restaurantsrecommendationsite/personal/views.py
|
anjanatiha/Restaurant-Recommendation
|
563054982d2c9d137786f60316d5aaa62ce422bb
|
[
"MIT"
] | 4
|
2019-01-02T19:02:08.000Z
|
2021-08-30T13:48:06.000Z
|
restaurantsrecommendationsite/personal/views.py
|
anjanatiha/Restaurant-Recommendation
|
563054982d2c9d137786f60316d5aaa62ce422bb
|
[
"MIT"
] | null | null | null |
restaurantsrecommendationsite/personal/views.py
|
anjanatiha/Restaurant-Recommendation
|
563054982d2c9d137786f60316d5aaa62ce422bb
|
[
"MIT"
] | 4
|
2020-05-27T09:59:35.000Z
|
2021-07-14T14:43:56.000Z
|
#!C:/Users/Anjana/Anaconda3/python.exe
from django.shortcuts import render
from functions_database import query_call
def index(request):
return render(request, 'personal/home.html', )
def contact(request):
return render(request, 'personal/basic.html', {'content': ['If you would like to contact me, email me at', 'atiha@memphis.edu']})
def submit(request):
query_str = request.POST.get('query')
table_data = query_call(query_str)
return render(request, 'personal/home.html', {'search_string': table_data})
| 32.4375
| 130
| 0.749518
| 74
| 519
| 5.148649
| 0.594595
| 0.094488
| 0.149606
| 0.212598
| 0.291339
| 0.183727
| 0
| 0
| 0
| 0
| 0
| 0.002169
| 0.111753
| 519
| 16
| 131
| 32.4375
| 0.824295
| 0.071291
| 0
| 0
| 0
| 0
| 0.292531
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.3
| false
| 0
| 0.2
| 0.2
| 0.8
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
3c4309858173bbf7e736e12920712630d4186759
| 32
|
py
|
Python
|
src/resources.py
|
rschwa6308/Automation-Game
|
617fdd7d1d6246e7fa15c394ed0e4d30a7f4402b
|
[
"MIT"
] | null | null | null |
src/resources.py
|
rschwa6308/Automation-Game
|
617fdd7d1d6246e7fa15c394ed0e4d30a7f4402b
|
[
"MIT"
] | null | null | null |
src/resources.py
|
rschwa6308/Automation-Game
|
617fdd7d1d6246e7fa15c394ed0e4d30a7f4402b
|
[
"MIT"
] | null | null | null |
# --- Asset Management --- #
| 6.4
| 28
| 0.46875
| 2
| 32
| 7.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.28125
| 32
| 4
| 29
| 8
| 0.652174
| 0.75
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3c700a8165688f5c8df8e04e06c6aed082d82967
| 173
|
py
|
Python
|
tests/unit/test_utils.py
|
stealthycoin/lynk
|
49e8aebdfe39d468722740d889632f7775b4e5fd
|
[
"Apache-2.0"
] | 3
|
2018-12-19T00:54:07.000Z
|
2019-06-16T12:41:44.000Z
|
tests/unit/test_utils.py
|
stealthycoin/lynk
|
49e8aebdfe39d468722740d889632f7775b4e5fd
|
[
"Apache-2.0"
] | 4
|
2018-12-13T02:21:37.000Z
|
2019-01-18T00:08:31.000Z
|
tests/unit/test_utils.py
|
stealthycoin/lynk
|
49e8aebdfe39d468722740d889632f7775b4e5fd
|
[
"Apache-2.0"
] | null | null | null |
from lynk.utils import TimeUtils
class TestTimeUtils(object):
def test_can_create_utils(self):
utils = TimeUtils()
assert isinstance(utils, TimeUtils)
| 21.625
| 43
| 0.716763
| 20
| 173
| 6.05
| 0.75
| 0.231405
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.208092
| 173
| 7
| 44
| 24.714286
| 0.883212
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 1
| 0.2
| false
| 0
| 0.2
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
3c742656d51e219cda82e306ae2a0078f4acad82
| 872
|
py
|
Python
|
bigday/views.py
|
aborsu/django-wedding-website
|
11c42ac3bd489d9a9550ffc1fd514253cbc7ba83
|
[
"Apache-2.0"
] | null | null | null |
bigday/views.py
|
aborsu/django-wedding-website
|
11c42ac3bd489d9a9550ffc1fd514253cbc7ba83
|
[
"Apache-2.0"
] | 1
|
2019-07-04T07:06:01.000Z
|
2019-07-04T07:19:36.000Z
|
bigday/views.py
|
aborsu/django-wedding-website
|
11c42ac3bd489d9a9550ffc1fd514253cbc7ba83
|
[
"Apache-2.0"
] | 2
|
2018-02-17T20:18:04.000Z
|
2019-09-03T02:15:32.000Z
|
import os
from django.conf import settings
from django.shortcuts import render
def home(request):
return render(request, 'home.html')
def get_file_names_by_prefix(url, prefix):
list_filenames = os.listdir(url)
finalList = []
for filename in list_filenames:
if filename.startswith(prefix):
finalList.append(filename)
return finalList
def g_home(request):
return render(request, 'gallery-home.html')
def g_pro(request):
return render(request, 'gallery.html', {'photos': get_file_names_by_prefix("media/photologue/photos", 'pro_')})
def g_friends(request):
return render(request, 'gallery.html', {'photos': get_file_names_by_prefix("media/photologue/photos", 'friends2_')})
def g_others(request):
return render(request, 'gallery.html', {'photos': get_file_names_by_prefix("media/photologue/photos", 'others_')})
| 31.142857
| 120
| 0.728211
| 115
| 872
| 5.304348
| 0.330435
| 0.106557
| 0.155738
| 0.213115
| 0.555738
| 0.413115
| 0.413115
| 0.413115
| 0.413115
| 0.413115
| 0
| 0.001339
| 0.143349
| 872
| 28
| 121
| 31.142857
| 0.815261
| 0
| 0
| 0
| 0
| 0
| 0.193585
| 0.079038
| 0
| 0
| 0
| 0
| 0
| 1
| 0.3
| false
| 0
| 0.15
| 0.25
| 0.75
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
3c93483382c76828b9cbb2b6607724ebeedd588d
| 169
|
py
|
Python
|
myvenv/Scripts/django-admin.py
|
LDongGyu/likelion_1st_assginment
|
e25bdc9cf1292cf92d63025f008d1d5fa66f94bf
|
[
"MIT"
] | null | null | null |
myvenv/Scripts/django-admin.py
|
LDongGyu/likelion_1st_assginment
|
e25bdc9cf1292cf92d63025f008d1d5fa66f94bf
|
[
"MIT"
] | null | null | null |
myvenv/Scripts/django-admin.py
|
LDongGyu/likelion_1st_assginment
|
e25bdc9cf1292cf92d63025f008d1d5fa66f94bf
|
[
"MIT"
] | null | null | null |
#!c:\users\lee dong gyu\desktop\test\myvenv\scripts\python.exe
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| 28.166667
| 62
| 0.781065
| 24
| 169
| 5.041667
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.100592
| 169
| 5
| 63
| 33.8
| 0.796053
| 0.360947
| 0
| 0
| 0
| 0
| 0.074766
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
b1be9fe12c791114c1b8d1227a5fe9869b95691e
| 63
|
py
|
Python
|
pyluna-radiology/luna/radiology/proxy_table/annotation/__init__.py
|
msk-mind/data-processing
|
c016d218da2eca003d06b96f2c03f16b3ce97873
|
[
"Apache-2.0"
] | 1
|
2022-03-29T03:48:00.000Z
|
2022-03-29T03:48:00.000Z
|
pyluna-radiology/luna/radiology/proxy_table/annotation/__init__.py
|
msk-mind/data-processing
|
c016d218da2eca003d06b96f2c03f16b3ce97873
|
[
"Apache-2.0"
] | 96
|
2020-11-15T01:39:12.000Z
|
2021-08-24T14:37:49.000Z
|
pyluna-radiology/tests/luna/radiology/proxy_table/annotation/__init__.py
|
msk-mind/luna
|
282b5bd594cb5bf1ef2a7fdf56fca9bea5ad7102
|
[
"Apache-2.0"
] | 1
|
2021-01-04T15:14:23.000Z
|
2021-01-04T15:14:23.000Z
|
'''
Created on December 12, 2020
@author: rosed2@mskcc.org
'''
| 12.6
| 28
| 0.68254
| 9
| 63
| 4.777778
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12963
| 0.142857
| 63
| 5
| 29
| 12.6
| 0.666667
| 0.873016
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b1fde1fe5f001d8dba5fa9b5abaca942acb51898
| 166
|
py
|
Python
|
tests/test_pipelines.py
|
jurra/sql-python-env-demo
|
7f3066336afb4ea361668b9144455fb27c395751
|
[
"Unlicense"
] | 1
|
2022-03-21T17:21:20.000Z
|
2022-03-21T17:21:20.000Z
|
tests/test_pipelines.py
|
jurra/sql-python-env-demo
|
7f3066336afb4ea361668b9144455fb27c395751
|
[
"Unlicense"
] | 4
|
2021-10-05T08:05:19.000Z
|
2021-10-08T08:31:57.000Z
|
tests/test_pipelines.py
|
jurra/articles_scraper
|
7f3066336afb4ea361668b9144455fb27c395751
|
[
"Unlicense"
] | null | null | null |
# import scrapy pipelines
from src.pipelines import *
def test_pipelines():
"""
Test the scrapy pipelines
"""
str = "hello"
assert str == "hello"
| 18.444444
| 29
| 0.626506
| 19
| 166
| 5.421053
| 0.578947
| 0.291262
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.259036
| 166
| 9
| 30
| 18.444444
| 0.837398
| 0.301205
| 0
| 0
| 0
| 0
| 0.09901
| 0
| 0
| 0
| 0
| 0
| 0.25
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3ca09a09a6aa622164268bd84e32bb3569f00d34
| 897
|
py
|
Python
|
test/test_generation.py
|
bigheiniu/maze_raw
|
2bdd20ab87dd08159847f559b6d77c44c4c7c438
|
[
"Unlicense"
] | 7
|
2018-03-12T19:51:34.000Z
|
2021-03-20T08:33:04.000Z
|
test/test_generation.py
|
bigheiniu/maze_raw
|
2bdd20ab87dd08159847f559b6d77c44c4c7c438
|
[
"Unlicense"
] | null | null | null |
test/test_generation.py
|
bigheiniu/maze_raw
|
2bdd20ab87dd08159847f559b6d77c44c4c7c438
|
[
"Unlicense"
] | 4
|
2018-09-21T14:27:11.000Z
|
2022-03-20T23:25:41.000Z
|
import pytest
import numpy as np
from gym_pathfinding.games.gridworld import path_exists
def test_path_exists():
grid = np.array([
[1,1,1,1,1,1,1],
[1,0,0,0,0,0,1],
[1,1,1,1,1,1,1],
[1,0,0,0,0,0,1],
[1,1,1,1,1,1,1],
])
assert path_exists(grid, (1, 1), (1, 5))
assert not path_exists(grid, (1, 1), (3, 5))
from gym_pathfinding.games.gridworld import add_rectangle
def test_add_rectangle():
grid = np.array([
[0,0,0,0,0,0,0],
[0,0,0,0,0,0,0],
[0,0,0,0,0,0,0],
[0,0,0,0,0,0,0],
[0,0,0,0,0,0,0],
])
expected = np.array([
[0,0,0,0,0,0,0],
[0,1,1,1,0,0,0],
[0,1,1,1,0,0,0],
[0,0,0,1,1,0,0],
[0,0,0,1,1,0,0],
])
add_rectangle(grid, (1, 1, 3, 2))
add_rectangle(grid, (3, 3, 2, 2))
assert np.all(grid == expected)
| 18.306122
| 57
| 0.478261
| 180
| 897
| 2.316667
| 0.15
| 0.297362
| 0.388489
| 0.450839
| 0.544365
| 0.467626
| 0.285372
| 0.285372
| 0.285372
| 0.254197
| 0
| 0.191153
| 0.294314
| 897
| 48
| 58
| 18.6875
| 0.467615
| 0
| 0
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.09375
| 1
| 0.0625
| false
| 0
| 0.125
| 0
| 0.1875
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3cb7081dd9728da2e802e9454b775f5fcbfdc1aa
| 25
|
py
|
Python
|
mob_suite/version.py
|
dorbarker/mob-suite
|
5313f31d19cafbbda396fe588f4a11b1d50a6b08
|
[
"Apache-2.0"
] | 1
|
2020-10-15T22:22:25.000Z
|
2020-10-15T22:22:25.000Z
|
mob_suite/version.py
|
pavlo888/mob-suite
|
5313f31d19cafbbda396fe588f4a11b1d50a6b08
|
[
"Apache-2.0"
] | null | null | null |
mob_suite/version.py
|
pavlo888/mob-suite
|
5313f31d19cafbbda396fe588f4a11b1d50a6b08
|
[
"Apache-2.0"
] | null | null | null |
__version__ = '1.4.9.1'
| 8.333333
| 23
| 0.6
| 5
| 25
| 2.2
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.190476
| 0.16
| 25
| 2
| 24
| 12.5
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0.291667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3cba8b1a226d6b0fb2737b7a87332d1c6e7c926f
| 27
|
py
|
Python
|
pdvalidate/_version.py
|
S3DEV/pdvalidate
|
810b7d0aed72e2df54f5b66176bb5d829b569ba5
|
[
"MIT"
] | 1
|
2021-04-14T10:03:38.000Z
|
2021-04-14T10:03:38.000Z
|
pdvalidate/_version.py
|
S3DEV/pdvalidate
|
810b7d0aed72e2df54f5b66176bb5d829b569ba5
|
[
"MIT"
] | null | null | null |
pdvalidate/_version.py
|
S3DEV/pdvalidate
|
810b7d0aed72e2df54f5b66176bb5d829b569ba5
|
[
"MIT"
] | null | null | null |
__version__ = '0.6.0.dev2'
| 13.5
| 26
| 0.666667
| 5
| 27
| 2.8
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 0.111111
| 27
| 1
| 27
| 27
| 0.416667
| 0
| 0
| 0
| 0
| 0
| 0.37037
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3cc84884e15bfeb0f9169aa9da2df169424d3f3a
| 261
|
py
|
Python
|
{{cookiecutter.repo_dir}}/{{cookiecutter.package_dir}}/models/dummy.py
|
Themimitoof/cookiecutter-fastapi-postgresql-celery
|
77d3cb8650af03145a492f51eafa2f3145bd9af4
|
[
"MIT"
] | null | null | null |
{{cookiecutter.repo_dir}}/{{cookiecutter.package_dir}}/models/dummy.py
|
Themimitoof/cookiecutter-fastapi-postgresql-celery
|
77d3cb8650af03145a492f51eafa2f3145bd9af4
|
[
"MIT"
] | null | null | null |
{{cookiecutter.repo_dir}}/{{cookiecutter.package_dir}}/models/dummy.py
|
Themimitoof/cookiecutter-fastapi-postgresql-celery
|
77d3cb8650af03145a492f51eafa2f3145bd9af4
|
[
"MIT"
] | null | null | null |
from sqlalchemy import Column, Integer, String
from {{cookiecutter.package_dir}}.models import Base
class Dummy(Base):
id = Column(Integer, primary_key=True, index=True)
title = Column(String, index=True)
description = Column(String, index=True)
| 26.1
| 54
| 0.739464
| 34
| 261
| 5.617647
| 0.588235
| 0.141361
| 0.17801
| 0.219895
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153257
| 261
| 9
| 55
| 29
| 0.864253
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.333333
| null | null | 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
3cc857e4ef2c9043502e38e1aae117efd9d9766d
| 10,471
|
py
|
Python
|
databench/tests/test_datastore.py
|
svenkreiss/databench
|
99d4adad494b60a42af6b8bfba94dd0c41ba0786
|
[
"MIT"
] | 61
|
2015-01-07T18:03:21.000Z
|
2020-11-23T03:31:54.000Z
|
databench/tests/test_datastore.py
|
phillipaug/Data-Analysis-General-repository
|
99d4adad494b60a42af6b8bfba94dd0c41ba0786
|
[
"MIT"
] | 9
|
2015-02-25T15:56:28.000Z
|
2019-03-13T15:16:20.000Z
|
databench/tests/test_datastore.py
|
phillipaug/Data-Analysis-General-repository
|
99d4adad494b60a42af6b8bfba94dd0c41ba0786
|
[
"MIT"
] | 15
|
2015-01-07T10:53:59.000Z
|
2020-02-28T05:02:00.000Z
|
import databench
import unittest
class Datastore(unittest.TestCase):
def setUp(self):
self.n_callbacks = 0
self.d = databench.Datastore('abcdef')
self.d.subscribe(self.datastore_callback)
self.after = {}
def tearDown(self):
self.d.close()
def datastore_callback(self, key_value):
self.n_callbacks += 1
print('changed to {}'.format(key_value))
self.after.update(key_value)
return 'callback return'
def test_simple(self):
self.d.set('test', 'trivial')
self.assertEqual(self.after, {'test': 'trivial'})
def test_init(self):
self.d.set('test', 'before-init')
self.d.init({'unset_test': 'init'})
self.assertEqual(self.d['test'], 'before-init')
self.assertEqual(self.d['unset_test'], 'init')
def test_del_callback(self):
self.n_callback2 = 0
def callback2(key_value):
self.n_callback2 += 1
d2 = databench.Datastore('abcdef').subscribe(callback2)
self.d.set('test', 'del-callback')
d2.close()
self.d.set('test', 'del-callback2')
self.assertEqual(self.n_callback2, 1)
def test_list(self):
self.d.set('test', ['list'])
self.assertEqual(self.after['test'], ['list'])
def test_list_change(self):
self.d.set('test', ['list'])
self.d.set('test', ['list2'])
self.assertEqual(self.after['test'], ['list2'])
def test_list_change_element(self):
self.d.set('test', ['list'])
self.d.set('test', ['modified list'])
self.assertEqual(self.after['test'], ['modified list'])
def test_dict(self):
self.d.set('test', {'key': 'value'})
self.assertEqual(self.after, {'test': {'key': 'value'}})
def test_dict_change(self):
self.d.set('test', {'key': 'value'})
self.d.set('test', {'key': 'value2'})
self.assertEqual(self.after, {'test': {'key': 'value2'}})
def test_dict_change_element(self):
self.d.set('test', {'key': 'value'})
self.d.set('test', {'key': 'modified value'})
self.assertEqual(self.after, {'test': {'key': 'modified value'}})
def test_dict_change_element2(self):
self.d.set('test', {'key': 'value'})
all = self.d['test']
all['key'] = 'modified value'
self.d.set('test', all)
self.assertEqual(self.after, {'test': {'key': 'modified value'}})
def test_dict_change_element3(self):
self.d.set('test', {'key': {'key2': 'value'}})
all = self.d['test']
all['key']['key2'] = 'modified'
self.d.set('test', all)
self.assertEqual(self.after, {'test': {'key': {'key2': 'modified'}}})
def test_dict_overwrite(self):
self.d.set('test', {'key': 'value'})
self.d.set('test', {'key': 'modified value'})
self.assertEqual(self.after, {'test': {'key': 'modified value'}})
def test_dict_overwrite2(self):
self.d.set('test', {'e': 1})
self.d.set('test', {'e': 1, 'h': 1})
self.assertEqual(self.after, {'test': {'e': 1, 'h': 1}})
def test_dict_update(self):
self.d.set_state({'key': 'value'})
self.d.set_state({'key': 'mod', 'key2': 'new'})
self.assertEqual(self.after, {'key': 'mod', 'key2': 'new'})
def test_cycle(self):
self.d.set('test', {'key': 'value'})
n_callbacks_before = self.n_callbacks
test = self.d['test']
test['key'] = 'modified'
self.d.set('test', test)
self.assertEqual(self.n_callbacks, n_callbacks_before + 1)
self.assertEqual(self.after['test'], {'key': 'modified'})
def test_cycle2(self):
self.d.set('test', {'key': {'key2': 'value'}})
n_callbacks_before = self.n_callbacks
self.d.set('test', {'key': {'key2': 'modified'}})
self.assertEqual(self.n_callbacks, n_callbacks_before + 1)
self.assertEqual(self.after['test'], {'key': {'key2': 'modified'}})
def test_contains(self):
self.d.set('test', 'contains')
assert 'test' in self.d
assert 'never-used-test' not in self.d
def test_set_return(self):
ret = self.d.set('test', 'set_return')
assert 'test' in self.d
self.assertEqual(ret, ['callback return'])
def test_setstate(self):
self.d.set('test', 'setstate')
self.d.set_state({'test': 'modified'})
self.assertEqual(self.after['test'], 'modified')
def test_setstate_multiple(self):
self.d.set('test', 'setstate')
f = self.d.set_state({'test': 'setstate_m',
'test2': 'setstate_modified2'})
self.assertEqual(self.after['test'], 'setstate_m')
self.assertEqual(self.after['test2'], 'setstate_modified2')
self.assertEqual(f, ['callback return', 'callback return'])
def test_setstate_modify_multiple(self):
self.d.set('test', 'setstate')
f1 = self.d.set_state({'test': 'original', 'test2': 'original2'})
f2 = self.d.set_state({'test': 'original', 'test2': 'modified2'})
self.assertEqual(self.after['test'], 'original')
self.assertEqual(self.after['test2'], 'modified2')
self.assertEqual(f1, ['callback return', 'callback return'])
self.assertEqual(f2, ['callback return'])
def test_setstate_fn(self):
self.d.set('test', 'setstate')
self.d.set('cnt', 2)
self.d.set_state(lambda ds: {'test': 'modified{}'.format(ds['cnt'])})
self.assertEqual(self.after['test'], 'modified2')
def test_analysis_datastore(self):
a = databench.Analysis().init_databench()
a.set_emit_fn(lambda s, pl: None)
a.data.subscribe(self.datastore_callback)
a.data['test'] = 'analysis_datastore'
print(self.after)
self.assertEqual(self.after['test'], 'analysis_datastore')
class DatastoreLegacy(unittest.TestCase):
def setUp(self):
self.n_callbacks = 0
self.after = None
self.d = databench.DatastoreLegacy('abcdef')
self.d.on_change(self.datastore_callback)
def tearDown(self):
self.d.close()
def datastore_callback(self, key, value):
self.n_callbacks += 1
print('{} changed to {}'.format(key, value))
self.after = value
return 'callback return'
def test_simple(self):
self.d['test'] = 'trivial'
self.assertEqual(self.after, 'trivial')
def test_init(self):
self.d['test'] = 'before-init'
self.d.init({'unset_test': 'init'})
self.assertEqual(self.d['test'], 'before-init')
self.assertEqual(self.d['unset_test'], 'init')
def test_del_callback(self):
self.n_callback2 = 0
def callback2(key, value):
self.n_callback2 += 1
d2 = databench.DatastoreLegacy('abcdef').on_change(callback2)
self.d['test'] = 'del-callback'
d2.close()
self.d['test'] = 'del-callback2'
self.assertEqual(self.n_callback2, 1)
def test_update(self):
self.d.update({'test': 'update'})
self.assertEqual(self.after, 'update')
def test_delete(self):
self.d.update({'test': 'delete'})
self.assertEqual(self.after, 'delete')
del self.d['test']
self.assertNotIn('test', self.d)
def test_list(self):
self.d['test'] = ['list']
self.assertEqual(list(self.after), ['list'])
def test_list_change(self):
self.d['test'] = ['list']
self.d['test'] = ['list2']
self.assertEqual(list(self.after), ['list2'])
def test_list_change_element(self):
self.d['test'] = ['list']
self.d['test'][0] = 'modified list'
self.assertEqual(list(self.after), ['modified list'])
def test_dict(self):
self.d['test'] = {'key': 'value'}
self.assertEqual(self.after.to_native(), {'key': 'value'})
def test_dict_change(self):
self.d['test'] = {'key': 'value'}
self.d['test'] = {'key': 'value2'}
self.assertEqual(self.after.to_native(), {'key': 'value2'})
def test_dict_change_element(self):
self.d['test'] = {'key': 'value'}
self.d['test']['key'] = 'modified value'
self.assertEqual(self.after.to_native(), {'key': 'modified value'})
def test_dict_change_element2(self):
self.d['test'] = {'key': 'value'}
all = self.d['test']
all['key'] = 'modified value'
self.d['test'] = all
self.assertEqual(self.after.to_native(), {'key': 'modified value'})
def test_dict_change_element3(self):
self.d['test'] = {'key': {'key2': 'value'}}
all = self.d['test']
all['key']['key2'] = 'modified'
self.d['test'] = all
self.assertEqual(self.after.to_native(), {'key': {'key2': 'modified'}})
def test_dict_overwrite(self):
self.d['test'] = {'key': 'value'}
self.d['test'] = {'key': 'modified value'}
self.assertEqual(self.after.to_native(), {'key': 'modified value'})
def test_dict_overwrite2(self):
self.d['test'] = {'e': 1}
self.d['test'] = {'e': 1, 'h': 1}
self.assertEqual(self.after.to_native(), {'e': 1, 'h': 1})
def test_dict_update(self):
self.d['test'] = {'key': 'value'}
self.d['test'].update({'key': 'mod', 'key2': 'new'})
self.assertEqual(self.after.to_native(), {'key': 'mod', 'key2': 'new'})
def test_cycle(self):
self.d['test'] = {'key': 'value'}
n_callbacks_before = self.n_callbacks
test = self.d['test']
test['key'] = 'modified'
self.d['test'] = test
self.assertEqual(self.n_callbacks, n_callbacks_before + 1)
self.assertEqual(self.after.to_native(), {'key': 'modified'})
def test_cycle2(self):
self.d['test'] = {'key': {'key2': 'value'}}
n_callbacks_before = self.n_callbacks
self.d['test']['key']['key2'] = 'modified'
self.assertEqual(self.n_callbacks, n_callbacks_before + 1)
self.assertEqual(self.after.to_native(), {'key': {'key2': 'modified'}})
def test_contains(self):
self.d['test'] = 'contains'
assert 'test' in self.d
assert 'never-used-test' not in self.d
def test_set_return(self):
ret = self.d.set('test', 'set_return')
assert 'test' in self.d
self.assertEqual(ret, ['callback return'])
if __name__ == '__main__':
unittest.main()
| 35.137584
| 79
| 0.575972
| 1,311
| 10,471
| 4.475973
| 0.073989
| 0.083504
| 0.142468
| 0.139059
| 0.853613
| 0.781186
| 0.720518
| 0.656271
| 0.597478
| 0.546353
| 0
| 0.01109
| 0.233598
| 10,471
| 297
| 80
| 35.255892
| 0.720125
| 0
| 0
| 0.556485
| 0
| 0
| 0.177538
| 0
| 0
| 0
| 0
| 0
| 0.246862
| 1
| 0.213389
| false
| 0
| 0.008368
| 0
| 0.238494
| 0.012552
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3ce9a9851b492a57c2c0ea14658fe2498d7e930c
| 283
|
py
|
Python
|
application.py
|
esteebie/python-docs-hello-world
|
74db262c342601f129a99da4910f19988818397d
|
[
"MIT"
] | null | null | null |
application.py
|
esteebie/python-docs-hello-world
|
74db262c342601f129a99da4910f19988818397d
|
[
"MIT"
] | null | null | null |
application.py
|
esteebie/python-docs-hello-world
|
74db262c342601f129a99da4910f19988818397d
|
[
"MIT"
] | null | null | null |
from flask import Flask
from azure.ai.textanalytics import TextAnalyticsClient, TextAnalyticsApiKeyCredential
from azure.storage.blob import BlockBlobService
#, BlobServiceClient, BlobClient, ContainerClient
app = Flask(__name__)
@app.route("/")
def hello():
return "running 6"
| 28.3
| 85
| 0.805654
| 30
| 283
| 7.466667
| 0.733333
| 0.080357
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003968
| 0.109541
| 283
| 9
| 86
| 31.444444
| 0.884921
| 0.169611
| 0
| 0
| 0
| 0
| 0.042735
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0
| 0.428571
| 0.142857
| 0.714286
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
a71d9bfcf7900c5fd5e467ce3ed135e8f93f3f9a
| 63
|
py
|
Python
|
src/wshop/apps/partner/__init__.py
|
vituocgia/wshop-core
|
5f6d1ec9e9158f13aab136c5bd901c41e69a1dba
|
[
"BSD-3-Clause"
] | null | null | null |
src/wshop/apps/partner/__init__.py
|
vituocgia/wshop-core
|
5f6d1ec9e9158f13aab136c5bd901c41e69a1dba
|
[
"BSD-3-Clause"
] | null | null | null |
src/wshop/apps/partner/__init__.py
|
vituocgia/wshop-core
|
5f6d1ec9e9158f13aab136c5bd901c41e69a1dba
|
[
"BSD-3-Clause"
] | null | null | null |
default_app_config = 'wshop.apps.partner.config.PartnerConfig'
| 31.5
| 62
| 0.84127
| 8
| 63
| 6.375
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.047619
| 63
| 1
| 63
| 63
| 0.85
| 0
| 0
| 0
| 0
| 0
| 0.619048
| 0.619048
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a72fda879299faa570188935b176a946954612f9
| 124
|
py
|
Python
|
Lista04/ex005.py
|
Guilherme-Schwann/Listas-de-Exercicios-UFV-CCF-110
|
f306c8dc6385ee8c9580e687afa16a49ace68f95
|
[
"MIT"
] | 2
|
2021-09-05T22:29:33.000Z
|
2021-09-09T00:13:16.000Z
|
Lista04/ex005.py
|
Guilherme-Schwann/Listas-de-Exercicios-UFV-CCF-110
|
f306c8dc6385ee8c9580e687afa16a49ace68f95
|
[
"MIT"
] | null | null | null |
Lista04/ex005.py
|
Guilherme-Schwann/Listas-de-Exercicios-UFV-CCF-110
|
f306c8dc6385ee8c9580e687afa16a49ace68f95
|
[
"MIT"
] | null | null | null |
#Ex.07
A = int(input('Termo antecessor: '))
C = int(input('Termo sucessor: '))
B = (A + C) / 2
print(f'O termo médio é {B}')
| 24.8
| 36
| 0.58871
| 23
| 124
| 3.173913
| 0.695652
| 0.219178
| 0.356164
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.029412
| 0.177419
| 124
| 5
| 37
| 24.8
| 0.686275
| 0.040323
| 0
| 0
| 0
| 0
| 0.445378
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.25
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a7325c42d791b8f6c18a2504333a05d10e9194b8
| 86
|
py
|
Python
|
conp_pipeline/__init__.py
|
CONP-PCNO/conp-pipeline
|
042f542888291ab062e4ae8e6bf49e482ae39f1d
|
[
"MIT"
] | 3
|
2019-02-04T22:51:48.000Z
|
2019-03-29T18:36:32.000Z
|
conp_pipeline/__init__.py
|
CONP-PCNO/conp-pipeline
|
042f542888291ab062e4ae8e6bf49e482ae39f1d
|
[
"MIT"
] | 3
|
2018-04-25T00:55:34.000Z
|
2018-05-02T00:39:37.000Z
|
conp_pipeline/__init__.py
|
CONP-PCNO/conp-pipeline
|
042f542888291ab062e4ae8e6bf49e482ae39f1d
|
[
"MIT"
] | 1
|
2018-04-26T23:57:52.000Z
|
2018-04-26T23:57:52.000Z
|
from __future__ import absolute_import
from .conp_pipeline import main as conpDriver
| 21.5
| 45
| 0.860465
| 12
| 86
| 5.666667
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.127907
| 86
| 3
| 46
| 28.666667
| 0.906667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
595216ebb08b6a05ee04e39f0f3e28180920d248
| 196
|
py
|
Python
|
historic_hebrew_dates/values/dict.py
|
UUDigitalHumanitieslab/historic-hebrew-dates
|
5ace44d9b1315a96a96ea296383f0b618d994212
|
[
"BSD-3-Clause"
] | 1
|
2020-06-24T10:29:17.000Z
|
2020-06-24T10:29:17.000Z
|
historic_hebrew_dates/values/dict.py
|
UUDigitalHumanitieslab/historic-hebrew-dates
|
5ace44d9b1315a96a96ea296383f0b618d994212
|
[
"BSD-3-Clause"
] | 11
|
2019-10-10T08:50:01.000Z
|
2022-03-02T05:23:55.000Z
|
historic_hebrew_dates/values/dict.py
|
UUDigitalHumanitieslab/historic-hebrew-dates
|
5ace44d9b1315a96a96ea296383f0b618d994212
|
[
"BSD-3-Clause"
] | null | null | null |
#!/usr/bin/env python3
import yaml
from typing import Dict
def dict_value(expression: str) -> Dict:
values: Dict[str, str] = yaml.safe_load('{' + expression[1:-1] + '}')
return values
| 19.6
| 73
| 0.658163
| 29
| 196
| 4.413793
| 0.655172
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.018634
| 0.178571
| 196
| 9
| 74
| 21.777778
| 0.770186
| 0.107143
| 0
| 0
| 0
| 0
| 0.011561
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.4
| null | null | 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
59895cc471b24aa3cf05fa179bd9edae02796639
| 764
|
py
|
Python
|
tests/core/test_kademlia.py
|
vaporydev/ddht
|
b438a6fced97c584be1bc961603291f1d89b6733
|
[
"MIT"
] | 17
|
2020-07-25T07:49:07.000Z
|
2021-11-20T04:19:07.000Z
|
tests/core/test_kademlia.py
|
pipermerriam/ddht
|
7e0b66ac96591a590e40c7e15d880af01e1f1a36
|
[
"MIT"
] | 146
|
2020-07-27T22:18:32.000Z
|
2021-03-04T20:37:36.000Z
|
tests/core/test_kademlia.py
|
pipermerriam/ddht
|
7e0b66ac96591a590e40c7e15d880af01e1f1a36
|
[
"MIT"
] | 14
|
2020-07-24T17:31:02.000Z
|
2022-03-28T17:54:31.000Z
|
from ddht.kademlia import Address, check_relayed_addr
def test_check_relayed_addr():
public_host = Address("8.8.8.8", 80, 80)
local_host = Address("127.0.0.1", 80, 80)
assert check_relayed_addr(local_host, local_host)
assert not check_relayed_addr(public_host, local_host)
private = Address("192.168.1.1", 80, 80)
assert check_relayed_addr(private, private)
assert not check_relayed_addr(public_host, private)
reserved = Address("240.0.0.1", 80, 80)
assert not check_relayed_addr(local_host, reserved)
assert not check_relayed_addr(public_host, reserved)
unspecified = Address("0.0.0.0", 80, 80)
assert not check_relayed_addr(local_host, unspecified)
assert not check_relayed_addr(public_host, unspecified)
| 36.380952
| 59
| 0.740838
| 118
| 764
| 4.525424
| 0.220339
| 0.224719
| 0.299625
| 0.235955
| 0.580524
| 0.514981
| 0.505618
| 0.142322
| 0.142322
| 0
| 0
| 0.074419
| 0.155759
| 764
| 20
| 60
| 38.2
| 0.753488
| 0
| 0
| 0
| 0
| 0
| 0.056283
| 0
| 0
| 0
| 0
| 0
| 0.533333
| 1
| 0.066667
| false
| 0
| 0.066667
| 0
| 0.133333
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
599fd55b15ad2d6477ded4a444b5630b0bd9852b
| 297
|
py
|
Python
|
ch4/pep.py
|
montalvas/Python-Crash-Course
|
fd657f979017985230748674c9048287f7609145
|
[
"MIT"
] | null | null | null |
ch4/pep.py
|
montalvas/Python-Crash-Course
|
fd657f979017985230748674c9048287f7609145
|
[
"MIT"
] | null | null | null |
ch4/pep.py
|
montalvas/Python-Crash-Course
|
fd657f979017985230748674c9048287f7609145
|
[
"MIT"
] | null | null | null |
import ch3.lists
'''
PEP = Python Enhancement Proposal / Proposta de melhora de python
Identação = tab / 4 espaços
Tamanho da linha = 80 caracteres
comentários = 72 caracteres por linha
Site PEP8: https://www.python.org/dev/peps/pep-0008/#should-a-line-break-before-or-after-a-binary-operator
'''
| 33
| 106
| 0.76431
| 46
| 297
| 4.934783
| 0.847826
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.042146
| 0.121212
| 297
| 9
| 107
| 33
| 0.827586
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
59a7333ce7c2c1042e484f8481e6c8a5a8278bda
| 61
|
py
|
Python
|
BlackJack/run.py
|
jvpersuhn/hb
|
5487abf4fc5b742cf21086ca5b823b915132445d
|
[
"MIT"
] | null | null | null |
BlackJack/run.py
|
jvpersuhn/hb
|
5487abf4fc5b742cf21086ca5b823b915132445d
|
[
"MIT"
] | null | null | null |
BlackJack/run.py
|
jvpersuhn/hb
|
5487abf4fc5b742cf21086ca5b823b915132445d
|
[
"MIT"
] | null | null | null |
from blackJack import BlackJack
b = BlackJack()
b.jogar()
| 8.714286
| 31
| 0.721311
| 8
| 61
| 5.5
| 0.625
| 0.454545
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.180328
| 61
| 6
| 32
| 10.166667
| 0.88
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
59a9ccbf281b95bf9f042585b65e599035699487
| 79
|
py
|
Python
|
learnml/tree/__init__.py
|
Vipul97/learnml
|
e1ca5b58fc0118ab8a65e35c5bbf9aac2fb2bc17
|
[
"MIT"
] | 3
|
2019-11-22T22:12:52.000Z
|
2021-04-02T19:40:20.000Z
|
learnml/tree/__init__.py
|
Vipul97/learnml
|
e1ca5b58fc0118ab8a65e35c5bbf9aac2fb2bc17
|
[
"MIT"
] | null | null | null |
learnml/tree/__init__.py
|
Vipul97/learnml
|
e1ca5b58fc0118ab8a65e35c5bbf9aac2fb2bc17
|
[
"MIT"
] | 1
|
2021-10-05T23:24:03.000Z
|
2021-10-05T23:24:03.000Z
|
from .tree import DecisionTreeClassifier
__all__ = ['DecisionTreeClassifier']
| 19.75
| 40
| 0.822785
| 6
| 79
| 10.166667
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.101266
| 79
| 3
| 41
| 26.333333
| 0.859155
| 0
| 0
| 0
| 0
| 0
| 0.278481
| 0.278481
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
59b94af2bfea840d2735745b2d3b1d174b455385
| 101
|
py
|
Python
|
geostore/boto3_config.py
|
adisbladis/geostore
|
79439c06b33414e1e26b3aa4b93a72fd7cbbae83
|
[
"MIT"
] | 25
|
2021-05-19T08:05:07.000Z
|
2022-03-14T02:48:58.000Z
|
geostore/boto3_config.py
|
adisbladis/geostore
|
79439c06b33414e1e26b3aa4b93a72fd7cbbae83
|
[
"MIT"
] | 311
|
2021-05-17T23:04:56.000Z
|
2022-03-31T10:41:44.000Z
|
geostore/boto3_config.py
|
adisbladis/geostore
|
79439c06b33414e1e26b3aa4b93a72fd7cbbae83
|
[
"MIT"
] | 1
|
2022-01-03T05:38:32.000Z
|
2022-01-03T05:38:32.000Z
|
from botocore.config import Config
CONFIG = Config(retries={"max_attempts": 5, "mode": "standard"})
| 25.25
| 64
| 0.732673
| 13
| 101
| 5.615385
| 0.769231
| 0.328767
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011111
| 0.108911
| 101
| 3
| 65
| 33.666667
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0.237624
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
59c561c2944537da308316b346e45ba36645530c
| 122
|
py
|
Python
|
Markdown Examples/1.1 ScriptPrint/first_script.py
|
marvmilo/marvmiloTools
|
54666013375dce1288a8a87f9397bf25108880e0
|
[
"MIT"
] | null | null | null |
Markdown Examples/1.1 ScriptPrint/first_script.py
|
marvmilo/marvmiloTools
|
54666013375dce1288a8a87f9397bf25108880e0
|
[
"MIT"
] | null | null | null |
Markdown Examples/1.1 ScriptPrint/first_script.py
|
marvmilo/marvmiloTools
|
54666013375dce1288a8a87f9397bf25108880e0
|
[
"MIT"
] | null | null | null |
import marvmiloTools as mmt
print = mmt.ScriptPrint("MAIN").print
print("This is the FIRST script")
import second_script
| 20.333333
| 37
| 0.786885
| 18
| 122
| 5.277778
| 0.722222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.122951
| 122
| 6
| 38
| 20.333333
| 0.88785
| 0
| 0
| 0
| 0
| 0
| 0.227642
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
|
0
| 4
|
59e3996999a6eab2c728d619990033428867cf04
| 231
|
py
|
Python
|
customers/admin.py
|
endonte/quotation2
|
ddb9bf2f98ea8b45c9c43f272e61bb85fb563613
|
[
"MIT"
] | null | null | null |
customers/admin.py
|
endonte/quotation2
|
ddb9bf2f98ea8b45c9c43f272e61bb85fb563613
|
[
"MIT"
] | null | null | null |
customers/admin.py
|
endonte/quotation2
|
ddb9bf2f98ea8b45c9c43f272e61bb85fb563613
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Customer, Billing_Details, Shipping_Details
# Register your models here.
admin.site.register(Customer)
admin.site.register(Billing_Details)
admin.site.register(Shipping_Details)
| 33
| 63
| 0.844156
| 31
| 231
| 6.16129
| 0.451613
| 0.141361
| 0.267016
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.077922
| 231
| 6
| 64
| 38.5
| 0.896714
| 0.112554
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.4
| 0
| 0.4
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
aba94dd7d7c3de684b3b05257464c80e472c204f
| 1,123
|
py
|
Python
|
mainService/mainService/apps/core_sample/migrations/0015_auto_20191025_1337.py
|
Godis715/Core-Sample-Analysis
|
892b3d322e9ce86dab0da9754b902b504b2e0d8b
|
[
"Apache-2.0"
] | 2
|
2019-09-18T10:59:21.000Z
|
2019-10-02T16:50:05.000Z
|
mainService/mainService/apps/core_sample/migrations/0015_auto_20191025_1337.py
|
Godis715/Core-Sample-Analysis
|
892b3d322e9ce86dab0da9754b902b504b2e0d8b
|
[
"Apache-2.0"
] | 78
|
2019-09-20T16:56:18.000Z
|
2022-03-12T00:04:37.000Z
|
mainService/mainService/apps/core_sample/migrations/0015_auto_20191025_1337.py
|
Godis715/Core-Sample-Analysis
|
892b3d322e9ce86dab0da9754b902b504b2e0d8b
|
[
"Apache-2.0"
] | 1
|
2019-10-03T20:49:34.000Z
|
2019-10-03T20:49:34.000Z
|
# Generated by Django 2.2.6 on 2019-10-25 10:37
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core_sample', '0014_auto_20191025_1328'),
]
operations = [
migrations.AddField(
model_name='fragment',
name='dl_height',
field=models.IntegerField(default=0, verbose_name='Высота ДС (px)'),
preserve_default=False,
),
migrations.AddField(
model_name='fragment',
name='dl_width',
field=models.IntegerField(default=0, verbose_name='Ширина ДС (px)'),
preserve_default=False,
),
migrations.AddField(
model_name='fragment',
name='uv_height',
field=models.IntegerField(default=0, verbose_name='Высота УФ (px)'),
preserve_default=False,
),
migrations.AddField(
model_name='fragment',
name='uv_width',
field=models.IntegerField(default=0, verbose_name='Ширина УФ (px)'),
preserve_default=False,
),
]
| 29.552632
| 80
| 0.576135
| 114
| 1,123
| 5.5
| 0.394737
| 0.114833
| 0.14673
| 0.172249
| 0.755981
| 0.714514
| 0.714514
| 0.645933
| 0.645933
| 0.304625
| 0
| 0.045045
| 0.308103
| 1,123
| 37
| 81
| 30.351351
| 0.761905
| 0.040071
| 0
| 0.516129
| 1
| 0
| 0.144981
| 0.021375
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.032258
| 0
| 0.129032
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
abb849b1b058fa1026a9020b4b3ff6917ce1106f
| 297
|
py
|
Python
|
app/core/management/commands/setup.py
|
goeswog/django-directory-structure
|
8b5c8366759b221ddf8dbd07bc01b01d5bfac317
|
[
"MIT"
] | null | null | null |
app/core/management/commands/setup.py
|
goeswog/django-directory-structure
|
8b5c8366759b221ddf8dbd07bc01b01d5bfac317
|
[
"MIT"
] | 2
|
2020-06-05T20:31:57.000Z
|
2020-07-13T13:16:43.000Z
|
app/core/management/commands/setup.py
|
goeswog/django-directory-structure
|
8b5c8366759b221ddf8dbd07bc01b01d5bfac317
|
[
"MIT"
] | null | null | null |
from django.core import management
from django.core.management.base import BaseCommand
class Command(BaseCommand):
def handle(self, *args, **options):
management.call_command("generatekey")
management.call_command("makemigrations")
management.call_command("migrate")
| 29.7
| 51
| 0.740741
| 32
| 297
| 6.78125
| 0.5625
| 0.193548
| 0.290323
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.158249
| 297
| 9
| 52
| 33
| 0.868
| 0
| 0
| 0
| 1
| 0
| 0.107744
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0
| 0.285714
| 0
| 0.571429
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
abc9fe58c4b8eb7db0a28b8f329e5e690c4862d0
| 54
|
py
|
Python
|
custom_utils/config.py
|
RahulnKumar/custom-utils
|
da5ccd027e8583ab6dd77c31fe81c41a9186e5c4
|
[
"MIT"
] | null | null | null |
custom_utils/config.py
|
RahulnKumar/custom-utils
|
da5ccd027e8583ab6dd77c31fe81c41a9186e5c4
|
[
"MIT"
] | null | null | null |
custom_utils/config.py
|
RahulnKumar/custom-utils
|
da5ccd027e8583ab6dd77c31fe81c41a9186e5c4
|
[
"MIT"
] | null | null | null |
"""This module contains the configurable constants"""
| 27
| 53
| 0.777778
| 6
| 54
| 7
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 54
| 1
| 54
| 54
| 0.875
| 0.87037
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
abebd9c17b8a5daf9788b4e5758342db5b4dbc7e
| 76
|
py
|
Python
|
panda/tests/disable_esp.py
|
Orbbec-3DPG/openpilot
|
27e0adc434906e37fd7674160a0a8c2dd5c3c180
|
[
"MIT"
] | 41
|
2018-07-30T17:36:37.000Z
|
2021-04-05T13:24:19.000Z
|
panda/tests/disable_esp.py
|
Orbbec-3DPG/openpilot
|
27e0adc434906e37fd7674160a0a8c2dd5c3c180
|
[
"MIT"
] | 14
|
2018-06-18T17:47:59.000Z
|
2019-01-10T00:18:00.000Z
|
panda/tests/disable_esp.py
|
Orbbec-3DPG/openpilot
|
27e0adc434906e37fd7674160a0a8c2dd5c3c180
|
[
"MIT"
] | 29
|
2018-07-31T07:43:25.000Z
|
2020-08-30T16:44:27.000Z
|
#!/usr/bin/env python
from panda import Panda
Panda().set_esp_power(False)
| 15.2
| 28
| 0.763158
| 13
| 76
| 4.307692
| 0.846154
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105263
| 76
| 4
| 29
| 19
| 0.823529
| 0.263158
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
e6218fbc058f7211fd59f63117a555eac4f992d8
| 103
|
py
|
Python
|
ssh-server/main.py
|
Losilyus/Tools
|
3a7297c2479b964d90986f884b44010e7f87d5f5
|
[
"MIT"
] | 1
|
2022-03-07T09:09:05.000Z
|
2022-03-07T09:09:05.000Z
|
ssh-server/main.py
|
Losilyus/Tools
|
3a7297c2479b964d90986f884b44010e7f87d5f5
|
[
"MIT"
] | null | null | null |
ssh-server/main.py
|
Losilyus/Tools
|
3a7297c2479b964d90986f884b44010e7f87d5f5
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
import module.show as show
path = "/home/losilyus/.ssh/configs"
show.show(path)
| 17.166667
| 36
| 0.728155
| 17
| 103
| 4.411765
| 0.764706
| 0.213333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.106796
| 103
| 5
| 37
| 20.6
| 0.815217
| 0.194175
| 0
| 0
| 0
| 0
| 0.329268
| 0.329268
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
e632c0d47404a83b05a8ff1e747836c065837860
| 155
|
py
|
Python
|
projects/IFC/ifc/data/__init__.py
|
sukjunhwang/IFC
|
fb2ee4571dba4700eab3b52f10e147225b763e2a
|
[
"Apache-2.0"
] | 51
|
2021-10-30T02:05:45.000Z
|
2022-03-30T03:49:57.000Z
|
projects/IFC/ifc/data/__init__.py
|
sukjunhwang/IFC
|
fb2ee4571dba4700eab3b52f10e147225b763e2a
|
[
"Apache-2.0"
] | 6
|
2021-11-10T03:27:21.000Z
|
2022-03-28T22:41:01.000Z
|
projects/IFC/ifc/data/__init__.py
|
sukjunhwang/IFC
|
fb2ee4571dba4700eab3b52f10e147225b763e2a
|
[
"Apache-2.0"
] | 8
|
2021-10-31T08:30:39.000Z
|
2022-03-27T13:46:22.000Z
|
from .dataset_mapper import YTVISDatasetMapper, CocoClipDatasetMapper
from .build import *
from .datasets import *
from .ytvis_eval import YTVISEvaluator
| 25.833333
| 69
| 0.83871
| 17
| 155
| 7.529412
| 0.647059
| 0.15625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.116129
| 155
| 5
| 70
| 31
| 0.934307
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
0530924107aef985b71940612bb43d4d70a5bd5e
| 180
|
py
|
Python
|
config.py
|
GermainGit/BachelorDIM-Lectures-Algorithms-2019
|
32c5dfa17576f9463f4b1ea42973d628b54e9e1e
|
[
"MIT"
] | null | null | null |
config.py
|
GermainGit/BachelorDIM-Lectures-Algorithms-2019
|
32c5dfa17576f9463f4b1ea42973d628b54e9e1e
|
[
"MIT"
] | null | null | null |
config.py
|
GermainGit/BachelorDIM-Lectures-Algorithms-2019
|
32c5dfa17576f9463f4b1ea42973d628b54e9e1e
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
Created on Mon Oct 21 09:26:56 2019
@author: prevotge
"""
amqp_url='amqp://qiwsedps:WMXj527zSKlGKFACO2IRj_ZEr4LRU3jg@dove.rmq.cloudamqp.com/qiwsedps'
| 20
| 91
| 0.722222
| 25
| 180
| 5.12
| 0.92
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.118012
| 0.105556
| 180
| 8
| 92
| 22.5
| 0.677019
| 0.427778
| 0
| 0
| 0
| 0
| 0.842105
| 0.842105
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
05309fbca81c452ff57e043456e63939838653ad
| 52
|
py
|
Python
|
src/ethereum_tests/vm/__init__.py
|
lightclient/test-filler
|
f8b8e38c62a7682c9e08ee83cecf71d2b10fc5fc
|
[
"MIT"
] | null | null | null |
src/ethereum_tests/vm/__init__.py
|
lightclient/test-filler
|
f8b8e38c62a7682c9e08ee83cecf71d2b10fc5fc
|
[
"MIT"
] | 1
|
2021-11-27T06:07:47.000Z
|
2021-11-27T06:07:47.000Z
|
src/ethereum_tests/vm/__init__.py
|
lightclient/test-filler
|
f8b8e38c62a7682c9e08ee83cecf71d2b10fc5fc
|
[
"MIT"
] | null | null | null |
"""
Cross-client Ethereum Virtual Machine Tests
"""
| 13
| 43
| 0.730769
| 6
| 52
| 6.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.134615
| 52
| 3
| 44
| 17.333333
| 0.844444
| 0.826923
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
054166e95de2b74a92cdc5c0701086b4cb684d2c
| 58
|
py
|
Python
|
settings/env.py
|
akorzunin/telegram_auction_bot
|
d4d5042614ea11f8085815d8f9fb8b6fbebcfab0
|
[
"Apache-2.0"
] | null | null | null |
settings/env.py
|
akorzunin/telegram_auction_bot
|
d4d5042614ea11f8085815d8f9fb8b6fbebcfab0
|
[
"Apache-2.0"
] | null | null | null |
settings/env.py
|
akorzunin/telegram_auction_bot
|
d4d5042614ea11f8085815d8f9fb8b6fbebcfab0
|
[
"Apache-2.0"
] | null | null | null |
DEBUG_CHAT_ID = 503131177
MAIN_CHANNEL_ID = -1001663892384
| 29
| 32
| 0.862069
| 8
| 58
| 5.75
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.415094
| 0.086207
| 58
| 2
| 32
| 29
| 0.45283
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
054d5996e75180dee6e312f8fc3a280dc8dc04df
| 84
|
py
|
Python
|
photomanager/ui/qt_app.py
|
wrenchzc/photomanagger
|
1111587762b6e71b9ffff06241cdcd537b8c96e9
|
[
"MIT"
] | null | null | null |
photomanager/ui/qt_app.py
|
wrenchzc/photomanagger
|
1111587762b6e71b9ffff06241cdcd537b8c96e9
|
[
"MIT"
] | 4
|
2019-09-18T14:58:16.000Z
|
2022-01-13T00:43:22.000Z
|
photomanager/ui/qt_app.py
|
wrenchzc/photomanager
|
1111587762b6e71b9ffff06241cdcd537b8c96e9
|
[
"MIT"
] | null | null | null |
import sys
from PyQt5.QtWidgets import QApplication
qt_app = QApplication(sys.argv)
| 21
| 40
| 0.833333
| 12
| 84
| 5.75
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013333
| 0.107143
| 84
| 4
| 41
| 21
| 0.906667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
5557e9984b160aec73a3aa9b9f6bb54afd9344f8
| 303
|
py
|
Python
|
topCoder/srms/200s/srm243/div2/computation_complexity.py
|
gauravsingh58/algo
|
397859a53429e7a585e5f6964ad24146c6261326
|
[
"WTFPL"
] | 1
|
2020-09-30T19:53:08.000Z
|
2020-09-30T19:53:08.000Z
|
topCoder/srms/200s/srm243/div2/computation_complexity.py
|
gauravsingh58/algo
|
397859a53429e7a585e5f6964ad24146c6261326
|
[
"WTFPL"
] | null | null | null |
topCoder/srms/200s/srm243/div2/computation_complexity.py
|
gauravsingh58/algo
|
397859a53429e7a585e5f6964ad24146c6261326
|
[
"WTFPL"
] | 1
|
2020-10-15T09:10:57.000Z
|
2020-10-15T09:10:57.000Z
|
from math import log
from operator import itemgetter
class ComputationalComplexity:
def fastestAlgo(self, constant, power, logPower, N):
return min(map(lambda (i, (c, p, l)): (i, c*N**p*log(N)**l),
enumerate(zip(constant, power, logPower))), key=itemgetter(1, 0))[0]
| 37.875
| 91
| 0.636964
| 42
| 303
| 4.595238
| 0.666667
| 0.134715
| 0.217617
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012605
| 0.214521
| 303
| 7
| 92
| 43.285714
| 0.798319
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.333333
| null | null | 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
556dede5eabbff17698bba3e499587bd80130eda
| 667
|
py
|
Python
|
configurations/memory.py
|
mzins/MIPS-CPU-SIM
|
0f6723c668266447035c5010c67abdd041324d1a
|
[
"MIT"
] | null | null | null |
configurations/memory.py
|
mzins/MIPS-CPU-SIM
|
0f6723c668266447035c5010c67abdd041324d1a
|
[
"MIT"
] | null | null | null |
configurations/memory.py
|
mzins/MIPS-CPU-SIM
|
0f6723c668266447035c5010c67abdd041324d1a
|
[
"MIT"
] | null | null | null |
Memory = \
{
0: 0,
1: 0,
2: 0,
3: 0,
4: 0,
5: 0,
6: 0,
7: 0,
8: 0,
9: 0,
10: 0,
11: 0,
12: 0,
13: 0,
14: 0,
15: 0,
16: 0,
17: 0,
18: 0,
19: 0,
20: 0,
21: 0,
22: 0,
23: 0,
24: 0,
25: 0,
26: 0,
27: 0,
28: 0,
29: 0,
30: 0,
31: 0,
32: 0,
33: 0,
34: 0,
35: 0,
36: 0,
37: 0,
38: 0,
39: 0,
40: 0
}
| 15.159091
| 15
| 0.178411
| 83
| 667
| 1.433735
| 0.506024
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.553922
| 0.694153
| 667
| 44
| 16
| 15.159091
| 0.029412
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
557819262b5228308d0eb62fb86f57910b4b8202
| 84
|
py
|
Python
|
Solutions/problem_1.py
|
MarbilleJuntado/ProjectEuler
|
591116f6209532a9fffd54a658d4a0229a148c20
|
[
"MIT"
] | 1
|
2017-12-24T09:55:43.000Z
|
2017-12-24T09:55:43.000Z
|
Solutions/problem_1.py
|
MarbilleJuntado/ProjectEuler
|
591116f6209532a9fffd54a658d4a0229a148c20
|
[
"MIT"
] | null | null | null |
Solutions/problem_1.py
|
MarbilleJuntado/ProjectEuler
|
591116f6209532a9fffd54a658d4a0229a148c20
|
[
"MIT"
] | null | null | null |
multiples = [x for x in range(1000) if x%3 == 0 or x%5 == 0]
print(sum(multiples)))
| 28
| 60
| 0.619048
| 18
| 84
| 2.888889
| 0.722222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117647
| 0.190476
| 84
| 2
| 61
| 42
| 0.647059
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.