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
163cf569d30bd37e1409340af87296bc1ab46ecb
2,026
py
Python
ethereum/tests/test_api_consumer.py
GMSteuart/chainlink-iris
7d323c76ff61846d304942a08a1936f8fea40207
[ "MIT" ]
1
2021-04-03T11:50:40.000Z
2021-04-03T11:50:40.000Z
ethereum/tests/test_api_consumer.py
GMSteuart/chainlink-iris
7d323c76ff61846d304942a08a1936f8fea40207
[ "MIT" ]
null
null
null
ethereum/tests/test_api_consumer.py
GMSteuart/chainlink-iris
7d323c76ff61846d304942a08a1936f8fea40207
[ "MIT" ]
null
null
null
import pytest import time from brownie import APIConsumer, network # @pytest.fixture # def deploy_api_contract(get_account, get_oracle, get_job_id, chainlink_fee, get_link_token): # # Arrange / Act # api_consumer = APIConsumer.deploy(get_oracle.address, # get_job_id, # chainlink_fee, # get_link_token.address, # {'from': get_account}) # # Assert # assert api_consumer is not None # return api_consumer # def test_send_api_request_local(deploy_api_contract, get_account, get_link_token, # chainlink_fee, get_oracle, get_data): # # Arrange # if network.show_active() not in ['development'] or 'fork' in network.show_active(): # pytest.skip('Only for local testing') # api_contract = deploy_api_contract # get_link_token.transfer(api_contract.address, # chainlink_fee * 2, {'from': get_account}) # # Act # transaction_receipt = api_contract.requestVolumeData({'from': get_account}) # requestId = transaction_receipt.events['ChainlinkRequested']['id'] # # Assert # get_oracle.fulfillOracleRequest(requestId, get_data) # assert isinstance(api_contract.volume(), int) # assert api_contract.volume() > 0 # def test_send_api_request_testnet(deploy_api_contract, get_account, get_link_token, chainlink_fee): # # Arrange # if network.show_active() not in ['kovan', 'rinkeby']: # pytest.skip('Only for local testing') # api_contract = deploy_api_contract # get_link_token.transfer(api_contract.address, # chainlink_fee * 2, {'from': get_account}) # # Act # requestId = api_contract.requestVolumeData({'from': get_account}) # # Assert # assert requestId is not None # time.sleep(20) # assert isinstance(api_contract.volume(), int) # assert api_contract.volume() > 0
39.72549
101
0.630306
226
2,026
5.331858
0.283186
0.136929
0.059751
0.082988
0.657261
0.590871
0.496266
0.444813
0.391701
0.391701
0
0.004054
0.269497
2,026
50
102
40.52
0.810135
0.919546
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
1688966a6e7972cf565faa45fe80c6782bde8c46
469
py
Python
project_euler_5.py
andrazm123/Project-Euler
260a46810bce73e1079c13518ae94732c8cb1acb
[ "MIT" ]
null
null
null
project_euler_5.py
andrazm123/Project-Euler
260a46810bce73e1079c13518ae94732c8cb1acb
[ "MIT" ]
null
null
null
project_euler_5.py
andrazm123/Project-Euler
260a46810bce73e1079c13518ae94732c8cb1acb
[ "MIT" ]
null
null
null
def gcd(a, b): '''Najvecji skupni veckratnik''' if b == 0: return a else: return gcd(b, a % b) def lcm(a, b): '''Najmanjsi skupni delitelj''' return int((a * b) / gcd(a, b)) def stevilo_deljivo_prvimi_stevili(n): '''Vrne najmanjso stevilo deljivo s prvimi n naravnimi stevili''' if n == 1: return 1 else: return lcm(n, stevilo_deljivo_prvimi_stevili(n - 1)) print(stevilo_deljivo_prvimi_stevili(20))
21.318182
69
0.607676
68
469
4.058824
0.397059
0.036232
0.217391
0.293478
0.202899
0
0
0
0
0
0
0.017391
0.264392
469
21
70
22.333333
0.782609
0.238806
0
0.153846
0
0
0
0
0
0
0
0
0
1
0.230769
false
0
0
0
0.615385
0.076923
0
0
0
null
0
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
0
1
0
0
0
0
1
0
0
4
1698765207c24fa9d2141736cb2a3c76b1c486f6
453
py
Python
tests/test_ocr.py
JosephVC/Python_PDF_OCR
bdd44f635a173c1a453c65cf9891037f8349f865
[ "MIT" ]
1
2020-03-29T21:05:19.000Z
2020-03-29T21:05:19.000Z
tests/test_ocr.py
JosephVC/OCR_project
bdd44f635a173c1a453c65cf9891037f8349f865
[ "MIT" ]
null
null
null
tests/test_ocr.py
JosephVC/OCR_project
bdd44f635a173c1a453c65cf9891037f8349f865
[ "MIT" ]
null
null
null
from pathlib import Path import pytest from alterpdf import pdf_to_image # test cases for altering pdfs # test whether the pdf_to_image module actually works def test_pdf_to_image(): pdf_to_image.convert('-p', '../sample_pdfs/meetingminutes.pdf') # run something through pdf_to_image and check if it's there assert Path('../output_images/output1.jpg').is_file def test_ocr_image_exists(): pass def image_made_to_pdf(): pass
19.695652
67
0.752759
72
453
4.458333
0.611111
0.077882
0.155763
0
0
0
0
0
0
0
0
0.002646
0.165563
453
22
68
20.590909
0.846561
0.306843
0
0.2
0
0
0.203884
0.197411
0
0
0
0
0.1
1
0.3
true
0.2
0.3
0
0.6
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
1
1
0
0
1
0
0
4
16b6961f1a5776fba88e211868c7fa78e084aa73
251
py
Python
tests/__init__.py
maiome/malibu
8e272678ecba5cf2f76ae284d18ee47eaed9dd26
[ "Unlicense" ]
null
null
null
tests/__init__.py
maiome/malibu
8e272678ecba5cf2f76ae284d18ee47eaed9dd26
[ "Unlicense" ]
null
null
null
tests/__init__.py
maiome/malibu
8e272678ecba5cf2f76ae284d18ee47eaed9dd26
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- import os, glob modules = glob.glob(os.path.dirname(__file__) + "/*.py") __all__ = [os.path.basename(f)[:-3] for f in modules if not os.path.basename(f).startswith('_') and not f.endswith('__init__.py') and os.path.isfile(f)]
41.833333
152
0.669323
42
251
3.690476
0.571429
0.154839
0.180645
0.193548
0
0
0
0
0
0
0
0.009009
0.115538
251
5
153
50.2
0.689189
0.083665
0
0
0
0
0.074561
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
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
1
0
0
0
0
4
16cad41f2b3026e250d299455bb3a640b66032eb
36
py
Python
data/studio21_generated/introductory/4562/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
data/studio21_generated/introductory/4562/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
data/studio21_generated/introductory/4562/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
def snap(flash_pile, turtle_pile):
18
34
0.777778
6
36
4.333333
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.111111
36
2
35
18
0.8125
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
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
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
16d8e53400abbb17c922c3fc612754bbd07ab9c2
14,995
py
Python
nipy/modalities/fmri/tests/test_dmtx.py
neurospin/nipy
cc54600a0dca1e003ad393bc05c46f91eef30a68
[ "BSD-3-Clause" ]
1
2016-03-08T15:01:06.000Z
2016-03-08T15:01:06.000Z
nipy/modalities/fmri/tests/test_dmtx.py
neurospin/nipy
cc54600a0dca1e003ad393bc05c46f91eef30a68
[ "BSD-3-Clause" ]
null
null
null
nipy/modalities/fmri/tests/test_dmtx.py
neurospin/nipy
cc54600a0dca1e003ad393bc05c46f91eef30a68
[ "BSD-3-Clause" ]
null
null
null
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ Test the design_matrix utilities. Note that the tests just looks whether the data produces has correct dimension, not whether it is exact """ import numpy as np from os.path import join, dirname from ..experimental_paradigm import (EventRelatedParadigm, BlockParadigm, load_protocol_from_csv_file) from ..design_matrix import ( dmtx_light, _convolve_regressors, DesignMatrix, dmtx_from_csv, make_dmtx) from nose.tools import assert_true, assert_equal from numpy.testing import assert_almost_equal from ....testing import parametric def basic_paradigm(): conditions = ['c0', 'c0', 'c0', 'c1', 'c1', 'c1', 'c2', 'c2', 'c2'] onsets = [30, 70, 100, 10, 30, 90, 30, 40, 60] paradigm = EventRelatedParadigm(conditions, onsets) return paradigm def modulated_block_paradigm(): conditions = ['c0', 'c0', 'c0', 'c1', 'c1', 'c1', 'c2', 'c2', 'c2'] onsets = [30, 70, 100, 10, 30, 90, 30, 40, 60] duration = 5 + 5 * np.random.rand(len(onsets)) values = 1 + np.random.rand(len(onsets)) paradigm = BlockParadigm(conditions, onsets, duration, values) return paradigm def modulated_event_paradigm(): conditions = ['c0', 'c0', 'c0', 'c1', 'c1', 'c1', 'c2', 'c2', 'c2'] onsets = [30, 70, 100, 10, 30, 90, 30, 40, 60] values = 1 + np.random.rand(len(onsets)) paradigm = EventRelatedParadigm(conditions, onsets, values) return paradigm def block_paradigm(): conditions = ['c0', 'c0', 'c0', 'c1', 'c1', 'c1', 'c2', 'c2', 'c2'] onsets = [30, 70, 100, 10, 30, 90, 30, 40, 60] duration = 5 * np.ones(9) paradigm = BlockParadigm (conditions, onsets, duration) return paradigm def test_show_dmtx(): # test that the show code indeed (formally) runs frametimes = np.linspace(0, 127 * 1.,128) DM = make_dmtx(frametimes, drift_model='Polynomial', drift_order=3) ax = DM.show() assert (ax is not None) def test_dmtx0(): # Test design matrix creation when no paradigm is provided tr = 1.0 frametimes = np.linspace(0, 127 * tr,128) X, names= dmtx_light(frametimes, drift_model='Polynomial', drift_order=3) print names assert_true(len(names)==4) def test_dmtx0b(): # Test design matrix creation when no paradigm is provided tr = 1.0 frametimes = np.linspace(0, 127 * tr,128) X, names= dmtx_light(frametimes, drift_model='Polynomial', drift_order=3) assert_almost_equal(X[:, 0], np.linspace(- 0.5, .5, 128)) def test_dmtx0c(): # test design matrix creation when regressors are provided manually tr = 1.0 frametimes = np.linspace(0, 127 * tr, 128) ax = np.random.randn(128, 4) X, names= dmtx_light(frametimes, drift_model='Polynomial', drift_order=3, add_regs=ax) assert_almost_equal(X[:, 0], ax[:, 0]) def test_dmtx0d(): # test design matrix creation when regressors are provided manually tr = 1.0 frametimes = np.linspace(0, 127 * tr, 128) ax = np.random.randn(128, 4) X, names= dmtx_light(frametimes, drift_model='Polynomial', drift_order=3, add_regs=ax) assert_true((len(names) == 8) & (X.shape[1] == 8)) def test_dmtx1(): # basic test based on basic_paradigm and canonical hrf tr = 1.0 frametimes = np.linspace(0, 127 * tr, 128) paradigm = basic_paradigm() hrf_model = 'Canonical' X, names= dmtx_light(frametimes, paradigm, hrf_model=hrf_model, drift_model='Polynomial', drift_order=3) assert_true(len(names)==7) def test_convolve_regressors(): # tests for convolve_regressors helper function conditions = ['c0', 'c1'] onsets = [20, 40] paradigm = EventRelatedParadigm(conditions, onsets) # names not passed -> default names frametimes = np.arange(100) f, names = _convolve_regressors(paradigm, 'Canonical', frametimes) assert_equal(names, ['c0', 'c1']) def test_dmtx1b(): # idem test_dmtx1, but different test tr = 1.0 frametimes = np.linspace(0, 127 * tr, 128) paradigm = basic_paradigm() hrf_model = 'Canonical' X, names= dmtx_light(frametimes, paradigm, hrf_model=hrf_model, drift_model='Polynomial', drift_order=3) print np.shape(X) assert_true(X.shape == (128, 7)) def test_dmtx1c(): # idem test_dmtx1, but different test tr = 1.0 frametimes = np.linspace(0, 127 *tr, 128) paradigm = basic_paradigm() hrf_model = 'Canonical' X,names = dmtx_light(frametimes, paradigm, hrf_model=hrf_model, drift_model='Polynomial', drift_order=3) assert_true((X[:, - 1] == 1).all()) def test_dmtx1d(): # idem test_dmtx1, but different test tr = 1.0 frametimes = np.linspace(0, 127 * tr, 128) paradigm = basic_paradigm() hrf_model = 'Canonical' X,names= dmtx_light(frametimes, paradigm, hrf_model=hrf_model, drift_model='Polynomial', drift_order=3) assert_true((np.isnan(X) == 0).all()) def test_dmtx2(): # idem test_dmtx1 with a different drift term tr = 1.0 frametimes = np.linspace(0, 127 * tr, 128) paradigm = basic_paradigm() hrf_model = 'Canonical' X, names= dmtx_light(frametimes, paradigm, hrf_model=hrf_model, drift_model='Cosine', hfcut=63) assert_true(len(names) == 8) def test_dmtx3(): # idem test_dmtx1 with a different drift term tr = 1.0 frametimes = np.linspace(0, 127 * tr, 128) paradigm = basic_paradigm() hrf_model = 'Canonical' X,names= dmtx_light(frametimes, paradigm, hrf_model=hrf_model, drift_model='Blank') print names assert_true(len(names) == 4) def test_dmtx4(): # idem test_dmtx1 with a different hrf model tr = 1.0 frametimes = np.linspace(0, 127 * tr, 128) paradigm = basic_paradigm() hrf_model = 'Canonical With Derivative' X, names= dmtx_light(frametimes, paradigm, hrf_model=hrf_model, drift_model='Polynomial', drift_order=3) assert_true(len(names) == 10) def test_dmtx5(): # idem test_dmtx1 with a block paradigm tr = 1.0 frametimes = np.linspace(0, 127 * tr, 128) paradigm = block_paradigm() hrf_model = 'Canonical' X, names= dmtx_light(frametimes, paradigm, hrf_model=hrf_model, drift_model='Polynomial', drift_order=3) assert_true(len(names) == 7) def test_dmtx6(): # idem test_dmtx1 with a block paradigm and the hrf derivative tr = 1.0 frametimes = np.linspace(0, 127 * tr, 128) paradigm = block_paradigm() hrf_model = 'Canonical With Derivative' X, names= dmtx_light(frametimes, paradigm, hrf_model=hrf_model, drift_model='Polynomial', drift_order=3) assert_true(len(names) == 10) def test_dmtx7(): # idem test_dmtx1, but odd paradigm tr = 1.0 frametimes = np.linspace(0, 127 * tr, 128) conditions = [0, 0, 0, 1, 1, 1, 3, 3, 3] # no condition 'c2' onsets = [30, 70, 100, 10, 30, 90, 30, 40, 60] paradigm = EventRelatedParadigm(conditions, onsets) hrf_model = 'Canonical' X, names = dmtx_light(frametimes, paradigm, hrf_model=hrf_model, drift_model='Polynomial', drift_order=3) assert_true(len(names) == 7) def test_dmtx8(): # basic test based on basic_paradigm and FIR tr = 1.0 frametimes = np.linspace(0, 127 * tr, 128) paradigm = basic_paradigm() hrf_model = 'FIR' X, names= dmtx_light(frametimes, paradigm, hrf_model=hrf_model, drift_model='Polynomial', drift_order=3) assert_true(len(names) == 7) def test_dmtx9(): # basic test based on basic_paradigm and FIR tr = 1.0 frametimes = np.linspace(0, 127 * tr, 128) paradigm = basic_paradigm() hrf_model = 'FIR' X, names = dmtx_light(frametimes, paradigm, hrf_model=hrf_model, drift_model='Polynomial', drift_order=3, fir_delays=range(1, 5)) assert_true(len(names) == 16) def test_dmtx10(): # Check that the first column o FIR design matrix is OK tr = 1.0 frametimes = np.linspace(0, 127 * tr, 128) paradigm = basic_paradigm() hrf_model = 'FIR' X, names = dmtx_light(frametimes, paradigm, hrf_model=hrf_model, drift_model='Polynomial', drift_order=3, fir_delays=range(1, 5)) onset = paradigm.onset[paradigm.con_id == 'c0'].astype(np.int) assert_true(np.all((X[onset + 1, 0] == 1))) def test_dmtx11(): # check that the second column of the FIR design matrix is OK indeed tr = 1.0 frametimes = np.linspace(0, 127 * tr, 128) paradigm = basic_paradigm() hrf_model = 'FIR' X, names = dmtx_light(frametimes, paradigm, hrf_model=hrf_model, drift_model='Polynomial', drift_order=3, fir_delays=range(1, 5)) onset = paradigm.onset[paradigm.con_id == 'c0'].astype(np.int) assert_true(np.all(X[onset + 3, 2] == 1)) def test_dmtx12(): # check that the 11th column of a FIR design matrix is indeed OK tr = 1.0 frametimes = np.linspace(0, 127 * tr,128) paradigm = basic_paradigm() hrf_model = 'FIR' X, names = dmtx_light(frametimes, paradigm, hrf_model=hrf_model, drift_model='Polynomial', drift_order=3, fir_delays=range(1, 5)) onset = paradigm.onset[paradigm.con_id == 'c2'].astype(np.int) assert_true(np.all(X[onset + 4, 11] == 1)) def test_dmtx13(): # Check that the fir_duration is well taken into account tr = 1.0 frametimes = np.linspace(0, 127 * tr, 128) paradigm = basic_paradigm() hrf_model = 'FIR' X, names = dmtx_light(frametimes, paradigm, hrf_model=hrf_model, drift_model='Polynomial', drift_order=3, fir_delays=range(1, 5)) onset = paradigm.onset[paradigm.con_id == 'c0'].astype(np.int) assert_true(np.all(X[onset + 1, 0] == 1)) def test_dmtx14(): # Check that the first column o FIR design matrix is OK after a 1/2 # time shift tr = 1.0 frametimes = np.linspace(0, 127 * tr, 128) + tr / 2 paradigm = basic_paradigm() hrf_model = 'FIR' X, names = dmtx_light(frametimes, paradigm, hrf_model=hrf_model, drift_model='Polynomial', drift_order=3, fir_delays=range(1, 5)) onset = paradigm.onset[paradigm.con_id == 'c0'].astype(np.int) assert_true(np.all(X[onset + 1, 0] == 1)) def test_dmtx15(): # basic test based on basic_paradigm, plus user supplied regressors tr = 1.0 frametimes = np.linspace(0, 127 * tr, 128) paradigm = basic_paradigm() hrf_model = 'Canonical' ax = np.random.randn(128, 4) X, names = dmtx_light(frametimes, paradigm, hrf_model=hrf_model, drift_model='Polynomial', drift_order=3, add_regs=ax) assert(len(names) == 11) assert(X.shape[1] == 11) def test_dmtx16(): # Check that additional regressors are put at the right place tr = 1.0 frametimes = np.linspace(0, 127 * tr, 128) paradigm = basic_paradigm() hrf_model = 'Canonical' ax = np.random.randn(128, 4) X, names = dmtx_light(frametimes, paradigm, hrf_model=hrf_model, drift_model='Polynomial', drift_order=3, add_regs=ax) assert_almost_equal(X[:, 3: 7], ax) def test_dmtx17(): # Test the effect of scaling on the events tr = 1.0 frametimes = np.linspace(0, 127 * tr, 128) paradigm = modulated_event_paradigm() hrf_model = 'Canonical' X, names = dmtx_light(frametimes, paradigm, hrf_model=hrf_model, drift_model='Polynomial', drift_order=3) ct = paradigm.onset[paradigm.con_id == 'c0'].astype(np.int) + 1 assert((X[ct, 0] > 0).all()) def test_dmtx18(): # Test the effect of scaling on the blocks tr = 1.0 frametimes = np.linspace(0, 127 * tr, 128) paradigm = modulated_block_paradigm() hrf_model = 'Canonical' X, names = dmtx_light(frametimes, paradigm, hrf_model=hrf_model, drift_model='Polynomial', drift_order=3) ct = paradigm.onset[paradigm.con_id == 'c0'].astype(np.int) + 3 assert((X[ct, 0] > 0).all()) def test_dmtx19(): # Test the effect of scaling on a FIR model tr = 1.0 frametimes = np.linspace(0, 127 * tr, 128) paradigm = modulated_event_paradigm() hrf_model = 'FIR' X, names = dmtx_light(frametimes, paradigm, hrf_model=hrf_model, drift_model='Polynomial', drift_order=3, fir_delays=range(1, 5)) idx = paradigm.onset[paradigm.con_id == 0].astype(np.int) assert_true((X[idx + 1, 0] == X[idx + 2, 1]).all()) def test_csv_io(): # test the csv io on design matrices from tempfile import mkdtemp from os.path import join tr = 1.0 frametimes = np.linspace(0, 127 * tr, 128) paradigm = modulated_event_paradigm() DM = make_dmtx(frametimes, paradigm, hrf_model='Canonical', drift_model='Polynomial', drift_order=3) path = join(mkdtemp(), 'dmtx.csv') DM.write_csv(path) DM2 = dmtx_from_csv( path) assert_almost_equal (DM.matrix, DM2.matrix) assert_true (DM.names == DM2.names) def test_spm_1(): # Check that the nipy design matrix is close enough to the SPM one # (it cannot be identical, because the hrf shape is different) tr = 1.0 frametimes = np.linspace(0, 99, 100) conditions = ['c0', 'c0', 'c0', 'c1', 'c1', 'c1', 'c2', 'c2', 'c2'] onsets = [30, 50, 70, 10, 30, 80, 30, 40, 60] hrf_model = 'Canonical' paradigm = EventRelatedParadigm(conditions, onsets) X1 = make_dmtx(frametimes, paradigm, drift_model='Blank') spm_dmtx = np.load(join(dirname(__file__),'spm_dmtx.npz'))['arr_0'] assert ((spm_dmtx - X1.matrix) ** 2).sum() / (spm_dmtx ** 2).sum() < .1 def test_spm_2(): # Check that the nipy design matrix is close enough to the SPM one # (it cannot be identical, because the hrf shape is different) import os tr = 1.0 frametimes = np.linspace(0, 99, 100) conditions = ['c0', 'c0', 'c0', 'c1', 'c1', 'c1', 'c2', 'c2', 'c2'] onsets = [30, 50, 70, 10, 30, 80, 30, 40, 60] duration = 10 * np.ones(9) hrf_model = 'Canonical' paradigm = BlockParadigm(conditions, onsets, duration) X1 = make_dmtx(frametimes, paradigm, drift_model='Blank') spm_dmtx = np.load(join(dirname(__file__),'spm_dmtx.npz'))['arr_1'] assert ((spm_dmtx - X1.matrix) ** 2).sum() / (spm_dmtx ** 2).sum() < .1 if __name__ == "__main__": import nose nose.run(argv=['', __file__])
35.959233
79
0.623941
2,080
14,995
4.335096
0.120192
0.062105
0.078075
0.069868
0.768437
0.732505
0.720195
0.698902
0.686259
0.674726
0
0.060768
0.24935
14,995
416
80
36.045673
0.740316
0.124375
0
0.685065
0
0
0.052453
0
0
0
0
0
0.113636
0
null
null
0
0.035714
null
null
0.00974
0
0
0
null
0
0
0
0
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
1
0
0
0
0
0
0
0
0
4
16dc839c73c8b07d2c5ca2532a656bf50495f4a5
2,511
py
Python
src/models/UserModel.py
HASSAN1A/my_users_api
114ba6b304a31400f9358fbc457fa0508a8475ed
[ "MIT" ]
null
null
null
src/models/UserModel.py
HASSAN1A/my_users_api
114ba6b304a31400f9358fbc457fa0508a8475ed
[ "MIT" ]
1
2022-03-17T22:14:34.000Z
2022-03-17T22:16:44.000Z
src/models/UserModel.py
HASSAN1A/my_users_api
114ba6b304a31400f9358fbc457fa0508a8475ed
[ "MIT" ]
null
null
null
# src/models/UserModel.py from . import db, bcrypt from marshmallow import fields, Schema import datetime from flask_login import login_manager, UserMixin class UserModel(UserMixin, db.Model): """ User Model """ # table name __tablename__ = 'users' id = db.Column(db.Integer, primary_key=True, autoincrement=True) # id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(128), nullable=False) email = db.Column(db.String(128), unique=True, nullable=False) password = db.Column(db.String(128), nullable=False) # class constructor def __init__(self, data): """ Class constructor """ self.name = data.get('name') self.email = data.get('email') self.password = self.__generate_hash(data.get('password')) def save(self): db.session.add(self) db.session.commit() def update(self, data): for key, item in data.items(): if key == 'password': self.password = self.__generate_hash(item) setattr(self, key, item) self.modified_at = datetime.datetime.utcnow() db.session.commit() def is_active(): return True def delete(self): db.session.delete(self) db.session.commit() @staticmethod def get_all_users(): return UserModel.query.all() def get_id(self): return str(self.id) @staticmethod def get_one_user(id): return UserModel.query.get(id) @staticmethod def get_user_by_email(value): return UserModel.query.filter_by(email=value).first() @staticmethod def filter_users_by_name(name): qs = UserModel.query.filter_by(name=name).all() return [item.serialize for item in qs] @staticmethod def filter_by_range(start, end): qs = UserModel.query.offset(start).limit(end).all() return [item.serialize for item in qs] def __generate_hash(self, password): return bcrypt.generate_password_hash(password, rounds=10).decode("utf-8") def check_hash(self, password): return bcrypt.check_password_hash(self.password, password) @property def serialize(self): '''Return a serialized response of the Model''' context ={ "user_id": self.id, "name": self.name, "email": self.email, } return context def __str__(self): return self.name class UserSchema(Schema): id = fields.Int(dump_only=True) name = fields.Str(required=True) email = fields.Email(required=True) password = fields.Str(required=True, load_only=True) def __str__(self) -> str: return self.name
24.144231
77
0.682597
340
2,511
4.882353
0.288235
0.024096
0.03012
0.028916
0.196988
0.118072
0.118072
0.079518
0
0
0
0.005906
0.190761
2,511
103
78
24.378641
0.811024
0.067304
0
0.173913
0
0
0.022126
0
0
0
0
0
0
1
0.231884
false
0.130435
0.057971
0.130435
0.623188
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
16e8a2a97a9ec1c24585ee07a90e2315fdbe1164
225
py
Python
tests/test_download.py
LucaCappelletti94/encodeproject
e4abfd8b975b333ae371c370fa1b1ecd5ab10475
[ "MIT" ]
1
2021-05-13T09:03:29.000Z
2021-05-13T09:03:29.000Z
tests/test_download.py
LucaCappelletti94/encodeproject
e4abfd8b975b333ae371c370fa1b1ecd5ab10475
[ "MIT" ]
null
null
null
tests/test_download.py
LucaCappelletti94/encodeproject
e4abfd8b975b333ae371c370fa1b1ecd5ab10475
[ "MIT" ]
null
null
null
from encodeproject import download import os def test_download(): download("https://encode-public.s3.amazonaws.com/2012/07/01/074e1b37-2be1-4f6a-aa42-6c512fd1834b/ENCFF000XOW.bigWig") os.remove("ENCFF000XOW.bigWig")
32.142857
121
0.782222
30
225
5.833333
0.8
0.194286
0
0
0
0
0
0
0
0
0
0.169903
0.084444
225
7
122
32.142857
0.679612
0
0
0
0
0.2
0.544248
0
0
0
0
0
0
1
0.2
true
0
0.4
0
0.6
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
bc43a36339d6abc01bff33f174be9a49bba2a03f
73
py
Python
dapper/tools/__init__.py
aperrin66/DAPPER
d9d09ed87ca58d59972296e317bfeea50ba6cdd0
[ "MIT" ]
225
2016-11-01T09:55:25.000Z
2022-03-31T06:03:28.000Z
dapper/tools/__init__.py
aperrin66/DAPPER
d9d09ed87ca58d59972296e317bfeea50ba6cdd0
[ "MIT" ]
85
2018-02-09T03:13:18.000Z
2022-03-18T17:10:28.000Z
dapper/tools/__init__.py
aperrin66/DAPPER
d9d09ed87ca58d59972296e317bfeea50ba6cdd0
[ "MIT" ]
92
2017-05-29T23:24:45.000Z
2022-03-31T06:03:29.000Z
"""If the only tool you have is a hammer, it's hard to eat spaghetti."""
36.5
72
0.684932
15
73
3.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.191781
73
1
73
73
0.847458
0.90411
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
bc5f0a5802e3caa15361d89e49b03ec4f5e8c48b
480
py
Python
nethack_raph/Actions/base.py
dmitrySorokin/raph
57c6c95fe879f929b730255cc724f23f09fecb31
[ "MIT" ]
3
2022-03-23T21:20:44.000Z
2022-03-29T06:25:55.000Z
nethack_raph/Actions/base.py
dmitrySorokin/raph
57c6c95fe879f929b730255cc724f23f09fecb31
[ "MIT" ]
null
null
null
nethack_raph/Actions/base.py
dmitrySorokin/raph
57c6c95fe879f929b730255cc724f23f09fecb31
[ "MIT" ]
2
2022-03-26T14:59:43.000Z
2022-03-29T06:26:07.000Z
class BaseAction: def __init__(self, kernel): self.kernel = kernel def log(self, message): self.kernel().log(message) def draw_path(self, path, color=41): self.kernel().draw_path(path, color=color) @property def hero(self): return self.kernel().hero def can(self, level): return False, None def after_search(self, targets, path): pass def execute(self, path): raise NotImplementedError
20.869565
50
0.6125
59
480
4.864407
0.440678
0.174216
0
0
0
0
0
0
0
0
0
0.005764
0.277083
480
22
51
21.818182
0.821326
0
0
0
0
0
0
0
0
0
0
0
0
1
0.4375
false
0.0625
0
0.125
0.625
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
bc756c118fbd944db5cd44eb94f57582855c0454
140
py
Python
symneqsys/gsl/__init__.py
bjodah/symneqsys
677307d6b94e452262f7ffe944ec2bed6314d34b
[ "BSD-2-Clause" ]
1
2015-01-10T09:00:04.000Z
2015-01-10T09:00:04.000Z
symneqsys/gsl/__init__.py
bjodah/symneqsys
677307d6b94e452262f7ffe944ec2bed6314d34b
[ "BSD-2-Clause" ]
null
null
null
symneqsys/gsl/__init__.py
bjodah/symneqsys
677307d6b94e452262f7ffe944ec2bed6314d34b
[ "BSD-2-Clause" ]
null
null
null
from __future__ import (absolute_import, division, print_function) from .interface import GSL_Solver assert GSL_Solver # silence pyflakes
28
66
0.835714
18
140
6.055556
0.722222
0.165138
0
0
0
0
0
0
0
0
0
0
0.121429
140
4
67
35
0.886179
0.114286
0
0
0
0
0
0
0
0
0
0
0.333333
1
0
true
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
1
0
1
0
0
0
0
4
bc8c539a4f5e4d0e536361ef7f95c00eba9ae3ae
119
py
Python
hav-gclient-3.2_newton/exceptions.py
xuweiliang/Codelibrary
54e45b2daa205132c05b0ff5a2c3db7fca2853a7
[ "Apache-2.0" ]
1
2015-06-23T03:10:07.000Z
2015-06-23T03:10:07.000Z
hav-gclient-3.2_newton/exceptions.py
xuweiliang/Codelibrary
54e45b2daa205132c05b0ff5a2c3db7fca2853a7
[ "Apache-2.0" ]
null
null
null
hav-gclient-3.2_newton/exceptions.py
xuweiliang/Codelibrary
54e45b2daa205132c05b0ff5a2c3db7fca2853a7
[ "Apache-2.0" ]
4
2015-06-23T03:10:09.000Z
2022-01-11T07:11:56.000Z
class KeystoneAuthException(Exception): """ Generic error class to identify and catch our own errors. """ pass
29.75
69
0.722689
14
119
6.142857
0.928571
0
0
0
0
0
0
0
0
0
0
0
0.193277
119
3
70
39.666667
0.895833
0.478992
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
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
1
0
0
0
0
0
4
bcb6cb444fefc942daba7c40f1d2d693afa23481
224
py
Python
groceries/serializers.py
pgellert/simple-api
c9cfd85aa03c9e8a3dfbc0e008db89e1e3a52afd
[ "MIT" ]
null
null
null
groceries/serializers.py
pgellert/simple-api
c9cfd85aa03c9e8a3dfbc0e008db89e1e3a52afd
[ "MIT" ]
null
null
null
groceries/serializers.py
pgellert/simple-api
c9cfd85aa03c9e8a3dfbc0e008db89e1e3a52afd
[ "MIT" ]
null
null
null
from rest_framework import serializers from .models import GroceryItem class GroceryItemSerializer(serializers.ModelSerializer): class Meta: model = GroceryItem fields = ('pk', 'name', 'amount', 'msg')
24.888889
57
0.714286
22
224
7.227273
0.772727
0
0
0
0
0
0
0
0
0
0
0
0.191964
224
8
58
28
0.878453
0
0
0
0
0
0.066964
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
bcf7f897ae7fed7d15519f799c752316c846a5ee
25
py
Python
src/__init__.py
myasinsaglam/SECPIP
4649d183dfdb35efb82553624cf35ec02a098db2
[ "MIT" ]
3
2020-12-17T12:23:46.000Z
2020-12-25T10:50:54.000Z
src/__init__.py
myasinsaglam/SECPIP
4649d183dfdb35efb82553624cf35ec02a098db2
[ "MIT" ]
null
null
null
src/__init__.py
myasinsaglam/SECPIP
4649d183dfdb35efb82553624cf35ec02a098db2
[ "MIT" ]
null
null
null
__version__ = "1.0.0rc0"
12.5
24
0.68
4
25
3.25
1
0
0
0
0
0
0
0
0
0
0
0.181818
0.12
25
1
25
25
0.409091
0
0
0
0
0
0.32
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
4c09d63dd9c9bd8497f9d6184bb4ff8bc2670bcf
99
py
Python
cgt_calc/resources/__init__.py
quentin389/capital-gains-calculator
63641e19d5479499e1de1e28d3c9672b35f7e2dd
[ "MIT" ]
16
2021-02-01T00:31:59.000Z
2021-04-11T18:31:21.000Z
cgt_calc/resources/__init__.py
quentin389/capital-gains-calculator
63641e19d5479499e1de1e28d3c9672b35f7e2dd
[ "MIT" ]
19
2021-05-09T10:20:25.000Z
2022-03-29T16:11:46.000Z
cgt_calc/resources/__init__.py
quentin389/capital-gains-calculator
63641e19d5479499e1de1e28d3c9672b35f7e2dd
[ "MIT" ]
9
2021-05-03T16:52:50.000Z
2022-02-28T21:22:59.000Z
"""Module with resource files.""" from typing import Final RESOURCES_PACKAGE: Final = __package__
19.8
38
0.777778
12
99
6
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.131313
99
4
39
24.75
0.837209
0.272727
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
4c2de9f2e1c080099a21fac3aff6f69cf9ded554
64
py
Python
codes/day01/4.py
Youngfellows/HPyBaseCode
94d11872795d85b8c4387b650e82edcd20da0667
[ "Apache-2.0" ]
null
null
null
codes/day01/4.py
Youngfellows/HPyBaseCode
94d11872795d85b8c4387b650e82edcd20da0667
[ "Apache-2.0" ]
null
null
null
codes/day01/4.py
Youngfellows/HPyBaseCode
94d11872795d85b8c4387b650e82edcd20da0667
[ "Apache-2.0" ]
null
null
null
#print("")在python2和3版本中都执行 #print ""只在python2中 print("hahahah")
16
26
0.75
6
64
8
0.666667
0
0
0
0
0
0
0
0
0
0
0.05
0.0625
64
3
27
21.333333
0.75
0.671875
0
0
0
0
0.368421
0
0
0
0
0
0
1
0
true
0
0
0
0
1
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
4c36b4da9261656195920de0a1787acd91b399f5
842
py
Python
oops_fhir/r4/value_set/practice_setting_code_value_set.py
Mikuana/oops_fhir
77963315d123756b7d21ae881f433778096a1d25
[ "MIT" ]
null
null
null
oops_fhir/r4/value_set/practice_setting_code_value_set.py
Mikuana/oops_fhir
77963315d123756b7d21ae881f433778096a1d25
[ "MIT" ]
null
null
null
oops_fhir/r4/value_set/practice_setting_code_value_set.py
Mikuana/oops_fhir
77963315d123756b7d21ae881f433778096a1d25
[ "MIT" ]
null
null
null
from pathlib import Path from fhir.resources.valueset import ValueSet as _ValueSet from oops_fhir.utils import ValueSet __all__ = ["PracticeSettingCodeValueSet"] _resource = _ValueSet.parse_file(Path(__file__).with_suffix(".json")) class PracticeSettingCodeValueSet(ValueSet): """ Practice Setting Code Value Set This is the code representing the clinical specialty of the clinician or provider who interacted with, treated, or provided a service to/for the patient. The value set used for clinical specialty has been limited by HITSP to the value set reproduced from HITSP C80 Table 2-149 Clinical Specialty Value Set Definition. Status: active - Version: 4.0.1 http://hl7.org/fhir/ValueSet/c80-practice-codes """ # TODO: fix this template issue1 pass class Meta: resource = _resource
25.515152
76
0.754157
114
842
5.438596
0.622807
0.051613
0.035484
0
0
0
0
0
0
0
0
0.018895
0.182898
842
32
77
26.3125
0.882267
0.571259
0
0
0
0
0.091429
0.077143
0
0
0
0.03125
0
1
0
false
0.111111
0.333333
0
0.555556
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
0
0
1
1
0
1
0
0
4
4c3b87f59e759a9c5fa6efb840df6930b9a43b2b
228
py
Python
rlberry/utils/__init__.py
mmcenta/rlberry
23c9984618da77695abb04bca9336e47f9f610ba
[ "MIT" ]
null
null
null
rlberry/utils/__init__.py
mmcenta/rlberry
23c9984618da77695abb04bca9336e47f9f610ba
[ "MIT" ]
null
null
null
rlberry/utils/__init__.py
mmcenta/rlberry
23c9984618da77695abb04bca9336e47f9f610ba
[ "MIT" ]
null
null
null
from .check_bandit_agent import check_bandit_agent from .check_agent import ( check_rl_agent, check_save_load, check_fit_additive, check_seeding_agent, check_agent_manager, ) from .check_env import check_env
22.8
50
0.789474
33
228
4.939394
0.393939
0.165644
0.196319
0
0
0
0
0
0
0
0
0
0.166667
228
9
51
25.333333
0.857895
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
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
4c4fafd4bcbbd4f0539cee2971fb8618b46540f1
294
py
Python
introduction_to_django/introduction_to_django/cities/models.py
Xamaneone/Django-Projects
4fac8659680a6448bb55bce008bfd0eac1ad1f6d
[ "MIT" ]
null
null
null
introduction_to_django/introduction_to_django/cities/models.py
Xamaneone/Django-Projects
4fac8659680a6448bb55bce008bfd0eac1ad1f6d
[ "MIT" ]
null
null
null
introduction_to_django/introduction_to_django/cities/models.py
Xamaneone/Django-Projects
4fac8659680a6448bb55bce008bfd0eac1ad1f6d
[ "MIT" ]
null
null
null
from django.db import models class Person(models.Model): name = models.CharField(max_length=30) age = models.IntegerField() home_town = models.CharField(max_length=25) class Phone(models.Model): model = models.CharField(max_length=30) quantity = models.IntegerField()
19.6
47
0.72449
38
294
5.5
0.526316
0.215311
0.258373
0.344498
0.248804
0
0
0
0
0
0
0.02449
0.166667
294
14
48
21
0.828571
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.125
0
1
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
0
0
0
0
0
0
0
1
0
0
4
4c51ff208a7d9ee3cf64cac05f34b921d5783c4c
127
py
Python
run.py
0bf/hookup
43ab943537965cfc54301402350f88e307b7935b
[ "MIT" ]
20
2020-01-14T17:10:09.000Z
2022-03-06T04:52:29.000Z
run.py
rickthor7/hookup
31d6a0d413c62d317f1b70c4d83541a00bf15d72
[ "MIT" ]
2
2020-11-30T11:56:38.000Z
2022-02-26T22:24:09.000Z
run.py
rickthor7/hookup
31d6a0d413c62d317f1b70c4d83541a00bf15d72
[ "MIT" ]
8
2020-01-31T18:18:47.000Z
2022-01-02T08:19:57.000Z
from hookup import start_server, db, cli if __name__ == '__main__': db.create_all() cli.main() start_server()
18.142857
40
0.645669
17
127
4.176471
0.705882
0.309859
0
0
0
0
0
0
0
0
0
0
0.23622
127
7
41
18.142857
0.731959
0
0
0
0
0
0.0625
0
0
0
0
0
0
1
0
true
0
0.2
0
0.2
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
1
0
0
0
0
0
0
4
d5e5c53e392ec9822e4e62353b96d020051a7aa4
3,214
py
Python
src/python/pants/backend/native/register.py
silverguo/pants
141510d03fbf2b7e1a0b54f66b54088697f6fa51
[ "Apache-2.0" ]
null
null
null
src/python/pants/backend/native/register.py
silverguo/pants
141510d03fbf2b7e1a0b54f66b54088697f6fa51
[ "Apache-2.0" ]
null
null
null
src/python/pants/backend/native/register.py
silverguo/pants
141510d03fbf2b7e1a0b54f66b54088697f6fa51
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). """Support for using C and C++ with Python distributions via `ctypes`.""" from pants.backend.native.subsystems.binaries.binutils import create_binutils_rules from pants.backend.native.subsystems.binaries.gcc import create_gcc_rules from pants.backend.native.subsystems.binaries.llvm import create_llvm_rules from pants.backend.native.subsystems.native_build_settings import NativeBuildSettings from pants.backend.native.subsystems.native_toolchain import create_native_toolchain_rules from pants.backend.native.subsystems.xcode_cli_tools import create_xcode_cli_tools_rules from pants.backend.native.target_types import ( CLibrary, ConanNativeLibrary, CppLibrary, PackagedNativeLibrary, ) from pants.backend.native.targets.external_native_library import ConanRequirement from pants.backend.native.targets.external_native_library import ( ExternalNativeLibrary as ExternalNativeLibraryV1, ) from pants.backend.native.targets.native_artifact import NativeArtifact from pants.backend.native.targets.native_library import CLibrary as CLibraryV1 from pants.backend.native.targets.native_library import CppLibrary as CppLibraryV1 from pants.backend.native.targets.packaged_native_library import ( PackagedNativeLibrary as PackagedNativeLibraryV1, ) from pants.backend.native.tasks.c_compile import CCompile from pants.backend.native.tasks.conan_fetch import ConanFetch from pants.backend.native.tasks.conan_prep import ConanPrep from pants.backend.native.tasks.cpp_compile import CppCompile from pants.backend.native.tasks.link_shared_libraries import LinkSharedLibraries from pants.build_graph.build_file_aliases import BuildFileAliases from pants.goal.task_registrar import TaskRegistrar as task def build_file_aliases(): return BuildFileAliases( targets={ CLibraryV1.alias(): CLibraryV1, CppLibraryV1.alias(): CppLibraryV1, ExternalNativeLibraryV1.alias(): ExternalNativeLibraryV1, PackagedNativeLibraryV1.alias(): PackagedNativeLibraryV1, }, objects={ ConanRequirement.alias(): ConanRequirement, NativeArtifact.alias(): NativeArtifact, }, ) def global_subsystems(): return {NativeBuildSettings} def register_goals(): # TODO(#5962): register these under the 'compile' goal when we eliminate the product transitive # dependency from export -> compile. task(name="conan-prep", action=ConanPrep).install("native-compile") task(name="conan-fetch", action=ConanFetch).install("native-compile") task(name="c-for-ctypes", action=CCompile).install("native-compile") task(name="cpp-for-ctypes", action=CppCompile).install("native-compile") task(name="shared-libraries", action=LinkSharedLibraries).install("link") def rules(): return ( *create_native_toolchain_rules(), *create_xcode_cli_tools_rules(), *create_binutils_rules(), *create_gcc_rules(), *create_llvm_rules(), ) def targets2(): return [CLibrary, CppLibrary, ConanNativeLibrary, PackagedNativeLibrary]
41.205128
99
0.778469
364
3,214
6.722527
0.288462
0.073559
0.117695
0.161831
0.346138
0.226808
0.121782
0.085002
0.04577
0
0
0.008273
0.135034
3,214
77
100
41.74026
0.871942
0.100498
0
0
0
0
0.042694
0
0
0
0
0.012987
0
1
0.083333
true
0
0.333333
0.066667
0.483333
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
1
0
0
0
1
0
1
0
0
0
0
4
d5ed30cdb91504151b3fe0074f7f80db84cf0a3f
93
py
Python
LP2/Aula 21022019/nro_iguais.py
luisxfelipe/Faculdade_Impacta_2semestre
ad6e0bcc22496bb96f56c5ca3d930554dd5302a4
[ "Apache-2.0" ]
null
null
null
LP2/Aula 21022019/nro_iguais.py
luisxfelipe/Faculdade_Impacta_2semestre
ad6e0bcc22496bb96f56c5ca3d930554dd5302a4
[ "Apache-2.0" ]
6
2020-06-05T20:57:34.000Z
2022-03-11T23:47:43.000Z
LP2/Aula 21022019/nro_iguais.py
luisxfelipe/Faculdade_Impacta_2semestre
ad6e0bcc22496bb96f56c5ca3d930554dd5302a4
[ "Apache-2.0" ]
null
null
null
def teste(n1, n2, n3): if n1==n2==n3: return True else: return False
15.5
22
0.505376
14
93
3.357143
0.714286
0.170213
0.255319
0
0
0
0
0
0
0
0
0.103448
0.376344
93
5
23
18.6
0.706897
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0
0
0.6
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
0
0
1
0
0
4
d5f1eb6659a2738f24ea957f7e18a1bdbade2748
3,041
py
Python
DailyProgrammer/DP20170915C.py
DayGitH/Python-Challenges
bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf
[ "MIT" ]
2
2020-12-23T18:59:22.000Z
2021-04-14T13:16:09.000Z
DailyProgrammer/DP20170915C.py
DayGitH/Python-Challenges
bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf
[ "MIT" ]
null
null
null
DailyProgrammer/DP20170915C.py
DayGitH/Python-Challenges
bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf
[ "MIT" ]
null
null
null
""" [2017-09-15] Challenge #331 [Hard] Interactive Interpreter https://www.reddit.com/r/dailyprogrammer/comments/7096nu/20170915_challenge_331_hard_interactive/ #Description Make an interactive interpreter with 2 different capabilities 1. It should be able to take a mathematical string (fx "5 + 2") and return the result of it 2. It should be capable of assigning variables (fx "x = 5 + 2") store the value for the variable for later use and return the value 3. Using assigned variables instead of numbers (fx "y = x * 2") Variable names must start with a character a-z and can be continued by any alphanumeric character. All variables will be numerical (can be either floats or integers), feel free to support arbitrarily large numbers. The mathematical evaluator shall be capable of adding, subtracting, multiplying, dividing, exponents and handling nested parenthesis. exponents will be using ^ as symbol. The usual order of mathematics apply, so PEMDAS shall be applied in evaluations. **PLEASE** refrain from using your languages built in evaluators. #Input description A list of strings such as (divided by \n): 5 + 5 (2 * 5 + 1) / 10 x = 1 / 2 y = x * 2 Assume all inputs to be written properly, i.e. no undefined variables or wrong placed parenthesis Assume all whitespace as negligible so "1 2" and "12" can be assumed the same #Output description Output for each input line, fx from above would be: 10 1.1 0.5 1 #Challenge input 9 + 10 (2 * 5 + 1) / 10 x = 1 / 2 y = x * 2 (x + 2) * (y * (5 - 100)) z = 5*-3.14 2.6^(2 + 3/2) * (2-z) #Challenge output 19 1.1 0.5 1 -237.5 -15.7 501.625937332 #Bonus ##Bonus 1 - Functions Variables are nice, but it's all quite limited until we got functions functions doesnt eval on declaration, so just make a newline as output from a funtion declaration functions and variables can exist with the same name. functions either look like 'func()' or 'func(arg1, arg2, arg3)' with any number of arguments needed arguments given for functions are only used within the function themself and overwrites any variable with the given name. a = 2 func(a) = a func(1) will return 1 func(1) + a will return 3 if the function requires no arguments ###Bonus input a = 10 a() = 2 a() + a avg(a, b) = (a + b) / 2 x = avg(69, 96) avg(x, avg(a(), a)) + a ###Bonus output 10 12 82.5 54.25 ##Bonus 2 - Errors Handle errors 'gracefully' Errors include but are likely not limited to: 1. Undefined variables (fx "pi * 2", pi has never been defined) 2. Wrong variable naming 3. parenthesis placed wrongly (too many open, too many closing, closing when none open etc) 4. dividing by 0 5. Functions calling itself or calling functions that end up calling itself Return error description as output if an error occurred #Extra If you have any challenges, please share it at /r/dailyprogrammer_ideas! """ def main(): pass if __name__ == "__main__": main()
31.677083
115
0.701085
500
3,041
4.238
0.454
0.003775
0.004247
0.025484
0.015101
0.010382
0.010382
0.010382
0.010382
0.010382
0
0.060837
0.221638
3,041
95
116
32.010526
0.83439
0.975995
0
0
0
0
0.125
0
0
0
0
0
0
1
0.25
true
0.25
0
0
0.25
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
1
1
1
0
0
0
0
0
4
d5fbd500cac902ff4b001a3c651f42b33a992661
733
py
Python
JanggiGame/SocketServer/messages/message_data.py
MohamedAl-Hussein/janggi-game
0664a408563b824c0b665d755ff9b232b6f24644
[ "MIT" ]
null
null
null
JanggiGame/SocketServer/messages/message_data.py
MohamedAl-Hussein/janggi-game
0664a408563b824c0b665d755ff9b232b6f24644
[ "MIT" ]
null
null
null
JanggiGame/SocketServer/messages/message_data.py
MohamedAl-Hussein/janggi-game
0664a408563b824c0b665d755ff9b232b6f24644
[ "MIT" ]
null
null
null
import dataclasses from typing import List from dtos.piece_dto import PieceDTO @dataclasses.dataclass class MessageData: pass @dataclasses.dataclass class GameStatus(MessageData): GameState: str PlayerTurn: str IsChecked: bool @dataclasses.dataclass class PieceDestinations(MessageData): Source: List[int] Destinations: List[List[int]] @dataclasses.dataclass class SetupCompleted(MessageData): BlueLeftTransposed: bool BlueRightTransposed: bool RedLeftTransposed: bool RedRightTransposed: bool @dataclasses.dataclass class MoveCompleted(MessageData): Source: List[int] Destination: List[int] @dataclasses.dataclass class PieceData(MessageData): Pieces: List[PieceDTO]
17.452381
37
0.766712
72
733
7.791667
0.444444
0.213904
0.26738
0.103387
0.114082
0
0
0
0
0
0
0
0.160982
733
41
38
17.878049
0.912195
0
0
0.285714
0
0
0
0
0
0
0
0
0
1
0
true
0.035714
0.107143
0
0.75
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
1
0
0
0
1
0
0
4
910b22853d86468f3dddff2ab6d125e97e75ffbd
3,662
py
Python
src/tests/test_with.py
virtuald/pydsltool
f3408eb4a560cfe7e4df870f08d747169a056792
[ "Apache-2.0" ]
9
2016-10-07T20:27:46.000Z
2021-11-03T11:56:20.000Z
src/tests/test_with.py
virtuald/pydsltool
f3408eb4a560cfe7e4df870f08d747169a056792
[ "Apache-2.0" ]
null
null
null
src/tests/test_with.py
virtuald/pydsltool
f3408eb4a560cfe7e4df870f08d747169a056792
[ "Apache-2.0" ]
2
2017-07-21T14:27:01.000Z
2018-06-22T15:36:46.000Z
# # py.test based tests # import dsltool from inspect import cleandoc import pytest # # DSL Objects # class GrandchildDsl(object): grandchild_var = None class ChildDsl(object): child_var = None grandchild_dsl = GrandchildDsl class BaseDsl(object): var = None child_dsl = ChildDsl # # Test nested with statements # def test_with_0a0(): dsl_contents = cleandoc(''' var = 3 with ChildDsl: child_var = 4 with GrandchildDsl: grandchild_var = 5 ''') result = dsltool.parse_dsl(dsl_contents, BaseDsl) assert result.var == 3 assert result.child_dsl.child_var == 4 assert result.child_dsl.grandchild_dsl.grandchild_var == 5 def test_with_0a1(): dsl_contents = cleandoc(''' var = 3 with ChildDsl as c: c.child_var = 4 with GrandchildDsl as g: g.grandchild_var = 5 ''') result = dsltool.parse_dsl(dsl_contents, BaseDsl) assert result.var == 3 assert result.child_dsl.child_var == 4 assert result.child_dsl.grandchild_dsl.grandchild_var == 5 def test_with_0b0(): dsl_contents = cleandoc(''' var = 3 with ChildDsl(): child_var = 4 with GrandchildDsl(): grandchild_var = 5 ''') result = dsltool.parse_dsl(dsl_contents, BaseDsl) assert result.var == 3 assert result.child_dsl.child_var == 4 assert result.child_dsl.grandchild_dsl.grandchild_var == 5 def test_with_0b1(): dsl_contents = cleandoc(''' var = 3 with ChildDsl() as c: c.child_var = 4 with GrandchildDsl() as g: g.grandchild_var = 5 ''') result = dsltool.parse_dsl(dsl_contents, BaseDsl) assert result.var == 3 assert result.child_dsl.child_var == 4 assert result.child_dsl.grandchild_dsl.grandchild_var == 5 # # Test missing with statements # def test_with_1a(): dsl_contents = cleandoc(''' ''') result = dsltool.parse_dsl(dsl_contents, BaseDsl) assert result.var == None assert result.child_dsl is None def test_with_1b(): dsl_contents = cleandoc(''' var = 3 with ChildDsl: pass ''') result = dsltool.parse_dsl(dsl_contents, BaseDsl) assert result.var == 3 assert result.child_dsl.child_var is None assert result.child_dsl.grandchild_dsl is None def test_with_1c0(): dsl_contents = cleandoc(''' var = 3 with ChildDsl: child_var = 4 ''') result = dsltool.parse_dsl(dsl_contents, BaseDsl) assert result.var == 3 assert result.child_dsl.child_var == 4 assert result.child_dsl.grandchild_dsl is None def test_with_1c1(): dsl_contents = cleandoc(''' var = 3 with ChildDsl as c: c.child_var = 4 ''') result = dsltool.parse_dsl(dsl_contents, BaseDsl) assert result.var == 3 assert result.child_dsl.child_var == 4 assert result.child_dsl.grandchild_dsl is None # # Test multiple with statements # def test_with_2a(): dsl_contents = cleandoc(''' var = 3 with ChildDsl: child_var = 4 with ChildDsl: child_var = 5 ''') with pytest.raises(AttributeError): dsltool.parse_dsl(dsl_contents, BaseDsl) # # Test missing classes # def test_with_3a(): dsl_contents = cleandoc(''' var = 3 with MissingClass: var = 4 ''') with pytest.raises(NameError): dsltool.parse_dsl(dsl_contents, BaseDsl)
21.928144
66
0.606226
446
3,662
4.755605
0.121076
0.130127
0.120226
0.141443
0.803866
0.756719
0.703442
0.68694
0.68694
0.68694
0
0.021526
0.302294
3,662
166
67
22.060241
0.808611
0.037957
0
0.681416
0
0
0.280902
0
0
0
0
0
0.20354
1
0.088496
false
0.00885
0.026549
0
0.185841
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
9129f45175485075e14737e0238ab56e791ea549
3,502
py
Python
regression/process.py
sansastra/uncertainty_edl_graph
21c20bef323b520f6031ca54c2eb1fd020841f9d
[ "Apache-2.0" ]
4
2021-08-09T20:46:22.000Z
2022-03-23T15:58:30.000Z
regression/process.py
sansastra/uncertainty_edl_graph
21c20bef323b520f6031ca54c2eb1fd020841f9d
[ "Apache-2.0" ]
null
null
null
regression/process.py
sansastra/uncertainty_edl_graph
21c20bef323b520f6031ca54c2eb1fd020841f9d
[ "Apache-2.0" ]
1
2021-11-02T14:29:51.000Z
2021-11-02T14:29:51.000Z
from sklearn.preprocessing import MinMaxScaler from sklearn.metrics import mean_squared_error import numpy as np import pandas as pd import math import matplotlib.pyplot as plt # from src.trajectory_pred.load_data_traj import load_test_data, load_test_interpolated_data from src.trajectory_pred.ENUtransform import WGS84toENU, ENUtoWGS84, WGS84toECEF geo_area = [11.5, 12.5, 54.2, 54.5] # [11, 13, 54, 55] # # ref = {'lon': 12.0, 'lat': 54.35, 'ECEF': WGS84toECEF(12.0, 54.35)} # geo_area_ENU = WGS84toENU(geo_area[0:2], geo_area[2:4], ref, h=0.) # geo_area_ENU = np.delete(geo_area_ENU.T, np.s_[2],axis=1) geo_area_ENU = np.array(geo_area).reshape(2,2).T cluster_max = 7.0 # 0-6 for real edges + 1 for noise sog_max = 30.0 def scale_lon_lat_cog_sog_cluster(data): data[:, 0] = (data[:, 0] - geo_area_ENU[0, 0]) / (geo_area_ENU[1, 0] - geo_area_ENU[0, 0]) # lon data[:, 1] = (data[:, 1] - geo_area_ENU[0, 1]) / (geo_area_ENU[1, 1] - geo_area_ENU[0, 1]) # lat data[:, 2] = data[:, 2] / 360.0 data[:, 3] = data[:, 3] / sog_max data[:, 4] = data[:, 4]/cluster_max return data def scale_lon_lat_cog_sog(data): data[:, 0] = (data[:, 0] - geo_area_ENU[0, 0]) / (geo_area_ENU[1, 0] - geo_area_ENU[0, 0]) # lon data[:, 1] = (data[:, 1] - geo_area_ENU[0, 1]) / (geo_area_ENU[1, 1] - geo_area_ENU[0, 1]) # lat data[:, 2] = data[:, 2] / 360.0 data[:, 3] = data[:, 3] / sog_max return data def scale_lon(lon): return (lon - geo_area_ENU[0, 0]) / (geo_area_ENU[1, 0] - geo_area_ENU[0, 0]) # lon def scale_lat(lat): return (lat - geo_area_ENU[0, 1]) / (geo_area_ENU[1, 1] - geo_area_ENU[0, 1]) # lat def scale_cog(cog): return cog/360.0 def scale_cluster(cluster): return cluster/cluster_max def scale_sog(sog): return sog/cluster_max def inverse_transform_lon_lat_cog_sog_cluster(data): data[:, 0] = (data[:, 0]) * (geo_area_ENU[1, 0] - geo_area_ENU[0, 0]) + geo_area_ENU[0, 0] data[:, 1] = (data[:, 1]) * (geo_area_ENU[1, 1] - geo_area_ENU[0, 1]) + geo_area_ENU[0, 1] data[:, 2] = 360*data[:,2] data[:, 3] = sog_max*data[:, 3] data[:, 4] = cluster_max*data[:, 4] return data def inverse_transform_lon_lat_cog_sog(data): data[:, 0] = (data[:, 0]) * (geo_area_ENU[1, 0] - geo_area_ENU[0, 0]) + geo_area_ENU[0, 0] data[:, 1] = (data[:, 1]) * (geo_area_ENU[1, 1] - geo_area_ENU[0, 1]) + geo_area_ENU[0, 1] data[:, 2] = 360*data[:,2] data[:, 3] = sog_max*data[:, 3] return data def inverse_transform_lon_lat(data): data[:, 0] = (data[:, 0]) * (geo_area_ENU[1, 0] - geo_area_ENU[0, 0]) + geo_area_ENU[0, 0] data[:, 1] = (data[:, 1]) * (geo_area_ENU[1, 1] - geo_area_ENU[0, 1]) + geo_area_ENU[0, 1] return data def inverse_transform_lon(lon): return (lon) * (geo_area_ENU[1, 0] - geo_area_ENU[0, 0]) + geo_area_ENU[0, 0] def inverse_transform_lat(lat): return (lat) * (geo_area_ENU[1, 1] - geo_area_ENU[0, 1]) + geo_area_ENU[0, 1] def inverse_transform_cog(cog): return 360.0*(cog) def inverse_transform_sog(sog): return sog_max* (sog) def inverse_transform_cluster(cluster): return cluster_max * cluster def reshape_data(x_train, INPUT_LEN, dim): # samples_train = x_train.shape[0] # x_train = x_train[:samples_train][:] print('size = ', x_train.shape[0]) x_train.shape = (x_train.shape[0], INPUT_LEN, dim) return x_train
34.333333
102
0.622501
612
3,502
3.28268
0.133987
0.174216
0.22897
0.15331
0.538079
0.536088
0.480338
0.409159
0.409159
0.409159
0
0.075323
0.203884
3,502
102
103
34.333333
0.645265
0.122216
0
0.353846
0
0
0.002366
0
0
0
0
0
0
1
0.246154
false
0
0.107692
0.153846
0.6
0.015385
0
0
0
null
0
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
1
0
0
0
1
1
0
0
4
912bd6645c54d36ea79023da21d21be0a8f7ef07
134
py
Python
instwitter/formatters/__init__.py
sovnarkom/instwitter-py
971ec9db5c75476b8fc51adc90eb368951152341
[ "MIT" ]
null
null
null
instwitter/formatters/__init__.py
sovnarkom/instwitter-py
971ec9db5c75476b8fc51adc90eb368951152341
[ "MIT" ]
1
2017-11-27T04:13:29.000Z
2017-11-27T04:13:29.000Z
instwitter/formatters/__init__.py
sovnarkom/instwitter-py
971ec9db5c75476b8fc51adc90eb368951152341
[ "MIT" ]
null
null
null
''' Created on Jul 31, 2009 @author: aleksandrcicenin ''' class Formatter(object): def format(self, data): return data
12.181818
27
0.649254
16
134
5.4375
0.9375
0
0
0
0
0
0
0
0
0
0
0.058252
0.231343
134
10
28
13.4
0.786408
0.373134
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0.333333
1
0
1
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
0
0
1
1
0
0
4
9137176acc89985c2bda99a1ee376d36422d3605
121
py
Python
api/src/opentrons/protocols/context/__init__.py
anuwrag/opentrons
28c8d76a19e367c6bd38f5290faaa32abf378715
[ "Apache-2.0" ]
235
2017-10-27T20:37:27.000Z
2022-03-30T14:09:49.000Z
api/src/opentrons/protocols/context/__init__.py
anuwrag/opentrons
28c8d76a19e367c6bd38f5290faaa32abf378715
[ "Apache-2.0" ]
8,425
2017-10-26T15:25:43.000Z
2022-03-31T23:54:26.000Z
api/src/opentrons/protocols/context/__init__.py
anuwrag/opentrons
28c8d76a19e367c6bd38f5290faaa32abf378715
[ "Apache-2.0" ]
130
2017-11-09T21:02:37.000Z
2022-03-15T18:01:24.000Z
""" This package defines the interfaces that implement the ProtocolContext, InstrumentContext, and related classes. """
24.2
71
0.793388
13
121
7.384615
0.923077
0
0
0
0
0
0
0
0
0
0
0
0.132231
121
4
72
30.25
0.914286
0.92562
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
9150937cac8edc50e841637224a2707b2202bd0c
254
py
Python
src/backend/joanie/core/utils.py
openfun/joanie
9e820d04875baa3ddd57917a1f71157a32187af0
[ "MIT" ]
6
2021-02-22T08:43:08.000Z
2022-02-18T14:48:46.000Z
src/backend/joanie/core/utils.py
openfun/joanie
9e820d04875baa3ddd57917a1f71157a32187af0
[ "MIT" ]
25
2021-01-28T20:19:59.000Z
2022-02-23T10:20:14.000Z
src/backend/joanie/core/utils.py
openfun/joanie
9e820d04875baa3ddd57917a1f71157a32187af0
[ "MIT" ]
null
null
null
""" Utils that can be useful throughout Joanie's core app """ from django.utils.text import slugify def normalize_code(code): """Normalize object codes to avoid duplicates.""" return slugify(code, allow_unicode=False).upper() if code else None
25.4
71
0.740157
37
254
5.027027
0.837838
0
0
0
0
0
0
0
0
0
0
0
0.15748
254
9
72
28.222222
0.869159
0.38189
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
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
1
0
0
1
0
1
0
0
4
e6ae31273ece352541582dcfcea45d33de9c7822
8,176
py
Python
cg_manage_rds/cli.py
rbogle/cg-manage-rds
a6bcabcf92ce4abe85e03d369686ac3de9cdfc63
[ "CC0-1.0" ]
null
null
null
cg_manage_rds/cli.py
rbogle/cg-manage-rds
a6bcabcf92ce4abe85e03d369686ac3de9cdfc63
[ "CC0-1.0" ]
null
null
null
cg_manage_rds/cli.py
rbogle/cg-manage-rds
a6bcabcf92ce4abe85e03d369686ac3de9cdfc63
[ "CC0-1.0" ]
null
null
null
import click from cg_manage_rds import commands CONTEXT_SETTINGS = dict(help_option_names=["-h", "-?", "--help"]) @click.group(context_settings=CONTEXT_SETTINGS) def main(): """ Application to export, import, or clone a rds service instance from the aws-broker on Cloud.gov """ ## CHECK @click.option( "-e", "--engine", type=click.Choice(["pgsql", "mysql"], case_sensitive=False), help="Database engine type", show_default=True, ) @main.command(context_settings=CONTEXT_SETTINGS) @click.argument("service") def check(engine, service): """ Check local system for required utilities for a DB engine. """ commands.check(service, engine) ## SETUP @main.command(context_settings=CONTEXT_SETTINGS) @click.option("-k", "--key", type=str, help="service key name", default="key") @click.option("-a", "--app", type=str, help="app name", default="ssh-app") @click.option( "-e", "--engine", type=click.Choice(["pgsql", "mysql"], case_sensitive=False), help="Database engine type", show_default=True, ) @click.argument("service") def setup(service, key, app, engine): """ Setup app, key, and tunnel to a aws-rds service instance SERVICE name of the service instance """ click.echo(f"Setting up key, app and tunnel for {service}") creds, _ = commands.setup(service, engine, app, key) click.echo(f"key, app and tunnel for {service} setup!") click.echo(f"You can connect to {service} using this:") click.secho(creds.get("uri"), fg="yellow") ## TEARDOWN @main.command(context_settings=CONTEXT_SETTINGS) @click.option("-k", "--key", type=str, help="service key name", default="key") @click.option("-a", "--app", type=str, help="app name", default="ssh-app") @click.option("-p", "--pid", type=int, help="pid of tunnel", default=0) @click.argument("service") def cleanup( service, pid, key, app, ): """ Cleanup key, app, and tunnel to a aws-rds service instance SERVICE name of the db service instance """ click.echo(f"Cleaning up the app, key and tunnel for {service}") commands.cleanup(service, pid, app, key) click.echo("Clean up complete") ## Export @main.command("export",context_settings=CONTEXT_SETTINGS) @click.option( "-e", "--engine", type=click.Choice(["pgsql", "mysql"], case_sensitive=False), help="Database engine type", show_default=True, ) @click.option( "-f", "--output-file", default="db_backup.sql", help="Output file name", show_default=True, ) @click.option( "-o", "--options", type=str, help="cli options for the backup client", ) @click.option( "-s", "--setup", type=bool, default=True, help="peform app/tunnel setup", show_default=True, ) @click.option( "-c", "--cleanup", type=bool, default=True, help="peform app/tunnel cleanup", show_default=True, ) @click.option( "-k", "--key-name", type=str, default="key", help="use this service key name", show_default=True, ) @click.option( "-a", "--app-name", type=str, default="ssh-app", help="use this app name", show_default=True, ) @click.option( "--force-options", type=bool, default=False, help="override engine default options with yours", show_default=True, ) @click.argument("source") def export_db( source, engine, output_file, options, force_options, key_name, app_name, setup, cleanup, ): """ Export data and/or schema from SOURCE aws-rds service instance By default export will not preserve ownership, and will attempt to create objects if they do not exist. These defaults can be overridden with the --force-options flag. You can insert additional options and flags to the clients using -o --options. """ click.echo(f"Exporting {source} to file: {output_file}") commands.export_from_svc( source, engine, output_file, options, force_options, service_key=key_name, app_name=app_name, do_setup=setup, do_teardown=cleanup, ) ## Import @main.command("import",context_settings=CONTEXT_SETTINGS) @click.option( "-e", "--engine", type=click.Choice(["pgsql", "mysql"], case_sensitive=False), help="Database engine type", show_default=True, ) @click.option( "-f", "--input-file", default="db_backup.sql", help="Input file name", show_default=True, ) @click.option( "-o", "--options", type=str, help="cli options for the backup client", ) @click.option( "-s", "--setup", type=bool, default=True, help="peform app/tunnel setup", show_default=True, ) @click.option( "-c", "--cleanup", type=bool, default=True, help="peform app/tunnel teardown", show_default=True, ) @click.option( "-k", "--key-name", type=str, default="key", help="use this service key name", show_default=True, ) @click.option( "-a", "--app-name", type=str, default="ssh-app", help="use this app name", show_default=True, ) @click.option( "--force-options", type=bool, default=False, help="override engine default options with yours", show_default=True, ) @click.argument("destination") def import_db( destination, engine, input_file, options, force_options, key_name, app_name, setup, cleanup, ): """ Import data and/or schema to DESTINATION rds service instance By default import will not preserve ownership, and will attempt to create objects if they do not exist. These defaults can be overridden with the --force-options flag. You can insert additional options and flags to the clients using -o --options. """ click.echo(f"Importing to {destination} from file: {input_file}") commands.import_to_svc( destination, engine, input_file, options, force_options, service_key=key_name, app_name=app_name, do_setup=setup, do_cleanup=cleanup, ) ## CLONE @main.command(context_settings=CONTEXT_SETTINGS) @click.option( "-e", "--engine", type=click.Choice(["pgsql", "mysql"], case_sensitive=False), help="Database engine type", show_default=True, ) @click.option( "-f", "--output-file", default="db_backup.sql", help="Output file name", show_default=True, ) @click.option( "-b", "--boptions", type=str, help="cli options for the backup client", ) @click.option( "-r", "--roptions", type=str, help="cli options for the restore client", ) @click.option( "-k", "--key-name", type=str, default="key", help="use this service key name", show_default=True, ) @click.option( "-a", "--app-name", type=str, default="ssh-app", help="use this app name", show_default=True, ) @click.option( "--force-options", type=bool, default=False, help="override engine default options with yours", show_default=True, ) @click.argument("source") @click.argument("destination") def clone( source, destination, engine, output_file, boptions, roptions, force_options, key_name, app_name, ): """ Migrate data from one rds service to another rds service instance. By default export and import will not preserve ownership, and will attempt to create objects if they do not exist. These defaults can be overridden with the --force-options flag. You can insert additional options and flags to the clients with either -b --boptions or -r --roptions. """ click.echo(f"Cloning the database: {source} to {destination}") commands.clone( source, destination, engine, output_file, boptions, roptions, force_options, key_name, app_name, ) click.echo("Cloning complete!") if __name__ == "__main__": main()
22.217391
99
0.622676
1,029
8,176
4.853256
0.13897
0.066079
0.063076
0.080096
0.753304
0.736284
0.707849
0.677213
0.67501
0.67501
0
0.00016
0.235934
8,176
367
100
22.277929
0.799264
0.167319
0
0.744027
0
0
0.244499
0
0
0
0
0
0
1
0.023891
false
0
0.020478
0
0.044369
0
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
e6dff66d6b71f1c8c5e2b7b75e93dc306f418d8c
96
py
Python
build/lib/djinn/physics/Mass.py
djeof-1/Djinn-IV
2b191b68109f46a9fc264b6a823f70beb58ddffd
[ "MIT" ]
3
2015-12-26T11:48:34.000Z
2016-01-13T14:24:27.000Z
build/lib/djinn/physics/Mass.py
l0ftyWhizZ/DJINN-IV
2b191b68109f46a9fc264b6a823f70beb58ddffd
[ "MIT" ]
1
2015-12-28T14:15:26.000Z
2015-12-28T14:15:26.000Z
djinn/physics/Mass.py
djeof-1/Djinn-IV
2b191b68109f46a9fc264b6a823f70beb58ddffd
[ "MIT" ]
2
2016-01-05T10:18:13.000Z
2016-01-16T09:45:28.000Z
class Mass: def __init__(self,val): self.mass = val self.weight = val*9.8
13.714286
29
0.552083
14
96
3.5
0.642857
0.285714
0
0
0
0
0
0
0
0
0
0.03125
0.333333
96
6
30
16
0.734375
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
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
fc21e49a9ac22dfd41323943e3f22a3778646500
156
py
Python
test/test_log.py
glowatsk/txtorcon
db8de75a4568561b118be11299bda61f3fb84719
[ "MIT" ]
180
2015-01-12T23:57:06.000Z
2022-03-17T00:24:35.000Z
test/test_log.py
glowatsk/txtorcon
db8de75a4568561b118be11299bda61f3fb84719
[ "MIT" ]
262
2015-01-16T21:14:50.000Z
2022-02-25T01:33:42.000Z
test/test_log.py
glowatsk/txtorcon
db8de75a4568561b118be11299bda61f3fb84719
[ "MIT" ]
61
2015-01-05T01:10:57.000Z
2022-01-04T08:13:39.000Z
from twisted.trial import unittest from txtorcon import log class LoggingTests(unittest.TestCase): def test_debug(self): log.debug_logging()
17.333333
38
0.75
20
156
5.75
0.75
0
0
0
0
0
0
0
0
0
0
0
0.179487
156
8
39
19.5
0.898438
0
0
0
0
0
0
0
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
fc27b915951fc7ebe9a7f6ad886fd3cb577e454e
146
py
Python
wafec_tests_openstack_testware/src/wafec_tests_openstack_testware/types.py
wafec/wafec-tests-openstack-testware
f06789800b40f316183736ee805af4b352a825ab
[ "MIT" ]
null
null
null
wafec_tests_openstack_testware/src/wafec_tests_openstack_testware/types.py
wafec/wafec-tests-openstack-testware
f06789800b40f316183736ee805af4b352a825ab
[ "MIT" ]
null
null
null
wafec_tests_openstack_testware/src/wafec_tests_openstack_testware/types.py
wafec/wafec-tests-openstack-testware
f06789800b40f316183736ee805af4b352a825ab
[ "MIT" ]
null
null
null
class Undefined(object): @staticmethod def is_undefined(value): return value is not None and issubclass(type(value), Undefined)
20.857143
71
0.705479
18
146
5.666667
0.722222
0
0
0
0
0
0
0
0
0
0
0
0.212329
146
6
72
24.333333
0.886957
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0.25
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
1
0
0
0
4
fc40f1966fd9410539f75b56fd948613796215ae
293
py
Python
paraffin/matching/__init__.py
UKFELs/Paraffin
9e4243bf4910fa7b1aa42a0b1ab001fc21add2d6
[ "BSD-3-Clause" ]
null
null
null
paraffin/matching/__init__.py
UKFELs/Paraffin
9e4243bf4910fa7b1aa42a0b1ab001fc21add2d6
[ "BSD-3-Clause" ]
1
2018-12-15T07:51:54.000Z
2018-12-17T11:44:49.000Z
paraffin/matching/__init__.py
UKFELs/Paraffin
9e4243bf4910fa7b1aa42a0b1ab001fc21add2d6
[ "BSD-3-Clause" ]
1
2018-10-04T12:06:25.000Z
2018-10-04T12:06:25.000Z
# Copyright (c) 2012-2018, University of Strathclyde # Authors: Lawrence T. Campbell # License: BSD-3-Clause from SUMatch import SU2Matched from getTwiss import getMatchTwiss from getTwiss import getFODOTwiss from getTwiss import getUndTwiss from getBeamTwiss import getTwiss as getBeamTwiss
29.3
52
0.829352
37
293
6.567568
0.675676
0.148148
0.222222
0
0
0
0
0
0
0
0
0.039216
0.129693
293
9
53
32.555556
0.913725
0.348123
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
fc622b52e8a04d29b050ceb65c5fb80e190a217d
305
py
Python
icekit/project/settings/_tox.py
ic-labs/django-icekit
c507ea5b1864303732c53ad7c5800571fca5fa94
[ "MIT" ]
52
2016-09-13T03:50:58.000Z
2022-02-23T16:25:08.000Z
icekit/project/settings/_tox.py
ic-labs/django-icekit
c507ea5b1864303732c53ad7c5800571fca5fa94
[ "MIT" ]
304
2016-08-11T14:17:30.000Z
2020-07-22T13:35:18.000Z
icekit/project/settings/_tox.py
ic-labs/django-icekit
c507ea5b1864303732c53ad7c5800571fca5fa94
[ "MIT" ]
12
2016-09-21T18:46:35.000Z
2021-02-15T19:37:50.000Z
from ._test import * # DJANGO ###################################################################### CACHES['default'].update({'BACKEND': 'redis_lock.django_cache.RedisCache'}) # CELERY ###################################################################### BROKER_URL = 'redis://%s/0' % REDIS_ADDRESS
30.5
79
0.377049
21
305
5.238095
0.857143
0
0
0
0
0
0
0
0
0
0
0.003521
0.068852
305
9
80
33.888889
0.383803
0.045902
0
0
0
0
0.408163
0.231293
0
0
0
0
0
1
0
false
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
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
fc6c20d1fe0a765f5338cee3c43ade820570930b
107
py
Python
backend/config.py
myuanz/sensor-service-platform
159fcebdb2fea9e256a7fd19dc8387e2879ad690
[ "Apache-2.0" ]
null
null
null
backend/config.py
myuanz/sensor-service-platform
159fcebdb2fea9e256a7fd19dc8387e2879ad690
[ "Apache-2.0" ]
null
null
null
backend/config.py
myuanz/sensor-service-platform
159fcebdb2fea9e256a7fd19dc8387e2879ad690
[ "Apache-2.0" ]
null
null
null
MONGO_URI = "mongodb://10.18.52.137:27018/sensor" #SERVER_NAME = "192.168.1.101" LASTED_PROTOCOLVERSION = 2
35.666667
49
0.747664
18
107
4.277778
1
0
0
0
0
0
0
0
0
0
0
0.252525
0.074766
107
3
50
35.666667
0.525253
0.271028
0
0
0
0
0.448718
0.448718
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
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
fc6f4ffaa838ba057b402b881df6b231f784fe3d
239
py
Python
service/wsgi.py
Fuinn/mos-backend
bbdd52cf669bb8360c94d9f64fb52aa32efa6520
[ "Apache-2.0" ]
2
2022-03-08T19:27:14.000Z
2022-03-08T22:41:59.000Z
service/wsgi.py
Fuinn/mos-backend
bbdd52cf669bb8360c94d9f64fb52aa32efa6520
[ "Apache-2.0" ]
null
null
null
service/wsgi.py
Fuinn/mos-backend
bbdd52cf669bb8360c94d9f64fb52aa32efa6520
[ "Apache-2.0" ]
null
null
null
import os from django.core.wsgi import get_wsgi_application from dotenv import load_dotenv, find_dotenv load_dotenv(find_dotenv()) os.environ.setdefault("DJANGO_SETTINGS_MODULE", "service.settings") application = get_wsgi_application()
23.9
67
0.832636
33
239
5.727273
0.484848
0.074074
0.190476
0.21164
0
0
0
0
0
0
0
0
0.083682
239
9
68
26.555556
0.863014
0
0
0
0
0
0.158996
0.09205
0
0
0
0
0
1
0
false
0
0.5
0
0.5
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
1
0
0
0
0
4
fc75863ebbe4bbc4a6d905f372fcd7767fe3b917
84,519
py
Python
tmp/petunjuk.py
ZarifTurkey/TheneonS2-Selfbot
f8b827b55d04aac1aa0df57206867d727614e0e9
[ "MIT" ]
3
2020-11-08T10:13:55.000Z
2020-11-13T12:19:54.000Z
tmp/petunjuk.py
ZarifTurkey/TheneonS2-Selfbot
f8b827b55d04aac1aa0df57206867d727614e0e9
[ "MIT" ]
null
null
null
tmp/petunjuk.py
ZarifTurkey/TheneonS2-Selfbot
f8b827b55d04aac1aa0df57206867d727614e0e9
[ "MIT" ]
2
2020-04-15T00:12:25.000Z
2020-04-15T00:12:53.000Z
import humanize,requests,traceback from random import randint from bs4 import BeautifulSoup def instagramku(msg,wait,tksop,ss): data = { "messages": [ { "type": "flex", "altText": "INSTAGRAM", "contents": { "type": "bubble", "header": { "type": "box", "layout": "horizontal", "contents": [ { "type": "text", "text": "{}".format(ss['full_name']), "weight": "bold", "color": "#262423", "size": "sm" } ] }, "hero": { "type": "image", "url": "{}".format(ss['profile_pic_url_hd']), "size": "full", "aspectRatio": "1:1", }, "body": { "type": "box", "layout": "vertical", "contents": [ { "type": "text", "text": "INSTAGRAM PROFILE", "weight": "bold", "size": "md", "margin": "md" }, { "type": "separator", "color": "#000000", }, { "type": "box", "layout": "vertical", "margin": "lg", "spacing": "sm", "contents": [ { "type": "box", "layout": "baseline", "spacing": "sm", "contents": [ { "type": "text", "text": "Nama", "color": "#aaaaaa", "size": "sm", "flex": 3 }, { "type": "text", "text": "{}".format(ss['full_name']), "color": "#262423", "size": "sm", "wrap": True, "flex": 5 } ] }, { "type": "box", "layout": "baseline", "spacing": "sm", "contents": [ { "type": "text", "text": "Username", "color": "#aaaaaa", "size": "sm", "flex": 3 }, { "type": "text", "text": "{}".format(tksop), "color": "#262423", "size": "sm", "wrap": True, "flex": 5 } ] }, { "type": "box", "layout": "baseline", "spacing": "sm", "contents": [ { "type": "text", "text": "Bio", "color": "#aaaaaa", "size": "sm", "flex": 3 }, { "type": "text", "text": "{}".format(ss['biography']), "color": "#262423", "wrap": True, "size": "sm", "flex": 5 } ] }, { "type": "box", "layout": "baseline", "spacing": "sm", "contents": [ { "type": "text", "text": "Private", "color": "#aaaaaa", "size": "sm", "flex": 3 }, { "type": "text", "text": "{}".format(ss['is_private']), "color": "#262423", "wrap": True, "size": "sm", "flex": 5 } ] }, { "type": "box", "layout": "baseline", "spacing": "sm", "contents": [ { "type": "text", "text": "Followers", "color": "#aaaaaa", "size": "sm", "flex": 3 }, { "type": "text", "text": "{}".format(humanize.intcomma(ss['edge_followed_by']['count'])), "color": "#262423", "wrap": True, "size": "sm", "flex": 5 } ] }, { "type": "box", "layout": "baseline", "spacing": "sm", "contents": [ { "type": "text", "text": "Following", "color": "#aaaaaa", "size": "sm", "flex": 3 }, { "type": "text", "text": "{}".format(humanize.intcomma(ss['edge_follow']['count'])), "color": "#262423", "wrap": True, "size": "sm", "flex": 5 } ] }, { "type": "box", "layout": "baseline", "spacing": "sm", "contents": [ { "type": "text", "text": "Post", "color": "#aaaaaa", "size": "sm", "flex": 3 }, { "type": "text", "text": "{}".format(humanize.intcomma(ss['edge_owner_to_timeline_media']['count'])), "color": "#262423", "wrap": True, "size": "sm", "flex": 5 } ] } ] } ] }, "footer": { "type": "box", "layout": "vertical", "contents": [{ "type": "box", "layout": "horizontal", "contents": [{ "type": "button", "flex": 2, "style": "primary", "color": "#FF2B00", "height": "sm", "action": { "type": "uri", "label": "POST", "uri": "{}instagram%20post%20{}".format(wait['ttt'],tksop) } }, { "flex": 3, "type": "button", "margin": "sm", "style": "primary", "color": "#097500", "height": "sm", "action": { "type": "uri", "label": "STORY", "uri": '{}instagram%20story%20{}'.format(wait['ttt'],tksop) } }] }, { "type": "button", "margin": "sm", "style": "primary", "color": "#0874DE", "height": "sm", "action": { "type": "uri", "label": "GO TO PAGE", "uri": 'https://www.instagram.com/{}'.format(tksop) } }] } } } ] } return data def gimagesa(a,ret_): for i in a: if '.gif' in i['img']: links = 'line://app/1602687308-GXq4Vvk9?type=image&img=' else: links = 'line://app/1602687308-GXq4Vvk9?type=image&img=' ret_.append({ "type": "bubble", "hero": { "type": "image", "url": i['img'], "size": "full", "aspectRatio": "1:1", "aspectMode": "fit", }, "footer": { "type": "box", "layout": "vertical", "spacing": "sm", "contents": [ { "type": "button", "style": "link", "height": "sm", "action": { "type": "uri", "label": "Send Image", "uri": "{}{}".format(links,i['img']) } }, ], }}) return ret_ def DramaEnak(drama,text,to,deff,wait): if drama in ['drama','fantasi','comedy','sol','romance','thriller','horror']: if drama == 'drama':drama = 0 if drama == 'fantasi':drama = 1 if drama == 'comedy':drama = 2 if drama == 'sol':drama = 3 if drama == 'romance':drama = 4 if drama == 'thriller':drama = 5 if drama == 'horror':drama = 6 data = deff ss = [] h = [] if len(text.split(' ')) == 6: try: if text.split(' ')[3].lower() != 'page':return b = requests.get(data[drama].find_all('a')[int(text.split(' ')[2])-1].get('href')) soup1 = BeautifulSoup(b.text,'html5lib') data2 = soup1.find_all(id='_listUl') data3 = data2[0].find_all('a') b = requests.get(data3[int(text.split(' ')[5])-1].get('href')) soup1 = BeautifulSoup(b.text,'html5lib') print(soup1) date = soup1.select('img._images') for b in range(0,len(date)): url = date[b]['data-url'] #print(url) ss.append({ "type": "bubble", "hero": { "type": "image", "url": url, "size": "full", "aspectRatio": "1:1", "aspectMode": "fit", }}) k = len(ss)//10 h = [] for aa in range(k+1): h.append({ "messages": [ { "type": "flex", "altText": "Webtoon", "contents": { "type": "carousel", "contents": ss[aa*10 : (aa+1)*10] } } ] }) return h except:e = traceback.format_exc();open('w','w').write(str(e)) if len(text.split(' ')) == 2: date = data[drama].find_all('img') datea = data[drama].find_all(class_='info') for b in range(0,len(date)): url = date[b]['src'] ss.append({ "type": "bubble", "hero": { "type": "image", "url": url, "size": "full", "aspectRatio": "1:1", "aspectMode": "fit", "action": { "type": "uri", "uri": "{}webtoon%20{}%201%20page%20{}".format(wait['ttt'],text.split(' ')[1],1) } }, "body": { "type": "box", "layout": "vertical", "contents": [ { "type": "box", "layout": "vertical", "margin": "lg", "spacing": "sm", "contents": [ { "type": "box", "layout": "baseline", "spacing": "sm", "contents": [ { "type": "text", "text": "Title", "color": "#aaaaaa", "size": "sm", "flex": 1 }, { "type": "text", "text": "{}".format(datea[b].find_all('p')[0].text), "color": "#262423", "wrap": True, "size": "sm", "flex": 4 }, ] }, { "type": "box", "layout": "baseline", "spacing": "sm", "contents": [ { "type": "text", "text": 'Author:', "color": "#aaaaaa", "size": "sm", "flex": 1 }, { "type": "text", "text": '{}'.format(datea[b].find_all('p')[1].text), "color": "#262423", "wrap": True, "size": "sm", "flex": 4 } ] }, { "type": "box", "layout": "baseline", "spacing": "sm", "contents": [ { "type": "text", "text": 'Likes:', "color": "#aaaaaa", "size": "sm", "flex": 1 }, { "type": "text", "text": '{}'.format(datea[b].find_all('p')[2].find_all('em')[0].text), "color": "#262423", "wrap": True, "size": "sm", "flex": 4 } ] } ] }, { "type": "separator", "color": "#000000", }, { "type": "box", "layout": "vertical", "margin": "lg", "spacing": "sm", "contents": [ { "type": "text", "text": 'Click The Image For Cek Episode', "color": "#262423", "wrap": True, "size": "md", "weight": "bold", } ] }, ] }}) k = len(ss)//10 h = [] for aa in range(k+1): h.append({ "messages": [ { "type": "flex", "altText": "Webtoon", "contents": { "type": "carousel", "contents": ss[aa*10 : (aa+1)*10] } } ] }) return h if len(text.split(' ')) == 5: if text.split(' ')[3].lower() != 'page':return b = requests.get(data[drama].find_all('a')[int(text.split(' ')[2])-1].get('href')+'&page='+str(int(text.split(' ')[4]))) soup1 = BeautifulSoup(b.text,'html5lib') data11 = soup1.find_all(class_='subj') data2 = soup1.find_all(id='_listUl') data3 = data2[0].find_all('a') data4 = data2[0].find_all('img') if len(data4) == 10:jumlah = 10 else:jumlah = len(data4) for c in range(0,jumlah): url = data4[c]['src'] ss.append({ "type": "bubble", "hero": { "type": "image", "url": url, "size": "full", "aspectRatio": "1:1", "aspectMode": "fit", }, "body": { "type": "box", "layout": "vertical", "contents": [ { "type": "box", "layout": "vertical", "margin": "lg", "spacing": "sm", "contents": [ { "type": "box", "layout": "baseline", "spacing": "sm", "contents": [ { "type": "text", "text": "Title", "color": "#aaaaaa", "size": "sm", "flex": 1 }, { "type": "text", "text": "{}".format(data11[c+1].text), "color": "#262423", "wrap": True, "size": "sm", "flex": 5 } ] } ] } ] }, "footer": { "type": "box", "layout": "horizontal", "contents": [ { "type": "button", "style": "link", "action": { "type": "uri", "label": "Go Page", "uri": data3[c].get('href') } }, { "type": "button", "style": "link", "action": { "type": "uri", "label": "Read Online", "uri": "{}webtoon%20{}%20{}%20page%20{}%201".format(wait['ttt'],text.split(' ')[1],text.split(' ')[2],c+1) } } ], }}) data = { "messages": [ { "type": "flex", "altText": "Webtoon", "contents": { "type": "carousel", "contents": ss } } ] } return [data] def Anloki(msg,kamui,chatingan): if msg.text.lower() == 'announ clear': a = kamui.getChatRoomAnnouncements(msg.to) try: for b in a: kamui.removeChatRoomAnnouncement(msg.to,b.announcementSeq) kamui.sendMessage(msg.to, 'Done') except Exception as e: ee = traceback.format_exc() kamui.sendMessage(msg.to, '{}'.format(e)) else: adit = chatingan adit.text = kamui.adityasplittext(msg.text,'ss') adit.link= 'line://nv/chatMsg?chatId={}&messageId={}'.format(msg.to,msg.id) adit.displayFields = 1 try: adit.thumbnail = "http://dl.profile.line-cdn.net/"+ kamui.getGroup(msg.to).pictureStatus except: adit.thumbnail = 'https://aditnugraha98.herokuapp.com/static/lang-logo.png' if msg.text.lower().startswith('announ create unlock '):kamui.createChatRoomAnnouncement(msg.to,0,adit) if msg.text.lower().startswith('announ create all '): a = kamui.getGroupIdsJoined() for i in a: try: aas = kamui.talk.getRecentMessagesV2(i, 1) adit.link = 'line://nv/chatMsg?chatId={}&messageId={}'.format(i,aas[0].id) G = kamui.getGroup(i).pictureStatus adit.thumbnail = "http://dl.profile.line-cdn.net/"+ G kamui.createChatRoomAnnouncement(i,0,adit) except: e = traceback.format_exc() open('w','w').write(str(e)) kamui.sendMessage(msg.to,' 「 Announcements 」\nStatus: Success Announcement') def Anlokiss(to,pesan,msg,chatingan): if pesan == 'announ clear': a = client.getChatRoomAnnouncements(to) try: for b in a: client.removeChatRoomAnnouncement(to,b.announcementSeq) client.sendMessage(msg.to, 'Done') except Exception as e: ee = traceback.format_exc() client.sendMessage(to, '{}'.format(e)) else: adit = chatingan adit.text = client.adityasplittext(pesan,'ss') adit.link= 'line://nv/chatMsg?chatId={}&messageId={}'.format(to,msg.id) adit.displayFields = 1 try: adit.thumbnail = "http://dl.profile.line-cdn.net/"+ kamui.getGroup(msg.to).pictureStatus except: adit.thumbnail = 'https://aditnugraha98.herokuapp.com/static/lang-logo.png' if pesan.startswith('announ create unlock '):kamui.createChatRoomAnnouncement(msg.to,0,adit) if pesan.startswith('announ create all '): a = client.getGroupIdsJoined() for i in a: try: aas = client.getRecentMessagesV2(i, 1) adit.link = 'line://nv/chatMsg?chatId={}&messageId={}'.format(i,aas[0].id) G = kamui.getGroup(i).pictureStatus adit.thumbnail = "http://dl.profile.line-cdn.net/"+ G client.createChatRoomAnnouncement(i,0,adit) except: e = traceback.format_exc() open('w','w').write(str(e)) client.sendMessage(msg.to,' 「 Announcements 」\nStatus: Success Announcement') def profilesku(a,b,c,d,e,link,wait,to): data = { "messages": [ { "type": "flex", "altText": "Me", "contents": { "type": "bubble", 'styles': { "header": { "backgroundColor": '#42f4b9' }, "body": { "backgroundColor": '#42f4b9' }, "footer": { "backgroundColor": '#42f4b9' }, }, "header": { "type": "box", "layout": "horizontal", "contents": [ { "type": "text", "text": "{}".format(a), "weight": "bold", "color": "#262423", "size": "sm" } ] }, "hero": { "type": "image", "url": "https://obs.line-scdn.net/{}".format(b), "size": "full", "aspectRatio": "1:1", "aspectMode": "fit", "action": { "type": "uri", "uri": "line://ti/p/~"+str(c) } }, "body": { "type": "box", "layout": "vertical", "contents": [ { "type": "text", "text": "PROFILE", "weight": "bold", "size": "md", "margin": "md" }, { "type": "separator", "color": "#000000", }, { "type": "box", "layout": "vertical", "margin": "lg", "spacing": "sm", "contents": [ { "type": "box", "layout": "baseline", "spacing": "sm", "contents": [ { "type": "text", "text": "Nama", "color": "#aaaaaa", "size": "sm", "flex": 1 }, { "type": "text", "text": "{}".format(a), "color": "#262423", "size": "sm", "wrap": True, "flex": 5 } ] }, { "type": "box", "layout": "baseline", "spacing": "sm", "contents": [ { "type": "text", "text": "Mid", "color": "#aaaaaa", "size": "sm", "flex": 1 }, { "type": "text", "text": "{}".format(d), "color": "#262423", "size": "sm", "flex": 5 } ] }, { "type": "box", "layout": "baseline", "spacing": "sm", "contents": [ { "type": "text", "text": "Bio", "color": "#aaaaaa", "size": "sm", "flex": 1 }, { "type": "text", "text": "{}".format(e), "color": "#262423", "wrap": True, "size": "sm", "flex": 5 } ] } ] } ] }, "footer": { "type": "box", "layout": "vertical", "spacing": "sm", "contents": [ { "type": "button", "style": "link", "height": "sm", "action": { "type": "uri", "label": "My Profile", "uri": link } }, { "type": "spacer", "size": "sm", } ], "flex": 0 } } } ] } return data def webtoonk(msg,wait): data = { "messages": [ { "type": "flex", "altText": "Me", "contents": { "type": "bubble", "hero": { "type": "image", "url": "https://webtoons-static.pstatic.net/image/pc/home/og_en.jpg?dt=2016110702", "size": "full", "aspectRatio": "1:1", "aspectMode": "fit", }, "body": { "type": "box", "layout": "vertical", "spacing": "md", "contents": [ { "type": "text", "text": "WEBTOON", "weight": "bold", "size": "md", "margin": "md" }, { "type": "separator", "color": "#000000", }, { "type": "box", "layout": "baseline", "margin": "md", "contents": [ { "type": "text", "text": " ", "flex": 1, "size": "md", "margin": "md" }, { "type": "text", "text": "| TYPE |", "weight": "bold", "size": "md", "margin": "md", "flex": 2, } ] }, { "type": "box", "layout": "baseline", "margin": "md", "contents": [ { "type": "text", "text": "1.DRAMA", "flex": 1, "size": "md", "margin": "md", "action": { "type": "uri", "uri": "{}webtoon%20drama".format(wait['ttt']) } }, { "type": "text", "text": "4.FANTASI", "size": "md", "margin": "md", "flex": 1, "action": { "type": "uri", "uri": "{}webtoon%20fantasi".format(wait['ttt']) } } ] }, { "type": "box", "layout": "baseline", "margin": "md", "contents": [ { "type": "text", "text": "2.COMEDY", "flex": 1, "size": "md", "margin": "md", "action": { "type": "uri", "uri": "{}webtoon%20comedy".format(wait['ttt']) } }, { "type": "text", "text": "5.ROMANCE", "size": "md", "margin": "md", "flex": 1, "action": { "type": "uri", "uri": "{}webtoon%20romance".format(wait['ttt']) } } ] }, { "type": "box", "layout": "baseline", "margin": "md", "contents": [ { "type": "text", "text": "3.THRILLER", "flex": 1, "size": "md", "margin": "md", "action": { "type": "uri", "uri": "{}webtoon%20thriller".format(wait['ttt']) } }, { "type": "text", "text": "6.HORROR", "size": "md", "margin": "md", "flex": 1, "action": { "type": "uri", "uri": "{}webtoon%20horror".format(wait['ttt']) } } ] }, { "type": "separator", "color": "#000000", }, { "type": "box", "layout": "baseline", "margin": "md", "contents": [ { "type": "text", "text": " ", "flex": 1, "size": "md", "margin": "md", }, { "type": "text", "text": "| COMMAND |", "size": "md", "margin": "md", "flex": 3, "weight": "bold" } ] }, { "type": "separator", "color": "#000000", }, { "type": "box", "layout": "baseline", "margin": "md", "contents": [ { "type": "text", "text": "rname webtoon [type]", "flex": 0, "size": "md", "margin": "md", }, ] }, { "type": "separator", "color": "#000000", }, { "type": "box", "layout": "baseline", "margin": "md", "contents": [ { "type": "text", "text": "IMPORTANT CLICK TYPE FOR FAST COMMAND", "flex": 0, "size": "md", "margin": "md", "weight": "bold", "wrap": True, }, ] }, ] }, } } ] } return data def helpers(to,wait): ab = wait['ttt'] ret_ = [] ret_.append( { "type": "bubble", "header": { "type": "box", "layout": "horizontal", "contents": [ { "type": "text", "text": "Commands", "weight": "bold", "color": "#666666", "size": "sm" } ] }, "body": { "type": "box", "layout": "vertical", "contents": [ { "type": "box", "layout": "vertical", "spacing": "sm", "contents": [ { "type": "box", "layout": "baseline", "spacing": "sm", "contents": [ { "type": "text", "text": "? khie:me", "color": "#666666", 'flex': 1, }, { "type": "text", "text": "? Khie:ytsearch ", "color": "#666666", 'flex': 1, } ] }, { "type": "box", "layout": "baseline", "spacing": "sm", "contents": [ { "type": "text", "text": "- Mention", "color": "#666666", 'flex': 1, }, { "type": "text", "text": "- Group", "color": "#666666", 'flex': 1, } ] }, { "type": "box", "layout": "baseline", "spacing": "sm", "contents": [ { "type": "text", "text": "- Broadcast", "color": "#666666", 'flex': 1, }, { "type": "text", "text": "- Friend", "color": "#666666", 'flex': 1, } ] }, { "type": "box", "layout": "baseline", "spacing": "sm", "contents": [ { "type": "text", "text": "- Lurk", "color": "#666666", 'flex': 1, }, { "type": "text", "text": "- Clone", "color": "#666666", 'flex': 1, } ] }, { "type": "box", "layout": "baseline", "spacing": "sm", "contents": [ { "type": "text", "text": "- Timeline", "color": "#666666", 'flex': 1, }, { "type": "text", "text": "- Profile", "color": "#666666", 'flex': 1, } ] }, ] } ] }, } ) ret_.append( { "type": "bubble", "header": { "type": "box", "layout": "horizontal", "contents": [ { "type": "text", "text": "Commands", "weight": "bold", "color": "#666666", "size": "sm" } ] }, "body": { "type": "box", "layout": "vertical", "contents": [ { "type": "box", "layout": "vertical", "spacing": "sm", "contents": [ { "type": "box", "layout": "baseline", "spacing": "sm", "contents": [ { "type": "text", "text": "- Steal", "color": "#666666", 'flex': 1, }, { "type": "text", "text": "- Autojoin", "color": "#666666", 'flex': 1, } ] }, { "type": "box", "layout": "baseline", "spacing": "sm", "contents": [ { "type": "text", "text": "- Autoadd", "color": "#666666", 'flex': 1, }, { "type": "text", "text": "- Gcall", "color": "#666666", 'flex': 1, } ] }, { "type": "box", "layout": "baseline", "spacing": "sm", "contents": [ { "type": "text", "text": "- Spam", "color": "#666666", 'flex': 1, }, { "type": "text", "text": "- Media", "color": "#666666", 'flex': 1, } ] }, { "type": "box", "layout": "baseline", "spacing": "sm", "contents": [ { "type": "text", "text": "- Note", "color": "#666666", 'flex': 1, }, { "type": "text", "text": "- Settings", "color": "#666666", 'flex': 1, } ] }, ] } ] }, } ) return ret_
67.941318
174
0.124197
2,308
84,519
4.528596
0.125217
0.050517
0.075775
0.072713
0.786739
0.759281
0.731152
0.677765
0.636338
0.608879
0
0.033161
0.805902
84,519
1,244
175
67.941318
0.603962
0.000118
0
0.591311
0
0.000805
0.091529
0.004639
0
0
0
0
0
1
0.006436
false
0
0.003218
0
0.01609
0.000805
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
1
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
5d793a87267b93322679c971109a739acf5f6249
2,397
py
Python
docker-images/taigav2/taiga-back/taiga/export_import/serializers/__init__.py
mattcongy/itshop
6be025a9eaa7fe7f495b5777d1f0e5a3184121c9
[ "MIT" ]
1
2017-05-29T19:01:06.000Z
2017-05-29T19:01:06.000Z
docker-images/taigav2/taiga-back/taiga/export_import/serializers/__init__.py
mattcongy/itshop
6be025a9eaa7fe7f495b5777d1f0e5a3184121c9
[ "MIT" ]
null
null
null
docker-images/taigav2/taiga-back/taiga/export_import/serializers/__init__.py
mattcongy/itshop
6be025a9eaa7fe7f495b5777d1f0e5a3184121c9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. from .serializers import PointsExportSerializer from .serializers import UserStoryStatusExportSerializer from .serializers import TaskStatusExportSerializer from .serializers import IssueStatusExportSerializer from .serializers import PriorityExportSerializer from .serializers import SeverityExportSerializer from .serializers import IssueTypeExportSerializer from .serializers import RoleExportSerializer from .serializers import UserStoryCustomAttributeExportSerializer from .serializers import TaskCustomAttributeExportSerializer from .serializers import IssueCustomAttributeExportSerializer from .serializers import BaseCustomAttributesValuesExportSerializer from .serializers import UserStoryCustomAttributesValuesExportSerializer from .serializers import TaskCustomAttributesValuesExportSerializer from .serializers import IssueCustomAttributesValuesExportSerializer from .serializers import MembershipExportSerializer from .serializers import RolePointsExportSerializer from .serializers import MilestoneExportSerializer from .serializers import TaskExportSerializer from .serializers import UserStoryExportSerializer from .serializers import IssueExportSerializer from .serializers import WikiPageExportSerializer from .serializers import WikiLinkExportSerializer from .serializers import TimelineExportSerializer from .serializers import ProjectExportSerializer from .mixins import AttachmentExportSerializer from .mixins import HistoryExportSerializer
52.108696
74
0.848978
255
2,397
7.980392
0.47451
0.184275
0.257985
0.035381
0.069779
0.04914
0.033415
0
0
0
0
0.015895
0.107635
2,397
45
75
53.266667
0.935484
0.374635
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
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
1
0
1
0
1
0
0
4
5d7f32d90dd67251595958925458c18fd26136a4
577
py
Python
sample1.py
mk314k/Pyssemble
3e3fa37a6b84a400dc4d367ba1e036cf855309c4
[ "MIT" ]
null
null
null
sample1.py
mk314k/Pyssemble
3e3fa37a6b84a400dc4d367ba1e036cf855309c4
[ "MIT" ]
null
null
null
sample1.py
mk314k/Pyssemble
3e3fa37a6b84a400dc4d367ba1e036cf855309c4
[ "MIT" ]
null
null
null
A=[0,0,0,0,0,0,0,0,0,0] Mem=[0,0,0,0,0,0,0,0,0,0,0] sp=208 def loadword(n): return Mem[int((n-200)/4)] def storeword(n, val): n=int((n-200)/4) Mem[n]=val pass def mul(): A[0] = A[0] * A[1] for i in range(1,len(A)): A[i]=-1 def factorial(): if (A[0]==0): A[0] =1 return A[1] = A[0]-1 while (A[1]!=0): #A[1] = A[2] -1 storeword(sp,A[1]) #storeword(sp+4,A[1]) mul() A[1]=loadword(sp) A[1] = A[1]-1 pass for i in range(5): A[0]=i factorial() print(A[0])
16.970588
30
0.436742
121
577
2.082645
0.231405
0.15873
0.202381
0.238095
0.083333
0.083333
0.083333
0.083333
0.083333
0.083333
0
0.149746
0.317158
577
34
31
16.970588
0.489848
0.058925
0
0.071429
0
0
0
0
0
0
0
0
0
1
0.142857
false
0.071429
0
0.035714
0.214286
0.035714
0
0
0
null
0
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
1
0
0
0
0
0
4
5d82319c39a4faddd3e950bf598d781a346e41d0
92
py
Python
src/gam_coins/apps.py
darakelian/gam-bot
1363c5f44bcc7e622e97e3d0d455eb185417fecb
[ "MIT" ]
null
null
null
src/gam_coins/apps.py
darakelian/gam-bot
1363c5f44bcc7e622e97e3d0d455eb185417fecb
[ "MIT" ]
7
2021-10-23T23:56:19.000Z
2021-11-26T16:58:41.000Z
src/gam_coins/apps.py
camerongraybill/gam-bot
447d24ad8c7b9a32c45aa6ed11733a54e26ab47f
[ "MIT" ]
null
null
null
from django.apps import AppConfig class GamCoinsConfig(AppConfig): name = "gam_coins"
15.333333
33
0.76087
11
92
6.272727
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.163043
92
5
34
18.4
0.896104
0
0
0
0
0
0.097826
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
5d8fe9057890c9547cf9722035f3857d08b0ec87
605
py
Python
02-FlaskWeb/app/main/errors.py
Deteriorator/ReadBooks
e997b9c876cc692206a46f139a6b1fb0ba3787ab
[ "Apache-2.0" ]
null
null
null
02-FlaskWeb/app/main/errors.py
Deteriorator/ReadBooks
e997b9c876cc692206a46f139a6b1fb0ba3787ab
[ "Apache-2.0" ]
null
null
null
02-FlaskWeb/app/main/errors.py
Deteriorator/ReadBooks
e997b9c876cc692206a46f139a6b1fb0ba3787ab
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ ------------------------------------------------- File Name: errors Description : Author : Liangz Date: 2018/11/8 ------------------------------------------------- Change Activity: 2018/11/8: ------------------------------------------------- """ __author__ = 'Liangz' from flask import render_template from . import main @main.app_errorhandler(404) def page_not_found(e): return render_template('404.html'), 404 @main.app_errorhandler(500) def internal_server_error(e): return render_template('500.html'), 500
22.407407
49
0.479339
58
605
4.775862
0.586207
0.151625
0.050542
0.151625
0
0
0
0
0
0
0
0.067073
0.186777
605
27
50
22.407407
0.495935
0.52562
0
0
0
0
0.078571
0
0
0
0
0
0
1
0.222222
false
0
0.222222
0.222222
0.666667
0
0
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
1
0
0
0
1
1
0
0
4
5d9733f40cc54210b40ea480ed45c03852659ff1
184
py
Python
scratchpad/features.py
tomis9/cookbook
fd61d6062d050d3aabb7bca5c7826b9ffe34c1cd
[ "MIT" ]
null
null
null
scratchpad/features.py
tomis9/cookbook
fd61d6062d050d3aabb7bca5c7826b9ffe34c1cd
[ "MIT" ]
2
2019-12-31T13:58:48.000Z
2020-02-08T00:26:07.000Z
scratchpad/features.py
tomis9/cookbook
fd61d6062d050d3aabb7bca5c7826b9ffe34c1cd
[ "MIT" ]
null
null
null
import featuretools import pandas as pd from sklearn.datasets import load_boston boston_raw = load_boston() boston = pd.DataFrame(boston_raw.data, columns=boston_raw.feature_names)
20.444444
72
0.826087
27
184
5.407407
0.592593
0.184932
0.219178
0
0
0
0
0
0
0
0
0
0.108696
184
8
73
23
0.890244
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.6
0
0.6
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
5ddbbcaa0af78e10823c5897c42de412003612c9
314
py
Python
federal_spending/usaspending/admin.py
rlugojr/federal_spending
e06f5a0018c1a0c581e8659472acb1574919dc50
[ "CC0-1.0" ]
20
2015-01-15T18:59:50.000Z
2022-01-31T03:37:53.000Z
federal_spending/usaspending/admin.py
rlugojr/federal_spending
e06f5a0018c1a0c581e8659472acb1574919dc50
[ "CC0-1.0" ]
null
null
null
federal_spending/usaspending/admin.py
rlugojr/federal_spending
e06f5a0018c1a0c581e8659472acb1574919dc50
[ "CC0-1.0" ]
7
2015-01-16T15:47:06.000Z
2020-01-09T07:14:45.000Z
from django.contrib import admin from federal_spending.usaspending.models import Contract #from dcdata.grants.models import Grant class ContractAdmin(admin.ModelAdmin): pass admin.site.register(Contract, ContractAdmin) #class GrantAdmin(admin.ModelAdmin): # pass #admin.site.register(Grant, GrantAdmin)
22.428571
56
0.805732
38
314
6.631579
0.526316
0.095238
0.150794
0.190476
0.285714
0.285714
0
0
0
0
0
0
0.10828
314
14
57
22.428571
0.9
0.375796
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.2
0.4
0
0.6
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
5ddf1416d93fd6d3bfc33dd7a56081dd6ab1623f
234
py
Python
filter_plugins/to_toml.py
Aisbergg/ansible-role-dnscrypt-proxy
2612495c473d99b3e5010ca3e0ba96cf223ef4ce
[ "MIT" ]
1
2020-05-20T01:27:18.000Z
2020-05-20T01:27:18.000Z
filter_plugins/to_toml.py
aisbergg/ansible-role-dnscrypt-proxy
2612495c473d99b3e5010ca3e0ba96cf223ef4ce
[ "MIT" ]
null
null
null
filter_plugins/to_toml.py
aisbergg/ansible-role-dnscrypt-proxy
2612495c473d99b3e5010ca3e0ba96cf223ef4ce
[ "MIT" ]
null
null
null
import toml class FilterModule(object): def filters(self): return { "to_toml": self.to_toml, } def to_toml(self, value): """Convert the value to TOML""" return toml.dumps(value)
16.714286
39
0.559829
28
234
4.571429
0.5
0.1875
0.15625
0
0
0
0
0
0
0
0
0
0.32906
234
13
40
18
0.815287
0.106838
0
0
0
0
0.034483
0
0
0
0
0
0
1
0.25
false
0
0.125
0.125
0.75
0
1
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
0
0
1
1
0
0
4
5deaf4041c54364acbd33794af2f47014579b883
263
py
Python
EstruturaDeDecisao/exercicio02.py
Nicolas-Wursthorn/exercicios-python-brasil
b2b564d48b519be04643636033ec0815e6d99ea1
[ "MIT" ]
null
null
null
EstruturaDeDecisao/exercicio02.py
Nicolas-Wursthorn/exercicios-python-brasil
b2b564d48b519be04643636033ec0815e6d99ea1
[ "MIT" ]
null
null
null
EstruturaDeDecisao/exercicio02.py
Nicolas-Wursthorn/exercicios-python-brasil
b2b564d48b519be04643636033ec0815e6d99ea1
[ "MIT" ]
null
null
null
# Faça um Programa que peça um valor e mostre na tela se o valor é positivo ou negativo. valor = float(input("Digite um valor: ")) if valor == 0: print("Esse valor é nulo!") elif valor > 0: print("Esse valor é positivo!") else: print("Esse valor é negativo!")
29.222222
88
0.695817
46
263
3.978261
0.565217
0.131148
0.229508
0.245902
0.229508
0.229508
0
0
0
0
0
0.009346
0.186312
263
9
89
29.222222
0.845794
0.326996
0
0
0
0
0.448864
0
0
0
0
0
0
1
0
false
0
0
0
0
0.428571
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
0
1
0
4
b9076fca6e7ee044250c8423522c10c59ea1d8fc
313
py
Python
roiextractors/__init__.py
catalystneuro/segmentationextractors
d2e8db35ca85956a9cf4712cacecd9e6ec680e91
[ "BSD-3-Clause" ]
2
2020-04-17T17:52:29.000Z
2020-06-25T20:26:46.000Z
roiextractors/__init__.py
catalystneuro/segmentationextractors
d2e8db35ca85956a9cf4712cacecd9e6ec680e91
[ "BSD-3-Clause" ]
7
2020-07-21T20:29:50.000Z
2020-08-14T15:09:08.000Z
roiextractors/__init__.py
catalystneuro/segmentationextractors
d2e8db35ca85956a9cf4712cacecd9e6ec680e91
[ "BSD-3-Clause" ]
null
null
null
from .example_datasets import toy_example from .extraction_tools import show_video from .extractorlist import * from .imagingextractor import ImagingExtractor from .memmapextractors import MemmapImagingExtractor from .segmentationextractor import SegmentationExtractor from .version import version as __version__
39.125
56
0.878594
33
313
8.090909
0.484848
0
0
0
0
0
0
0
0
0
0
0
0.095847
313
7
57
44.714286
0.943463
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
f8ef6ff816818abad640ca1f8955af47813e76b6
185
py
Python
code/eatfirst_osfs.py
tnbinh/efs
02a86acab33705b0dac4dd7c5b4b787e1d8b3be6
[ "MIT" ]
1
2020-11-29T15:15:13.000Z
2020-11-29T15:15:13.000Z
code/eatfirst_osfs.py
tnbinh/efs
02a86acab33705b0dac4dd7c5b4b787e1d8b3be6
[ "MIT" ]
4
2017-10-16T09:07:01.000Z
2020-09-28T05:23:10.000Z
src/efs/eatfirst_osfs.py
eatfirst/python-efs
b8836a375051042948ca21cbe6e8e70aae7f7c70
[ "MIT" ]
1
2020-09-21T00:17:07.000Z
2020-09-21T00:17:07.000Z
from autorepr import autorepr from fs.osfs import OSFS class EatFirstOSFS(OSFS): """Simple wrapper to have a better repr.""" __repr__ = autorepr(['root_path', 'dir_mode:o'])
20.555556
52
0.708108
26
185
4.807692
0.730769
0
0
0
0
0
0
0
0
0
0
0
0.172973
185
8
53
23.125
0.816993
0.2
0
0
0
0
0.133803
0
0
0
0
0
0
1
0
false
0
0.5
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
f8f91e58f57a232a9fed9826d40a2dcc9b15c88d
105
py
Python
lang/Python/binary-digits-2.py
ethansaxenian/RosettaDecode
8ea1a42a5f792280b50193ad47545d14ee371fb7
[ "MIT" ]
null
null
null
lang/Python/binary-digits-2.py
ethansaxenian/RosettaDecode
8ea1a42a5f792280b50193ad47545d14ee371fb7
[ "MIT" ]
null
null
null
lang/Python/binary-digits-2.py
ethansaxenian/RosettaDecode
8ea1a42a5f792280b50193ad47545d14ee371fb7
[ "MIT" ]
null
null
null
for i in range(16): print(bin(i)[2:]) 0 1 10 11 100 101 110 111 1000 1001 1010 1011 1100 1101 1110 1111
5.526316
37
0.695238
25
105
2.92
0.96
0
0
0
0
0
0
0
0
0
0
0.638554
0.209524
105
18
38
5.833333
0.240964
0
0
0
0
0
0
0
0
1
0
0
0
1
0
false
0
0
0
0
0.058824
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
4
5d07aed4b84e65440e979e22df1e3cb4475e2c03
262
py
Python
alsi/__init__.py
mragungsetiaji/alsi
c33f0e1ca1ee148ff3c95474dd4c36166ece583a
[ "MIT" ]
1
2021-01-18T17:31:25.000Z
2021-01-18T17:31:25.000Z
alsi/__init__.py
mragungsetiaji/alsi
c33f0e1ca1ee148ff3c95474dd4c36166ece583a
[ "MIT" ]
null
null
null
alsi/__init__.py
mragungsetiaji/alsi
c33f0e1ca1ee148ff3c95474dd4c36166ece583a
[ "MIT" ]
null
null
null
from .als import alternating_least_squares from . import als from . import approximate_als from . import bpr from . import nearest_neighbours __version__ = '1.0' __all__ = [alternating_least_squares, als, approximate_als, bpr, nearest_neighbours, __version__]
26.2
97
0.80916
34
262
5.647059
0.411765
0.208333
0.239583
0
0
0
0
0
0
0
0
0.008734
0.125954
262
10
97
26.2
0.829694
0
0
0
0
0
0.011407
0
0
0
0
0
0
1
0
false
0
0.714286
0
0.714286
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
0
1
0
1
0
0
4
5d1421e0dbc9327172fc561bc920ca11d0b277df
7,479
py
Python
tests/test_0043-iterate-function.py
nikoladze/uproot4
57fafcfd73c40aea21dd19a439c76c79fd370768
[ "BSD-3-Clause" ]
null
null
null
tests/test_0043-iterate-function.py
nikoladze/uproot4
57fafcfd73c40aea21dd19a439c76c79fd370768
[ "BSD-3-Clause" ]
null
null
null
tests/test_0043-iterate-function.py
nikoladze/uproot4
57fafcfd73c40aea21dd19a439c76c79fd370768
[ "BSD-3-Clause" ]
null
null
null
# BSD 3-Clause License; see https://github.com/scikit-hep/uproot4/blob/master/LICENSE from __future__ import absolute_import import numpy import pytest import skhep_testdata import uproot4 def test_num_entries_for(): with uproot4.open(skhep_testdata.data_path("uproot-HZZ.root"))["events"] as events: assert events.num_entries_for("1 kB") == 12 assert events.num_entries_for("10 kB") == 116 assert events.num_entries_for("0.1 MB") == 1157 assert events.num_entries == 2421 def test_num_entries_for_2(): with uproot4.open(skhep_testdata.data_path("uproot-Zmumu.root"))[ "events" ] as events: assert events.num_entries_for("1 kB") == 13 assert events.num_entries_for("10 kB") == 133 assert events.num_entries_for("0.1 MB") == 1333 assert events.num_entries == 2304 def test_iterate_1(): with uproot4.open(skhep_testdata.data_path("uproot-Zmumu.root"))[ "events" ] as events: for i, arrays in enumerate(events.iterate(step_size="0.1 MB", library="np")): if i == 0: assert len(arrays["px1"]) == 1333 elif i == 1: assert len(arrays["px1"]) == 971 else: assert False def test_iterate_2(): with uproot4.open(skhep_testdata.data_path("uproot-Zmumu.root"))[ "events" ] as events: for i, arrays in enumerate(events.iterate("px1", step_size=1000, library="np")): if i == 0: assert len(arrays["px1"]) == 1000 assert arrays["px1"][:5].tolist() == [ -41.1952876442, 35.1180497674, 35.1180497674, 34.1444372454, 22.7835819537, ] elif i == 1: assert len(arrays["px1"]) == 1000 assert arrays["px1"][:5].tolist() == [ 26.043758785, 26.043758785, 25.9962042016, -44.4626620943, 28.2794901505, ] elif i == 2: assert len(arrays["px1"]) == 304 assert arrays["px1"][:5].tolist() == [ -43.3783782352, -43.3783782352, -43.2444221651, -20.2126675303, 43.7131175076, ] else: assert False def test_iterate_pandas_1(): pandas = pytest.importorskip("pandas") with uproot4.open(skhep_testdata.data_path("uproot-Zmumu.root"))[ "events" ] as events: for i, arrays in enumerate(events.iterate("px1", step_size=1000, library="pd")): if i == 0: assert arrays["px1"].index.values[0] == 0 assert arrays["px1"].index.values[-1] == 999 elif i == 1: assert arrays["px1"].index.values[0] == 1000 assert arrays["px1"].index.values[-1] == 1999 elif i == 2: assert arrays["px1"].index.values[0] == 2000 assert arrays["px1"].index.values[-1] == 2303 else: assert False def test_iterate_pandas_2(): pandas = pytest.importorskip("pandas") with uproot4.open(skhep_testdata.data_path("uproot-HZZ.root"))["events"] as events: for i, arrays in enumerate( events.iterate("Muon_Px", step_size=1000, library="pd") ): if i == 0: assert arrays.index.values[0] == (0, 0) assert arrays.index.values[-1] == (999, 0) elif i == 1: assert arrays.index.values[0] == (1000, 0) assert arrays.index.values[-1] == (1999, 1) elif i == 2: assert arrays.index.values[0] == (2000, 0) assert arrays.index.values[-1] == (2420, 0) else: assert False def test_iterate_report_1(): with uproot4.open(skhep_testdata.data_path("uproot-Zmumu.root"))[ "events" ] as events: for i, (arrays, report) in enumerate( events.iterate("px1", step_size=1000, report=True, library="np") ): if i == 0: assert report.tree_entry_start == 0 assert report.tree_entry_stop == 1000 assert report.file_path == skhep_testdata.data_path("uproot-Zmumu.root") elif i == 1: assert report.tree_entry_start == 1000 assert report.tree_entry_stop == 2000 assert report.file_path == skhep_testdata.data_path("uproot-Zmumu.root") elif i == 2: assert report.tree_entry_start == 2000 assert report.tree_entry_stop == 2304 assert report.file_path == skhep_testdata.data_path("uproot-Zmumu.root") else: assert False def test_iterate_report_2(): with uproot4.open(skhep_testdata.data_path("uproot-HZZ.root"))["events"] as events: for i, (arrays, report) in enumerate( events.iterate("Muon_Px", step_size=1000, report=True, library="np") ): if i == 0: assert report.tree_entry_start == 0 assert report.tree_entry_stop == 1000 assert report.file_path == skhep_testdata.data_path("uproot-HZZ.root") elif i == 1: assert report.tree_entry_start == 1000 assert report.tree_entry_stop == 2000 assert report.file_path == skhep_testdata.data_path("uproot-HZZ.root") elif i == 2: assert report.tree_entry_start == 2000 assert report.tree_entry_stop == 2421 assert report.file_path == skhep_testdata.data_path("uproot-HZZ.root") else: assert False def test_function_iterate(): files = skhep_testdata.data_path("uproot-sample-6.20.04-uncompressed.root").replace( "6.20.04", "*" ) expect = 0 for arrays, report in uproot4.iterate( {files: "sample"}, "i8", report=True, library="np" ): assert arrays["i8"][:5].tolist() == [-15, -14, -13, -12, -11] assert report.global_entry_start == expect assert report.global_entry_stop == expect + len(arrays["i8"]) expect += len(arrays["i8"]) def test_function_iterate_pandas(): pandas = pytest.importorskip("pandas") files = skhep_testdata.data_path("uproot-sample-6.20.04-uncompressed.root").replace( "6.20.04", "*" ) expect = 0 for arrays, report in uproot4.iterate( {files: "sample"}, "i8", report=True, library="pd" ): assert arrays["i8"].values[:5].tolist() == [-15, -14, -13, -12, -11] assert arrays.index.values[0] == expect assert report.global_entry_start == expect assert report.global_entry_stop == expect + len(arrays["i8"]) expect += len(arrays["i8"]) def test_function_iterate_pandas_2(): pandas = pytest.importorskip("pandas") files = skhep_testdata.data_path("uproot-HZZ.root").replace( "HZZ", "HZZ-{uncompressed,zlib,lz4}" ) expect = 0 for arrays, report in uproot4.iterate( {files: "events"}, "Muon_Px", report=True, library="pd" ): assert arrays["Muon_Px"].index.values[0] == (expect, 0) expect += report.tree.num_entries
37.024752
88
0.550876
881
7,479
4.523269
0.144154
0.066248
0.072522
0.089586
0.838143
0.795483
0.71468
0.655207
0.629862
0.606524
0
0.092338
0.319428
7,479
201
89
37.208955
0.69057
0.011098
0
0.582857
0
0
0.081688
0.014201
0
0
0
0
0.342857
1
0.062857
false
0
0.051429
0
0.114286
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
5d2feeaa2fdf6db5d97330d194712de1a91f5b8b
179
py
Python
tests/test_training.py
anlas17/mlops_day1
15780c90de5d67bcb3ef83f56f4dee2de3c723b2
[ "BSD-3-Clause" ]
null
null
null
tests/test_training.py
anlas17/mlops_day1
15780c90de5d67bcb3ef83f56f4dee2de3c723b2
[ "BSD-3-Clause" ]
null
null
null
tests/test_training.py
anlas17/mlops_day1
15780c90de5d67bcb3ef83f56f4dee2de3c723b2
[ "BSD-3-Clause" ]
null
null
null
import torch import sys import hydra sys.path.append("C:/Users/zebra/.cookiecutters/mlops_day1/src/models") from train_model import train if __name__ == "__main__": train()
17.9
70
0.759777
26
179
4.846154
0.769231
0
0
0
0
0
0
0
0
0
0
0.006369
0.122905
179
9
71
19.888889
0.796178
0
0
0
0
0
0.329609
0.284916
0
0
0
0
0
1
0
true
0
0.571429
0
0.571429
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
5d5487fb14fc6e593e0b72d1eb925f783ef36c84
23
py
Python
library/dothat/__init__.py
axelsimon/displayotron
42315c47eb50d2f95d1fcade389ff57ad73e1b83
[ "MIT" ]
49
2017-06-07T05:09:23.000Z
2021-10-08T14:32:05.000Z
library/dothat/__init__.py
axelsimon/displayotron
42315c47eb50d2f95d1fcade389ff57ad73e1b83
[ "MIT" ]
19
2017-08-07T21:17:00.000Z
2022-01-07T09:02:42.000Z
library/dothat/__init__.py
axelsimon/displayotron
42315c47eb50d2f95d1fcade389ff57ad73e1b83
[ "MIT" ]
22
2017-06-07T05:09:25.000Z
2021-08-17T10:52:58.000Z
__version__ = '2.0.2'
7.666667
21
0.608696
4
23
2.5
0.75
0
0
0
0
0
0
0
0
0
0
0.157895
0.173913
23
2
22
11.5
0.368421
0
0
0
0
0
0.227273
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
5d65a001b8580b59dc27f53c1908e3c567841933
173
py
Python
timeclock/webapp/config.py
mikejarrett/company-time-clock
17a652719ef25a9b058551b1f4d3f05cddadc04a
[ "MIT" ]
null
null
null
timeclock/webapp/config.py
mikejarrett/company-time-clock
17a652719ef25a9b058551b1f4d3f05cddadc04a
[ "MIT" ]
null
null
null
timeclock/webapp/config.py
mikejarrett/company-time-clock
17a652719ef25a9b058551b1f4d3f05cddadc04a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from datetime import datetime from logic.utils import hash_password WTF_CSRF_ENABLED = True SECRET_KEY = hash_password(datetime.now().isoformat())
21.625
54
0.763006
24
173
5.291667
0.75
0.188976
0
0
0
0
0
0
0
0
0
0.006579
0.121387
173
7
55
24.714286
0.828947
0.121387
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0.5
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
0
1
1
0
0
0
0
4
538ac9810b099db2d347e2e272634df57f094ab4
80
py
Python
Chapter04/open_web.py
add54/ADMIN_SYS_PYTHON
5a6d9705537c8663c8f7b0f45d29ccc87b6096e7
[ "MIT" ]
116
2018-12-21T01:05:47.000Z
2022-03-23T21:41:41.000Z
Chapter04/open_web.py
add54/ADMIN_SYS_PYTHON
5a6d9705537c8663c8f7b0f45d29ccc87b6096e7
[ "MIT" ]
2
2021-03-31T19:36:19.000Z
2021-06-10T22:29:26.000Z
Chapter04/open_web.py
add54/ADMIN_SYS_PYTHON
5a6d9705537c8663c8f7b0f45d29ccc87b6096e7
[ "MIT" ]
147
2018-12-19T14:10:32.000Z
2022-03-20T11:03:20.000Z
import webbrowser webbrowser.open('https://timesofindia.indiatimes.com/world')
20
60
0.8125
9
80
7.222222
0.888889
0
0
0
0
0
0
0
0
0
0
0
0.05
80
3
61
26.666667
0.855263
0
0
0
0
0
0.518987
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
53a374a1b82942608f2e9e7f061c8d65bde80ec7
204
py
Python
main/CompuCellPythonTutorial/info_printer/Simulation/cellsort_2D_info_printer.py
JulianoGianlupi/nh-cc3d-4x-base-tool
c0f4aceebd4c5bf3ec39e831ef851e419b161259
[ "CC0-1.0" ]
null
null
null
main/CompuCellPythonTutorial/info_printer/Simulation/cellsort_2D_info_printer.py
JulianoGianlupi/nh-cc3d-4x-base-tool
c0f4aceebd4c5bf3ec39e831ef851e419b161259
[ "CC0-1.0" ]
null
null
null
main/CompuCellPythonTutorial/info_printer/Simulation/cellsort_2D_info_printer.py
JulianoGianlupi/nh-cc3d-4x-base-tool
c0f4aceebd4c5bf3ec39e831ef851e419b161259
[ "CC0-1.0" ]
1
2021-02-26T21:50:29.000Z
2021-02-26T21:50:29.000Z
from cc3d import CompuCellSetup from .cellsort_2D_steppables_info_printer import InfoPrinterSteppable CompuCellSetup.register_steppable(steppable=InfoPrinterSteppable(frequency=1)) CompuCellSetup.run()
29.142857
78
0.887255
21
204
8.380952
0.714286
0
0
0
0
0
0
0
0
0
0
0.015625
0.058824
204
6
79
34
0.901042
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0.25
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
53b531fc40417efd593b300a0a602f5da4527989
90
py
Python
_ipn/__init__.py
Memberships-Affiliate-Management-API/membership_and_affiliate_api
038cb2d4dfa4a47fb8e31dc9d00cd36dd28867d5
[ "MIT" ]
1
2021-08-31T15:24:48.000Z
2021-08-31T15:24:48.000Z
_ipn/__init__.py
freelancing-solutions/membership_and_affiliate_api
038cb2d4dfa4a47fb8e31dc9d00cd36dd28867d5
[ "MIT" ]
1
2021-10-13T14:11:15.000Z
2021-10-13T14:11:15.000Z
_ipn/__init__.py
Memberships-Affiliate-Management-API/membership_and_affiliate_api
038cb2d4dfa4a47fb8e31dc9d00cd36dd28867d5
[ "MIT" ]
1
2021-08-31T15:25:28.000Z
2021-08-31T15:25:28.000Z
""" enables external api's to send data to this app through well defined endpoints """
30
82
0.722222
14
90
4.642857
0.928571
0
0
0
0
0
0
0
0
0
0
0
0.2
90
3
83
30
0.902778
0.866667
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
53b918ada18b441895cfe1a93974b4fddda1b353
824
py
Python
boxuegu/boxuegu/apps/organization/views.py
1111111111122222222223333333333/Django_boxuegu
cec4451bcc55f04013efd4e4cb7c4098a0fd5056
[ "MIT" ]
null
null
null
boxuegu/boxuegu/apps/organization/views.py
1111111111122222222223333333333/Django_boxuegu
cec4451bcc55f04013efd4e4cb7c4098a0fd5056
[ "MIT" ]
6
2021-02-08T20:30:13.000Z
2022-03-11T23:50:00.000Z
boxuegu/boxuegu/apps/organization/views.py
1111111111122222222223333333333/Django_boxuegu
cec4451bcc55f04013efd4e4cb7c4098a0fd5056
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.views import View class OrgList(View): def get(self, request): return render(request, 'org-list.html') # 获取教师列表 class TeacherList(View): def get(self, request): return render(request, 'teachers-list.html') class TeacherDetail(View): def get(self, request): return render(request, 'teacher-detail.html') class AddAsk(View): def get(self, request): return render(request, 'org-detail-desc.html') class OrgHome(View): def get(self, request): return render(request, 'org-detail-homepage.html') class OrgDesc(View): def get(self, request): return render(request, 'org-detail-desc.html') class OrgCourse(View): def get(self, request): return render(request, 'org-detail-course.html')
21.128205
58
0.673544
106
824
5.235849
0.283019
0.088288
0.126126
0.176577
0.621622
0.621622
0.621622
0.621622
0.477477
0.4
0
0
0.199029
824
38
59
21.684211
0.840909
0.007282
0
0.391304
0
0
0.166667
0.056373
0
0
0
0
0
1
0.304348
false
0
0.086957
0.304348
1
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
53ede06ef30cf477a4f1f227c14da425a5ef2754
126
py
Python
__init__.py
LaggAt/actions
6f52dbbce09e445d77d7f5b01830ef3c0adeb6e0
[ "MIT" ]
null
null
null
__init__.py
LaggAt/actions
6f52dbbce09e445d77d7f5b01830ef3c0adeb6e0
[ "MIT" ]
null
null
null
__init__.py
LaggAt/actions
6f52dbbce09e445d77d7f5b01830ef3c0adeb6e0
[ "MIT" ]
null
null
null
# Copyright (c) 2021 Florian Lagg # # This software is released under the MIT License. # https://opensource.org/licenses/MIT
25.2
50
0.746032
18
126
5.222222
0.944444
0
0
0
0
0
0
0
0
0
0
0.037383
0.150794
126
4
51
31.5
0.841122
0.928571
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
99027d89a771fe9ff6f0ef4fcc368aaf71b21ddf
83
py
Python
MachineLearningToolkitCore/Layer/__init__.py
showintime/MachineLearningToolkit
cb265f8b0d3ca5aa16ad92cdbe74e138b5f56023
[ "Apache-2.0" ]
null
null
null
MachineLearningToolkitCore/Layer/__init__.py
showintime/MachineLearningToolkit
cb265f8b0d3ca5aa16ad92cdbe74e138b5f56023
[ "Apache-2.0" ]
null
null
null
MachineLearningToolkitCore/Layer/__init__.py
showintime/MachineLearningToolkit
cb265f8b0d3ca5aa16ad92cdbe74e138b5f56023
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Dec 2 22:43:10 2019 @author: ZWH """
10.375
35
0.542169
14
83
3.214286
1
0
0
0
0
0
0
0
0
0
0
0.1875
0.228916
83
7
36
11.857143
0.515625
0.86747
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
54e262d657a07ce0ad2b1a920f529308ae998a25
3,599
py
Python
DailyProgrammer/DP20141211C.py
DayGitH/Python-Challenges
bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf
[ "MIT" ]
2
2020-12-23T18:59:22.000Z
2021-04-14T13:16:09.000Z
DailyProgrammer/DP20141211C.py
DayGitH/Python-Challenges
bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf
[ "MIT" ]
null
null
null
DailyProgrammer/DP20141211C.py
DayGitH/Python-Challenges
bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf
[ "MIT" ]
null
null
null
""" [2014-12-5] Challenge #191 [Hard] Tricky Stick Stacking https://www.reddit.com/r/dailyprogrammer/comments/2oe0px/2014125_challenge_191_hard_tricky_stick_stacking/ # [](#HardIcon) **(Hard)**: Tricky Stick Stacking Similar to the previous [hard challenge with the arrows](/r/dailyprogrammer/comments/2m82yz/), this challenge will similarly require a hard degree of thought to solve (providing, of course, you develop the algorithm yourself,) while being relatively easy to understand. Imagine you have a 2D plane, into which you can place sticks, [like so](http://i.imgur.com/mkt7n2D.png). All of the sticks are perfectly straight, and placed into this plane from the top (positive Y) down. The sticks will never overlap or cross over one another. Your task today is to simply determine in which order the sticks must be pulled out of the plane without hitting any other sticks. There are a few rules for this: * A stick is [pulled out of the plane *directly upward (ie. along the positive Y axis)*](http://i.imgur.com/8eFNtwh.png), [like so](http://i.imgur.com/MpquP7S.png). This means that you can't pull a stick out [sideward or at an angle](http://i.imgur.com/zGQL5xV.png) (for example, to avoid another stick.) * A stick cannot be pulled out if there's [another stick directly above it](http://i.imgur.com/RWtPm05.png). In some possible possible scenarios, there is only one possible order to pull the sticks out of the plane. [This scenario](http://i.imgur.com/16WBjSf.png) only has one possible order: 1, 2, 4, 3. [This scenario](http://i.imgur.com/gSkKVIg.png) however has two possible orders, as the last two remaining sticks are not interfering with one another's removal, so you can remove them in any order. # Formal Inputs and Outputs ## Input Description Each stick is described by a number and the co-ordinates of its 2 ends, like so: n:x1,y1,x2,y2 Where the stick number **n** is between the points (x1, y1) and (x2, y2). You will first input a number **S** which is the number of sticks in the scenario. You will then take a further **S** lines of input in the above format. **n** must be an integer but the co-ordinates can be any real number. ## Output Description You are to output one possible order of removal of the sticks (where each stick is identified by its number **n**. There may be more than one. # Sample Inputs and Outputs ## Sample Input [(Represents this scenario)](http://i.imgur.com/nDpDJag.png) 4 1:0,3,4,5 2:2,3,8,1 3:4,0,5,1 4:1,3,4.2,1 ## Sample Output 1, 2, 4, 3 ## Sample Input [(Represents this scenario)](http://i.imgur.com/gSkKVIg.png) 5 1:3,3,8,1 2:11,2,15,2 3:6,3,12,4 4:10,5,10,10 5:9,11,18,12 ## Sample Output This scenario has 2 possible outputs: 5, 4, 3, 1, 2 or: 5, 4, 3, 2, 1 ## Sample Input [(Represents this scenario)](http://i.imgur.com/l8X9Tgg.png) 6 1:1,6,12,6 2:1,7,1,15 3:11,1,13,10 4:14,10,15,6 5:15,2,15,5 6:12,1,14,11 ## Sample Output 2, 1, 3, 6, 4, 5 ## Sample Input 5 1:2,2,2,8 2:1,1,11,2 3:10,1,15,3 4:5,5,13,8 5:6,4,9,3 ## Sample Output (all 3 are valid) 1, 4, 5, 2, 3 4, 1, 5, 2, 3 4, 5, 1, 2, 3 ## Sample Input 6 1:6,2,14,7 2:12,10,15,9 3:12,3,12,6 4:3,1,17,2 5:4,3,11,2 6:3,10,12,12 ## Sample Output (both are valid) 6, 2, 1, 3, 5, 4 6, 2, 1, 5, 3, 4 ## Sample Input 5 1:2,1,15,15 2:15,5,15,12 3:10,8,13,2 4:13,4,15,4 5:8,9,12,13 ## Sample Output 5, 1, 2, 4, 3 """ def main(): pass if __name__ == "__main__": main()
32.718182
119
0.672409
700
3,599
3.437143
0.291429
0.020781
0.041563
0.054032
0.15877
0.131338
0.07606
0.07606
0.057357
0
0
0.109028
0.199778
3,599
109
120
33.018349
0.726389
0.979994
0
0
0
0
0.125
0
0
0
0
0
0
1
0.25
true
0.25
0
0
0.25
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
1
1
1
0
0
0
0
0
4
07016e0f66f80580d26a2c77091faf3434b49180
770
py
Python
packages/mccomponents/python/mccomponents/sample/SQE_fromexpression.py
mcvine/mcvine
42232534b0c6af729628009bed165cd7d833789d
[ "BSD-3-Clause" ]
5
2017-01-16T03:59:47.000Z
2020-06-23T02:54:19.000Z
packages/mccomponents/python/mccomponents/sample/SQE_fromexpression.py
mcvine/mcvine
42232534b0c6af729628009bed165cd7d833789d
[ "BSD-3-Clause" ]
293
2015-10-29T17:45:52.000Z
2022-01-07T16:31:09.000Z
packages/mccomponents/python/mccomponents/sample/SQE_fromexpression.py
mcvine/mcvine
42232534b0c6af729628009bed165cd7d833789d
[ "BSD-3-Clause" ]
1
2019-05-25T00:53:31.000Z
2019-05-25T00:53:31.000Z
#!/usr/bin/env python # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # Jiao Lin # California Institute of Technology # (C) 2007 All Rights Reserved # # {LicenseText} # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # from .AbstractSQE import AbstractSQE as base class SQE_fromexpression(base): def __init__(self, expression): '''expression: an analystic expression of S(Q,E) function''' self.expression = expression return def identify(self, visitor): return visitor.onSQE_fromexpression( self ) pass # end of SQE_fromexpression # version __id__ = "$Id$" # End of file
24.0625
80
0.467532
63
770
5.539683
0.68254
0.097421
0.137536
0
0
0
0
0
0
0
0
0.007005
0.258442
770
31
81
24.83871
0.604203
0.577922
0
0
0
0
0.013158
0
0
0
0
0
0
1
0.25
false
0.125
0.125
0.125
0.625
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
0723b032b2c424d68f5a541f571c0554f9bed464
3,884
py
Python
allauth/socialaccount/providers/twitter/tests.py
JoshLabs/django-allauth
d8befb8c97fdba4e1aad4b4d75945899d92effba
[ "MIT" ]
3
2015-02-13T15:06:40.000Z
2016-05-23T23:23:11.000Z
allauth/socialaccount/providers/twitter/tests.py
JoshLabs/django-allauth
d8befb8c97fdba4e1aad4b4d75945899d92effba
[ "MIT" ]
9
2020-06-05T17:18:43.000Z
2022-03-11T23:15:04.000Z
allauth/socialaccount/providers/twitter/tests.py
JoshLabs/django-allauth
d8befb8c97fdba4e1aad4b4d75945899d92effba
[ "MIT" ]
3
2015-08-13T22:28:36.000Z
2016-07-04T18:46:46.000Z
# -*- coding: utf-8 -*- from allauth.socialaccount.tests import create_oauth_tests from allauth.tests import MockedResponse from allauth.socialaccount.providers import registry from .provider import TwitterProvider class TwitterTests(create_oauth_tests(registry.by_id(TwitterProvider.id))): def get_mocked_response(self): # FIXME: Replace with actual/complete Twitter response return [MockedResponse(200, r""" {"follow_request_sent": false, "profile_use_background_image": true, "id": 45671919, "verified": false, "profile_text_color": "333333", "profile_image_url_https": "https://pbs.twimg.com/profile_images/793142149/r_normal.png", "profile_sidebar_fill_color": "DDEEF6", "is_translator": false, "geo_enabled": false, "entities": {"description": {"urls": []}}, "followers_count": 43, "protected": false, "location": "The Netherlands", "default_profile_image": false, "id_str": "45671919", "status": {"contributors": null, "truncated": false, "text": "RT @denibertovic: Okay I'm definitely using django-allauth from now on. So easy to set up, far less time consuming, and it just works. #dja\u2026", "in_reply_to_status_id": null, "id": 400658301702381568, "favorite_count": 0, "source": "<a href=\"http://twitter.com\" rel=\"nofollow\">Twitter Web Client</a>", "retweeted": true, "coordinates": null, "entities": {"symbols": [], "user_mentions": [{"indices": [3, 16], "screen_name": "denibertovic", "id": 23508244, "name": "Deni Bertovic", "id_str": "23508244"}], "hashtags": [{"indices": [135, 139], "text": "dja"}], "urls": []}, "in_reply_to_screen_name": null, "id_str": "400658301702381568", "retweet_count": 6, "in_reply_to_user_id": null, "favorited": false, "retweeted_status": {"lang": "en", "favorited": false, "in_reply_to_user_id": null, "contributors": null, "truncated": false, "text": "Okay I'm definitely using django-allauth from now on. So easy to set up, far less time consuming, and it just works. #django", "created_at": "Sun Jul 28 19:56:26 +0000 2013", "retweeted": true, "in_reply_to_status_id": null, "coordinates": null, "id": 361575897674956800, "entities": {"symbols": [], "user_mentions": [], "hashtags": [{"indices": [117, 124], "text": "django"}], "urls": []}, "in_reply_to_status_id_str": null, "in_reply_to_screen_name": null, "source": "web", "place": null, "retweet_count": 6, "geo": null, "in_reply_to_user_id_str": null, "favorite_count": 8, "id_str": "361575897674956800"}, "geo": null, "in_reply_to_user_id_str": null, "lang": "en", "created_at": "Wed Nov 13 16:15:57 +0000 2013", "in_reply_to_status_id_str": null, "place": null}, "utc_offset": 3600, "statuses_count": 39, "description": "", "friends_count": 83, "profile_link_color": "0084B4", "profile_image_url": "http://pbs.twimg.com/profile_images/793142149/r_normal.png", "notifications": false, "profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png", "profile_background_color": "C0DEED", "profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png", "name": "Raymond Penners", "lang": "nl", "profile_background_tile": false, "favourites_count": 0, "screen_name": "pennersr", "url": null, "created_at": "Mon Jun 08 21:10:45 +0000 2009", "contributors_enabled": false, "time_zone": "Amsterdam", "profile_sidebar_border_color": "C0DEED", "default_profile": true, "following": false, "listed_count": 1} """)] # noqa def test_login(self): account = super(TwitterTests, self).test_login() tw_account = account.get_provider_account() self.assertEqual(tw_account.get_screen_name(), 'pennersr') self.assertEqual(tw_account.get_avatar_url(), 'http://pbs.twimg.com/profile_images/793142149/r.png') self.assertEqual(tw_account.get_profile_url(), 'http://twitter.com/pennersr')
114.235294
2,433
0.701081
514
3,884
5.044747
0.38716
0.026996
0.034709
0.023139
0.294254
0.236791
0.188199
0.169688
0.143463
0.069418
0
0.068662
0.122554
3,884
33
2,434
117.69697
0.692195
0.02034
0
0
0
0.037037
0.802684
0.176006
0
0
0
0.030303
0.111111
1
0.074074
false
0
0.148148
0.037037
0.296296
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
1
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
4
0729d836d35e2c1066423fb709639d5a39068894
3,329
py
Python
processing/newFeatures/faculty_feature_selection.py
Bermuhz/DataMiningCompetitionFirstPrize
e0202ceeb99fc6cb869906fd8e7cc79a173a315e
[ "MIT" ]
128
2017-03-20T12:42:38.000Z
2022-03-12T07:06:55.000Z
processing/newFeatures/faculty_feature_selection.py
Bermuhz/DataMiningCompetitionFirstPrize
e0202ceeb99fc6cb869906fd8e7cc79a173a315e
[ "MIT" ]
4
2017-03-18T04:37:36.000Z
2017-07-09T14:11:18.000Z
processing/newFeatures/faculty_feature_selection.py
Bermuhz/DataMiningCompetitionFirstPrize
e0202ceeb99fc6cb869906fd8e7cc79a173a315e
[ "MIT" ]
77
2017-03-19T06:49:39.000Z
2022-03-12T07:06:56.000Z
root_loc = "../original_data/raw_data/train/" score_file = "score_train.txt" subsidy_file = "subsidy_train.txt" subsidy_dict = {} faculty_dict = {} lines = open(root_loc + subsidy_file).readlines() for line in lines: temps = line.strip("\n").split(",") id = int(temps[0]) subsidy = int(temps[1]) subsidy_dict[id] = subsidy lines = open(root_loc + score_file).readlines() for line in lines: temps = line.strip("\n").split(",") id = int(temps[0]) faculty = temps[1] subsidy = subsidy_dict[id] if not faculty_dict.has_key(faculty): faculty_dict[faculty] = {} if not faculty_dict[faculty].has_key(subsidy): faculty_dict[faculty][subsidy] = 0 faculty_dict[faculty][subsidy] += 1 for key, value in faculty_dict.items(): totol_num = 0 for i in [0, 1000, 1500, 2000]: totol_num += value.get(i, 0) value["0_percent"] = float(value.get(0, 0)) / totol_num value["1000_percent"] = float(value.get(1000, 0)) / totol_num value["1500_percent"] = float(value.get(1500, 0)) / totol_num value["2000_percent"] = float(value.get(2000, 0)) / totol_num value["totol_num"] = totol_num print faculty_dict w = open("../original_data/faculty_feature_train.txt", 'w') lines = open(root_loc + score_file).readlines() for line in lines: output_line = "{" temps = line.strip("\n").split(",") id = int(temps[0]) faculty = temps[1] output_line += '"stuId": ' + str(id) + ", " output_line += '"0_num":' + str(faculty_dict[faculty][0]) + "," output_line += '"1000_num":' + str(faculty_dict[faculty][1000]) + "," output_line += '"1500_num":' + str(faculty_dict[faculty].get(1500, 0)) + "," output_line += '"2000_num":' + str(faculty_dict[faculty][2000]) + "," output_line += '"0_percent":' + str(faculty_dict[faculty]["0_percent"]) + "," output_line += '"1000_percent":' + str(faculty_dict[faculty]["1000_percent"]) + "," output_line += '"1500_percent":' + str(faculty_dict[faculty]["1500_percent"]) + "," output_line += '"2000_percent":' + str(faculty_dict[faculty]["2000_percent"]) + "," output_line += '"totol_num_faculty":' + str(faculty_dict[faculty]["totol_num"]) + "}" w.write(output_line+"\n") w.close() w = open("../original_data/faculty_feature_test.txt", 'w') lines = open("../original_data/raw_data/test/score_final_test.txt").readlines() for line in lines: output_line = "{" temps = line.strip("\n").split(",") id = int(temps[0]) faculty = temps[1] output_line += '"stuId": ' + str(id) + ", " output_line += '"0_num":' + str(faculty_dict[faculty][0]) + "," output_line += '"1000_num":' + str(faculty_dict[faculty][1000]) + "," output_line += '"1500_num":' + str(faculty_dict[faculty].get(1500, 0)) + "," output_line += '"2000_num":' + str(faculty_dict[faculty][2000]) + "," output_line += '"0_percent":' + str(faculty_dict[faculty]["0_percent"]) + "," output_line += '"1000_percent":' + str(faculty_dict[faculty]["1000_percent"]) + "," output_line += '"1500_percent":' + str(faculty_dict[faculty]["1500_percent"]) + "," output_line += '"2000_percent":' + str(faculty_dict[faculty]["2000_percent"]) + "," output_line += '"totol_num_faculty":' + str(faculty_dict[faculty]["totol_num"]) + "}" w.write(output_line+"\n") w.close()
41.6125
89
0.632022
450
3,329
4.408889
0.113333
0.144153
0.199597
0.190524
0.669859
0.669859
0.638609
0.638609
0.638609
0.638609
0
0.057789
0.163112
3,329
79
90
42.139241
0.654343
0
0
0.614286
0
0
0.197115
0.04988
0
0
0
0
0
0
null
null
0
0
null
null
0.014286
0
0
0
null
0
1
1
0
0
0
0
0
1
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
0732f615dc2c977e2bba991352929d93df00513f
440
py
Python
tsbooster/features/stats.py
cbojer/tsbooster
a6de2b285128b56162264eb15749550374e231d7
[ "MIT" ]
null
null
null
tsbooster/features/stats.py
cbojer/tsbooster
a6de2b285128b56162264eb15749550374e231d7
[ "MIT" ]
null
null
null
tsbooster/features/stats.py
cbojer/tsbooster
a6de2b285128b56162264eb15749550374e231d7
[ "MIT" ]
null
null
null
# %% from typing import List import pandas as pd from tsbooster.tsibble import Tsibble # %% def grouped_mean(data: pd.DataFrame, keys: List[str], target_col: str): return data.groupby(keys)[target_col].mean().to_frame(name=f"Avg_{target_col}") def add_grouped_mean(data: pd.DataFrame, keys: List[str], target_col: str): gp_mean = grouped_mean(data, keys, target_col) data = data.copy() return data.merge(gp_mean, on=keys)
31.428571
83
0.727273
70
440
4.385714
0.428571
0.14658
0.14658
0.110749
0.319218
0.319218
0.319218
0.319218
0.319218
0.319218
0
0
0.138636
440
14
84
31.428571
0.810026
0.011364
0
0
0
0
0.036952
0
0
0
0
0
0
1
0.222222
false
0
0.333333
0.111111
0.777778
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
0
1
1
1
0
0
4
073dbb693794d83f257beb561812cb7b404bcbb4
212
py
Python
betterhandler.py
al3x/downforeveryoneorjustme
e1c47f78330b05753027b5d0f46b3d4f49261347
[ "Apache-2.0" ]
26
2015-01-13T23:41:29.000Z
2020-04-09T01:24:44.000Z
betterhandler.py
ananthrk/downforeveryoneorjustme
e1c47f78330b05753027b5d0f46b3d4f49261347
[ "Apache-2.0" ]
2
2015-04-15T16:51:52.000Z
2017-09-04T10:00:49.000Z
betterhandler.py
ananthrk/downforeveryoneorjustme
e1c47f78330b05753027b5d0f46b3d4f49261347
[ "Apache-2.0" ]
5
2015-05-25T11:34:01.000Z
2021-07-13T19:19:29.000Z
import os from google.appengine.ext import webapp class BetterHandler(webapp.RequestHandler): def template_path(self, filename): return os.path.join(os.path.dirname(__file__), 'templates', filename)
30.285714
77
0.764151
27
212
5.814815
0.740741
0.076433
0
0
0
0
0
0
0
0
0
0
0.132075
212
6
78
35.333333
0.853261
0
0
0
0
0
0.042453
0
0
0
0
0
0
1
0.2
false
0
0.4
0.2
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
1
0
0
0
4
073e7ec3cdd8a181ce1dae0ad352a0d6dc3fb1b8
596
py
Python
tsheets/repos/current_totals.py
eturpin/api_python
fac15d06ef2510972ed3c812bb16a675d4e30e3c
[ "MIT" ]
6
2018-12-16T19:53:57.000Z
2020-11-22T12:36:57.000Z
tsheets/repos/current_totals.py
eturpin/api_python
fac15d06ef2510972ed3c812bb16a675d4e30e3c
[ "MIT" ]
6
2019-02-01T13:51:59.000Z
2020-11-23T22:42:57.000Z
tsheets/repos/current_totals.py
eturpin/api_python
fac15d06ef2510972ed3c812bb16a675d4e30e3c
[ "MIT" ]
8
2018-12-16T19:53:48.000Z
2021-11-24T17:08:04.000Z
from tsheets.repository import Repository from datetime import date, datetime import tsheets.models as models class CurrentTotals(Repository): pass CurrentTotals.add_me_to_subcls() CurrentTotals.add_url("/reports/current_totals") CurrentTotals.add_model(models.CurrentTotals) CurrentTotals.add_actions(['report']) CurrentTotals.filter("user_ids", [int]) CurrentTotals.filter("group_ids", [int]) CurrentTotals.filter("on_the_clock", str) CurrentTotals.filter("page", int) CurrentTotals.filter("per_page", int) CurrentTotals.filter("order_by", str) CurrentTotals.filter("order_desc", bool)
28.380952
48
0.807047
74
596
6.310811
0.5
0.284797
0.188437
0.107066
0
0
0
0
0
0
0
0
0.07047
596
20
49
29.8
0.84296
0
0
0
0
0
0.147651
0.038591
0
0
0
0
0
1
0
true
0.0625
0.1875
0
0.25
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
1
1
0
0
0
0
0
4
4ace31d3e6e828ac9775c267220348f2c24ce28b
330
py
Python
tk.py
Inndy/python-rsa
1779b35ee0abe80b44be77fe2e26c7fc26765c1c
[ "MIT" ]
5
2018-12-01T10:30:01.000Z
2020-10-26T07:13:40.000Z
tk.py
GoopyAspirin/python-rsa
1779b35ee0abe80b44be77fe2e26c7fc26765c1c
[ "MIT" ]
null
null
null
tk.py
GoopyAspirin/python-rsa
1779b35ee0abe80b44be77fe2e26c7fc26765c1c
[ "MIT" ]
8
2017-11-20T04:53:01.000Z
2021-01-24T04:19:14.000Z
from utils import * if pyversion == 2: import Tkinter as tkinter import tkMessageBox as messagebox import tkFileDialog as filedialog elif pyversion == 3: import tkinter import tkinter.messagebox as messagebox import tkinter.filedialog as filedialog else: raise Exception('Unsupported python version')
25.384615
49
0.751515
39
330
6.358974
0.512821
0.209677
0.145161
0
0
0
0
0
0
0
0
0.007634
0.206061
330
12
50
27.5
0.938931
0
0
0
0
0
0.078788
0
0
0
0
0
0
1
0
true
0
0.636364
0
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
0
1
0
1
0
1
0
0
4
4ae06fcfc5d5bc041c0e3d8fa11fa5f0b6fc7a26
20
py
Python
smt/__init__.py
haojia632/smt
612f7e18ad2b801265c16a8d5f64b6fdb4444a31
[ "BSD-3-Clause" ]
null
null
null
smt/__init__.py
haojia632/smt
612f7e18ad2b801265c16a8d5f64b6fdb4444a31
[ "BSD-3-Clause" ]
null
null
null
smt/__init__.py
haojia632/smt
612f7e18ad2b801265c16a8d5f64b6fdb4444a31
[ "BSD-3-Clause" ]
null
null
null
__version__='0.3.2'
10
19
0.7
4
20
2.5
1
0
0
0
0
0
0
0
0
0
0
0.157895
0.05
20
1
20
20
0.368421
0
0
0
0
0
0.25
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
4af2af7198de98ac9f20ff1edccc2fabfb60b5a2
145
py
Python
tests/state/outervar/modules/module1/__init__.py
da-h/miniflask
d5e594153cca4ce4d30db01b1d06d05afa9e7aaa
[ "MIT" ]
5
2020-02-17T12:14:36.000Z
2020-02-27T12:09:05.000Z
tests/state/outervar/modules/module1/__init__.py
da-h/miniflask
d5e594153cca4ce4d30db01b1d06d05afa9e7aaa
[ "MIT" ]
69
2020-04-03T08:16:35.000Z
2021-12-21T15:46:29.000Z
tests/state/outervar/modules/module1/__init__.py
da-h/miniflask
d5e594153cca4ce4d30db01b1d06d05afa9e7aaa
[ "MIT" ]
1
2020-04-02T15:46:39.000Z
2020-04-02T15:46:39.000Z
from miniflask import outervar def main(var_a=outervar): print("outervar:", var_a) def register(mf): mf.register_event('main', main)
14.5
35
0.703448
21
145
4.714286
0.571429
0.080808
0
0
0
0
0
0
0
0
0
0
0.165517
145
9
36
16.111111
0.818182
0
0
0
0
0
0.089655
0
0
0
0
0
0
1
0.4
false
0
0.2
0
0.6
0.2
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
ab28db5e1147460a144341207c314ac2aa100436
558
py
Python
telegram/ext/commands/errors.py
ilovetocode2019/telegram-ext-commands
a41ecf63dd6d08fc66a6ba997db7f36d47cb43b3
[ "MIT" ]
1
2020-07-20T02:59:08.000Z
2020-07-20T02:59:08.000Z
telegram/ext/commands/errors.py
ilovetocode2019/telegram-ext-commands
a41ecf63dd6d08fc66a6ba997db7f36d47cb43b3
[ "MIT" ]
null
null
null
telegram/ext/commands/errors.py
ilovetocode2019/telegram-ext-commands
a41ecf63dd6d08fc66a6ba997db7f36d47cb43b3
[ "MIT" ]
null
null
null
class NotFound(Exception): """Raised when something is not found""" pass class CommandAlreadyExists(Exception): """Raised when trying to create a command that already exists""" pass class AlreadyExists(Exception): """Raised when something already exists""" pass class LoadError(Exception): """Raised when the bot cannot load a cog""" pass class ArgumentError(Exception): """Raised when parsing arguments fails""" pass class CheckFailure(Exception): """Raised when a check for a command fails""" pass
19.241379
68
0.691756
66
558
5.848485
0.5
0.233161
0.295337
0.145078
0
0
0
0
0
0
0
0
0.21147
558
29
69
19.241379
0.877273
0.437276
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
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
1
1
0
0
0
0
0
4
ab318ab79ace13cc0da465325238d5ef5daec3ab
67
py
Python
simple_mortgage_calculator/__init__.py
geea-develop/simple-mortgage-calculator
7cf907827b1d30df5b64f1c586759045fa7bbf77
[ "MIT" ]
null
null
null
simple_mortgage_calculator/__init__.py
geea-develop/simple-mortgage-calculator
7cf907827b1d30df5b64f1c586759045fa7bbf77
[ "MIT" ]
null
null
null
simple_mortgage_calculator/__init__.py
geea-develop/simple-mortgage-calculator
7cf907827b1d30df5b64f1c586759045fa7bbf77
[ "MIT" ]
null
null
null
from .loan import * from .mortgage import * __version__ = "0.0.1"
13.4
23
0.686567
10
67
4.2
0.7
0
0
0
0
0
0
0
0
0
0
0.054545
0.179104
67
4
24
16.75
0.709091
0
0
0
0
0
0.074627
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
ab45f849835755a1af55b6e49e8e1ead621e1b28
32
py
Python
dajax/__init__.py
navedr/django-dajax3
cc9c249a546e2431962e28640d55a4d2bb5a21c8
[ "BSD-3-Clause" ]
48
2015-01-09T23:02:51.000Z
2021-11-15T09:52:49.000Z
dajax/__init__.py
navedr/django-dajax3
cc9c249a546e2431962e28640d55a4d2bb5a21c8
[ "BSD-3-Clause" ]
11
2015-01-24T03:44:02.000Z
2021-04-30T21:02:05.000Z
dajax/__init__.py
navedr/django-dajax3
cc9c249a546e2431962e28640d55a4d2bb5a21c8
[ "BSD-3-Clause" ]
34
2015-01-09T22:07:43.000Z
2021-04-27T19:40:21.000Z
__version__ = (0, 9, 2, 'beta')
16
31
0.5625
5
32
2.8
1
0
0
0
0
0
0
0
0
0
0
0.115385
0.1875
32
1
32
32
0.423077
0
0
0
0
0
0.125
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
ab491862f1a9f4a53236381680e25f4705d6ed8a
72
py
Python
main.py
andersinno/bookcli-webinar
8d8a05139e2b12ab53c6501513a06cc83db0c869
[ "MIT" ]
null
null
null
main.py
andersinno/bookcli-webinar
8d8a05139e2b12ab53c6501513a06cc83db0c869
[ "MIT" ]
null
null
null
main.py
andersinno/bookcli-webinar
8d8a05139e2b12ab53c6501513a06cc83db0c869
[ "MIT" ]
null
null
null
from readbook import readbook if __name__ == "__main__": readbook()
18
29
0.722222
8
72
5.5
0.75
0
0
0
0
0
0
0
0
0
0
0
0.180556
72
4
30
18
0.745763
0
0
0
0
0
0.109589
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
ab558f2cf19562551f0cc3ef9e085e93458dc859
81
py
Python
Desarrollo/Python/Uber/car.py
EliazBobadilla/Curso-POO-de-Platzi
276d21e24443ce2115b84609f460c42aefd9e57e
[ "MIT" ]
4
2021-03-26T15:59:46.000Z
2021-06-05T15:15:56.000Z
Desarrollo/Python/Uber/car.py
EliazBobadilla/POO-en-Platzi
276d21e24443ce2115b84609f460c42aefd9e57e
[ "MIT" ]
null
null
null
Desarrollo/Python/Uber/car.py
EliazBobadilla/POO-en-Platzi
276d21e24443ce2115b84609f460c42aefd9e57e
[ "MIT" ]
2
2021-06-04T20:23:40.000Z
2021-06-05T15:15:58.000Z
class Car: ID = int license = str driver = str passegenger = int
13.5
21
0.567901
10
81
4.6
0.8
0
0
0
0
0
0
0
0
0
0
0
0.37037
81
5
22
16.2
0.901961
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0.2
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
0
1
0
0
1
0
0
4
db5f4e24547223ef78aae88c2676bf49ce294175
117
py
Python
Pyiiko/__init__.py
gadzhi/pyko
232eb1005fe5edb4a9b0ff518b9dc8421f8c10a4
[ "Apache-2.0" ]
18
2018-03-26T14:14:57.000Z
2022-03-10T13:18:33.000Z
Pyiiko/__init__.py
gadzhi/pyko
232eb1005fe5edb4a9b0ff518b9dc8421f8c10a4
[ "Apache-2.0" ]
null
null
null
Pyiiko/__init__.py
gadzhi/pyko
232eb1005fe5edb4a9b0ff518b9dc8421f8c10a4
[ "Apache-2.0" ]
6
2018-06-05T23:44:21.000Z
2022-03-23T11:03:34.000Z
from .server import IikoServer from .biz import IikoBiz from .card5 import Card5 from .frontWeb import FrontWebAPI
16.714286
33
0.811966
16
117
5.9375
0.5625
0
0
0
0
0
0
0
0
0
0
0.020202
0.153846
117
6
34
19.5
0.939394
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
db6eebddd43a9808b2cae53d3fa5ebb4f482b7af
1,123
py
Python
monsterapi/migrations/0018_auto_20181121_0939.py
merenor/momeback
33195c43abd2757a361dfc5cb7e3cf56f6b57402
[ "MIT" ]
1
2018-11-05T13:08:48.000Z
2018-11-05T13:08:48.000Z
monsterapi/migrations/0018_auto_20181121_0939.py
merenor/momeback
33195c43abd2757a361dfc5cb7e3cf56f6b57402
[ "MIT" ]
null
null
null
monsterapi/migrations/0018_auto_20181121_0939.py
merenor/momeback
33195c43abd2757a361dfc5cb7e3cf56f6b57402
[ "MIT" ]
null
null
null
# Generated by Django 2.1.3 on 2018-11-21 08:39 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('monsterapi', '0017_auto_20181120_2153'), ] operations = [ migrations.AlterField( model_name='melody', name='clef', field=models.CharField(blank=True, max_length=10, null=True), ), migrations.AlterField( model_name='melody', name='keysig', field=models.CharField(blank=True, max_length=10, null=True), ), migrations.AlterField( model_name='melody', name='movement', field=models.CharField(blank=True, max_length=100, null=True), ), migrations.AlterField( model_name='melody', name='timesig', field=models.CharField(blank=True, max_length=10, null=True), ), migrations.AlterField( model_name='melody', name='work_title', field=models.CharField(blank=True, max_length=100, null=True), ), ]
28.794872
74
0.568121
115
1,123
5.426087
0.391304
0.160256
0.200321
0.232372
0.700321
0.700321
0.637821
0.637821
0.575321
0.575321
0
0.055556
0.310775
1,123
38
75
29.552632
0.750646
0.040071
0
0.625
1
0
0.091078
0.021375
0
0
0
0
0
1
0
false
0
0.03125
0
0.125
0
0
0
0
null
0
1
1
0
1
0
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
db8b301063392030753304fbb8ed471cd7aa3fbf
25
py
Python
hca/version.py
GPelayo/dcp-cli
d585fd8b4687f29bfd034242472b870d17ed1e50
[ "MIT" ]
8
2017-10-10T18:29:27.000Z
2019-06-15T04:25:43.000Z
hca/version.py
GPelayo/dcp-cli
d585fd8b4687f29bfd034242472b870d17ed1e50
[ "MIT" ]
440
2017-10-09T16:06:22.000Z
2021-03-25T17:12:18.000Z
hca/version.py
GPelayo/dcp-cli
d585fd8b4687f29bfd034242472b870d17ed1e50
[ "MIT" ]
10
2017-11-07T22:42:59.000Z
2020-05-05T15:36:01.000Z
__version__ = '6.6.0dev'
12.5
24
0.68
4
25
3.25
0.75
0
0
0
0
0
0
0
0
0
0
0.136364
0.12
25
1
25
25
0.454545
0
0
0
0
0
0.32
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
dbbb39da313d6a32a93c41f9edbfd3eabd1564c0
185
py
Python
Add_This_Folder_To_PYTHONPATH/code_inspection/__init__.py
FI-Mihej/FI-ASockIOCore
82ee94e94f692511afee5aeb0d75bb7366eb9b96
[ "Apache-2.0" ]
null
null
null
Add_This_Folder_To_PYTHONPATH/code_inspection/__init__.py
FI-Mihej/FI-ASockIOCore
82ee94e94f692511afee5aeb0d75bb7366eb9b96
[ "Apache-2.0" ]
null
null
null
Add_This_Folder_To_PYTHONPATH/code_inspection/__init__.py
FI-Mihej/FI-ASockIOCore
82ee94e94f692511afee5aeb0d75bb7366eb9b96
[ "Apache-2.0" ]
null
null
null
from .line_tracer import * from .line_profiling import * """ Module Docstring Docstrings: http://www.python.org/dev/peps/pep-0257/ """ __author__ = 'ButenkoMS <gtalk@butenkoms.space>'
20.555556
52
0.745946
24
185
5.5
0.833333
0.121212
0
0
0
0
0
0
0
0
0
0.024096
0.102703
185
9
53
20.555556
0.771084
0
0
0
0
0
0.302752
0.211009
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
dbd15033e1c9d666b2053f8b6b25aaebaee621b0
156
py
Python
src/hdiutils/__init__.py
JoshuaHess12/hdi-utils
2b2923e74391eccf5963b161d5fc302ac6b214f3
[ "MIT" ]
null
null
null
src/hdiutils/__init__.py
JoshuaHess12/hdi-utils
2b2923e74391eccf5963b161d5fc302ac6b214f3
[ "MIT" ]
null
null
null
src/hdiutils/__init__.py
JoshuaHess12/hdi-utils
2b2923e74391eccf5963b161d5fc302ac6b214f3
[ "MIT" ]
null
null
null
# Module for high-dimensional imaging data utils # Developer: Joshua M. Hess, BSc # Developed at the Vaccine & Immunotherapy Center, Mass. General Hospital
39
73
0.782051
21
156
5.809524
1
0
0
0
0
0
0
0
0
0
0
0
0.153846
156
3
74
52
0.924242
0.955128
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
dbd3abd14417ad9d3c5d0f6d76e291b0e5418aad
146
py
Python
exe047-contagem de pares.py
carlosbandelli/Exercicios_em_Python
2cd5bd837fdc51932f9605db32366ad0e3871d87
[ "MIT" ]
null
null
null
exe047-contagem de pares.py
carlosbandelli/Exercicios_em_Python
2cd5bd837fdc51932f9605db32366ad0e3871d87
[ "MIT" ]
null
null
null
exe047-contagem de pares.py
carlosbandelli/Exercicios_em_Python
2cd5bd837fdc51932f9605db32366ad0e3871d87
[ "MIT" ]
null
null
null
for n in range(1, 51): if n % 2 == 0: print(n, end=' ') print('ACABOU') for n in range(2,51,2): print(n, end=' ') print('Acabou')
18.25
25
0.506849
27
146
2.740741
0.444444
0.108108
0.162162
0.297297
0.540541
0
0
0
0
0
0
0.084112
0.267123
146
8
26
18.25
0.607477
0
0
0.285714
0
0
0.095238
0
0
0
0
0
0
1
0
false
0
0
0
0
0.571429
1
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
0
0
0
0
0
0
0
1
0
4
916e452ea6f7b2d968822418fc06ba17aac154ee
149
py
Python
src/metric/__init__.py
yyHaker/TextClassification
dc3c5ffe0731609c8f0c7a18a4daa5f149f83e9f
[ "MIT" ]
3
2019-06-08T14:11:56.000Z
2020-05-26T15:08:23.000Z
src/metric/__init__.py
yyHaker/TextClassification
dc3c5ffe0731609c8f0c7a18a4daa5f149f83e9f
[ "MIT" ]
null
null
null
src/metric/__init__.py
yyHaker/TextClassification
dc3c5ffe0731609c8f0c7a18a4daa5f149f83e9f
[ "MIT" ]
null
null
null
#!/usr/bin/python # coding:utf-8 """ @author: yyhaker @contact: 572176750@qq.com @file: __init__.py @time: 2019/3/9 15:37 """ from .metric import *
13.545455
26
0.671141
24
149
4
1
0
0
0
0
0
0
0
0
0
0
0.153846
0.127517
149
10
27
14.9
0.584615
0.765101
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
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
9183c46df58554d8425f5c25fd968f40aaa104cc
113
py
Python
runme.py
JoshPrim/ECG-Pipeline
23fceb0cc03d583ff93d50b23ad6fb25cabfe89a
[ "MIT" ]
2
2021-03-23T10:51:41.000Z
2021-03-23T12:50:06.000Z
runme.py
JoshPrim/ECG-Pipeline
23fceb0cc03d583ff93d50b23ad6fb25cabfe89a
[ "MIT" ]
null
null
null
runme.py
JoshPrim/ECG-Pipeline
23fceb0cc03d583ff93d50b23ad6fb25cabfe89a
[ "MIT" ]
null
null
null
from runner.execution_runner import ExecutionRunner import os os.chdir('runner') ExecutionRunner.bootstrap()
12.555556
51
0.814159
13
113
7
0.615385
0
0
0
0
0
0
0
0
0
0
0
0.106195
113
8
52
14.125
0.90099
0
0
0
0
0
0.054054
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
918c0994813647c71b59c439af8c56452d7e4e88
220
py
Python
posts/serializers.py
grace0927/postmattic
db08c235e49f6db5669a650951867fc948e1843e
[ "MIT" ]
null
null
null
posts/serializers.py
grace0927/postmattic
db08c235e49f6db5669a650951867fc948e1843e
[ "MIT" ]
null
null
null
posts/serializers.py
grace0927/postmattic
db08c235e49f6db5669a650951867fc948e1843e
[ "MIT" ]
null
null
null
from posts.models import NavItem from rest_framework import serializers class NavItemSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = NavItem fields = ('id', 'title', 'link')
24.444444
64
0.727273
22
220
7.227273
0.772727
0
0
0
0
0
0
0
0
0
0
0
0.190909
220
8
65
27.5
0.893258
0
0
0
0
0
0.05
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
91946afcc56b029fe1e4d27b291a67c3d1fedd2c
350
py
Python
Python/5 - kyu/5 kyu - Pete, the baker.py
danielbom/codewars
d45b5a813c6f1d952a50d22f0b2fcea4ef3d0e27
[ "MIT" ]
null
null
null
Python/5 - kyu/5 kyu - Pete, the baker.py
danielbom/codewars
d45b5a813c6f1d952a50d22f0b2fcea4ef3d0e27
[ "MIT" ]
null
null
null
Python/5 - kyu/5 kyu - Pete, the baker.py
danielbom/codewars
d45b5a813c6f1d952a50d22f0b2fcea4ef3d0e27
[ "MIT" ]
null
null
null
# https://www.codewars.com/kata/pete-the-baker/train/python # My solution def cakes(r, a): ''' input r : recipe, a : available ''' return min([ a[k] // r[k] if k in a.keys() else 0 for k in r.keys()]) # ... def cakes(recipe, available): return min(available.get(k, 0)/recipe[k] for k in recipe)
25
74
0.548571
55
350
3.490909
0.527273
0.046875
0.1875
0
0
0
0
0
0
0
0
0.007968
0.282857
350
13
75
26.923077
0.756972
0.302857
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0.25
1
0
0
0
0
null
0
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
1
0
0
0
1
1
0
0
4
9195a5cb9679e0726635e44fd1bdcce9203f98be
1,485
py
Python
setup.py
grantstephens/pyluno
105266e860fe8dcff21030d89a1292b5d0700009
[ "MIT" ]
5
2017-09-15T03:55:43.000Z
2018-08-10T09:47:59.000Z
setup.py
grantstephens/pyluno
105266e860fe8dcff21030d89a1292b5d0700009
[ "MIT" ]
4
2017-09-09T12:55:25.000Z
2018-01-20T15:05:32.000Z
setup.py
grantstephens/pyluno
105266e860fe8dcff21030d89a1292b5d0700009
[ "MIT" ]
6
2017-11-01T09:51:20.000Z
2020-09-02T04:50:00.000Z
from setuptools import setup, find_packages with open('pyluno/meta.py') as f: exec(f.read()) setup( name='pyluno', version=__version__, packages=find_packages(exclude=['tests']), description='A Luno API for Python', author='Cayle Sharrock/Grant Stephens', author_email='grant@stephens.co.za', scripts=['demo.py'], install_requires=[ 'futures>=3.0.3', 'nose>=1.3.7', 'requests>=2.8.1', 'pandas>=0.17.0', ], license='MIT', url='https://github.com/grantstephens/pyluno', download_url='https://github.com/grantstephens/pyluno/tarball/%s' % (__version__, ), keywords='Luno Bitcoin exchange API', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Topic :: Office/Business :: Financial', 'Topic :: Utilities', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', ], test_suite='tests', extras_require={ 'test': ['requests-mock>=0.7.0', 'nose'], } )
33
69
0.583165
162
1,485
5.253086
0.530864
0.20094
0.264395
0.183314
0.148061
0.084606
0
0
0
0
0
0.029596
0.249158
1,485
44
70
33.75
0.733632
0
0
0.046512
0
0
0.540067
0
0
0
0
0
0
1
0
true
0
0.023256
0
0.023256
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
0
0
0
1
0
0
0
0
0
0
4
91c955f4644070209192cb0168342b6684f7fb7e
158
py
Python
wolproxypyapi/__init__.py
bateman/wolproxypyapi
41e955cf08bc5c677a7b97513082827211998889
[ "MIT" ]
null
null
null
wolproxypyapi/__init__.py
bateman/wolproxypyapi
41e955cf08bc5c677a7b97513082827211998889
[ "MIT" ]
2
2021-12-28T07:56:06.000Z
2022-01-17T12:20:37.000Z
wolproxypyapi/__init__.py
bateman/wolproxypyapi
41e955cf08bc5c677a7b97513082827211998889
[ "MIT" ]
null
null
null
"""Retrieve the path of the parent module to dynamically build the name of FastAPI app.""" import pathlib parent_module = pathlib.Path(__file__).parent.name
31.6
90
0.78481
24
158
4.958333
0.625
0.201681
0
0
0
0
0
0
0
0
0
0
0.132911
158
4
91
39.5
0.868613
0.531646
0
0
0
0
0
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
37e678a4c0908e17f340328fc016c9cba41040e8
285
py
Python
desk/set_up/tests/test_full_grid.py
s-goldman/Dusty-Evolved-Star-K
50d8c056fc9006b45558a6430ee7a67b46f0cc99
[ "BSD-3-Clause" ]
16
2018-07-05T18:17:53.000Z
2021-08-28T09:20:22.000Z
desk/set_up/tests/test_full_grid.py
s-goldman/Dusty-Evolved-Star-K
50d8c056fc9006b45558a6430ee7a67b46f0cc99
[ "BSD-3-Clause" ]
109
2018-06-25T20:44:17.000Z
2022-01-29T03:00:23.000Z
desk/set_up/tests/test_full_grid.py
s-goldman/Dusty-Evolved-Star-K
50d8c056fc9006b45558a6430ee7a67b46f0cc99
[ "BSD-3-Clause" ]
5
2018-06-12T08:01:40.000Z
2021-06-17T00:55:07.000Z
import numpy as np from desk.set_up import full_grid def test_generate_model_luminosities(): lums = full_grid.generate_model_luminosities(3) expected = [1000.0, 12247.44871392, 150000.0] np.testing.assert_allclose(lums, expected, err_msg=("Luminosity generation error"))
31.666667
87
0.775439
41
285
5.146341
0.756098
0.075829
0.236967
0
0
0
0
0
0
0
0
0.104839
0.129825
285
8
88
35.625
0.745968
0
0
0
1
0
0.094737
0
0
0
0
0
0.166667
1
0.166667
false
0
0.333333
0
0.5
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
1
0
0
0
0
4
37f423ba2e38d25608c4eebfc9cfd565d686ce9b
208
py
Python
app/api/v2/utils/question_vals.py
kburudi/Questioner-Api-V2
81530d71e6ec241e8652ded2f330e50f00fb0f6b
[ "MIT" ]
null
null
null
app/api/v2/utils/question_vals.py
kburudi/Questioner-Api-V2
81530d71e6ec241e8652ded2f330e50f00fb0f6b
[ "MIT" ]
1
2019-01-17T21:04:56.000Z
2019-01-17T21:04:56.000Z
app/api/v2/utils/question_vals.py
kburudi/Questioner-Api-V2
81530d71e6ec241e8652ded2f330e50f00fb0f6b
[ "MIT" ]
null
null
null
from flask import jsonify, abort, make_response from.base_vals import BaseValidation class QuestionValid(BaseValidation): """ validate user question input """ question_required = ["title", "body"]
23.111111
47
0.75
23
208
6.652174
0.826087
0
0
0
0
0
0
0
0
0
0
0
0.153846
208
8
48
26
0.869318
0.134615
0
0
0
0
0.052326
0
0
0
0
0
0
1
0
false
0
0.5
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
532119cf556e3e6af205b0b2e2c0fb536961b84d
98
py
Python
Lista4_02.py
NormanDeveloper/Lista4_Python
0b875026cac146145d52a1acdd3f3a05af2d9ccb
[ "MIT" ]
1
2018-09-15T17:50:54.000Z
2018-09-15T17:50:54.000Z
Lista4_02.py
NormanDeveloper/Lista4_Python
0b875026cac146145d52a1acdd3f3a05af2d9ccb
[ "MIT" ]
null
null
null
Lista4_02.py
NormanDeveloper/Lista4_Python
0b875026cac146145d52a1acdd3f3a05af2d9ccb
[ "MIT" ]
null
null
null
lista = [1.5, 1.6, 16.4, 4.7, 8.83, 23.43, 9.75, 7.5, 3.65, 0.17] lista.reverse() print(lista)
24.5
66
0.55102
25
98
2.16
0.76
0
0
0
0
0
0
0
0
0
0
0.333333
0.173469
98
3
67
32.666667
0.333333
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.333333
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
53305c24491a828488d6911cc8874a384c66073c
22
py
Python
test/test_files/multi.input.py
GeeF/sublime-plugin-tests
001a168310bc465a20ed142f2cb79ae43f1a8dc3
[ "Unlicense" ]
null
null
null
test/test_files/multi.input.py
GeeF/sublime-plugin-tests
001a168310bc465a20ed142f2cb79ae43f1a8dc3
[ "Unlicense" ]
null
null
null
test/test_files/multi.input.py
GeeF/sublime-plugin-tests
001a168310bc465a20ed142f2cb79ae43f1a8dc3
[ "Unlicense" ]
null
null
null
def abc|(): pas|s
7.333333
11
0.454545
4
22
2.5
1
0
0
0
0
0
0
0
0
0
0
0
0.318182
22
2
12
11
0.666667
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
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
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
536886962dd3afce60eca85869e009bb1e8a2d2c
168
py
Python
tests/_common.py
dougbrion/octoclient
9eb20e514b54cc9d323fe1dca814a9d9654a2708
[ "MIT" ]
51
2018-07-09T18:02:39.000Z
2022-03-22T17:21:44.000Z
tests/_common.py
dougbrion/octoclient
9eb20e514b54cc9d323fe1dca814a9d9654a2708
[ "MIT" ]
10
2019-06-09T21:17:38.000Z
2021-09-16T21:29:01.000Z
tests/_common.py
dougbrion/octoclient
9eb20e514b54cc9d323fe1dca814a9d9654a2708
[ "MIT" ]
25
2018-07-10T06:40:32.000Z
2022-03-26T05:23:41.000Z
import os URL = os.environ.get('OCTOPRINT_URL') APIKEY = os.environ.get('OCTOPRINT_APIKEY') URL = "http://localhost:5000" APIKEY = "65FD7606F0FB4DF981C639FEDF08F7E6"
21
43
0.761905
20
168
6.3
0.55
0.142857
0.190476
0.333333
0
0
0
0
0
0
0
0.144737
0.095238
168
7
44
24
0.684211
0
0
0
0
0
0.488095
0.190476
0
0
0
0
0
1
0
false
0
0.2
0
0.2
0
1
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
0
0
0
4
72545e82a4593d2e9c83fcf7b5872a7688067ac6
52
py
Python
ctapipe/flow/__init__.py
orelgueta/ctapipe
ee28440e83cc283ccd57428d5fdad764a1e786f0
[ "BSD-3-Clause" ]
null
null
null
ctapipe/flow/__init__.py
orelgueta/ctapipe
ee28440e83cc283ccd57428d5fdad764a1e786f0
[ "BSD-3-Clause" ]
null
null
null
ctapipe/flow/__init__.py
orelgueta/ctapipe
ee28440e83cc283ccd57428d5fdad764a1e786f0
[ "BSD-3-Clause" ]
null
null
null
""" This module contains a Flow based Framework """
13
43
0.711538
7
52
5.285714
1
0
0
0
0
0
0
0
0
0
0
0
0.173077
52
3
44
17.333333
0.860465
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
726eeadcb75b1b9bb68b6902bee7a78cd52bb076
143
py
Python
salesforce/testrunner/example/__init__.py
bryancolligan/django-salesforce
cec08115f97d75d9b7b96bb34c40e48974c7269f
[ "MIT" ]
251
2015-01-15T11:39:21.000Z
2022-03-28T10:52:10.000Z
salesforce/testrunner/example/__init__.py
bryancolligan/django-salesforce
cec08115f97d75d9b7b96bb34c40e48974c7269f
[ "MIT" ]
196
2015-01-09T01:29:37.000Z
2022-03-19T19:35:09.000Z
salesforce/testrunner/example/__init__.py
bryancolligan/django-salesforce
cec08115f97d75d9b7b96bb34c40e48974c7269f
[ "MIT" ]
68
2015-01-12T18:13:13.000Z
2022-03-23T11:16:14.000Z
# django-salesforce # # by Phil Christensen # (c) 2012-2013 Freelancers Union (http://www.freelancersunion.org) # See LICENSE.md for details #
20.428571
67
0.741259
19
143
5.578947
1
0
0
0
0
0
0
0
0
0
0
0.064516
0.132867
143
6
68
23.833333
0.790323
0.909091
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
7272cf4070fb79eab793ef6a5beff00247fd4ce8
233
py
Python
temporary/test/tests_using_decorators/tests.py
mvdbeek/python-temporary
5af1a393e57e71c2d4728e2c8e228edfd020e847
[ "MIT" ]
5
2015-07-27T22:16:31.000Z
2021-07-31T13:14:44.000Z
temporary/test/tests_using_decorators/tests.py
mvdbeek/python-temporary
5af1a393e57e71c2d4728e2c8e228edfd020e847
[ "MIT" ]
5
2015-05-21T21:42:02.000Z
2021-03-29T18:28:29.000Z
temporary/test/tests_using_decorators/tests.py
mvdbeek/python-temporary
5af1a393e57e71c2d4728e2c8e228edfd020e847
[ "MIT" ]
1
2017-06-18T20:01:49.000Z
2017-06-18T20:01:49.000Z
import temporary def test_control(): pass @temporary.temp_dir(make_cwd=True) def test_temp_dir_with_make_cwd_is_registered_as_test(): pass @temporary.in_temp_dir() def test_in_temp_dir_is_registered_as_test(): pass
14.5625
56
0.7897
38
233
4.289474
0.421053
0.171779
0.171779
0.220859
0.269939
0
0
0
0
0
0
0
0.133047
233
15
57
15.533333
0.806931
0
0
0.333333
0
0
0
0
0
0
0
0
0
1
0.333333
true
0.333333
0.111111
0
0.444444
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
1
1
0
0
0
0
0
4
72a5ee3bd3fdc5692a582449d3b1981b6de25577
1,103
py
Python
setup.py
borntyping/python-infix
f86a3ca96bdc7df9d622d3f51522bb2318ffc4e6
[ "Unlicense" ]
52
2015-02-02T16:57:57.000Z
2022-01-26T12:23:11.000Z
setup.py
borntyping/python-infix
f86a3ca96bdc7df9d622d3f51522bb2318ffc4e6
[ "Unlicense" ]
5
2015-07-24T13:08:32.000Z
2018-11-26T01:35:57.000Z
setup.py
borntyping/python-infix
f86a3ca96bdc7df9d622d3f51522bb2318ffc4e6
[ "Unlicense" ]
11
2015-07-24T14:29:52.000Z
2021-11-05T23:51:47.000Z
#!/usr/bin/env python from setuptools import setup setup( name = 'infix', version = '1.2', license = 'MIT License', url = 'https://github.com/borntyping/python-infix', author = 'Sam Clements', author_email = 'sam@borntyping.co.uk', description = 'Infix operators for Python', long_description = open('README.rst').read(), py_modules = ['infix'], classifiers = [ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Topic :: Software Development :: Libraries', 'Topic :: Utilities', ], )
31.514286
68
0.547597
103
1,103
5.834951
0.553398
0.252912
0.332779
0.173045
0.08985
0
0
0
0
0
0
0.019737
0.31097
1,103
34
69
32.441176
0.771053
0.018132
0
0
0
0
0.546211
0
0
0
0
0
0
1
0
true
0
0.037037
0
0.037037
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
0
0
0
1
0
0
0
0
0
0
4
72ac80cfed1dae0f6e40a48909289d99b698f31e
43
py
Python
src/ccapi/model/model/boolean/condition/state.py
achillesrasquinha/CCPy
7a5b4fc008a9a0c90caee5d2d6a8c67393dcb822
[ "MIT" ]
9
2020-05-12T08:16:35.000Z
2022-01-06T03:22:18.000Z
src/ccapi/model/model/boolean/condition/state.py
achillesrasquinha/CCPy
7a5b4fc008a9a0c90caee5d2d6a8c67393dcb822
[ "MIT" ]
3
2020-10-14T16:29:24.000Z
2021-10-04T07:24:34.000Z
src/ccapi/model/model/boolean/condition/state.py
achillesrasquinha/CCPy
7a5b4fc008a9a0c90caee5d2d6a8c67393dcb822
[ "MIT" ]
1
2019-12-30T23:13:46.000Z
2019-12-30T23:13:46.000Z
class State: ON = "on" OFF = "off"
14.333333
15
0.465116
6
43
3.333333
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.372093
43
3
15
14.333333
0.740741
0
0
0
0
0
0.113636
0
0
0
0
0
0
1
0
false
0
0
0
1
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
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
72bd7c76c5bf462b530ebbcaa3a9577d0c0469e0
74
py
Python
src/amuse/support/data/set.py
rknop/amuse
85d5bdcc29cfc87dc69d91c264101fafd6658aec
[ "Apache-2.0" ]
131
2015-06-04T09:06:57.000Z
2022-02-01T12:11:29.000Z
src/amuse/support/data/set.py
rknop/amuse
85d5bdcc29cfc87dc69d91c264101fafd6658aec
[ "Apache-2.0" ]
690
2015-10-17T12:18:08.000Z
2022-03-31T16:15:58.000Z
src/amuse/support/data/set.py
rieder/amuse
3ac3b6b8f922643657279ddee5c8ab3fc0440d5e
[ "Apache-2.0" ]
102
2015-01-22T10:00:29.000Z
2022-02-09T13:29:43.000Z
""" A set is a collection of values with the same units and precision """
18.5
65
0.716216
13
74
4.076923
0.923077
0
0
0
0
0
0
0
0
0
0
0
0.202703
74
3
66
24.666667
0.898305
0.878378
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
72d84e5cf3dd1a564bf72469ddfa79e65c8f4ed3
5,355
py
Python
readthedocs/builds/tests/test_build_queryset.py
yarons/readthedocs.org
05c99a0adc222a1d48654d305b492ec142c3026b
[ "MIT" ]
4,054
2015-01-01T00:58:07.000Z
2019-06-28T05:50:49.000Z
readthedocs/builds/tests/test_build_queryset.py
yarons/readthedocs.org
05c99a0adc222a1d48654d305b492ec142c3026b
[ "MIT" ]
4,282
2015-01-01T21:38:49.000Z
2019-06-28T15:41:00.000Z
readthedocs/builds/tests/test_build_queryset.py
yarons/readthedocs.org
05c99a0adc222a1d48654d305b492ec142c3026b
[ "MIT" ]
3,224
2015-01-01T07:38:45.000Z
2019-06-28T09:19:10.000Z
import django_dynamic_fixture as fixture import pytest from readthedocs.builds.models import Build from readthedocs.organizations.models import Organization from readthedocs.projects.models import Project @pytest.mark.django_db class TestBuildQuerySet: def test_concurrent_builds(self): project = fixture.get( Project, max_concurrent_builds=None, main_language_project=None, ) for state in ("triggered", "building", "cloning", "finished", "cancelled"): fixture.get( Build, project=project, state=state, ) assert (False, 2, 4) == Build.objects.concurrent(project) for state in ('building', 'cloning'): fixture.get( Build, project=project, state=state, ) assert (True, 4, 4) == Build.objects.concurrent(project) def test_concurrent_builds_project_limited(self): project = fixture.get( Project, max_concurrent_builds=2, main_language_project=None, ) for state in ("triggered", "building", "cloning", "finished", "cancelled"): fixture.get( Build, project=project, state=state, ) assert (True, 2, 2) == Build.objects.concurrent(project) def test_concurrent_builds_translations(self): project = fixture.get( Project, max_concurrent_builds=None, main_language_project=None, ) translation = fixture.get( Project, max_concurrent_builds=None, main_language_project=project, ) for state in ("triggered", "building", "cloning", "finished", "cancelled"): fixture.get( Build, project=project, state=state, ) assert (False, 2, 4) == Build.objects.concurrent(translation) for state in ('building', 'cloning'): fixture.get( Build, project=translation, state=state, ) assert (True, 4, 4) == Build.objects.concurrent(translation) assert (True, 4, 4) == Build.objects.concurrent(project) def test_concurrent_builds_organization(self): organization = fixture.get( Organization, max_concurrent_builds=None, ) for _ in range(2): project = fixture.get( Project, max_concurrent_builds=None, main_language_project=None, ) organization.projects.add(project) for project in organization.projects.all(): for state in ("triggered", "building", "cloning", "finished", "cancelled"): fixture.get( Build, project=project, state=state, ) project = organization.projects.first() assert (True, 4, 4) == Build.objects.concurrent(project) for state in ('building', 'cloning'): fixture.get( Build, project=project, state=state, ) assert (True, 6, 4) == Build.objects.concurrent(project) def test_concurrent_builds_organization_limited(self): organization = fixture.get( Organization, max_concurrent_builds=10, ) project_with_builds = fixture.get( Project, max_concurrent_builds=None, main_language_project=None, ) project_without_builds = fixture.get( Project, max_concurrent_builds=None, main_language_project=None, ) organization.projects.add(project_with_builds) organization.projects.add(project_without_builds) for state in ("triggered", "building", "cloning", "finished", "cancelled"): fixture.get( Build, project=project_with_builds, state=state, ) # Calling it with ``project_without_builds`` should count the builds # from ``project_with_builds`` as well assert (False, 2, 10) == Build.objects.concurrent(project_without_builds) def test_concurrent_builds_organization_and_project_limited(self): organization = fixture.get( Organization, max_concurrent_builds=10, ) project_limited = fixture.get( Project, max_concurrent_builds=2, main_language_project=None, ) project_not_limited = fixture.get( Project, max_concurrent_builds=None, main_language_project=None, ) organization.projects.add(project_limited) organization.projects.add(project_not_limited) for state in ("triggered", "building", "cloning", "finished", "cancelled"): fixture.get( Build, project=project_limited, state=state, ) assert (True, 2, 2) == Build.objects.concurrent(project_limited) assert (False, 2, 10) == Build.objects.concurrent(project_not_limited)
33.679245
87
0.55929
490
5,355
5.920408
0.12449
0.072389
0.078594
0.062048
0.779042
0.754567
0.754567
0.749741
0.684936
0.653568
0
0.008918
0.350887
5,355
158
88
33.892405
0.825662
0.019234
0
0.587413
0
0
0.055439
0
0
0
0
0
0.076923
1
0.041958
false
0
0.034965
0
0.083916
0
0
0
0
null
0
0
0
0
1
1
1
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
72e4a9a816050a337d83dce21abfc938a71e5820
388
py
Python
georiviere/description/urls.py
georiviere/Georiviere-admin
4ac532f84a7a8fef3e01384fad63e8e288d397c0
[ "BSD-2-Clause" ]
7
2021-11-05T14:52:25.000Z
2022-03-24T21:18:02.000Z
georiviere/description/urls.py
georiviere/Georiviere-admin
4ac532f84a7a8fef3e01384fad63e8e288d397c0
[ "BSD-2-Clause" ]
57
2021-11-02T10:27:34.000Z
2022-03-31T14:08:32.000Z
georiviere/description/urls.py
georiviere/Georiviere-admin
4ac532f84a7a8fef3e01384fad63e8e288d397c0
[ "BSD-2-Clause" ]
1
2021-12-05T14:55:42.000Z
2021-12-05T14:55:42.000Z
from .models import Usage, Status, Land, Morphology from mapentity.registry import registry from .registry import DescriptionOptions app_name = 'description' urlpatterns = registry.register(Usage, options=DescriptionOptions) urlpatterns += registry.register(Morphology, menu=False) urlpatterns += registry.register(Status, menu=False) urlpatterns += registry.register(Land, menu=False)
35.272727
66
0.814433
43
388
7.325581
0.418605
0.24127
0.342857
0.177778
0.228571
0
0
0
0
0
0
0
0.092784
388
10
67
38.8
0.894886
0
0
0
0
0
0.028351
0
0
0
0
0
0
1
0
false
0
0.375
0
0.375
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
0
0
0
0
0
1
0
0
0
0
4