hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
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
125
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
125
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.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
5560185c50cf1a154a62e288d5ae7d5ec860334c
101
py
Python
HighSchool/Python/DoNow1.02/code.py
SomeAspy/SchoolRepos
57a45a8dfae19fda604d1a68f716f6b8da4fb614
[ "MIT" ]
null
null
null
HighSchool/Python/DoNow1.02/code.py
SomeAspy/SchoolRepos
57a45a8dfae19fda604d1a68f716f6b8da4fb614
[ "MIT" ]
null
null
null
HighSchool/Python/DoNow1.02/code.py
SomeAspy/SchoolRepos
57a45a8dfae19fda604d1a68f716f6b8da4fb614
[ "MIT" ]
null
null
null
# Baker, Aiden # 2/10/2021 # DoNow1.2 print("Sensei, I am ready for the next stage in my training!")
20.2
62
0.693069
# Baker, Aiden # 2/10/2021 # DoNow1.2 print("Sensei, I am ready for the next stage in my training!")
0
0
0
4d95f30293af967cda96102dcc32dcb0a991adee
11,286
py
Python
landshark/featurewrite.py
basaks/landshark
87ec1fada74addd58f37bdaf3b1adbc10b1544b2
[ "Apache-2.0" ]
null
null
null
landshark/featurewrite.py
basaks/landshark
87ec1fada74addd58f37bdaf3b1adbc10b1544b2
[ "Apache-2.0" ]
null
null
null
landshark/featurewrite.py
basaks/landshark
87ec1fada74addd58f37bdaf3b1adbc10b1544b2
[ "Apache-2.0" ]
null
null
null
"""Importing routines for tif data.""" # Copyright 2019 CSIRO (Data61) # # 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 b...
35.37931
87
0.710881
"""Importing routines for tif data.""" # Copyright 2019 CSIRO (Data61) # # 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 b...
9,437
0
506
bd03439b02c98195c005e44d40314c0550e419b7
73
py
Python
topcoder/shoppingSurvey.py
leetcode-notes/daily-algorithms-practice
2a03499ed0b403d79f6c8451c9a839991b23e188
[ "Unlicense" ]
null
null
null
topcoder/shoppingSurvey.py
leetcode-notes/daily-algorithms-practice
2a03499ed0b403d79f6c8451c9a839991b23e188
[ "Unlicense" ]
null
null
null
topcoder/shoppingSurvey.py
leetcode-notes/daily-algorithms-practice
2a03499ed0b403d79f6c8451c9a839991b23e188
[ "Unlicense" ]
null
null
null
''' https://community.topcoder.com/stat?c=problem_statement&pm=13458 '''
18.25
64
0.739726
''' https://community.topcoder.com/stat?c=problem_statement&pm=13458 '''
0
0
0
2cd41a78a13cac1862d1a1ad5988a82485acbc67
787
py
Python
Another Card Game Problem.py
ganeshbs17/PythonAndCPP-Programs
7a00c3fad84dc2e721e29732f998e151bd122213
[ "MIT" ]
null
null
null
Another Card Game Problem.py
ganeshbs17/PythonAndCPP-Programs
7a00c3fad84dc2e721e29732f998e151bd122213
[ "MIT" ]
null
null
null
Another Card Game Problem.py
ganeshbs17/PythonAndCPP-Programs
7a00c3fad84dc2e721e29732f998e151bd122213
[ "MIT" ]
3
2019-10-23T05:23:20.000Z
2020-10-04T16:47:45.000Z
T = int(input()) lst = [] while T>0: l = [0,0] a,b = input().split() Pc, Pr = int(a), int(b) Pcs = str(Pc) Prs = str(Pr) if len(Pcs)==1: cdigit = 1 else: if Pc%9==0: cdigit = Pc//9 else: cdigit = Pc//9 +1 if len(Prs) == 1: rdigit = ...
19.195122
36
0.402795
T = int(input()) lst = [] while T>0: l = [0,0] a,b = input().split() Pc, Pr = int(a), int(b) Pcs = str(Pc) Prs = str(Pr) if len(Pcs)==1: cdigit = 1 else: if Pc%9==0: cdigit = Pc//9 else: cdigit = Pc//9 +1 if len(Prs) == 1: rdigit = ...
0
0
0
2c4ec8eb7d9bd3bb334effc2bc7734617aee7ee7
14,995
py
Python
tensorflow_lattice/python/estimators/calibrated_etl_test.py
agiledots/study-lattice
7653b3565e4b4c72def59c7f3608cddfc9e80fe2
[ "Apache-2.0" ]
null
null
null
tensorflow_lattice/python/estimators/calibrated_etl_test.py
agiledots/study-lattice
7653b3565e4b4c72def59c7f3608cddfc9e80fe2
[ "Apache-2.0" ]
null
null
null
tensorflow_lattice/python/estimators/calibrated_etl_test.py
agiledots/study-lattice
7653b3565e4b4c72def59c7f3608cddfc9e80fe2
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The TensorFlow Lattice Authors. # # 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 a...
38.84715
80
0.707436
# Copyright 2017 The TensorFlow Lattice Authors. # # 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 a...
13,224
43
496
abf8fffa0a014cabc8796701056b992fa5fe0748
717
py
Python
2805/solution.py
bossm0n5t3r/BOJ
03132388a0c76ef66d6b0dec2053aeca65c4aee6
[ "MIT" ]
2
2020-01-14T07:27:25.000Z
2020-02-12T07:49:58.000Z
2805/solution.py
bossm0n5t3r/BOJ
03132388a0c76ef66d6b0dec2053aeca65c4aee6
[ "MIT" ]
1
2020-01-14T07:29:30.000Z
2021-11-28T11:29:08.000Z
2805/solution.py
bossm0n5t3r/BOJ
03132388a0c76ef66d6b0dec2053aeca65c4aee6
[ "MIT" ]
null
null
null
import sys if __name__ == "__main__": sol()
22.40625
83
0.507671
import sys def sol(): input = sys.stdin.readline _, M = map(int, input().split()) trees = list(map(int, input().split())) trees_count = dict() for tree in trees: if tree not in trees_count: trees_count[tree] = 0 trees_count[tree] += 1 trees_set = set(trees) low ...
643
0
23
93b740132d591f6b898088a73051cbbfe27be76e
3,762
py
Python
bin/cov-report.py
ben-marshall/riscv-multi-cycle
9e0295e05cb0334a7349c82b3cd4dc89732621bb
[ "MIT" ]
3
2020-07-11T14:47:44.000Z
2020-10-25T10:11:52.000Z
bin/cov-report.py
ben-marshall/riscv-multi-cycle
9e0295e05cb0334a7349c82b3cd4dc89732621bb
[ "MIT" ]
4
2017-09-30T11:08:58.000Z
2017-10-01T11:07:10.000Z
bin/cov-report.py
ben-marshall/riscv-multi-cycle
9e0295e05cb0334a7349c82b3cd4dc89732621bb
[ "MIT" ]
null
null
null
#!/usr/bin/python3 """ Post processes the line and toggle coverage reports from verilator into something which is easier to read and review. """ import os import re import sys import yaml import argparse import jinja2 class AnnotatedFile(object): """ Describes a single annotated file. """ def __in...
25.418919
74
0.567783
#!/usr/bin/python3 """ Post processes the line and toggle coverage reports from verilator into something which is easier to read and review. """ import os import re import sys import yaml import argparse import jinja2 class AnnotatedFile(object): """ Describes a single annotated file. """ def __in...
0
0
0
19cba88efb532cb217760e9f1d9de3fd077eba5c
5,860
py
Python
repsim/geometry/manifold.py
wrongu/representational-similarity
adca614053973def176044437e6a064c04943ce0
[ "MIT" ]
2
2022-03-23T21:24:21.000Z
2022-03-24T04:18:30.000Z
repsim/geometry/manifold.py
wrongu/representational-similarity
adca614053973def176044437e6a064c04943ce0
[ "MIT" ]
3
2022-03-23T19:35:58.000Z
2022-03-24T04:20:29.000Z
repsim/geometry/manifold.py
wrongu/representational-similarity
adca614053973def176044437e6a064c04943ce0
[ "MIT" ]
1
2022-03-23T19:16:19.000Z
2022-03-23T19:16:19.000Z
import torch import warnings from typing import Callable # Typing hints: a Point is a tensor with some shape, and a scalar is, well, a single-element tensor Point = torch.Tensor Scalar = torch.Tensor class Manifold(object): """Base class for Manifolds with an associated length(). In other words, a Length Space ...
40.979021
150
0.642491
import torch import warnings from typing import Callable # Typing hints: a Point is a tensor with some shape, and a scalar is, well, a single-element tensor Point = torch.Tensor Scalar = torch.Tensor class Manifold(object): """Base class for Manifolds with an associated length(). In other words, a Length Space ...
3,262
0
456
310d03a2a06ea0330c44ddbf4414a9bc415e020d
6,116
py
Python
plot_precip_freq.py
quantheory/E3SMTimestepStudy
63b5517c2a92dfae7af0cd7aa0eb39058967ed06
[ "BSD-3-Clause" ]
null
null
null
plot_precip_freq.py
quantheory/E3SMTimestepStudy
63b5517c2a92dfae7af0cd7aa0eb39058967ed06
[ "BSD-3-Clause" ]
null
null
null
plot_precip_freq.py
quantheory/E3SMTimestepStudy
63b5517c2a92dfae7af0cd7aa0eb39058967ed06
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python from os.path import join import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import netCDF4 as nc4 from e3sm_case_output import day_str REF_CASE_NAME = "timestep_ctrl" TEST_CASE_NAME = "timestep_all_10s" OUTPUT_DIR = "/p/lustre2/santos36/timestep_precip/"...
32.705882
102
0.648136
#!/usr/bin/env python from os.path import join import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import netCDF4 as nc4 from e3sm_case_output import day_str REF_CASE_NAME = "timestep_ctrl" TEST_CASE_NAME = "timestep_all_10s" OUTPUT_DIR = "/p/lustre2/santos36/timestep_precip/"...
0
0
0
85c011d5fd1f1068fadaa8f517a5575e97abe328
2,618
py
Python
misc_base/models.py
BlackWizard/django-misc-base
892752f4c4553e2b936b8be861639f2d8141b57e
[ "BSD-2-Clause" ]
null
null
null
misc_base/models.py
BlackWizard/django-misc-base
892752f4c4553e2b936b8be861639f2d8141b57e
[ "BSD-2-Clause" ]
null
null
null
misc_base/models.py
BlackWizard/django-misc-base
892752f4c4553e2b936b8be861639f2d8141b57e
[ "BSD-2-Clause" ]
null
null
null
# coding=utf-8 from django.db import models from django.utils.translation import ugettext_lazy as _ from positions.fields import PositionField from .utils import slugify STATUS = ( (0, _(u'Active')), (1, _(u'Editing')), (127, _(u'Deleted')), )
25.666667
106
0.673415
# coding=utf-8 from django.db import models from django.utils.translation import ugettext_lazy as _ from positions.fields import PositionField from .utils import slugify class SlugNameMixin(object): def get_slug_name(self): return slugify(self.name or 'xxx') class BaseModel(models.Model): id = m...
337
1,715
302
6a22db10765e458b572b2d7d29224f15f4ab8bac
12,254
py
Python
monai/transforms/transform.py
zomglings/MONAI
ba127a2077b1a5d8aed01bc98a6f9550cc191c2b
[ "Apache-2.0" ]
1
2022-01-04T21:38:23.000Z
2022-01-04T21:38:23.000Z
monai/transforms/transform.py
zomglings/MONAI
ba127a2077b1a5d8aed01bc98a6f9550cc191c2b
[ "Apache-2.0" ]
null
null
null
monai/transforms/transform.py
zomglings/MONAI
ba127a2077b1a5d8aed01bc98a6f9550cc191c2b
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 - 2021 MONAI Consortium # 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 wri...
40.576159
116
0.641342
# Copyright 2020 - 2021 MONAI Consortium # 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 wri...
1,005
0
89
a604bcc2feb54145cd7e314879b51b49335aca5d
332
py
Python
bin/wiki_entity_linking/__init__.py
jaydeepborkar/spaCy
16aa092fb5cffb5ec7079951ea0c04cb96733b3e
[ "MIT" ]
1
2020-04-13T09:54:11.000Z
2020-04-13T09:54:11.000Z
bin/wiki_entity_linking/__init__.py
jaydeepborkar/spaCy
16aa092fb5cffb5ec7079951ea0c04cb96733b3e
[ "MIT" ]
1
2021-08-16T13:39:17.000Z
2021-08-16T13:39:40.000Z
bin/wiki_entity_linking/__init__.py
jaydeepborkar/spaCy
16aa092fb5cffb5ec7079951ea0c04cb96733b3e
[ "MIT" ]
null
null
null
TRAINING_DATA_FILE = "gold_entities.jsonl" KB_FILE = "kb" KB_MODEL_DIR = "nlp_kb" OUTPUT_MODEL_DIR = "nlp" PRIOR_PROB_PATH = "prior_prob.csv" ENTITY_DEFS_PATH = "entity_defs.csv" ENTITY_FREQ_PATH = "entity_freq.csv" ENTITY_DESCR_PATH = "entity_descriptions.csv" LOG_FORMAT = '%(asctime)s - %(levelname)s - %(name)s - %...
27.666667
67
0.753012
TRAINING_DATA_FILE = "gold_entities.jsonl" KB_FILE = "kb" KB_MODEL_DIR = "nlp_kb" OUTPUT_MODEL_DIR = "nlp" PRIOR_PROB_PATH = "prior_prob.csv" ENTITY_DEFS_PATH = "entity_defs.csv" ENTITY_FREQ_PATH = "entity_freq.csv" ENTITY_DESCR_PATH = "entity_descriptions.csv" LOG_FORMAT = '%(asctime)s - %(levelname)s - %(name)s - %...
0
0
0
f0d861f6d094f9a75ab941324978b9c519a79719
1,959
py
Python
tools/hyphy/hyphy_dnds_wrapper.py
bopopescu/phyG
023f505b705ab953f502cbc55e90612047867583
[ "CC-BY-3.0" ]
2
2016-02-23T00:09:14.000Z
2019-02-11T07:48:44.000Z
tools/hyphy/hyphy_dnds_wrapper.py
bopopescu/phyG
023f505b705ab953f502cbc55e90612047867583
[ "CC-BY-3.0" ]
null
null
null
tools/hyphy/hyphy_dnds_wrapper.py
bopopescu/phyG
023f505b705ab953f502cbc55e90612047867583
[ "CC-BY-3.0" ]
6
2015-05-27T13:09:50.000Z
2019-02-11T07:48:46.000Z
#Guru #takes fasta alignments, a distance metric and builds neighbor joining trees import os, sys from galaxy import eggs from galaxy.tools.util import hyphy_util #Retrieve hyphy path, this will need to be the same across the cluster tool_data = sys.argv.pop() HYPHY_PATH = os.path.join( tool_data, "HYPHY" ) H...
34.982143
185
0.749872
#Guru #takes fasta alignments, a distance metric and builds neighbor joining trees import os, sys from galaxy import eggs from galaxy.tools.util import hyphy_util #Retrieve hyphy path, this will need to be the same across the cluster tool_data = sys.argv.pop() HYPHY_PATH = os.path.join( tool_data, "HYPHY" ) H...
0
0
0
8125151defc927e2468ec42eb02ccff4539de78e
7,086
py
Python
libcloud/dns/drivers/nfsn.py
rgharris/libcloud
90971e17bfd7b6bb97b2489986472c531cc8e140
[ "Apache-2.0" ]
null
null
null
libcloud/dns/drivers/nfsn.py
rgharris/libcloud
90971e17bfd7b6bb97b2489986472c531cc8e140
[ "Apache-2.0" ]
1
2021-12-06T12:29:13.000Z
2021-12-06T12:29:13.000Z
libcloud/dns/drivers/nfsn.py
rgharris/libcloud
90971e17bfd7b6bb97b2489986472c531cc8e140
[ "Apache-2.0" ]
1
2019-08-05T10:12:02.000Z
2019-08-05T10:12:02.000Z
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
35.43
88
0.61304
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
407
4,905
23
1e371328c8cf302eacc938b92f76d89402befdf2
5,823
py
Python
jelly_api_2/collated.py
chalbersma/manowar
023a696f7ea0458e1c2ae9a18e40a9d09e824cc4
[ "BSD-2-Clause" ]
3
2019-02-16T03:14:11.000Z
2020-05-28T23:14:23.000Z
jelly_api_2/collated.py
chalbersma/manowar
023a696f7ea0458e1c2ae9a18e40a9d09e824cc4
[ "BSD-2-Clause" ]
4
2018-08-09T22:39:59.000Z
2020-02-12T00:36:47.000Z
jelly_api_2/collated.py
chalbersma/manowar
023a696f7ea0458e1c2ae9a18e40a9d09e824cc4
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python3 ''' Copyright 2018, VDMS Licensed under the terms of the BSD 2-clause license. See LICENSE file for terms. /collated endpoints. Designed to return info about audit by audit, pop & srvtype. Accepts a regex filter for the main name ```swagger-yaml /collated/{collatedType}/ : get: descripti...
40.158621
130
0.541645
#!/usr/bin/env python3 ''' Copyright 2018, VDMS Licensed under the terms of the BSD 2-clause license. See LICENSE file for terms. /collated endpoints. Designed to return info about audit by audit, pop & srvtype. Accepts a regex filter for the main name ```swagger-yaml /collated/{collatedType}/ : get: descripti...
3,503
0
22
9f88efaf4ff38b554053dcc696d1d7d52cbd31ab
1,511
py
Python
src/Instructions/add.py
martydill/PyCIL
7f9db640e921bfc61dcedd1cbd217b61d107afb8
[ "BSD-2-Clause" ]
3
2016-09-05T18:37:15.000Z
2021-12-24T02:22:06.000Z
src/Instructions/add.py
martydill/PyCIL
7f9db640e921bfc61dcedd1cbd217b61d107afb8
[ "BSD-2-Clause" ]
null
null
null
src/Instructions/add.py
martydill/PyCIL
7f9db640e921bfc61dcedd1cbd217b61d107afb8
[ "BSD-2-Clause" ]
1
2018-11-28T16:57:41.000Z
2018-11-28T16:57:41.000Z
# add.py # The CIL add instruction # Copyright 2010 Marty Dill - see LICENSE for details from Instruction import Instruction import unittest from Stack import StackStateException from Instructions.Instruction import register from Variable import Variable register('add', add)
24.770492
71
0.618134
# add.py # The CIL add instruction # Copyright 2010 Marty Dill - see LICENSE for details from Instruction import Instruction import unittest from Stack import StackStateException from Instructions.Instruction import register from Variable import Variable class add(Instruction): def __init__(self, arguments): ...
1,036
14
181
f3752141bb1c3e9db433c81b4841a4b0d6c506f1
193
py
Python
python/demo-django/env/bin/django-admin.py
denisroldan/talentum-2015-examples
4980f49dca56a55d26722f4f6d1fdd88e06f38dd
[ "MIT" ]
null
null
null
python/demo-django/env/bin/django-admin.py
denisroldan/talentum-2015-examples
4980f49dca56a55d26722f4f6d1fdd88e06f38dd
[ "MIT" ]
null
null
null
python/demo-django/env/bin/django-admin.py
denisroldan/talentum-2015-examples
4980f49dca56a55d26722f4f6d1fdd88e06f38dd
[ "MIT" ]
null
null
null
#!/Users/denisroldan/Projects/talentum-2015-examples/python/demo-django/env/bin/python from django.core import management if __name__ == "__main__": management.execute_from_command_line()
32.166667
86
0.803109
#!/Users/denisroldan/Projects/talentum-2015-examples/python/demo-django/env/bin/python from django.core import management if __name__ == "__main__": management.execute_from_command_line()
0
0
0
c01037bf169e5627f48aedb675f699cbe211bc34
559
py
Python
django_reusable/settings/dev.py
Gaurav-Zaiswal/django-reusable
8444964c12ed44aa351b85869f5335442aa66112
[ "MIT" ]
null
null
null
django_reusable/settings/dev.py
Gaurav-Zaiswal/django-reusable
8444964c12ed44aa351b85869f5335442aa66112
[ "MIT" ]
4
2021-03-30T13:57:58.000Z
2021-06-10T19:52:43.000Z
django_reusable/settings/dev.py
Gaurav-Zaiswal/django-reusable
8444964c12ed44aa351b85869f5335442aa66112
[ "MIT" ]
null
null
null
# this file contains only those settings which are used in developing phase # and extends base.py settings, which has all the default settings from django_reusable.settings.base import * from django_reusable.settings.third_party import * # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ...
24.304348
75
0.719141
# this file contains only those settings which are used in developing phase # and extends base.py settings, which has all the default settings from django_reusable.settings.base import * from django_reusable.settings.third_party import * # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ...
0
0
0
7c5b3918b27f7ea335c7cdecec8a7299e58e7ecd
7,399
py
Python
lingvo/core/gpipe_test.py
zh794390558/lingvo
ecdf678179018ca07f4f52d065b9bf3fe2dc7c5a
[ "Apache-2.0" ]
null
null
null
lingvo/core/gpipe_test.py
zh794390558/lingvo
ecdf678179018ca07f4f52d065b9bf3fe2dc7c5a
[ "Apache-2.0" ]
null
null
null
lingvo/core/gpipe_test.py
zh794390558/lingvo
ecdf678179018ca07f4f52d065b9bf3fe2dc7c5a
[ "Apache-2.0" ]
null
null
null
# Lint as: python2, python3 # Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # 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 # ...
34.25463
80
0.682795
# Lint as: python2, python3 # Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # 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 # ...
3,621
27
393
9762b54562918486894c34db65409bf6cafb0c48
1,984
py
Python
astoria/common/ipc/manager_messages.py
trickeydan/astoria
ef08ed4be4d5997751846b0cadce9aa8261ae151
[ "MIT" ]
null
null
null
astoria/common/ipc/manager_messages.py
trickeydan/astoria
ef08ed4be4d5997751846b0cadce9aa8261ae151
[ "MIT" ]
7
2020-11-29T13:03:10.000Z
2020-12-09T17:20:25.000Z
astoria/common/ipc/manager_messages.py
trickeydan/astoria
ef08ed4be4d5997751846b0cadce9aa8261ae151
[ "MIT" ]
null
null
null
"""Manager Messages.""" from enum import Enum from pathlib import Path from typing import Dict, Optional from pydantic import BaseModel from astoria import __version__ from astoria.common.code_status import CodeStatus from astoria.common.disks import DiskInfo, DiskTypeCalculator, DiskUUID from astoria.common.metadata...
25.113924
82
0.676915
"""Manager Messages.""" from enum import Enum from pathlib import Path from typing import Dict, Optional from pydantic import BaseModel from astoria import __version__ from astoria.common.code_status import CodeStatus from astoria.common.disks import DiskInfo, DiskTypeCalculator, DiskUUID from astoria.common.metadata...
0
0
0
2c47a06edef748d2550206e58519c69a3d30383a
361
py
Python
python__advanced/06.multidimensional_lists_exercise/01.diagonal_difference.py
EmilianStoyanov/Projects-in-SoftUni
e83996670fe00424a158905d537a7bbbeee8fb59
[ "MIT" ]
1
2020-07-14T12:32:47.000Z
2020-07-14T12:32:47.000Z
python__advanced/06.multidimensional_lists_exercise/01.diagonal_difference.py
EmilianStoyanov/Projects-in-SoftUni
e83996670fe00424a158905d537a7bbbeee8fb59
[ "MIT" ]
null
null
null
python__advanced/06.multidimensional_lists_exercise/01.diagonal_difference.py
EmilianStoyanov/Projects-in-SoftUni
e83996670fe00424a158905d537a7bbbeee8fb59
[ "MIT" ]
null
null
null
size = int(input()) matrix = [] for _ in range(size): matrix.append([int(x) for x in input().split()]) primary_diagonal_sum = 0 secondary_diagonal_sum = 0 for i in range(len(matrix)): primary_diagonal_sum += matrix[i][i] secondary_diagonal_sum += matrix[i][size - i - 1] total = abs(primary_diagonal_sum...
20.055556
58
0.698061
size = int(input()) matrix = [] for _ in range(size): matrix.append([int(x) for x in input().split()]) primary_diagonal_sum = 0 secondary_diagonal_sum = 0 for i in range(len(matrix)): primary_diagonal_sum += matrix[i][i] secondary_diagonal_sum += matrix[i][size - i - 1] total = abs(primary_diagonal_sum...
0
0
0
087469a2e7af55aa32f7a246ba541e7cd74014c4
165
py
Python
zvt/recorders/eastmoney/trading/__init__.py
h521822/zvt
c6bcc2b340406da55d920a411f59ab8d4cc7e76d
[ "MIT" ]
22
2020-10-22T14:24:32.000Z
2022-03-30T22:19:14.000Z
zvt/recorders/eastmoney/trading/__init__.py
h521822/zvt
c6bcc2b340406da55d920a411f59ab8d4cc7e76d
[ "MIT" ]
2
2019-12-20T13:12:30.000Z
2020-01-03T06:24:30.000Z
zvt/recorders/eastmoney/trading/__init__.py
h521822/zvt
c6bcc2b340406da55d920a411f59ab8d4cc7e76d
[ "MIT" ]
6
2021-01-14T20:50:06.000Z
2022-01-11T23:12:43.000Z
# -*- coding: utf-8 -*- from zvt.recorders.eastmoney.trading.holder_trading_recorder import * from zvt.recorders.eastmoney.trading.manager_trading_recorder import *
41.25
70
0.806061
# -*- coding: utf-8 -*- from zvt.recorders.eastmoney.trading.holder_trading_recorder import * from zvt.recorders.eastmoney.trading.manager_trading_recorder import *
0
0
0
bf29b24d082fbb7129c2bab18736d49934635b11
5,518
py
Python
vae/train_vae.py
mazrk7/tf_playground
81ad741f2bfe439bab85783ccf82d4715a3adef6
[ "MIT" ]
null
null
null
vae/train_vae.py
mazrk7/tf_playground
81ad741f2bfe439bab85783ccf82d4715a3adef6
[ "MIT" ]
null
null
null
vae/train_vae.py
mazrk7/tf_playground
81ad741f2bfe439bab85783ccf82d4715a3adef6
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import sys import tensorflow as tf from dataset import load_data from vae import VAE from conv_vae import ConvVAE IMAGE_SIZE = 28 IMAGE_PIXELS = IMAGE_SIZE * IMAGE_SIZE # Define the VAE netw...
45.229508
153
0.677419
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import sys import tensorflow as tf from dataset import load_data from vae import VAE from conv_vae import ConvVAE IMAGE_SIZE = 28 IMAGE_PIXELS = IMAGE_SIZE * IMAGE_SIZE # Define the VAE netw...
3,562
0
45
d20aa03a15a837c91185bec2a28b723f48ec4b9e
923
py
Python
app/handler.py
developmentseed/cogeo-watchbot
ef1f859c0d02c5e27d97b9ac407b3a13a0d7a57a
[ "MIT" ]
2
2019-10-09T11:28:32.000Z
2019-11-06T16:52:50.000Z
app/handler.py
developmentseed/cogeo-watchbot
ef1f859c0d02c5e27d97b9ac407b3a13a0d7a57a
[ "MIT" ]
4
2019-09-11T14:52:57.000Z
2020-02-28T15:15:32.000Z
app/handler.py
developmentseed/cogeo-watchbot
ef1f859c0d02c5e27d97b9ac407b3a13a0d7a57a
[ "MIT" ]
null
null
null
"""public facing api.""" from typing import Dict, Tuple import os import json import base64 from . import version as app_version from cogeo_mosaic.utils import get_hash, _aws_put_data from lambda_proxy.proxy import API app = API(name="cogeo-watchbot-api", debug=True) @app.route("/upload", methods=["POST"], cors=...
25.638889
68
0.690141
"""public facing api.""" from typing import Dict, Tuple import os import json import base64 from . import version as app_version from cogeo_mosaic.utils import get_hash, _aws_put_data from lambda_proxy.proxy import API app = API(name="cogeo-watchbot-api", debug=True) @app.route("/upload", methods=["POST"], cors=...
0
0
0
a617790f4aa4b00c7b1d77ae07d523b65d4fa7dd
1,091
py
Python
config/settings/development.py
rublixdev/hedge-legacy
35d4ed73e6cdbf06bbbfa70e64ec8ef33b48d07c
[ "MIT" ]
null
null
null
config/settings/development.py
rublixdev/hedge-legacy
35d4ed73e6cdbf06bbbfa70e64ec8ef33b48d07c
[ "MIT" ]
null
null
null
config/settings/development.py
rublixdev/hedge-legacy
35d4ed73e6cdbf06bbbfa70e64ec8ef33b48d07c
[ "MIT" ]
null
null
null
import os from .base import * # DEBUG # ------------------------------------------------------------------------------ DEBUG = True # SECRET CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#secret-key # Note: This key only used for development and testing. # -----------------------------------...
32.088235
80
0.482126
import os from .base import * # DEBUG # ------------------------------------------------------------------------------ DEBUG = True # SECRET CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#secret-key # Note: This key only used for development and testing. # -----------------------------------...
0
0
0
ab014d49236b3ce9b9b968d882b5aee69a5f7ad5
416
py
Python
pandas/arrays/__init__.py
ivary43/pandas
46adc5b1c2aacb312d72729af72bc0ad600917c0
[ "BSD-3-Clause" ]
null
null
null
pandas/arrays/__init__.py
ivary43/pandas
46adc5b1c2aacb312d72729af72bc0ad600917c0
[ "BSD-3-Clause" ]
null
null
null
pandas/arrays/__init__.py
ivary43/pandas
46adc5b1c2aacb312d72729af72bc0ad600917c0
[ "BSD-3-Clause" ]
null
null
null
""" All of pandas' ExtensionArrays. See :ref:`extending.extension-types` for more. """ from pandas.core.arrays import ( Categorical, DatetimeArray, IntegerArray, IntervalArray, PandasArray, PeriodArray, SparseArray, TimedeltaArray) __all__ = [ 'Categorical', 'DatetimeArray', 'IntegerArray', 'I...
20.8
73
0.689904
""" All of pandas' ExtensionArrays. See :ref:`extending.extension-types` for more. """ from pandas.core.arrays import ( Categorical, DatetimeArray, IntegerArray, IntervalArray, PandasArray, PeriodArray, SparseArray, TimedeltaArray) __all__ = [ 'Categorical', 'DatetimeArray', 'IntegerArray', 'I...
0
0
0
8c08478628b38265f6f93ca28d07c509814dd291
38,480
py
Python
mmdet3d/datasets/pipelines/loading.py
XuyangBai/mmdetection3d
53370467c1b88f163cbe7b7300a1f588a6761e35
[ "Apache-2.0" ]
109
2022-03-23T01:11:06.000Z
2022-03-31T17:12:32.000Z
mmdet3d/datasets/pipelines/loading.py
XuyangBai/mmdetection3d
53370467c1b88f163cbe7b7300a1f588a6761e35
[ "Apache-2.0" ]
null
null
null
mmdet3d/datasets/pipelines/loading.py
XuyangBai/mmdetection3d
53370467c1b88f163cbe7b7300a1f588a6761e35
[ "Apache-2.0" ]
10
2022-03-23T08:17:46.000Z
2022-03-30T09:37:27.000Z
import mmcv import numpy as np from mmdet3d.core.points import BasePoints, get_points_type from mmdet.datasets.builder import PIPELINES from mmdet.datasets.pipelines import LoadAnnotations @PIPELINES.register_module() class MyResize(object): """Resize images & bbox & mask. This transform resizes the input i...
38.751259
93
0.596128
import mmcv import numpy as np from mmdet3d.core.points import BasePoints, get_points_type from mmdet.datasets.builder import PIPELINES from mmdet.datasets.pipelines import LoadAnnotations @PIPELINES.register_module() class MyResize(object): """Resize images & bbox & mask. This transform resizes the input i...
4,806
0
351
8f83a29f0ea87aa40b25da66d5f88ab1ef2c9f61
8,381
py
Python
timespent.py
xuthus/gitlab-timespent
5f193116effac31f90acf1402b41c8bfa2a27280
[ "Apache-2.0" ]
null
null
null
timespent.py
xuthus/gitlab-timespent
5f193116effac31f90acf1402b41c8bfa2a27280
[ "Apache-2.0" ]
null
null
null
timespent.py
xuthus/gitlab-timespent
5f193116effac31f90acf1402b41c8bfa2a27280
[ "Apache-2.0" ]
null
null
null
import os from multiprocessing.dummy import Pool as ThreadPool import requests import xlsxwriter from pyslurpers import JsonSlurper from requests.adapters import HTTPAdapter from urllib3.util.retry import Retry if __name__ == "__main__": total_seconds = 0 config = JsonSlurper.create( file_n...
37.415179
140
0.571412
import os from multiprocessing.dummy import Pool as ThreadPool import requests import xlsxwriter from pyslurpers import JsonSlurper from requests.adapters import HTTPAdapter from urllib3.util.retry import Retry class TicketInfo: def __init__(self, number: int, project_id: int, dates: set): self.dates = d...
4,800
-4
210
d2ab4d184d7cb428bace8678f984c0cda57a4300
8,731
py
Python
tests/kafkatest/tests/streams/streams_broker_compatibility_test.py
heyingquan13/kafka
620ada9888f82756d6ed0eabe96bb9b54518b378
[ "Apache-2.0" ]
null
null
null
tests/kafkatest/tests/streams/streams_broker_compatibility_test.py
heyingquan13/kafka
620ada9888f82756d6ed0eabe96bb9b54518b378
[ "Apache-2.0" ]
null
null
null
tests/kafkatest/tests/streams/streams_broker_compatibility_test.py
heyingquan13/kafka
620ada9888f82756d6ed0eabe96bb9b54518b378
[ "Apache-2.0" ]
1
2020-05-19T21:36:49.000Z
2020-05-19T21:36:49.000Z
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
47.710383
282
0.686634
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
4,837
0
184
e696f12e73b99c5a1f19fec44f4628ac5951f422
2,997
py
Python
fate_flow/tests/api_tests/job_operation_test.py
haozheng95/FATE
524296b6bc39609fc7f09951ef74d4129130b809
[ "Apache-2.0" ]
1
2021-05-31T16:39:30.000Z
2021-05-31T16:39:30.000Z
fate_flow/tests/api_tests/job_operation_test.py
haozheng95/FATE
524296b6bc39609fc7f09951ef74d4129130b809
[ "Apache-2.0" ]
null
null
null
fate_flow/tests/api_tests/job_operation_test.py
haozheng95/FATE
524296b6bc39609fc7f09951ef74d4129130b809
[ "Apache-2.0" ]
null
null
null
import json import os import time import unittest from contextlib import closing import requests from arch.api.utils import file_utils from fate_flow.settings import HTTP_PORT, API_VERSION if __name__ == '__main__': unittest.main()
41.054795
188
0.61695
import json import os import time import unittest from contextlib import closing import requests from arch.api.utils import file_utils from fate_flow.settings import HTTP_PORT, API_VERSION class TestJobOperation(unittest.TestCase): def setUp(self): self.dsl_path = 'fate_flow/examples/test_hetero_lr_job_...
2,657
21
76
71baf8fe49286122599d8c817c8beb7c5dea128f
166
py
Python
projects/urls.py
MaTachi/hydra
ac8539a5872900557c71bd5099a88ae6a96db14f
[ "MIT" ]
1
2015-10-03T03:36:19.000Z
2015-10-03T03:36:19.000Z
projects/urls.py
MaTachi/hydra
ac8539a5872900557c71bd5099a88ae6a96db14f
[ "MIT" ]
null
null
null
projects/urls.py
MaTachi/hydra
ac8539a5872900557c71bd5099a88ae6a96db14f
[ "MIT" ]
1
2015-10-03T03:36:24.000Z
2015-10-03T03:36:24.000Z
from django.conf.urls import patterns, url from projects.views import ProjectsView urlpatterns = patterns('', url(r'^$', ProjectsView.as_view(), name='list'), )
23.714286
52
0.722892
from django.conf.urls import patterns, url from projects.views import ProjectsView urlpatterns = patterns('', url(r'^$', ProjectsView.as_view(), name='list'), )
0
0
0
1e0c1a69eeab9284cd175da2473f20a513e2cfd1
1,956
py
Python
venv/Lib/site-packages/dataframe/_dataframe_column.py
kavanAdeshara/Expense_Tracker
b3e4810e858a7786e05cda6b91ba674b73b87981
[ "Apache-2.0" ]
null
null
null
venv/Lib/site-packages/dataframe/_dataframe_column.py
kavanAdeshara/Expense_Tracker
b3e4810e858a7786e05cda6b91ba674b73b87981
[ "Apache-2.0" ]
null
null
null
venv/Lib/site-packages/dataframe/_dataframe_column.py
kavanAdeshara/Expense_Tracker
b3e4810e858a7786e05cda6b91ba674b73b87981
[ "Apache-2.0" ]
null
null
null
# dataframe: a data-frame implementation using method piping # # Copyright (C) 2016 Simon Dirmeier # # This file is part of dataframe. # # dataframe 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 Foundation, either versi...
27.549296
70
0.648262
# dataframe: a data-frame implementation using method piping # # Copyright (C) 2016 Simon Dirmeier # # This file is part of dataframe. # # dataframe 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 Foundation, either versi...
430
0
80
0452b344607a7b7bb2700fb6817bcedf4cc66951
92
py
Python
ex/24 (5).py
Time2003/lr7
b47edaf11ced014022764b6c5edef34e4c107c0b
[ "MIT" ]
null
null
null
ex/24 (5).py
Time2003/lr7
b47edaf11ced014022764b6c5edef34e4c107c0b
[ "MIT" ]
null
null
null
ex/24 (5).py
Time2003/lr7
b47edaf11ced014022764b6c5edef34e4c107c0b
[ "MIT" ]
null
null
null
my_list = ['Monty', 'Python'] delimiter = ' ' output = delimiter.join(my_list) print(output)
23
32
0.695652
my_list = ['Monty', 'Python'] delimiter = ' ' output = delimiter.join(my_list) print(output)
0
0
0
f27c1cf0757bbaf1afb3e77263c6c90d54dbcac6
6,686
py
Python
contrib/compile_topic_icons_test.py
csilvers/kake
51465b12d267a629dd61778918d83a2a134ec3b2
[ "MIT" ]
null
null
null
contrib/compile_topic_icons_test.py
csilvers/kake
51465b12d267a629dd61778918d83a2a134ec3b2
[ "MIT" ]
null
null
null
contrib/compile_topic_icons_test.py
csilvers/kake
51465b12d267a629dd61778918d83a2a134ec3b2
[ "MIT" ]
null
null
null
# TODO(colin): fix these lint errors (http://pep8.readthedocs.io/en/release-1.7.x/intro.html#error-codes) # pep8-disable:E128 """Tests for compile_topic_icons.py""" from __future__ import absolute_import import cStringIO import json import os import shutil import PIL.Image from shared.testutil import testsize from ...
35.189474
105
0.649417
# TODO(colin): fix these lint errors (http://pep8.readthedocs.io/en/release-1.7.x/intro.html#error-codes) # pep8-disable:E128 """Tests for compile_topic_icons.py""" from __future__ import absolute_import import cStringIO import json import os import shutil import PIL.Image from shared.testutil import testsize from ...
4,441
0
236
d3bfb5381022b4d821ccc6559f7c401313d99f7b
1,307
py
Python
home/bin/copy-dir.py
xfoobar/scripts
970f248b01ba012b4aa086ec666965c4917a0554
[ "MIT" ]
null
null
null
home/bin/copy-dir.py
xfoobar/scripts
970f248b01ba012b4aa086ec666965c4917a0554
[ "MIT" ]
null
null
null
home/bin/copy-dir.py
xfoobar/scripts
970f248b01ba012b4aa086ec666965c4917a0554
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys from common import eprint from pathlib import Path import argparse import pathlib if __name__ == '__main__': main()
28.413043
74
0.670237
#!/usr/bin/env python3 import sys from common import eprint from pathlib import Path import argparse import pathlib def args_init(): parser = argparse.ArgumentParser(description='just copy directory') parser.add_argument('src_dir', type=str, help='source directory') parser.add_argument('des_dir', type=str...
1,078
0
69
4d5f7e045a1872678b25267759e0aba5579d16fb
287
py
Python
tests/test_math_fact.py
StevenKangWei/learning-algorithm
fa2a32c3a650f1a95c75f82750b07de444c4bbfa
[ "MIT" ]
null
null
null
tests/test_math_fact.py
StevenKangWei/learning-algorithm
fa2a32c3a650f1a95c75f82750b07de444c4bbfa
[ "MIT" ]
null
null
null
tests/test_math_fact.py
StevenKangWei/learning-algorithm
fa2a32c3a650f1a95c75f82750b07de444c4bbfa
[ "MIT" ]
null
null
null
# coding=utf-8 from test_base import BaseTestCase if __name__ == '__main__': TestCase.main()
16.882353
43
0.672474
# coding=utf-8 from test_base import BaseTestCase class TestCase(BaseTestCase): def test_fact(self): from algorithm.math import fact self.assertEqual(fact.fact(5), 120) self.assertEqual(fact.fact(6), 720) if __name__ == '__main__': TestCase.main()
128
8
50
6d90262f3fb32f6ed6e6cd552b8e459d5bcd8d3d
4,306
py
Python
Hough_Line_And_Circle_Detector/code/utils.py
dasdristanta13/Computer-vision
2fe99066c33f822772ae252f489728b8fff68399
[ "Unlicense" ]
null
null
null
Hough_Line_And_Circle_Detector/code/utils.py
dasdristanta13/Computer-vision
2fe99066c33f822772ae252f489728b8fff68399
[ "Unlicense" ]
null
null
null
Hough_Line_And_Circle_Detector/code/utils.py
dasdristanta13/Computer-vision
2fe99066c33f822772ae252f489728b8fff68399
[ "Unlicense" ]
1
2021-11-03T08:17:37.000Z
2021-11-03T08:17:37.000Z
import cv2 import numpy as np import matplotlib.pyplot as plt def preprocess(image, erodeK, blurK, blurSigma, lowT, upT): """ Preprocess an image by eroding (opt.), blurring (opt.), and then applying Canny edge detector. Args - image: numpy nd-array of dim (m, n, c) - erodeK: size ...
26.417178
91
0.60915
import cv2 import numpy as np import matplotlib.pyplot as plt def clip(idx): return int(max(idx,0)) def preprocess(image, erodeK, blurK, blurSigma, lowT, upT): """ Preprocess an image by eroding (opt.), blurring (opt.), and then applying Canny edge detector. Args - image: numpy nd-a...
606
0
207
d3183950d7dd416a386c9abd7c72f0256f52c4fa
691
py
Python
pclib/ifcs/__init__.py
belang/pymtl
4a96738724b007cbd684753aed0ac3de5b5dbebb
[ "BSD-3-Clause" ]
206
2015-01-05T21:53:56.000Z
2022-03-14T08:04:49.000Z
pclib/ifcs/__init__.py
belang/pymtl
4a96738724b007cbd684753aed0ac3de5b5dbebb
[ "BSD-3-Clause" ]
84
2015-01-25T19:57:33.000Z
2021-05-11T15:46:56.000Z
pclib/ifcs/__init__.py
belang/pymtl
4a96738724b007cbd684753aed0ac3de5b5dbebb
[ "BSD-3-Clause" ]
99
2015-02-17T17:43:44.000Z
2022-02-14T17:58:18.000Z
#========================================================================= # __init__ #========================================================================= from ValRdyBundle import InValRdyBundle, OutValRdyBundle from ParentChildBundle import ParentReqRespBundle, ChildReqRespBundle from NetMsg ...
38.388889
74
0.53835
#========================================================================= # __init__ #========================================================================= from ValRdyBundle import InValRdyBundle, OutValRdyBundle from ParentChildBundle import ParentReqRespBundle, ChildReqRespBundle from NetMsg ...
0
0
0
6332b291564ea6a8507d0e8b308d5c04e2983184
1,810
py
Python
Ago-Dic-2019/JOSE ONOFRE/PRACTICAS/Practica1/Shrinking.py
Arbupa/DAS_Sistemas
52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1
[ "MIT" ]
41
2017-09-26T09:36:32.000Z
2022-03-19T18:05:25.000Z
Ago-Dic-2019/JOSE ONOFRE/PRACTICAS/Practica1/Shrinking.py
Arbupa/DAS_Sistemas
52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1
[ "MIT" ]
67
2017-09-11T05:06:12.000Z
2022-02-14T04:44:04.000Z
Ago-Dic-2019/JOSE ONOFRE/PRACTICAS/Practica1/Shrinking.py
Arbupa/DAS_Sistemas
52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1
[ "MIT" ]
210
2017-09-01T00:10:08.000Z
2022-03-19T18:05:12.000Z
guest=['Alberto','Miguel','Jose','Luis'] print('Hola '+guest[0]+', te gustaría cenar esta noche?') print('Hola '+guest[1]+', te gustaría cenar esta noche?') print('Hola '+guest[2]+', te gustaría cenar esta noche?') print('Hola '+guest[3]+', te gustaría cenar esta noche?') print() print(guest[1]) guest[1] = 'Eduardo' p...
30.166667
85
0.69558
guest=['Alberto','Miguel','Jose','Luis'] print('Hola '+guest[0]+', te gustaría cenar esta noche?') print('Hola '+guest[1]+', te gustaría cenar esta noche?') print('Hola '+guest[2]+', te gustaría cenar esta noche?') print('Hola '+guest[3]+', te gustaría cenar esta noche?') print() print(guest[1]) guest[1] = 'Eduardo' p...
0
0
0
abe05c4e2072cac9bfc33631e66c0f975671c9ac
619
py
Python
appname/roles.py
Dnida/Ignite
38ac6042c9b16cdccf5ef066a1ee80b741b51a37
[ "BSD-2-Clause" ]
53
2017-12-12T06:58:25.000Z
2022-03-24T17:58:37.000Z
appname/roles.py
Dnida/Ignite
38ac6042c9b16cdccf5ef066a1ee80b741b51a37
[ "BSD-2-Clause" ]
144
2018-01-22T15:15:41.000Z
2022-03-28T09:02:00.000Z
appname/roles.py
Dnida/Ignite
38ac6042c9b16cdccf5ef066a1ee80b741b51a37
[ "BSD-2-Clause" ]
19
2017-12-12T07:04:14.000Z
2022-03-23T00:20:00.000Z
""" This file defines utilities used to enforce user roles. """ from flask import current_user from functools import wraps from enum import Enum
24.76
63
0.596123
""" This file defines utilities used to enforce user roles. """ from flask import current_user from functools import wraps from enum import Enum class Roles(Enum): GUEST = 'guest' USER = 'user' ADMIN = 'admin' def requires_roles(*roles): def wrapper(f): def get_user_role(): if curr...
373
55
46
f72b433198e89063d5e6f1584dc14c04ef6a68fb
2,261
py
Python
tests/test_mixture_transitions.py
probcomp/cgpm2
280ab5bf3dd0d7c61196deaff7cb590692fc412a
[ "Apache-2.0" ]
3
2019-01-20T08:55:06.000Z
2019-12-02T05:59:26.000Z
tests/test_mixture_transitions.py
probcomp/cgpm2
280ab5bf3dd0d7c61196deaff7cb590692fc412a
[ "Apache-2.0" ]
null
null
null
tests/test_mixture_transitions.py
probcomp/cgpm2
280ab5bf3dd0d7c61196deaff7cb590692fc412a
[ "Apache-2.0" ]
3
2019-08-06T07:27:34.000Z
2019-09-28T23:26:57.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2018 MIT Probabilistic Computing Project. # Released under Apache 2.0; refer to LICENSE.txt. from collections import Counter import numpy as np from cgpm.utils.general import get_prng from cgpm2.crp import CRP from cgpm2.normal import Normal from cgpm2.flexible_rowmix impor...
37.065574
80
0.689518
# -*- coding: utf-8 -*- # Copyright (c) 2018 MIT Probabilistic Computing Project. # Released under Apache 2.0; refer to LICENSE.txt. from collections import Counter import numpy as np from cgpm.utils.general import get_prng from cgpm2.crp import CRP from cgpm2.normal import Normal from cgpm2.flexible_rowmix impor...
1,682
0
23
af6cc4c9a3ffeabb765d5498521e8de72dabb2d2
4,546
py
Python
src/camguard/__init__.py
matt-hires/camguard
dde59289b8af105b8ed7ef1d8619747528c5b0a3
[ "MIT" ]
3
2021-12-06T18:26:12.000Z
2022-01-14T10:22:12.000Z
src/camguard/__init__.py
matt-hires/camguard
dde59289b8af105b8ed7ef1d8619747528c5b0a3
[ "MIT" ]
null
null
null
src/camguard/__init__.py
matt-hires/camguard
dde59289b8af105b8ed7ef1d8619747528c5b0a3
[ "MIT" ]
null
null
null
import logging import time from sys import stderr, stdout, exit from argparse import ArgumentDefaultsHelpFormatter, ArgumentParser, Namespace from signal import SIGINT, SIGTERM, Signals, sigwait from typing import Any, Dict, Optional from daemon.daemon import DaemonContext # type: ignore[reportMissingTypeStubs] from ...
36.95935
116
0.635724
import logging import time from sys import stderr, stdout, exit from argparse import ArgumentDefaultsHelpFormatter, ArgumentParser, Namespace from signal import SIGINT, SIGTERM, Signals, sigwait from typing import Any, Dict, Optional from daemon.daemon import DaemonContext # type: ignore[reportMissingTypeStubs] from ...
3,938
0
161
797920cbcb09ba515dad2c02cacbbd78069bda7b
8,787
py
Python
moler/util/moler_test.py
nokia/moler
13cb3d1329a8904ac074f269b8c9ec1955e3ae30
[ "BSD-3-Clause" ]
57
2018-02-20T08:16:47.000Z
2022-03-28T10:36:57.000Z
moler/util/moler_test.py
nokia/moler
13cb3d1329a8904ac074f269b8c9ec1955e3ae30
[ "BSD-3-Clause" ]
377
2018-07-19T11:56:27.000Z
2021-07-09T13:08:12.000Z
moler/util/moler_test.py
nokia/moler
13cb3d1329a8904ac074f269b8c9ec1955e3ae30
[ "BSD-3-Clause" ]
24
2018-04-14T20:49:40.000Z
2022-03-29T10:44:26.000Z
# -*- coding: utf-8 -*- """ Utility/common code of library. """ __author__ = 'Grzegorz Latuszek, Marcin Usielski, Michal Ernst, Tomasz Krol' __copyright__ = 'Copyright (C) 2018-2021, Nokia' __email__ = 'grzegorz.latuszek@nokia.com, marcin.usielski@nokia.com, michal.ernst@nokia.com, tomasz.krol@nokia.com' import loggi...
33.796154
117
0.610333
# -*- coding: utf-8 -*- """ Utility/common code of library. """ __author__ = 'Grzegorz Latuszek, Marcin Usielski, Michal Ernst, Tomasz Krol' __copyright__ = 'Copyright (C) 2018-2021, Nokia' __email__ = 'grzegorz.latuszek@nokia.com, marcin.usielski@nokia.com, michal.ernst@nokia.com, tomasz.krol@nokia.com' import loggi...
4,516
3,596
23
94b462f0a33c4783349048cce16cb8c7eba581b0
7,744
py
Python
lib/python/lib/python3.6/site-packages/sshuttle-0.78.5.dev35+gaaa6684-py3.6.egg/sshuttle/hostwatch.py
wmantly/sshuttle-gui
13a5c02474b51949ffddcf6da2f4b039757d7bc1
[ "MIT" ]
2
2020-01-27T18:59:59.000Z
2020-09-14T19:04:13.000Z
lib/python/lib/python3.6/site-packages/sshuttle-0.78.5.dev35+gaaa6684-py3.6.egg/sshuttle/hostwatch.py
wmantly/sshuttle-gui
13a5c02474b51949ffddcf6da2f4b039757d7bc1
[ "MIT" ]
1
2020-09-14T19:05:35.000Z
2020-09-17T05:06:31.000Z
lib/python/lib/python3.6/site-packages/sshuttle-0.78.5.dev35+gaaa6684-py3.6.egg/sshuttle/hostwatch.py
wmantly/sshuttle-gui
13a5c02474b51949ffddcf6da2f4b039757d7bc1
[ "MIT" ]
2
2020-09-17T04:24:23.000Z
2021-02-15T19:43:16.000Z
import time import socket import re import select import errno import os import sys import platform import subprocess as ssubprocess import sshuttle.helpers as helpers from sshuttle.helpers import log, debug1, debug2, debug3 POLL_TIME = 60 * 15 NETSTAT_POLL_TIME = 30 CACHEFILE = os.path.expanduser('~/.sshuttle.hosts'...
25.557756
73
0.521436
import time import socket import re import select import errno import os import sys import platform import subprocess as ssubprocess import sshuttle.helpers as helpers from sshuttle.helpers import log, debug1, debug2, debug3 POLL_TIME = 60 * 15 NETSTAT_POLL_TIME = 30 CACHEFILE = os.path.expanduser('~/.sshuttle.hosts'...
6,821
0
345
329ab261bcddd08532dd426509b98997f8267b7b
823
py
Python
main.py
omerferhatt/mont-crime-pat-search
5dfccbf48a55907c586ae31e5254b64601c8e386
[ "MIT" ]
null
null
null
main.py
omerferhatt/mont-crime-pat-search
5dfccbf48a55907c586ae31e5254b64601c8e386
[ "MIT" ]
null
null
null
main.py
omerferhatt/mont-crime-pat-search
5dfccbf48a55907c586ae31e5254b64601c8e386
[ "MIT" ]
null
null
null
# Library imports import sys import numpy as np # User defined library imports from file_read import read_shp, get_values from grid import create_grid from a_star import search from prompt_read import read_search_prompt, read_grid_prompt # Locate file pats path = "shape/crime_dt" # Get data's into data frame df, bbo...
29.392857
94
0.771567
# Library imports import sys import numpy as np # User defined library imports from file_read import read_shp, get_values from grid import create_grid from a_star import search from prompt_read import read_search_prompt, read_grid_prompt # Locate file pats path = "shape/crime_dt" # Get data's into data frame df, bbo...
0
0
0
81c707bbde6abd7a6bac02cc06f5e87bb3c55e51
655
py
Python
src/models/metrics.py
imad24/pc_clustering
b76cb5a0e6429610802594cc1ca5218dfcdb3605
[ "MIT" ]
null
null
null
src/models/metrics.py
imad24/pc_clustering
b76cb5a0e6429610802594cc1ca5218dfcdb3605
[ "MIT" ]
null
null
null
src/models/metrics.py
imad24/pc_clustering
b76cb5a0e6429610802594cc1ca5218dfcdb3605
[ "MIT" ]
1
2019-05-27T21:34:35.000Z
2019-05-27T21:34:35.000Z
import numpy as np
25.192308
68
0.630534
import numpy as np def getMSE(true,pred): return (( (true - pred) ** 2)).mean() def getMAE(true,pred): return (np.abs((true - pred))).mean() def getMAPE(true,pred): return np.abs((true - pred)/true).mean() def getsMAPE(true,pred): return ( (200*np.abs(true - pred)) / true+pred).mean() def getMAS...
521
0
114
49fad5c41c2602daea48b0a3b5cb63525138aabe
5,463
py
Python
agent.py
cihatceliker/TetrisAI-LSTM
158fa1703e0baa8cad85803b9e5975f5b018a201
[ "Apache-2.0" ]
null
null
null
agent.py
cihatceliker/TetrisAI-LSTM
158fa1703e0baa8cad85803b9e5975f5b018a201
[ "Apache-2.0" ]
null
null
null
agent.py
cihatceliker/TetrisAI-LSTM
158fa1703e0baa8cad85803b9e5975f5b018a201
[ "Apache-2.0" ]
null
null
null
import torch import torch.optim as optim import torch.nn as nn import numpy as np import pickle device = "cuda" if torch.cuda.is_available() else "cpu" # returns two zero tensors for the initial state of the lstm
37.9375
125
0.581183
import torch import torch.optim as optim import torch.nn as nn import numpy as np import pickle device = "cuda" if torch.cuda.is_available() else "cpu" class Network(nn.Module): def __init__(self, n_actions): super(Network, self).__init__() self.cnn = CNN(n_actions) self.rnn = nn.LSTM(14...
4,796
-3
447
6368622febe5531326ce4f953e30a01a5d65f4c4
2,617
py
Python
cogs/reactions.py
LuminetteBourgeons/Childe
21b148d5547dc90946c8263d65b4e6cff61d530b
[ "MIT" ]
9
2021-06-14T12:28:01.000Z
2022-02-21T19:48:14.000Z
cogs/reactions.py
LuminetteBourgeons/Childe
21b148d5547dc90946c8263d65b4e6cff61d530b
[ "MIT" ]
null
null
null
cogs/reactions.py
LuminetteBourgeons/Childe
21b148d5547dc90946c8263d65b4e6cff61d530b
[ "MIT" ]
3
2021-02-23T14:57:12.000Z
2021-11-09T14:38:06.000Z
import discord from discord.ext import commands
22.560345
62
0.663355
import discord from discord.ext import commands class Reactions(commands.Cog): def __init__(self,bot): self.bot=bot #expressions: @commands.command(aliases=['blushed']) async def blush(self, ctx, user: discord.Member = None): pass @commands.command(aliases=['confused']) async def confuse(self, ct...
1,184
1,339
46
0b0ccf397cb1c04c3b4e787a80fac01ed9b389a6
518
py
Python
flyingpigeon/log.py
Zeitsperre/flyingpigeon
678370bf428af7ffe11ee79be3b8a89c73215e5e
[ "Apache-2.0" ]
null
null
null
flyingpigeon/log.py
Zeitsperre/flyingpigeon
678370bf428af7ffe11ee79be3b8a89c73215e5e
[ "Apache-2.0" ]
4
2018-05-07T16:47:47.000Z
2019-01-21T13:07:17.000Z
flyingpigeon/log.py
Zeitsperre/flyingpigeon
678370bf428af7ffe11ee79be3b8a89c73215e5e
[ "Apache-2.0" ]
2
2018-07-10T12:58:55.000Z
2021-02-13T01:10:52.000Z
import os import logging
25.9
89
0.689189
import os import logging def init_process_logger(filename=None): filename = filename or 'log.txt' # create console handler and set level to debug ch = logging.FileHandler(filename=filename, mode="a", delay=False) ch.setLevel(logging.DEBUG) # create formatter formatter = logging.Formatter('%(a...
469
0
23
626abd63d78a8a5b1d7667ce6dac6ae09f500e83
197
py
Python
backend/app/posts/models.py
Christophe-Dupin/Docker-React-DRF-Simple-Starter
62d718149e02ec3ad297a70636fca45535b60748
[ "MIT" ]
null
null
null
backend/app/posts/models.py
Christophe-Dupin/Docker-React-DRF-Simple-Starter
62d718149e02ec3ad297a70636fca45535b60748
[ "MIT" ]
null
null
null
backend/app/posts/models.py
Christophe-Dupin/Docker-React-DRF-Simple-Starter
62d718149e02ec3ad297a70636fca45535b60748
[ "MIT" ]
null
null
null
from django.db import models
24.625
56
0.756345
from django.db import models class Post(models.Model): body = models.TextField() created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True)
0
144
23
11abe604f0160b86b71880ab20db1655dac6ef87
32,900
py
Python
experiments/thesis/langmodtrans_hyperpar.py
mtanti/mtanti-phd
d915b6f96f1bae1a7f517eb1dbd9d4a88ca56576
[ "MIT" ]
6
2019-05-20T06:48:37.000Z
2021-01-03T05:43:47.000Z
experiments/thesis/langmodtrans_hyperpar.py
mtanti/mtanti-phd
d915b6f96f1bae1a7f517eb1dbd9d4a88ca56576
[ "MIT" ]
1
2019-01-17T03:17:10.000Z
2019-02-23T17:31:41.000Z
experiments/thesis/langmodtrans_hyperpar.py
mtanti/mtanti-phd
d915b6f96f1bae1a7f517eb1dbd9d4a88ca56576
[ "MIT" ]
null
null
null
import skopt import os import numpy as np import shutil import sys os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' from framework import lib from framework import model_neural_trad from framework import evaluation from framework import data from framework import config #######################################################...
44.761905
266
0.541337
import skopt import os import numpy as np import shutil import sys os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' from framework import lib from framework import model_neural_trad from framework import evaluation from framework import data from framework import config #######################################################...
5,769
26
147
65aa1339949e649c39ced9706f12c27dd95fd15e
1,426
py
Python
CondCore/EcalPlugins/test/inspect.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
CondCore/EcalPlugins/test/inspect.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
CondCore/EcalPlugins/test/inspect.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
from __future__ import print_function # # I should write a decent test of the python binding... # import sys, os, DLFCN sys.setdlopenflags(DLFCN.RTLD_GLOBAL+DLFCN.RTLD_LAZY) from pluginCondDBPyInterface import * a = FWIncantation() os.putenv("CORAL_AUTH_PATH","/afs/cern.ch/cms/DB/conddb") rdbms = RDBMS() dbName = ...
25.017544
60
0.596073
from __future__ import print_function # # I should write a decent test of the python binding... # def dumpSummaries(dbname): db = rdbms.getDB(dbName) tags = db.allTags() for tag in tags.split() : try : # log = db.lastLogEntry(tag) # print log.getState() ...
787
0
45
f07d54e69d90505e6479998a7dcfd9785c458475
1,352
py
Python
tests/test_models.py
spapa013/EMAnnotationSchemas
15a6af980edbf2670578389e140a57c30ef9c5b4
[ "MIT" ]
null
null
null
tests/test_models.py
spapa013/EMAnnotationSchemas
15a6af980edbf2670578389e140a57c30ef9c5b4
[ "MIT" ]
null
null
null
tests/test_models.py
spapa013/EMAnnotationSchemas
15a6af980edbf2670578389e140a57c30ef9c5b4
[ "MIT" ]
null
null
null
from emannotationschemas.models import make_dataset_models, InvalidSchemaField from emannotationschemas.models import make_annotation_model_from_schema from emannotationschemas.models import Base import pytest import marshmallow as mm
34.666667
89
0.636095
from emannotationschemas.models import make_dataset_models, InvalidSchemaField from emannotationschemas.models import make_annotation_model_from_schema from emannotationschemas.models import Base import pytest import marshmallow as mm def test_model_creation(): metadata_dict = { 'spinecall...
1,069
0
46
0dbcd7bc0b1ae25a52c30f226724a06826b1432c
605
py
Python
xor.py
joelgrus/joelnet
65cbc3ff169855d801416d629d290c44c95d001d
[ "MIT" ]
312
2017-11-23T15:33:55.000Z
2022-03-17T19:57:17.000Z
xor.py
joelgrus/joelnet
65cbc3ff169855d801416d629d290c44c95d001d
[ "MIT" ]
1
2017-12-25T09:29:02.000Z
2017-12-25T09:29:02.000Z
xor.py
joelgrus/joelnet
65cbc3ff169855d801416d629d290c44c95d001d
[ "MIT" ]
77
2017-12-05T13:47:47.000Z
2022-02-23T04:35:37.000Z
""" The canonical example of a function that can't be learned with a simple linear model is XOR """ import numpy as np from joelnet.train import train from joelnet.nn import NeuralNet from joelnet.layers import Linear, Tanh inputs = np.array([ [0, 0], [1, 0], [0, 1], [1, 1] ]) targets = np.array([ ...
16.805556
49
0.618182
""" The canonical example of a function that can't be learned with a simple linear model is XOR """ import numpy as np from joelnet.train import train from joelnet.nn import NeuralNet from joelnet.layers import Linear, Tanh inputs = np.array([ [0, 0], [1, 0], [0, 1], [1, 1] ]) targets = np.array([ ...
0
0
0
0943663373248c3d894f2f0398227572a2cbb1c8
2,784
py
Python
seqtools/format/bed.py
jason-weirather/py-seq-tools
f642c2c73ffef2acc83656a78059a476fc734ca1
[ "Apache-2.0" ]
1
2018-01-08T15:18:22.000Z
2018-01-08T15:18:22.000Z
seqtools/format/bed.py
jason-weirather/py-seq-tools
f642c2c73ffef2acc83656a78059a476fc734ca1
[ "Apache-2.0" ]
1
2017-09-08T15:02:31.000Z
2017-09-08T15:02:31.000Z
seqtools/format/bed.py
jason-weirather/py-seq-tools
f642c2c73ffef2acc83656a78059a476fc734ca1
[ "Apache-2.0" ]
null
null
null
import sys, uuid from collections import namedtuple import seqtools.structure.transcript from seqtools.range import GenomicRange Bed12Options = namedtuple('Bed12Options', ['sequence', 'ref', 'gene_name', 'payload']) Bed12Fields = namedtuple('Bed12Fields', [ 'chrom', 'chromStart', 'chromE...
25.309091
91
0.595905
import sys, uuid from collections import namedtuple import seqtools.structure.transcript from seqtools.range import GenomicRange Bed12Options = namedtuple('Bed12Options', ['sequence', 'ref', 'gene_name', 'payload']) Bed12Fields = namedtuple('Bed12Fields', [ 'chrom', 'chromStart', 'chromE...
873
0
100
546edefa2858b6d9968b6c8574df68150306e29b
3,285
py
Python
examples/CooperativeSearch/psaltlib/LMCP/py/uxas/messages/task/AssignmentCoordinatorTask.py
GaloisInc/salty
f410659b3399ad7c527513e67b06dff0332d823e
[ "BSD-3-Clause" ]
13
2017-02-15T21:56:46.000Z
2022-03-23T12:59:26.000Z
examples/VIP-Escort/lmcp/py/uxas/messages/task/AssignmentCoordinatorTask.py
GaloisInc/salty
f410659b3399ad7c527513e67b06dff0332d823e
[ "BSD-3-Clause" ]
17
2016-07-21T10:47:23.000Z
2020-08-07T13:26:21.000Z
examples/CooperativeSearch/psaltlib/LMCP/py/uxas/messages/task/AssignmentCoordinatorTask.py
GaloisInc/salty
f410659b3399ad7c527513e67b06dff0332d823e
[ "BSD-3-Clause" ]
2
2019-06-11T11:59:40.000Z
2022-02-09T12:48:39.000Z
#! /usr/bin/python import sys, struct import xml.dom.minidom from lmcp import LMCPObject ## =============================================================================== ## Authors: AFRL/RQQA ## Organization: Air Force Research Laboratory, Aerospace Systems Directorate, Power and Control Division ## ## Copyright (...
28.076923
105
0.592998
#! /usr/bin/python import sys, struct import xml.dom.minidom from lmcp import LMCPObject ## =============================================================================== ## Authors: AFRL/RQQA ## Organization: Air Force Research Laboratory, Aerospace Systems Directorate, Power and Control Division ## ## Copyright (...
1,555
979
23
e8c7ec0c8ada193ea596076a88c58cc3b815188c
900
py
Python
src/config.py
arunderwood/ESP8266_temp_sensor
f30dc3d209c37ef3da5cb5faf4e0e63b9394c3cd
[ "MIT" ]
6
2018-01-23T16:03:51.000Z
2018-08-24T10:50:42.000Z
src/config.py
arunderwood/ESP8266_temp_sensor
f30dc3d209c37ef3da5cb5faf4e0e63b9394c3cd
[ "MIT" ]
1
2018-02-21T04:30:12.000Z
2018-02-21T04:30:12.000Z
src/config.py
arunderwood/ESP8266_temp_sensor
f30dc3d209c37ef3da5cb5faf4e0e63b9394c3cd
[ "MIT" ]
null
null
null
import machine import ubinascii # These defaults are overwritten with the contents of /config.json by # load_config() CONFIG = { "broker": "192.168.1.19", "sensor_pin": 0, "led_pin": 2, "client_id": b"esp8266_" + ubinascii.hexlify(machine.unique_id()), "topic": b"home", "sleep_seconds": 60, ...
23.076923
70
0.588889
import machine import ubinascii # These defaults are overwritten with the contents of /config.json by # load_config() CONFIG = { "broker": "192.168.1.19", "sensor_pin": 0, "led_pin": 2, "client_id": b"esp8266_" + ubinascii.hexlify(machine.unique_id()), "topic": b"home", "sleep_seconds": 60, ...
441
0
46
43adddc985cb4eb4a91c38e1742ea5f0b3edd50f
739
py
Python
confoo-2012/pace_example/ecg.py
andymckay/presentations
19e485f0ad5ca5e56779475659f31b6682e8016e
[ "CC-BY-3.0" ]
3
2015-08-05T23:04:10.000Z
2022-01-24T20:01:33.000Z
confoo-2012/pace_example/ecg.py
andymckay/presentations
19e485f0ad5ca5e56779475659f31b6682e8016e
[ "CC-BY-3.0" ]
null
null
null
confoo-2012/pace_example/ecg.py
andymckay/presentations
19e485f0ad5ca5e56779475659f31b6682e8016e
[ "CC-BY-3.0" ]
4
2015-06-28T19:02:49.000Z
2021-10-29T19:28:39.000Z
import time import redis import csv import sys import os conn = redis.Redis() filename = sys.argv[1] lines = [] read = csv.reader(open(filename)) lines = [l for l in read] nice = os.path.splitext(os.path.basename(filename))[0] # We are doing True so that we'll have a continual flow of data from # our sample data. ...
23.83871
75
0.610284
import time import redis import csv import sys import os conn = redis.Redis() filename = sys.argv[1] lines = [] read = csv.reader(open(filename)) lines = [l for l in read] nice = os.path.splitext(os.path.basename(filename))[0] # We are doing True so that we'll have a continual flow of data from # our sample data. ...
0
0
0
cb101ed069bf8415ae3ff3ead3e455873dae878c
1,154
py
Python
gcsa/serializers/gadget_serializer.py
kenomaerz/google-calendar-simple-api
969097b2dce578465bcab768169d88b8575325f9
[ "MIT" ]
null
null
null
gcsa/serializers/gadget_serializer.py
kenomaerz/google-calendar-simple-api
969097b2dce578465bcab768169d88b8575325f9
[ "MIT" ]
null
null
null
gcsa/serializers/gadget_serializer.py
kenomaerz/google-calendar-simple-api
969097b2dce578465bcab768169d88b8575325f9
[ "MIT" ]
null
null
null
from gcsa.gadget import Gadget from .base_serializer import BaseSerializer
27.47619
60
0.571057
from gcsa.gadget import Gadget from .base_serializer import BaseSerializer class GadgetSerializer(BaseSerializer): type_ = Gadget def __init__(self, gadget): super().__init__(gadget) @staticmethod def _to_json(gadget): res = { "title": gadget.title, "type": ga...
901
154
23
913180e93fe4ad20f5b1ee03dabaffdc9c3a1efe
123
py
Python
tweet/forms.py
jeffsimp88/twitterclone
696aa05da4feae15d7a0c2296a8d74be4ee32286
[ "MIT" ]
null
null
null
tweet/forms.py
jeffsimp88/twitterclone
696aa05da4feae15d7a0c2296a8d74be4ee32286
[ "MIT" ]
null
null
null
tweet/forms.py
jeffsimp88/twitterclone
696aa05da4feae15d7a0c2296a8d74be4ee32286
[ "MIT" ]
null
null
null
from django import forms
30.75
68
0.788618
from django import forms class TweetForm(forms.Form): message = forms.CharField(widget=forms.Textarea, max_length=140)
0
76
23
4fa8d6ef6f1013a44218a63e6eda655d26229ed6
18,950
py
Python
glance/tests/functional/v2/test_metadef_objects.py
Steap/glance
4ee7799aa7f6a7172e361392ebb8d3da03e0bf7f
[ "Apache-2.0" ]
309
2015-01-01T17:49:09.000Z
2022-03-29T14:56:31.000Z
glance/tests/functional/v2/test_metadef_objects.py
Steap/glance
4ee7799aa7f6a7172e361392ebb8d3da03e0bf7f
[ "Apache-2.0" ]
8
2015-11-04T21:53:48.000Z
2020-12-15T05:36:35.000Z
glance/tests/functional/v2/test_metadef_objects.py
Steap/glance
4ee7799aa7f6a7172e361392ebb8d3da03e0bf7f
[ "Apache-2.0" ]
409
2015-01-01T11:28:26.000Z
2022-03-29T14:56:41.000Z
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. # # 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 applica...
44.172494
79
0.544116
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. # # 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 applica...
17,984
44
158
6e25a83f2930cd7ffe4cfcaaab363cf3b76d4358
733
py
Python
riscv_mini/core.py
cdonovick/magma_riscv_mini
b7f39e09df28c6dde26ec427aae54aa9b88f1d11
[ "BSD-3-Clause" ]
null
null
null
riscv_mini/core.py
cdonovick/magma_riscv_mini
b7f39e09df28c6dde26ec427aae54aa9b88f1d11
[ "BSD-3-Clause" ]
null
null
null
riscv_mini/core.py
cdonovick/magma_riscv_mini
b7f39e09df28c6dde26ec427aae54aa9b88f1d11
[ "BSD-3-Clause" ]
null
null
null
import magma as m from riscv_mini.cache import make_CacheIO from riscv_mini.data_path import Datapath, make_HostIO from riscv_mini.control import Control
30.541667
54
0.648022
import magma as m from riscv_mini.cache import make_CacheIO from riscv_mini.data_path import Datapath, make_HostIO from riscv_mini.control import Control class Core(m.Generator2): def __init__(self, x_len: int): self.io = m.IO( host=make_HostIO(x_len), icache=m.Flip(make_CacheIO(x...
524
4
49
492d4476a817825b0dd32eefe67369d890d4b48b
2,280
py
Python
script.py
discdiver/gendertxt
573d794463cd0bcc98ed524f79146f8d934ff65e
[ "MIT" ]
null
null
null
script.py
discdiver/gendertxt
573d794463cd0bcc98ed524f79146f8d934ff65e
[ "MIT" ]
1
2018-01-31T18:11:48.000Z
2018-01-31T18:11:48.000Z
script.py
discdiver/gendertxt
573d794463cd0bcc98ed524f79146f8d934ff65e
[ "MIT" ]
null
null
null
# main script # read in list of gendered words from genderwords # switch them through an intermediary step import csv import re with open ('./data/genderwords.csv') as words: reader = csv.reader(words) mydict = {row[0]: row[1] for row in reader} with open('./data/Harry.txt', 'r') as f1: with open...
30.4
115
0.572368
# main script # read in list of gendered words from genderwords # switch them through an intermediary step import csv import re with open ('./data/genderwords.csv') as words: reader = csv.reader(words) mydict = {row[0]: row[1] for row in reader} with open('./data/Harry.txt', 'r') as f1: with open...
0
0
0
9cff5f10a44e765e3d80e0dd2f9eefb81aff5b65
242
wsgi
Python
application.wsgi
cerivera/slicknot
8c3570aefd7717038c9ddad5741cd6764e870a5e
[ "MIT" ]
1
2018-01-29T19:18:12.000Z
2018-01-29T19:18:12.000Z
application.wsgi
cerivera/slicknot
8c3570aefd7717038c9ddad5741cd6764e870a5e
[ "MIT" ]
null
null
null
application.wsgi
cerivera/slicknot
8c3570aefd7717038c9ddad5741cd6764e870a5e
[ "MIT" ]
null
null
null
import os, sys PROJECT_DIR = '/www/slicknot' activate_this = os.path.join(PROJECT_DIR, 'bin', 'activate_this.py') execfile(activate_this, dict(__file__=activate_this)) sys.path.append(PROJECT_DIR) from slicknot import app as application
20.166667
68
0.780992
import os, sys PROJECT_DIR = '/www/slicknot' activate_this = os.path.join(PROJECT_DIR, 'bin', 'activate_this.py') execfile(activate_this, dict(__file__=activate_this)) sys.path.append(PROJECT_DIR) from slicknot import app as application
0
0
0
03276702f61644404540f29b73d17f28e61eec50
4,649
py
Python
model_building.py
VivanVatsa/ds-salary-proj
b78b5498d2e3326799cae445ba47d6e6a5637ccb
[ "MIT" ]
5
2020-12-30T06:17:19.000Z
2021-12-14T21:26:57.000Z
model_building.py
VivanVatsa/ds-salary-proj
b78b5498d2e3326799cae445ba47d6e6a5637ccb
[ "MIT" ]
null
null
null
model_building.py
VivanVatsa/ds-salary-proj
b78b5498d2e3326799cae445ba47d6e6a5637ccb
[ "MIT" ]
5
2021-01-19T14:06:34.000Z
2022-02-25T15:57:16.000Z
#%% import pandas as pd import matplotlib.pyplot as plt import numpy as np df = pd.read_csv("data_eda.csv") # choose the relevant columns #%% df.columns #%% df_model = df[[ "avg_salary", "Rating", "Size", "Type of ownership", "Industry", "Sector", "Revenue", "num_comp", "hourly", ...
20.662222
78
0.569585
#%% import pandas as pd import matplotlib.pyplot as plt import numpy as np df = pd.read_csv("data_eda.csv") # choose the relevant columns #%% df.columns #%% df_model = df[[ "avg_salary", "Rating", "Size", "Type of ownership", "Industry", "Sector", "Revenue", "num_comp", "hourly", ...
0
0
0
f5f333a78a2c35bb1f7233264267a0be6328d43d
1,397
py
Python
moonfire_tokenomics/data/bond.py
moonfire-ventures/tokenomics
4152bfd0e831262139ce50c6baae2748f19af850
[ "MIT" ]
2
2022-03-30T17:12:03.000Z
2022-03-30T17:14:20.000Z
moonfire_tokenomics/data/bond.py
moonfire-ventures/tokenomics
4152bfd0e831262139ce50c6baae2748f19af850
[ "MIT" ]
null
null
null
moonfire_tokenomics/data/bond.py
moonfire-ventures/tokenomics
4152bfd0e831262139ce50c6baae2748f19af850
[ "MIT" ]
null
null
null
from moonfire_tokenomics.data_types import Allocation, AllocationRecord, Blockchain, Category, CommonType, Sector, Token bond = Token( name="BOND", project="Barnbridge", sector=Sector.DEFI, blockchain=[Blockchain.ETH], category=[Category.GOV], capped=True, allocations=[ Allocation( ...
45.064516
120
0.652112
from moonfire_tokenomics.data_types import Allocation, AllocationRecord, Blockchain, Category, CommonType, Sector, Token bond = Token( name="BOND", project="Barnbridge", sector=Sector.DEFI, blockchain=[Blockchain.ETH], category=[Category.GOV], capped=True, allocations=[ Allocation( ...
0
0
0
210b1c62d53e192545e5946ae8887183419aff3c
3,315
py
Python
recipe/test_imports.py
cryoem/eman-dependencies-feedstock
74a2cc4d3abcec69dc3fff20761ce0191192eaea
[ "BSD-3-Clause" ]
null
null
null
recipe/test_imports.py
cryoem/eman-dependencies-feedstock
74a2cc4d3abcec69dc3fff20761ce0191192eaea
[ "BSD-3-Clause" ]
2
2020-04-28T13:38:02.000Z
2020-09-07T10:57:03.000Z
recipe/test_imports.py
cryoem/eman-dependencies-feedstock
74a2cc4d3abcec69dc3fff20761ce0191192eaea
[ "BSD-3-Clause" ]
2
2020-04-28T13:32:13.000Z
2020-09-07T10:44:19.000Z
from bisect import insort from bsddb3 import db from builtins import object from builtins import range from collections import Counter from collections import MutableMapping from collections import defaultdict from copy import copy from copy import deepcopy from distutils.spawn import find_executable from functools imp...
23.34507
59
0.855505
from bisect import insort from bsddb3 import db from builtins import object from builtins import range from collections import Counter from collections import MutableMapping from collections import defaultdict from copy import copy from copy import deepcopy from distutils.spawn import find_executable from functools imp...
0
0
0
8d3b7fe2405116c6e8c3b0edc0f4e61a4db16fd5
2,406
py
Python
MuseParse/classes/ObjectHierarchy/ItemClasses/BaseClass.py
Godley/MusIc-Parser
23cecafa1fdc0f2d6a87760553572b459f3c9904
[ "MIT" ]
5
2015-07-21T14:06:34.000Z
2018-04-24T19:31:45.000Z
MuseParse/classes/ObjectHierarchy/ItemClasses/BaseClass.py
Godley/MusIc-Parser
23cecafa1fdc0f2d6a87760553572b459f3c9904
[ "MIT" ]
37
2015-07-20T17:03:19.000Z
2016-08-08T09:21:40.000Z
MuseParse/classes/ObjectHierarchy/ItemClasses/BaseClass.py
Godley/MusIc-Parser
23cecafa1fdc0f2d6a87760553572b459f3c9904
[ "MIT" ]
5
2015-07-24T09:22:52.000Z
2017-03-29T19:13:16.000Z
class Base(object): """ A class which ensures all subclasses have a basic override of the to string method, and a toLily method """ def toLily(self): ''' Method which in any sub classes produces a string, which is a line of lilypond scripting representing the class and its var...
33.887324
119
0.37739
class Base(object): """ A class which ensures all subclasses have a basic override of the to string method, and a toLily method """ def __init__(self): self.indent = 1 def toLily(self): ''' Method which in any sub classes produces a string, which is a line of lilypond scr...
1,922
0
54
3b36e6257aca3505d3735d7693ed80f1ac11c54a
2,876
py
Python
pybokio/client/_subclients/account_client.py
vonNiklasson/PyBokio
272b2d559128e60add7fd7deaa7fd5eccbaa3b2f
[ "MIT" ]
1
2021-06-07T21:31:01.000Z
2021-06-07T21:31:01.000Z
pybokio/client/_subclients/account_client.py
vonNiklasson/PyBokio
272b2d559128e60add7fd7deaa7fd5eccbaa3b2f
[ "MIT" ]
null
null
null
pybokio/client/_subclients/account_client.py
vonNiklasson/PyBokio
272b2d559128e60add7fd7deaa7fd5eccbaa3b2f
[ "MIT" ]
null
null
null
import warnings from abc import ABC from typing import List from requests import Response from pybokio._routers.account_routers import AccountIsAuthenticatedRouter, AccountLoginRouter, AccountLogoutRouter from pybokio.client._base_client import BaseClient from pybokio.exceptions import AuthenticationError from pyboki...
39.944444
114
0.670723
import warnings from abc import ABC from typing import List from requests import Response from pybokio._routers.account_routers import AccountIsAuthenticatedRouter, AccountLoginRouter, AccountLogoutRouter from pybokio.client._base_client import BaseClient from pybokio.exceptions import AuthenticationError from pyboki...
153
2,345
23
4ed69dfa5da472187979c2575ab7e6ca57fb5151
315
py
Python
molssi_2019/tests/test_molssi_2019.py
semodi/molssi_2019
42cf94c7f79abb35ce250345180e4b064bd13091
[ "BSD-3-Clause" ]
null
null
null
molssi_2019/tests/test_molssi_2019.py
semodi/molssi_2019
42cf94c7f79abb35ce250345180e4b064bd13091
[ "BSD-3-Clause" ]
null
null
null
molssi_2019/tests/test_molssi_2019.py
semodi/molssi_2019
42cf94c7f79abb35ce250345180e4b064bd13091
[ "BSD-3-Clause" ]
null
null
null
""" Unit and regression test for the molssi_2019 package. """ # Import package, test suite, and other packages as needed import molssi_2019 import pytest import sys def test_molssi_2019_imported(): """Sample test, will always pass so long as import statement worked""" assert "molssi_2019" in sys.modules
24.230769
74
0.75873
""" Unit and regression test for the molssi_2019 package. """ # Import package, test suite, and other packages as needed import molssi_2019 import pytest import sys def test_molssi_2019_imported(): """Sample test, will always pass so long as import statement worked""" assert "molssi_2019" in sys.modules
0
0
0
52a8b2f7dadef45b5615fdb467a4abca3a5ca5b3
1,082
py
Python
config/api_router.py
BFSSI-Bioinformatics-Lab/bmh_lims
02892449a2c17e629732f5580d62596a72b279b0
[ "MIT" ]
null
null
null
config/api_router.py
BFSSI-Bioinformatics-Lab/bmh_lims
02892449a2c17e629732f5580d62596a72b279b0
[ "MIT" ]
7
2020-09-28T13:42:56.000Z
2021-01-28T15:48:10.000Z
config/api_router.py
bfssi-forest-dussault/bmh_lims
02892449a2c17e629732f5580d62596a72b279b0
[ "MIT" ]
1
2021-01-18T18:15:18.000Z
2021-01-18T18:15:18.000Z
from django.conf import settings from rest_framework.routers import DefaultRouter, SimpleRouter from bmh_lims.users.api.views import UserViewSet from bmh_lims.database.api.views import SampleViewSet, WorkflowBatchViewSet, LabViewSet, ProjectViewSet, \ WorkflowSampleViewSet, WorkflowDefinitionViewSet, WorkflowSampl...
45.083333
120
0.829945
from django.conf import settings from rest_framework.routers import DefaultRouter, SimpleRouter from bmh_lims.users.api.views import UserViewSet from bmh_lims.database.api.views import SampleViewSet, WorkflowBatchViewSet, LabViewSet, ProjectViewSet, \ WorkflowSampleViewSet, WorkflowDefinitionViewSet, WorkflowSampl...
0
0
0
ea62d75b5e2981df134663446712fdc9ea660c2e
738
py
Python
objects_classes.py
thethirdone-g/py_basics
f31782ecf309ad922add7b055f2315573b01a05c
[ "MIT" ]
null
null
null
objects_classes.py
thethirdone-g/py_basics
f31782ecf309ad922add7b055f2315573b01a05c
[ "MIT" ]
null
null
null
objects_classes.py
thethirdone-g/py_basics
f31782ecf309ad922add7b055f2315573b01a05c
[ "MIT" ]
null
null
null
# Classes are templates, objects are instances of that class. # I'll use coins as examples of classes and objects : coin1 = Penny() # Instantiating the coin class to this coin1 object. print(type()) # Should print <class'__main__Penny'> coin1.value # Should print out 1.0
19.945946
68
0.650407
# Classes are templates, objects are instances of that class. # I'll use coins as examples of classes and objects : class Penny: # Defining the class. def __init__(self, rare=False): # Defining a class method. self.rare = rare if self.rare: self.value = 1.25 else: self.value = 1.00 s...
271
69
123
6f838b7b104692669ee23abeb686183ec82253d9
8,468
py
Python
web-interface/graph_bak2.py
espoo-urban-planning/urbanplanningGAN
e921211b7a9f9f02d16e8f14ea29bf81139886c2
[ "MIT" ]
null
null
null
web-interface/graph_bak2.py
espoo-urban-planning/urbanplanningGAN
e921211b7a9f9f02d16e8f14ea29bf81139886c2
[ "MIT" ]
null
null
null
web-interface/graph_bak2.py
espoo-urban-planning/urbanplanningGAN
e921211b7a9f9f02d16e8f14ea29bf81139886c2
[ "MIT" ]
null
null
null
import cv2 import numpy as np import matplotlib import matplotlib.pyplot as plt import numpy import math img = cv2.imread('thinning.png',0) nodes = [] nodeMap = np.empty([512, 512], dtype=int) edgesOfNodes = [] edges = [] #I need list of all edges with duplicates #[start id] [end id] #each edge can have connectio...
31.479554
163
0.58479
import cv2 import numpy as np import matplotlib import matplotlib.pyplot as plt import numpy import math img = cv2.imread('thinning.png',0) nodes = [] nodeMap = np.empty([512, 512], dtype=int) edgesOfNodes = [] edges = [] #I need list of all edges with duplicates #[start id] [end id] #each edge can have connectio...
0
0
0
25fa4b96a9be96bd8b09aef57043698d57061c46
2,897
py
Python
parser.py
seungwonpark/shaynman
21d11e686a183a0d5f30b280745cafe203a5b060
[ "MIT" ]
null
null
null
parser.py
seungwonpark/shaynman
21d11e686a183a0d5f30b280745cafe203a5b060
[ "MIT" ]
1
2017-08-04T12:14:29.000Z
2017-08-06T10:17:19.000Z
parser.py
seungwonpark/shaynman
21d11e686a183a0d5f30b280745cafe203a5b060
[ "MIT" ]
null
null
null
from lecturelists import * import requests import re import schedule import time with open('token.txt', 'r') as f: bot_token = f.read().replace('\n','') with open('secret.txt', 'r') as f: err_bot_token, admin_no = f.read().replace('\n','').split(',') handler() schedule.every(1).minutes.do(handler) while True: s...
32.920455
131
0.614774
from lecturelists import * import requests import re import schedule import time with open('token.txt', 'r') as f: bot_token = f.read().replace('\n','') with open('secret.txt', 'r') as f: err_bot_token, admin_no = f.read().replace('\n','').split(',') def handler(): try: job() except Exception as e: #Connection...
2,505
0
46
06065bdc7d1076d0090cc4d10c140b9fa7f7e796
925
py
Python
src/MotorBase.py
LeoWhite/PiWars2020
cd2bea0abf5519e8ad22d9d78f00bb43ceaea76f
[ "MIT" ]
null
null
null
src/MotorBase.py
LeoWhite/PiWars2020
cd2bea0abf5519e8ad22d9d78f00bb43ceaea76f
[ "MIT" ]
1
2020-01-01T21:53:41.000Z
2020-01-01T21:53:41.000Z
src/MotorBase.py
LeoWhite/PiWars2020
cd2bea0abf5519e8ad22d9d78f00bb43ceaea76f
[ "MIT" ]
null
null
null
#! /usr/bin/python3 # A Motor class used for abstraction purposes
25.694444
80
0.568649
#! /usr/bin/python3 # A Motor class used for abstraction purposes class MotorBase(object): def __init__(self): # As this is a stubbed out class there isn't anything we need to do here # Possibly define some max ranges or other globals #print("MotorBase init") return def set_l...
429
406
23
7c56f8b011d5086b9774e046ac5ca3a34d47a91e
923
py
Python
shops/machine_learning_exercises/modules/toolbox/tester.py
mtaung/bazaar
3b82ffaec3767b3412d5e0460f315b59329d613a
[ "MIT" ]
null
null
null
shops/machine_learning_exercises/modules/toolbox/tester.py
mtaung/bazaar
3b82ffaec3767b3412d5e0460f315b59329d613a
[ "MIT" ]
null
null
null
shops/machine_learning_exercises/modules/toolbox/tester.py
mtaung/bazaar
3b82ffaec3767b3412d5e0460f315b59329d613a
[ "MIT" ]
null
null
null
from sklearn.model_selection import StratifiedShuffleSplit from sklearn.datasets import make_classification from .scorer import Scorer def test_classification(models, one_hot=False): ''' ''' for name, model in models.items(): X, y = make_classification( n_samples=10000, n_...
28.84375
68
0.603467
from sklearn.model_selection import StratifiedShuffleSplit from sklearn.datasets import make_classification from .scorer import Scorer def test_classification(models, one_hot=False): ''' ''' for name, model in models.items(): X, y = make_classification( n_samples=10000, n_...
0
0
0
d45a741da36be48ed13b91ff8edd4695cff48d0e
4,763
py
Python
tests/memtest.py
DistrictDataLabs/minke
e41e8583f1386dbad5249aad740343c984832f1e
[ "MIT" ]
14
2017-05-25T09:29:54.000Z
2019-06-10T05:09:16.000Z
tests/memtest.py
DistrictDataLabs/minke
e41e8583f1386dbad5249aad740343c984832f1e
[ "MIT" ]
null
null
null
tests/memtest.py
DistrictDataLabs/minke
e41e8583f1386dbad5249aad740343c984832f1e
[ "MIT" ]
9
2017-05-24T10:57:10.000Z
2022-01-05T02:57:35.000Z
#!/usr/bin/env python # tests.memtest # Short script to exercise the corpus reader memory usage. # # Author: Benjamin Bengfort <bbengfort@districtdatalabs.com> # Created: Tue Apr 19 16:38:28 2016 -0400 # # Copyright (C) 2016 District Data Labs # For license information, see LICENSE.txt # # ID: memtest.py [0753dd0] b...
30.532051
86
0.512282
#!/usr/bin/env python # tests.memtest # Short script to exercise the corpus reader memory usage. # # Author: Benjamin Bengfort <bbengfort@districtdatalabs.com> # Created: Tue Apr 19 16:38:28 2016 -0400 # # Copyright (C) 2016 District Data Labs # For license information, see LICENSE.txt # # ID: memtest.py [0753dd0] b...
0
0
0
394fc7a7e56281072fc62de2361607639b4f16fc
561
py
Python
tests/test_xpath.py
mattdennewitz/pat
782ebf29a75ab9b35d45fc11d2eb7a50fa2f611b
[ "MIT" ]
null
null
null
tests/test_xpath.py
mattdennewitz/pat
782ebf29a75ab9b35d45fc11d2eb7a50fa2f611b
[ "MIT" ]
null
null
null
tests/test_xpath.py
mattdennewitz/pat
782ebf29a75ab9b35d45fc11d2eb7a50fa2f611b
[ "MIT" ]
null
null
null
import pytest from lxml.etree import XPathEvalError from pat import pat def test_valid_xpath(html_blob): """Ensures a valid XPath produces results """ # extract only the first table xpath = '/descendant::table[1]' results = pat(html_blob, xpath_query=xpath) assert len(results) == 1 def t...
20.035714
49
0.69697
import pytest from lxml.etree import XPathEvalError from pat import pat def test_valid_xpath(html_blob): """Ensures a valid XPath produces results """ # extract only the first table xpath = '/descendant::table[1]' results = pat(html_blob, xpath_query=xpath) assert len(results) == 1 def t...
0
0
0
a0fed588d0a32e06a6d2e00cceb4d66701cbb3d7
1,228
py
Python
main/migrations/0002_auto_20191014_0247.py
washucode/instagram-clone
dccb76f49d7675ee0dcf3a4e2d55d2ad97262c3d
[ "MIT" ]
null
null
null
main/migrations/0002_auto_20191014_0247.py
washucode/instagram-clone
dccb76f49d7675ee0dcf3a4e2d55d2ad97262c3d
[ "MIT" ]
6
2020-06-05T23:37:47.000Z
2022-02-10T11:11:07.000Z
main/migrations/0002_auto_20191014_0247.py
washucode/instagram-clone
dccb76f49d7675ee0dcf3a4e2d55d2ad97262c3d
[ "MIT" ]
null
null
null
# Generated by Django 2.2.6 on 2019-10-14 02:47 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
37.212121
155
0.620521
# Generated by Django 2.2.6 on 2019-10-14 02:47 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('main', '0001_initial'), ...
0
1,048
23
6297fb7719bf66d24a8e3b576b31bc621b21b8e2
1,130
py
Python
average.py
ChibiMuse/itc110-python-practice
4be26e5b8ae753b57bc6e00eabde13ea1566e930
[ "Apache-2.0" ]
null
null
null
average.py
ChibiMuse/itc110-python-practice
4be26e5b8ae753b57bc6e00eabde13ea1566e930
[ "Apache-2.0" ]
1
2019-11-08T02:09:57.000Z
2019-11-08T02:09:57.000Z
average.py
ChibiMuse/itc110-python-practice
4be26e5b8ae753b57bc6e00eabde13ea1566e930
[ "Apache-2.0" ]
null
null
null
#Programs that calculate the averages of numbers. #call the program from main. #The first program is for a set amount of three numbers. #The second program is more flexible for a user defined amount of numbers. main()
33.235294
104
0.624779
#Programs that calculate the averages of numbers. #call the program from main. def main(): average_list() #The first program is for a set amount of three numbers. def average(): x,y,z = eval(input("Enter the three numbers you wish to average, seperated by commas (no spaces)")) average = (x + y ...
824
0
69
8cb6576c903f4062a9c0c904436f872cf4d43449
11,133
py
Python
dp/infos.py
dico-api/dico-dp
605930b381c4c11b0105333050e8de836b0c8bf3
[ "MIT" ]
6
2021-09-21T14:27:39.000Z
2021-09-26T12:59:46.000Z
dp/infos.py
dico-api/dico-dp
605930b381c4c11b0105333050e8de836b0c8bf3
[ "MIT" ]
1
2021-11-03T08:01:45.000Z
2021-11-04T15:04:25.000Z
dp/infos.py
dico-api/dico-dp
605930b381c4c11b0105333050e8de836b0c8bf3
[ "MIT" ]
null
null
null
import datetime import platform import dico import dico_command import psutil from dico.utils import rgb from . import __version__ from .utils import parse_bytesize, parse_second try: from dico_interaction import __version__ as __inter_version__ except ImportError: __inter_version__ = None privileged = ["GU...
58.904762
163
0.584838
import datetime import platform import dico import dico_command import psutil from dico.utils import rgb from . import __version__ from .utils import parse_bytesize, parse_second try: from dico_interaction import __version__ as __inter_version__ except ImportError: __inter_version__ = None privileged = ["GU...
10,638
0
138
0e0f314e01c190a0b87ad7178b2cb55b45e887ab
2,205
py
Python
supervised_learning/regression/partial_least_squares_regression/sample.py
niektuytel/Machine_Learning
0cd5656ca8076c383fd81c5e32a49969a20ad042
[ "MIT" ]
11
2021-07-05T15:51:35.000Z
2022-03-19T15:17:37.000Z
supervised_learning/regression/partial_least_squares_regression/sample.py
niektuytel/Machine_Learning
0cd5656ca8076c383fd81c5e32a49969a20ad042
[ "MIT" ]
null
null
null
supervised_learning/regression/partial_least_squares_regression/sample.py
niektuytel/Machine_Learning
0cd5656ca8076c383fd81c5e32a49969a20ad042
[ "MIT" ]
null
null
null
from sys import stdout import numpy as np import pandas as pd import matplotlib.pyplot as plt from scipy.signal import savgol_filter from sklearn.cross_decomposition import PLSRegression from sklearn.model_selection import cross_val_predict from sklearn.metrics import mean_squared_error, r2_score # dataset data = pd...
26.25
94
0.649887
from sys import stdout import numpy as np import pandas as pd import matplotlib.pyplot as plt from scipy.signal import savgol_filter from sklearn.cross_decomposition import PLSRegression from sklearn.model_selection import cross_val_predict from sklearn.metrics import mean_squared_error, r2_score # dataset data = pd...
769
0
45
790d18c000cbd34272ce5e58feb3eb2b358ab314
223
py
Python
models/layer/__init__.py
LegenDong/IQIYI_VID_FACE_2019
258ff9282206e7b7074ed9ada5ef928bc9305ec6
[ "MIT" ]
17
2019-07-11T02:41:01.000Z
2022-01-13T05:13:24.000Z
models/layer/__init__.py
xmpy/IQIYI_VID_FACE_2019
258ff9282206e7b7074ed9ada5ef928bc9305ec6
[ "MIT" ]
1
2021-04-16T15:37:12.000Z
2021-04-17T13:46:57.000Z
models/layer/__init__.py
LegenDong/IQIYI_VID_FACE_2019
258ff9282206e7b7074ed9ada5ef928bc9305ec6
[ "MIT" ]
5
2019-07-23T02:18:04.000Z
2021-07-14T03:42:32.000Z
# -*- coding: utf-8 -*- # @Time : 2019/5/11 15:12 # @Author : LegenDong # @User : legendong # @File : __init__.py.py # @Software: PyCharm from .channel_attention_layer import * from .nan_attention_layer import *
22.3
38
0.654709
# -*- coding: utf-8 -*- # @Time : 2019/5/11 15:12 # @Author : LegenDong # @User : legendong # @File : __init__.py.py # @Software: PyCharm from .channel_attention_layer import * from .nan_attention_layer import *
0
0
0
ca94ec91014b313a97c2ffd31348b102ded4bc66
232
py
Python
assistant/app/config.py
BugLight/fleetcor-assistant
c3d97d88ef94e5469d5e34c0d6ec7d2523144cdb
[ "MIT" ]
1
2019-03-27T10:08:22.000Z
2019-03-27T10:08:22.000Z
assistant/app/config.py
BugLight/fleetcor-assistant
c3d97d88ef94e5469d5e34c0d6ec7d2523144cdb
[ "MIT" ]
null
null
null
assistant/app/config.py
BugLight/fleetcor-assistant
c3d97d88ef94e5469d5e34c0d6ec7d2523144cdb
[ "MIT" ]
1
2019-01-04T12:08:03.000Z
2019-01-04T12:08:03.000Z
import os from distutils.util import strtobool DEBUG = strtobool(os.environ.get('DEBUG', 'yes')) SECRET_KEY = os.environ.get('SECRET', 'defaultsecret') APPLICATION_ROOT = '/api/assistant' API_URL = 'http://localhost/api/accounts'
25.777778
54
0.75
import os from distutils.util import strtobool DEBUG = strtobool(os.environ.get('DEBUG', 'yes')) SECRET_KEY = os.environ.get('SECRET', 'defaultsecret') APPLICATION_ROOT = '/api/assistant' API_URL = 'http://localhost/api/accounts'
0
0
0
b113f64e4f1118eff553568098279f8785d3b50e
3,034
py
Python
metrics/tpr_norm_diff.py
predictive-analytics-lab/fairness-comparison
dacbe7b6557248e2c1c5cfcd46ddae76e0dd69b7
[ "Apache-2.0" ]
1
2020-02-26T23:20:37.000Z
2020-02-26T23:20:37.000Z
metrics/tpr_norm_diff.py
predictive-analytics-lab/fairness-comparison
dacbe7b6557248e2c1c5cfcd46ddae76e0dd69b7
[ "Apache-2.0" ]
1
2018-11-08T16:24:07.000Z
2018-11-08T16:24:07.000Z
metrics/tpr_norm_diff.py
predictive-analytics-lab/fairness-comparison
dacbe7b6557248e2c1c5cfcd46ddae76e0dd69b7
[ "Apache-2.0" ]
null
null
null
import math from metrics.Metric import Metric class TPRNormDiff(Metric): """ This metric calculates the normalized TPR difference. Multiple protected classes are treated as one large group, so that this compares the privileged class to all non-privileged classes as a group. """ class TNRNormDi...
37.45679
100
0.669084
import math from metrics.Metric import Metric class TPRNormDiff(Metric): """ This metric calculates the normalized TPR difference. Multiple protected classes are treated as one large group, so that this compares the privileged class to all non-privileged classes as a group. """ def __init__(...
895
0
106
1634343acce8e3db9260ce1debd4c6846851305a
16,381
py
Python
python/tvm/topi/x86/conv2d_alter_op.py
new-TonyWang/tvm
6b9f0abf935cbed82480326460eaaeb1a95bf9ca
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
null
null
null
python/tvm/topi/x86/conv2d_alter_op.py
new-TonyWang/tvm
6b9f0abf935cbed82480326460eaaeb1a95bf9ca
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
null
null
null
python/tvm/topi/x86/conv2d_alter_op.py
new-TonyWang/tvm
6b9f0abf935cbed82480326460eaaeb1a95bf9ca
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
39.567633
100
0.577376
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
9,089
0
22
aa40a5af94a5c85dd46a44f40a0f1372074a5eb9
8,922
py
Python
BWSEditor.py
MinN-11/berwick-saga-editor-randomizer
afa641b99d0f95c3258c7e40878d50b9f5f24f9c
[ "MIT" ]
3
2021-02-14T14:51:35.000Z
2021-04-03T21:31:00.000Z
BWSEditor.py
MinN-11/berwick-saga-editor-randomizer
afa641b99d0f95c3258c7e40878d50b9f5f24f9c
[ "MIT" ]
null
null
null
BWSEditor.py
MinN-11/berwick-saga-editor-randomizer
afa641b99d0f95c3258c7e40878d50b9f5f24f9c
[ "MIT" ]
null
null
null
import sys import os from BWSTableEditors import * # returns value and modify_mode if __name__ == '__main__': main()
44.834171
124
0.503138
import sys import os from BWSTableEditors import * # returns value and modify_mode def try_eval(s): try: if s == "max": return 101, 0 sgn = 1 if s.startswith("+") else -1 if s.startswith("-") else 2 if s.startswith("*") else 0 val = abs(int(s, 0)) return val, sgn ex...
8,679
0
114
0acb2abd3627f3403761f2b1aacbf4765ae67e00
1,623
py
Python
geotrek/altimetry/urls.py
jmdecastel/GEOTADMIN
15547c0a99ae4c541ca517cdbc2cf17ab5c96f87
[ "BSD-2-Clause" ]
null
null
null
geotrek/altimetry/urls.py
jmdecastel/GEOTADMIN
15547c0a99ae4c541ca517cdbc2cf17ab5c96f87
[ "BSD-2-Clause" ]
null
null
null
geotrek/altimetry/urls.py
jmdecastel/GEOTADMIN
15547c0a99ae4c541ca517cdbc2cf17ab5c96f87
[ "BSD-2-Clause" ]
null
null
null
from django.conf import settings from django.conf.urls import patterns, url from mapentity.registry import MapEntityOptions from geotrek.altimetry.views import (ElevationProfile, ElevationChart, ElevationArea, serve_elevation_chart) urlpatterns = patterns( '', url(r'^%s/p...
43.864865
116
0.642021
from django.conf import settings from django.conf.urls import patterns, url from mapentity.registry import MapEntityOptions from geotrek.altimetry.views import (ElevationProfile, ElevationChart, ElevationArea, serve_elevation_chart) urlpatterns = patterns( '', url(r'^%s/p...
0
1,175
23
dd1d5dab9dbb4e8ddbb10ae378ba9a29e4da0a03
17,948
py
Python
pyfec/utils.py
newsdev/nyt-pyfec
3504ddb2dbcb08b51a9fd9eb55bdf7974f79cd35
[ "Apache-2.0" ]
26
2015-09-01T00:38:57.000Z
2020-02-13T04:18:02.000Z
pyfec/utils.py
newsdev/nyt-pyfec
3504ddb2dbcb08b51a9fd9eb55bdf7974f79cd35
[ "Apache-2.0" ]
19
2015-08-31T20:21:58.000Z
2017-06-29T15:02:22.000Z
pyfec/utils.py
newsdev/nyt-pyfec
3504ddb2dbcb08b51a9fd9eb55bdf7974f79cd35
[ "Apache-2.0" ]
4
2016-03-17T16:45:40.000Z
2019-08-14T20:15:19.000Z
import datetime import exceptions import string from dateutil import parser SCHEDULE_FIELDS = {'A': ['back_reference_sched_name', 'back_reference_tran_id_number', 'conduit_city', 'conduit_name', 'conduit_state', 'conduit_street1', 'conduit_street2', 'conduit_zip', 'contribution_aggregate', 'contribution_amount', 'con...
48.771739
3,845
0.722086
import datetime import exceptions import string from dateutil import parser SCHEDULE_FIELDS = {'A': ['back_reference_sched_name', 'back_reference_tran_id_number', 'conduit_city', 'conduit_name', 'conduit_state', 'conduit_street1', 'conduit_street2', 'conduit_zip', 'contribution_aggregate', 'contribution_amount', 'con...
3,911
96
235
d768c057eb38ac111019977c81f1eff0551e1d03
348
py
Python
app.py
Baltasarq/Equations
edbc280dc3cf7bf5f58a4a7699914b55ae7ab30f
[ "MIT" ]
null
null
null
app.py
Baltasarq/Equations
edbc280dc3cf7bf5f58a4a7699914b55ae7ab30f
[ "MIT" ]
null
null
null
app.py
Baltasarq/Equations
edbc280dc3cf7bf5f58a4a7699914b55ae7ab30f
[ "MIT" ]
null
null
null
# Equation (c) Baltasar 2019 MIT License <baltasarq@gmail.com> from equations.Equation import Equation from equations.Component import create from solver.solve import solve from parser import parser if __name__ == "__main__": eqs = parser("x = 5 + 3\n2 = y + 3\nz = x + y") print("\n".join([str(eq) for eq in e...
29
62
0.692529
# Equation (c) Baltasar 2019 MIT License <baltasarq@gmail.com> from equations.Equation import Equation from equations.Component import create from solver.solve import solve from parser import parser if __name__ == "__main__": eqs = parser("x = 5 + 3\n2 = y + 3\nz = x + y") print("\n".join([str(eq) for eq in e...
0
0
0
3430ee88d3d75e2011879961cc8ae0ca3e966ae2
51
py
Python
app.py
akolpakov/aiortc-media-proxy
dfa6b7de6ceddcde53f78998b9d286b45dc54eb0
[ "MIT" ]
3
2020-04-18T13:38:22.000Z
2020-06-05T15:48:12.000Z
app.py
akolpakov/aiortc-media-proxy
dfa6b7de6ceddcde53f78998b9d286b45dc54eb0
[ "MIT" ]
null
null
null
app.py
akolpakov/aiortc-media-proxy
dfa6b7de6ceddcde53f78998b9d286b45dc54eb0
[ "MIT" ]
1
2019-12-19T03:58:36.000Z
2019-12-19T03:58:36.000Z
from aiortc_media_proxy.server import init init()
12.75
42
0.823529
from aiortc_media_proxy.server import init init()
0
0
0
4f7eadeff29e825eecd011fae2e486b757106c64
7,752
py
Python
experiments/SciTail_NLI/benchmark_paraphrases_generation.py
matejklemen/paraphrase-nli
d31ecba7e54eea4c3b098a2de7bc35f538e4e6dc
[ "MIT" ]
null
null
null
experiments/SciTail_NLI/benchmark_paraphrases_generation.py
matejklemen/paraphrase-nli
d31ecba7e54eea4c3b098a2de7bc35f538e4e6dc
[ "MIT" ]
null
null
null
experiments/SciTail_NLI/benchmark_paraphrases_generation.py
matejklemen/paraphrase-nli
d31ecba7e54eea4c3b098a2de7bc35f538e4e6dc
[ "MIT" ]
null
null
null
import json import logging import os import sys from argparse import ArgumentParser import re import numpy as np import pandas as pd import torch from transformers import GPT2Tokenizer from src.data.cleaning import mask_not_na, inds_unique, mask_long_enough from src.data.nli import TransformersSeqPairDataset from src...
43.307263
149
0.736197
import json import logging import os import sys from argparse import ArgumentParser import re import numpy as np import pandas as pd import torch from transformers import GPT2Tokenizer from src.data.cleaning import mask_not_na, inds_unique, mask_long_enough from src.data.nli import TransformersSeqPairDataset from src...
0
0
0
ff06a26e195f45d4e02f514792879b2884a560fc
2,798
py
Python
build.py
Prodesire/py-terraform
693d30a20226bffa74781c97b6a394c5f85a8509
[ "MIT" ]
6
2022-03-10T16:23:12.000Z
2022-03-31T14:51:49.000Z
build.py
Prodesire/py-libterraform
693d30a20226bffa74781c97b6a394c5f85a8509
[ "MIT" ]
null
null
null
build.py
Prodesire/py-libterraform
693d30a20226bffa74781c97b6a394c5f85a8509
[ "MIT" ]
null
null
null
import os import platform import shutil import subprocess lib_filename = 'libterraform.dll' if platform.system() == 'Windows' else 'libterraform.so' header_filename = 'libterraform.h' tf_filename = 'libterraform.go' root = os.path.dirname(os.path.abspath(__file__)) terraform_dirname = os.path.join(root, 'terraform') t...
38.328767
100
0.681201
import os import platform import shutil import subprocess lib_filename = 'libterraform.dll' if platform.system() == 'Windows' else 'libterraform.so' header_filename = 'libterraform.h' tf_filename = 'libterraform.go' root = os.path.dirname(os.path.abspath(__file__)) terraform_dirname = os.path.join(root, 'terraform') t...
0
16
23
1573004c99f4375476e86f102a2a42a240037366
1,523
py
Python
evaluate_baseline.py
Leon-Francis/AttackViaGan
9924f48a7540dd2765d9c0f7ab90ca5ce100370b
[ "Apache-2.0" ]
2
2021-01-23T13:20:17.000Z
2021-04-23T11:47:34.000Z
evaluate_baseline.py
Leon-Francis/AttackViaGan
9924f48a7540dd2765d9c0f7ab90ca5ce100370b
[ "Apache-2.0" ]
null
null
null
evaluate_baseline.py
Leon-Francis/AttackViaGan
9924f48a7540dd2765d9c0f7ab90ca5ce100370b
[ "Apache-2.0" ]
null
null
null
import torch from torch.utils.data import DataLoader from baseline_module.baseline_model_builder import BaselineModelBuilder from config import BaselineConfig from data import AGNEWS_Dataset from tools import logging if __name__ == "__main__": baseline_model_builder = BaselineModelBuilder('AGNEWS', ...
38.075
78
0.571898
import torch from torch.utils.data import DataLoader from baseline_module.baseline_model_builder import BaselineModelBuilder from config import BaselineConfig from data import AGNEWS_Dataset from tools import logging def eval_bert_baseline_Classification(model, test_data): with torch.no_grad(): model.eval...
517
0
23
377d1da4c41259fc9b3f391ea595e799c747d6ce
6,482
py
Python
crys3d/images.py
dperl-sol/cctbx_project
b9e390221a2bc4fd00b9122e97c3b79c632c6664
[ "BSD-3-Clause-LBNL" ]
155
2016-11-23T12:52:16.000Z
2022-03-31T15:35:44.000Z
crys3d/images.py
dperl-sol/cctbx_project
b9e390221a2bc4fd00b9122e97c3b79c632c6664
[ "BSD-3-Clause-LBNL" ]
590
2016-12-10T11:31:18.000Z
2022-03-30T23:10:09.000Z
crys3d/images.py
dperl-sol/cctbx_project
b9e390221a2bc4fd00b9122e97c3b79c632c6664
[ "BSD-3-Clause-LBNL" ]
115
2016-11-15T08:17:28.000Z
2022-02-09T15:30:14.000Z
from __future__ import absolute_import, division, print_function from gltbx.images import img_data inspector_img = img_data(width=32, height=32, mask=-1, encoded_data = """\ ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\ fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff...
76.258824
79
0.9693
from __future__ import absolute_import, division, print_function from gltbx.images import img_data inspector_img = img_data(width=32, height=32, mask=-1, encoded_data = """\ ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\ fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff...
0
0
0
2642d690f2672a2901ae9c2eb20410281abc4095
581
py
Python
day04/tests.py
andrewyang96/AdventOfCode2017
665d7869fb8677f41c07ca2177b4fe3ea3356fec
[ "MIT" ]
null
null
null
day04/tests.py
andrewyang96/AdventOfCode2017
665d7869fb8677f41c07ca2177b4fe3ea3356fec
[ "MIT" ]
null
null
null
day04/tests.py
andrewyang96/AdventOfCode2017
665d7869fb8677f41c07ca2177b4fe3ea3356fec
[ "MIT" ]
null
null
null
from solution import valid from solution import valid2 with open('input.txt', 'r') as f: passphrases = [p.split() for p in f] assert valid(['aa bb cc dd ee'.split()]) == 1 assert valid(['aa bb cc dd aa'.split()]) == 0 assert valid(['aa bb cc dd aaa'.split()]) == 1 print(valid(passphrases)) assert valid2(['abcde...
29.05
56
0.654045
from solution import valid from solution import valid2 with open('input.txt', 'r') as f: passphrases = [p.split() for p in f] assert valid(['aa bb cc dd ee'.split()]) == 1 assert valid(['aa bb cc dd aa'.split()]) == 0 assert valid(['aa bb cc dd aaa'.split()]) == 1 print(valid(passphrases)) assert valid2(['abcde...
0
0
0
36e97263472cf2adb806fde3bfccf423d921435c
745
py
Python
webscraping_basic/3_requests.py
tunealog/python-web-scraping
0d625fb610f5a0979a008c2e2c9ddd31d8ef9c17
[ "MIT" ]
null
null
null
webscraping_basic/3_requests.py
tunealog/python-web-scraping
0d625fb610f5a0979a008c2e2c9ddd31d8ef9c17
[ "MIT" ]
null
null
null
webscraping_basic/3_requests.py
tunealog/python-web-scraping
0d625fb610f5a0979a008c2e2c9ddd31d8ef9c17
[ "MIT" ]
null
null
null
# Python Web Scraping # Title : requests # Date : 2020-08-10 # Creator : tunealog import requests res = requests.get("https://google.com") res_err = requests.get("https://tunealog.tistory.com") # Response Code : 200 - No Problem print("Response Code : ", res.status_code) # Response Code : 403 - Problem print("Respo...
21.285714
59
0.699329
# Python Web Scraping # Title : requests # Date : 2020-08-10 # Creator : tunealog import requests res = requests.get("https://google.com") res_err = requests.get("https://tunealog.tistory.com") # Response Code : 200 - No Problem print("Response Code : ", res.status_code) # Response Code : 403 - Problem print("Respo...
0
0
0
9d6c5c728f45b4edd74f62890bac92d23e290a4d
10,625
py
Python
get_cdf/get_new.py
2218084076/hotpoor_autoclick_xhs
a52446ba691ac19e43410a465dc63f940c0e444d
[ "Apache-2.0" ]
1
2021-12-21T10:42:46.000Z
2021-12-21T10:42:46.000Z
get_cdf/get_new.py
2218084076/hotpoor_autoclick_xhs
a52446ba691ac19e43410a465dc63f940c0e444d
[ "Apache-2.0" ]
null
null
null
get_cdf/get_new.py
2218084076/hotpoor_autoclick_xhs
a52446ba691ac19e43410a465dc63f940c0e444d
[ "Apache-2.0" ]
null
null
null
import pyautogui import time import pyperclip # 打开审查元素位置 921.6 # 2022/01/15 urls = ["tomford-product.html?productId=400463&goodsId=524636&warehouseId=10","tomford-product.html?productId=413813&goodsId=537981&warehouseId=10","tomford-product.html?productId=438131&goodsId=562140&warehouseId=10","tomford-product.html?pro...
42.5
638
0.631718
import pyautogui import time import pyperclip # 打开审查元素位置 921.6 # 2022/01/15 urls = ["tomford-product.html?productId=400463&goodsId=524636&warehouseId=10","tomford-product.html?productId=413813&goodsId=537981&warehouseId=10","tomford-product.html?productId=438131&goodsId=562140&warehouseId=10","tomford-product.html?pro...
3,724
0
23
16903ef30258ce12cb9916656c7ebd3f6213b1f7
7,049
py
Python
vscvs/trainers/gan/bimodal.py
fcoclavero/vscvs
27fab0bc62fb68da044cf6f2516e3c1853f77533
[ "MIT" ]
1
2019-07-02T19:07:15.000Z
2019-07-02T19:07:15.000Z
vscvs/trainers/gan/bimodal.py
fcoclavero/vscvs
27fab0bc62fb68da044cf6f2516e3c1853f77533
[ "MIT" ]
2
2019-10-23T18:05:37.000Z
2020-09-25T14:16:25.000Z
vscvs/trainers/gan/bimodal.py
fcoclavero/vscvs
27fab0bc62fb68da044cf6f2516e3c1853f77533
[ "MIT" ]
null
null
null
__author__ = ["Francisco Clavero"] __email__ = ["fcoclavero32@gmail.com"] __status__ = "Prototype" """ Ignite trainer for a Bimodal GAN architecture. """ from abc import ABC from typing import Callable from overrides import overrides from torch.nn import BCEWithLogitsLoss from vscvs.decorators import kwargs_param...
34.553922
120
0.690311
__author__ = ["Francisco Clavero"] __email__ = ["fcoclavero32@gmail.com"] __status__ = "Prototype" """ Ignite trainer for a Bimodal GAN architecture. """ from abc import ABC from typing import Callable from overrides import overrides from torch.nn import BCEWithLogitsLoss from vscvs.decorators import kwargs_param...
0
0
0
ba149ce8aa60390d3862afc64bf0e16b50dbdc9b
802
py
Python
diin_text/_nbdev.py
pandya6988/diin_text
85c37fef41ef48c65ce03a94bb3cacb8af5dc1b1
[ "Apache-2.0" ]
null
null
null
diin_text/_nbdev.py
pandya6988/diin_text
85c37fef41ef48c65ce03a94bb3cacb8af5dc1b1
[ "Apache-2.0" ]
null
null
null
diin_text/_nbdev.py
pandya6988/diin_text
85c37fef41ef48c65ce03a94bb3cacb8af5dc1b1
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED BY NBDEV! DO NOT EDIT! __all__ = ["index", "modules", "custom_doc_links", "git_url"] index = {"generate_translator": "00_data.ipynb", "default_translator_path": "00_data.ipynb", "strip_html": "00_data.ipynb", "OriTraTranslation": "00_data.ipynb", "create_ori_trans_d...
33.416667
65
0.662095
# AUTOGENERATED BY NBDEV! DO NOT EDIT! __all__ = ["index", "modules", "custom_doc_links", "git_url"] index = {"generate_translator": "00_data.ipynb", "default_translator_path": "00_data.ipynb", "strip_html": "00_data.ipynb", "OriTraTranslation": "00_data.ipynb", "create_ori_trans_d...
18
0
23