hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
e680988d6aaf0548275678b6f6b2b8d6503554c9
2,014
py
Python
utils/helpers.py
daniilpastukhov/serendipity_experiments
5ff544937d1796dbb20e11137f364972935be967
[ "MIT" ]
1
2021-11-27T11:31:01.000Z
2021-11-27T11:31:01.000Z
utils/helpers.py
daniilpastukhov/serendipity_experiments
5ff544937d1796dbb20e11137f364972935be967
[ "MIT" ]
null
null
null
utils/helpers.py
daniilpastukhov/serendipity_experiments
5ff544937d1796dbb20e11137f364972935be967
[ "MIT" ]
null
null
null
genres_cols = [f'feature{i + 1}' for i in range(18)] def get_control_items(ratings, user_profiles=None, user_ids=None): """ Get control items of test users for evaluation purposes. :param ratings: pd.DataFrame with columns <userId, movieId, rating, timestamp>. :param user_profiles: Sparse user pr...
33.566667
108
0.704071
from typing import Union import numpy as np import pandas as pd genres_cols = [f'feature{i + 1}' for i in range(18)] def get_movies_by_profile(movies_df, profile): return movies_df[movies_df['movieId'].isin(profile[profile != 0].index.astype(int))][genres_cols].values def get_average_genre(movies_df): retu...
0
0
0
0
0
360
0
-2
158
76f4dd13926a55ca4c52282d54a40cecfd95d09b
424
py
Python
env/lib/python3.6/site-packages/dal_genericm2m_queryset_sequence/fields.py
anthowen/duplify
846d01c1b21230937fdf0281b0cf8c0b08a8c24e
[ "MIT" ]
1,368
2015-01-03T09:52:33.000Z
2022-03-27T09:06:00.000Z
env/lib/python3.6/site-packages/dal_genericm2m_queryset_sequence/fields.py
anthowen/duplify
846d01c1b21230937fdf0281b0cf8c0b08a8c24e
[ "MIT" ]
919
2015-01-01T05:17:48.000Z
2022-03-25T22:41:14.000Z
env/lib/python3.6/site-packages/dal_genericm2m_queryset_sequence/fields.py
anthowen/duplify
846d01c1b21230937fdf0281b0cf8c0b08a8c24e
[ "MIT" ]
469
2015-01-19T21:40:30.000Z
2022-03-26T17:27:40.000Z
"""Autocomplete fields for django-queryset-sequence and django-generic-m2m."""
38.545455
78
0.773585
"""Autocomplete fields for django-queryset-sequence and django-generic-m2m.""" from dal_genericm2m.fields import GenericM2MFieldMixin from dal_queryset_sequence.fields import QuerySetSequenceModelMultipleField class GenericM2MQuerySetSequenceField(GenericM2MFieldMixin, QuerySet...
0
0
0
188
0
0
0
87
69
c4b37fdc21aa0651b4df4a2e663ec94b39ffba86
866
py
Python
day11/day11.py
alexmotoc/AoC17
c496b1da3a5863b370e677b87b6f14c65863227c
[ "MIT" ]
null
null
null
day11/day11.py
alexmotoc/AoC17
c496b1da3a5863b370e677b87b6f14c65863227c
[ "MIT" ]
null
null
null
day11/day11.py
alexmotoc/AoC17
c496b1da3a5863b370e677b87b6f14c65863227c
[ "MIT" ]
null
null
null
import numpy as np def direction_to_tuple(direction): """Returns the tuple coordinate offset from the start hexagon given a certain direction""" return { 'n' : (0, -1), 'ne' : (1, -1), 'se' : (1, 0), 's' : (0, 1), 'sw' : (-1, 1), 'nw' : (-1, 0) }[direct...
26.242424
70
0.572748
import numpy as np def direction_to_tuple(direction): """Returns the tuple coordinate offset from the start hexagon given a certain direction""" return { 'n' : (0, -1), 'ne' : (1, -1), 'se' : (1, 0), 's' : (0, 1), 'sw' : (-1, 1), 'nw' : (-1, 0) }[direct...
0
0
0
0
0
0
0
0
0
650a977c4f6d2e61a7d4ccccc3945bccef513242
2,708
py
Python
kalmanjax/experiments/timings/timings_heteroscedastic.py
NajwaLaabid/kalman-jax
7cd4d83f9c5a22008d2c565deefe3fa7ffd2005d
[ "Apache-2.0" ]
88
2020-07-08T19:21:26.000Z
2021-11-23T07:28:28.000Z
kalmanjax/experiments/timings/timings_heteroscedastic.py
NajwaLaabid/kalman-jax
7cd4d83f9c5a22008d2c565deefe3fa7ffd2005d
[ "Apache-2.0" ]
2
2020-08-25T23:27:30.000Z
2020-11-05T13:35:31.000Z
kalmanjax/experiments/timings/timings_heteroscedastic.py
NajwaLaabid/kalman-jax
7cd4d83f9c5a22008d2c565deefe3fa7ffd2005d
[ "Apache-2.0" ]
13
2020-07-14T16:35:48.000Z
2022-03-24T08:03:03.000Z
import sys sys.path.insert(0, '../../') import numpy as np import time from sde_gp import SDEGP import approximate_inference as approx_inf import priors import likelihoods import pickle from sklearn.preprocessing import StandardScaler plot_intermediate = False print('loading data ...') D = np.loadtxt('../heteroscedas...
25.074074
97
0.695716
import sys sys.path.insert(0, '../../') import numpy as np import time from sde_gp import SDEGP import approximate_inference as approx_inf import priors import likelihoods import pickle from sklearn.preprocessing import StandardScaler plot_intermediate = False print('loading data ...') D = np.loadtxt('../heteroscedas...
0
0
0
0
0
0
0
0
0
e14ae797da7cdfead5044a3ae7590fc530ef4bf2
73
py
Python
offpolicy/envs/__init__.py
Maxtoq/off-policy
e866f13a3d144a29552c38f104bcdfb411036138
[ "MIT" ]
76
2021-07-30T11:59:51.000Z
2022-03-31T08:07:10.000Z
offpolicy/envs/__init__.py
jc-bao/off-policy
15c44f126e506b3f455c60dddd424d2290dddf8d
[ "MIT" ]
6
2021-12-02T11:22:29.000Z
2022-03-25T04:17:09.000Z
offpolicy/envs/__init__.py
jc-bao/off-policy
15c44f126e506b3f455c60dddd424d2290dddf8d
[ "MIT" ]
20
2021-08-04T04:01:52.000Z
2022-03-17T04:14:41.000Z
from absl import flags FLAGS = flags.FLAGS FLAGS(['train_smac.py'])
14.6
25
0.69863
from absl import flags FLAGS = flags.FLAGS FLAGS(['train_smac.py'])
0
0
0
0
0
0
0
0
0
f035d33d3bc78944df327818a65f432c2ad063e7
9,599
py
Python
dump1090.py
tedsluis/dump1090-tools
95ef51e747a741568d9aa672223057dbf0f88401
[ "0BSD" ]
20
2016-07-23T23:24:21.000Z
2021-04-08T07:59:53.000Z
dump1090.py
tedsluis/dump1090-tools
95ef51e747a741568d9aa672223057dbf0f88401
[ "0BSD" ]
3
2016-12-19T19:47:42.000Z
2017-05-18T12:25:18.000Z
dump1090.py
tedsluis/dump1090-tools
95ef51e747a741568d9aa672223057dbf0f88401
[ "0BSD" ]
7
2016-02-28T17:42:15.000Z
2017-06-26T22:39:35.000Z
# Copyright (c) 2015, Oliver Jowett <oliver@mutability.co.uk> # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # THE SOFTWARE IS PROVIDED "AS IS" AND T...
38.243028
125
0.538181
# Copyright (c) 2015, Oliver Jowett <oliver@mutability.co.uk> # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # THE SOFTWARE IS PROVIDED "AS IS" AND T...
0
0
0
0
0
8,358
0
5
298
cf83ec7256b5b73effce336ff46f27cb99a8799f
131
py
Python
Python/1963 - O Filme.py
NadiaOliver/Uri-Judge-Iniciante
4546a0f662b0d54c6f6076506771712646f2b6d8
[ "MIT" ]
21
2019-08-29T05:31:54.000Z
2022-03-30T17:34:14.000Z
Python/1963 - O Filme.py
NadiaOliver/Uri-Judge-Iniciante
4546a0f662b0d54c6f6076506771712646f2b6d8
[ "MIT" ]
2
2020-01-01T21:47:46.000Z
2020-01-01T22:06:05.000Z
Python/1963 - O Filme.py
NadiaOliver/Uri-Judge-Iniciante
4546a0f662b0d54c6f6076506771712646f2b6d8
[ "MIT" ]
14
2019-12-07T16:47:47.000Z
2022-02-23T01:25:05.000Z
A, B = input().split(' ') A = float(A) B = float(B) rate = B * 100 result_rate = rate / A print('{:.2f}%'.format(result_rate-100))
18.714286
40
0.587786
A, B = input().split(' ') A = float(A) B = float(B) rate = B * 100 result_rate = rate / A print('{:.2f}%'.format(result_rate-100))
0
0
0
0
0
0
0
0
0
f3ba574402bf2dd654dfe21c9a9c73410a9a5110
5,637
py
Python
7.py
HatsuneMikuV/PythonLearning
34a7179ee20eb8ade50ce74b12732daea491e527
[ "Apache-2.0" ]
null
null
null
7.py
HatsuneMikuV/PythonLearning
34a7179ee20eb8ade50ce74b12732daea491e527
[ "Apache-2.0" ]
null
null
null
7.py
HatsuneMikuV/PythonLearning
34a7179ee20eb8ade50ce74b12732daea491e527
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ ------------------------------------------------- File Name seven Description : Author : joe date 2019-07-23 ------------------------------------------------- Change Activity: 2019-07-23: ------------------------------------------------- "...
19.70979
56
0.573177
# -*- coding: utf-8 -*- """ ------------------------------------------------- File Name: seven Description : Author : joe date: 2019-07-23 ------------------------------------------------- Change Activity: 2019-07-23: -------------------------------------------------...
3,534
0
0
0
0
614
0
0
91
0a1baafdd83c5d597fd8b54cc03f0f48b6ba3c44
825
py
Python
var/spack/repos/builtin/packages/py-pyrsistent/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
2
2020-08-13T15:24:33.000Z
2021-10-18T18:38:19.000Z
var/spack/repos/builtin/packages/py-pyrsistent/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
6
2022-02-26T11:44:34.000Z
2022-03-12T12:14:50.000Z
var/spack/repos/builtin/packages/py-pyrsistent/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
2
2020-09-15T02:37:59.000Z
2020-09-21T04:34:38.000Z
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT)
37.5
96
0.715152
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyPyrsistent(PythonPackage): """Pyrsistent is a number of persistent collections (b...
0
0
0
583
0
0
0
-2
46
8b04672092fed0091f341196b4cdbc00f6bb13c5
487
py
Python
OSSU/0.python-4-everyone/1.python-4-everybody/Assignments/Assignment 2.3.py
mohammedelzanaty/myRoad2BeFullStack
eea3a5edb6c6a999136b04fdaea6ce0c81137a58
[ "MIT" ]
2
2021-04-21T12:05:01.000Z
2022-01-19T09:58:38.000Z
OSSU/0.python-4-everyone/1.python-4-everybody/Assignments/Assignment 2.3.py
mohammedelzanaty/myRoad2BeFullStack
eea3a5edb6c6a999136b04fdaea6ce0c81137a58
[ "MIT" ]
34
2019-12-26T11:21:42.000Z
2022-02-27T19:55:10.000Z
OSSU/0.python-4-everyone/1.python-4-everybody/Assignments/Assignment 2.3.py
mohammedelzanaty/myRoad2BeFullStack
eea3a5edb6c6a999136b04fdaea6ce0c81137a58
[ "MIT" ]
2
2021-08-15T07:59:36.000Z
2022-01-16T06:17:32.000Z
""" Write a program to prompt the user for hours and rate per hour using input to compute gross pay. Use 35 hours and a rate of 2.75 per hour to test the program (the pay should be 96.25). You should use input to read a string and float() to convert the string to a number. Do not worry about error checking or bad us...
40.583333
97
0.718686
""" Write a program to prompt the user for hours and rate per hour using input to compute gross pay. Use 35 hours and a rate of 2.75 per hour to test the program (the pay should be 96.25). You should use input to read a string and float() to convert the string to a number. Do not worry about error checking or bad us...
0
0
0
0
0
0
0
0
0
f833e98fdfa02ba5b096db38cbe81374e1a09b3d
5,753
py
Python
Doc/sphinx-examples/tutorial/advanced_topics/src/using-python-scripting-1.py
mpartio/ecflow
ea4b89399d1e7b897ff48c59b1e885e6d53cc8d6
[ "Apache-2.0" ]
11
2020-08-07T14:42:45.000Z
2021-10-21T01:59:59.000Z
Doc/sphinx-examples/tutorial/advanced_topics/src/using-python-scripting-1.py
CoollRock/ecflow
db61dddc84d3d2c7dd6af95fd799d717c6bc2a6d
[ "Apache-2.0" ]
10
2020-08-07T14:36:27.000Z
2022-02-22T06:51:24.000Z
Doc/sphinx-examples/tutorial/advanced_topics/src/using-python-scripting-1.py
CoollRock/ecflow
db61dddc84d3d2c7dd6af95fd799d717c6bc2a6d
[ "Apache-2.0" ]
6
2020-08-07T14:34:38.000Z
2022-01-10T12:06:27.000Z
# provides *examples* of add adding node attributes using the python API # hence does *not* represent a real suite definition if __name__ == "__main__": # adding variables suite = Suite("s1"); suite.add_variable(Variable("ECF_HOME", "/tmp/")) suite.add_variable("ECF_URL_CMD", "${BROWSER:=firefox}...
35.732919
114
0.610986
# provides *examples* of add adding node attributes using the python API # hence does *not* represent a real suite definition from ecflow import * if __name__ == "__main__": # adding variables suite = Suite("s1"); suite.add_variable(Variable("ECF_HOME", "/tmp/")) suite.add_variable("ECF_URL_CMD",...
0
0
0
0
0
0
0
-1
22
cb9f065b494dfb1c3b84272f0d8d605cdee8472f
10,442
py
Python
onionperf/util.py
amaleewilson/onionperf
34da5e8c2aa764d70141972ea2520f881e90cb03
[ "BSD-3-Clause" ]
1
2020-05-07T16:58:22.000Z
2020-05-07T16:58:22.000Z
onionperf/util.py
NullHypothesis/onionperf
17b0cf422adc81d356d1db4aba46b495e9487d0b
[ "BSD-3-Clause" ]
null
null
null
onionperf/util.py
NullHypothesis/onionperf
17b0cf422adc81d356d1db4aba46b495e9487d0b
[ "BSD-3-Clause" ]
null
null
null
''' OnionPerf Authored by Rob Jansen, 2015 See LICENSE for licensing information ''' import socket, logging, random, re, urllib.request, urllib.parse, urllib.error LINEFORMATS = "k-,r-,b-,g-,c-,m-,y-,k--,r--,b--,g--,c--,m--,y--,k:,r:,b:,g:,c:,m:,y:,k-.,r-.,b-.,g-.,c-.,m-.,y-." def find_ip_address_url(data): ...
32.940063
130
0.610132
''' OnionPerf Authored by Rob Jansen, 2015 See LICENSE for licensing information ''' import sys, os, socket, logging, random, re, shutil, datetime, urllib.request, urllib.parse, urllib.error, gzip, lzma from threading import Lock from io import StringIO from abc import ABCMeta, abstractmethod LINEFORMATS = "k-,...
0
61
0
3,691
0
3,148
0
64
418
71362d28feb423ff1cb99dfe83169470a5de688e
2,930
py
Python
tests/common/test_run/reduce_max_run.py
tianjiashuo/akg
a9cbf642063fb1086a93e8bc6be6feb145689817
[ "Apache-2.0" ]
286
2020-06-23T06:40:44.000Z
2022-03-30T01:27:49.000Z
tests/common/test_run/reduce_max_run.py
tianjiashuo/akg
a9cbf642063fb1086a93e8bc6be6feb145689817
[ "Apache-2.0" ]
10
2020-07-31T03:26:59.000Z
2021-12-27T15:00:54.000Z
tests/common/test_run/reduce_max_run.py
tianjiashuo/akg
a9cbf642063fb1086a93e8bc6be6feb145689817
[ "Apache-2.0" ]
30
2020-07-17T01:04:14.000Z
2021-12-27T14:05:19.000Z
# Copyright 2019-2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
43.731343
103
0.702048
# Copyright 2019-2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
0
0
0
0
0
0
0
0
0
11e27d98b45733104de53ca0271c247a8e1acc05
1,460
py
Python
tests/test_redis.py
rabibh/blackbox
c77dac14449a4a3d74ee3d2b00170b3085642bbf
[ "MIT" ]
1
2021-09-11T04:35:06.000Z
2021-09-11T04:35:06.000Z
tests/test_redis.py
rabibh/blackbox
c77dac14449a4a3d74ee3d2b00170b3085642bbf
[ "MIT" ]
null
null
null
tests/test_redis.py
rabibh/blackbox
c77dac14449a4a3d74ee3d2b00170b3085642bbf
[ "MIT" ]
null
null
null
import datetime from pathlib import Path import pytest from blackbox.exceptions import MissingFields from blackbox.handlers.databases import Redis def test_can_be_instantiated_with_required_fields(mock_valid_redis_config): """Test if the redis database handler can be instantiated.""" Redis(**mock_valid_re...
28.076923
100
0.714384
import datetime from pathlib import Path import pytest from blackbox.exceptions import MissingFields from blackbox.handlers.databases import Redis @pytest.fixture def mock_valid_redis_config(): """Mock valid Redis config.""" return {"password": "citrus", "host": "localhost", "port": "5432", "id"...
0
267
0
0
0
0
0
0
46
8d951dcb418550b15a4291b65f3b40e54aca4a56
3,677
py
Python
src/eduid_webapp/reset_password/app.py
SUNET/eduid-webapp
8e531f288d50d18a5c9182003fff2ab6670a44c3
[ "BSD-3-Clause" ]
null
null
null
src/eduid_webapp/reset_password/app.py
SUNET/eduid-webapp
8e531f288d50d18a5c9182003fff2ab6670a44c3
[ "BSD-3-Clause" ]
161
2017-04-13T07:56:38.000Z
2021-03-12T13:46:38.000Z
src/eduid_webapp/reset_password/app.py
SUNET/eduid-webapp
8e531f288d50d18a5c9182003fff2ab6670a44c3
[ "BSD-3-Clause" ]
3
2016-05-16T20:25:49.000Z
2018-07-27T12:10:58.000Z
# -*- coding: utf-8 -*- # # Copyright (c) 2019 SUNET # All rights reserved. # # Redistribution and use in source and binary forms, with or # without modification, are permitted provided that the following # conditions are met: # # 1. Redistributions of source code must retain the above copyright # noti...
38.302083
102
0.758771
# -*- coding: utf-8 -*- # # Copyright (c) 2019 SUNET # All rights reserved. # # Redistribution and use in source and binary forms, with or # without modification, are permitted provided that the following # conditions are met: # # 1. Redistributions of source code must retain the above copyright # noti...
0
0
0
593
0
0
0
243
199
4dd171355d55f2814b3bd6db0c65a93da39358fc
774
py
Python
wallet/migrations/0001_initial.py
MohammadReza-Jafari/DangiDongi_api
c43ab95826da000b0a574a41b1ec0024ab0fa209
[ "MIT" ]
null
null
null
wallet/migrations/0001_initial.py
MohammadReza-Jafari/DangiDongi_api
c43ab95826da000b0a574a41b1ec0024ab0fa209
[ "MIT" ]
null
null
null
wallet/migrations/0001_initial.py
MohammadReza-Jafari/DangiDongi_api
c43ab95826da000b0a574a41b1ec0024ab0fa209
[ "MIT" ]
null
null
null
# Generated by Django 3.1.3 on 2020-12-13 13:48
28.666667
144
0.645995
# Generated by Django 3.1.3 on 2020-12-13 13:48 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import uuid class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ...
0
0
0
582
0
0
0
31
112
44a6ec9287a4beed4b6e37a37053d1de4a7883b6
1,262
py
Python
sandbox/update_mullvad.py
thejoltjoker/python
4517065e64d83947648e2aad206ac4ec786b166e
[ "MIT" ]
null
null
null
sandbox/update_mullvad.py
thejoltjoker/python
4517065e64d83947648e2aad206ac4ec786b166e
[ "MIT" ]
null
null
null
sandbox/update_mullvad.py
thejoltjoker/python
4517065e64d83947648e2aad206ac4ec786b166e
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ update_mullvad.py Description of update_mullvad.py. """ import requests import platform from bs4 import BeautifulSoup from pprint import pprint from urllib.parse import urljoin def main(): """docstring for main""" url = "https://mullvad.net/en/download/" ba...
31.55
71
0.635499
#!/usr/bin/env python # -*- coding: utf-8 -*- """ update_mullvad.py Description of update_mullvad.py. """ import requests import platform from bs4 import BeautifulSoup from pprint import pprint from urllib.parse import urlparse from urllib.parse import urljoin def main(): """docstring for main""" url = "https:...
0
0
0
0
0
0
0
12
22
96e21665bf62437ea666f7cc8f9ff4fb5bf82206
7,711
py
Python
integration/python/integration_api/models/identification.py
sumit4-ttn/SDK
b3ae385e5415e47ac70abd0b3fdeeaeee9aa7cff
[ "Apache-2.0" ]
null
null
null
integration/python/integration_api/models/identification.py
sumit4-ttn/SDK
b3ae385e5415e47ac70abd0b3fdeeaeee9aa7cff
[ "Apache-2.0" ]
null
null
null
integration/python/integration_api/models/identification.py
sumit4-ttn/SDK
b3ae385e5415e47ac70abd0b3fdeeaeee9aa7cff
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Hydrogen Integration API The Hydrogen Integration API # noqa: E501 OpenAPI spec version: 1.2.1 Contact: info@hydrogenplatform.com Generated by: https://github.com/swagger-api/swagger-codegen.git """
28.349265
172
0.60498
# coding: utf-8 """ Hydrogen Integration API The Hydrogen Integration API # noqa: E501 OpenAPI spec version: 1.2.1 Contact: info@hydrogenplatform.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class Identification(ob...
0
3,439
0
3,953
0
0
0
-31
105
60745a50299a9b9f7974cc8068c13b6139ebbc2f
8,603
py
Python
pocsuite/lib/controller/controller.py
zx273983653/vulscan
787397e267c4e6469522ee0abe55b3e98f968d4a
[ "MIT" ]
582
2019-02-23T09:23:33.000Z
2022-03-31T04:42:08.000Z
pocsuite/lib/controller/controller.py
git-wsf/vulscan
112f8d6104daecfaaad579f73029a26d56aaa9b3
[ "MIT" ]
6
2019-03-20T10:37:48.000Z
2020-03-10T06:20:07.000Z
pocsuite/lib/controller/controller.py
git-wsf/vulscan
112f8d6104daecfaaad579f73029a26d56aaa9b3
[ "MIT" ]
183
2019-02-23T06:00:18.000Z
2022-03-20T02:17:57.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) See the file 'docs/COPYING' for copying permission """ import os import time import shutil import tempfile from textwrap import dedent from pocsuite.lib.core.settings import REPORT_HTMLBASE from pocsuite...
39.645161
207
0.596536
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) See the file 'docs/COPYING' for copying permission """ import os import time import shutil import tempfile from textwrap import dedent from pocsuite.lib.core.settings import REPORT_HTMLBASE from pocsuite...
0
0
0
0
0
4,850
0
0
92
aef6ac6356129cbacc6e5028fb958d54b99597d4
4,813
py
Python
state/spider.py
sijiangchen/COVID19VaccinationCasesInformationSystem
1b42445ad128c5e1dabb8cdc4438055fe74420f5
[ "MIT" ]
null
null
null
state/spider.py
sijiangchen/COVID19VaccinationCasesInformationSystem
1b42445ad128c5e1dabb8cdc4438055fe74420f5
[ "MIT" ]
null
null
null
state/spider.py
sijiangchen/COVID19VaccinationCasesInformationSystem
1b42445ad128c5e1dabb8cdc4438055fe74420f5
[ "MIT" ]
null
null
null
import os, django import sys path = os.path.dirname(os.path.abspath(os.path.dirname(os.path.abspath(__file__)))) sys.path.append(path) # print(sys.path) os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings") django.setup() import requests if __name__ == '__main__': ...
37.310078
121
0.532516
import os, django import sys path = os.path.dirname(os.path.abspath(os.path.dirname(os.path.abspath(__file__)))) sys.path.append(path) # print(sys.path) os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings") django.setup() import requests import datetime from state import models import re...
0
0
0
0
0
4,279
0
1
190
03cce93250383b2961e0f9fc38a1419b1a5b0483
3,523
py
Python
swea/review_structure/tree.py
mrbartrns/swacademy_structure
778f0546030385237c383d81ec37d5bd9ed1272d
[ "MIT" ]
null
null
null
swea/review_structure/tree.py
mrbartrns/swacademy_structure
778f0546030385237c383d81ec37d5bd9ed1272d
[ "MIT" ]
null
null
null
swea/review_structure/tree.py
mrbartrns/swacademy_structure
778f0546030385237c383d81ec37d5bd9ed1272d
[ "MIT" ]
null
null
null
# tree
28.642276
78
0.542435
# tree class Node: def __init__(self, data): self.data = data self.left = None self.right = None def size(self): left_size = self.left.size() if self.left else 0 right_size = self.right.size() if self.right else 0 return left_size + right_size + 1 def depth(...
0
0
0
3,470
0
0
0
0
45
77df34d3981b39f04acc7dcb6777503d7a5ee010
1,014
py
Python
DjangoTry/testDJ/main/templatetags/qr.py
PavelKoksharov/QR-BOOK
8b05cecd7a3cffcec281f2e17da398ad9e4c5de5
[ "MIT" ]
null
null
null
DjangoTry/testDJ/main/templatetags/qr.py
PavelKoksharov/QR-BOOK
8b05cecd7a3cffcec281f2e17da398ad9e4c5de5
[ "MIT" ]
null
null
null
DjangoTry/testDJ/main/templatetags/qr.py
PavelKoksharov/QR-BOOK
8b05cecd7a3cffcec281f2e17da398ad9e4c5de5
[ "MIT" ]
null
null
null
from django import template register = template.Library() # qr = generateQR()
20.693878
63
0.59073
import qrcode from django import template register = template.Library() def generateQR(data="again?"): qr = qrcode.make(data) qr.save("Test.png") return data # qr = generateQR() import cv2 import time @register.simple_tag(name='scan') def scanQR(): # initalize the camera cap = cv2.VideoCapt...
0
767
0
0
0
76
0
-29
113
1e6a29b881ea0e527fc10b755160c6f6af4d900b
6,605
py
Python
samples/compute/manage_virtual_machine_scale_set.py
leigharubin/azure-samples-python-management
ed640755f5362e309ba66af22a3d0c67b008c708
[ "MIT" ]
47
2020-05-29T18:25:57.000Z
2022-03-30T06:04:56.000Z
samples/compute/manage_virtual_machine_scale_set.py
leigharubin/azure-samples-python-management
ed640755f5362e309ba66af22a3d0c67b008c708
[ "MIT" ]
27
2020-05-13T06:37:24.000Z
2022-03-01T07:58:34.000Z
samples/compute/manage_virtual_machine_scale_set.py
leigharubin/azure-samples-python-management
ed640755f5362e309ba66af22a3d0c67b008c708
[ "MIT" ]
67
2020-05-09T06:09:19.000Z
2022-03-22T23:18:06.000Z
# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- if __n...
31.303318
199
0.571688
# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- import os...
0
0
0
0
0
5,974
0
101
178
18bdfa1765f31fe3d7392c4aee85c00b0db5abf2
179
py
Python
examples/halflife3-bot/tokens.py
avinassh/PRAWOAuth2
a7c9ab5a93666d8468c6bf8455a4bdff6cda6583
[ "MIT" ]
34
2015-07-08T19:40:40.000Z
2021-04-13T20:05:01.000Z
examples/halflife3-bot/tokens.py
avinassh/PRAWOAuth2
a7c9ab5a93666d8468c6bf8455a4bdff6cda6583
[ "MIT" ]
11
2015-07-09T15:50:42.000Z
2016-11-11T16:07:02.000Z
examples/halflife3-bot/tokens.py
avinassh/PRAWOAuth2
a7c9ab5a93666d8468c6bf8455a4bdff6cda6583
[ "MIT" ]
10
2015-07-09T15:46:07.000Z
2020-04-07T13:20:26.000Z
import os app_key = os.getenv('HL3_APP_KEY') app_secret = os.getenv('HL3_APP_SECRET') access_token = os.getenv('HL3_ACCESS_TOKEN') refresh_token = os.getenv('HL3_REFRESH_TOKEN')
25.571429
46
0.782123
import os app_key = os.getenv('HL3_APP_KEY') app_secret = os.getenv('HL3_APP_SECRET') access_token = os.getenv('HL3_ACCESS_TOKEN') refresh_token = os.getenv('HL3_REFRESH_TOKEN')
0
0
0
0
0
0
0
0
0
7738184e51d6e2790bf246b0d7ee85cf21c67aae
2,333
py
Python
Scripts/Miscellaneous/Movie_Recommeder/movie_recommendation.py
ShivangiPatel102/Python_and_the_Web
6d3b55aef20feeda3cfff941d7bbdc26cbcc70d2
[ "MIT" ]
437
2020-09-24T13:57:39.000Z
2022-03-30T12:45:56.000Z
Scripts/Miscellaneous/Movie_Recommeder/movie_recommendation.py
ShivangiPatel102/Python_and_the_Web
6d3b55aef20feeda3cfff941d7bbdc26cbcc70d2
[ "MIT" ]
355
2020-09-24T13:53:16.000Z
2022-03-27T04:20:40.000Z
Scripts/Miscellaneous/Movie_Recommeder/movie_recommendation.py
ShivangiPatel102/Python_and_the_Web
6d3b55aef20feeda3cfff941d7bbdc26cbcc70d2
[ "MIT" ]
315
2020-09-24T18:41:19.000Z
2022-03-07T05:53:01.000Z
if __name__ == "__main__": movielist = input("Enter movies seprated by comma(,) - ").split(",") recommendation_limit = input("Enter the limit of of recommended movies - ") recommended_Movies = get_sorted_recommendations(movielist, recommendation_limit) for movies in recommended_Movies: p...
29.910256
87
0.660952
import requests def get_movies_from_tastedive(movieName, recom_limit): baseurl = "https://tastedive.com/api/similar" params_d = {} params_d["q"] = movieName params_d["k"] = "your_tastedive_API_key" params_d["type"] = "movies" params_d["limit"] = recom_limit resp = requests.get(baseurl, par...
0
0
0
0
0
1,803
0
-6
160
76c5c29d967ba3fc5193b39785475c5c61e87815
4,751
py
Python
modules/deprecated/Experiment.py
MarzioMonticelli/python-cryptonet
598c6e61fd7165f3a03ffce3f1de9f69d8645681
[ "MIT" ]
19
2020-04-09T15:01:43.000Z
2022-03-28T07:39:40.000Z
modules/deprecated/Experiment.py
MarzioMonticelli/python-cryptonet
598c6e61fd7165f3a03ffce3f1de9f69d8645681
[ "MIT" ]
4
2020-04-22T14:19:53.000Z
2021-05-25T13:12:57.000Z
modules/deprecated/Experiment.py
MarzioMonticelli/python-cryptonet
598c6e61fd7165f3a03ffce3f1de9f69d8645681
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Nov 27 11:00:02 2019 @author: marzio """ verbosity = True lr = [] for i in range(10): lr.append(0.01) p = {'last_activation': ['softmax'], 'optimizer': ['SGD'], 'loss': ['categorical_crossentropy'], ...
31.052288
86
0.548306
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Nov 27 11:00:02 2019 @author: marzio """ from tensorflow import keras from tensorflow.keras import utils as tfku import numpy as np import os import glob import pandas as pd import talos from CryptoNet import mnist_model from CryptoNet import util ve...
0
0
0
3,845
0
0
0
9
223
0717a5942a02fad369f79c99a21c9a813467d75a
20,408
py
Python
reviewboard/hostingsvcs/codebasehq.py
davidt/reviewboard
66b08d06aec9be921e737b99c5ab78acc8b7a6fe
[ "MIT" ]
1
2019-08-20T03:39:04.000Z
2019-08-20T03:39:04.000Z
reviewboard/hostingsvcs/codebasehq.py
davidt/reviewboard
66b08d06aec9be921e737b99c5ab78acc8b7a6fe
[ "MIT" ]
1
2019-08-20T03:39:45.000Z
2019-08-20T03:39:45.000Z
reviewboard/hostingsvcs/codebasehq.py
davidt/reviewboard
66b08d06aec9be921e737b99c5ab78acc8b7a6fe
[ "MIT" ]
null
null
null
from __future__ import unicode_literals
33.12987
79
0.55929
from __future__ import unicode_literals import logging from xml.dom.minidom import parseString from django import forms from django.utils import six from django.utils.six.moves.urllib.error import HTTPError, URLError from django.utils.translation import ugettext_lazy as _, ugettext from reviewboard.hostingsvcs.error...
0
0
0
19,387
0
0
0
640
337
5e8a82acf4a31a8ff46d7a3a66efc104d1d6db3e
5,463
py
Python
Python/logs.py
orestismar/fun_place
3b279756d867405d51877b8767e15b22b1ce1365
[ "MIT" ]
null
null
null
Python/logs.py
orestismar/fun_place
3b279756d867405d51877b8767e15b22b1ce1365
[ "MIT" ]
1
2022-03-14T22:43:23.000Z
2022-03-14T22:43:23.000Z
Python/logs.py
orestismar/fun_place
3b279756d867405d51877b8767e15b22b1ce1365
[ "MIT" ]
null
null
null
""" Used to create loggers for modules within the namespace. These loggers are the standard python.logging loggers which can be adapted/changed via the standard methods. """ import logging import logging.handlers import os from directories import LOG_DIR # Default logging format FUNSPACE_LOG_FORMAT = '%(asctime)s %(...
34.575949
114
0.692477
""" Used to create loggers for modules within the namespace. These loggers are the standard python.logging loggers which can be adapted/changed via the standard methods. """ import logging import logging.handlers import os from directories import LOG_DIR # Default logging format FUNSPACE_LOG_FORMAT = '%(asctime)s %(...
0
0
0
0
0
887
0
0
69
28aef4053ebddab7d114e3fe2ee42d4ca0419bb9
3,846
py
Python
ss-stats.py
charlestang/shadowsocks-libev-multiuser-cli
768d1215c256d6ad2af5f62bb3778e2f6ea3260e
[ "MIT" ]
null
null
null
ss-stats.py
charlestang/shadowsocks-libev-multiuser-cli
768d1215c256d6ad2af5f62bb3778e2f6ea3260e
[ "MIT" ]
null
null
null
ss-stats.py
charlestang/shadowsocks-libev-multiuser-cli
768d1215c256d6ad2af5f62bb3778e2f6ea3260e
[ "MIT" ]
null
null
null
import json import os import re import socket import sqlite3 import sys from datetime import datetime from typing import List import psutil def get_processes_by_name(name: str) -> List[psutil.Process]: """ """ res = [] for proc in psutil.process_iter(["pid", "name", "create_time"]): if ...
28.488889
104
0.604004
import argparse import json import os import re import socket import sqlite3 import sys from datetime import datetime from typing import List import psutil from psutil._common import sconn def get_argparser() -> argparse.ArgumentParser: parser = argparse.ArgumentParser( description="ss-manager and ss-ser...
210
0
0
0
0
581
0
5
113
9a0f8a62c583187d45e511411ac4fdeab12aac44
1,342
py
Python
scripts/release_sdk_status/util.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-03-09T08:59:13.000Z
2022-03-09T08:59:13.000Z
scripts/release_sdk_status/util.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
scripts/release_sdk_status/util.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-03-04T06:21:56.000Z
2022-03-04T06:21:56.000Z
CERTIFICATION = ''' -----BEGIN CERTIFICATE----- MIIDSDCCAjCgAwIBAgIUPMKpJ/j10eQrcQBNnkImIaOYHakwDQYJKoZIhvcNAQEL BQAwFDESMBAGA1UEAwwJbG9jYWxob3N0MB4XDTIxMDgwNTAwMzU1NloXDTIyMDgw NTAwMzU1NlowFDESMBAGA1UEAwwJbG9jYWxob3N0MIIBIjANBgkqhkiG9w0BAQEF AAOCAQ8AMIIBCgKCAQEAxe/ZseXgOTVoF7uTjX5Leknk95jIoyGc+VlxA8BhzGOr r4u6VNQZRCMq...
46.275862
64
0.90313
CERTIFICATION = ''' -----BEGIN CERTIFICATE----- MIIDSDCCAjCgAwIBAgIUPMKpJ/j10eQrcQBNnkImIaOYHakwDQYJKoZIhvcNAQEL BQAwFDESMBAGA1UEAwwJbG9jYWxob3N0MB4XDTIxMDgwNTAwMzU1NloXDTIyMDgw NTAwMzU1NlowFDESMBAGA1UEAwwJbG9jYWxob3N0MIIBIjANBgkqhkiG9w0BAQEF AAOCAQ8AMIIBCgKCAQEAxe/ZseXgOTVoF7uTjX5Leknk95jIoyGc+VlxA8BhzGOr r4u6VNQZRCMq...
0
0
0
0
0
94
0
0
23
86bbe9b0f0944221580d90d7605c911e8ac323be
202
py
Python
home/GroG/test.py
sola1993/inmoov
34e7bb6e214bd9bf3eee808c19f0ab09ec79345f
[ "Apache-2.0" ]
1
2021-02-24T17:05:52.000Z
2021-02-24T17:05:52.000Z
home/GroG/test.py
sola1993/inmoov
34e7bb6e214bd9bf3eee808c19f0ab09ec79345f
[ "Apache-2.0" ]
null
null
null
home/GroG/test.py
sola1993/inmoov
34e7bb6e214bd9bf3eee808c19f0ab09ec79345f
[ "Apache-2.0" ]
1
2020-06-03T20:48:47.000Z
2020-06-03T20:48:47.000Z
# this is an embedded Python script it's really on GitHub # and this is only a reference - so when it changes people # will see the change on the webpage .. GOODTIMES ! pid = Runtime.start("pid","PID")
40.4
58
0.727723
# this is an embedded Python script it's really on GitHub # and this is only a reference - so when it changes people # will see the change on the webpage .. GOODTIMES ! pid = Runtime.start("pid","PID")
0
0
0
0
0
0
0
0
0
090ab017b0d5feffad86fa3add52eba79cd8748a
1,781
py
Python
xrpc/error.py
andreycizov/python-xrpc
ed403ae74d5e89e0ebac68bcc58591d6b32742ff
[ "Apache-2.0" ]
null
null
null
xrpc/error.py
andreycizov/python-xrpc
ed403ae74d5e89e0ebac68bcc58591d6b32742ff
[ "Apache-2.0" ]
null
null
null
xrpc/error.py
andreycizov/python-xrpc
ed403ae74d5e89e0ebac68bcc58591d6b32742ff
[ "Apache-2.0" ]
null
null
null
# possible exceptions caused by the API calls
25.811594
89
0.699045
# possible exceptions caused by the API calls from datetime import datetime from typing import Optional from xrpc.util import time_now class RPCError(Exception): def __str__(self): args = ', '.join(self.args) return f'{self.__class__.__name__}({args})' class UndecidedError(RPCError): # We h...
0
0
0
1,453
0
0
0
23
251
8216b5c540d8da374559fa003d0a014c80e46abd
234
py
Python
gglsbl3/util/__init__.py
Stefan-Code/gglsbl3
5d7497c83e838728d96eb54e0d50b5ffe54ff315
[ "Apache-2.0" ]
10
2015-05-08T19:22:07.000Z
2016-03-16T14:41:39.000Z
gglsbl3/util/__init__.py
Stefan-Code/gglsbl3
5d7497c83e838728d96eb54e0d50b5ffe54ff315
[ "Apache-2.0" ]
8
2015-11-10T21:36:49.000Z
2016-05-31T07:43:12.000Z
gglsbl3/util/__init__.py
Stefan-Code/gglsbl3
5d7497c83e838728d96eb54e0d50b5ffe54ff315
[ "Apache-2.0" ]
3
2015-12-08T00:52:38.000Z
2021-07-27T18:31:07.000Z
""" This util package provides utility functions that are used across the different gglsbl3 modules e.g. string formatting """
29.25
58
0.824786
""" This util package provides utility functions that are used across the different gglsbl3 modules e.g. string formatting """ from .format_utils import prettify_seconds, format_max_len from .network_utils import int_to_ip, ip_to_int
0
0
0
0
0
0
0
63
44
52d95f8932a3fde3fd2fc88b6f39250bdaefbe40
49
py
Python
spys1proxy/__init__.py
doubledare704/spys_one_proxy
cf0dfd1f5b87d2149ef58abbf61c39adc10f3934
[ "MIT" ]
null
null
null
spys1proxy/__init__.py
doubledare704/spys_one_proxy
cf0dfd1f5b87d2149ef58abbf61c39adc10f3934
[ "MIT" ]
null
null
null
spys1proxy/__init__.py
doubledare704/spys_one_proxy
cf0dfd1f5b87d2149ef58abbf61c39adc10f3934
[ "MIT" ]
null
null
null
from .main import Spys __all__ = [ 'Spys' ]
8.166667
22
0.591837
from .main import Spys __all__ = [ 'Spys' ]
0
0
0
0
0
0
0
0
0
f23046857bb43404e1738d7ebaa2061aeea0e376
4,579
py
Python
tests/utils_test.py
bow/volt
5940926e2e4a01b4ee32a10f7cc8b44a42530307
[ "BSD-3-Clause" ]
7
2015-06-23T11:33:11.000Z
2022-02-02T10:41:04.000Z
tests/utils_test.py
bow/volt
5940926e2e4a01b4ee32a10f7cc8b44a42530307
[ "BSD-3-Clause" ]
59
2016-09-12T21:04:50.000Z
2021-11-25T21:57:10.000Z
tests/utils_test.py
bow/volt
5940926e2e4a01b4ee32a10f7cc8b44a42530307
[ "BSD-3-Clause" ]
2
2017-03-16T00:12:07.000Z
2017-05-05T13:05:11.000Z
# -*- coding: utf-8 -*- """ Tests for volt.utils ~~~~~~~~~~~~~~~~~~~~ """ # (c) 2012-2020 Wibowo Arindrarto <contact@arindrarto.dev>
29.165605
88
0.588993
# -*- coding: utf-8 -*- """ Tests for volt.utils ~~~~~~~~~~~~~~~~~~~~ """ # (c) 2012-2020 Wibowo Arindrarto <contact@arindrarto.dev> from pathlib import Path import pytest from pendulum.tz import local_timezone from pendulum.tz.timezone import Timezone from volt import exceptions as exc from volt.utils impor...
0
2,949
0
0
0
1,006
0
84
387
bce1e3c03b78df6780e7495f454c6223a623c9b6
1,903
py
Python
onpolicy/algorithms/utils/mlp.py
btx0424/on-policy
78e095be05a8596afcb4b7de8b3293844717fed6
[ "MIT" ]
null
null
null
onpolicy/algorithms/utils/mlp.py
btx0424/on-policy
78e095be05a8596afcb4b7de8b3293844717fed6
[ "MIT" ]
null
null
null
onpolicy/algorithms/utils/mlp.py
btx0424/on-policy
78e095be05a8596afcb4b7de8b3293844717fed6
[ "MIT" ]
null
null
null
import torch.nn as nn """MLP modules."""
33.982143
93
0.643195
import torch.nn as nn from .util import init, get_clones """MLP modules.""" class MLPLayer(nn.Module): def __init__(self, input_dim, hidden_size, layer_N, use_orthogonal, use_ReLU): super(MLPLayer, self).__init__() self._layer_N = layer_N active_func = [nn.Tanh(), nn.LeakyReLU()][use_ReLU...
0
0
0
1,780
0
0
0
13
68
66ca7e7099d65cd5d65da4ed82f8eb8ebea1c97f
1,562
py
Python
src/ndforest_test.py
Thijs3/Anomaly-Detection-with-RS-Quadtree
7389ba7c8359c22f7a00c4e0a1bc03534b0666b5
[ "MIT" ]
null
null
null
src/ndforest_test.py
Thijs3/Anomaly-Detection-with-RS-Quadtree
7389ba7c8359c22f7a00c4e0a1bc03534b0666b5
[ "MIT" ]
null
null
null
src/ndforest_test.py
Thijs3/Anomaly-Detection-with-RS-Quadtree
7389ba7c8359c22f7a00c4e0a1bc03534b0666b5
[ "MIT" ]
null
null
null
from prettytable import PrettyTable from sklearn.datasets import make_blobs, make_swiss_roll from src.ndforest import NDForest from sklearn import datasets ct = 0.1 # DATASETS ------------------------------------------------------------------------------------------------------------ big_small_blob = make_blobs(cen...
33.234043
119
0.59283
import numpy as np import matplotlib.pyplot as plt from prettytable import PrettyTable from sklearn.datasets import make_blobs, make_swiss_roll from src.ndforest import NDForest from sklearn import datasets ct = 0.1 def plot(data): fig = plt.figure() ax = plt.axes(projection='3d') colors = np.array(['#ff...
0
0
0
0
0
360
0
7
67
e4d62414686ed6aea9de1144747c552c551914f6
5,917
py
Python
10_Bayesian_optimization.py
theignorantzen/VLC-Pi
66f50d9393429c55716c4c036240c44a4e601a98
[ "MIT" ]
null
null
null
10_Bayesian_optimization.py
theignorantzen/VLC-Pi
66f50d9393429c55716c4c036240c44a4e601a98
[ "MIT" ]
null
null
null
10_Bayesian_optimization.py
theignorantzen/VLC-Pi
66f50d9393429c55716c4c036240c44a4e601a98
[ "MIT" ]
null
null
null
## https://scikit-optimize.github.io/notebooks/bayesian-optimization.html import numpy as np import matplotlib.pyplot as plt from skopt import gp_minimize ## Implemented in /home/sbn/anaconda2/lib/python2.7/site-packages/skopt/optimizer/base.py ## Implemented in /home/sbn/anaconda2/lib/python2.7/site-packages/skopt/...
40.806897
312
0.637823
## https://scikit-optimize.github.io/notebooks/bayesian-optimization.html import numpy as np import matplotlib.pyplot as plt from skopt import gp_minimize ## Implemented in /home/sbn/anaconda2/lib/python2.7/site-packages/skopt/optimizer/base.py ## Implemented in /home/sbn/anaconda2/lib/python2.7/site-packages/skopt/...
0
0
0
0
0
1,627
0
10
111
12c873ed8700281840e7cd4493116c688cb0027b
6,733
py
Python
python_simple_cli_apps/mbti/predefined.py
vietcodecamp/vietcode2019
9785909961b185ca40c59ebcff0f29ccac757352
[ "Apache-2.0" ]
1
2019-07-22T20:32:31.000Z
2019-07-22T20:32:31.000Z
python_simple_cli_apps/mbti/predefined.py
vietcodecamp/vietcode2018
9785909961b185ca40c59ebcff0f29ccac757352
[ "MIT" ]
2
2019-04-04T17:57:39.000Z
2019-08-17T00:34:01.000Z
python_simple_cli_apps/mbti/predefined.py
vietcodecamp/vietcode2019
9785909961b185ca40c59ebcff0f29ccac757352
[ "Apache-2.0" ]
null
null
null
#Predefined ==================================================================== #caption------------------------------------------------------------------------ caption = ''' ____ ____ ____________ ____________________ ___ | \ / | | ______ \ |_______ ________| | | ...
28.773504
135
0.611466
import sys import time #Predefined ==================================================================== #caption------------------------------------------------------------------------ caption = ''' ____ ____ ____________ ____________________ ___ | \ / | | ______ \ |_______...
856
0
0
0
0
144
0
-21
67
e55b2b66733074252c6fcc7e9fc2ee57371f880b
179
py
Python
gym_gridverse/__init__.py
DavidSlayback/gym-gridverse
b8916576a92489c030fb2c2060598c7f473f19f2
[ "MIT" ]
6
2020-10-15T14:45:11.000Z
2021-02-20T12:11:32.000Z
gym_gridverse/__init__.py
DavidSlayback/gym-gridverse
b8916576a92489c030fb2c2060598c7f473f19f2
[ "MIT" ]
5
2021-01-20T15:34:29.000Z
2022-03-18T18:52:53.000Z
gym_gridverse/__init__.py
DavidSlayback/gym-gridverse
b8916576a92489c030fb2c2060598c7f473f19f2
[ "MIT" ]
2
2021-01-11T18:48:49.000Z
2021-01-26T15:45:38.000Z
"""Top-level package for gym-gridverse.""" __author__ = """Andrea Baisero""" __email__ = 'andrea.baisero@gmail.com' __version__ = '0.0.1'
22.375
42
0.709497
"""Top-level package for gym-gridverse.""" __author__ = """Andrea Baisero""" __email__ = 'andrea.baisero@gmail.com' __version__ = '0.0.1' import gym_gridverse.gym # noqa: F401
0
0
0
0
0
0
0
3
37
7be2cfe34e92efe65b1c889ee1cc20443cd955e0
3,250
py
Python
deepcut/utils.py
wannaphong/deepcut
e4f7779caa087c5ffbad3bc4e88f919e300d020c
[ "MIT" ]
374
2017-06-24T11:55:10.000Z
2022-03-29T06:44:43.000Z
deepcut/utils.py
wannaphong/deepcut
e4f7779caa087c5ffbad3bc4e88f919e300d020c
[ "MIT" ]
61
2017-06-26T09:26:33.000Z
2022-01-16T11:34:13.000Z
deepcut/utils.py
wannaphong/deepcut
e4f7779caa087c5ffbad3bc4e88f919e300d020c
[ "MIT" ]
116
2017-06-25T15:11:11.000Z
2022-03-29T06:44:47.000Z
#!/usr/bin/env python # encoding: utf-8 import numpy as np CHAR_TYPE = { u'': 'c', u'': 'n', u'': 'v', # u'': 'w', u'': 't', # u'.': 's', # . u'0123456789': 'd', u'"': 'q', u"": 'q', u"": 'q', u"'": 'q', u' ': 'p', u'abcdefghijklmnopqrstuvwxyz': ...
36.931818
85
0.449538
#!/usr/bin/env python # encoding: utf-8 import numpy as np CHAR_TYPE = { u'กขฃคฆงจชซญฎฏฐฑฒณดตถทธนบปพฟภมยรลวศษสฬอ': 'c', u'ฅฉผฟฌหฮ': 'n', u'ะาำิีืึุู': 'v', # า ะ ำ ิ ี ึ ื ั ู ุ u'เแโใไ': 'w', u'่้๊๋': 't', # วรรณยุกต์ ่ ้ ๊ ๋ u'์ๆฯ.': 's', # ์ ๆ ฯ . u'0123456789๑๒๓๔๕๖๗๘๙': 'd', u'"'...
555
0
0
0
0
0
0
0
0
dbbe63d50ee140e50d39d1c1370c90463847404d
3,312
py
Python
tests/test_distillation_pipeline.py
anonymous-authors-2018/robotics-repo
385d1f3b49f8d414ab90f53c6f06b56614ae83ba
[ "MIT" ]
5
2019-08-21T22:57:21.000Z
2021-01-01T21:15:26.000Z
tests/test_distillation_pipeline.py
BillChan226/POAR-SRL-4-Robot
a6a8052e105369656d34fffc4f7ca4475dcc38df
[ "MIT" ]
null
null
null
tests/test_distillation_pipeline.py
BillChan226/POAR-SRL-4-Robot
a6a8052e105369656d34fffc4f7ca4475dcc38df
[ "MIT" ]
2
2019-11-26T11:41:12.000Z
2021-08-30T16:00:27.000Z
ENV_NAME = 'OmnirobotEnv-v0' PATH_SRL = "srl_zoo/data/" DEFAULT_SRL_TEACHERS = "ground_truth" DEFAULT_SRL_STUDENT = "raw_pixels" NUM_TIMESTEP = 25000 NUM_CPU = 4
38.964706
119
0.677838
import subprocess import pytest import os import shutil import time from rl_baselines.student_eval import OnPolicyDatasetGenerator, mergeData, trainStudent ENV_NAME = 'OmnirobotEnv-v0' PATH_SRL = "srl_zoo/data/" DEFAULT_SRL_TEACHERS = "ground_truth" DEFAULT_SRL_STUDENT = "raw_pixels" NUM_TIMESTEP = 25000 NUM_CPU = 4...
0
2,881
0
0
0
62
0
24
179
bb8ceaa884c563fe9caafd43440a7e5f6d763548
4,292
py
Python
tests/jumpgate-tests/network/test_subnet.py
wpf710/app-proxy
3340cdb90fea8da26fc82211a1e14c5e43beeae0
[ "MIT" ]
10
2015-01-19T14:21:32.000Z
2018-12-01T17:17:30.000Z
tests/jumpgate-tests/network/test_subnet.py
wpf710/app-proxy
3340cdb90fea8da26fc82211a1e14c5e43beeae0
[ "MIT" ]
6
2015-01-19T14:29:43.000Z
2015-07-02T11:09:32.000Z
tests/jumpgate-tests/network/test_subnet.py
wpf710/app-proxy
3340cdb90fea8da26fc82211a1e14c5e43beeae0
[ "MIT" ]
7
2015-02-18T01:57:04.000Z
2018-12-01T17:17:31.000Z
SUBNET_DICT = {'id': 10, 'networkIdentifier': '9.0.3.192', 'tenant_id': '6', 'cidr': 28, 'networkVlanId': 5, 'gateway': '9.0.3.193', 'version': 4, 'name': 'name'}
36.683761
70
0.627213
import unittest import falcon from falcon.testing import helpers import mock from jumpgate.network.drivers.sl import subnets SUBNET_DICT = {'id': 10, 'networkIdentifier': '9.0.3.192', 'tenant_id': '6', 'cidr': 28, 'networkVlanId': 5, 'gateway...
0
0
0
3,650
0
174
0
15
181
d9b0440ec2fa27ee3ef0e790dd78385e959fe0f6
3,656
py
Python
app/tests/api/api_v2/test_upload.py
qtdemo1/ibm-ops
29f3d4ba406a1c39a007468977784d6c39f056bb
[ "Apache-2.0" ]
1
2021-09-14T18:40:33.000Z
2021-09-14T18:40:33.000Z
app/tests/api/api_v2/test_upload.py
qtdemo1/ibm-ops
29f3d4ba406a1c39a007468977784d6c39f056bb
[ "Apache-2.0" ]
7
2021-04-23T13:41:39.000Z
2021-08-12T09:33:10.000Z
app/tests/api/api_v2/test_upload.py
qtdemo1/ibm-ops
29f3d4ba406a1c39a007468977784d6c39f056bb
[ "Apache-2.0" ]
5
2020-12-10T14:27:23.000Z
2022-03-29T08:44:22.000Z
#!/usr/bin/env python3 # # Copyright 2020 IBM # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
33.541284
74
0.669584
#!/usr/bin/env python3 # # Copyright 2020 IBM # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
0
0
0
0
0
2,617
0
136
292
f7d9a1de9bdba2047f0d19200ff51b8852a2bca8
1,559
py
Python
Examples/Aerobraking.py
IrTrez/msp-examples
463ed5e4fe703bf770f0e710266b0e0e112136f3
[ "MIT" ]
null
null
null
Examples/Aerobraking.py
IrTrez/msp-examples
463ed5e4fe703bf770f0e710266b0e0e112136f3
[ "MIT" ]
null
null
null
Examples/Aerobraking.py
IrTrez/msp-examples
463ed5e4fe703bf770f0e710266b0e0e112136f3
[ "MIT" ]
null
null
null
from msp import msp, simtools import time import math import numpy as np DATAFILE = "runs/Aerobraking.csv" ATMOSPHEREDATA = "densityModels/MarsDensity.csv" SPEED = 2000 # __ times speed RUNTIME = 300000 print("Total runtime will be:", RUNTIME, "s or:", RUNTIME/3600, "hours or:", RUNTIME/86400, "days") # USE km AS ST...
33.170213
99
0.748557
from msp import msp, simtools import time import math import numpy as np DATAFILE = "runs/Aerobraking.csv" ATMOSPHEREDATA = "densityModels/MarsDensity.csv" SPEED = 2000 # __ times speed RUNTIME = 300000 print("Total runtime will be:", RUNTIME, "s or:", RUNTIME/3600, "hours or:", RUNTIME/86400, "days") # USE km AS ST...
0
0
0
0
0
0
0
0
0
5ff606c1e731e0696b58ab84882b8bddd8a3dac1
1,631
py
Python
test/unit/test_swift.py
thiagodasilva/file-connector
d2fb5e9d1b41e126214d77c11354ec8d8ab53b2a
[ "Apache-2.0" ]
null
null
null
test/unit/test_swift.py
thiagodasilva/file-connector
d2fb5e9d1b41e126214d77c11354ec8d8ab53b2a
[ "Apache-2.0" ]
null
null
null
test/unit/test_swift.py
thiagodasilva/file-connector
d2fb5e9d1b41e126214d77c11354ec8d8ab53b2a
[ "Apache-2.0" ]
1
2021-12-29T11:37:07.000Z
2021-12-29T11:37:07.000Z
# Copyright (c) 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
29.654545
69
0.625996
# Copyright (c) 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
0
0
0
900
0
0
0
-20
135
4830b6d455205e9d9e839a6a30abaee494c2a2d4
120
py
Python
IPO/ipo7.py
ianramzy/high-school-assignments
6d3ca52de5c6b80a1f0678ca73b78a3024e95f05
[ "MIT" ]
null
null
null
IPO/ipo7.py
ianramzy/high-school-assignments
6d3ca52de5c6b80a1f0678ca73b78a3024e95f05
[ "MIT" ]
null
null
null
IPO/ipo7.py
ianramzy/high-school-assignments
6d3ca52de5c6b80a1f0678ca73b78a3024e95f05
[ "MIT" ]
null
null
null
mark = float(input('Mark?')) outof = float(input('Out of?')) print('Your mark is:',mark/outof*100,'%')
24
42
0.541667
mark = float(input('Mark?')) outof = float(input('Out of?')) print('Your mark is:',mark/outof*100,'%')
0
0
0
0
0
0
0
0
0
72b3f1716188bf9834b32cd4bdf6f80f812f377d
9,168
py
Python
facts/monterey_upgrade_supported.py
n8felton/munki-facts
175d40145041355df19078bc6287204e6557bb13
[ "Apache-2.0" ]
1
2019-07-16T21:57:53.000Z
2019-07-16T21:57:53.000Z
facts/monterey_upgrade_supported.py
n8felton/munki-facts
175d40145041355df19078bc6287204e6557bb13
[ "Apache-2.0" ]
null
null
null
facts/monterey_upgrade_supported.py
n8felton/munki-facts
175d40145041355df19078bc6287204e6557bb13
[ "Apache-2.0" ]
null
null
null
'''Returns a fact to indicate if this machine can be upgraded to macOS 12 Monterey''' # Based on # https://github.com/hjuutilainen/adminscripts/blob/master/ # check-10.12-sierra-compatibility.py # sysctl function by Michael Lynn # https://gist.github.com/pudquick/581a71425439f2cf8f09 # IOKit bindings by Mich...
32.168421
201
0.640816
'''Returns a fact to indicate if this machine can be upgraded to macOS 12 Monterey''' # Based on # https://github.com/hjuutilainen/adminscripts/blob/master/ # check-10.12-sierra-compatibility.py # sysctl function by Michael Lynn # https://gist.github.com/pudquick/581a71425439f2cf8f09 # IOKit bindings by Mich...
0
0
0
0
0
0
0
0
0
6974d6a83f6a227925d8831fb50dc2fdc12872cc
725
py
Python
src/PyMud/Systems/system_set.py
NichCritic/pymud
583ec16f5a75dc7b45146564b39851291dc07b6c
[ "MIT" ]
null
null
null
src/PyMud/Systems/system_set.py
NichCritic/pymud
583ec16f5a75dc7b45146564b39851291dc07b6c
[ "MIT" ]
null
null
null
src/PyMud/Systems/system_set.py
NichCritic/pymud
583ec16f5a75dc7b45146564b39851291dc07b6c
[ "MIT" ]
null
null
null
''' Created on 2014-03-23 @author: Nich '''
20.714286
56
0.56
''' Created on 2014-03-23 @author: Nich ''' class SystemSet(object): ''' classdocs ''' def __init__(self): self.systems = [] def register(self, system): self.systems.append(system) def process(self): for sys in self.systems: sys.process()...
0
0
0
592
0
0
0
0
58
a5bd55cc5f2207fad855a078dc75c8ec3a69d072
2,940
py
Python
Coverage and Robustness VS. Training Datasets/retrain_robustness.py
jiekeshi/CovTesting_Replication
fd647f4f4a455857476366571af6c7afb50ddab0
[ "MIT" ]
1
2022-01-18T06:56:10.000Z
2022-01-18T06:56:10.000Z
Coverage and Robustness VS. Training Datasets/retrain_robustness.py
jiekeshi/CovTesting_Replication
fd647f4f4a455857476366571af6c7afb50ddab0
[ "MIT" ]
1
2022-03-14T09:21:07.000Z
2022-03-14T09:32:03.000Z
Coverage and Robustness VS. Training Datasets/retrain_robustness.py
jiekeshi/CovTesting_Replication
fd647f4f4a455857476366571af6c7afb50ddab0
[ "MIT" ]
4
2022-01-16T05:14:50.000Z
2022-02-13T16:00:10.000Z
import argparse import warnings warnings.filterwarnings("ignore") import numpy as np import tensorflow as tf import os from helper import AttackEvaluate from helper import load_data, retrain ####for solving some specific problems, don't care config = tf.compat.v1.ConfigProto() config.gpu_options.allow_growth = True ...
36.75
101
0.639796
import argparse import warnings warnings.filterwarnings("ignore") import numpy as np import tensorflow as tf import os from helper import AttackEvaluate from helper import load_data, retrain ####for solving some specific problems, don't care config = tf.compat.v1.ConfigProto() config.gpu_options.allow_growth = True ...
0
0
0
0
0
0
0
0
0
ff877471efd0f367627c1eeb79f89e4b8f210970
318
py
Python
checklist/migrations/0017_remove_item_priority.py
cagandhi/Checklist-Django
c8edf1d8f821900a71f36abd34a76663d8d8f7da
[ "Apache-2.0" ]
3
2021-07-02T07:35:19.000Z
2022-01-14T11:14:14.000Z
checklist/migrations/0017_remove_item_priority.py
cagandhi/Checklist-Django
c8edf1d8f821900a71f36abd34a76663d8d8f7da
[ "Apache-2.0" ]
57
2021-01-31T23:39:57.000Z
2022-03-12T00:47:23.000Z
checklist/migrations/0017_remove_item_priority.py
cagandhi/Checklist-Django
c8edf1d8f821900a71f36abd34a76663d8d8f7da
[ "Apache-2.0" ]
3
2021-08-29T21:46:54.000Z
2022-03-24T13:10:00.000Z
# Generated by Django 3.0.4 on 2020-06-10 22:56
17.666667
47
0.578616
# Generated by Django 3.0.4 on 2020-06-10 22:56 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("checklist", "0016_follow"), ] operations = [ migrations.RemoveField( model_name="item", name="priority", ), ]
0
0
0
212
0
0
0
11
46
5961069052dd0dd1806ed16f88856d4914292264
4,948
py
Python
Source/NBAAnalysis.py
evangelos-zafeiratos/NBADataAnalysis
11e8e0016c856d23b83b945f1a5fba4f12e459f6
[ "MIT" ]
null
null
null
Source/NBAAnalysis.py
evangelos-zafeiratos/NBADataAnalysis
11e8e0016c856d23b83b945f1a5fba4f12e459f6
[ "MIT" ]
null
null
null
Source/NBAAnalysis.py
evangelos-zafeiratos/NBADataAnalysis
11e8e0016c856d23b83b945f1a5fba4f12e459f6
[ "MIT" ]
null
null
null
import pandas as pd import os path = r'C:\Users\Vangelis\Desktop\Courses & Projects\Data Analysis Projects\NBA Datasets Analysis\Data' os.chdir(path) #seasonList1 = ['1996_1997'] seasonList = ['1996_1997', '1997_1998', '1998_1999', '1999_2000', '2000_...
44.178571
165
0.600647
import pandas as pd import os path = r'C:\Users\Vangelis\Desktop\Courses & Projects\Data Analysis Projects\NBA Datasets Analysis\Data' os.chdir(path) #seasonList1 = ['1996_1997'] seasonList = ['1996_1997', '1997_1998', '1998_1999', '1999_2000', '2000_...
0
0
0
0
0
3,777
0
0
25
218a5bf812161a6e6be4a850c04fcd64e1237f6e
421
py
Python
chess/try_chess.py
nivm/learningchess
e22e019af7a85c91a27cd10ae2759be0d00bcda3
[ "Apache-2.0" ]
null
null
null
chess/try_chess.py
nivm/learningchess
e22e019af7a85c91a27cd10ae2759be0d00bcda3
[ "Apache-2.0" ]
1
2016-03-22T10:39:44.000Z
2016-03-22T10:39:57.000Z
chess/try_chess.py
nivm/learningchess
e22e019af7a85c91a27cd10ae2759be0d00bcda3
[ "Apache-2.0" ]
null
null
null
import chess board = chess.Bitboard() board.push_san("e4") board.push_san("e5") board.push_san("Qh5") board.push_san("Nc6") board.push_san("Bc4") board.push_san("Nf6") board.push_san("Qxf7") print "is_checkmate: " +str(board.is_checkmate()) print "is_stalemate: " +str(board.is_stalemate()) print "is_insufficient_materi...
32.384615
73
0.752969
import chess board = chess.Bitboard() board.push_san("e4") board.push_san("e5") board.push_san("Qh5") board.push_san("Nc6") board.push_san("Bc4") board.push_san("Nf6") board.push_san("Qxf7") print "is_checkmate: " +str(board.is_checkmate()) print "is_stalemate: " +str(board.is_stalemate()) print "is_insufficient_materi...
0
0
0
0
0
0
0
0
0
b169f82d5dd9d6eaa6899d1747708c18d34f2b19
1,007
py
Python
Longest Substring Without Repeating Characters.py
H-isaac23/Data-Structures
2a860549ebc87155cdcf98ca951f1e345dd40499
[ "MIT" ]
null
null
null
Longest Substring Without Repeating Characters.py
H-isaac23/Data-Structures
2a860549ebc87155cdcf98ca951f1e345dd40499
[ "MIT" ]
null
null
null
Longest Substring Without Repeating Characters.py
H-isaac23/Data-Structures
2a860549ebc87155cdcf98ca951f1e345dd40499
[ "MIT" ]
null
null
null
"""Given a string s, find the length of the longest substring without repeating characters. Example 1: Input: s = "abcabcbb" Output: 3 Explanation: The answer is "abc", with the length of 3. Example 2: Input: s = "bbbbb" Output: 1 Explanation: The answer is "b", with the length of 1. Example 3: Input: s = "pwwkew" O...
22.886364
91
0.590864
"""Given a string s, find the length of the longest substring without repeating characters. Example 1: Input: s = "abcabcbb" Output: 3 Explanation: The answer is "abc", with the length of 3. Example 2: Input: s = "bbbbb" Output: 1 Explanation: The answer is "b", with the length of 1. Example 3: Input: s = "pwwkew" O...
0
0
0
367
0
0
0
0
23
e2d8c4a198ef6dfc64fe8d7c70606f3455944daa
2,838
py
Python
05/1_string.py
Saeedmoeen/ArcaPython
1ab529224e51252220ee376dd88e9dff02427685
[ "Apache-2.0" ]
null
null
null
05/1_string.py
Saeedmoeen/ArcaPython
1ab529224e51252220ee376dd88e9dff02427685
[ "Apache-2.0" ]
3
2021-12-23T14:05:38.000Z
2021-12-24T07:09:02.000Z
05/1_string.py
Saeedmoeen/ArcaPython
1ab529224e51252220ee376dd88e9dff02427685
[ "Apache-2.0" ]
1
2021-12-23T13:59:43.000Z
2021-12-23T13:59:43.000Z
# define string # - method 1 first_name = 'kaveh' # - method 2 last_name = "mehrbanian" # - method 3(multi-line) bio = '''this is about me ''' # - method 4(multi-line) description = """some description about kaveh mehrbanian """ # access characters in string first_name[1] # 'a' first_name[3] # 'e' bio[-2] ...
24.465517
74
0.536646
# define string # - method 1 first_name = 'kaveh' # - method 2 last_name = "mehrbanian" # - method 3(multi-line) bio = '''this is about me ''' # - method 4(multi-line) description = """some description about kaveh mehrbanian """ # access characters in string first_name[1] # 'a' first_name[3] # 'e' bio[-2] ...
0
0
0
0
0
0
0
0
0
d9220938425bab243063ef3c7462642788623fd1
511
py
Python
kubernetes_typed/client/models/v1_node_system_info.py
nikhiljha/kubernetes-typed
4f4b969aa400c88306f92560e56bda6d19b2a895
[ "Apache-2.0" ]
22
2020-12-10T13:06:02.000Z
2022-02-13T21:58:15.000Z
kubernetes_typed/client/models/v1_node_system_info.py
nikhiljha/kubernetes-typed
4f4b969aa400c88306f92560e56bda6d19b2a895
[ "Apache-2.0" ]
4
2021-03-08T07:06:12.000Z
2022-03-29T23:41:45.000Z
kubernetes_typed/client/models/v1_node_system_info.py
nikhiljha/kubernetes-typed
4f4b969aa400c88306f92560e56bda6d19b2a895
[ "Apache-2.0" ]
2
2021-09-05T19:18:28.000Z
2022-03-14T02:56:17.000Z
# Code generated by `typeddictgen`. DO NOT EDIT. """V1NodeSystemInfoDict generated type.""" from typing import TypedDict V1NodeSystemInfoDict = TypedDict( "V1NodeSystemInfoDict", { "architecture": str, "bootID": str, "containerRuntimeVersion": str, "kernelVersion": str, ...
24.333333
48
0.60274
# Code generated by `typeddictgen`. DO NOT EDIT. """V1NodeSystemInfoDict generated type.""" from typing import TypedDict V1NodeSystemInfoDict = TypedDict( "V1NodeSystemInfoDict", { "architecture": str, "bootID": str, "containerRuntimeVersion": str, "kernelVersion": str, ...
0
0
0
0
0
0
0
0
0
045899c42059567ffd733f794f0bc0325d6a6a73
645
py
Python
visual_dynamics/envs/__init__.py
alexlee-gk/visual_dynamics
90227bb0d0aebb1989117b5c25ca311655ca7cc7
[ "MIT" ]
30
2017-04-05T12:55:09.000Z
2022-03-14T14:31:31.000Z
visual_dynamics/envs/__init__.py
alexlee-gk/visual_dynamics
90227bb0d0aebb1989117b5c25ca311655ca7cc7
[ "MIT" ]
1
2017-06-19T02:39:03.000Z
2017-06-19T02:39:03.000Z
visual_dynamics/envs/__init__.py
alexlee-gk/visual_dynamics
90227bb0d0aebb1989117b5c25ca311655ca7cc7
[ "MIT" ]
13
2017-04-05T12:55:09.000Z
2021-03-16T01:59:12.000Z
try: except ImportError: pass try: except ImportError: pass try: except ImportError: pass
30.714286
123
0.8
from .base import Env from .env_spec import EnvSpec try: from .servoing_env import ServoingEnv from .panda3d_env import Panda3dEnv from .car_panda3d_env import CarPanda3dEnv, StraightCarPanda3dEnv, SimpleGeometricCarPanda3dEnv, GeometricCarPanda3dEnv from .quad_panda3d_env import SimpleQuadPanda3dEnv, P...
0
0
0
0
0
0
0
265
278
a9e8fa558c0c0d39889a5e51080e0cc6c57bcca8
78
py
Python
run.py
raytroop/cnn_handwritten_chinese_recognition
6177600f393c8dc778f61fd5c3c1815e669cd04c
[ "MIT" ]
null
null
null
run.py
raytroop/cnn_handwritten_chinese_recognition
6177600f393c8dc778f61fd5c3c1815e669cd04c
[ "MIT" ]
null
null
null
run.py
raytroop/cnn_handwritten_chinese_recognition
6177600f393c8dc778f61fd5c3c1815e669cd04c
[ "MIT" ]
null
null
null
from app import launch_server if __name__ == '__main__': launch_server()
15.6
29
0.730769
from app import launch_server if __name__ == '__main__': launch_server()
0
0
0
0
0
0
0
0
0
73fc4932899e49dcaf50e5162185537c57b07f80
2,124
py
Python
camping_server1/app/main/service/congestion.py
HyunjinKIM-Chloe/Crawling_project
da7d24a33c5b5f8696075b7f9a7313dc7cd42949
[ "MIT" ]
2
2021-05-28T12:12:56.000Z
2021-05-30T12:15:06.000Z
camping_server1/app/main/service/congestion.py
HyunjinKIM-Chloe/Crawling_project
da7d24a33c5b5f8696075b7f9a7313dc7cd42949
[ "MIT" ]
35
2021-06-25T09:54:12.000Z
2021-10-18T00:09:37.000Z
camping_server1/app/main/service/congestion.py
HyunjinKIM-Chloe/Crawling_project
da7d24a33c5b5f8696075b7f9a7313dc7cd42949
[ "MIT" ]
4
2021-05-28T12:10:37.000Z
2021-05-31T11:37:17.000Z
import sys import os sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__)))) sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))))
40.075472
110
0.625706
import pandas as pd import datetime import sys import os sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__)))) sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(os.path.abspath(os.path.dirname(__file__)))))) from ..model.connect import Query as sc class Visitor(sc): def __init...
0
0
0
1,816
0
0
0
10
89
694c8ceb12d65038b7ee4f717fd0be6033f77075
88
py
Python
gym/envs/__init__.py
LucienShui/SnakeAI
9636d881f5d9647bf8f8a3f60ec890ccf7a6e245
[ "Apache-2.0" ]
1
2020-08-12T07:10:43.000Z
2020-08-12T07:10:43.000Z
gym/envs/__init__.py
LucienShui/SnakeAI
9636d881f5d9647bf8f8a3f60ec890ccf7a6e245
[ "Apache-2.0" ]
1
2020-08-19T07:38:38.000Z
2020-08-19T07:38:38.000Z
gym/envs/__init__.py
LucienShui/SnakeAI
9636d881f5d9647bf8f8a3f60ec890ccf7a6e245
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import, print_function
22
54
0.863636
from __future__ import absolute_import, print_function from .snake_env import SnakeEnv
0
0
0
0
0
0
0
10
23
d2722f266bd7877770de2915d47afbb8f6bbf0e2
3,800
py
Python
src/inform_mapper/inform_text.py
attilathedud/inform_mapper
6d04eae896b9e36124099251877bd3a75e485f96
[ "Apache-2.0" ]
9
2017-10-27T14:06:20.000Z
2022-03-30T06:42:50.000Z
src/inform_mapper/inform_text.py
attilathedud/inform_mapper
6d04eae896b9e36124099251877bd3a75e485f96
[ "Apache-2.0" ]
null
null
null
src/inform_mapper/inform_text.py
attilathedud/inform_mapper
6d04eae896b9e36124099251877bd3a75e485f96
[ "Apache-2.0" ]
null
null
null
""" Contains all the logic for decoding inform text strings. http://inform-fiction.org/zmachine/standards/z1point0/sect03.html describes the text encoding scheme. This package does not handle custom dictionaries, abbrevations, and v1 files as I have not been able to find any while testing. """ """ The base (a1 and a...
35.514019
100
0.554474
""" Contains all the logic for decoding inform text strings. http://inform-fiction.org/zmachine/standards/z1point0/sect03.html describes the text encoding scheme. This package does not handle custom dictionaries, abbrevations, and v1 files as I have not been able to find any while testing. """ """ The base (a1 and a...
0
0
0
0
0
0
0
0
0
028af7611ac600820a17fdee2f0ee653c8b69fae
4,115
py
Python
examples.py
martinlackner/frege
903b7c497dafa1f136f72293797cb0b5543e8cf2
[ "MIT" ]
2
2019-09-09T16:18:04.000Z
2019-09-11T16:52:01.000Z
examples.py
martinlackner/frege
903b7c497dafa1f136f72293797cb0b5543e8cf2
[ "MIT" ]
null
null
null
examples.py
martinlackner/frege
903b7c497dafa1f136f72293797cb0b5543e8cf2
[ "MIT" ]
null
null
null
""" Examples from Paul Harrenstein, Marie-Louise Lackner, and Martin Lackner. *A Mathematical Analysis of an Election System Proposed by Gottlob Frege*. To appear in Erkenntnis. 2020. Preprint: https://arxiv.org/abs/1907.03643 """ from __future__ import print_function from frege import frege, modfrege import apportion...
33.729508
74
0.59271
""" Examples from Paul Harrenstein, Marie-Louise Lackner, and Martin Lackner. *A Mathematical Analysis of an Election System Proposed by Gottlob Frege*. To appear in Erkenntnis. 2020. Preprint: https://arxiv.org/abs/1907.03643 """ from __future__ import print_function from frege import frege, modfrege import apportion...
0
0
0
0
0
0
0
0
0
38154b89e8d05c2805dae7e98c2467c6eb562087
1,072
py
Python
anaf/core/search/dbsearch.py
tovmeod/anaf
80e4a00532ce6f4ce76c5ffc858ff90c759a9879
[ "BSD-3-Clause" ]
2
2016-03-15T13:17:26.000Z
2017-03-22T15:39:01.000Z
anaf/core/search/dbsearch.py
tovmeod/anaf
80e4a00532ce6f4ce76c5ffc858ff90c759a9879
[ "BSD-3-Clause" ]
4
2021-03-19T21:42:58.000Z
2022-03-11T23:13:07.000Z
anaf/core/search/dbsearch.py
tovmeod/anaf
80e4a00532ce6f4ce76c5ffc858ff90c759a9879
[ "BSD-3-Clause" ]
4
2016-08-31T16:55:41.000Z
2020-04-22T18:48:54.000Z
from django.db.models import Q, CharField, TextField from django.apps import apps from anaf.core.models import Object params = [] for model in apps.get_models(): if issubclass(model, Object) and getattr(model, 'searcheable', True): for field in model._meta.fields: if isinstance(field, (CharFi...
31.529412
97
0.610075
from django.db.models import Q, CharField, TextField from django.apps import apps from anaf.core.models import Object params = [] for model in apps.get_models(): if issubclass(model, Object) and getattr(model, 'searcheable', True): for field in model._meta.fields: if isinstance(field, (CharFi...
0
0
0
0
0
0
0
0
0
970b6611806d74ccb208050d4e68057cf8ccd2c7
923
py
Python
graphdatascience/tests/integration/conftest.py
soerenreichardt/graph-data-science-client
845c79cabdb21d57b590d51e4ddad0fa7a1caeab
[ "Apache-2.0" ]
null
null
null
graphdatascience/tests/integration/conftest.py
soerenreichardt/graph-data-science-client
845c79cabdb21d57b590d51e4ddad0fa7a1caeab
[ "Apache-2.0" ]
null
null
null
graphdatascience/tests/integration/conftest.py
soerenreichardt/graph-data-science-client
845c79cabdb21d57b590d51e4ddad0fa7a1caeab
[ "Apache-2.0" ]
null
null
null
import os URI = os.environ.get("NEO4J_URI", "bolt://localhost:7687") AUTH = None if os.environ.get("NEO4J_USER") is not None: AUTH = ( os.environ.get("NEO4J_USER"), os.environ.get("NEO4J_PASSWORD", "neo4j"), )
24.945946
77
0.752979
import os from typing import Generator import pytest from neo4j import Driver, GraphDatabase from graphdatascience.graph_data_science import GraphDataScience from graphdatascience.query_runner.neo4j_query_runner import Neo4jQueryRunner URI = os.environ.get("NEO4J_URI", "bolt://localhost:7687") AUTH = None if os.env...
0
387
0
0
0
0
0
116
181
2d8765c1cce7eed8f8a08948cb15a4e2769a7bb7
5,270
bzl
Python
bazel/platform_configs.bzl
v8App/v8App
96c5278ae9078d508537f2e801b9ba0272ab1168
[ "MIT" ]
null
null
null
bazel/platform_configs.bzl
v8App/v8App
96c5278ae9078d508537f2e801b9ba0272ab1168
[ "MIT" ]
null
null
null
bazel/platform_configs.bzl
v8App/v8App
96c5278ae9078d508537f2e801b9ba0272ab1168
[ "MIT" ]
null
null
null
# Copyright 2020 the v8App authors. All right reserved. # Use of this source code is governed by the MIT license # that can be found in the LICENSE file.
27.305699
56
0.493359
# Copyright 2020 the v8App authors. All right reserved. # Use of this source code is governed by the MIT license # that can be found in the LICENSE file. def define_platform_config_settings(): native.config_setting( name = "debug", values = { "compilation_mode": "dbg", }, ...
0
0
0
0
0
5,093
0
0
23
9b1e65ed615a761668a4989de6f8cb37d70f8303
315
py
Python
setup.py
iAnomaly/sceptre-resolver-aws-secrets-manager
58a0c120e86a4a71b3b01e2d5159366f17d32629
[ "Apache-2.0" ]
1
2020-05-28T07:18:23.000Z
2020-05-28T07:18:23.000Z
setup.py
iAnomaly/sceptre-resolver-aws-secrets-manager
58a0c120e86a4a71b3b01e2d5159366f17d32629
[ "Apache-2.0" ]
2
2019-05-08T16:45:40.000Z
2021-09-01T22:43:51.000Z
setup.py
iAnomaly/sceptre-resolver-aws-secrets-manager
58a0c120e86a4a71b3b01e2d5159366f17d32629
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from setuptools import setup setup( name='sceptre-resolver-aws-secrets-manager', version="1.0.0", py_modules=['aws_secrets_manager'], entry_points={ 'sceptre.resolvers': [ 'aws_secrets_manager = aws_secrets_manager:AwsSecretsManager', ], } )
22.5
74
0.628571
# -*- coding: utf-8 -*- from setuptools import setup setup( name='sceptre-resolver-aws-secrets-manager', version="1.0.0", py_modules=['aws_secrets_manager'], entry_points={ 'sceptre.resolvers': [ 'aws_secrets_manager = aws_secrets_manager:AwsSecretsManager', ], } )
0
0
0
0
0
0
0
0
0
ae81bc98da637a98fe61d219df77bddc23f53e66
13,841
py
Python
dashboard/dashboard.py
MrDionesalvi/APU
a992cffca3332bcc7ba1e3ed5d42f3f4789d0b8b
[ "MIT" ]
null
null
null
dashboard/dashboard.py
MrDionesalvi/APU
a992cffca3332bcc7ba1e3ed5d42f3f4789d0b8b
[ "MIT" ]
null
null
null
dashboard/dashboard.py
MrDionesalvi/APU
a992cffca3332bcc7ba1e3ed5d42f3f4789d0b8b
[ "MIT" ]
null
null
null
dashboard = Blueprint('dashboard', __name__, template_folder='views', static_folder='assets', static_url_path='/assets') typeOfBees = { 0: "Comune", 1: "Preziosa", 2: "Minerale", 3: "Nether" }
36.909333
291
0.555885
import json import html import string import random import requests from utils import * from create_invoicePDF import create_invoice from flask import * from sqlalchemy.sql.elements import * from database import Database from datetime import date from dateutil.relativedelta import relativedelta dashbo...
10
8,245
0
0
0
4,726
0
32
602
785e4a59d4d841294dbc822c3421a6e71a51a8a9
17,499
py
Python
tools/utils.py
URUSCG-LLC/fletch
35967b56cecce8fd5ae96a0d85ca318272ee69a0
[ "BSD-3-Clause" ]
null
null
null
tools/utils.py
URUSCG-LLC/fletch
35967b56cecce8fd5ae96a0d85ca318272ee69a0
[ "BSD-3-Clause" ]
null
null
null
tools/utils.py
URUSCG-LLC/fletch
35967b56cecce8fd5ae96a0d85ca318272ee69a0
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. # This file contains a set of utilities functions used by other Python-based # scripts. import commands i...
28.876238
122
0.65838
# Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. # This file contains a set of utilities functions used by other Python-based # scripts. import commands i...
0
0
0
1,065
0
12,577
0
0
935
7966caafd70219d09093d5440fc7f9e2b7aaf0bd
6,368
py
Python
Exploration Strategy/distancemin.py
salamenthe/STA-Robot-autonome
fb55cb0de0a23c05d049ae7d3859f2b6cdbb9b54
[ "MIT" ]
null
null
null
Exploration Strategy/distancemin.py
salamenthe/STA-Robot-autonome
fb55cb0de0a23c05d049ae7d3859f2b6cdbb9b54
[ "MIT" ]
1
2021-11-12T09:48:09.000Z
2021-11-12T09:48:09.000Z
Exploration Strategy/distancemin.py
salamenthe/STA-Robot-autonome
fb55cb0de0a23c05d049ae7d3859f2b6cdbb9b54
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Nov 8 14:48:20 2021 @author: utilisateur """ import numpy as np # Trouver la zone inexplore la plus proche du robot M = np.array([[0,0,1,1], [0,1,0.5,1], [0,0,1,1], [1,0,0,0]]) #fonction utile pour le programme suivant #Algorithme du p...
27.5671
100
0.482569
# -*- coding: utf-8 -*- """ Created on Mon Nov 8 14:48:20 2021 @author: utilisateur """ import numpy as np import heapq import matplotlib.pyplot as plt from PIL import Image # Trouver la zone inexplorée la plus proche du robot M = np.array([[0,0,1,1], [0,1,0.5,1], [0,0,1,1], [1,...
12
0
0
0
0
5,604
0
1
291
c4c6a67d84ccc8192e9503470ecf31f7e869fa68
1,700
py
Python
runapp/run_clock.py
bryvogel/cgm-clock
62ace6ee312e6232282eeaaa69c01d261cfa3a52
[ "Apache-2.0" ]
null
null
null
runapp/run_clock.py
bryvogel/cgm-clock
62ace6ee312e6232282eeaaa69c01d261cfa3a52
[ "Apache-2.0" ]
null
null
null
runapp/run_clock.py
bryvogel/cgm-clock
62ace6ee312e6232282eeaaa69c01d261cfa3a52
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python from Libs.Clock import Clock from Libs.PiTFT import Display from Libs.Weather import Weather from Libs.Input import Button from Libs.GStreamer import Speaker from config import configuration # The weather station station_name = configuration.get('weather_station') weather_station = Weather(...
24.285714
68
0.714118
#!/usr/bin/python import time import datetime from Libs.Clock import Clock from Libs.PiTFT import Display from Libs.Weather import Weather from Libs.Input import Button from Libs.GStreamer import Speaker from config import configuration # The weather station station_name = configuration.get('weather_stati...
0
0
0
0
0
708
0
-16
117
fa9a4a7ff23b2927d64c59d68153b8e741bd8772
438
py
Python
code/test/duc_data.py
lavizhao/insummer
16520a6c3114e2d6360dca469221bed00a570785
[ "MIT" ]
7
2017-03-18T07:44:17.000Z
2019-10-28T03:01:33.000Z
code/test/duc_data.py
lavizhao/insummer
16520a6c3114e2d6360dca469221bed00a570785
[ "MIT" ]
1
2020-01-06T06:45:40.000Z
2020-01-06T06:45:40.000Z
code/test/duc_data.py
lavizhao/insummer
16520a6c3114e2d6360dca469221bed00a570785
[ "MIT" ]
4
2016-08-09T02:56:57.000Z
2019-10-19T14:19:42.000Z
#!/usr/bin/python3 #.py for test load data.. import sys sys.path.append("../") from insummer.read_conf import config duc_conf = config('../../conf/question.conf') if __name__ == "__main__": test_question(duc_conf['duc_question'])
19.043478
45
0.671233
#!/usr/bin/python3 #.py for test load data.. import sys sys.path.append("../") import insummer from insummer.read_conf import config import pickle duc_conf = config('../../conf/question.conf') def test_question(data_path): f = open(data_path,'rb') data = pickle.load(f) for idx in data: print(id...
0
0
0
0
0
146
0
-14
68
580990039852837d822098ac9d8c870cbfca3c2a
17,457
py
Python
gcloud/bigtable/_generated/bigtable_service_pb2.py
scrapinghub/gcloud-python
1ec6d636ebf2c4d618aca6b2485fbbfa5f0fde29
[ "Apache-2.0" ]
null
null
null
gcloud/bigtable/_generated/bigtable_service_pb2.py
scrapinghub/gcloud-python
1ec6d636ebf2c4d618aca6b2485fbbfa5f0fde29
[ "Apache-2.0" ]
null
null
null
gcloud/bigtable/_generated/bigtable_service_pb2.py
scrapinghub/gcloud-python
1ec6d636ebf2c4d618aca6b2485fbbfa5f0fde29
[ "Apache-2.0" ]
2
2017-07-30T16:18:23.000Z
2020-10-14T11:24:18.000Z
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/bigtable/v1/bigtable_service.proto from google.protobuf import descriptor as _descriptor from google.protobuf import symbol_database as _symbol_database from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) _sym_db = ...
63.25
1,522
0.829868
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/bigtable/v1/bigtable_service.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symb...
0
1,552
0
1,200
0
11,097
0
258
378
bb58beeab0e42743155a5a727d63ebc17ba66c26
5,643
py
Python
built-in/TensorFlow/Official/nlp/Transformer_for_TensorFlow/noahnmt/utils/decode_utils.py
Huawei-Ascend/modelzoo
df51ed9c1d6dbde1deef63f2a037a369f8554406
[ "Apache-2.0" ]
null
null
null
built-in/TensorFlow/Official/nlp/Transformer_for_TensorFlow/noahnmt/utils/decode_utils.py
Huawei-Ascend/modelzoo
df51ed9c1d6dbde1deef63f2a037a369f8554406
[ "Apache-2.0" ]
3
2021-03-31T20:15:40.000Z
2022-02-09T23:50:46.000Z
built-in/TensorFlow/Official/nlp/Transformer_for_TensorFlow/noahnmt/utils/decode_utils.py
Huawei-Ascend/modelzoo
df51ed9c1d6dbde1deef63f2a037a369f8554406
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright Huawei Noah's Ark Lab. """ Generates model predictions. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import tensorflow as tf try: LOCAL_CACHE_DIR = os.environ['DLS_LOCAL_CACHE_PATH'] except KeyError: tf.log...
29.390625
96
0.705653
# coding=utf-8 # Copyright Huawei Noah's Ark Lab. """ Generates model predictions. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import time import sys import tensorflow as tf from noahnmt.utils import data_utils from noahnmt.utils import...
0
0
0
0
2,396
1,182
0
119
337
53d07d459c56e652eb5311fbbb4f64529ff2d091
2,449
py
Python
autograd/scipy/stats/multivariate_normal.py
gautam1858/autograd
8d7acaf79e33139b4ebfedf7da0602a965b47c63
[ "MIT" ]
51
2019-02-01T19:43:37.000Z
2022-03-16T09:07:03.000Z
autograd/scipy/stats/multivariate_normal.py
gautam1858/autograd
8d7acaf79e33139b4ebfedf7da0602a965b47c63
[ "MIT" ]
6
2020-01-28T22:44:28.000Z
2022-02-10T00:23:23.000Z
autograd/scipy/stats/multivariate_normal.py
gautam1858/autograd
8d7acaf79e33139b4ebfedf7da0602a965b47c63
[ "MIT" ]
35
2019-02-08T02:00:31.000Z
2022-03-01T23:17:00.000Z
from __future__ import absolute_import import scipy.stats import autograd.numpy as np from autograd.numpy.numpy_vjps import unbroadcast_f from autograd.extend import primitive, defvjp pdf = primitive(scipy.stats.multivariate_normal.pdf) logpdf = primitive(scipy.stats.multivariate_normal.logpdf) entropy = primit...
41.508475
119
0.682728
from __future__ import absolute_import import scipy.stats import autograd.numpy as np from autograd.numpy.numpy_vjps import unbroadcast_f from autograd.extend import primitive, defvjp pdf = primitive(scipy.stats.multivariate_normal.pdf) logpdf = primitive(scipy.stats.multivariate_normal.logpdf) entropy = primit...
0
0
0
0
0
572
0
0
69
b4f0fd3c1e7111cf0459117142ca773e52dba84b
125
py
Python
tests/templates/__init__.py
genki0403/pytest-testreport
9470ce49900e1accbb83fb6e7c955a6d7da73579
[ "MIT" ]
2
2021-05-17T06:30:24.000Z
2021-11-16T03:43:21.000Z
tests/templates/__init__.py
genki0403/pytest-testreport
9470ce49900e1accbb83fb6e7c955a6d7da73579
[ "MIT" ]
null
null
null
tests/templates/__init__.py
genki0403/pytest-testreport
9470ce49900e1accbb83fb6e7c955a6d7da73579
[ "MIT" ]
1
2021-12-29T10:49:05.000Z
2021-12-29T10:49:05.000Z
""" ============================ Author:- Time:2021/5/13 20:52 E-mail:3247119728@qq.com Company: ======= """
15.625
28
0.52
""" ============================ Author:柠檬班-木森 Time:2021/5/13 20:52 E-mail:3247119728@qq.com Company:湖南零檬信息技术有限公司 ======= """
51
0
0
0
0
0
0
0
0
35a98bb08721555250d9ae8d3046527e2d5d93e1
628
py
Python
11_checkPrimalityFunctions.py
hjlarrea/pythonExercises
f634489d181292bc51b4a4770b497c1f57e097d7
[ "MIT" ]
null
null
null
11_checkPrimalityFunctions.py
hjlarrea/pythonExercises
f634489d181292bc51b4a4770b497c1f57e097d7
[ "MIT" ]
null
null
null
11_checkPrimalityFunctions.py
hjlarrea/pythonExercises
f634489d181292bc51b4a4770b497c1f57e097d7
[ "MIT" ]
null
null
null
#Ask the user for a number and determine whether the number is prime or not. # (For those who have forgotten, a prime number is a number that has no divisors.). # You can (and should!) use your answer to Exercise 4 to help you. Take this # opportunity to practice using functions, described below. userNumber = int(i...
33.052632
84
0.679936
#Ask the user for a number and determine whether the number is prime or not. # (For those who have forgotten, a prime number is a number that has no divisors.). # You can (and should!) use your answer to Exercise 4 to help you. Take this # opportunity to practice using functions, described below. def howManyDivisor...
0
0
0
0
0
118
0
0
23
fc13581c6053a484c21c064fa54601836bed6b84
4,206
py
Python
sortedm2m_tests/test_forms.py
tenzo-dev/django-sorted-m2m
ce220ef23706dd4e4a9f53f216984c865f008ddf
[ "BSD-3-Clause" ]
7
2019-06-10T09:48:18.000Z
2020-04-26T08:05:07.000Z
sortedm2m_tests/test_forms.py
tenzo-dev/django-sorted-m2m
ce220ef23706dd4e4a9f53f216984c865f008ddf
[ "BSD-3-Clause" ]
null
null
null
sortedm2m_tests/test_forms.py
tenzo-dev/django-sorted-m2m
ce220ef23706dd4e4a9f53f216984c865f008ddf
[ "BSD-3-Clause" ]
3
2019-06-21T09:02:42.000Z
2019-08-15T19:37:54.000Z
# -*- coding: utf-8 -*-
36.258621
106
0.605801
# -*- coding: utf-8 -*- from django import forms from django.test import TestCase from django.utils.encoding import force_text from sortedm2m.forms import SortedMultipleChoiceField from .models import Book, MessyStore, Shelf class SortedForm(forms.Form): values = SortedMultipleChoiceField( queryset=Book....
0
0
0
3,908
0
0
0
91
180
7c34edabb7ee109a6e4b43929ffb0982cb2a95f0
487
py
Python
templates/py/main.py
composo/composo-python-plugin
b199d296afaf8d23b291626d3d9cbce9c9d511e3
[ "MIT" ]
null
null
null
templates/py/main.py
composo/composo-python-plugin
b199d296afaf8d23b291626d3d9cbce9c9d511e3
[ "MIT" ]
null
null
null
templates/py/main.py
composo/composo-python-plugin
b199d296afaf8d23b291626d3d9cbce9c9d511e3
[ "MIT" ]
null
null
null
if __name__ == "__main__": test()
19.48
57
0.694045
import fire from __PACKAGE_NAME__ import ioc from appdirs import user_config_dir from pathlib import Path def main(): conf_dir = Path(user_config_dir("__PROJECT_NAME__")) ioc.Config.config.from_yaml(conf_dir / "config.yaml") app = ioc.App.app() fire.Fire(app) def test(): conf_dir = Path(user_co...
0
0
0
0
0
293
0
18
134
9b713d44c8017dd0c27e083b05dd9b1c3f634594
4,550
py
Python
18_snailfish.py
xphade/aoc2021
b19949a3b61c87ceaf0d367271a26677b694d287
[ "MIT" ]
2
2021-12-09T17:37:14.000Z
2021-12-09T18:09:25.000Z
18_snailfish.py
xphade/aoc2021
b19949a3b61c87ceaf0d367271a26677b694d287
[ "MIT" ]
null
null
null
18_snailfish.py
xphade/aoc2021
b19949a3b61c87ceaf0d367271a26677b694d287
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from math import ceil, floor import re from typing import List RE_LAST_NUMBER = re.compile(r"(\d+)(?!.*\d)") RE_NUMBER = re.compile(r"\d+") RE_PAIR = re.compile(r"\[\d+,\d+\]") RE_NUMBER_GT_10 = re.compile(r"[\d]{2,}") SnailfishNumber = str def add_without_reduce(a: SnailfishNumber, b: Snailf...
32.733813
87
0.641538
#!/usr/bin/env python3 from aoc_utils import get_input_path, print_elapsed_time from math import ceil, floor import re from timeit import default_timer as timer from typing import List RE_LAST_NUMBER = re.compile(r"(\d+)(?!.*\d)") RE_NUMBER = re.compile(r"\d+") RE_PAIR = re.compile(r"\[\d+,\d+\]") RE_NUMBER_GT_10 = r...
0
0
0
0
0
606
0
55
68
9cc76821d45cb65c82286f7c9a183be6b17cd12c
1,577
py
Python
CodigoBaseDoTTS.py
WandrelAlves/GAMETIME
a5166eabb6f7fabf274f5c6b505ec5f31cc05174
[ "CC-BY-3.0" ]
1
2022-01-22T18:45:27.000Z
2022-01-22T18:45:27.000Z
CodigoBaseDoTTS.py
WandrelAlves/GAMETIME
a5166eabb6f7fabf274f5c6b505ec5f31cc05174
[ "CC-BY-3.0" ]
null
null
null
CodigoBaseDoTTS.py
WandrelAlves/GAMETIME
a5166eabb6f7fabf274f5c6b505ec5f31cc05174
[ "CC-BY-3.0" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[1]: get_ipython().system('pip install ibm_watson') # In[2]: from ibm_watson import TextToSpeechV1 from ibm_cloud_sdk_core.authenticators import IAMAuthenticator # In[3]: apikey = '4R5OHrdqVaLXzVXrIVJkYOkUHOzIQb4-GhREAzsm8S5D' url = 'https://api.au-syd.text-to-speech...
17.141304
338
0.703868
#!/usr/bin/env python # coding: utf-8 # In[1]: get_ipython().system('pip install ibm_watson') # In[2]: from ibm_watson import TextToSpeechV1 from ibm_cloud_sdk_core.authenticators import IAMAuthenticator # In[3]: apikey = '4R5OHrdqVaLXzVXrIVJkYOkUHOzIQb4-GhREAzsm8S5D' url = 'https://api.au-syd.text-to-speech...
22
0
0
0
0
0
0
0
0
51da2917f3bde80a8ffd5c1279f93a77fc124a2f
428
py
Python
src/get_metrics.py
lazycoder1/Ziliiqa-DIF-NFT
d706526826722be0d302bef5d15657148fda5b45
[ "MIT" ]
null
null
null
src/get_metrics.py
lazycoder1/Ziliiqa-DIF-NFT
d706526826722be0d302bef5d15657148fda5b45
[ "MIT" ]
null
null
null
src/get_metrics.py
lazycoder1/Ziliiqa-DIF-NFT
d706526826722be0d302bef5d15657148fda5b45
[ "MIT" ]
1
2021-11-13T12:32:20.000Z
2021-11-13T12:32:20.000Z
from flask import Flask app = Flask(__name__) app.config.from_object(__name__) if __name__ == '__main__': # address = "fe001824823b12b58708bf24edd94d8b5e1cfcf7" app.run()
22.526316
55
0.775701
from pyzil.zilliqa import chain from flask import Flask, jsonify import json app = Flask(__name__) app.config.from_object(__name__) def init(): chain.set_active_chain(chain.MainNet) @app.route('/addressState/<address>, 'methods=['GET']) def get_contract_state(address): chain.active_chain.api.GetSmartContractState(...
0
121
0
0
0
29
0
9
90
14679e333a02955d7f35b7cc9022f4455d5d4ffa
35
py
Python
afrift/toolkit.py
albertvisser/filefindr
e6c7d7bbbcd34fe43e5f75c410cdd359b362e79e
[ "MIT" ]
1
2020-11-21T11:02:27.000Z
2020-11-21T11:02:27.000Z
afrift/toolkit.py
albertvisser/filefindr
e6c7d7bbbcd34fe43e5f75c410cdd359b362e79e
[ "MIT" ]
4
2022-01-13T20:24:53.000Z
2022-01-14T18:42:26.000Z
afrift/toolkit.py
albertvisser/filefindr
e6c7d7bbbcd34fe43e5f75c410cdd359b362e79e
[ "MIT" ]
4
2020-07-25T16:44:00.000Z
2022-01-14T09:21:16.000Z
# voor nu: qt of wx toolkit = 'qt'
11.666667
19
0.6
# voor nu: qt of wx toolkit = 'qt'
0
0
0
0
0
0
0
0
0
9a23467bba0e1df3e287051c2193fa7e521146aa
457
py
Python
software_challenge_api/documents/migrations/0006_auto_20210822_1249.py
wibrvallejoma/Software-Challenge-API
9935f4aaded84b264c533b67a424cb5c7cee0674
[ "MIT" ]
null
null
null
software_challenge_api/documents/migrations/0006_auto_20210822_1249.py
wibrvallejoma/Software-Challenge-API
9935f4aaded84b264c533b67a424cb5c7cee0674
[ "MIT" ]
null
null
null
software_challenge_api/documents/migrations/0006_auto_20210822_1249.py
wibrvallejoma/Software-Challenge-API
9935f4aaded84b264c533b67a424cb5c7cee0674
[ "MIT" ]
null
null
null
# Generated by Django 3.1.13 on 2021-08-22 17:49
24.052632
116
0.630197
# Generated by Django 3.1.13 on 2021-08-22 17:49 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('documents', '0005_auto_20210822_1233'), ] operations = [ migrations.AlterField( model_name='document', name='childs...
0
0
0
342
0
0
0
19
46
c3e5713e820504942fa19d39d82d04a7eca20126
2,529
py
Python
answers/Python/@oseme-techguy/14-number-in-words.py
Flipponachi/20-questions
a6ad9a468683646781426008e71dbb508e8e59bb
[ "MIT" ]
1
2019-09-13T14:13:07.000Z
2019-09-13T14:13:07.000Z
answers/Python/@oseme-techguy/14-number-in-words.py
Flipponachi/20-questions
a6ad9a468683646781426008e71dbb508e8e59bb
[ "MIT" ]
null
null
null
answers/Python/@oseme-techguy/14-number-in-words.py
Flipponachi/20-questions
a6ad9a468683646781426008e71dbb508e8e59bb
[ "MIT" ]
1
2021-01-02T12:01:46.000Z
2021-01-02T12:01:46.000Z
""" Solution to Numbers in Words Based off this Algorithm: https://stackoverflow.com/a/3299672/7396801 """ zero_to_nineteen_map = [ 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seven...
28.738636
90
0.542902
""" Solution to Numbers in Words Based off this Algorithm: https://stackoverflow.com/a/3299672/7396801 """ import math zero_to_nineteen_map = [ 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 's...
0
0
0
0
0
1,223
0
-10
100
2e988649b340476dc738f6d529f94cae73539fd0
1,655
py
Python
setup.py
ExpediaGroup/map-maker
95fd76cdb9adade6862473068b5fcc1ceeb9f6ee
[ "Apache-2.0" ]
12
2020-10-19T20:36:45.000Z
2021-01-14T08:14:31.000Z
setup.py
ExpediaGroup/map-maker
95fd76cdb9adade6862473068b5fcc1ceeb9f6ee
[ "Apache-2.0" ]
4
2020-10-19T21:57:46.000Z
2020-11-11T18:45:37.000Z
setup.py
ExpediaGroup/map-maker
95fd76cdb9adade6862473068b5fcc1ceeb9f6ee
[ "Apache-2.0" ]
null
null
null
""" Copyright 2020 Expedia, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software...
31.826923
72
0.673112
""" Copyright 2020 Expedia, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software...
0
0
0
0
0
0
0
0
0
f67a579863fd3add1562679811d453ef653bc0e0
840
py
Python
examples/set_lcd.py
MasterSpecter/ekmmeters
4b53e4aaba35f5912db14e8b7095d6db48d552fa
[ "MIT" ]
9
2017-08-23T05:43:53.000Z
2022-01-05T21:53:11.000Z
examples/set_lcd.py
levrix/ekmmeters
6e3ad724c55ffda4b56c7584e9a5b27fe62b3f4c
[ "MIT" ]
8
2016-03-30T00:33:42.000Z
2016-04-05T15:02:00.000Z
examples/set_lcd.py
levrix/ekmmeters
6e3ad724c55ffda4b56c7584e9a5b27fe62b3f4c
[ "MIT" ]
4
2018-06-18T19:45:43.000Z
2022-01-05T21:53:33.000Z
""" Simple example set LCD (c) 2016 EKM Metering. """ #set up port my_port_name = "/dev/ttyO4" my_meter_address = "000300001463" # log to console ekm_set_log(ekm_print_log) # init port and create meter port = SerialPort(my_port_name) if (port.initPort() == True): my_meter = V4Meter(my_meter_address) my_meter....
26.25
83
0.742857
""" Simple example set LCD (c) 2016 EKM Metering. """ from ekmmeters import * #set up port my_port_name = "/dev/ttyO4" my_meter_address = "000300001463" # log to console ekm_set_log(ekm_print_log) # init port and create meter port = SerialPort(my_port_name) if (port.initPort() == True): my_meter = V4Meter(my_mete...
0
0
0
0
0
0
0
2
22
b6156e621027d5d978fb529b3a66d6eec5106b70
791
py
Python
hu/rotate_image.py
laputian/dml
d106f89567fa3dcdc304b5c6570fe1a69dd3c3ff
[ "MIT" ]
null
null
null
hu/rotate_image.py
laputian/dml
d106f89567fa3dcdc304b5c6570fe1a69dd3c3ff
[ "MIT" ]
null
null
null
hu/rotate_image.py
laputian/dml
d106f89567fa3dcdc304b5c6570fe1a69dd3c3ff
[ "MIT" ]
3
2016-10-25T23:09:40.000Z
2020-10-17T23:08:14.000Z
import matplotlib.pyplot as plt import matplotlib.cm as cm import scipy.ndimage.interpolation as scipint import sys sys.path.insert(0, '../mlp_test') from data_utils import load_mnist data_set = load_mnist()[0] index_1 = 4 rotangle = 30 img_arr_1 = data_set[0][index_1].reshape((28, 28)) img_val_1 = data_set[1][inde...
20.815789
70
0.738306
import numpy as np import gzip import cPickle as pickle import matplotlib.pyplot as plt import matplotlib.cm as cm import scipy.ndimage.interpolation as scipint import sys sys.path.insert(0, '../mlp_test') from data_utils import load_mnist data_set = load_mnist()[0] index_1 = 4 rotangle = 30 img_arr_1 = data_set[0...
0
0
0
0
0
0
0
-9
66
6fc7c536f535a6b035ca283c3f6fb831c779a2ea
9,024
py
Python
examples/train_word_embedding.py
AlexTaguchi/nlp-notes
3769cddfed9b4c560e6da3bfc2d5ccd19ce8ad0c
[ "MIT" ]
null
null
null
examples/train_word_embedding.py
AlexTaguchi/nlp-notes
3769cddfed9b4c560e6da3bfc2d5ccd19ce8ad0c
[ "MIT" ]
null
null
null
examples/train_word_embedding.py
AlexTaguchi/nlp-notes
3769cddfed9b4c560e6da3bfc2d5ccd19ce8ad0c
[ "MIT" ]
null
null
null
# Next Token Prediction with Transformers # ======================================= # https://pytorch.org/tutorials/beginner/transformer_tutorial.html # # Purpose: Train the transformer model described in "Attention Is All You Need" # (https://arxiv.org/pdf/1706.03762.pdf) on a language modeling task to predict # the ...
38.896552
100
0.669105
# Next Token Prediction with Transformers # ======================================= # https://pytorch.org/tutorials/beginner/transformer_tutorial.html # # Purpose: Train the transformer model described in "Attention Is All You Need" # (https://arxiv.org/pdf/1706.03762.pdf) on a language modeling task to predict # the ...
0
0
0
3,569
0
0
0
53
90
91d6e544a36275cb8ec6bafd3c65e13fd3ccd240
29,270
py
Python
ERTB.py
volkovskey/exchange-rates-tg-bot
cf41560e0c3f45f9327b81814b80293a3720513c
[ "MIT" ]
10
2020-06-11T17:19:01.000Z
2022-03-25T17:52:18.000Z
ERTB.py
volkovskey/exchange-rates-tg-bot
cf41560e0c3f45f9327b81814b80293a3720513c
[ "MIT" ]
3
2021-08-16T16:33:25.000Z
2022-01-13T18:30:53.000Z
ERTB.py
volkovskey/exchange-rates-tg-bot
cf41560e0c3f45f9327b81814b80293a3720513c
[ "MIT" ]
6
2020-07-24T17:40:30.000Z
2021-09-16T11:29:16.000Z
# Token from Token import botToken # Public libraries from aiogram import Bot, Dispatcher, executor import numberize from threading import Thread import sys # Own libraries from NewPrint import Print from SkipUpdates import IsUpdate from GetExchangeRates import SheduleUpdate, SheduleCryptoUpdate # Main variables bo...
46.094488
458
0.648719
# Token from Token import botToken, botUsername # Public libraries from aiogram import Bot, Dispatcher, executor, types from aiogram.types.message import ContentType from aiogram.types.inline_keyboard import InlineKeyboardMarkup, InlineKeyboardButton import numberize from threading import Thread import sys from dateti...
1,698
22,216
0
0
0
2,782
0
391
789
ed0aa39af328d3c5d45d604a327a4acd216ba08b
534
py
Python
malepierre/characters/migrations/0006_auto_20150823_1757.py
EliotBerriot/malepierre
34a11beae528242c062fcc308c2d98c28fa61fd1
[ "BSD-3-Clause" ]
null
null
null
malepierre/characters/migrations/0006_auto_20150823_1757.py
EliotBerriot/malepierre
34a11beae528242c062fcc308c2d98c28fa61fd1
[ "BSD-3-Clause" ]
null
null
null
malepierre/characters/migrations/0006_auto_20150823_1757.py
EliotBerriot/malepierre
34a11beae528242c062fcc308c2d98c28fa61fd1
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals
22.25
77
0.586142
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('characters', '0005_auto_20150823_1729'), ] operations = [ migrations.RemoveField( model_name='career', ...
0
0
0
404
0
0
0
19
46
7ea1ee6264daea1c101f82be5ba82b0797bae320
772
py
Python
1stRound/Easy/572 Subtree of Another Tree/DFSBFS.py
ericchen12377/Leetcode-Algorithm-Python
eb58cd4f01d9b8006b7d1a725fc48910aad7f192
[ "MIT" ]
2
2020-04-24T18:36:52.000Z
2020-04-25T00:15:57.000Z
1stRound/Easy/572 Subtree of Another Tree/DFSBFS.py
ericchen12377/Leetcode-Algorithm-Python
eb58cd4f01d9b8006b7d1a725fc48910aad7f192
[ "MIT" ]
null
null
null
1stRound/Easy/572 Subtree of Another Tree/DFSBFS.py
ericchen12377/Leetcode-Algorithm-Python
eb58cd4f01d9b8006b7d1a725fc48910aad7f192
[ "MIT" ]
null
null
null
# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None
28.592593
103
0.536269
# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def isSubtree(self, s, t): """ :type s: TreeNode :type t: TreeNode :rtype: bool "...
0
0
0
579
0
0
0
0
23
e75c133b9952e99e055e0383e3a0c94e7a2e5a6c
17,463
py
Python
Lesson/tableViewSample01/tableViewSample01.py
mammoth110/SampleOfPyside
4ca8798fc900ce4886053d394b254d374aac6364
[ "Unlicense" ]
null
null
null
Lesson/tableViewSample01/tableViewSample01.py
mammoth110/SampleOfPyside
4ca8798fc900ce4886053d394b254d374aac6364
[ "Unlicense" ]
null
null
null
Lesson/tableViewSample01/tableViewSample01.py
mammoth110/SampleOfPyside
4ca8798fc900ce4886053d394b254d374aac6364
[ "Unlicense" ]
null
null
null
import os import sys # For Sample path, fname = os.path.split(__file__) os.chdir(path) # custom Data class if __name__ == "__main__": app = QApplication(sys.argv) window = TestWindow() window.show() sys.exit(app.exec_())
38.296053
139
0.603447
import os import sys import dataclasses import openpyxl from typing import Any, List from PySide2.QtCore import ( Qt, QModelIndex, QAbstractTableModel ) # For Sample from PySide2 import QtWidgets, QtCore, QtGui from PySide2.QtCore import * from PySide2.QtGui import * from PySide2.QtWidgets import * path,...
486
2,340
0
14,187
0
27
0
102
391
43ba959409762605e98917ca8d8b86f4ded0822e
1,271
py
Python
utils/make_dummy_coco_dataset.py
shalev1991/mmdetection
b6a87911322f5f949ceecd28371889f3bbb264ce
[ "Apache-2.0" ]
null
null
null
utils/make_dummy_coco_dataset.py
shalev1991/mmdetection
b6a87911322f5f949ceecd28371889f3bbb264ce
[ "Apache-2.0" ]
null
null
null
utils/make_dummy_coco_dataset.py
shalev1991/mmdetection
b6a87911322f5f949ceecd28371889f3bbb264ce
[ "Apache-2.0" ]
null
null
null
main()
29.55814
102
0.686074
import os import json def create_ids_list(path): lista=[] for img_name in os.listdir(path): lista.append(int(img_name.replace('.jpg',''))) return lista def read_json(path): with open(path, 'r') as j: json_data = json.load(j) return json_data def fit_json_to_dir(json_path,dir_pa...
0
0
0
0
0
1,123
0
-22
159
16635626634abd762b4ef3a2fd9a9544388bb7c5
4,277
py
Python
research/im2txt/data_analysis/evaluate_gradcam.py
dorazhao99/women-snowboard
9cb2569d7a3cbb846d10aabae825ead9a6e1de29
[ "Apache-2.0" ]
19
2018-09-26T03:52:59.000Z
2021-08-19T08:41:06.000Z
research/im2txt/data_analysis/evaluate_gradcam.py
dorazhao99/women-snowboard
9cb2569d7a3cbb846d10aabae825ead9a6e1de29
[ "Apache-2.0" ]
13
2020-06-29T03:53:45.000Z
2022-03-11T23:28:19.000Z
research/im2txt/data_analysis/evaluate_gradcam.py
dorazhao99/women-snowboard
9cb2569d7a3cbb846d10aabae825ead9a6e1de29
[ "Apache-2.0" ]
6
2018-09-19T17:07:00.000Z
2021-03-21T14:20:25.000Z
# Compute GradCam with predicted captions as input from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys import argparse coco_dir = 'data/mscoco/' dataType = 'val2014' cocoImgDir = '{}/images/{}/'.format(coco_dir, dataType) coco_masks = '{}/masks/{}/'....
36.555556
130
0.694646
# Compute GradCam with predicted captions as input from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import glob import sys import json import os.path as osp import scipy import numpy as np import argparse from im2txt import metrics def prepare_re...
0
0
0
0
0
2,661
0
-39
202
8b9265223e50ec100aaaa1b1c7a69d4103a4ce00
1,513
py
Python
src/hvlrpc/apidef.py
fvutils/pyhvl-rpc
6bc25bac023682109bd3338b71a6db256ea52442
[ "Apache-2.0" ]
1
2022-03-01T07:16:48.000Z
2022-03-01T07:16:48.000Z
src/hvlrpc/apidef.py
fvutils/pyhvl-rpc
6bc25bac023682109bd3338b71a6db256ea52442
[ "Apache-2.0" ]
null
null
null
src/hvlrpc/apidef.py
fvutils/pyhvl-rpc
6bc25bac023682109bd3338b71a6db256ea52442
[ "Apache-2.0" ]
null
null
null
''' Created on Jan 31, 2021 @author: mballance '''
33.622222
76
0.510905
''' Created on Jan 31, 2021 @author: mballance ''' from endpoint_mgr import EndpointMgr class ApiDef(object): def __init__(self, name, cls, is_imp, methods): self.name = name self.cls = cls self.is_imp = is_imp self.methods = methods # Default import instance ...
0
0
0
1,389
0
0
0
15
45
f83d88921f7b67d6c4d940147335fd2fe57aedbb
4,010
py
Python
numpy_bufr/tables/load_tables.py
Bram94/numpy-BUFR-DWDradar
93bc315b22ce1c8ba753f863a28ddf6564f0f013
[ "MIT" ]
3
2019-12-02T19:00:41.000Z
2020-09-30T02:21:08.000Z
numpy_bufr/tables/load_tables.py
Bram94/numpy_bufr
93bc315b22ce1c8ba753f863a28ddf6564f0f013
[ "MIT" ]
null
null
null
numpy_bufr/tables/load_tables.py
Bram94/numpy_bufr
93bc315b22ce1c8ba753f863a28ddf6564f0f013
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Alexander Maul # # Author(s): # # Alexander Maul <alexander.maul@dwd.de> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software F...
34.869565
102
0.62818
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Alexander Maul # # Author(s): # # Alexander Maul <alexander.maul@dwd.de> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software F...
0
0
0
0
0
0
0
0
0
aa7fdd1491c6cd55cc5a48da60b1b9f1576ee892
2,346
py
Python
parser.py
bdarcus/MigrationsMap.net
9b0e2c5cbbedd182db75a0e61116d9ed748c770f
[ "MIT" ]
48
2015-02-23T10:29:30.000Z
2021-11-26T08:25:34.000Z
parser.py
bdarcus/MigrationsMap.net
9b0e2c5cbbedd182db75a0e61116d9ed748c770f
[ "MIT" ]
1
2021-02-23T07:40:56.000Z
2021-02-23T10:11:43.000Z
parser.py
bdarcus/MigrationsMap.net
9b0e2c5cbbedd182db75a0e61116d9ed748c770f
[ "MIT" ]
16
2015-06-22T03:06:33.000Z
2020-09-30T17:40:26.000Z
from collections import OrderedDict import csv import json import requests import time from collections import defaultdict #print code_to_name if __name__ =="__main__": matrix, reversed_matrix, code_to_name = load_matrices() f = open('code_to_name.json','w') code_to_name["WSAHARA"]="Western Sahara", ...
26.965517
110
0.633845
from collections import OrderedDict import csv import json import requests import time from collections import defaultdict def load_matrices(): reader = csv.reader(open('global_migrant_origin_database_version_4.csv', 'rU'), delimiter=',') row = reader.next() state_codes = row[2:] i=0 matrix = {} ...
0
0
0
0
0
1,783
0
0
68
61c39e3f60a715ffe5170cbdbfc27aab100a0048
2,500
py
Python
src/utilities/title_preprocess.py
CompetitionDataResearch/recsys-spotify-challenge
7468e82fcc69c45b46fd23ad924446d31f729a2e
[ "Apache-2.0" ]
7
2018-07-02T07:03:41.000Z
2020-12-01T08:07:25.000Z
src/utilities/title_preprocess.py
CompetitionDataResearch/recsys-spotify-challenge
7468e82fcc69c45b46fd23ad924446d31f729a2e
[ "Apache-2.0" ]
null
null
null
src/utilities/title_preprocess.py
CompetitionDataResearch/recsys-spotify-challenge
7468e82fcc69c45b46fd23ad924446d31f729a2e
[ "Apache-2.0" ]
3
2018-07-23T04:21:26.000Z
2021-07-06T19:33:20.000Z
# -*- coding: utf-8 -*- """ reference: https://www.kaggle.com/fizzbuzz/toxic-data-preprocessing/code Created on Fri Jun 1 18:00:22 2018 @author: bwhe """ RE_PATTERNS = {'party':['party']} ####################### train title ########################## readfile = '../data/train_l...
29.761905
102
0.5624
# -*- coding: utf-8 -*- """ reference: https://www.kaggle.com/fizzbuzz/toxic-data-preprocessing/code Created on Fri Jun 1 18:00:22 2018 @author: bwhe """ import pandas as pd import copy import re class BaseTokenizer(object): def process_text(self, text): raise NotImplemented ...
0
0
0
1,203
0
554
0
-24
146
0327c46ce034b67c20794506709554f605a36c95
9,665
py
Python
code/utils/loss.py
xueruoyao/FCN-pytorch
a5019da3943f47fa4f7baed3640cdbfeae2d677e
[ "MIT" ]
1
2021-12-20T07:20:25.000Z
2021-12-20T07:20:25.000Z
code/utils/loss.py
xueruoyao/FCN-pytorch
a5019da3943f47fa4f7baed3640cdbfeae2d677e
[ "MIT" ]
null
null
null
code/utils/loss.py
xueruoyao/FCN-pytorch
a5019da3943f47fa4f7baed3640cdbfeae2d677e
[ "MIT" ]
null
null
null
""" Different Losses """ import torch.nn as nn
44.953488
113
0.594206
""" Different Losses """ import torch.nn as nn import torch import torch.nn.functional as F from typing import Optional, Union, List import numpy as np class Loss: def __init__(self, n_class: int, weight: Optional[torch.tensor] = None, smoothing: float = 0.): """ base class for different...
3
0
0
9,415
0
0
0
17
180
70d3ccec1713ea0f146092f3102b4b546f64e9d6
1,604
py
Python
session_3/a_density_1d.py
Josephbousaleh/MACT21.22_Digital_tools_Big_Data_part_2
d17a98d5ac1371c04b2616fe594ff867ec575a57
[ "Apache-2.0" ]
1
2022-02-18T14:35:34.000Z
2022-02-18T14:35:34.000Z
session_3/a_density_1d.py
Josephbousaleh/MACT21.22_Digital_tools_Big_Data_part_2
d17a98d5ac1371c04b2616fe594ff867ec575a57
[ "Apache-2.0" ]
null
null
null
session_3/a_density_1d.py
Josephbousaleh/MACT21.22_Digital_tools_Big_Data_part_2
d17a98d5ac1371c04b2616fe594ff867ec575a57
[ "Apache-2.0" ]
1
2022-02-18T14:35:40.000Z
2022-02-18T14:35:40.000Z
# encoding: utf-8 ################################################## # This script shows how to visualise distribution from a single variable using matplotlib and seaborn # Multiple tutorials inspired the current design but they mostly came from: # https://seaborn.pydata.org/tutorial/distributions.html # References fo...
36.454545
103
0.682668
# encoding: utf-8 ################################################## # This script shows how to visualise distribution from a single variable using matplotlib and seaborn # Multiple tutorials inspired the current design but they mostly came from: # https://seaborn.pydata.org/tutorial/distributions.html # References fo...
2
0
0
0
0
0
0
0
0