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
50e74d35854c86bd0a208c931e436bcfc814f763
3,849
py
Python
tests/pulses/constant_pulse_template_tests.py
eendebakpt/qupulse
5b5b48de10084d413e10cfd8f6e9f7536c69dd70
[ "MIT" ]
30
2018-09-13T02:59:55.000Z
2022-03-21T04:25:22.000Z
tests/pulses/constant_pulse_template_tests.py
eendebakpt/qupulse
5b5b48de10084d413e10cfd8f6e9f7536c69dd70
[ "MIT" ]
220
2018-09-06T14:43:15.000Z
2022-03-25T12:26:25.000Z
tests/pulses/constant_pulse_template_tests.py
eendebakpt/qupulse
5b5b48de10084d413e10cfd8f6e9f7536c69dd70
[ "MIT" ]
14
2019-01-08T14:42:36.000Z
2021-05-21T08:53:06.000Z
import unittest import qupulse.pulses.plotting import qupulse._program.waveforms import qupulse.utils.sympy from qupulse.pulses import TablePT, FunctionPT, AtomicMultiChannelPT, MappingPT from qupulse.pulses.plotting import plot from qupulse.pulses.sequence_pulse_template import SequencePulseTemplate from qupulse._pro...
43.738636
113
0.677059
import unittest import qupulse.pulses.plotting import qupulse._program.waveforms import qupulse.utils.sympy from qupulse.pulses import TablePT, FunctionPT, AtomicMultiChannelPT, MappingPT from qupulse.pulses.plotting import plot from qupulse.pulses.sequence_pulse_template import SequencePulseTemplate from qupulse._pro...
3,205
30
185
91c892f35b793e6da0b88a8f56c528786f5a98d0
769
py
Python
alphabet_rangoli.py
adenosinew/algorithms
9a11cc18d725fd9d785dea99342d920cf5ea37fb
[ "MIT" ]
null
null
null
alphabet_rangoli.py
adenosinew/algorithms
9a11cc18d725fd9d785dea99342d920cf5ea37fb
[ "MIT" ]
null
null
null
alphabet_rangoli.py
adenosinew/algorithms
9a11cc18d725fd9d785dea99342d920cf5ea37fb
[ "MIT" ]
null
null
null
if __name__ == '__main__': print_rangoli(5)
27.464286
58
0.46684
def print_rangoli(size): alphabet=[chr(i) for i in range(ord('a'),ord('z')+1)] for i in range(size): if i>0: sub=alphabet[size-1-i:size] sub_reverse=sub[:] sub.reverse() sub_list=sub+sub_reverse[1:] s='-'.join(sub_list) else: ...
682
0
31
f9f1ee1fdb632311a630fb33b4c550588572ef0a
130
py
Python
__main__.py
lucasschoenhold/nes-py
7de04f48e928cf96ba0976ee61def5958aaa759d
[ "MIT" ]
128
2018-07-22T03:31:42.000Z
2022-03-28T13:17:04.000Z
__main__.py
lucasschoenhold/nes-py
7de04f48e928cf96ba0976ee61def5958aaa759d
[ "MIT" ]
35
2018-07-20T16:37:23.000Z
2022-02-04T00:37:23.000Z
__main__.py
lucasschoenhold/nes-py
7de04f48e928cf96ba0976ee61def5958aaa759d
[ "MIT" ]
31
2019-02-19T10:56:22.000Z
2022-01-15T19:32:52.000Z
"""The main script for development testing.""" from nes_py.app.cli import main # execute the main entry point of the CLI main()
18.571429
46
0.738462
"""The main script for development testing.""" from nes_py.app.cli import main # execute the main entry point of the CLI main()
0
0
0
d2aea9cbc2d4808d7eb4ede9b03fe6aaaf1b6bb8
727
py
Python
submissions/closest-binary-search-tree-value/solution.py
Wattyyy/LeetCode
13a9be056d0a0c38c2f8c8222b11dc02cb25a935
[ "MIT" ]
null
null
null
submissions/closest-binary-search-tree-value/solution.py
Wattyyy/LeetCode
13a9be056d0a0c38c2f8c8222b11dc02cb25a935
[ "MIT" ]
1
2022-03-04T20:24:32.000Z
2022-03-04T20:31:58.000Z
submissions/closest-binary-search-tree-value/solution.py
Wattyyy/LeetCode
13a9be056d0a0c38c2f8c8222b11dc02cb25a935
[ "MIT" ]
null
null
null
# https://leetcode.com/problems/closest-binary-search-tree-value # Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right
27.961538
64
0.61348
# https://leetcode.com/problems/closest-binary-search-tree-value # Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right class Solution: def __init__(self): self.distanc...
371
-6
103
ad77781c49fac60e715b11f04f37da4e4ac44c7a
4,977
py
Python
eahub/localgroups/views.py
austin226/eahub.org
5cadaac8d60d2f65671924cd05aa9a6b0cba3a84
[ "MIT" ]
null
null
null
eahub/localgroups/views.py
austin226/eahub.org
5cadaac8d60d2f65671924cd05aa9a6b0cba3a84
[ "MIT" ]
null
null
null
eahub/localgroups/views.py
austin226/eahub.org
5cadaac8d60d2f65671924cd05aa9a6b0cba3a84
[ "MIT" ]
null
null
null
from django import urls from django.conf import settings from django.contrib import messages from django.contrib.auth import mixins as auth_mixins from django.contrib.auth.decorators import login_required from django.contrib.sites.shortcuts import get_current_site from django.core.mail import send_mail from django.shor...
32.960265
87
0.68033
from django import urls from django.conf import settings from django.contrib import messages from django.contrib.auth import mixins as auth_mixins from django.contrib.auth.decorators import login_required from django.contrib.sites.shortcuts import get_current_site from django.core.mail import send_mail from django.shor...
3,020
909
212
16388d09352d3a15eccade0912b62f7b3e2e59f7
2,760
py
Python
tests/test_mutator.py
malcolmraine/Gatekeeper
33461bdd90ed83f834e13a7542d333982ba37d24
[ "Apache-2.0" ]
null
null
null
tests/test_mutator.py
malcolmraine/Gatekeeper
33461bdd90ed83f834e13a7542d333982ba37d24
[ "Apache-2.0" ]
null
null
null
tests/test_mutator.py
malcolmraine/Gatekeeper
33461bdd90ed83f834e13a7542d333982ba37d24
[ "Apache-2.0" ]
null
null
null
import unittest from Gatekeeper import Mutator
20.75188
72
0.536594
import unittest from Gatekeeper import Mutator class Person(Mutator): def __init__(self): self.address = "" @staticmethod def get_address_attribute(value): # Using mutator without decorator return value.upper() class TestMutator(unittest.TestCase): def test_cast(self) -> Non...
203
2,462
46
7fc5cc6e34641bc3813078331fcb1abd347f9b74
424
py
Python
fairseq/save_matrix_to_img.py
ToWeRT1An/group_fairseq
ca323ad5d3e7eca457f2cb8976cb732fedc9757e
[ "BSD-3-Clause" ]
null
null
null
fairseq/save_matrix_to_img.py
ToWeRT1An/group_fairseq
ca323ad5d3e7eca457f2cb8976cb732fedc9757e
[ "BSD-3-Clause" ]
null
null
null
fairseq/save_matrix_to_img.py
ToWeRT1An/group_fairseq
ca323ad5d3e7eca457f2cb8976cb732fedc9757e
[ "BSD-3-Clause" ]
null
null
null
import torch from torchvision.utils import save_image
30.285714
74
0.514151
import torch from torchvision.utils import save_image def save_attn(m, file_path): if len(m.shape) == 3: for i in range(m.shape[0]): save_image(m[i],file_path+'/'+str(i)+'_'+str(m.shape[0])+'_'+\ str(m.shape[1])+'_'+str(m.shape[-1])+'.jpg') elif len(m.shape) == 2: ...
340
0
28
e0249919f501aff8684a4ba12372ca276b0666f2
1,468
py
Python
tests/pyre.pkg/patterns/unique_registry.py
PyreFramework/pyre
345c7449a3416eea1c1affa74fb32faff30a6aaa
[ "BSD-3-Clause" ]
null
null
null
tests/pyre.pkg/patterns/unique_registry.py
PyreFramework/pyre
345c7449a3416eea1c1affa74fb32faff30a6aaa
[ "BSD-3-Clause" ]
null
null
null
tests/pyre.pkg/patterns/unique_registry.py
PyreFramework/pyre
345c7449a3416eea1c1affa74fb32faff30a6aaa
[ "BSD-3-Clause" ]
null
null
null
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # # michael a.g. aïvázis <michael.aivazis@para-sim.com> # (c) 1998-2022 all rights reserved def test(): """ Verify that classes can intercept registry creation """ # access from pyre.patterns.Unique import Unique # make a class to serve as a reg...
22.584615
92
0.589237
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # # michael a.g. aïvázis <michael.aivazis@para-sim.com> # (c) 1998-2022 all rights reserved def test(): """ Verify that classes can intercept registry creation """ # access from pyre.patterns.Unique import Unique # make a class to serve as a reg...
171
404
26
2c907594ed5935c8a81ec7e0f9700b054d91b263
14,287
py
Python
balena-cam/app/server.py
akhileshboodhun/balena-cam
347b5a411613033cbfeaa907d68d8f696a05863f
[ "Apache-2.0" ]
null
null
null
balena-cam/app/server.py
akhileshboodhun/balena-cam
347b5a411613033cbfeaa907d68d8f696a05863f
[ "Apache-2.0" ]
null
null
null
balena-cam/app/server.py
akhileshboodhun/balena-cam
347b5a411613033cbfeaa907d68d8f696a05863f
[ "Apache-2.0" ]
null
null
null
import asyncio import json import os import cv2 import platform import sys from time import sleep import time from aiohttp import web from av import VideoFrame from aiortc import RTCPeerConnection, RTCSessionDescription, VideoStreamTrack, RTCIceServer, RTCConfiguration from aiohttp_basicauth import BasicAuthMiddleware ...
33.459016
118
0.595786
import asyncio import json import os import cv2 import platform import sys from time import sleep import time from aiohttp import web from av import VideoFrame from aiortc import RTCPeerConnection, RTCSessionDescription, VideoStreamTrack, RTCIceServer, RTCConfiguration from aiohttp_basicauth import BasicAuthMiddleware ...
10,431
20
822
83c22695b516919730bf4947f32543050a6068c4
128
py
Python
channelsmultiplexer/__init__.py
hishnash/channelsmultiplexer
b35f741f356c15e96e51ace2b85ea65a630fcc85
[ "MIT" ]
25
2018-11-08T19:42:08.000Z
2022-01-28T00:49:42.000Z
channelsmultiplexer/__init__.py
hishnash/channelsmultiplexer
b35f741f356c15e96e51ace2b85ea65a630fcc85
[ "MIT" ]
4
2018-11-11T23:40:48.000Z
2022-02-25T09:37:46.000Z
channelsmultiplexer/__init__.py
hishnash/channelsmultiplexer
b35f741f356c15e96e51ace2b85ea65a630fcc85
[ "MIT" ]
6
2019-01-13T22:44:40.000Z
2022-02-25T14:23:36.000Z
from channelsmultiplexer.demultiplexer import AsyncJsonWebsocketDemultiplexer __all__ = [ AsyncJsonWebsocketDemultiplexer ]
25.6
77
0.867188
from channelsmultiplexer.demultiplexer import AsyncJsonWebsocketDemultiplexer __all__ = [ AsyncJsonWebsocketDemultiplexer ]
0
0
0
2fdf73d92e81234842ceb633829cea348a288ece
709
py
Python
acmweb/settings.py
hnit-acm/hnit-acm-web
438cce2db574a953caea75503c1132644299ecde
[ "MIT" ]
2
2020-10-26T14:07:45.000Z
2020-11-22T13:47:21.000Z
acmweb/settings.py
hnit-acm/hnit-acm-web
438cce2db574a953caea75503c1132644299ecde
[ "MIT" ]
null
null
null
acmweb/settings.py
hnit-acm/hnit-acm-web
438cce2db574a953caea75503c1132644299ecde
[ "MIT" ]
3
2021-07-19T07:44:51.000Z
2021-08-03T15:53:20.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2020/10/22 16:29 # @Author : Coodyz # @Site : https://github.com/coolbreeze2 # @File : settings.py # @Software: PyCharm import os import sys basedir = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) # SQLite URI compatible WIN = sys.platfor...
22.870968
96
0.67842
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2020/10/22 16:29 # @Author : Coodyz # @Site : https://github.com/coolbreeze2 # @File : settings.py # @Software: PyCharm import os import sys basedir = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) # SQLite URI compatible WIN = sys.platfor...
0
256
23
b94816e6a1751a26c8b236e7af9f60f21c9686d7
1,577
py
Python
setup.py
khanlab/pydeface
13eede1595fbf776f1c3af48d66ad057066acfbc
[ "MIT" ]
1
2021-06-11T02:17:48.000Z
2021-06-11T02:17:48.000Z
setup.py
khanlab/pydeface
13eede1595fbf776f1c3af48d66ad057066acfbc
[ "MIT" ]
null
null
null
setup.py
khanlab/pydeface
13eede1595fbf776f1c3af48d66ad057066acfbc
[ "MIT" ]
1
2020-07-14T14:19:42.000Z
2020-07-14T14:19:42.000Z
#!/usr/bin/env python # # Copyright (C) 2013-2015 Russell Poldrack <poldrack@stanford.edu> # # Some portions were borrowed from: # https://github.com/mwaskom/lyman/blob/master/setup.py # and: # https://chriswarrick.com/blog/2014/09/15/python-apps-the-right-way-entry_points-and-scripts/ import os from setuptools import...
31.54
94
0.630311
#!/usr/bin/env python # # Copyright (C) 2013-2015 Russell Poldrack <poldrack@stanford.edu> # # Some portions were borrowed from: # https://github.com/mwaskom/lyman/blob/master/setup.py # and: # https://chriswarrick.com/blog/2014/09/15/python-apps-the-right-way-entry_points-and-scripts/ import os from setuptools import...
0
0
0
6aea42a28eed84faf29e4fb36bb6389c2f884432
12,096
py
Python
test1.py
wgcban/spin_roadmapper
2c1c8f22073d989753dc6f95d1f547198a76414b
[ "Apache-2.0" ]
24
2021-09-15T00:20:52.000Z
2022-03-27T05:01:23.000Z
test1.py
wgcban/spin_roadmapper
2c1c8f22073d989753dc6f95d1f547198a76414b
[ "Apache-2.0" ]
2
2021-12-27T13:45:02.000Z
2022-03-25T13:33:20.000Z
test1.py
wgcban/spin_roadmapper
2c1c8f22073d989753dc6f95d1f547198a76414b
[ "Apache-2.0" ]
3
2021-12-27T03:11:56.000Z
2022-03-10T10:24:42.000Z
from __future__ import print_function import argparse import json import os from datetime import datetime import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import torch.utils.data as data from model.models import MODELS from road_dataset import DeepGlobe...
34.073239
151
0.632192
from __future__ import print_function import argparse import json import os from datetime import datetime import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import torch.utils.data as data from model.models import MODELS from road_dataset import DeepGlobe...
6,245
0
23
8a800b78cc0a7c0b79c6703c5fad8c240958d500
5,054
py
Python
plot_example.py
GeoCode-polymtl/Deep_1D_velocity
8f42fc4f5c984d0e11b4c93ae7eee99ba3843b4c
[ "MIT" ]
7
2020-08-17T19:47:21.000Z
2022-03-29T08:02:51.000Z
plot_example.py
GeoCode-polymtl/Deep_1D_velocity
8f42fc4f5c984d0e11b4c93ae7eee99ba3843b4c
[ "MIT" ]
6
2020-01-28T22:17:17.000Z
2022-02-09T23:31:59.000Z
plot_example.py
GeoCode-polymtl/Deep_1D_velocity
8f42fc4f5c984d0e11b4c93ae7eee99ba3843b4c
[ "MIT" ]
4
2019-11-27T06:05:31.000Z
2021-10-08T00:38:38.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Plot one example with generated data """ from vrmslearn.ModelParameters import ModelParameters from vrmslearn.SeismicGenerator import SeismicGenerator, mute_direct, random_time_scaling, random_noise, random_static import argparse import matplotlib.pyplot as plt import...
33.919463
118
0.582509
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Plot one example with generated data """ from vrmslearn.ModelParameters import ModelParameters from vrmslearn.SeismicGenerator import SeismicGenerator, mute_direct, random_time_scaling, random_noise, random_static import argparse import matplotlib.pyplot as plt import...
0
0
0
7ab9af606a4ec26dc2e1ce9d28c2d6a04ba6f60b
4,136
py
Python
scripts/extract-omicsdi-datasets.py
EMBL-EBI-TSI/RDSDS-Indexer
9207d99ee34410fbeb4c518b5a6e49a655ca7a83
[ "Apache-2.0" ]
null
null
null
scripts/extract-omicsdi-datasets.py
EMBL-EBI-TSI/RDSDS-Indexer
9207d99ee34410fbeb4c518b5a6e49a655ca7a83
[ "Apache-2.0" ]
null
null
null
scripts/extract-omicsdi-datasets.py
EMBL-EBI-TSI/RDSDS-Indexer
9207d99ee34410fbeb4c518b5a6e49a655ca7a83
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import os import sys import argparse import datetime import textwrap import requests import json import csv import urllib from pprint import pprint from settings import OMICSDI, OMICSDI_HEADERS, PATHS DATA = [] def request_url(URL): """Request URL and return JSON payload""" r = requests.g...
33.901639
82
0.677708
#!/usr/bin/env python3 import os import sys import argparse import datetime import textwrap import requests import json import csv import urllib from pprint import pprint from settings import OMICSDI, OMICSDI_HEADERS, PATHS DATA = [] def request_url(URL): """Request URL and return JSON payload""" r = requests.g...
528
0
23
91f312cb8f689ea616bdbc2a492a8af9c7a64e82
291
py
Python
gum/apps.py
marcosgabarda/django-gum
796a496e95391aab9e462bde6d8f775534d5f6c6
[ "MIT" ]
16
2015-05-04T18:47:33.000Z
2021-02-03T17:10:40.000Z
gum/apps.py
marcosgabarda/django-gum
796a496e95391aab9e462bde6d8f775534d5f6c6
[ "MIT" ]
4
2015-09-08T14:48:31.000Z
2016-09-09T09:49:41.000Z
gum/apps.py
marcosgabarda/django-gum
796a496e95391aab9e462bde6d8f775534d5f6c6
[ "MIT" ]
2
2015-05-04T18:39:23.000Z
2016-04-18T14:35:47.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.apps import AppConfig
22.384615
59
0.71134
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.apps import AppConfig class GumConfig(AppConfig): name = 'gum' verbose_name = 'Gum' def ready(self): from gum.models import handle_indexer_registrations handle_indexer_registrations()
94
75
23
c3bd282f5426ddf24c1a77eb3931901a51a6ba57
305
py
Python
ribosome.py
mathandcodes/algenomics
f036e3f15e1bbae081494f274494f8af36125126
[ "MIT" ]
null
null
null
ribosome.py
mathandcodes/algenomics
f036e3f15e1bbae081494f274494f8af36125126
[ "MIT" ]
null
null
null
ribosome.py
mathandcodes/algenomics
f036e3f15e1bbae081494f274494f8af36125126
[ "MIT" ]
1
2021-05-10T05:26:09.000Z
2021-05-10T05:26:09.000Z
# Aminoacidos AMINOACIDS = { "AAA": "lisina", "AAC": "asparagina", "AGC": "serina" } # Codons CODONS = list(AMINOACIDS.keys())
17.941176
54
0.616393
# Aminoacidos AMINOACIDS = { "AAA": "lisina", "AAC": "asparagina", "AGC": "serina" } # Codons CODONS = list(AMINOACIDS.keys()) class Ribosome: @staticmethod def translation(sequence: str): "RNA to protein" #TODO Completar aminoacidos y hacer traduccion pass
0
143
23
7c800a7eafc9d2d838f4b7e89d2170c96f7ce8b0
4,253
py
Python
object-detection/yolov2/valid.py
shikisawamura/nnabla-examples
baf4e4cc620dedbf4368683325c0fb868676850d
[ "Apache-2.0" ]
null
null
null
object-detection/yolov2/valid.py
shikisawamura/nnabla-examples
baf4e4cc620dedbf4368683325c0fb868676850d
[ "Apache-2.0" ]
null
null
null
object-detection/yolov2/valid.py
shikisawamura/nnabla-examples
baf4e4cc620dedbf4368683325c0fb868676850d
[ "Apache-2.0" ]
1
2020-04-25T06:11:28.000Z
2020-04-25T06:11:28.000Z
# Copyright (c) 2017 Sony Corporation. 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 applicabl...
35.441667
127
0.624971
# Copyright (c) 2017 Sony Corporation. 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 applicabl...
3,071
0
23
37daf27992d4c6c9ee9293de58cfda6f5c64b537
490
py
Python
conftest.py
gtback/cached-property
b4e96315a6b552e85461a96e6ab8afafb0f4331b
[ "BSD-3-Clause" ]
null
null
null
conftest.py
gtback/cached-property
b4e96315a6b552e85461a96e6ab8afafb0f4331b
[ "BSD-3-Clause" ]
null
null
null
conftest.py
gtback/cached-property
b4e96315a6b552e85461a96e6ab8afafb0f4331b
[ "BSD-3-Clause" ]
null
null
null
import sys # Whether "import asyncio" works has_asyncio = (sys.version_info[0] == 3 and sys.version_info[1] >= 4) # Whether the async and await keywords work has_async_await = (sys.version_info[0] == 3 and sys.version_info[1] >= 5) print("conftest.py", has_asyncio, has_async_await) collect_ignore = [] if not ha...
23.333333
73
0.755102
import sys # Whether "import asyncio" works has_asyncio = (sys.version_info[0] == 3 and sys.version_info[1] >= 4) # Whether the async and await keywords work has_async_await = (sys.version_info[0] == 3 and sys.version_info[1] >= 5) print("conftest.py", has_asyncio, has_async_await) collect_ignore = [] if not ha...
0
0
0
10bc4750a98ccf1bf4e423f0210a14adfd69da9c
1,256
py
Python
sellshop/blog/models.py
TalehIlqar/E-commerce
fca96703412c5f63f2fe00a952154d8ab2e1b3bd
[ "MIT" ]
null
null
null
sellshop/blog/models.py
TalehIlqar/E-commerce
fca96703412c5f63f2fe00a952154d8ab2e1b3bd
[ "MIT" ]
null
null
null
sellshop/blog/models.py
TalehIlqar/E-commerce
fca96703412c5f63f2fe00a952154d8ab2e1b3bd
[ "MIT" ]
null
null
null
from django.db import models from django.utils import timezone from sellshop.utils.base_models import BaseModel from django.utils.translation import ugettext_lazy as _
40.516129
125
0.719745
from django.db import models from django.utils import timezone from sellshop.utils.base_models import BaseModel from django.utils.translation import ugettext_lazy as _ class Blog(BaseModel): title = models.CharField("Title", max_length=30, help_text="Max 30 char.") description = models.TextField(verbose_name=...
76
964
46
d3eac75ca0b40cfa1cf4b64cb31bb4f033c73613
5,936
py
Python
grasso/fat32.py
joakimfors/grasso
a31ed8d83739ed5e90e648c3e572d425149e6ee8
[ "MIT" ]
5
2016-10-27T23:56:53.000Z
2021-06-11T21:05:27.000Z
grasso/fat32.py
joakimfors/grasso
a31ed8d83739ed5e90e648c3e572d425149e6ee8
[ "MIT" ]
1
2018-01-13T16:09:17.000Z
2018-01-13T16:09:17.000Z
grasso/fat32.py
joakimfors/grasso
a31ed8d83739ed5e90e648c3e572d425149e6ee8
[ "MIT" ]
2
2016-04-11T17:14:14.000Z
2020-04-18T12:00:50.000Z
# -*- encoding: utf-8 -*- # # Grasso - a FAT filesystem parser # # Copyright 2011 Emanuele Aina <em@nerd.ocracy.org> # # Released under the term of a MIT-style license, see LICENSE # for details. from struct import unpack
38.797386
78
0.48467
# -*- encoding: utf-8 -*- # # Grasso - a FAT filesystem parser # # Copyright 2011 Emanuele Aina <em@nerd.ocracy.org> # # Released under the term of a MIT-style license, see LICENSE # for details. from struct import unpack class ExtendedBIOSParameterBlock32(object): length = 476 unpacker = "<IHHIHH12sBBB4s11s8...
5,303
261
149
63d1b146364c0bceb396641198af58e67666ee0e
2,247
py
Python
src/client.py
elros28/mtg-data
0248d41629b53d15aa29a2f3aee0c5b0c22b28e3
[ "MIT" ]
2
2021-07-23T10:09:53.000Z
2021-11-07T16:55:28.000Z
src/client.py
elros28/mtg-data
0248d41629b53d15aa29a2f3aee0c5b0c22b28e3
[ "MIT" ]
1
2021-07-21T12:44:18.000Z
2021-07-26T12:36:26.000Z
src/client.py
elros28/mtg-data
0248d41629b53d15aa29a2f3aee0c5b0c22b28e3
[ "MIT" ]
1
2021-11-03T21:27:54.000Z
2021-11-03T21:27:54.000Z
from sqlalchemy import create_engine import logging logger = logging.getLogger('client.py') class Client: """ Connection to the database. The current implementation only refers to the PostgreSQL database, however, this could be easily enhanced to any database at all, including cloud. """ ...
45.857143
317
0.646195
from sqlalchemy import create_engine import logging logger = logging.getLogger('client.py') class Client: """ Connection to the database. The current implementation only refers to the PostgreSQL database, however, this could be easily enhanced to any database at all, including cloud. """ ...
1,218
0
107
6950c7906927de261c207816946c85bb7a602e88
455
py
Python
PythonExercicios/ex016.py
gabjohann/python_3
380cb622669ed82d6b22fdd09d41f02f1ad50a73
[ "MIT" ]
null
null
null
PythonExercicios/ex016.py
gabjohann/python_3
380cb622669ed82d6b22fdd09d41f02f1ad50a73
[ "MIT" ]
null
null
null
PythonExercicios/ex016.py
gabjohann/python_3
380cb622669ed82d6b22fdd09d41f02f1ad50a73
[ "MIT" ]
null
null
null
# Crie um programa que leia um número real qualquer pelo teclado e mostre na tela a sua porção inteira # Ex.: # Digite um número: 6.127 # O número 6.127 tem a parte inteira 6 from math import trunc num = float(input('Digite um número: ')) print('O número {} tem a parte inteira {}'.format(num, trunc(num))) ''' -> ou...
25.277778
102
0.685714
# Crie um programa que leia um número real qualquer pelo teclado e mostre na tela a sua porção inteira # Ex.: # Digite um número: 6.127 # O número 6.127 tem a parte inteira 6 from math import trunc num = float(input('Digite um número: ')) print('O número {} tem a parte inteira {}'.format(num, trunc(num))) ''' -> ou...
0
0
0
f4bd9358c75784a5fe295f67c4684885fc88629f
11,589
py
Python
alipay/aop/api/domain/LeadsOrderInfo.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/domain/LeadsOrderInfo.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/domain/LeadsOrderInfo.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import *
32.553371
93
0.591854
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class LeadsOrderInfo(object): def __init__(self): self._biz_type = None self._camp_name = None self._channel = None self._city_name = None self._contact_mobile =...
9,347
2,104
23
8a7bb03a2e040749c97a36fbd0d5d752d59bf1d7
590
py
Python
mytravelblog/accounts/admin.py
yetoshimo/my-travel-blog
de67dd135e66f2dda121850d54fd56fd644b9bff
[ "MIT" ]
null
null
null
mytravelblog/accounts/admin.py
yetoshimo/my-travel-blog
de67dd135e66f2dda121850d54fd56fd644b9bff
[ "MIT" ]
null
null
null
mytravelblog/accounts/admin.py
yetoshimo/my-travel-blog
de67dd135e66f2dda121850d54fd56fd644b9bff
[ "MIT" ]
null
null
null
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from mytravelblog.accounts.models import * UserModel = get_user_model() @admin.register(Profile) admin.site.unregister(UserModel) @admin.register(UserModel)
21.851852
52
0.740678
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from mytravelblog.accounts.models import * UserModel = get_user_model() class ProfileInlineAdmin(admin.StackedInline): model = Profile @admin.register(Profile) class ProfileAdmin(admin.ModelAdmin): list_display = ('user', 'cu...
0
276
67
6767dda16d02bef81ed8d77ad0a5d3cc20e5e995
418
py
Python
erpnext_ocr/erpnext_ocr/doctype/ocr_settings/ocr_settings.py
Compres/erpnext_ocr
7c9398ab4f5b81a416f8d05edd12b341c080557c
[ "MIT" ]
1
2020-12-05T01:41:42.000Z
2020-12-05T01:41:42.000Z
erpnext_ocr/erpnext_ocr/doctype/ocr_settings/ocr_settings.py
mohsinalimat/erpnext_ocr
3f78ceb60896aee80219bae3d003203f7ec7f0ae
[ "MIT" ]
null
null
null
erpnext_ocr/erpnext_ocr/doctype/ocr_settings/ocr_settings.py
mohsinalimat/erpnext_ocr
3f78ceb60896aee80219bae3d003203f7ec7f0ae
[ "MIT" ]
1
2021-04-25T02:43:33.000Z
2021-04-25T02:43:33.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2020, Monogramm and contributors # For license information, please see license.txt import frappe from frappe import _ from frappe.model.document import Document
27.866667
94
0.679426
# -*- coding: utf-8 -*- # Copyright (c) 2020, Monogramm and contributors # For license information, please see license.txt import frappe from frappe import _ from frappe.model.document import Document class OCRSettings(Document): def validate(self): if not self.pdf_resolution > 0: frappe.thro...
159
7
49
8dbb867533ac370e9c97ffb88733e99eb5d99fde
6,639
py
Python
code/Tisajokt/lambda_v2.py
usedToBeTomas/PrisonersDilemmaTournament
b5ce72e4e0b943dd2fa8cca35a191bd3b4c4d5aa
[ "MIT" ]
23
2021-05-20T07:34:33.000Z
2021-06-20T13:09:04.000Z
code/Tisajokt/lambda_v2.py
usedToBeTomas/PrisonersDilemmaTournament
b5ce72e4e0b943dd2fa8cca35a191bd3b4c4d5aa
[ "MIT" ]
19
2021-05-21T04:10:55.000Z
2021-06-13T15:17:52.000Z
code/Tisajokt/lambda_v2.py
usedToBeTomas/PrisonersDilemmaTournament
b5ce72e4e0b943dd2fa8cca35a191bd3b4c4d5aa
[ "MIT" ]
43
2021-05-21T02:24:35.000Z
2021-06-24T21:08:11.000Z
import numpy as np import math # lambda.py, by Tisajokt (james.and.tisa@gmail.com) # Version 2 (Version 1 was the competition version) # An OmegaTFT variant (see https://arxiv.org/ftp/cs/papers/0609/0609017.pdf), with improvements: # - joss detection # - extortionate ZD detection # - extra random handling # - extra a...
35.693548
201
0.700105
import numpy as np import math # lambda.py, by Tisajokt (james.and.tisa@gmail.com) # Version 2 (Version 1 was the competition version) # An OmegaTFT variant (see https://arxiv.org/ftp/cs/papers/0609/0609017.pdf), with improvements: # - joss detection # - extortionate ZD detection # - extra random handling # - extra a...
4,839
0
23
ef840494d74199bd6f048450a7b12bfa806e0c42
399
py
Python
project/backend/migrations/0003_alter_item_img.py
ryan-lam/hackathonx2021
1bdab8c474c5bfa37a17703761357092521128aa
[ "MIT" ]
1
2021-07-27T14:01:35.000Z
2021-07-27T14:01:35.000Z
project/backend/migrations/0003_alter_item_img.py
ryan-lam/hackathonx2021
1bdab8c474c5bfa37a17703761357092521128aa
[ "MIT" ]
null
null
null
project/backend/migrations/0003_alter_item_img.py
ryan-lam/hackathonx2021
1bdab8c474c5bfa37a17703761357092521128aa
[ "MIT" ]
2
2021-07-09T19:54:53.000Z
2021-07-10T16:46:00.000Z
# Generated by Django 3.2.4 on 2021-06-26 00:17 from django.db import migrations, models
21
68
0.596491
# Generated by Django 3.2.4 on 2021-06-26 00:17 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('backend', '0002_auto_20210625_1925'), ] operations = [ migrations.AlterField( model_name='item', name='img', ...
0
285
23
617a110ea4fa69f6ecb3820b5787a2c4054eb5fc
1,320
py
Python
imbd/imbd_data_reshape.py
worldwidekatie/GPT3_Synthetic
722ceb0b931873ea1b835dd291028d25b775adeb
[ "MIT" ]
1
2022-02-28T19:49:20.000Z
2022-02-28T19:49:20.000Z
imbd/imbd_data_reshape.py
worldwidekatie/GPT3_Synthetic
722ceb0b931873ea1b835dd291028d25b775adeb
[ "MIT" ]
null
null
null
imbd/imbd_data_reshape.py
worldwidekatie/GPT3_Synthetic
722ceb0b931873ea1b835dd291028d25b775adeb
[ "MIT" ]
1
2022-03-06T06:40:42.000Z
2022-03-06T06:40:42.000Z
import pandas as pd from sklearn.model_selection import train_test_split df = pd.read_csv('imbd/data/imbd_orig.csv') df = df.rename(columns={'review': 'text', 'sentiment':'label'}) """Truncating""" var1 = list(df["text"]) var = [] for i in var1: if len(i) > 900: var.append(i[:900]) else: var...
24.444444
72
0.700758
import pandas as pd from sklearn.model_selection import train_test_split df = pd.read_csv('imbd/data/imbd_orig.csv') df = df.rename(columns={'review': 'text', 'sentiment':'label'}) """Truncating""" var1 = list(df["text"]) var = [] for i in var1: if len(i) > 900: var.append(i[:900]) else: var...
0
0
0
25f014d9ff80f812cc52824ed7a98b158cb3beee
102
py
Python
django_extensions/tests/__init__.py
bhaugen/localecon
ee3134f701e6a786767cf7eeb165ee03f077e9da
[ "MIT" ]
10
2015-02-14T14:22:31.000Z
2022-02-22T17:40:34.000Z
django_extensions/tests/__init__.py
trbs/django-extensions
291fa141193fb444927809dc71e3dc74eca9382b
[ "MIT" ]
3
2017-02-01T16:44:04.000Z
2018-04-02T13:48:03.000Z
django_extensions/tests/__init__.py
bhaugen/localecon
ee3134f701e6a786767cf7eeb165ee03f077e9da
[ "MIT" ]
1
2021-07-01T16:08:34.000Z
2021-07-01T16:08:34.000Z
from django_extensions.tests.utils import UTILS_TESTS __test__ = { 'UTILS_TESTS': UTILS_TESTS, }
17
53
0.764706
from django_extensions.tests.utils import UTILS_TESTS __test__ = { 'UTILS_TESTS': UTILS_TESTS, }
0
0
0
ba07ae9ef71b0f882cd8fdbe4636858a19fd4974
459
py
Python
2016/day3.py
ksallberg/adventofcode
ba5b31eca58ff9afbcada7559366b5ee6c39f0f6
[ "BSD-2-Clause" ]
1
2015-12-06T16:40:10.000Z
2015-12-06T16:40:10.000Z
2016/day3.py
ksallberg/adventofcode
ba5b31eca58ff9afbcada7559366b5ee6c39f0f6
[ "BSD-2-Clause" ]
null
null
null
2016/day3.py
ksallberg/adventofcode
ba5b31eca58ff9afbcada7559366b5ee6c39f0f6
[ "BSD-2-Clause" ]
null
null
null
instructions = [line.rstrip("\n") for line in open("input", "r")] valids = [] for instr in instructions: x = instr.split(" ") y = [int(z) for z in x if z != ''] if valid(y) == True and y not in valids: valids.append(y) print "Valid triangles: ", len(valids)
19.956522
65
0.529412
instructions = [line.rstrip("\n") for line in open("input", "r")] valids = [] def valid(inp): [a, b, c] = inp if a + b <= c: return False elif b + c <= a: return False elif a + c <= b: return False return True for instr in instructions: x = instr.split(" ") y = [in...
154
0
23
a5e3db457261257b47018c24c828a178bf77f16d
4,959
py
Python
module/debug.py
makalo/Siamese-RPN-tensorflow
efd7d61f84b0cd5c84cada7d881f766480aea322
[ "MIT" ]
140
2018-11-21T14:00:34.000Z
2022-02-19T03:04:05.000Z
module/debug.py
WangJerry95/Siamese-RPN-tensorflow
efd7d61f84b0cd5c84cada7d881f766480aea322
[ "MIT" ]
21
2018-11-21T14:08:19.000Z
2021-07-11T03:37:18.000Z
module/debug.py
makalo/Siamese-RPN-tensorflow
efd7d61f84b0cd5c84cada7d881f766480aea322
[ "MIT" ]
35
2018-12-06T14:34:56.000Z
2022-03-29T12:19:03.000Z
import numpy as np from config import cfg import cv2 from numba import jit @jit
37.285714
121
0.554749
import numpy as np from config import cfg import cv2 from numba import jit @jit def debug(img,gt,pre_cls,pre_reg,pre_score,pre_box,label,target_box,step,anchor_op): img=(img*255).astype(np.uint8) #print('=============================================================') # pre_cls=pre_cls.reshape((-1,2)) # ...
4,858
0
22
5058e80dfc8daa5b6b883944bb57f767df48aa64
514
py
Python
C++/testing/serverSock.py
EJEmmett/RocksatX19
27139f72915ae7dd376daeb47a8721c09dd1f717
[ "BSL-1.0" ]
null
null
null
C++/testing/serverSock.py
EJEmmett/RocksatX19
27139f72915ae7dd376daeb47a8721c09dd1f717
[ "BSL-1.0" ]
null
null
null
C++/testing/serverSock.py
EJEmmett/RocksatX19
27139f72915ae7dd376daeb47a8721c09dd1f717
[ "BSL-1.0" ]
null
null
null
import socket #from threading import * HOST = '10.1.121.102' PORT = 65432 with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: s.bind((HOST, PORT)) s.listen() conn, addr = s.accept() with conn: print('connected by', addr) while True: ...
27.052632
60
0.453307
import socket #from threading import * HOST = '10.1.121.102' PORT = 65432 with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: s.bind((HOST, PORT)) s.listen() conn, addr = s.accept() with conn: print('connected by', addr) while True: ...
0
0
0
8caf10bab7d923396862b0b100643a51fad3da89
74,384
py
Python
pysnmp-with-texts/CISCO-POP-MGMT-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/CISCO-POP-MGMT-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/CISCO-POP-MGMT-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 CISCO-POP-MGMT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-POP-MGMT-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:09:39 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, ...
167.155056
6,002
0.778366
# # PySNMP MIB module CISCO-POP-MGMT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-POP-MGMT-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:09:39 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, ...
0
0
0
5d2c53c2ab685d4fb3a4853e27026c1c7141306b
16,537
py
Python
tokenization.py
wangwang110/PIE
474769e3c4266deefcb7dd5daf802a1306bc7c99
[ "MIT" ]
165
2019-10-08T09:54:46.000Z
2022-03-17T06:50:32.000Z
tokenization.py
wangwang110/PIE
474769e3c4266deefcb7dd5daf802a1306bc7c99
[ "MIT" ]
28
2019-11-02T07:06:26.000Z
2022-03-24T09:20:58.000Z
tokenization.py
wangwang110/PIE
474769e3c4266deefcb7dd5daf802a1306bc7c99
[ "MIT" ]
38
2019-12-05T06:01:54.000Z
2022-03-21T09:35:23.000Z
# code adapted from https://github.com/google-research/bert # modification of tokenization.py for GEC """Tokenization classes.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import unicodedata import six import tensorflow as tf fro...
29.269027
160
0.638145
# code adapted from https://github.com/google-research/bert # modification of tokenization.py for GEC """Tokenization classes.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import unicodedata import six import tensorflow as tf fro...
6,235
0
540
03960228214839a0b38c88fbc49a473defdb2b27
1,452
py
Python
Leetcode/Basic/Tree/108_Convert_Sorted_Array_to_Binary_Search_Tree.py
ZR-Huang/AlgorithmPractices
226cecde136531341ce23cdf88529345be1912fc
[ "BSD-3-Clause" ]
1
2019-11-26T11:52:25.000Z
2019-11-26T11:52:25.000Z
Leetcode/Basic/Tree/108_Convert_Sorted_Array_to_Binary_Search_Tree.py
ZR-Huang/AlgorithmPractices
226cecde136531341ce23cdf88529345be1912fc
[ "BSD-3-Clause" ]
null
null
null
Leetcode/Basic/Tree/108_Convert_Sorted_Array_to_Binary_Search_Tree.py
ZR-Huang/AlgorithmPractices
226cecde136531341ce23cdf88529345be1912fc
[ "BSD-3-Clause" ]
null
null
null
''' Given an array where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never differ by more than 1. Example: Given the sorted array: [-10,-3,0,5,9], One poss...
27.396226
157
0.511708
''' Given an array where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never differ by more than 1. Example: Given the sorted array: [-10,-3,0,5,9], One poss...
785
-6
49
ebd0f8a35e0cc734c7ac99d852860f318c08a16b
352
py
Python
datahub/email_ingestion/__init__.py
Staberinde/data-hub-api
3d0467dbceaf62a47158eea412a3dba827073300
[ "MIT" ]
6
2019-12-02T16:11:24.000Z
2022-03-18T10:02:02.000Z
datahub/email_ingestion/__init__.py
Staberinde/data-hub-api
3d0467dbceaf62a47158eea412a3dba827073300
[ "MIT" ]
1,696
2019-10-31T14:08:37.000Z
2022-03-29T12:35:57.000Z
datahub/email_ingestion/__init__.py
Staberinde/data-hub-api
3d0467dbceaf62a47158eea412a3dba827073300
[ "MIT" ]
9
2019-11-22T12:42:03.000Z
2021-09-03T14:25:05.000Z
""" Generic functionality for processing emails from a mail server. This is used by datahub.interaction.email_processors for creating DIT interactions from calendar invitations. """ from datahub.email_ingestion.mailbox import MailboxHandler default_app_config = 'datahub.email_ingestion.apps.EmailIngestionConfig' mai...
29.333333
87
0.838068
""" Generic functionality for processing emails from a mail server. This is used by datahub.interaction.email_processors for creating DIT interactions from calendar invitations. """ from datahub.email_ingestion.mailbox import MailboxHandler default_app_config = 'datahub.email_ingestion.apps.EmailIngestionConfig' mai...
0
0
0
55b400c564fda3cf5530eb06082e2a4195ce4e15
589
py
Python
dqn/demo.py
nerdoid/dqn
a51993ea1a3b062ac93ac87fd1817fddfec4c41d
[ "MIT" ]
null
null
null
dqn/demo.py
nerdoid/dqn
a51993ea1a3b062ac93ac87fd1817fddfec4c41d
[ "MIT" ]
null
null
null
dqn/demo.py
nerdoid/dqn
a51993ea1a3b062ac93ac87fd1817fddfec4c41d
[ "MIT" ]
null
null
null
import config import envs import agents import stats if __name__ == '__main__': config = config.get_config() demo(config)
17.848485
44
0.594228
import config import envs import agents import stats def demo(config): eval_env = envs.Atari( config, monitor=True, monitor_freq=1, monitor_name='demo' ) num_actions = eval_env.num_actions eval_agent = agents.DeepQLearner( config, num_actions, No...
433
0
23
18b647d3131e13d7afe9bbe3e07bdc581fe5f4f5
1,587
py
Python
docs/conf.py
Tony1928/hylang
8aeaace7cd719ab1d00b48808cbd53c67c944cb3
[ "MIT" ]
4
2017-08-09T01:31:56.000Z
2022-01-17T01:11:23.000Z
docs/conf.py
woodrush/hy
d9a5acbcc93114031c70fd7ea497e4e59c868e25
[ "MIT" ]
null
null
null
docs/conf.py
woodrush/hy
d9a5acbcc93114031c70fd7ea497e4e59c868e25
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # This file is execfile()d with the current directory set to its containing dir. import re, os, sys, time, cgi sys.path.append(os.path.abspath("..")) from get_version import __version__ as hy_version # Read the Docs might dirty its checkout, so strip the dirty flag. hy_version = re.sub('[+.]...
31.117647
80
0.742281
# -*- coding: utf-8 -*- # # This file is execfile()d with the current directory set to its containing dir. import re, os, sys, time, cgi sys.path.append(os.path.abspath("..")) from get_version import __version__ as hy_version # Read the Docs might dirty its checkout, so strip the dirty flag. hy_version = re.sub('[+.]...
0
0
0
91801d1cb2750485a4c2ed817a32807903cfa41e
1,520
py
Python
automatic_image_enhancer.py
ThePyProgrammer/ImageEnhancer
11a3adbe4cc4577a8fe48904fdbbf5674d123cdb
[ "MIT" ]
3
2021-08-02T14:47:51.000Z
2021-08-06T02:26:28.000Z
automatic_image_enhancer.py
ThePyProgrammer/ImageEnhancer
11a3adbe4cc4577a8fe48904fdbbf5674d123cdb
[ "MIT" ]
null
null
null
automatic_image_enhancer.py
ThePyProgrammer/ImageEnhancer
11a3adbe4cc4577a8fe48904fdbbf5674d123cdb
[ "MIT" ]
1
2022-01-01T20:53:40.000Z
2022-01-01T20:53:40.000Z
from enancement_model import ImageEnhancer import cv2 import numpy import os import sys import tensorflow as tf a = ImageLoader(image="path/to/your/image") a.process_images(crop_only_images=True)
34.545455
129
0.589474
from enancement_model import ImageEnhancer import cv2 import numpy import os import sys import tensorflow as tf class ImageLoader: def __init__(self, image): self.image = image try: os.makedirs('images_enhanced') except Exception as e: print(e, "Truncating ...
1,239
-3
84
82dcb76adb4c589e7f07d325cae78e8c10fd8e4d
2,738
py
Python
tests/test_benchmark.py
ahmed-f-alrefaie/forecaster
25b73a533f6195f3e5c703730e63cb3e242c649a
[ "MIT" ]
null
null
null
tests/test_benchmark.py
ahmed-f-alrefaie/forecaster
25b73a533f6195f3e5c703730e63cb3e242c649a
[ "MIT" ]
null
null
null
tests/test_benchmark.py
ahmed-f-alrefaie/forecaster
25b73a533f6195f3e5c703730e63cb3e242c649a
[ "MIT" ]
null
null
null
import numpy as np import pytest from forecaster.mr_forecast import load_file NSAMPLES = 100 @pytest.mark.linearbench @pytest.mark.linearbench @pytest.mark.probrbench @pytest.mark.probrbench
31.471264
89
0.703068
import numpy as np import pytest from forecaster.mr_forecast import load_file NSAMPLES = 100 @pytest.mark.linearbench def test_piece_linear_original(benchmark): from forecaster.func import generate_mass, pick_random_hyper, \ piece_linear, piece_linear_II from forecaster.mr_forecast import load_file ...
2,455
0
88
69b6a5536a6a6a11f59d29995be0d8f89462b424
522
py
Python
python/caty/template/builder.py
hidaruma/caty
f71d2ab0a001ea4f7a96a6e02211187ebbf54773
[ "MIT" ]
null
null
null
python/caty/template/builder.py
hidaruma/caty
f71d2ab0a001ea4f7a96a6e02211187ebbf54773
[ "MIT" ]
null
null
null
python/caty/template/builder.py
hidaruma/caty
f71d2ab0a001ea4f7a96a6e02211187ebbf54773
[ "MIT" ]
null
null
null
# coding:utf-8 u"""テンプレートエンジンの構築を行うモジュール。 テンプレートエンジンを単体で動作させる場合に使うコンビニエンスな関数を提供する。 """ from caty.template.core.template import Template from caty.template.core.loader import BytecodeLoader, TextBytecodePersister def build_template(compiler, resource_io): u"""Template オブジェクトの構築を行う。 compiler と resource_io はそれぞれ ...
30.705882
75
0.791188
# coding:utf-8 u"""テンプレートエンジンの構築を行うモジュール。 テンプレートエンジンを単体で動作させる場合に使うコンビニエンスな関数を提供する。 """ from caty.template.core.template import Template from caty.template.core.loader import BytecodeLoader, TextBytecodePersister def build_template(compiler, resource_io): u"""Template オブジェクトの構築を行う。 compiler と resource_io はそれぞれ ...
0
0
0
0d4f945642e830f48d74f1338be5c931521cb604
69
py
Python
tests/testdata/amazon.py
landscapeio/dodgy
b3fbaf05b106f7c3da8160e38c704f695613ff4d
[ "MIT" ]
89
2015-01-28T20:47:32.000Z
2022-03-23T01:54:44.000Z
tests/testdata/amazon.py
landscapeio/dodgy
b3fbaf05b106f7c3da8160e38c704f695613ff4d
[ "MIT" ]
23
2015-01-31T10:23:12.000Z
2021-09-22T09:20:26.000Z
tests/testdata/amazon.py
landscapeio/dodgy
b3fbaf05b106f7c3da8160e38c704f695613ff4d
[ "MIT" ]
22
2015-01-05T10:12:42.000Z
2022-01-13T10:33:48.000Z
AWS_SECRET_ACCESS_KEY = r'A8+6AN5TSUZ3vysJg68Rt\A9E7duMlfKODwb3ZD8'
23
67
0.869565
AWS_SECRET_ACCESS_KEY = r'A8+6AN5TSUZ3vysJg68Rt\A9E7duMlfKODwb3ZD8'
0
0
0
a63d8c758a59e8d30d8f61b9b702cdc230baa4fe
1,834
py
Python
tf.gradients_eg/tf.gradients_eg.py
thainv0212/re-ddpg
00ed4206e31bda16c6712cc4d680423a4b318629
[ "MIT" ]
null
null
null
tf.gradients_eg/tf.gradients_eg.py
thainv0212/re-ddpg
00ed4206e31bda16c6712cc4d680423a4b318629
[ "MIT" ]
null
null
null
tf.gradients_eg/tf.gradients_eg.py
thainv0212/re-ddpg
00ed4206e31bda16c6712cc4d680423a4b318629
[ "MIT" ]
null
null
null
''' Understanding optimization with tf.gradients using linear regression Author: Steven Spielberg Pon Kumar ''' import tensorflow as tf import numpy import matplotlib.pyplot as plt rng = numpy.random # Parameters learning_rate = 0.01 training_epochs = 1000 display_step = 50 # Training Data train_X = numpy.asarray(...
26.970588
86
0.648855
''' Understanding optimization with tf.gradients using linear regression Author: Steven Spielberg Pon Kumar ''' import tensorflow as tf import numpy import matplotlib.pyplot as plt rng = numpy.random # Parameters learning_rate = 0.01 training_epochs = 1000 display_step = 50 # Training Data train_X = numpy.asarray(...
0
0
0
64458d6c26d3a77fed375b45eb8d7b157c476d26
1,025
py
Python
main.py
trollerfreak331/pornhub-pluenderer
ff4260cfbe78fa36d8cd9ab8edd571fbb292e708
[ "MIT" ]
12
2018-04-12T06:54:20.000Z
2021-10-03T10:41:38.000Z
main.py
trollerfreak331/pornhub-pluenderer
ff4260cfbe78fa36d8cd9ab8edd571fbb292e708
[ "MIT" ]
3
2017-12-01T11:47:01.000Z
2017-12-01T15:02:53.000Z
main.py
trollerfreak331/pornhub-pluenderer
ff4260cfbe78fa36d8cd9ab8edd571fbb292e708
[ "MIT" ]
5
2018-04-14T04:02:11.000Z
2019-12-22T07:52:50.000Z
import sys import signal from clint.textui import colored, puts from downloader import Downloader from extractor import Extractor signal.signal(signal.SIGINT, lambda x, y: sys.exit(0)) if __name__ == "__main__": main()
28.472222
82
0.675122
import sys import signal from clint.textui import colored, puts from downloader import Downloader from extractor import Extractor signal.signal(signal.SIGINT, lambda x, y: sys.exit(0)) def main(): downloader = Downloader() extractor = Extractor() url = "https://pornhub.com" puts(colored.green("getti...
775
0
23
d6406794ca1022d640d3a5f8b057db139be8dd9f
773
py
Python
utils/stylesheet/__init__.py
Badspler/stylesheet
fa270e590646d80e07af73fcc1ebdf08cce8b11a
[ "CC0-1.0" ]
11
2017-10-23T16:15:19.000Z
2022-03-28T06:44:59.000Z
utils/stylesheet/__init__.py
seanwallawalla-forks/stylesheet
04406aa96c727d292ff6131ea36e571f97ed98e2
[ "CC0-1.0" ]
34
2017-10-13T16:31:19.000Z
2021-11-30T01:25:46.000Z
utils/stylesheet/__init__.py
seanwallawalla-forks/stylesheet
04406aa96c727d292ff6131ea36e571f97ed98e2
[ "CC0-1.0" ]
26
2017-10-13T16:14:46.000Z
2022-03-28T06:45:23.000Z
"""Package providing Stylesheet classes.""" import os from stylesheet.stylesheet_image import (LocalStylesheetImage, RemoteStylesheetImage, StoredStylesheetImage, StylesheetImage) from stylesheet....
51.533333
76
0.760673
"""Package providing Stylesheet classes.""" import os from stylesheet.stylesheet_image import (LocalStylesheetImage, RemoteStylesheetImage, StoredStylesheetImage, StylesheetImage) from stylesheet....
0
0
0
876632081b1a46b50fc68f8479a7c14b917d15ce
14,354
py
Python
deploy/stacks/cttso_ica_to_pieriandx.py
umccr/cttso-ica-to-pieriandx
19add557f96232592d69fa642fd31bbdced52dd2
[ "MIT" ]
null
null
null
deploy/stacks/cttso_ica_to_pieriandx.py
umccr/cttso-ica-to-pieriandx
19add557f96232592d69fa642fd31bbdced52dd2
[ "MIT" ]
null
null
null
deploy/stacks/cttso_ica_to_pieriandx.py
umccr/cttso-ica-to-pieriandx
19add557f96232592d69fa642fd31bbdced52dd2
[ "MIT" ]
null
null
null
from aws_cdk import ( Stack, aws_batch_alpha as batch, aws_ecr as ecr, aws_ec2 as ec2, aws_ecs as ecs, aws_iam as iam, aws_ssm as ssm, aws_lambda, aws_s3_assets as assets, Fn, Duration ) from constructs import Construct from pathlib import Path from typing import Dict ...
38.482574
160
0.547931
from aws_cdk import ( Stack, aws_batch_alpha as batch, aws_ecr as ecr, aws_ec2 as ec2, aws_ecs as ecs, aws_iam as iam, aws_ssm as ssm, aws_lambda, aws_s3_assets as assets, Fn, Duration ) from constructs import Construct from pathlib import Path from typing import Dict clas...
13,965
17
50
5ebe1cf11ac1ff1568bd99721166c755432a2301
11,460
py
Python
bureau/personnel/tests/test_admin.py
clairempr/bureau
c9fd114e637829b4e9ff643459d15602cc2efc2f
[ "Apache-2.0" ]
1
2019-02-15T09:05:35.000Z
2019-02-15T09:05:35.000Z
bureau/personnel/tests/test_admin.py
clairempr/bureau
c9fd114e637829b4e9ff643459d15602cc2efc2f
[ "Apache-2.0" ]
null
null
null
bureau/personnel/tests/test_admin.py
clairempr/bureau
c9fd114e637829b4e9ff643459d15602cc2efc2f
[ "Apache-2.0" ]
null
null
null
import string from partial_date import PartialDate from django.contrib.admin import site from django.contrib.auth import get_user_model from django.contrib.auth.models import AnonymousUser from django.urls import reverse from django.test import Client, RequestFactory, TestCase from assignments.tests.factories import...
40.4947
122
0.692496
import string from partial_date import PartialDate from django.contrib.admin import site from django.contrib.auth import get_user_model from django.contrib.auth.models import AnonymousUser from django.urls import reverse from django.test import Client, RequestFactory, TestCase from assignments.tests.factories import...
7,731
0
162
2e620446c23d1768bb18fd0c506b9482be42dd86
1,336
py
Python
tech_driven/test_backstage_pass.py
Neppord/bdd-ddd-gilded-rose
15b0b94a55bc9024b9e7b4b4746914f2fbd46380
[ "MIT" ]
null
null
null
tech_driven/test_backstage_pass.py
Neppord/bdd-ddd-gilded-rose
15b0b94a55bc9024b9e7b4b4746914f2fbd46380
[ "MIT" ]
null
null
null
tech_driven/test_backstage_pass.py
Neppord/bdd-ddd-gilded-rose
15b0b94a55bc9024b9e7b4b4746914f2fbd46380
[ "MIT" ]
null
null
null
from gilded_rose import GildedRose, Item
36.108108
83
0.774701
from gilded_rose import GildedRose, Item def test_update_sell_in(): backstage_pass_item = Item("Backstage passes to a TAFKAL80ETC concert", 2, 10) items = [backstage_pass_item] GildedRose(items).update_quality() assert backstage_pass_item.sell_in == 1 def test_it_increase_in_quality_at_normal_rate()...
1,175
0
115
333a801e8dbdaa87aeadd4a35ceab9206fd8d5bc
3,237
py
Python
analyze/analyze.py
larsdittert/EyeOfCharacteristicsPythonService
91113883de1cc59b3d47f341415661503befc0a9
[ "MIT" ]
null
null
null
analyze/analyze.py
larsdittert/EyeOfCharacteristicsPythonService
91113883de1cc59b3d47f341415661503befc0a9
[ "MIT" ]
4
2020-01-28T23:00:45.000Z
2022-02-10T00:36:41.000Z
analyze/analyze.py
larsdittert/EyeOfCharacteristicsPythonService
91113883de1cc59b3d47f341415661503befc0a9
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of the Eye Of Characteristics Analyzer. # Copyright (C) 2019 IBM Deutschland # Author: Lars Dittert <lars.dittert@de.ibm.com> # # This file is the main file to analyze images and predict them. # import dlib import numpy as np import cv2 import os imp...
38.535714
266
0.693543
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of the Eye Of Characteristics Analyzer. # Copyright (C) 2019 IBM Deutschland # Author: Lars Dittert <lars.dittert@de.ibm.com> # # This file is the main file to analyze images and predict them. # import dlib import numpy as np import cv2 import os imp...
1,415
1,380
23
39f3abfc419b42dbcf3343ade9df24b9d2ba5af7
5,748
py
Python
samples/misc/graphical_interfaces/kivy_demo_app/opencv_face_tracking.py
sintefneodroid/vision
a4e66251ead99f15f4697bfe2abd00e2f388e743
[ "Apache-2.0" ]
null
null
null
samples/misc/graphical_interfaces/kivy_demo_app/opencv_face_tracking.py
sintefneodroid/vision
a4e66251ead99f15f4697bfe2abd00e2f388e743
[ "Apache-2.0" ]
1
2022-03-12T01:08:08.000Z
2022-03-12T01:08:08.000Z
samples/misc/graphical_interfaces/kivy_demo_app/opencv_face_tracking.py
sintefneodroid/vision
a4e66251ead99f15f4697bfe2abd00e2f388e743
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import cv2 import imageio from kivy.app import App from kivy.clock import Clock from kivy.config import Config from kivy.core.window import Window from kivy.lang import Builder from kivy.uix.boxlayout import BoxLayout from kivy.uix.button import Button from kivy.uix.dropdo...
28.455446
83
0.616388
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import cv2 import imageio from kivy.app import App from kivy.clock import Clock from kivy.config import Config from kivy.core.window import Window from kivy.lang import Builder from kivy.uix.boxlayout import BoxLayout from kivy.uix.button import Button from kivy.uix.dropdo...
3,543
453
73
66519ae77236e7c32472e7e367938d47cf6c51cd
12,181
py
Python
apps/annon/dataset/coco_to_aids.py
Roy-Tuhin/maskrcnn_sophisticate-
a5a2300abbe2633d66847cdbfa7ed2bc2f901ec3
[ "Apache-2.0" ]
null
null
null
apps/annon/dataset/coco_to_aids.py
Roy-Tuhin/maskrcnn_sophisticate-
a5a2300abbe2633d66847cdbfa7ed2bc2f901ec3
[ "Apache-2.0" ]
14
2021-02-02T22:32:47.000Z
2022-03-12T00:20:40.000Z
apps/annon/dataset/coco_to_aids.py
Boyetuhin/maskrcnn_sophisticate-
a5a2300abbe2633d66847cdbfa7ed2bc2f901ec3
[ "Apache-2.0" ]
1
2021-05-03T22:48:36.000Z
2021-05-03T22:48:36.000Z
__author__ = 'mangalbhaskar' __version__ = '1.0' """ ## Description: # -------------------------------------------------------- # Annotation Parser Interface for Annotation work flow. # Upload the MS COCO dataset to MongoDB in Annon DB specification # # -------------------------------------------------------- # Copyrig...
31.07398
154
0.620967
__author__ = 'mangalbhaskar' __version__ = '1.0' """ ## Description: # -------------------------------------------------------- # Annotation Parser Interface for Annotation work flow. # Upload the MS COCO dataset to MongoDB in Annon DB specification # # -------------------------------------------------------- # Copyrig...
2,236
0
69
997ed027a962dc4d27343b4f36425053e5be6140
3,208
py
Python
Python Advanced/3. Multidimensional Lists/Exercise/05. Alice in Wonderland.py
a-shiro/SoftUni-Courses
7d0ca6401017a28b5ff7e7fa3e5df8bba8ddbe77
[ "MIT" ]
null
null
null
Python Advanced/3. Multidimensional Lists/Exercise/05. Alice in Wonderland.py
a-shiro/SoftUni-Courses
7d0ca6401017a28b5ff7e7fa3e5df8bba8ddbe77
[ "MIT" ]
null
null
null
Python Advanced/3. Multidimensional Lists/Exercise/05. Alice in Wonderland.py
a-shiro/SoftUni-Courses
7d0ca6401017a28b5ff7e7fa3e5df8bba8ddbe77
[ "MIT" ]
null
null
null
dimensions = int(input()) matrix = read_matrix() alice_row, alice_col = get_alice_coordinates() rabbit_row, rabbit_col = get_rabbit_hole_coordinates() tea_bags = 0 in_wonderland = True while in_wonderland and tea_bags < 10: direction = input() if direction == 'up': if 0 > alice_row - 1: ...
33.768421
99
0.573566
def read_matrix(): matrix = [] for row in range(dimensions): col = [n for n in input().split(' ')] matrix.append(col) return matrix def get_alice_coordinates(): for row in matrix: if 'A' in row: alice_row, alice_col = matrix.index(row), row.index('A') ...
474
0
68
e8d6adf3feed698cd713b5295d7b624411a09079
2,011
py
Python
DecisionTreeClassifier.py
akashmittal18/Twitter-Sentimental-Analysis-
68eb06c778c9d512d6da9da5c657a510913bc2c1
[ "MIT" ]
null
null
null
DecisionTreeClassifier.py
akashmittal18/Twitter-Sentimental-Analysis-
68eb06c778c9d512d6da9da5c657a510913bc2c1
[ "MIT" ]
null
null
null
DecisionTreeClassifier.py
akashmittal18/Twitter-Sentimental-Analysis-
68eb06c778c9d512d6da9da5c657a510913bc2c1
[ "MIT" ]
2
2020-10-02T18:55:37.000Z
2020-10-18T10:59:42.000Z
<<<<<<< HEAD from sklearn.metrics import confusion_matrix from sklearn.metrics import accuracy_score from sklearn.metrics import average_precision_score from sklearn.metrics import roc_auc_score from sklearn.tree import DecisionTreeClassifier ======= from sklearn.metrics import confusion_matrix from sklearn.metrics imp...
47.880952
117
0.773744
<<<<<<< HEAD from sklearn.metrics import confusion_matrix from sklearn.metrics import accuracy_score from sklearn.metrics import average_precision_score from sklearn.metrics import roc_auc_score from sklearn.tree import DecisionTreeClassifier def DecisionTreeClassifierAlgo(x_train_vft, y_train, x_test_vft, y_test, vec...
1,410
0
46
d72282ac0ecaa1924612fe755db9f4659bf7c5a0
468
py
Python
custom/apps/wisepill/models.py
dslowikowski/commcare-hq
ad8885cf8dab69dc85cb64f37aeaf06106124797
[ "BSD-3-Clause" ]
1
2015-02-10T23:26:39.000Z
2015-02-10T23:26:39.000Z
custom/apps/wisepill/models.py
SEL-Columbia/commcare-hq
992ee34a679c37f063f86200e6df5a197d5e3ff6
[ "BSD-3-Clause" ]
null
null
null
custom/apps/wisepill/models.py
SEL-Columbia/commcare-hq
992ee34a679c37f063f86200e6df5a197d5e3ff6
[ "BSD-3-Clause" ]
null
null
null
from couchdbkit.ext.django.schema import * class WisePillDeviceEvent(Document): """ One DeviceEvent is created each time a device sends data that is forwarded to the CommCareHQ WisePill API (/wisepill/device/). """ domain = StringProperty() data = StringProperty() received_on = DateTimePro...
33.428571
104
0.722222
from couchdbkit.ext.django.schema import * class WisePillDeviceEvent(Document): """ One DeviceEvent is created each time a device sends data that is forwarded to the CommCareHQ WisePill API (/wisepill/device/). """ domain = StringProperty() data = StringProperty() received_on = DateTimePro...
0
0
0
106effb6c812af3d1703d47a62d2b744e0059446
362
py
Python
bookworm/document/formats/__init__.py
xingkong0113/bookworm
7214067f48e7a951198806a1f9170e3fd8fc0cce
[ "MIT" ]
36
2020-11-15T03:21:39.000Z
2022-03-05T01:11:26.000Z
bookworm/document/formats/__init__.py
xingkong0113/bookworm
7214067f48e7a951198806a1f9170e3fd8fc0cce
[ "MIT" ]
90
2020-10-06T14:46:07.000Z
2022-03-31T03:03:34.000Z
bookworm/document/formats/__init__.py
xingkong0113/bookworm
7214067f48e7a951198806a1f9170e3fd8fc0cce
[ "MIT" ]
20
2020-09-30T17:40:44.000Z
2022-03-17T19:59:53.000Z
# coding: utf-8 from .pdf import FitzPdfDocument from .epub import EpubDocument from .mobi import MobiDocument from .plain_text import PlainTextDocument from .html import FileSystemHtmlDocument, WebHtmlDocument from .markdown import MarkdownDocument from .word import WordDocument from .powerpoint import PowerpointPres...
30.166667
57
0.850829
# coding: utf-8 from .pdf import FitzPdfDocument from .epub import EpubDocument from .mobi import MobiDocument from .plain_text import PlainTextDocument from .html import FileSystemHtmlDocument, WebHtmlDocument from .markdown import MarkdownDocument from .word import WordDocument from .powerpoint import PowerpointPres...
0
0
0
7ddb29e8075b8805d2a36edc9007f941a697f2a3
5,528
py
Python
alsek/storage/backends/redis.py
TariqAHassan/alsek
a0d0f44d2eea1538c9d04530ae917695f624d269
[ "MIT" ]
1
2021-08-16T02:38:40.000Z
2021-08-16T02:38:40.000Z
alsek/storage/backends/redis.py
TariqAHassan/alsek
a0d0f44d2eea1538c9d04530ae917695f624d269
[ "MIT" ]
null
null
null
alsek/storage/backends/redis.py
TariqAHassan/alsek
a0d0f44d2eea1538c9d04530ae917695f624d269
[ "MIT" ]
null
null
null
""" Redis Backend """ from __future__ import annotations from typing import Any, Dict, Iterable, Optional, Union, cast import dill from redis import ConnectionPool, Redis from alsek._defaults import DEFAULT_NAMESPACE from alsek._utils.aggregation import gather_init_params from alsek._utils.printing import auto...
29.248677
85
0.578148
""" Redis Backend """ from __future__ import annotations from typing import Any, Dict, Iterable, Optional, Union, cast import dill from redis import ConnectionPool, Redis from alsek._defaults import DEFAULT_NAMESPACE from alsek._utils.aggregation import gather_init_params from alsek._utils.printing import auto...
1,747
0
133
84454d7545f7d8140ad9375e76435e7665773cdf
4,331
py
Python
Test/Misc/data.py
ViliamVadocz/Bots
092abc5bf92e9dab9d07499849d54a33b0b0c4f6
[ "MIT" ]
null
null
null
Test/Misc/data.py
ViliamVadocz/Bots
092abc5bf92e9dab9d07499849d54a33b0b0c4f6
[ "MIT" ]
null
null
null
Test/Misc/data.py
ViliamVadocz/Bots
092abc5bf92e9dab9d07499849d54a33b0b0c4f6
[ "MIT" ]
null
null
null
'''Rocket League data processing.''' from utils import Car, Ball, BoostPad, a3l, a3r, a3v, orient_matrix, turn_r def setup(s, p): """Sets up the variables and classes for the hivemind. Arguments: s {BaseAgent} -- The hivemind bot helper process. p {GameTickPacket} -- Information about the...
38.327434
87
0.636804
'''Rocket League data processing.''' from utils import Car, Ball, BoostPad, a3l, a3r, a3v, orient_matrix, turn_r def setup(s, p): """Sets up the variables and classes for the hivemind. Arguments: s {BaseAgent} -- The hivemind bot helper process. p {GameTickPacket} -- Information about the...
0
0
0
23813dfe1984bdbeac2ed1433c66117039d61cbd
1,257
py
Python
log.py
ninjawil/toolbox
93763def83f40c1cabb23e5d942b491b8799b675
[ "MIT" ]
null
null
null
log.py
ninjawil/toolbox
93763def83f40c1cabb23e5d942b491b8799b675
[ "MIT" ]
null
null
null
log.py
ninjawil/toolbox
93763def83f40c1cabb23e5d942b491b8799b675
[ "MIT" ]
null
null
null
#!/usr/bin/env python '''Provides a common logging set up for all scripts''' #=============================================================================== # Import modules #=============================================================================== import logging import logging.handlers import time #=======...
31.425
80
0.431981
#!/usr/bin/env python '''Provides a common logging set up for all scripts''' #=============================================================================== # Import modules #=============================================================================== import logging import logging.handlers import time #=======...
745
0
22
34b2f4084783208a5e9d272083c402d0807ee844
613
py
Python
raspi-controller/espnetwork.py
alecu/ventilastation
db8cb6f4bbc77f8f9e03d26bd7cc6bd36bc34220
[ "Apache-2.0" ]
2
2019-04-03T01:10:00.000Z
2019-11-18T15:31:32.000Z
raspi-controller/espnetwork.py
alecu/ventilastation
db8cb6f4bbc77f8f9e03d26bd7cc6bd36bc34220
[ "Apache-2.0" ]
null
null
null
raspi-controller/espnetwork.py
alecu/ventilastation
db8cb6f4bbc77f8f9e03d26bd7cc6bd36bc34220
[ "Apache-2.0" ]
2
2019-03-02T20:27:31.000Z
2019-11-17T23:21:50.000Z
UDP_THIS = "0.0.0.0", 5225 #UDP_OTHER = "127.0.0.1", 5005 UDP_OTHER = "192.168.4.1", 5005 import socket sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.setblocking(False) sock.bind(UDP_THIS) sock_iterator = sock_generator()
21.892857
43
0.608483
UDP_THIS = "0.0.0.0", 5225 #UDP_OTHER = "127.0.0.1", 5005 UDP_OTHER = "192.168.4.1", 5005 import socket sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.setblocking(False) sock.bind(UDP_THIS) def sock_send(what): try: sock.sendto(what, UDP_OTHER) print('{:08b}'.fo...
306
0
46
f1a7a25d2b44e69ab0b3cf20ef431b057101e056
610
py
Python
prototyping-board/driver/lighting/backlight.py
lnixdo2s/saiga
dba093e66696b556f97269585bc4bc0ef51c5763
[ "MIT" ]
null
null
null
prototyping-board/driver/lighting/backlight.py
lnixdo2s/saiga
dba093e66696b556f97269585bc4bc0ef51c5763
[ "MIT" ]
null
null
null
prototyping-board/driver/lighting/backlight.py
lnixdo2s/saiga
dba093e66696b556f97269585bc4bc0ef51c5763
[ "MIT" ]
null
null
null
import config from digitalio import DigitalInOut, Direction, Pull
25.416667
78
0.657377
import config from digitalio import DigitalInOut, Direction, Pull class Backlight(Task): def __init__(self): # Setup background LED's self.leds = [] for led_pin in config.BACKLIGHT.LED_PINS: led = DigitalInOut(led_pin) led.direction = Direction.OUTPUT ...
465
1
76
d7ef6897682b652698d55a7b48ce637b3753ad8e
16,880
py
Python
pait/api_doc/base_parse.py
elviva404/pait
bdb34e316398f1eb31bd82ec109eb4a450b99e95
[ "Apache-2.0" ]
19
2020-08-26T13:46:33.000Z
2022-02-22T07:48:29.000Z
pait/api_doc/base_parse.py
elviva404/pait
bdb34e316398f1eb31bd82ec109eb4a450b99e95
[ "Apache-2.0" ]
1
2021-06-06T17:45:54.000Z
2021-06-06T17:45:54.000Z
pait/api_doc/base_parse.py
elviva404/pait
bdb34e316398f1eb31bd82ec109eb4a450b99e95
[ "Apache-2.0" ]
1
2022-01-21T20:25:33.000Z
2022-01-21T20:25:33.000Z
import inspect import warnings from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union, get_type_hints from pydantic import BaseModel from pydantic.fields import Undefined from typing_extensions import TypedDict from pait.field import BaseField, Depends from pait.model.core import PaitCoreMode...
45.99455
119
0.538329
import inspect import warnings from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union, get_type_hints from pydantic import BaseModel from pydantic.fields import Undefined from typing_extensions import TypedDict from pait.field import BaseField, Depends from pait.model.core import PaitCoreMode...
659
15,638
92
d994184a02e321e22efb4c5fcfc857a6a35dbc02
5,838
py
Python
sosia/processing/caching/tests/test_retrieving.py
sosia-dev/sosia
d4d2d5edb0cd1d085b5a457eb6d19bf8e9fea7f5
[ "MIT" ]
14
2019-03-12T22:07:47.000Z
2022-03-08T14:05:05.000Z
sosia/processing/caching/tests/test_retrieving.py
sosia-dev/sosia
d4d2d5edb0cd1d085b5a457eb6d19bf8e9fea7f5
[ "MIT" ]
31
2018-10-15T16:02:44.000Z
2021-04-09T08:13:44.000Z
sosia/processing/caching/tests/test_retrieving.py
sosia-dev/sosia
d4d2d5edb0cd1d085b5a457eb6d19bf8e9fea7f5
[ "MIT" ]
2
2020-01-09T06:47:09.000Z
2020-12-05T13:21:03.000Z
# -*- coding: utf-8 -*- """Tests for processing.caching.retrieving module.""" from itertools import product from nose.tools import assert_equal, assert_true import numpy as np from os.path import expanduser import pandas as pd from pybliometrics.scopus import ScopusSearch, AuthorSearch from pandas.testing import asse...
39.986301
80
0.683453
# -*- coding: utf-8 -*- """Tests for processing.caching.retrieving module.""" from itertools import product from nose.tools import assert_equal, assert_true import numpy as np from os.path import expanduser import pandas as pd from pybliometrics.scopus import ScopusSearch, AuthorSearch from pandas.testing import asse...
5,057
0
138
ae6cb48200b509a82fd2a123306ed243842deb6c
2,401
py
Python
project3/module5/deeplearning/ann.py
pmitche/it3105-aiprogramming
79f3b4a5f624d473b461548b263bcf7ecc0846dc
[ "MIT" ]
3
2015-12-12T15:33:39.000Z
2019-01-17T13:44:09.000Z
project3/module6/deeplearning/ann.py
pmitche/it3105-aiprogramming
79f3b4a5f624d473b461548b263bcf7ecc0846dc
[ "MIT" ]
null
null
null
project3/module6/deeplearning/ann.py
pmitche/it3105-aiprogramming
79f3b4a5f624d473b461548b263bcf7ecc0846dc
[ "MIT" ]
null
null
null
import theano import theano.tensor as T from project3.module6.deeplearning.layer import HiddenLayer
33.816901
104
0.568513
import theano import theano.tensor as T from project3.module6.deeplearning.layer import HiddenLayer class ANN(object): def __init__(self, num_in, hidden_list, act_list, num_out, learning_rate): self.X = T.dmatrix("X") self.layers = [] self.params = [] for i in range(len(hidden_li...
2,200
-3
103
b12d14662f5bdff6c520d8b9801ec290a0a4e2ac
666
py
Python
Python/Tkinter/Code With Harry/Tkinter 1 - CWH 24 - Status Bar.py
omkarsutar1255/Python-Data
169d0c54b23d9dd5a7f1aea41ab385121c3b3c63
[ "CC-BY-3.0" ]
null
null
null
Python/Tkinter/Code With Harry/Tkinter 1 - CWH 24 - Status Bar.py
omkarsutar1255/Python-Data
169d0c54b23d9dd5a7f1aea41ab385121c3b3c63
[ "CC-BY-3.0" ]
null
null
null
Python/Tkinter/Code With Harry/Tkinter 1 - CWH 24 - Status Bar.py
omkarsutar1255/Python-Data
169d0c54b23d9dd5a7f1aea41ab385121c3b3c63
[ "CC-BY-3.0" ]
null
null
null
# ========== Status Bar =========== from tkinter import * root = Tk() root.geometry('500x300') root.title('status bar') statusvar = StringVar() statusvar.set('Ready') # first setting statusbar as ready sbar = Label(root, textvariable=statusvar, relief=RIDGE, anchor='w') sbar.pack(side=BOTTOM, fill=X) Butto...
31.714286
85
0.656156
# ========== Status Bar =========== from tkinter import * root = Tk() root.geometry('500x300') root.title('status bar') def upload(): statusvar.set('Busy..') # after run upload function statusbar changes to busy.. sbar.update() # now statusbar is update to busy.. import time time.sleep(2)...
260
0
23
10972feb4d13c4af71ef7723212f3748423ef8b2
10,179
py
Python
one_fm/jinja/print_format/methods.py
mohsinalimat/One-FM
ad9a5d8f785c4e69ca68ba1ef75dd26725e5c9c3
[ "MIT" ]
null
null
null
one_fm/jinja/print_format/methods.py
mohsinalimat/One-FM
ad9a5d8f785c4e69ca68ba1ef75dd26725e5c9c3
[ "MIT" ]
null
null
null
one_fm/jinja/print_format/methods.py
mohsinalimat/One-FM
ad9a5d8f785c4e69ca68ba1ef75dd26725e5c9c3
[ "MIT" ]
null
null
null
import frappe from datetime import date, datetime class PrintFormat: """ Print format class """ def sic_attendance_absent_present(self, doc): """ Print format for absent/present in sales invoice for Contracts """ # print format template, context = sic_at...
40.392857
126
0.524217
import frappe from datetime import date, datetime class PrintFormat: """ Print format class """ def sic_attendance_absent_present(self, doc): """ Print format for absent/present in sales invoice for Contracts """ # print format template, context = sic_at...
9,200
0
46
ba3b7ed149d4dfe9c507caf3cf9fff861f5ae4be
18,373
py
Python
python/rearview/console.py
m3047/rear_view_rpz
a646d740325f58dbe50c44fa7fd61a1753d1c822
[ "Apache-2.0" ]
8
2021-12-28T20:13:54.000Z
2022-02-22T02:17:36.000Z
python/rearview/console.py
m3047/rear_view_rpz
a646d740325f58dbe50c44fa7fd61a1753d1c822
[ "Apache-2.0" ]
3
2021-11-17T22:41:32.000Z
2022-01-20T18:11:05.000Z
python/rearview/console.py
m3047/rear_view_rpz
a646d740325f58dbe50c44fa7fd61a1753d1c822
[ "Apache-2.0" ]
2
2021-12-28T20:13:47.000Z
2022-01-05T05:20:49.000Z
#!/usr/bin/python3 # Copyright (c) 2021-2022 by Fred Morris Tacoma WA # # 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 ...
33.898524
128
0.549012
#!/usr/bin/python3 # Copyright (c) 2021-2022 by Fred Morris Tacoma WA # # 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 ...
1,428
0
89
5cb702b5dabf7677aa8ce35bbd46abef7cfa833f
450
py
Python
src/resources.py
eskeB/codealong.rpg-sim
c165889525c8e22227ce89ca9517ede53945030c
[ "MIT" ]
null
null
null
src/resources.py
eskeB/codealong.rpg-sim
c165889525c8e22227ce89ca9517ede53945030c
[ "MIT" ]
null
null
null
src/resources.py
eskeB/codealong.rpg-sim
c165889525c8e22227ce89ca9517ede53945030c
[ "MIT" ]
null
null
null
#imports #global variables #classes from tkinter import N #functions #main code
14.0625
105
0.617778
#imports #global variables #classes from tkinter import N class Character: def __init__(self, name, health, damage, armor): self.name = name self.health = health self.damage = damage self.armor = armor def __str__(self): return f'Name:{self.name}\nHealth:...
256
-5
104
ff3cb32318c8dc666e6d4f4e01c609d5d6e90fc4
102
py
Python
src/python/modules/transit/transit_constants.py
brdimattia/SmartMirror
1c2e58d78ae70303d0486c674bbc5394d7e50b0a
[ "MIT" ]
null
null
null
src/python/modules/transit/transit_constants.py
brdimattia/SmartMirror
1c2e58d78ae70303d0486c674bbc5394d7e50b0a
[ "MIT" ]
3
2021-06-02T00:56:25.000Z
2022-01-13T02:05:12.000Z
src/python/modules/transit/transit_constants.py
brdimattia/SmartMirror
1c2e58d78ae70303d0486c674bbc5394d7e50b0a
[ "MIT" ]
null
null
null
TITLE_TEXT_SIZE=30 NEXT_TRAIN_TEXT_SIZE=36 GREEN="#3ab54a" TRANSIT_API_ENDPOINT="https://www.mbta.com"
25.5
43
0.833333
TITLE_TEXT_SIZE=30 NEXT_TRAIN_TEXT_SIZE=36 GREEN="#3ab54a" TRANSIT_API_ENDPOINT="https://www.mbta.com"
0
0
0
09d1008b4b192925b5f7897553ba652bf418ff05
483
py
Python
FLP/messagetypes/text/defs.py
TheXIFC/FL-Studio-Time-Calculator
23815f22d48f30b43f3eebe631100627e71d1430
[ "MIT" ]
4
2021-11-16T11:05:32.000Z
2021-12-19T09:34:07.000Z
FLP/messagetypes/text/defs.py
TheXIFC/FL-Studio-Time-Calculator
23815f22d48f30b43f3eebe631100627e71d1430
[ "MIT" ]
1
2021-05-20T16:25:40.000Z
2021-05-20T16:25:40.000Z
FLP/messagetypes/text/defs.py
TheXIFC/FL-Studio-Time-Calculator
23815f22d48f30b43f3eebe631100627e71d1430
[ "MIT" ]
3
2021-11-23T00:29:11.000Z
2022-01-27T02:29:14.000Z
''' Created on 17 May 2021 @author: julianporter ''' from .numeric import HexConverter,IntConverter from .text import String8Converter,String16Converter HEXConv = HexConverter() BYTEConv = IntConverter(1) WORDConv = IntConverter(2) DWORDConv = IntConverter(4) STR8Conv = String8Converter() STR16Conv = String16...
18.576923
52
0.712215
''' Created on 17 May 2021 @author: julianporter ''' from .numeric import HexConverter,IntConverter from .text import String8Converter,String16Converter HEXConv = HexConverter() BYTEConv = IntConverter(1) WORDConv = IntConverter(2) DWORDConv = IntConverter(4) STR8Conv = String8Converter() STR16Conv = String16...
128
0
23
94870628847ef8f5d0614681d7e454c506500fb9
163
py
Python
slither/tests/captionTest.py
fjfzcjj/Forked-PySlither
d9f87c54f34e88d2e575fe35bf2df47baba9b43e
[ "MIT" ]
13
2016-03-31T18:05:43.000Z
2022-01-31T21:09:58.000Z
slither/tests/captionTest.py
fjfzcjj/Forked-PySlither
d9f87c54f34e88d2e575fe35bf2df47baba9b43e
[ "MIT" ]
61
2016-03-30T19:56:41.000Z
2019-01-09T22:16:40.000Z
slither/tests/captionTest.py
fjfzcjj/Forked-PySlither
d9f87c54f34e88d2e575fe35bf2df47baba9b43e
[ "MIT" ]
9
2016-03-31T17:01:25.000Z
2019-10-08T06:14:43.000Z
import slither i = 0 slither.setup("") slither.runMainLoop(run_a_frame)
12.538462
33
0.619632
import slither i = 0 def run_a_frame(): global i slither.setCaption("-"*(i+1)) i = (i + 1) % 60 slither.setup("") slither.runMainLoop(run_a_frame)
65
0
23
e443c5e29108dd45c61166fa4cc04e6f86b2dc53
2,226
py
Python
scripts/ssc/evaluation/eval_WCAE_tripost.py
MrBellamonte/MT-VAEs-TDA
8881b5db607c673fb558f7b74ece27f244b16b77
[ "MIT" ]
null
null
null
scripts/ssc/evaluation/eval_WCAE_tripost.py
MrBellamonte/MT-VAEs-TDA
8881b5db607c673fb558f7b74ece27f244b16b77
[ "MIT" ]
1
2020-09-22T13:04:58.000Z
2020-09-22T13:05:23.000Z
scripts/ssc/evaluation/eval_WCAE_tripost.py
MrBellamonte/AEs-VAEs-TDA
8881b5db607c673fb558f7b74ece27f244b16b77
[ "MIT" ]
null
null
null
from fractions import Fraction import matplotlib.pyplot as plt import mpltern import pandas as pd import numpy as np if __name__ == "__main__": df_path = '/Users/simons/PycharmProjects/MT-VAEs-TDA/output/eval/WCAE/metrics_selected_processed.csv' # get df with cols: eval metrics (tbd), uid, k, bs, mu_push ...
27.481481
105
0.585804
from fractions import Fraction import matplotlib.pyplot as plt import mpltern import pandas as pd import numpy as np if __name__ == "__main__": df_path = '/Users/simons/PycharmProjects/MT-VAEs-TDA/output/eval/WCAE/metrics_selected_processed.csv' # get df with cols: eval metrics (tbd), uid, k, bs, mu_push ...
0
0
0
443dcde4daaca2dbdafde3c9187c91ccfe2dedd6
48
py
Python
virtual/lib/python3.6/site-packages/liked/__init__.py
alexomaset/I-made-instagram
3c9141513727b86392e3668735613385f70b32be
[ "MIT" ]
1
2018-01-07T09:27:00.000Z
2018-01-07T09:27:00.000Z
virtual/lib/python3.6/site-packages/liked/__init__.py
alexomaset/I-made-instagram
3c9141513727b86392e3668735613385f70b32be
[ "MIT" ]
4
2021-03-19T00:58:37.000Z
2021-06-10T21:29:57.000Z
liked/__init__.py
amyth/django-liked
3973d6c85236e5357ef72d83b1ad3e40528f4e5c
[ "MIT" ]
null
null
null
default_app_config = "liked.app.LikedAppConfig"
24
47
0.833333
default_app_config = "liked.app.LikedAppConfig"
0
0
0
e8badc22990250b62d5fda655e8de9bbbb6d9926
603
py
Python
leads/urls.py
tmbyers1102/ourtsy_v1
23ace98c82b0677f9d6ef7ee1096286f78c10b7d
[ "MIT" ]
null
null
null
leads/urls.py
tmbyers1102/ourtsy_v1
23ace98c82b0677f9d6ef7ee1096286f78c10b7d
[ "MIT" ]
null
null
null
leads/urls.py
tmbyers1102/ourtsy_v1
23ace98c82b0677f9d6ef7ee1096286f78c10b7d
[ "MIT" ]
null
null
null
from django.urls import path from leads.views import ( LeadListView, LeadDetailView, LeadDeleteView, LeadCreateView, LeadUpdateView, lead_delete, lead_list, lead_detail, lead_create, lead_update ) app_name = "leads" urlpatterns = [ path('', LeadListView.as_view(), name='lead-list'), pa...
31.736842
75
0.684909
from django.urls import path from leads.views import ( LeadListView, LeadDetailView, LeadDeleteView, LeadCreateView, LeadUpdateView, lead_delete, lead_list, lead_detail, lead_create, lead_update ) app_name = "leads" urlpatterns = [ path('', LeadListView.as_view(), name='lead-list'), pa...
0
0
0
2d2ba99da00e60b55321b61f4681892d54cf94df
1,603
py
Python
src/storage/filestore.py
pterodactal666/eorzeas-only-hope
02c97730b44d757847ca3569b3b1e6b61bd6ddf3
[ "BSD-2-Clause" ]
null
null
null
src/storage/filestore.py
pterodactal666/eorzeas-only-hope
02c97730b44d757847ca3569b3b1e6b61bd6ddf3
[ "BSD-2-Clause" ]
null
null
null
src/storage/filestore.py
pterodactal666/eorzeas-only-hope
02c97730b44d757847ca3569b3b1e6b61bd6ddf3
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/python3 # vim: ts=4 expandtab from __future__ import annotations from typing import Optional, Set, TextIO from os.path import exists as path_exists from .datastore import DataStore, RaiseType class FileStore(DataStore): """A datastore of names of people who can save Eorzea, written to a file wit...
31.431373
80
0.671865
#!/usr/bin/python3 # vim: ts=4 expandtab from __future__ import annotations from typing import Optional, Set, TextIO from os.path import exists as path_exists from .datastore import DataStore, RaiseType class FileStore(DataStore): """A datastore of names of people who can save Eorzea, written to a file wit...
257
0
54
0633d77a222dc1c895ac0c51e6f89a42291eafa0
4,236
py
Python
src/text_cat.py
mihai-t/text-categorization-nlp
c9612cf934468d111b87e3a289d60305e35155f5
[ "MIT" ]
null
null
null
src/text_cat.py
mihai-t/text-categorization-nlp
c9612cf934468d111b87e3a289d60305e35155f5
[ "MIT" ]
null
null
null
src/text_cat.py
mihai-t/text-categorization-nlp
c9612cf934468d111b87e3a289d60305e35155f5
[ "MIT" ]
null
null
null
import os import matplotlib.pyplot as plot import numpy as np from sklearn import decomposition from sklearn.svm import SVC from analysis import DocumentAnalysis, WordIterator from utils import list_files, PROJECT_PATH WORD2VEC_ANALYSER = DocumentAnalysis(model_file_name=os.path.join(PROJECT_PATH, "models", "all.mod...
32.584615
118
0.65203
import os import matplotlib.pyplot as plot import numpy as np from sklearn import decomposition from sklearn.svm import SVC from analysis import DocumentAnalysis, WordIterator from utils import list_files, PROJECT_PATH WORD2VEC_ANALYSER = DocumentAnalysis(model_file_name=os.path.join(PROJECT_PATH, "models", "all.mod...
0
0
0
bed2840553f751669371a2026945a014d023f7e2
205
py
Python
variable_and_data_type/numbers_demo/random_number.py
pysga1996/python-basic-programming
5fe817986fbef2649b4b03955f07b59d2a2035d8
[ "MIT" ]
null
null
null
variable_and_data_type/numbers_demo/random_number.py
pysga1996/python-basic-programming
5fe817986fbef2649b4b03955f07b59d2a2035d8
[ "MIT" ]
null
null
null
variable_and_data_type/numbers_demo/random_number.py
pysga1996/python-basic-programming
5fe817986fbef2649b4b03955f07b59d2a2035d8
[ "MIT" ]
null
null
null
# Python does not have a random() function to make a random number, # but Python has a built-in module called random that can be used to make random numbers: import random print(random.randrange(1, 10))
29.285714
89
0.760976
# Python does not have a random() function to make a random number, # but Python has a built-in module called random that can be used to make random numbers: import random print(random.randrange(1, 10))
0
0
0
eb70d58c97a55bb82b5f3f4d2050fae75cb58188
6,843
py
Python
binderhub/repoproviders.py
rs2/binderhub
7f0e6eaa5f44536c3756c1d07acc15e263322565
[ "BSD-3-Clause" ]
null
null
null
binderhub/repoproviders.py
rs2/binderhub
7f0e6eaa5f44536c3756c1d07acc15e263322565
[ "BSD-3-Clause" ]
null
null
null
binderhub/repoproviders.py
rs2/binderhub
7f0e6eaa5f44536c3756c1d07acc15e263322565
[ "BSD-3-Clause" ]
null
null
null
""" Classes for Repo providers Subclass the base class, ``RepoProvider``, to support different version control services and providers. """ from datetime import timedelta import json import os import time from prometheus_client import Gauge from tornado import gen from tornado.httpclient import AsyncHTTPClient, HTTP...
31.104545
97
0.611866
""" Classes for Repo providers Subclass the base class, ``RepoProvider``, to support different version control services and providers. """ from datetime import timedelta import json import os import time from prometheus_client import Gauge from tornado import gen from tornado.httpclient import AsyncHTTPClient, HTTP...
3,930
0
395
8901795a24f1d916e1722a7335091cebf641f4eb
8,439
py
Python
drugstore/shop/tests/test_product.py
lexover/vue-django-webstore-example
4710628000ac237319bce4aa64aed4fb75779cf2
[ "MIT" ]
null
null
null
drugstore/shop/tests/test_product.py
lexover/vue-django-webstore-example
4710628000ac237319bce4aa64aed4fb75779cf2
[ "MIT" ]
null
null
null
drugstore/shop/tests/test_product.py
lexover/vue-django-webstore-example
4710628000ac237319bce4aa64aed4fb75779cf2
[ "MIT" ]
null
null
null
import os from django.conf import settings from django.test import TestCase from django.urls import reverse from rest_framework import status from rest_framework.test import APIClient from shop.models import Product from shop.models import ProductGroup from .helper import create_user from .helper impor...
50.532934
119
0.659794
import os from django.conf import settings from django.test import TestCase from django.urls import reverse from rest_framework import status from rest_framework.test import APIClient from shop.models import Product from shop.models import ProductGroup from .helper import create_user from .helper impor...
6,961
1,079
24
4a4971975035bcb2dc36e9fec35608a8d9bdb1e8
750
py
Python
functional_programming/list_comprehensio.py
danielkpodo/python-zero-to-mastery
d39468f48211bc82e4e2613745d9107d433e05af
[ "MIT" ]
null
null
null
functional_programming/list_comprehensio.py
danielkpodo/python-zero-to-mastery
d39468f48211bc82e4e2613745d9107d433e05af
[ "MIT" ]
null
null
null
functional_programming/list_comprehensio.py
danielkpodo/python-zero-to-mastery
d39468f48211bc82e4e2613745d9107d433e05af
[ "MIT" ]
null
null
null
# They are actually grouped into three # list comprehension # Set Comprehension # dictionary compresension # They are aquick way for creating list or sets or dictionsary instead of looping or appending to a bunch of list # format [param for param in "list"] # add all letters in a string # using comprehension to ge...
22.727273
113
0.741333
# They are actually grouped into three # list comprehension # Set Comprehension # dictionary compresension # They are aquick way for creating list or sets or dictionsary instead of looping or appending to a bunch of list # format [param for param in "list"] # add all letters in a string # using comprehension to ge...
0
0
0
a5d99f442f4b1c5a8e1c03517e964ce157869dde
3,367
py
Python
notifications/views.py
salazarpardo/redinnovacion
3f7c13af0af1887112a0492aea7782871fba0129
[ "CC-BY-3.0" ]
null
null
null
notifications/views.py
salazarpardo/redinnovacion
3f7c13af0af1887112a0492aea7782871fba0129
[ "CC-BY-3.0" ]
null
null
null
notifications/views.py
salazarpardo/redinnovacion
3f7c13af0af1887112a0492aea7782871fba0129
[ "CC-BY-3.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Views for the notifications application. """ # standard library # django from django.views.generic.base import TemplateView # models from .models import Notification # views from base.views import BaseListView # forms class NotificationListView(BaseListView): """ View for displ...
30.609091
78
0.650728
# -*- coding: utf-8 -*- """ Views for the notifications application. """ # standard library # django from django.views.generic.base import TemplateView # models from .models import Notification # views from base.views import BaseListView # forms class NotificationListView(BaseListView): """ View for displ...
2,728
107
77
f3661e8298cc1586815eb79028981a4ef84ff17a
2,313
py
Python
ML_model/mnist.py
Willjay90/DigitRecognition
97db4606063327d7b55c35f8f8ce87d14d2daeab
[ "MIT" ]
8
2019-04-06T19:46:50.000Z
2021-05-28T13:41:50.000Z
ML_model/mnist.py
mohsinalimat/DigitRecognition
97db4606063327d7b55c35f8f8ce87d14d2daeab
[ "MIT" ]
2
2018-04-01T16:30:15.000Z
2018-05-07T06:08:01.000Z
ML_model/mnist.py
mohsinalimat/DigitRecognition
97db4606063327d7b55c35f8f8ce87d14d2daeab
[ "MIT" ]
3
2019-04-19T19:11:52.000Z
2020-11-03T06:33:14.000Z
import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data from keras.models import Sequential from keras.utils import to_categorical from keras.layers import Dense, Dropout, Activation, Flatten, BatchNormalization from keras.layers import Conv2D, MaxPooling2D from keras.optimizers import Adam ...
28.9125
98
0.700821
import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data from keras.models import Sequential from keras.utils import to_categorical from keras.layers import Dense, Dropout, Activation, Flatten, BatchNormalization from keras.layers import Conv2D, MaxPooling2D from keras.optimizers import Adam ...
0
0
0
ed4634cb70b0972f57d2914be36d83f7ce490d82
7,562
py
Python
pyDRESCALk/dist_clustering.py
lanl/pyDRESCALk
25af3796442e5ec87fb54caa4344e8871a2abd15
[ "BSD-3-Clause" ]
2
2021-12-04T05:20:13.000Z
2021-12-06T17:30:28.000Z
pyDRESCALk/dist_clustering.py
lanl/pyDRESCALk
25af3796442e5ec87fb54caa4344e8871a2abd15
[ "BSD-3-Clause" ]
null
null
null
pyDRESCALk/dist_clustering.py
lanl/pyDRESCALk
25af3796442e5ec87fb54caa4344e8871a2abd15
[ "BSD-3-Clause" ]
2
2021-12-04T06:23:21.000Z
2021-12-08T20:53:12.000Z
# @Author: Manish Bhattarai, Erik Skau from .utils import * class custom_clustering(): r""" Greedy algorithm to approximate a quadratic assignment problem to cluster vectors. Given p groups of k vectors, construct k clusters, each cluster containing a single vector from each of the p groups. This clustering a...
40.223404
273
0.581195
# @Author: Manish Bhattarai, Erik Skau from .utils import * class custom_clustering(): r""" Greedy algorithm to approximate a quadratic assignment problem to cluster vectors. Given p groups of k vectors, construct k clusters, each cluster containing a single vector from each of the p groups. This clustering a...
251
0
26
132c8e61aab53c5f476262d03457945113a4bfb6
95
py
Python
coding/learn_celery_02/celery_app/tasks.py
yatao91/learning_road
e88dc43de98e35922bfc71c222ec71766851e618
[ "MIT" ]
3
2021-05-25T16:58:52.000Z
2022-02-05T09:37:17.000Z
coding/learn_celery_02/celery_app/tasks.py
yataosu/learning_road
e88dc43de98e35922bfc71c222ec71766851e618
[ "MIT" ]
null
null
null
coding/learn_celery_02/celery_app/tasks.py
yataosu/learning_road
e88dc43de98e35922bfc71c222ec71766851e618
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from celery_app import app @app.task
11.875
26
0.589474
# -*- coding: utf-8 -*- from celery_app import app @app.task def add(x, y): return x + y
10
0
22
7e79e0ff94b60c23342a586e521e5ede8f485c5f
3,864
py
Python
hargreaves/deals/clients.py
dastra/hargreaves-sdk-python
8099d775c6a70ac415690c0322fe1b964356f6ff
[ "MIT" ]
null
null
null
hargreaves/deals/clients.py
dastra/hargreaves-sdk-python
8099d775c6a70ac415690c0322fe1b964356f6ff
[ "MIT" ]
null
null
null
hargreaves/deals/clients.py
dastra/hargreaves-sdk-python
8099d775c6a70ac415690c0322fe1b964356f6ff
[ "MIT" ]
null
null
null
import logging from ..account.clients import IAccountClient from ..deals.models import DealRequest, DealResult from ..orders.manual.clients import IManualOrderClient from ..orders.market.clients import IMarketOrderClient from ..orders.market.errors import MarketClosedError, MarketOrderLiveQuoteError from ..orders.mode...
41.106383
97
0.712992
import logging from ..account.clients import IAccountClient from ..deals.models import DealRequest, DealResult from ..orders.manual.clients import IManualOrderClient from ..orders.market.clients import IMarketOrderClient from ..orders.market.errors import MarketClosedError, MarketOrderLiveQuoteError from ..orders.mode...
3,087
220
23
4a843d0ff446bdb6b9abfce1f3606a0a63f7b471
1,364
py
Python
tests/unit/TestJinjaPillarGrainsGetFormatRule.py
sblaisot/salt-lint
9b525b6c590535a995c97657c5ad09d9974f3aa8
[ "MIT" ]
null
null
null
tests/unit/TestJinjaPillarGrainsGetFormatRule.py
sblaisot/salt-lint
9b525b6c590535a995c97657c5ad09d9974f3aa8
[ "MIT" ]
null
null
null
tests/unit/TestJinjaPillarGrainsGetFormatRule.py
sblaisot/salt-lint
9b525b6c590535a995c97657c5ad09d9974f3aa8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2013-2018 Will Thames <will@thames.id.au> # Copyright (c) 2018 Ansible by Red Hat # Modified work Copyright (c) 2019 Jeffrey Bouter import unittest from saltlint.linter import RulesCollection from saltlint.rules.JinjaPillarGrainsGetFormatRule import JinjaPillarGrainsGetFormatRu...
27.836735
88
0.674487
# -*- coding: utf-8 -*- # Copyright (c) 2013-2018 Will Thames <will@thames.id.au> # Copyright (c) 2018 Ansible by Red Hat # Modified work Copyright (c) 2019 Jeffrey Bouter import unittest from saltlint.linter import RulesCollection from saltlint.rules.JinjaPillarGrainsGetFormatRule import JinjaPillarGrainsGetFormatRu...
344
155
23
a3278cf42543eeab20b3e70cef2d07f96c468ad4
904
py
Python
leonardo/module/search/forms.py
timgates42/django-leonardo
c155f97fee9e2be1e0f508d47a1c205028253ecc
[ "BSD-3-Clause" ]
102
2015-04-30T12:27:14.000Z
2021-10-31T18:21:16.000Z
leonardo/module/search/forms.py
timgates42/django-leonardo
c155f97fee9e2be1e0f508d47a1c205028253ecc
[ "BSD-3-Clause" ]
158
2015-04-30T22:42:34.000Z
2019-09-07T15:37:22.000Z
leonardo/module/search/forms.py
timgates42/django-leonardo
c155f97fee9e2be1e0f508d47a1c205028253ecc
[ "BSD-3-Clause" ]
64
2015-05-10T12:00:39.000Z
2021-07-29T19:47:27.000Z
from crispy_forms.bootstrap import (Accordion, AccordionGroup, FieldWithButtons, StrictButton, Tab) from crispy_forms.layout import Field, HTML, Layout, Submit from crispy_forms.helper import FormHelper from django.utils.translation import ugettext_lazy as _ from haystack.forms imp...
33.481481
105
0.65708
from crispy_forms.bootstrap import (Accordion, AccordionGroup, FieldWithButtons, StrictButton, Tab) from crispy_forms.layout import Field, HTML, Layout, Submit from crispy_forms.helper import FormHelper from django.utils.translation import ugettext_lazy as _ from haystack.forms imp...
473
13
77
14ecc68206b8d1801404c300feb8fed4ef817efa
175
py
Python
functions/Blur.py
tylerrussin/Road-Line_Detection
c2214907f47a2389c9cc4618962f308ad4309823
[ "MIT" ]
null
null
null
functions/Blur.py
tylerrussin/Road-Line_Detection
c2214907f47a2389c9cc4618962f308ad4309823
[ "MIT" ]
null
null
null
functions/Blur.py
tylerrussin/Road-Line_Detection
c2214907f47a2389c9cc4618962f308ad4309823
[ "MIT" ]
null
null
null
import cv2
29.166667
82
0.708571
import cv2 def blur(image): # Adding Gaussian Blur (much more effective when applied after edge detection) image = cv2.GaussianBlur(image, (5, 5), 0) return image
142
0
23
d9ef3f232f162c575016d84f2f8b286031ba4176
3,286
py
Python
bases_2021_1S/Grupo 03/storage/AVL/DataAccessLayer/reports.py
dadu0699/tytus
e1920f6932c840859e3e79eb8756a1d3da88bd77
[ "MIT" ]
35
2020-12-07T03:11:43.000Z
2021-04-15T17:38:16.000Z
bases_2021_1S/Grupo 03/storage/AVL/DataAccessLayer/reports.py
dadu0699/tytus
e1920f6932c840859e3e79eb8756a1d3da88bd77
[ "MIT" ]
47
2020-12-09T01:29:09.000Z
2021-01-13T05:37:50.000Z
bases_2021_1S/Grupo 03/storage/AVL/DataAccessLayer/reports.py
dadu0699/tytus
e1920f6932c840859e3e79eb8756a1d3da88bd77
[ "MIT" ]
556
2020-12-07T03:13:31.000Z
2021-06-17T17:41:10.000Z
# AVL Mode Package # Released under MIT License # Copyright (c) 2020 TytusDb Team # Developers: SG#16 import os from storage.AVL.DataAccessLayer.handler import Handler from storage.AVL.DataAccessLayer.tree_graph import TreeGraph
34.229167
115
0.521302
# AVL Mode Package # Released under MIT License # Copyright (c) 2020 TytusDb Team # Developers: SG#16 import os from storage.AVL.DataAccessLayer.handler import Handler from storage.AVL.DataAccessLayer.tree_graph import TreeGraph def graphicTables(database: str): try: databases = Handler.rootinstance() ...
2,959
0
92
9499f00eaa6957dbbb45d152b61c998d9b191fa5
1,308
py
Python
working_examples/testing_imports.py
Delosari/dazer
7078895d7b2f3029944c354b687d739152fceef2
[ "MIT" ]
null
null
null
working_examples/testing_imports.py
Delosari/dazer
7078895d7b2f3029944c354b687d739152fceef2
[ "MIT" ]
null
null
null
working_examples/testing_imports.py
Delosari/dazer
7078895d7b2f3029944c354b687d739152fceef2
[ "MIT" ]
null
null
null
import testing_constants as global_settings # from . import settings as global_settings # # class Settings: # # def __init__(self): # for setting in dir(global_settings): # if setting.isupper(): # setattr(self, setting, getattr(global_settings, setting)) # # def __setattr__(self, attr, value)...
24.679245
129
0.665138
import testing_constants as global_settings # from . import settings as global_settings # # class Settings: # # def __init__(self): # for setting in dir(global_settings): # if setting.isupper(): # setattr(self, setting, getattr(global_settings, setting)) # # def __setattr__(self, attr, value)...
355
-6
77
a768325066d042cb4f4790dd05d70a7d81d0d41b
11,139
py
Python
scripts/database-backup/postgres/remote_mysql.py
BoyanHH/training-projects
a7dc23e118fb78beec23992338e099f983c43e67
[ "Apache-2.0" ]
null
null
null
scripts/database-backup/postgres/remote_mysql.py
BoyanHH/training-projects
a7dc23e118fb78beec23992338e099f983c43e67
[ "Apache-2.0" ]
null
null
null
scripts/database-backup/postgres/remote_mysql.py
BoyanHH/training-projects
a7dc23e118fb78beec23992338e099f983c43e67
[ "Apache-2.0" ]
null
null
null
import subprocess import os import sys import psutil import datetime def check_dependencies(): """Checks for dependencies Mandatory dependencies are - mysqldump,mysqlshow,find,mkdir Non-mandatory - gzip""" try: if subprocess.call('/usr/bin/mysqldump > /dev/null 2>&1', shell=True) == 127...
42.353612
179
0.617829
import subprocess import os import sys import psutil import datetime def check_dependencies(): """Checks for dependencies Mandatory dependencies are - mysqldump,mysqlshow,find,mkdir Non-mandatory - gzip""" try: if subprocess.call('/usr/bin/mysqldump > /dev/null 2>&1', shell=True) == 127...
7,490
0
162
e1899c3d29087299f78a5582a03c652196e1ebbb
160
py
Python
cfgov/paying_for_college/forms.py
adebisi-aden/consumerfinance.gov
8c0f5afac341823c59f73b0c6bd60592e0f5eaca
[ "CC0-1.0" ]
37
2020-08-18T19:52:39.000Z
2022-03-23T08:08:41.000Z
cfgov/paying_for_college/forms.py
adebisi-aden/consumerfinance.gov
8c0f5afac341823c59f73b0c6bd60592e0f5eaca
[ "CC0-1.0" ]
338
2020-08-14T20:46:36.000Z
2022-03-31T20:49:32.000Z
cfgov/paying_for_college/forms.py
adebisi-aden/consumerfinance.gov
8c0f5afac341823c59f73b0c6bd60592e0f5eaca
[ "CC0-1.0" ]
14
2020-10-21T15:27:03.000Z
2022-03-17T03:16:36.000Z
from django import forms
20
59
0.66875
from django import forms class FeedbackForm(forms.Form): message = forms.CharField(widget=forms.Textarea(attrs={ 'class': 'a-text-input', }))
0
111
23
62a6274e4ab46635bafe5141a202e2107793372e
206
py
Python
xmemeAPI/admin.py
sukanta-nandi/XMEME-Backend
a532cfca17ccde0aae9faf2a4b937644f61b9894
[ "MIT" ]
null
null
null
xmemeAPI/admin.py
sukanta-nandi/XMEME-Backend
a532cfca17ccde0aae9faf2a4b937644f61b9894
[ "MIT" ]
null
null
null
xmemeAPI/admin.py
sukanta-nandi/XMEME-Backend
a532cfca17ccde0aae9faf2a4b937644f61b9894
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import memeData # Register your models here. @admin.register(memeData)
20.6
38
0.728155
from django.contrib import admin from .models import memeData # Register your models here. @admin.register(memeData) class memeDataAdmin(admin.ModelAdmin): list_display = ['id', 'name'] #pass
0
61
22
9085eec4b909adc583df9513ab3180e68764b29e
2,159
py
Python
example/app.py
KLMatlock/Flask-pyoidc-oda
132cdbd56889e87a74655b22e8798067ee2af222
[ "Apache-2.0" ]
null
null
null
example/app.py
KLMatlock/Flask-pyoidc-oda
132cdbd56889e87a74655b22e8798067ee2af222
[ "Apache-2.0" ]
2
2020-08-26T19:02:11.000Z
2021-03-29T20:47:46.000Z
example/app.py
KLMatlock/Flask-pyoidc-oda
132cdbd56889e87a74655b22e8798067ee2af222
[ "Apache-2.0" ]
null
null
null
import datetime import flask import logging from flask import Flask, jsonify import requests from flask_session import Session from flask_pyoidc import OIDCAuthentication from flask_pyoidc.provider_configuration import ProviderConfiguration, ClientMetadata from flask_pyoidc.user_session import UserSession app = Flas...
26.9875
103
0.718388
import datetime import flask import logging from flask import Flask, jsonify import requests from flask_session import Session from flask_pyoidc import OIDCAuthentication from flask_pyoidc.provider_configuration import ProviderConfiguration, ClientMetadata from flask_pyoidc.user_session import UserSession app = Flas...
623
0
110
f456e29c3077711b21263f879b42e306461b0af3
2,701
py
Python
onadata/apps/api/migrations/0001_initial.py
childhelpline/myhelpline
d72120ee31b6713cbaec79f299f5ee8bcb7ea429
[ "BSD-3-Clause" ]
1
2018-07-15T13:13:43.000Z
2018-07-15T13:13:43.000Z
onadata/apps/api/migrations/0001_initial.py
aondiaye/myhelpline
d72120ee31b6713cbaec79f299f5ee8bcb7ea429
[ "BSD-3-Clause" ]
14
2018-07-10T12:48:46.000Z
2022-03-11T23:24:51.000Z
onadata/apps/api/migrations/0001_initial.py
aondiaye/myhelpline
d72120ee31b6713cbaec79f299f5ee8bcb7ea429
[ "BSD-3-Clause" ]
5
2018-07-04T07:59:14.000Z
2020-01-28T07:50:18.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings
37.513889
76
0.504998
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('logger', '0001_initial'), ('main', '0001_initial'), migrations.swappable_dependency(settings...
0
2,538
23
9d1c1b779ce0314a41fea46de857cf536106ab9a
2,657
py
Python
admin01/guilin.py
ckjh/education
9540c0550097db5742b66b7d831d15a3785c7629
[ "MIT" ]
null
null
null
admin01/guilin.py
ckjh/education
9540c0550097db5742b66b7d831d15a3785c7629
[ "MIT" ]
null
null
null
admin01/guilin.py
ckjh/education
9540c0550097db5742b66b7d831d15a3785c7629
[ "MIT" ]
null
null
null
# 章节列表 # 序列化 ... # 章节序列化 # 章节反序列化
27.968421
60
0.479488
# 章节列表 class SectionView(APIView): def get( self, request): mes = {} try: section = Section.objects.all() s = SectionSerializersModel(section,many=True) mes['code'] =200 mes['message'] ='ok' mes['dataList'] =s.data except:...
2,118
357
182
55f3670d95e12a8c9bbdb109da1cb86268a2f44f
2,786
py
Python
Zebrafish spinal locomotor circuit/Version 2/Single_coiling_MN_KO.py
Bui-lab/Code
6ce5972a4bd0c059ab167522ab1d945f3b0f5707
[ "MIT" ]
null
null
null
Zebrafish spinal locomotor circuit/Version 2/Single_coiling_MN_KO.py
Bui-lab/Code
6ce5972a4bd0c059ab167522ab1d945f3b0f5707
[ "MIT" ]
null
null
null
Zebrafish spinal locomotor circuit/Version 2/Single_coiling_MN_KO.py
Bui-lab/Code
6ce5972a4bd0c059ab167522ab1d945f3b0f5707
[ "MIT" ]
2
2021-08-25T08:14:52.000Z
2021-11-29T12:56:17.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Aug 25 08:41:10 2017 @author: Yann Roussel and Tuan Bui Edited by: Emine Topcu on Sep 2021 """ from Single_coiling_model import Single_coil_base
56.857143
199
0.590811
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Aug 25 08:41:10 2017 @author: Yann Roussel and Tuan Bui Edited by: Emine Topcu on Sep 2021 """ from Single_coiling_model import Single_coil_base class Single_coil_MN_KO(Single_coil_base): tMNKOstart = 50000 tMNKOend = 100000 def __init__...
2,429
121
23
2cb176a75a9d45bf615f1f167aa8d3cc9191262f
1,978
py
Python
src/utils/send_email.py
HaoJiangGuo/fp-server
9c00b8f0ee64049eb9f214c3efe1fdee977542a6
[ "MIT" ]
173
2018-06-10T14:21:05.000Z
2022-03-24T09:24:35.000Z
src/utils/send_email.py
HaoJiangGuo/fp-server
9c00b8f0ee64049eb9f214c3efe1fdee977542a6
[ "MIT" ]
19
2018-06-17T08:33:04.000Z
2021-02-09T07:10:41.000Z
src/utils/send_email.py
HaoJiangGuo/fp-server
9c00b8f0ee64049eb9f214c3efe1fdee977542a6
[ "MIT" ]
45
2018-06-10T14:49:12.000Z
2022-03-24T09:24:38.000Z
# -*- coding:utf-8 -*- """ 发送邮件 """ import email import smtplib from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart if __name__ == "__main__": test()
27.472222
78
0.600607
# -*- coding:utf-8 -*- """ 发送邮件 """ import email import smtplib from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart class MailSender(object): def __init__(self, host, username, password, to_emails, subject, content): """ 初始化 @param host 邮件服务端host ...
275
1,521
46
457fe4ab3be3a4a162e2f2354e33660cec704ad0
4,358
py
Python
tests/bugs/cisco/test_cscvg76186.py
Dom932/device-bug-checker
f1b04813ac4bddc07cc0c3ce62640246fcaaf34f
[ "MIT" ]
null
null
null
tests/bugs/cisco/test_cscvg76186.py
Dom932/device-bug-checker
f1b04813ac4bddc07cc0c3ce62640246fcaaf34f
[ "MIT" ]
null
null
null
tests/bugs/cisco/test_cscvg76186.py
Dom932/device-bug-checker
f1b04813ac4bddc07cc0c3ce62640246fcaaf34f
[ "MIT" ]
null
null
null
import pytest from bugs.cisco import CSCvg76186 from devices.cisco import CiscoIOS unaffected_output1 = "Role: Client (SmartInstall Disabled)" unaffected_output2 = "Capability: Client\nOper Mode: Disabled\nRole: NA" affected_output1 = "Role: Client (SmartInstall enabled)" affected_output2 = "Capability: Client\nOper...
34.864
113
0.688619
import pytest from bugs.cisco import CSCvg76186 from devices.cisco import CiscoIOS unaffected_output1 = "Role: Client (SmartInstall Disabled)" unaffected_output2 = "Capability: Client\nOper Mode: Disabled\nRole: NA" affected_output1 = "Role: Client (SmartInstall enabled)" affected_output2 = "Capability: Client\nOper...
433
3,414
67
6ea84700ad1e51266607033beb6050680d87bcd8
1,394
py
Python
pammfauthenticator/pammfauthenticator.py
cmd-ntrf/pammfauthenticator
856b10282f560ae4a58fb3058350d51f6d257a89
[ "MIT" ]
null
null
null
pammfauthenticator/pammfauthenticator.py
cmd-ntrf/pammfauthenticator
856b10282f560ae4a58fb3058350d51f6d257a89
[ "MIT" ]
1
2020-11-09T16:24:04.000Z
2020-11-11T21:56:25.000Z
pammfauthenticator/pammfauthenticator.py
cmd-ntrf/pammfauthenticator
856b10282f560ae4a58fb3058350d51f6d257a89
[ "MIT" ]
null
null
null
import pamela from jupyterhub.auth import PAMAuthenticator from jupyterhub.handlers.login import LoginHandler from tornado.concurrent import run_on_executor from tornado.escape import url_escape from tornado.httputil import url_concat
35.74359
81
0.65208
import pamela from jupyterhub.auth import PAMAuthenticator from jupyterhub.handlers.login import LoginHandler from tornado.concurrent import run_on_executor from tornado.escape import url_escape from tornado.httputil import url_concat class PAMMFALoginHandler(LoginHandler): def _render(self, login_error=None, use...
590
496
72