hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
68097eba15392e818a32df460c2104fd3ca64819
4,729
py
Python
examples/resources/aws/subnet.py
cfeenstra67/statey
6d127ed48265e2e072fbb26486458a4b28a333ec
[ "MIT" ]
4
2021-02-16T19:34:38.000Z
2022-01-31T16:44:14.000Z
examples/resources/aws/subnet.py
cfeenstra67/statey
6d127ed48265e2e072fbb26486458a4b28a333ec
[ "MIT" ]
null
null
null
examples/resources/aws/subnet.py
cfeenstra67/statey
6d127ed48265e2e072fbb26486458a4b28a333ec
[ "MIT" ]
null
null
null
import asyncio import contextlib from typing import Dict, Any, Optional import aioboto3 import botocore import statey as st SubnetConfigType = st.Struct[ "vpc_id" : st.String, "cidr_block" : st.String, # Optional args "ipv6_cidr_block" : ~st.String, "map_public_ip_on_launch" : st.Boolean(default...
31.317881
85
0.60055
import asyncio import contextlib from typing import Dict, Any, Optional import aioboto3 import botocore import statey as st SubnetConfigType = st.Struct[ "vpc_id" : st.String, "cidr_block" : st.String, # Optional args "ipv6_cidr_block" : ~st.String, "map_public_ip_on_launch" : st.Boolean(default...
1,439
0
105
e00e30fcd11f60809f3d4358645861477fc96613
2,173
py
Python
constants.py
julzerinos/python-opencv-plant_detection
f7895d42cdf6c8d8a7fa43dd624024f185542207
[ "MIT" ]
10
2020-08-29T08:30:24.000Z
2022-02-15T14:06:19.000Z
constants.py
julzerinos/python-opencv-plant_detection
f7895d42cdf6c8d8a7fa43dd624024f185542207
[ "MIT" ]
null
null
null
constants.py
julzerinos/python-opencv-plant_detection
f7895d42cdf6c8d8a7fa43dd624024f185542207
[ "MIT" ]
3
2020-08-29T08:30:31.000Z
2021-01-09T07:52:45.000Z
class constants: """Class of constants for each component of detector """ class bgsub: """Background subtraction/segmentation mod [str] the segmentation model (MOG2, KNN, GMG) """ mod = 'MOG2' class HSV: """HSV inRange filtering maximum values and init...
21.949495
58
0.495628
class constants: """Class of constants for each component of detector """ class bgsub: """Background subtraction/segmentation mod [str] the segmentation model (MOG2, KNN, GMG) """ mod = 'MOG2' class HSV: """HSV inRange filtering maximum values and init...
0
0
0
194ab0dc74cd18f13ee2868097d1372c6db981b3
7,181
py
Python
archive/_s3.py
zpz/upathlib
5bf7013be244c5f1b276e0b0ac1b9d7637666ceb
[ "MIT" ]
null
null
null
archive/_s3.py
zpz/upathlib
5bf7013be244c5f1b276e0b0ac1b9d7637666ceb
[ "MIT" ]
19
2021-07-08T06:42:31.000Z
2021-10-15T09:07:17.000Z
archive/_s3.py
zpz/upathlib
5bf7013be244c5f1b276e0b0ac1b9d7637666ceb
[ "MIT" ]
null
null
null
import logging from pathlib import Path import time import boto3 # This module requires a directory `.aws/` containing credentials in the home directory, # or environment variables `AWS_ACCESS_KEY_ID`, and `AWS_SECRET_ACCESS_KEY`. logger = logging.getLogger(__name__)
32.640909
98
0.569002
import logging from pathlib import Path import time import boto3 # This module requires a directory `.aws/` containing credentials in the home directory, # or environment variables `AWS_ACCESS_KEY_ID`, and `AWS_SECRET_ACCESS_KEY`. logger = logging.getLogger(__name__) def _get_client(): return boto3.session.Se...
3,441
3,300
161
760e3cb5157583c0d49bb5b803c4560b4deaa6f3
3,105
py
Python
experiments/onmtf_cuda.py
lucasbrunialti/biclustering-experiments
30e51e23b0c3d91939bf7ec49c47d3035e6ecb57
[ "BSD-2-Clause" ]
3
2017-11-21T08:21:32.000Z
2020-03-10T14:57:06.000Z
experiments/onmtf_cuda.py
lucasbrunialti/biclustering-experiments
30e51e23b0c3d91939bf7ec49c47d3035e6ecb57
[ "BSD-2-Clause" ]
null
null
null
experiments/onmtf_cuda.py
lucasbrunialti/biclustering-experiments
30e51e23b0c3d91939bf7ec49c47d3035e6ecb57
[ "BSD-2-Clause" ]
4
2017-01-18T18:10:37.000Z
2021-12-15T02:23:15.000Z
import numpy as np import cudamat as cm
28.486239
76
0.58132
import numpy as np import cudamat as cm def matrix_factorization_clustering(X_aux, k, l, norm=False, num_iters=100): cm.cublas_init() m, n = X_aux.shape U = cm.CUDAMatrix(np.random.rand(m, k)) S = cm.CUDAMatrix(np.random.rand(k, l)) V = cm.CUDAMatrix(np.random.rand(n, l)) X = cm.CUDAMatrix(...
3,040
0
23
75f81d84c2a063746a49d48076491405182c7fc8
10,799
py
Python
storitch/handlers/store.py
thomaserlang/storitch
dbcf97af547d9cb1ae5c3994654e8db03e43a253
[ "MIT" ]
null
null
null
storitch/handlers/store.py
thomaserlang/storitch
dbcf97af547d9cb1ae5c3994654e8db03e43a253
[ "MIT" ]
1
2022-03-03T00:35:08.000Z
2022-03-03T00:35:08.000Z
storitch/handlers/store.py
thomaserlang/storitch
dbcf97af547d9cb1ae5c3994654e8db03e43a253
[ "MIT" ]
null
null
null
from typing import Union, Dict, List, Any, Tuple, Optional import json, tempfile, os, logging, re, shutil, mimetypes, good from tornado import httpclient, web, queues from storitch import utils, config from storitch.decorators import run_on_executor from wand import image, exceptions @web.stream_request_body def thum...
32.429429
96
0.567738
from typing import Union, Dict, List, Any, Tuple, Optional import json, tempfile, os, logging, re, shutil, mimetypes, good from tornado import httpclient, web, queues from storitch import utils, config from storitch.decorators import run_on_executor from wand import image, exceptions class Base_handler(web.RequestHand...
7,197
690
160
b0fbc439e2b9764f97c049f14ced20df3b6321a9
7,052
py
Python
ddf_library/functions/graph_lib/page_rank.py
eubr-bigsea/Compss-Python
09ab7c474c8badc9932de3e1148f62ffba16b0b2
[ "Apache-2.0" ]
3
2017-08-22T11:32:02.000Z
2021-08-09T09:35:51.000Z
ddf_library/functions/graph_lib/page_rank.py
eubr-bigsea/Compss-Python
09ab7c474c8badc9932de3e1148f62ffba16b0b2
[ "Apache-2.0" ]
null
null
null
ddf_library/functions/graph_lib/page_rank.py
eubr-bigsea/Compss-Python
09ab7c474c8badc9932de3e1148f62ffba16b0b2
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = "Lucas Miguel S Ponce" __email__ = "lucasmsp@gmail.com" from ddf_library.bases.metadata import Status, OPTGroup from ddf_library.bases.context_base import ContextBase from ddf_library.ddf import DDF from ddf_library.bases.ddf_model import ModelDDF from ddf_l...
29.630252
78
0.620108
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = "Lucas Miguel S Ponce" __email__ = "lucasmsp@gmail.com" from ddf_library.bases.metadata import Status, OPTGroup from ddf_library.bases.context_base import ContextBase from ddf_library.ddf import DDF from ddf_library.bases.ddf_model import ModelDDF from ddf_l...
768
0
22
faeba7f3ca3382662de94211ec44a097d3c7ac9f
1,390
py
Python
UART_py/tela_serial.py
Rodrigo98Matos/Interface-Grafca-Serial
b996655e7376229856116ec3d150f3210a82cb4d
[ "MIT" ]
null
null
null
UART_py/tela_serial.py
Rodrigo98Matos/Interface-Grafca-Serial
b996655e7376229856116ec3d150f3210a82cb4d
[ "MIT" ]
null
null
null
UART_py/tela_serial.py
Rodrigo98Matos/Interface-Grafca-Serial
b996655e7376229856116ec3d150f3210a82cb4d
[ "MIT" ]
null
null
null
import PySimpleGUI as sg from uart_serial import uart arduino = uart()
37.567568
117
0.538129
import PySimpleGUI as sg from uart_serial import uart arduino = uart() class tela: def __init__(self, portas): #Layout sg.theme('Black') layout = [ [sg.Text('Porta:',size=(7,0)),sg.Combo(values=(portas),key='porta')], [sg.Text('Baudrate:',size=(7,0)),sg.Combo(values...
1,250
-10
80
a747752e784483f13e0672fa7ef44261d743dd9f
403
py
Python
babybuddy/migrations/0017_promocode_max_usage_per_account.py
amcquistan/babyasst
310a7948f06b71ae0d62593a3b5932abfd4eb444
[ "BSD-2-Clause" ]
null
null
null
babybuddy/migrations/0017_promocode_max_usage_per_account.py
amcquistan/babyasst
310a7948f06b71ae0d62593a3b5932abfd4eb444
[ "BSD-2-Clause" ]
null
null
null
babybuddy/migrations/0017_promocode_max_usage_per_account.py
amcquistan/babyasst
310a7948f06b71ae0d62593a3b5932abfd4eb444
[ "BSD-2-Clause" ]
null
null
null
# Generated by Django 2.2.6 on 2019-11-27 20:28 from django.db import migrations, models
21.210526
49
0.615385
# Generated by Django 2.2.6 on 2019-11-27 20:28 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('babybuddy', '0016_auto_20191127_1424'), ] operations = [ migrations.AddField( model_name='promocode', name='max_usag...
0
289
23
838a777e045278ea92893c031457352439926ec4
1,897
py
Python
transact/models.py
BrilliantGrant/Transaction-application
988fdbd6ed8a1fea9ca8366eeb2b30275b727836
[ "MIT", "Unlicense" ]
null
null
null
transact/models.py
BrilliantGrant/Transaction-application
988fdbd6ed8a1fea9ca8366eeb2b30275b727836
[ "MIT", "Unlicense" ]
null
null
null
transact/models.py
BrilliantGrant/Transaction-application
988fdbd6ed8a1fea9ca8366eeb2b30275b727836
[ "MIT", "Unlicense" ]
null
null
null
from django.contrib.auth.models import User from tinymce.models import HTMLField from django.db import models # Create your models here.
25.293333
72
0.710596
from django.contrib.auth.models import User from tinymce.models import HTMLField from django.db import models # Create your models here. class Pic(models.Model): pic = models.ImageField(upload_to = "pics/",null = True) user = models.ForeignKey(User,null=True) pic_name = models.CharField(max_length = 30,nul...
504
1,209
45
4a30bc154d6f294fba0d9fd2e54096f76bfb7a5f
553
py
Python
migrations/versions/6564c80d1598_.py
realtimclemans/SafetyHealthDotCloud
c7eca52f3e6519de34b05ba573a5778423c2dae2
[ "MIT" ]
null
null
null
migrations/versions/6564c80d1598_.py
realtimclemans/SafetyHealthDotCloud
c7eca52f3e6519de34b05ba573a5778423c2dae2
[ "MIT" ]
1
2021-02-15T15:58:54.000Z
2021-02-15T15:58:54.000Z
migrations/versions/6564c80d1598_.py
realtimclemans/SafetyHealthDotCloud
c7eca52f3e6519de34b05ba573a5778423c2dae2
[ "MIT" ]
null
null
null
"""empty message Revision ID: 6564c80d1598 Revises: c3c2dc9000d3 Create Date: 2021-06-19 17:03:45.811885 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '6564c80d1598' down_revision = 'c3c2dc9000d3' branch_labels = None depends_on = None
19.068966
65
0.687161
"""empty message Revision ID: 6564c80d1598 Revises: c3c2dc9000d3 Create Date: 2021-06-19 17:03:45.811885 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '6564c80d1598' down_revision = 'c3c2dc9000d3' branch_labels = None depends_on = None def upgrade(): # ...
208
0
46
5eb6460889a29c993a99192a3b46f1a9dae54de9
1,181
py
Python
setup.py
tizz98/xl
4534a1792f878964fedd87432c438ab6364ece49
[ "MIT" ]
1
2018-03-30T17:36:41.000Z
2018-03-30T17:36:41.000Z
setup.py
tizz98/xl
4534a1792f878964fedd87432c438ab6364ece49
[ "MIT" ]
null
null
null
setup.py
tizz98/xl
4534a1792f878964fedd87432c438ab6364ece49
[ "MIT" ]
null
null
null
#!/usr/bin/env python try: from setuptools import setup except ImportError: from distutils.core import setup try: import pypandoc long_description = pypandoc.convert('README.md', 'rst') except (IOError, ImportError): with open('README.md') as f: long_description = f.read() from xl import ...
27.465116
69
0.647756
#!/usr/bin/env python try: from setuptools import setup except ImportError: from distutils.core import setup try: import pypandoc long_description = pypandoc.convert('README.md', 'rst') except (IOError, ImportError): with open('README.md') as f: long_description = f.read() from xl import ...
0
0
0
91c554ac6c77dd73935b5f3788cc38b6a16bd729
420
py
Python
GroupCondition.py
simplymanas/python-learning
75bc99c0dce211fd1bce5f6ce1155e0f4c71d7d0
[ "Apache-2.0" ]
4
2020-08-18T05:29:38.000Z
2021-03-13T19:01:10.000Z
GroupCondition.py
simplymanas/python-learning
75bc99c0dce211fd1bce5f6ce1155e0f4c71d7d0
[ "Apache-2.0" ]
null
null
null
GroupCondition.py
simplymanas/python-learning
75bc99c0dce211fd1bce5f6ce1155e0f4c71d7d0
[ "Apache-2.0" ]
1
2020-08-29T12:57:17.000Z
2020-08-29T12:57:17.000Z
# all, any for group condition check # Manas Dash # 22th July 2020 # think of any (or) and all (and) as series of logical or and and operators healthy_percentage = 100 have_money = 0 no_of_friends = 5 mental_happiness = [ healthy_percentage > 50, have_money > 0, no_of_friends >= 1 ] if all(mental_happiness): p...
17.5
75
0.738095
# all, any for group condition check # Manas Dash # 22th July 2020 # think of any (or) and all (and) as series of logical or and and operators healthy_percentage = 100 have_money = 0 no_of_friends = 5 mental_happiness = [ healthy_percentage > 50, have_money > 0, no_of_friends >= 1 ] if all(mental_happiness): p...
0
0
0
41559822f3cd5754bbcded35318328ac3c23e9ab
12,012
py
Python
zx64c/ast.py
khrynczenko/zx64c
5a95bef1dff281266ea3f0d0bfd63d27ab5e9965
[ "Apache-2.0" ]
null
null
null
zx64c/ast.py
khrynczenko/zx64c
5a95bef1dff281266ea3f0d0bfd63d27ab5e9965
[ "Apache-2.0" ]
null
null
null
zx64c/ast.py
khrynczenko/zx64c
5a95bef1dff281266ea3f0d0bfd63d27ab5e9965
[ "Apache-2.0" ]
null
null
null
from __future__ import annotations import abc from typing import List, Text, TypeVar, Generic from abc import ABC from functools import singledispatchmethod from dataclasses import dataclass from zx64c.types import Type, Callable T = TypeVar("T") @SjasmplusSnapshotProgram.__eq__.register @Program.__eq__.re...
24.217742
88
0.635614
from __future__ import annotations import abc from typing import List, Text, TypeVar, Generic from abc import ABC from functools import singledispatchmethod from dataclasses import dataclass from zx64c.types import Type, Callable T = TypeVar("T") class AstVisitor(ABC, Generic[T]): @abc.abstractmethod def ...
7,223
3,096
901
12d6ccc9bc22866f30ca1c766583f034776a1025
4,946
py
Python
src/lib/recorder.py
l-maia/viseron
d762be93db74f780db13ac332bf8673c41592aa9
[ "MIT" ]
null
null
null
src/lib/recorder.py
l-maia/viseron
d762be93db74f780db13ac332bf8673c41592aa9
[ "MIT" ]
null
null
null
src/lib/recorder.py
l-maia/viseron
d762be93db74f780db13ac332bf8673c41592aa9
[ "MIT" ]
null
null
null
import datetime import logging import os from threading import Thread import cv2 from lib.cleanup import SegmentCleanup from lib.helpers import draw_objects from lib.mqtt.camera import MQTTCamera from lib.segments import Segments LOGGER = logging.getLogger(__name__)
35.84058
88
0.641326
import datetime import logging import os from threading import Thread import cv2 from lib.cleanup import SegmentCleanup from lib.helpers import draw_objects from lib.mqtt.camera import MQTTCamera from lib.segments import Segments LOGGER = logging.getLogger(__name__) class FFMPEGRecorder: def __init__(self, con...
4,437
0
238
6ad5c56d611d041bd4e20428bfb9dda30e760ae2
810
py
Python
src/USEFUL/basic_examples/example_setdefault.py
binxiangni/Python-and-Algorithms-and-Data-Structures
d2c082d261a68b06f533703867ae8a90ac7f4df1
[ "MIT" ]
5
2017-08-03T06:33:49.000Z
2021-08-06T13:20:57.000Z
src/USEFUL/basic_examples/example_setdefault.py
ritahu/Python-and-Algorithms-and-Data-Structures
d2c082d261a68b06f533703867ae8a90ac7f4df1
[ "MIT" ]
null
null
null
src/USEFUL/basic_examples/example_setdefault.py
ritahu/Python-and-Algorithms-and-Data-Structures
d2c082d261a68b06f533703867ae8a90ac7f4df1
[ "MIT" ]
6
2017-04-27T13:30:49.000Z
2020-11-01T20:28:55.000Z
#!/usr/bin/env python __author__ = "bt3" if __name__ == '__main__': test_setdef()
20.769231
51
0.549383
#!/usr/bin/env python __author__ = "bt3" def usual_dict(dict_data): newdata = {} for k, v in dict_data: if k in newdata: newdata[k].append(v) else: newdata[k] = [v] return newdata def setdefault_dict(dict_data): newdata = {} for k, v in dict_data: ...
648
0
69
aa3156cdaa41c2efd05f58391fef51ddc65a1c89
423
py
Python
examples/PyObjC/pbplugin/PyTestPlugin.py
flupke/py2app
8eb6c618f9c63d6ac970fb145a7f7782b71bcb4d
[ "MIT" ]
81
2015-11-29T12:17:39.000Z
2021-08-02T07:06:51.000Z
examples/PyObjC/pbplugin/PyTestPlugin.py
flupke/py2app
8eb6c618f9c63d6ac970fb145a7f7782b71bcb4d
[ "MIT" ]
11
2016-10-23T16:34:10.000Z
2022-01-30T05:45:54.000Z
examples/PyObjC/pbplugin/PyTestPlugin.py
flupke/py2app
8eb6c618f9c63d6ac970fb145a7f7782b71bcb4d
[ "MIT" ]
21
2016-01-25T18:46:31.000Z
2021-01-08T17:38:03.000Z
from Foundation import * import objc import sys print "PyTestPlugin", __name__ print u"[inside] currentBundle %r" % (objc.currentBundle(),)
23.5
60
0.664303
from Foundation import * import objc import sys class PyTestPlugin(NSObject): def init(self): self = super(PyTestPlugin, self).init() print 'class load!!' print "Hello from py2app" print "frozen", repr(getattr(sys, "frozen", None)) return self class PyTestPlugin2(NSObject):...
184
26
72
4daa46c2152e35f2d6fed9c1e7f117f7a7694955
439
py
Python
tests/grammar/grammars/simple.py
AlexandreH/securify2
2d2ba0e1c20cdda550120ecdc1a7164db9b90e3c
[ "Apache-2.0" ]
258
2020-01-23T16:58:38.000Z
2022-03-31T17:29:25.000Z
tests/grammar/grammars/simple.py
sirhashalot/securify2
6852707449577add14bafce8e304946b3490a977
[ "Apache-2.0" ]
34
2020-01-30T06:11:58.000Z
2022-02-27T07:53:17.000Z
tests/grammar/grammars/simple.py
sirhashalot/securify2
6852707449577add14bafce8e304946b3490a977
[ "Apache-2.0" ]
66
2020-01-28T09:23:05.000Z
2022-03-22T09:01:43.000Z
from __future__ import annotations from typing import Sequence, Union, Optional from securify.grammar import abstract_production, production @abstract_production @abstract_production @production @production @production @production
12.911765
60
0.738041
from __future__ import annotations from typing import Sequence, Union, Optional from securify.grammar import abstract_production, production @abstract_production class Base: pass @abstract_production class AOrC(Base): pass @production class A(AOrC, Base): optional: Optional[Base] @production class B...
0
64
132
ab7e4c8ae6107856ac778d397edffb130f2bed1a
2,490
py
Python
includes/vars.py
jerseyshawn/cf-vcap-vars
26effac112b500271e2f5ed298f0e6ab50bd7c4e
[ "MIT" ]
null
null
null
includes/vars.py
jerseyshawn/cf-vcap-vars
26effac112b500271e2f5ed298f0e6ab50bd7c4e
[ "MIT" ]
null
null
null
includes/vars.py
jerseyshawn/cf-vcap-vars
26effac112b500271e2f5ed298f0e6ab50bd7c4e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from os import environ from json import dumps
35.571429
83
0.485944
#!/usr/bin/env python3 from os import environ from json import dumps class CloudFoundry: def __init__(self, **kwargs): self.__CF_VARIABLES__ = {'CF_INSTANCE_ADDR': '', 'CF_INSTANCE_GUID': '', 'CF_INSTANCE_INDEX': '', 'CF_INST...
2,297
-2
121
5e95808d29aa13d8d01042969663da9c93db20f1
212
py
Python
virtual_box_tools/custom_argument_parser.py
FunTimeCoding/virtualbox-tools
bc6b4ad90d711fda64f76275f65e6c01ae3caa3f
[ "MIT" ]
4
2017-08-05T10:51:34.000Z
2019-06-24T02:56:31.000Z
virtual_box_tools/custom_argument_parser.py
FunTimeCoding/virtualbox-tools
bc6b4ad90d711fda64f76275f65e6c01ae3caa3f
[ "MIT" ]
null
null
null
virtual_box_tools/custom_argument_parser.py
FunTimeCoding/virtualbox-tools
bc6b4ad90d711fda64f76275f65e6c01ae3caa3f
[ "MIT" ]
1
2017-08-05T09:23:51.000Z
2017-08-05T09:23:51.000Z
from argparse import ArgumentParser from sys import exit, stderr
21.2
45
0.693396
from argparse import ArgumentParser from sys import exit, stderr class CustomArgumentParser(ArgumentParser): def error(self, message) -> None: stderr.write('Error: %s\n' % message) exit(1)
75
22
49
f6bbb564e37b6b680c5c92655011416fe930bcbf
2,043
py
Python
vega/__init__.py
zjzh/vega
aa6e7b8c69024262fc483ee06113b4d1bd5156d8
[ "Apache-2.0" ]
null
null
null
vega/__init__.py
zjzh/vega
aa6e7b8c69024262fc483ee06113b4d1bd5156d8
[ "Apache-2.0" ]
null
null
null
vega/__init__.py
zjzh/vega
aa6e7b8c69024262fc483ee06113b4d1bd5156d8
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE...
28.375
96
0.714146
# -*- coding:utf-8 -*- # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE...
0
0
0
a3fd214bd3ac94e9556d5163c8b69ad52bfd9956
13,033
py
Python
colour/models/tests/test_cie_lab.py
MaxSchambach/colour
3f3685d616fda4be58cec20bc1e16194805d7e2d
[ "BSD-3-Clause" ]
null
null
null
colour/models/tests/test_cie_lab.py
MaxSchambach/colour
3f3685d616fda4be58cec20bc1e16194805d7e2d
[ "BSD-3-Clause" ]
null
null
null
colour/models/tests/test_cie_lab.py
MaxSchambach/colour
3f3685d616fda4be58cec20bc1e16194805d7e2d
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Defines unit tests for :mod:`colour.models.cie_lab` module. """ from __future__ import division, unicode_literals import numpy as np import unittest from itertools import permutations from colour.models import XYZ_to_Lab, Lab_to_XYZ, Lab_to_LCHab, LCHab_to_Lab from colour.utilities import...
34.028721
79
0.58559
# -*- coding: utf-8 -*- """ Defines unit tests for :mod:`colour.models.cie_lab` module. """ from __future__ import division, unicode_literals import numpy as np import unittest from itertools import permutations from colour.models import XYZ_to_Lab, Lab_to_XYZ, Lab_to_LCHab, LCHab_to_Lab from colour.utilities import...
0
0
0
84c76c41a480dae4b33646b4f0e6c9ccbdced4c9
17,510
py
Python
letype_extractor.py
olzama/neural-supertagging
340a9b3eaf6427e5ec475cd03bc6f4b3d4891ba4
[ "MIT" ]
null
null
null
letype_extractor.py
olzama/neural-supertagging
340a9b3eaf6427e5ec475cd03bc6f4b3d4891ba4
[ "MIT" ]
null
null
null
letype_extractor.py
olzama/neural-supertagging
340a9b3eaf6427e5ec475cd03bc6f4b3d4891ba4
[ "MIT" ]
null
null
null
from delphin import tdl, itsdb from delphin.tokens import YYTokenLattice import glob, sys, pathlib import json, pickle import numpy as np from collections import OrderedDict import pos_map from datetime import datetime CONTEXT_WINDOW = 2 DEV = ['ws212', 'ecpa'] TEST = ['cb', 'ecpr', 'jhk', 'jhu', 'tgk', 'tgu', 'psk',...
46.693333
116
0.525871
from delphin import tdl, itsdb from delphin.tokens import YYTokenLattice import glob, sys, pathlib import json, pickle import numpy as np from collections import OrderedDict import pos_map from datetime import datetime CONTEXT_WINDOW = 2 DEV = ['ws212', 'ecpa'] TEST = ['cb', 'ecpr', 'jhk', 'jhu', 'tgk', 'tgu', 'psk',...
15,668
0
457
e415bab977b01817df0d4c4b2e45aacf11aa8fbf
2,294
py
Python
homeassistant/components/environment_canada/camera.py
mtarjoianu/core
44e9146463ac505eb3d1c0651ad126cb25c28a54
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
homeassistant/components/environment_canada/camera.py
mtarjoianu/core
44e9146463ac505eb3d1c0651ad126cb25c28a54
[ "Apache-2.0" ]
24,710
2016-04-13T08:27:26.000Z
2020-03-02T12:59:13.000Z
homeassistant/components/environment_canada/camera.py
mtarjoianu/core
44e9146463ac505eb3d1c0651ad126cb25c28a54
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Support for the Environment Canada radar imagery.""" from __future__ import annotations import voluptuous as vol from homeassistant.components.camera import Camera from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import ( ...
33.246377
79
0.722319
"""Support for the Environment Canada radar imagery.""" from __future__ import annotations import voluptuous as vol from homeassistant.components.camera import Camera from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import ( ...
0
0
0
dfd8028393ae8ae7d4bfcfe8f9c74276b8f956f7
308
py
Python
v1/chapter6/4-readingCsvDict.py
QTYResources/python-scraping
d7afe25a012fb5d079ee42372c7fce94b9494b9f
[ "MIT" ]
null
null
null
v1/chapter6/4-readingCsvDict.py
QTYResources/python-scraping
d7afe25a012fb5d079ee42372c7fce94b9494b9f
[ "MIT" ]
null
null
null
v1/chapter6/4-readingCsvDict.py
QTYResources/python-scraping
d7afe25a012fb5d079ee42372c7fce94b9494b9f
[ "MIT" ]
null
null
null
from urllib.request import urlopen from io import StringIO import csv data = urlopen("http://pythonscraping.com/files/MontyPythonAlbums.csv").read().decode('ascii', 'ignore') dataFile = StringIO(data) dictReader = csv.DictReader(dataFile) print(dictReader.fieldnames) for row in dictReader: print(row)
25.666667
104
0.775974
from urllib.request import urlopen from io import StringIO import csv data = urlopen("http://pythonscraping.com/files/MontyPythonAlbums.csv").read().decode('ascii', 'ignore') dataFile = StringIO(data) dictReader = csv.DictReader(dataFile) print(dictReader.fieldnames) for row in dictReader: print(row)
0
0
0
02ae809d3645a6053bab6f39633b7e2d90bf2e2e
741
py
Python
hash-array-string/1.8-zero-matrix/main.py
digoreis/code-interview
e2250c39b0fc9b6a8f0bc151b4f796d17cdce3e3
[ "MIT" ]
null
null
null
hash-array-string/1.8-zero-matrix/main.py
digoreis/code-interview
e2250c39b0fc9b6a8f0bc151b4f796d17cdce3e3
[ "MIT" ]
null
null
null
hash-array-string/1.8-zero-matrix/main.py
digoreis/code-interview
e2250c39b0fc9b6a8f0bc151b4f796d17cdce3e3
[ "MIT" ]
null
null
null
# Write an algorithm such that if an element in MxN matrix is 0, it's entire row and column are set to 0. matrix = [[1,1,1,1],[1,1,1,1],[1,1,0,1],[1,1,1,1],[1,1,1,0]] matrixZero(matrix) print('\n'.join(['\t'.join([str(cell) for cell in row]) for row in matrix]))
26.464286
105
0.562753
# Write an algorithm such that if an element in MxN matrix is 0, it's entire row and column are set to 0. def rowZero(matrix, row): for i in range(len(matrix[row])): matrix[row][i] = 0 def columnZero(matrix, column): for i in range(len(matrix)): matrix[i][column] = 0 def matrixZero(matrix): ...
393
0
68
d805c677ed9537d580479c240741257bc4c84e5c
4,725
py
Python
src/Class/shadowedrice.py
Jonathan-Browning/Shadowed-Rician-Fading-Python
c1faa061c4d2a253bd1fe7098edc0e21740cb3ea
[ "MIT" ]
2
2021-02-23T15:49:47.000Z
2021-04-24T01:32:42.000Z
src/Class/shadowedrice.py
Jonathan-Browning/Shadowed-Rician-Fading-Python
c1faa061c4d2a253bd1fe7098edc0e21740cb3ea
[ "MIT" ]
null
null
null
src/Class/shadowedrice.py
Jonathan-Browning/Shadowed-Rician-Fading-Python
c1faa061c4d2a253bd1fe7098edc0e21740cb3ea
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Wed Nov 4 18:55:46 2020 @author: Jonathan Browning """ import numpy as np from scipy.stats import gaussian_kde as kdf from scipy import special as sp
36.346154
151
0.572275
# -*- coding: utf-8 -*- """ Created on Wed Nov 4 18:55:46 2020 @author: Jonathan Browning """ import numpy as np from scipy.stats import gaussian_kde as kdf from scipy import special as sp class ShadowedRice: numSamples = 2*(10**6) # the number of samples used in the simulation r = np.linspace(0, 6, 6000) ...
3,978
525
23
c00b03a6c58efa0a53f7586ea8d163bb92f588f1
1,063
py
Python
src/ggrc_workflows/migrations/versions/20170925135632_3ebe14ae9547_set_empty_next_cycle_start_date.py
HLD/ggrc-core
9bdc0fc6ca9e252f4919db682d80e360d5581eb4
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/ggrc_workflows/migrations/versions/20170925135632_3ebe14ae9547_set_empty_next_cycle_start_date.py
HLD/ggrc-core
9bdc0fc6ca9e252f4919db682d80e360d5581eb4
[ "ECL-2.0", "Apache-2.0" ]
10
2018-07-06T00:04:23.000Z
2021-02-26T21:13:20.000Z
src/ggrc_workflows/migrations/versions/20170925135632_3ebe14ae9547_set_empty_next_cycle_start_date.py
HLD/ggrc-core
9bdc0fc6ca9e252f4919db682d80e360d5581eb4
[ "ECL-2.0", "Apache-2.0" ]
1
2017-11-11T22:16:56.000Z
2017-11-11T22:16:56.000Z
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """ Set empty next_cycle_start_date Create Date: 2017-09-25 13:56:32.087965 """ # disable Invalid constant name pylint warning for mandatory Alembic variables. # pylint: disable=invalid-name from alembic i...
29.527778
79
0.664158
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """ Set empty next_cycle_start_date Create Date: 2017-09-25 13:56:32.087965 """ # disable Invalid constant name pylint warning for mandatory Alembic variables. # pylint: disable=invalid-name from alembic i...
0
0
0
a9dd6bbf97a596cde44dca1d194056908053fcb0
29,435
py
Python
test/test_madx.py
odidev/cpymad
7b58d013a669d0973c233743e05fa205257233dd
[ "ECL-2.0", "Apache-2.0" ]
22
2015-05-27T13:45:55.000Z
2022-03-03T15:43:47.000Z
test/test_madx.py
odidev/cpymad
7b58d013a669d0973c233743e05fa205257233dd
[ "ECL-2.0", "Apache-2.0" ]
102
2015-01-23T18:21:29.000Z
2022-02-28T17:07:26.000Z
test/test_madx.py
odidev/cpymad
7b58d013a669d0973c233743e05fa205257233dd
[ "ECL-2.0", "Apache-2.0" ]
18
2015-01-24T12:43:57.000Z
2021-11-23T08:29:57.000Z
""" Tests for the :class:`cpymad.madx.Madx` API. """ import os import sys import numpy as np from numpy.testing import assert_allclose, assert_equal from pytest import approx, fixture, mark, raises import cpymad from cpymad.madx import Madx, Sequence, metadata @fixture @fixture SEQU = """ ! constants QP_K1 = 2...
29.114738
77
0.592526
""" Tests for the :class:`cpymad.madx.Madx` API. """ import os import sys import numpy as np from numpy.testing import assert_allclose, assert_equal from pytest import approx, fixture, mark, raises import cpymad from cpymad.madx import Madx, Sequence, metadata @fixture def mad(): with Madx(prompt='X:> ') as ma...
24,594
0
1,077
beca016de282d8ad828e46810f9fa27aac015a7f
4,852
py
Python
geneticpython/engines/single_objective/single_objective_engine.py
ngocjr7/geneticpython
4b4157523ce13b3da56cef61282cb0a984cd317b
[ "MIT" ]
null
null
null
geneticpython/engines/single_objective/single_objective_engine.py
ngocjr7/geneticpython
4b4157523ce13b3da56cef61282cb0a984cd317b
[ "MIT" ]
null
null
null
geneticpython/engines/single_objective/single_objective_engine.py
ngocjr7/geneticpython
4b4157523ce13b3da56cef61282cb0a984cd317b
[ "MIT" ]
null
null
null
""" File: single_objective_engine.py Author: ngocjr7 Email: ngocjr7@gmail.com Github: https://github.com/ngocjr7 Description: """ from __future__ import absolute_import from typing import List, Union, Callable from functools import wraps from collections import OrderedDict from ..geneticengine import GeneticEngine ...
38.816
83
0.557708
""" File: single_objective_engine.py Author: ngocjr7 Email: ngocjr7@gmail.com Github: https://github.com/ngocjr7 Description: """ from __future__ import absolute_import from typing import List, Union, Callable from functools import wraps from collections import OrderedDict from ..geneticengine import GeneticEngine ...
2,127
2,130
23
6c1a2218b3975b6c65e1c36ce24d867d86a06bee
517
py
Python
timing.py
darkless456/Python
1ba37d028e4a818ccfffc18682c1bac15554e3ac
[ "MIT" ]
null
null
null
timing.py
darkless456/Python
1ba37d028e4a818ccfffc18682c1bac15554e3ac
[ "MIT" ]
null
null
null
timing.py
darkless456/Python
1ba37d028e4a818ccfffc18682c1bac15554e3ac
[ "MIT" ]
null
null
null
# timing.py import datetime, calendar today = datetime.date.today() yesterday = today - datetime.timedelta(days = 1) tomorrow = today + datetime.timedelta(days = 1) print(yesterday, today, tomorrow) # ------------------------- ''' last_friday = datetime.date.today() oneday = datetime.timedelta(days = 1) while la...
19.884615
48
0.659574
# timing.py import datetime, calendar today = datetime.date.today() yesterday = today - datetime.timedelta(days = 1) tomorrow = today + datetime.timedelta(days = 1) print(yesterday, today, tomorrow) # ------------------------- ''' last_friday = datetime.date.today() oneday = datetime.timedelta(days = 1) while la...
0
0
0
1676722d3f346db563fa9c4d25ad5528e4cd54fa
25,385
py
Python
manticore/core/smtlib/visitors.py
Srinivas11789/manticore
af3c6aada811833864efaccef7477f14e9b5e0dd
[ "Apache-2.0" ]
null
null
null
manticore/core/smtlib/visitors.py
Srinivas11789/manticore
af3c6aada811833864efaccef7477f14e9b5e0dd
[ "Apache-2.0" ]
null
null
null
manticore/core/smtlib/visitors.py
Srinivas11789/manticore
af3c6aada811833864efaccef7477f14e9b5e0dd
[ "Apache-2.0" ]
null
null
null
from manticore.utils.helpers import CacheDict from .expression import * from functools import lru_cache import logging import operator logger = logging.getLogger(__name__) class Visitor(object): ''' Class/Type Visitor Inherit your class visitor from this one and get called on a different visiting f...
34.869505
167
0.593146
from manticore.utils.helpers import CacheDict from .expression import * from functools import lru_cache import logging import operator logger = logging.getLogger(__name__) class Visitor(object): ''' Class/Type Visitor Inherit your class visitor from this one and get called on a different visiting f...
10,256
9,441
942
34a65f614b2aed9614eeb0a853f10c891d51443b
280
py
Python
account/urls.py
Wizock/CRUD-master
07fbf3c64610a8725724fc934e66c6be35690cc9
[ "CC0-1.0" ]
1
2022-03-13T09:50:04.000Z
2022-03-13T09:50:04.000Z
account/urls.py
Wizock/TodoButBetter
07fbf3c64610a8725724fc934e66c6be35690cc9
[ "CC0-1.0" ]
null
null
null
account/urls.py
Wizock/TodoButBetter
07fbf3c64610a8725724fc934e66c6be35690cc9
[ "CC0-1.0" ]
null
null
null
from django import urls from django.conf.urls import include, url from django.contrib.auth.forms import AdminPasswordChangeForm from django.urls import path from .views import * urlpatterns = [ path(r'user/<str:usr>/', accountView), path('register_/', register_), ]
23.333333
61
0.739286
from django import urls from django.conf.urls import include, url from django.contrib.auth.forms import AdminPasswordChangeForm from django.urls import path from .views import * urlpatterns = [ path(r'user/<str:usr>/', accountView), path('register_/', register_), ]
0
0
0
eb106290ccfcc64601c7996ff5449b815f8ad55c
1,020
py
Python
pyaibot.py
linsicheng20060818/PythonExercises
dff362b066de54186d8e2a71f0fb6b8fcb1c8f2a
[ "MIT" ]
2
2019-01-05T13:34:08.000Z
2019-01-06T05:33:17.000Z
pyaibot.py
linsicheng20060818/PythonExercises
dff362b066de54186d8e2a71f0fb6b8fcb1c8f2a
[ "MIT" ]
null
null
null
pyaibot.py
linsicheng20060818/PythonExercises
dff362b066de54186d8e2a71f0fb6b8fcb1c8f2a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """try: import jieba except: print("please install jieba first.") input("press any key to continue") quit()"""
25.5
73
0.435294
# -*- coding: utf-8 -*- """try: import jieba except: print("please install jieba first.") input("press any key to continue") quit()""" def chchat(a): import jieba v=False #if a=="quit" or a=="exit" or a=="退出" or a=="再见": # import os # exit()#Error list1=jieba.lcut(a)#jieba分...
900
0
22
040bfae6c7070cefcd380adace083b08384a141a
391
py
Python
map_annotate_app/admin.py
tushar-agarwal/WikiNearby
0cc10bdeb1cb0728a6405808cc25f2d9e65dcb95
[ "MIT" ]
2
2018-03-20T21:30:35.000Z
2019-03-19T04:58:42.000Z
map_annotate_app/admin.py
tushar-agarwal/map_annotate
0cc10bdeb1cb0728a6405808cc25f2d9e65dcb95
[ "MIT" ]
2
2016-08-21T13:21:51.000Z
2016-09-07T10:01:24.000Z
map_annotate_app/admin.py
tushar-agarwal/WikiNearby
0cc10bdeb1cb0728a6405808cc25f2d9e65dcb95
[ "MIT" ]
2
2016-10-06T13:47:24.000Z
2017-02-13T23:10:12.000Z
""" This is the C{admin.py} file for C{map_annotate_app}. For more details, see the documentation for C{map_annotate_app}. """ from django.contrib import admin from .models import Crime from .models import CrimeType from .models import Location from .models import Sansad admin.site.register(Location) admin.site.regi...
23
64
0.792839
""" This is the C{admin.py} file for C{map_annotate_app}. For more details, see the documentation for C{map_annotate_app}. """ from django.contrib import admin from .models import Crime from .models import CrimeType from .models import Location from .models import Sansad admin.site.register(Location) admin.site.regi...
0
0
0
81256977bc9b0ff7623132bef93f3ba3fe7872ae
4,444
py
Python
parsers.py
ekiwi/parsers
1837fe8c76b813da7befeee99668ab59b51aaefa
[ "BSD-2-Clause" ]
null
null
null
parsers.py
ekiwi/parsers
1837fe8c76b813da7befeee99668ab59b51aaefa
[ "BSD-2-Clause" ]
null
null
null
parsers.py
ekiwi/parsers
1837fe8c76b813da7befeee99668ab59b51aaefa
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2018, University of California, Berkeley # author: Kevin Laeufer <laeufer@cs.berkeley.edu> from collections import defaultdict if __name__ == "__main__": g = Grammar() S, B, D, E, F = non_term = g.non_terminal('S', 'B', 'D', 'E', 'F') u, v, w, x, y,...
22.789744
81
0.633213
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2018, University of California, Berkeley # author: Kevin Laeufer <laeufer@cs.berkeley.edu> from collections import defaultdict class Symbol: def __init__(self, name, bold=False): self.name = name self._bold = bold def __str__(self): if self._bold: ...
3,174
-15
612
e6d68e135afb09552ac2f3d818b48fe79807d853
1,387
py
Python
Server.py
louis103/Python-Chat-Application
5212360194236daf5888d296fd71ed92303d7f94
[ "MIT" ]
1
2021-11-22T20:04:16.000Z
2021-11-22T20:04:16.000Z
Server.py
louis103/Python-Chat-Application
5212360194236daf5888d296fd71ed92303d7f94
[ "MIT" ]
null
null
null
Server.py
louis103/Python-Chat-Application
5212360194236daf5888d296fd71ed92303d7f94
[ "MIT" ]
null
null
null
import socket, threading HOST = "127.0.0.1" PORT = 9999 server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server.bind((HOST, PORT)) server.listen() clients = [] nicknames = [] # broadcast func # handle func # receive func print("******Server is running******") receive()
23.508475
72
0.581831
import socket, threading HOST = "127.0.0.1" PORT = 9999 server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server.bind((HOST, PORT)) server.listen() clients = [] nicknames = [] # broadcast func def broadcast(message): for client in clients: client.send(message) # handle fun...
999
0
69
d2d464639fd7c2110b4c254cb34f59661eddfc5e
18,069
py
Python
pypsi/core.py
Rudedog9d/pypsi
38dda442b21b8deb569d61076ab0a19c0e78edc8
[ "0BSD" ]
null
null
null
pypsi/core.py
Rudedog9d/pypsi
38dda442b21b8deb569d61076ab0a19c0e78edc8
[ "0BSD" ]
null
null
null
pypsi/core.py
Rudedog9d/pypsi
38dda442b21b8deb569d61076ab0a19c0e78edc8
[ "0BSD" ]
null
null
null
# # Copyright (c) 2015, Adam Meily <meily.adam@gmail.com> # Pypsi - https://github.com/ameily/pypsi # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # ...
38.363057
96
0.625989
# # Copyright (c) 2015, Adam Meily <meily.adam@gmail.com> # Pypsi - https://github.com/ameily/pypsi # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # ...
1,062
0
135
5050f96a5b09f087a43bfbf366927f7c8ded0262
687
py
Python
2020/6/main.py
klrkdekira/adventofcode
8384d919093712c95b707b8e3f293dbfba22be74
[ "BSD-2-Clause" ]
1
2020-12-01T08:41:55.000Z
2020-12-01T08:41:55.000Z
2020/6/main.py
klrkdekira/adventofcode
8384d919093712c95b707b8e3f293dbfba22be74
[ "BSD-2-Clause" ]
null
null
null
2020/6/main.py
klrkdekira/adventofcode
8384d919093712c95b707b8e3f293dbfba22be74
[ "BSD-2-Clause" ]
null
null
null
QUESTIONS = ['a', 'b', 'c', 'x', 'y', 'z'] if __name__ == '__main__': with open('input') as file: groups = [] group = [] for row in file: row = row.strip() if not row: groups.append(group) group = [] continue ...
24.535714
66
0.519651
QUESTIONS = ['a', 'b', 'c', 'x', 'y', 'z'] def anyone(group): answers = [] for person in group: answers.extend(person) return len(set(answers)) def everyone(group): answers = set.intersection(*(set(person) for person in group)) return len(answers) if __name__ == '__main__': with open(...
189
0
46
62d60dcf7dc46a76d9c2e17fa4e8e062fa646f12
9,440
py
Python
frille-lang/lib/python3.6/site-packages/pathy/gcs.py
frillecode/CDS-spring-2021-language
a0b2116044cd20d4a34b98f23bd2663256c90c5d
[ "MIT" ]
null
null
null
frille-lang/lib/python3.6/site-packages/pathy/gcs.py
frillecode/CDS-spring-2021-language
a0b2116044cd20d4a34b98f23bd2663256c90c5d
[ "MIT" ]
null
null
null
frille-lang/lib/python3.6/site-packages/pathy/gcs.py
frillecode/CDS-spring-2021-language
a0b2116044cd20d4a34b98f23bd2663256c90c5d
[ "MIT" ]
null
null
null
from dataclasses import dataclass from typing import Any, Dict, Generator, List, Optional from .base import ( Blob, Bucket, BucketClient, BucketEntry, ClientError, PathyScanDir, PurePathy, ) try: from google.api_core import exceptions as gcs_errors # type:ignore from google.auth.e...
34.327273
86
0.584322
from dataclasses import dataclass from typing import Any, Dict, Generator, List, Optional from .base import ( Blob, Bucket, BucketClient, BucketEntry, ClientError, PathyScanDir, PurePathy, ) try: from google.api_core import exceptions as gcs_errors # type:ignore from google.auth.e...
7,541
718
166
3deebfeffce2abe1ba44b1052c91bfb62a647fb4
1,750
py
Python
project/both.py
mahmoudabuelnaga/baby-names-scraping
44ded037a4c24306123c4da749e32575eee4afc6
[ "MIT" ]
null
null
null
project/both.py
mahmoudabuelnaga/baby-names-scraping
44ded037a4c24306123c4da749e32575eee4afc6
[ "MIT" ]
null
null
null
project/both.py
mahmoudabuelnaga/baby-names-scraping
44ded037a4c24306123c4da749e32575eee4afc6
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from time import sleep from bs4 import BeautifulSoup import csv import requests links = [] items = [] for i in range(1,38): endpoint = f"https://baby.webteb.com/baby-names/%D8%A7%D8%B3%D9%85%D8%A7%D8%A1-%D8%A7%D9%88%D9%84%D8%A7%D8%AF-%D9%88%D8%A8%D9%86%D8%A7%D8%AA?pageindex={i}" get_r...
29.166667
159
0.630857
# -*- coding: utf-8 -*- from time import sleep from bs4 import BeautifulSoup import csv import requests links = [] items = [] for i in range(1,38): endpoint = f"https://baby.webteb.com/baby-names/%D8%A7%D8%B3%D9%85%D8%A7%D8%A1-%D8%A7%D9%88%D9%84%D8%A7%D8%AF-%D9%88%D8%A8%D9%86%D8%A7%D8%AA?pageindex={i}" get_r...
0
0
0
bb2ad701ba189d46d6b8954c67ceae977de8da75
4,318
py
Python
sde/solvers.py
d-l-fernandes/ito_general
8a9889fa13e5893e923c8d32fd1c94d22aec84d9
[ "MIT" ]
null
null
null
sde/solvers.py
d-l-fernandes/ito_general
8a9889fa13e5893e923c8d32fd1c94d22aec84d9
[ "MIT" ]
null
null
null
sde/solvers.py
d-l-fernandes/ito_general
8a9889fa13e5893e923c8d32fd1c94d22aec84d9
[ "MIT" ]
null
null
null
from typing import Tuple import haiku as hk import jax.numpy as jnp import numpyro from absl import flags from numpyro.distributions.continuous import MultivariateNormal from sde import drifts, diffusions Array = jnp.ndarray flags.DEFINE_enum("solver", "strong_3_halfs", ["euler_maruyama", "strong_3_halfs"], "Solver...
40.35514
117
0.619268
from typing import Tuple import haiku as hk import jax.numpy as jnp import numpyro from absl import flags from numpyro.distributions.continuous import MultivariateNormal from sde import drifts, diffusions Array = jnp.ndarray flags.DEFINE_enum("solver", "strong_3_halfs", ["euler_maruyama", "strong_3_halfs"], "Solver...
3,602
29
228
79cfe256477332ba59823cac9001633a38f29bc4
5,767
py
Python
pysnmp/JUNIPER-SONET-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/JUNIPER-SONET-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/JUNIPER-SONET-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module JUNIPER-SONET-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/JUNIPER-SONET-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:50:16 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Ma...
128.155556
904
0.752211
# # PySNMP MIB module JUNIPER-SONET-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/JUNIPER-SONET-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:50:16 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Ma...
0
954
22
53e52201c1934896690b7be806684fdec6283cd9
4,864
py
Python
test/test_client_ip.py
leeyangjie/unit
02f50533c4a476b91e4b39a7a2d052095d970983
[ "Apache-2.0" ]
null
null
null
test/test_client_ip.py
leeyangjie/unit
02f50533c4a476b91e4b39a7a2d052095d970983
[ "Apache-2.0" ]
null
null
null
test/test_client_ip.py
leeyangjie/unit
02f50533c4a476b91e4b39a7a2d052095d970983
[ "Apache-2.0" ]
null
null
null
from unit.applications.lang.python import TestApplicationPython
35.246377
77
0.476563
from unit.applications.lang.python import TestApplicationPython class TestClientIP(TestApplicationPython): prerequisites = {'modules': {'python': 'any'}} def client_ip(self, options): assert 'success' in self.conf( { "127.0.0.1:7081": { "client_ip": opt...
4,488
288
23
74a36f9de503409718965b9b6bc829fa35d95202
190
py
Python
dev.py
LCBRU/batch_demographics
e516e958091fd74dad00b1705431ac030e3c4503
[ "MIT" ]
null
null
null
dev.py
LCBRU/batch_demographics
e516e958091fd74dad00b1705431ac030e3c4503
[ "MIT" ]
null
null
null
dev.py
LCBRU/batch_demographics
e516e958091fd74dad00b1705431ac030e3c4503
[ "MIT" ]
null
null
null
#!/usr/bin/env python from batch_demographics import create_app from config import DevConfig app = create_app(DevConfig()) if __name__ == "__main__": app.run(host="0.0.0.0", port=8000)
23.75
41
0.736842
#!/usr/bin/env python from batch_demographics import create_app from config import DevConfig app = create_app(DevConfig()) if __name__ == "__main__": app.run(host="0.0.0.0", port=8000)
0
0
0
dc71d49cfcda3d4e87c6a2b9fa01e89c155ee69a
151
py
Python
widgetProject/widgetApp/admin.py
cs-fullstack-2019-spring/django-fields-widgets-cw-rsalcido
4b19595867ee38396d0a80bfa0adcd0cb9811d23
[ "Apache-2.0" ]
null
null
null
widgetProject/widgetApp/admin.py
cs-fullstack-2019-spring/django-fields-widgets-cw-rsalcido
4b19595867ee38396d0a80bfa0adcd0cb9811d23
[ "Apache-2.0" ]
null
null
null
widgetProject/widgetApp/admin.py
cs-fullstack-2019-spring/django-fields-widgets-cw-rsalcido
4b19595867ee38396d0a80bfa0adcd0cb9811d23
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin from .models import supeHero # Register your models here. admin.site.register(supeHero) # Register your models here.
21.571429
32
0.801325
from django.contrib import admin from .models import supeHero # Register your models here. admin.site.register(supeHero) # Register your models here.
0
0
0
0430b1b3554d1367b14b734250b34ede8b260068
337
py
Python
main.py
pooyapooya/rizpardazande
818721a3daac1385daf71ac508ad00bf153cbf0b
[ "MIT" ]
null
null
null
main.py
pooyapooya/rizpardazande
818721a3daac1385daf71ac508ad00bf153cbf0b
[ "MIT" ]
null
null
null
main.py
pooyapooya/rizpardazande
818721a3daac1385daf71ac508ad00bf153cbf0b
[ "MIT" ]
null
null
null
from easygui.boxes.choice_box import choicebox from easygui.boxes.text_box import textbox from phase1 import phase1 from phase2 import phase2 __author__ = 'po0ya' choices = [ 'Phase1', 'Phase2' ] choice = choicebox(msg='Please select project phase:', choices=choices) if choice == choices[0]: phase1() el...
17.736842
71
0.724036
from easygui.boxes.choice_box import choicebox from easygui.boxes.text_box import textbox from phase1 import phase1 from phase2 import phase2 __author__ = 'po0ya' choices = [ 'Phase1', 'Phase2' ] choice = choicebox(msg='Please select project phase:', choices=choices) if choice == choices[0]: phase1() el...
0
0
0
4471ff0d57c1cc3ec8a60aec1f93edea9763dd0c
2,984
py
Python
saws/data_util.py
Pangeam/saws
5aba511e72bf5feb35eb44be82fbdf805dfe3553
[ "Apache-2.0" ]
5,358
2015-09-18T19:16:11.000Z
2022-03-31T20:40:51.000Z
saws/data_util.py
Pangeam/saws
5aba511e72bf5feb35eb44be82fbdf805dfe3553
[ "Apache-2.0" ]
112
2015-09-10T10:53:57.000Z
2022-03-03T09:32:29.000Z
saws/data_util.py
Pangeam/saws
5aba511e72bf5feb35eb44be82fbdf805dfe3553
[ "Apache-2.0" ]
333
2015-09-18T19:16:13.000Z
2022-03-06T17:27:54.000Z
# -*- coding: utf-8 -*- # Copyright 2015 Donne Martin. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "lice...
35.52381
77
0.610925
# -*- coding: utf-8 -*- # Copyright 2015 Donne Martin. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "lice...
0
0
0
98ef697ccd1d0ce81f3545bc903eb1ff39fa24a2
701
py
Python
onlinecourse/migrations/0003_homeworkanswer.py
Moneto3o/Course-Mangement-System
2b2a8548e08fd6f3185ad23559eae841881326cf
[ "Apache-2.0" ]
null
null
null
onlinecourse/migrations/0003_homeworkanswer.py
Moneto3o/Course-Mangement-System
2b2a8548e08fd6f3185ad23559eae841881326cf
[ "Apache-2.0" ]
null
null
null
onlinecourse/migrations/0003_homeworkanswer.py
Moneto3o/Course-Mangement-System
2b2a8548e08fd6f3185ad23559eae841881326cf
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.1.3 on 2021-06-23 02:36 from django.db import migrations, models import django.db.models.deletion
30.478261
121
0.626248
# Generated by Django 3.1.3 on 2021-06-23 02:36 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('onlinecourse', '0002_auto_20210623_0941'), ] operations = [ migrations.CreateModel( name='Homew...
0
554
23
371df930ffaa78a55012c519e4c329c1f8f97c56
1,166
py
Python
leetcode/33_Search_in_Rotated_Sorted_Array.py
PhillipLeeHub/algorithm-and-data-structure
c0c27fee1b4fd634084da0b41395a26307d76e69
[ "MIT" ]
1
2020-05-01T21:29:17.000Z
2020-05-01T21:29:17.000Z
leetcode/33_Search_in_Rotated_Sorted_Array.py
PhillipLeeHub/algorithm-and-data-structure
c0c27fee1b4fd634084da0b41395a26307d76e69
[ "MIT" ]
null
null
null
leetcode/33_Search_in_Rotated_Sorted_Array.py
PhillipLeeHub/algorithm-and-data-structure
c0c27fee1b4fd634084da0b41395a26307d76e69
[ "MIT" ]
1
2020-06-12T23:32:14.000Z
2020-06-12T23:32:14.000Z
''' 33. Search in Rotated Sorted Array Medium Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]). You are given a target value to search. If found in the array return its index, otherwise return -1. You may assume no du...
27.116279
100
0.511149
''' 33. Search in Rotated Sorted Array Medium Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]). You are given a target value to search. If found in the array return its index, otherwise return -1. You may assume no du...
570
-6
48
dc96d3db43b70b02ef24b2ea06e3b4ff9e9d80ce
1,331
py
Python
glashammer/bundles/contrib/auth/openidauth.py
passy/glashammer-rdrei
9e56952d70b961d8945707469aad9cfe97c4e7b7
[ "MIT" ]
1
2016-07-04T15:23:59.000Z
2016-07-04T15:23:59.000Z
glashammer/bundles/contrib/auth/openidauth.py
passy/glashammer-rdrei
9e56952d70b961d8945707469aad9cfe97c4e7b7
[ "MIT" ]
null
null
null
glashammer/bundles/contrib/auth/openidauth.py
passy/glashammer-rdrei
9e56952d70b961d8945707469aad9cfe97c4e7b7
[ "MIT" ]
null
null
null
""" glashammer.bundles.contrib.auth.openidauth ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Open ID Support for Glashammer :copyright: 2010 Glashammer Developers :license: MIT """ from openid.consumer.consumer import Consumer, SUCCESS, CANCEL from werkzeug import redirect from glashammer.utils import sibpath, url_fo...
28.319149
71
0.661908
""" glashammer.bundles.contrib.auth.openidauth ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Open ID Support for Glashammer :copyright: 2010 Glashammer Developers :license: MIT """ from openid.consumer.consumer import Consumer, SUCCESS, CANCEL from werkzeug import redirect from glashammer.utils import sibpath, url_fo...
828
0
46
8f558f6a46b75c6d332a9f4e5b2539ae3d50b5f6
2,544
py
Python
baseline_preprocess.py
shiningliang/DIMM
adc9ff2bea0921cffe91989a1adc95184d81e6a5
[ "Apache-2.0" ]
1
2021-03-01T12:28:26.000Z
2021-03-01T12:28:26.000Z
baseline_preprocess.py
shiningliang/DIMM
adc9ff2bea0921cffe91989a1adc95184d81e6a5
[ "Apache-2.0" ]
null
null
null
baseline_preprocess.py
shiningliang/DIMM
adc9ff2bea0921cffe91989a1adc95184d81e6a5
[ "Apache-2.0" ]
1
2020-11-07T16:11:00.000Z
2020-11-07T16:11:00.000Z
import pandas as pd import numpy as np import os import pickle as pkl import json from tqdm import tqdm single_task = ['5849', '25000', '41401', '4019'] for task in single_task: path = 'data/preprocessed_data/baseline/' + task if not os.path.exists(path): os.makedirs(path) train_data, dim = pre...
34.378378
91
0.605739
import pandas as pd import numpy as np import os import pickle as pkl import json from tqdm import tqdm def convert_samples(samples): print('Converting samples...') indexes = samples[0]['index'] labels = [samples[0]['label']] * len(indexes) del samples[0] for sample in tqdm(samples): # ind...
1,878
0
69
69654bd4eaf9e6ddbb228cf5eb6cfebf7c5a9c0f
754
py
Python
appengine/app.py
wickedchicken/timebug
a7164dd0c9b7e992deba5a232073d001bd3448c1
[ "BSD-2-Clause" ]
null
null
null
appengine/app.py
wickedchicken/timebug
a7164dd0c9b7e992deba5a232073d001bd3448c1
[ "BSD-2-Clause" ]
1
2019-10-05T21:48:45.000Z
2019-10-05T21:48:45.000Z
appengine/app.py
wickedchicken/timebug
a7164dd0c9b7e992deba5a232073d001bd3448c1
[ "BSD-2-Clause" ]
null
null
null
import webapp2 from webapp2_extras import jinja2 class BaseHandler(webapp2.RequestHandler): """Provide a cached Jinja environment to each request.""" @webapp2.cached_property app = webapp2.WSGIApplication([("/_ah/warmup", MainPage), ('/', MainPage), ])
27.925926
63
0.690981
import webapp2 from webapp2_extras import jinja2 class BaseHandler(webapp2.RequestHandler): """Provide a cached Jinja environment to each request.""" @webapp2.cached_property def jinja2(self): # Returns a Jinja2 renderer cached in the app registry. return jinja2.get_jinja2(app=self.app) def render_re...
358
7
96
6200257d7e59c1ae462e27c608d6cbec78e80fee
665
py
Python
tests/choice/test_choice.py
xlurio/RockPaperScissorsPy
927bbd1480dbca70c9bc3b982f4034ac2ff33c57
[ "MIT" ]
null
null
null
tests/choice/test_choice.py
xlurio/RockPaperScissorsPy
927bbd1480dbca70c9bc3b982f4034ac2ff33c57
[ "MIT" ]
null
null
null
tests/choice/test_choice.py
xlurio/RockPaperScissorsPy
927bbd1480dbca70c9bc3b982f4034ac2ff33c57
[ "MIT" ]
null
null
null
import unittest from src.choice import Choice from src.choice.exceptions import InvalidChoiceException class UserChoiceTests(unittest.TestCase): """Tests for the user choice class""" def test_valid_choice(self): """Test valid user input""" choice = Choice('r') self.assertTrue(choice....
25.576923
56
0.666165
import unittest from src.choice import Choice from src.choice.exceptions import InvalidChoiceException class UserChoiceTests(unittest.TestCase): """Tests for the user choice class""" def test_valid_choice(self): """Test valid user input""" choice = Choice('r') self.assertTrue(choice....
0
0
0
0713d78df8377d0c6b7c00eaf68bd9b197d1fbac
609
py
Python
networkit/test/test_centrality.py
angriman/network
3a4c5fd32eb2be8d5b34eaee17f8fe4e6e141894
[ "MIT" ]
366
2019-06-27T18:48:18.000Z
2022-03-29T08:36:49.000Z
networkit/test/test_centrality.py
angriman/network
3a4c5fd32eb2be8d5b34eaee17f8fe4e6e141894
[ "MIT" ]
387
2019-06-24T11:30:39.000Z
2022-03-31T10:37:28.000Z
networkit/test/test_centrality.py
angriman/network
3a4c5fd32eb2be8d5b34eaee17f8fe4e6e141894
[ "MIT" ]
131
2019-07-04T15:40:13.000Z
2022-03-29T12:34:23.000Z
#!/usr/bin/env python3 import unittest import os import networkit as nk if __name__ == "__main__": unittest.main()
18.454545
60
0.651888
#!/usr/bin/env python3 import unittest import os import networkit as nk class Test_Centrality(unittest.TestCase): def test_DegreeCentrality(self): g = nk.Graph(8, False, False) g.addEdge(0, 2) g.addEdge(0, 5) g.addEdge(1, 2) g.addEdge(2, 3) g.addEdge(2, 2) g.addEdge(2, 4) g.addEdge(3, 5) g.addEdg...
424
20
47
6bff15a4444dc05907bed9946e38668c9876c9d2
931
py
Python
model.py
Ayantika22/Flask-program-For-Wine-Dataset
aa28a92116c1b2735883e43ed1ef3c9f58239bbc
[ "MIT" ]
2
2020-06-29T15:14:56.000Z
2020-11-26T08:48:43.000Z
model.py
Ayantika22/Flask-Program-for-Wine-Dataset
aa28a92116c1b2735883e43ed1ef3c9f58239bbc
[ "MIT" ]
null
null
null
model.py
Ayantika22/Flask-Program-for-Wine-Dataset
aa28a92116c1b2735883e43ed1ef3c9f58239bbc
[ "MIT" ]
1
2021-05-08T10:18:50.000Z
2021-05-08T10:18:50.000Z
# -*- coding: utf-8 -*- """ Created on Fri Feb 28 15:03:12 2020 @author: Ayantika """ # Importing necessary libraries import numpy as np import pandas as pd from pandas import Series, DataFrame from sklearn.model_selection import train_test_split from sklearn.linear_model import LogisticRegression impo...
30.032258
103
0.712137
# -*- coding: utf-8 -*- """ Created on Fri Feb 28 15:03:12 2020 @author: Ayantika """ # Importing necessary libraries import numpy as np import pandas as pd from pandas import Series, DataFrame from sklearn.model_selection import train_test_split from sklearn.linear_model import LogisticRegression impo...
0
0
0
ce46e50cde4a68b91ffc35cb64668b934bd1c3de
2,737
py
Python
seed.py
jrrlokken/issue-tracking-system
33b9b68dd821c8a05cdbc8de87645f61da06f0bd
[ "MIT" ]
1
2021-02-20T04:26:36.000Z
2021-02-20T04:26:36.000Z
seed.py
jrrlokken/issue-tracking-system
33b9b68dd821c8a05cdbc8de87645f61da06f0bd
[ "MIT" ]
2
2021-04-06T18:14:38.000Z
2021-06-02T02:45:15.000Z
seed.py
jrrlokken/issue-tracking-system
33b9b68dd821c8a05cdbc8de87645f61da06f0bd
[ "MIT" ]
null
null
null
from app import app from models import db, connect_db, User, Issue, Comment, Priority, Status, Category, Role # Drop db tables and create them anew db.drop_all() db.create_all() # Priority p1 = Priority( priority_id=0, priority_label="Low" ) p2 = Priority( priority_id=1, priority_label="Medium" ) p...
19.411348
391
0.650347
from app import app from models import db, connect_db, User, Issue, Comment, Priority, Status, Category, Role # Drop db tables and create them anew db.drop_all() db.create_all() # Priority p1 = Priority( priority_id=0, priority_label="Low" ) p2 = Priority( priority_id=1, priority_label="Medium" ) p...
0
0
0
4cb1a20de656973fca2fc1192b2c5183563fa9cf
70
py
Python
pizza_auth/run.py
andimiller/pizza-auth
e36870a4edf84a203bbaad5911e2b0e5f605f60e
[ "MIT" ]
2
2015-06-12T08:26:02.000Z
2015-09-09T00:25:59.000Z
pizza_auth/run.py
Sylnai/pizza-auth
e36870a4edf84a203bbaad5911e2b0e5f605f60e
[ "MIT" ]
1
2021-06-15T20:28:49.000Z
2021-06-15T20:28:49.000Z
pizza_auth/run.py
Sylnai/pizza-auth
e36870a4edf84a203bbaad5911e2b0e5f605f60e
[ "MIT" ]
2
2015-11-13T16:43:30.000Z
2016-09-15T18:39:05.000Z
from main import app app.run(host='127.0.0.1', port=8090, debug=True)
23.333333
48
0.714286
from main import app app.run(host='127.0.0.1', port=8090, debug=True)
0
0
0
0e46de584e9f7e867a5e9c740f4b6ef3e9ef32f6
3,584
py
Python
pymco/security/ssl.py
jantman/python-mcollective
ceb8f362bc8a1981b42696889250bed1cce07fea
[ "BSD-3-Clause" ]
1
2015-07-29T00:35:51.000Z
2015-07-29T00:35:51.000Z
pymco/security/ssl.py
jantman/python-mcollective
ceb8f362bc8a1981b42696889250bed1cce07fea
[ "BSD-3-Clause" ]
null
null
null
pymco/security/ssl.py
jantman/python-mcollective
ceb8f362bc8a1981b42696889250bed1cce07fea
[ "BSD-3-Clause" ]
null
null
null
""" :py:mod:`pymco.ssl` ------------------- Contains SSL security provider plugin. """ from __future__ import print_function import base64 import os try: from Crypto.Signature import PKCS1_v1_5 from Crypto.Hash import SHA except ImportError as exc: print('You need install pycrypto for using SSL security pr...
32.581818
82
0.644252
""" :py:mod:`pymco.ssl` ------------------- Contains SSL security provider plugin. """ from __future__ import print_function import base64 import os try: from Crypto.Signature import PKCS1_v1_5 from Crypto.Hash import SHA except ImportError as exc: print('You need install pycrypto for using SSL security pr...
340
0
53
b1120b8ff6bc0605d09869d7d8a210da4ab8091e
1,356
py
Python
client/client.py
ArkEcosystem/ARK-Python-Client
98d78442b7b1088a533837d2cc674af8c2e6baae
[ "MIT" ]
14
2018-06-15T06:09:17.000Z
2021-04-08T19:59:07.000Z
client/client.py
ArkEcosystem/ARK-Python-Client
98d78442b7b1088a533837d2cc674af8c2e6baae
[ "MIT" ]
78
2018-06-15T07:59:46.000Z
2021-03-29T02:25:11.000Z
client/client.py
ArkEcosystem/ARK-Python-Client
98d78442b7b1088a533837d2cc674af8c2e6baae
[ "MIT" ]
48
2018-06-14T15:46:59.000Z
2022-01-24T18:26:09.000Z
import inspect import pkgutil from importlib import import_module from pathlib import Path from client.connection import Connection from client.exceptions import ArkParameterException from client.resource import Resource
35.684211
84
0.608407
import inspect import pkgutil from importlib import import_module from pathlib import Path from client.connection import Connection from client.exceptions import ArkParameterException from client.resource import Resource class ArkClient(object): def __init__(self, hostname): """ :param string hos...
0
1,111
23
f4b5e2b392444820619c6206589c11e19fa5d27c
1,821
py
Python
plugins/maya/load/load_camera.py
davidlatwe/reveries-config
4a282dd64a32a9b87bd1a070759b6425ff785d68
[ "MIT" ]
3
2020-04-01T10:51:17.000Z
2021-08-05T18:35:23.000Z
plugins/maya/load/load_camera.py
davidlatwe/reveries-config
4a282dd64a32a9b87bd1a070759b6425ff785d68
[ "MIT" ]
null
null
null
plugins/maya/load/load_camera.py
davidlatwe/reveries-config
4a282dd64a32a9b87bd1a070759b6425ff785d68
[ "MIT" ]
1
2020-07-05T12:06:30.000Z
2020-07-05T12:06:30.000Z
import avalon.api from reveries.maya import lib, capsule from reveries.maya.plugins import ReferenceLoader class CameraLoader(ReferenceLoader, avalon.api.Loader): """Specific loader for the reveries.camera family""" label = "Reference camera" order = -10 icon = "code-fork" color = "orange" ...
31.947368
74
0.500824
import avalon.api from reveries.maya import lib, capsule from reveries.maya.plugins import ReferenceLoader class CameraLoader(ReferenceLoader, avalon.api.Loader): """Specific loader for the reveries.camera family""" label = "Reference camera" order = -10 icon = "code-fork" color = "orange" ...
1,308
0
54
c7e8cb15efaa4177f1474ef5a37bbf23c0a74d1c
3,064
py
Python
_pycharm_skeletons/renderdoc/D3D12OM.py
Lex-DRL/renderdoc-py-stubs
75d280e4f500ded506f3315a49fc432b37ab4fa6
[ "MIT" ]
null
null
null
_pycharm_skeletons/renderdoc/D3D12OM.py
Lex-DRL/renderdoc-py-stubs
75d280e4f500ded506f3315a49fc432b37ab4fa6
[ "MIT" ]
null
null
null
_pycharm_skeletons/renderdoc/D3D12OM.py
Lex-DRL/renderdoc-py-stubs
75d280e4f500ded506f3315a49fc432b37ab4fa6
[ "MIT" ]
null
null
null
# encoding: utf-8 # module renderdoc # from P:\1-Scripts\_Python\Py-Autocomplete\renderdoc.pyd # by generator 1.146 # no doc # imports import enum as __enum from .SwigPyObject import SwigPyObject class D3D12OM(SwigPyObject): """ Describes the current state of the output-merger stage of the D3D12 pipeline. """ ...
36.915663
108
0.649151
# encoding: utf-8 # module renderdoc # from P:\1-Scripts\_Python\Py-Autocomplete\renderdoc.pyd # by generator 1.146 # no doc # imports import enum as __enum from .SwigPyObject import SwigPyObject class D3D12OM(SwigPyObject): """ Describes the current state of the output-merger stage of the D3D12 pipeline. """ ...
53
0
27
212a25f9662c6caa2c9493596023de0bdd71b50b
96
py
Python
venv/lib/python3.8/site-packages/jedi/inference/param.py
Retraces/UkraineBot
3d5d7f8aaa58fa0cb8b98733b8808e5dfbdb8b71
[ "MIT" ]
2
2022-03-13T01:58:52.000Z
2022-03-31T06:07:54.000Z
venv/lib/python3.8/site-packages/jedi/inference/param.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
19
2021-11-20T04:09:18.000Z
2022-03-23T15:05:55.000Z
venv/lib/python3.8/site-packages/jedi/inference/param.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
null
null
null
/home/runner/.cache/pip/pool/85/03/a8/e8d26fae6c7b3b8548be18e886767b946dd069a8481930ee9dda2adccd
96
96
0.895833
/home/runner/.cache/pip/pool/85/03/a8/e8d26fae6c7b3b8548be18e886767b946dd069a8481930ee9dda2adccd
0
0
0
e1ec4bfdb1db438cb20b46e1d2458eda58f02dfb
1,406
py
Python
Paper_Plots/Paper_Plots/Case3/plots_case3.py
RuiNian7319/Woodberry_Distillation
4ee8ab9de8e313bca48d9a7af9393abcad85ece4
[ "MIT" ]
3
2019-07-18T06:43:49.000Z
2021-05-13T12:34:24.000Z
Paper_Plots/Paper_Plots/Case3/plots_case3.py
HTL2018/Woodberry_Distillation
4ee8ab9de8e313bca48d9a7af9393abcad85ece4
[ "MIT" ]
null
null
null
Paper_Plots/Paper_Plots/Case3/plots_case3.py
HTL2018/Woodberry_Distillation
4ee8ab9de8e313bca48d9a7af9393abcad85ece4
[ "MIT" ]
1
2020-08-12T13:12:00.000Z
2020-08-12T13:12:00.000Z
import numpy as np import matplotlib.pyplot as plt import seaborn as sns import itertools fonts = {"family": "serif", "weight": "normal", "size": "12"} plt.rc('font', **fonts) plt.rc('text', usetex=True) ftc_noiseless = np.loadtxt('ftc_noiseless_case3.csv') ftc_noise = np.loadtxt('ftc_noise_case3.c...
32.697674
94
0.66074
import numpy as np import matplotlib.pyplot as plt import seaborn as sns import itertools fonts = {"family": "serif", "weight": "normal", "size": "12"} plt.rc('font', **fonts) plt.rc('text', usetex=True) ftc_noiseless = np.loadtxt('ftc_noiseless_case3.csv') ftc_noise = np.loadtxt('ftc_noise_case3.c...
68
0
23
f30bda256908f99bddedb1b9e4707e5b737a2cd2
2,277
py
Python
realtime_hsv_adjust.py
aseber/OpenCV
9b5deef24acdc3664e7989e78d8935bbd140a880
[ "Apache-2.0" ]
2
2016-03-27T01:50:05.000Z
2020-05-17T11:44:31.000Z
realtime_hsv_adjust.py
aseber/OpenCV
9b5deef24acdc3664e7989e78d8935bbd140a880
[ "Apache-2.0" ]
null
null
null
realtime_hsv_adjust.py
aseber/OpenCV
9b5deef24acdc3664e7989e78d8935bbd140a880
[ "Apache-2.0" ]
null
null
null
import cv2 import numpy as np if __name__ == '__main__': main()
41.4
92
0.621871
import cv2 import numpy as np class GUI(): def __init__(self): self.switch_window = cv2.namedWindow("Values") self.hmin_bar = cv2.createTrackbar('Hue Min', 'Values', 0, 255, self.nothing) self.hmax_bar = cv2.createTrackbar('Hue Max', 'Values', 0, 255, self.nothing) hue_min = cv2.set...
2,092
-9
126
d247f5cc81772dbae25e41899a09b6f15408c0a8
1,084
py
Python
wunderpy3/task_comments_endpoint.py
lwedwards3/dhp_sync
71527142509189915ed39f13975594dd9f837735
[ "MIT" ]
null
null
null
wunderpy3/task_comments_endpoint.py
lwedwards3/dhp_sync
71527142509189915ed39f13975594dd9f837735
[ "MIT" ]
null
null
null
wunderpy3/task_comments_endpoint.py
lwedwards3/dhp_sync
71527142509189915ed39f13975594dd9f837735
[ "MIT" ]
null
null
null
''' Encapsulates all tasks that can be run against the 'notes' endpoint '''
32.848485
105
0.675277
''' Encapsulates all tasks that can be run against the 'notes' endpoint ''' def get_task_comments(client, task_id): params = { 'task_id' : int(task_id) } response = client.authenticated_request(client.api.Endpoints.TASK_COMMENTS, params=params) assert response.status_code == 200 ...
916
0
91
10dad59116c1f790a9057cde007a47ef33d45728
603
py
Python
blogApp/migrations/0007_auto_20190703_1905.py
blogdevteam/Blog
93a4343261063fedd7a0ef2c60d4adb50c48e4ae
[ "MIT" ]
4
2019-07-07T15:09:54.000Z
2020-05-24T11:02:31.000Z
blogApp/migrations/0007_auto_20190703_1905.py
blogdevteam/Blog
93a4343261063fedd7a0ef2c60d4adb50c48e4ae
[ "MIT" ]
null
null
null
blogApp/migrations/0007_auto_20190703_1905.py
blogdevteam/Blog
93a4343261063fedd7a0ef2c60d4adb50c48e4ae
[ "MIT" ]
null
null
null
# Generated by Django 2.2.2 on 2019-07-03 11:05 from django.db import migrations, models
22.333333
62
0.552239
# Generated by Django 2.2.2 on 2019-07-03 11:05 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blogApp', '0006_delete_admin'), ] operations = [ migrations.RemoveField( model_name='user', name='image_height', ...
0
489
23
aa2b5855608326fd65f8812d1bf3493579925c53
1,010
py
Python
Patterns/NeilSayok.py
sanchit781/HACKTOBERFEST2021_PATTERN
c457eb2a1c7b729bdaa26ade7d4c7eb4092291e2
[ "MIT" ]
229
2021-09-10T13:24:47.000Z
2022-03-18T16:54:29.000Z
Patterns/NeilSayok.py
swapnilnarad2000/HACKTOBERFEST2021_PATTERN
567f99bbc3d3bb9d03333422f5e1392251a41439
[ "MIT" ]
164
2021-09-10T12:04:39.000Z
2021-10-29T21:20:42.000Z
Patterns/NeilSayok.py
swapnilnarad2000/HACKTOBERFEST2021_PATTERN
567f99bbc3d3bb9d03333422f5e1392251a41439
[ "MIT" ]
567
2021-09-10T17:35:27.000Z
2021-12-11T12:45:43.000Z
''' Program to convert any Image to Pattern Input your Image URL or just press enter to see the default image. Created by Sayok Dey Majumder. Github User handle : NeilSayok Link to profile: https://github.com/NeilSayok ''' import cv2 import imutils import urllib.request import numpy as np url = input("Enter...
20.612245
88
0.646535
''' Program to convert any Image to Pattern Input your Image URL or just press enter to see the default image. Created by Sayok Dey Majumder. Github User handle : NeilSayok Link to profile: https://github.com/NeilSayok ''' import cv2 import imutils import urllib.request import numpy as np url = input("Enter...
0
0
0
d9aadf3cb80ac0f1700d00242c3a7ee13aeffba4
12,727
py
Python
poky/scripts/lib/buildstats.py
buildlinux/unityos
dcbe232d0589013d77a62c33959d6a69f9bfbc5e
[ "Apache-2.0" ]
53
2018-02-28T08:51:32.000Z
2022-02-28T06:49:23.000Z
scripts/lib/buildstats.py
nareshgbhat/luv-yocto
48976c54238dda0791e274927371265d259c0e5a
[ "MIT" ]
27
2018-01-25T00:26:53.000Z
2020-08-09T05:20:04.000Z
scripts/lib/buildstats.py
nareshgbhat/luv-yocto
48976c54238dda0791e274927371265d259c0e5a
[ "MIT" ]
51
2018-02-21T04:46:08.000Z
2022-03-02T04:20:41.000Z
# # Copyright (c) 2017, Intel Corporation. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License, # version 2, as published by the Free Software Foundation. # # This program is distributed in the hope it will be useful, but WITHOUT...
36.362857
95
0.552055
# # Copyright (c) 2017, Intel Corporation. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License, # version 2, as published by the Free Software Foundation. # # This program is distributed in the hope it will be useful, but WITHOUT...
2,290
3,013
182
43f48d073e76e3341579b198e6e0cf6ab06adbf3
9,011
py
Python
pretrain_style_enc/style_enc_train.py
ShusenTang/WriteLikeYou
a335b02f806d846ba85a6f37f990eb8c2d57b3b6
[ "Apache-2.0" ]
9
2021-01-20T02:52:21.000Z
2022-01-12T02:55:06.000Z
pretrain_style_enc/style_enc_train.py
ShusenTang/WriteLikeYou
a335b02f806d846ba85a6f37f990eb8c2d57b3b6
[ "Apache-2.0" ]
2
2021-06-30T03:40:28.000Z
2022-02-10T09:20:48.000Z
pretrain_style_enc/style_enc_train.py
ShusenTang/WriteLikeYou
a335b02f806d846ba85a6f37f990eb8c2d57b3b6
[ "Apache-2.0" ]
2
2021-09-05T15:10:49.000Z
2021-11-02T11:08:22.000Z
import os import time import random import ast import json import argparse import numpy as np import tensorflow as tf from style_enc_model import Style_Enc_Model from data import CHN_Style_DataLoader from model_utils import save_model, reset_graph NPZ_DIR = "../WriteLikeYouData/npz_relative_dist/CASIA_rdp4.0" assert...
37.861345
136
0.642215
import os import time import random import ast import json import argparse import numpy as np import tensorflow as tf from style_enc_model import Style_Enc_Model from data import CHN_Style_DataLoader from model_utils import save_model, reset_graph NPZ_DIR = "../WriteLikeYouData/npz_relative_dist/CASIA_rdp4.0" assert...
5,715
0
92
dfa14b2ec00f0ef5059bf740c1c8705161a50cb8
225
py
Python
LivroCap1/PagarAluguel.py
Lucas-py/Python-Basico02
802187be3dc948a743c5883b1d56f52163f7450d
[ "MIT" ]
null
null
null
LivroCap1/PagarAluguel.py
Lucas-py/Python-Basico02
802187be3dc948a743c5883b1d56f52163f7450d
[ "MIT" ]
null
null
null
LivroCap1/PagarAluguel.py
Lucas-py/Python-Basico02
802187be3dc948a743c5883b1d56f52163f7450d
[ "MIT" ]
null
null
null
km = float(input('digite km rodados: ')) dias = float(input('total de dias: ')) total_de_km = km * 0.15 total_de_dias = dias * 60 total_a_pagar = total_de_dias + total_de_km print(f'total a pagar e: {total_a_pagar} R$')
18.75
45
0.693333
km = float(input('digite km rodados: ')) dias = float(input('total de dias: ')) total_de_km = km * 0.15 total_de_dias = dias * 60 total_a_pagar = total_de_dias + total_de_km print(f'total a pagar e: {total_a_pagar} R$')
0
0
0
8a84843266300b75a474714ae72939c9085e1f51
31,763
py
Python
msgraph-cli-extensions/beta/usersfunctions_beta/azext_usersfunctions_beta/generated/custom.py
thewahome/msgraph-cli
33127d9efa23a0e5f5303c93242fbdbb73348671
[ "MIT" ]
null
null
null
msgraph-cli-extensions/beta/usersfunctions_beta/azext_usersfunctions_beta/generated/custom.py
thewahome/msgraph-cli
33127d9efa23a0e5f5303c93242fbdbb73348671
[ "MIT" ]
null
null
null
msgraph-cli-extensions/beta/usersfunctions_beta/azext_usersfunctions_beta/generated/custom.py
thewahome/msgraph-cli
33127d9efa23a0e5f5303c93242fbdbb73348671
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause...
50.337559
120
0.412681
# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause...
29,048
0
2,050
2205b1d3c57e5bd6fc3104e3b2ab599b5cfe916e
12,357
py
Python
PyISY/Climate.py
sneelco/PyISY
f1f916cd7951b1b6a5235bb36444c695fe3294e1
[ "Apache-2.0" ]
2
2015-08-04T14:02:58.000Z
2016-12-15T05:54:00.000Z
PyISY/Climate.py
sneelco/PyISY
f1f916cd7951b1b6a5235bb36444c695fe3294e1
[ "Apache-2.0" ]
null
null
null
PyISY/Climate.py
sneelco/PyISY
f1f916cd7951b1b6a5235bb36444c695fe3294e1
[ "Apache-2.0" ]
null
null
null
from VarEvents import Property from VarEvents import Var from time import sleep from xml.dom import minidom class Climate(object): """ This class handles the ISY climate module. | parent: ISY class | xml: String of xml data containing the climate data :ivar Gust_Speed: Watched V...
42.463918
81
0.62936
from VarEvents import Property from VarEvents import Var from time import sleep from xml.dom import minidom class Climate(object): """ This class handles the ISY climate module. | parent: ISY class | xml: String of xml data containing the climate data :ivar Gust_Speed: Watched V...
1,999
0
145
d5d2d48c33750918747531b040829ac393f0e6e7
4,203
py
Python
WTFUtils.py
Nierhain/WTFUtils
879eb5d9a8aea4f39524e3172f93e65f452d8819
[ "MIT" ]
null
null
null
WTFUtils.py
Nierhain/WTFUtils
879eb5d9a8aea4f39524e3172f93e65f452d8819
[ "MIT" ]
null
null
null
WTFUtils.py
Nierhain/WTFUtils
879eb5d9a8aea4f39524e3172f93e65f452d8819
[ "MIT" ]
null
null
null
from PySide2.QtCore import Qt, Slot, QDir, QSettings from PySide2.QtWidgets import QApplication, QMainWindow, QWidget, QAction, QPushButton, QFileDialog, QInputDialog, \ QLineEdit, QHBoxLayout, QVBoxLayout, QLabel import sys if __name__ == "__main__": app = QApplication(sys.argv) widget = Application()...
34.170732
119
0.678563
from PySide2.QtCore import Qt, Slot, QDir, QSettings from PySide2.QtWidgets import QApplication, QMainWindow, QWidget, QAction, QPushButton, QFileDialog, QInputDialog, \ QLineEdit, QHBoxLayout, QVBoxLayout, QLabel import sys class Application(QWidget): pathToWTF = "_retail_/WTF/Account" def __init__(sel...
3,313
419
46
a7846b0d6899761dcc014e34e156d53e1610b615
4,461
py
Python
populationsim/steps/expand_households.py
bstabler/populationsim
872f7d26992e566c6fe75aed1cc14c8ad5f71d3a
[ "BSD-3-Clause" ]
null
null
null
populationsim/steps/expand_households.py
bstabler/populationsim
872f7d26992e566c6fe75aed1cc14c8ad5f71d3a
[ "BSD-3-Clause" ]
null
null
null
populationsim/steps/expand_households.py
bstabler/populationsim
872f7d26992e566c6fe75aed1cc14c8ad5f71d3a
[ "BSD-3-Clause" ]
null
null
null
from __future__ import division from __future__ import absolute_import # PopulationSim # See full license in LICENSE.txt. import logging import pandas as pd import numpy as np from activitysim.core import pipeline from activitysim.core import inject from activitysim.core.config import setting from .helper import ge...
39.131579
98
0.705447
from __future__ import division from __future__ import absolute_import # PopulationSim # See full license in LICENSE.txt. import logging import pandas as pd import numpy as np from activitysim.core import pipeline from activitysim.core import inject from activitysim.core.config import setting from .helper import ge...
169
0
30
489733bd7746a78851184e57f552e8596df27f96
15,828
py
Python
lib/dataset/jacquard.py
pia32/ssds.pytorch
e596ecea37942153d82122fb85ad9de3feeb2363
[ "MIT" ]
null
null
null
lib/dataset/jacquard.py
pia32/ssds.pytorch
e596ecea37942153d82122fb85ad9de3feeb2363
[ "MIT" ]
null
null
null
lib/dataset/jacquard.py
pia32/ssds.pytorch
e596ecea37942153d82122fb85ad9de3feeb2363
[ "MIT" ]
null
null
null
import os import pickle import os.path import sys import torch import torch.utils.data as data import torchvision.transforms as transforms from PIL import Image, ImageDraw, ImageFont import cv2 import numpy as np from operator import itemgetter from skimage.draw import polygon if sys.version_info[0] == 2: import x...
34.940397
144
0.538287
import os import pickle import os.path import sys import torch import torch.utils.data as data import torchvision.transforms as transforms from PIL import Image, ImageDraw, ImageFont import cv2 import numpy as np from operator import itemgetter from skimage.draw import polygon if sys.version_info[0] == 2: import x...
8,002
0
324
de9e357b7df8fea8daf14e222029818e3e784ecd
1,254
py
Python
recognition_plate_licenses.py
mezgoodle/opencv-tutorial
76f4e7f9002eb8f8e4879167aee670faa32c7b7c
[ "MIT" ]
1
2021-11-11T17:03:21.000Z
2021-11-11T17:03:21.000Z
recognition_plate_licenses.py
mezgoodle/opencv-tutorial
76f4e7f9002eb8f8e4879167aee670faa32c7b7c
[ "MIT" ]
1
2021-08-16T13:32:59.000Z
2021-08-17T09:25:13.000Z
recognition_plate_licenses.py
mezgoodle/opencv-tutorial
76f4e7f9002eb8f8e4879167aee670faa32c7b7c
[ "MIT" ]
null
null
null
import cv2 import numpy as np import imutils import easyocr from matplotlib import pyplot as plt image = cv2.imread('images/license.jpg') gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) image_filter = cv2.bilateralFilter(gray, 11, 15, 15) edges = cv2.Canny(image_filter, 30, 200) contours = cv2.findContours(edges.copy...
29.162791
98
0.707337
import cv2 import numpy as np import imutils import easyocr from matplotlib import pyplot as plt image = cv2.imread('images/license.jpg') gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) image_filter = cv2.bilateralFilter(gray, 11, 15, 15) edges = cv2.Canny(image_filter, 30, 200) contours = cv2.findContours(edges.copy...
0
0
0
4bef42c0e917472e68a30cc758cdbfa6221dd7f3
1,108
py
Python
Fibonacci.py
Carloselrecharlie/Fiboncacci_sequence
a28cc61b35775dee2489fd07d676348200377660
[ "Apache-2.0" ]
null
null
null
Fibonacci.py
Carloselrecharlie/Fiboncacci_sequence
a28cc61b35775dee2489fd07d676348200377660
[ "Apache-2.0" ]
null
null
null
Fibonacci.py
Carloselrecharlie/Fiboncacci_sequence
a28cc61b35775dee2489fd07d676348200377660
[ "Apache-2.0" ]
null
null
null
# Carlos Montes Parra # A program that displays a number from the Fibonacci sequence. The position # in the sequence is linked to the first and last letter of the user's name # and the addition of their Unicode values. # Adapted from one of Ian McLoughlin's lectures https://github.com/ianmcloughlin/python-fib/blob/m...
24.622222
143
0.700361
# Carlos Montes Parra # A program that displays a number from the Fibonacci sequence. The position # in the sequence is linked to the first and last letter of the user's name # and the addition of their Unicode values. # Adapted from one of Ian McLoughlin's lectures https://github.com/ianmcloughlin/python-fib/blob/m...
134
0
23
2255ee9719fac77ef535168206a055deff41e616
1,991
py
Python
results/get_xflickrco_many.py
danoneata/iglue
c4db972bc67f83f325a847093906b924503ccfc4
[ "MIT" ]
15
2022-01-28T03:08:46.000Z
2022-03-24T09:24:07.000Z
results/get_xflickrco_many.py
danoneata/iglue
c4db972bc67f83f325a847093906b924503ccfc4
[ "MIT" ]
4
2022-03-01T19:13:39.000Z
2022-03-27T08:21:46.000Z
results/get_xflickrco_many.py
danoneata/iglue
c4db972bc67f83f325a847093906b924503ccfc4
[ "MIT" ]
2
2022-02-05T17:04:42.000Z
2022-03-11T14:52:47.000Z
import os import argparse import numpy as np import pandas as pd TASK = "xflickrco" LANGS = ['de', 'ja'] SHOTS = [200, 500, 1000, 1500, '100x5', '200x5'] if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--models', type=str) parser.add_argument('--exp_dir', type=str) ...
38.288462
100
0.542943
import os import argparse import numpy as np import pandas as pd TASK = "xflickrco" LANGS = ['de', 'ja'] SHOTS = [200, 500, 1000, 1500, '100x5', '200x5'] if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--models', type=str) parser.add_argument('--exp_dir', type=str) ...
0
0
0
4d2480f5a7dd624715e75d6e800820d479ea0649
241
py
Python
line_graph_2.py
kethan1/Scipy-Python
1f260ed12f0923dc044ee74a28d35cc1e6f6f821
[ "MIT" ]
null
null
null
line_graph_2.py
kethan1/Scipy-Python
1f260ed12f0923dc044ee74a28d35cc1e6f6f821
[ "MIT" ]
null
null
null
line_graph_2.py
kethan1/Scipy-Python
1f260ed12f0923dc044ee74a28d35cc1e6f6f821
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np plt.plot(list(index for index, y in enumerate(get_coords())), list(y for y in get_coords()), "y-.s") plt.show()
20.083333
100
0.643154
import matplotlib.pyplot as plt import numpy as np def get_coords(): for x in range(1, 11): yield x**2 - 3*x + 9 plt.plot(list(index for index, y in enumerate(get_coords())), list(y for y in get_coords()), "y-.s") plt.show()
52
0
23
7b6ad7b68b1168b3c953cf0cc2a54b22b5266807
538
py
Python
quati/dataset/fields/affixes.py
onenoc/quati
ba372b2ad14076294af62cbcbc27e1b3ca8421c1
[ "MIT" ]
2
2021-01-30T21:20:36.000Z
2021-01-30T22:15:07.000Z
quati/dataset/fields/affixes.py
onenoc/quati
ba372b2ad14076294af62cbcbc27e1b3ca8421c1
[ "MIT" ]
null
null
null
quati/dataset/fields/affixes.py
onenoc/quati
ba372b2ad14076294af62cbcbc27e1b3ca8421c1
[ "MIT" ]
1
2021-01-18T23:12:18.000Z
2021-01-18T23:12:18.000Z
from torchtext.data import Field from quati import constants from quati.dataset.vocabulary import Vocabulary class AffixesField(Field): """ Defines a field for affixes (prefixes and suffixes) by setting only unk_token and pad_token to their default constant value. """
26.9
71
0.630112
from torchtext.data import Field from quati import constants from quati.dataset.vocabulary import Vocabulary class AffixesField(Field): """ Defines a field for affixes (prefixes and suffixes) by setting only unk_token and pad_token to their default constant value. """ def __init__(self, **kwargs)...
222
0
26
8cb03c84a3e95c4b0475a50e2e10afbcec7f2753
7,452
py
Python
afka/afk.py
FlorianLudwig/afka
4efaf7f461e0f79827b3c138059ff01cb7088ff6
[ "Apache-2.0" ]
3
2020-12-23T21:46:38.000Z
2021-01-11T19:23:57.000Z
afka/afk.py
FlorianLudwig/afka
4efaf7f461e0f79827b3c138059ff01cb7088ff6
[ "Apache-2.0" ]
null
null
null
afka/afk.py
FlorianLudwig/afka
4efaf7f461e0f79827b3c138059ff01cb7088ff6
[ "Apache-2.0" ]
null
null
null
"""Interface to the game""" import anre import time import enum import logging import pkg_resources logging.basicConfig(level=logging.INFO) LOG = logging.getLogger(__name__) AVOID_DOUBLE_TAB_DELAY = 0.1
34.183486
97
0.621981
"""Interface to the game""" import anre import time import enum import logging import pkg_resources class MainScreen(enum.Enum): RANHORN = "ranhorn" DARK_FOREST = "dark_forest" CAMPAIGN = "campaign" HEROS = "heros" CHAT = "chat" class Screen(enum.Enum): MAIL = "mail" BAG = "bag" FR...
6,333
364
535
b15752d7594b80ee0f099a7a48c0f2d982a29ae8
1,379
py
Python
glazier/lib/file_util_test.py
ofek/glazier
9f2a7ef98594fb61b5f3d368ea3c97294ed3a54b
[ "Apache-2.0" ]
null
null
null
glazier/lib/file_util_test.py
ofek/glazier
9f2a7ef98594fb61b5f3d368ea3c97294ed3a54b
[ "Apache-2.0" ]
null
null
null
glazier/lib/file_util_test.py
ofek/glazier
9f2a7ef98594fb61b5f3d368ea3c97294ed3a54b
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
34.475
74
0.750544
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
500
17
73
8539f395aacbb82d340e074717bfd772bb0e27e1
16,779
py
Python
py/test/testing/acceptance_test.py
woodrow/pyoac
b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7
[ "MIT" ]
1
2019-05-27T00:58:46.000Z
2019-05-27T00:58:46.000Z
py/test/testing/acceptance_test.py
woodrow/pyoac
b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7
[ "MIT" ]
null
null
null
py/test/testing/acceptance_test.py
woodrow/pyoac
b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7
[ "MIT" ]
null
null
null
import py pydir = py.path.local(py.__file__).dirpath() pytestpath = pydir.join("bin", "py.test") EXPECTTIMEOUT=10.0
33.558
92
0.484236
import py pydir = py.path.local(py.__file__).dirpath() pytestpath = pydir.join("bin", "py.test") EXPECTTIMEOUT=10.0 class TestGeneralUsage: def test_config_error(self, testdir): testdir.makeconftest(""" class ConftestPlugin: def pytest_configure(self, config): ...
15,826
12
821
8e9bc7828805b397069b874d1e34c619691420e9
438
py
Python
0019.remove_nth_from_end/solution.py
WZMJ/Algorithms
07f648541d38e24df38bda469665c12df6a50637
[ "MIT" ]
5
2020-05-23T02:18:26.000Z
2021-07-05T05:36:01.000Z
0019.remove_nth_from_end/solution.py
WZMJ/Algorithms
07f648541d38e24df38bda469665c12df6a50637
[ "MIT" ]
1
2020-06-10T07:17:24.000Z
2020-07-20T02:21:24.000Z
0019.remove_nth_from_end/solution.py
WZMJ/Algorithms
07f648541d38e24df38bda469665c12df6a50637
[ "MIT" ]
1
2019-04-23T13:01:50.000Z
2019-04-23T13:01:50.000Z
from utils import ListNode
24.333333
70
0.531963
from utils import ListNode class Solution: def remove_nth_from_end(self, head: ListNode, n: int) -> ListNode: if not head: return ans = ListNode(0) ans.next = head fast, slow = ans, ans for _ in range(n + 1): fast = fast.next while fast.next:...
367
-6
49
f8c6f04cdc8ad4766b5acd9b10988424b0f57589
698
py
Python
services/backend/thiamsu/migrations/0011_auto_20171124_1827.py
LKKTGB/thiamsu
f08d453c6b35c801c57f2501e42565da56900814
[ "MIT" ]
10
2020-08-25T08:57:36.000Z
2021-12-31T01:04:18.000Z
services/backend/thiamsu/migrations/0011_auto_20171124_1827.py
LKKTGB/thiamsu
f08d453c6b35c801c57f2501e42565da56900814
[ "MIT" ]
13
2020-04-26T08:41:30.000Z
2021-06-10T17:34:25.000Z
services/backend/thiamsu/migrations/0011_auto_20171124_1827.py
LKKTGB/thiamsu
f08d453c6b35c801c57f2501e42565da56900814
[ "MIT" ]
1
2020-09-06T17:54:13.000Z
2020-09-06T17:54:13.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-11-24 18:27 from __future__ import unicode_literals from django.db import migrations
33.238095
85
0.706304
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-11-24 18:27 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [("thiamsu", "0010_auto_20171124_1825")] operations = [ migrations.AlterUniqueTogether( ...
0
527
23
1194c5f3a7614e6cd136e63d1b858bc694041838
2,655
py
Python
main.py
lperepol/PhylumNematoda
7d173f5d4dd8ecd0707af0e05333bdce9a873348
[ "CC0-1.0" ]
null
null
null
main.py
lperepol/PhylumNematoda
7d173f5d4dd8ecd0707af0e05333bdce9a873348
[ "CC0-1.0" ]
null
null
null
main.py
lperepol/PhylumNematoda
7d173f5d4dd8ecd0707af0e05333bdce9a873348
[ "CC0-1.0" ]
null
null
null
# This is a sample Python script. # Press Shift+F10 to execute it or replace it with your code. # Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings. from graphviz import Digraph # Press the green button in the gutter to run the script. if __name__ == '__main__': main...
45
131
0.695669
# This is a sample Python script. # Press Shift+F10 to execute it or replace it with your code. # Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings. from graphviz import Digraph def draw(): g = Digraph('Nematoda Key', comment="FOO",filename = 'NematodaKey.gv')#, node_...
2,224
0
45
83dd62b4bbf11a4bce1f327715899650e6158812
9,611
py
Python
gen2-mjpeg-streaming/main.py
joey1442/depthai-experiments
de2843812c4232a462eb8ab1703e7fd904f6f7b8
[ "MIT" ]
1
2022-01-14T13:59:55.000Z
2022-01-14T13:59:55.000Z
gen2-mjpeg-streaming/main.py
joey1442/depthai-experiments
de2843812c4232a462eb8ab1703e7fd904f6f7b8
[ "MIT" ]
null
null
null
gen2-mjpeg-streaming/main.py
joey1442/depthai-experiments
de2843812c4232a462eb8ab1703e7fd904f6f7b8
[ "MIT" ]
2
2022-02-14T13:41:09.000Z
2022-03-03T00:46:21.000Z
import json import socketserver import threading import time from http.server import BaseHTTPRequestHandler, HTTPServer from io import BytesIO from pathlib import Path import sys from socketserver import ThreadingMixIn from time import sleep import depthai as dai import numpy as np import cv2 from PIL import Image impo...
39.879668
229
0.663511
import json import socketserver import threading import time from http.server import BaseHTTPRequestHandler, HTTPServer from io import BytesIO from pathlib import Path import sys from socketserver import ThreadingMixIn from time import sleep import depthai as dai import numpy as np import cv2 from PIL import Image impo...
3,719
63
120
90dd2a31d9dd176635170ae37809f983dea5ff2a
5,241
py
Python
rbi2/inte5c.py
spottedzebra/interpreter
b5b2a735d771fbfe2842e4c36176f2bc8c1761c3
[ "MIT" ]
2
2016-10-22T11:55:07.000Z
2020-07-23T20:56:15.000Z
rbi2/inte5c.py
mwhit74/interpreter
b5b2a735d771fbfe2842e4c36176f2bc8c1761c3
[ "MIT" ]
null
null
null
rbi2/inte5c.py
mwhit74/interpreter
b5b2a735d771fbfe2842e4c36176f2bc8c1761c3
[ "MIT" ]
null
null
null
import string import pdb from collections import namedtuple import math ADD, SUB, MUL, DIV, CHAR = 'ADD','SUB','MUL','DIV','CHAR' NUM, EOF, OPAR, CPAR, POW = 'NUM','EOF','OPAR','CPAR','POW' WHITESPACE = string.whitespace Token = namedtuple('Token',['token_type', 'token_value']) if __name__ == "__main__": main(...
27.296875
68
0.526045
import string import pdb from collections import namedtuple import math ADD, SUB, MUL, DIV, CHAR = 'ADD','SUB','MUL','DIV','CHAR' NUM, EOF, OPAR, CPAR, POW = 'NUM','EOF','OPAR','CPAR','POW' WHITESPACE = string.whitespace Token = namedtuple('Token',['token_type', 'token_value']) class Lexer(object): def __init__...
4,433
4
482
a40403bf837c949fa8d93de759b6d0eca24abb41
2,932
py
Python
pwf/response.py
victorkohler/pwf
67f3c5990a12ce95377e953f3a96487ebd8bdce6
[ "MIT" ]
1
2017-03-19T13:22:50.000Z
2017-03-19T13:22:50.000Z
pwf/response.py
victorkohler/pwf
67f3c5990a12ce95377e953f3a96487ebd8bdce6
[ "MIT" ]
null
null
null
pwf/response.py
victorkohler/pwf
67f3c5990a12ce95377e953f3a96487ebd8bdce6
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ @author: Victor Kohler @since: date 17/12/2016 @version: 0.1 """ import httplib import helpers import cookies class Response(object): """Used to set and return data back to the server. The Response object can be instantiated in one of two ways: 1. It is created manually in the...
32.94382
77
0.608458
# -*- coding: utf-8 -*- """ @author: Victor Kohler @since: date 17/12/2016 @version: 0.1 """ import httplib import helpers import cookies class Response(object): """Used to set and return data back to the server. The Response object can be instantiated in one of two ways: 1. It is created manually in the...
65
0
27
5f695683bffcbb1e02c0ef543557ed7122feba6d
5,208
py
Python
tests/algorithms/test_munchausen_dqn.py
sony/nnabla-rl
6a9a91ac5363b8611e0c9f736590729952a8d460
[ "Apache-2.0" ]
75
2021-06-14T02:35:19.000Z
2022-03-23T04:30:24.000Z
tests/algorithms/test_munchausen_dqn.py
sony/nnabla-rl
6a9a91ac5363b8611e0c9f736590729952a8d460
[ "Apache-2.0" ]
2
2021-12-17T08:46:54.000Z
2022-03-15T02:04:53.000Z
tests/algorithms/test_munchausen_dqn.py
sony/nnabla-rl
6a9a91ac5363b8611e0c9f736590729952a8d460
[ "Apache-2.0" ]
3
2021-06-15T13:32:57.000Z
2022-03-25T16:53:14.000Z
# Copyright 2021 Sony Corporation. # Copyright 2021 Sony Group Corporation. # # 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 requi...
35.189189
96
0.680108
# Copyright 2021 Sony Corporation. # Copyright 2021 Sony Group Corporation. # # 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 requi...
1,496
2,725
23
1474b532b2f24c55f34fba1679b92a44ff8cc539
542
py
Python
jobs/migrations/0004_auto_20180425_1550.py
Manasranjanpati/Jobpost
e5654129538e70cedf8aafc65c1b0289a01535e5
[ "MIT" ]
20
2018-05-04T18:42:35.000Z
2021-03-18T07:15:12.000Z
src/jobs/migrations/0004_auto_20180425_1550.py
fleepgeek/django-jobsite
d9547c4ee85751677ba6458380b609973c3b4a8d
[ "MIT" ]
5
2020-02-11T22:22:33.000Z
2021-06-10T20:18:05.000Z
jobs/migrations/0004_auto_20180425_1550.py
Manasranjanpati/Jobpost
e5654129538e70cedf8aafc65c1b0289a01535e5
[ "MIT" ]
8
2018-05-04T19:03:23.000Z
2020-09-23T00:24:46.000Z
# Generated by Django 2.0.4 on 2018-04-25 14:50 from django.db import migrations, models import django.db.models.deletion
23.565217
105
0.614391
# Generated by Django 2.0.4 on 2018-04-25 14:50 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('jobs', '0003_auto_20180425_1406'), ] operations = [ migrations.AlterField( model_name='job', ...
0
395
23
d7bd61d9ea55136b2311139359d783a5db5ccfee
8,769
py
Python
src/Communication/Client/app.py
aquino35/elevator_system_prototype
f4b45df0852a3b6e97a32a3c312a7cc3aacb2d22
[ "MIT" ]
null
null
null
src/Communication/Client/app.py
aquino35/elevator_system_prototype
f4b45df0852a3b6e97a32a3c312a7cc3aacb2d22
[ "MIT" ]
null
null
null
src/Communication/Client/app.py
aquino35/elevator_system_prototype
f4b45df0852a3b6e97a32a3c312a7cc3aacb2d22
[ "MIT" ]
null
null
null
#!/usr/bin/env python # from .app_macros import * #relative import - did not work properly from app_macros import *
40.041096
145
0.68115
#!/usr/bin/env python # from .app_macros import * #relative import - did not work properly from app_macros import * class App(): def __init__(self,): """ App's constructor.""" self.init_app() def init_app(self): """ Initializes the App. """ try: self.setup_ap...
276
8,348
23
715654525e3b92ba082de887c45890f1f82a1f3f
1,973
py
Python
book/src/ch03/src/exceptions_2.py
zangyuchen2008/Clean-Code-in-Python-Second-Edition
0be2e41f6cf7322e12ec55d76135ff398df61b4a
[ "MIT" ]
133
2016-07-22T15:16:16.000Z
2022-03-29T22:39:40.000Z
book/src/ch03/src/exceptions_2.py
zangyuchen2008/Clean-Code-in-Python-Second-Edition
0be2e41f6cf7322e12ec55d76135ff398df61b4a
[ "MIT" ]
137
2021-01-05T11:21:04.000Z
2022-03-31T11:10:11.000Z
book/src/ch03/src/exceptions_2.py
zangyuchen2008/Clean-Code-in-Python-Second-Edition
0be2e41f6cf7322e12ec55d76135ff398df61b4a
[ "MIT" ]
41
2020-12-29T04:46:14.000Z
2022-03-20T22:36:17.000Z
"""Clean Code in Python - Chapter 3: General Traits of Good Code > Error Handling - Exceptions """ import logging import time from base import Connector, Event logger = logging.getLogger(__name__) def connect_with_retry( connector: Connector, retry_n_times: int, retry_backoff: int = 5 ): """Tries to establ...
30.353846
102
0.647745
"""Clean Code in Python - Chapter 3: General Traits of Good Code > Error Handling - Exceptions """ import logging import time from base import Connector, Event logger = logging.getLogger(__name__) def connect_with_retry( connector: Connector, retry_n_times: int, retry_backoff: int = 5 ): """Tries to establ...
457
0
81
8d79833ad772a85de78f2fa31627239a732baf79
373
py
Python
modules/tag/controllers.py
srcc-msu/job_statistics
74680a4e4c105ebcff94f089e07fcb44dbcc12d9
[ "MIT" ]
null
null
null
modules/tag/controllers.py
srcc-msu/job_statistics
74680a4e4c105ebcff94f089e07fcb44dbcc12d9
[ "MIT" ]
null
null
null
modules/tag/controllers.py
srcc-msu/job_statistics
74680a4e4c105ebcff94f089e07fcb44dbcc12d9
[ "MIT" ]
null
null
null
from flask import Blueprint, render_template, Response from application.helpers import requires_auth from core.tag.models import Tag tag_pages = Blueprint('tag', __name__ , template_folder='templates', static_folder='static') @tag_pages.route("/list") @requires_auth
23.3125
55
0.772118
from flask import Blueprint, render_template, Response from application.helpers import requires_auth from core.tag.models import Tag tag_pages = Blueprint('tag', __name__ , template_folder='templates', static_folder='static') @tag_pages.route("/list") @requires_auth def urls() -> Response: tags = Tag.query.all() ...
79
0
22
b57b9505c8bad95a1530bcc342608852f891d4ba
9,474
py
Python
retinaFace/widerface_evaluate.py
factzero/pytorch_jaguarface_examples
f248ff8899b8fe9d41a1e8ac095ed5b6688987ed
[ "MIT" ]
2
2020-04-09T05:48:35.000Z
2020-05-05T03:22:20.000Z
retinaFace/widerface_evaluate.py
factzero/pytorch_jaguarface_examples
f248ff8899b8fe9d41a1e8ac095ed5b6688987ed
[ "MIT" ]
1
2020-04-09T05:49:49.000Z
2020-04-09T05:49:49.000Z
retinaFace/widerface_evaluate.py
factzero/pytorch_jaguarface_examples
f248ff8899b8fe9d41a1e8ac095ed5b6688987ed
[ "MIT" ]
null
null
null
# -*- coding: UTF-8 -*- import os import tqdm import pickle import argparse import numpy as np from scipy.io import loadmat parser = argparse.ArgumentParser(description='widerface evaluate') parser.add_argument('-p', '--pred', default="./widerface_evaluate/widerface_txt/") parser.add_argument('-g', '--gt', default='....
32.895833
136
0.569559
# -*- coding: UTF-8 -*- import os import tqdm import pickle import argparse import numpy as np from scipy.io import loadmat parser = argparse.ArgumentParser(description='widerface evaluate') parser.add_argument('-p', '--pred', default="./widerface_evaluate/widerface_txt/") parser.add_argument('-g', '--gt', default='....
4,904
0
138
b6ea7427c056f0c167209b3122696506b99b84b8
1,279
py
Python
scripts/appveyor/copydeps.py
seec-team/seec
4b92456011e86b70f9d88833a95c1f655a21cf1a
[ "MIT" ]
7
2018-06-25T12:06:13.000Z
2022-01-18T09:20:13.000Z
scripts/appveyor/copydeps.py
seec-team/seec
4b92456011e86b70f9d88833a95c1f655a21cf1a
[ "MIT" ]
20
2016-12-01T23:46:12.000Z
2019-08-11T02:41:04.000Z
scripts/appveyor/copydeps.py
seec-team/seec
4b92456011e86b70f9d88833a95c1f655a21cf1a
[ "MIT" ]
1
2020-10-19T03:20:05.000Z
2020-10-19T03:20:05.000Z
import os import subprocess import shutil OBJDUMP = "objdump" DLL_NAME_PREFIX = 'DLL Name:' paths = filter(lambda line: not "windows" in line.lower(), os.environ['PATH'].split(os.pathsep)) searchfiles = [f for f in os.listdir('.') if is_interesting_local_file(f)] while len(searchfiles): localfile =...
27.804348
78
0.684128
import os import subprocess import shutil OBJDUMP = "objdump" DLL_NAME_PREFIX = 'DLL Name:' paths = filter(lambda line: not "windows" in line.lower(), os.environ['PATH'].split(os.pathsep)) def find_in_path(file): for path in paths: fullpath = os.path.join(path, file) if os.path.isfile(fullpa...
579
0
92
d64d7f2f072d118598f9c54bda691695735052c8
2,320
py
Python
thirdparty/blender_autocomplete-master/2.82/bpy/ops/import_anim.py
Ray1184/HPMSBatch
3852710e7366361cb9e90f471ddccbbce5ffe8ee
[ "MIT" ]
null
null
null
thirdparty/blender_autocomplete-master/2.82/bpy/ops/import_anim.py
Ray1184/HPMSBatch
3852710e7366361cb9e90f471ddccbbce5ffe8ee
[ "MIT" ]
null
null
null
thirdparty/blender_autocomplete-master/2.82/bpy/ops/import_anim.py
Ray1184/HPMSBatch
3852710e7366361cb9e90f471ddccbbce5ffe8ee
[ "MIT" ]
null
null
null
import sys import typing def bvh(filepath: str = "", filter_glob: str = "*.bvh", target: typing.Union[str, int] = 'ARMATURE', global_scale: float = 1.0, frame_start: int = 1, use_fps_scale: bool = False, update_scene_fps: bool = False, update_scene_duration: boo...
50.434783
468
0.702586
import sys import typing def bvh(filepath: str = "", filter_glob: str = "*.bvh", target: typing.Union[str, int] = 'ARMATURE', global_scale: float = 1.0, frame_start: int = 1, use_fps_scale: bool = False, update_scene_fps: bool = False, update_scene_duration: boo...
0
0
0
eb863368aec5ab18e9d5732dca071219bfaab1e7
329
py
Python
1stRound/Easy/728 Self Dividing Numbers/Filter.py
ericchen12377/Leetcode-Algorithm-Python
eb58cd4f01d9b8006b7d1a725fc48910aad7f192
[ "MIT" ]
2
2020-04-24T18:36:52.000Z
2020-04-25T00:15:57.000Z
1stRound/Easy/728 Self Dividing Numbers/Filter.py
ericchen12377/Leetcode-Algorithm-Python
eb58cd4f01d9b8006b7d1a725fc48910aad7f192
[ "MIT" ]
null
null
null
1stRound/Easy/728 Self Dividing Numbers/Filter.py
ericchen12377/Leetcode-Algorithm-Python
eb58cd4f01d9b8006b7d1a725fc48910aad7f192
[ "MIT" ]
null
null
null
left = 1 right = 22 p = Solution() print(p.selfDividingNumbers(left,right))
41.125
111
0.68997
class Solution(object): def selfDividingNumbers(self, left, right): is_self_dividing = lambda num: '0' not in str(num) and all(num % int(digit) == 0 for digit in str(num)) return list(filter(is_self_dividing, range(left, right + 1))) left = 1 right = 22 p = Solution() print(p.selfDividingNumbers(lef...
204
2
48
e51cf604f2301e3c5c1ccbf90cc8310f8eb78db9
1,398
py
Python
patsong/users/views.py
didils/PATSONG
3747617e70ed2cf67114ace475d1f92bee4e1784
[ "MIT" ]
null
null
null
patsong/users/views.py
didils/PATSONG
3747617e70ed2cf67114ace475d1f92bee4e1784
[ "MIT" ]
null
null
null
patsong/users/views.py
didils/PATSONG
3747617e70ed2cf67114ace475d1f92bee4e1784
[ "MIT" ]
null
null
null
from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from . import models from allauth.socialaccount.providers.facebook.views import FacebookOAuth2Adapter from rest_auth.registration.views import SocialLoginView
26.884615
80
0.638054
from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from . import models from allauth.socialaccount.providers.facebook.views import FacebookOAuth2Adapter from rest_auth.registration.views import SocialLoginView class ChangePassword(APIView): def ...
979
67
73
563a0e2a62d5b3da6ba694bb732f0d298837ea5f
294
py
Python
Python/django/myFirstDjangoProject/rdmsproj/rdmsapp/tests.py
honchardev/Fun
ca7c0076e9bb3017c5d7e89aa7d5bd54a83c8ecc
[ "MIT" ]
null
null
null
Python/django/myFirstDjangoProject/rdmsproj/rdmsapp/tests.py
honchardev/Fun
ca7c0076e9bb3017c5d7e89aa7d5bd54a83c8ecc
[ "MIT" ]
3
2020-03-24T16:26:35.000Z
2020-04-15T19:40:41.000Z
Python/django/myFirstDjangoProject/rdmsproj/rdmsapp/tests.py
honchardev/Fun
ca7c0076e9bb3017c5d7e89aa7d5bd54a83c8ecc
[ "MIT" ]
null
null
null
from django.test import TestCase from rdmsapp.models import Contact class ContactTests(TestCase): """Contact model tests."""
22.615385
46
0.605442
from django.test import TestCase from rdmsapp.models import Contact class ContactTests(TestCase): """Contact model tests.""" def test_str(self): contact = Contact( first_name='a', last_name='b', ) self.assertEquals(str(contact), 'a b')
137
0
26