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
e8c7ce636feb1aabe59299a6bef17079db148574
5,991
py
Python
tools/codemap.py
RyanSchuster/vos64
66a2df43d88836746170278fa7169fb97ec702c4
[ "BSD-3-Clause" ]
1
2019-10-23T06:19:01.000Z
2019-10-23T06:19:01.000Z
tools/codemap.py
RyanSchuster/vos64
66a2df43d88836746170278fa7169fb97ec702c4
[ "BSD-3-Clause" ]
27
2015-12-06T04:20:11.000Z
2015-12-24T20:07:33.000Z
tools/codemap.py
RyanSchuster/vos64
66a2df43d88836746170278fa7169fb97ec702c4
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 import scanner # ------------------------------------------------------------------------------ # Classes for holding source code entities # ------------------------------------------------------------------------------ # Factories for module and function filters # ----------------...
25.066946
80
0.633617
#!/usr/bin/env python3 import scanner # ------------------------------------------------------------------------------ # Classes for holding source code entities class Module(object): def __init__(self): self.brief = '' self.detail = '' self.functions = set() self.calls = set() class Function(object): ...
4,686
186
418
4568f8e6f5498f1dafcbce739b5866ade9fb629b
6,471
py
Python
example/tweet.py
sctnightcore/flask-rauth
50e1af457b81bd7122be19ca6a9edf8940e096b5
[ "BSD-3-Clause" ]
32
2015-03-09T02:00:02.000Z
2020-11-20T21:51:17.000Z
example/tweet.py
sctnightcore/flask-rauth
50e1af457b81bd7122be19ca6a9edf8940e096b5
[ "BSD-3-Clause" ]
1
2016-11-16T02:35:42.000Z
2016-11-16T02:35:42.000Z
example/tweet.py
sctnightcore/flask-rauth
50e1af457b81bd7122be19ca6a9edf8940e096b5
[ "BSD-3-Clause" ]
11
2015-01-26T09:01:12.000Z
2020-01-21T14:57:01.000Z
''' Instructions: 1. Make sure you have Flask, Flask-Rauth, and SQLAlchemy installed. $ pip install Flask Flask-Rauth SQLAlchemy 2. Open a Python shell in this directory and execute the following: $ python >>> from tweet import init_db >>> init_db() >>> exit() This will initia...
30.380282
89
0.693556
''' Instructions: 1. Make sure you have Flask, Flask-Rauth, and SQLAlchemy installed. $ pip install Flask Flask-Rauth SQLAlchemy 2. Open a Python shell in this directory and execute the following: $ python >>> from tweet import init_db >>> init_db() >>> exit() This will initia...
686
198
134
2126194c0cca956a996f5074663683a243fdaa5e
340
py
Python
dp_tornado/engine/template/example/controller/main/contact.py
donghak-shin/dp-tornado
095bb293661af35cce5f917d8a2228d273489496
[ "MIT" ]
18
2015-04-07T14:28:39.000Z
2020-02-08T14:03:38.000Z
dp_tornado/engine/template/example/controller/main/contact.py
donghak-shin/dp-tornado
095bb293661af35cce5f917d8a2228d273489496
[ "MIT" ]
7
2016-10-05T05:14:06.000Z
2021-05-20T02:07:22.000Z
dp_tornado/engine/template/example/controller/main/contact.py
donghak-shin/dp-tornado
095bb293661af35cce5f917d8a2228d273489496
[ "MIT" ]
11
2015-12-15T09:49:39.000Z
2021-09-06T18:38:21.000Z
# -*- coding: utf-8 -*- from dp_tornado.engine.controller import Controller as dpController
30.909091
100
0.705882
# -*- coding: utf-8 -*- from dp_tornado.engine.controller import Controller as dpController class ContactController(dpController): def get(self, param1=None, param2=None): server_version = self.config.server.version.master self.finish('/main/contact with %s, %s (server ver. %s)' % (param1, param...
180
17
49
925febbbd7dccfc011e693b50b8bdec79b577c31
207
py
Python
tottle/utils/constructor.py
TheBakerCat/tottle
c7dbe741014caff1fadaa39d06db56d44886c31d
[ "MIT" ]
1
2022-02-11T17:43:18.000Z
2022-02-11T17:43:18.000Z
tottle/utils/constructor.py
TheBakerCat/tottle
c7dbe741014caff1fadaa39d06db56d44886c31d
[ "MIT" ]
null
null
null
tottle/utils/constructor.py
TheBakerCat/tottle
c7dbe741014caff1fadaa39d06db56d44886c31d
[ "MIT" ]
null
null
null
import typing from abc import ABC, abstractmethod
20.7
60
0.661836
import typing from abc import ABC, abstractmethod class Constructor(ABC): @abstractmethod def construct(self, *args, **kwargs) -> typing.ClassVar: """ Construct new object """ pass
0
133
23
943e70eefc2897f41e82f6d3478c78f4f8cb39e1
7,648
py
Python
tests/test_binary.py
ya-ds/crosspredict
d0902e7e5776db2e29c6f92aac0c61927502887d
[ "MIT" ]
19
2020-04-05T18:23:44.000Z
2022-03-21T09:13:47.000Z
tests/test_binary.py
crosspredict/crosspredict
b64d6fe5d985b90c6845508b912482011b9b37cf
[ "MIT" ]
null
null
null
tests/test_binary.py
crosspredict/crosspredict
b64d6fe5d985b90c6845508b912482011b9b37cf
[ "MIT" ]
1
2021-08-03T06:36:02.000Z
2021-08-03T06:36:02.000Z
import os from collections import namedtuple from hyperopt import fmin, tpe, Trials, space_eval import numpy as np import pandas as pd import pytest import requests import yaml from crosspredict.crossval import \ CrossLightgbmModel, CrossXgboostModel, CrossCatboostModel from crosspredict.iterator import Iterator ...
32.40678
111
0.655727
import os from collections import namedtuple from hyperopt import fmin, tpe, Trials, space_eval import numpy as np import pandas as pd import pytest import requests import yaml from crosspredict.crossval import \ CrossLightgbmModel, CrossXgboostModel, CrossCatboostModel from crosspredict.iterator import Iterator ...
6,629
0
292
ff455a748efee4cfba3707b0f51548bd878e4008
1,453
py
Python
dentsrc/config_base.py
livibetter/twimonial
aa54b5efde2a3d9ed634a959dc466ad078b5f9d4
[ "BSD-3-Clause" ]
null
null
null
dentsrc/config_base.py
livibetter/twimonial
aa54b5efde2a3d9ed634a959dc466ad078b5f9d4
[ "BSD-3-Clause" ]
null
null
null
dentsrc/config_base.py
livibetter/twimonial
aa54b5efde2a3d9ed634a959dc466ad078b5f9d4
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import os # For different service SITE_NAME = 'Dentimonial' TRACKING_HASHTAG = '#dentimonial' TWEET_ACTION_NAME = 'Send' SERVICE_NAME = 'Identi.ca' SERVICE_URI = 'http://identi.ca/' FOLLOWERS_NAME = 'Subscribers' FOLLOWED_NAME = 'Subscribed' FOLLOW_NAME = 'Subscribe to' TWEET_NAME = 'Notice' ...
22.353846
108
0.754301
# -*- coding: utf-8 -*- import os # For different service SITE_NAME = 'Dentimonial' TRACKING_HASHTAG = '#dentimonial' TWEET_ACTION_NAME = 'Send' SERVICE_NAME = 'Identi.ca' SERVICE_URI = 'http://identi.ca/' FOLLOWERS_NAME = 'Subscribers' FOLLOWED_NAME = 'Subscribed' FOLLOW_NAME = 'Subscribe to' TWEET_NAME = 'Notice' ...
0
0
0
90825bd21cef07f61694b9ac724405dad570aed9
73
py
Python
microbeannotator/__init__.py
silvtal/MicrobeAnnotator
ff5ee0c09fe0223879c9be7dac90dbcbcae9a106
[ "Artistic-2.0" ]
56
2020-07-22T03:26:01.000Z
2022-03-30T08:55:39.000Z
microbeannotator/__init__.py
silvtal/MicrobeAnnotator
ff5ee0c09fe0223879c9be7dac90dbcbcae9a106
[ "Artistic-2.0" ]
43
2020-06-05T08:37:35.000Z
2022-03-30T09:19:31.000Z
microbeannotator/__init__.py
silvtal/MicrobeAnnotator
ff5ee0c09fe0223879c9be7dac90dbcbcae9a106
[ "Artistic-2.0" ]
14
2020-05-11T03:16:05.000Z
2022-03-23T08:13:14.000Z
version_info = (2, 0, 5) version = '.'.join(str(c) for c in version_info)
36.5
48
0.657534
version_info = (2, 0, 5) version = '.'.join(str(c) for c in version_info)
0
0
0
fc0111a6313d2a73d75c821f468fa3bf8b18d8c0
1,749
py
Python
dmscripts/notify_suppliers_of_brief_withdrawal.py
alphagov-mirror/digitalmarketplace-scripts
8a7ef9b2b5f5fffea6e012bd676b095a27d35101
[ "MIT" ]
null
null
null
dmscripts/notify_suppliers_of_brief_withdrawal.py
alphagov-mirror/digitalmarketplace-scripts
8a7ef9b2b5f5fffea6e012bd676b095a27d35101
[ "MIT" ]
null
null
null
dmscripts/notify_suppliers_of_brief_withdrawal.py
alphagov-mirror/digitalmarketplace-scripts
8a7ef9b2b5f5fffea6e012bd676b095a27d35101
[ "MIT" ]
null
null
null
from itertools import chain from dmutils.email.helpers import get_email_addresses, hash_string from dmutils.env_helpers import get_web_url_from_stage
33.634615
113
0.657519
from itertools import chain from dmutils.email.helpers import get_email_addresses, hash_string from dmutils.env_helpers import get_web_url_from_stage def get_brief_response_emails(data_api_client, brief_id): responses = data_api_client.find_brief_responses_iter(brief_id=brief_id, status="submitted") return ...
1,525
0
69
187381e1e4eab658f8dc7056a99fc20caf5ad86a
8,870
py
Python
runtime/test/specs/V1_3/qlstm_projection.mod.py
aosp-goes-brrbrr/packages_modules_NeuralNetworks
87a14e21ce905ce7c4584fe9a53e4397a4d33c67
[ "Apache-2.0" ]
null
null
null
runtime/test/specs/V1_3/qlstm_projection.mod.py
aosp-goes-brrbrr/packages_modules_NeuralNetworks
87a14e21ce905ce7c4584fe9a53e4397a4d33c67
[ "Apache-2.0" ]
null
null
null
runtime/test/specs/V1_3/qlstm_projection.mod.py
aosp-goes-brrbrr/packages_modules_NeuralNetworks
87a14e21ce905ce7c4584fe9a53e4397a4d33c67
[ "Apache-2.0" ]
2
2021-11-28T11:20:31.000Z
2021-11-28T11:28:38.000Z
# # Copyright (C) 2020 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
41.643192
104
0.705862
# # Copyright (C) 2020 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
0
0
0
f97269ac7f197b28df8ca7996bafaa9a4ff10343
504
py
Python
CursoEmVideo/ex053.py
ElivanLimaJunior/Python
57c277f3ec0da06d6c8aa125b50d01a5ab88934d
[ "MIT" ]
null
null
null
CursoEmVideo/ex053.py
ElivanLimaJunior/Python
57c277f3ec0da06d6c8aa125b50d01a5ab88934d
[ "MIT" ]
null
null
null
CursoEmVideo/ex053.py
ElivanLimaJunior/Python
57c277f3ec0da06d6c8aa125b50d01a5ab88934d
[ "MIT" ]
null
null
null
frase = str(input('Digite uma frase: ')).strip().upper() palavras = frase.split() junto = ''.join(palavras) inverso = '' for letra in range(len(junto) -1, -1, -1): inverso += junto[letra] if inverso == junto: print('Temos um palíndromo') else: print('A frase digitada não é um palíndromo!') #a debaixo pegue...
28
61
0.640873
frase = str(input('Digite uma frase: ')).strip().upper() palavras = frase.split() junto = ''.join(palavras) inverso = '' for letra in range(len(junto) -1, -1, -1): inverso += junto[letra] if inverso == junto: print('Temos um palíndromo') else: print('A frase digitada não é um palíndromo!') #a debaixo pegue...
0
0
0
15adee1fd0c85144a846a6973bceb9bfde990ff7
5,640
py
Python
00a_precompute_dcase_fixed.py
andres-fr/dcase2021_umaps
0418b256d484a66958763061170bb2346cb6030a
[ "MIT" ]
2
2021-11-17T14:12:11.000Z
2021-11-30T09:28:21.000Z
00a_precompute_dcase_fixed.py
andres-fr/dcase2021_umaps
0418b256d484a66958763061170bb2346cb6030a
[ "MIT" ]
null
null
null
00a_precompute_dcase_fixed.py
andres-fr/dcase2021_umaps
0418b256d484a66958763061170bb2346cb6030a
[ "MIT" ]
1
2021-08-22T14:54:59.000Z
2021-08-22T14:54:59.000Z
#!/usr/bin/env python # -*- coding:utf-8 -*- """ Precompute DCASE2021 Task 2 Dataset fixed representations (logSTFT, logMel) """ import os from pathlib import Path import json # from omegaconf import OmegaConf import numpy as np # from d2021umaps.utils import IncrementalHDF5 from d2021umaps.logging import ColorLogg...
38.630137
80
0.616489
#!/usr/bin/env python # -*- coding:utf-8 -*- """ Precompute DCASE2021 Task 2 Dataset fixed representations (logSTFT, logMel) """ import os from pathlib import Path import json # from omegaconf import OmegaConf import numpy as np # from d2021umaps.utils import IncrementalHDF5 from d2021umaps.logging import ColorLogg...
0
0
0
85348e5ffc6d2600f61b774c35de0ff2b86cb4aa
7,444
py
Python
src/psoNeuralNetwork/vonNeumannPSONN.py
pooyadav/cpso-for-nn-training
f643d00e37a6500126561c429263c94f09d870e9
[ "MIT" ]
1
2020-01-19T00:27:42.000Z
2020-01-19T00:27:42.000Z
src/psoNeuralNetwork/vonNeumannPSONN.py
Sharzy92/cpso-for-nn-training
f643d00e37a6500126561c429263c94f09d870e9
[ "MIT" ]
null
null
null
src/psoNeuralNetwork/vonNeumannPSONN.py
Sharzy92/cpso-for-nn-training
f643d00e37a6500126561c429263c94f09d870e9
[ "MIT" ]
2
2019-11-18T14:52:51.000Z
2020-01-19T00:27:26.000Z
import numpy as np import matplotlib.pyplot as plt from numberGenerator.chaos.cprng import CPRNG from particleSwarmOptimization.pso import PSO from particleSwarmOptimization.structure.particle import Particle from particleSwarmOptimization.structure.chaoticParticle import ChaoticParticle from neuralNetwork.feedForward...
42.056497
147
0.60532
import numpy as np import matplotlib.pyplot as plt from numberGenerator.chaos.cprng import CPRNG from particleSwarmOptimization.pso import PSO from particleSwarmOptimization.structure.particle import Particle from particleSwarmOptimization.structure.chaoticParticle import ChaoticParticle from neuralNetwork.feedForward...
6,900
1
103
416bd9a1b0e5ac7a5fe87646662142d57e63317a
1,059
py
Python
chat/channels.py
SafetyGuardians/SafetyGuardiansApp
aa53aeda3974e3de73fea32b598fbd15a2f46fd5
[ "MIT" ]
null
null
null
chat/channels.py
SafetyGuardians/SafetyGuardiansApp
aa53aeda3974e3de73fea32b598fbd15a2f46fd5
[ "MIT" ]
1
2021-03-10T00:53:05.000Z
2021-03-10T00:53:05.000Z
chat/channels.py
SafetyGuardians/SafetyGuardiansApp
aa53aeda3974e3de73fea32b598fbd15a2f46fd5
[ "MIT" ]
null
null
null
"""Notification channels for django-notifs.""" from json import dumps import pika from notifications.channels import BaseNotificationChannel class BroadCastWebSocketChannel(BaseNotificationChannel): """Fanout notification for RabbitMQ.""" def _connect(self): """Connect to the RabbitMQ server.""" ...
27.868421
73
0.678942
"""Notification channels for django-notifs.""" from json import dumps import pika from notifications.channels import BaseNotificationChannel class BroadCastWebSocketChannel(BaseNotificationChannel): """Fanout notification for RabbitMQ.""" def _connect(self): """Connect to the RabbitMQ server.""" ...
0
0
0
54a40ca37344c270ba9a186e55f16e63e23e1490
4,402
py
Python
app/StagyBee/views.py
zigellsn/JWConfStage
684060562a971b2dc33fe44b7f223babd4094786
[ "Apache-2.0" ]
null
null
null
app/StagyBee/views.py
zigellsn/JWConfStage
684060562a971b2dc33fe44b7f223babd4094786
[ "Apache-2.0" ]
1
2019-02-20T21:15:08.000Z
2019-02-20T21:15:08.000Z
app/StagyBee/views.py
zigellsn/JWConfStage
684060562a971b2dc33fe44b7f223babd4094786
[ "Apache-2.0" ]
null
null
null
# Copyright 2019-2022 Simon Zigelli # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
34.124031
120
0.623126
# Copyright 2019-2022 Simon Zigelli # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
3,106
93
191
ac6502df6c74550c5f00ed474190bd596e2b1cff
907
py
Python
_unittests/ut_td_1a/test_LONG_internet_retrieve_speeches.py
Jerome-maker/ensae_teaching_cs
43ea044361ee60c00c85aea354a7b25c21c0fd07
[ "MIT" ]
73
2015-05-12T13:12:11.000Z
2021-12-21T11:44:29.000Z
_unittests/ut_td_1a/test_LONG_internet_retrieve_speeches.py
Jerome-maker/ensae_teaching_cs
43ea044361ee60c00c85aea354a7b25c21c0fd07
[ "MIT" ]
90
2015-06-23T11:11:35.000Z
2021-03-31T22:09:15.000Z
_unittests/ut_td_1a/test_LONG_internet_retrieve_speeches.py
Jerome-maker/ensae_teaching_cs
43ea044361ee60c00c85aea354a7b25c21c0fd07
[ "MIT" ]
65
2015-01-13T08:23:55.000Z
2022-02-11T22:42:07.000Z
""" @brief test log(time=21s) """ import os import unittest from pyquickhelper.pycode import ExtTestCase from ensae_teaching_cs.td_1a.discours_politique import enumerate_speeches_from_elysees if __name__ == "__main__": unittest.main()
25.914286
86
0.593164
""" @brief test log(time=21s) """ import os import unittest from pyquickhelper.pycode import ExtTestCase from ensae_teaching_cs.td_1a.discours_politique import enumerate_speeches_from_elysees class TestRetrieveSpeeches(ExtTestCase): def test_retrieve_speeches(self): temp = os.path.abspath( ...
591
19
50
b424617c8a16ffc92d5d3c8adc9331822d496557
687
py
Python
pyanimelist/util/scraper.py
byronvanstien/Pyanimelist
eff1fb4cdffe9a8e6dca59138549715d61c484ae
[ "MIT" ]
1
2022-01-17T03:17:52.000Z
2022-01-17T03:17:52.000Z
pyanimelist/util/scraper.py
byronvanstien/Pyanimelist
eff1fb4cdffe9a8e6dca59138549715d61c484ae
[ "MIT" ]
null
null
null
pyanimelist/util/scraper.py
byronvanstien/Pyanimelist
eff1fb4cdffe9a8e6dca59138549715d61c484ae
[ "MIT" ]
null
null
null
import warnings from functools import wraps def scraper_enabled(func): """ Decorator which ensures that a :class:`pyanimelist.Client.scraper` isn't used without it being explictly allowed Example usage: .. code-block:: py from pyanimelist.util.web import scraper_enabled @scraper_enab...
27.48
130
0.657933
import warnings from functools import wraps def scraper_enabled(func): """ Decorator which ensures that a :class:`pyanimelist.Client.scraper` isn't used without it being explictly allowed Example usage: .. code-block:: py from pyanimelist.util.web import scraper_enabled @scraper_enab...
229
0
26
6ae69a9250b82a1d7c556c26274cba207dc1f76d
8,091
py
Python
examples/SchedulerExample/schedule_example/agent.py
bl33m/volttron
7c2d7f5d90a9b9ab152436483a98854d393f301b
[ "Apache-2.0", "BSD-2-Clause" ]
null
null
null
examples/SchedulerExample/schedule_example/agent.py
bl33m/volttron
7c2d7f5d90a9b9ab152436483a98854d393f301b
[ "Apache-2.0", "BSD-2-Clause" ]
null
null
null
examples/SchedulerExample/schedule_example/agent.py
bl33m/volttron
7c2d7f5d90a9b9ab152436483a98854d393f301b
[ "Apache-2.0", "BSD-2-Clause" ]
1
2022-03-22T21:10:52.000Z
2022-03-22T21:10:52.000Z
# -*- coding: utf-8 -*- {{{ # vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et: # # Copyright 2020, Battelle Memorial Institute. # # 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...
39.857143
147
0.557039
# -*- coding: utf-8 -*- {{{ # vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et: # # Copyright 2020, Battelle Memorial Institute. # # 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...
5,063
0
23
f7c1f6733fde5d3537b7b99e28e605c66b708a50
1,112
py
Python
aoi/task.py
Yat-o/Aoi
51215c2f9fa2049ceee224ab8997e7673cb6e3d6
[ "MIT" ]
5
2020-10-18T02:25:47.000Z
2021-07-01T04:58:58.000Z
aoi/task.py
Yat-o/Aoi
51215c2f9fa2049ceee224ab8997e7673cb6e3d6
[ "MIT" ]
58
2020-09-26T03:16:23.000Z
2021-11-01T18:41:56.000Z
aoi/task.py
Yat-o/Aoi
51215c2f9fa2049ceee224ab8997e7673cb6e3d6
[ "MIT" ]
5
2020-11-25T09:07:11.000Z
2021-08-21T10:25:31.000Z
import asyncio from datetime import datetime from typing import Callable import discord from discord.ext import commands
28.512821
105
0.626799
import asyncio from datetime import datetime from typing import Callable import discord from discord.ext import commands class AoiTask: def __init__(self, task: asyncio.Task, ctx: commands.Context, status: Callable[[], str]): self.task = task self.ctx = ctx self._status = status s...
743
223
23
dcc12bae79a15121df33468eed8a33d7ee458e69
14,044
py
Python
lib/medzoo/Unet3D.py
eynaij/MedicalZooPytorch_RibFrac
720cd2a3b7e62a47ed35b9e41e15db92e802ffb8
[ "MIT" ]
2
2020-09-20T15:59:37.000Z
2021-04-12T09:28:35.000Z
lib/medzoo/Unet3D.py
eynaij/MedicalZooPytorch_RibFrac
720cd2a3b7e62a47ed35b9e41e15db92e802ffb8
[ "MIT" ]
1
2020-12-17T02:38:05.000Z
2020-12-17T02:38:05.000Z
lib/medzoo/Unet3D.py
eynaij/MedicalZooPytorch_RibFrac
720cd2a3b7e62a47ed35b9e41e15db92e802ffb8
[ "MIT" ]
null
null
null
import torch.nn as nn import torch from torchsummary import summary import torchsummaryX from lib.medzoo.BaseModelClass import BaseModel import torch.nn.functional as F class BaseAttentionBlock(nn.Module): """The basic implementation for self-attention block/non-local block.""" class BaseOCModule(nn.Module): ...
43.614907
132
0.604386
import torch.nn as nn import torch from torchsummary import summary import torchsummaryX from lib.medzoo.BaseModelClass import BaseModel import torch.nn.functional as F class BaseAttentionBlock(nn.Module): """The basic implementation for self-attention block/non-local block.""" def __init__(self, in_channels,...
13,212
3
373
7577d07b966b266678d961ee0ccdc4a7eaa10639
834
py
Python
setup.py
vitor-vidal-negr/pyKriging
03309528466f201f37b112bb9540bf49e14e963b
[ "MIT" ]
354
2015-02-24T13:51:19.000Z
2022-03-27T01:12:35.000Z
setup.py
vitor-vidal-negr/pyKriging
03309528466f201f37b112bb9540bf49e14e963b
[ "MIT" ]
44
2015-02-25T03:34:51.000Z
2022-03-05T08:07:39.000Z
setup.py
vitor-vidal-negr/pyKriging
03309528466f201f37b112bb9540bf49e14e963b
[ "MIT" ]
121
2015-02-24T17:52:48.000Z
2022-03-23T12:28:21.000Z
from setuptools import setup, find_packages # Always prefer setuptools over distutils from os import path, walk here = path.abspath(path.dirname(__file__)) datadir = 'pyKriging/sampling_plans' package_data = [ (d, [path.join(d, f) for f in files]) for d,folders,files in walk(datadir)] data_files=[] for i in package_d...
29.785714
92
0.690647
from setuptools import setup, find_packages # Always prefer setuptools over distutils from os import path, walk here = path.abspath(path.dirname(__file__)) datadir = 'pyKriging/sampling_plans' package_data = [ (d, [path.join(d, f) for f in files]) for d,folders,files in walk(datadir)] data_files=[] for i in package_d...
0
0
0
1867e2653f5a6d44422f07bf4c77c2117d38662f
3,580
py
Python
classify_r_equiv/update_data.py
yassu/classify-r-equiv
42dbd20166add8449daabce790b15848b2f3a6c6
[ "Apache-2.0" ]
null
null
null
classify_r_equiv/update_data.py
yassu/classify-r-equiv
42dbd20166add8449daabce790b15848b2f3a6c6
[ "Apache-2.0" ]
3
2018-10-03T17:07:00.000Z
2018-10-11T00:48:59.000Z
classify_r_equiv/update_data.py
yassu/classify-r-equiv
42dbd20166add8449daabce790b15848b2f3a6c6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np import json from classify_r_equiv.const import get_seed_functions from tqdm import tqdm from sympy import * import random x, y = symbols("x y")
27.751938
79
0.550279
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np import json from classify_r_equiv.const import get_seed_functions from tqdm import tqdm from sympy import * import random x, y = symbols("x y") class MyEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, np.integer): ...
3,163
13
187
dc77c869b6b272fd18ee192b680364c6a30377ec
2,722
py
Python
Tutorial03-mouseEvents.py
xanewton/PygameTutorial
5d0d08100daf51524e640e187cb082c8bec96250
[ "Apache-2.0" ]
null
null
null
Tutorial03-mouseEvents.py
xanewton/PygameTutorial
5d0d08100daf51524e640e187cb082c8bec96250
[ "Apache-2.0" ]
null
null
null
Tutorial03-mouseEvents.py
xanewton/PygameTutorial
5d0d08100daf51524e640e187cb082c8bec96250
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/env python # Source https://lorenzod8n.wordpress.com/2007/05/30/pygame-tutorial-3-mouse-events/ # Deal with mouse events. import pygame # Tracks the position of the mouse on our window. # Draws lines that cut the mouse pointer’s coordinates. # Draws lines that cut the mouse pointer’s coordinates fl...
27.77551
84
0.608744
#! /usr/bin/env python # Source https://lorenzod8n.wordpress.com/2007/05/30/pygame-tutorial-3-mouse-events/ # Deal with mouse events. import pygame # Tracks the position of the mouse on our window. def track_mouse_position(): x = y = 0 running = 1 screen = pygame.display.set_mode((640, 400)) while...
2,082
0
88
8d8795d0f000296a8ff155eb1baa7b2e8a25aa3f
4,925
py
Python
scripts/upstream_usage.py
Data-to-Knowledge/waimak-de-tide
a13bc8005173466d438ff6de0f86d3e70fb20017
[ "Apache-2.0" ]
null
null
null
scripts/upstream_usage.py
Data-to-Knowledge/waimak-de-tide
a13bc8005173466d438ff6de0f86d3e70fb20017
[ "Apache-2.0" ]
null
null
null
scripts/upstream_usage.py
Data-to-Knowledge/waimak-de-tide
a13bc8005173466d438ff6de0f86d3e70fb20017
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sun Sep 30 12:33:58 2018 @author: michaelek """ import os import pandas as pd from hilltoppy import web_service as ws from hilltoppy.util import convert_site_names from pyhydrotel import get_ts_data, get_sites_mtypes from flownat import FlowNat from pdsql import mssql import yaml...
39.087302
286
0.652792
# -*- coding: utf-8 -*- """ Created on Sun Sep 30 12:33:58 2018 @author: michaelek """ import os import pandas as pd from hilltoppy import web_service as ws from hilltoppy.util import convert_site_names from pyhydrotel import get_ts_data, get_sites_mtypes from flownat import FlowNat from pdsql import mssql import yaml...
0
0
0
2533bd390fe0f75109854d9db6caf4c85c798749
3,138
py
Python
programmers/lv3/card_matching_1.py
mrbartrns/swacademy_structure
778f0546030385237c383d81ec37d5bd9ed1272d
[ "MIT" ]
null
null
null
programmers/lv3/card_matching_1.py
mrbartrns/swacademy_structure
778f0546030385237c383d81ec37d5bd9ed1272d
[ "MIT" ]
null
null
null
programmers/lv3/card_matching_1.py
mrbartrns/swacademy_structure
778f0546030385237c383d81ec37d5bd9ed1272d
[ "MIT" ]
null
null
null
# 카드 짝 맞추기 """ 1. 현재 보드를 모두 순회하면서 카드의 종류를 모두 긁어 모은다. 2. 순회한 보드에 따라 permutations 한다. 3. 방문할 좌표들을 백트래킹한다. -> 좌표들을 저장하고 좌표의 인덱스만 백트래킹한다. 4. 방문해야할 모든 좌표 세트를 구하고 bfs를 실행한다. """ import copy from collections import deque from itertools import permutations dy = [-1, 1, 0, 0] dx = [0, 0, -1, 1] INF = 987654321 if __name...
25.721311
68
0.472913
# 카드 짝 맞추기 """ 1. 현재 보드를 모두 순회하면서 카드의 종류를 모두 긁어 모은다. 2. 순회한 보드에 따라 permutations 한다. 3. 방문할 좌표들을 백트래킹한다. -> 좌표들을 저장하고 좌표의 인덱스만 백트래킹한다. 4. 방문해야할 모든 좌표 세트를 구하고 bfs를 실행한다. """ import copy from collections import deque from itertools import permutations dy = [-1, 1, 0, 0] dx = [0, 0, -1, 1] INF = 987654321 def get_card(b...
2,583
0
115
d3a19d3778e78cd70649190099187c224f117dc4
7,293
py
Python
pauxy/estimators/hubbard.py
pauxy-qmc/pauxy
1da80284284769b59361c73cfa3c2d914c74a73f
[ "Apache-2.0" ]
16
2020-08-05T17:17:17.000Z
2022-03-18T04:06:18.000Z
pauxy/estimators/hubbard.py
pauxy-qmc/pauxy
1da80284284769b59361c73cfa3c2d914c74a73f
[ "Apache-2.0" ]
4
2020-05-17T21:28:20.000Z
2021-04-22T18:05:50.000Z
pauxy/estimators/hubbard.py
pauxy-qmc/pauxy
1da80284284769b59361c73cfa3c2d914c74a73f
[ "Apache-2.0" ]
5
2020-05-18T01:03:18.000Z
2021-04-13T15:36:29.000Z
import numpy def local_energy_hubbard_holstein_momentum(system, G, P, Lap, Ghalf=None): r"""Calculate local energy of walker for the Hubbard-Hostein model. Parameters ---------- system : :class:`HubbardHolstein` System information for the HubbardHolstein model. G : :class:`numpy.ndarray` ...
33.92093
108
0.603181
import numpy def local_energy_hubbard_holstein_momentum(system, G, P, Lap, Ghalf=None): r"""Calculate local energy of walker for the Hubbard-Hostein model. Parameters ---------- system : :class:`HubbardHolstein` System information for the HubbardHolstein model. G : :class:`numpy.ndarray` ...
0
0
0
c7269f04b682e8809b889866122b71b54e1b413e
9,924
py
Python
http_check/tests/test_http_check.py
Siecje/integrations-core
b2f3ea4145b25394be0b274093d1f0723e8f968d
[ "BSD-3-Clause" ]
null
null
null
http_check/tests/test_http_check.py
Siecje/integrations-core
b2f3ea4145b25394be0b274093d1f0723e8f968d
[ "BSD-3-Clause" ]
null
null
null
http_check/tests/test_http_check.py
Siecje/integrations-core
b2f3ea4145b25394be0b274093d1f0723e8f968d
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # (C) Datadog, Inc. 2018 # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) # 3p import mock from datadog_checks.http_check import HTTPCheck from datadog_checks.utils.headers import headers as agent_headers from .common import ( FAKE_CERT, CONFIG, CONFIG_HTT...
48.409756
120
0.743954
# -*- coding: utf-8 -*- # (C) Datadog, Inc. 2018 # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) # 3p import mock from datadog_checks.http_check import HTTPCheck from datadog_checks.utils.headers import headers as agent_headers from .common import ( FAKE_CERT, CONFIG, CONFIG_HTT...
5,048
0
159
1c430821f923be31c49db28013f3a7692f993b15
7,542
py
Python
pychron/core/fits/measurement_fits_selector.py
ael-noblegas/pychron
6ebbbb1f66a614972b62b7a9be4c784ae61b5d62
[ "Apache-2.0" ]
null
null
null
pychron/core/fits/measurement_fits_selector.py
ael-noblegas/pychron
6ebbbb1f66a614972b62b7a9be4c784ae61b5d62
[ "Apache-2.0" ]
80
2018-07-17T20:10:20.000Z
2021-08-17T15:38:24.000Z
pychron/core/fits/measurement_fits_selector.py
UManPychron/pychron
b84c9fd70072f9cbda30abe2c471e64fe3dd75d8
[ "Apache-2.0" ]
null
null
null
# =============================================================================== # Copyright 2014 Jake Ross # # 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/licens...
36.086124
112
0.570936
# =============================================================================== # Copyright 2014 Jake Ross # # 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/licens...
4,591
682
69
c2250245a603f24ce7290d4cd4f35480986061bb
686
py
Python
advertools/__init__.py
Dishtid/advertools
b5ceac59a70ad6bfe3ebfaddbdbd1d2bb40c0acd
[ "MIT" ]
null
null
null
advertools/__init__.py
Dishtid/advertools
b5ceac59a70ad6bfe3ebfaddbdbd1d2bb40c0acd
[ "MIT" ]
null
null
null
advertools/__init__.py
Dishtid/advertools
b5ceac59a70ad6bfe3ebfaddbdbd1d2bb40c0acd
[ "MIT" ]
null
null
null
"""Top-level package for advertools.""" __author__ = """Elias Dabbas""" __email__ = 'eliasdabbas@gmail.com' __version__ = '0.9.0' from advertools.ad_create import ad_create from advertools.ad_from_string import ad_from_string from advertools.emoji import emoji_search, emoji_df from advertools.extract import * from a...
31.181818
52
0.827988
"""Top-level package for advertools.""" __author__ = """Elias Dabbas""" __email__ = 'eliasdabbas@gmail.com' __version__ = '0.9.0' from advertools.ad_create import ad_create from advertools.ad_from_string import ad_from_string from advertools.emoji import emoji_search, emoji_df from advertools.extract import * from a...
0
0
0
99701e290cbfc94d1e327a2dcfcce3b98758d598
5,029
py
Python
querybulletin/cli.py
bpptkg/bpptkg-querybulletin
5e108a28a06e8a295b55ef6575be4169cd04d36c
[ "MIT" ]
null
null
null
querybulletin/cli.py
bpptkg/bpptkg-querybulletin
5e108a28a06e8a295b55ef6575be4169cd04d36c
[ "MIT" ]
null
null
null
querybulletin/cli.py
bpptkg/bpptkg-querybulletin
5e108a28a06e8a295b55ef6575be4169cd04d36c
[ "MIT" ]
null
null
null
import argparse import os import sys import pandas as pd from sqlalchemy import create_engine from sqlalchemy.pool import NullPool from . import exceptions, query, settings, utils from .models import Base, Bulletin from .version import __version__
30.478788
80
0.549413
import argparse import os import sys import pandas as pd from sqlalchemy import create_engine from sqlalchemy.pool import NullPool from . import exceptions, query, settings, utils from .models import Base, Bulletin from .version import __version__ def parse_args(): parser = argparse.ArgumentParser( desc...
4,707
0
69
6826e5ce17d70145196c9a67ee8185975a7eae94
960
py
Python
experiments/default.py
huxia001/autokeras
f4503bb3a3be014b452f54d8e2d187bb6419f627
[ "MIT" ]
1
2018-08-03T05:59:54.000Z
2018-08-03T05:59:54.000Z
experiments/default.py
HangJie720/autokeras
1619d8c398a955559fb6389797716c9a0989cb43
[ "MIT" ]
null
null
null
experiments/default.py
HangJie720/autokeras
1619d8c398a955559fb6389797716c9a0989cb43
[ "MIT" ]
null
null
null
from keras.datasets import cifar10 from autokeras.generator import DefaultClassifierGenerator from autokeras.net_transformer import default_transform from autokeras.preprocessor import OneHotEncoder from autokeras.utils import ModelTrainer if __name__ == '__main__': (x_train, y_train), (x_test, y_test) = cifar10...
30.967742
92
0.698958
from keras.datasets import cifar10 from autokeras.generator import DefaultClassifierGenerator from autokeras.net_transformer import default_transform from autokeras.preprocessor import OneHotEncoder from autokeras.utils import ModelTrainer if __name__ == '__main__': (x_train, y_train), (x_test, y_test) = cifar10...
0
0
0
880efcf1db08bcf2ab60ea3f9d8ced020d40a37c
877
py
Python
trelloConnector.py
featherbear/trello-epd
d38f6afa724bde7c95be1aae19584d7be360b40f
[ "Unlicense" ]
null
null
null
trelloConnector.py
featherbear/trello-epd
d38f6afa724bde7c95be1aae19584d7be360b40f
[ "Unlicense" ]
null
null
null
trelloConnector.py
featherbear/trello-epd
d38f6afa724bde7c95be1aae19584d7be360b40f
[ "Unlicense" ]
null
null
null
from dotenv import load_dotenv load_dotenv() import os os.chdir(os.path.dirname(os.path.realpath(__file__))) from trello import TrelloClient boardTitle = os.getenv("BOARD_NAME") listTitle = os.getenv("LIST_NAME")
28.290323
105
0.697834
from dotenv import load_dotenv load_dotenv() import os os.chdir(os.path.dirname(os.path.realpath(__file__))) from trello import TrelloClient def fetch(): # Create the client connection client = TrelloClient( api_key=os.getenv("TRELLO_API_KEY"), api_secret=os.getenv("TRELLO_API_TOKEN") ) ...
638
0
23
8fc2f633646983fe6f0306d09a05f261c61251ca
6,971
py
Python
device-app/modbus/lib/mqtt_handler.py
MEUIIOT/moxaiiot-uc2100-qbee-io
8815bc2a7ba901c99381777fadf0ad1528f10e24
[ "MIT" ]
null
null
null
device-app/modbus/lib/mqtt_handler.py
MEUIIOT/moxaiiot-uc2100-qbee-io
8815bc2a7ba901c99381777fadf0ad1528f10e24
[ "MIT" ]
null
null
null
device-app/modbus/lib/mqtt_handler.py
MEUIIOT/moxaiiot-uc2100-qbee-io
8815bc2a7ba901c99381777fadf0ad1528f10e24
[ "MIT" ]
null
null
null
#!/usr/bin/env python 3 """ MQTT client base class to Connect, Publish and Subscribe messages using Mosquitto broker """ __author__ = "Amjad B." __license__ = "MIT" __version__ = '1.0' __status__ = "beta" import time import json import ssl import sys import logging import paho.mqtt.client as mqtt_client logger...
35.566327
123
0.564625
#!/usr/bin/env python 3 """ MQTT client base class to Connect, Publish and Subscribe messages using Mosquitto broker """ __author__ = "Amjad B." __license__ = "MIT" __version__ = '1.0' __status__ = "beta" import time import json import ssl import sys import logging import paho.mqtt.client as mqtt_client logger...
1,475
5,122
23
4eebcda8040f067ea262562b4f6f0eeac6aa1a3d
1,100
py
Python
tests/test_verilog/test_inline_2d_array_interface.py
leonardt/magma
d3e8c9500ec3b167df8ed067e0c0305781c94ab6
[ "MIT" ]
167
2017-10-08T00:59:22.000Z
2022-02-08T00:14:39.000Z
tests/test_verilog/test_inline_2d_array_interface.py
leonardt/magma
d3e8c9500ec3b167df8ed067e0c0305781c94ab6
[ "MIT" ]
719
2017-08-29T17:58:28.000Z
2022-03-31T23:39:18.000Z
tests/test_verilog/test_inline_2d_array_interface.py
leonardt/magma
d3e8c9500ec3b167df8ed067e0c0305781c94ab6
[ "MIT" ]
14
2017-09-01T03:25:16.000Z
2021-11-05T13:30:24.000Z
import magma as m from magma.testing import check_files_equal import os
37.931034
78
0.591818
import magma as m from magma.testing import check_files_equal import os def test_inline_2d_array_interface(): class Main(m.Generator): @staticmethod def generate(width, depth): class MonitorWrapper(m.Circuit): io = m.IO(arr=m.In(m.Array[depth, m.Bits[width]])) ...
1,004
0
23
894ca23ad6e8483cfa68bb8240043fecadfa0eed
1,113
py
Python
main_vis.py
jakobj/python-tdl
375e97c18daa7f12896dd3f6b9dccd179f22aa03
[ "MIT" ]
null
null
null
main_vis.py
jakobj/python-tdl
375e97c18daa7f12896dd3f6b9dccd179f22aa03
[ "MIT" ]
null
null
null
main_vis.py
jakobj/python-tdl
375e97c18daa7f12896dd3f6b9dccd179f22aa03
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import matplotlib.pyplot as plt import numpy as np import time import universe seed = 91231 n_steps_pretraining = 3000 n_steps = 3500 steps_to_reward = 9 max_reward = n_steps / steps_to_reward # uni = universe.Universe('grid_world', world='world0') uni = universe.Universe('grid_world', wor...
21.403846
60
0.680144
# -*- coding: utf-8 -*- import matplotlib.pyplot as plt import numpy as np import time import universe seed = 91231 n_steps_pretraining = 3000 n_steps = 3500 steps_to_reward = 9 max_reward = n_steps / steps_to_reward # uni = universe.Universe('grid_world', world='world0') uni = universe.Universe('grid_world', wor...
0
0
0
9cf13e1857d58c4f934f37774465503aa988077f
172
py
Python
exercicio95AprimorandoOsDicionarios.py
adrianomdantas/Exercicios-Python
ef5025a186615258aec0cf35ed839fe49577d983
[ "MIT" ]
null
null
null
exercicio95AprimorandoOsDicionarios.py
adrianomdantas/Exercicios-Python
ef5025a186615258aec0cf35ed839fe49577d983
[ "MIT" ]
null
null
null
exercicio95AprimorandoOsDicionarios.py
adrianomdantas/Exercicios-Python
ef5025a186615258aec0cf35ed839fe49577d983
[ "MIT" ]
null
null
null
'''Aprimore o desafio 93 para que ele funcione com varios jogadores, incluindo um sistema de visualização de detalhes do aproveitamento de cada jogador'''
13.230769
59
0.726744
'''Aprimore o desafio 93 para que ele funcione com varios jogadores, incluindo um sistema de visualização de detalhes do aproveitamento de cada jogador'''
0
0
0
3ec62af1643a0b0d23b360ab2f233eeb0d2255bf
1,537
py
Python
bonus_jnpr_xml/ex7_pyez_rpc_show_version.py
melshman/pynetauto
3999d069e2043f3f15760a840e2faca5686fe331
[ "Apache-2.0" ]
1
2019-08-10T09:37:48.000Z
2019-08-10T09:37:48.000Z
bonus_jnpr_xml/ex7_pyez_rpc_show_version.py
melshman/pynetauto
3999d069e2043f3f15760a840e2faca5686fe331
[ "Apache-2.0" ]
null
null
null
bonus_jnpr_xml/ex7_pyez_rpc_show_version.py
melshman/pynetauto
3999d069e2043f3f15760a840e2faca5686fe331
[ "Apache-2.0" ]
1
2019-08-16T02:14:16.000Z
2019-08-16T02:14:16.000Z
#!/usr/bin/env python from getpass import getpass from pprint import pprint from lxml import etree # import xmltodict from jnpr.junos import Device # from jnpr.junos.op.ethport import EthPortTable # from jnpr.junos.op.arp import ArpTable # from jnpr.junos.op.routes import RouteTable # from jnpr.junos.op.phyport impo...
24.015625
77
0.733247
#!/usr/bin/env python from getpass import getpass from pprint import pprint from lxml import etree # import xmltodict from jnpr.junos import Device # from jnpr.junos.op.ethport import EthPortTable # from jnpr.junos.op.arp import ArpTable # from jnpr.junos.op.routes import RouteTable # from jnpr.junos.op.phyport impo...
733
0
23
1c85af350d572744489e4f68dda077cd616b6584
1,541
py
Python
simpl/resources/refund.py
gofynd/simpl-python
332268465db6b102163eba547c0ecffecb863787
[ "Apache-2.0" ]
1
2018-09-26T01:42:33.000Z
2018-09-26T01:42:33.000Z
simpl/resources/refund.py
gofynd/simpl-python
332268465db6b102163eba547c0ecffecb863787
[ "Apache-2.0" ]
1
2021-06-01T21:20:09.000Z
2021-06-01T21:20:09.000Z
simpl/resources/refund.py
gofynd/simpl-python
332268465db6b102163eba547c0ecffecb863787
[ "Apache-2.0" ]
null
null
null
import json from simpl.constants.urls import URL from simpl.resources.base import BaseResource
33.5
104
0.584036
import json from simpl.constants.urls import URL from simpl.resources.base import BaseResource class Refund(BaseResource): def __init__(self, *args, **kwargs): super(Refund, self).__init__(kwargs) self.URL = URL(is_prod=self.client._is_prod) def make_refund(self, payload): """ ...
113
1,309
23
9828b45924c30d21484d0de726dd951478e26894
1,157
py
Python
tests/queues_test.py
Cormen-Lib-Developers/Cormen-Lib
7877f1180cb76b56c909b70a35d85af8a83e530a
[ "MIT" ]
8
2022-01-24T00:34:59.000Z
2022-03-15T01:34:51.000Z
tests/queues_test.py
Cormen-Lib-Developers/Cormen-Lib
7877f1180cb76b56c909b70a35d85af8a83e530a
[ "MIT" ]
8
2022-02-09T22:07:35.000Z
2022-03-17T16:23:08.000Z
tests/queues_test.py
Cormen-Lib-Developers/Cormen-Lib
7877f1180cb76b56c909b70a35d85af8a83e530a
[ "MIT" ]
null
null
null
import unittest from dalpy.queues import Queue, QueueUnderflowError if __name__ == '__main__': unittest.main()
26.295455
67
0.581677
import unittest from dalpy.queues import Queue, QueueUnderflowError class QueueTest(unittest.TestCase): def test_init(self): q = Queue() self.assertTrue(q.is_empty()) self.assertEqual(q.size(), 0) def test_empty_ops(self): q = Queue() self.assertRaises(QueueUnderflowE...
867
14
157
9682e010fa7682d3b3ca7f707c2a991a31191803
2,673
py
Python
tests/apps/ad7091r.py
ktok07b6/polyphony
657c5c7440520db6b4985970bd50547407693ac4
[ "MIT" ]
83
2015-11-30T09:59:13.000Z
2021-08-03T09:12:28.000Z
tests/apps/ad7091r.py
jesseclin/polyphony
657c5c7440520db6b4985970bd50547407693ac4
[ "MIT" ]
4
2017-02-10T01:43:11.000Z
2020-07-14T03:52:25.000Z
tests/apps/ad7091r.py
jesseclin/polyphony
657c5c7440520db6b4985970bd50547407693ac4
[ "MIT" ]
11
2016-11-18T14:39:15.000Z
2021-02-23T10:05:20.000Z
import polyphony from polyphony.io import Port from polyphony.typing import bit, uint3, uint12, uint16 from polyphony.timing import clksleep, clkfence, wait_rising, wait_falling CONVST_PULSE_CYCLE = 10 CONVERSION_CYCLE = 40 @polyphony.module @polyphony.testbench @polyphony.rule(scheduling='parallel') spic = AD7...
29.054348
74
0.538721
import polyphony from polyphony.io import Port from polyphony.typing import bit, uint3, uint12, uint16 from polyphony.timing import clksleep, clkfence, wait_rising, wait_falling CONVST_PULSE_CYCLE = 10 CONVERSION_CYCLE = 40 @polyphony.module class AD7091R_SPIC: def __init__(self): self.sclk = Port(bit, ...
2,235
-2
97
933746883a1fab6e5fd5ea0d6f96b9b83dd083fb
625
py
Python
run.py
mmmaaaggg/RESTPlus_MINA_Server_Prophets
7ce08c5d7f9baa655313949231b99c01c5dc7987
[ "MIT" ]
1
2018-07-09T01:15:17.000Z
2018-07-09T01:15:17.000Z
run.py
mmmaaaggg/RESTPlus_MINA_Server_Prophets
7ce08c5d7f9baa655313949231b99c01c5dc7987
[ "MIT" ]
null
null
null
run.py
mmmaaaggg/RESTPlus_MINA_Server_Prophets
7ce08c5d7f9baa655313949231b99c01c5dc7987
[ "MIT" ]
3
2019-11-26T09:53:32.000Z
2020-09-03T06:46:57.000Z
#! /usr/bin/env python # -*- coding:utf-8 -*- """ @author : MG @Time : 2018/7/6 10:21 @File : run.py.py @contact : mmmaaaggg@163.com @desc : """ if __name__ == '__main__': import logging from app.config import config from app.app import app logger = logging.getLogger() if config.APP_ENAB...
26.041667
119
0.6496
#! /usr/bin/env python # -*- coding:utf-8 -*- """ @author : MG @Time : 2018/7/6 10:21 @File : run.py.py @contact : mmmaaaggg@163.com @desc : """ if __name__ == '__main__': import logging from app.config import config from app.app import app logger = logging.getLogger() if config.APP_ENAB...
0
0
0
536af7bd0f729f75543228eeef085d82e68902d5
612
py
Python
tests/test_slider.py
muyr/dayu_widgets3
a319cc719d84c031829893c45b8f20e87cbbabc8
[ "MIT" ]
5
2020-10-16T03:46:47.000Z
2022-03-21T07:10:37.000Z
tests/test_slider.py
muyr/dayu_widgets3
a319cc719d84c031829893c45b8f20e87cbbabc8
[ "MIT" ]
null
null
null
tests/test_slider.py
muyr/dayu_widgets3
a319cc719d84c031829893c45b8f20e87cbbabc8
[ "MIT" ]
1
2022-02-16T14:18:43.000Z
2022-02-16T14:18:43.000Z
"""Test MSlider class""" import pytest from dayu_widgets3.slider import MSlider from dayu_widgets3.qt import Qt @pytest.mark.parametrize('orient', (Qt.Horizontal, Qt.Vertical)) def test_slider_init(qtbot, orient): """Test MSlider init""" slider = MSlider(orientation=orient) slider.setValue(10) qtbot.a...
25.5
64
0.696078
"""Test MSlider class""" import pytest from dayu_widgets3.slider import MSlider from dayu_widgets3.qt import Qt @pytest.mark.parametrize('orient', (Qt.Horizontal, Qt.Vertical)) def test_slider_init(qtbot, orient): """Test MSlider init""" slider = MSlider(orientation=orient) slider.setValue(10) qtbot.a...
0
0
0
03c005aab99800df2ee6bde23902c69a1dea5c99
815
py
Python
src/6-learn_json_str_to_python_data_struct.py
padmaparam/kids-py-learn
0bc86c285d3398782ff529ff0a2105db77102245
[ "MIT" ]
null
null
null
src/6-learn_json_str_to_python_data_struct.py
padmaparam/kids-py-learn
0bc86c285d3398782ff529ff0a2105db77102245
[ "MIT" ]
null
null
null
src/6-learn_json_str_to_python_data_struct.py
padmaparam/kids-py-learn
0bc86c285d3398782ff529ff0a2105db77102245
[ "MIT" ]
1
2021-06-22T18:20:22.000Z
2021-06-22T18:20:22.000Z
''' Module is a file which contains various Python functions and global variables. It is simply just .py extension file which has python executable code. Package is a collection of modules. It must contain an init.py file as a flag so that the python interpreter processes it as such. The init.py could be an empty file...
27.166667
78
0.741104
''' Module is a file which contains various Python functions and global variables. It is simply just .py extension file which has python executable code. Package is a collection of modules. It must contain an init.py file as a flag so that the python interpreter processes it as such. The init.py could be an empty file...
0
0
0
7583cb43b6f879a85898c5390fd789fe8bf8f4b9
7,125
py
Python
src/newmain.py
Eliomar-Julian/SteamPromotion
d1f50cf4fc6d482e064685b6db6eae288d180be2
[ "MIT" ]
6
2020-10-04T19:20:05.000Z
2020-11-10T20:45:57.000Z
src/newmain.py
Eliomar-Julian/SteamPromotion
d1f50cf4fc6d482e064685b6db6eae288d180be2
[ "MIT" ]
1
2020-11-11T04:34:18.000Z
2020-11-11T04:34:18.000Z
src/newmain.py
Eliomar-Julian/SteamPromotion
d1f50cf4fc6d482e064685b6db6eae288d180be2
[ "MIT" ]
4
2020-10-04T18:03:31.000Z
2020-11-11T20:04:26.000Z
import requests from bs4 import BeautifulSoup import sqlite3 import re import threading from os import system from time import sleep from PySide2.QtWidgets import ( QMessageBox, QDialog, QMessageBox, QVBoxLayout, QLabel, QLineEdit ) from PySide2 import QtGui, QtCore ## DB ## SOCORRO!! lembra o tamnho dessas ...
33.450704
92
0.579228
import requests from bs4 import BeautifulSoup import sqlite3 import re import threading from os import system from time import sleep from PySide2.QtWidgets import ( QMessageBox, QDialog, QMessageBox, QVBoxLayout, QLabel, QLineEdit ) from PySide2 import QtGui, QtCore ## DB ## SOCORRO!! lembra o tamnho dessas ...
6,466
0
72
d7dc92887186543052208c79bd2cc9f71b6452d0
10,646
py
Python
tests/factories/factory.py
BoaVaga/boavaga_server
7d25a68832d3b9f4f5666d0a3d55c99025498511
[ "MIT" ]
null
null
null
tests/factories/factory.py
BoaVaga/boavaga_server
7d25a68832d3b9f4f5666d0a3d55c99025498511
[ "MIT" ]
null
null
null
tests/factories/factory.py
BoaVaga/boavaga_server
7d25a68832d3b9f4f5666d0a3d55c99025498511
[ "MIT" ]
null
null
null
from datetime import datetime, time from decimal import Decimal from random import randint, choice from uuid import uuid4 import factory import factory.fuzzy import faker.providers.phone_number.pt_BR import faker.providers.date_time from src.classes import ValorHoraInput from src.enums import EstadosEnum, UploadStatu...
34.904918
120
0.707778
from datetime import datetime, time from decimal import Decimal from random import randint, choice from uuid import uuid4 import factory import factory.fuzzy import faker.providers.phone_number.pt_BR import faker.providers.date_time from src.classes import ValorHoraInput from src.enums import EstadosEnum, UploadStatu...
2,661
6,363
581
dd33529f4ecdc0cc1ded21469ddb8afa6d88a7b8
795
py
Python
testing/rho_visualize.py
mdmohsinali/SGCT-Based-Fault-Tolerant-2D-SFI
bc35188e1f9ade450dce75cfe934e9862e13059b
[ "BSD-3-Clause" ]
null
null
null
testing/rho_visualize.py
mdmohsinali/SGCT-Based-Fault-Tolerant-2D-SFI
bc35188e1f9ade450dce75cfe934e9862e13059b
[ "BSD-3-Clause" ]
null
null
null
testing/rho_visualize.py
mdmohsinali/SGCT-Based-Fault-Tolerant-2D-SFI
bc35188e1f9ade450dce75cfe934e9862e13059b
[ "BSD-3-Clause" ]
null
null
null
import sys import solution_reader3 # load a solution reader object which parses the input spec sr = solution_reader3.SolutionReader('input_data') # should properly set in "solution_reader3.py" if 32-bit or 64-bit # load the density data at output step 20 rho = sr.loadVec('rho001.dat') # the shape of the data is (NX,...
37.857143
117
0.749686
import sys import solution_reader3 # load a solution reader object which parses the input spec sr = solution_reader3.SolutionReader('input_data') # should properly set in "solution_reader3.py" if 32-bit or 64-bit # load the density data at output step 20 rho = sr.loadVec('rho001.dat') # the shape of the data is (NX,...
0
0
0
59a536f8264ec53ac56a330375dec7b5ad15ed62
7,399
py
Python
core/data_import.py
YifanQie/Deep_Learning_for_Manufacturing
9ba19e41f69c561b04b8573ab9c52c0969f45bfd
[ "MIT" ]
27
2019-10-31T15:16:13.000Z
2022-03-29T03:56:57.000Z
core/data_import.py
YifanQie/Deep_Learning_for_Manufacturing
9ba19e41f69c561b04b8573ab9c52c0969f45bfd
[ "MIT" ]
4
2020-03-25T14:18:04.000Z
2022-02-10T00:34:58.000Z
core/data_import.py
YifanQie/Deep_Learning_for_Manufacturing
9ba19e41f69c561b04b8573ab9c52c0969f45bfd
[ "MIT" ]
7
2020-02-23T22:12:37.000Z
2021-12-08T20:14:41.000Z
""" Contains classes and methods to process the VRM data and convert it to the format as required by the 3D CNN model""" import pandas as pd import numpy as np from tqdm import tqdm #from numba import cuda class GetTrainData(): """GetTrainData Class (No initialization parameter) """ def data_import(self,file_nam...
31.892241
219
0.747263
""" Contains classes and methods to process the VRM data and convert it to the format as required by the 3D CNN model""" import pandas as pd import numpy as np from tqdm import tqdm #from numba import cuda class GetTrainData(): """GetTrainData Class (No initialization parameter) """ def data_import(self,file_nam...
1,971
0
48
da2fc8d3d795c85e1f6f6af22c1a20a44091e67b
175
py
Python
Informatik1/Finals Prep/HS20/6 solutions/1_warmup/07_recrusive_join/solution.py
Queentaker/uzh
35cccaf910b95d15db21be80c8567eb427202591
[ "MIT" ]
8
2021-11-21T10:02:08.000Z
2022-03-15T21:02:02.000Z
Informatik1/Finals Prep/HS20/6 solutions/1_warmup/07_recrusive_join/solution.py
Queentaker/uzh
35cccaf910b95d15db21be80c8567eb427202591
[ "MIT" ]
null
null
null
Informatik1/Finals Prep/HS20/6 solutions/1_warmup/07_recrusive_join/solution.py
Queentaker/uzh
35cccaf910b95d15db21be80c8567eb427202591
[ "MIT" ]
3
2021-11-19T18:52:56.000Z
2022-02-27T15:45:59.000Z
#!/usr/bin/env python3
21.875
64
0.645714
#!/usr/bin/env python3 def recursive_join(delim, values): if len(values) == 1: return values[0] return values[0] + delim + recursive_join(delim, values[1:])
128
0
23
d01a8008bbc378f8154e0b0c334cbfd65e7e704a
1,921
py
Python
LogAnomaly/data/hdfs/gen_train_data.py
Nono17/AIOPS-Anomaly-Detection
1bfc49ccf1c1c852a45a8e4606a9a73550184005
[ "Apache-2.0" ]
245
2020-03-27T08:29:17.000Z
2022-03-31T07:52:58.000Z
LogAnomaly/data/hdfs/gen_train_data.py
Nono17/AIOPS-Anomaly-Detection
1bfc49ccf1c1c852a45a8e4606a9a73550184005
[ "Apache-2.0" ]
32
2020-04-15T08:01:04.000Z
2022-02-28T18:40:45.000Z
LogAnomaly/data/hdfs/gen_train_data.py
Nono17/AIOPS-Anomaly-Detection
1bfc49ccf1c1c852a45a8e4606a9a73550184005
[ "Apache-2.0" ]
70
2020-04-12T04:51:53.000Z
2022-02-24T08:09:40.000Z
import os import random from random import shuffle import pandas as pd from pandas.core.frame import DataFrame hdfs_train = data_read('data/hdfs_train') hdfs_test_normal = data_read('data/hdfs_test_normal') hdfs_test_abnormal = data_read('data/hdfs_test_abnormal') hdfs_train.extend(hdfs_test_normal) ...
27.056338
73
0.687663
import os import random from random import shuffle import pandas as pd from pandas.core.frame import DataFrame def data_read(filepath): fp = open(filepath, "r") datas = [] # 存储处理后的数据 lines = fp.readlines() # 读取整个文件数据 i = 0 # 为一行数据 for line in lines: row = line.strip() ...
386
0
25
ae2ced1ca71d1a4d076511ee0ef80ad2a1b7dc41
1,048
py
Python
dataworkspace/dataworkspace/apps/applications/urls.py
uktrade/jupyterhub-data-auth-admin
91544f376209a201531f4dbfb8faad1b8ada18c9
[ "MIT" ]
1
2019-06-10T08:22:56.000Z
2019-06-10T08:22:56.000Z
dataworkspace/dataworkspace/apps/applications/urls.py
uktrade/jupyterhub-data-auth-admin
91544f376209a201531f4dbfb8faad1b8ada18c9
[ "MIT" ]
2
2019-05-17T13:10:42.000Z
2019-06-17T10:48:46.000Z
dataworkspace/dataworkspace/apps/applications/urls.py
uktrade/jupyterhub-data-auth-admin
91544f376209a201531f4dbfb8faad1b8ada18c9
[ "MIT" ]
null
null
null
from django.urls import path from dataworkspace.apps.accounts.utils import login_required from dataworkspace.apps.applications.views import ( application_spawning_html_view, application_running_html_view, tools_html_view, quicksight_start_polling_sync_and_redirect, UserToolSizeConfigurationView, ) ...
32.75
87
0.735687
from django.urls import path from dataworkspace.apps.accounts.utils import login_required from dataworkspace.apps.applications.views import ( application_spawning_html_view, application_running_html_view, tools_html_view, quicksight_start_polling_sync_and_redirect, UserToolSizeConfigurationView, ) ...
0
0
0
b5f886cc791c647788e469a8ff54bb5968e79bf6
1,011
py
Python
python/python-client-generated/test/test_user_api.py
littleflute/swagger-samples
821ddd34ed9c7cfd088aa1e83c47d1e086851a81
[ "Apache-2.0" ]
null
null
null
python/python-client-generated/test/test_user_api.py
littleflute/swagger-samples
821ddd34ed9c7cfd088aa1e83c47d1e086851a81
[ "Apache-2.0" ]
null
null
null
python/python-client-generated/test/test_user_api.py
littleflute/swagger-samples
821ddd34ed9c7cfd088aa1e83c47d1e086851a81
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ cccc-praying-api The API for CCCC Praying project # noqa: E501 OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import swagger_client from swagger_client.api.user_api im...
18.722222
68
0.631058
# coding: utf-8 """ cccc-praying-api The API for CCCC Praying project # noqa: E501 OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import swagger_client from swagger_client.api.user_api im...
49
0
54
de5e3f8d8d85e116720c99944793fb044f982a18
3,501
py
Python
lib/p5/sketch.py
croach/p5.py
edbaecd093a93d856221bc2ddad46a4165e2b277
[ "MIT" ]
2
2017-08-28T16:11:20.000Z
2017-12-26T21:43:56.000Z
lib/p5/sketch.py
croach/p5.py
edbaecd093a93d856221bc2ddad46a4165e2b277
[ "MIT" ]
null
null
null
lib/p5/sketch.py
croach/p5.py
edbaecd093a93d856221bc2ddad46a4165e2b277
[ "MIT" ]
null
null
null
from functools import wraps from multiprocessing import Process import webbrowser from .utils import processing_func_name def processing_function(func): """Decorator for turning Sketch methods into Processing functions. Marks the function it's decorating as a processing function by camel casing the name...
26.725191
78
0.620394
from functools import wraps from multiprocessing import Process import webbrowser from .utils import processing_func_name def processing_function(func): """Decorator for turning Sketch methods into Processing functions. Marks the function it's decorating as a processing function by camel casing the name...
1,214
1,164
49
b04e4aa54bdade7d154437062ba2149f23d26f82
980
py
Python
app.py
sem-onyalo/dnn-training-monitoring-flask
6a81e06a6871b0d6e890f9fd92f4ab79ac8ee639
[ "MIT" ]
null
null
null
app.py
sem-onyalo/dnn-training-monitoring-flask
6a81e06a6871b0d6e890f9fd92f4ab79ac8ee639
[ "MIT" ]
null
null
null
app.py
sem-onyalo/dnn-training-monitoring-flask
6a81e06a6871b0d6e890f9fd92f4ab79ac8ee639
[ "MIT" ]
null
null
null
import argparse from app import init_app from common.config import Config if __name__ == "__main__": args = get_runtime_args() config = Config(args) app = init_app(config) app.run(debug=config.debug, host=config.host, port=config.port)
46.666667
131
0.697959
import argparse from app import init_app from common.config import Config def get_runtime_args(): parser = argparse.ArgumentParser() parser.add_argument("-d", "--debug", type=bool, default=True, help="Is debug mode") parser.add_argument("-i", "--host_ip", type=str, default="0.0.0.0", help="The host IP") ...
703
0
23
ede88b48470bdfb48b0ca9b43dda0fa3d53f22f2
623
py
Python
src/my_project/easy_problems/from201to250/reverse_only_letters.py
ivan1016017/LeetCodeAlgorithmProblems
454284b76634cc34ed41f7fa30d857403cedf1bf
[ "MIT" ]
null
null
null
src/my_project/easy_problems/from201to250/reverse_only_letters.py
ivan1016017/LeetCodeAlgorithmProblems
454284b76634cc34ed41f7fa30d857403cedf1bf
[ "MIT" ]
1
2021-09-22T12:26:14.000Z
2021-09-22T12:26:14.000Z
src/my_project/easy_problems/from201to250/reverse_only_letters.py
ivan1016017/LeetCodeAlgorithmProblems
454284b76634cc34ed41f7fa30d857403cedf1bf
[ "MIT" ]
null
null
null
from typing import List solution = Solution() print(solution.reverseOnlyLetters(s = "ab-cd")) print(solution.reverseOnlyLetters(s = "a-bC-dEf-ghIj")) print(solution.reverseOnlyLetters(s = "Test1ng-Leet=code-Q!"))
20.766667
69
0.540931
from typing import List class Solution: def reverseOnlyLetters(self, s: str) -> str: n = len(s) temp = {i:s[i] for i in range(len(s)) if not s[i].isalpha()} s = [s[i] for i in range(len(s)) if s[i].isalpha()] s = list(reversed(s)) for i in range(0,n): ...
353
-6
49
60d2204142fce6c6e16cb461cb636097cafa160b
5,578
py
Python
tasks/worker_http.py
ankitdbst/staytuned-api
a045f47d3701cff0d0b4805ba5243697bda34f67
[ "CC0-1.0" ]
null
null
null
tasks/worker_http.py
ankitdbst/staytuned-api
a045f47d3701cff0d0b4805ba5243697bda34f67
[ "CC0-1.0" ]
null
null
null
tasks/worker_http.py
ankitdbst/staytuned-api
a045f47d3701cff0d0b4805ba5243697bda34f67
[ "CC0-1.0" ]
null
null
null
from gevent import monkey monkey.patch_all() import time import logging import copy_reg import types import grequests import requests from multiprocessing import JoinableQueue, Process SLEEP_INTERVAL = 5 # We need to pickle instance methods of the Worker Class below so this snippet does that # Refer: http://stack...
29.670213
111
0.619398
from gevent import monkey monkey.patch_all() import time import logging import copy_reg import types import grequests import requests from multiprocessing import JoinableQueue, Process SLEEP_INTERVAL = 5 # We need to pickle instance methods of the Worker Class below so this snippet does that # Refer: http://stack...
720
0
98
6934d314d8dca51e2791617e709df90235758f61
8,904
py
Python
pg_travel/deeprm/slow_down_cdf.py
Panlichen/pg_travel
41ec6666a945e34dc974f1206c0e620704e75a06
[ "MIT" ]
null
null
null
pg_travel/deeprm/slow_down_cdf.py
Panlichen/pg_travel
41ec6666a945e34dc974f1206c0e620704e75a06
[ "MIT" ]
null
null
null
pg_travel/deeprm/slow_down_cdf.py
Panlichen/pg_travel
41ec6666a945e34dc974f1206c0e620704e75a06
[ "MIT" ]
1
2019-05-05T15:18:30.000Z
2019-05-05T15:18:30.000Z
import torch import torch.optim as optim import argparse import numpy as np import time from tensorboardX import SummaryWriter from collections import deque import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import sys sys.path.append('../..') from pg_travel.deeprm import model fro...
36.342857
119
0.600292
import torch import torch.optim as optim import argparse import numpy as np import time from tensorboardX import SummaryWriter from collections import deque import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import sys sys.path.append('../..') from pg_travel.deeprm import model fro...
7,635
0
75
212ca646075e7c54abf11c259528a4a3b9538f2d
8,833
py
Python
score.py
paulo1er/PST-Toeic
6ffe02bc3cea54aab2db2c8f3cde5a153417cf51
[ "MIT" ]
null
null
null
score.py
paulo1er/PST-Toeic
6ffe02bc3cea54aab2db2c8f3cde5a153417cf51
[ "MIT" ]
1
2018-12-18T16:59:35.000Z
2018-12-18T17:03:25.000Z
score.py
paulo1er/PST-Toeic
6ffe02bc3cea54aab2db2c8f3cde5a153417cf51
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri Jan 18 18:07:30 2019 @author: Guillaume """ """ This file contains functions to calculate the score of the students and the statistics for the group """ # calculates the statistics for the class # given the correction, marks every answer of ONE s...
64.474453
1,015
0.422733
# -*- coding: utf-8 -*- """ Created on Fri Jan 18 18:07:30 2019 @author: Guillaume """ """ This file contains functions to calculate the score of the students and the statistics for the group """ def average(lst): return sum(lst) / len(lst) # calculates the statistics for the class def ...
3,858
0
95
a84efaa4d645aa5ac7f703e4461b86fd89508d51
1,002
py
Python
Day08/Ex03.py
king04aman/100daysofcode
7b037de72809a19b5ac1e813626903e14d19f848
[ "MIT" ]
null
null
null
Day08/Ex03.py
king04aman/100daysofcode
7b037de72809a19b5ac1e813626903e14d19f848
[ "MIT" ]
null
null
null
Day08/Ex03.py
king04aman/100daysofcode
7b037de72809a19b5ac1e813626903e14d19f848
[ "MIT" ]
null
null
null
alphabet = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] direction = input("Type 'encode' to encrypt, type 'decode' to decrypt : \n") text = input("Ty...
34.551724
221
0.536926
alphabet = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] def encode(text,shift): encoded_result = "" for x in text: temp = (alphabet...
382
0
50
b8cd8942b4bcbae247d1bc13e1a51fe7df63b06a
2,444
py
Python
mi/35.py
1005281342/learn
c9d1e2e256842d9b4846c4870ac72e83d172b20e
[ "Apache-2.0" ]
1
2018-11-29T01:01:32.000Z
2018-11-29T01:01:32.000Z
mi/35.py
1005281342/learn
c9d1e2e256842d9b4846c4870ac72e83d172b20e
[ "Apache-2.0" ]
null
null
null
mi/35.py
1005281342/learn
c9d1e2e256842d9b4846c4870ac72e83d172b20e
[ "Apache-2.0" ]
null
null
null
""" 将 M 个同样的糖果放在 N 个同样的篮子里,允许有的篮子空着不放,共有多少种不同的分法? 比如,把 7 个糖果放在 3 个篮子里,共有 8 种分法(每个数表示篮子中放的糖果数,数的个数为篮子数): 1 1 5 1 2 4 1 3 3 2 2 3 2 5 0 3 4 0 6 1 0 7 0 0 注意:相同的分布,顺序不同也只算作一种分法,如 7 0 0、0 7 0 和 0 0 7 只算作一种。 输入包含二个正整数 M 和 N,以(,)分开,M 表示有几个同样的糖果,N 表...
20.032787
71
0.407938
""" 将 M 个同样的糖果放在 N 个同样的篮子里,允许有的篮子空着不放,共有多少种不同的分法? 比如,把 7 个糖果放在 3 个篮子里,共有 8 种分法(每个数表示篮子中放的糖果数,数的个数为篮子数): 1 1 5 1 2 4 1 3 3 2 2 3 2 5 0 3 4 0 6 1 0 7 0 0 注意:相同的分布,顺序不同也只算作一种分法,如 7 0 0、0 7 0 和 0 0 7 只算作一种。 输入包含二个正整数 M 和 N,以(,)分开,M 表示有几个同样的糖果,N 表...
1,939
0
23
13a4b326a2db70513784918e5aed6686d41bfb04
4,547
py
Python
MPI/MPI_Example/mpitest.py
petebunting/rsgis_scripts
b35b0403cdfad6c63824d4f8c038f190cdb5978d
[ "MIT" ]
4
2020-09-16T10:45:15.000Z
2021-05-06T04:34:32.000Z
MPI/MPI_Example/mpitest.py
petebunting/rsgis_scripts
b35b0403cdfad6c63824d4f8c038f190cdb5978d
[ "MIT" ]
null
null
null
MPI/MPI_Example/mpitest.py
petebunting/rsgis_scripts
b35b0403cdfad6c63824d4f8c038f190cdb5978d
[ "MIT" ]
2
2020-07-06T18:03:40.000Z
2022-02-15T12:45:34.000Z
from mpi4py import MPI import argparse import numpy from arcsilib.arcsiutils import ARCSIEnum import sys # Define MPI message tags mpiTags = ARCSIEnum('READY', 'DONE', 'EXIT', 'START') arcsiStages = ARCSIEnum('ARCSIPART1', 'ARCSIPART2', 'ARCSIPART3', 'ARCSIPART4') # Initializations and preliminaries mpiComm = MPI.CO...
36.669355
151
0.585441
from mpi4py import MPI import argparse import numpy from arcsilib.arcsiutils import ARCSIEnum import sys # Define MPI message tags mpiTags = ARCSIEnum('READY', 'DONE', 'EXIT', 'START') arcsiStages = ARCSIEnum('ARCSIPART1', 'ARCSIPART2', 'ARCSIPART3', 'ARCSIPART4') # Initializations and preliminaries mpiComm = MPI.CO...
0
0
0
b33aaa6e9383980fec609a57b1c1e52161cdc5dd
3,129
py
Python
commands/util.py
tschoonj/jep
639f6cbe512b5ce4b51412564dba8db5bbbf1e3b
[ "Zlib" ]
698
2017-08-08T22:33:29.000Z
2022-03-31T20:28:24.000Z
commands/util.py
tschoonj/jep
639f6cbe512b5ce4b51412564dba8db5bbbf1e3b
[ "Zlib" ]
305
2017-08-14T19:10:57.000Z
2022-03-31T17:27:27.000Z
commands/util.py
tschoonj/jep
639f6cbe512b5ce4b51412564dba8db5bbbf1e3b
[ "Zlib" ]
117
2017-08-13T01:05:51.000Z
2022-03-11T09:11:00.000Z
from __future__ import print_function from collections import namedtuple from distutils.util import get_platform import subprocess import sys class CommandFailed(Exception): """ The command failed to run for any reason """ pass class CommandError(CommandFailed): """ The command returned...
29.242991
80
0.674017
from __future__ import print_function from collections import namedtuple from distutils.util import get_platform import subprocess import sys def configure_error(*args, **kw): print('Error: ', file=sys.stderr) print(file=sys.stderr, *args, **kw) sys.exit(1) def warning(*args): print(*args, file=sys....
322
68
165
2a6338b0b459ddac91b0f9a3e638e71a4b6f56de
481
py
Python
solutions/ccc/basketBallScore.py
mrparkonline/py_conditionals
d9420ec8c9a69689d8a87b4232db288d620b22bb
[ "MIT" ]
null
null
null
solutions/ccc/basketBallScore.py
mrparkonline/py_conditionals
d9420ec8c9a69689d8a87b4232db288d620b22bb
[ "MIT" ]
null
null
null
solutions/ccc/basketBallScore.py
mrparkonline/py_conditionals
d9420ec8c9a69689d8a87b4232db288d620b22bb
[ "MIT" ]
null
null
null
# Basketball Scores # apple vs banana # input - apples apple_three = int(input()) apple_two = int(input()) apple_free = int(input()) # input - bananas banana_three = int(input()) banana_two = int(input()) banana_free = int(input()) apple_total = (apple_three * 3) + (apple_two * 2) + apple_free banana_total = (banana...
21.863636
66
0.679834
# Basketball Scores # apple vs banana # input - apples apple_three = int(input()) apple_two = int(input()) apple_free = int(input()) # input - bananas banana_three = int(input()) banana_two = int(input()) banana_free = int(input()) apple_total = (apple_three * 3) + (apple_two * 2) + apple_free banana_total = (banana...
0
0
0
8762720c6151d6e947b6598ffe68be92042f4521
23,397
py
Python
checkers_py/oneapi_gpu_checker.py
intel/diagnostics-utility
380166619294e4292621855f7cfd4cc8e39c6123
[ "BSD-3-Clause" ]
5
2021-12-13T07:35:43.000Z
2022-01-14T15:36:26.000Z
checkers_py/oneapi_gpu_checker.py
intel/diagnostics-utility
380166619294e4292621855f7cfd4cc8e39c6123
[ "BSD-3-Clause" ]
null
null
null
checkers_py/oneapi_gpu_checker.py
intel/diagnostics-utility
380166619294e4292621855f7cfd4cc8e39c6123
[ "BSD-3-Clause" ]
null
null
null
# /******************************************************************************* # Copyright Intel Corporation. # This software and the related documents are Intel copyrighted materials, and your use of them # is governed by the express license under which they were provided to you (License). # Unless the License pro...
43.979323
110
0.636022
# /******************************************************************************* # Copyright Intel Corporation. # This software and the related documents are Intel copyrighted materials, and your use of them # is governed by the express license under which they were provided to you (License). # Unless the License pro...
21,494
0
437
c3b7932dfb1ec30577f8044317eefc283dfe1d3c
10,884
py
Python
tests/stepwise_function.py
mahitha-raj/stepwise-model-selection
c8efe8ef6ee2e2fda74c6087e4a216a4e29207ba
[ "MIT" ]
1
2021-11-23T21:01:10.000Z
2021-11-23T21:01:10.000Z
tests/stepwise_function.py
mahitha-raj/stepwise-model-selection
c8efe8ef6ee2e2fda74c6087e4a216a4e29207ba
[ "MIT" ]
null
null
null
tests/stepwise_function.py
mahitha-raj/stepwise-model-selection
c8efe8ef6ee2e2fda74c6087e4a216a4e29207ba
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys import warnings import pandas as pd import statsmodels.api as sm from copy import deepcopy # Used to create sentiment word dictionary warnings.simplefilter(action="ignore", category=FutureWarning) # ************************************************************************** ...
36.401338
87
0.450662
#!/usr/bin/env python3 import sys import warnings import pandas as pd import statsmodels.api as sm from copy import deepcopy # Used to create sentiment word dictionary warnings.simplefilter(action="ignore", category=FutureWarning) class StepWise(object): def __init__( self, df, yname,...
10,082
2
156
5e6f6c2d1178fce99b71b834e46ec4dfe9a76541
191
py
Python
reeds/data/ene_ana_libs/__init__.py
candidechamp/reeds
601e4327132f80d7e7fd90d47eecc85cecc0fdd8
[ "MIT" ]
3
2021-06-18T03:27:17.000Z
2021-11-15T13:55:51.000Z
reeds/data/ene_ana_libs/__init__.py
candidechamp/reeds
601e4327132f80d7e7fd90d47eecc85cecc0fdd8
[ "MIT" ]
11
2021-06-25T08:53:37.000Z
2021-10-19T10:17:58.000Z
reeds/data/ene_ana_libs/__init__.py
candidechamp/reeds
601e4327132f80d7e7fd90d47eecc85cecc0fdd8
[ "MIT" ]
1
2021-09-16T12:18:17.000Z
2021-09-16T12:18:17.000Z
import os template_dir = os.path.dirname(__file__) ene_ana_old_path = template_dir + "/ene_ana_REEDS_7state.md++.lib" ene_ana_lib_path = template_dir + "/new_ene_ana_REEDS_9state.md++.lib"
27.285714
70
0.790576
import os template_dir = os.path.dirname(__file__) ene_ana_old_path = template_dir + "/ene_ana_REEDS_7state.md++.lib" ene_ana_lib_path = template_dir + "/new_ene_ana_REEDS_9state.md++.lib"
0
0
0
aea3ff03c14780a7040e8f7c29142b515f931c0f
687
py
Python
mesostat/metric/impl/basis_projector.py
HelmchenLabSoftware/mesostat-dev
8baa7120b892fe0df893cdcf0f20f49876643d75
[ "MIT" ]
null
null
null
mesostat/metric/impl/basis_projector.py
HelmchenLabSoftware/mesostat-dev
8baa7120b892fe0df893cdcf0f20f49876643d75
[ "MIT" ]
null
null
null
mesostat/metric/impl/basis_projector.py
HelmchenLabSoftware/mesostat-dev
8baa7120b892fe0df893cdcf0f20f49876643d75
[ "MIT" ]
null
null
null
import numpy as np from scipy.special import legendre
34.35
83
0.640466
import numpy as np from scipy.special import legendre class BasisProjector: def __init__(self, nStep, order=5): self.poly = [legendre(iOrd) for iOrd in range(order+1)] # Sample in midpoints in order to reduce finite sample error x = np.linspace(-1, 1, nStep, endpoint=False) + 1 / nStep ...
530
0
103
4621fe85aaa1522d841667721a7829e1524b1024
519
py
Python
chap6/demoDic.py
xhal/study-python
bd92c1a73090cbf7cfbcb252ee4f69c9a4acc7ef
[ "MIT" ]
null
null
null
chap6/demoDic.py
xhal/study-python
bd92c1a73090cbf7cfbcb252ee4f69c9a4acc7ef
[ "MIT" ]
null
null
null
chap6/demoDic.py
xhal/study-python
bd92c1a73090cbf7cfbcb252ee4f69c9a4acc7ef
[ "MIT" ]
null
null
null
# coding:utf-8 # 版权信息: All rights Reserved, Designed By XHal.cc # 代码作者: Hal # 创建时间: 2021/2/4 22:08 # 文件版本: V1.0.0 # 功能描述: 字典对象 - 基础使用 # 创建方式1:{} 花括号,与javascript Object 一样 # 空字典 dic = {} print(dic) # 键: 值 dic = {'a': 'aa', 'b': 3} print(dic, id(dic), type(dic)) # 创建方式2: 内置函数 dic1 = dict({'a': 'aa', 'b': 3}) print(dic...
17.896552
48
0.612717
# coding:utf-8 # 版权信息: All rights Reserved, Designed By XHal.cc # 代码作者: Hal # 创建时间: 2021/2/4 22:08 # 文件版本: V1.0.0 # 功能描述: 字典对象 - 基础使用 # 创建方式1:{} 花括号,与javascript Object 一样 # 空字典 dic = {} print(dic) # 键: 值 dic = {'a': 'aa', 'b': 3} print(dic, id(dic), type(dic)) # 创建方式2: 内置函数 dic1 = dict({'a': 'aa', 'b': 3}) print(dic...
0
0
0
6a72a3c16ecb5aec4dc943ee5c71870282a029fd
1,074
py
Python
handwritten digits/ann mnist v1.py
1-ARIjitS/ANN-models
a19740ded74850065816719415c18c1812adda13
[ "MIT" ]
1
2020-09-30T13:20:04.000Z
2020-09-30T13:20:04.000Z
handwritten digits/ann mnist v1.py
1-ARIjitS/ANN-models
a19740ded74850065816719415c18c1812adda13
[ "MIT" ]
1
2020-09-30T13:14:02.000Z
2020-09-30T17:58:23.000Z
handwritten digits/ann mnist v1.py
1-ARIjitS/ANN-models
a19740ded74850065816719415c18c1812adda13
[ "MIT" ]
1
2020-09-30T20:24:09.000Z
2020-09-30T20:24:09.000Z
# -*- coding: utf-8 -*- """ANN MNIST .ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1iKLukhHa0mOTG2BBrKnlJawBK1ZYaEC0 """ import keras from keras.datasets import mnist (x_train,y_train),(x_test,y_test)=mnist.load_data() x_train=x_train.reshap...
23.866667
77
0.773743
# -*- coding: utf-8 -*- """ANN MNIST .ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1iKLukhHa0mOTG2BBrKnlJawBK1ZYaEC0 """ import keras from keras.datasets import mnist (x_train,y_train),(x_test,y_test)=mnist.load_data() x_train=x_train.reshap...
0
0
0
9a62f079ef3bd0b0f786e14aae65d918cd16b46e
2,475
py
Python
runner1c/commands/dump_epf.py
vakulenkoalex/runner-1c
25b29f794085fb638808778dd0792fb98787543d
[ "BSD-2-Clause" ]
null
null
null
runner1c/commands/dump_epf.py
vakulenkoalex/runner-1c
25b29f794085fb638808778dd0792fb98787543d
[ "BSD-2-Clause" ]
6
2018-01-10T11:43:27.000Z
2018-01-12T12:26:25.000Z
runner1c/commands/dump_epf.py
vakulenkoalex/runner-1c
25b29f794085fb638808778dd0792fb98787543d
[ "BSD-2-Clause" ]
null
null
null
import distutils.dir_util as copy_tree import glob import os import shutil import tempfile import runner1c import runner1c.common as common import runner1c.exit_code as exit_code
34.859155
112
0.645657
import distutils.dir_util as copy_tree import glob import os import shutil import tempfile import runner1c import runner1c.common as common import runner1c.exit_code as exit_code class DumpEpfParser(runner1c.parser.Parser): @property def name(self): return 'dump_epf' @property def descriptio...
2,130
177
122
8fda8032e0b5243accc1e7f26502733451ec09bc
1,575
py
Python
stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/config.py
stac-utils/stac-fastapi-nosql
0f4cf9a91f9bfd78f215895b6b848efbb631db97
[ "MIT" ]
6
2022-01-26T14:34:52.000Z
2022-02-22T00:09:23.000Z
stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/config.py
stac-utils/stac-fastapi-elasticsearch
0f4cf9a91f9bfd78f215895b6b848efbb631db97
[ "MIT" ]
46
2022-02-22T21:22:17.000Z
2022-03-25T15:20:39.000Z
stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/config.py
stac-utils/stac-fastapi-nosql
0f4cf9a91f9bfd78f215895b6b848efbb631db97
[ "MIT" ]
null
null
null
"""API configuration.""" import os from typing import Any, Dict, Set from elasticsearch import AsyncElasticsearch, Elasticsearch # type: ignore from stac_fastapi.types.config import ApiSettings _forbidden_fields: Set[str] = {"type"} class ElasticsearchSettings(ApiSettings): """API settings.""" # Fields ...
27.631579
87
0.644444
"""API configuration.""" import os from typing import Any, Dict, Set from elasticsearch import AsyncElasticsearch, Elasticsearch # type: ignore from stac_fastapi.types.config import ApiSettings def _es_config() -> Dict[str, Any]: config = { "hosts": [{"host": os.getenv("ES_HOST"), "port": os.getenv("ES_...
649
0
23
ba4090d414a8f30a170809c7ff604ae18954f90a
118
py
Python
platform/hwconf_data/efr32fg13p/PythonSnippet/__init__.py
lenloe1/v2.7
9ac9c4a7bb37987af382c80647f42d84db5f2e1d
[ "Zlib" ]
null
null
null
platform/hwconf_data/efr32fg13p/PythonSnippet/__init__.py
lenloe1/v2.7
9ac9c4a7bb37987af382c80647f42d84db5f2e1d
[ "Zlib" ]
1
2020-08-25T02:36:22.000Z
2020-08-25T02:36:22.000Z
platform/hwconf_data/efr32fg13p/PythonSnippet/__init__.py
lenloe1/v2.7
9ac9c4a7bb37987af382c80647f42d84db5f2e1d
[ "Zlib" ]
1
2020-08-25T01:56:04.000Z
2020-08-25T01:56:04.000Z
from efr32fg13p.halconfig import halconfig_types as types from efr32fg13p.halconfig import halconfig_dependency as dep
59
60
0.889831
from efr32fg13p.halconfig import halconfig_types as types from efr32fg13p.halconfig import halconfig_dependency as dep
0
0
0
45e35317858d5b5d13a4638d475764426c05c951
18,563
py
Python
muffnn/fm/fm_classifier.py
civisanalytics/muffnn
0ec92ddb5a0158a3e46e68974ff958101e3b874d
[ "BSD-3-Clause" ]
53
2016-08-26T18:28:03.000Z
2021-09-26T08:44:58.000Z
muffnn/fm/fm_classifier.py
civisanalytics/muffnn
0ec92ddb5a0158a3e46e68974ff958101e3b874d
[ "BSD-3-Clause" ]
80
2016-08-29T19:08:41.000Z
2020-12-01T16:14:11.000Z
muffnn/fm/fm_classifier.py
civisanalytics/muffnn
0ec92ddb5a0158a3e46e68974ff958101e3b874d
[ "BSD-3-Clause" ]
25
2016-08-29T18:48:43.000Z
2021-09-26T08:45:18.000Z
import logging import re import scipy.sparse as sp import numpy as np import tensorflow as tf from sklearn.base import ClassifierMixin, BaseEstimator from sklearn.utils import check_X_y, check_array, check_random_state from sklearn.utils.multiclass import type_of_target from sklearn.exceptions import NotFittedError f...
38.353306
78
0.571459
import logging import re import scipy.sparse as sp import numpy as np import tensorflow as tf from sklearn.base import ClassifierMixin, BaseEstimator from sklearn.utils import check_X_y, check_array, check_random_state from sklearn.utils.multiclass import type_of_target from sklearn.exceptions import NotFittedError f...
2,771
0
111
1460e5137f64580ee6f5f36e484cb6b238c6e122
437
py
Python
monitorrent/plugins/clients/__init__.py
DmitryRibalka/monitorrent
f329d4bca151360d29e93d5369a1d21268d8998f
[ "WTFPL" ]
465
2015-08-31T09:16:41.000Z
2022-03-12T10:33:04.000Z
monitorrent/plugins/clients/__init__.py
DmitryRibalka/monitorrent
f329d4bca151360d29e93d5369a1d21268d8998f
[ "WTFPL" ]
340
2015-07-18T17:31:54.000Z
2022-03-30T15:16:25.000Z
monitorrent/plugins/clients/__init__.py
DmitryRibalka/monitorrent
f329d4bca151360d29e93d5369a1d21268d8998f
[ "WTFPL" ]
87
2015-07-18T10:52:24.000Z
2022-03-27T09:52:35.000Z
from monitorrent.plugins.trackers import Topic
21.85
48
0.615561
from monitorrent.plugins.trackers import Topic class TopicSettings(object): download_dir = None def __init__(self, download_dir): """ :type download_dir: str | None """ super(TopicSettings, self).__init__() self.download_dir = download_dir @staticmethod def fr...
0
366
23
11ae9044c094f2339fd9b184ab021204945c12f9
2,069
bzl
Python
bazel/go_dependencies.bzl
loafoe/fhir
513af7448762fc277ae0a8d7b12d18fc073b41d1
[ "Apache-2.0" ]
null
null
null
bazel/go_dependencies.bzl
loafoe/fhir
513af7448762fc277ae0a8d7b12d18fc073b41d1
[ "Apache-2.0" ]
2
2020-07-24T14:20:45.000Z
2020-07-24T19:43:52.000Z
bazel/go_dependencies.bzl
loafoe/fhir
513af7448762fc277ae0a8d7b12d18fc073b41d1
[ "Apache-2.0" ]
1
2020-07-10T15:03:45.000Z
2020-07-10T15:03:45.000Z
""" Function for loading go dependencies for the go jsonformat library""" load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository") def fhir_go_dependencies(): """ Loads dependencies of the Go FHIR library"...
29.140845
90
0.649589
""" Function for loading go dependencies for the go jsonformat library""" load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository") def fhir_go_dependencies(): """ Loads dependencies of the Go FHIR library"...
0
0
0
574b9139caf0bbf3e8c634061691e659462237b4
3,677
py
Python
site/_build/jupyter_execute/notebooks/02-intro-python/03-null-values.py
rpi-techfundamentals/website_fall_2020
b85e5c297954bcaae565a8d25a18d2904d40f543
[ "MIT" ]
2
2020-10-18T23:05:09.000Z
2021-11-14T08:09:11.000Z
site/_build/jupyter_execute/notebooks/02-intro-python/03-null-values.py
rpi-techfundamentals/website_fall_2020
b85e5c297954bcaae565a8d25a18d2904d40f543
[ "MIT" ]
2
2020-12-31T14:33:02.000Z
2020-12-31T14:38:26.000Z
site/_build/jupyter_execute/notebooks/02-intro-python/03-null-values.py
rpi-techfundamentals/website_fall_2020
b85e5c297954bcaae565a8d25a18d2904d40f543
[ "MIT" ]
3
2020-08-31T21:58:58.000Z
2020-09-30T02:55:08.000Z
[![AnalyticsDojo](https://github.com/rpi-techfundamentals/spring2019-materials/blob/master/fig/final-logo.png?raw=1)](http://introml.analyticsdojo.com) <center><h1>Introduction to Python - Null Values</h1></center> <center><h3><a href = 'http://introml.analyticsdojo.com'>introml.analyticsdojo.com</a></h3></center> ...
34.364486
211
0.762578
[![AnalyticsDojo](https://github.com/rpi-techfundamentals/spring2019-materials/blob/master/fig/final-logo.png?raw=1)](http://introml.analyticsdojo.com) <center><h1>Introduction to Python - Null Values</h1></center> <center><h3><a href = 'http://introml.analyticsdojo.com'>introml.analyticsdojo.com</a></h3></center> ...
0
0
0
4e2166907faac465db45c397535b178085b66df3
1,152
py
Python
meiduo_mall/celery_tasks/html/tasks.py
Noah-Smith-wgp/meiduo_project
f1350a50dabd33d90c2c5b3509d590603aeda6e4
[ "MIT" ]
null
null
null
meiduo_mall/celery_tasks/html/tasks.py
Noah-Smith-wgp/meiduo_project
f1350a50dabd33d90c2c5b3509d590603aeda6e4
[ "MIT" ]
null
null
null
meiduo_mall/celery_tasks/html/tasks.py
Noah-Smith-wgp/meiduo_project
f1350a50dabd33d90c2c5b3509d590603aeda6e4
[ "MIT" ]
null
null
null
from django.template import loader from django.conf import settings import os from goods.models import SKU from contents.utils import get_categories from goods.utils import get_goods_specs, get_breadcrumb from celery_tasks.main import celery_app @celery_app.task(name='generate_static_sku_detail_html') def generate_s...
25.043478
93
0.690972
from django.template import loader from django.conf import settings import os from goods.models import SKU from contents.utils import get_categories from goods.utils import get_goods_specs, get_breadcrumb from celery_tasks.main import celery_app @celery_app.task(name='generate_static_sku_detail_html') def generate_s...
0
0
0
53eff4dbaed670e34c30a585fe6580f2312ac4a5
7,196
py
Python
py_kit/misc.py
SystemLight/py-kit
54d68fe66225341ef5f5e9b3c5b9e4a12d98cc1b
[ "MIT" ]
null
null
null
py_kit/misc.py
SystemLight/py-kit
54d68fe66225341ef5f5e9b3c5b9e4a12d98cc1b
[ "MIT" ]
null
null
null
py_kit/misc.py
SystemLight/py-kit
54d68fe66225341ef5f5e9b3c5b9e4a12d98cc1b
[ "MIT" ]
null
null
null
import copy import json import threading from collections import defaultdict from typing import List, Dict, Union, Optional, Callable, TypeVar, Iterable, Tuple def find_key(obj: Union[Dict, List], key: str): """ 根据字符串查找对象值,字符串形式如a.b.0, 查找对象,如:: {'a':{'b':['val']}} val值将被查出 :param obj:...
23.986667
96
0.575181
import copy import json import threading from collections import defaultdict from typing import List, Dict, Union, Optional, Callable, TypeVar, Iterable, Tuple def omit(obj, fields): new_obj = copy.copy(obj) for key in fields: try: del new_obj[key] except KeyError: cont...
2,598
-2
339
09fde9e7e525a3d0af056afd2a46aa0cfbb4119d
18,500
py
Python
wavelength/wavelength.py
simontorres/experimentos
2bf5012dc9869f1e74eedae933a4ec46f47c1173
[ "BSD-3-Clause" ]
null
null
null
wavelength/wavelength.py
simontorres/experimentos
2bf5012dc9869f1e74eedae933a4ec46f47c1173
[ "BSD-3-Clause" ]
null
null
null
wavelength/wavelength.py
simontorres/experimentos
2bf5012dc9869f1e74eedae933a4ec46f47c1173
[ "BSD-3-Clause" ]
null
null
null
from astropy import units as u from astropy.modeling import models, fitting from astropy.stats import sigma_clip from ccdproc import CCDData from scipy import signal import matplotlib.pyplot as plt import numpy as np import os import pandas as pd import re import sys sys.path.append('/user/simon/development/soar/goo...
38.381743
129
0.581838
from astropy import units as u from astropy.modeling import models, fitting from astropy.stats import sigma_clip from ccdproc import CCDData from scipy import signal import matplotlib.pyplot as plt import numpy as np import os import pandas as pd import re import sys sys.path.append('/user/simon/development/soar/goo...
16,867
1,039
23
36dfd15d3a55a85b8242be98fd3b7ff63f02cbf8
1,632
py
Python
gpytorch/mlls/exact_marginal_log_likelihood.py
yushangdi/gpytorch
3234046ecb672965af8765d47eb016f85b729bb0
[ "MIT" ]
2
2019-04-19T00:35:49.000Z
2019-04-19T02:51:49.000Z
gpytorch/mlls/exact_marginal_log_likelihood.py
yushangdi/gpytorch
3234046ecb672965af8765d47eb016f85b729bb0
[ "MIT" ]
null
null
null
gpytorch/mlls/exact_marginal_log_likelihood.py
yushangdi/gpytorch
3234046ecb672965af8765d47eb016f85b729bb0
[ "MIT" ]
1
2019-04-19T00:42:35.000Z
2019-04-19T00:42:35.000Z
#!/usr/bin/env python3 import torch from .marginal_log_likelihood import MarginalLogLikelihood from ..likelihoods import _GaussianLikelihoodBase from ..distributions import MultivariateNormal
37.090909
106
0.683211
#!/usr/bin/env python3 import torch from .marginal_log_likelihood import MarginalLogLikelihood from ..likelihoods import _GaussianLikelihoodBase from ..distributions import MultivariateNormal class ExactMarginalLogLikelihood(MarginalLogLikelihood): def __init__(self, likelihood, model): """ A spe...
885
530
23
7febfe90bd6ff0ef95c6902fc959302c1c33f1ca
1,962
py
Python
blossom/tree.py
refraction-ray/blossom_alg
d1fc1cb724091a32e2a34ab02fac1d4c6f94d0b1
[ "MIT" ]
null
null
null
blossom/tree.py
refraction-ray/blossom_alg
d1fc1cb724091a32e2a34ab02fac1d4c6f94d0b1
[ "MIT" ]
null
null
null
blossom/tree.py
refraction-ray/blossom_alg
d1fc1cb724091a32e2a34ab02fac1d4c6f94d0b1
[ "MIT" ]
2
2019-11-16T01:40:12.000Z
2020-07-15T18:10:31.000Z
import logging logger = logging.getLogger('blossom')
28.434783
66
0.536697
import logging logger = logging.getLogger('blossom') class Tree(): def __init__(self, name='root', children=None): self.name = name self.parent = None self.children = [] if children is not None: for child in children: self.add_child(child) def __repr_...
1,606
-8
312
cf1b002f5d22d171900b16631b2d1b595dd4e080
8,389
py
Python
pyccel/stdlib/internal/openmp.py
pyccel/pyccel
68afff1c19535f19fea0ad714ad68ffe5cc4e3c9
[ "MIT" ]
206
2018-06-28T00:28:47.000Z
2022-03-29T05:17:03.000Z
pyccel/stdlib/internal/openmp.py
pyccel/pyccel
68afff1c19535f19fea0ad714ad68ffe5cc4e3c9
[ "MIT" ]
670
2018-07-23T11:02:24.000Z
2022-03-30T07:28:05.000Z
pyccel/stdlib/internal/openmp.py
pyccel/pyccel
68afff1c19535f19fea0ad714ad68ffe5cc4e3c9
[ "MIT" ]
19
2019-09-19T06:01:00.000Z
2022-03-29T05:17:06.000Z
# -*- coding: utf-8 -*- #------------------------------------------------------------------------------------------# # This file is part of Pyccel which is released under MIT License. See the LICENSE file or # # go to https://github.com/pyccel/pyccel/blob/master/LICENSE for full license details. # #----------------...
26.052795
92
0.669567
# -*- coding: utf-8 -*- #------------------------------------------------------------------------------------------# # This file is part of Pyccel which is released under MIT License. See the LICENSE file or # # go to https://github.com/pyccel/pyccel/blob/master/LICENSE for full license details. # #----------------...
0
0
0
740cc5945878a86cceca25446be7fdce8918f520
124
py
Python
descriptors/__init__.py
xuzhiyi1998/fluentpython
218311afb6b41d2668a1baa94dcee0ba7f4764a4
[ "MIT" ]
null
null
null
descriptors/__init__.py
xuzhiyi1998/fluentpython
218311afb6b41d2668a1baa94dcee0ba7f4764a4
[ "MIT" ]
null
null
null
descriptors/__init__.py
xuzhiyi1998/fluentpython
218311afb6b41d2668a1baa94dcee0ba7f4764a4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # @Project: fluentpython # @Author: xuzhiyi # @File name: __init__.py # @Create time: 2021/8/1 20:20
24.8
30
0.645161
# -*- coding: utf-8 -*- # @Project: fluentpython # @Author: xuzhiyi # @File name: __init__.py # @Create time: 2021/8/1 20:20
0
0
0
011deac3b859a22453e60f548fb3c50ae7fa2e4f
58,206
py
Python
venv/lib/python3.6/site-packages/ansible_collections/community/vmware/plugins/modules/vmware_guest_disk.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
7
2021-11-16T04:05:42.000Z
2022-02-19T21:14:29.000Z
venv/lib/python3.6/site-packages/ansible_collections/community/vmware/plugins/modules/vmware_guest_disk.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
12
2020-02-21T07:24:52.000Z
2020-04-14T09:54:32.000Z
venv/lib/python3.6/site-packages/ansible_collections/community/vmware/plugins/modules/vmware_guest_disk.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
1
2022-03-01T05:43:07.000Z
2022-03-01T05:43:07.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Ansible Project # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = ty...
48.505
159
0.563258
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Ansible Project # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = ty...
5,740
34,439
46
e2399a2eecaeb4248ac9ebba05a3cb28ae2aad76
1,729
py
Python
src/tests/helpers.py
tipresias/augury
eaae2a7d27ee8c39796231ec55e0e2a82b59d60c
[ "MIT" ]
4
2019-12-05T06:02:08.000Z
2022-02-01T23:49:23.000Z
src/tests/helpers.py
tipresias/augury
eaae2a7d27ee8c39796231ec55e0e2a82b59d60c
[ "MIT" ]
143
2019-07-30T11:06:56.000Z
2022-03-14T19:02:39.000Z
src/tests/helpers.py
tipresias/augury
eaae2a7d27ee8c39796231ec55e0e2a82b59d60c
[ "MIT" ]
3
2019-12-30T22:57:41.000Z
2020-12-31T02:39:07.000Z
"""Functions and classes to deduplicate and simplify test code.""" class ColumnAssertionMixin: """Mixin class for making columns assertions in tests for Kedro nodes."""
33.901961
87
0.626374
"""Functions and classes to deduplicate and simplify test code.""" class ColumnAssertionMixin: """Mixin class for making columns assertions in tests for Kedro nodes.""" def _assert_column_added( self, column_names=[], valid_data_frame=None, feature_function=None, col_diff=1 ): for column...
1,473
0
81
4cfe0a794f29fc15288f03da12bf854e26658753
3,212
py
Python
apps/files/images.py
rmdes/tanzawa
d53baa10bd6c217cd18628437a88a43e3bd02b70
[ "Apache-2.0" ]
25
2021-06-13T03:38:44.000Z
2022-03-15T15:53:31.000Z
apps/files/images.py
rmdes/tanzawa
d53baa10bd6c217cd18628437a88a43e3bd02b70
[ "Apache-2.0" ]
59
2021-06-12T23:35:06.000Z
2022-03-24T21:40:24.000Z
apps/files/images.py
rmdes/tanzawa
d53baa10bd6c217cd18628437a88a43e3bd02b70
[ "Apache-2.0" ]
null
null
null
import io import mimetypes from pathlib import Path from typing import Optional, Tuple, Union from django.core.files.uploadedfile import SimpleUploadedFile from django.utils.timezone import now from PIL import Image, ImageOps from .models import TFile # TODO: Convert this into a class to handle image formatting
33.113402
86
0.657846
import io import mimetypes from pathlib import Path from typing import Optional, Tuple, Union from django.core.files.uploadedfile import SimpleUploadedFile from django.utils.timezone import now from PIL import Image, ImageOps from .models import TFile def rotate_image(image_bytes: io.BytesIO, mime_type: str) -> io....
2,829
0
68
b4ad2e5e5b22b24d8fa2765b92a803a47b0f585f
902
py
Python
E10_KNMI.py
michielkauwatjoe/DataViz
c590a8c3148e35250a2179844adeb7a2534df585
[ "MIT" ]
null
null
null
E10_KNMI.py
michielkauwatjoe/DataViz
c590a8c3148e35250a2179844adeb7a2534df585
[ "MIT" ]
null
null
null
E10_KNMI.py
michielkauwatjoe/DataViz
c590a8c3148e35250a2179844adeb7a2534df585
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # https://knmi.nl/kennis-en-datacentrum/achtergrond/data-ophalen-vanuit-een-script # https://github.com/EnergieID/KNMI-py # https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html # https://rethinkdb.com/ import knmi from latlon import Latitude, Longitude # Pandas Data...
28.1875
82
0.702882
#!/usr/bin/env python3 # https://knmi.nl/kennis-en-datacentrum/achtergrond/data-ophalen-vanuit-een-script # https://github.com/EnergieID/KNMI-py # https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html # https://rethinkdb.com/ import knmi from latlon import Latitude, Longitude # Pandas Data...
0
0
0
144b8f1c2a99c508937fadbf6a5b2a50a6afd019
729
py
Python
indice_pollution/regions/Hauts-de-France.py
betagouv/indice_pollution
112f262397686110475ed360101b311e76d5d914
[ "MIT" ]
2
2020-09-02T20:17:22.000Z
2022-03-04T21:06:28.000Z
indice_pollution/regions/Hauts-de-France.py
betagouv/indice_pollution
112f262397686110475ed360101b311e76d5d914
[ "MIT" ]
34
2020-08-13T11:47:13.000Z
2022-03-31T08:05:37.000Z
indice_pollution/regions/Hauts-de-France.py
betagouv/indice_pollution
112f262397686110475ed360101b311e76d5d914
[ "MIT" ]
null
null
null
from . import ServiceMixin, ForecastMixin, EpisodeMixin from datetime import timedelta from dateutil.parser import parse
40.5
121
0.762689
from . import ServiceMixin, ForecastMixin, EpisodeMixin from datetime import timedelta from dateutil.parser import parse class Service(ServiceMixin): is_active = True date_format = '%Y-%m-%d' website = 'https://www.atmo-hdf.fr/' nom_aasqa = 'ATMO Hauts-de-France' class Forecast(Service, ForecastMixin)...
0
540
69
db66c682d8c0efee24f783af18d113a894f6d75b
5,507
py
Python
Setup/Python/Youbot/youbot_3dpointcloud.py
nvecoven/INFO0948-2
60db1dcbdb6ef1be243778e2277d0ccfbb74fdbd
[ "CC-BY-4.0" ]
2
2022-02-18T08:11:57.000Z
2022-02-23T08:16:19.000Z
Setup/Python/Youbot/youbot_3dpointcloud.py
nvecoven/INFO0948-2
60db1dcbdb6ef1be243778e2277d0ccfbb74fdbd
[ "CC-BY-4.0" ]
null
null
null
Setup/Python/Youbot/youbot_3dpointcloud.py
nvecoven/INFO0948-2
60db1dcbdb6ef1be243778e2277d0ccfbb74fdbd
[ "CC-BY-4.0" ]
2
2021-03-03T15:32:02.000Z
2021-03-05T15:33:45.000Z
# -*- coding: utf-8 -*- """ # youbot Illustrates the V-REP MATLAB bindings, more specifically the way to take a 3D point cloud. # (C) Copyright Renaud Detry 2013, Thibaut Cuvelier 2017. # Distributed under the GNU General Public License. # (See http://www.gnu.org/copyleft/gpl.html) """ # VREP import sim as vrep # Use...
41.406015
114
0.727438
# -*- coding: utf-8 -*- """ # youbot Illustrates the V-REP MATLAB bindings, more specifically the way to take a 3D point cloud. # (C) Copyright Renaud Detry 2013, Thibaut Cuvelier 2017. # Distributed under the GNU General Public License. # (See http://www.gnu.org/copyleft/gpl.html) """ # VREP import sim as vrep # Use...
0
0
0
68431956904694fad67f805a36fc5baa2395ccec
33,787
py
Python
crys3d/hklview/jsview_3d.py
rimmartin/cctbx_project
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
[ "BSD-3-Clause-LBNL" ]
null
null
null
crys3d/hklview/jsview_3d.py
rimmartin/cctbx_project
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
[ "BSD-3-Clause-LBNL" ]
null
null
null
crys3d/hklview/jsview_3d.py
rimmartin/cctbx_project
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
[ "BSD-3-Clause-LBNL" ]
null
null
null
# TODO: # - cached scenes from __future__ import division from libtbx.math_utils import roundoff from cctbx.miller import display2 as display from cctbx.array_family import flex from scitbx import graphics_utils from cctbx import miller from libtbx.utils import Sorry from websocket_server import WebsocketServer impo...
34.617828
117
0.652499
# TODO: # - cached scenes from __future__ import division from libtbx.math_utils import roundoff from cctbx.miller import display2 as display from cctbx.array_family import flex from scitbx import graphics_utils from cctbx import miller from libtbx.utils import Sorry from websocket_server import WebsocketServer impo...
31,150
-9
518
cfd437ccf98b207195aece3da3aebed3f204c656
916
py
Python
calendareshop/shopping/migrations/0004_customorder.py
Kaarhai/calendar-eshop
4ba4141034fe0042f0b3eec6194efd4b5c815f66
[ "BSD-3-Clause" ]
1
2016-09-20T22:01:05.000Z
2016-09-20T22:01:05.000Z
calendareshop/shopping/migrations/0004_customorder.py
Kaarhai/calendar-eshop
4ba4141034fe0042f0b3eec6194efd4b5c815f66
[ "BSD-3-Clause" ]
6
2016-10-08T09:57:49.000Z
2022-03-11T23:16:41.000Z
calendareshop/shopping/migrations/0004_customorder.py
Kaarhai/calendar-eshop
4ba4141034fe0042f0b3eec6194efd4b5c815f66
[ "BSD-3-Clause" ]
2
2016-10-03T21:47:55.000Z
2019-10-17T07:56:09.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations
33.925926
274
0.592795
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('shop', '__first__'), ('shopping', '0003_auto_20150923_1016'), ] operations = [ migrations.CreateModel( n...
0
786
23
1484f1883ecf2d917b75f65d49b4742884875fb8
1,223
py
Python
cvismon.py
b10n1k/cvismon
d023570f61aa60b6cee4f680add2e09768171324
[ "Apache-2.0" ]
null
null
null
cvismon.py
b10n1k/cvismon
d023570f61aa60b6cee4f680add2e09768171324
[ "Apache-2.0" ]
null
null
null
cvismon.py
b10n1k/cvismon
d023570f61aa60b6cee4f680add2e09768171324
[ "Apache-2.0" ]
null
null
null
import json from pprint import pprint import re import termplotlib as tpl image_data = {} # need permissions ihash = '' img_id = [] with open("/var/lib/docker/image/btrfs/repositories.json", "r") as f3: data = f3.read() js = json.loads(data) for reponame in js['Repositories']: for image in js['Rep...
29.119048
90
0.60507
import json from pprint import pprint import re import termplotlib as tpl image_data = {} # need permissions ihash = '' img_id = [] with open("/var/lib/docker/image/btrfs/repositories.json", "r") as f3: data = f3.read() js = json.loads(data) for reponame in js['Repositories']: for image in js['Rep...
0
0
0
a147bee63dc602fee9883fa5a99b6ceb96497f89
5,205
py
Python
digitick_client/models/show.py
frague59/digitick-client
b8787438cddc60720c60c8b23826185a7d0988d5
[ "MIT" ]
null
null
null
digitick_client/models/show.py
frague59/digitick-client
b8787438cddc60720c60c8b23826185a7d0988d5
[ "MIT" ]
null
null
null
digitick_client/models/show.py
frague59/digitick-client
b8787438cddc60720c60c8b23826185a7d0988d5
[ "MIT" ]
null
null
null
# coding: utf-8 """ Digitick REST API The Digitick REST API is a set of methods giving access to catalog, user and cart management. OpenAPI spec version: v1.0 Contact: contact@digitick.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six i...
24.551887
105
0.538521
# coding: utf-8 """ Digitick REST API The Digitick REST API is a set of methods giving access to catalog, user and cart management. OpenAPI spec version: v1.0 Contact: contact@digitick.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six i...
0
0
0
62ffeaee466458969ac58c7a83aedd98cd783112
193
py
Python
helper/progressbar_filewalker.py
jgraber/PythonFriday
879f10934dc6949785e5a799bfc3ca9a2a4434d4
[ "MIT" ]
5
2021-02-22T08:39:55.000Z
2022-03-14T03:54:36.000Z
helper/progressbar_filewalker.py
jgraber/PythonFriday
879f10934dc6949785e5a799bfc3ca9a2a4434d4
[ "MIT" ]
null
null
null
helper/progressbar_filewalker.py
jgraber/PythonFriday
879f10934dc6949785e5a799bfc3ca9a2a4434d4
[ "MIT" ]
null
null
null
import time import progressbar import os files = os.listdir('D:\Python') for i in progressbar.progressbar(files): do_something(i)
14.846154
40
0.735751
import time import progressbar import os def do_something(file): print(file) time.sleep(0.02) files = os.listdir('D:\Python') for i in progressbar.progressbar(files): do_something(i)
33
0
23
4d20b1d9572938ff4d9507dfe87029d69d55c90d
13,373
py
Python
yandex/cloud/ai/vision/v1/text_detection_pb2.py
kbespalov/python-sdk
e86563ee850e46a35b4c84053ecd4affdf66a963
[ "MIT" ]
null
null
null
yandex/cloud/ai/vision/v1/text_detection_pb2.py
kbespalov/python-sdk
e86563ee850e46a35b4c84053ecd4affdf66a963
[ "MIT" ]
null
null
null
yandex/cloud/ai/vision/v1/text_detection_pb2.py
kbespalov/python-sdk
e86563ee850e46a35b4c84053ecd4affdf66a963
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: yandex/cloud/ai/vision/v1/text_detection.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as ...
39.332353
1,322
0.746355
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: yandex/cloud/ai/vision/v1/text_detection.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as ...
0
0
0
f47ef765dfc9b6f0d537e172929de959073fa921
2,735
py
Python
Simulation/simulator/SimTestView.py
dntoll/loraMesh
c157182d23f659572799b60e07094e4e9809a1f2
[ "MIT" ]
null
null
null
Simulation/simulator/SimTestView.py
dntoll/loraMesh
c157182d23f659572799b60e07094e4e9809a1f2
[ "MIT" ]
null
null
null
Simulation/simulator/SimTestView.py
dntoll/loraMesh
c157182d23f659572799b60e07094e4e9809a1f2
[ "MIT" ]
null
null
null
from lib.ANSIEscape import ANSIEscape #TODO: copy paste
30.730337
109
0.600731
from lib.ANSIEscape import ANSIEscape class SimTestView: def __init__(self, nodeName): self.nodeName = str(nodeName) + ": " self.nodeID = nodeName self.buffer = [] def receiveMessages(self, messages): #if len(messages) > 0: # print(self.nodeName + "receiveM...
2,134
-3
532
5c1eabedf4921bbcba5aee451a6b65745380aee4
10,767
py
Python
opencanary/test/module_test.py
amorrowbellarmine/opencanary
a25209888faa3fbaa15db09e419d03b42897a7d5
[ "BSD-3-Clause" ]
1,412
2015-08-06T03:54:37.000Z
2022-03-29T07:30:54.000Z
opencanary/test/module_test.py
amorrowbellarmine/opencanary
a25209888faa3fbaa15db09e419d03b42897a7d5
[ "BSD-3-Clause" ]
170
2015-08-11T00:33:06.000Z
2022-03-30T05:11:38.000Z
opencanary/test/module_test.py
amorrowbellarmine/opencanary
a25209888faa3fbaa15db09e419d03b42897a7d5
[ "BSD-3-Clause" ]
297
2015-08-17T09:25:41.000Z
2022-03-31T08:25:41.000Z
""" This module assumes that OpenCanary has been installed and is running. In particular it assumes that OpenCanary is logging to /var/tmp/opencanary.log and that the services it's testing are enabled. It would be much better to setup tests to start the services needed and provide the configuration files so that test...
38.045936
101
0.624594
""" This module assumes that OpenCanary has been installed and is running. In particular it assumes that OpenCanary is logging to /var/tmp/opencanary.log and that the services it's testing are enabled. It would be much better to setup tests to start the services needed and provide the configuration files so that test...
935
0
213
179184fc9666c2512b633fed036be6fba4cd566a
3,081
py
Python
flib/abstract.py
rldotai/flib
695e875f708b0b71c9b005fdf85c066e4ffb7c0f
[ "BSD-3-Clause" ]
1
2017-02-01T00:34:23.000Z
2017-02-01T00:34:23.000Z
flib/abstract.py
rldotai/flib
695e875f708b0b71c9b005fdf85c066e4ffb7c0f
[ "BSD-3-Clause" ]
null
null
null
flib/abstract.py
rldotai/flib
695e875f708b0b71c9b005fdf85c066e4ffb7c0f
[ "BSD-3-Clause" ]
null
null
null
""" Abstract base classes for different kinds of feature. """ import numpy as np class Feature: """ Feature function base class. Implements various methods common to feature functions, which are generally the same across the various features in this library. """ @property class Functiona...
31.438776
80
0.646219
""" Abstract base classes for different kinds of feature. """ import numpy as np class Feature: """ Feature function base class. Implements various methods common to feature functions, which are generally the same across the various features in this library. """ def __init__(self, n_input, n...
1,070
0
158
78f4476d4df1caa986d8953cb2eadff6102ccdc6
1,996
py
Python
src/2Dvis.py
toicca/planetary-simulator-sc2
f673eb0fbb49b72fdaf861782fa476b13d798aa0
[ "MIT" ]
null
null
null
src/2Dvis.py
toicca/planetary-simulator-sc2
f673eb0fbb49b72fdaf861782fa476b13d798aa0
[ "MIT" ]
null
null
null
src/2Dvis.py
toicca/planetary-simulator-sc2
f673eb0fbb49b72fdaf861782fa476b13d798aa0
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd import matplotlib.pyplot as plt import mpl_toolkits.mplot3d.axes3d as p3 import matplotlib.animation as animation #Reading the input instructions and names of the objects. obj_names=[] f = open("../run/input.dat","r") obj_count=int(f.readline()) for obj in range(obj_count): o...
34.413793
147
0.743988
import numpy as np import pandas as pd import matplotlib.pyplot as plt import mpl_toolkits.mplot3d.axes3d as p3 import matplotlib.animation as animation #Reading the input instructions and names of the objects. obj_names=[] f = open("../run/input.dat","r") obj_count=int(f.readline()) for obj in range(obj_count): o...
0
0
0
7fa33659a421046ddc243bc3c80abd2ab84720b6
792
py
Python
14_longestCommonPrefix/solution.py
NekoApocalypse/leetcode-collection
d7db13b34078eb3027f89a02eeb45066073a4a5c
[ "MIT" ]
null
null
null
14_longestCommonPrefix/solution.py
NekoApocalypse/leetcode-collection
d7db13b34078eb3027f89a02eeb45066073a4a5c
[ "MIT" ]
null
null
null
14_longestCommonPrefix/solution.py
NekoApocalypse/leetcode-collection
d7db13b34078eb3027f89a02eeb45066073a4a5c
[ "MIT" ]
null
null
null
if __name__ == '__main__': test()
21.405405
57
0.411616
class Solution: def longestCommonPrefix(self, strs): if not strs: return "" ans = 0 flag = True while flag: if ans < len(strs[0]): target = strs[0][ans] else: break for str in strs: if ans...
681
-6
71
4d1d67b2a094f19834bbaaf69935f8a8759c6994
1,371
py
Python
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/core/management/commands/fixturize.py
simonbru/django-template
c6faf55873e4c83be674197a89be3f5881a69528
[ "MIT" ]
22
2016-02-08T14:08:21.000Z
2021-07-26T21:17:43.000Z
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/core/management/commands/fixturize.py
simonbru/django-template
c6faf55873e4c83be674197a89be3f5881a69528
[ "MIT" ]
64
2016-02-01T14:30:25.000Z
2022-01-31T16:06:51.000Z
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/core/management/commands/fixturize.py
simonbru/django-template
c6faf55873e4c83be674197a89be3f5881a69528
[ "MIT" ]
16
2015-09-22T12:33:55.000Z
2021-09-09T12:57:53.000Z
from io import StringIO from django.core import management from django.core.management.base import BaseCommand from django.db import connection def reset_db(): """ Reset database to a blank state by removing all the tables and recreating them. """ with connection.cursor() as cursor: cursor.ex...
31.159091
86
0.632385
from io import StringIO from django.core import management from django.core.management.base import BaseCommand from django.db import connection def reset_db(): """ Reset database to a blank state by removing all the tables and recreating them. """ with connection.cursor() as cursor: cursor.ex...
407
111
23
87b56d6c929c3ce3ce153dce7b3c210821d706a0
548
py
Python
sympy/polys/domains/pythonrational.py
utkarshdeorah/sympy
dcdf59bbc6b13ddbc329431adf72fcee294b6389
[ "BSD-3-Clause" ]
1
2022-01-31T16:02:46.000Z
2022-01-31T16:02:46.000Z
sympy/polys/domains/pythonrational.py
utkarshdeorah/sympy
dcdf59bbc6b13ddbc329431adf72fcee294b6389
[ "BSD-3-Clause" ]
3
2022-02-04T14:45:16.000Z
2022-02-04T14:45:45.000Z
sympy/polys/domains/pythonrational.py
utkarshdeorah/sympy
dcdf59bbc6b13ddbc329431adf72fcee294b6389
[ "BSD-3-Clause" ]
1
2022-02-04T13:50:29.000Z
2022-02-04T13:50:29.000Z
""" Rational number type based on Python integers. The PythonRational class from here has been moved to sympy.external.pythonmpq This module is just left here for backwards compatibility. """ from sympy.core.numbers import Rational from sympy.core.sympify import _sympy_converter from sympy.utilities import public f...
23.826087
58
0.821168
""" Rational number type based on Python integers. The PythonRational class from here has been moved to sympy.external.pythonmpq This module is just left here for backwards compatibility. """ from sympy.core.numbers import Rational from sympy.core.sympify import _sympy_converter from sympy.utilities import public f...
63
0
23