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
31fbb57a08cc16c164f1e1499b813f433099b29f
1,041
py
Python
core/criterion.py
PietrOz/arboreal
3fda601a9af21a11bef3284a11d0bffe804cb3cc
[ "Apache-2.0" ]
null
null
null
core/criterion.py
PietrOz/arboreal
3fda601a9af21a11bef3284a11d0bffe804cb3cc
[ "Apache-2.0" ]
null
null
null
core/criterion.py
PietrOz/arboreal
3fda601a9af21a11bef3284a11d0bffe804cb3cc
[ "Apache-2.0" ]
3
2019-10-12T04:13:08.000Z
2022-02-04T07:06:01.000Z
from core.datatype import Datatype
26.025
67
0.677233
from core.datatype import Datatype def gini_impurity(labels): # apple apple orange banana banana count = len(labels) unique = set(labels) contributions = [] for label in unique: p = labels.count(label) / count impurity = p * (1.0 - p) contributions.append(impurity) ret...
934
0
69
7ff7122e196b282d35fe222c084c4aab06123611
4,074
py
Python
spacy_lookups_data/tests/conftest.py
kadarakos/spacy-lookups-data
2f98c24775218da5ac272957f376d5b580d85571
[ "MIT" ]
67
2019-09-30T21:31:18.000Z
2022-03-26T11:05:02.000Z
spacy_lookups_data/tests/conftest.py
kadarakos/spacy-lookups-data
2f98c24775218da5ac272957f376d5b580d85571
[ "MIT" ]
13
2019-10-23T14:11:49.000Z
2021-09-27T14:29:38.000Z
spacy_lookups_data/tests/conftest.py
kadarakos/spacy-lookups-data
2f98c24775218da5ac272957f376d5b580d85571
[ "MIT" ]
47
2019-10-22T11:20:09.000Z
2022-01-08T20:34:45.000Z
import spacy import pytest INIT_LOOKUPS_CONFIG = { "@misc": "spacy.LookupsDataLoader.v1", "lang": "${nlp.lang}", "tables": ["lexeme_norm"], } @pytest.fixture(scope="session") @pytest.fixture(scope="session") @pytest.fixture(scope="session") @pytest.fixture(scope="session") @pytest.fixture(scope=...
21.108808
61
0.651448
import spacy import pytest INIT_LOOKUPS_CONFIG = { "@misc": "spacy.LookupsDataLoader.v1", "lang": "${nlp.lang}", "tables": ["lexeme_norm"], } @pytest.fixture(scope="session") def ca_lookup_nlp(): nlp = spacy.blank("ca") nlp.add_pipe("lemmatizer", config={"mode": "lookup"}) nlp.initialize() ...
2,664
0
484
1eae46ca13f3b40aa55892ce9376c6666af5b131
1,829
py
Python
django1703zz/day5/stumanage/models.py
z991/Stuent_Manage_Systerm
23ec1595968a87a311ac3b718e2e9d7ea6a65b58
[ "MIT" ]
2
2019-01-21T03:43:39.000Z
2019-08-18T04:18:37.000Z
django1703zz/day5/stumanage/models.py
z991/Stuent_Manage_Systerm
23ec1595968a87a311ac3b718e2e9d7ea6a65b58
[ "MIT" ]
11
2020-02-12T03:27:54.000Z
2022-03-12T00:10:50.000Z
django1703zz/day5/stumanage/models.py
z991/Stuent_Manage_Systerm
23ec1595968a87a311ac3b718e2e9d7ea6a65b58
[ "MIT" ]
null
null
null
#coding:utf8 from django.db import models from django.contrib.auth.models import User from pytz import timezone from django.conf import settings TIME_ZONE = settings.TIME_ZONE if settings.TIME_ZONE else 'Asia/Shanghai' # Create your models here.
33.87037
99
0.72936
#coding:utf8 from django.db import models from django.contrib.auth.models import User from pytz import timezone from django.conf import settings TIME_ZONE = settings.TIME_ZONE if settings.TIME_ZONE else 'Asia/Shanghai' # Create your models here. class Student(models.Model): name=models.CharField(verbose_name='学生姓名...
104
1,501
90
6fea67b75bc7c251966a525b93cf5e63ba13f7c3
2,371
py
Python
tests/make.py
simomarsili/mmdemux
80edee6b98ff85208edac2e45d0edf0ee922b1ed
[ "MIT" ]
null
null
null
tests/make.py
simomarsili/mmdemux
80edee6b98ff85208edac2e45d0edf0ee922b1ed
[ "MIT" ]
null
null
null
tests/make.py
simomarsili/mmdemux
80edee6b98ff85208edac2e45d0edf0ee922b1ed
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Prepare tests files.""" # pylint: disable=no-member import mdtraj import simtk.openmm as mm from openmmtools import mcmc, states, testsystems from openmmtools.multistate import MultiStateReporter, ParallelTemperingSampler from simtk import unit def energy_function(test, topology=None, syste...
37.046875
79
0.701814
# -*- coding: utf-8 -*- """Prepare tests files.""" # pylint: disable=no-member import mdtraj import simtk.openmm as mm from openmmtools import mcmc, states, testsystems from openmmtools.multistate import MultiStateReporter, ParallelTemperingSampler from simtk import unit def energy_function(test, topology=None, syste...
0
0
0
3aa30d764262b42736d1bb2220cfe44d5c41484f
652
py
Python
2019-12-19_introductionInSeminar/code/manualAi.py
TrackerSB/MasterThesis
2792203d28d6c7b62f54545344ee6772d2ec5b64
[ "MIT" ]
null
null
null
2019-12-19_introductionInSeminar/code/manualAi.py
TrackerSB/MasterThesis
2792203d28d6c7b62f54545344ee6772d2ec5b64
[ "MIT" ]
null
null
null
2019-12-19_introductionInSeminar/code/manualAi.py
TrackerSB/MasterThesis
2792203d28d6c7b62f54545344ee6772d2ec5b64
[ "MIT" ]
null
null
null
if __name__ == "__main__": from pathlib import Path from drivebuildclient.AIExchangeService import AIExchangeService from drivebuildclient.aiExchangeMessages_pb2 import VehicleID service = AIExchangeService("localhost", 8383) # Send tests submission_result = service.run_tests("test", "test", Pa...
38.352941
114
0.707055
if __name__ == "__main__": from pathlib import Path from drivebuildclient.AIExchangeService import AIExchangeService from drivebuildclient.aiExchangeMessages_pb2 import VehicleID service = AIExchangeService("localhost", 8383) # Send tests submission_result = service.run_tests("test", "test", Pa...
0
0
0
bd8dbda9931a4233177ea7c32144a912644de904
1,100
py
Python
configurer/parsers/__init__.py
jamielennox/configurer
83edafc711aa15da534e90159aaca783ddbfbe56
[ "Apache-2.0" ]
null
null
null
configurer/parsers/__init__.py
jamielennox/configurer
83edafc711aa15da534e90159aaca783ddbfbe56
[ "Apache-2.0" ]
3
2019-05-09T10:58:59.000Z
2019-05-09T10:59:56.000Z
configurer/parsers/__init__.py
jamielennox/configurer
83edafc711aa15da534e90159aaca783ddbfbe56
[ "Apache-2.0" ]
null
null
null
__all__ = [ 'Boolean', 'List', 'Or', ]
20.37037
68
0.528182
__all__ = [ 'Boolean', 'List', 'Or', ] def Boolean(value): if isinstance(value, bool): return value if isinstance(value, int): return value != 0 try: s = str(value).strip().lower() except Exception: pass else: if s in ('true', '1', 'on', 'yes'...
976
0
69
6b91c7ee53c19631334375a5d5d99360933063d1
756
py
Python
core/telegram/decorators.py
mpyrev/lunchegram
14a29da74e14a959be607e4fc76bbc2f181c5278
[ "MIT" ]
1
2019-11-26T13:49:02.000Z
2019-11-26T13:49:02.000Z
core/telegram/decorators.py
mpyrev/lunchegram
14a29da74e14a959be607e4fc76bbc2f181c5278
[ "MIT" ]
7
2019-12-24T13:17:23.000Z
2022-02-10T12:35:14.000Z
core/telegram/decorators.py
mpyrev/lunchegram
14a29da74e14a959be607e4fc76bbc2f181c5278
[ "MIT" ]
null
null
null
from functools import wraps from django.db import transaction from accounts.models import User from core.models import TelegramChat def infuse_user(): """ Adds user instance to args if possible. Also creates """ return decorator
23.625
103
0.60582
from functools import wraps from django.db import transaction from accounts.models import User from core.models import TelegramChat def infuse_user(): """ Adds user instance to args if possible. Also creates """ def decorator(func): @wraps(func) def wrapper(*args, **kwargs): ...
476
0
26
525ce6e0660223c0a5ffd309b3e48b4d0898096d
874
py
Python
truck_telemetry/truck_telemetry.py
Dreagonmon/truck_telemetry
e353585940ff40949e836bb8d27671aab014dbcd
[ "MIT" ]
null
null
null
truck_telemetry/truck_telemetry.py
Dreagonmon/truck_telemetry
e353585940ff40949e836bb8d27671aab014dbcd
[ "MIT" ]
null
null
null
truck_telemetry/truck_telemetry.py
Dreagonmon/truck_telemetry
e353585940ff40949e836bb8d27671aab014dbcd
[ "MIT" ]
null
null
null
from multiprocessing.shared_memory import SharedMemory from .telemetry_version import v1_10 _mem = None _telemetry_sdk_version = None
27.3125
65
0.704805
from multiprocessing.shared_memory import SharedMemory from .telemetry_version import v1_10 _mem = None _telemetry_sdk_version = None def init(): global _mem, _telemetry_sdk_version _mem = SharedMemory(name="Local\\SCSTelemetry", create=False) for version in (v1_10,): if (version.is_same_version(_...
647
0
92
3b7a585d722da59a13235a5532d627f887808d57
18,940
py
Python
baselines/jft/batchensemble.py
pyun-ram/uncertainty-baselines
5de6a93973c0989dc7eff48d126af57cd7918e20
[ "Apache-2.0" ]
null
null
null
baselines/jft/batchensemble.py
pyun-ram/uncertainty-baselines
5de6a93973c0989dc7eff48d126af57cd7918e20
[ "Apache-2.0" ]
null
null
null
baselines/jft/batchensemble.py
pyun-ram/uncertainty-baselines
5de6a93973c0989dc7eff48d126af57cd7918e20
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2021 The Uncertainty Baselines Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
41.810155
80
0.673231
# coding=utf-8 # Copyright 2021 The Uncertainty Baselines Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
16,768
0
23
5cb926ee99ffde1b4ff7b06c86957f872b8bcb09
926
py
Python
libs/const.py
Gianuzzi/turbulent-cloud
0e226b6d7f0328677e153df64bbb7c12a606a8c2
[ "MIT" ]
4
2019-09-13T15:14:50.000Z
2020-10-16T20:31:10.000Z
libs/const.py
Gianuzzi/turbulent-cloud
0e226b6d7f0328677e153df64bbb7c12a606a8c2
[ "MIT" ]
1
2021-06-05T10:06:35.000Z
2021-06-06T07:00:29.000Z
libs/const.py
Gianuzzi/turbulent-cloud
0e226b6d7f0328677e153df64bbb7c12a606a8c2
[ "MIT" ]
9
2020-05-04T19:35:46.000Z
2021-06-23T12:36:41.000Z
from __future__ import print_function from numpy import sqrt # all constants in cgs # gravitational constant G = 6.674e-8 # [ cm^3 g^-1 s^-1 ] # avogadro constant NA = 6.0221418e23 # [ ] # boltzmann constant KB = 1.3806504e-16 # [ erg K^-1 ] # planck constant H = 6.62606896e-27 # [ erg ...
18.897959
68
0.609071
from __future__ import print_function from numpy import sqrt # all constants in cgs # gravitational constant G = 6.674e-8 # [ cm^3 g^-1 s^-1 ] # avogadro constant NA = 6.0221418e23 # [ ] # boltzmann constant KB = 1.3806504e-16 # [ erg K^-1 ] # planck constant H = 6.62606896e-27 # [ erg ...
0
0
0
54f5493b4ec27c7e8f7513a1758d49ec0341f411
258
py
Python
offthedialbot/env.py
DJam98/bot
366a46bcca55098e1030a4f05d63e8872a791bf8
[ "MIT" ]
2
2020-08-31T15:45:07.000Z
2021-09-26T22:15:43.000Z
offthedialbot/env.py
DJam98/bot
366a46bcca55098e1030a4f05d63e8872a791bf8
[ "MIT" ]
17
2020-06-02T02:29:48.000Z
2021-10-13T23:47:44.000Z
offthedialbot/env.py
DJam98/bot
366a46bcca55098e1030a4f05d63e8872a791bf8
[ "MIT" ]
3
2020-05-31T23:17:10.000Z
2022-03-09T22:23:22.000Z
"""Get enviroment from the bot.""" import yaml try: with open('config.yml') as file: env = yaml.load(file, Loader=yaml.FullLoader) except FileNotFoundError: raise EnvironmentError("Cannot find 'config.yml' in root, have you created one?")
23.454545
85
0.697674
"""Get enviroment from the bot.""" import yaml try: with open('config.yml') as file: env = yaml.load(file, Loader=yaml.FullLoader) except FileNotFoundError: raise EnvironmentError("Cannot find 'config.yml' in root, have you created one?")
0
0
0
5578f72d21e2fc9f70049986321e00b467f84d31
4,864
py
Python
tests/forecast/forecast_unittest.py
AlertingAvian/python-meteorologist
904089f4062e875148cbe5abc8fe4f7ff1d6a524
[ "MIT" ]
null
null
null
tests/forecast/forecast_unittest.py
AlertingAvian/python-meteorologist
904089f4062e875148cbe5abc8fe4f7ff1d6a524
[ "MIT" ]
null
null
null
tests/forecast/forecast_unittest.py
AlertingAvian/python-meteorologist
904089f4062e875148cbe5abc8fe4f7ff1d6a524
[ "MIT" ]
null
null
null
""" Copyright (C) 2021 Patrick Maloney """ import unittest from python_meteorologist import forecast as fc if __name__ == '__main__': unittest.main()
54.651685
119
0.584498
""" Copyright (C) 2021 Patrick Maloney """ import unittest from python_meteorologist import forecast as fc class ForecastTest(unittest.TestCase): def test_missing_user_agent(self): with self.assertRaises(TypeError) as context: fc.Forecaster() self.assertTrue('User Agent is required.'...
4,586
17
103
d6080f9ca4efb622c78bc0ddd5fbfee6c2237b41
1,831
py
Python
pipeline.py
KseniaEremeeva/2021-2-level-ctlr
53dc2d652a25bd94d3c0392768300b1e13a9dac9
[ "MIT" ]
null
null
null
pipeline.py
KseniaEremeeva/2021-2-level-ctlr
53dc2d652a25bd94d3c0392768300b1e13a9dac9
[ "MIT" ]
null
null
null
pipeline.py
KseniaEremeeva/2021-2-level-ctlr
53dc2d652a25bd94d3c0392768300b1e13a9dac9
[ "MIT" ]
null
null
null
""" Pipeline for text processing implementation """ class EmptyDirectoryError(Exception): """ No data to process """ class InconsistentDatasetError(Exception): """ Corrupt data: - numeration is expected to start from 1 and to be continuous - a number of text files must be equal t...
17.776699
74
0.580557
""" Pipeline for text processing implementation """ class EmptyDirectoryError(Exception): """ No data to process """ class InconsistentDatasetError(Exception): """ Corrupt data: - numeration is expected to start from 1 and to be continuous - a number of text files must be equal t...
126
0
104
188b739dc12cc0c64c5e44a947e2482837869d07
802
py
Python
bro-scripts/adversaries/hurricane-panda/rogue-dns/dynamic/scrape-alexa.py
kingtuna/cs-bro
496b7aa4d469d722ff7e16971cd76de7b37b7e6d
[ "BSD-2-Clause" ]
131
2015-04-25T02:38:17.000Z
2022-01-20T19:38:04.000Z
bro-scripts/adversaries/hurricane-panda/rogue-dns/dynamic/scrape-alexa.py
CrowdStrike/NetworkDetection
fc4f66294e8cbbfb00460e5b1bb136f218293d39
[ "BSD-2-Clause" ]
3
2015-08-10T18:53:04.000Z
2017-04-25T22:50:02.000Z
bro-scripts/adversaries/hurricane-panda/rogue-dns/dynamic/scrape-alexa.py
LaudateCorpus1/cs-bro
47e9bb3627220946f1aaa76f3099d81b3dce6de3
[ "BSD-2-Clause" ]
46
2015-04-21T00:27:18.000Z
2022-02-26T03:11:52.000Z
# Rudimentary script to collect domains in the Alexa top 500 # This script can be run as often as needed to refresh the list of domains # CrowdStrike 2015 # josh.liburdi@crowdstrike.com import requests import bs4 # File containing Alexa top 500 domains # This file name and path is referenced in the Bro script and can...
33.416667
79
0.713217
# Rudimentary script to collect domains in the Alexa top 500 # This script can be run as often as needed to refresh the list of domains # CrowdStrike 2015 # josh.liburdi@crowdstrike.com import requests import bs4 # File containing Alexa top 500 domains # This file name and path is referenced in the Bro script and can...
0
0
0
07f293fce141c0a95ea48d7d46ec2d683d7f8b5a
839
py
Python
rnn_space1/genotypes.py
Sette/CoNAS
19b061fb7177fb2d2b0eca94f16e8d4b57178859
[ "Apache-2.0" ]
null
null
null
rnn_space1/genotypes.py
Sette/CoNAS
19b061fb7177fb2d2b0eca94f16e8d4b57178859
[ "Apache-2.0" ]
null
null
null
rnn_space1/genotypes.py
Sette/CoNAS
19b061fb7177fb2d2b0eca94f16e8d4b57178859
[ "Apache-2.0" ]
null
null
null
from collections import namedtuple Genotype = namedtuple('Genotype', 'recurrent concat') PRIMITIVES = [ 'none', 'relu', 'sigmoid', 'identity' ] STEPS = 8 CONCAT = 8 ENAS = Genotype( recurrent = [ ('tanh', 0), ('tanh', 1), ('relu', 1), ('tanh', 3), ('tanh', ...
23.305556
165
0.466031
from collections import namedtuple Genotype = namedtuple('Genotype', 'recurrent concat') PRIMITIVES = [ 'none', 'relu', 'sigmoid', 'identity' ] STEPS = 8 CONCAT = 8 ENAS = Genotype( recurrent = [ ('tanh', 0), ('tanh', 1), ('relu', 1), ('tanh', 3), ('tanh', ...
0
0
0
5a6f449a39d5bd1dfc324b5744c4c9bd209e735e
4,757
py
Python
cgt_calc/model.py
quentin389/capital-gains-calculator
63641e19d5479499e1de1e28d3c9672b35f7e2dd
[ "MIT" ]
13
2021-04-21T21:08:35.000Z
2022-02-28T22:58:38.000Z
cgt_calc/model.py
quentin389/capital-gains-calculator
63641e19d5479499e1de1e28d3c9672b35f7e2dd
[ "MIT" ]
19
2021-05-09T10:20:25.000Z
2022-03-29T16:11:46.000Z
cgt_calc/model.py
quentin389/capital-gains-calculator
63641e19d5479499e1de1e28d3c9672b35f7e2dd
[ "MIT" ]
9
2021-05-03T16:52:50.000Z
2022-02-28T21:22:59.000Z
"""Model classes.""" from __future__ import annotations from dataclasses import dataclass import datetime from decimal import Decimal from enum import Enum from typing import Dict, List from .util import round_decimal @dataclass class HmrcTransactionData: """Hmrc transaction figures.""" quantity: Decimal ...
28.656627
88
0.6214
"""Model classes.""" from __future__ import annotations from dataclasses import dataclass import datetime from decimal import Decimal from enum import Enum from typing import Dict, List from .util import round_decimal @dataclass class HmrcTransactionData: """Hmrc transaction figures.""" quantity: Decimal ...
0
0
0
063c484f9eddf70dfded77b0c89313a086c04b30
218
py
Python
coop_bar/apps.py
BenjaminCherpas/coop-bar
6e5583e08ff6f651b663720e85b0b44cbccc7aab
[ "BSD-3-Clause" ]
null
null
null
coop_bar/apps.py
BenjaminCherpas/coop-bar
6e5583e08ff6f651b663720e85b0b44cbccc7aab
[ "BSD-3-Clause" ]
null
null
null
coop_bar/apps.py
BenjaminCherpas/coop-bar
6e5583e08ff6f651b663720e85b0b44cbccc7aab
[ "BSD-3-Clause" ]
1
2019-09-09T11:40:06.000Z
2019-09-09T11:40:06.000Z
# -*- coding: utf-8 -*- """ Customizable tool bar """ from __future__ import unicode_literals from django.apps import AppConfig
16.769231
39
0.711009
# -*- coding: utf-8 -*- """ Customizable tool bar """ from __future__ import unicode_literals from django.apps import AppConfig class CoopBarAppConfig(AppConfig): name = 'coop_bar' verbose_name = "coop Bar"
0
65
23
0dde81c70adbf29bc3794f9e088aa4f58943621a
963
py
Python
pdfs/Commands/Attach.py
tmearnest/sbd
92e59ed6286ff7b6a036688db086e47951f07cdd
[ "MIT" ]
null
null
null
pdfs/Commands/Attach.py
tmearnest/sbd
92e59ed6286ff7b6a036688db086e47951f07cdd
[ "MIT" ]
null
null
null
pdfs/Commands/Attach.py
tmearnest/sbd
92e59ed6286ff7b6a036688db086e47951f07cdd
[ "MIT" ]
null
null
null
from .Command import Command from .Completers import citekeyCompleter from argcomplete.completers import FilesCompleter
35.666667
117
0.661475
from .Command import Command from .Completers import citekeyCompleter from argcomplete.completers import FilesCompleter class Attach(Command): command = 'attach' help = "Attach a supplementary file" def set_args(self, subparser): subparser.add_argument('key', metavar='CITE_KEY', type=str).complet...
701
119
23
afd967c3188fbb324693e3925d0624ce1f560347
1,044
py
Python
ichnaea/alembic/versions/cad2875fd8cb_extend_api_keys.py
crankycoder/ichnaea
fb54000e92c605843b7a41521e36fd648c11ae94
[ "Apache-2.0" ]
1
2018-01-18T16:02:43.000Z
2018-01-18T16:02:43.000Z
ichnaea/alembic/versions/cad2875fd8cb_extend_api_keys.py
crankycoder/ichnaea
fb54000e92c605843b7a41521e36fd648c11ae94
[ "Apache-2.0" ]
null
null
null
ichnaea/alembic/versions/cad2875fd8cb_extend_api_keys.py
crankycoder/ichnaea
fb54000e92c605843b7a41521e36fd648c11ae94
[ "Apache-2.0" ]
1
2018-01-19T17:56:48.000Z
2018-01-19T17:56:48.000Z
"""Extend api keys with sample_store columns. Revision ID: cad2875fd8cb Revises: 385f842b2526 Create Date: 2017-02-22 11:52:47.837989 """ import logging from alembic import op import sqlalchemy as sa log = logging.getLogger('alembic.migration') revision = 'cad2875fd8cb' down_revision = '385f842b2526'
24.27907
63
0.672414
"""Extend api keys with sample_store columns. Revision ID: cad2875fd8cb Revises: 385f842b2526 Create Date: 2017-02-22 11:52:47.837989 """ import logging from alembic import op import sqlalchemy as sa log = logging.getLogger('alembic.migration') revision = 'cad2875fd8cb' down_revision = '385f842b2526' def upgrade...
689
0
46
501b7c9a2ec7eabd0acaa2501e9da9fd088e3bb7
342
py
Python
hello/home/migrations/0008_remove_category_slug.py
pratikd2124/Online-Library
e93ef1f42476d9f1b4b814f0a8254fd8cfbee178
[ "MIT" ]
null
null
null
hello/home/migrations/0008_remove_category_slug.py
pratikd2124/Online-Library
e93ef1f42476d9f1b4b814f0a8254fd8cfbee178
[ "MIT" ]
null
null
null
hello/home/migrations/0008_remove_category_slug.py
pratikd2124/Online-Library
e93ef1f42476d9f1b4b814f0a8254fd8cfbee178
[ "MIT" ]
null
null
null
# Generated by Django 3.1.3 on 2020-12-04 11:44 from django.db import migrations
19
48
0.55848
# Generated by Django 3.1.3 on 2020-12-04 11:44 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('home', '0007_auto_20201204_1711'), ] operations = [ migrations.RemoveField( model_name='category', name='slug'...
0
230
25
0276380d0e3e8ed8b8c414b76de322738320d63d
281
py
Python
glitter/tests/urls.py
dhamaniasad/django-glitter
b9b0a3d8b49d5d9b840656f84564ba0a6e016f98
[ "BSD-3-Clause" ]
3
2017-06-01T16:22:18.000Z
2018-08-22T21:45:55.000Z
glitter/tests/urls.py
blancltd/django-glitter
b9b0a3d8b49d5d9b840656f84564ba0a6e016f98
[ "BSD-3-Clause" ]
85
2016-02-25T10:34:03.000Z
2017-04-03T11:07:59.000Z
glitter/tests/urls.py
blancltd/django-glitter
b9b0a3d8b49d5d9b840656f84564ba0a6e016f98
[ "BSD-3-Clause" ]
1
2016-08-02T08:21:19.000Z
2016-08-02T08:21:19.000Z
from django.conf.urls import include, url from django.contrib import admin from glitter.blockadmin import blocks urlpatterns = [ # Django admin url(r'^admin/', include(admin.site.urls)), # Glitter block admin url(r'^blockadmin/', include(blocks.site.urls)), ]
18.733333
52
0.704626
from django.conf.urls import include, url from django.contrib import admin from glitter.blockadmin import blocks urlpatterns = [ # Django admin url(r'^admin/', include(admin.site.urls)), # Glitter block admin url(r'^blockadmin/', include(blocks.site.urls)), ]
0
0
0
a84ce8da40082bc47dcc1ec10e32fb650ba76ef4
637
py
Python
plot_rectangles.py
bmtgoncalves/EABDA17
c1e7579018da2b26c109967a0c1b3cc82bb26456
[ "MIT" ]
6
2017-07-05T17:17:22.000Z
2017-08-02T18:49:16.000Z
plot_rectangles.py
bmtgoncalves/EABDA17
c1e7579018da2b26c109967a0c1b3cc82bb26456
[ "MIT" ]
null
null
null
plot_rectangles.py
bmtgoncalves/EABDA17
c1e7579018da2b26c109967a0c1b3cc82bb26456
[ "MIT" ]
2
2017-07-05T20:40:55.000Z
2020-06-08T10:47:02.000Z
import json import matplotlib.pyplot as plt import matplotlib.patches as patches reverse_result = json.load(open('reverse.json')) #gmaps.reverse_geocode((40.6413111,-73.77813909999999)) plt.figure() plt.xlim(-130,-65) plt.ylim(20,50) currentAxis = plt.gca() for result in reverse_result: viewport = result["geometry...
30.333333
104
0.726845
import json import matplotlib.pyplot as plt import matplotlib.patches as patches reverse_result = json.load(open('reverse.json')) #gmaps.reverse_geocode((40.6413111,-73.77813909999999)) plt.figure() plt.xlim(-130,-65) plt.ylim(20,50) currentAxis = plt.gca() for result in reverse_result: viewport = result["geometry...
0
0
0
f245bea1215ea6a232a2ccd3c3b270ff9f9eb316
21,199
py
Python
EventDetection/event_detection/postprocessing.py
tomaskala/bachelor-thesis
fd412fba6ecd2838b034423c8f8db48c50c1a558
[ "Unlicense" ]
null
null
null
EventDetection/event_detection/postprocessing.py
tomaskala/bachelor-thesis
fd412fba6ecd2838b034423c8f8db48c50c1a558
[ "Unlicense" ]
null
null
null
EventDetection/event_detection/postprocessing.py
tomaskala/bachelor-thesis
fd412fba6ecd2838b034423c8f8db48c50c1a558
[ "Unlicense" ]
1
2022-03-14T15:56:55.000Z
2022-03-14T15:56:55.000Z
import logging import math from time import time import gensim import numpy as np import sklearn.mixture as gmm from scipy.optimize import curve_fit from scipy.signal import periodogram from scipy.stats import norm WINDOW = 7 # Length of the window to use when computing the moving average. def _moving_average(vect...
45.394004
120
0.707958
import logging import math from time import time import gensim import numpy as np import sklearn.mixture as gmm from scipy.optimize import curve_fit from scipy.signal import periodogram from scipy.stats import norm WINDOW = 7 # Length of the window to use when computing the moving average. def _moving_average(vect...
1,078
0
54
a3abbd327c4401a70daef385d5cd04ab4f5d4d1d
1,954
py
Python
test/resources/catalog/test_lookup.py
shuichiro-makigaki/yandeley-python-sdk
2c15145d11ddfdf33a94da6c846afdd13f310b54
[ "Apache-2.0" ]
null
null
null
test/resources/catalog/test_lookup.py
shuichiro-makigaki/yandeley-python-sdk
2c15145d11ddfdf33a94da6c846afdd13f310b54
[ "Apache-2.0" ]
null
null
null
test/resources/catalog/test_lookup.py
shuichiro-makigaki/yandeley-python-sdk
2c15145d11ddfdf33a94da6c846afdd13f310b54
[ "Apache-2.0" ]
null
null
null
import pytest from yandeley.exception import MendeleyApiException from test import get_client_credentials_session, cassette from test.resources.catalog import assert_core_view, assert_all_view
31.015873
100
0.681679
import pytest from yandeley.exception import MendeleyApiException from test import get_client_credentials_session, cassette from test.resources.catalog import assert_core_view, assert_all_view def test_should_lookup_by_metadata(): session = get_client_credentials_session() with cassette('fixtures/resources/c...
1,665
0
92
c49f82e9562bea586c02fe5798f0c1cd2f88b4fe
674
py
Python
nudgebot/thirdparty/github/organization.py
gshefer/Nudgebot
4cf6cf1fe975a9002299f0460873c0f21bc8d414
[ "MIT" ]
3
2018-04-03T14:34:39.000Z
2018-04-26T12:18:49.000Z
nudgebot/thirdparty/github/organization.py
gshefer/Nudgebot
4cf6cf1fe975a9002299f0460873c0f21bc8d414
[ "MIT" ]
null
null
null
nudgebot/thirdparty/github/organization.py
gshefer/Nudgebot
4cf6cf1fe975a9002299f0460873c0f21bc8d414
[ "MIT" ]
null
null
null
from cached_property import cached_property from github.Organization import Organization as PyGithubOrganization from nudgebot.thirdparty.github.base import PyGithubObjectWrapper, GithubScope
26.96
78
0.728487
from cached_property import cached_property from github.Organization import Organization as PyGithubOrganization from nudgebot.thirdparty.github.base import PyGithubObjectWrapper, GithubScope class Organization(PyGithubObjectWrapper, GithubScope): PyGithubClass = PyGithubOrganization primary_keys = ['organi...
209
247
23
56999679bfc622fa996318420e273153a071ad88
2,578
py
Python
people/migrations/0002_interpersonalrelationship.py
SNFernandes24/church-ims
944b7e65e926276adfe376ace01cf0adf135b954
[ "MIT" ]
1
2021-09-11T17:22:37.000Z
2021-09-11T17:22:37.000Z
people/migrations/0002_interpersonalrelationship.py
SNFernandes24/church-ims
944b7e65e926276adfe376ace01cf0adf135b954
[ "MIT" ]
39
2021-06-26T02:01:37.000Z
2021-07-14T17:11:53.000Z
people/migrations/0002_interpersonalrelationship.py
SNFernandes24/church-ims
944b7e65e926276adfe376ace01cf0adf135b954
[ "MIT" ]
2
2021-07-19T08:00:58.000Z
2022-02-05T16:38:02.000Z
# Generated by Django 3.2.7 on 2021-10-15 12:35 import uuid import django.db.models.deletion from django.conf import settings from django.db import migrations, models
33.051282
84
0.396043
# Generated by Django 3.2.7 on 2021-10-15 12:35 import uuid import django.db.models.deletion from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("people", "0...
0
2,385
23
2ccd0612fa94ede1dc1cddb23fd698b50e0cc848
1,084
py
Python
pipe/src/api/auth.py
dfrnks/power-bi-publish
b57ddae47d717cc48f40ff5142280386aef7dab6
[ "Apache-2.0" ]
null
null
null
pipe/src/api/auth.py
dfrnks/power-bi-publish
b57ddae47d717cc48f40ff5142280386aef7dab6
[ "Apache-2.0" ]
null
null
null
pipe/src/api/auth.py
dfrnks/power-bi-publish
b57ddae47d717cc48f40ff5142280386aef7dab6
[ "Apache-2.0" ]
null
null
null
import requests from bitbucket_pipes_toolkit import get_logger logger = get_logger() def getToken(client_id: str, client_secret: str, username: str, password: str) -> str: """ :param client_id: Client ID of Auth Azure App :param client_secret: Client Secret of Auth Azuere App :param username: Usernam...
28.526316
86
0.670664
import requests from bitbucket_pipes_toolkit import get_logger logger = get_logger() def getToken(client_id: str, client_secret: str, username: str, password: str) -> str: """ :param client_id: Client ID of Auth Azure App :param client_secret: Client Secret of Auth Azuere App :param username: Usernam...
0
0
0
c12cbbf3fb13f2b2f3f167615c7dc80e8c594a0e
435
py
Python
tf_keras_vis/utils/losses.py
luizsantos-1/tf-keras-vis
4d26dc9c65270f738987b653d5956ea082c35c2b
[ "MIT" ]
232
2019-12-20T13:03:03.000Z
2022-03-30T11:56:22.000Z
tf_keras_vis/utils/losses.py
luizsantos-1/tf-keras-vis
4d26dc9c65270f738987b653d5956ea082c35c2b
[ "MIT" ]
63
2020-01-31T20:57:20.000Z
2022-03-15T09:45:47.000Z
tf_keras_vis/utils/losses.py
luizsantos-1/tf-keras-vis
4d26dc9c65270f738987b653d5956ea082c35c2b
[ "MIT" ]
32
2020-01-31T07:55:08.000Z
2022-03-01T15:46:26.000Z
import warnings warnings.warn(('`tf_keras_vis.utils.losses` module is deprecated. ' 'Please use `tf_keras_vis.utils.scores` instead.'), DeprecationWarning) from .scores import BinaryScore as BinaryLoss # noqa: F401 E402 from .scores import CategoricalScore as CategoricalLoss # noqa: F401 E402 from .s...
43.5
86
0.758621
import warnings warnings.warn(('`tf_keras_vis.utils.losses` module is deprecated. ' 'Please use `tf_keras_vis.utils.scores` instead.'), DeprecationWarning) from .scores import BinaryScore as BinaryLoss # noqa: F401 E402 from .scores import CategoricalScore as CategoricalLoss # noqa: F401 E402 from .s...
0
0
0
365f60c075470937679c80b9a931ae24ff4d4ea9
2,107
py
Python
tests/functional/test_home.py
tomaszkyc/timely
3fc2953a4dc250b885683dea38892ade68a63cf2
[ "MIT" ]
null
null
null
tests/functional/test_home.py
tomaszkyc/timely
3fc2953a4dc250b885683dea38892ade68a63cf2
[ "MIT" ]
null
null
null
tests/functional/test_home.py
tomaszkyc/timely
3fc2953a4dc250b885683dea38892ade68a63cf2
[ "MIT" ]
null
null
null
from flask import Flask from flask.testing import FlaskClient from app.auth.views import current_user from app.models import User, db from tests.conftest import login, logout
29.676056
82
0.695776
from flask import Flask from flask.testing import FlaskClient from app.auth.views import current_user from app.models import User, db from tests.conftest import login, logout def test_home_page(test_client: FlaskClient): # given a flask app # when we access a main page response = test_client.get('/') ...
1,835
0
92
7a0bde60bc197d7f0851b6e558656030d3db2816
5,254
py
Python
foodwebviz/normalization.py
lpawluczuk/foodwebviz
11dc6d49e33634ca074f597b9eef0f146c350bcf
[ "BSD-3-Clause" ]
1
2022-03-08T13:53:26.000Z
2022-03-08T13:53:26.000Z
foodwebviz/normalization.py
lpawluczuk/foodwebviz
11dc6d49e33634ca074f597b9eef0f146c350bcf
[ "BSD-3-Clause" ]
2
2021-11-15T14:05:09.000Z
2022-02-19T10:27:57.000Z
foodwebviz/normalization.py
lpawluczuk/foodwebviz
11dc6d49e33634ca074f597b9eef0f146c350bcf
[ "BSD-3-Clause" ]
null
null
null
'''Methods for foodweb's flow normalization.''' import numpy as np import networkx as nx __all__ = [ 'diet_normalization', 'log_normalization', 'donor_control_normalization', 'predator_control_normalization', 'mixed_control_normalization', 'tst_normalization' ] def diet_normalization(foodweb...
32.036585
107
0.643319
'''Methods for foodweb's flow normalization.''' import numpy as np import networkx as nx __all__ = [ 'diet_normalization', 'log_normalization', 'donor_control_normalization', 'predator_control_normalization', 'mixed_control_normalization', 'tst_normalization' ] def diet_normalization(foodweb...
88
0
27
7d2450975e46e1a7e021b1ac10446a7a4e4e5951
58,131
py
Python
tests/pytests/unit/modules/file/test_file_line.py
tomdoherty/salt
f87d5d7abbf9777773c4d91fdafecb8b1a728e76
[ "Apache-2.0" ]
9,425
2015-01-01T05:59:24.000Z
2022-03-31T20:44:05.000Z
tests/pytests/unit/modules/file/test_file_line.py
tomdoherty/salt
f87d5d7abbf9777773c4d91fdafecb8b1a728e76
[ "Apache-2.0" ]
33,507
2015-01-01T00:19:56.000Z
2022-03-31T23:48:20.000Z
tests/pytests/unit/modules/file/test_file_line.py
tomdoherty/salt
f87d5d7abbf9777773c4d91fdafecb8b1a728e76
[ "Apache-2.0" ]
5,810
2015-01-01T19:11:45.000Z
2022-03-31T02:37:20.000Z
""" Unit tests for file.line """ import logging import os import shutil import pytest import salt.config import salt.loader import salt.modules.cmdmod as cmdmod import salt.modules.config as configmod import salt.modules.file as filemod import salt.utils.data import salt.utils.files import salt.utils.platform import ...
32.548152
122
0.609141
""" Unit tests for file.line """ import logging import os import shutil import pytest import salt.config import salt.loader import salt.modules.cmdmod as cmdmod import salt.modules.config as configmod import salt.modules.file as filemod import salt.utils.data import salt.utils.files import salt.utils.platform import ...
23,875
213
1,192
ed835385395a5601164493a32dc19585e695d9d6
4,161
py
Python
delta/utils/loss/loss_utils.py
awesome-archive/delta
841d853cf0bdb479260be112432813dcb705f859
[ "Apache-2.0" ]
1
2019-09-27T10:21:00.000Z
2019-09-27T10:21:00.000Z
delta/utils/loss/loss_utils.py
awesome-archive/delta
841d853cf0bdb479260be112432813dcb705f859
[ "Apache-2.0" ]
null
null
null
delta/utils/loss/loss_utils.py
awesome-archive/delta
841d853cf0bdb479260be112432813dcb705f859
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2017 Beijing Didi Infinity Technology and Development Co.,Ltd. # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LI...
30.822222
84
0.666667
# Copyright (C) 2017 Beijing Didi Infinity Technology and Development Co.,Ltd. # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LI...
0
0
0
83ba14a36750a86a9eb2314b57f509887f4e4346
2,720
py
Python
IO/Legacy/Testing/Python/TestExtentWriting.py
forestGzh/VTK
bc98327275bd5cfa95c5825f80a2755a458b6da8
[ "BSD-3-Clause" ]
1,755
2015-01-03T06:55:00.000Z
2022-03-29T05:23:26.000Z
IO/Legacy/Testing/Python/TestExtentWriting.py
forestGzh/VTK
bc98327275bd5cfa95c5825f80a2755a458b6da8
[ "BSD-3-Clause" ]
29
2015-04-23T20:58:30.000Z
2022-03-02T16:16:42.000Z
IO/Legacy/Testing/Python/TestExtentWriting.py
forestGzh/VTK
bc98327275bd5cfa95c5825f80a2755a458b6da8
[ "BSD-3-Clause" ]
1,044
2015-01-05T22:48:27.000Z
2022-03-31T02:38:26.000Z
#!/usr/bin/env python import os import vtk # # If the current directory is writable, then test the witers # try: channel = open("test.tmp", "w") channel.close() os.remove("test.tmp") s = vtk.vtkRTAnalyticSource() s.SetWholeExtent(5, 10, 5, 10, 5, 10) s.Update() d = s.GetOutput() w ...
22.113821
65
0.615074
#!/usr/bin/env python import os import vtk # # If the current directory is writable, then test the witers # try: channel = open("test.tmp", "w") channel.close() os.remove("test.tmp") s = vtk.vtkRTAnalyticSource() s.SetWholeExtent(5, 10, 5, 10, 5, 10) s.Update() d = s.GetOutput() w ...
0
0
0
e3b48257343ad20d6a5aa171258d96e849b9119d
293
py
Python
examples/sns_basic.py
sbalnojan/tropo-mods
63ef70b84ff6d3fb2bbaeea94193e06e1fc64f63
[ "Apache-2.0" ]
null
null
null
examples/sns_basic.py
sbalnojan/tropo-mods
63ef70b84ff6d3fb2bbaeea94193e06e1fc64f63
[ "Apache-2.0" ]
null
null
null
examples/sns_basic.py
sbalnojan/tropo-mods
63ef70b84ff6d3fb2bbaeea94193e06e1fc64f63
[ "Apache-2.0" ]
null
null
null
import tropo_mods.auto_sns as auto_sns from troposphere import Template t = Template() my_instance = auto_sns.AutoSNS( t, topic_name="my_new_topic", email="test@me.com" ) my_instance.print_to_yaml() # should also produce: ARN as output (?) # should also produce: Subscription to E-Mail
22.538462
53
0.761092
import tropo_mods.auto_sns as auto_sns from troposphere import Template t = Template() my_instance = auto_sns.AutoSNS( t, topic_name="my_new_topic", email="test@me.com" ) my_instance.print_to_yaml() # should also produce: ARN as output (?) # should also produce: Subscription to E-Mail
0
0
0
10db872e231b76f45d443050215a531d2b410c03
1,638
py
Python
rul_prediction/cnn.py
inovex/RCIS2021-degradation-bearing-vessels
27bd1a2e3f08c5b42011596aa98e5ac627a416d6
[ "MIT" ]
2
2021-06-21T11:40:38.000Z
2021-12-29T02:40:30.000Z
rul_prediction/cnn.py
chenzhengkun7/RCIS2021-degradation-estimation-bearing-vessels
27bd1a2e3f08c5b42011596aa98e5ac627a416d6
[ "MIT" ]
2
2021-04-08T11:30:28.000Z
2021-04-12T06:41:31.000Z
rul_prediction/cnn.py
chenzhengkun7/RCIS2021-degradation-estimation-bearing-vessels
27bd1a2e3f08c5b42011596aa98e5ac627a416d6
[ "MIT" ]
2
2021-06-21T11:40:43.000Z
2021-12-29T02:36:51.000Z
import pandas as pd import numpy as np from tensorflow.keras import layers, Input, Model if __name__ == '__main__': mod = build_multiscale_cnn((129, 21, 2)) """ REN ET AL. 2018 FOR FEATURE EXTRACTION e.g. FREQUENCY IMAGE Generation based non FFT ZHU ET AL. 2019 for multisclae CNN applied to PRONOSTIA DING ET AL...
37.227273
109
0.710012
import pandas as pd import numpy as np from tensorflow.keras import layers, Input, Model def build_multiscale_cnn(input_shape: tuple) -> Model: input_img = Input(shape=input_shape) conv_1 = layers.Conv2D(10, (6, 6))(input_img) max_pool_1 = layers.MaxPool2D((2, 2))(conv_1) max_pool_1 = layers.BatchNorm...
1,159
0
46
76cc5c691e45f74a9fa2f2a6908c30288c9db878
1,726
py
Python
FakeUAdb.py
aoii103/FakeUA
ae52d9e681b17daaa3d8f4d94a23dfe503991771
[ "MIT" ]
32
2018-11-06T09:42:58.000Z
2020-10-29T09:05:45.000Z
FakeUAdb.py
s045pd/FakeUA
ae52d9e681b17daaa3d8f4d94a23dfe503991771
[ "MIT" ]
null
null
null
FakeUAdb.py
s045pd/FakeUA
ae52d9e681b17daaa3d8f4d94a23dfe503991771
[ "MIT" ]
18
2019-04-09T02:59:16.000Z
2020-08-11T15:53:26.000Z
import hashlib from peewee import * db = SqliteDatabase('useragents.db') # 初始化数据库 db.connect() # 连接数据库 db.create_tables([UAS]) # 初始化创建不存在的库 def UserAgent(searchwords, methods='and'): """ { "key":[ "words1", "words2" ] } """ count ...
27.396825
178
0.585747
import hashlib from peewee import * db = SqliteDatabase('useragents.db') # 初始化数据库 class UAS(Model): uid = AutoField(primary_key=True, null=True) # 自增ID useragent = TextField(unique=True) # useragent software = CharField(null=True) # 软件类型 engine = CharField(null=True) # 引擎 types = CharField(null=...
359
356
46
9a95379a056d4588b1928abd578dfa7bdbdfc7bd
952
py
Python
src/sensors/mqtt.py
jussike/kuappi
985040dc813c023dc1577f31ca7f6744d42c91de
[ "MIT" ]
null
null
null
src/sensors/mqtt.py
jussike/kuappi
985040dc813c023dc1577f31ca7f6744d42c91de
[ "MIT" ]
null
null
null
src/sensors/mqtt.py
jussike/kuappi
985040dc813c023dc1577f31ca7f6744d42c91de
[ "MIT" ]
null
null
null
import json import logging import paho.mqtt.client as mqtt from abstract import AbstractSensor from config import CONFIG
27.2
57
0.652311
import json import logging import paho.mqtt.client as mqtt from abstract import AbstractSensor from config import CONFIG class MqttSensor(AbstractSensor): def __init__(self): self.client_id = CONFIG.get('mqtt_client') self.data = None self.client = mqtt.Client( CONFIG.get('mqt...
661
12
157
9e70d61c82870a3006a17805a98c695863eb7fb2
190
py
Python
test_settings.py
canarduck/django-picklefield
2c188c4815c868fce2ed38e25bc9d8d994b3d5ae
[ "MIT" ]
null
null
null
test_settings.py
canarduck/django-picklefield
2c188c4815c868fce2ed38e25bc9d8d994b3d5ae
[ "MIT" ]
null
null
null
test_settings.py
canarduck/django-picklefield
2c188c4815c868fce2ed38e25bc9d8d994b3d5ae
[ "MIT" ]
null
null
null
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', }, } INSTALLED_APPS = [ 'picklefield', ] SECRET_KEY = 'local' SILENCED_SYSTEM_CHECKS = ['1_7.W001']
13.571429
47
0.6
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', }, } INSTALLED_APPS = [ 'picklefield', ] SECRET_KEY = 'local' SILENCED_SYSTEM_CHECKS = ['1_7.W001']
0
0
0
0a18960273edd755f150a40fc800e3fa2e4d2ddd
1,013
py
Python
jiraniapp/admin.py
Steve-design/Jirani
e386b1ede05f6c2067af2621c21ce802ec72ae73
[ "MIT" ]
null
null
null
jiraniapp/admin.py
Steve-design/Jirani
e386b1ede05f6c2067af2621c21ce802ec72ae73
[ "MIT" ]
8
2020-02-12T03:21:51.000Z
2022-03-12T00:07:01.000Z
jiraniapp/admin.py
Steve-design/Jirani
e386b1ede05f6c2067af2621c21ce802ec72ae73
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from django.contrib import admin from django.contrib import admin from jiraniapp.models import * admin.site.register(Location) admin.site.register(tags) admin.site.register(Image, ImageAdmin) admin.site.register(Profile, ProfileAdmin) admin.site.register(Project, ProjectAdmin)...
29.794118
114
0.760118
from __future__ import unicode_literals from django.contrib import admin from django.contrib import admin from jiraniapp.models import * class ImageAdmin(admin.ModelAdmin): filter_horizontal = ('tags',) class ProjectAdmin(admin.ModelAdmin): list_display = ('title',) class ProfileAdmin(admin.ModelAdmin): ...
0
481
115
6ca84774140ca7829672a7d1d772a57adf023497
1,605
py
Python
exercises/05_Listas/exe_10.py
MariaTrindade/CursoPython
2c60dd670747db08011d9dd33e3bbfd5795b06e8
[ "Apache-2.0" ]
1
2021-05-11T18:30:17.000Z
2021-05-11T18:30:17.000Z
exercises/05_Listas/exe_10.py
MariaTrindade/CursoPython
2c60dd670747db08011d9dd33e3bbfd5795b06e8
[ "Apache-2.0" ]
null
null
null
exercises/05_Listas/exe_10.py
MariaTrindade/CursoPython
2c60dd670747db08011d9dd33e3bbfd5795b06e8
[ "Apache-2.0" ]
null
null
null
""" Em uma competição de salto em distância cada atleta tem direito a cinco saltos. O resultado do atleta será determinado pela média dos cinco saltos. Você deve fazer um programa que receba o nome e as cinco distâncias alcançadas pelo atleta em seus saltos e depois informe o nome, os saltos e a média dos saltos. O pro...
29.181818
117
0.612461
""" Em uma competição de salto em distância cada atleta tem direito a cinco saltos. O resultado do atleta será determinado pela média dos cinco saltos. Você deve fazer um programa que receba o nome e as cinco distâncias alcançadas pelo atleta em seus saltos e depois informe o nome, os saltos e a média dos saltos. O pro...
0
0
0
898b93bc72cd79221ca90d1e6f7205455077f2c2
1,888
py
Python
site/iot_project/house_control/views.py
ProjetoSD-2022/Projeto-02
5bfd70310f748ecba0eb5a2c754020306bec6355
[ "MIT" ]
null
null
null
site/iot_project/house_control/views.py
ProjetoSD-2022/Projeto-02
5bfd70310f748ecba0eb5a2c754020306bec6355
[ "MIT" ]
null
null
null
site/iot_project/house_control/views.py
ProjetoSD-2022/Projeto-02
5bfd70310f748ecba0eb5a2c754020306bec6355
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.http import JsonResponse import serial # Create your views here. # def acende_led(request): # global init # if request.method == 'POST': # try: # ledCommand = request.POST.get('ledCommand') # if ledCommand != 'H' or...
33.122807
95
0.520127
from django.shortcuts import render from django.http import JsonResponse import serial # Create your views here. def index(request): #Essa funçao juntará as informaçoes iniciais e renderizará de acordo com o que for passado titulo = "Bem vindo ao sistema de controle inteligente GABIN" return render...
878
0
48
a674189feb88dd6d08e0c93bee738cca08762b3e
4,609
py
Python
ap/verification/Control_Server/core.py
MakerPro/TwOpenRobot
ff9c2bcb474613cc1716673a04172fc25b7f0369
[ "MIT" ]
1
2015-11-09T05:56:48.000Z
2015-11-09T05:56:48.000Z
ap/verification/Control_Server/core.py
MakerPro/TwOpenRobot
ff9c2bcb474613cc1716673a04172fc25b7f0369
[ "MIT" ]
null
null
null
ap/verification/Control_Server/core.py
MakerPro/TwOpenRobot
ff9c2bcb474613cc1716673a04172fc25b7f0369
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import platform, serial, serial.tools.list_ports, time from ctypes import c_ushort #debug hack import json import glob import time __author__ = 'Kazuyuki TAKASE' __author__ = 'Yugo KAJIWARA' __copyright__ = 'PLEN Project Company Ltd., and all authors.' __license__ = 'The MIT License'...
23.757732
93
0.620742
# -*- coding: utf-8 -*- import platform, serial, serial.tools.list_ports, time from ctypes import c_ushort #debug hack import json import glob import time __author__ = 'Kazuyuki TAKASE' __author__ = 'Yugo KAJIWARA' __copyright__ = 'PLEN Project Company Ltd., and all authors.' __license__ = 'The MIT License'...
4,147
-10
266
8dbecd9aff2be8395087262041a1354fff2ecb75
6,066
py
Python
test/test_authorization_code_validator.py
danirod/dummyauth
f21ddda21dd3eed202d36399419f6e77d3a438ae
[ "0BSD" ]
1
2020-04-05T23:54:56.000Z
2020-04-05T23:54:56.000Z
test/test_authorization_code_validator.py
danirod/dummyauth
f21ddda21dd3eed202d36399419f6e77d3a438ae
[ "0BSD" ]
1
2019-10-01T20:48:21.000Z
2019-10-01T20:48:50.000Z
test/test_authorization_code_validator.py
danirod/dummyauth
f21ddda21dd3eed202d36399419f6e77d3a438ae
[ "0BSD" ]
null
null
null
import httpretty import sure from dummyauth.spider import AuthorizationCodeValidator from unittest import TestCase
48.919355
85
0.600725
import httpretty import sure from dummyauth.spider import AuthorizationCodeValidator from unittest import TestCase class AuthorizationCodeValidatorTestCase(TestCase): @httpretty.httprettified def test_spider_handles_valid_requests(self): httpretty.register_uri(httpretty.POST, 'http://auth.example.com/...
5,450
478
23
d4592081e6abe7ce60aab9eac049481530951526
2,296
py
Python
pink/context.py
Fogapod/pink
827eb32d476a04cef1f01f74a920e1f124c37364
[ "MIT" ]
null
null
null
pink/context.py
Fogapod/pink
827eb32d476a04cef1f01f74a920e1f124c37364
[ "MIT" ]
3
2021-02-19T16:48:05.000Z
2021-02-19T19:17:53.000Z
pink/context.py
Fogapod/pink
827eb32d476a04cef1f01f74a920e1f124c37364
[ "MIT" ]
3
2021-02-18T12:39:32.000Z
2021-02-19T18:55:02.000Z
from typing import Any, Union, Optional import edgedb import aiohttp import discord from discord.ext import commands from .hookable import AsyncHookable
26.390805
81
0.61716
from typing import Any, Union, Optional import edgedb import aiohttp import discord from discord.ext import commands from .hookable import AsyncHookable class Context(commands.Context, AsyncHookable): @property def prefix(self) -> str: return self._prefix # type: ignore @prefix.setter def...
1,670
446
23
a2e36c7f286e278a53f3ef4c84bbf305131d40ae
4,578
py
Python
dataset/data.py
patrikmaric/COVID19-search-engine
42921d4a1fcb1b3dcc7e5936b75377a766102ca7
[ "MIT" ]
4
2020-06-07T09:33:27.000Z
2021-11-25T15:28:32.000Z
dataset/data.py
patrikmaric/COVID19-search-engine
42921d4a1fcb1b3dcc7e5936b75377a766102ca7
[ "MIT" ]
null
null
null
dataset/data.py
patrikmaric/COVID19-search-engine
42921d4a1fcb1b3dcc7e5936b75377a766102ca7
[ "MIT" ]
4
2020-06-05T12:47:40.000Z
2021-11-25T15:28:05.000Z
import json from pathlib import Path import pandas as pd import tqdm from nltk import sent_tokenize from dataset.preprocessing.preprocessing import preprocess_data from dataset.util import extract_data_from_dict from dataset.util import join_abstract_text #from preprocessing.preprocessing import preprocess_data #from...
39.465517
149
0.595238
import json from pathlib import Path import pandas as pd import tqdm from nltk import sent_tokenize from dataset.preprocessing.preprocessing import preprocess_data from dataset.util import extract_data_from_dict from dataset.util import join_abstract_text #from preprocessing.preprocessing import preprocess_data #from...
650
3,400
23
0c5ec564b893c0e239a70c823a87ff929d623b9b
1,635
py
Python
storm_control/dave/update_generator.py
shiwei23/STORM6
669067503ebd164b575ce529fcc4a9a3f576b3d7
[ "MIT" ]
47
2015-02-11T16:05:54.000Z
2022-03-26T14:13:12.000Z
storm_control/dave/update_generator.py
shiwei23/STORM6
669067503ebd164b575ce529fcc4a9a3f576b3d7
[ "MIT" ]
110
2015-01-30T03:53:41.000Z
2021-11-03T15:58:44.000Z
storm_control/dave/update_generator.py
shiwei23/STORM6
669067503ebd164b575ce529fcc4a9a3f576b3d7
[ "MIT" ]
61
2015-01-09T18:31:27.000Z
2021-12-21T13:07:51.000Z
#!/usr/bin/python # ## @file # # Generate HTML for Dave web update & upload it to # a webserver using the the DAV protocol and the # tinydav library, available here: # # http://code.google.com/p/tinydav/ # # This is not used. # # Hazen 08/11 # import time import tinydav
27.25
80
0.625688
#!/usr/bin/python # ## @file # # Generate HTML for Dave web update & upload it to # a webserver using the the DAV protocol and the # tinydav library, available here: # # http://code.google.com/p/tinydav/ # # This is not used. # # Hazen 08/11 # import time import tinydav class HTMLUpdate(object): def __init__(self...
1,174
4
184
1c0a8e9a6d73b236560d63e413673b60a9ca7854
137
py
Python
desafio021.py
WebertiBarbosa/python
640a70c327c262d4e867a4b4620ca50d42398c00
[ "MIT" ]
null
null
null
desafio021.py
WebertiBarbosa/python
640a70c327c262d4e867a4b4620ca50d42398c00
[ "MIT" ]
1
2020-06-06T21:34:44.000Z
2020-06-06T21:44:58.000Z
desafio021.py
WebertiBarbosa/python
640a70c327c262d4e867a4b4620ca50d42398c00
[ "MIT" ]
null
null
null
import pygame pygame.mixer.init() pygame.mixer.music.load('ex021.mp3') pygame.mixer.music.play() #pygame.event.wait() input('Agora sim')
19.571429
36
0.751825
import pygame pygame.mixer.init() pygame.mixer.music.load('ex021.mp3') pygame.mixer.music.play() #pygame.event.wait() input('Agora sim')
0
0
0
3e36e30485bb67dc452ba3ccca0327ccdca04d87
8,864
py
Python
internal/detectors/tf/tf_detection.py
williamcorsel/teNNo
67c088f0303e6c53628e2c52c7fcecb9cfdcda62
[ "Apache-2.0" ]
null
null
null
internal/detectors/tf/tf_detection.py
williamcorsel/teNNo
67c088f0303e6c53628e2c52c7fcecb9cfdcda62
[ "Apache-2.0" ]
null
null
null
internal/detectors/tf/tf_detection.py
williamcorsel/teNNo
67c088f0303e6c53628e2c52c7fcecb9cfdcda62
[ "Apache-2.0" ]
2
2021-11-22T08:26:08.000Z
2022-01-19T13:11:04.000Z
import logging import pathlib import cv2 import numpy as np import six.moves.urllib as urllib import tensorflow as tf from object_detection.utils import ops as utils_ops from object_detection.utils import label_map_util from object_detection.utils import visualization_utils as vis_util from internal.detectors import ...
35.314741
160
0.631656
import logging import pathlib import cv2 import numpy as np import six.moves.urllib as urllib import tensorflow as tf from object_detection.utils import ops as utils_ops from object_detection.utils import label_map_util from object_detection.utils import visualization_utils as vis_util from internal.detectors import ...
4,943
1,831
23
9b5f293b2e9d18e46d9ea7176bb36a877d7985a1
14,738
py
Python
libs/pony/orm/tests/test_diagram_attribute.py
buddyli/android_intership
d4ab90e48472f10623cda9b64b798df924968ab5
[ "Apache-2.0" ]
null
null
null
libs/pony/orm/tests/test_diagram_attribute.py
buddyli/android_intership
d4ab90e48472f10623cda9b64b798df924968ab5
[ "Apache-2.0" ]
null
null
null
libs/pony/orm/tests/test_diagram_attribute.py
buddyli/android_intership
d4ab90e48472f10623cda9b64b798df924968ab5
[ "Apache-2.0" ]
null
null
null
import unittest from pony.orm.core import * from pony.orm.core import Attribute from testutils import * if __name__ == '__main__': unittest.main()
38.989418
127
0.604017
import unittest from pony.orm.core import * from pony.orm.core import Attribute from testutils import * class TestAttribute(unittest.TestCase): @raises_exception(TypeError, "Attribute Entity1.id has unknown option 'another_option'") def test_attribute1(self): db = Database('sqlite', ':memory:') ...
10,541
4,022
23
226b7fd363e77aaf3601b6f6b3b8225f927a009c
15,266
py
Python
apysc/_expression/expression_data_util.py
ynsnf/apysc
b10ffaf76ec6beb187477d0a744fca00e3efc3fb
[ "MIT" ]
null
null
null
apysc/_expression/expression_data_util.py
ynsnf/apysc
b10ffaf76ec6beb187477d0a744fca00e3efc3fb
[ "MIT" ]
null
null
null
apysc/_expression/expression_data_util.py
ynsnf/apysc
b10ffaf76ec6beb187477d0a744fca00e3efc3fb
[ "MIT" ]
null
null
null
"""The implementation of manipulating HTL and js expression files. Mainly following interfaces are defined: - empty_expression : Empty the current js expression data. - append_js_expression : Append js expression. - get_current_expression : Get current expression string. - get_current_event_handler_scope_expre...
27.756364
78
0.641229
"""The implementation of manipulating HTL and js expression files. Mainly following interfaces are defined: - empty_expression : Empty the current js expression data. - append_js_expression : Append js expression. - get_current_expression : Get current expression string. - get_current_event_handler_scope_expre...
0
716
50
a69486b0f500679b3b3fd3b0ed3d7f34e8f9eb69
257
py
Python
flask-app/utils/settings.py
Mongosaurusrex/kibabot
065bc83e5c4ce039af86189a4bca191050266c46
[ "MIT" ]
null
null
null
flask-app/utils/settings.py
Mongosaurusrex/kibabot
065bc83e5c4ce039af86189a4bca191050266c46
[ "MIT" ]
null
null
null
flask-app/utils/settings.py
Mongosaurusrex/kibabot
065bc83e5c4ce039af86189a4bca191050266c46
[ "MIT" ]
null
null
null
from os import environ from dotenv import load_dotenv from pathlib import Path env_path = Path('../.env') load_dotenv(dotenv_path=env_path) MONGODB_CONNECTION_STRING = environ.get('MONGODB_CONNECTION_STRING') JWT_SECRET_KEY = environ.get('JWT_SECRET_KEY')
28.555556
68
0.817121
from os import environ from dotenv import load_dotenv from pathlib import Path env_path = Path('../.env') load_dotenv(dotenv_path=env_path) MONGODB_CONNECTION_STRING = environ.get('MONGODB_CONNECTION_STRING') JWT_SECRET_KEY = environ.get('JWT_SECRET_KEY')
0
0
0
db993994d2354879355f0bcbdfd78bc9b8bfae8d
922
py
Python
opensanctions/crawlers/wd_curated.py
opensanctions/opensanctions
7dff9597f982d8918699b2cde3c7c337a941622d
[ "MIT" ]
23
2022-02-09T12:50:36.000Z
2022-03-30T16:04:19.000Z
opensanctions/crawlers/wd_curated.py
pudo/pepmint
5ef82f63797f40c9c9848dc2872bd9642c9e666a
[ "MIT" ]
10
2022-02-03T08:44:03.000Z
2022-03-21T15:27:40.000Z
opensanctions/crawlers/wd_curated.py
pudo/pepmint
5ef82f63797f40c9c9848dc2872bd9642c9e666a
[ "MIT" ]
2
2022-02-16T11:51:05.000Z
2022-03-02T16:55:08.000Z
import csv from typing import Dict from pantomime.types import CSV from nomenklatura.util import is_qid from opensanctions.core import Context
29.741935
73
0.656182
import csv from typing import Dict from pantomime.types import CSV from nomenklatura.util import is_qid from opensanctions.core import Context def crawl_row(context: Context, row: Dict[str, str]): qid = row.get("qid", "").strip() if not len(qid): return if not is_qid(qid): context.log.war...
730
0
46
11e4f28698d042ea048103df1d79413719a44f57
4,187
py
Python
modules/translate.py
asl97/phenny
0b9901aa2ec221b82be367551040626607196f56
[ "EFL-2.0" ]
null
null
null
modules/translate.py
asl97/phenny
0b9901aa2ec221b82be367551040626607196f56
[ "EFL-2.0" ]
null
null
null
modules/translate.py
asl97/phenny
0b9901aa2ec221b82be367551040626607196f56
[ "EFL-2.0" ]
null
null
null
#!/usr/bin/env python # coding=utf-8 """ translate.py - Phenny Translation Module Copyright 2008, Sean B. Palmer, inamidst.com Licensed under the Eiffel Forum License 2. http://inamidst.com/phenny/ """ import re, urllib import web def tr(phenny, context): """Translates a phrase, with an optional language hint.""...
28.678082
84
0.577979
#!/usr/bin/env python # coding=utf-8 """ translate.py - Phenny Translation Module Copyright 2008, Sean B. Palmer, inamidst.com Licensed under the Eiffel Forum License 2. http://inamidst.com/phenny/ """ import re, urllib import web def translate(text, input='auto', output='en'): raw = False if output.endswith(...
1,604
0
72
9eb7897674e07d6361ca8141ff7f37895824feda
5,503
py
Python
tests/test_cli.py
tcolligan4/Landsat578
c45495db5bd48015a87e44c892b4c473df3f95eb
[ "Apache-2.0" ]
58
2017-04-28T09:40:12.000Z
2022-01-05T08:48:26.000Z
tests/test_cli.py
ramsha-muzaffer/Landsat578
a829e9ca60a232bc45aabadc533c8e4e2ef373ce
[ "Apache-2.0" ]
30
2017-04-28T21:19:30.000Z
2021-12-13T19:44:17.000Z
tests/test_cli.py
ramsha-muzaffer/Landsat578
a829e9ca60a232bc45aabadc533c8e4e2ef373ce
[ "Apache-2.0" ]
28
2017-05-25T18:24:28.000Z
2021-09-24T19:46:24.000Z
# =============================================================================== # Copyright 2018 dgketchum # # 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...
37.182432
104
0.565691
# =============================================================================== # Copyright 2018 dgketchum # # 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...
3,051
24
184
c7158a4c57ece4689a55162bbbf6c223afe88ed1
2,170
py
Python
ida_lib/tests/test_dataloader.py
raquelvilas18/ida_lib
4002e39417edfd62448b503196da9692a245e79d
[ "MIT" ]
2
2020-04-30T03:17:22.000Z
2020-05-27T09:26:23.000Z
ida_lib/tests/test_dataloader.py
raquelvilas18/ida_lib
4002e39417edfd62448b503196da9692a245e79d
[ "MIT" ]
null
null
null
ida_lib/tests/test_dataloader.py
raquelvilas18/ida_lib
4002e39417edfd62448b503196da9692a245e79d
[ "MIT" ]
null
null
null
import pytest from ida_lib.core.pipeline_geometric_ops import TranslatePipeline, RandomShearPipeline from ida_lib.image_augmentation.data_loader import AugmentDataLoader # cp-020 @pytest.mark.parametrize( ["batchsize"], [[1], [2], [3], [5], [10]] ) # cp-021 @pytest.mark.parametrize( ["resize"], [[(10, 10)]...
44.285714
106
0.517051
import pytest from ida_lib.core.pipeline_geometric_ops import TranslatePipeline, RandomShearPipeline from ida_lib.image_augmentation.data_loader import AugmentDataLoader # cp-020 @pytest.mark.parametrize( ["batchsize"], [[1], [2], [3], [5], [10]] ) def test_dataloader_work(dataset, batchsize): dataloader = A...
1,764
0
44
0cb3187b91837fec91e53d6f882960fceb3644bc
4,033
py
Python
util.py
demelin/Noise-Contrastive-Estimation-NCE-for-pyTorch
8ee790486ba5b7f47d6b016b5e58f90c80d04914
[ "MIT" ]
30
2017-07-28T13:22:31.000Z
2021-11-14T23:28:27.000Z
util.py
demelin/Noise-Contrastive-Estimation-NCE-for-pyTorch
8ee790486ba5b7f47d6b016b5e58f90c80d04914
[ "MIT" ]
null
null
null
util.py
demelin/Noise-Contrastive-Estimation-NCE-for-pyTorch
8ee790486ba5b7f47d6b016b5e58f90c80d04914
[ "MIT" ]
7
2018-05-02T22:25:28.000Z
2021-11-30T02:18:38.000Z
import pickle import numpy as np import torch from torch.autograd import Variable def get_probability(class_id, set_size): """ Calculates the probability of a word occuring in some corpus the classes of which follow a log-uniform (Zipfian) base distribution""" class_prob = (np.log(class_id + 2) - np.log...
43.836957
114
0.714357
import pickle import numpy as np import torch from torch.autograd import Variable def get_probability(class_id, set_size): """ Calculates the probability of a word occuring in some corpus the classes of which follow a log-uniform (Zipfian) base distribution""" class_prob = (np.log(class_id + 2) - np.log...
0
0
0
685e914cd807d11a76bde3fad53c282173c2a256
688
py
Python
project_euler/n001.py
nabin-info/hackerrank.com
da66a470d2e97a093821bfe41eb233d51784b9cc
[ "MIT" ]
null
null
null
project_euler/n001.py
nabin-info/hackerrank.com
da66a470d2e97a093821bfe41eb233d51784b9cc
[ "MIT" ]
null
null
null
project_euler/n001.py
nabin-info/hackerrank.com
da66a470d2e97a093821bfe41eb233d51784b9cc
[ "MIT" ]
null
null
null
#!/usr/bin/python import sys T = int(raw_input().strip()) for t in range(T): N = int(raw_input().strip()) print_fast35(N) #if len(sys.argv) > 1: # for n in map(int, sys.argv[1:]): # print_3or5_sum(n)
19.657143
60
0.456395
#!/usr/bin/python import sys def print_sum35(n): a, x = 0.0, 1 while x < n: if x % 3 == 0 or x % 5 == 0: a += x x += 1 print a def print_fast35(n): n -= 1 a,b,d = n % 3, n % 5, n % 15 a,b,d = n - a, n - b, n - d a,b,d = a / 3, b / 5, d / 15 c = 3*a*(a+1)/2 ...
396
0
70
61f54762177c48f818d5ba5333446986d426d6db
266
py
Python
contact_us/api/views.py
OSAMAMOHAMED1234/E-Commerce_django_restful_api
a8f139996a909b02b4463a2620fc3ab3cddee2e0
[ "MIT" ]
3
2018-05-02T20:37:11.000Z
2020-10-15T17:19:26.000Z
contact_us/api/views.py
OSAMAMOHAMED1234/E-Commerce_django_restful_api
a8f139996a909b02b4463a2620fc3ab3cddee2e0
[ "MIT" ]
1
2019-06-10T21:35:13.000Z
2019-06-10T21:35:13.000Z
contact_us/api/views.py
OSAMAMOHAMED1234/E-Commerce_django_restful_api
a8f139996a909b02b4463a2620fc3ab3cddee2e0
[ "MIT" ]
3
2018-04-13T17:01:18.000Z
2020-04-09T07:21:34.000Z
from rest_framework.generics import CreateAPIView from rest_framework.permissions import AllowAny from .serializers import ContactUsSerializer
26.6
49
0.838346
from rest_framework.generics import CreateAPIView from rest_framework.permissions import AllowAny from .serializers import ContactUsSerializer class ContactUsAPIView(CreateAPIView): serializer_class = ContactUsSerializer permission_classes = [AllowAny, ]
0
98
23
2ea08ef9c0c6a8d6f972a2b84b5ac59a03d6ed2d
5,154
py
Python
spats_shape_seq/tests/test_target.py
entzian/spats
cb0d9f1f3c0fbcb3c333096d657ef96f7179de46
[ "BSL-1.0" ]
4
2016-11-27T04:44:41.000Z
2019-10-08T18:32:51.000Z
spats_shape_seq/tests/test_target.py
entzian/spats
cb0d9f1f3c0fbcb3c333096d657ef96f7179de46
[ "BSL-1.0" ]
1
2017-12-18T22:02:28.000Z
2017-12-18T22:02:28.000Z
spats_shape_seq/tests/test_target.py
entzian/spats
cb0d9f1f3c0fbcb3c333096d657ef96f7179de46
[ "BSL-1.0" ]
3
2016-06-10T11:36:00.000Z
2021-08-30T18:25:18.000Z
import unittest from spats_shape_seq.parse import fasta_parse from spats_shape_seq.target import Targets from spats_shape_seq.util import reverse_complement TARGET_SRP = "ATCGGGGGCTCTGTTGGTTCTCCCGCAACGCTACTCTGTTTACCAGGTCAGGTCCGGAAGGAAGCAGCCAAGGCAGATGACGCGTGTGCCGGGATGTAGCTGGCAGGGCCCCCACCCGTCCTTGGTGCCCGAGTCAG" TARGET_...
54.829787
152
0.696352
import unittest from spats_shape_seq.parse import fasta_parse from spats_shape_seq.target import Targets from spats_shape_seq.util import reverse_complement TARGET_SRP = "ATCGGGGGCTCTGTTGGTTCTCCCGCAACGCTACTCTGTTTACCAGGTCAGGTCCGGAAGGAAGCAGCCAAGGCAGATGACGCGTGTGCCGGGATGTAGCTGGCAGGGCCCCCACCCGTCCTTGGTGCCCGAGTCAG" TARGET_...
4,356
69
354
f9f29db4a589dfc14c285569466e70acb1142dbd
2,014
py
Python
data/graph.py
freddierice/cdrone
7e66efa94ebc4d00379d029508a2aea42ee67259
[ "MIT" ]
2
2018-06-05T14:45:23.000Z
2018-06-05T20:18:38.000Z
data/graph.py
freddierice/cdrone
7e66efa94ebc4d00379d029508a2aea42ee67259
[ "MIT" ]
null
null
null
data/graph.py
freddierice/cdrone
7e66efa94ebc4d00379d029508a2aea42ee67259
[ "MIT" ]
null
null
null
import logz import sys import matplotlib.pyplot as plt HEIGHT_FACTOR = 5000 def main(log_filename: str): """main.""" with logz.open(log_filename) as l: rc = l["rc"] height = l["height"] height_raw = l["height_raw"] # imu = l["imu"] motion = l["camera_motion"] ...
29.188406
60
0.510427
import logz import sys import matplotlib.pyplot as plt HEIGHT_FACTOR = 5000 def main(log_filename: str): """main.""" with logz.open(log_filename) as l: rc = l["rc"] height = l["height"] height_raw = l["height_raw"] # imu = l["imu"] motion = l["camera_motion"] ...
0
0
0
a7b4e223b58b370c22fb9cb181d200532cc6984e
798
py
Python
tests/test_automation_run.py
Files-com/files-sdk-python
84cedc9be099cd9e4db6249ef7a9d60595487090
[ "MIT" ]
14
2020-08-05T15:48:06.000Z
2021-08-18T13:13:39.000Z
tests/test_automation_run.py
Files-com/files-sdk-python
84cedc9be099cd9e4db6249ef7a9d60595487090
[ "MIT" ]
4
2020-10-30T14:49:25.000Z
2021-09-29T17:11:53.000Z
tests/test_automation_run.py
Files-com/files-sdk-python
84cedc9be099cd9e4db6249ef7a9d60595487090
[ "MIT" ]
null
null
null
import unittest import inspect import files_sdk from tests.base import TestBase from files_sdk.models import AutomationRun from files_sdk import automation_run if __name__ == '__main__': unittest.main()
27.517241
118
0.669173
import unittest import inspect import files_sdk from tests.base import TestBase from files_sdk.models import AutomationRun from files_sdk import automation_run class AutomationRunTest(TestBase): pass # Instance Methods # Static Methods @unittest.skipUnless(TestBase.mock_server_path_exists("GET", "/au...
214
354
23
4be6aface8f054b24a126e27d1cf8ee1600a0385
695
py
Python
scripts/dblog.py
joshand/clientsim
9651afb8c49e25a8304e00b5addd14fe6e41e59d
[ "MIT" ]
null
null
null
scripts/dblog.py
joshand/clientsim
9651afb8c49e25a8304e00b5addd14fe6e41e59d
[ "MIT" ]
7
2020-04-15T21:17:18.000Z
2021-09-22T18:53:14.000Z
scripts/dblog.py
joshand/clientsim
9651afb8c49e25a8304e00b5addd14fe6e41e59d
[ "MIT" ]
null
null
null
import datetime from client_sim.models import * dodebug = False
25.740741
78
0.57554
import datetime from client_sim.models import * dodebug = False def append_log(log, *data): if log is None: log = [] if (isinstance(data, list) or isinstance(data, tuple)) and len(data) > 1: if dodebug: print(data) ldata = "" for ld in data: ldata += str(ld) + " " ...
583
0
46
a31638b6e07aa0fe54d83ce68bf810470a7b3890
1,539
py
Python
fluentxy/__init__.py
bryanwweber/fluentxy
fa4b574255c3752083c418036f8167706e755025
[ "BSD-3-Clause" ]
null
null
null
fluentxy/__init__.py
bryanwweber/fluentxy
fa4b574255c3752083c418036f8167706e755025
[ "BSD-3-Clause" ]
null
null
null
fluentxy/__init__.py
bryanwweber/fluentxy
fa4b574255c3752083c418036f8167706e755025
[ "BSD-3-Clause" ]
null
null
null
"""An interface to produce Pandas DataFrames from Fluent XY output files.""" from parse import parse import numpy as np import pandas as pd from typing import List __version__ = "0.1.0" def parse_data(lines: List) -> pd.DataFrame: """Parse an XY-formatted datafile from Fluent and return a DataFrame.""" axi...
32.744681
87
0.575049
"""An interface to produce Pandas DataFrames from Fluent XY output files.""" from parse import parse import numpy as np import pandas as pd from typing import List __version__ = "0.1.0" def parse_data(lines: List) -> pd.DataFrame: """Parse an XY-formatted datafile from Fluent and return a DataFrame.""" axi...
0
0
0
32bfc281f0f4f9249233d06b02aa1e671c33f1a3
21
py
Python
Magics/__init__.py
old-reliable/magics-python
141504926562cbe130ed26d69b38d479e400c8b6
[ "Apache-2.0" ]
null
null
null
Magics/__init__.py
old-reliable/magics-python
141504926562cbe130ed26d69b38d479e400c8b6
[ "Apache-2.0" ]
null
null
null
Magics/__init__.py
old-reliable/magics-python
141504926562cbe130ed26d69b38d479e400c8b6
[ "Apache-2.0" ]
null
null
null
from Magics import *
10.5
20
0.761905
from Magics import *
0
0
0
514c63c52cadcbbc360b01c1a3fb561b0be9851a
784
py
Python
example/tests/admin/test_flag_admin.py
dinoperovic/djangoshop-shopit
b42a2bf0ec319817eb37ef939608b04498fc4ff2
[ "BSD-3-Clause" ]
14
2016-11-25T16:06:20.000Z
2018-08-30T19:20:41.000Z
example/tests/admin/test_flag_admin.py
dinoperovic/django-shop
b42a2bf0ec319817eb37ef939608b04498fc4ff2
[ "BSD-3-Clause" ]
3
2018-11-30T10:47:39.000Z
2019-10-21T10:21:24.000Z
example/tests/admin/test_flag_admin.py
dinoperovic/django-shop
b42a2bf0ec319817eb37ef939608b04498fc4ff2
[ "BSD-3-Clause" ]
6
2019-04-07T23:52:54.000Z
2020-09-20T05:30:07.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.contrib.admin.sites import AdminSite from shopit.admin.flag import FlagAdmin from shopit.models.flag import Flag from ..utils import ShopitTestCase
32.666667
107
0.690051
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.contrib.admin.sites import AdminSite from shopit.admin.flag import FlagAdmin from shopit.models.flag import Flag from ..utils import ShopitTestCase class FlagAdminTest(ShopitTestCase): def setUp(self): self.cre...
448
15
76
fe0eff0885d1cdeb6e6ff70e807dd53988d6ffea
1,461
py
Python
web-search-engine/search/utils/chk_url_table.py
robertwenquan/nyu-course-assignment
c03a4fb157d385b650c38feb861f283f2e1928fd
[ "Apache-2.0" ]
1
2018-01-22T21:35:42.000Z
2018-01-22T21:35:42.000Z
web-search-engine/search/utils/chk_url_table.py
robertwenquan/nyu-course-assignment
c03a4fb157d385b650c38feb861f283f2e1928fd
[ "Apache-2.0" ]
null
null
null
web-search-engine/search/utils/chk_url_table.py
robertwenquan/nyu-course-assignment
c03a4fb157d385b650c38feb861f283f2e1928fd
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """ list all the wordid - word mapping Sample usage: $ python utils/chk_word_table.py URL_TABLE_ENTRY(28B) - docid(4B) - loc of url(8B) - url fileid(2B) - url offset(4B) - url length(2B) - loc of doc(16B) - wet fileid(2B) - offset in the file(4B) - length of the file including ...
19.223684
80
0.67488
#!/usr/bin/env python """ list all the wordid - word mapping Sample usage: $ python utils/chk_word_table.py URL_TABLE_ENTRY(28B) - docid(4B) - loc of url(8B) - url fileid(2B) - url offset(4B) - url length(2B) - loc of doc(16B) - wet fileid(2B) - offset in the file(4B) - length of the file including ...
0
0
0
d94edc6a7ee39c3a0c82295a7c20703f46ca28db
2,180
py
Python
StudentRep/main.py
davidp-ro/ai-ml
616225fb34761bcd9c8477044bc3ba955ba8b549
[ "MIT" ]
null
null
null
StudentRep/main.py
davidp-ro/ai-ml
616225fb34761bcd9c8477044bc3ba955ba8b549
[ "MIT" ]
null
null
null
StudentRep/main.py
davidp-ro/ai-ml
616225fb34761bcd9c8477044bc3ba955ba8b549
[ "MIT" ]
null
null
null
# Imports: import pandas as pd import numpy as np import pickle # sklearn: import sklearn from sklearn import linear_model from sklearn.utils import shuffle # Matplotlib: import matplotlib.pyplot as pyplot from matplotlib import style # File paths: DATA_PATH = '../Dataset/student-mat.csv' SAVE_PATH = '../SavedModels/s...
27.25
107
0.693119
# Imports: import pandas as pd import numpy as np import pickle # sklearn: import sklearn from sklearn import linear_model from sklearn.utils import shuffle # Matplotlib: import matplotlib.pyplot as pyplot from matplotlib import style # File paths: DATA_PATH = '../Dataset/student-mat.csv' SAVE_PATH = '../SavedModels/s...
0
0
0
e6076ef3167f5d0557a7db18ca70aa92a6189f21
2,622
py
Python
smtpdev/cli.py
asyncee/smtpdev
1b92085b4069457bf724a16e20270b99b9098255
[ "MIT" ]
2
2019-06-19T09:03:23.000Z
2020-06-19T18:19:48.000Z
smtpdev/cli.py
asyncee/smtpdev
1b92085b4069457bf724a16e20270b99b9098255
[ "MIT" ]
1
2019-06-07T06:36:45.000Z
2019-06-07T06:36:45.000Z
smtpdev/cli.py
asyncee/smtpdev
1b92085b4069457bf724a16e20270b99b9098255
[ "MIT" ]
1
2019-06-04T17:29:21.000Z
2019-06-04T17:29:21.000Z
import logging import pathlib from contextlib import nullcontext from mailbox import Maildir from tempfile import TemporaryDirectory import click from aiosmtpd.controller import Controller from .config import Configuration from .smtp_handlers import MailboxHandler from .web_server import WebServer logger = logging.g...
27.6
100
0.680397
import logging import pathlib from contextlib import nullcontext from mailbox import Maildir from tempfile import TemporaryDirectory import click from aiosmtpd.controller import Controller from .config import Configuration from .smtp_handlers import MailboxHandler from .web_server import WebServer logger = logging.g...
1,293
0
22
34c178e47df7b723231427d71156f2e94fd3ed20
313
py
Python
ctutils/PSR.py
Combustion-Zhen/pyutils
dc675f2087d531fbd0ac5477dadbb5cebb9ccf79
[ "MIT" ]
null
null
null
ctutils/PSR.py
Combustion-Zhen/pyutils
dc675f2087d531fbd0ac5477dadbb5cebb9ccf79
[ "MIT" ]
null
null
null
ctutils/PSR.py
Combustion-Zhen/pyutils
dc675f2087d531fbd0ac5477dadbb5cebb9ccf79
[ "MIT" ]
null
null
null
# %% import cantera as ct # %% gas = ct.Solution('h2_Burke_n2.cti') r = ct.IdealGasConstPressureReactor(gas) # %% dt = 1e-5 t = 0. # %% r.T t += dt sim = ct.ReactorNet([r]) sim.advance(t) r.T # %% gas.TPX = 300, 101325, {'H':1.} r.syncState() r.T # %% sim.reinitialize() # %% t += dt sim.advance(t) r.T # %%
10.096774
40
0.571885
# %% import cantera as ct # %% gas = ct.Solution('h2_Burke_n2.cti') r = ct.IdealGasConstPressureReactor(gas) # %% dt = 1e-5 t = 0. # %% r.T t += dt sim = ct.ReactorNet([r]) sim.advance(t) r.T # %% gas.TPX = 300, 101325, {'H':1.} r.syncState() r.T # %% sim.reinitialize() # %% t += dt sim.advance(t) r.T # %%
0
0
0
2d74716a061b9c90a72957614d5e209d6f7bcfd9
689
py
Python
Unit_4/Data_Analysis.py
coffeelabor/CIS289_Reed_James
6d1bc126d6b50411f2bad1d65cfeebd47b68a6ff
[ "MIT" ]
null
null
null
Unit_4/Data_Analysis.py
coffeelabor/CIS289_Reed_James
6d1bc126d6b50411f2bad1d65cfeebd47b68a6ff
[ "MIT" ]
null
null
null
Unit_4/Data_Analysis.py
coffeelabor/CIS289_Reed_James
6d1bc126d6b50411f2bad1d65cfeebd47b68a6ff
[ "MIT" ]
null
null
null
''' /*************************************************************** * Name: Pandas Data Analysis * Author: Reed James * Created: 22 Sept 2021 * Course: CIS 289 - Python * Version: Python 3.8.2 * OS: Windows 10 * Copyright: This is my own original work based on * specifications issued by our instructor * ...
31.318182
76
0.539913
''' /*************************************************************** * Name: Pandas Data Analysis * Author: Reed James * Created: 22 Sept 2021 * Course: CIS 289 - Python * Version: Python 3.8.2 * OS: Windows 10 * Copyright: This is my own original work based on * specifications issued by our instructor * ...
0
0
0
2dc5f02dd8c7980771551c3a8f2cf90faab3d060
15,111
py
Python
Dados/Events/Evento/Effect/Scroll.py
On0n0k1/2020ASSEditor
fd61595696683b440eb8a030163020100e070ed5
[ "MIT" ]
null
null
null
Dados/Events/Evento/Effect/Scroll.py
On0n0k1/2020ASSEditor
fd61595696683b440eb8a030163020100e070ed5
[ "MIT" ]
null
null
null
Dados/Events/Evento/Effect/Scroll.py
On0n0k1/2020ASSEditor
fd61595696683b440eb8a030163020100e070ed5
[ "MIT" ]
null
null
null
""" Extends Effect. Contains Scroll, which is one the 3 effects employed by the event. Copyright 2020 Lucas Alessandro do Carmo Lemos Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without...
40.296
121
0.599232
""" Extends Effect. Contains Scroll, which is one the 3 effects employed by the event. Copyright 2020 Lucas Alessandro do Carmo Lemos Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without...
0
0
0
5ca478338d5f22d1c242e56ababc6292ace19d3b
362
py
Python
ai_reader_demo/autoencoder/utils.py
bbueno5000/ai_reader_demo
4c159d6455cd0f7a76e8277a589afe7514b9cbc4
[ "Apache-2.0" ]
null
null
null
ai_reader_demo/autoencoder/utils.py
bbueno5000/ai_reader_demo
4c159d6455cd0f7a76e8277a589afe7514b9cbc4
[ "Apache-2.0" ]
null
null
null
ai_reader_demo/autoencoder/utils.py
bbueno5000/ai_reader_demo
4c159d6455cd0f7a76e8277a589afe7514b9cbc4
[ "Apache-2.0" ]
null
null
null
""" DOCSTRING """ import numpy import tensorflow def xavier_init(fan_in, fan_out, constant = 1): """ DOCSTRING """ low = -constant * numpy.sqrt(6.0 / (fan_in + fan_out)) high = constant * numpy.sqrt(6.0 / (fan_in + fan_out)) return tensorflow.random_uniform( (fan_in, fan_out), minval=lo...
24.133333
77
0.651934
""" DOCSTRING """ import numpy import tensorflow def xavier_init(fan_in, fan_out, constant = 1): """ DOCSTRING """ low = -constant * numpy.sqrt(6.0 / (fan_in + fan_out)) high = constant * numpy.sqrt(6.0 / (fan_in + fan_out)) return tensorflow.random_uniform( (fan_in, fan_out), minval=lo...
0
0
0
22026e61153287b58445150128902a1f2d928f9e
2,488
py
Python
server/newconnectionwhodis/tests/testCommentView.py
dylandeco/cmput404-group-project
ddbfba1b2778b9efe916d3e98cc8177ed7f0791b
[ "Apache-2.0" ]
4
2021-10-20T20:50:55.000Z
2021-12-04T03:26:56.000Z
server/newconnectionwhodis/tests/testCommentView.py
dylandeco/cmput404-group-project
ddbfba1b2778b9efe916d3e98cc8177ed7f0791b
[ "Apache-2.0" ]
69
2021-10-22T01:51:14.000Z
2021-12-09T02:57:57.000Z
server/newconnectionwhodis/tests/testCommentView.py
dylandeco/cmput404-group-project
ddbfba1b2778b9efe916d3e98cc8177ed7f0791b
[ "Apache-2.0" ]
1
2022-03-13T20:45:12.000Z
2022-03-13T20:45:12.000Z
from django.test import TestCase from rest_framework.test import APIClient from . import util from .. import serializers
36.057971
101
0.60209
from django.test import TestCase from rest_framework.test import APIClient from . import util from .. import serializers class CommentViewTests(TestCase): def setUp(self): """ Create a new post from a new author """ AUTHOR_NAME, AUTHOR_GITHUB, POST_CONTENT = "Muhammad", "Exanut", ...
374
1,968
23
ee4500b57720947963eb5889eda0adf1bc435433
10,365
py
Python
mysite/scisheets/core/helpers/cell_types.py
ScienceStacks/JViz
c8de23d90d49d4c9bc10da25f4a87d6f44aab138
[ "Artistic-2.0", "Apache-2.0" ]
31
2016-11-16T22:34:35.000Z
2022-03-22T22:16:11.000Z
mysite/scisheets/core/helpers/cell_types.py
ScienceStacks/JViz
c8de23d90d49d4c9bc10da25f4a87d6f44aab138
[ "Artistic-2.0", "Apache-2.0" ]
6
2017-06-24T06:29:36.000Z
2022-01-23T06:30:01.000Z
mysite/scisheets/core/helpers/cell_types.py
ScienceStacks/JViz
c8de23d90d49d4c9bc10da25f4a87d6f44aab138
[ "Artistic-2.0", "Apache-2.0" ]
4
2017-07-27T16:23:50.000Z
2022-03-12T06:36:13.000Z
'''Utilities used in core scitable code.''' from extended_array import ExtendedArray from CommonUtil.prune_nulls import pruneNulls import collections import math import numpy as np import warnings THRESHOLD = 0.000001 # Threshold for value comparisons ################### Classes ############################ # Used ...
26.922078
75
0.64602
'''Utilities used in core scitable code.''' from extended_array import ExtendedArray from CommonUtil.prune_nulls import pruneNulls import collections import math import numpy as np import warnings THRESHOLD = 0.000001 # Threshold for value comparisons ################### Classes ############################ # Used ...
37
0
22
0865c3e22a02807f9e34c3b751ce4c4140441666
124
py
Python
insanic/choices.py
crazytruth/insanic
f9b61611317d873fe7688a5fd13eecb9a496ead5
[ "MIT" ]
4
2020-10-13T04:34:21.000Z
2022-02-18T05:34:03.000Z
insanic/choices.py
crazytruth/insanic
f9b61611317d873fe7688a5fd13eecb9a496ead5
[ "MIT" ]
1
2020-09-29T06:59:36.000Z
2020-09-29T06:59:36.000Z
insanic/choices.py
crazytruth/insanic
f9b61611317d873fe7688a5fd13eecb9a496ead5
[ "MIT" ]
null
null
null
from enum import IntEnum
13.777778
26
0.653226
from enum import IntEnum class UserLevels(IntEnum): BANNED = 0 DEACTIVATED = 10 ACTIVE = 100 STAFF = 1000
0
75
23
07cb4152931f9f69118c1d75abf236e9d13d4533
1,762
py
Python
rbc/externals/__init__.py
brenocfg/rbc
7274504ff6c72ff50467eaaab83e9611f446ea40
[ "BSD-3-Clause" ]
21
2019-05-21T14:44:01.000Z
2021-12-09T21:48:36.000Z
rbc/externals/__init__.py
brenocfg/rbc
7274504ff6c72ff50467eaaab83e9611f446ea40
[ "BSD-3-Clause" ]
349
2019-07-31T17:48:21.000Z
2022-03-31T06:57:52.000Z
rbc/externals/__init__.py
brenocfg/rbc
7274504ff6c72ff50467eaaab83e9611f446ea40
[ "BSD-3-Clause" ]
10
2020-01-23T20:14:17.000Z
2022-02-08T20:43:08.000Z
import types as py_types from rbc.targetinfo import TargetInfo from rbc.typesystem import Type from numba.core import funcdesc, typing
26.69697
90
0.662883
import types as py_types from rbc.targetinfo import TargetInfo from rbc.typesystem import Type from numba.core import funcdesc, typing def gen_codegen(fn_name): def codegen(context, builder, sig, args): # Need to retrieve the function name again fndesc = funcdesc.ExternalFunctionDescriptor(fn_name...
1,531
0
92
2b31a2d424e0ce4d6bb1fb83ca523a0c4bfeb68a
312
py
Python
backend/apps/mails/utils.py
KuanWeiLee/froggy-service
0db6cd90c1641a98c1e06638f8e9591c2daf39e0
[ "MIT" ]
174
2019-02-19T11:35:45.000Z
2021-12-20T03:20:28.000Z
backend/apps/mails/utils.py
KuanWeiLee/froggy-service
0db6cd90c1641a98c1e06638f8e9591c2daf39e0
[ "MIT" ]
56
2019-01-02T06:49:13.000Z
2021-03-23T09:31:18.000Z
backend/apps/mails/utils.py
KuanWeiLee/froggy-service
0db6cd90c1641a98c1e06638f8e9591c2daf39e0
[ "MIT" ]
36
2018-12-28T02:10:06.000Z
2021-09-02T03:06:35.000Z
from django.conf import settings from django.core.mail import send_mail
24
79
0.762821
from django.conf import settings from django.core.mail import send_mail def sendgrid_system_mail(message): from_email = settings.SERVER_EMAIL subject = "選服系統系統通知" admins = [email for name, email in settings.ADMINS] return send_mail(subject, message, from_email, admins, fail_silently=False)
232
0
23
0016809fbb9a5b580b379426d473750d858fb887
888
py
Python
templates/scale.py
diramazioni/blend-sonic
71f8782aea9e743383324f079dd1b49b31528f44
[ "RSA-MD" ]
2
2022-01-06T14:47:22.000Z
2022-02-02T01:55:49.000Z
templates/scale.py
diramazioni/blend-sonic
71f8782aea9e743383324f079dd1b49b31528f44
[ "RSA-MD" ]
null
null
null
templates/scale.py
diramazioni/blend-sonic
71f8782aea9e743383324f079dd1b49b31528f44
[ "RSA-MD" ]
null
null
null
{% extends "note.py" %} {% block imports %} {{ super() }} from {{ menu_levels[2:] }} constant_def import scale_names scale_items = [(k,k,'') for k in scale_names ] {% endblock %} {%- block classMembers %} {{ super() }} scaleList : EnumProperty(name="Scale", items = scale_items, default = ':major', update=prope...
23.368421
108
0.586712
{% extends "note.py" %} {% block imports %} {{ super() }} from {{ menu_levels[2:] }} constant_def import scale_names scale_items = [(k,k,'') for k in scale_names ] {% endblock %} {%- block classMembers %} {{ super() }} scaleList : EnumProperty(name="Scale", items = scale_items, default = ':major', update=prope...
0
0
0
11aa3369de078a964d9fe5cc1767b393eecbc2c0
1,011
py
Python
api/migrations/0001_initial.py
City-of-Turku/munpalvelut_backend
9baa530f2f3405322f74ccc145641148f253341b
[ "MIT" ]
null
null
null
api/migrations/0001_initial.py
City-of-Turku/munpalvelut_backend
9baa530f2f3405322f74ccc145641148f253341b
[ "MIT" ]
null
null
null
api/migrations/0001_initial.py
City-of-Turku/munpalvelut_backend
9baa530f2f3405322f74ccc145641148f253341b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-03-03 13:22 from __future__ import unicode_literals from django.db import migrations, models
30.636364
114
0.579624
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-03-03 13:22 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='ApiKey'...
0
833
23
6a5db8c16fcab6275810b911e49f796fc3a324e1
2,844
py
Python
erp_app/models.py
bryanrios/Django-ERP-Apache-License
51ae1ee15e8816e0f726850f5d143330ef1d4b42
[ "Apache-2.0" ]
null
null
null
erp_app/models.py
bryanrios/Django-ERP-Apache-License
51ae1ee15e8816e0f726850f5d143330ef1d4b42
[ "Apache-2.0" ]
null
null
null
erp_app/models.py
bryanrios/Django-ERP-Apache-License
51ae1ee15e8816e0f726850f5d143330ef1d4b42
[ "Apache-2.0" ]
null
null
null
from django.db import models # Create your models here.
38.958904
77
0.737342
from django.db import models # Create your models here. class Customers(models.Model): title = models.CharField(max_length=200) first_name = models.CharField(max_length=200) middle_name = models.CharField(max_length=200) last_name = models.CharField(max_length=200) suffix = models.CharField(max_l...
190
2,446
151
98260fe09209a487e2122cf77b7cd06ba72652f7
13,712
py
Python
astviewer/tree.py
titusjan/astviewer
3e3954c3deeba94cf12c6749bd29e0518bfcd974
[ "MIT" ]
105
2015-02-22T09:13:09.000Z
2021-12-20T05:09:48.000Z
astviewer/tree.py
titusjan/astviewer
3e3954c3deeba94cf12c6749bd29e0518bfcd974
[ "MIT" ]
2
2016-10-30T12:31:39.000Z
2017-09-05T17:09:16.000Z
astviewer/tree.py
titusjan/astviewer
3e3954c3deeba94cf12c6749bd29e0518bfcd974
[ "MIT" ]
13
2015-03-28T13:07:34.000Z
2021-08-03T01:30:44.000Z
""" Contains the tree widgdet """ from __future__ import print_function import ast, logging import os.path from astviewer.iconfactory import IconFactory from astviewer.misc import class_name, check_class from astviewer.qtpy import QtCore, QtGui, QtWidgets from astviewer.toggle_column_mixin import ToggleColumnTreeWidg...
39.744928
100
0.641044
""" Contains the tree widgdet """ from __future__ import print_function import ast, logging import os.path from astviewer.iconfactory import IconFactory from astviewer.misc import class_name, check_class from astviewer.qtpy import QtCore, QtGui, QtWidgets from astviewer.toggle_column_mixin import ToggleColumnTreeWidg...
0
0
0
ba9317a90817824e8fff0f9568251496292de06c
44,174
py
Python
venv/lib/python2.7/site-packages/jinja/parser.py
mallika2011/Recreating-VLabs-CSO-Experiment
307849d66072b3504b9f1bf914007eaf9a03a1dc
[ "MIT" ]
7
2016-05-08T22:32:57.000Z
2019-07-16T09:54:45.000Z
venv/lib/python2.7/site-packages/jinja/parser.py
mallika2011/Recreating-VLabs-CSO-Experiment
307849d66072b3504b9f1bf914007eaf9a03a1dc
[ "MIT" ]
null
null
null
venv/lib/python2.7/site-packages/jinja/parser.py
mallika2011/Recreating-VLabs-CSO-Experiment
307849d66072b3504b9f1bf914007eaf9a03a1dc
[ "MIT" ]
2
2017-01-22T14:43:33.000Z
2020-11-02T14:35:19.000Z
# -*- coding: utf-8 -*- """ jinja.parser ~~~~~~~~~~~~ Implements the template parser. The Jinja template parser is not a real parser but a combination of the python compiler package and some postprocessing. The tokens yielded by the lexer are used to separate template data and expressions. The...
37.183502
81
0.539005
# -*- coding: utf-8 -*- """ jinja.parser ~~~~~~~~~~~~ Implements the template parser. The Jinja template parser is not a real parser but a combination of the python compiler package and some postprocessing. The tokens yielded by the lexer are used to separate template data and expressions. The...
3,287
0
271
7ecb076b0a9bdbdbc22619e20b5da7f2efecaa80
21,747
py
Python
spans/settypes.py
MichiK/spans
1bab1c5ee9f27b698b5b1e1f849dd61641d12cfd
[ "MIT" ]
1
2018-01-02T18:39:47.000Z
2018-01-02T18:39:47.000Z
spans/settypes.py
MichiK/spans
1bab1c5ee9f27b698b5b1e1f849dd61641d12cfd
[ "MIT" ]
null
null
null
spans/settypes.py
MichiK/spans
1bab1c5ee9f27b698b5b1e1f849dd61641d12cfd
[ "MIT" ]
null
null
null
from itertools import chain from ._compat import add_metaclass, fix_timedelta_repr from ._utils import PartialOrderingMixin from .types import Range from .types import * from .types import DiscreteRange, OffsetableRangeMixin # Imports needed for doctests in date range sets from datetime import * __all__ = [ "in...
31.022825
115
0.585644
from itertools import chain from ._compat import add_metaclass, fix_timedelta_repr from ._utils import PartialOrderingMixin from .types import Range from .types import * from .types import DiscreteRange, OffsetableRangeMixin # Imports needed for doctests in date range sets from datetime import * __all__ = [ "in...
2,063
0
432
00b339c8fe21cab0883a4fbca8f802dcb584e12a
2,767
py
Python
ui/etc/page2.py
mizcos/SS-3
3d023df6f9c3915b78638044d878775677a284ab
[ "MIT" ]
1
2021-09-20T11:54:57.000Z
2021-09-20T11:54:57.000Z
ui/etc/page2.py
mizcos/SS-3
3d023df6f9c3915b78638044d878775677a284ab
[ "MIT" ]
null
null
null
ui/etc/page2.py
mizcos/SS-3
3d023df6f9c3915b78638044d878775677a284ab
[ "MIT" ]
1
2021-04-13T12:16:21.000Z
2021-04-13T12:16:21.000Z
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'page2.ui' # # Created by: PyQt5 UI code generator 5.15.2 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore, QtGui,...
45.360656
102
0.713408
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'page2.ui' # # Created by: PyQt5 UI code generator 5.15.2 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore, QtGui,...
2,390
1
76
08453069f642cd08cf76bbd5d6e98308dedbfc19
1,513
py
Python
examples/example07.py
robertsj/pypgapack
c24b4a58f347ec02c20929aaaec25010fa603eb8
[ "MIT" ]
4
2015-12-16T09:44:32.000Z
2021-05-23T23:52:33.000Z
examples/example07.py
robertsj/pypgapack
c24b4a58f347ec02c20929aaaec25010fa603eb8
[ "MIT" ]
null
null
null
examples/example07.py
robertsj/pypgapack
c24b4a58f347ec02c20929aaaec25010fa603eb8
[ "MIT" ]
1
2022-01-01T17:44:21.000Z
2022-01-01T17:44:21.000Z
""" pypgapack/examples/example07.py -- maxbit with end-of-generation hill climb """ from pypgapack import PGA import sys class MyPGA(PGA) : """ Derive our own class from PGA. """ def maxbit(self, p, pop) : """ Maximum when all alleles are 1's, and that maximum is n. """ ...
36.02381
77
0.573695
""" pypgapack/examples/example07.py -- maxbit with end-of-generation hill climb """ from pypgapack import PGA import sys class MyPGA(PGA) : """ Derive our own class from PGA. """ def maxbit(self, p, pop) : """ Maximum when all alleles are 1's, and that maximum is n. """ ...
0
0
0
e813f611e691c058492667f535db043e5ad97375
2,028
py
Python
experiment-mininet-wifi/Cls_topology.py
phoophoo187/Privacy_SDN_Edge_IoT
3ee6e0fb36c6d86cf8caf4599a35c04b0ade9a8c
[ "MIT" ]
null
null
null
experiment-mininet-wifi/Cls_topology.py
phoophoo187/Privacy_SDN_Edge_IoT
3ee6e0fb36c6d86cf8caf4599a35c04b0ade9a8c
[ "MIT" ]
null
null
null
experiment-mininet-wifi/Cls_topology.py
phoophoo187/Privacy_SDN_Edge_IoT
3ee6e0fb36c6d86cf8caf4599a35c04b0ade9a8c
[ "MIT" ]
null
null
null
""" " The Topology class responed for " - creating a network topology which specified in a JSON format file " - adding and removing nodes and edges from a network " - showing a current network topology """ import networkx as nx from networkx.readwrite import json_graph import json import matplotlib.pyplot as plt ...
36.214286
101
0.591223
""" " The Topology class responed for " - creating a network topology which specified in a JSON format file " - adding and removing nodes and edges from a network " - showing a current network topology """ import networkx as nx from networkx.readwrite import json_graph import json import matplotlib.pyplot as plt c...
1,466
-2
229
9f6700e87fa0ea57093fb7809b358292954f90e0
3,958
py
Python
options/options_train_executor.py
aluo-x/shape2prog
1177e5205b99bb293e353688b564c94a14211c75
[ "BSD-2-Clause" ]
109
2019-01-10T03:16:21.000Z
2022-02-10T07:39:22.000Z
options/options_train_executor.py
aluo-x/shape2prog
1177e5205b99bb293e353688b564c94a14211c75
[ "BSD-2-Clause" ]
6
2019-06-11T13:30:08.000Z
2020-11-19T17:42:12.000Z
options/options_train_executor.py
aluo-x/shape2prog
1177e5205b99bb293e353688b564c94a14211c75
[ "BSD-2-Clause" ]
16
2019-01-16T08:08:18.000Z
2021-11-11T02:52:40.000Z
from __future__ import print_function import os import argparse import socket import torch from programs.label_config import max_param, stop_id def get_parser(): """ a parser for training the program executor """ parser = argparse.ArgumentParser(description="arguments for training program executor")...
45.494253
113
0.704144
from __future__ import print_function import os import argparse import socket import torch from programs.label_config import max_param, stop_id def get_parser(): """ a parser for training the program executor """ parser = argparse.ArgumentParser(description="arguments for training program executor")...
389
0
23
6877dcd0c8c82bb4b4b41cce88c1868d8a6f7a56
339
py
Python
links/admin.py
n2o/dpb
9e44ef91dc25782a12150e1001983aeee62bc566
[ "MIT" ]
3
2020-11-05T10:09:04.000Z
2021-03-13T11:27:05.000Z
links/admin.py
n2o/dpb
9e44ef91dc25782a12150e1001983aeee62bc566
[ "MIT" ]
31
2015-07-26T13:53:26.000Z
2020-09-28T06:08:03.000Z
links/admin.py
n2o/dpb
9e44ef91dc25782a12150e1001983aeee62bc566
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Link, LinkCategory from dpb.admin import PageDownAdmin admin.site.register(Link, LinkAdmin) admin.site.register(LinkCategory)
22.6
60
0.740413
from django.contrib import admin from .models import Link, LinkCategory from dpb.admin import PageDownAdmin class LinkAdmin(PageDownAdmin): list_display = ('title', 'state', 'category', 'website') list_filter = ('category',) search_fields = ['title'] admin.site.register(Link, LinkAdmin) admin.site.regi...
0
133
23
cc8442a5c0c0fcab704e88eeb677b48927c7ac7a
7,884
py
Python
KalmanMachine/KDataGenerator.py
marc-h-lambert/L-RVGA
e7cd0c9745c87fb68828f28b1856a9616da933b1
[ "CC0-1.0" ]
null
null
null
KalmanMachine/KDataGenerator.py
marc-h-lambert/L-RVGA
e7cd0c9745c87fb68828f28b1856a9616da933b1
[ "CC0-1.0" ]
null
null
null
KalmanMachine/KDataGenerator.py
marc-h-lambert/L-RVGA
e7cd0c9745c87fb68828f28b1856a9616da933b1
[ "CC0-1.0" ]
null
null
null
################################################################################### # THE KALMAN MACHINE LIBRARY # # Code supported by Marc Lambert # ####################################################################...
37.542857
159
0.581558
################################################################################### # THE KALMAN MACHINE LIBRARY # # Code supported by Marc Lambert # ####################################################################...
5,906
854
72
63775f782cb8e7de2343442b499ed0f15ca44db8
1,890
py
Python
sysupdate.py
mtibbett67/sysupdate
28d0e78d74f18184efdc54d2d4ec62dd16b351f0
[ "MIT" ]
null
null
null
sysupdate.py
mtibbett67/sysupdate
28d0e78d74f18184efdc54d2d4ec62dd16b351f0
[ "MIT" ]
null
null
null
sysupdate.py
mtibbett67/sysupdate
28d0e78d74f18184efdc54d2d4ec62dd16b351f0
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' NAME: sysupdate.py DESCRIPTION: Update OS using apt CREATED: Tue Mar 17 22:17:50 2015 VERSION: 2 AUTHOR: Mark Tibbett AUTHOR_EMAIL: mtibbett67@gmail.com URL: N/A DOWNLOAD_URL: N/A INSTALL_REQUIRES: [] PACKAGES: [] SCRIPTS: [] ''' # Standard library imports ...
18.712871
73
0.591534
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' NAME: sysupdate.py DESCRIPTION: Update OS using apt CREATED: Tue Mar 17 22:17:50 2015 VERSION: 2 AUTHOR: Mark Tibbett AUTHOR_EMAIL: mtibbett67@gmail.com URL: N/A DOWNLOAD_URL: N/A INSTALL_REQUIRES: [] PACKAGES: [] SCRIPTS: [] ''' # Standard library imports ...
0
0
0
134fbfefdb0c396b7402416c2809bf816a232596
4,762
py
Python
practice/hw3/support.py
ixlan/Information-retrieval-I
98e9cdea328e0c20e6e754ed0849b10f3d43fc3c
[ "MIT" ]
null
null
null
practice/hw3/support.py
ixlan/Information-retrieval-I
98e9cdea328e0c20e6e754ed0849b10f3d43fc3c
[ "MIT" ]
null
null
null
practice/hw3/support.py
ixlan/Information-retrieval-I
98e9cdea328e0c20e6e754ed0849b10f3d43fc3c
[ "MIT" ]
1
2018-11-30T10:52:09.000Z
2018-11-30T10:52:09.000Z
import numpy as np import glob import os from query import load_queries import copy import random import math import matplotlib as mpl import matplotlib.pyplot as plt mpl.rcParams['legend.loc'] = 'best' from timeit import default_timer as timer # notice that this is a modified version of NDCG with relative normalizati...
26.752809
94
0.606468
import numpy as np import glob import os from query import load_queries import copy import random import math import matplotlib as mpl import matplotlib.pyplot as plt mpl.rcParams['legend.loc'] = 'best' from timeit import default_timer as timer # notice that this is a modified version of NDCG with relative normalizati...
3,372
812
136
10da5dd6dbab70fa9e387e5ac878891a91b320b5
414
py
Python
django-react/django_react/todos/models.py
bogdan-veliscu/react-stack-compare
e7d2020ec8177e12d1b1c41bfaed96c2ee87490c
[ "Apache-2.0" ]
null
null
null
django-react/django_react/todos/models.py
bogdan-veliscu/react-stack-compare
e7d2020ec8177e12d1b1c41bfaed96c2ee87490c
[ "Apache-2.0" ]
7
2021-10-06T14:03:21.000Z
2022-02-27T02:40:18.000Z
django-react/django_react/todos/models.py
bogdan-veliscu/react-stack-compare
e7d2020ec8177e12d1b1c41bfaed96c2ee87490c
[ "Apache-2.0" ]
null
null
null
from django.db import models from django.conf import settings from django.db import models # Create your models here. from django.contrib.auth import get_user_model User = get_user_model()
25.875
56
0.719807
from django.db import models from django.conf import settings from django.db import models # Create your models here. from django.contrib.auth import get_user_model User = get_user_model() class Todo(models.Model): user = models.ForeignKey(User, related_name="todos", on_delete=model...
0
199
23
ce2228693b2b5320ab17bf93618d033e3fc599de
1,618
py
Python
vericep/payment/migrations/0002_auto_20200827_1759.py
SefaAkdeniz/Vericep-Graduation-Project-Backend-Django-MySQL
e8393ed9137811e5996b3b30faa4293a9aeb338a
[ "Apache-2.0" ]
null
null
null
vericep/payment/migrations/0002_auto_20200827_1759.py
SefaAkdeniz/Vericep-Graduation-Project-Backend-Django-MySQL
e8393ed9137811e5996b3b30faa4293a9aeb338a
[ "Apache-2.0" ]
3
2021-04-08T19:47:06.000Z
2021-06-10T20:06:49.000Z
vericep/payment/migrations/0002_auto_20200827_1759.py
SefaAkdeniz/Vericep-Graduation-Project-Backend-Django-MySQL
e8393ed9137811e5996b3b30faa4293a9aeb338a
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.0.8 on 2020-08-27 14:59 from django.db import migrations, models
39.463415
260
0.553152
# Generated by Django 3.0.8 on 2020-08-27 14:59 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('payment', '0001_initial'), ] operations = [ migrations.AlterModelOptions( name='balance', options={'verbose_name': '...
0
1,515
23
9992cd3dda49fe83ec51824d731c774b77b1c5e0
4,531
py
Python
src/SubClassReasoner.py
Weissger/TST.SubClassReasoner
8fa97ff70136f05594b9eb685df2470ed43b6fd7
[ "MIT" ]
null
null
null
src/SubClassReasoner.py
Weissger/TST.SubClassReasoner
8fa97ff70136f05594b9eb685df2470ed43b6fd7
[ "MIT" ]
null
null
null
src/SubClassReasoner.py
Weissger/TST.SubClassReasoner
8fa97ff70136f05594b9eb685df2470ed43b6fd7
[ "MIT" ]
null
null
null
__author__ = 'tmy' import os from datetime import datetime from multiprocessing import Process from .ProcessManager.ProcessManager import ProcessManager, OccupiedError from .NTripleLineParser.src.NTripleLineParser import NTripleLineParser from .SparqlInterface.src import ClientFactory from .Materializer.Materializer i...
39.745614
121
0.556389
__author__ = 'tmy' import os from datetime import datetime from multiprocessing import Process from .ProcessManager.ProcessManager import ProcessManager, OccupiedError from .NTripleLineParser.src.NTripleLineParser import NTripleLineParser from .SparqlInterface.src import ClientFactory from .Materializer.Materializer i...
3,900
10
157
b847e8056aeb9aad38178a541f8bc5e9d3a88acf
2,600
py
Python
pyspider/database/mongodb/resultdb.py
mayk93/pyspider
87a1f9227ace2e577492e6ec3ecde0e2d8575411
[ "Apache-2.0" ]
5
2015-03-31T13:25:25.000Z
2016-03-14T11:17:02.000Z
pyspider/database/mongodb/resultdb.py
mayk93/pyspider
87a1f9227ace2e577492e6ec3ecde0e2d8575411
[ "Apache-2.0" ]
null
null
null
pyspider/database/mongodb/resultdb.py
mayk93/pyspider
87a1f9227ace2e577492e6ec3ecde0e2d8575411
[ "Apache-2.0" ]
1
2016-02-17T23:12:47.000Z
2016-02-17T23:12:47.000Z
#!/usr/bin/env python # -*- encoding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Binux<i@binux.me> # http://binux.me # Created on 2014-10-13 22:18:36 import json import time from pymongo import MongoClient from pyspider.database.base.resultdb import ResultDB as BaseResultDB from .mong...
32.911392
96
0.615769
#!/usr/bin/env python # -*- encoding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Binux<i@binux.me> # http://binux.me # Created on 2014-10-13 22:18:36 import json import time from pymongo import MongoClient from pyspider.database.base.resultdb import ResultDB as BaseResultDB from .mong...
1,984
241
23
597f27f86a34f76d42a66e98797cbf1e12e589a5
932
py
Python
tests/programs/lists/sequential_tuple.py
astraldawn/pylps
e9964a24bb38657b180d441223b4cdb9e1dadc8a
[ "MIT" ]
1
2018-05-19T18:28:12.000Z
2018-05-19T18:28:12.000Z
tests/programs/lists/sequential_tuple.py
astraldawn/pylps
e9964a24bb38657b180d441223b4cdb9e1dadc8a
[ "MIT" ]
12
2018-04-26T00:58:11.000Z
2018-05-13T22:03:39.000Z
tests/programs/lists/sequential_tuple.py
astraldawn/pylps
e9964a24bb38657b180d441223b4cdb9e1dadc8a
[ "MIT" ]
null
null
null
from pylps.core import * from pylps.lps_data_structures import LPSTuple initialise(max_time=5) create_actions('show(_)', 'show_tuple(_, _)') create_events('handle_list(_)') create_variables('X', 'Y', 'XS') reactive_rule(True).then( handle_list([ ('a', 1), ('b', 2), ('c', 3), ('d',...
18.64
66
0.613734
from pylps.core import * from pylps.lps_data_structures import LPSTuple initialise(max_time=5) create_actions('show(_)', 'show_tuple(_, _)') create_events('handle_list(_)') create_variables('X', 'Y', 'XS') reactive_rule(True).then( handle_list([ ('a', 1), ('b', 2), ('c', 3), ('d',...
0
0
0
794531b10fc3263ae13bf2014886f79ce3cf7b77
1,156
py
Python
interview/leet/778_Swim_in_Rising_Water.py
eroicaleo/LearningPython
297d46eddce6e43ce0c160d2660dff5f5d616800
[ "MIT" ]
1
2020-10-12T13:33:29.000Z
2020-10-12T13:33:29.000Z
interview/leet/778_Swim_in_Rising_Water.py
eroicaleo/LearningPython
297d46eddce6e43ce0c160d2660dff5f5d616800
[ "MIT" ]
null
null
null
interview/leet/778_Swim_in_Rising_Water.py
eroicaleo/LearningPython
297d46eddce6e43ce0c160d2660dff5f5d616800
[ "MIT" ]
1
2016-11-09T07:28:45.000Z
2016-11-09T07:28:45.000Z
#!/usr/bin/env python3 # Thinking process # The animation of spanning with colors black/white/gray # Like the ones in princeton lecture really helped me from heapq import heappush, heappop sol = Solution() grid = [[0,2],[1,3]] grid = [[0,1,2,3,4],[24,23,22,21,5],[12,13,14,15,16],[11,17,18,19,20],[10,9,8,7,6]] grid =...
35.030303
85
0.467993
#!/usr/bin/env python3 # Thinking process # The animation of spanning with colors black/white/gray # Like the ones in princeton lecture really helped me from heapq import heappush, heappop class Solution: def swimInWater(self, grid): l, heap, delta = len(grid), [(grid[0][0], 0, 0)], [(0,1),(0,-1),(1,0),(-...
686
-6
48
70e6fa28f56a29cbf2f2d0d7f92baa08728776a4
4,987
py
Python
dask_geomodeling/ipyleaflet_plugin.py
RichardScottOZ/dask-geomodeling
d463af5db4eccdc53be43862fd25e45f9aca4574
[ "BSD-3-Clause" ]
24
2019-10-10T21:39:36.000Z
2022-02-20T21:06:33.000Z
dask_geomodeling/ipyleaflet_plugin.py
RichardScottOZ/dask-geomodeling
d463af5db4eccdc53be43862fd25e45f9aca4574
[ "BSD-3-Clause" ]
40
2019-09-06T09:17:09.000Z
2022-01-31T11:12:46.000Z
dask_geomodeling/ipyleaflet_plugin.py
RichardScottOZ/dask-geomodeling
d463af5db4eccdc53be43862fd25e45f9aca4574
[ "BSD-3-Clause" ]
6
2019-10-28T14:13:26.000Z
2022-03-09T16:02:26.000Z
from datetime import datetime from io import BytesIO from urllib.parse import urljoin import numpy as np import traitlets from ipyleaflet import WMSLayer from matplotlib import cm from matplotlib.colors import Normalize from notebook import notebookapp from notebook.base.handlers import IPythonHandler from notebook.ut...
35.621429
102
0.65009
from datetime import datetime from io import BytesIO from urllib.parse import urljoin import numpy as np import traitlets from ipyleaflet import WMSLayer from matplotlib import cm from matplotlib.colors import Normalize from notebook import notebookapp from notebook.base.handlers import IPythonHandler from notebook.ut...
2,589
0
54
734dcac8001fc0cf52375eac800e4329cbad010a
1,218
py
Python
solutions/0530-minimum-absolute-difference-in-bst/minimum-absolute-difference-in-bst.py
iFun/Project-G
d33b3b3c7bcee64f93dc2539fd9955a27f321d96
[ "MIT" ]
null
null
null
solutions/0530-minimum-absolute-difference-in-bst/minimum-absolute-difference-in-bst.py
iFun/Project-G
d33b3b3c7bcee64f93dc2539fd9955a27f321d96
[ "MIT" ]
null
null
null
solutions/0530-minimum-absolute-difference-in-bst/minimum-absolute-difference-in-bst.py
iFun/Project-G
d33b3b3c7bcee64f93dc2539fd9955a27f321d96
[ "MIT" ]
null
null
null
# Given a binary search tree with non-negative values, find the minimum absolute difference between values of any two nodes. # # Example: # # # Input: # # 1 # \ # 3 # / # 2 # # Output: # 1 # # Explanation: # The minimum absolute difference is 1, which is the difference between 2 and 1 (or ...
21
125
0.541872
# Given a binary search tree with non-negative values, find the minimum absolute difference between values of any two nodes. # # Example: # # # Input: # # 1 # \ # 3 # / # 2 # # Output: # 1 # # Explanation: # The minimum absolute difference is 1, which is the difference between 2 and 1 (or ...
583
-6
76
7acc9ee1bc31164a1469a0d9996ab350cd9b5055
1,424
py
Python
pshychocloud/WAPPMessageAnalyzer.py
partu18/pshychocloud
208d8d3dd646637719f70a86f9d9e43dd2eed929
[ "MIT" ]
null
null
null
pshychocloud/WAPPMessageAnalyzer.py
partu18/pshychocloud
208d8d3dd646637719f70a86f9d9e43dd2eed929
[ "MIT" ]
2
2021-06-08T19:28:41.000Z
2021-09-07T23:47:14.000Z
pshychocloud/WAPPMessageAnalyzer.py
partu18/pshychocloud
208d8d3dd646637719f70a86f9d9e43dd2eed929
[ "MIT" ]
null
null
null
from MessageAnalyzer import MessageAnalyzer
45.935484
89
0.514045
from MessageAnalyzer import MessageAnalyzer class WAPPMessageAnalyzer(MessageAnalyzer): WAPP_DATE_REGEX = "[0-9]{1,2}/[0-9]{1,2}/[0-9]{1,2}" WAPP_TIME_REGEX = "[0-9]{1,2}:[0-9]{1,2}" WAPP_EXTRACT_PARTICIPANT_REGEX = r"{date}\s*,\s*{time}\s*-\s*(.+?)\s*:\s*"\ .format(...
0
1,348
23