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
dc4985094df2dfd76c5bb7e016511ac0f65833c1
1,970
py
Python
test/cli_test.py
fi-ts/docker-make
e434ff783bd07cf2377bba36bf29528182af883d
[ "MIT" ]
2
2020-04-28T08:12:56.000Z
2021-06-19T00:59:16.000Z
test/cli_test.py
fi-ts/docker-make
e434ff783bd07cf2377bba36bf29528182af883d
[ "MIT" ]
5
2020-07-30T07:06:57.000Z
2021-04-20T09:44:23.000Z
test/cli_test.py
fi-ts/docker-make
e434ff783bd07cf2377bba36bf29528182af883d
[ "MIT" ]
2
2020-08-18T08:39:01.000Z
2021-04-20T13:24:18.000Z
import unittest import dockermake.cli class CliTest(unittest.TestCase): def test_parse_no_push(self): _, args = dockermake.cli.parse(['-n']) self.assertTrue(args.no_push) self.assertFalse(args.dry_run) self.assertFalse(args.purge) self.assertFalse(args.summary) self.assertEqual('.', args.work_dir) def test_parse_no_push_dry(self): _, args = dockermake.cli.parse(['-n', '-d']) self.assertTrue(args.no_push) self.assertTrue(args.dry_run) self.assertFalse(args.purge) self.assertFalse(args.summary) self.assertEqual('.', args.work_dir) def test_parse_no_push_dry_purge(self): _, args = dockermake.cli.parse(['-ndp']) self.assertTrue(args.no_push) self.assertTrue(args.dry_run) self.assertTrue(args.purge) self.assertFalse(args.summary) self.assertEqual('.', args.work_dir) def test_parse_no_push_dry_purge_summary(self): _, args = dockermake.cli.parse(['-n', '-d', '-p', '-s']) self.assertTrue(args.no_push) self.assertTrue(args.dry_run) self.assertTrue(args.purge) self.assertTrue(args.summary) self.assertEqual('.', args.work_dir) def test_parse_no_push_dry_purge_summary_workdir(self): _, args = dockermake.cli.parse(['-n', '-d', '-p', '-s', '-w', 'test']) self.assertTrue(args.no_push) self.assertTrue(args.dry_run) self.assertTrue(args.purge) self.assertTrue(args.summary) self.assertEqual('test', args.work_dir) def test_parse_additional_docker_build_args(self): _, args = dockermake.cli.parse(['--build-arg', 'A=42', '--build-arg', 'B=43']) self.assertTrue(isinstance(args.docker_build_args, list)) self.assertEqual(len(args.docker_build_args), 2) self.assertEqual(args.docker_build_args[0], 'A=42') self.assertEqual(args.docker_build_args[1], 'B=43')
37.169811
86
0.646193
253
1,970
4.798419
0.173913
0.172982
0.207578
0.103789
0.80972
0.752059
0.631796
0.608731
0.608731
0.559308
0
0.007024
0.205076
1,970
52
87
37.884615
0.768199
0
0
0.522727
0
0
0.039594
0
0
0
0
0
0.659091
1
0.136364
false
0
0.045455
0
0.204545
0
0
0
0
null
0
1
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
4
dc6617c8f46fe00c6cfcf8aa029a7799ad2aec03
202
py
Python
problems/uniq_unix_style.py
stereoabuse/codewars
d6437afaef38c3601903891b8b9cb0f84c108c54
[ "MIT" ]
null
null
null
problems/uniq_unix_style.py
stereoabuse/codewars
d6437afaef38c3601903891b8b9cb0f84c108c54
[ "MIT" ]
null
null
null
problems/uniq_unix_style.py
stereoabuse/codewars
d6437afaef38c3601903891b8b9cb0f84c108c54
[ "MIT" ]
null
null
null
## uniq (UNIX style) ## 6 kyu ## https://www.codewars.com//kata/52249faee9abb9cefa0001ee import itertools def uniq(seq): # ans = [] return [list(g)[0] for k, g in itertools.groupby(seq)]
16.833333
59
0.643564
28
202
4.642857
0.857143
0
0
0
0
0
0
0
0
0
0
0.079755
0.193069
202
11
60
18.363636
0.717791
0.465347
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
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
1
1
0
0
0
4
dc6c60e78d1ee7037ee2cc65b9946dd2e0a75788
63
py
Python
aiowiki/__init__.py
Avaren/aiowiki
34f24bdcaedfd5da96cb6125714505945211287c
[ "MIT" ]
17
2019-02-04T18:46:59.000Z
2022-01-07T16:51:04.000Z
aiowiki/__init__.py
Avaren/aiowiki
34f24bdcaedfd5da96cb6125714505945211287c
[ "MIT" ]
6
2018-11-09T17:08:35.000Z
2021-02-21T14:52:59.000Z
aiowiki/__init__.py
Avaren/aiowiki
34f24bdcaedfd5da96cb6125714505945211287c
[ "MIT" ]
6
2019-03-19T13:46:07.000Z
2022-02-17T14:29:54.000Z
name = "aiowiki" from .wiki import * from .exceptions import *
15.75
25
0.714286
8
63
5.625
0.75
0
0
0
0
0
0
0
0
0
0
0
0.174603
63
3
26
21
0.865385
0
0
0
0
0
0.111111
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
dc8eaf918656d95d9fdb0025833a6c9001130bbf
110
py
Python
Socket/Socket/udp/udp_unix_client.py
RolandBalabekyan1994/socket-socketserver
94ca247d1aa0e84b970d49b7e974e67932440b11
[ "MIT" ]
null
null
null
Socket/Socket/udp/udp_unix_client.py
RolandBalabekyan1994/socket-socketserver
94ca247d1aa0e84b970d49b7e974e67932440b11
[ "MIT" ]
null
null
null
Socket/Socket/udp/udp_unix_client.py
RolandBalabekyan1994/socket-socketserver
94ca247d1aa0e84b970d49b7e974e67932440b11
[ "MIT" ]
null
null
null
import socket sock = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM) sock.sendto(b"Message", 'unix.sock')
27.5
56
0.754545
17
110
4.764706
0.529412
0.246914
0
0
0
0
0
0
0
0
0
0
0.1
110
4
57
27.5
0.818182
0
0
0
0
0
0.148148
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
dc9e2493501ce98e772dd2ee0b0420aaef252e8f
351
py
Python
chroma-agent/tests/plugins/fake_controller.py
GarimaVishvakarma/intel-chroma
fdf68ed00b13643c62eb7480754d3216d9295e0b
[ "MIT" ]
null
null
null
chroma-agent/tests/plugins/fake_controller.py
GarimaVishvakarma/intel-chroma
fdf68ed00b13643c62eb7480754d3216d9295e0b
[ "MIT" ]
null
null
null
chroma-agent/tests/plugins/fake_controller.py
GarimaVishvakarma/intel-chroma
fdf68ed00b13643c62eb7480754d3216d9295e0b
[ "MIT" ]
null
null
null
from chroma_agent.plugin_manager import DevicePlugin class FakeControllerDevicePlugin(DevicePlugin): def _read_config(self): import json return json.loads(open("/root/fake_controller.json").read()) def start_session(self): return self._read_config() def update_session(self): return self._read_config()
25.071429
68
0.7151
41
351
5.853659
0.560976
0.125
0.141667
0.175
0.258333
0.258333
0
0
0
0
0
0
0.193732
351
13
69
27
0.848057
0
0
0.222222
0
0
0.074074
0.074074
0
0
0
0
0
1
0.333333
false
0
0.222222
0.222222
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
f4a7af01c06c90f90d27dc60c22110174e935696
109
py
Python
Elif Statement.py
yazhubal/Python-learning-basic
5d154e38bcbd5ba34a5457ff78d10e46ace5d089
[ "Unlicense" ]
null
null
null
Elif Statement.py
yazhubal/Python-learning-basic
5d154e38bcbd5ba34a5457ff78d10e46ace5d089
[ "Unlicense" ]
1
2019-09-26T10:13:24.000Z
2019-09-26T10:13:24.000Z
Elif Statement.py
yazhubal/Python-learning-basic
5d154e38bcbd5ba34a5457ff78d10e46ace5d089
[ "Unlicense" ]
null
null
null
password = 'swordfish' if password == 'swordfish': print('acces granted') else: print('acces denied')
21.8
27
0.669725
12
109
6.083333
0.666667
0.465753
0
0
0
0
0
0
0
0
0
0
0.174312
109
5
28
21.8
0.811111
0
0
0
0
0
0.390909
0
0
0
0
0
0
1
0
false
0.4
0
0
0
0.4
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
1
0
0
0
0
0
4
f4c7e4b513e22c870fd6fff21d98337783848391
1,184
py
Python
scraper/models.py
alexpetralia/mbta_django
b68732d23c3c2450e3139db3a35bb7f3b63c1573
[ "MIT" ]
1
2016-02-03T00:36:21.000Z
2016-02-03T00:36:21.000Z
scraper/models.py
alexpetralia/mbta_django
b68732d23c3c2450e3139db3a35bb7f3b63c1573
[ "MIT" ]
null
null
null
scraper/models.py
alexpetralia/mbta_django
b68732d23c3c2450e3139db3a35bb7f3b63c1573
[ "MIT" ]
null
null
null
from django.db import models import datetime class CompletedTrip(models.Model): trip_id = models.CharField(max_length=200) vehicle_id = models.CharField(max_length=200) direction = models.CharField(max_length=200) route = models.CharField(max_length=200) start_location = models.CharField(max_length=200) end_location = models.CharField(max_length=200) start_time = models.CharField(max_length=200) # datetimes must be stored as strings because Django ORM cannot query and return a postgres timestamp field without returning a Segmentation Fault end_time = models.CharField(max_length=200) duration = models.DurationField(default = datetime.timedelta(days=0)) def __str__(self): return "%s (%s): %s" % (self.route, self.direction, self.vehicle_id) class TripCount(models.Model): time = models.DateTimeField() count = models.IntegerField(default = 0) direction = models.CharField(max_length=200) route = models.CharField(max_length=200) def __str__(self): return "%s (%s): %s" % (self.route, self.direction, self.count) class apiStatus(models.Model): status = models.IntegerField(default = 0) def __str__(self): return "Current status: %s" % self.status
34.823529
193
0.766892
164
1,184
5.359756
0.359756
0.170648
0.204778
0.273038
0.505119
0.484642
0.25711
0.25711
0.25711
0.25711
0
0.03167
0.119932
1,184
34
194
34.823529
0.8119
0.121622
0
0.28
0
0
0.038499
0
0
0
0
0
0
1
0.12
false
0
0.08
0.12
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
4
f4dc68911187f823f7eda26984b1d2d8bfe5c6e3
448
py
Python
Backend/bike-manager-be/emprestimo/ServicoEmprestimo.py
jpdarricarrere/Trabalho_Eng_Software
4a4929878890df312aea4c56dc6c2ce4c5532aa6
[ "MIT" ]
null
null
null
Backend/bike-manager-be/emprestimo/ServicoEmprestimo.py
jpdarricarrere/Trabalho_Eng_Software
4a4929878890df312aea4c56dc6c2ce4c5532aa6
[ "MIT" ]
null
null
null
Backend/bike-manager-be/emprestimo/ServicoEmprestimo.py
jpdarricarrere/Trabalho_Eng_Software
4a4929878890df312aea4c56dc6c2ce4c5532aa6
[ "MIT" ]
2
2022-03-20T18:16:45.000Z
2022-03-20T18:22:16.000Z
class ServicoEmprestimo(): def __init__(self): self._servico_bike = None def set_servico_bike(self, servico_bike): self._servico_bike = servico_bike def reserva_bike(self, id_bike): if self._servico_bike is None: raise('ServicoEmprestimo nao possui forma de chega em bikes. Verifique se uma referencia para o servico de bikes foi passada a ele.') self._servico_bike.aluga_bike(id_bike)
29.866667
145
0.700893
62
448
4.741935
0.516129
0.261905
0.255102
0.14966
0.139456
0
0
0
0
0
0
0
0.232143
448
14
146
32
0.854651
0
0
0
0
0.111111
0.277405
0
0
0
0
0
0
1
0.333333
false
0.111111
0
0
0.444444
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
1
0
1
0
0
0
0
0
4
f4ffe0394deab7261ea7d6b452c1fc52713b6d08
108
py
Python
src/the_impossible/LIVE_SERVER_CLEAN/notification.py
micha31r/The-Impossible
7a79dea3169907eb93107107f4003c5813de58dc
[ "MIT" ]
null
null
null
src/the_impossible/LIVE_SERVER_CLEAN/notification.py
micha31r/The-Impossible
7a79dea3169907eb93107107f4003c5813de58dc
[ "MIT" ]
2
2020-04-15T03:57:42.000Z
2020-06-06T01:43:34.000Z
src/the_impossible/LIVE_SERVER_CLEAN/notification.py
micha31r/The-Impossible
7a79dea3169907eb93107107f4003c5813de58dc
[ "MIT" ]
null
null
null
# Deletes all notifications from usermgmt.models import Notification Notification.objects.all().delete()
15.428571
40
0.805556
12
108
7.25
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.111111
108
6
41
18
0.90625
0.231481
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
5211cbd8113f7d4a20999ceb2e27087a36d8bd72
185
py
Python
Code/build/lib/PEWorld/objects/__init__.py
kasmith/btWorld
b3f47e8475e8cc62ed877056f1912dcf18537b5f
[ "MIT" ]
1
2019-03-09T07:51:15.000Z
2019-03-09T07:51:15.000Z
Code/build/lib/PEWorld/objects/__init__.py
kasmith/btWorld
b3f47e8475e8cc62ed877056f1912dcf18537b5f
[ "MIT" ]
null
null
null
Code/build/lib/PEWorld/objects/__init__.py
kasmith/btWorld
b3f47e8475e8cc62ed877056f1912dcf18537b5f
[ "MIT" ]
null
null
null
__all__ = ['PEBox','PEPlane','PEMesh','BoxGoal','PEHingeJoint'] from objects import PEBox, PEPlane from meshobjs import PEMesh from goals import BoxGoal from joints import PEHingeJoint
30.833333
63
0.794595
23
185
6.217391
0.521739
0.167832
0
0
0
0
0
0
0
0
0
0
0.108108
185
6
64
30.833333
0.866667
0
0
0
0
0
0.198925
0
0
0
0
0
0
1
0
false
0
0.8
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
52128b4e46b3d5dc17f6dcfebde2379a30e2e519
275
py
Python
triplinker/journeys/migrations/0021_merge_20200916_1821.py
GonnaFlyMethod/triplinker
f4189e499ad48fd9102dd2211a8884078136eae9
[ "MIT" ]
null
null
null
triplinker/journeys/migrations/0021_merge_20200916_1821.py
GonnaFlyMethod/triplinker
f4189e499ad48fd9102dd2211a8884078136eae9
[ "MIT" ]
null
null
null
triplinker/journeys/migrations/0021_merge_20200916_1821.py
GonnaFlyMethod/triplinker
f4189e499ad48fd9102dd2211a8884078136eae9
[ "MIT" ]
null
null
null
# Generated by Django 3.0.8 on 2020-09-16 18:21 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('journeys', '0020_auto_20200916_1810'), ('journeys', '0020_auto_20200916_1651'), ] operations = [ ]
18.333333
48
0.650909
33
275
5.242424
0.787879
0.138728
0.184971
0.277457
0
0
0
0
0
0
0
0.221698
0.229091
275
14
49
19.642857
0.59434
0.163636
0
0
1
0
0.27193
0.201754
0
0
0
0
0
1
0
false
0
0.125
0
0.5
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
1
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
52225b57cc48677f3a6a009eba902e3be7987016
1,257
py
Python
tests/test_detector_en_US_social_security_number.py
datascopeanalytics/scrubadub
ab199f0b3cc3ca11f646aabb05ebe124d2757ea5
[ "Apache-2.0" ]
190
2015-12-03T01:31:36.000Z
2020-09-02T23:46:38.000Z
tests/test_detector_en_US_social_security_number.py
vishalbelsare/scrubadub
ab199f0b3cc3ca11f646aabb05ebe124d2757ea5
[ "Apache-2.0" ]
54
2020-09-10T14:46:14.000Z
2022-03-10T06:03:00.000Z
tests/test_detector_en_US_social_security_number.py
datascopeanalytics/scrubadub
ab199f0b3cc3ca11f646aabb05ebe124d2757ea5
[ "Apache-2.0" ]
57
2016-04-04T18:37:38.000Z
2020-08-18T22:59:03.000Z
import faker import unittest from scrubadub.filth import SocialSecurityNumberFilth from base import BaseTestCase class SSNTestCase(unittest.TestCase, BaseTestCase): def test_example(self): """ BEFORE: My social security number is 726-60-2033 AFTER: My social security number is {{SOCIAL_SECURITY_NUMBER}} """ self.compare_before_after() def test_hyphens(self): """ BEFORE: My social security number is 109-99-6000 AFTER: My social security number is {{SOCIAL_SECURITY_NUMBER}} """ self.compare_before_after() def test_dots(self): """ BEFORE: My social security number is 109.99.6000 AFTER: My social security number is {{SOCIAL_SECURITY_NUMBER}} """ self.compare_before_after() def test_spaces(self): """ BEFORE: My social security number is 109 99 6000 AFTER: My social security number is {{SOCIAL_SECURITY_NUMBER}} """ self.compare_before_after() def test_generate(self): fake = faker.Faker('en_US') faker.Faker.seed(4321) self.assertEqual( '818-09-2900', SocialSecurityNumberFilth.generate(faker=fake), )
27.326087
71
0.632458
144
1,257
5.368056
0.298611
0.217335
0.310479
0.227684
0.614489
0.614489
0.614489
0.570505
0.570505
0.570505
0
0.054144
0.280032
1,257
45
72
27.933333
0.8
0.358791
0
0.2
0
0
0.023495
0
0
0
0
0
0.05
1
0.25
false
0
0.2
0
0.5
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
1
0
0
0
0
0
0
0
4
524a22127bc31653627822ef861db0207304bda5
123
py
Python
recursor/record/dictrecord.py
OaklandPeters/recursor
3a5eabd0b43e5ec2a66e6215a9bad70b4ab47c34
[ "MIT" ]
null
null
null
recursor/record/dictrecord.py
OaklandPeters/recursor
3a5eabd0b43e5ec2a66e6215a9bad70b4ab47c34
[ "MIT" ]
null
null
null
recursor/record/dictrecord.py
OaklandPeters/recursor
3a5eabd0b43e5ec2a66e6215a9bad70b4ab47c34
[ "MIT" ]
null
null
null
""" View type object, wraps around existing dict/mapping (likely nested), and provides convenient history/path access. """
24.6
69
0.764228
16
123
5.875
1
0
0
0
0
0
0
0
0
0
0
0
0.130081
123
4
70
30.75
0.878505
0.926829
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
5266a1f4e4a245710a9baa0702447d9883ef87cd
648
py
Python
dist/Platform.app/Contents/Resources/lib/python3.7/wx/gizmos.py
njalloul90/Genomics_Oncology_Platform
9bf6d0edca5df783f4e371fa1bc46b7b1576fe70
[ "MIT" ]
6
2021-07-26T14:21:25.000Z
2021-07-26T14:32:01.000Z
dist/Platform.app/Contents/Resources/lib/python3.7/wx/gizmos.py
njalloul90/Genomics_Oncology_Platform
9bf6d0edca5df783f4e371fa1bc46b7b1576fe70
[ "MIT" ]
2
2021-12-10T10:25:19.000Z
2021-12-10T10:27:15.000Z
dist/Platform.app/Contents/Resources/lib/python3.7/wx/gizmos.py
njalloul90/Genomics_Oncology_Platform
9bf6d0edca5df783f4e371fa1bc46b7b1576fe70
[ "MIT" ]
1
2021-05-10T08:41:12.000Z
2021-05-10T08:41:12.000Z
#--------------------------------------------------------------------------- # Name: wx/gizmos.py # Author: Robin Dunn # # Created: 27-Oct-2017 # Copyright: (c) 2017-2020 by Total Control Software # License: wxWindows License #--------------------------------------------------------------------------- # This is just a compatibility shim to make the gizmos classes usable from # the wx.gizmos module, like in Classic. They're actually in the wx.lib.gizmos # package now. # # This module is deprecated and could be removed some time in the future. Please # switch your imports to wx.lib.gizmos from wx.lib.gizmos import *
34.105263
80
0.544753
78
648
4.525641
0.705128
0.042493
0.093484
0
0
0
0
0
0
0
0
0.02583
0.16358
648
18
81
36
0.625461
0.908951
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
5286f83f48bb1b150b7da1065bafc4a247018257
264
py
Python
peacecorps/peacecorps/templatetags/media.py
cmc333333/peacecorps-site
6779b9ac7a8f1013aaa4aa302ad78c992ea2b3e4
[ "CC0-1.0" ]
8
2015-01-06T15:38:12.000Z
2016-05-02T23:55:39.000Z
peacecorps/peacecorps/templatetags/media.py
cmc333333/peacecorps-site
6779b9ac7a8f1013aaa4aa302ad78c992ea2b3e4
[ "CC0-1.0" ]
61
2015-01-05T18:20:57.000Z
2016-01-28T22:08:03.000Z
peacecorps/peacecorps/templatetags/media.py
cmc333333/peacecorps-site
6779b9ac7a8f1013aaa4aa302ad78c992ea2b3e4
[ "CC0-1.0" ]
12
2015-02-04T21:15:41.000Z
2021-02-17T11:03:27.000Z
"""Wrap a path in the default media root. This is only needed for photos managed outside of the CMS""" from django.conf import settings from django_jinja import library @library.global_function def media(url): return getattr(settings, 'MEDIA_URL', '') + url
26.4
72
0.757576
41
264
4.804878
0.756098
0.101523
0
0
0
0
0
0
0
0
0
0
0.159091
264
9
73
29.333333
0.887387
0.363636
0
0
0
0
0.055556
0
0
0
0
0
0
1
0.2
false
0
0.4
0.2
0.8
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
1
1
0
0
4
52889f957de95a2144553e6e562d34c76645e9e2
97
py
Python
astexport/__init__.py
patrick91/python-astexport
92e9b311b95681b36882a864fa7ded49e307f74b
[ "MIT" ]
25
2015-12-09T10:29:29.000Z
2022-02-28T11:19:13.000Z
astexport/__init__.py
patrick91/python-astexport
92e9b311b95681b36882a864fa7ded49e307f74b
[ "MIT" ]
5
2018-05-28T16:31:10.000Z
2020-03-20T14:21:53.000Z
astexport/__init__.py
patrick91/python-astexport
92e9b311b95681b36882a864fa7ded49e307f74b
[ "MIT" ]
6
2018-06-19T11:15:10.000Z
2022-02-28T11:27:29.000Z
from astexport.version import __version__ __prog_name__ = "astexport" __version__ = __version__
19.4
41
0.835052
10
97
6.4
0.6
0.5
0
0
0
0
0
0
0
0
0
0
0.113402
97
4
42
24.25
0.744186
0
0
0
0
0
0.092784
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
528aa07d3f28c481f392c8724d51e45e6de8fbba
95
bzl
Python
internal_deps.bzl
fweikert/skydoc
246647b9d43a0d1960df236417df17755483b588
[ "Apache-2.0" ]
null
null
null
internal_deps.bzl
fweikert/skydoc
246647b9d43a0d1960df236417df17755483b588
[ "Apache-2.0" ]
null
null
null
internal_deps.bzl
fweikert/skydoc
246647b9d43a0d1960df236417df17755483b588
[ "Apache-2.0" ]
null
null
null
load("@bazel_federation//:repositories.bzl", "bazel") def skydoc_internal_deps(): bazel()
19
53
0.715789
11
95
5.909091
0.818182
0
0
0
0
0
0
0
0
0
0
0
0.105263
95
4
54
23.75
0.764706
0
0
0
0
0
0.431579
0.378947
0
0
0
0
0
1
0.333333
true
0
0
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
1
1
0
0
0
0
0
0
4
bfdcdebc4f7c73a4806dd806263fc7a52135ef2c
3,003
py
Python
try_parse/parse_tests.py
agorinenko/try-parse
ecf6d71b2b402d4396092345b9ac622864fb9e73
[ "MIT" ]
3
2019-11-27T10:14:03.000Z
2020-10-21T10:40:08.000Z
try_parse/parse_tests.py
agorinenko/try-parse
ecf6d71b2b402d4396092345b9ac622864fb9e73
[ "MIT" ]
null
null
null
try_parse/parse_tests.py
agorinenko/try-parse
ecf6d71b2b402d4396092345b9ac622864fb9e73
[ "MIT" ]
null
null
null
import unittest from datetime import date, datetime from decimal import Decimal from try_parse.utils import ParseUtils class Tests(unittest.TestCase): def test_try_parse_date(self): status, target = ParseUtils.try_parse_date('2018-11-23') self.assertTrue(status) self.assertIsInstance(target, date) self.assertEqual(target, date(2018, 11, 23)) # See format https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior status, target = ParseUtils.try_parse_date('23.11.2018', format='%d.%m.%Y') self.assertTrue(status) self.assertIsInstance(target, date) self.assertEqual(target, date(2018, 11, 23)) status, target = ParseUtils.try_parse_date('Invalid') self.assertFalse(status) self.assertIsNone(target) def test_try_parse_datetime(self): status, target = ParseUtils.try_parse_datetime('2018-11-23 01:45:59') self.assertTrue(status) self.assertIsInstance(target, datetime) self.assertEqual(target, datetime(2018, 11, 23, 1, 45, 59)) # See format https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior status, target = ParseUtils.try_parse_datetime('23.11.2018T01:45:59', format='%d.%m.%YT%H:%M:%S') self.assertTrue(status) self.assertIsInstance(target, datetime) self.assertEqual(target, datetime(2018, 11, 23, 1, 45, 59)) status, target = ParseUtils.try_parse_datetime('Invalid') self.assertFalse(status) self.assertIsNone(target) def test_try_parse_int(self): status, target = ParseUtils.try_parse_int('19') self.assertTrue(status) self.assertIsInstance(target, int) self.assertEqual(target, 19) status, target = ParseUtils.try_parse_int('Invalid') self.assertFalse(status) self.assertIsNone(target) def test_try_parse_float(self): status, target = ParseUtils.try_parse_float('19.00') self.assertTrue(status) self.assertIsInstance(target, float) self.assertEqual(target, 19.00) status, target = ParseUtils.try_parse_float('Invalid') self.assertFalse(status) self.assertIsNone(target) def test_try_parse_decimal(self): status, target = ParseUtils.try_parse_decimal('19.00') self.assertTrue(status) self.assertIsInstance(target, Decimal) self.assertEqual(target, Decimal(19)) status, target = ParseUtils.try_parse_decimal('Invalid') self.assertFalse(status) self.assertIsNone(target) def test_try_parse_bool(self): for p in ["yes", "true", "t", "1", 1]: status, target = ParseUtils.try_parse_bool(p) self.assertTrue(status) self.assertIsInstance(target, bool) self.assertTrue(target) status, target = ParseUtils.try_parse_bool('Invalid') self.assertFalse(status) self.assertIsNone(target)
37.074074
105
0.668665
358
3,003
5.477654
0.170391
0.085671
0.157063
0.17848
0.808261
0.808261
0.527792
0.502295
0.4513
0.4513
0
0.045879
0.216117
3,003
80
106
37.5375
0.787171
0.056277
0
0.451613
0
0
0.051608
0
0
0
0
0
0.580645
1
0.096774
false
0
0.064516
0
0.177419
0
0
0
0
null
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
4
8749546a60191753751f4566ae41d416cd04bbb7
149
py
Python
DailyLife/picOCR_toExcel/ExcelProcessing/__init__.py
Ayusummer/DailyNotes
af7d0c784eac4de28814eb89c8977f45334d6e62
[ "MIT" ]
2
2021-05-08T09:54:35.000Z
2021-09-11T06:54:16.000Z
DailyLife/picOCR_toExcel/ExcelProcessing/__init__.py
Ayusummer/DailyNotes
af7d0c784eac4de28814eb89c8977f45334d6e62
[ "MIT" ]
null
null
null
DailyLife/picOCR_toExcel/ExcelProcessing/__init__.py
Ayusummer/DailyNotes
af7d0c784eac4de28814eb89c8977f45334d6e62
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # @Time : 2021/5/13 22:53 # @Author : 咸鱼型233 # @File : __init__.py.py # @Software: PyCharm # @Function: # @ChangeLog
18.625
28
0.57047
19
149
4.263158
0.947368
0
0
0
0
0
0
0
0
0
0
0.12931
0.221477
149
7
29
21.285714
0.568966
0.899329
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
874b705419cf395df3f79f2899e5d1923206a536
165
py
Python
src/Payload2Std.py
Hing9/Payload2Std-IDA
ffaaa903301cbc700667bd8052d3027e482d6601
[ "MIT" ]
null
null
null
src/Payload2Std.py
Hing9/Payload2Std-IDA
ffaaa903301cbc700667bd8052d3027e482d6601
[ "MIT" ]
null
null
null
src/Payload2Std.py
Hing9/Payload2Std-IDA
ffaaa903301cbc700667bd8052d3027e482d6601
[ "MIT" ]
null
null
null
from __future__ import print_function import idaapi def PLUGIN_ENTRY(): from Payload2Std.plugin import Payload2StdPlugin return Payload2StdPlugin()
13.75
52
0.775758
17
165
7.176471
0.705882
0
0
0
0
0
0
0
0
0
0
0.022388
0.187879
165
11
53
15
0.88806
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
true
0
0.6
0
1
0.2
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
5e40d95adf747944de112cce11bfc7680b5c7138
15
py
Python
src/myapp/apps/__init__.py
JasonGiedymin/Flask-Module-Scaffold
b8d88bf81c0bca5f8f151ffd2d94ef339fe445c4
[ "BSD-3-Clause" ]
4
2015-09-09T23:57:54.000Z
2019-06-21T12:32:36.000Z
src/myapp/apps/__init__.py
JasonGiedymin/Flask-Module-Scaffold
b8d88bf81c0bca5f8f151ffd2d94ef339fe445c4
[ "BSD-3-Clause" ]
null
null
null
src/myapp/apps/__init__.py
JasonGiedymin/Flask-Module-Scaffold
b8d88bf81c0bca5f8f151ffd2d94ef339fe445c4
[ "BSD-3-Clause" ]
null
null
null
# Leave Empty #
15
15
0.666667
2
15
5
1
0
0
0
0
0
0
0
0
0
0
0
0.2
15
1
15
15
0.833333
0.733333
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
5e4f11a8a0fef4e9e5dd4b645d0aefb0cd6c996e
439
py
Python
polymers/poly_hgraph/__init__.py
siboehm/hgraph2graph
91d0dc763be1f9bc97e0c2473b0a00a058b4a9f9
[ "MIT" ]
null
null
null
polymers/poly_hgraph/__init__.py
siboehm/hgraph2graph
91d0dc763be1f9bc97e0c2473b0a00a058b4a9f9
[ "MIT" ]
null
null
null
polymers/poly_hgraph/__init__.py
siboehm/hgraph2graph
91d0dc763be1f9bc97e0c2473b0a00a058b4a9f9
[ "MIT" ]
null
null
null
from poly_hgraph.mol_graph import MolGraph from poly_hgraph.encoder import HierMPNEncoder from poly_hgraph.decoder import HierMPNDecoder from poly_hgraph.vocab import Vocab, PairVocab, common_atom_vocab from poly_hgraph.hgnn import HierVAE, HierVGNN, HierCondVGNN from poly_hgraph.dataset import ( MoleculeDataset, MolPairDataset, DataFolder, MolEnumRootDataset, ) from poly_hgraph.chemutils import find_fragments, get_mol
33.769231
65
0.835991
55
439
6.454545
0.509091
0.157746
0.276056
0
0
0
0
0
0
0
0
0
0.123007
439
12
66
36.583333
0.922078
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.583333
0
0.583333
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
5e8ab09f3e4164e0a24faab6e63ec27d06a9fb94
23
py
Python
proxySTAR_V3/certbot/venv.1509389747.bak/lib/python2.7/site-packages/pylint/test/functional/future_import.py
mami-project/lurk
98c293251e9b1e9c9a4b02789486c5ddaf46ba3c
[ "Apache-2.0" ]
2
2017-07-05T09:57:33.000Z
2017-11-14T23:05:53.000Z
Libraries/Python/pylint/v1.4.4/pylint/test/functional/future_import.py
davidbrownell/Common_Environment
4015872aeac8d5da30a6aa7940e1035a6aa6a75d
[ "BSL-1.0" ]
1
2019-01-17T14:26:22.000Z
2019-01-17T22:56:26.000Z
Libraries/Python/pylint/v1.4.4/pylint/test/functional/future_import.py
davidbrownell/Common_Environment
4015872aeac8d5da30a6aa7940e1035a6aa6a75d
[ "BSL-1.0" ]
1
2017-08-31T14:33:03.000Z
2017-08-31T14:33:03.000Z
"""a docstring"""
5.75
18
0.434783
2
23
5
1
0
0
0
0
0
0
0
0
0
0
0
0.304348
23
3
19
7.666667
0.625
0.478261
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
5eacd7132e9640d00adac17dd7d9eef7046e867a
4,248
py
Python
User/migrations/0001_initial.py
orik3ll0/generate_Csv
49902b1ddbe341e8c65fc453bfb0b5d807de1563
[ "MIT" ]
null
null
null
User/migrations/0001_initial.py
orik3ll0/generate_Csv
49902b1ddbe341e8c65fc453bfb0b5d807de1563
[ "MIT" ]
null
null
null
User/migrations/0001_initial.py
orik3ll0/generate_Csv
49902b1ddbe341e8c65fc453bfb0b5d807de1563
[ "MIT" ]
null
null
null
# Generated by Django 3.2.5 on 2021-07-15 15:17 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='InputType', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=50)), ('date_created', models.DateTimeField(auto_now_add=True)), ('date_update', models.DateTimeField(auto_now_add=True)), ('status', models.IntegerField(default=1)), ], ), migrations.CreateModel( name='Separator', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=50)), ('prefix', models.CharField(max_length=50)), ('date_created', models.DateTimeField(auto_now_add=True)), ('date_update', models.DateTimeField(auto_now_add=True)), ('status', models.IntegerField(default=1)), ], ), migrations.CreateModel( name='StringCharacter', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=50)), ('prefix', models.CharField(max_length=50)), ('date_created', models.DateTimeField(auto_now_add=True)), ('date_update', models.DateTimeField(auto_now_add=True)), ('status', models.IntegerField(default=1)), ], ), migrations.CreateModel( name='SchemaColumn', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('columnName', models.CharField(max_length=150)), ('from_int', models.IntegerField(blank=True, null=True)), ('to_int', models.IntegerField(blank=True, null=True)), ('sentence', models.IntegerField(blank=True, null=True)), ('order', models.IntegerField(default=0)), ('date_created', models.DateTimeField(auto_now_add=True)), ('date_update', models.DateTimeField(auto_now_add=True)), ('status', models.IntegerField(default=1)), ('type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='User.inputtype')), ], ), migrations.CreateModel( name='Schema', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('schemaTitle', models.CharField(max_length=150)), ('user_id', models.IntegerField()), ('date_created', models.DateTimeField(auto_now_add=True)), ('date_update', models.DateTimeField(auto_now_add=True)), ('status', models.IntegerField(default=1)), ('schemaColumns', models.ManyToManyField(blank=True, to='User.SchemaColumn')), ('separator', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='User.separator')), ('stringCharacter', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='User.stringcharacter')), ], ), migrations.CreateModel( name='Generated_csv', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('row', models.IntegerField()), ('status', models.CharField(max_length=50)), ('path', models.CharField(blank=True, max_length=255, null=True)), ('date_created', models.DateTimeField(auto_now_add=True)), ('schema_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='User.schema')), ], ), ]
48.272727
127
0.57839
413
4,248
5.782082
0.181598
0.087521
0.105946
0.119765
0.748325
0.714824
0.700168
0.668342
0.649916
0.649916
0
0.01369
0.277778
4,248
87
128
48.827586
0.764668
0.010593
0
0.6375
1
0
0.110212
0
0
0
0
0
0
1
0
false
0
0.025
0
0.075
0
0
0
0
null
0
0
0
0
1
1
0
0
1
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
5eb5d321fb0acf65b8501d4d01b3e4fdc85f9f98
140
py
Python
src/pycus/__main__.py
moshez/pycus
d1615b1cf73b376d80c148a53be938eb11b81541
[ "MIT" ]
null
null
null
src/pycus/__main__.py
moshez/pycus
d1615b1cf73b376d80c148a53be938eb11b81541
[ "MIT" ]
12
2020-08-02T04:37:36.000Z
2022-01-30T02:08:05.000Z
src/pycus/__main__.py
moshez/pycus
d1615b1cf73b376d80c148a53be938eb11b81541
[ "MIT" ]
null
null
null
from . import commands if __name__ != "__main__": raise ImportError("This module should not be imported") commands.main_command.run()
20
59
0.742857
18
140
5.277778
0.888889
0
0
0
0
0
0
0
0
0
0
0
0.157143
140
6
60
23.333333
0.805085
0
0
0
0
0
0.3
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
0d5ee9999bbcd7a4fe2453d542df290189163476
3,182
py
Python
pyapprox/models/test_datafunction_model.py
ConnectedSystems/pyapprox
4f405654c707cba83d211f327c0f0fdbc95efa29
[ "MIT" ]
26
2019-12-16T02:21:15.000Z
2022-03-17T09:59:18.000Z
pyapprox/models/test_datafunction_model.py
ConnectedSystems/pyapprox
4f405654c707cba83d211f327c0f0fdbc95efa29
[ "MIT" ]
9
2020-03-03T03:04:55.000Z
2021-08-19T22:50:42.000Z
pyapprox/models/test_datafunction_model.py
ConnectedSystems/pyapprox
4f405654c707cba83d211f327c0f0fdbc95efa29
[ "MIT" ]
7
2020-03-02T03:49:17.000Z
2021-02-17T02:07:53.000Z
import unittest import numpy as np from pyapprox.models.wrappers import DataFunctionModel class ModelWithCounter(object): def __init__(self): self.counter=0 def __call__(self,samples): self.counter+=samples.shape[1] return np.sum(samples**2,axis=0)[:,np.newaxis] class TestDataFunctionModel(unittest.TestCase): def test_empty_initial_data_do_not_use_hash(self): num_vars=2 num_samples=10 submodel=ModelWithCounter() model = DataFunctionModel(submodel,None,use_hash=False) samples = np.random.uniform(-1.,1.,(num_vars,num_samples)) values = model(samples) values = model(samples) assert submodel.counter==num_samples assert np.allclose(values,submodel(samples)) new_samples = np.random.uniform(-1.,1.,(num_vars,num_samples)) I = np.random.permutation(2*num_samples)[:num_samples+num_samples//2] samples = np.hstack( (samples,new_samples))[:,I] counter = submodel.counter values = model(samples) assert submodel.counter==np.where(I>=num_samples)[0].shape[0]+counter assert np.allclose(values,submodel(samples)) def test_empty_initial_data_use_hash(self): num_vars=2 num_samples=10 submodel=ModelWithCounter() model = DataFunctionModel(submodel,None) samples = np.random.uniform(-1.,1.,(num_vars,num_samples)) values = model(samples) values = model(samples) assert submodel.counter==num_samples assert np.allclose(values,submodel(samples)) new_samples = np.random.uniform(-1.,1.,(num_vars,num_samples)) I = np.random.permutation(2*num_samples)[:num_samples+num_samples//2] samples = np.hstack( (samples,new_samples))[:,I] counter = submodel.counter values = model(samples) assert submodel.counter==np.where(I>=num_samples)[0].shape[0]+counter assert np.allclose(values,submodel(samples)) def test_initial_data(self): num_vars=2 num_samples=10 submodel=ModelWithCounter() samples = np.random.uniform(-1.,1.,(num_vars,num_samples)) values = submodel(samples) model = DataFunctionModel(submodel,(samples,values)) submodel.counter=0 values = model(samples) assert submodel.counter==0 assert np.allclose(values,submodel(samples))# increments counter new_samples = np.random.uniform(-1.,1.,(num_vars,num_samples)) I = np.random.permutation(2*num_samples)[:num_samples+num_samples//2] samples = np.hstack( (samples,new_samples))[:,I] counter = submodel.counter values = model(samples) assert submodel.counter==np.where(I>=num_samples)[0].shape[0]+counter assert np.allclose(values,submodel(samples))# increments counter if __name__== "__main__": data_function_model_test_suite=unittest.TestLoader().loadTestsFromTestCase( TestDataFunctionModel) unittest.TextTestRunner(verbosity=2).run(data_function_model_test_suite)
34.967033
79
0.655248
377
3,182
5.32626
0.172414
0.114542
0.071713
0.065737
0.774402
0.729084
0.709661
0.709661
0.674303
0.650398
0
0.016313
0.229415
3,182
90
80
35.355556
0.80261
0.011628
0
0.666667
0
0
0.002546
0
0
0
0
0
0.173913
1
0.072464
false
0
0.043478
0
0.15942
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
0d8574f7ced18f33ce95753ea49a9e803ee9d3c1
120
py
Python
5 Python Projects in 5 mins/Figlet.py
SaiAshish-Konchada/Python-Projects-for-Beginners
bce0a705b636a1090b56f59205c6acb94ab2e54a
[ "MIT" ]
5
2021-01-19T18:32:13.000Z
2021-05-03T05:19:11.000Z
5 Python Projects in 5 mins/Figlet.py
SaiAshish-Konchada/Python-Projects-for-Beginners
bce0a705b636a1090b56f59205c6acb94ab2e54a
[ "MIT" ]
null
null
null
5 Python Projects in 5 mins/Figlet.py
SaiAshish-Konchada/Python-Projects-for-Beginners
bce0a705b636a1090b56f59205c6acb94ab2e54a
[ "MIT" ]
2
2021-05-22T13:35:51.000Z
2021-08-31T07:05:32.000Z
# import pyfiglet module import pyfiglet result = pyfiglet.figlet_format("Sai Ashish", font = "slant") print(result)
20
61
0.75
15
120
5.933333
0.733333
0.314607
0
0
0
0
0
0
0
0
0
0
0.141667
120
5
62
24
0.864078
0.183333
0
0
0
0
0.157895
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0.333333
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
0d85982226b16dae26e630785d3d4d131cf804a0
10,110
py
Python
api/util/paylib/alipayapi.py
edisonlz/fastor
342078a18363ac41d3c6b1ab29dbdd44fdb0b7b3
[ "Apache-2.0" ]
285
2019-12-23T09:50:21.000Z
2021-12-08T09:08:49.000Z
api/util/paylib/alipayapi.py
jeckun/fastor
342078a18363ac41d3c6b1ab29dbdd44fdb0b7b3
[ "Apache-2.0" ]
null
null
null
api/util/paylib/alipayapi.py
jeckun/fastor
342078a18363ac41d3c6b1ab29dbdd44fdb0b7b3
[ "Apache-2.0" ]
9
2019-12-23T12:59:25.000Z
2022-03-15T05:12:11.000Z
# -*- coding: utf-8 -*- import urllib import hashlib import urllib2 import logging import os,sys import base64 from datetime import datetime import json import logging import urllib class AliPayConfig(object): """ 支付宝 公共配置 """ APP_ID = '' #appid precreate_GATEWAY="https://openapi.alipay.com/gateway.do?" SIGN_TYPE = "RSA" INPUT_CHARSTE = "utf-8" KEY = '' #支付宝密钥 SELLER_ID = ""#支付宝账号 PARTNER = "" #合伙人id ALI_SERVICE_PATH = "https://mapi.alipay.com/gateway.do" NOTIFY_URL = "" #支付成功回调地址 class AliPayBase(object): """ 支付宝api 基类 """ def get_sign(self, para_str, sign_type="RSA2"): #对参数排序 import OpenSSL ############################################### # 这里需要支付宝支付私钥文件 # ############################################### root = os.path.realpath(os.path.dirname(__file__)) ali_private_path = os.path.join(root, "ali_private2048.txt") private_key = OpenSSL.crypto.load_privatekey(OpenSSL.crypto.FILETYPE_PEM, open(ali_private_path).read()) import sys reload(sys) sys.setdefaultencoding('utf-8') #这三句:解决签名方法编码报错 sign = base64.encodestring(OpenSSL.crypto.sign(private_key, para_str, 'sha256')) return sign def create_request_data(self): raise NotImplementedError def post_data(self): """ 标准post 可以自己实现 ,需要定义 self.create_request_data() """ data = self.create_request_data() try: result = urllib2.urlopen( AliPayConfig.ALI_SERVICE_PATH, data=urllib.urlencode(data)).read() except Exception, e: logging.error("post data error %s %s" % (data['service'],e)) return result def params_to_query(self,params): """ 生成需要签名的字符串 :param params: :return: """ """ :param params: :return: """ query = "" dict_items = {} for key, value in params.items(): if isinstance(value, dict) == True: dict_items[key] = value params[key] = "%s" all_str = '' for key in sorted(params.keys()): #把参数按key值排序:这是支付宝下单请求的参数格式规定 all_str = all_str + '%s=%s&' % (key, params[key]) all_str = all_str.rstrip('&') biz_content_dict = dict_items['biz_content'] content_str = '' for key in sorted(biz_content_dict.keys()): if isinstance(biz_content_dict[key], basestring) == True: content_str = content_str + '"%s":"%s",' % (key, biz_content_dict[key]) else: content_str = content_str + '"%s":%s,' % (key, biz_content_dict[key]) content_str = content_str.rstrip(',') content_str = '{' + content_str + '}' query = all_str % content_str return query class AliPayDoWebPay(AliPayBase): """ 支付宝 下单接口封装 doc https://docs.open.alipay.com/270/105900/ """ def __init__(self, orderid, goodsName, goodsPrice): self.notify_url = AliPayConfig.NOTIFY_URL self.precreate_GATEWAY = "https://openapi.alipay.com/gateway.do?" self.orderid = orderid self.goodsName = goodsName self.goodsPrice = goodsPrice #获取二维码url def getAlipayUrl(self): # 构建公共参数 import requests params = {} params['method'] = 'alipay.trade.page.pay' params['version'] = '1.0' params['app_id'] = AliPayConfig.APP_ID params['timestamp'] = datetime.now().strftime('%Y-%m-%d %H:%M:%S') params['charset'] = 'utf-8' params['notify_url'] = self.notify_url params['sign_type'] = 'RSA2' # 构建订单参数 biz_content = {} biz_content['out_trade_no'] = self.orderid # 订单号 biz_content['qr_pay_mode'] = "2" biz_content['subject'] = self.goodsName #商品名 biz_content['product_code'] = 'FAST_INSTANT_TRADE_PAY' biz_content['total_amount'] = self.goodsPrice # 价格 params['biz_content'] = biz_content #由参数,生成签名,并且拼接得到下单参数字符串 encode_params = self.make_payment_request(params) #下单 url = self.precreate_GATEWAY + encode_params response = requests.get(url) #提取下单响应 body = response.text #解析下单响应json字符串 return body #1:生成下单请求参数字符串 def make_payment_request(self,params_dict): """ 构造支付请求参数 :param params_dict: :return: """ query_str = self.params_to_query(params_dict) # 拼接参数字符串 sign = self.make_sign(query_str) # 生成签名 sign = urllib.quote(sign, safe='') #解决中文参数编码问题 res = "%s&sign=%s" % (query_str, sign) return res def make_sign(self,para_str): """ 生成签名 :param message: :return: """ import OpenSSL ############################################### # 这里需要支付宝支付私钥文件 # ############################################### root = os.path.realpath(os.path.dirname(__file__)) ali_private_path = os.path.join(root, "ali_private2048.txt") private_key = OpenSSL.crypto.load_privatekey(OpenSSL.crypto.FILETYPE_PEM, open(ali_private_path).read()) import sys reload(sys) sys.setdefaultencoding('utf-8') #这三句:解决签名方法编码报错 sign = base64.encodestring(OpenSSL.crypto.sign(private_key, para_str, 'sha256')) return sign class AliPayDoAppPay(AliPayBase): """ 支付宝 下单接口封装 doc https://docs.open.alipay.com/270/105900/ """ def __init__(self, orderid, goodsName, goodsPrice): self.notify_url = AliPayConfig.NOTIFY_URL self.precreate_GATEWAY = "https://openapi.alipay.com/gateway.do?" self.orderid = orderid self.goodsName = goodsName self.goodsPrice = goodsPrice #获取二维码url def do_pay_params(self): # 构建公共参数 import requests params = {} params['method'] = 'alipay.trade.app.pay' params['version'] = '1.0' params['app_id'] = AliPayConfig.APP_ID params['timestamp'] = datetime.now().strftime('%Y-%m-%d %H:%M:%S') params['charset'] = 'utf-8' params['notify_url'] = self.notify_url params['sign_type'] = 'RSA2' params['format'] = 'json' # 构建订单参数 biz_content = {} biz_content["timeout_express"] = "30m" biz_content['out_trade_no'] = self.orderid # 订单号 biz_content['subject'] = self.goodsName #商品名 biz_content['body'] = self.goodsName #商品名 biz_content['product_code'] = 'QUICK_MSECURITY_PAY' biz_content['total_amount'] = self.goodsPrice # 价格 params['biz_content'] = biz_content encode_params = self.make_payment_request(params) return encode_params #1:生成下单请求参数字符串 def make_payment_request(self,params_dict): """ 构造支付请求参数 :param params_dict: :return: """ import copy query_str = self.params_to_query(copy.deepcopy(params_dict),) # 拼接参数字符串 sign = self.make_sign(query_str) # 生成签名 query_str = self.params_to_query(copy.deepcopy(params_dict),quote=True) res = "%s&sign=%s" % (query_str, urllib.quote(str(sign))) return res def params_to_query(self,params,quote=False): """ 生成需要签名的字符串 :param params: :return: """ """ :param params: :return: """ query = "" dict_items = {} for key, value in params.items(): if isinstance(value, dict) == True: dict_items[key] = value params[key] = "%s" all_str = '' for key in sorted(params.keys()): #把参数按key值排序:这是支付宝下单请求的参数格式规定 if quote: if key not in dict_items: all_str = all_str + '%s=%s&' % (key, urllib.quote(params[key])) else: all_str = all_str + '%s=%s&' % (key, params[key]) else: all_str = all_str + '%s=%s&' % (key, params[key]) all_str = all_str.rstrip('&') biz_content_dict = dict_items['biz_content'] content_str = '' for key in sorted(biz_content_dict.keys()): if isinstance(biz_content_dict[key], basestring) == True: content_str = content_str + '"%s":"%s",' % (key, biz_content_dict[key]) else: content_str = content_str + '"%s":%s,' % (key, biz_content_dict[key]) content_str = content_str.rstrip(',') content_str = '{' + content_str + '}' if quote: query = all_str.replace("%s",urllib.quote(str(content_str))) else: query = all_str % content_str return query def make_sign(self,para_str): """ 生成签名 :param message: :return: """ import OpenSSL root = os.path.realpath(os.path.dirname(__file__)) ali_private_path = os.path.join(root, "ali_private2048.txt") # print ali_private_path #把私钥存到一个文件里,加载出来【尝试过用rsa模块的方法加载私钥字符串,会报格式错误。查看源码得知,需要从文件流加载】 private_key = OpenSSL.crypto.load_privatekey(OpenSSL.crypto.FILETYPE_PEM, open(ali_private_path).read()) import sys reload(sys) sys.setdefaultencoding('utf-8') #这三句:解决签名方法编码报错 sign = base64.encodestring(OpenSSL.crypto.sign(private_key, para_str, 'sha256')) return sign class AliPayVerifyNotice(AliPayBase): """ 支付宝通知结果验证 """ def __init__(self, notice_params): self.service = 'notify_verify' self.notice_params = notice_params def verify_sign(self): query_str = self.params_to_query(notice_params) server_sign = self.get_sign(query_str) client_sign = self.notice_params.get("sign") return server_sign == client_sign
27.104558
112
0.561227
1,098
10,110
4.937158
0.193078
0.053496
0.026379
0.011806
0.744697
0.731599
0.706512
0.667958
0.645453
0.625899
0
0.009618
0.300692
10,110
372
113
27.177419
0.757143
0.047082
0
0.654639
0
0
0.094809
0.005027
0
0
0
0
0
0
null
null
0
0.097938
null
null
0
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
0d9a9b26e7073de8676c3a211d324b1ab21593cd
283
py
Python
bubble_sort.py
iabudanov/Algorithms_and_DataStructures
d2244f1e8db829ab566b494b8fe8399fca63a7b8
[ "MIT" ]
1
2019-02-24T14:20:17.000Z
2019-02-24T14:20:17.000Z
bubble_sort.py
iabudanov/Algorithms_and_DataStructures
d2244f1e8db829ab566b494b8fe8399fca63a7b8
[ "MIT" ]
null
null
null
bubble_sort.py
iabudanov/Algorithms_and_DataStructures
d2244f1e8db829ab566b494b8fe8399fca63a7b8
[ "MIT" ]
null
null
null
def bubble_sort(int_list): for i in range(0, len(int_list)): if (i == 0): pass elif int_list[i] < int_list[i-1]: int_list[i], int_list[i-1] = int_list[i-1], int_list[i] print('lol') print(int_list) print(int_list)
25.727273
67
0.522968
47
283
2.914894
0.361702
0.510949
0.350365
0.19708
0.372263
0.372263
0.372263
0.306569
0.306569
0.306569
0
0.026316
0.328622
283
10
68
28.3
0.694737
0
0
0.222222
0
0
0.010601
0
0
0
0
0
0
1
0.111111
false
0.111111
0
0
0.111111
0.333333
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
1
0
0
0
0
0
4
0da876d446bc61ffb3488ca44081d936ae371044
422
py
Python
home/models.py
sapiendraft/superburguerDEMO
a2bfd8bc2e0c8025750ff428782165751684faab
[ "Apache-2.0" ]
null
null
null
home/models.py
sapiendraft/superburguerDEMO
a2bfd8bc2e0c8025750ff428782165751684faab
[ "Apache-2.0" ]
1
2022-01-21T22:40:44.000Z
2022-01-21T22:40:44.000Z
home/models.py
sapiendraft/superburguerDEMO
a2bfd8bc2e0c8025750ff428782165751684faab
[ "Apache-2.0" ]
null
null
null
from django.db import models # main page posts class IndexCards(models.Model): id = models.AutoField(primary_key=True) title = models.CharField(max_length=64) paragraph = models.CharField(max_length=256) observation = models.CharField(max_length=128) image_link = models.CharField(max_length=512) reference_link = models.CharField(max_length=512) def __str__(self): return self.title
30.142857
53
0.739336
56
422
5.357143
0.589286
0.25
0.3
0.4
0.206667
0.206667
0
0
0
0
0
0.039773
0.165877
422
14
54
30.142857
0.8125
0.035545
0
0
0
0
0
0
0
0
0
0
0
1
0.1
false
0
0.1
0.1
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
0df7fda4e2f2a59db80d37c4fe6a570c0f614782
1,188
py
Python
problems/exercism/space-age/space_age.py
JayMonari/py-personal
ef16d030cc7fe2266d661e1378d95f588229b746
[ "MIT" ]
null
null
null
problems/exercism/space-age/space_age.py
JayMonari/py-personal
ef16d030cc7fe2266d661e1378d95f588229b746
[ "MIT" ]
null
null
null
problems/exercism/space-age/space_age.py
JayMonari/py-personal
ef16d030cc7fe2266d661e1378d95f588229b746
[ "MIT" ]
null
null
null
class SpaceAge: EARTH_PERIOD = 31557600 MERCURY_PERIOD = 0.2408467 * EARTH_PERIOD VENUS_PERIOD = 0.61519726 * EARTH_PERIOD MARS_PERIOD = 1.8808158 * EARTH_PERIOD JUPITER_PERIOD = 11.862615 * EARTH_PERIOD SATURN_PERIOD = 29.447498 * EARTH_PERIOD URANUS_PERIOD = 84.016846 * EARTH_PERIOD NEPTUNE_PERIOD = 164.79132 * EARTH_PERIOD def __init__(self, seconds: int) -> None: self.seconds = seconds def on_mercury(self) -> float: return round(self.seconds / self.MERCURY_PERIOD, 2) def on_venus(self) -> float: return round(self.seconds / self.VENUS_PERIOD, 2) def on_earth(self) -> float: return round(self.seconds / self.EARTH_PERIOD, 2) def on_mars(self) -> float: return round(self.seconds / self.MARS_PERIOD, 2) def on_jupiter(self) -> float: return round(self.seconds / self.JUPITER_PERIOD, 2) def on_saturn(self) -> float: return round(self.seconds / self.SATURN_PERIOD, 2) def on_uranus(self) -> float: return round(self.seconds / self.URANUS_PERIOD, 2) def on_neptune(self) -> float: return round(self.seconds / self.NEPTUNE_PERIOD, 2)
32.108108
59
0.671717
160
1,188
4.76875
0.225
0.144168
0.157274
0.209699
0.366972
0.366972
0.366972
0
0
0
0
0.079521
0.227273
1,188
36
60
33
0.751634
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0.296296
0.962963
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
2186314aa7aaff87c93cbec4f6a0d72a7b0791ce
253
py
Python
tuiuiu/tests/modeladmintest/apps.py
caputomarcos/tuiuiu.io
d8fb57cf95487e7fe1454b2130ef18acc916da46
[ "BSD-3-Clause" ]
3
2019-08-08T09:09:35.000Z
2020-12-15T18:04:17.000Z
tuiuiu/tests/modeladmintest/apps.py
caputomarcos/tuiuiu.io
d8fb57cf95487e7fe1454b2130ef18acc916da46
[ "BSD-3-Clause" ]
null
null
null
tuiuiu/tests/modeladmintest/apps.py
caputomarcos/tuiuiu.io
d8fb57cf95487e7fe1454b2130ef18acc916da46
[ "BSD-3-Clause" ]
1
2017-09-09T20:10:40.000Z
2017-09-09T20:10:40.000Z
from __future__ import absolute_import, unicode_literals from django.apps import AppConfig class TuiuiuTestsAppConfig(AppConfig): name = 'tuiuiu.tests.modeladmintest' label = 'test_modeladmintest' verbose_name = "Test Tuiuiu Model Admin"
25.3
56
0.786561
28
253
6.821429
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.150198
253
9
57
28.111111
0.888372
0
0
0
0
0
0.272727
0.106719
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
21c55a05f8ceabf205b5ec79ef418e96dcbdd37a
16,275
py
Python
test/test.py
Kenneth-T-Moore/PlantEnergy
e0511b68e279c99a19cc88c2c1d5c61f4e7b822d
[ "Apache-2.0" ]
null
null
null
test/test.py
Kenneth-T-Moore/PlantEnergy
e0511b68e279c99a19cc88c2c1d5c61f4e7b822d
[ "Apache-2.0" ]
null
null
null
test/test.py
Kenneth-T-Moore/PlantEnergy
e0511b68e279c99a19cc88c2c1d5c61f4e7b822d
[ "Apache-2.0" ]
null
null
null
import unittest import numpy as np import cPickle as pickle import os from wakeexchange.OptimizationGroups import AEPGroup from fusedwake.WindTurbine import WindTurbine from fusedwake.WindFarm import WindFarm from windIO.Plant import WTLayout, yaml from openmdao.api import Problem class TestFlorisWrapper(unittest.TestCase): def setUp(self): try: from wakeexchange.floris import floris_wrapper, add_floris_params_IndepVarComps self.working_import = True except: self.working_import = False # define turbine locations in global reference frame turbineX = np.array([1164.7, 947.2, 1682.4, 1464.9, 1982.6, 2200.1]) turbineY = np.array([1024.7, 1335.3, 1387.2, 1697.8, 2060.3, 1749.7]) # initialize input variable arrays nTurbines = turbineX.size rotorDiameter = np.zeros(nTurbines) axialInduction = np.zeros(nTurbines) Ct = np.zeros(nTurbines) Cp = np.zeros(nTurbines) generatorEfficiency = np.zeros(nTurbines) yaw = np.zeros(nTurbines) # define initial values for turbI in range(0, nTurbines): rotorDiameter[turbI] = 126.4 # m axialInduction[turbI] = 1.0/3.0 Ct[turbI] = 4.0*axialInduction[turbI]*(1.0-axialInduction[turbI]) Cp[turbI] = 0.7737/0.944 * 4.0 * 1.0/3.0 * np.power((1 - 1.0/3.0), 2) generatorEfficiency[turbI] = 0.944 yaw[turbI] = 0. # deg. # Define flow properties nDirections = 1 wind_speed = 8.0 # m/s air_density = 1.1716 # kg/m^3 wind_direction = 270.-0.523599*180./np.pi # deg (N = 0 deg., using direction FROM, as in met-mast data) wind_frequency = 1. # probability of wind in this direction at this speed # set up problem model_options = {'differentiable': True, 'use_rotor_components': False, 'nSamples': 0, 'verbose': False} prob = Problem(root=AEPGroup(nTurbines, nDirections, wake_model=floris_wrapper, wake_model_options=model_options, params_IdepVar_func=add_floris_params_IndepVarComps, params_IndepVar_args={'use_rotor_components': False})) # initialize problem prob.setup(check=True) # assign values to turbine states prob['turbineX'] = turbineX prob['turbineY'] = turbineY prob['yaw0'] = yaw # assign values to constant inputs (not design variables) prob['rotorDiameter'] = rotorDiameter prob['axialInduction'] = axialInduction prob['generatorEfficiency'] = generatorEfficiency prob['windSpeeds'] = np.array([wind_speed]) prob['air_density'] = air_density prob['windDirections'] = np.array([wind_direction]) prob['windFrequencies'] = np.array([wind_frequency]) prob['Ct_in'] = Ct prob['Cp_in'] = Cp prob['model_params:cos_spread'] = 1E12 # turns off cosine spread (just needs to be very large) prob['model_params:useWakeAngle'] = False # run the problem prob.run() self.prob = prob def testImport(self): self.assertEqual(self.working_import, True, "floris_wrapper Import Failed") def testRun(self): np.testing.assert_allclose(self.prob['wtVelocity0'], np.array([8., 8., 6.81027708, 6.81027708, 6.80533179, 6.80533179])) # class TestJensenWrapper(unittest.TestCase): # # def setUp(self): # try: # from wakeexchange.jensen import jensen_wrapper, add_jensen_params_IndepVarComps # self.working_import = True # except: # self.working_import = False # # # define turbine locations in global reference frame # turbineX = np.array([1164.7, 947.2, 1682.4, 1464.9, 1982.6, 2200.1]) # turbineY = np.array([1024.7, 1335.3, 1387.2, 1697.8, 2060.3, 1749.7]) # # # initialize input variable arrays # nTurbines = turbineX.size # rotorDiameter = np.zeros(nTurbines) # axialInduction = np.zeros(nTurbines) # Ct = np.zeros(nTurbines) # Cp = np.zeros(nTurbines) # generatorEfficiency = np.zeros(nTurbines) # yaw = np.zeros(nTurbines) # # # define initial values # for turbI in range(0, nTurbines): # rotorDiameter[turbI] = 126.4 # m # axialInduction[turbI] = 1.0/3.0 # Ct[turbI] = 4.0*axialInduction[turbI]*(1.0-axialInduction[turbI]) # Cp[turbI] = 0.7737/0.944 * 4.0 * 1.0/3.0 * np.power((1 - 1.0/3.0), 2) # generatorEfficiency[turbI] = 0.944 # yaw[turbI] = 0. # deg. # # # Define flow properties # nDirections = 1 # wind_speed = 8.1 # m/s # air_density = 1.1716 # kg/m^3 # wind_direction = 270.-0.523599*180./np.pi # deg (N = 0 deg., using direction FROM, as in met-mast data) # wind_frequency = 1. # probability of wind in this direction at this speed # # # set up problem # # wake_model_options = None # prob = Problem(root=AEPGroup(nTurbines, nDirections, wake_model=jensen_wrapper, wake_model_options=wake_model_options, # params_IdepVar_func=add_jensen_params_IndepVarComps, # params_IndepVar_args={'use_angle': False})) # # # initialize problem # prob.setup(check=True) # # # assign values to turbine states # prob['turbineX'] = turbineX # prob['turbineY'] = turbineY # prob['yaw0'] = yaw # # # assign values to constant inputs (not design variables) # prob['rotorDiameter'] = rotorDiameter # prob['axialInduction'] = axialInduction # prob['generatorEfficiency'] = generatorEfficiency # prob['windSpeeds'] = np.array([wind_speed]) # prob['air_density'] = air_density # prob['windDirections'] = np.array([wind_direction]) # prob['windFrequencies'] = np.array([wind_frequency]) # prob['Ct_in'] = Ct # prob['Cp_in'] = Cp # # prob['model_params:spread_angle'] = 20.0 # # prob['model_params:alpha'] = 0.1 # # # run the problem # prob.run() # # self.prob = prob # # def testImport(self): # self.assertEqual(self.working_import, True, "jensen_wrapper Import Failed") # # def testRun(self): # np.testing.assert_allclose(self.prob['wtVelocity0'], np.array([8.1, 8.1, 6.74484, 6.74484, 6.616713, 6.616713])) # class TestLarsenWrapper(unittest.TestCase): # # def setUp(self): # try: # from wakeexchange.larsen import larsen_wrapper, add_larsen_params_IndepVarComps # self.working_import = True # except: # self.working_import = False # # # define turbine locations in global reference frame # turbineX = np.array([1164.7, 947.2, 1682.4, 1464.9, 1982.6, 2200.1]) # turbineY = np.array([1024.7, 1335.3, 1387.2, 1697.8, 2060.3, 1749.7]) # # # initialize input variable arrays # nTurbines = turbineX.size # rotorDiameter = np.zeros(nTurbines) # axialInduction = np.zeros(nTurbines) # Ct = np.zeros(nTurbines) # Cp = np.zeros(nTurbines) # generatorEfficiency = np.zeros(nTurbines) # yaw = np.zeros(nTurbines) # hubHeight = np.zeros(nTurbines) # # # define initial values # for turbI in range(0, nTurbines): # rotorDiameter[turbI] = 126.4 # m # axialInduction[turbI] = 1.0/3.0 # Ct[turbI] = 4.0*axialInduction[turbI]*(1.0-axialInduction[turbI]) # Cp[turbI] = 0.7737/0.944 * 4.0 * 1.0/3.0 * np.power((1 - 1.0/3.0), 2) # generatorEfficiency[turbI] = 0.944 # yaw[turbI] = 0. # deg. # hubHeight[turbI] = 90.0 # # # Define flow properties # nDirections = 1 # wind_speed = 8.0 # m/s # air_density = 1.1716 # kg/m^3 # wind_direction = 270.-0.523599*180./np.pi # deg (N = 0 deg., using direction FROM, as in met-mast data) # wind_frequency = 1. # probability of wind in this direction at this speed # Ia = 0.05 # ambient turbulence intensity # # # load wind turbine data # NREL5MWCPCT = pickle.load(open('../data/turbine_data/NREL5MWCPCT_smooth_dict.p')) # # # set up problem # model_options = {} # model_options['tuning'] = 'standard' # model_options['differentiable'] = False # model_options['verbose'] = False # model_options['nSamples'] = 0 # model_options['use_rotor_components'] = False # model_options['datasize'] = NREL5MWCPCT['CP'].size # # #calculate P based on Cp # Power = np.zeros(NREL5MWCPCT['CP'].size) # for i in range(0, NREL5MWCPCT['CP'].size): # Power[i] = 0.5*air_density*NREL5MWCPCT['CP'][i]*np.pi*(rotorDiameter[0]/2.0)**(2.0)*NREL5MWCPCT['wind_speed'][i]**(3.0) # # B = np.array([NREL5MWCPCT['wind_speed'], Power, NREL5MWCPCT['CT']]) # B = np.transpose(B) # b = np.copy(B) # WT = WindTurbine(name='test_turbine', refCurvesFile=b, H=hubHeight[0], R=rotorDiameter[0]) # # #Make WindFarm instance # # xcoord = np.ones(nTurbines) # ycoord = np.ones(nTurbines) # # a = np.array([xcoord, ycoord]) # # # ---- Modify test.yml file to match number of turbines ---- # # yml_coordinates = [] # for i in range(0, nTurbines): # yml_coordinates.append({'position': [100.0*i, 100.0*i], 'turbine_type': 'NREL5MW', 'name': 'WT', 'row': 1}) # # yml = '../data/turbine_data/NREL5MW.yml' # # test_yml = WTLayout(yml) # # test_yml.data['layout'] = yml_coordinates # # ctcurve = [] # powcurve = [] # # #print(NREL5MWCPCT['CP'].size) # # plt.figure() # # plt.plot(NREL5MWCPCT['wind_speed'], NREL5MWCPCT['CT']) # # plt.show() # # #quit() # # for i in range(0, NREL5MWCPCT['CP'].size): # ctcurve.append([NREL5MWCPCT['wind_speed'][i], NREL5MWCPCT['CT'][i]]) # powcurve.append([NREL5MWCPCT['wind_speed'][i], Power[i]]) # # test_yml.data['turbine_types'][0]['c_t_curve'] = ctcurve # test_yml.data['turbine_types'][0]['power_curve'] = powcurve # # # create temporary yml filename # temp_yml = '../data/turbine_data/temp.yml' # # with open(temp_yml, 'w') as f: # yaml.dump(test_yml.data, f, default_flow_style=False) # # ----------------------------------------------------------- # # # # create windfarm instance from temp_yml data # WF = WindFarm(name='Test_Farm', yml=temp_yml, array=a, WT=WT) # # os.remove(temp_yml) # # model_options['wf_instance'] = WF # # prob = Problem(root=AEPGroup(nTurbines, nDirections, wake_model=larsen_wrapper, wake_model_options=model_options, # params_IdepVar_func=add_larsen_params_IndepVarComps, # params_IndepVar_args={'nTurbines': nTurbines, 'datasize': model_options['datasize']})) # # # initialize problem # prob.setup(check=True) # # # assign values to turbine states # prob['turbineX'] = turbineX # prob['turbineY'] = turbineY # prob['yaw0'] = yaw # # # assign values to constant inputs (not design variables) # prob['rotorDiameter'] = rotorDiameter # prob['hubHeight'] = hubHeight # prob['axialInduction'] = axialInduction # prob['generatorEfficiency'] = generatorEfficiency # prob['windSpeeds'] = np.array([wind_speed]) # prob['air_density'] = air_density # prob['windDirections'] = np.array([wind_direction]) # prob['windFrequencies'] = np.array([wind_frequency]) # prob['Ct_in'] = Ct # prob['Cp_in'] = Cp # prob['model_params:Ia'] = Ia # # # run the problem # prob.run() # # self.prob = prob # # def testImport(self): # self.assertEqual(self.working_import, True, "larsen_wrapper Import Failed") # # def testRun(self): # np.testing.assert_allclose(self.prob['wtVelocity0'], np.array([8., 8., 6.796097, 6.796097, 6.573742, 6.573742])) class TestGaussWrapper(unittest.TestCase): def setUp(self): try: from wakeexchange.gauss import gauss_wrapper, add_gauss_params_IndepVarComps self.working_import = True except: self.working_import = False # define turbine locations in global reference frame turbineX = np.array([1164.7, 947.2, 1682.4, 1464.9, 1982.6, 2200.1]) turbineY = np.array([1024.7, 1335.3, 1387.2, 1697.8, 2060.3, 1749.7]) hubHeight = np.zeros_like(turbineX)+90. # import matplotlib.pyplot as plt # plt.plot(turbineX, turbineY, 'o') # plt.plot(np.array([0.0, ])) # plt.show() # initialize input variable arrays nTurbines = turbineX.size rotorDiameter = np.zeros(nTurbines) axialInduction = np.zeros(nTurbines) Ct = np.zeros(nTurbines) Cp = np.zeros(nTurbines) generatorEfficiency = np.zeros(nTurbines) yaw = np.zeros(nTurbines) # define initial values for turbI in range(0, nTurbines): rotorDiameter[turbI] = 126.4 # m axialInduction[turbI] = 1.0/3.0 Ct[turbI] = 4.0*axialInduction[turbI]*(1.0-axialInduction[turbI]) Cp[turbI] = 0.7737/0.944 * 4.0 * 1.0/3.0 * np.power((1 - 1.0/3.0), 2) generatorEfficiency[turbI] = 0.944 yaw[turbI] = 0. # deg. # Define flow properties nDirections = 1 wind_speed = 8.0 # m/s air_density = 1.1716 # kg/m^3 wind_direction = 270.-0.523599*180./np.pi # deg (N = 0 deg., using direction FROM, as in met-mast data) wind_frequency = 1. # probability of wind in this direction at this speed # set up problem wake_model_options = {'nSamples': 0} prob = Problem(root=AEPGroup(nTurbines=nTurbines, nDirections=nDirections, wake_model=gauss_wrapper, wake_model_options=wake_model_options, datasize=0, use_rotor_components=False, params_IdepVar_func=add_gauss_params_IndepVarComps, differentiable=True, params_IndepVar_args={})) # initialize problem prob.setup(check=True) # assign values to turbine states prob['turbineX'] = turbineX prob['turbineY'] = turbineY prob['hubHeight'] = hubHeight prob['yaw0'] = yaw # assign values to constant inputs (not design variables) prob['rotorDiameter'] = rotorDiameter prob['axialInduction'] = axialInduction prob['generatorEfficiency'] = generatorEfficiency prob['windSpeeds'] = np.array([wind_speed]) prob['air_density'] = air_density prob['windDirections'] = np.array([wind_direction]) prob['windFrequencies'] = np.array([wind_frequency]) prob['Ct_in'] = Ct prob['Cp_in'] = Cp # run the problem prob.run() print prob['wtVelocity0'], prob['turbineX'], prob['turbineY'] self.prob = prob def testImport(self): self.assertEqual(self.working_import, True, "gauss_wrapper Import Failed") def testRun(self): np.testing.assert_allclose(self.prob['wtVelocity0'], np.array([ 8., 8., 5.922961, 5.922961, 5.478532, 5.478241])) if __name__ == "__main__": unittest.main()
40.185185
133
0.574255
1,850
16,275
4.941622
0.145946
0.020674
0.043754
0.00525
0.723255
0.702363
0.686174
0.677642
0.633669
0.633669
0
0.060257
0.296406
16,275
405
134
40.185185
0.738101
0.596252
0
0.722689
0
0
0.079477
0.00766
0
0
0
0
0.033613
0
null
null
0
0.159664
null
null
0.008403
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
21cc703f3d4a4b8a67ee7e2ea3bf7802d6b33e52
977
py
Python
testData/typeinspectionv18/overrideInit.py
alek-sun/pydantic-pycharm-plugin
6b07519aadf0ff8b8a644c1f9ede88e09c687c80
[ "Apache-2.0", "MIT" ]
238
2019-08-05T12:46:09.000Z
2022-03-25T08:53:25.000Z
testData/typeinspectionv18/overrideInit.py
alek-sun/pydantic-pycharm-plugin
6b07519aadf0ff8b8a644c1f9ede88e09c687c80
[ "Apache-2.0", "MIT" ]
415
2019-07-15T17:39:35.000Z
2022-03-31T01:18:38.000Z
testData/typeinspectionv18/overrideInit.py
collerek/pydantic-pycharm-plugin
7068ece42334cc9fbe927d779d199c86d5139888
[ "Apache-2.0", "MIT" ]
7
2019-08-09T01:03:16.000Z
2022-02-08T03:28:19.000Z
from pydantic import BaseModel class A(BaseModel): abc: str = '123' def __init__(self): pass A() class B(BaseModel): abc: str = '123' def __init__(self, a: float, b: int): pass B(abc='123'<warning descr="null">)</warning> class C(BaseModel): abc: str = '123' def __init__(self, a: float, b: int = 123): pass C(abc='123'<warning descr="null">)</warning> # class D(BaseModel): # abc: str = '123' # def __init__(self, *a): # pass # # C(abc='123') # # class E(BaseModel): # abc: str = '123' # def __init__(self, **a): # pass # E(abc='123') class F(C): abc: str = '123' def __init__(self, c: float, d: str): super(F, self).__init__(...) F(abc='123'<warning descr="null">)</warning> class G(C): abc: str = '123' def __new__(self, c: float, d: str): super(F, self).__init__(...) G(abc='123') class H(C): pass H(abc='123'<warning descr="null">)</warning>
17.446429
47
0.549642
141
977
3.553191
0.191489
0.083832
0.125749
0.167665
0.782435
0.754491
0.664671
0.403194
0.403194
0.155689
0
0.06156
0.251791
977
55
48
17.763636
0.623803
0.194473
0
0.37931
0
0
0.059432
0
0
0
0
0
0
0
null
null
0.137931
0.034483
null
null
0
0
0
0
null
0
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
1
0
0
0
0
0
4
1d051c46614f1151b0203d1021021db398273d06
89
py
Python
ner_trainer/forms.py
johnfraney/django-ner-trainer
38a02a858412eab2d4721659ee33a6e8721199ea
[ "MIT" ]
6
2018-07-26T12:11:21.000Z
2021-07-14T07:08:55.000Z
ner_trainer/forms.py
johnfraney/django-ner-trainer
38a02a858412eab2d4721659ee33a6e8721199ea
[ "MIT" ]
null
null
null
ner_trainer/forms.py
johnfraney/django-ner-trainer
38a02a858412eab2d4721659ee33a6e8721199ea
[ "MIT" ]
4
2019-03-31T06:29:53.000Z
2022-03-18T17:27:33.000Z
from django import forms class ModelTestForm(forms.Form): text = forms.CharField()
14.833333
32
0.741573
11
89
6
0.818182
0
0
0
0
0
0
0
0
0
0
0
0.168539
89
5
33
17.8
0.891892
0
0
0
0
0
0
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
df009865762587d1007f3f7139e861ac75fe14bb
133
py
Python
parsers/__init__.py
vintage/jokes_app
de18b0bd786841e2ea506105aa205b66ce2b5692
[ "MIT" ]
3
2017-07-13T06:47:23.000Z
2017-11-19T08:21:38.000Z
parsers/__init__.py
vintage/jokes_app
de18b0bd786841e2ea506105aa205b66ce2b5692
[ "MIT" ]
1
2019-08-01T13:39:08.000Z
2021-03-23T07:15:42.000Z
parsers/__init__.py
vintage/jokes_app
de18b0bd786841e2ea506105aa205b66ce2b5692
[ "MIT" ]
null
null
null
# Copy to .venv/lib/python3.6/site-packages/enchant/share/enchant/myspell # https://github.com/elastic/hunspell/tree/master/dicts/pl
44.333333
73
0.789474
21
133
5
0.952381
0
0
0
0
0
0
0
0
0
0
0.015748
0.045113
133
2
74
66.5
0.811024
0.962406
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
df0973906e2e28e9a0ffb26a5c82bba2915b1dc2
139
py
Python
scripts/python/test_naoqi.py
plus44/hcr-2016
20c7312fa1b9bd36434852f2d0d3b5b0cc289cc7
[ "Apache-2.0" ]
null
null
null
scripts/python/test_naoqi.py
plus44/hcr-2016
20c7312fa1b9bd36434852f2d0d3b5b0cc289cc7
[ "Apache-2.0" ]
null
null
null
scripts/python/test_naoqi.py
plus44/hcr-2016
20c7312fa1b9bd36434852f2d0d3b5b0cc289cc7
[ "Apache-2.0" ]
null
null
null
#! /home/admin/venvs/hcr-2016/bin/python import sys print '\n'.join(sys.path) import naoqi if __name__ == '__main__': print "Naoqi Test"
17.375
40
0.71223
22
139
4.136364
0.818182
0
0
0
0
0
0
0
0
0
0
0.032787
0.122302
139
7
41
19.857143
0.713115
0.280576
0
0
0
0
0.20202
0
0
0
0
0
0
0
null
null
0
0.4
null
null
0.4
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
4
df38658053445855800c66fb717ebfdb22768f78
128
py
Python
snippets - pandas/plotting-pandas.py
bjfisica/MachineLearning
20349301ae7f82cd5048410b0cf1f7a5f7d7e5a2
[ "MIT" ]
52
2019-02-15T16:37:13.000Z
2022-02-17T18:34:30.000Z
snippets - pandas/plotting-pandas.py
RodeoBlues/Complete-Data-Science-Toolkits
c5e83889e24af825ec3baed6e8198debb135f1ff
[ "MIT" ]
null
null
null
snippets - pandas/plotting-pandas.py
RodeoBlues/Complete-Data-Science-Toolkits
c5e83889e24af825ec3baed6e8198debb135f1ff
[ "MIT" ]
22
2017-11-25T23:42:16.000Z
2019-01-07T09:22:35.000Z
import pandas as pd #histogram for each column df.plot.hist() #scatter chart using pairs of points df.plot.scatter(x='w',y='h')
25.6
36
0.742188
24
128
3.958333
0.875
0.126316
0
0
0
0
0
0
0
0
0
0
0.125
128
5
37
25.6
0.848214
0.46875
0
0
0
0
0.029851
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
df4ccadd48ef65ce73e0ea13f4e72f45bf8f773d
381
py
Python
INBa/2015/RotkinAM/Zadacha_2_21.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
INBa/2015/RotkinAM/Zadacha_2_21.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
INBa/2015/RotkinAM/Zadacha_2_21.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
# Задача 2. Вариант 21. # Напишите программу, которая будет выводить на экран наиболее понравившееся вам высказывание, автором которого является Леонардо да Винчи. Не забудьте о том, что автор должен быть упомянут на отдельной строке. # Rotkin A.M. # 02.04.2016 print ('За сладкое приходтся горько расплачиваться') print ("\nЛеонардо да Винчи") input ("Нажмите Enter для выхода")
42.333333
210
0.779528
54
381
5.5
0.925926
0.047138
0
0
0
0
0
0
0
0
0
0.033846
0.146982
381
8
211
47.625
0.88
0.664042
0
0
0
0
0.691057
0
0
0
0
0
0
1
0
true
0
0
0
0
0.666667
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
1
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
df84b813e3c65c88ad94c8eed596c5b13b13d18b
567
py
Python
gesture_digit_prediction_app/hello/models.py
qiulongquan/DS_Research
864181b458e5af6f22b471d1598b7d96b3efc757
[ "Apache-2.0" ]
1
2020-11-08T07:26:22.000Z
2020-11-08T07:26:22.000Z
gesture_digit_prediction_app/hello/models.py
qiulongquan/DS_Research
864181b458e5af6f22b471d1598b7d96b3efc757
[ "Apache-2.0" ]
null
null
null
gesture_digit_prediction_app/hello/models.py
qiulongquan/DS_Research
864181b458e5af6f22b471d1598b7d96b3efc757
[ "Apache-2.0" ]
null
null
null
from django.db import models class Hello(models.Model): your_name = models.CharField(max_length=15) def __str__(self): return "<{0}>".format(self.your_name) class Qiu(models.Model): qiu_name = models.CharField(max_length=15) def __str__(self): return self.qiu_name class Hello1(models.Model): qiu_name1 = models.CharField(max_length=20) def __str__(self): return "<{0}>".format(self.qiu_name1) class Img(models.Model): img = models.ImageField(upload_to='img') name = models.CharField(max_length=100)
20.25
47
0.68254
79
567
4.607595
0.367089
0.120879
0.197802
0.263736
0.434066
0.357143
0.357143
0.252747
0.252747
0.252747
0
0.030369
0.186949
567
27
48
21
0.759219
0
0
0.1875
0
0
0.022928
0
0
0
0
0
0
1
0.1875
false
0
0.0625
0.1875
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
4
df92dd7a57c9a33e613c07064ef90d83f737c5b5
142
py
Python
libreasso/communication/apps.py
codoit/libreasso
fd9f12e958be4087d3a70582677007ed7f7a6eb3
[ "MIT" ]
1
2016-12-19T17:26:00.000Z
2016-12-19T17:26:00.000Z
libreasso/communication/apps.py
codoit/libreasso
fd9f12e958be4087d3a70582677007ed7f7a6eb3
[ "MIT" ]
17
2017-01-05T15:54:03.000Z
2017-01-05T15:55:13.000Z
libreasso/communication/apps.py
codoit/libreasso
fd9f12e958be4087d3a70582677007ed7f7a6eb3
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from django.apps import AppConfig class CommunicationConfig(AppConfig): name = 'communication'
17.75
39
0.809859
15
142
7.333333
0.8
0
0
0
0
0
0
0
0
0
0
0
0.140845
142
7
40
20.285714
0.901639
0
0
0
0
0
0.091549
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
10c276665fdc1e825769c5b7cc90dc3c42bee62b
37
py
Python
{{ cookiecutter.domain }}/custom_components/{{ cookiecutter.domain }}/const.py
Rihan9/cookiecutter-homeassistant-component
46bdd8e16d360562b0513a12f6c46df473bb4d89
[ "MIT" ]
26
2020-06-01T02:58:33.000Z
2022-03-26T00:55:06.000Z
{{ cookiecutter.domain }}/custom_components/{{ cookiecutter.domain }}/const.py
Rihan9/cookiecutter-homeassistant-component
46bdd8e16d360562b0513a12f6c46df473bb4d89
[ "MIT" ]
3
2020-09-09T13:54:59.000Z
2021-08-29T17:43:34.000Z
{{ cookiecutter.domain }}/custom_components/{{ cookiecutter.domain }}/const.py
Rihan9/cookiecutter-homeassistant-component
46bdd8e16d360562b0513a12f6c46df473bb4d89
[ "MIT" ]
14
2020-06-01T12:28:08.000Z
2022-03-20T16:07:23.000Z
DOMAIN = "{{ cookiecutter.domain }}"
18.5
36
0.648649
3
37
8
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.135135
37
1
37
37
0.75
0
0
0
0
0
0.675676
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
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
10c592d9473d66ce7243d0ca836019f719f1800a
35
py
Python
venv/lib/python3.6/tempfile.py
bradjballard/personal_search_engine
530c5224721a7d700ca0c7c78a513bbc81f05c38
[ "NCSA" ]
null
null
null
venv/lib/python3.6/tempfile.py
bradjballard/personal_search_engine
530c5224721a7d700ca0c7c78a513bbc81f05c38
[ "NCSA" ]
null
null
null
venv/lib/python3.6/tempfile.py
bradjballard/personal_search_engine
530c5224721a7d700ca0c7c78a513bbc81f05c38
[ "NCSA" ]
null
null
null
/anaconda/lib/python3.6/tempfile.py
35
35
0.828571
6
35
4.833333
1
0
0
0
0
0
0
0
0
0
0
0.057143
0
35
1
35
35
0.771429
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
10c83c58eb3b561c0d0dd30c346ea077d7b88fb9
110
py
Python
env/lib/python3.6/site-packages/openpyxl/workbook/external_link/__init__.py
anthowen/duplify
846d01c1b21230937fdf0281b0cf8c0b08a8c24e
[ "MIT" ]
34
2018-07-13T11:30:46.000Z
2022-01-05T13:48:10.000Z
env/lib/python3.6/site-packages/openpyxl/workbook/external_link/__init__.py
anthowen/duplify
846d01c1b21230937fdf0281b0cf8c0b08a8c24e
[ "MIT" ]
31
2017-01-05T06:07:28.000Z
2018-05-27T13:13:06.000Z
env/lib/python3.6/site-packages/openpyxl/workbook/external_link/__init__.py
anthowen/duplify
846d01c1b21230937fdf0281b0cf8c0b08a8c24e
[ "MIT" ]
22
2018-07-13T11:30:48.000Z
2021-09-25T13:30:08.000Z
from __future__ import absolute_import # Copyright (c) 2010-2015 openpyxl from .external import ExternalLink
22
38
0.827273
14
110
6.142857
0.785714
0
0
0
0
0
0
0
0
0
0
0.083333
0.127273
110
4
39
27.5
0.8125
0.290909
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
10db451650724fae34f4118e5abab33ead216fab
121
py
Python
scenario.py
bdgamesdev/universal
1e7f28343efc4fb52403c8143f929bb5b2026185
[ "MIT" ]
null
null
null
scenario.py
bdgamesdev/universal
1e7f28343efc4fb52403c8143f929bb5b2026185
[ "MIT" ]
null
null
null
scenario.py
bdgamesdev/universal
1e7f28343efc4fb52403c8143f929bb5b2026185
[ "MIT" ]
null
null
null
class Scenario: timeLimit = 5 type = 'orbit' def __init__(self, title, *kwargs): self.title = title
17.285714
39
0.595041
14
121
4.857143
0.785714
0.264706
0
0
0
0
0
0
0
0
0
0.011765
0.297521
121
6
40
20.166667
0.788235
0
0
0
0
0
0.041322
0
0
0
0
0
0
1
0.2
false
0
0
0
0.8
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
10eb2eb1e1c0179f273edc5b429b658630b21635
132
py
Python
lib/fmd/actions.py
GonzaloAlvarez/py-ga-sysadmin
fbbbbcad36df9f1b3e40328ff48c22bad13a56f4
[ "MIT" ]
2
2018-01-05T15:32:06.000Z
2021-06-02T13:15:05.000Z
lib/fmd/actions.py
GonzaloAlvarez/devops-tools
fbbbbcad36df9f1b3e40328ff48c22bad13a56f4
[ "MIT" ]
67
2017-01-09T19:39:19.000Z
2018-02-28T05:33:40.000Z
lib/fmd/actions.py
GonzaloAlvarez/devops-tools
fbbbbcad36df9f1b3e40328ff48c22bad13a56f4
[ "MIT" ]
null
null
null
from addaction import AddAction from showaction import ShowAction from getaction import GetAction from listaction import ListAction
26.4
33
0.878788
16
132
7.25
0.375
0
0
0
0
0
0
0
0
0
0
0
0.121212
132
4
34
33
1
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
10ee981491e95e5c5b7bf67f7fa5bf9b027269ad
327
py
Python
Classification/NaiveBayes/Multinomial-Naive-Bayes/mnb_classifier.py
avinashingit/Machine-Learning-in-Python
db63ebee78b396b01430bd4ad8dd4d7b7d5eefe8
[ "MIT" ]
null
null
null
Classification/NaiveBayes/Multinomial-Naive-Bayes/mnb_classifier.py
avinashingit/Machine-Learning-in-Python
db63ebee78b396b01430bd4ad8dd4d7b7d5eefe8
[ "MIT" ]
null
null
null
Classification/NaiveBayes/Multinomial-Naive-Bayes/mnb_classifier.py
avinashingit/Machine-Learning-in-Python
db63ebee78b396b01430bd4ad8dd4d7b7d5eefe8
[ "MIT" ]
1
2020-01-31T13:09:21.000Z
2020-01-31T13:09:21.000Z
# For building the Gaussioan Naive Bayes classifier, Iris dataset from Scikit Learn is being used. from sklearn.datasets import load_iris # Importing necessary scikit learn libraries from sklearn.model_selection import train_test_split from sklearn.naive_bayes import MultinomialNB from sklearn.metrics import accuracy_score
36.333333
98
0.853211
46
327
5.934783
0.673913
0.161172
0
0
0
0
0
0
0
0
0
0
0.122324
327
8
99
40.875
0.95122
0.425076
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
10f9f94a2cb6881a8dc2262a9b2572388d4dc96b
3,524
py
Python
reviewboard/reviews/tests/test_preview_review_request_email_view.py
amalik2/reviewboard
676aa2dce38ce619a74f2d4cb3cfae9bce21416e
[ "MIT" ]
921
2015-01-01T15:26:28.000Z
2022-03-29T11:30:38.000Z
reviewboard/reviews/tests/test_preview_review_request_email_view.py
amalik2/reviewboard
676aa2dce38ce619a74f2d4cb3cfae9bce21416e
[ "MIT" ]
5
2015-03-17T18:57:47.000Z
2020-10-02T13:24:31.000Z
reviewboard/reviews/tests/test_preview_review_request_email_view.py
amalik2/reviewboard
676aa2dce38ce619a74f2d4cb3cfae9bce21416e
[ "MIT" ]
285
2015-01-12T06:24:36.000Z
2022-03-29T11:03:50.000Z
"""Unit tests for reviewboard.reviews.views.PreviewReviewRequestEmailView.""" from __future__ import unicode_literals from django.contrib.auth.models import User from reviewboard.site.urlresolvers import local_site_reverse from reviewboard.testing import TestCase class PreviewReviewRequestEmailViewTests(TestCase): """Unit tests for reviewboard.reviews.views.PreviewReviewRequestEmailView. """ fixtures = ['test_users', 'test_scmtools'] def test_access_with_debug(self): """Testing PreviewReviewRequestEmailView access with DEBUG=True""" review_request = self.create_review_request(publish=True) with self.settings(DEBUG=True): response = self.client.get( local_site_reverse( 'preview-review-request-email', kwargs={ 'review_request_id': review_request.pk, 'message_format': 'text', })) self.assertEqual(response.status_code, 200) def test_access_without_debug(self): """Testing PreviewReviewRequestEmailView access with DEBUG=False""" review_request = self.create_review_request(publish=True) with self.settings(DEBUG=False): response = self.client.get( local_site_reverse( 'preview-review-request-email', kwargs={ 'review_request_id': review_request.pk, 'message_format': 'text', })) self.assertEqual(response.status_code, 404) def test_with_valid_change_id(self): """Testing PreviewReviewRequestEmailView access with valid change ID""" user = User.objects.create_user('test_user') review_request = self.create_review_request(create_repository=True, publish=True, target_people=[user]) self.create_diffset(review_request, draft=True) review_request.publish(review_request.submitter) with self.settings(DEBUG=True): response = self.client.get( local_site_reverse( 'preview-review-request-email', kwargs={ 'review_request_id': review_request.pk, 'message_format': 'text', 'changedesc_id': review_request.changedescs.get().pk, })) self.assertEqual(response.status_code, 200) def test_with_invalid_change_id(self): """Testing PreviewReviewRequestEmailView access with invalid change ID """ user = User.objects.create_user('test_user') review_request = self.create_review_request(create_repository=True, publish=True, target_people=[user]) self.create_diffset(review_request, draft=True) review_request.publish(review_request.submitter) with self.settings(DEBUG=True): response = self.client.get( local_site_reverse( 'preview-review-request-email', kwargs={ 'review_request_id': review_request.pk, 'message_format': 'text', 'changedesc_id': 100, })) self.assertEqual(response.status_code, 404)
38.725275
79
0.577753
321
3,524
6.087227
0.221184
0.179632
0.040942
0.094166
0.821904
0.821904
0.801945
0.61566
0.588536
0.588536
0
0.006421
0.337117
3,524
90
80
39.155556
0.830051
0.11748
0
0.790323
0
0
0.103605
0.036375
0
0
0
0
0.064516
1
0.064516
false
0
0.064516
0
0.16129
0
0
0
0
null
0
0
0
1
1
1
0
0
0
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
10ff6f610857fa4da1c2272a7ab5705a925dfc69
98
py
Python
core_backend/apps.py
PoieoDev/User-Accounts-Template
1e6586d9a79d3df61d6ae7589415f23e8aeeea07
[ "MIT" ]
null
null
null
core_backend/apps.py
PoieoDev/User-Accounts-Template
1e6586d9a79d3df61d6ae7589415f23e8aeeea07
[ "MIT" ]
null
null
null
core_backend/apps.py
PoieoDev/User-Accounts-Template
1e6586d9a79d3df61d6ae7589415f23e8aeeea07
[ "MIT" ]
null
null
null
from django.apps import AppConfig class CoreBackendConfig(AppConfig): name = 'core_backend'
16.333333
35
0.77551
11
98
6.818182
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.153061
98
5
36
19.6
0.903614
0
0
0
0
0
0.122449
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
80159b75aa113a30275dad91c182d915e6dabf31
142
py
Python
boot.py
matejv/micropython-weatherstation
3c357fa14d83bb6a21388f953cc994601a6e8eda
[ "MIT" ]
7
2017-04-16T16:52:00.000Z
2019-07-26T14:53:19.000Z
boot.py
matejv/micropython-weatherstation
3c357fa14d83bb6a21388f953cc994601a6e8eda
[ "MIT" ]
1
2017-02-02T07:21:49.000Z
2017-02-02T07:21:49.000Z
boot.py
matejv/micropython-weatherstation
3c357fa14d83bb6a21388f953cc994601a6e8eda
[ "MIT" ]
null
null
null
# This file is executed on every boot (including wake-boot from deepsleep) #import esp #esp.osdebug(None) import gc gc.collect() gc.enable()
17.75
74
0.753521
23
142
4.652174
0.782609
0
0
0
0
0
0
0
0
0
0
0
0.140845
142
7
75
20.285714
0.877049
0.697183
0
0
0
0
0
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
80343257862fe0dd8bcfe32668eea5bd1de6aed0
52
py
Python
examples/test/__init__.py
mattsb42/xy-tag
75f8a8141beb9f5be62357b949ac8686472b24a6
[ "Apache-2.0" ]
5
2020-05-18T20:47:52.000Z
2022-03-29T05:39:32.000Z
examples/test/__init__.py
mattsb42/xy-tag
75f8a8141beb9f5be62357b949ac8686472b24a6
[ "Apache-2.0" ]
55
2019-10-18T05:32:34.000Z
2020-01-10T07:54:04.000Z
examples/test/__init__.py
mattsb42/xy-tag
75f8a8141beb9f5be62357b949ac8686472b24a6
[ "Apache-2.0" ]
2
2020-05-16T19:23:02.000Z
2020-11-26T05:42:17.000Z
"""Put tests for the examples in this directory."""
26
51
0.711538
8
52
4.625
1
0
0
0
0
0
0
0
0
0
0
0
0.153846
52
1
52
52
0.840909
0.865385
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
8040173e381ef7cb4b3fc1f2e9d60d3bcfc17f3e
2,328
py
Python
FlatBufferSchemaGenerator/python/FlatBufferObserver.py
cnheider/droid
1687cb50cadba867d9e8a7b670629008c948b38e
[ "Apache-2.0" ]
null
null
null
FlatBufferSchemaGenerator/python/FlatBufferObserver.py
cnheider/droid
1687cb50cadba867d9e8a7b670629008c948b38e
[ "Apache-2.0" ]
null
null
null
FlatBufferSchemaGenerator/python/FlatBufferObserver.py
cnheider/droid
1687cb50cadba867d9e8a7b670629008c948b38e
[ "Apache-2.0" ]
null
null
null
# automatically generated by the FlatBuffers compiler, do not modify # namespace: State import flatbuffers class FlatBufferObserver(object): __slots__ = ['_tab'] @classmethod def GetRootAsFlatBufferObserver(cls, buf, offset): n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) x = FlatBufferObserver() x.Init(buf, n + offset) return x # FlatBufferObserver def Init(self, buf, pos): self._tab = flatbuffers.table.Table(buf, pos) # FlatBufferObserver def Name(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) if o != 0: return self._tab.String(o + self._tab.Pos) return "" # FlatBufferObserver def Data(self, j): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) if o != 0: a = self._tab.Vector(o) return self._tab.Get(flatbuffers.number_types.Uint8Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 1)) return 0 # FlatBufferObserver def DataLength(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) if o != 0: return self._tab.VectorLen(o) return 0 # FlatBufferObserver def Posrotdir(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) if o != 0: x = self._tab.Indirect(o + self._tab.Pos) from .FlatBufferPosRotDir import FlatBufferPosRotDir obj = FlatBufferPosRotDir() obj.Init(self._tab.Bytes, x) return obj return None def FlatBufferObserverStart(builder): builder.StartObject(3) def FlatBufferObserverAddName(builder, name): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0) def FlatBufferObserverAddData(builder, data): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(data), 0) def FlatBufferObserverStartDataVector(builder, numElems): return builder.StartVector(1, numElems, 1) def FlatBufferObserverAddPosrotdir(builder, posrotdir): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(posrotdir), 0) def FlatBufferObserverEnd(builder): return builder.EndObject()
38.8
156
0.698454
259
2,328
6.142857
0.293436
0.057197
0.12445
0.17599
0.274041
0.274041
0.152106
0.152106
0.152106
0.152106
0
0.011315
0.202749
2,328
59
157
39.457627
0.845905
0.07646
0
0.190476
1
0
0.001867
0
0
0
0
0
0
1
0.285714
false
0
0.047619
0.047619
0.595238
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
1
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
3377756caf446ee92705d76468e482dd3c3c56ac
110
py
Python
contrib/pyln-spec/bolt7/pyln/spec/bolt7/gen_version.py
endothermicdev/lightning
c7d359baf455e5260dc5d126b05211279e186ef8
[ "MIT" ]
null
null
null
contrib/pyln-spec/bolt7/pyln/spec/bolt7/gen_version.py
endothermicdev/lightning
c7d359baf455e5260dc5d126b05211279e186ef8
[ "MIT" ]
null
null
null
contrib/pyln-spec/bolt7/pyln/spec/bolt7/gen_version.py
endothermicdev/lightning
c7d359baf455e5260dc5d126b05211279e186ef8
[ "MIT" ]
null
null
null
__base_version__ = "1.0" __post_version__ = "222" __gitversion__ = "f1c797df2966237244527c1c6343dbe9bc765342"
27.5
59
0.827273
9
110
8.555556
0.888889
0
0
0
0
0
0
0
0
0
0
0.336634
0.081818
110
3
60
36.666667
0.425743
0
0
0
0
0
0.418182
0.363636
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
33785c10eb7a2f5238f0edbd3dfe035be9261d0c
341
py
Python
torchio/transforms/intensity_transform.py
soumickmj/torchio
5ec12c7ea9bf9cfd70e17e90fcc03621272cef9c
[ "MIT" ]
1
2021-01-22T21:49:30.000Z
2021-01-22T21:49:30.000Z
torchio/transforms/intensity_transform.py
soumickmj/torchio
5ec12c7ea9bf9cfd70e17e90fcc03621272cef9c
[ "MIT" ]
null
null
null
torchio/transforms/intensity_transform.py
soumickmj/torchio
5ec12c7ea9bf9cfd70e17e90fcc03621272cef9c
[ "MIT" ]
null
null
null
from .transform import Transform class IntensityTransform(Transform): """Transform that modifies voxel intensities only.""" @staticmethod def get_images(sample): return sample.get_images(intensity_only=True) @staticmethod def get_images_dict(sample): return sample.get_images_dict(intensity_only=True)
26.230769
58
0.741935
39
341
6.282051
0.487179
0.146939
0.146939
0.195918
0.220408
0
0
0
0
0
0
0
0.178886
341
12
59
28.416667
0.875
0.13783
0
0.25
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.125
0.25
0.75
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
338c9535d561db6ca060d229712697b437641c99
25
py
Python
tests/__init__.py
Edward-Knight/option6
2948695eb8ff1b22fa2ce9c04f85b736bc98d8c2
[ "MIT" ]
1
2021-02-08T23:20:59.000Z
2021-02-08T23:20:59.000Z
tests/__init__.py
Edward-Knight/option6
2948695eb8ff1b22fa2ce9c04f85b736bc98d8c2
[ "MIT" ]
1
2021-02-09T10:51:23.000Z
2021-02-09T10:51:23.000Z
tests/__init__.py
Edward-Knight/option6
2948695eb8ff1b22fa2ce9c04f85b736bc98d8c2
[ "MIT" ]
null
null
null
"""Tests for option6."""
12.5
24
0.6
3
25
5
1
0
0
0
0
0
0
0
0
0
0
0.045455
0.12
25
1
25
25
0.636364
0.72
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
339a81a0255bdf3a1fa6edb8c4f81f8eb4bca8c0
101
py
Python
scripts/portal/profession11.py
Snewmy/swordie
ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17
[ "MIT" ]
9
2021-04-26T11:59:29.000Z
2021-12-20T13:15:27.000Z
scripts/portal/profession11.py
Snewmy/swordie
ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17
[ "MIT" ]
null
null
null
scripts/portal/profession11.py
Snewmy/swordie
ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17
[ "MIT" ]
6
2021-07-14T06:32:05.000Z
2022-02-06T02:32:56.000Z
# Herb Town (251000000) => Ardentmill sm.setReturnField() sm.setReturnPortal() sm.warp(910001000, 6)
20.2
37
0.752475
12
101
6.333333
0.833333
0
0
0
0
0
0
0
0
0
0
0.208791
0.09901
101
4
38
25.25
0.626374
0.346535
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
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
33a4a6bd6696b6d3f7f614b451cc33496d9165fa
952
py
Python
tests/unit/gui/test_gui.py
matthewgdv/iohandler
1df420dd3ae2e022d0aa4db864fd4af0dbd665cc
[ "MIT" ]
1
2019-08-28T17:03:27.000Z
2019-08-28T17:03:27.000Z
tests/unit/gui/test_gui.py
matthewgdv/iohandler
1df420dd3ae2e022d0aa4db864fd4af0dbd665cc
[ "MIT" ]
null
null
null
tests/unit/gui/test_gui.py
matthewgdv/iohandler
1df420dd3ae2e022d0aa4db864fd4af0dbd665cc
[ "MIT" ]
null
null
null
class TestGui: def test_start(self): # synced assert True def test_end(self): # synced assert True def test_closeEvent(self): # synced assert True class TestThreePartGui: def test_start(self): # synced assert True class TestHtmlGui: pass class TestSystemTrayGui: class TestNotificationLevel: pass def test_add_tray_option(self): # synced assert True def test_notify(self): # synced assert True def test_start(self): # synced assert True def test__add_default_options(self): # synced assert True def test__trigger(self): # synced assert True def test__shutdown(self): # synced assert True class TestProgressBarGui: def test___iter__(self): # synced assert True def test___next__(self): # synced assert True def test_start(self): # synced assert True
17.962264
50
0.629202
109
952
5.238532
0.247706
0.15937
0.364273
0.455342
0.651489
0.555166
0.318739
0.262697
0.262697
0.182137
0
0
0.309874
952
52
51
18.307692
0.869102
0.094538
0
0.558824
0
0
0
0
0
0
0
0
0.382353
1
0.382353
false
0.058824
0
0
0.558824
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
4
33bb3dba6ba5b625fe5cf4f70e25aeae3cafe24f
95
py
Python
Exercicios/aula08a.py
Vitmambro/Python9
d084e6fd8230b71e4dade87086a411210e131320
[ "MIT" ]
null
null
null
Exercicios/aula08a.py
Vitmambro/Python9
d084e6fd8230b71e4dade87086a411210e131320
[ "MIT" ]
null
null
null
Exercicios/aula08a.py
Vitmambro/Python9
d084e6fd8230b71e4dade87086a411210e131320
[ "MIT" ]
null
null
null
import emoji print(emoji.emojize(' Ola mundo :sunglasses:', use_aliases=True))
7.307692
65
0.642105
11
95
5.454545
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.242105
95
12
66
7.916667
0.833333
0
0
0
0
0
0.261364
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
1
0
4
33d2b934d1604144667cc9d5e178b0a84377ef88
201
py
Python
python/orientacao-objetos-2/ABCs.py
LMThomaz-Study/cursos-alura
eeb9d29b5627365309ee0b0d69cae18e6166ccac
[ "MIT" ]
null
null
null
python/orientacao-objetos-2/ABCs.py
LMThomaz-Study/cursos-alura
eeb9d29b5627365309ee0b0d69cae18e6166ccac
[ "MIT" ]
null
null
null
python/orientacao-objetos-2/ABCs.py
LMThomaz-Study/cursos-alura
eeb9d29b5627365309ee0b0d69cae18e6166ccac
[ "MIT" ]
null
null
null
from abc import ABC # abstract base class from collections.abc import MutableSequence from number import Complex class Playlist(MutableSequence): pass filmes = Playlist() num = Complex(1, 2)
15.461538
43
0.761194
26
201
5.884615
0.615385
0.117647
0
0
0
0
0
0
0
0
0
0.012121
0.179104
201
12
44
16.75
0.915152
0.094527
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0.142857
0.428571
0
0.571429
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
0
1
1
0
1
0
0
4
33d49199210bdab53a1c95e998d2a61711888f00
9,101
py
Python
rectified_gaussian.py
david-salac/Rectified-Gaussian-distribution
305f8bd2e3ff02b0528947bff06f0fce58dab36f
[ "MIT" ]
1
2021-04-28T11:26:57.000Z
2021-04-28T11:26:57.000Z
rectified_gaussian.py
david-salac/Rectified-Gaussian-distribution
305f8bd2e3ff02b0528947bff06f0fce58dab36f
[ "MIT" ]
null
null
null
rectified_gaussian.py
david-salac/Rectified-Gaussian-distribution
305f8bd2e3ff02b0528947bff06f0fce58dab36f
[ "MIT" ]
null
null
null
from typing import Tuple, Union import numpy as np from scipy.special import erf class RectifiedGaussianDistribution(object): """Implementation of the rectified Gaussian distribution. To see what is the rectified Gaussian distribution, visit: https://en.wikipedia.org/wiki/Rectified_Gaussian_distribution Attributes: RTOL (float): relative tolerance for masks. ATOL (float): absolute tolerance for masks. """ # tolerances to use when fixing numerical precision RTOL = 0.0 ATOL = 0.001 @classmethod def rectified_gaussian(cls, mu: np.ndarray, std: np.ndarray) -> Tuple[np.ndarray, np.ndarray]: """Application of the rectified Gaussian distribution for lower bound equal to zero. The resulting probability distributions are rectified Gaussians see https://en.wikipedia.org/wiki/Rectified_Gaussian_distribution Args: mu (np.ndarray): Vector of mean values. std (np.ndarray): Vector of standard deviations. Notes: The resulting distributions are NOT normal. Returns: Tuple[np.ndarray, np.ndarray]: tuple of numpy arrays (mu, std) of resulting distributions. """ if np.all(np.isnan(std)): # uncertainty is not known # fall back to deterministic clip _mu = np.clip(mu, 0, None) _std = std.copy() return _mu, _std # clip boundary a = np.zeros_like(mu) # transformed constraint c = (a - mu) / std # simplified from reference as upper limit b=inf here mu_t = ( 1 / np.sqrt(2 * np.pi) * np.exp(-c ** 2 / 2) + c / 2 * (1 + erf(c / np.sqrt(2))) ) # again, simplified from reference as upper limit b=inf here std_t_sq = ( (mu_t ** 2 + 1) / 2 * (1 - erf(c / np.sqrt(2))) + 1 / np.sqrt(2 * np.pi) * (c - 2 * mu_t) * np.exp(-c ** 2 / 2) + (c - mu_t) ** 2 / 2 * (1 + erf(c / np.sqrt(2))) ) # we're going to sqrt std_t_sq later so we don't want marginally # negative numbers fouling that operation # large negative numbers are erroneous and should raise an exception, # so we can ignore them here # create two bool arrays: # - is the value negative? # - is it within atol of 0? # logically AND these two bool arrays small_negative_mask = (std_t_sq < 0) & np.isclose(std_t_sq, 0.0, rtol=cls.RTOL, atol=cls.ATOL) # use the resulting mask to set these values to 0 std_t_sq[small_negative_mask] = 0.0 _mu = mu + std * mu_t _std = std * np.sqrt(std_t_sq) # fix slight violations of limits (due to numerical precision) mask = (_mu < 0) & np.isclose(_mu, 0, rtol=cls.RTOL, atol=cls.ATOL) _mu[mask] = 0.0 return _mu, _std @classmethod def rectified_gaussian_general_bound(cls, mu: np.ndarray, std: np.ndarray, lower: Union[np.ndarray, float], upper: Union[np.ndarray, float] ) -> Tuple[np.ndarray, np.ndarray]: """Application of the rectified Gaussian distribution for gneral lower and upper bounds (including infinity). The resulting probability distributions are rectified Gaussians see https://en.wikipedia.org/wiki/Rectified_Gaussian_distribution Args: lower (Union[np.ndarray, float]): Lower bound or bounds, also accepts float('-inf') option to reflect only the upper bound. upper (Union[np.ndarray, float]): Upper bound or bounds, also accepts float('+inf') option to reflect only the lower bound. mu (np.ndarray): Vector of mean values. std (np.ndarray): Vector of standard deviations. Notes: The resulting distributions are NOT normal. Returns: Tuple[np.ndarray, np.ndarray]: tuple of numpy arrays (mu, std) of resulting distributions. """ if np.all(np.isnan(std)): # uncertainty is not known # fall back to deterministic clip _mu = np.clip(mu, lower, upper) _std = std.copy() return _mu, _std # clip boundary a = lower b = upper # transformed constraint c = (a - mu) / std d = (b - mu) / std # general version from reference mu_t = ( 1 / np.sqrt(2 * np.pi) * ( np.exp(-c ** 2 / 2) - np.exp(-d ** 2 / 2) ) + c / 2 * (1 + erf(c / np.sqrt(2))) + d / 2 * (1 - erf(d / np.sqrt(2))) ) if isinstance(lower, float) and lower == float('-inf'): # because of: lim n-> -inf (n * exp(-n^2)) = 0 mu_t = ( 1 / np.sqrt(2 * np.pi) * ( - np.exp(-d ** 2 / 2) ) + d / 2 * (1 - erf(d / np.sqrt(2))) ) if isinstance(upper, float) and upper == float('+inf'): # because of: lim n-> inf (-n * exp(-n^2)) = 0 mu_t = ( 1 / np.sqrt(2 * np.pi) * ( np.exp(-c ** 2 / 2) ) + c / 2 * (1 + erf(c / np.sqrt(2))) ) # general version from reference std_t_sq = ( (mu_t ** 2 + 1) / 2 * ( erf(d / np.sqrt(2)) - erf(c / np.sqrt(2)) ) - 1 / np.sqrt(2 * np.pi) * ( (d - 2 * mu_t) * np.exp(-d ** 2 / 2) - (c - 2 * mu_t) * np.exp(-c ** 2 / 2) ) + (c - mu_t) ** 2 / 2 * (1 + erf(c / np.sqrt(2))) + (d - mu_t) ** 2 / 2 * (1 - erf(d / np.sqrt(2))) ) if isinstance(lower, float) and lower == float('-inf'): # (for Q, K, J const in R): # lim c->-inf (-Q * erf(c) + (K * c * exp(-c^2)) # + J * c^2 * (1 + erf(c))) = Q std_t_sq = ( (mu_t ** 2 + 1) / 2 * ( erf(d / np.sqrt(2)) + 1 ) - 1 / np.sqrt(2 * np.pi) * ( (d - 2 * mu_t) * np.exp(-d ** 2 / 2) ) + (d - mu_t) ** 2 / 2 * (1 - erf(d / np.sqrt(2))) ) if isinstance(upper, float) and upper == float('+inf'): # (for Q, K, J const in R): # lim d->inf (Q * erf(d) + (K * d * exp(-d^2)) + # J * d^2 * (1 - erf(d))) = Q std_t_sq = ( (mu_t ** 2 + 1) / 2 * ( 1 - erf(c / np.sqrt(2)) ) - 1 / np.sqrt(2 * np.pi) * ( - (c - 2 * mu_t) * np.exp(-c ** 2 / 2) ) + (c - mu_t) ** 2 / 2 * (1 + erf(c / np.sqrt(2))) ) # To check the values of limits, try Wolfram Alpha: # https://www.wolframalpha.com # we're going to sqrt std_t_sq later so we don't want marginally # negative numbers fouling that operation # large negative numbers are erroneous and should raise an exception, # so we can ignore them here # create two bool arrays: # - is the value negative? # - is it within atol of 0? # logically AND these two bool arrays small_negative_mask = (std_t_sq < 0) & np.isclose(std_t_sq, 0.0, rtol=cls.RTOL, atol=cls.ATOL) # use the resulting mask to set these values to 0 std_t_sq[small_negative_mask] = 0 _mu = mu + std * mu_t _std = std * np.sqrt(std_t_sq) # fix slight violations of limits (due to numerical precision) mask = (_mu < lower) & np.isclose(_mu, lower, rtol=cls.RTOL, atol=cls.ATOL) if isinstance(lower, np.ndarray): _mu[mask] = lower[mask] else: _mu[mask] = lower mask = (_mu > upper) & np.isclose(_mu, upper, rtol=cls.RTOL, atol=cls.ATOL) if isinstance(upper, np.ndarray): _mu[mask] = upper[mask] else: _mu[mask] = upper return _mu, _std
35.972332
78
0.452478
1,092
9,101
3.684982
0.163919
0.037276
0.04001
0.013419
0.79001
0.752982
0.738569
0.718439
0.688618
0.649851
0
0.02544
0.438523
9,101
252
79
36.115079
0.762035
0.354357
0
0.565891
0
0
0.002874
0
0
0
0
0
0
1
0.015504
false
0
0.023256
0
0.093023
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
33dc1bc8737ae5efb9539a0e2630c93788a5dee3
70
py
Python
src/coberturas_medicas/__init__.py
mava-ar/sgk
cb8b3abf243b4614e6a45e4e2db5bb7cce94dee4
[ "Apache-2.0" ]
null
null
null
src/coberturas_medicas/__init__.py
mava-ar/sgk
cb8b3abf243b4614e6a45e4e2db5bb7cce94dee4
[ "Apache-2.0" ]
32
2016-05-09T19:37:08.000Z
2022-01-13T01:00:52.000Z
src/coberturas_medicas/__init__.py
mava-ar/sgk
cb8b3abf243b4614e6a45e4e2db5bb7cce94dee4
[ "Apache-2.0" ]
null
null
null
default_app_config = 'coberturas_medicas.apps.CoberturasMedicasConfig'
70
70
0.9
7
70
8.571429
1
0
0
0
0
0
0
0
0
0
0
0
0.028571
70
1
70
70
0.882353
0
0
0
0
0
0.661972
0.661972
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
33f2a1181b60f50c26fb109838c1de75fa98f910
160
py
Python
services/scheduler/src/api/routes.py
dmenezesgabriel/celery-task-scheduler
9f4cc02e0bb884bae2e86d89c3841dea6b9d726e
[ "MIT" ]
null
null
null
services/scheduler/src/api/routes.py
dmenezesgabriel/celery-task-scheduler
9f4cc02e0bb884bae2e86d89c3841dea6b9d726e
[ "MIT" ]
11
2020-09-15T12:15:51.000Z
2020-11-03T01:18:46.000Z
services/scheduler/src/api/routes.py
dmenezesgabriel/celery-task-scheduler
9f4cc02e0bb884bae2e86d89c3841dea6b9d726e
[ "MIT" ]
null
null
null
from flask import Blueprint, jsonify bp = Blueprint("api", __name__, url_prefix="/api") @bp.route("/hello") def hello(): return jsonify("Hello, World!")
17.777778
50
0.68125
21
160
4.952381
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.14375
160
8
51
20
0.759124
0
0
0
0
0
0.1625
0
0
0
0
0
0
1
0.2
false
0
0.2
0.2
0.6
0.4
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
0
1
1
0
0
4
1d15e7acb91ccd3de12d84ce5f5173fde7c621a7
73
py
Python
python/api/pocapi/settings.py
osl-incubator/poc-api-multi-language
79bcac5684f7c8397434d3efe55bc95d5791b967
[ "MIT" ]
null
null
null
python/api/pocapi/settings.py
osl-incubator/poc-api-multi-language
79bcac5684f7c8397434d3efe55bc95d5791b967
[ "MIT" ]
null
null
null
python/api/pocapi/settings.py
osl-incubator/poc-api-multi-language
79bcac5684f7c8397434d3efe55bc95d5791b967
[ "MIT" ]
1
2022-03-23T04:48:51.000Z
2022-03-23T04:48:51.000Z
import os POCAPI_URL = os.getenv("POCAPI_URL", "http://localhost:6666")
18.25
61
0.726027
11
73
4.636364
0.727273
0.352941
0
0
0
0
0
0
0
0
0
0.060606
0.09589
73
3
62
24.333333
0.712121
0
0
0
0
0
0.424658
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
1d1678d331abf9de5f08c748bfc58f17ba31170e
51
py
Python
sets1.py
Kalpavrikshika/python_modules
9f338ab006dd5653fd7f65ff253bc50e0fd61fc6
[ "Apache-2.0" ]
1
2018-07-02T03:37:03.000Z
2018-07-02T03:37:03.000Z
sets1.py
Kalpavrikshika/python_modules
9f338ab006dd5653fd7f65ff253bc50e0fd61fc6
[ "Apache-2.0" ]
null
null
null
sets1.py
Kalpavrikshika/python_modules
9f338ab006dd5653fd7f65ff253bc50e0fd61fc6
[ "Apache-2.0" ]
null
null
null
a_set = {'red', 'blue', 'green'} print(type(a_set))
25.5
32
0.607843
9
51
3.222222
0.777778
0.275862
0
0
0
0
0
0
0
0
0
0
0.098039
51
2
33
25.5
0.630435
0
0
0
0
0
0.230769
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
1da4d87ac0986d231201bd1bb6e4a0fc6fc8d019
211
py
Python
watchmate_v1/watchlist_app/urls.py
rroy11705/Rest_API_With_Django
6a75db2e2c3913ec9afc1cbfef67a5c9fd655e60
[ "CNRI-Python" ]
null
null
null
watchmate_v1/watchlist_app/urls.py
rroy11705/Rest_API_With_Django
6a75db2e2c3913ec9afc1cbfef67a5c9fd655e60
[ "CNRI-Python" ]
null
null
null
watchmate_v1/watchlist_app/urls.py
rroy11705/Rest_API_With_Django
6a75db2e2c3913ec9afc1cbfef67a5c9fd655e60
[ "CNRI-Python" ]
null
null
null
from .views import movie_details, movie_list from django.urls import path, include urlpatterns = [ path('all/', movie_list, name="movie-list"), path('<int:pk>/', movie_details, name="movie-details"), ]
26.375
59
0.701422
29
211
4.965517
0.517241
0.25
0
0
0
0
0
0
0
0
0
0
0.137441
211
7
60
30.142857
0.791209
0
0
0
0
0
0.170616
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
d522254b8c4c695805f12c63573f2dacd4d1ded5
293
py
Python
notebooks/_solutions/case2_biodiversity_analysis16.py
rprops/Python_DS-WS
b2fc449a74be0c82863e5fcf1ddbe7d64976d530
[ "BSD-3-Clause" ]
65
2017-03-21T09:15:40.000Z
2022-02-01T23:43:08.000Z
notebooks/_solutions/case2_biodiversity_analysis16.py
rprops/Python_DS-WS
b2fc449a74be0c82863e5fcf1ddbe7d64976d530
[ "BSD-3-Clause" ]
100
2016-12-15T03:44:06.000Z
2022-03-07T08:14:07.000Z
notebooks/_solutions/case2_biodiversity_analysis16.py
rprops/Python_DS-WS
b2fc449a74be0c82863e5fcf1ddbe7d64976d530
[ "BSD-3-Clause" ]
52
2016-12-19T07:48:52.000Z
2022-02-19T17:53:48.000Z
heatmap_prep_plotnine = survey_data.groupby([survey_data['eventDate'].dt.year, survey_data['eventDate'].dt.month]).size() heatmap_prep_plotnine.index.names = ["year", "month"] heatmap_prep_plotnine = heatmap_prep_plotnine.reset_index(name='count')
73.25
87
0.675768
34
293
5.470588
0.470588
0.236559
0.408602
0.225806
0
0
0
0
0
0
0
0
0.191126
293
4
88
73.25
0.78481
0
0
0
0
0
0.108844
0
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
1
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
d555e94e143a29f11e123e6f014810777702c950
106
py
Python
mix_beta/example1.py
TomiBelan/multiparser
d23ee69c0771d2b0f899d1cc88bde16aa22f7a9f
[ "Apache-2.0" ]
null
null
null
mix_beta/example1.py
TomiBelan/multiparser
d23ee69c0771d2b0f899d1cc88bde16aa22f7a9f
[ "Apache-2.0" ]
null
null
null
mix_beta/example1.py
TomiBelan/multiparser
d23ee69c0771d2b0f899d1cc88bde16aa22f7a9f
[ "Apache-2.0" ]
null
null
null
print((:(:7:):)) a = (: [[lua string]] :) b = (: x .. y :) c = (: 1 + (: (: (yield 1) :) * 2 :) ^ -6 :)
15.142857
44
0.273585
14
106
2.071429
0.928571
0
0
0
0
0
0
0
0
0
0
0.067568
0.301887
106
6
45
17.666667
0.324324
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0.25
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
1
0
0
0
0
0
0
0
0
4
d55efdb47af4ac34ac2686622df940350716567f
386
py
Python
lb_ec2_db.py
DiptoChakrabarty/diagrams
6efaff8b06b49c071bf243bc266f0be9fdd70afb
[ "MIT" ]
null
null
null
lb_ec2_db.py
DiptoChakrabarty/diagrams
6efaff8b06b49c071bf243bc266f0be9fdd70afb
[ "MIT" ]
null
null
null
lb_ec2_db.py
DiptoChakrabarty/diagrams
6efaff8b06b49c071bf243bc266f0be9fdd70afb
[ "MIT" ]
null
null
null
from diagrams import Diagram from diagrams.aws.compute import EC2 from diagrams.aws.database import RDS from diagrams.aws.network import ELB with Diagram("Grouped Workers",show=True,direction="TB"): ELB("lb") >> [EC2("node1"), EC2("node2"), EC2("node3"), EC2("node4"), EC2("node5")] >> RDS("events")
29.692308
57
0.562176
44
386
4.931818
0.568182
0.221198
0.207373
0
0
0
0
0
0
0
0
0.040441
0.295337
386
12
58
32.166667
0.757353
0
0
0
0
0
0.129534
0
0
0
0
0
0
1
0
true
0
0.4
0
0.4
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
1
0
0
0
0
4
63418a81f50d1bd2426bb311f19ae09d97821011
63
py
Python
test.py
jessicafinnie/ExampleForClass
df675e5889b7851518bd14419057288b24187551
[ "MIT" ]
null
null
null
test.py
jessicafinnie/ExampleForClass
df675e5889b7851518bd14419057288b24187551
[ "MIT" ]
null
null
null
test.py
jessicafinnie/ExampleForClass
df675e5889b7851518bd14419057288b24187551
[ "MIT" ]
null
null
null
# Testing commit, push, pull in PyCharm print("Hello, world!")
21
39
0.714286
9
63
5
1
0
0
0
0
0
0
0
0
0
0
0
0.142857
63
3
40
21
0.833333
0.587302
0
0
0
0
0.52
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
6362b82e328d27e85d3822efc006649be370c499
123
py
Python
basic_syntax_conditional_statements_and_loops/lab/number_between_1_and_100.py
PetkoAndreev/Python-fundamentals
dcf2ecb65d7a82a6688a7529a14eb8a331a83256
[ "MIT" ]
null
null
null
basic_syntax_conditional_statements_and_loops/lab/number_between_1_and_100.py
PetkoAndreev/Python-fundamentals
dcf2ecb65d7a82a6688a7529a14eb8a331a83256
[ "MIT" ]
null
null
null
basic_syntax_conditional_statements_and_loops/lab/number_between_1_and_100.py
PetkoAndreev/Python-fundamentals
dcf2ecb65d7a82a6688a7529a14eb8a331a83256
[ "MIT" ]
null
null
null
num = float(input()) while num < 1 or num > 100: num = float(input()) print(f'The number {num} is between 1 and 100')
20.5
47
0.626016
22
123
3.5
0.636364
0.207792
0.337662
0
0
0
0
0
0
0
0
0.083333
0.219512
123
6
47
20.5
0.71875
0
0
0.5
0
0
0.298387
0
0
0
0
0
0
1
0
false
0
0
0
0
0.25
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
636542941608f361eff45699a289086724f66554
95
py
Python
pygfs/utils.py
eWaterCycle/pyGFS
3d2c533b7781c4ae94ac393877d91d4325e0c0cb
[ "Apache-2.0" ]
1
2021-05-19T05:42:28.000Z
2021-05-19T05:42:28.000Z
pygfs/utils.py
eWaterCycle/pyGFS
3d2c533b7781c4ae94ac393877d91d4325e0c0cb
[ "Apache-2.0" ]
null
null
null
pygfs/utils.py
eWaterCycle/pyGFS
3d2c533b7781c4ae94ac393877d91d4325e0c0cb
[ "Apache-2.0" ]
null
null
null
def check_gribfile(f): ''' check if file is a grib file and readeable ''' pass
15.833333
46
0.589474
14
95
3.928571
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.315789
95
5
47
19
0.846154
0.442105
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
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
1
0
1
0
0
0
0
0
4
6372ee8c2eee6d970a09c164123669b1173e689f
120
py
Python
easy_transformers/constants.py
ManoharSai2000/easy-transformers
9f10bcf469ff30093e3af763eaca066740fb1795
[ "Apache-2.0" ]
null
null
null
easy_transformers/constants.py
ManoharSai2000/easy-transformers
9f10bcf469ff30093e3af763eaca066740fb1795
[ "Apache-2.0" ]
null
null
null
easy_transformers/constants.py
ManoharSai2000/easy-transformers
9f10bcf469ff30093e3af763eaca066740fb1795
[ "Apache-2.0" ]
null
null
null
DEFAULT_MAX_LENGTH = 512 DEFAULT_EASY_TRANSFORMERS_CACHE_SIZE = 1 DEFAULT_EASY_TRANSFORMERS_TEXT_EMB_CACHE_SIZE = 10000
30
53
0.9
18
120
5.333333
0.666667
0.229167
0.479167
0
0
0
0
0
0
0
0
0.081081
0.075
120
3
54
40
0.783784
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
63786d836006075a18bb63e6fb9cab3c649282bd
6,526
py
Python
project/app/api/rental_pred_viz.py
labs26-citrics/Labs26-Citrics-DS-TeamB
980ff695f49be7bcb3ffdda38dba56049ef1e988
[ "MIT" ]
1
2021-01-04T19:32:50.000Z
2021-01-04T19:32:50.000Z
project/app/api/rental_pred_viz.py
labs26-citrics/Labs26-Citrics-DS-TeamB
980ff695f49be7bcb3ffdda38dba56049ef1e988
[ "MIT" ]
3
2020-09-08T22:27:35.000Z
2020-10-01T22:19:13.000Z
project/app/api/rental_pred_viz.py
labs26-citrics/Labs26-Citrics-DS-TeamB
980ff695f49be7bcb3ffdda38dba56049ef1e988
[ "MIT" ]
4
2020-10-13T21:56:42.000Z
2021-03-03T01:59:37.000Z
from fastapi import APIRouter, HTTPException import numpy as np import pandas as pd import plotly.graph_objects as go import plotly.express as px import os router = APIRouter() DATA_FILEPATH = os.path.join(os.path.dirname(__file__), "..", "..","data", "rental_all.csv") @router.get('/predict_rental/{city_id}') async def rental_viz_to_dict(city_id: int): """ Return time series estimates for rent of different types of apartments over the next 5 years ### Query Parameters: - `city_id`: [city_id], unique numeric mapping (ex: 0 returns Anchorage, AK) ### Response Dictionary object """ rt_dict = {} rt_data_dict = {} rt_data_dict_viz = {} df = pd.read_csv(DATA_FILEPATH, encoding='utf-8') dataframe = df[df['city_id']==city_id] rt_data = dataframe.to_numpy() rt_data_dict['id'] = rt_data[0][0] rt_data_dict['city'] = rt_data[0][1] rt_data_dict['state'] = rt_data[0][2] rt_data_dict['city_state'] = rt_data[0][3] rt_dict['data'] = rt_data_dict rt_dict['viz'] = rt_data_dict_viz rt_data_dict_viz["studio"] = studio_rental_viz(city_id) rt_data_dict_viz["1br"] = one_bed_viz(city_id) rt_data_dict_viz["2br"] = two_bed_viz(city_id) rt_data_dict_viz["3br"] = three_bed_viz(city_id) rt_data_dict_viz["4br"] = four_bed_viz(city_id) return rt_dict def studio_rental_viz(city_id): """ Visualize future rent estimates of Studio apartments for 2021-2025 ### Query Parameters: - `city_id`: [city_id], unique numeric mapping (ex: 0 returns Anchorage, AK) ### Response JSON string to render with react-plotly.js """ df = pd.read_csv(DATA_FILEPATH, encoding='utf-8') df = df.loc[df['city_id'] == city_id] x = df['year'].tolist() x_rev = x[::-1] y = df['st_yhat'].tolist() y_upper = df['st_yhat_upper'].tolist() y_lower = df['st_yhat_lower'].tolist() y_lower = y_lower[::-1] fig = go.Figure() fig.add_trace(go.Scatter( x=x+x_rev, y=y_upper+y_lower, fill='toself', fillcolor='rgba(0,100,80,0.2)', line_color='rgba(255,255,255,0)', showlegend=False, name='Studio', )) fig.add_trace(go.Scatter( x=x, y=y, line_color='rgb(0,100,80)', name='Studio', )) fig.update_traces(mode='lines') return fig.to_json() def one_bed_viz(city_id): """ Visualize future rent estimates of 1 Bedroom apartments for 2021-2025 ### Query Parameters: - `city_id`: [city_id], unique numeric mapping (ex: 0 returns Anchorage, AK) ### Response JSON string to render with react-plotly.js """ df = pd.read_csv(DATA_FILEPATH, encoding='utf-8') df = df.loc[df['city_id'] == city_id] x = df['year'].tolist() x_rev = x[::-1] y = df['one_yhat'].tolist() y_upper = df['one_yhat_upper'].tolist() y_lower = df['one_yhat_lower'].tolist() y_lower = y_lower[::-1] fig = go.Figure() fig.add_trace(go.Scatter( x=x+x_rev, y=y_upper+y_lower, fill='toself', fillcolor='rgba(0,176,246,0.2)', line_color='rgba(255,255,255,0)', showlegend=False, name='1BR', )) fig.add_trace(go.Scatter( x=x, y=y, line_color='rgb(0,176,246)', name='1BR', )) fig.update_traces(mode='lines') return fig.to_json() def two_bed_viz(city_id): """ Visualize future rent estimates of 2 Bedroom apartments for 2021-2025 ### Query Parameters: - `city_id`: [city_id], unique numeric mapping (ex: 0 returns Anchorage, AK) ### Response JSON string to render with react-plotly.js """ df = pd.read_csv(DATA_FILEPATH, encoding='utf-8') df = df.loc[df['city_id'] == city_id] x = df['year'].tolist() x_rev = x[::-1] y = df['two_yhat'].tolist() y_upper = df['two_yhat_upper'].tolist() y_lower = df['two_yhat_lower'].tolist() y_lower = y_lower[::-1] fig = go.Figure() fig.add_trace(go.Scatter( x=x+x_rev, y=y_upper+y_lower, fill='toself', fillcolor='rgba(231,107,243,0.2)', line_color='rgba(255,255,255,0)', showlegend=False, name='2BR', )) fig.add_trace(go.Scatter( x=x, y=y, line_color='rgb(231,107,243)', name='2BR', )) fig.update_traces(mode='lines') return fig.to_json() def three_bed_viz(city_id): """ Visualize future rent estimates of 3 Bedroom apartments for 2021-2025 ### Query Parameters: - `city_id`: [city_id], unique numeric mapping (ex: 0 returns Anchorage, AK) ### Response JSON string to render with react-plotly.js """ df = pd.read_csv(DATA_FILEPATH, encoding='utf-8') df = df.loc[df['city_id'] == city_id] x = df['year'].tolist() x_rev = x[::-1] y = df['three_yhat'].tolist() y_upper = df['three_yhat_upper'].tolist() y_lower = df['three_yhat_lower'].tolist() y_lower = y_lower[::-1] fig = go.Figure() fig.add_trace(go.Scatter( x=x+x_rev, y=y_upper+y_lower, fill='toself', fillcolor='rgba(255,178,102,0.2)', line_color='rgba(255,255,255,0)', showlegend=False, name='3BR', )) fig.add_trace(go.Scatter( x=x, y=y, line_color='rgb(255,178,102)', name='3BR', )) fig.update_traces(mode='lines') return fig.to_json() def four_bed_viz(city_id): """ Visualize future rent estimates of 4 Bedroom apartments for 2021-2025 ### Query Parameters: - `city_id`: [city_id], unique numeric mapping (ex: 0 returns Anchorage, AK) ### Response JSON string to render with react-plotly.js """ df = pd.read_csv(DATA_FILEPATH, encoding='utf-8') df = df.loc[df['city_id'] == city_id] x = df['year'].tolist() x_rev = x[::-1] y = df['four_yhat'].tolist() y_upper = df['four_yhat_upper'].tolist() y_lower = df['four_yhat_lower'].tolist() y_lower = y_lower[::-1] fig = go.Figure() fig.add_trace(go.Scatter( x=x+x_rev, y=y_upper+y_lower, fill='toself', fillcolor='rgba(51,51,255,0.2)', line_color='rgba(255,255,255,0)', showlegend=False, name='4BR', )) fig.add_trace(go.Scatter( x=x, y=y, line_color='rgb(51,51,255)', name='4BR', )) fig.update_traces(mode='lines') return fig.to_json()
21.973064
96
0.596843
977
6,526
3.763562
0.141249
0.058744
0.035355
0.039162
0.796029
0.749796
0.709546
0.703563
0.672559
0.606745
0
0.045307
0.245786
6,526
296
97
22.047297
0.701747
0.176371
0
0.639241
0
0
0.14716
0.013544
0
0
0
0
0
1
0.031646
false
0
0.037975
0
0.107595
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
63a10e3867c93ef6e2a403378b7afcbe977b5a3c
172
py
Python
panel/widgets/__init__.py
arianon/panel
634d9b65fe7973f7875b827a22ef18fc74120725
[ "MIT" ]
null
null
null
panel/widgets/__init__.py
arianon/panel
634d9b65fe7973f7875b827a22ef18fc74120725
[ "MIT" ]
null
null
null
panel/widgets/__init__.py
arianon/panel
634d9b65fe7973f7875b827a22ef18fc74120725
[ "MIT" ]
null
null
null
from ..widget import Widget from .bitcoin import bitcoin from .clock import clock, calendar from .music import music from .volume import volume from .memory import memory
21.5
34
0.802326
25
172
5.52
0.36
0
0
0
0
0
0
0
0
0
0
0
0.151163
172
7
35
24.571429
0.945205
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
8965fcb7879e775552cad013b775944c4222f025
3,323
py
Python
openpnm/models/__init__.py
halotudio/openPNM-copy2
d400ec65e9421256a531f6d22a38255b002d5dcb
[ "MIT" ]
1
2021-05-01T11:10:43.000Z
2021-05-01T11:10:43.000Z
openpnm/models/__init__.py
Jimmy-INL/OpenPNM
1546fa1ac2204443bde916f2037fac383c5069ae
[ "MIT" ]
null
null
null
openpnm/models/__init__.py
Jimmy-INL/OpenPNM
1546fa1ac2204443bde916f2037fac383c5069ae
[ "MIT" ]
null
null
null
r""" **openpnm.models** ---- This module contains a selection of pore-scale models for calculating geometrical, thermophysical, and multiphysics transport properties. ---- **Using Prewritten Models from the Library** OpenPNM includes a solid library of pre-written models for most basic and standard scenarios. These are broken up into 4 categores: *geometry*, *phases*, *physics*, and *misc*. These are further categorized by the type of information they calculate, such as grouping all models that calculate viscosity or throat length. Utilizing a model on a object requires using the ``add_model`` method. This is demonstrated below: >>> import openpnm as op >>> pn = op.network.Cubic([5, 5, 5]) >>> pn.add_model(propname='pore.seed', ... model=op.models.misc.random, ... element='pore', ... num_range=[0.1, 0.9]) Upon being added to the object the models are run. The resulting data is placed into the object using the ``propname`` as a key. Inspecting the object reveals that these two data items are indeed present. >>> print(pn.props()) ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― 1 : pore.coords 2 : pore.seed 3 : throat.conns ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― The actual models and their respective parameters are also stored on the object under the ``models`` attribute, which is dictionary with the same keys as the ``propnames``. This can also be inspected: >>> print(pn.models) ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # Property Name Parameter Value ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― 1 pore.coordination_number model: coordination_number regeneration mode: explicit ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― 2 pore.seed model: random element: pore num_range: [0.1, 0.9] seed: None regeneration mode: normal ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― Note that the model 'pore.coordination_number' is added to all GenericNetworks upon instantiation, but not run. This is why the model appears in the ``models`` attribute but the data does not yet appear when the ``props`` method is called. Finally, any of the models parameters can be edited by reaching into the ``models`` dictionary as follows: >>> pn.models['pore.seed']['num_range'] = [0.5, 0.9] The ``'pore.seed'`` values must be regenerated for this new parameter to take effect, and the ``'pore.diameter'`` model must also be regenerated to utilized the new seeds. This is accomplished using ``regenerate_models`` which automatically ensures that models are called in the correct order. >>> pn.regenerate_models() """ from . import misc from . import topology from . import geometry from . import phases from . import physics
40.036145
85
0.539874
372
3,323
6.129032
0.454301
0.017544
0.011842
0.017544
0.025439
0.025439
0.025439
0.025439
0.025439
0
0
0.008353
0.243455
3,323
82
86
40.52439
0.701273
0.963587
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.833333
0
0.833333
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
896ab830d31d4ae0126e9da6fffd5ca1f79bc426
241
py
Python
users/admin.py
ananthan-123/react-django
5305649f1d39e1f5b62eb17a4f40f67fe7cfd14b
[ "MIT" ]
null
null
null
users/admin.py
ananthan-123/react-django
5305649f1d39e1f5b62eb17a4f40f67fe7cfd14b
[ "MIT" ]
null
null
null
users/admin.py
ananthan-123/react-django
5305649f1d39e1f5b62eb17a4f40f67fe7cfd14b
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Patient, Doctor, UserInfo,Admin_Users # Register your models here. admin.site.register(UserInfo) admin.site.register(Patient) admin.site.register(Doctor) admin.site.register(Admin_Users)
26.777778
57
0.821577
34
241
5.764706
0.411765
0.183673
0.346939
0
0
0
0
0
0
0
0
0
0.082988
241
8
58
30.125
0.886878
0.107884
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
896c2ace62a35c240bb8d02122b9fd8d32e9885a
830
py
Python
xcparse/Xcode/XCSchemeActions/__init__.py
samdmarshall/xcparser
4f78af149127325e60e3785b6e09d6dbfeedc799
[ "BSD-3-Clause" ]
59
2015-02-27T21:45:37.000Z
2021-03-16T04:37:40.000Z
xcparse/Xcode/XCSchemeActions/__init__.py
samdmarshall/xcparser
4f78af149127325e60e3785b6e09d6dbfeedc799
[ "BSD-3-Clause" ]
14
2015-03-02T18:53:51.000Z
2016-07-19T23:20:23.000Z
xcparse/Xcode/XCSchemeActions/__init__.py
samdmarshall/xcparser
4f78af149127325e60e3785b6e09d6dbfeedc799
[ "BSD-3-Clause" ]
8
2015-03-02T02:32:09.000Z
2017-07-31T21:14:51.000Z
# from .Base_Action import * # # from .BuildAction import * # from .TestAction import * # from .LaunchAction import * # from .ProfileAction import * # from .AnalyzeAction import * # from .ArchiveAction import * # # from .BuildActionEntry import * # from .BuildableReference import * # from .BuildableProductRunnable import * # from .Testables import * from Base_Action import Base_Action # from BuildAction import BuildAction # from TestAction import TestAction # from LaunchAction import LaunchAction # from ProfileAction import ProfileAction # from AnalyzeAction import AnalyzeAction # from ArchiveAction import ArchiveAction # # from BuildActionEntry import BuildActionEntry # from BuildableReference import BuildableReference # from BuildableProductRunnable import BuildableProductRunnable # from Testables import Testables
29.642857
63
0.807229
80
830
8.3375
0.175
0.164918
0.041979
0.05997
0
0
0
0
0
0
0
0
0.137349
830
27
64
30.740741
0.931564
0.895181
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
89b3d9bc6b5d43822983d256ef5a1dde3cbecc59
97
py
Python
python3/PipeLikeInput.py
christianpopescu/PythonHelper
e6e647075dffeefc1c4375d25a604a2ae80bdd4d
[ "MIT" ]
null
null
null
python3/PipeLikeInput.py
christianpopescu/PythonHelper
e6e647075dffeefc1c4375d25a604a2ae80bdd4d
[ "MIT" ]
null
null
null
python3/PipeLikeInput.py
christianpopescu/PythonHelper
e6e647075dffeefc1c4375d25a604a2ae80bdd4d
[ "MIT" ]
null
null
null
import sys for line in sys.stdin: sys.stdout.write(line) sys.stdout.write("x\n")
16.166667
29
0.618557
16
97
3.75
0.625
0.3
0.466667
0
0
0
0
0
0
0
0
0
0.247423
97
5
30
19.4
0.821918
0
0
0
0
0
0.032609
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
89b8b28842383544b2dc122f5e744290238f974d
51
py
Python
tests/__init__.py
drinksober/django-impala-backend
8d8d44211905dd92a721acc9c3e24dd743ae6d75
[ "MIT" ]
1
2020-09-02T08:36:41.000Z
2020-09-02T08:36:41.000Z
tests/__init__.py
me-drinks/django-impala-backend
8d8d44211905dd92a721acc9c3e24dd743ae6d75
[ "MIT" ]
null
null
null
tests/__init__.py
me-drinks/django-impala-backend
8d8d44211905dd92a721acc9c3e24dd743ae6d75
[ "MIT" ]
null
null
null
"""Unit test package for django_impala_backend."""
25.5
50
0.764706
7
51
5.285714
1
0
0
0
0
0
0
0
0
0
0
0
0.098039
51
1
51
51
0.804348
0.862745
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
982716784cfedb3163df81545e6a24d0137dcca9
85
py
Python
socceraction/atomic/__init__.py
pientist/socceraction
7f8e666ee5da7c1890c72a2c72042d4c73b90fda
[ "MIT" ]
371
2019-07-25T07:35:00.000Z
2022-03-25T11:13:56.000Z
socceraction/atomic/__init__.py
pientist/socceraction
7f8e666ee5da7c1890c72a2c72042d4c73b90fda
[ "MIT" ]
145
2019-08-29T12:49:55.000Z
2022-03-31T09:35:05.000Z
socceraction/atomic/__init__.py
denisov-vlad/socceraction
0b03bc230bebb7e830d65aa231d961b879b828fb
[ "MIT" ]
101
2019-08-20T21:07:34.000Z
2022-03-26T10:00:00.000Z
# -*- coding: utf-8 -*- """Implements Atomic-SPADL and the Atomic-VAEP framework."""
28.333333
60
0.658824
11
85
5.090909
0.909091
0
0
0
0
0
0
0
0
0
0
0.013514
0.129412
85
2
61
42.5
0.743243
0.905882
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
982b583404e17569522eb8d5cb12cb7330c30af5
132
py
Python
platform/msb430/buildscripts/jtag/pyjtag/setup.py
s3lsensor/CEE155_SensorDeployLab_b
ad2d9ccf13ecfacb0a73115548fccfee3120f2a1
[ "Apache-2.0" ]
5
2016-05-20T10:40:23.000Z
2019-11-04T20:46:58.000Z
platform/msb430/buildscripts/jtag/pyjtag/setup.py
s3lsensor/CEE155_SensorDeployLab_b
ad2d9ccf13ecfacb0a73115548fccfee3120f2a1
[ "Apache-2.0" ]
6
2016-02-18T22:29:26.000Z
2016-02-18T22:31:54.000Z
platform/msb430/buildscripts/jtag/pyjtag/setup.py
s3lsensor/CEE155_SensorDeployLab_b
ad2d9ccf13ecfacb0a73115548fccfee3120f2a1
[ "Apache-2.0" ]
7
2015-11-24T23:09:12.000Z
2022-02-18T07:56:02.000Z
# setup.py from distutils.core import setup import glob import py2exe setup( name="msp430-jtag", scripts=["jtag.py"], )
14.666667
32
0.674242
18
132
4.944444
0.666667
0
0
0
0
0
0
0
0
0
0
0.037736
0.19697
132
9
33
14.666667
0.801887
0.060606
0
0
0
0
0.146341
0
0
0
0
0
0
1
0
true
0
0.428571
0
0.428571
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
983be58bb63dc7b647ea00d07052aed03e33357c
225
py
Python
Mundo 1/desafios/desafio003_soma de dois numeros.py
marioarl/python
0bd677cdbec87e9603866c09cb8009fef295b89b
[ "MIT" ]
1
2021-11-21T21:04:04.000Z
2021-11-21T21:04:04.000Z
Mundo 1/desafios/desafio003_soma de dois numeros.py
marioarl/python
0bd677cdbec87e9603866c09cb8009fef295b89b
[ "MIT" ]
null
null
null
Mundo 1/desafios/desafio003_soma de dois numeros.py
marioarl/python
0bd677cdbec87e9603866c09cb8009fef295b89b
[ "MIT" ]
null
null
null
print('\033[1;35m#\033[m'*10, '\033[1;30;46mDESAFIO 03\033[m', '\033[1;35m#\033[m'*10) n1 = int(input('\033[1;33mPrimeiro numero:\033[m ')) n2 = int(input('\033[1;36mSegundo numero:\033[m ')) r = n1 + n2 print('A soma é', r)
37.5
86
0.617778
46
225
3.021739
0.434783
0.143885
0.100719
0.143885
0.18705
0.18705
0
0
0
0
0
0.282178
0.102222
225
5
87
45
0.405941
0
0
0
0
0
0.604444
0
0
0
0
0
0
1
0
false
0
0
0
0
0.4
0
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
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
984b8c04887c7501cecb6fde367655eeb502c29a
153
py
Python
src/tests/functional/orga/test_init.py
td00/pretalx
aff450de9420fca167e04345fa24ee7140fae819
[ "Apache-2.0" ]
null
null
null
src/tests/functional/orga/test_init.py
td00/pretalx
aff450de9420fca167e04345fa24ee7140fae819
[ "Apache-2.0" ]
null
null
null
src/tests/functional/orga/test_init.py
td00/pretalx
aff450de9420fca167e04345fa24ee7140fae819
[ "Apache-2.0" ]
null
null
null
import pytest from django.core.management import call_command @pytest.mark.django_db def test_frab_import_minimal(superuser): call_command('init')
19.125
47
0.816993
22
153
5.409091
0.727273
0.184874
0
0
0
0
0
0
0
0
0
0
0.104575
153
7
48
21.857143
0.868613
0
0
0
0
0
0.026144
0
0
0
0
0
0
1
0.2
false
0
0.6
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
986332363d33a9f488a6d0159f4d3cda7543cedb
316
py
Python
butterfree/transform/features/__init__.py
fossabot/butterfree
8a7da8c540b51c6560b2825cb926c40a351f202b
[ "Apache-2.0" ]
208
2020-07-17T18:46:10.000Z
2022-03-21T12:44:12.000Z
butterfree/transform/features/__init__.py
fossabot/butterfree
8a7da8c540b51c6560b2825cb926c40a351f202b
[ "Apache-2.0" ]
124
2020-07-17T19:42:47.000Z
2021-07-21T00:38:05.000Z
butterfree/transform/features/__init__.py
fossabot/butterfree
8a7da8c540b51c6560b2825cb926c40a351f202b
[ "Apache-2.0" ]
30
2020-07-17T20:24:09.000Z
2022-03-17T00:50:37.000Z
"""Holds all feature types to be part of a FeatureSet.""" from butterfree.transform.features.feature import Feature from butterfree.transform.features.key_feature import KeyFeature from butterfree.transform.features.timestamp_feature import TimestampFeature __all__ = ["Feature", "KeyFeature", "TimestampFeature"]
39.5
76
0.822785
37
316
6.864865
0.513514
0.165354
0.271654
0.366142
0
0
0
0
0
0
0
0
0.091772
316
7
77
45.142857
0.885017
0.161392
0
0
0
0
0.127413
0
0
0
0
0
0
1
0
false
0
0.75
0
0.75
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
9882a6621e2f9d2ca4d617578cd087b3c1b9a289
74
py
Python
test/test_resources/python-unittest/py_several_files2/Root/application.py
jocelyn/codeboard_mantra
05a4c783dbae8d87b55c834382d8d12f957ffea9
[ "MIT" ]
1
2019-01-12T02:57:53.000Z
2019-01-12T02:57:53.000Z
test/test_resources/python-unittest/py_several_files2/Root/application.py
jocelyn/codeboard_mantra
05a4c783dbae8d87b55c834382d8d12f957ffea9
[ "MIT" ]
1
2017-10-13T11:57:41.000Z
2017-10-13T11:57:41.000Z
test/test_resources/python-unittest/py_several_files2/Root/application.py
jocelyn/codeboard_mantra
05a4c783dbae8d87b55c834382d8d12f957ffea9
[ "MIT" ]
6
2017-10-13T11:27:58.000Z
2020-10-06T19:06:22.000Z
from b import foo from c import bar1 foo() bar1() print "Goodbye, World!"
12.333333
23
0.716216
13
74
4.076923
0.692308
0
0
0
0
0
0
0
0
0
0
0.032787
0.175676
74
6
23
12.333333
0.836066
0
0
0
0
0
0.2
0
0
0
0
0
0
0
null
null
0
0.4
null
null
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
1
0
0
0
1
0
0
0
0
4
98b84f2d00e3ba83b7f11923d13f3649921ba036
632
py
Python
generated-libraries/python/netapp/net/device_capability.py
radekg/netapp-ontap-lib-get
6445ebb071ec147ea82a486fbe9f094c56c5c40d
[ "MIT" ]
2
2017-03-28T15:31:26.000Z
2018-08-16T22:15:18.000Z
generated-libraries/python/netapp/net/device_capability.py
radekg/netapp-ontap-lib-get
6445ebb071ec147ea82a486fbe9f094c56c5c40d
[ "MIT" ]
null
null
null
generated-libraries/python/netapp/net/device_capability.py
radekg/netapp-ontap-lib-get
6445ebb071ec147ea82a486fbe9f094c56c5c40d
[ "MIT" ]
null
null
null
class DeviceCapability(basestring): """ router|trans-bridge|source-route-bridge|switch|host|igmp|repeater|phone Possible values: <ul> <li> "router" - Router, <li> "trans_bridge" - Trans Bridge, <li> "source_route_bridge" - Source Route Bridge, <li> "switch" - Switch, <li> "host" - Host, <li> "igmp" - IGMP, <li> "repeater" - Repeater, <li> "phone" - Phone </ul> """ @staticmethod def get_api_name(): return "device-capability"
30.095238
75
0.474684
56
632
5.267857
0.446429
0.111864
0.172881
0.155932
0
0
0
0
0
0
0
0
0.400316
632
20
76
31.6
0.778364
0.699367
0
0
0
0
0.130769
0
0
0
0
0
0
1
0.25
true
0
0
0.25
0.75
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
1
1
0
0
4
7f30a1684896d53f541a481dace286d253b53f59
329
py
Python
core/interface/action.py
caostorm/smng
f1cff4010a0645ae8e1182cd3c961d97cecf4a6e
[ "MIT" ]
null
null
null
core/interface/action.py
caostorm/smng
f1cff4010a0645ae8e1182cd3c961d97cecf4a6e
[ "MIT" ]
null
null
null
core/interface/action.py
caostorm/smng
f1cff4010a0645ae8e1182cd3c961d97cecf4a6e
[ "MIT" ]
1
2019-06-26T13:05:45.000Z
2019-06-26T13:05:45.000Z
#coding=utf-8 from abc import ABCMeta, abstractmethod class server_action(object): __metaclass__ = ABCMeta def __init__(self): pass @abstractmethod def description(self): pass @abstractmethod def parse_parameters(self): pass @abstractmethod def run(self): pass
16.45
39
0.644377
34
329
5.941176
0.617647
0.158416
0.326733
0.371287
0
0
0
0
0
0
0
0.004255
0.285714
329
20
40
16.45
0.855319
0.036474
0
0.5
0
0
0
0
0
0
0
0
0
1
0.285714
false
0.285714
0.071429
0
0.5
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
4
7f3641e14ab8c811d8f476458187baa315cf5ceb
207
py
Python
otx_weblink/serializers.py
NYULibraries/dlts-enm-tct-backend
07455a660fb2cb8bc91a54f7f12d150923678157
[ "Apache-2.0" ]
null
null
null
otx_weblink/serializers.py
NYULibraries/dlts-enm-tct-backend
07455a660fb2cb8bc91a54f7f12d150923678157
[ "Apache-2.0" ]
2
2017-10-30T21:19:07.000Z
2017-10-31T18:06:30.000Z
otx_weblink/serializers.py
NYULibraries/dlts-enm-tct-backend
07455a660fb2cb8bc91a54f7f12d150923678157
[ "Apache-2.0" ]
null
null
null
from rest_framework import serializers from .models import Weblink class WeblinkSerializer(serializers.ModelSerializer): class Meta: model = Weblink fields = ('id', 'content', 'url')
20.7
53
0.700483
21
207
6.857143
0.761905
0
0
0
0
0
0
0
0
0
0
0
0.21256
207
9
54
23
0.883436
0
0
0
0
0
0.057971
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
7f869c0af68af9c1d7d792cbc21f501afee6f342
185
py
Python
testName.py
zafar21/Automatic-Form-Filler
4cb7f7d62e5b0927309eb17411ffd14343fcdeb4
[ "MIT" ]
null
null
null
testName.py
zafar21/Automatic-Form-Filler
4cb7f7d62e5b0927309eb17411ffd14343fcdeb4
[ "MIT" ]
null
null
null
testName.py
zafar21/Automatic-Form-Filler
4cb7f7d62e5b0927309eb17411ffd14343fcdeb4
[ "MIT" ]
null
null
null
import pyautogui import time pyautogui.click(300, 400) pyautogui.hotkey('ctrl', 'f') time.sleep(.200) pyautogui.typewrite('email') time.sleep(.200) pyautogui.locateOnScreen('mail.png')
20.555556
36
0.767568
25
185
5.68
0.64
0.126761
0.169014
0.295775
0
0
0
0
0
0
0
0.069364
0.064865
185
8
37
23.125
0.751445
0
0
0.25
0
0
0.097297
0
0
0
0
0
0
1
0
true
0
0.25
0
0.25
0
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
1
0
0
0
0
0
0
4
7f8763673577a30d433ba355c7239e3606ba5069
236
py
Python
vspkgenerator/vanilla/python/__overrides/nume.override.py
pdumais/vspkgenerator
b8fff474f4ef3d8a4278f9c116df01d057c56995
[ "BSD-3-Clause" ]
2
2015-10-10T08:59:39.000Z
2015-10-22T09:33:01.000Z
vspkgenerator/vanilla/python/__overrides/nume.override.py
rajeshnokia/vspkgenerator
b8fff474f4ef3d8a4278f9c116df01d057c56995
[ "BSD-3-Clause" ]
16
2015-11-05T13:15:30.000Z
2019-09-24T23:48:54.000Z
vspkgenerator/vanilla/python/__overrides/nume.override.py
pdumais/vspkgenerator
b8fff474f4ef3d8a4278f9c116df01d057c56995
[ "BSD-3-Clause" ]
13
2015-11-18T08:03:44.000Z
2020-12-24T03:39:29.000Z
def save(self, as_async=False, callback=None, **kwargs): """ """ if 'async' in kwargs.keys() and not as_async: as_async = kwargs['async'] super(NUMe, self).save(as_async=as_async, callback=callback, encrypted=False)
39.333333
81
0.665254
34
236
4.470588
0.5
0.230263
0.118421
0.184211
0
0
0
0
0
0
0
0
0.173729
236
5
82
47.2
0.779487
0
0
0
0
0
0.043668
0
0
0
0
0
0
1
0.25
false
0
0
0
0.25
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
f68c7b6a1c337b78b3059bef1f2eeb2a9a2ad6e5
208
py
Python
stackoverflow/__init__.py
wereii/we-cogs
327ef21f0a777b7411bbe51f6df69ef46433f597
[ "MIT" ]
null
null
null
stackoverflow/__init__.py
wereii/we-cogs
327ef21f0a777b7411bbe51f6df69ef46433f597
[ "MIT" ]
1
2019-11-13T18:55:10.000Z
2019-11-13T18:55:10.000Z
stackoverflow/__init__.py
wereii/we-cogs
327ef21f0a777b7411bbe51f6df69ef46433f597
[ "MIT" ]
null
null
null
# This init is required for each cog. # Import your main class from the cog's folder. from .stackoverflow import StackOverflow def setup(bot): # Add the cog to the bot. bot.add_cog(StackOverflow())
23.111111
47
0.725962
33
208
4.545455
0.636364
0.08
0
0
0
0
0
0
0
0
0
0
0.197115
208
8
48
26
0.898204
0.504808
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0
0.666667
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
f697747af011ec78b14bc18aa233c9ce0da6df30
205
py
Python
tests/unit/test_module.py
briancline/jmap
475198b5598c0fa4ae9c44d9dfcac88e36fe8ef1
[ "MIT" ]
6
2017-07-31T20:01:59.000Z
2021-07-10T21:48:11.000Z
tests/unit/test_module.py
briancline/jmap
475198b5598c0fa4ae9c44d9dfcac88e36fe8ef1
[ "MIT" ]
1
2017-05-13T07:30:00.000Z
2017-05-13T07:30:00.000Z
tests/unit/test_module.py
briancline/jmap
475198b5598c0fa4ae9c44d9dfcac88e36fe8ef1
[ "MIT" ]
3
2017-10-31T15:25:55.000Z
2020-12-10T16:58:52.000Z
import unittest import jmap class TestModule(unittest.TestCase): def test_module_semantic_version(self): ver_info = jmap.VERSION.split('.') self.assertGreaterEqual(len(ver_info), 3)
20.5
49
0.721951
25
205
5.72
0.72
0.097902
0
0
0
0
0
0
0
0
0
0.005917
0.17561
205
9
50
22.777778
0.840237
0
0
0
0
0
0.004878
0
0
0
0
0
0.166667
1
0.166667
false
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
f6eadc908b3d82e2b72632699e16d0a7a0e120a2
207
py
Python
Companyname/appgestion/admin.py
friedrrich/DesarrolloWebTest
43425c7c5c9edf06aabb3c6e499dd72df89ee369
[ "Apache-2.0" ]
null
null
null
Companyname/appgestion/admin.py
friedrrich/DesarrolloWebTest
43425c7c5c9edf06aabb3c6e499dd72df89ee369
[ "Apache-2.0" ]
null
null
null
Companyname/appgestion/admin.py
friedrrich/DesarrolloWebTest
43425c7c5c9edf06aabb3c6e499dd72df89ee369
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin # Register your models here. from appgestion.models import Cliente,Articulo,Pedido admin.site.register(Articulo) admin.site.register(Cliente) admin.site.register(Pedido)
18.818182
53
0.816425
28
207
6.035714
0.5
0.159763
0.301775
0
0
0
0
0
0
0
0
0
0.096618
207
10
54
20.7
0.903743
0.125604
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.4
0
0.4
0
1
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
0
0
0
4
100ad66b5c3e9588877b9fc6e88bd19765cc8458
240
py
Python
tests/wintools/test_file.py
yukkun007/wintools
df6521e91a3dc2c34e5fc599abbc4ea81dedc313
[ "MIT" ]
null
null
null
tests/wintools/test_file.py
yukkun007/wintools
df6521e91a3dc2c34e5fc599abbc4ea81dedc313
[ "MIT" ]
7
2021-09-27T20:48:49.000Z
2021-10-07T15:10:01.000Z
tests/wintools/test_file.py
mozkzki/wintools
df6521e91a3dc2c34e5fc599abbc4ea81dedc313
[ "MIT" ]
null
null
null
from wintools import print_files_info, print_info FILES = ["./tests/resources/test.iso"] class TestFile: def test_print_files_info(self): print_files_info(FILES) def test_print_info(self): print_info("./tests")
18.461538
49
0.704167
33
240
4.787879
0.424242
0.189873
0.265823
0
0
0
0
0
0
0
0
0
0.1875
240
12
50
20
0.810256
0
0
0
0
0
0.1375
0.108333
0
0
0
0
0
1
0.285714
false
0
0.142857
0
0.571429
0.714286
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
0
1
1
0
4
63e59bcf514276993297b798e6a593c65dcfaa90
101
py
Python
backendcode/backendcode/meetingbotapi/apps.py
khadarkhaja/vergadering
c0e32868f9f66721c4d1ce4785a2c81f214cff0d
[ "Apache-2.0" ]
null
null
null
backendcode/backendcode/meetingbotapi/apps.py
khadarkhaja/vergadering
c0e32868f9f66721c4d1ce4785a2c81f214cff0d
[ "Apache-2.0" ]
3
2020-06-05T17:52:31.000Z
2021-06-10T20:01:01.000Z
backendcode/backendcode/meetingbotapi/apps.py
KhadarKR/vergadering
c0e32868f9f66721c4d1ce4785a2c81f214cff0d
[ "Apache-2.0" ]
2
2018-03-09T16:07:53.000Z
2018-03-09T16:23:49.000Z
from django.apps import AppConfig class MeetingbotapiConfig(AppConfig): name = 'meetingbotapi'
16.833333
37
0.782178
10
101
7.9
0.9
0
0
0
0
0
0
0
0
0
0
0
0.148515
101
5
38
20.2
0.918605
0
0
0
0
0
0.128713
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
63eafa1370aec52376e0eb5249d8c5a03ab04f00
3,652
py
Python
fkie_node_manager_daemon/src/fkie_node_manager_daemon/exceptions.py
stertingen/multimaster_fkie
95c2f5fae71c8337cc18b02db4e529b6900a91b2
[ "BSD-3-Clause" ]
1
2021-12-17T17:16:52.000Z
2021-12-17T17:16:52.000Z
fkie_node_manager_daemon/src/fkie_node_manager_daemon/exceptions.py
stertingen/multimaster_fkie
95c2f5fae71c8337cc18b02db4e529b6900a91b2
[ "BSD-3-Clause" ]
null
null
null
fkie_node_manager_daemon/src/fkie_node_manager_daemon/exceptions.py
stertingen/multimaster_fkie
95c2f5fae71c8337cc18b02db4e529b6900a91b2
[ "BSD-3-Clause" ]
null
null
null
# Software License Agreement (BSD License) # # Copyright (c) 2018, Fraunhofer FKIE/CMS, Alexander Tiderko # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following # disclaimer in the documentation and/or other materials provided # with the distribution. # * Neither the name of Fraunhofer nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. from __future__ import division, absolute_import, print_function, unicode_literals from .common import utf8 class ListSelectionRequest(Exception): ''' ''' def __init__(self, choices, error): Exception.__init__(self) self.choices = choices self.error = error def __repr__(self): return "%s <choices=%s>::%s" % (self.__class__, utf8(self.choices), repr(self.error)) def __str__(self): return self.error class BinarySelectionRequest(ListSelectionRequest): pass class LaunchSelectionRequest(ListSelectionRequest): pass class ParamSelectionRequest(ListSelectionRequest): pass class StartException(Exception): pass class AlreadyOpenException(Exception): def __init__(self, path, error): Exception.__init__(self) self.path = path self.error = error def __repr__(self): return "%s <path=%s>::%s" % (self.__class__, utf8(self.path), repr(self.error)) def __str__(self): return self.error class ResourceNotFound(AlreadyOpenException): pass class RemoteException(Exception): def __init__(self, code, error): Exception.__init__(self) self.code = code self.error = error def __repr__(self): return "%s <code=%s>::%s" % (self.__class__, self.code, repr(self.error)) def __str__(self): return self.error class ConnectionException(Exception): def __init__(self, remote, error): Exception.__init__(self) self.remote = remote self.error = error def __repr__(self): return "%s %s::%s" % (self.__class__, self.remote, repr(self.error)) def __str__(self): return self.error class GrpcTimeout(Exception): def __init__(self, remote, error): Exception.__init__(self) self.remote = remote self.error = error def __repr__(self): return "%s <%s>::%s" % (self.__class__, utf8(self.remote), repr(self.error)) def __str__(self): return self.error
28.755906
93
0.705915
453
3,652
5.454746
0.359823
0.054634
0.032376
0.040469
0.347633
0.290571
0.273573
0.273573
0.234723
0.234723
0
0.002766
0.208105
3,652
126
94
28.984127
0.85166
0.424699
0
0.596491
0
0
0.034433
0
0
0
0
0
0
1
0.263158
false
0.087719
0.035088
0.175439
0.649123
0.017544
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
63ebfe56217de2a71b781d285b140d7ffc405647
117
py
Python
run.py
manugraj/ganimede
2a9288d01768e09ef8f94252165960c78ab88df1
[ "MIT" ]
3
2021-06-23T06:08:58.000Z
2022-01-15T20:56:54.000Z
run.py
manugraj/ganimede
2a9288d01768e09ef8f94252165960c78ab88df1
[ "MIT" ]
2
2021-06-13T07:05:34.000Z
2021-06-23T05:39:10.000Z
run.py
manugraj/ganimede
2a9288d01768e09ef8f94252165960c78ab88df1
[ "MIT" ]
1
2022-02-01T08:32:59.000Z
2022-02-01T08:32:59.000Z
import uvicorn import src.main if __name__ == '__main__': uvicorn.run(src.main.app, host='0.0.0.0', port=8000)
16.714286
56
0.683761
20
117
3.6
0.6
0.083333
0.083333
0
0
0
0
0
0
0
0
0.08
0.145299
117
6
57
19.5
0.64
0
0
0
0
0
0.128205
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
63fdd3f4280910bb636973ee1df67b1888e017fe
340
py
Python
celery_project/tools/exceptions.py
JasonLearning/dzdp_spider
2e09b1a18ae7f168ff1cd7457dc6b50f2cb364a7
[ "Apache-2.0" ]
null
null
null
celery_project/tools/exceptions.py
JasonLearning/dzdp_spider
2e09b1a18ae7f168ff1cd7457dc6b50f2cb364a7
[ "Apache-2.0" ]
null
null
null
celery_project/tools/exceptions.py
JasonLearning/dzdp_spider
2e09b1a18ae7f168ff1cd7457dc6b50f2cb364a7
[ "Apache-2.0" ]
null
null
null
# !/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 17/2/17 下午2:39 # @Author : Jason # @File : exceptions.py class InvalidGoodUrlException(Exception): pass class InvalidCategoryUrlException(Exception): pass class DocumentNotFoundException(Exception): pass class InvalidParamException(Exception): pass
15.454545
45
0.688235
34
340
6.882353
0.705882
0.222222
0.230769
0
0
0
0
0
0
0
0
0.032967
0.197059
340
21
46
16.190476
0.824176
0.332353
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
121240feaf02f8178ec17474cc615822de1faa36
411
py
Python
twikwak17/phases/__init__.py
shaypal5/gender_augmented_twitter_network
3a33feb4dfdb9413201d7844a15ecacf21ef9ba0
[ "MIT" ]
null
null
null
twikwak17/phases/__init__.py
shaypal5/gender_augmented_twitter_network
3a33feb4dfdb9413201d7844a15ecacf21ef9ba0
[ "MIT" ]
null
null
null
twikwak17/phases/__init__.py
shaypal5/gender_augmented_twitter_network
3a33feb4dfdb9413201d7844a15ecacf21ef9ba0
[ "MIT" ]
null
null
null
"""The different phases of the data generation pipeline.""" from .phase1 import ( # noqa: F401 phase1, ) from .phase2 import ( # noqa: F401 phase2, ) from .phase3 import ( # noqa: F401 phase3, ) from .phase4 import ( # noqa: F401 phase4, ) from .phase5 import ( # noqa: F401 phase5, ) from .phase6 import ( # noqa: F401 phase6, ) from .phase7 import ( # noqa: F401 phase7, )
17.125
59
0.620438
50
411
5.1
0.36
0.27451
0.384314
0
0
0
0
0
0
0
0
0.115132
0.260341
411
23
60
17.869565
0.723684
0.318735
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
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
1
0
0
0
0
4
1221ab57e777c610f8f73a258240f6686a45ed69
65
py
Python
nestor/datasets/__init__.py
usnistgov/nestor-tmp
6cc35dcf4dac029f94c4bc92783b5dc37bc205ce
[ "RSA-MD" ]
16
2018-07-06T16:36:56.000Z
2021-12-13T03:02:02.000Z
nestor/datasets/__init__.py
usnistgov/nestor-tmp
6cc35dcf4dac029f94c4bc92783b5dc37bc205ce
[ "RSA-MD" ]
46
2018-08-06T15:51:35.000Z
2021-08-02T21:00:51.000Z
nestor/datasets/__init__.py
usnistgov/nestor-tmp
6cc35dcf4dac029f94c4bc92783b5dc37bc205ce
[ "RSA-MD" ]
7
2020-04-27T18:56:24.000Z
2021-08-14T02:44:40.000Z
from .base import load_excavators __all__ = ["load_excavators"]
16.25
33
0.784615
8
65
5.625
0.75
0.622222
0
0
0
0
0
0
0
0
0
0
0.123077
65
3
34
21.666667
0.789474
0
0
0
0
0
0.230769
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