hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
e7e9653d546ade6c8ce9b53c49b25b1b21568a5c
5,267
py
Python
VisualGimp/Markup.py
duangsuse/VisualGimp
79776fded12595ab3c56855b5ae56e2242780b2e
[ "MIT" ]
2
2019-05-07T12:09:11.000Z
2019-05-08T09:31:44.000Z
VisualGimp/Markup.py
duangsuse-valid-projects/VisualGimp
79776fded12595ab3c56855b5ae56e2242780b2e
[ "MIT" ]
null
null
null
VisualGimp/Markup.py
duangsuse-valid-projects/VisualGimp
79776fded12595ab3c56855b5ae56e2242780b2e
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # -*- encoding: utf-8 -*- # Gimp Markup Builder # author: duangsuse # date: Thu May 02 2019 CST
24.962085
106
0.584204
#!/usr/bin/env python2 # -*- encoding: utf-8 -*- # Gimp Markup Builder # author: duangsuse # date: Thu May 02 2019 CST from os import linesep from Util import stream_join class MarkupBuilder: ''' Gimp Markup SGML builder ''' def __init__(self, indent = -1, nl = linesep, buffer = str): self.marks = buffer() ...
0
0
0
5,069
0
0
0
8
69
8796a12ade2e6974f6dfc98adc77e755604d7da8
895
py
Python
sqlalchemy_redshift/__init__.py
Hivestack/sqlalchemy-redshift
6226ffe4c6f3583606016492641e1bd5d351933a
[ "MIT" ]
null
null
null
sqlalchemy_redshift/__init__.py
Hivestack/sqlalchemy-redshift
6226ffe4c6f3583606016492641e1bd5d351933a
[ "MIT" ]
null
null
null
sqlalchemy_redshift/__init__.py
Hivestack/sqlalchemy-redshift
6226ffe4c6f3583606016492641e1bd5d351933a
[ "MIT" ]
null
null
null
from pkg_resources import DistributionNotFound, get_distribution, parse_version try: except ImportError: raise ImportError( 'No module named psycopg2. Please install either ' 'psycopg2 or psycopg2-binary package for CPython ' 'or psycopg2cffi for Pypy.' ) for package in ['psycopg2', 'p...
31.964286
79
0.727374
from pkg_resources import DistributionNotFound, get_distribution, parse_version try: import psycopg2 # noqa: F401 except ImportError: raise ImportError( 'No module named psycopg2. Please install either ' 'psycopg2 or psycopg2-binary package for CPython ' 'or psycopg2cffi for Pypy.' ...
0
0
0
0
0
0
0
-6
40
fdbf1c941811766f3c215aa9700b09effe98e5e6
134
py
Python
ch2/chapter2_features_of_fastapi_02.py
PacktPublishing/Understanding-How-Web-APIs-Work
63220e7bf6b31315c46650e45c670ca9a01011fc
[ "MIT" ]
2
2021-10-03T09:34:34.000Z
2021-10-04T04:52:48.000Z
ch2/chapter2_features_of_fastapi_02.py
PacktPublishing/Understanding-How-Web-APIs-Work
63220e7bf6b31315c46650e45c670ca9a01011fc
[ "MIT" ]
1
2021-04-25T05:57:34.000Z
2021-04-25T14:49:24.000Z
ch2/chapter2_features_of_fastapi_02.py
PacktPublishing/Understanding-How-Web-APIs-Work
63220e7bf6b31315c46650e45c670ca9a01011fc
[ "MIT" ]
3
2021-05-13T09:39:27.000Z
2021-06-29T05:51:46.000Z
# -*- coding: utf-8 -*-
33.5
57
0.58209
# -*- coding: utf-8 -*- def message(age: int = 0, name: str = 'stranger') -> str: return f'Hello {name}, you are {age} years old'
0
0
0
0
0
88
0
0
22
515654029ae48e70e4487c739d107ea440403f1d
8,124
py
Python
Lib/site-packages/hackedit/app/templates.py
fochoao/cpython
3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9
[ "bzip2-1.0.6", "0BSD" ]
null
null
null
Lib/site-packages/hackedit/app/templates.py
fochoao/cpython
3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9
[ "bzip2-1.0.6", "0BSD" ]
20
2021-05-03T18:02:23.000Z
2022-03-12T12:01:04.000Z
Lib/site-packages/hackedit/app/templates.py
fochoao/cpython
3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9
[ "bzip2-1.0.6", "0BSD" ]
null
null
null
""" This module contains the top level API for managing the project/file templates. """ import json import os from hackedit.app import settings def create(template, dest_dir, answers): """ Creates a file/project from the specified template, at the specified directory. :param template: Template data. ...
31.126437
100
0.563269
""" This module contains the top level API for managing the project/file templates. """ import json import logging import os import re from binaryornot.check import is_binary from hackedit.app import settings def create(template, dest_dir, answers): """ Creates a file/project from the specified template, at...
0
0
0
0
3,037
1,348
0
-1
220
1a60970d1a4cf3ecc7aacdd16b38eca549a34840
1,845
py
Python
src/tubize/videotomp4.py
olivervinn/tubizescripts
8756f322d3e31f76f8b77cb8e084ded5941e29fa
[ "MIT" ]
null
null
null
src/tubize/videotomp4.py
olivervinn/tubizescripts
8756f322d3e31f76f8b77cb8e084ded5941e29fa
[ "MIT" ]
null
null
null
src/tubize/videotomp4.py
olivervinn/tubizescripts
8756f322d3e31f76f8b77cb8e084ded5941e29fa
[ "MIT" ]
null
null
null
""" Convert video format x to MP4/H.264. """ import logging logger = logging.getLogger(__name__)
32.368421
107
0.571816
""" Convert video format x to MP4/H.264. """ import os import sys import logging from .videometainfo import VideoMetaInfo from .utils import sizeof_fmt, time_fmt, find_files, check_dependencies, call, ffmpeg logger = logging.getLogger(__name__) class VideoToMP4: """To Mp4""" SUPPORTED_EXTENSIONS = ".wmv, ....
0
0
0
1,573
0
0
0
60
113
8052d0446907259540de210ff2c92410c7342f2e
117
py
Python
setup.py
snasiriany/parasol
88b99704676fb1253b8bc6402665a3174a00072d
[ "MIT" ]
66
2019-01-07T23:59:26.000Z
2021-12-29T16:51:56.000Z
setup.py
snasiriany/parasol
88b99704676fb1253b8bc6402665a3174a00072d
[ "MIT" ]
8
2019-01-09T01:35:54.000Z
2021-08-23T20:05:03.000Z
setup.py
snasiriany/parasol
88b99704676fb1253b8bc6402665a3174a00072d
[ "MIT" ]
21
2019-03-26T01:02:33.000Z
2022-01-26T20:34:34.000Z
from setuptools import setup setup( name='parasol', dependency_links=[ ], install_requires=[ ] )
13
28
0.623932
from setuptools import setup setup( name='parasol', dependency_links=[ ], install_requires=[ ] )
0
0
0
0
0
0
0
0
0
79299c770a188b579e6412af89f2263960e65f50
568
py
Python
app/migrations/0007_auto_20211102_1946.py
Rqwannn/Rudemy
fe2d84540f3cc64c0ff6821e5f2fac22675fd381
[ "MIT" ]
3
2021-12-27T06:16:26.000Z
2022-01-20T02:13:03.000Z
app/migrations/0007_auto_20211102_1946.py
Rqwannn/Rudemy
fe2d84540f3cc64c0ff6821e5f2fac22675fd381
[ "MIT" ]
null
null
null
app/migrations/0007_auto_20211102_1946.py
Rqwannn/Rudemy
fe2d84540f3cc64c0ff6821e5f2fac22675fd381
[ "MIT" ]
null
null
null
# Generated by Django 3.2.8 on 2021-11-02 12:46
21.846154
67
0.549296
# Generated by Django 3.2.8 on 2021-11-02 12:46 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app', '0006_auto_20211102_1928'), ] operations = [ migrations.RemoveField( model_name='profile', name='skill', ...
0
0
0
454
0
0
0
19
46
752ee840202809a32e9848a1a2c9a1828e74e71c
5,132
py
Python
oasislmf/model_execution/conf.py
ibailey-SCOR/OasisLMF
966b4de4e1e64851970f4291c5bdfe7edc20cb7a
[ "BSD-3-Clause" ]
null
null
null
oasislmf/model_execution/conf.py
ibailey-SCOR/OasisLMF
966b4de4e1e64851970f4291c5bdfe7edc20cb7a
[ "BSD-3-Clause" ]
null
null
null
oasislmf/model_execution/conf.py
ibailey-SCOR/OasisLMF
966b4de4e1e64851970f4291c5bdfe7edc20cb7a
[ "BSD-3-Clause" ]
null
null
null
import csv import io import json import warnings from collections import defaultdict from ..utils.exceptions import OasisException def _get_summaries(summary_file): """ Get a list representation of a summary file. """ summaries_dict = defaultdict(lambda: {'leccalc': {}}) with io.open(summary_fi...
36.657143
100
0.677319
import csv import io import json import logging import os import warnings from collections import defaultdict from ..utils.exceptions import OasisException from ..utils.log import oasis_log from .files import GENERAL_SETTINGS_FILE, GUL_SUMMARIES_FILE, IL_SUMMARIES_FILE, MODEL_SETTINGS_FILE def _get_summaries(summar...
0
2,033
0
0
0
0
0
72
111
cb8ea6149e57e707c1ee331f670e37c8feb61914
6,815
py
Python
codes/functions.py
Wenupi/protoplanetary_disks
51f8decbec5415e1da9893316f03d32ca5ab27de
[ "MIT" ]
null
null
null
codes/functions.py
Wenupi/protoplanetary_disks
51f8decbec5415e1da9893316f03d32ca5ab27de
[ "MIT" ]
null
null
null
codes/functions.py
Wenupi/protoplanetary_disks
51f8decbec5415e1da9893316f03d32ca5ab27de
[ "MIT" ]
null
null
null
#!/usr/bin/env python #-------------------------------------------------------------------------------- #Changes the sky coordinates (x,y,z) to the disk coordinates (x_d,y_d,z_d) #The x axis is the rotation axis #-------------------------------------------------------------------------------- #Radiative transfer equa...
43.685897
134
0.501981
#!/usr/bin/env python #-------------------------------------------------------------------------------- #Changes the sky coordinates (x,y,z) to the disk coordinates (x_d,y_d,z_d) #The x axis is the rotation axis def FUN_rotation(x,y,z): x_d = x y_d = y*np.cos(inc) - z*np.sin(inc) z_d = y*np.sin(inc) + ...
0
0
0
0
0
4,676
0
0
176
d281bf9d519356903906b4ce02f43f84e40f8147
2,893
py
Python
F0AM_Tools/TUV_to_mat.py
jdhask/pyMCM
32b65e1dff2e9626df5d52623fd1ac4af29f8c57
[ "MIT" ]
1
2021-11-15T19:24:40.000Z
2021-11-15T19:24:40.000Z
F0AM_Tools/TUV_to_mat.py
jdhask/pyMCM
32b65e1dff2e9626df5d52623fd1ac4af29f8c57
[ "MIT" ]
null
null
null
F0AM_Tools/TUV_to_mat.py
jdhask/pyMCM
32b65e1dff2e9626df5d52623fd1ac4af29f8c57
[ "MIT" ]
2
2021-11-15T19:23:46.000Z
2021-11-29T12:42:26.000Z
# -*- coding: utf-8 -*- """ Created on Wed Jun 16 18:06:05 2021 @author: jhask """ import csv import pandas as pd import numpy as np import re import scipy.io as sio import os # Map MCM names to TUV labels j_vals_dict= dict({ 'O3 -> O2 + O(1D)':'J1', 'O3 -> O2 + O(3P)':'J2', 'H2O2 -> 2 OH':'J3',...
30.452632
105
0.5458
# -*- coding: utf-8 -*- """ Created on Wed Jun 16 18:06:05 2021 @author: jhask """ import csv import pandas as pd import numpy as np import re import scipy.io as sio import os # Map MCM names to TUV labels j_vals_dict= dict({ 'O3 -> O2 + O(1D)':'J1', 'O3 -> O2 + O(3P)':'J2', 'H2O2 -> 2 OH':'J3',...
0
0
0
0
0
0
0
0
0
1d7b25e9a1db4f378a05b7199423917d7b5b9f81
1,343
py
Python
extract_url.py
nickinack/extract_url
d084ca0a791d5c50ab2accaee7cb4d0b981bd132
[ "MIT" ]
2
2022-02-07T05:51:36.000Z
2022-02-07T05:52:11.000Z
extract_url.py
nickinack/extract_url
d084ca0a791d5c50ab2accaee7cb4d0b981bd132
[ "MIT" ]
null
null
null
extract_url.py
nickinack/extract_url
d084ca0a791d5c50ab2accaee7cb4d0b981bd132
[ "MIT" ]
1
2020-05-18T08:29:22.000Z
2020-05-18T08:29:22.000Z
''' Imports ''' import sys as sys import csv from collections import defaultdict import re ''' URL Extract ''' columns = defaultdict(list) with open('SecurityIDRBT.csv') as f: reader = csv.DictReader(f) # read rows into a dictionary format for row in reader: # read a row as {column1: value1, column...
29.844444
95
0.603127
''' Imports ''' from config import * from newspaper import Article import sys as sys import pandas as pd import csv from collections import defaultdict import re ''' URL Extract ''' columns = defaultdict(list) with open('SecurityIDRBT.csv') as f: reader = csv.DictReader(f) # read rows into a diction...
0
0
0
0
0
0
0
5
70
56b682792eb61ccb189ac68b9d7a874cbd6c0a60
3,279
py
Python
test/python/test_mapper_coupling.py
kifumi/qiskit-terra
203fca6d694a18824a6b12cbabd3dd2c64dd12ae
[ "Apache-2.0" ]
1
2018-11-01T01:35:43.000Z
2018-11-01T01:35:43.000Z
test/python/test_mapper_coupling.py
a-amaral/qiskit-terra
e73beba1e68de2617046a7e1e9eeac375b61de81
[ "Apache-2.0" ]
null
null
null
test/python/test_mapper_coupling.py
a-amaral/qiskit-terra
e73beba1e68de2617046a7e1e9eeac375b61de81
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2018, IBM. # # This source code is licensed under the Apache License, Version 2.0 found in # the LICENSE.txt file in the root directory of this source tree. # pylint: disable=missing-docstring
36.433333
88
0.633425
# -*- coding: utf-8 -*- # Copyright 2018, IBM. # # This source code is licensed under the Apache License, Version 2.0 found in # the LICENSE.txt file in the root directory of this source tree. # pylint: disable=missing-docstring from qiskit.mapper import _coupling from .common import QiskitTestCase class Coupling...
0
0
0
2,951
0
0
0
27
68
d991aedad470b351e70cf5b10b085c74cc95e474
462
py
Python
env/Lib/site-packages/values/__init__.py
KaceyHirth/Library-DBMS-System
40b425ed5c7b46627b7c48724b2d20e7a64cf025
[ "MIT" ]
4
2022-02-06T00:54:58.000Z
2022-02-25T12:44:43.000Z
env/Lib/site-packages/values/__init__.py
KaceyHirth/Library-DBMS-System
40b425ed5c7b46627b7c48724b2d20e7a64cf025
[ "MIT" ]
3
2021-03-23T04:58:47.000Z
2021-04-02T02:40:54.000Z
env/Lib/site-packages/values/__init__.py
KaceyHirth/Library-DBMS-System
40b425ed5c7b46627b7c48724b2d20e7a64cf025
[ "MIT" ]
1
2022-02-08T13:43:20.000Z
2022-02-08T13:43:20.000Z
__all__ = ['get'] def get(input): """return a list with input values or [] if input is None""" if input is None: return [] if not _iterable(input) or _string(input): return [input] return list(input)
18.48
64
0.645022
__all__ = ['get'] import collections def _iterable(obj): return isinstance(obj, collections.Iterable) def _string(value): try: return isinstance(value, basestring) except NameError: return isinstance(value, str) def get(input): """return a list with input values or [] if input is...
0
0
0
0
0
159
0
-3
69
d0e19b396bd5c3861e79601ace321dbbd96d9384
165
py
Python
vnpy/app/strategy_reviewer/ui/__init__.py
xyh888/vnpy
7b51716928ab9574f171a2eda190b37b4f393bb1
[ "MIT" ]
5
2019-05-24T05:19:55.000Z
2020-07-29T13:21:49.000Z
vnpy/app/strategy_reviewer/ui/__init__.py
xyh888/vnpy
7b51716928ab9574f171a2eda190b37b4f393bb1
[ "MIT" ]
null
null
null
vnpy/app/strategy_reviewer/ui/__init__.py
xyh888/vnpy
7b51716928ab9574f171a2eda190b37b4f393bb1
[ "MIT" ]
2
2019-07-01T02:14:04.000Z
2020-07-29T13:21:53.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019/8/20 0020 16:49 # @Author : Hadrianl # @File : __init__.py
23.571429
36
0.630303
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019/8/20 0020 16:49 # @Author : Hadrianl # @File : __init__.py from .widget import StrategyReviewer
0
0
0
0
0
0
0
15
23
4a04e22adafbd1373a9d9fc82325fd3d15005b8b
647
py
Python
Lesson 13.gf/xml_Leader2.py
gfoo003/programming-together
225e0a2255dd8da1f1ef32d2a88deea27c050f10
[ "MIT" ]
null
null
null
Lesson 13.gf/xml_Leader2.py
gfoo003/programming-together
225e0a2255dd8da1f1ef32d2a88deea27c050f10
[ "MIT" ]
null
null
null
Lesson 13.gf/xml_Leader2.py
gfoo003/programming-together
225e0a2255dd8da1f1ef32d2a88deea27c050f10
[ "MIT" ]
null
null
null
import xml.etree.ElementTree as ET xml_string = ''' <stuff> <users> <user x = "2"> <id>001</id> <name>Chuck</name> </user> <user x = "7"> <id>007</id> <name>Brent</name> </user> </users> </stuff> ''' root_stuff = ET.fromstring(xml...
23.107143
48
0.565688
import xml.etree.ElementTree as ET xml_string = ''' <stuff> <users> <user x = "2"> <id>001</id> <name>Chuck</name> </user> <user x = "7"> <id>007</id> <name>Brent</name> </user> </users> </stuff> ''' root_stuff = ET.fromstring(xml...
0
0
0
0
0
0
0
0
0
bebc974c59298f013c68b5d5e434ba4b2d82a0a8
213
py
Python
第4章/program/Chapter_4_dummy.py
kingname/SourceCodeOfBook
ab7275108994dca564905818b678bbd2f771c18e
[ "MIT" ]
274
2018-10-01T11:07:25.000Z
2022-03-17T13:48:45.000Z
第4章/program/Chapter_4_dummy.py
kingname/SourceCodeOfBook
ab7275108994dca564905818b678bbd2f771c18e
[ "MIT" ]
6
2019-02-28T14:18:21.000Z
2022-03-02T14:57:39.000Z
第4章/program/Chapter_4_dummy.py
kingname/SourceCodeOfBook
ab7275108994dca564905818b678bbd2f771c18e
[ "MIT" ]
110
2018-10-16T06:08:37.000Z
2022-03-16T08:19:29.000Z
from multiprocessing.dummy import Pool pool = Pool(3) origin_num = [x for x in range(10)] result = pool.map(calc_power2, origin_num) print(f'1-10{result}')
16.384615
42
0.71831
from multiprocessing.dummy import Pool def calc_power2(num): return num * num pool = Pool(3) origin_num = [x for x in range(10)] result = pool.map(calc_power2, origin_num) print(f'计算1-10的平方分别为:{result}')
27
0
0
0
0
21
0
0
23
cee8341ee37a27bddc6bb669594ab3c522880752
11,688
py
Python
pystiche_papers/li_wand_2016/_loss.py
pystiche/papers
0d8179dc51f6eda0b27fa525dc0b86b866bc88e1
[ "BSD-3-Clause" ]
1
2021-09-30T09:30:07.000Z
2021-09-30T09:30:07.000Z
pystiche_papers/li_wand_2016/_loss.py
pystiche/papers
0d8179dc51f6eda0b27fa525dc0b86b866bc88e1
[ "BSD-3-Clause" ]
20
2021-10-10T13:37:25.000Z
2022-03-31T07:31:45.000Z
pystiche_papers/li_wand_2016/_loss.py
pystiche/papers
0d8179dc51f6eda0b27fa525dc0b86b866bc88e1
[ "BSD-3-Clause" ]
null
null
null
from typing import Optional from pystiche import enc, loss from pystiche_papers.utils import HyperParameters from ._utils import (hyper_parameters as _hyper_parameters, multi_layer_encoder as _multi_layer_encoder) __all__ = [ "FeatureReconstructionLoss", "content_loss", "MRFLoss", "style_loss", "T...
37.461538
110
0.693703
from typing import Any, Optional, Tuple, Union import torch from torch.nn.functional import mse_loss import pystiche import pystiche.loss.functional as F from pystiche import enc, loss from pystiche_papers.utils import HyperParameters from ._utils import ( extract_normalized_patches2d, hyper_parameters as _h...
0
0
0
5,385
0
488
0
128
186
1b3186c99a60818dc9d24b438538877520aa1347
2,640
py
Python
tests/conftest.py
Z2PackDev/bands_inspect
76fdb0130d9ff64c738365a1911bc61f035927f2
[ "Apache-2.0" ]
1
2017-12-19T07:21:56.000Z
2017-12-19T07:21:56.000Z
tests/conftest.py
Z2PackDev/bands-inspect
76fdb0130d9ff64c738365a1911bc61f035927f2
[ "Apache-2.0" ]
3
2018-02-27T09:07:46.000Z
2018-03-06T12:26:04.000Z
tests/conftest.py
Z2PackDev/bands_inspect
76fdb0130d9ff64c738365a1911bc61f035927f2
[ "Apache-2.0" ]
1
2017-12-19T07:21:55.000Z
2017-12-19T07:21:55.000Z
# -*- coding: utf-8 -*- # (c) 2017-2019, ETH Zurich, Institut fuer Theoretische Physik # Author: Dominik Gresch <[email protected]> """ Configuration file for the pytest tests. """ #--------------------------FIXTURES-------------------------------------#
30.697674
168
0.659848
# -*- coding: utf-8 -*- # (c) 2017-2019, ETH Zurich, Institut fuer Theoretische Physik # Author: Dominik Gresch <[email protected]> """ Configuration file for the pytest tests. """ import os import json import pytest import numpy as np import bands_inspect as bi import parameters # pylint: disable=wrong-import-order...
0
2,124
0
0
0
0
0
-32
289
a365ad738e2f0d42460bbe15195bfcc181ad7c09
3,518
py
Python
src/tensorrt/tools/caffe_engine/call_engine_to_infer_all.py
aimuch/AIEnvConfig
4ccd54e9c601e8c91efebcec1a50115d75d0cf96
[ "MIT" ]
250
2019-06-14T16:12:20.000Z
2022-03-27T09:56:26.000Z
src/tensorrt/tools/caffe_engine/call_engine_to_infer_all.py
aimuch/AIEnvConfig
4ccd54e9c601e8c91efebcec1a50115d75d0cf96
[ "MIT" ]
6
2018-08-10T07:15:39.000Z
2018-10-23T01:51:17.000Z
src/tensorrt/tools/caffe_engine/call_engine_to_infer_all.py
aimuch/AIEnvConfig
4ccd54e9c601e8c91efebcec1a50115d75d0cf96
[ "MIT" ]
41
2019-08-16T13:42:13.000Z
2022-02-23T03:38:09.000Z
# import tensorflow as tf import tensorrt as trt import pycuda.driver as cuda # import uff import numpy as np TEST_PATH = "/media/andy/Data/DevWorkSpace/Projects/imageClassifier/data/test/" LABEL = 0 ENGINE_PATH = "/home/andy/caffe/examples/mydata/slot_classifier/engine/px2_classifier.engine" NET_INPUT_SHAPE = (256,...
30.327586
105
0.677658
import os # import tensorflow as tf import tensorrt as trt from tensorrt.parsers import uffparser import pycuda.driver as cuda # import uff import cv2 import numpy as np from tqdm import tqdm TEST_PATH = "/media/andy/Data/DevWorkSpace/Projects/imageClassifier/data/test/" LABEL = 0 ENGINE_PATH = "/home/andy/caffe/exa...
0
0
0
0
0
1,347
0
-6
133
3db8ec872b628c2d5573b83d71f828295df1aa7e
2,054
py
Python
machineLearning.py
z-Wind/EQOptimum
c046daec2c6218277a3fec9fa0c87bea0b30ff2f
[ "MIT" ]
null
null
null
machineLearning.py
z-Wind/EQOptimum
c046daec2c6218277a3fec9fa0c87bea0b30ff2f
[ "MIT" ]
null
null
null
machineLearning.py
z-Wind/EQOptimum
c046daec2c6218277a3fec9fa0c87bea0b30ff2f
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt from sklearn.neural_network import MLPRegressor if __name__ == "__main__": # Create a random dataset # [fc, bandwidth, gain] n = 100 filtersNum = 1 X, Y = genXY(n=n, filtersNum=filtersNum) # Fit regression model regr = MLPRegressor(h...
27.026316
82
0.556962
import filters import numpy as np import matplotlib.pyplot as plt from scipy.signal import freqz from sklearn.neural_network import MLPRegressor def filterModel(x): # [fc, bandwidth, gain] w_final = None db_final = 0 fs = 44100 for fc, BW, gain in x: b, a = filters.bandpass_...
0
0
0
0
0
921
0
-1
123
6f7dc504b463999eb2e9b24300c31ee083334da5
980
py
Python
src/utils/dist.py
shaoeric/torch-atom
7688fc38c0d19fe4d13a9773115df911ffe6eaaa
[ "MIT" ]
28
2022-03-06T06:04:54.000Z
2022-03-27T04:14:33.000Z
src/utils/dist.py
shaoeric/torch-atom
7688fc38c0d19fe4d13a9773115df911ffe6eaaa
[ "MIT" ]
null
null
null
src/utils/dist.py
shaoeric/torch-atom
7688fc38c0d19fe4d13a9773115df911ffe6eaaa
[ "MIT" ]
3
2022-03-11T07:01:58.000Z
2022-03-17T05:34:41.000Z
import torch.distributed as dist def synchronize(): """ Helper function to synchronize (barrier) among all processes when using distributed training """ if not dist.is_available(): return if not dist.is_initialized(): return world_size = dist.get_world_size() if wo...
22.790698
72
0.626531
import torch.distributed as dist import torch def get_world_size(): if not dist.is_available(): return 1 if not dist.is_initialized(): return 1 return dist.get_world_size() def get_rank(): if not dist.is_available(): return 0 if not dist.is_initialized(): return 0 ...
0
0
0
0
0
507
0
-9
114
7d4f4e96803718430d878ca088bcaed92b3079cc
3,822
py
Python
base_pool/mysql_pool/mysql_views.py
zhanzhangwei/kafka-study
6be4167319b855c9560e92932aae628f87a5e680
[ "Apache-2.0" ]
null
null
null
base_pool/mysql_pool/mysql_views.py
zhanzhangwei/kafka-study
6be4167319b855c9560e92932aae628f87a5e680
[ "Apache-2.0" ]
null
null
null
base_pool/mysql_pool/mysql_views.py
zhanzhangwei/kafka-study
6be4167319b855c9560e92932aae628f87a5e680
[ "Apache-2.0" ]
null
null
null
import pymysql mysql_client = MysqlClient()
30.576
113
0.545526
import json import pymysql import datetime from dbutils.pooled_db import PooledDB import pymysql from conf.common import * class MysqlClient(object): __pool = None def __init__(self): """ :param mincached:连接池中空闲连接的初始数量 :param maxcached:连接池中空闲连接的最大数量 :param maxshared:共享连接的最大数...
492
280
0
3,199
0
0
0
-2
134
fbbdf9d38ba25ab279b3c1a4de1e0e092ad03325
8,998
py
Python
scripts/jupyter_vdi.py
ScottWales/cosima-cookbook
0ed83e2165efe5badfca59e2dccf835ab7acecca
[ "Apache-2.0" ]
null
null
null
scripts/jupyter_vdi.py
ScottWales/cosima-cookbook
0ed83e2165efe5badfca59e2dccf835ab7acecca
[ "Apache-2.0" ]
null
null
null
scripts/jupyter_vdi.py
ScottWales/cosima-cookbook
0ed83e2165efe5badfca59e2dccf835ab7acecca
[ "Apache-2.0" ]
1
2020-01-30T05:36:08.000Z
2020-01-30T05:36:08.000Z
#!/usr/bin/env python """ Script to launch a VDI session (or connect to already running session) and start a Jupyter server on the VDI A ssh tunnel from the local machine to the VDI is set up and the local webbrowser is spawned. This is a python3 script (uses unicode strings). If you don't have python3 on your local...
33.574627
146
0.629362
#!/usr/bin/env python """ Script to launch a VDI session (or connect to already running session) and start a Jupyter server on the VDI A ssh tunnel from the local machine to the VDI is set up and the local webbrowser is spawned. This is a python3 script (uses unicode strings). If you don't have python3 on your local...
0
0
0
0
0
4,784
0
-48
279
1fa6873ff966dcc647833979508b75f9d44bd7bd
2,703
py
Python
utils/data.py
YOUSIKI/PyTorch-FBS
5e94c3183f064ef5ed7f4b7d82b076056200b368
[ "Apache-2.0" ]
10
2020-09-14T02:40:37.000Z
2022-01-13T11:13:36.000Z
utils/data.py
YOUSIKI/PyTorch-FBS
5e94c3183f064ef5ed7f4b7d82b076056200b368
[ "Apache-2.0" ]
2
2020-11-28T05:48:45.000Z
2022-03-11T13:44:50.000Z
utils/data.py
YOUSIKI/PyTorch-FBS
5e94c3183f064ef5ed7f4b7d82b076056200b368
[ "Apache-2.0" ]
2
2020-11-28T02:27:08.000Z
2021-11-24T03:10:10.000Z
# -*- coding=utf-8 -*- __all__ = [ 'tiny_imagenet', 'imagewoof2', 'imagenette2' ] _default_batch_size = 32 _default_num_workers = 4
34.653846
69
0.532741
# -*- coding=utf-8 -*- __all__ = [ 'tiny_imagenet', 'imagewoof2', 'imagenette2' ] import os import torch import torchvision _default_batch_size = 32 _default_num_workers = 4 def _transform(train=True): mean = [0.485, 0.456, 0.406] std = [0.229, 0.224, 0.225] if train: return torchvi...
0
0
0
0
0
2,418
0
-24
159
838d22d0dea3f0cea788de6ba72e416ad4ef2add
1,917
py
Python
tests/e2e/runner.py
wilzbach/storyscript-sls
d71d74a53852ebae54bdaab341678b04f2775411
[ "Apache-2.0" ]
null
null
null
tests/e2e/runner.py
wilzbach/storyscript-sls
d71d74a53852ebae54bdaab341678b04f2775411
[ "Apache-2.0" ]
null
null
null
tests/e2e/runner.py
wilzbach/storyscript-sls
d71d74a53852ebae54bdaab341678b04f2775411
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env pytest from tests.e2e.utils.fixtures import find_test_files test_files = find_test_files(relative=True) # compile a story and compare its completion with the expected tree # load a story from the file system and load its expected result file (.json)
28.191176
77
0.720396
#!/usr/bin/env pytest import io import json from os import path from pytest import fixture, mark from sls import App import storyscript.hub.Hub as StoryHub from storyhub.sdk.AutoUpdateThread import AutoUpdateThread from tests.e2e.utils.features import parse_options from tests.e2e.utils.fixtures import find_test_fi...
0
335
0
0
0
955
0
83
270
a028f9eab21f99b975a3ac640714e3b636189bcc
342
py
Python
Misc/Become_a_Python_Developer/2_Programming Fundamentals in the Real World/Ex_Files_Programming_Realworld/Exercise Files/Ch05/05_03/start_05_03_coordinates.py
specter01wj/LAB-Lynda
1915ada66f4498cdf15a0e2a068c938e325e9ba3
[ "MIT" ]
null
null
null
Misc/Become_a_Python_Developer/2_Programming Fundamentals in the Real World/Ex_Files_Programming_Realworld/Exercise Files/Ch05/05_03/start_05_03_coordinates.py
specter01wj/LAB-Lynda
1915ada66f4498cdf15a0e2a068c938e325e9ba3
[ "MIT" ]
8
2020-07-08T06:20:03.000Z
2022-03-02T10:05:06.000Z
Misc/Become_a_Python_Developer/2_Programming Fundamentals in the Real World/Ex_Files_Programming_Realworld/Exercise Files/Ch05/05_03/start_05_03_coordinates.py
specter01wj/LAB-Lynda
1915ada66f4498cdf15a0e2a068c938e325e9ba3
[ "MIT" ]
null
null
null
""" Where's My Mouse? """ import tkinter root = tkinter.Tk() root.bind('<Button>', mouse_click) root.mainloop()
22.8
39
0.599415
""" Where's My Mouse? """ import tkinter def mouse_click(event): # retrieve XY coords as a tuple coords = root.winfo_pointerxy() print('coords: {}'.format(coords)) print('X: {}'.format(coords[0])) print('Y: {}'.format(coords[1])) root = tkinter.Tk() root.bind('<Button>', mouse_cli...
0
0
0
0
0
194
0
0
25
b485f685ca90029c0dd0acd04f32bc0b55820f14
2,906
py
Python
examples/fsm/bot/middleware.py
ExpressApp/pybotx
97c8b1ce5d45a05567ed01d545cb43174a2dcbb9
[ "MIT" ]
13
2021-01-21T12:43:10.000Z
2022-03-23T11:11:59.000Z
examples/fsm/bot/middleware.py
ExpressApp/pybotx
97c8b1ce5d45a05567ed01d545cb43174a2dcbb9
[ "MIT" ]
259
2020-02-26T08:51:03.000Z
2022-03-23T11:08:36.000Z
examples/fsm/bot/middleware.py
ExpressApp/pybotx
97c8b1ce5d45a05567ed01d545cb43174a2dcbb9
[ "MIT" ]
5
2019-12-02T16:19:22.000Z
2021-11-22T20:33:34.000Z
from typing import Final _default_transition: Final = object()
32.651685
87
0.639023
from dataclasses import dataclass from enum import Enum from typing import Callable, Dict, Final, Optional, Type, Union from botx import Bot, Collector, Message from botx.concurrency import callable_to_coroutine from botx.middlewares.base import BaseMiddleware from botx.typing import Executor _default_transition: Fin...
0
143
858
1,314
0
137
0
137
248
42f3981074dbd8b6458eb716c4608442ffca1db6
6,411
py
Python
webenmr/lib/convrdc.py
andreagia/WEBNMR
512a8cc04cf69300796585feae722614501389a9
[ "Apache-2.0" ]
null
null
null
webenmr/lib/convrdc.py
andreagia/WEBNMR
512a8cc04cf69300796585feae722614501389a9
[ "Apache-2.0" ]
null
null
null
webenmr/lib/convrdc.py
andreagia/WEBNMR
512a8cc04cf69300796585feae722614501389a9
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python ''' This program attempts to convert XPLOR Pseudocontact shift restraints in AMBER format XPLOR: assign ( resid 200 and name OO ) ( resid 200 and name Z ) ( resid 200 and name X ) (resid 200 and name Y ) ( resid 13 and name C ) 0.2400 0.2000 assign ( resid 200 and name OO ) ( resid 200 ...
31.426471
154
0.511777
#!/usr/bin/env python ''' This program attempts to convert XPLOR Pseudocontact shift restraints in AMBER format XPLOR: assign ( resid 200 and name OO ) ( resid 200 and name Z ) ( resid 200 and name X ) (resid 200 and name Y ) ( resid 13 and name C ) 0.2400 0.2000 assign ( resid 200 and name OO ) ( resid 200 ...
0
0
0
0
0
3,870
0
10
200
1441c3ed71c2dc67d784d782e0dab2d91d827d06
2,134
py
Python
lptrack/versions.py
gieseladev/lptrack
fb4c64021c23522f96733db41ceb69f0ccb9b713
[ "MIT" ]
null
null
null
lptrack/versions.py
gieseladev/lptrack
fb4c64021c23522f96733db41ceb69f0ccb9b713
[ "MIT" ]
null
null
null
lptrack/versions.py
gieseladev/lptrack
fb4c64021c23522f96733db41ceb69f0ccb9b713
[ "MIT" ]
null
null
null
"""Versioned body readers and writers for track message bodies. Attributes: LATEST_VERSION (int): Latest version supported by the library. """ from typing import Callable from . import TrackInfo, codec LATEST_VERSION = 2 ReaderType = Callable[[codec.Reader], TrackInfo] WriterType = Callable[[codec.Write...
25.404762
83
0.698219
"""Versioned body readers and writers for track message bodies. Attributes: LATEST_VERSION (int): Latest version supported by the library. """ from typing import Callable, Tuple from . import TrackInfo, codec LATEST_VERSION = 2 def _read_body_v1_2(stream: codec.Reader, version: int) -> TrackInfo: return T...
0
0
0
0
0
1,120
0
7
161
45b20d04060d1b766f35010e3ce9fedfd6a34eba
96
py
Python
venv/lib/python3.8/site-packages/poetry/core/toml/__init__.py
Retraces/UkraineBot
3d5d7f8aaa58fa0cb8b98733b8808e5dfbdb8b71
[ "MIT" ]
2
2022-03-13T01:58:52.000Z
2022-03-31T06:07:54.000Z
venv/lib/python3.8/site-packages/poetry/core/toml/__init__.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
19
2021-11-20T04:09:18.000Z
2022-03-23T15:05:55.000Z
venv/lib/python3.8/site-packages/poetry/core/toml/__init__.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
null
null
null
/home/runner/.cache/pip/pool/f3/de/85/7dca1e096a43e00e6ff1ca900dda1ca91c8c5c3a1d6798e466a9173a00
96
96
0.895833
/home/runner/.cache/pip/pool/f3/de/85/7dca1e096a43e00e6ff1ca900dda1ca91c8c5c3a1d6798e466a9173a00
0
0
0
0
0
0
0
0
0
4053282fdcb4c61c6094cfb3f6a832822c2a096c
2,371
py
Python
venv/lib/python2.7/site-packages/cement/ext/ext_alarm.py
zwachtel11/fruitful-backend
45b8994917182e7b684b9e25944cc79c9494c9f3
[ "MIT" ]
95
2018-06-05T10:49:32.000Z
2019-12-31T11:07:36.000Z
v_env/lib/python3.7/site-packages/cement/ext/ext_alarm.py
buds-lab/expanded-psychrometric-chart
e7267f57584d8ba645507189ea4a8e474c67e0de
[ "MIT" ]
51
2019-10-08T01:53:02.000Z
2021-06-04T22:02:21.000Z
v_env/lib/python3.7/site-packages/cement/ext/ext_alarm.py
buds-lab/expanded-psychrometric-chart
e7267f57584d8ba645507189ea4a8e474c67e0de
[ "MIT" ]
29
2018-09-17T06:10:32.000Z
2022-03-19T13:15:30.000Z
""" The Alarm Extension provides easy access to setting an application alarm to handle timing out operations. See the `Python Signal Library <https://docs.python.org/3.5/library/signal.html>`_. Requirements ------------ * No external dependencies. * Only available on Unix/Linux Configuration ------------- This ...
22.158879
75
0.619148
""" The Alarm Extension provides easy access to setting an application alarm to handle timing out operations. See the `Python Signal Library <https://docs.python.org/3.5/library/signal.html>`_. Requirements ------------ * No external dependencies. * Only available on Unix/Linux Configuration ------------- This ...
0
0
0
853
0
204
0
-8
92
77ab3b36a849175fa4c24f12a76941077ea58584
570
py
Python
scripts/docker/migrate.py
guligon90/uac-registry
cb5afe941919c2d9ceffa8d8bf220613b7a20613
[ "MIT" ]
null
null
null
scripts/docker/migrate.py
guligon90/uac-registry
cb5afe941919c2d9ceffa8d8bf220613b7a20613
[ "MIT" ]
null
null
null
scripts/docker/migrate.py
guligon90/uac-registry
cb5afe941919c2d9ceffa8d8bf220613b7a20613
[ "MIT" ]
null
null
null
# Base imports # Project imports
31.666667
82
0.670175
# Base imports import subprocess from typing import Iterable, Optional # Project imports from docker import common from docker.run import run def migrate(arguments: Iterable[str], deps: Optional[bool] = True) -> int: print(">>>>>>>>>> Running database migration <<<<<<<<<<") run(['backend', 'python3', common....
0
0
0
0
0
379
0
21
134
f979d82751598eba221d7677df764b4451b8c896
971
py
Python
adw_test/make_small_dataset.py
clinfo/DeepKF
ee4f1be28e5f3bfa46bb47dbdc4d5f678eed36c1
[ "MIT" ]
5
2019-12-19T13:33:36.000Z
2021-06-01T06:08:16.000Z
adw_test/make_small_dataset.py
clinfo/DeepKF
ee4f1be28e5f3bfa46bb47dbdc4d5f678eed36c1
[ "MIT" ]
24
2020-03-03T19:40:55.000Z
2021-05-26T15:27:38.000Z
adw_test/make_small_dataset.py
clinfo/DeepKF
ee4f1be28e5f3bfa46bb47dbdc4d5f678eed36c1
[ "MIT" ]
1
2019-12-19T13:35:07.000Z
2019-12-19T13:35:07.000Z
import json import glob import numpy as np import os path = "data_state_space_v3/" out_path = "small_data/" files = glob.glob(path + "*.npy") # train_data_num = 100 test_data_num = 10 train_data = {} test_data = {} for filename in files: obj = np.load(filename) if filename.find("_test.npy") >= 0: tes...
26.243243
62
0.669413
import json import glob import numpy as np import os path = "data_state_space_v3/" out_path = "small_data/" files = glob.glob(path + "*.npy") # ワイルドカードが使用可能 train_data_num = 100 test_data_num = 10 train_data = {} test_data = {} for filename in files: obj = np.load(filename) if filename.find("_test.npy") >= 0:...
36
0
0
0
0
0
0
0
0
991fa516fb5524187777ee16359f8b1f0cb6ad59
859
py
Python
3M/W9/7.py
allenalvin333/Hackerrank_Prep
26ed5b874daba4775d006824d36f9e82ea5ff1ea
[ "MIT" ]
2
2021-11-25T13:38:36.000Z
2021-11-25T13:42:56.000Z
3M/W9/7.py
allenalvin333/Hackerrank_Prep
26ed5b874daba4775d006824d36f9e82ea5ff1ea
[ "MIT" ]
null
null
null
3M/W9/7.py
allenalvin333/Hackerrank_Prep
26ed5b874daba4775d006824d36f9e82ea5ff1ea
[ "MIT" ]
1
2021-11-25T13:38:43.000Z
2021-11-25T13:38:43.000Z
# https://www.hackerrank.com/challenges/three-month-preparation-kit-maxsubarray/problem #!/bin/python3 import os # # Complete the 'maxSubarray' function below. # # The function is expected to return an INTEGER_ARRAY. # The function accepts INTEGER_ARRAY arr as parameter. # if __name__ == '__main__': fptr = open(...
21.475
87
0.615832
# https://www.hackerrank.com/challenges/three-month-preparation-kit-maxsubarray/problem #!/bin/python3 import math import os import random import re import sys # # Complete the 'maxSubarray' function below. # # The function is expected to return an INTEGER_ARRAY. # The function accepts INTEGER_ARRAY arr as parameter...
0
0
0
0
0
164
0
-41
112
be789e67d9aef4a43064ec6b0aac240e98f4e74f
4,286
py
Python
hep_cnn/tensorrt/convert_tensorrt_tf_integrated.py
NERSC/inference_benchmarks
e51453a755aaece91f7e08e92453a4050722071a
[ "BSD-3-Clause" ]
1
2019-08-29T03:33:58.000Z
2019-08-29T03:33:58.000Z
hep_cnn/tensorrt/convert_tensorrt_tf_integrated.py
NERSC/inference_benchmarks
e51453a755aaece91f7e08e92453a4050722071a
[ "BSD-3-Clause" ]
null
null
null
hep_cnn/tensorrt/convert_tensorrt_tf_integrated.py
NERSC/inference_benchmarks
e51453a755aaece91f7e08e92453a4050722071a
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import numpy as np import argparse, sys tf.logging.set_verbosity(tf.logging.INFO) import os #main if "__main__" in __name__: P=argparse.ArgumentParser(prog="trt_convert") P.add...
41.61165
168
0.704153
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from tensorflow.python.ops import data_flow_ops import tensorflow.contrib.tensorrt as trt import numpy as np import time from tensorflow.python.platform import gfile from tensorflow.pyt...
0
0
0
0
0
1,840
0
91
270
745b720c7aee2c3450c7326ecfc4595bc580fc48
1,812
py
Python
SSD1306.py
krandor/weather_station
06a0c88d92893a95aaabd5bbc2892a99ae4be8e1
[ "MIT" ]
null
null
null
SSD1306.py
krandor/weather_station
06a0c88d92893a95aaabd5bbc2892a99ae4be8e1
[ "MIT" ]
null
null
null
SSD1306.py
krandor/weather_station
06a0c88d92893a95aaabd5bbc2892a99ae4be8e1
[ "MIT" ]
null
null
null
# I2C ADDRESS / BITS SSD1306_ADDRESS = 0x3C
27.876923
89
0.631898
import Adafruit_SSD1306 import Image import ImageDraw import ImageFont # I2C ADDRESS / BITS SSD1306_ADDRESS = 0x3C class Ssd1306(object): _display = None _draw = None _image = None _font = None _height = 0 _width = 0 def __init__(self, i2c_bus = 0, ssd1306_rst = "22"): """ ...
0
74
0
1,598
0
0
0
-17
111
9235c6c3f07aa312f105c296304b0e62256a9961
260
py
Python
sandbox/flask/multi_page_form/compute.py
carlosal1015/proofofconcept
579873aff082e6fa497a387e0d0a5f8e5ec3ecd2
[ "CC-BY-4.0" ]
14
2015-01-02T19:39:36.000Z
2022-03-09T06:08:10.000Z
sandbox/flask/multi_page_form/compute.py
carlosal1015/proofofconcept
579873aff082e6fa497a387e0d0a5f8e5ec3ecd2
[ "CC-BY-4.0" ]
242
2015-01-02T13:59:58.000Z
2022-03-27T17:22:21.000Z
sandbox/flask/multi_page_form/compute.py
carlosal1015/proofofconcept
579873aff082e6fa497a387e0d0a5f8e5ec3ecd2
[ "CC-BY-4.0" ]
6
2015-02-13T16:00:25.000Z
2020-08-05T17:51:26.000Z
if __name__ == '__main__': print compute(1, 0.1) # default values
21.666667
66
0.711538
def arg_count(inference_rule): # these should be determined based on string match in CSV file num_input=2 num_feed=1 num_output=1 return num_input,num_feed,num_output if __name__ == '__main__': print compute(1, 0.1) # default values
0
0
0
0
0
165
0
0
23
53fad1f9197d87945dd3f90bc49bebbc3ce82648
6,042
py
Python
nevergrad/functions/corefuncs.py
se4u/nevergrad
38924bc7b0bff834316ccf974922db2c22be1606
[ "MIT" ]
1
2021-04-21T09:19:44.000Z
2021-04-21T09:19:44.000Z
nevergrad/functions/corefuncs.py
se4u/nevergrad
38924bc7b0bff834316ccf974922db2c22be1606
[ "MIT" ]
null
null
null
nevergrad/functions/corefuncs.py
se4u/nevergrad
38924bc7b0bff834316ccf974922db2c22be1606
[ "MIT" ]
1
2019-12-12T10:36:54.000Z
2019-12-12T10:36:54.000Z
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from ..common.decorators import Registry registry = Registry() # following functions using discretizat...
26.269565
94
0.677756
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import numpy as np from ..optimization import discretization from ..common.decorators import Registry registry = Regist...
0
4,065
0
0
0
650
0
17
919
13c3bb6deea1739d745d8f14fbc2523bef0ec1cb
187
py
Python
HackerRank/Python/Collections/CompanyLogo.py
AdityaChirravuri/CompetitiveProgramming
642550e8916b3f7939a1fdd52d10f5f8ae43f161
[ "MIT" ]
1
2021-07-13T01:49:25.000Z
2021-07-13T01:49:25.000Z
HackerRank/Python/Collections/CompanyLogo.py
AdityaChirravuri/CompetitiveProgramming
642550e8916b3f7939a1fdd52d10f5f8ae43f161
[ "MIT" ]
null
null
null
HackerRank/Python/Collections/CompanyLogo.py
AdityaChirravuri/CompetitiveProgramming
642550e8916b3f7939a1fdd52d10f5f8ae43f161
[ "MIT" ]
null
null
null
string = input() d = {} for i in string: if i in d: d[i] += 1 else: d[i] = 1 s = sorted(sorted(d), key = d.get, reverse = True) for i in s[:3]: print(i, d[i])
17
50
0.470588
string = input() d = {} for i in string: if i in d: d[i] += 1 else: d[i] = 1 s = sorted(sorted(d), key = d.get, reverse = True) for i in s[:3]: print(i, d[i])
0
0
0
0
0
0
0
0
0
559efba2e8c036ea8426a51546bc4e2aa0ff4a87
775
py
Python
src/arrays/spiral-order-matrix.py
vighnesh153/ds-algo
79c401dad2d2e575ce1913184ca8665f2712a5b8
[ "MIT" ]
null
null
null
src/arrays/spiral-order-matrix.py
vighnesh153/ds-algo
79c401dad2d2e575ce1913184ca8665f2712a5b8
[ "MIT" ]
null
null
null
src/arrays/spiral-order-matrix.py
vighnesh153/ds-algo
79c401dad2d2e575ce1913184ca8665f2712a5b8
[ "MIT" ]
1
2020-08-09T06:37:21.000Z
2020-08-09T06:37:21.000Z
for row in solve(10): print(row)
18.902439
55
0.390968
def solve(n): result = [[0 for _ in range(n)] for __ in range(n)] counter = 1 iteration = 0 while counter <= n * n: i = j = iteration while j < n - iteration: result[i][j] = counter counter += 1 j += 1 j -= 1 i += 1 while i < ...
0
0
0
0
0
714
0
0
22
521e8eaf2200d791a592c600d965d7937ff762c4
10,855
py
Python
src/database.py
vimc/montagu
c9682b3e57cf25e75b5b7688f748c8dbe882666d
[ "MIT" ]
null
null
null
src/database.py
vimc/montagu
c9682b3e57cf25e75b5b7688f748c8dbe882666d
[ "MIT" ]
59
2017-07-28T09:27:15.000Z
2021-11-01T17:16:59.000Z
src/database.py
vimc/montagu
c9682b3e57cf25e75b5b7688f748c8dbe882666d
[ "MIT" ]
1
2020-09-23T11:08:34.000Z
2020-09-23T11:08:34.000Z
root_user = "vimc" # these tables should only be modified via sql migrations protected_tables = ["gavi_support_level", "activity_type", "burden_outcome", "gender", "responsibility_set_status", "impact_outcome", "gavi_su...
35.825083
120
0.64597
import random import string from subprocess import run from types import SimpleNamespace import psycopg2 import versions from docker_helpers import get_image_name, pull, exec_safely from service_config import api_db_user from settings import get_secret root_user = "vimc" # these tables should only be modified via sq...
0
307
0
1,450
0
7,016
0
55
613
d81293ab153a2b3620035047792f5df592c73a94
1,225
py
Python
Chapter05/poplib/mailbox_basic_params.py
yangwawa0323/Learning-Python-Networking-Second-Edition
5460fe4fb6acc5d0df19bf36e52ac09e9a11eb8b
[ "MIT" ]
52
2018-12-17T19:33:06.000Z
2022-03-25T18:14:02.000Z
Chapter05/poplib/mailbox_basic_params.py
barretthugh/Learning-Python-Networking-Second-Edition
0f00b8b20c1c85e76754e47113dff8ca9e99d5ca
[ "MIT" ]
null
null
null
Chapter05/poplib/mailbox_basic_params.py
barretthugh/Learning-Python-Networking-Second-Edition
0f00b8b20c1c85e76754e47113dff8ca9e99d5ca
[ "MIT" ]
38
2018-12-18T09:08:43.000Z
2022-02-06T02:53:05.000Z
#!/usr/bin/env python3 import argparse if __name__ == '__main__': parser = argparse.ArgumentParser(description='MailBox basic params') parser.add_argument('--hostname', action="store", dest="hostname") parser.add_argument('--port', action="store", dest="port") parser.add_argument('--use...
30.625
76
0.59102
#!/usr/bin/env python3 import poplib import argparse def main(hostname,port,user,password): mailbox = poplib.POP3_SSL(hostname,port) try: mailbox.user(user) mailbox.pass_(password) response, listings, octet_count = mailbox.list() for li...
0
0
0
0
0
555
0
-8
46
9b34dbdf2931cc53d5622eda4c91b6c6fb2da69b
6,219
py
Python
openob/manager.py
sreimers/openob
8b82e38c37f0a7d748c076a0dc14fc8994bb5998
[ "Unlicense" ]
2
2018-04-26T11:27:10.000Z
2021-06-01T03:59:41.000Z
openob/manager.py
sreimers/openob
8b82e38c37f0a7d748c076a0dc14fc8994bb5998
[ "Unlicense" ]
null
null
null
openob/manager.py
sreimers/openob
8b82e38c37f0a7d748c076a0dc14fc8994bb5998
[ "Unlicense" ]
null
null
null
# OpenOB Link Manager # One of these runs at each end and negotiates everything (RX pushes config info to TX), reconnects when links fail, and so on.
57.583333
286
0.589323
import sys import time import redis from openob.rtp.tx import RTPTransmitter from openob.rtp.rx import RTPReceiver import gst from colorama import Fore, Back, Style # OpenOB Link Manager # One of these runs at each end and negotiates everything (RX pushes config info to TX), reconnects when links fail, and so o...
0
0
0
5,872
0
0
0
11
184
ad9efb2e6f4829da3b80bcc3b918afaea610d7d7
10,777
py
Python
tests/test_packages/test_skills/test_confirmation_aw2/test_strategy.py
bryanchriswhite/agents-aea
d3f177a963eb855d9528555167255bf2b478f4ba
[ "Apache-2.0" ]
126
2019-09-07T09:32:44.000Z
2022-03-29T14:28:41.000Z
tests/test_packages/test_skills/test_confirmation_aw2/test_strategy.py
salman6049/agents-aea
d3f177a963eb855d9528555167255bf2b478f4ba
[ "Apache-2.0" ]
1,814
2019-08-24T10:08:07.000Z
2022-03-31T14:28:36.000Z
tests/test_packages/test_skills/test_confirmation_aw2/test_strategy.py
salman6049/agents-aea
d3f177a963eb855d9528555167255bf2b478f4ba
[ "Apache-2.0" ]
46
2019-09-03T22:13:58.000Z
2022-03-22T01:25:16.000Z
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI Limited # # 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 ...
41.133588
143
0.661409
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI Limited # # 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 ...
0
1,029
0
8,394
0
0
0
221
247
4a05ac857f23cb032431dca22e9f9dc234c173f4
370
py
Python
pype9/utils/mpi.py
tclose/Pype9
23f96c0885fd9df12d9d11ff800f816520e4b17a
[ "MIT" ]
null
null
null
pype9/utils/mpi.py
tclose/Pype9
23f96c0885fd9df12d9d11ff800f816520e4b17a
[ "MIT" ]
null
null
null
pype9/utils/mpi.py
tclose/Pype9
23f96c0885fd9df12d9d11ff800f816520e4b17a
[ "MIT" ]
1
2021-04-08T12:46:21.000Z
2021-04-08T12:46:21.000Z
try: from mpi4py import MPI # @UnusedImport @IgnorePep8 This is imported before NEURON to avoid a bug in NEURON except ImportError: mpi_comm = DummyMPICom() else: mpi_comm = MPI.COMM_WORLD MPI_ROOT = 0
17.619048
111
0.678378
class DummyMPICom(object): rank = 0 size = 1 def barrier(self): pass try: from mpi4py import MPI # @UnusedImport @IgnorePep8 This is imported before NEURON to avoid a bug in NEURON except ImportError: mpi_comm = DummyMPICom() else: mpi_comm = MPI.COMM_WORLD MPI_ROOT = 0 def is_mpi...
0
0
0
69
0
38
0
0
45
ab0bdc4d6adc83eb5ef6b8b6083e23fb449db951
9,480
py
Python
Trajectory_Mining/Bag_of_Words/unpack_items_all_victims.py
AdamCoscia/eve-trajectory-mining
134f142a5665f66fbf92aada8dd6252fab64ddff
[ "MIT" ]
null
null
null
Trajectory_Mining/Bag_of_Words/unpack_items_all_victims.py
AdamCoscia/eve-trajectory-mining
134f142a5665f66fbf92aada8dd6252fab64ddff
[ "MIT" ]
null
null
null
Trajectory_Mining/Bag_of_Words/unpack_items_all_victims.py
AdamCoscia/eve-trajectory-mining
134f142a5665f66fbf92aada8dd6252fab64ddff
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Unpacks Raw API data from zkillboard into victim files that contain TEST - 10/02/2019 Params: 10000002201505.csv | 61MB | 28208 rows x 8 columns Output: ``` (+0.000s|t:0.000s) Importing modules... (+2.209s|t:2.209s) Loading CSV data from local file... (+1.132s|t:3.341s) Converting DataFrame...
38.380567
99
0.539873
# -*- coding: utf-8 -*- """Unpacks Raw API data from zkillboard into victim files that contain TEST - 10/02/2019 Params: 10000002201505.csv | 61MB | 28208 rows x 8 columns Output: ``` (+0.000s|t:0.000s) Importing modules... (+2.209s|t:2.209s) Loading CSV data from local file... (+1.132s|t:3.341s) Converting DataFrame...
0
0
0
0
2,924
0
0
-14
68
72598642d175089036d9345be8dbcafd77a05743
19,963
py
Python
build/lib/geonomics/sim/stats.py
AnushaPB/geonomics-1
deee0c377e81f509463eaf6f9d0b2f0809f2ddc3
[ "MIT" ]
null
null
null
build/lib/geonomics/sim/stats.py
AnushaPB/geonomics-1
deee0c377e81f509463eaf6f9d0b2f0809f2ddc3
[ "MIT" ]
null
null
null
build/lib/geonomics/sim/stats.py
AnushaPB/geonomics-1
deee0c377e81f509463eaf6f9d0b2f0809f2ddc3
[ "MIT" ]
null
null
null
#!/usr/bin/python #stats.py ''' Classes and functons to implement calculation and output of statistics ''' #geonomics imports from geonomics.utils.viz import _check_display #other imports _check_display() ###################################### # -----------------------------------# # CLASSES ---------------------...
45.786697
80
0.539698
#!/usr/bin/python #stats.py ''' Classes and functons to implement calculation and output of statistics ''' #geonomics imports from geonomics.utils.io import (_append_array2d_to_array_stack, _append_row_to_csv, _write_dict_to_csv) from geonomics.ops.selection import _calc_fitness from ...
0
0
0
15,775
0
2,640
0
172
309
4d14eb208318979b2b03eac311b90a75532fc290
1,743
py
Python
quantz_ground/app.py
zhangyuz/quantz_ground
a3c10aceaa9da537ff5d1fc015f198945bf9d6f0
[ "Apache-2.0" ]
1
2020-10-20T15:45:20.000Z
2020-10-20T15:45:20.000Z
quantz_ground/app.py
zhangyuz/quantz_ground
a3c10aceaa9da537ff5d1fc015f198945bf9d6f0
[ "Apache-2.0" ]
null
null
null
quantz_ground/app.py
zhangyuz/quantz_ground
a3c10aceaa9da537ff5d1fc015f198945bf9d6f0
[ "Apache-2.0" ]
null
null
null
from eve import Eve from .db_domains import db_domains SETTINGS = { 'DOMAIN': db_domains, 'MONGO_HOST': 'localhost', 'MONGO_PORT': 27017, # MONGO_USERNAME': os.environ.get(...), # MONGO_PASSWORD': os.environ.get(...), 'MONGO_DBNAME': 'quantz', 'RENDERERS': [ 'eve.render.JSONRende...
24.208333
62
0.624785
from eve import Eve from .db_domains import db_domains import os def isInDocker(): return os.environ.get('AM_I_IN_A_DOCKER_CONTAINER', False) SETTINGS = { 'DOMAIN': db_domains, 'MONGO_HOST': 'localhost', 'MONGO_PORT': 27017, # MONGO_USERNAME': os.environ.get(...), # MONGO_PASSWORD': os.env...
90
46
0
0
0
493
0
-12
115
5304b9a306a30a7e2cf57d01ceb4e53e6ccd0bca
1,869
py
Python
databird/dtutil.py
jonas-hagen/databird
cfb358e74da62bb9d7ea0e6c7ac984671472120b
[ "MIT" ]
1
2021-11-05T00:12:00.000Z
2021-11-05T00:12:00.000Z
databird/dtutil.py
jonas-hagen/databird
cfb358e74da62bb9d7ea0e6c7ac984671472120b
[ "MIT" ]
null
null
null
databird/dtutil.py
jonas-hagen/databird
cfb358e74da62bb9d7ea0e6c7ac984671472120b
[ "MIT" ]
null
null
null
import datetime as dt import calendar def month_last_day(date): """Return the last date of the month for the month containing date.""" _, last_day = calendar.monthrange(date.year, date.month) return dt.datetime(date.year, date.month, last_day) def month_first_day(date): """Return the first date o...
24.92
139
0.543606
import datetime as dt import calendar import time def parse_timedelta(s): valid_units = [ "weeks", "days", "hours", "seconds", "minutes", "miliseconds", "microseconds", ] try: if s == "0": return dt.timedelta() value, un...
0
0
0
0
182
1,131
0
-10
137
5922ee45b768da565c33dd1950061bcdab97ffc8
662
py
Python
coding_interviews/leetcode/easy/remove_duplicates/remove_duplicates.py
LeandroTk/Algorithms
569ed68eba3eeff902f8078992099c28ce4d7cd6
[ "MIT" ]
205
2018-12-01T17:49:49.000Z
2021-12-22T07:02:27.000Z
coding_interviews/leetcode/easy/remove_duplicates/remove_duplicates.py
LeandroTk/Algorithms
569ed68eba3eeff902f8078992099c28ce4d7cd6
[ "MIT" ]
2
2020-01-01T16:34:29.000Z
2020-04-26T19:11:13.000Z
coding_interviews/leetcode/easy/remove_duplicates/remove_duplicates.py
LeandroTk/Algorithms
569ed68eba3eeff902f8078992099c28ce4d7cd6
[ "MIT" ]
50
2018-11-28T20:51:36.000Z
2021-11-29T04:08:25.000Z
# https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string
21.354839
72
0.487915
# https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string def remove_duplicates(S): if len(S) <= 1: return S start, end = 0, 1 while end < len(S): if S[start] != S[end]: start = end end = start + 1 elif S[start] == S[end] and end + 1 == len(S): ...
0
0
0
0
0
544
0
0
46
b82ae840a377927194b91a181787f7527c4df71f
271
py
Python
py3wirecard/entities/acquirerdetails.py
robertons/py3wirecard
8a9b541a67ee96d75b1c864762fce7148cccb8b4
[ "MIT" ]
2
2019-09-05T20:20:44.000Z
2020-01-14T18:20:45.000Z
py3wirecard/entities/acquirerdetails.py
robertons/py3wirecard
8a9b541a67ee96d75b1c864762fce7148cccb8b4
[ "MIT" ]
1
2020-01-15T12:27:56.000Z
2020-01-16T12:26:13.000Z
py3wirecard/entities/acquirerdetails.py
robertons/py3wirecard
8a9b541a67ee96d75b1c864762fce7148cccb8b4
[ "MIT" ]
null
null
null
#-*- coding: utf-8 -*-
22.583333
56
0.782288
#-*- coding: utf-8 -*- from py3wirecard.entities.lib.wireentity import * from py3wirecard.entities.taxdocument import TaxDocument class AcquirerDetails(WireEntity): @String() def authorizationNumber(self): pass @Object(type=TaxDocument) def taxDocument(self):pass
0
57
0
13
0
0
0
63
115
a55666e686775ea98506356ddf52aca3da3da5cf
1,119
py
Python
clpc.py
CnybTseng/LPRNet
5983ae3e3445d121c2ac31ac396287aa134545ab
[ "MIT" ]
null
null
null
clpc.py
CnybTseng/LPRNet
5983ae3e3445d121c2ac31ac396287aa134545ab
[ "MIT" ]
null
null
null
clpc.py
CnybTseng/LPRNet
5983ae3e3445d121c2ac31ac396287aa134545ab
[ "MIT" ]
null
null
null
chinese_strings = [ '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'WJ'] # 36 chinese = [ 'Beijing', 'Tianjin', 'Hebei', 'Shanxi', 'InnerMongolia', 'Liaoning', 'Jilin', 'Heilongj...
18.966102
56
0.392315
chinese_strings = [ '京', '津', '冀', '晋', '蒙', '辽', '吉', '黑', '沪', '苏', '浙', '皖', '闽', '赣', '鲁', '豫', '鄂', '湘', '粤', '桂', '琼', '渝', '川', '贵', '云', '藏', '陕', '甘', '青', '宁', '新', '港', '澳', '台', '警', 'WJ'] # 36 chinese = [ 'Beijing', 'Tianjin', 'Hebei', 'Shanxi', 'InnerMongolia', 'Li...
105
0
0
0
0
0
0
0
0
fb16e31bf96d01e63ade275800859d1d3efc6eef
2,319
py
Python
core/migrations/0001_initial.py
atthana/restapi_q_udemy
f49df5a614ac1b88a3bea975aea9498b8e85d504
[ "MIT" ]
null
null
null
core/migrations/0001_initial.py
atthana/restapi_q_udemy
f49df5a614ac1b88a3bea975aea9498b8e85d504
[ "MIT" ]
null
null
null
core/migrations/0001_initial.py
atthana/restapi_q_udemy
f49df5a614ac1b88a3bea975aea9498b8e85d504
[ "MIT" ]
null
null
null
# Generated by Django 3.1.7 on 2021-04-05 14:35
38.65
131
0.564899
# Generated by Django 3.1.7 on 2021-04-05 14:35 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Customer', fields=[ ...
0
0
0
2,172
0
0
0
30
68
9f663f59a9673a49aadc92ab4dc19bf0f2475490
2,918
py
Python
virtool_workflow/workflow.py
eroberts9789/virtool-workflow
18219eec2b9b934cedd3770ac319f40305c165f2
[ "MIT" ]
5
2020-09-24T20:29:08.000Z
2022-03-17T14:50:56.000Z
virtool_workflow/workflow.py
eroberts9789/virtool-workflow
18219eec2b9b934cedd3770ac319f40305c165f2
[ "MIT" ]
126
2020-10-01T23:38:34.000Z
2022-03-31T08:26:28.000Z
virtool_workflow/workflow.py
eroberts9789/virtool-workflow
18219eec2b9b934cedd3770ac319f40305c165f2
[ "MIT" ]
5
2020-09-29T21:29:46.000Z
2021-07-27T20:34:58.000Z
"""Main definitions for Virtool Workflows.""" from typing import Any, Callable, Coroutine WorkflowStep = Callable[..., Coroutine[Any, Any, None]]
34.329412
87
0.642221
"""Main definitions for Virtool Workflows.""" from typing import Any, Callable, Coroutine, Iterable, Optional, Sequence from virtool_workflow.utils import coerce_to_coroutine_function from fixtures import FixtureScope WorkflowStep = Callable[..., Coroutine[Any, Any, None]] class Workflow: """ A Workflow is ...
0
0
407
2,211
0
0
0
84
68
daa5b4decdea31a15e43a756422b8f10fbdeb296
1,637
py
Python
test/test_pool.py
viverlxl/resource_pool
6fa226e0ac504df604362bf0ef84cb3a9f21109c
[ "MIT" ]
2
2019-10-09T10:30:23.000Z
2020-01-20T01:36:10.000Z
test/test_pool.py
viverlxl/resource_pool
6fa226e0ac504df604362bf0ef84cb3a9f21109c
[ "MIT" ]
null
null
null
test/test_pool.py
viverlxl/resource_pool
6fa226e0ac504df604362bf0ef84cb3a9f21109c
[ "MIT" ]
1
2020-07-28T22:57:50.000Z
2020-07-28T22:57:50.000Z
#coding:utf-8 app = None DATABASECONFIG = { "test":{ "host": "localhost", "port": 3306, "username": "root", "password": "", "schema" : "test" } }
23.385714
82
0.568112
#coding:utf-8 import threading import time import pytest from .connect import DataClient, DataBase from ..psrc import ConnPool from concurrent.futures import ProcessPoolExecutor,ThreadPoolExecutor,as_completed app = None DATABASECONFIG = { "test":{ "host": "localhost", "port": 3306, "usern...
0
0
0
747
0
422
0
64
202
5dbd873944ee57a896246371918c17eb040e68d8
5,614
py
Python
org/apache/helix/HelixProperty.py
davzhang/helix-python-binding
11a9ecf730bce07720e0b0bcf7f0ec1cd2b25878
[ "Apache-2.0" ]
3
2015-04-08T22:51:04.000Z
2015-05-03T06:42:35.000Z
org/apache/helix/HelixProperty.py
zzhang5/helix-python-binding
11a9ecf730bce07720e0b0bcf7f0ec1cd2b25878
[ "Apache-2.0" ]
null
null
null
org/apache/helix/HelixProperty.py
zzhang5/helix-python-binding
11a9ecf730bce07720e0b0bcf7f0ec1cd2b25878
[ "Apache-2.0" ]
1
2020-03-31T21:43:01.000Z
2020-03-31T21:43:01.000Z
# package org.apache.helix #from org.apache.helix import * #from java.lang.reflect import Constructor #from java.util import ArrayList #from java.util import Collection #from java.util import Collections #from java.util import HashMap #from java.util import List #from java.util import Map from org.apache.helix.util.mi...
20.792593
86
0.543997
# package org.apache.helix #from org.apache.helix import * #from java.lang.reflect import Constructor #from java.util import ArrayList #from java.util import Collection #from java.util import Collections #from java.util import HashMap #from java.util import List #from java.util import Map from org.apache.helix.util.mi...
0
2,252
0
2,869
0
0
0
20
67
674b67bec6ee90176fbdee9879dd043d45c1fa36
2,431
py
Python
modules/runtime/tests/py_importer_tests.py
ctonic/bark
35591e69310a0f0c9e6e72b8a9ee71713901b12e
[ "MIT" ]
null
null
null
modules/runtime/tests/py_importer_tests.py
ctonic/bark
35591e69310a0f0c9e6e72b8a9ee71713901b12e
[ "MIT" ]
null
null
null
modules/runtime/tests/py_importer_tests.py
ctonic/bark
35591e69310a0f0c9e6e72b8a9ee71713901b12e
[ "MIT" ]
null
null
null
# Copyright (c) 2019 fortiss GmbH # # This software is released under the MIT License. # https://opensource.org/licenses/MIT import unittest if __name__ == '__main__': unittest.main()
34.239437
122
0.647882
# Copyright (c) 2019 fortiss GmbH # # This software is released under the MIT License. # https://opensource.org/licenses/MIT import unittest import matplotlib.pyplot as plt from bark.world.agent import * from bark.models.behavior import * from bark.world import * from bark.geometry import * from bark.models.dynamic im...
0
0
0
1,728
0
0
0
193
309
7e8d210f5257d00943ef0de386a015fecb1a21ab
215
py
Python
scripts/portal/Pianus.py
G00dBye/YYMS
1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb
[ "MIT" ]
54
2019-04-16T23:24:48.000Z
2021-12-18T11:41:50.000Z
scripts/portal/Pianus.py
G00dBye/YYMS
1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb
[ "MIT" ]
3
2019-05-19T15:19:41.000Z
2020-04-27T16:29:16.000Z
scripts/portal/Pianus.py
G00dBye/YYMS
1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb
[ "MIT" ]
49
2020-11-25T23:29:16.000Z
2022-03-26T16:20:24.000Z
if sm.hasQuest(1666): sm.warpInstanceIn(931050429) sm.createClock(6*60) sm.invokeAfterDelay(6*60*1000, "warpInstanceOut", 230040410, 0) else: map = 230040420 portal = 2 sm.warp(map, portal)
21.5
67
0.674419
if sm.hasQuest(1666): sm.warpInstanceIn(931050429) sm.createClock(6*60) sm.invokeAfterDelay(6*60*1000, "warpInstanceOut", 230040410, 0) else: map = 230040420 portal = 2 sm.warp(map, portal)
0
0
0
0
0
0
0
0
0
b0d90b1d516b0e0847b2cd536c61131786cada83
926
py
Python
pysbr/queries/marketsbymarketids.py
power-edge/PySBR
f768c24e539557c08dfcaf39ce1eaca7d730cf25
[ "MIT" ]
49
2020-12-13T07:07:50.000Z
2022-02-09T18:54:39.000Z
pysbr/queries/marketsbymarketids.py
power-edge/PySBR
f768c24e539557c08dfcaf39ce1eaca7d730cf25
[ "MIT" ]
11
2021-01-08T05:04:52.000Z
2022-03-16T12:51:28.000Z
pysbr/queries/marketsbymarketids.py
power-edge/PySBR
f768c24e539557c08dfcaf39ce1eaca7d730cf25
[ "MIT" ]
9
2021-01-18T02:03:24.000Z
2022-01-29T04:47:01.000Z
import pysbr.utils as utils
30.866667
78
0.661987
from typing import List, Union from pysbr.queries.query import Query import pysbr.utils as utils class MarketsByMarketIds(Query): """Get information about a number of leagues from their league ids. Market name, description, and market type id are included in the response. Args: market_ids: SBR ...
0
506
0
298
0
0
0
25
68
e34b7a0941162e0522b0241ed24bb6257057d4d6
108
py
Python
examples/play_e2e4.py
certik/chess
dc806fccc0fb9acc57c40db56e620f2c55157425
[ "MIT" ]
1
2016-05-09T00:40:16.000Z
2016-05-09T00:40:16.000Z
examples/play_e2e4.py
certik/chess
dc806fccc0fb9acc57c40db56e620f2c55157425
[ "MIT" ]
null
null
null
examples/play_e2e4.py
certik/chess
dc806fccc0fb9acc57c40db56e620f2c55157425
[ "MIT" ]
null
null
null
from py_uci import UCIEngine e = UCIEngine() e.new_game() e.set_position(moves=["e2e4"]) e.find_best_move()
18
30
0.75
from py_uci import UCIEngine e = UCIEngine() e.new_game() e.set_position(moves=["e2e4"]) e.find_best_move()
0
0
0
0
0
0
0
0
0
24c03418435a7ac547e14c75a900568329890bf9
87
py
Python
BranchBound/__init__.py
jskeet314/branch_bound_helper
9336c47db2cf448fb8d8ef3b8b1c617bb56ff52a
[ "MIT" ]
null
null
null
BranchBound/__init__.py
jskeet314/branch_bound_helper
9336c47db2cf448fb8d8ef3b8b1c617bb56ff52a
[ "MIT" ]
null
null
null
BranchBound/__init__.py
jskeet314/branch_bound_helper
9336c47db2cf448fb8d8ef3b8b1c617bb56ff52a
[ "MIT" ]
null
null
null
name = "branch_bound" if __name__ == "__main__": print("branch bound installed!")
17.4
36
0.678161
name = "branch_bound" if __name__ == "__main__": print("branch bound installed!")
0
0
0
0
0
0
0
0
0
5bb02276122f217a1d8c0e497fdf9aa0ae10602a
750
py
Python
createPb_v2.py
ats05/hmr
e6f2e7843a120ee2143c77a70bb1e82ae681b255
[ "MIT" ]
null
null
null
createPb_v2.py
ats05/hmr
e6f2e7843a120ee2143c77a70bb1e82ae681b255
[ "MIT" ]
null
null
null
createPb_v2.py
ats05/hmr
e6f2e7843a120ee2143c77a70bb1e82ae681b255
[ "MIT" ]
null
null
null
# coding:utf-8 # tensorflow version1.13.1 import tensorflow as tf saver = tf.train.import_meta_graph('models/model.ckpt-667589.meta', clear_devices=True) with tf.Session() as sess: chpt_state = tf.train.get_checkpoint_state('models/model.ckpt-667589') # if chpt_state: # last_model = chpt_state.model_checkpoi...
28.846154
92
0.722667
# coding:utf-8 # tensorflow version1.13.1 import tensorflow as tf saver = tf.train.import_meta_graph('models/model.ckpt-667589.meta', clear_devices=True) with tf.Session() as sess: chpt_state = tf.train.get_checkpoint_state('models/model.ckpt-667589') # if chpt_state: # last_model = chpt_state.model_checkpoi...
0
0
0
0
0
0
0
0
0
709dbb247538d10b3eb2ae120e003e5a4a33d3f1
11,460
py
Python
seesaw/externalprocess.py
Ghostofapacket/seesaw-kit
a3d8395167eb38ec2c446aad254d940d621fbd98
[ "Unlicense" ]
null
null
null
seesaw/externalprocess.py
Ghostofapacket/seesaw-kit
a3d8395167eb38ec2c446aad254d940d621fbd98
[ "Unlicense" ]
null
null
null
seesaw/externalprocess.py
Ghostofapacket/seesaw-kit
a3d8395167eb38ec2c446aad254d940d621fbd98
[ "Unlicense" ]
null
null
null
'''Running subprocesses asynchronously.''' from __future__ import print_function import os import tornado.ioloop _all_procs = set()
32.10084
108
0.584991
'''Running subprocesses asynchronously.''' from __future__ import print_function import fcntl import os import os.path import subprocess import functools import datetime import pty import signal import atexit import tornado.ioloop from tornado.ioloop import IOLoop, PeriodicCallback import tornado.process from seesaw...
0
743
0
10,113
0
0
0
-9
471
2a77bb600b7c374939281efcdc2822c2bb1565e6
10,337
py
Python
face2anime/train_utils.py
davidleonfdez/face2anime
896bf85a7aa28322cc9e9e586685db8cbbf39d89
[ "MIT" ]
null
null
null
face2anime/train_utils.py
davidleonfdez/face2anime
896bf85a7aa28322cc9e9e586685db8cbbf39d89
[ "MIT" ]
1
2022-01-15T23:57:33.000Z
2022-01-15T23:57:33.000Z
face2anime/train_utils.py
davidleonfdez/face2anime
896bf85a7aa28322cc9e9e586685db8cbbf39d89
[ "MIT" ]
null
null
null
__all__ = ['EMAAverager', 'EMACallback', 'add_ema_to_gan_learner', 'custom_save_model', 'custom_load_model', 'SaveCheckpointsCallback', 'clean_mem'] def add_ema_to_gan_learner(gan_learner, dblock, decay=0.999, update_bn_dl_bs=64, forward_batch=None): """"Creates and...
43.432773
93
0.676695
from fastai.vision.all import * import gc import torch from typing import Callable __all__ = ['EMAAverager', 'EMACallback', 'add_ema_to_gan_learner', 'custom_save_model', 'custom_load_model', 'SaveCheckpointsCallback', 'clean_mem'] class EMAAverager(): """Callable class that calculates the EMA of a p...
0
1,831
0
4,094
0
765
0
-5
299
040c7f55302a46486df83f60b08c0f12421da7b6
5,027
py
Python
spinnaker_csp/puzzles/sudoku_puzzles.py
neworderofjamie/SpiNNakerCSPs
56af0782d0bb83fd6e9934021e4007604f107993
[ "BSD-3-Clause-Clear" ]
3
2018-03-14T08:53:20.000Z
2020-05-28T17:28:18.000Z
spinnaker_csp/puzzles/sudoku_puzzles.py
neworderofjamie/SpiNNakerCSPs
56af0782d0bb83fd6e9934021e4007604f107993
[ "BSD-3-Clause-Clear" ]
null
null
null
spinnaker_csp/puzzles/sudoku_puzzles.py
neworderofjamie/SpiNNakerCSPs
56af0782d0bb83fd6e9934021e4007604f107993
[ "BSD-3-Clause-Clear" ]
6
2019-04-11T16:00:58.000Z
2021-07-03T14:48:16.000Z
"""A set of sudoku puzzles to experiment with the spinnaker_csp package. the puzzles are containned on the dictionary puzzles, keys are the name of the puzzle and values are tuples with the puzzle as first element and solution as second element. """ puzzles={ #----------------------------------------------------------...
38.374046
116
0.282475
"""A set of sudoku puzzles to experiment with the spinnaker_csp package. the puzzles are containned on the dictionary puzzles, keys are the name of the puzzle and values are tuples with the puzzle as first element and solution as second element. """ puzzles={ #----------------------------------------------------------...
0
0
0
0
0
0
0
0
0
06fff0cc841bc55f26d1376b8560f7a8a4ac31ac
707
py
Python
bin/print_busco_config.py
ewels/nf-core-neutronstar
c64a04a2422b3a113b8b45774b8045cf874af3fe
[ "MIT" ]
4
2018-10-02T09:44:02.000Z
2019-09-13T11:19:33.000Z
bin/print_busco_config.py
ewels/nf-core-neutronstar
c64a04a2422b3a113b8b45774b8045cf874af3fe
[ "MIT" ]
14
2018-10-05T14:43:03.000Z
2020-09-15T08:45:59.000Z
bin/print_busco_config.py
ewels/nf-core-neutronstar
c64a04a2422b3a113b8b45774b8045cf874af3fe
[ "MIT" ]
4
2018-11-06T08:30:07.000Z
2020-02-11T13:00:38.000Z
#!/usr/bin/env python from __future__ import print_function import os print( """[busco] out_path = {0} tmp_path = {0}/tmp [tblastn] # path to tblastn path = /usr/bin/ [makeblastdb] # path to makeblastdb path = /usr/bin/ [augustus] # path to augustus path = /opt/augustus/bin/ [etraining] # path to augustus etraining...
17.243902
65
0.704385
#!/usr/bin/env python from __future__ import print_function import os print( """[busco] out_path = {0} tmp_path = {0}/tmp [tblastn] # path to tblastn path = /usr/bin/ [makeblastdb] # path to makeblastdb path = /usr/bin/ [augustus] # path to augustus path = /opt/augustus/bin/ [etraining] # path to augustus etraining...
0
0
0
0
0
0
0
0
0
3119fab8ff4c8283e3ff2a1b33aa787a926adf2f
3,234
py
Python
parlai/core/build_data.py
rockingdingo/ParlAI
ceb009e1d81d2fec22454667559c6ff02a5624b9
[ "BSD-3-Clause" ]
null
null
null
parlai/core/build_data.py
rockingdingo/ParlAI
ceb009e1d81d2fec22454667559c6ff02a5624b9
[ "BSD-3-Clause" ]
null
null
null
parlai/core/build_data.py
rockingdingo/ParlAI
ceb009e1d81d2fec22454667559c6ff02a5624b9
[ "BSD-3-Clause" ]
1
2019-10-10T01:17:09.000Z
2019-10-10T01:17:09.000Z
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """ Utilities for downloadi...
34.404255
80
0.660482
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """ Utilities for downloadi...
0
0
0
0
0
148
0
0
23
5c417606898496b4f5606f5108cdcc3a843ec79b
5,172
py
Python
eyed/driver/bacnet/bacnet.py
ThousandMileEye/Eye
b0eca371fed5e01353ebddf7e4c400927decf0d2
[ "Apache-2.0" ]
null
null
null
eyed/driver/bacnet/bacnet.py
ThousandMileEye/Eye
b0eca371fed5e01353ebddf7e4c400927decf0d2
[ "Apache-2.0" ]
55
2017-12-21T15:20:36.000Z
2019-01-20T02:49:41.000Z
eyed/driver/bacnet/bacnet.py
ThousandMileEye/Eye
b0eca371fed5e01353ebddf7e4c400927decf0d2
[ "Apache-2.0" ]
3
2018-05-18T09:02:36.000Z
2019-12-29T10:27:44.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # BACnet Client #
18.083916
81
0.691415
#!/usr/bin/env python # -*- coding: utf-8 -*- from bacpypes.iocb import IOCB from bacpypes.pdu import Address, GlobalBroadcast from bacpypes.apdu import WhoIsRequest, ReadPropertyRequest, ReadPropertyACK from bacpypes.object import get_object_class, get_datatype from bacpypes.object import ObjectType, registered_object...
1,284
0
0
4,281
0
0
0
219
176
f285c95b7e4057a14af0bdee70433ff402fc6437
11,535
py
Python
src/forms/users.py
Dourv/tornado-mongo
95dbd1151abac2831d98b6d768a86f59b11c273d
[ "MIT" ]
2
2015-04-21T14:49:05.000Z
2015-04-21T15:15:40.000Z
src/forms/users.py
Dourv/tornado-mongo
95dbd1151abac2831d98b6d768a86f59b11c273d
[ "MIT" ]
null
null
null
src/forms/users.py
Dourv/tornado-mongo
95dbd1151abac2831d98b6d768a86f59b11c273d
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' forms constructor. * Es necesario crear una variable tipo dict() que debe llevar la siguiente estructura. { 'config(requerido)':{ 'method(requerido)': 'valores POST o GET', 'action(requerido)': 'url para enviar la data', 'class' : 'Clases de css', 'err...
25.690423
118
0.570438
#!/usr/bin/env python # -*- coding: utf-8 -*- from bson.objectid import ObjectId from pymongo import MongoClient from validate_email import validate_email from views.base import base import config import hashlib ''' forms constructor. * Es necesario crear una variable tipo dict() que debe llevar la siguiente estruc...
12
219
0
10,265
0
0
0
34
158
f2d93262ed8c5501a226a28e3d0ba7c98b7c26e2
175
py
Python
python/Twisted/krondo Twisted Introduction/basic-twisted/stack.py
RitamDey/My-Simple-Programs
147b455a6a40c371ec894ce979e8a61d242e03bd
[ "Unlicense" ]
2
2016-10-14T16:58:05.000Z
2017-05-04T04:59:18.000Z
python/Twisted/krondo Twisted Introduction/basic-twisted/stack.py
GreenJoey/My-Simple-Programs
147b455a6a40c371ec894ce979e8a61d242e03bd
[ "Unlicense" ]
null
null
null
python/Twisted/krondo Twisted Introduction/basic-twisted/stack.py
GreenJoey/My-Simple-Programs
147b455a6a40c371ec894ce979e8a61d242e03bd
[ "Unlicense" ]
null
null
null
from twisted.internet import reactor reactor.callWhenRunning(stack) reactor.run()
14.583333
36
0.748571
import traceback from twisted.internet import reactor def stack(): print("The Python Stack.") traceback.print_stack() reactor.callWhenRunning(stack) reactor.run()
0
0
0
0
0
50
0
-5
45
ab96b071bc740f843d9faa533a1f2a73a5589c9b
2,775
py
Python
src/ralph_scrooge/plugins/collect/blade_server.py
xliiv/ralph_pricing
88a295b6f0af66ae03c145205ada99f17ab51dd0
[ "Apache-2.0" ]
null
null
null
src/ralph_scrooge/plugins/collect/blade_server.py
xliiv/ralph_pricing
88a295b6f0af66ae03c145205ada99f17ab51dd0
[ "Apache-2.0" ]
null
null
null
src/ralph_scrooge/plugins/collect/blade_server.py
xliiv/ralph_pricing
88a295b6f0af66ae03c145205ada99f17ab51dd0
[ "Apache-2.0" ]
1
2021-11-15T21:21:17.000Z
2021-11-15T21:21:17.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging from ralph_scrooge.models import (AssetInfo, DailyAssetInfo, DailyUsage, UsageType) logger = logging.getLogger(__name__) def ...
25.227273
75
0.623423
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging from ralph.util import plugin from ralph.util.api_scrooge import get_blade_servers from ralph_scrooge.models import ( AssetIn...
0
951
0
61
0
0
0
58
114
969a4e2c193cd1b6ea7f45a8a1316bd133df7a37
663
py
Python
get_pavlick_dict.py
bhaddow/pmindia-crawler
1282b1151f4d41f2c817d2df3f718889384ea95f
[ "MIT" ]
11
2020-01-29T05:29:59.000Z
2022-02-21T09:38:24.000Z
get_pavlick_dict.py
bhaddow/pmindia-crawler
1282b1151f4d41f2c817d2df3f718889384ea95f
[ "MIT" ]
null
null
null
get_pavlick_dict.py
bhaddow/pmindia-crawler
1282b1151f4d41f2c817d2df3f718889384ea95f
[ "MIT" ]
3
2020-03-24T20:50:18.000Z
2020-11-30T02:33:05.000Z
#!/usr/bin/env python3 # # Convert Pavlick's dictionary to hunalign # if __name__ == "__main__": main()
22.862069
89
0.576169
#!/usr/bin/env python3 # # Convert Pavlick's dictionary to hunalign # import argparse import re def main(): parser = argparse.ArgumentParser() parser.add_argument("-d", "--dict", default="/home/bhaddow/data/pavlick-dicts/dict.hi") args = parser.parse_args() brackets = re.compile("\[[^\]]*\]") delim = re.co...
0
0
0
0
0
504
0
-18
68
8203e968123e42ef425551ec0f073dd160a7b50d
762
py
Python
rp/models/route_filter_list.py
stellaraf/rp
c4d7a23001060d11dbd1a1c4f285a58a28ed4326
[ "BSD-3-Clause" ]
1
2020-03-08T08:22:37.000Z
2020-03-08T08:22:37.000Z
rp/models/route_filter_list.py
stellaraf/rp
c4d7a23001060d11dbd1a1c4f285a58a28ed4326
[ "BSD-3-Clause" ]
null
null
null
rp/models/route_filter_list.py
stellaraf/rp
c4d7a23001060d11dbd1a1c4f285a58a28ed4326
[ "BSD-3-Clause" ]
null
null
null
# Standard Library # Third Party # Project
22.411765
63
0.71916
# Standard Library from typing import List, Union, Optional from ipaddress import IPv4Network, IPv6Network # Third Party from pydantic import StrictStr # Project from rp.models._common import Flag, RPModel class RouteFilterEntry(RPModel): """JunOS route-filter-list item JSON model.""" address: Union[IPv4Ne...
0
0
0
506
0
0
0
75
134
420c7338283bf739005666061a1028136dc3f7ba
3,234
py
Python
bcs-ui/backend/templatesets/legacy_apps/configuration/validator.py
laodiu/bk-bcs
2a956a42101ff6487ff521fb3ef429805bfa7e26
[ "Apache-2.0" ]
599
2019-06-25T03:20:46.000Z
2022-03-31T12:14:33.000Z
bcs-ui/backend/templatesets/legacy_apps/configuration/validator.py
laodiu/bk-bcs
2a956a42101ff6487ff521fb3ef429805bfa7e26
[ "Apache-2.0" ]
537
2019-06-27T06:03:44.000Z
2022-03-31T12:10:01.000Z
bcs-ui/backend/templatesets/legacy_apps/configuration/validator.py
laodiu/bk-bcs
2a956a42101ff6487ff521fb3ef429805bfa7e26
[ "Apache-2.0" ]
214
2019-06-25T03:26:05.000Z
2022-03-31T07:52:03.000Z
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making PaaS (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance ...
37.172414
115
0.732839
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
309
0
0
0
0
841
0
80
135
a44c6e197f39d490a7a355053f89a213c3c72549
10,410
py
Python
jocular/devicemanager.py
MartinCooke/jocular
635816d4ef6aa6ea75187137e25386dad2d551e9
[ "MIT" ]
6
2021-03-21T16:46:44.000Z
2021-11-27T14:07:06.000Z
jocular/devicemanager.py
MartinCooke/jocular
635816d4ef6aa6ea75187137e25386dad2d551e9
[ "MIT" ]
null
null
null
jocular/devicemanager.py
MartinCooke/jocular
635816d4ef6aa6ea75187137e25386dad2d551e9
[ "MIT" ]
null
null
null
''' DeviceManager: a Component that manages different device families e.g. Telescope, Camera, FilterWheel via a GUI element that permits selection/connection/disconnection DeviceFamily: superclass of e.g. Camera, Telescope, FilterWheel handles communication with devices for generic functions such as sele...
28.598901
99
0.708165
''' DeviceManager: a Component that manages different device families e.g. Telescope, Camera, FilterWheel via a GUI element that permits selection/connection/disconnection DeviceFamily: superclass of e.g. Camera, Telescope, FilterWheel handles communication with devices for generic functions such as sele...
2
106
0
8,685
0
0
0
276
470
68b6b85d463890a467a9a4397e9accc324f29eae
567
py
Python
use-cases/plc+opc/camera.py
TiagoDaFonseca/plc-machine-vision
22864d2e09bcc52971fbd2a0088f38878f6b59e3
[ "MIT" ]
null
null
null
use-cases/plc+opc/camera.py
TiagoDaFonseca/plc-machine-vision
22864d2e09bcc52971fbd2a0088f38878f6b59e3
[ "MIT" ]
null
null
null
use-cases/plc+opc/camera.py
TiagoDaFonseca/plc-machine-vision
22864d2e09bcc52971fbd2a0088f38878f6b59e3
[ "MIT" ]
null
null
null
import cv2 import time #Test unit if __name__ == '__main__': while True: img = capture_image(0,10) print(img) time.sleep(2) cv2.imshow("c",img) cv2.waitKey(0) cv2.destroyAllWindows()
22.68
41
0.536155
import numpy as np import cv2 import time def connect( channel): return cv2.VideoCapture(channel) def capture_image (device,exposition): cam= connect(device) for i in range(exposition): ret, bgr_img = cam.read() cam.release() return bgr_img #Test unit...
0
0
0
0
0
219
0
-3
70
f20b27cf456d5eeefe90b7cde2cb3bf4272e1e3f
129
py
Python
tests/inputs/misc/81-builtin-funcs.py
helq/pytropos
497ed5902e6e4912249ca0a46b477f9bfa6ae80a
[ "MIT" ]
4
2019-10-06T18:01:24.000Z
2020-07-03T05:27:35.000Z
tests/inputs/misc/81-builtin-funcs.py
helq/pytropos
497ed5902e6e4912249ca0a46b477f9bfa6ae80a
[ "MIT" ]
5
2021-06-07T15:50:04.000Z
2021-06-07T15:50:06.000Z
tests/inputs/misc/81-builtin-funcs.py
helq/pytropos
497ed5902e6e4912249ca0a46b477f9bfa6ae80a
[ "MIT" ]
null
null
null
a = float(2) b = int(2.0) c = bool(a) d = float(None) # fails e = int(None) # fails f = bool(None) # fails # show_store()
14.333333
24
0.550388
a = float(2) b = int(2.0) c = bool(a) d = float(None) # fails e = int(None) # fails f = bool(None) # fails # show_store()
0
0
0
0
0
0
0
0
0
971441945df4116d6f750cbc934993c8e55ff602
605
py
Python
Curso_Python_3_UDEMY/banco_dados/contatos_grupo.py
DanilooSilva/Cursos_de_Python
8f167a4c6e16f01601e23b6f107578aa1454472d
[ "MIT" ]
null
null
null
Curso_Python_3_UDEMY/banco_dados/contatos_grupo.py
DanilooSilva/Cursos_de_Python
8f167a4c6e16f01601e23b6f107578aa1454472d
[ "MIT" ]
null
null
null
Curso_Python_3_UDEMY/banco_dados/contatos_grupo.py
DanilooSilva/Cursos_de_Python
8f167a4c6e16f01601e23b6f107578aa1454472d
[ "MIT" ]
null
null
null
from db import nova_conexao from mysql.connector.errors import ProgrammingError sql = ''' SELECT A.NOME, A.TEL, B.DESCRICAO FROM CONTATOS A INNER JOIN GRUPOS B ON A.IDGRUPO = B.ID ORDER BY B.DESCRICAO, A.NOME ''' with nova_conexao() as conexao: try: c...
27.5
86
0.591736
from db import nova_conexao from mysql.connector.errors import ProgrammingError sql = ''' SELECT A.NOME, A.TEL, B.DESCRICAO FROM CONTATOS A INNER JOIN GRUPOS B ON A.IDGRUPO = B.ID ORDER BY B.DESCRICAO, A.NOME ''' with nova_conexao() as conexao: try: c...
0
0
0
0
0
0
0
0
0
048f47a7d570fbb6837142446eb4b40f6f3b3111
2,924
py
Python
logger/readers/mqtt_reader.py
anshika-agarwal/openrvdas
69c0c53902a988b790faad8baa21a5f299d033df
[ "BSD-2-Clause" ]
null
null
null
logger/readers/mqtt_reader.py
anshika-agarwal/openrvdas
69c0c53902a988b790faad8baa21a5f299d033df
[ "BSD-2-Clause" ]
null
null
null
logger/readers/mqtt_reader.py
anshika-agarwal/openrvdas
69c0c53902a988b790faad8baa21a5f299d033df
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python3 import sys from os.path import dirname, realpath; sys.path.append(dirname(dirname(dirname(realpath(__file__))))) # Don't barf if they don't have redis installed. Only complain if # they actually try to use it, below try: PAHO_ENABLED = True except ModuleNotFoundError: PAHO_ENABLED = False ...
27.327103
104
0.624487
#!/usr/bin/env python3 import json import logging import socket import sys from os.path import dirname, realpath; sys.path.append(dirname(dirname(dirname(realpath(__file__))))) from logger.utils.formats import Text from logger.readers.reader import Reader # Don't barf if they don't have redis installed. Only compla...
0
0
0
1,833
0
346
0
20
242
1ead3e61c0cfb9c1f187dba1bb471881875c24e4
1,167
py
Python
synch/replication/consumer.py
luolin0313/synch
1a4a1262c20a85fe06f2cb40291f0a066572518b
[ "Apache-2.0" ]
null
null
null
synch/replication/consumer.py
luolin0313/synch
1a4a1262c20a85fe06f2cb40291f0a066572518b
[ "Apache-2.0" ]
null
null
null
synch/replication/consumer.py
luolin0313/synch
1a4a1262c20a85fe06f2cb40291f0a066572518b
[ "Apache-2.0" ]
1
2020-09-28T01:37:00.000Z
2020-09-28T01:37:00.000Z
import logging logger = logging.getLogger("synch.replication.consumer")
32.416667
78
0.75407
import logging from synch.enums import ClickHouseEngine from synch.factory import Global from synch.replication.etl import etl_full from synch.writer.collapsing_merge_tree import ClickHouseCollapsingMergeTree from synch.writer.merge_tree import ClickHouseMergeTree logger = logging.getLogger("synch.replication.consume...
0
0
0
0
0
819
0
140
134
5005e0852fc10d13f279f0d30c991920b9d07e96
71,131
py
Python
jumeg/decompose/fourier_ica_plot.py
fboers/jumeg
e04896989faf72f4dbe7adf136e4d158d212f24a
[ "BSD-3-Clause" ]
6
2015-04-10T07:13:07.000Z
2021-12-12T04:04:37.000Z
jumeg/decompose/fourier_ica_plot.py
fboers/jumeg
e04896989faf72f4dbe7adf136e4d158d212f24a
[ "BSD-3-Clause" ]
112
2015-01-07T10:19:24.000Z
2022-02-01T15:48:16.000Z
jumeg/decompose/fourier_ica_plot.py
fboers/jumeg
e04896989faf72f4dbe7adf136e4d158d212f24a
[ "BSD-3-Clause" ]
22
2015-03-11T12:19:50.000Z
2021-11-20T04:24:42.000Z
# Authors: Lukas Breuer <[email protected]> """ ---------------------------------------------------------------------- --- jumeg.decompose.fourier_ica_plot --------------------------------- ---------------------------------------------------------------------- autor : Lukas Breuer email : l.breuer@fz-...
39.605234
132
0.505152
# Authors: Lukas Breuer <[email protected]> """ ---------------------------------------------------------------------- --- jumeg.decompose.fourier_ica_plot --------------------------------- ---------------------------------------------------------------------- autor : Lukas Breuer email : l.breuer@fz-...
0
0
0
0
0
0
0
-9
26
363cd66c50b81a1f02268cecb470ac1771146697
2,194
py
Python
experiments/tabular_benchmarks/process_HB.py
auto-flow/oxygen
6ff221027c4b1b022499d0b7d46b65f18815ada8
[ "BSD-3-Clause" ]
90
2020-12-14T23:35:40.000Z
2022-03-04T05:20:36.000Z
experiments/tabular_benchmarks/process_HB.py
auto-flow/oxygen
6ff221027c4b1b022499d0b7d46b65f18815ada8
[ "BSD-3-Clause" ]
1
2021-02-14T03:09:23.000Z
2021-02-17T03:39:40.000Z
experiments/tabular_benchmarks/process_HB.py
auto-flow/oxygen
6ff221027c4b1b022499d0b7d46b65f18815ada8
[ "BSD-3-Clause" ]
15
2020-12-22T09:54:58.000Z
2022-03-15T11:16:03.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author : qichun tang # @Contact : [email protected] from joblib import Parallel, delayed info = { "bohb": ("HpBandSter-BOHB", "r",), "ultraopt_BOHB": ("UltraOpt-BOHB", "g",), "ultraopt_HyperBand": ("HyperBand", "b",), "tpe": ("HyperOpt-TPE", "r",), ...
28.493506
68
0.597995
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author : qichun tang # @Contact : [email protected] import json import os from pathlib import Path import pandas as pd from joblib import Parallel, delayed from joblib import dump info = { "bohb": ("HpBandSter-BOHB", "r",), "ultraopt_BOHB": ("UltraOpt-BOHB"...
0
0
0
0
0
1,336
0
-19
134
cf2f5303e12688810ef838f064e43fa35b43f0f1
4,776
py
Python
docs/conf.py
Sohl-Dickstein/learned_optimization
cd929359a51d09444665021387c058aac11b63ba
[ "Apache-2.0" ]
70
2021-12-16T07:12:11.000Z
2022-03-31T19:13:36.000Z
docs/conf.py
Sohl-Dickstein/learned_optimization
cd929359a51d09444665021387c058aac11b63ba
[ "Apache-2.0" ]
10
2021-12-29T10:03:37.000Z
2022-03-22T15:59:55.000Z
docs/conf.py
Sohl-Dickstein/learned_optimization
cd929359a51d09444665021387c058aac11b63ba
[ "Apache-2.0" ]
5
2021-12-16T04:52:35.000Z
2022-03-22T03:45:31.000Z
# coding=utf-8 # Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
31.421053
80
0.695352
# coding=utf-8 # Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
0
0
0
0
0
0
0
0
0
f0dbbe1279aab50b7683686f8eb0d599271d1d74
4,229
py
Python
tfsnippet/layers/convolutional/shifted.py
QianLiGui/tfsnippet
63adaf04d2ffff8dec299623627d55d4bacac598
[ "MIT" ]
63
2018-06-06T11:56:40.000Z
2022-03-22T08:00:59.000Z
tfsnippet/layers/convolutional/shifted.py
QianLiGui/tfsnippet
63adaf04d2ffff8dec299623627d55d4bacac598
[ "MIT" ]
39
2018-07-04T12:40:53.000Z
2022-02-09T23:48:44.000Z
tfsnippet/layers/convolutional/shifted.py
QianLiGui/tfsnippet
63adaf04d2ffff8dec299623627d55d4bacac598
[ "MIT" ]
34
2018-06-25T09:59:22.000Z
2022-02-23T12:46:33.000Z
__all__ = ['shifted_conv2d']
38.099099
78
0.594703
import tensorflow as tf from tensorflow.contrib.framework import add_arg_scope from tfsnippet.utils import (add_name_and_scope_arg_doc, get_static_shape, get_default_scope_name) from .conv2d_ import conv2d from .utils import validate_conv2d_size_tuple, validate_conv2d_input __all__ = ['sh...
0
3,870
0
0
0
0
0
194
134
0a1e0a42a99ee6178be40181a0dbd0ab8c1ffad0
1,651
py
Python
ietf/meeting/feeds.py
unofficial-mirror/ietfdb
ce54adb30dc7299c6eb4d42b9aa9d2c2929c1a81
[ "BSD-3-Clause" ]
null
null
null
ietf/meeting/feeds.py
unofficial-mirror/ietfdb
ce54adb30dc7299c6eb4d42b9aa9d2c2929c1a81
[ "BSD-3-Clause" ]
null
null
null
ietf/meeting/feeds.py
unofficial-mirror/ietfdb
ce54adb30dc7299c6eb4d42b9aa9d2c2929c1a81
[ "BSD-3-Clause" ]
null
null
null
# Copyright The IETF Trust 2007-2019, All Rights Reserved # -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals
28.465517
122
0.623864
# Copyright The IETF Trust 2007-2019, All Rights Reserved # -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals import os from django.contrib.syndication.views import Feed from django.utils.feedgenerator import Atom1Feed from django.conf import settings from django.utils.h...
0
0
0
1,252
0
0
0
84
158
2319e91137f9efd7f01e9d5c2b0581591fd6d9c7
3,560
py
Python
Controller/DatabaseManager.py
TheConstructRIT/Machine-Swipe-System
857e5c5205638a212736d58ac9e1ae27fa300946
[ "MIT" ]
null
null
null
Controller/DatabaseManager.py
TheConstructRIT/Machine-Swipe-System
857e5c5205638a212736d58ac9e1ae27fa300946
[ "MIT" ]
null
null
null
Controller/DatabaseManager.py
TheConstructRIT/Machine-Swipe-System
857e5c5205638a212736d58ac9e1ae27fa300946
[ "MIT" ]
null
null
null
""" Zachary Cook Manages calls to the databases. """ """ Class representing the database. """ staticDatabaseManager = None """ Returns the static database instance. """ """ Returns the User for the given id (non-hash). If there is no registered User, None is returned. """ """ Sets the access type of a user. ...
25.248227
184
0.72191
""" Zachary Cook Manages calls to the databases. """ import sqlite3 from Controller import ConfigurationManager from Model import Time,User """ Class representing the database. """ class DatabaseManager: """ Creates a database manager. """ def __init__(self,location="database.sqlite"): self.database = sqlite...
0
0
0
2,385
0
552
0
21
199
ca15d3a39d10b75749c3989ddaa269a5e7fa2f8d
1,739
py
Python
src/hacenada/abstract.py
corydodt/Hacenada
32421d071bf684e56e629c84cfb6d585be5be846
[ "MIT" ]
1
2021-03-23T10:21:27.000Z
2021-03-23T10:21:27.000Z
src/hacenada/abstract.py
corydodt/Hacenada
32421d071bf684e56e629c84cfb6d585be5be846
[ "MIT" ]
1
2021-01-15T04:12:12.000Z
2021-01-15T04:12:12.000Z
src/hacenada/abstract.py
corydodt/Hacenada
32421d071bf684e56e629c84cfb6d585be5be846
[ "MIT" ]
null
null
null
""" Abstract types """
20.702381
81
0.592869
""" Abstract types """ from abc import ABC, abstractmethod import typing from hacenada.const import STR_DICT class SessionStorage(ABC): """ Provide access to the session's underlying storage through any mechanism """ answer: typing.Any meta: typing.Any @property def script_path(self): ...
0
1,037
0
544
0
0
0
20
113
4a5f5f16ca4b191cb32bb78237a6ad6567772ab5
6,965
py
Python
compounddb/tools.py
gitanna/chemminetools
1cfef18bcd773421c95f8662857f31e363211cdc
[ "BSD-4-Clause-UC" ]
2
2017-12-11T23:17:40.000Z
2020-08-17T08:35:01.000Z
compounddb/tools.py
gitanna/chemminetools
1cfef18bcd773421c95f8662857f31e363211cdc
[ "BSD-4-Clause-UC" ]
null
null
null
compounddb/tools.py
gitanna/chemminetools
1cfef18bcd773421c95f8662857f31e363211cdc
[ "BSD-4-Clause-UC" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- from django.db import models from django.contrib.auth.models import User from logging import root, basicConfig import openbabel import sys import re import tempfile import os import codecs import md5 import compounddb.sdfiterator import string import random cur_dir = os.path....
21.902516
162
0.560086
#!/usr/bin/python # -*- coding: utf-8 -*- from django.db import models from django.contrib.auth.models import User from logging import root, basicConfig import openbabel import sys import re import tempfile import os import codecs import md5 import compounddb.sdfiterator import string import random cur_dir = os.path....
0
0
0
0
0
377
0
10
69
7333e00acece91b14003ff4ab485dc5fbb7d6ece
725
py
Python
reservation_units/migrations/0040_reservationunit_tax_percentage.py
SuviVappula/tilavarauspalvelu-core
ad7dec36e392a7b2927e2f825c3b0eb29b700793
[ "MIT" ]
null
null
null
reservation_units/migrations/0040_reservationunit_tax_percentage.py
SuviVappula/tilavarauspalvelu-core
ad7dec36e392a7b2927e2f825c3b0eb29b700793
[ "MIT" ]
null
null
null
reservation_units/migrations/0040_reservationunit_tax_percentage.py
SuviVappula/tilavarauspalvelu-core
ad7dec36e392a7b2927e2f825c3b0eb29b700793
[ "MIT" ]
null
null
null
# Generated by Django 3.1.14 on 2021-12-13 11:06
32.954545
302
0.721379
# Generated by Django 3.1.14 on 2021-12-13 11:06 import django.db.models.deletion from django.db import migrations, models import reservation_units.models class Migration(migrations.Migration): dependencies = [ ('reservation_units', '0039_taxpercentage'), ] operations = [ migrations.Ad...
0
0
0
544
0
0
0
40
91
a1a9646cdfbe9e115bc034e382782125b3a992b9
569
py
Python
xtapi/__init__.py
istommao/xtapi
acc81493a11adea7f3bb75773bf8683a3ea74b9d
[ "MIT" ]
null
null
null
xtapi/__init__.py
istommao/xtapi
acc81493a11adea7f3bb75773bf8683a3ea74b9d
[ "MIT" ]
null
null
null
xtapi/__init__.py
istommao/xtapi
acc81493a11adea7f3bb75773bf8683a3ea74b9d
[ "MIT" ]
null
null
null
"""xtapi""" from fastapi import (Query, Path, Body, Cookie, Header, Form, File, UploadFile, Request, Response, status, Depends, APIRouter, HTTPException, BackgroundTasks) from .main import MainApp from .templates import Templates __all__ = [ 'Query', 'Path', 'Body', 'Cookie', 'Header', 'Form'...
12.931818
32
0.544815
"""xtapi""" from fastapi import ( Query, Path, Body, Cookie, Header, Form, File, UploadFile, Request, Response, status, Depends, APIRouter, HTTPException, BackgroundTasks ) from .main import MainApp from .templates import Templates __all__ = [ 'Query', ...
0
0
0
0
0
0
0
62
0
360b9d69d4522185d1aa103f09cae5f806771a7a
314
py
Python
sample/fun.py
henryneu/Python
41bdbe73944116dc5bbb27d5770d6f45c20276a5
[ "Apache-2.0" ]
1
2017-03-02T02:59:47.000Z
2017-03-02T02:59:47.000Z
sample/fun.py
henryneu/Python
41bdbe73944116dc5bbb27d5770d6f45c20276a5
[ "Apache-2.0" ]
null
null
null
sample/fun.py
henryneu/Python
41bdbe73944116dc5bbb27d5770d6f45c20276a5
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from math import sqrt from math import sin # # print(same(3, abs, sqrt, sin)) print(do_fun([1, 2, 4, 9], abs, sqrt, sin))
17.444444
43
0.60828
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from math import sqrt from math import sin # 函数作为参数传入 # 使用可变参数 def same(x, *fs): f = [f(x) for f in fs] return f def do_fun(x=[], *fu): fx = [f(x_i) for x_i in x for f in fu] return fx print(same(3, abs, sqrt, sin)) print(do_fun([1, 2, 4, 9], abs, sqrt, sin))
42
0
0
0
0
82
0
0
45
d503b7c3004d0aec97a03aa45fb4af6a06bd8cfd
1,537
py
Python
stepic_rec_2.py
pis2pis2/stepik_auto_tests_course
5bd5df105848582b58620373055e2f4fc945e5e2
[ "MIT" ]
null
null
null
stepic_rec_2.py
pis2pis2/stepik_auto_tests_course
5bd5df105848582b58620373055e2f4fc945e5e2
[ "MIT" ]
null
null
null
stepic_rec_2.py
pis2pis2/stepik_auto_tests_course
5bd5df105848582b58620373055e2f4fc945e5e2
[ "MIT" ]
null
null
null
from selenium import webdriver import time try: # link = "http://suninjuly.github.io/registration1.html" link = "http://suninjuly.github.io/registration2.html" browser = webdriver.Chrome() browser.get(link) # , input_first_name = browser.find_element_by_tag_name("input") input_first_...
37.487805
103
0.745608
from selenium import webdriver import time try: # link = "http://suninjuly.github.io/registration1.html" link = "http://suninjuly.github.io/registration2.html" browser = webdriver.Chrome() browser.get(link) # Ваш код, который заполняет обязательные поля input_first_name = browser.find_element...
768
0
0
0
0
0
0
0
0
a513ba215a5ee45deeea7edac6742335f7fa9630
919
py
Python
stock_rv_ranker/metrics/ranknet.py
Sci-Inference/stock-return-volatility-ranker
96dd865cac146c2cadea369df9552b9698dd05be
[ "Apache-2.0" ]
null
null
null
stock_rv_ranker/metrics/ranknet.py
Sci-Inference/stock-return-volatility-ranker
96dd865cac146c2cadea369df9552b9698dd05be
[ "Apache-2.0" ]
null
null
null
stock_rv_ranker/metrics/ranknet.py
Sci-Inference/stock-return-volatility-ranker
96dd865cac146c2cadea369df9552b9698dd05be
[ "Apache-2.0" ]
1
2022-01-23T06:35:44.000Z
2022-01-23T06:35:44.000Z
# https://gist.github.com/bwhite/3726239
21.372093
66
0.64309
import numpy as np # https://gist.github.com/bwhite/3726239 def precision_at_k(r, k): assert k >= 1 r = np.asarray(r)[:k] != 0 if r.size != k: raise ValueError('Relevance score length < k') return np.mean(r) def average_precision(r): r = np.asarray(r) != 0 out = [precision_at_k(r, k + 1) for k in range(r....
0
0
0
0
0
738
0
-3
137
8f5bbfeb8bfe3c37315237b9e16a94e21b9c4579
723
py
Python
projects/rpg/src/ex_teams_generator2/config/config.py
japinol7/some-examples
a31ab64f861a7e37685582a9fb92ac58f86295d9
[ "MIT" ]
1
2020-07-25T23:28:56.000Z
2020-07-25T23:28:56.000Z
projects/rpg/src/ex_teams_generator2/config/config.py
japinol7/some_examples
a31ab64f861a7e37685582a9fb92ac58f86295d9
[ "MIT" ]
null
null
null
projects/rpg/src/ex_teams_generator2/config/config.py
japinol7/some_examples
a31ab64f861a7e37685582a9fb92ac58f86295d9
[ "MIT" ]
null
null
null
import logging GROUP_SEPARATOR = f"{'-' * 10}" N_TEAMS = 42 N_MEMBERS = 3 N_TEAMS_MAX = 50 N_MEMBERS_MAX = 15 BODY_TEAMS_KEY = 'teams' BODY_ERRORS_KEY = 'errors' ERROR_TAG = 'Error' ERROR_MAX_MSG = f"User input Error. Maximum {N_TEAMS_MAX} teams and {N_MEMBERS_MAX} members for team. " \ f"Values mu...
27.807692
112
0.748271
import logging GROUP_SEPARATOR = f"{'-' * 10}" N_TEAMS = 42 N_MEMBERS = 3 N_TEAMS_MAX = 50 N_MEMBERS_MAX = 15 BODY_TEAMS_KEY = 'teams' BODY_ERRORS_KEY = 'errors' ERROR_TAG = 'Error' ERROR_MAX_MSG = f"User input Error. Maximum {N_TEAMS_MAX} teams and {N_MEMBERS_MAX} members for team. " \ f"Values mu...
0
0
0
0
0
0
0
0
0
da08051bd47a3da223c1b5849a5d7df3dec70611
49,656
py
Python
pmagpy/tsunashawfuncs.py
yamamon75/PmagPy
fa5b189800a239683fc17c6b312cdfdd839a46c3
[ "BSD-3-Clause" ]
null
null
null
pmagpy/tsunashawfuncs.py
yamamon75/PmagPy
fa5b189800a239683fc17c6b312cdfdd839a46c3
[ "BSD-3-Clause" ]
null
null
null
pmagpy/tsunashawfuncs.py
yamamon75/PmagPy
fa5b189800a239683fc17c6b312cdfdd839a46c3
[ "BSD-3-Clause" ]
null
null
null
import pandas as pd import pmagpy.ipmag as ipmag import pmagpy.pmag as pmag import pmagpy.pmagplotlib as pmagplotlib import scipy.integrate as integrate import scipy.stats as stats def find_best_API_portion_r(combinedRegs1,minFrac,minR,minSlopeT,maxSlopeT): """ Finds the best portion for NRM-TRM1* and ...
41.79798
168
0.616381
import matplotlib as mpl import matplotlib.pyplot as plt import multiprocessing as multi import numpy as np import os import pandas as pd import pmagpy import pmagpy.ipmag as ipmag import pmagpy.pmag as pmag import pmagpy.pmagplotlib as pmagplotlib import re import scipy.integrate as integrate import scipy.stats as st...
0
0
0
0
0
39,422
0
41
725
99102d586405e98b68ea689e5d8d0984d8adee8b
3,129
py
Python
hathor/p2p/messages.py
mbnunes/hathor-core
e5e0d4a627341e2a37ee46db5c9354ddb7f8dfb8
[ "Apache-2.0" ]
51
2019-12-28T03:33:27.000Z
2022-03-10T14:03:03.000Z
hathor/p2p/messages.py
mbnunes/hathor-core
e5e0d4a627341e2a37ee46db5c9354ddb7f8dfb8
[ "Apache-2.0" ]
316
2019-09-10T09:20:05.000Z
2022-03-31T20:18:56.000Z
hathor/p2p/messages.py
mbnunes/hathor-core
e5e0d4a627341e2a37ee46db5c9354ddb7f8dfb8
[ "Apache-2.0" ]
19
2020-01-04T00:13:18.000Z
2022-02-08T21:18:46.000Z
# Copyright 2021 Hathor Labs # # 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 writing, s...
26.294118
107
0.676894
# Copyright 2021 Hathor Labs # # 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 writing, s...
0
0
0
2,376
0
0
0
14
160
256b9c2991d095bc7b5875dc44f643f8c72cc6ef
1,980
py
Python
libya_elections/settings/dev.py
SmartElect/SmartElect
d6d35f2fa8f60e756ad5247f8f0a5f05830e92f8
[ "Apache-2.0" ]
23
2015-10-28T14:08:23.000Z
2021-09-11T21:38:41.000Z
libya_elections/settings/dev.py
SmartElect/SmartElect
d6d35f2fa8f60e756ad5247f8f0a5f05830e92f8
[ "Apache-2.0" ]
4
2019-12-05T20:36:10.000Z
2020-06-05T18:41:54.000Z
libya_elections/settings/dev.py
SmartElect/SmartElect
d6d35f2fa8f60e756ad5247f8f0a5f05830e92f8
[ "Apache-2.0" ]
11
2015-10-28T15:49:56.000Z
2021-09-14T14:18:36.000Z
import sys DEBUG = True SECRET_KEY = 'dummy secret key for testing only' INTERNAL_IPS = ('127.0.0.1', ) EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' CELERY_TASK_ALWAYS_EAGER = False INSTALLED_BACKENDS = { HTTPTESTER_BACKEND: { "ENGINE": "rapidsms.backends.database.DatabaseBackend",...
29.117647
94
0.676768
import sys from libya_elections.settings.base import * # noqa DEBUG = True SECRET_KEY = 'dummy secret key for testing only' INTERNAL_IPS = ('127.0.0.1', ) EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' CELERY_TASK_ALWAYS_EAGER = False INSTALLED_BACKENDS = { HTTPTESTER_BACKEND: { "E...
0
0
0
0
0
0
0
22
31
d9da596db75589f3cb736b7eaf7f3d9f34f2592d
13,278
py
Python
pontoon/administration/tests/test_views.py
rhencke/pontoon
d530830acd4e03f3e29cae3273a5fede9f246499
[ "BSD-3-Clause" ]
1
2018-12-24T11:15:35.000Z
2018-12-24T11:15:35.000Z
pontoon/administration/tests/test_views.py
rhencke/pontoon
d530830acd4e03f3e29cae3273a5fede9f246499
[ "BSD-3-Clause" ]
1
2018-08-03T12:02:41.000Z
2018-08-03T12:02:41.000Z
pontoon/administration/tests/test_views.py
shkamaru/pontoon
6a1ec623d1518867e6b9b1d2059da00716a03ac0
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*-
33.029851
91
0.675629
# -*- coding: utf-8 -*- import pytest from django.core.urlresolvers import reverse from pontoon.administration.forms import ( ProjectForm, ) from pontoon.administration.views import _create_or_update_translated_resources from pontoon.base.models import ( Entity, Locale, Project, ProjectLocale, ...
36
12,530
0
0
0
0
0
358
342
e0cfbaa527144500c045f954a24270f62d26262d
1,870
py
Python
orix/quaternion/__init__.py
bm424/texpy
8d78b568209a6da36fc831c6bc9e2b0cb4c740c8
[ "MIT" ]
6
2018-02-05T18:37:10.000Z
2018-10-07T22:07:26.000Z
orix/quaternion/__init__.py
bm424/texpy
8d78b568209a6da36fc831c6bc9e2b0cb4c740c8
[ "MIT" ]
5
2018-11-04T18:06:28.000Z
2019-09-13T11:22:43.000Z
orix/quaternion/__init__.py
bm424/texpy
8d78b568209a6da36fc831c6bc9e2b0cb4c740c8
[ "MIT" ]
3
2019-04-27T09:24:28.000Z
2019-09-13T10:24:57.000Z
# -*- coding: utf-8 -*- # Copyright 2018-2022 the orix developers # # This file is part of orix. # # orix 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 version 3 of the License, or # (at your option) ...
36.666667
88
0.750802
# -*- coding: utf-8 -*- # Copyright 2018-2022 the orix developers # # This file is part of orix. # # orix 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 version 3 of the License, or # (at your option) ...
0
0
0
0
0
0
0
0
0
d5ff97767b950838b9579739fb6e42b24968f25c
24,761
py
Python
src/auctioneer.py
Brechard/Auctioneer
f530a0e00d333a9f4d2201e61094b9b4986117a5
[ "MIT" ]
2
2019-02-10T12:07:00.000Z
2020-03-15T13:29:47.000Z
src/auctioneer.py
Brechard/Auctioneer
f530a0e00d333a9f4d2201e61094b9b4986117a5
[ "MIT" ]
null
null
null
src/auctioneer.py
Brechard/Auctioneer
f530a0e00d333a9f4d2201e61094b9b4986117a5
[ "MIT" ]
null
null
null
if __name__ == '__main__': buyers = 10 strategy = [1 for n in range(buyers)] # strategy[0] = 4 auctioneer = Auctioneer(0.1, bidding_factor_strategy=strategy, M_types=3, K_sellers=4, N_buyer...
45.26691
119
0.619482
import random import matplotlib.pyplot as plt import numpy as np from prettytable import PrettyTable from auction import Auction class Auctioneer: def __init__(self, penalty_factor=0.1, bidding_factor_strategy=[], use_seller=True, starting_prices=[], M_types=3, K_sellers=4, N_buyers=10, R_roun...
0
0
0
23,941
0
0
0
19
135