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
500e861a5d9736a4f8277adb38a02df2b39dbf6e
1,031
py
Python
addons/finetune_style.py
geoffrey0822/multilevellabel_NN
faec3303dac2376d6e8a761632aca31bc3868413
[ "Apache-2.0" ]
null
null
null
addons/finetune_style.py
geoffrey0822/multilevellabel_NN
faec3303dac2376d6e8a761632aca31bc3868413
[ "Apache-2.0" ]
null
null
null
addons/finetune_style.py
geoffrey0822/multilevellabel_NN
faec3303dac2376d6e8a761632aca31bc3868413
[ "Apache-2.0" ]
null
null
null
import os,sys from caffe.proto import caffe_pb2 import google.protobuf.text_format as txtf prototxt_file=sys.argv[1] to_prototxt_file=sys.argv[2] hold_layers=sys.argv[3].split(',') model=caffe_pb2.NetParameter() with open(prototxt_file,'r') as f: txtf.Merge(f.read(),model) f.close() active_layers={} i=0 for...
25.146341
63
0.675073
import os,sys from caffe.proto import caffe_pb2 import google.protobuf.text_format as txtf prototxt_file=sys.argv[1] to_prototxt_file=sys.argv[2] hold_layers=sys.argv[3].split(',') model=caffe_pb2.NetParameter() with open(prototxt_file,'r') as f: txtf.Merge(f.read(),model) f.close() active_layers={} i=0 for...
0
0
0
d4a79cd608d45cd244b8fc0f37ecdbd2b9b20e1d
6,134
py
Python
docarray/document/mixins/porting.py
qdrant/docarray
acc76ca31e3344cc5dd7e42e6627951b91845ba3
[ "Apache-2.0" ]
591
2022-01-09T14:39:59.000Z
2022-03-31T13:19:39.000Z
docarray/document/mixins/porting.py
qdrant/docarray
acc76ca31e3344cc5dd7e42e6627951b91845ba3
[ "Apache-2.0" ]
210
2022-01-10T07:59:29.000Z
2022-03-31T14:49:18.000Z
docarray/document/mixins/porting.py
qdrant/docarray
acc76ca31e3344cc5dd7e42e6627951b91845ba3
[ "Apache-2.0" ]
40
2022-01-09T14:52:20.000Z
2022-03-31T07:59:45.000Z
import base64 import json import pickle from typing import Optional, TYPE_CHECKING, Type, Dict, Any, Union from ...helper import compress_bytes, decompress_bytes if TYPE_CHECKING: from ...typing import T
34.655367
104
0.604989
import base64 import json import pickle from typing import Optional, TYPE_CHECKING, Type, Dict, Any, Union from ...helper import compress_bytes, decompress_bytes if TYPE_CHECKING: from ...typing import T class PortingMixin: @classmethod def from_dict( cls: Type['T'], obj: Dict, protocol: str = '...
765
5,135
23
45f6e0cdfb3d2b0b20d8ce80caa54171ae3cfc46
195
py
Python
tableau_rest_api/methods/metrics.py
Radabaugh/tableau_tools
8630ec4c5614ace8b08246f83dc80c330a8045b4
[ "MIT" ]
179
2016-07-06T19:34:39.000Z
2021-03-16T02:30:27.000Z
tableau_rest_api/methods/metrics.py
Radabaugh/tableau_tools
8630ec4c5614ace8b08246f83dc80c330a8045b4
[ "MIT" ]
75
2016-07-28T16:17:44.000Z
2021-03-29T12:22:32.000Z
tableau_rest_api/methods/metrics.py
chip-felton-montage/tableau_tools
60881a99a32c7d9e03afbb0e1161deefaa854904
[ "MIT" ]
83
2016-08-25T10:32:26.000Z
2021-02-17T18:31:14.000Z
from .rest_api_base import * # First Metrics Methods appear in API 3.9
21.666667
60
0.74359
from .rest_api_base import * # First Metrics Methods appear in API 3.9 class MetricsMethods39(): def __init__(self, rest_api_base: TableauRestApiBase38): self.rest = rest_api_base
69
4
48
d4dfe468b447f835214af93d10dfa13057a2239c
458
py
Python
tests/factories/pipeline/pipeline.py
TheLabbingProject/django_analyses
08cac40a32754a265b37524f08ec6160c69ebea8
[ "Apache-2.0" ]
1
2020-12-30T12:43:34.000Z
2020-12-30T12:43:34.000Z
tests/factories/pipeline/pipeline.py
TheLabbingProject/django_analyses
08cac40a32754a265b37524f08ec6160c69ebea8
[ "Apache-2.0" ]
59
2019-12-25T13:14:56.000Z
2021-07-22T12:24:46.000Z
tests/factories/pipeline/pipeline.py
TheLabbingProject/django_analyses
08cac40a32754a265b37524f08ec6160c69ebea8
[ "Apache-2.0" ]
2
2020-05-24T06:44:27.000Z
2020-07-09T15:47:31.000Z
from factory import Faker from factory.django import DjangoModelFactory
35.230769
80
0.733624
from factory import Faker from factory.django import DjangoModelFactory class PipelineFactory(DjangoModelFactory): title = Faker("pystr", min_chars=3, max_chars=18) description = Faker("paragraph", nb_sentences=3, variable_nb_sentences=True) created = Faker("date_between", start_date="-30d", end_date="-15...
0
362
23
916322b1e03ef17f05188b14b907317d24dead00
216
py
Python
src/year2021/day16b.py
lancelote/advent_of_code
06dda6ca034bc1e86addee7798bb9b2a34ff565b
[ "Unlicense" ]
10
2017-12-11T17:54:52.000Z
2021-12-09T20:16:30.000Z
src/year2021/day16b.py
lancelote/advent_of_code
06dda6ca034bc1e86addee7798bb9b2a34ff565b
[ "Unlicense" ]
260
2015-12-09T11:03:03.000Z
2021-12-12T14:32:23.000Z
src/year2021/day16b.py
lancelote/advent_of_code
06dda6ca034bc1e86addee7798bb9b2a34ff565b
[ "Unlicense" ]
null
null
null
"""2021 - Day 16 Part 2: Packet Decoder.""" from src.year2021.day16a import BITS
24
43
0.689815
"""2021 - Day 16 Part 2: Packet Decoder.""" from src.year2021.day16a import BITS def solve(task: str) -> int: system = BITS.from_hex(task) top_packet = system.read_packet() return top_packet.evaluate()
111
0
23
e8017922857077673165e16e7b2111a57d751eea
93
py
Python
Chapter 05/Praktikum-2/1-n.py
icaksh/Python-Projects-Protek
dfd56ea5afc637a8850911a9296131652de383c5
[ "MIT" ]
null
null
null
Chapter 05/Praktikum-2/1-n.py
icaksh/Python-Projects-Protek
dfd56ea5afc637a8850911a9296131652de383c5
[ "MIT" ]
null
null
null
Chapter 05/Praktikum-2/1-n.py
icaksh/Python-Projects-Protek
dfd56ea5afc637a8850911a9296131652de383c5
[ "MIT" ]
null
null
null
banyakPerulangan = 10 i = 0 while (i < banyakPerulangan): print('Hello World') i += 1
18.6
29
0.634409
banyakPerulangan = 10 i = 0 while (i < banyakPerulangan): print('Hello World') i += 1
0
0
0
251bbbc73707a4d8bb70aeffb163ed0511e6ba61
660
py
Python
matroska_cache/dep/tag.py
kolypto/py-matroska-cache
b40030f97d463aac8e3a6f4b0e0e9f081dfc92b1
[ "MIT" ]
null
null
null
matroska_cache/dep/tag.py
kolypto/py-matroska-cache
b40030f97d463aac8e3a6f4b0e0e9f081dfc92b1
[ "MIT" ]
null
null
null
matroska_cache/dep/tag.py
kolypto/py-matroska-cache
b40030f97d463aac8e3a6f4b0e0e9f081dfc92b1
[ "MIT" ]
null
null
null
from .base import DependencyBase, dataclass @dataclass class Tag(DependencyBase): """ Dependency on an arbitrary tag Usage: use this tag as a named signal to invalidate records Example: update_dashboard_for_admins = Tag('update-dashboard-for-admins') cache.put( 'arti...
20
72
0.562121
from .base import DependencyBase, dataclass @dataclass class Tag(DependencyBase): """ Dependency on an arbitrary tag Usage: use this tag as a named signal to invalidate records Example: update_dashboard_for_admins = Tag('update-dashboard-for-admins') cache.put( 'arti...
44
0
27
4e3ce9f763c7ac23b63142ca0b09def2613ab552
3,644
py
Python
exam_organization/models.py
andaeh/django-exam-organization-tool
fd269402cb74e4028f3aa65978da5a47e4d2f7ae
[ "Apache-2.0" ]
null
null
null
exam_organization/models.py
andaeh/django-exam-organization-tool
fd269402cb74e4028f3aa65978da5a47e4d2f7ae
[ "Apache-2.0" ]
2
2021-09-11T13:42:08.000Z
2022-03-12T01:01:37.000Z
exam_organization/models.py
andaeh/django-exam-organization-tool
fd269402cb74e4028f3aa65978da5a47e4d2f7ae
[ "Apache-2.0" ]
null
null
null
import os from django.db import models from django.contrib.auth.models import User from django.urls import reverse from django.dispatch import receiver from django.db.models.signals import post_delete, post_save from django.conf import settings from django.core.validators import int_list_validator from taggit.manager...
32.828829
156
0.693743
import os from django.db import models from django.contrib.auth.models import User from django.urls import reverse from django.dispatch import receiver from django.db.models.signals import post_delete, post_save from django.conf import settings from django.core.validators import int_list_validator from taggit.manager...
1,154
1,905
136
b4825201505425ba7ab5d67d7de5b45c05e857f4
432
py
Python
tests/test_utils.py
suzukey/fitrate
b78625fc6479210b63df93a854d687641b080621
[ "MIT" ]
null
null
null
tests/test_utils.py
suzukey/fitrate
b78625fc6479210b63df93a854d687641b080621
[ "MIT" ]
1
2020-09-14T22:42:40.000Z
2020-09-14T22:42:40.000Z
tests/test_utils.py
suzukey/fitrate
b78625fc6479210b63df93a854d687641b080621
[ "MIT" ]
null
null
null
from fitrate.utils import gcd, nthrt, prod
21.6
42
0.548611
from fitrate.utils import gcd, nthrt, prod def test_gcd() -> None: assert gcd(*(300, 400)) == 100 assert gcd(*[200, 400, 1000]) == 200 assert gcd(27, 123, 57, 255) == 3 def test_nthrt() -> None: assert nthrt(25, 2) == 5 assert nthrt(27, 3) == 3 assert nthrt(16, 4) == 2 def test_prod() -> N...
317
0
69
ccc8ecdd8c0db0c16f54d60be75aad92f2e60bc2
375
py
Python
modulector/migrations/0010_auto_20201022_0445.py
omics-datascience/modulector
357d8f6f8eab5d04b2357a08d177d75cbdad001a
[ "MIT" ]
2
2021-07-10T20:45:58.000Z
2021-08-18T02:24:58.000Z
modulector/migrations/0010_auto_20201022_0445.py
omics-datascience/modulector
357d8f6f8eab5d04b2357a08d177d75cbdad001a
[ "MIT" ]
3
2021-11-07T23:18:58.000Z
2021-11-22T23:17:35.000Z
modulector/migrations/0010_auto_20201022_0445.py
omics-datascience/modulector
357d8f6f8eab5d04b2357a08d177d75cbdad001a
[ "MIT" ]
null
null
null
# Generated by Django 3.0.8 on 2020-10-22 04:45 from django.db import migrations
19.736842
50
0.597333
# Generated by Django 3.0.8 on 2020-10-22 04:45 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('modulector', '0009_mirnadrugs_support'), ] operations = [ migrations.RenameField( model_name='mirnadrugs', old_name='mirna',...
0
269
23
8ae50b2a412cd79582d436e2ec46bea671d5277c
468
py
Python
MicroPythonADC/adcloop.py
Roger-random/ESP8266Tests
a1938083879042f53a87f5a8d2ac656a62f77281
[ "MIT" ]
null
null
null
MicroPythonADC/adcloop.py
Roger-random/ESP8266Tests
a1938083879042f53a87f5a8d2ac656a62f77281
[ "MIT" ]
null
null
null
MicroPythonADC/adcloop.py
Roger-random/ESP8266Tests
a1938083879042f53a87f5a8d2ac656a62f77281
[ "MIT" ]
null
null
null
import machine import time
23.4
130
0.570513
import machine import time class adcloop: def __init__(self): self.min = 1025 self.max = 0 self.vals = list() def run(self): while True: val = machine.ADC(0).read() if self.max < val: self.max = val if self.min > val: self.min = val self.vals.append(val) ...
376
-7
72
5412a958b9304c6f8be80eb4facd2bfcfa635905
648
py
Python
utils/train.py
csyhhu/attention-is-all-you-need-pytorch
5792c9714295b1a33d1ca074206ec223f436b954
[ "MIT" ]
1
2020-10-01T23:57:16.000Z
2020-10-01T23:57:16.000Z
utils/train.py
csyhhu/attention-is-all-you-need-pytorch
5792c9714295b1a33d1ca074206ec223f436b954
[ "MIT" ]
null
null
null
utils/train.py
csyhhu/attention-is-all-you-need-pytorch
5792c9714295b1a33d1ca074206ec223f436b954
[ "MIT" ]
null
null
null
import torch import torch.nn as nn from utils.miscellaneous import progress_bar
21.6
65
0.589506
import torch import torch.nn as nn from utils.miscellaneous import progress_bar def evaluate(model, iterator, criterion): model.eval() epoch_loss = 0 with torch.no_grad(): for batch_idx, batch in enumerate(iterator): src = batch.src trg = batch.trg output ...
545
0
23
6de1e62c4a84fc603defbbf1a354ab8b75173011
6,558
py
Python
odin/classes/visualizer_localization.py
rnt-pmi/odin
8cfddf04f964393ef30217aa5f4aa61229d7e811
[ "Apache-2.0" ]
4
2021-01-09T10:46:31.000Z
2021-12-16T14:38:06.000Z
odin/classes/visualizer_localization.py
rnt-pmi/odin
8cfddf04f964393ef30217aa5f4aa61229d7e811
[ "Apache-2.0" ]
null
null
null
odin/classes/visualizer_localization.py
rnt-pmi/odin
8cfddf04f964393ef30217aa5f4aa61229d7e811
[ "Apache-2.0" ]
3
2021-01-09T10:46:15.000Z
2021-05-11T01:33:30.000Z
import os import cv2 import numpy as np from matplotlib import pyplot as plt from matplotlib.patches import Polygon from .dataset_localization import DatasetLocalization from odin.utils import Iterator from .visulizer_interface import VisualizerInterface from odin.classes import strings as labels_str
47.868613
199
0.582342
import os import cv2 import numpy as np from matplotlib import pyplot as plt from matplotlib.patches import Polygon from .dataset_localization import DatasetLocalization from odin.utils import Iterator from .visulizer_interface import VisualizerInterface from odin.classes import strings as labels_str class VisualizerL...
6,017
29
209
acc7052fa3ee7bfdc9aa6aafe4fb59c11afa86c5
533
py
Python
NoteBooks/Curso de Python/Python/Data_Managment/Compresion de archivos/Formato_bz2.py
Alejandro-sin/Learning_Notebooks
161d6bed4c7b1d171b45f61c0cc6fa91e9894aad
[ "MIT" ]
1
2021-02-26T13:12:22.000Z
2021-02-26T13:12:22.000Z
NoteBooks/Curso de Python/Python/Data_Managment/Compresion de archivos/Formato_bz2.py
Alejandro-sin/Learning_Notebooks
161d6bed4c7b1d171b45f61c0cc6fa91e9894aad
[ "MIT" ]
null
null
null
NoteBooks/Curso de Python/Python/Data_Managment/Compresion de archivos/Formato_bz2.py
Alejandro-sin/Learning_Notebooks
161d6bed4c7b1d171b45f61c0cc6fa91e9894aad
[ "MIT" ]
null
null
null
''' Es un méotod de compresión muy sencillo. Bonzip ''' import bz2 #Cadena binaria cadena = b'Este es eun ejemplo del formato de compresion Bonzip, sirve para comprimir TODO.' cadena_comprimida = bz2.compress(cadena) print(cadena_comprimida)#b"BZh91AY&SY\xbf\xb8:\xfa\x00\x00\x06\x15\x80@\x04\x08\x00.\xa3\xde@ \x0...
26.65
246
0.752345
''' Es un méotod de compresión muy sencillo. Bonzip ''' import bz2 #Cadena binaria cadena = b'Este es eun ejemplo del formato de compresion Bonzip, sirve para comprimir TODO.' cadena_comprimida = bz2.compress(cadena) print(cadena_comprimida)#b"BZh91AY&SY\xbf\xb8:\xfa\x00\x00\x06\x15\x80@\x04\x08\x00.\xa3\xde@ \x0...
0
0
0
a345ec5ac2fe536c17768881a75d838a62037de6
1,057
py
Python
src/message_based_responses.py
LakshyaShastri/C45DiscordBot
624674ef2b9ef4d147d709fa5f23dafc0b9fcadb
[ "MIT" ]
2
2020-03-31T14:45:11.000Z
2020-03-31T15:20:35.000Z
src/message_based_responses.py
LakshyaShastri/C45DiscordBot
624674ef2b9ef4d147d709fa5f23dafc0b9fcadb
[ "MIT" ]
26
2020-03-30T17:34:35.000Z
2020-10-05T19:26:37.000Z
src/message_based_responses.py
LakshyaShastri/C45DiscordBot
624674ef2b9ef4d147d709fa5f23dafc0b9fcadb
[ "MIT" ]
1
2020-10-02T07:58:18.000Z
2020-10-02T07:58:18.000Z
import re import random
31.088235
99
0.599811
import re import random def _match_word(word_to_match, message_content): return re.search("^.*(\\w*[\b ]?{}([. !?@]+\\w*| +)?)$".format(word_to_match), message_content) def regex_based_response(message_content): response = [] if _match_word("test", message_content): print('[DEBUG] Test hit!') ...
991
0
46
2bc8856b29271b763a0ca748604553dbd4283306
10,681
py
Python
test/unit/spiderfoot/test_spiderfootplugin.py
khiemtq-cyber/spiderfoot
66e671918853b0334931fd2fbabad0096d506726
[ "MIT" ]
null
null
null
test/unit/spiderfoot/test_spiderfootplugin.py
khiemtq-cyber/spiderfoot
66e671918853b0334931fd2fbabad0096d506726
[ "MIT" ]
null
null
null
test/unit/spiderfoot/test_spiderfootplugin.py
khiemtq-cyber/spiderfoot
66e671918853b0334931fd2fbabad0096d506726
[ "MIT" ]
null
null
null
# test_spiderfootplugin.py import pytest import unittest from sflib import SpiderFoot from spiderfoot import SpiderFootDb, SpiderFootEvent, SpiderFootPlugin, SpiderFootTarget @pytest.mark.usefixtures class TestSpiderFootPlugin(unittest.TestCase): """ Test SpiderFoot """ def test_init(self): ...
28.712366
107
0.614175
# test_spiderfootplugin.py import pytest import unittest from sflib import SpiderFoot from spiderfoot import SpiderFootDb, SpiderFootEvent, SpiderFootPlugin, SpiderFootTarget @pytest.mark.usefixtures class TestSpiderFootPlugin(unittest.TestCase): """ Test SpiderFoot """ def test_init(self): ...
75
-2
65
7c20b7d1b3b1ead52022d57946dc953d553868a4
4,989
py
Python
pytorch_lightning/utilities/seed.py
GabrielePicco/pytorch-lightning
0d6dfd42d8965347a258e3d20e83bddd344e718f
[ "Apache-2.0" ]
1
2022-01-08T14:06:36.000Z
2022-01-08T14:06:36.000Z
pytorch_lightning/utilities/seed.py
GabrielePicco/pytorch-lightning
0d6dfd42d8965347a258e3d20e83bddd344e718f
[ "Apache-2.0" ]
null
null
null
pytorch_lightning/utilities/seed.py
GabrielePicco/pytorch-lightning
0d6dfd42d8965347a258e3d20e83bddd344e718f
[ "Apache-2.0" ]
1
2022-01-08T14:06:27.000Z
2022-01-08T14:06:27.000Z
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
42.279661
119
0.719583
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
122
0
23
97928beddf03c0eb483c6b3faad2fde0285120b9
4,790
py
Python
src/experiments/train_common.py
prakashchhipa/Depth-Contrast-Self-Supervised-Method
c68f2ea85063be3a63216985fbe806621174889b
[ "Apache-2.0" ]
null
null
null
src/experiments/train_common.py
prakashchhipa/Depth-Contrast-Self-Supervised-Method
c68f2ea85063be3a63216985fbe806621174889b
[ "Apache-2.0" ]
null
null
null
src/experiments/train_common.py
prakashchhipa/Depth-Contrast-Self-Supervised-Method
c68f2ea85063be3a63216985fbe806621174889b
[ "Apache-2.0" ]
null
null
null
from distutils.log import error import errno import numpy as np import json import argparse import time from tqdm import tqdm import cv2 import logging import sys, os import torch import torchvision import torch.nn as nn from torch import optim from torch.utils.data import DataLoader from torch.utils.tensorboard impor...
41.293103
320
0.746764
from distutils.log import error import errno import numpy as np import json import argparse import time from tqdm import tqdm import cv2 import logging import sys, os import torch import torchvision import torch.nn as nn from torch import optim from torch.utils.data import DataLoader from torch.utils.tensorboard impor...
3,970
0
23
b36a0b7dd2d9576d02a33fbac3594480be303cda
1,140
py
Python
spplib/cli/commands/cmd_vm.py
sppautomation/sppclient
d6d5f2c27877f03f68ef2716b204503b7764fe75
[ "Apache-2.0" ]
7
2018-06-01T21:53:35.000Z
2021-06-02T13:50:56.000Z
spplib/cli/commands/cmd_vm.py
sppautomation/sppclient
d6d5f2c27877f03f68ef2716b204503b7764fe75
[ "Apache-2.0" ]
7
2018-11-29T05:15:26.000Z
2021-03-31T13:39:30.000Z
spplib/cli/commands/cmd_vm.py
sppautomation/sppclient
d6d5f2c27877f03f68ef2716b204503b7764fe75
[ "Apache-2.0" ]
8
2018-05-08T16:07:09.000Z
2020-04-05T09:39:39.000Z
import json import click from tabulate import tabulate from spplib.cli import util @click.group() @util.pass_context def cli(ctx, **kwargs): """VM resource. """ pass @cli.command() @util.pass_context @click.argument('pattern')
22.8
95
0.647368
import json import click from tabulate import tabulate from spplib.cli import util @click.group() @util.pass_context def cli(ctx, **kwargs): """VM resource. """ pass def get_sla_info(spp_session): sla_policies = spp_session.get(restype='sla')['slapolicies'] return dict([(int(x['id']), x['name...
847
0
46
2b8daba4bc8dba84de9f41bfcd785d9de888127b
344
py
Python
immobilien/admin.py
sahin88/Django_Rest_Framework_Redux_React_Estate_App_FullStack
10e31c4071bcebc0e4401f42084211d170b2ea56
[ "Unlicense" ]
null
null
null
immobilien/admin.py
sahin88/Django_Rest_Framework_Redux_React_Estate_App_FullStack
10e31c4071bcebc0e4401f42084211d170b2ea56
[ "Unlicense" ]
null
null
null
immobilien/admin.py
sahin88/Django_Rest_Framework_Redux_React_Estate_App_FullStack
10e31c4071bcebc0e4401f42084211d170b2ea56
[ "Unlicense" ]
null
null
null
from django.contrib import admin from .models import immobilien admin.site.register(immobilien, immobilienAdmin) # Register your models here.
21.5
61
0.718023
from django.contrib import admin from .models import immobilien class immobilienAdmin(admin.ModelAdmin): list_display = ('id', 'name', 'date_joined', 'topseller') list_display_links = ('id', 'name') search_fields = ('name',) list_per_page = 24 admin.site.register(immobilien, immobilienAdmin) # Reg...
0
175
23
d74b93e88cabf9aa66652003dbd1b9b073dd3701
289
py
Python
css/email.py
Pipefehecar/repo_prueba
2d1f8c531e40dc3071d17da1cdb1dbfb98448537
[ "Apache-2.0" ]
2
2018-04-13T02:04:25.000Z
2018-04-13T02:04:27.000Z
css/email.py
Pipefehecar/repo_prueba
2d1f8c531e40dc3071d17da1cdb1dbfb98448537
[ "Apache-2.0" ]
null
null
null
css/email.py
Pipefehecar/repo_prueba
2d1f8c531e40dc3071d17da1cdb1dbfb98448537
[ "Apache-2.0" ]
null
null
null
class Alarma(): """clase del objeto alarma"""
16.055556
30
0.698962
class Alarma(): """clase del objeto alarma""" def __init__(self,fecha): global fecha, destinatarios self.fecha = fecha pass def adjuntar_archivo(): pass def agregar_borrador(): pass def corregir_error(): pass def leer_email(): pass def verificar_recibido(): pass
102
0
138
2feb18d20046f1329505a5aa39be610306b9d37c
1,339
py
Python
nova/compute/opts.py
bopopescu/nova-token
ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2
[ "Apache-2.0" ]
null
null
null
nova/compute/opts.py
bopopescu/nova-token
ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2
[ "Apache-2.0" ]
null
null
null
nova/compute/opts.py
bopopescu/nova-token
ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2
[ "Apache-2.0" ]
2
2017-07-20T17:31:34.000Z
2020-07-24T02:42:19.000Z
begin_unit comment|'# Licensed under the Apache License, Version 2.0 (the "License"); you may not' nl|'\n' comment|'# use this file except in compliance with the License. You may obtain a copy' nl|'\n' comment|'# of the License at' nl|'\n' comment|'#' nl|'\n' comment|'# http://www.apache.org/licenses/LICENSE-2.0' nl|'\...
17.166667
87
0.655713
begin_unit comment|'# Licensed under the Apache License, Version 2.0 (the "License"); you may not' nl|'\n' comment|'# use this file except in compliance with the License. You may obtain a copy' nl|'\n' comment|'# of the License at' nl|'\n' comment|'#' nl|'\n' comment|'# http://www.apache.org/licenses/LICENSE-2.0' nl|'\...
0
0
0
e003d37ef95a2f23468b50954b5d783dca79c69a
7,620
py
Python
scratch/rowe_model_opt3.py
Lefebvrelab/SpectralNeuralModels
35d34095f573713ea8beb061f0ec13929ce579e9
[ "MIT" ]
null
null
null
scratch/rowe_model_opt3.py
Lefebvrelab/SpectralNeuralModels
35d34095f573713ea8beb061f0ec13929ce579e9
[ "MIT" ]
8
2018-05-03T16:09:01.000Z
2019-04-20T18:44:46.000Z
scratch/rowe_model_opt3.py
Lefebvrelab/SpectralNeuralModels
35d34095f573713ea8beb061f0ec13929ce579e9
[ "MIT" ]
null
null
null
from matplotlib import pyplot as plt import numpy as np import pandas as pd from numpy import pi,abs,exp,log,log10 from scipy import optimize class RoweOptimization(): ''' Optimizing the Rowe Model onto a training set. The key parameters to adjust are as follows: - G_ee - G_e...
28.973384
89
0.465354
from matplotlib import pyplot as plt import numpy as np import pandas as pd from numpy import pi,abs,exp,log,log10 from scipy import optimize class Rowe2015Model(): def __init__(self): # Constants self.gamma_e = 116 # s^-1 self.r_e = 86 # mm self.Q_...
3,761
611
57
d3530afd4b1ee97d2fb3a9b0e9d548a215b5bb8c
1,384
py
Python
src/graph_visualize.py
sawyerWeld/PrefGAN
295a165947fc300b2dd0754607076c780fbcafa1
[ "MIT" ]
null
null
null
src/graph_visualize.py
sawyerWeld/PrefGAN
295a165947fc300b2dd0754607076c780fbcafa1
[ "MIT" ]
null
null
null
src/graph_visualize.py
sawyerWeld/PrefGAN
295a165947fc300b2dd0754607076c780fbcafa1
[ "MIT" ]
null
null
null
#graph_visualize.py from graphviz import Digraph import pairwise # Given a vector of the form generated in pairwise.py for # easy reading into NNs, produce a diagram of the represented graph
32.952381
81
0.609827
#graph_visualize.py from graphviz import Digraph import pairwise # Given a vector of the form generated in pairwise.py for # easy reading into NNs, produce a diagram of the represented graph def vec_to_graph(vec, name='no_name_graph', save=False, fromTorch=True): matrix = None if fromTorch: matrix = ...
1,145
0
45
2d116e962789c83860d1307c9a4a5d5c894be102
3,449
py
Python
tests/corpora/test_parallel_text_corpus.py
johnml1135/machine.py
7bfb668b81d6af476f7ee797900e111c3027d542
[ "MIT" ]
2
2021-09-14T15:41:14.000Z
2021-09-14T15:53:46.000Z
tests/corpora/test_parallel_text_corpus.py
johnml1135/machine.py
7bfb668b81d6af476f7ee797900e111c3027d542
[ "MIT" ]
2
2021-11-04T09:12:26.000Z
2021-11-08T08:35:36.000Z
tests/corpora/test_parallel_text_corpus.py
johnml1135/machine.py
7bfb668b81d6af476f7ee797900e111c3027d542
[ "MIT" ]
1
2021-11-03T14:45:11.000Z
2021-11-03T14:45:11.000Z
from machine.corpora import ( DictionaryTextAlignmentCorpus, DictionaryTextCorpus, MemoryText, MemoryTextAlignmentCollection, ParallelTextCorpus, )
45.381579
103
0.76138
from machine.corpora import ( DictionaryTextAlignmentCorpus, DictionaryTextCorpus, MemoryText, MemoryTextAlignmentCollection, ParallelTextCorpus, ) def test_texts_no_texts() -> None: source_corpus = DictionaryTextCorpus() target_corpus = DictionaryTextCorpus() parallel_corpus = Parall...
3,137
0
138
5e7f49dd4d34480adfda849b4671baf126b95da5
523
py
Python
tests/test_vote.py
james-muriithi/pitches
e7da364f9525847c2ed8d88aea9a81a87c4c113b
[ "Unlicense" ]
null
null
null
tests/test_vote.py
james-muriithi/pitches
e7da364f9525847c2ed8d88aea9a81a87c4c113b
[ "Unlicense" ]
null
null
null
tests/test_vote.py
james-muriithi/pitches
e7da364f9525847c2ed8d88aea9a81a87c4c113b
[ "Unlicense" ]
null
null
null
from unicodedata import name import unittest from app.models import Vote, User
32.6875
88
0.6826
from unicodedata import name import unittest from app.models import Vote, User class TestVote(unittest.TestCase): def setUp(self): self.user = User(username="james", id=1, name="James Muriithi", email="m@a.com") self.vote = Vote(vote=1, user=self.user, pitch_id=1) def test_instance(self): ...
324
13
107
cedaee8ae0d46d7b6db7e6e560962ac51696012d
2,076
py
Python
7/challenge2.py
roryeiffe/Adent-of-Code
80f123663fcf04bf5f0d6733807b4a2dd53bc68c
[ "MIT" ]
null
null
null
7/challenge2.py
roryeiffe/Adent-of-Code
80f123663fcf04bf5f0d6733807b4a2dd53bc68c
[ "MIT" ]
null
null
null
7/challenge2.py
roryeiffe/Adent-of-Code
80f123663fcf04bf5f0d6733807b4a2dd53bc68c
[ "MIT" ]
null
null
null
import sys # recursive search through bag dictionary: # given a bag string, return only the name of the bag: # ex: 1 light blue returns light blue # given a bag string, return the quantity: # ex: 1 light blue returns 1 f = open(sys.argv[1],"r") L = [] for item in f: L.append(item.strip()) # dictionary where key i...
29.239437
77
0.69316
import sys # recursive search through bag dictionary: def search(bag_contains, current): children = bag_contains[get_bag(current)] # base cases # if this bag does not contain any other bags: # each level is how many bags are in this current bag (including children) # base case: since there are no children, we ar...
877
0
66
1bdbba7f4e63c6bef0d5a716b758d10956003075
326
py
Python
samples/WebApplication/OneUserScenario.py
jproudlo/PyModel
2ab0e2cf821807206725adaa425409b0c28929b7
[ "BSD-3-Clause" ]
61
2015-01-29T16:18:51.000Z
2021-09-28T10:14:02.000Z
samples/WebApplication/OneUserScenario.py
vikstr/PyModel
4fff616fe0fd8342c91a42d9db5d4097a179dff8
[ "BSD-3-Clause" ]
2
2015-02-04T11:57:53.000Z
2021-07-18T20:59:55.000Z
samples/WebApplication/OneUserScenario.py
vikstr/PyModel
4fff616fe0fd8342c91a42d9db5d4097a179dff8
[ "BSD-3-Clause" ]
34
2015-02-04T12:00:29.000Z
2022-03-14T07:41:25.000Z
"One user repeatedly logs in, logs out. Allow interleaving with other actions" from WebModel import Login, Logout actions = (Login, Logout) # just these to allow interleaving initial = 0 accepting = (0,) graph = ((0, (Login, ( 'VinniPuhh', 'Correct' ), 'Success'), 1), (1, (Logout, ( 'VinniPuhh', ), None),...
25.076923
79
0.650307
"One user repeatedly logs in, logs out. Allow interleaving with other actions" from WebModel import Login, Logout actions = (Login, Logout) # just these to allow interleaving initial = 0 accepting = (0,) graph = ((0, (Login, ( 'VinniPuhh', 'Correct' ), 'Success'), 1), (1, (Logout, ( 'VinniPuhh', ), None),...
0
0
0
cf94635475a33564a16e558dee889bd78cf10571
542
py
Python
tests/test_statics.py
beastbikes/django-only-admin
c89b782b92edbb1f75151e71163c0708afacd4f9
[ "MIT" ]
32
2016-11-24T08:33:10.000Z
2017-12-18T00:25:00.000Z
tests/test_statics.py
beastbikes/django-only-admin
c89b782b92edbb1f75151e71163c0708afacd4f9
[ "MIT" ]
15
2016-11-30T08:28:56.000Z
2017-09-20T15:54:18.000Z
tests/test_statics.py
beastbikes/django-only-admin
c89b782b92edbb1f75151e71163c0708afacd4f9
[ "MIT" ]
9
2016-11-25T02:14:24.000Z
2017-12-06T13:22:51.000Z
import os from django.test import TestCase from django.contrib.staticfiles import finders
27.1
62
0.710332
import os from django.test import TestCase from django.contrib.staticfiles import finders class StaticTestCase(TestCase): def test_font_awesome(self): path = 'plugins/font-awesome/css/font-awesome.min.css' absolute_path = finders.find(path) assert absolute_path is not None asser...
389
10
50
0c9884ea394c7fd5bab4fbd1dc9bebd53080457b
4,264
py
Python
FaceSwap/zad2.py
i-khan/FaceSwap
e9f5b0a95af7ba62ce6978a5c7a4511086948a82
[ "MIT" ]
null
null
null
FaceSwap/zad2.py
i-khan/FaceSwap
e9f5b0a95af7ba62ce6978a5c7a4511086948a82
[ "MIT" ]
null
null
null
FaceSwap/zad2.py
i-khan/FaceSwap
e9f5b0a95af7ba62ce6978a5c7a4511086948a82
[ "MIT" ]
null
null
null
import dlib import cv2 import numpy as np import sys import models import NonLinearLeastSquares import ImageProcessing from drawing import * import FaceRendering import utils import os import subprocess print "Press T to draw the keypoints and the 3D model" print "Press R to start recording to a video file" #you ...
36.135593
214
0.692542
import dlib import cv2 import numpy as np import sys import models import NonLinearLeastSquares import ImageProcessing from drawing import * import FaceRendering import utils import os import subprocess print "Press T to draw the keypoints and the 3D model" print "Press R to start recording to a video file" #you ...
0
0
0
29895e9f595bd0e2bfb7657a094cd535ad76784c
586
py
Python
Desafios/Desafio98.py
Felix-xilef/Curso-de-Python
cdff7c7f3850e6326e274c8c1987b9e1a18ce910
[ "MIT" ]
null
null
null
Desafios/Desafio98.py
Felix-xilef/Curso-de-Python
cdff7c7f3850e6326e274c8c1987b9e1a18ce910
[ "MIT" ]
null
null
null
Desafios/Desafio98.py
Felix-xilef/Curso-de-Python
cdff7c7f3850e6326e274c8c1987b9e1a18ce910
[ "MIT" ]
null
null
null
from auxiliar import receberInt from time import sleep # main contador(1, 10, 1) contador(10, 0, 2) contador(receberInt('Digite o inicio: '), receberInt('Digite o fim: '), receberInt('Digite o passo: ')) input('\n\nPressione <enter> para continuar')
23.44
103
0.583618
from auxiliar import receberInt from time import sleep def contador(inicio, fim, passo): print('-'*30) print(f'Contagem de {inicio} até {fim} de {passo} em {passo}') if inicio > fim: passo *= -1 fim -= 1 else: fim += 1 for i in range(inicio, fim, passo): sleep(0.5) ...
311
0
23
31311b055c16c8db5e97123b97dbdb3720180513
368
py
Python
blog/migrations/0030_auto_20190705_1244.py
Labbit-kw/hologram-project
708b773e932f6ad0f92d1d9e2e57cfbd8b17b933
[ "MIT" ]
null
null
null
blog/migrations/0030_auto_20190705_1244.py
Labbit-kw/hologram-project
708b773e932f6ad0f92d1d9e2e57cfbd8b17b933
[ "MIT" ]
null
null
null
blog/migrations/0030_auto_20190705_1244.py
Labbit-kw/hologram-project
708b773e932f6ad0f92d1d9e2e57cfbd8b17b933
[ "MIT" ]
null
null
null
# Generated by Django 2.2.2 on 2019-07-05 12:44 from django.db import migrations
19.368421
47
0.589674
# Generated by Django 2.2.2 on 2019-07-05 12:44 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('blog', '0029_auto_20190705_1240'), ] operations = [ migrations.RenameField( model_name='uploadboard', old_name='file_title',...
0
262
23
7af1d31414874444295da4f2cff38f7fc177697e
4,889
py
Python
tx_rx_list_creator_milp.py
WiSig-dataset/wisig-subset-creation
bc8c6bd352a8c184a571e6b4c2d7a890cdfff3d8
[ "BSD-3-Clause" ]
1
2022-03-17T07:44:24.000Z
2022-03-17T07:44:24.000Z
tx_rx_list_creator_milp.py
WiSig-dataset/wisig-subset-creation
bc8c6bd352a8c184a571e6b4c2d7a890cdfff3d8
[ "BSD-3-Clause" ]
null
null
null
tx_rx_list_creator_milp.py
WiSig-dataset/wisig-subset-creation
bc8c6bd352a8c184a571e6b4c2d7a890cdfff3d8
[ "BSD-3-Clause" ]
null
null
null
import pickle import numpy as np import gurobipy as gp from gurobipy import GRB from tqdm.notebook import trange, tqdm
41.786325
141
0.599305
import pickle import numpy as np import gurobipy as gp from gurobipy import GRB from tqdm.notebook import trange, tqdm def solve_for_lists_milp(num_tx = None, min_sig = None, min_sig_low = None, satisfaction=1.0, verbose=False): with open('data_summary.pkl', 'rb') as f: d=pickle.load(f) capture_date_l...
4,719
0
46
b84078c4cb83dfb19f774e9116faa6561ca0090b
15,948
py
Python
alphapept/matching.py
PatrickvanZalm/alphapept
58dbe8b75c1a5384f970893c7cc9b7c929a1cfe2
[ "Apache-2.0" ]
null
null
null
alphapept/matching.py
PatrickvanZalm/alphapept
58dbe8b75c1a5384f970893c7cc9b7c929a1cfe2
[ "Apache-2.0" ]
null
null
null
alphapept/matching.py
PatrickvanZalm/alphapept
58dbe8b75c1a5384f970893c7cc9b7c929a1cfe2
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/09_matching.ipynb (unless otherwise specified). __all__ = ['calculate_distance', 'calib_table', 'align', 'calculate_deltas', 'align_files', 'align_datasets', 'get_probability', 'match_datasets'] # Cell import pandas as pd import numpy as np def calculate_di...
36.746544
124
0.658891
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/09_matching.ipynb (unless otherwise specified). __all__ = ['calculate_distance', 'calib_table', 'align', 'calculate_deltas', 'align_files', 'align_datasets', 'get_probability', 'match_datasets'] # Cell import pandas as pd import numpy as np def calculate_di...
67
0
30
e20006aa1bcdf9766118cc8327dfb3893735dd0f
5,147
py
Python
web_journal/service/filesystem.py
pete88b/web_journal
7a6cd88d13f109836118c2a025a1c69d6172283e
[ "Apache-2.0" ]
null
null
null
web_journal/service/filesystem.py
pete88b/web_journal
7a6cd88d13f109836118c2a025a1c69d6172283e
[ "Apache-2.0" ]
null
null
null
web_journal/service/filesystem.py
pete88b/web_journal
7a6cd88d13f109836118c2a025a1c69d6172283e
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED! DO NOT EDIT! File to edit: 40b_service_filesystem.ipynb (unless otherwise specified). __all__ = ['sort_posts', 'posts_list_to_dict', 'migrate', 'ServiceFilesystem', 'before_request', 'after_request', 'init_service'] # Cell import json,uuid,datetime,re from pathlib import Path from operator...
37.569343
113
0.631436
# AUTOGENERATED! DO NOT EDIT! File to edit: 40b_service_filesystem.ipynb (unless otherwise specified). __all__ = ['sort_posts', 'posts_list_to_dict', 'migrate', 'ServiceFilesystem', 'before_request', 'after_request', 'init_service'] # Cell import json,uuid,datetime,re from pathlib import Path from operator...
4,097
3
482
cf4b895823276a02926235217abb1d4e591964cc
1,468
py
Python
core_dev/_collections/graph/graph.py
alexzanderr/_core-dev
831f69dad524e450c4243b1dd88f26de80e1d444
[ "MIT" ]
null
null
null
core_dev/_collections/graph/graph.py
alexzanderr/_core-dev
831f69dad524e450c4243b1dd88f26de80e1d444
[ "MIT" ]
null
null
null
core_dev/_collections/graph/graph.py
alexzanderr/_core-dev
831f69dad524e450c4243b1dd88f26de80e1d444
[ "MIT" ]
null
null
null
""" graph.py useful graph collection author: @alexzander """ # python import os # core package from core.system import * from core.json__ import * from exceptions import * from core.path__ import * # from exceptions import * (same thing, it works)
27.185185
97
0.583787
""" graph.py useful graph collection author: @alexzander """ # python import os # core package from core.system import * from core.json__ import * from exceptions import * from core.path__ import * # from exceptions import * (same thing, it works) class Graph: def __init__(...
1,047
-9
138
1e33a26347f208b9cd6f46e08a1083723e916c43
1,262
py
Python
tools/lib/formats/default/lineHandler.py
pfloos/QUESTDB_website
720fb41c42f50e3614cf406fa6cade594f9dd526
[ "BSD-3-Clause" ]
2
2020-10-29T19:41:52.000Z
2021-08-12T04:28:33.000Z
tools/lib/formats/default/lineHandler.py
rdguerrerom/QUESTDB_website
bebcfdd9596ca90f9c1ca210a68569b767fdfbce
[ "BSD-3-Clause" ]
1
2020-11-20T10:06:44.000Z
2020-11-20T10:06:44.000Z
tools/lib/formats/default/lineHandler.py
rdguerrerom/QUESTDB_website
bebcfdd9596ca90f9c1ca210a68569b767fdfbce
[ "BSD-3-Clause" ]
2
2020-11-16T14:46:02.000Z
2020-11-24T15:56:47.000Z
from ..formatHandlerBase import formatHandlerBase from ..formatName import formatName from ...data import dataFileBase,DataType,method,excitationValue,datafileSelector from ...utils import getValFromCell import numpy as np @formatName("line")
38.242424
119
0.666403
from ..formatHandlerBase import formatHandlerBase from ..formatName import formatName from ...data import dataFileBase,DataType,method,excitationValue,datafileSelector from ...utils import getValFromCell import numpy as np @formatName("line") class lineHandler(formatHandlerBase): def readFromTable(self,table): da...
958
16
46
72b828a699b17bd111dc3d200cb7028c6164204b
1,356
py
Python
setup.py
karstenw/FMPasteBox
c84aa860401051ed369d8559afa83f572a2bd729
[ "BSD-2-Clause" ]
2
2021-07-14T10:07:13.000Z
2021-11-14T17:59:18.000Z
setup.py
karstenw/FMPasteBox
c84aa860401051ed369d8559afa83f572a2bd729
[ "BSD-2-Clause" ]
null
null
null
setup.py
karstenw/FMPasteBox
c84aa860401051ed369d8559afa83f572a2bd729
[ "BSD-2-Clause" ]
null
null
null
""" Script for building FMPasteBox Usage: python setup.py py2app """ from distutils.core import setup from setuptools.extension import Extension import py2app import FMPasteBoxVersion setup( name = FMPasteBoxVersion.appname, version = FMPasteBoxVersion.version, description = FMPasteBoxVersion.descri...
27.12
68
0.634218
""" Script for building FMPasteBox Usage: python setup.py py2app """ from distutils.core import setup from setuptools.extension import Extension import py2app import FMPasteBoxVersion setup( name = FMPasteBoxVersion.appname, version = FMPasteBoxVersion.version, description = FMPasteBoxVersion.descri...
0
0
0
0c0e45b33a5297c3f61ad03da499611f67da31e8
9,755
py
Python
src/visualization/visualize.py
siebeniris/superresolution
2eec93029c1332720ba17d5747ec9aee19bc0c63
[ "MIT" ]
null
null
null
src/visualization/visualize.py
siebeniris/superresolution
2eec93029c1332720ba17d5747ec9aee19bc0c63
[ "MIT" ]
null
null
null
src/visualization/visualize.py
siebeniris/superresolution
2eec93029c1332720ba17d5747ec9aee19bc0c63
[ "MIT" ]
null
null
null
from __future__ import print_function import argparse import os import sys, glob, itertools, math from typing import List, Dict from PIL import Image, ImageFont, ImageDraw import torch from ..srcnn.srcnn_run import SRCNNPreProcessor, SRCNNPreProcessorGen from src.srgan.srgan_module import Generator as SRGANGenerator f...
32.088816
108
0.526602
from __future__ import print_function import argparse import os import sys, glob, itertools, math from typing import List, Dict from PIL import Image, ImageFont, ImageDraw import torch from ..srcnn.srcnn_run import SRCNNPreProcessor, SRCNNPreProcessorGen from src.srgan.srgan_module import Generator as SRGANGenerator f...
8,426
0
161
bb3a71e89f46206d090a6a89fb38b7d1c5ab5c34
4,883
py
Python
tests/test_store2hdf5.py
Matioz/humblerl
8000cf60f2baa8b80927275c15147b6de199d75a
[ "MIT" ]
null
null
null
tests/test_store2hdf5.py
Matioz/humblerl
8000cf60f2baa8b80927275c15147b6de199d75a
[ "MIT" ]
null
null
null
tests/test_store2hdf5.py
Matioz/humblerl
8000cf60f2baa8b80927275c15147b6de199d75a
[ "MIT" ]
null
null
null
import h5py import numpy as np from .. import Transition from ..callbacks import StoreStates2Hdf5 HDF5_PATH = "/tmp/test_humblerl_callback.hdf5" class TestStoreTransitions2Hdf5(object): """Test callback on 3D (e.g. images) and continuous states."""
40.02459
94
0.584067
import h5py import numpy as np from .. import Transition from ..callbacks import StoreStates2Hdf5 HDF5_PATH = "/tmp/test_humblerl_callback.hdf5" class TestStoreTransitions2Hdf5(object): """Test callback on 3D (e.g. images) and continuous states.""" def test_images_states(self): ACTION_SPACE = np.ar...
4,545
0
81
c84164ddec73f5647fd324062b3b890f6b6bfb9b
3,362
py
Python
tests/test_accounts.py
zcking/oink
95f07567ecda214172c29684d0ee5f67da5b99cf
[ "MIT" ]
3
2017-10-15T21:24:14.000Z
2021-06-02T21:15:28.000Z
tests/test_accounts.py
zach-king/oink
95f07567ecda214172c29684d0ee5f67da5b99cf
[ "MIT" ]
1
2018-06-26T03:48:55.000Z
2018-06-26T03:48:55.000Z
tests/test_accounts.py
zach-king/oink
95f07567ecda214172c29684d0ee5f67da5b99cf
[ "MIT" ]
null
null
null
''' File: test_accounts.py Author: Zachary King Defines unit tests for accounts.py. Tests all account features. ''' from __future__ import print_function import unittest import os from oink import accounts, db class TestAccounts(unittest.TestCase): '''Defines unit tests for adding and removing accounts.''' ...
33.959596
95
0.646936
''' File: test_accounts.py Author: Zachary King Defines unit tests for accounts.py. Tests all account features. ''' from __future__ import print_function import unittest import os from oink import accounts, db class TestAccounts(unittest.TestCase): '''Defines unit tests for adding and removing accounts.''' ...
0
0
0
8c4c0dc6efacc5b204fcaf8a7dd7a84ae0e43270
466
py
Python
rpna/core/migrations/0007_profile_change_default.py
code-for-good-wm/rooseveltparkna-alerts
bb22150141dd9448004a04df66d9ce0f353a3c10
[ "MIT" ]
1
2021-11-07T19:00:32.000Z
2021-11-07T19:00:32.000Z
rpna/core/migrations/0007_profile_change_default.py
code-for-good-wm/rooseveltparkna-alerts
bb22150141dd9448004a04df66d9ce0f353a3c10
[ "MIT" ]
null
null
null
rpna/core/migrations/0007_profile_change_default.py
code-for-good-wm/rooseveltparkna-alerts
bb22150141dd9448004a04df66d9ce0f353a3c10
[ "MIT" ]
null
null
null
# Generated by Django 3.2.9 on 2021-11-07 02:05 from django.db import migrations, models
22.190476
65
0.590129
# Generated by Django 3.2.9 on 2021-11-07 02:05 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("core", "0006_profile_fix_nulls"), ] operations = [ migrations.AlterField( model_name="profile", name="neighborhood_u...
0
352
23
c66c4b547d80fddf7c83780bd317fd0de4bbb554
1,174
py
Python
siptrackweb/views/device/utils.py
lalusvipi/siptrackweb
e4d2882595a40d3dbb1bb74c1838937988726d8e
[ "BSD-2-Clause" ]
38
2015-03-18T08:05:35.000Z
2021-11-09T10:57:54.000Z
siptrackweb/views/device/utils.py
lalusvipi/siptrackweb
e4d2882595a40d3dbb1bb74c1838937988726d8e
[ "BSD-2-Clause" ]
29
2015-06-25T11:28:07.000Z
2019-11-30T21:15:30.000Z
siptrackweb/views/device/utils.py
lalusvipi/siptrackweb
e4d2882595a40d3dbb1bb74c1838937988726d8e
[ "BSD-2-Clause" ]
13
2015-03-18T06:57:46.000Z
2021-06-22T10:38:49.000Z
from siptrackweb.views import helpers
46.96
116
0.539182
from siptrackweb.views import helpers def make_device_association_list(device): ret = [] for assoc in device.listAssociations(include = ['device', 'device category']): if assoc.class_name == 'device category': path = [{'path': '/display/%s/' % assoc.oid, 'name': assoc.attributes.get('name',...
1,113
0
23
3f1716b49e21337ee8e79019daeb46f75cdd36f3
1,316
py
Python
setup.py
WaltWh/w2n
be5157949e6d0e07d13084ae3dcee0267c6f1711
[ "MIT" ]
null
null
null
setup.py
WaltWh/w2n
be5157949e6d0e07d13084ae3dcee0267c6f1711
[ "MIT" ]
null
null
null
setup.py
WaltWh/w2n
be5157949e6d0e07d13084ae3dcee0267c6f1711
[ "MIT" ]
null
null
null
import re from setuptools import setup version = "" with open("w2n/__init__.py") as f: search = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', f.read(), re.MULTILINE) if search is not None: version = search.group(1) else: raise RuntimeError("Could not grab version string") if not ...
31.333333
96
0.651216
import re from setuptools import setup version = "" with open("w2n/__init__.py") as f: search = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', f.read(), re.MULTILINE) if search is not None: version = search.group(1) else: raise RuntimeError("Could not grab version string") if not ...
0
0
0
e0f36937cc4182603ec4de89ec2b3cd9d5f9e53c
5,995
py
Python
regression/train.py
Mariappan/examples
2c75018b743a26b6495ddba70100e557aeda11b8
[ "Apache-2.0" ]
null
null
null
regression/train.py
Mariappan/examples
2c75018b743a26b6495ddba70100e557aeda11b8
[ "Apache-2.0" ]
null
null
null
regression/train.py
Mariappan/examples
2c75018b743a26b6495ddba70100e557aeda11b8
[ "Apache-2.0" ]
null
null
null
import joblib import logging from typing import Tuple from catboost import CatBoostRegressor from environs import Env import numpy as np import pandas as pd from sklearn import metrics from bedrock_client.bedrock.analyzer import ModelTask, ModelTypes from bedrock_client.bedrock.analyzer.model_analyzer import ModelAna...
30.431472
76
0.639867
import joblib import logging from typing import Tuple from catboost import CatBoostRegressor from environs import Env import numpy as np import pandas as pd from sklearn import metrics from bedrock_client.bedrock.analyzer import ModelTask, ModelTypes from bedrock_client.bedrock.analyzer.model_analyzer import ModelAna...
1,994
0
23
2df7f47663759c2dc57b8f7fa714d0205f4b1432
10,059
py
Python
Scripts/GenCode_CNN_301.py
ShepherdCode/Soars2021
ab4f304eaa09e52d260152397a6c53d7a05457da
[ "MIT" ]
1
2021-08-16T14:49:04.000Z
2021-08-16T14:49:04.000Z
Scripts/GenCode_CNN_301.py
ShepherdCode/Soars2021
ab4f304eaa09e52d260152397a6c53d7a05457da
[ "MIT" ]
null
null
null
Scripts/GenCode_CNN_301.py
ShepherdCode/Soars2021
ab4f304eaa09e52d260152397a6c53d7a05457da
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # # PC/NC classification by CNN # # The convolutional neural network (CNN) was invented for image processing. # We can use Conv1D layers for processing string sequences. # How well does CNN work on human RNA as a binary classifier of protein-coding/non-coding? # # Assume user...
32.344051
146
0.67283
#!/usr/bin/env python # coding: utf-8 # # PC/NC classification by CNN # # The convolutional neural network (CNN) was invented for image processing. # We can use Conv1D layers for processing string sequences. # How well does CNN work on human RNA as a binary classifier of protein-coding/non-coding? # # Assume user...
4,856
0
114
5d00cd12b85bb0a5d6ff531e4050eaf2b25a92f6
137
py
Python
setup.py
perillaseed/PyPunchP2P
a85fb41cc6be96463a8fa3f9ffd7c37f378c5910
[ "MIT" ]
1
2015-04-25T07:49:37.000Z
2015-04-25T07:49:37.000Z
setup.py
perillaseed/PyPunchP2P
a85fb41cc6be96463a8fa3f9ffd7c37f378c5910
[ "MIT" ]
null
null
null
setup.py
perillaseed/PyPunchP2P
a85fb41cc6be96463a8fa3f9ffd7c37f378c5910
[ "MIT" ]
null
null
null
from distutils.core import setup import py2exe setup(console=['client.py']) setup(console=['server.py']) setup(console=['stun.py'])
22.833333
33
0.715328
from distutils.core import setup import py2exe setup(console=['client.py']) setup(console=['server.py']) setup(console=['stun.py'])
0
0
0
ed617c413c97581a929329b03f0040b599be7555
1,088
py
Python
examples/pyramid_backbone_redis_chat/chatter3/scripts/populate.py
benthomasson/gevent-socketio
0f9bd2744af033b7cba57bfd5b82106592e9f667
[ "BSD-3-Clause" ]
625
2015-01-05T04:11:59.000Z
2022-03-14T13:29:59.000Z
examples/pyramid_backbone_redis_chat/chatter3/scripts/populate.py
benthomasson/gevent-socketio
0f9bd2744af033b7cba57bfd5b82106592e9f667
[ "BSD-3-Clause" ]
53
2015-01-30T07:55:45.000Z
2021-02-28T10:50:34.000Z
examples/pyramid_backbone_redis_chat/chatter3/scripts/populate.py
benthomasson/gevent-socketio
0f9bd2744af033b7cba57bfd5b82106592e9f667
[ "BSD-3-Clause" ]
213
2015-01-05T10:18:51.000Z
2022-01-23T08:57:38.000Z
#!/usr/bin/env python import os import sys from pyramid.config import Configurator from sqlalchemy import engine_from_config from sqlalchemy.orm import sessionmaker from sqlalchemy.orm import scoped_session from chatter3.models import Base from pyramid.paster import ( get_appsettings, setup_logging, ) DBSes...
20.923077
57
0.693934
#!/usr/bin/env python import os import sys from pyramid.config import Configurator from sqlalchemy import engine_from_config from sqlalchemy.orm import sessionmaker from sqlalchemy.orm import scoped_session from chatter3.models import Base from pyramid.paster import ( get_appsettings, setup_logging, ) DBSes...
589
0
46
5ab2de7a3b4f2a0c3e272c15eeead137590295a0
1,630
py
Python
toolbox/custom_metrics.py
dear-anastasia/oil-field-modelling
fd5000225de4554564d184c5129322cda27958fa
[ "BSD-3-Clause" ]
6
2020-08-27T14:37:36.000Z
2022-02-28T04:43:37.000Z
toolbox/custom_metrics.py
dear-anastasia/oil-field-modelling
fd5000225de4554564d184c5129322cda27958fa
[ "BSD-3-Clause" ]
null
null
null
toolbox/custom_metrics.py
dear-anastasia/oil-field-modelling
fd5000225de4554564d184c5129322cda27958fa
[ "BSD-3-Clause" ]
3
2020-11-08T15:13:43.000Z
2022-01-05T21:24:37.000Z
import numpy as np import tensorflow as tf
33.265306
78
0.552147
import numpy as np import tensorflow as tf def _mean_iou(y_true, y_pred): prec = [] for t in np.arange(0.5, 1.0, 0.05): tensor = y_pred > t y_pred_ = tf.cast(tensor, tf.int32) score, up_opt = tf.metrics.mean_iou(y_true, y_pred_, 2) K.get_session().run(tf.local_variables_initiali...
1,493
0
92
b5ec4357a8609ecfac4ad2393bae54409aeac7a2
30,691
py
Python
_JNJ/Media_Defaults.py
Tapyr/tapyr
4235fba6dce169fe747cce4d17d88dcf4a3f9f1d
[ "BSD-3-Clause" ]
6
2016-12-10T17:51:10.000Z
2021-10-11T07:51:48.000Z
_JNJ/Media_Defaults.py
Tapyr/tapyr
4235fba6dce169fe747cce4d17d88dcf4a3f9f1d
[ "BSD-3-Clause" ]
null
null
null
_JNJ/Media_Defaults.py
Tapyr/tapyr
4235fba6dce169fe747cce4d17d88dcf4a3f9f1d
[ "BSD-3-Clause" ]
3
2020-03-29T07:37:03.000Z
2021-01-21T16:08:40.000Z
# -*- coding: utf-8 -*- # Copyright (C) 2011-2019 Mag. Christian Tanzer All rights reserved # Glasauergasse 32, A--1130 Wien, Austria. tanzer@swing.co.at # **************************************************************************** # This module is part of the package JNJ. # # This module is licensed under the terms o...
36.107059
91
0.470105
# -*- coding: utf-8 -*- # Copyright (C) 2011-2019 Mag. Christian Tanzer All rights reserved # Glasauergasse 32, A--1130 Wien, Austria. tanzer@swing.co.at # **************************************************************************** # This module is part of the package JNJ. # # This module is licensed under the terms o...
0
18,191
216
7e8520464ef78923e2bcd35f840d3b3c36c23689
76
py
Python
Exercise_4_9.py
kushrami/Python-Crash-Course-book-Excersice
7093181940a90d9f4bab5775ef56f57963450393
[ "Apache-2.0" ]
null
null
null
Exercise_4_9.py
kushrami/Python-Crash-Course-book-Excersice
7093181940a90d9f4bab5775ef56f57963450393
[ "Apache-2.0" ]
null
null
null
Exercise_4_9.py
kushrami/Python-Crash-Course-book-Excersice
7093181940a90d9f4bab5775ef56f57963450393
[ "Apache-2.0" ]
null
null
null
#list comprehension cubes = [cube**3 for cube in range(1,11)] print(cubes)
15.2
41
0.710526
#list comprehension cubes = [cube**3 for cube in range(1,11)] print(cubes)
0
0
0
00380a4e96afe9b21aff8fb8b7107dd165f0876b
38,092
py
Python
src/gui.py
mgely/scriptq
7339abfdefac8a1df6f3c0928e6f22bae9620e05
[ "MIT" ]
null
null
null
src/gui.py
mgely/scriptq
7339abfdefac8a1df6f3c0928e6f22bae9620e05
[ "MIT" ]
1
2020-06-10T08:08:24.000Z
2020-06-10T08:08:24.000Z
src/gui.py
mgely/scriptq
7339abfdefac8a1df6f3c0928e6f22bae9620e05
[ "MIT" ]
null
null
null
import tkinter as tk from tkinter import messagebox, filedialog, simpledialog, scrolledtext from tkinter import PhotoImage from tkinter import ttk import subprocess from threading import Thread import time import tempfile from os import path import sys try: from . import settings except ImportError: # Running f...
33.590829
88
0.55891
import tkinter as tk from tkinter import messagebox, filedialog, simpledialog, scrolledtext from tkinter import PhotoImage from tkinter import ttk import subprocess from threading import Thread import time import tempfile from os import path import sys try: from . import settings except ImportError: # Running f...
8,293
0
351
e083ad3a3c94ca1b1fe9170e1f7a73ca987df66a
250
py
Python
Thesis_WebCrawler/coursera/scrape_coursera.py
cdhekne/My_Thesis
7f60dc48ea7de68c66a702816271ce94832b8fa0
[ "Apache-2.0" ]
null
null
null
Thesis_WebCrawler/coursera/scrape_coursera.py
cdhekne/My_Thesis
7f60dc48ea7de68c66a702816271ce94832b8fa0
[ "Apache-2.0" ]
1
2016-10-25T23:21:17.000Z
2016-10-25T23:21:17.000Z
Thesis_WebCrawler/coursera/scrape_coursera.py
GradThesis/Thesis
7f60dc48ea7de68c66a702816271ce94832b8fa0
[ "Apache-2.0" ]
null
null
null
import coursera_requests as c import sys try: # c.getCourseraCategories() c.getCourseraCourses() # c.getCourseraInstructors() # c.getCourseraSessions() # c.getCourseraUniversities() except: print ("Unexpected error:", sys.exc_info()[0]) raise
20.833333
47
0.756
import coursera_requests as c import sys try: # c.getCourseraCategories() c.getCourseraCourses() # c.getCourseraInstructors() # c.getCourseraSessions() # c.getCourseraUniversities() except: print ("Unexpected error:", sys.exc_info()[0]) raise
0
0
0
97daa73929b125d81963d3faf813e0c563052bb2
599
py
Python
make_log_table.py
kevinko/rabin
ad80bb12a455c25ded958f0ad86564d9465175cf
[ "BSD-3-Clause" ]
17
2015-04-11T16:54:30.000Z
2021-11-12T05:15:04.000Z
make_log_table.py
kevinko/rabin
ad80bb12a455c25ded958f0ad86564d9465175cf
[ "BSD-3-Clause" ]
3
2015-07-24T04:46:42.000Z
2019-11-27T11:40:31.000Z
make_log_table.py
kevinko/rabin
ad80bb12a455c25ded958f0ad86564d9465175cf
[ "BSD-3-Clause" ]
6
2015-06-24T14:50:29.000Z
2019-05-29T07:08:46.000Z
#!/usr/bin/python # Copyright 2012, Kevin Ko <kevin@faveset.com>. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # # Generates an 8-bit log base 2 table. # Print out an inverse 8-bit log table print "-1, 0, 1, 1," # log(i) for i in 0, 1, 2,...
23.038462
69
0.589316
#!/usr/bin/python # Copyright 2012, Kevin Ko <kevin@faveset.com>. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # # Generates an 8-bit log base 2 table. def lt(n): print (",".join([str(n) for i in xrange(16)]) + ",") # Print out an inver...
44
0
23
7ae29eddfd970a4827e122bd3cce94f398f44f32
46
py
Python
LibSerial4/__init__.py
thiagolemedasilva/LibSerial4
29b155ae4096f5e9e4bd18a2dd33018347298e1e
[ "MIT" ]
null
null
null
LibSerial4/__init__.py
thiagolemedasilva/LibSerial4
29b155ae4096f5e9e4bd18a2dd33018347298e1e
[ "MIT" ]
null
null
null
LibSerial4/__init__.py
thiagolemedasilva/LibSerial4
29b155ae4096f5e9e4bd18a2dd33018347298e1e
[ "MIT" ]
null
null
null
from LibSerial4.LibSerial4 import Serial, Uart
46
46
0.869565
from LibSerial4.LibSerial4 import Serial, Uart
0
0
0
3369a1c91cb44fe5318448852ed32ffe37ae2507
3,825
py
Python
authors/apps/articles/migrations/0001_initial.py
andela/ah-backend-stark
c38810e221f95567262034b860ee0512cf15f102
[ "BSD-3-Clause" ]
null
null
null
authors/apps/articles/migrations/0001_initial.py
andela/ah-backend-stark
c38810e221f95567262034b860ee0512cf15f102
[ "BSD-3-Clause" ]
29
2018-09-25T13:53:06.000Z
2021-06-10T20:51:58.000Z
authors/apps/articles/migrations/0001_initial.py
andela/ah-backend-stark
c38810e221f95567262034b860ee0512cf15f102
[ "BSD-3-Clause" ]
2
2019-08-02T12:23:24.000Z
2019-11-05T12:22:23.000Z
# Generated by Django 2.1.2 on 2018-11-22 17:40 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
47.222222
145
0.585359
# Generated by Django 2.1.2 on 2018-11-22 17:40 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('profiles', '0001_initial'), migrations.swappable_dependency(set...
0
3,645
23
84de6959d1cf90895494230c52ee66aae1877921
95
py
Python
Chapter 3/stateless.py
PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices
390ae5868e023f0e417f5dca23eab69e848c5f91
[ "MIT" ]
null
null
null
Chapter 3/stateless.py
PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices
390ae5868e023f0e417f5dca23eab69e848c5f91
[ "MIT" ]
null
null
null
Chapter 3/stateless.py
PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices
390ae5868e023f0e417f5dca23eab69e848c5f91
[ "MIT" ]
null
null
null
if __name__ == "__main__": print(fun(5)) # Always returns 25
15.833333
37
0.6
def fun(x): return x * x if __name__ == "__main__": print(fun(5)) # Always returns 25
7
0
22
5013fdff381c0cc0e6850f21d14cefe9667b2bba
908
py
Python
plot.py
Aravind-Suresh/non-uniform-betweenness-centrality
4473ea157d93322a8680c1cfc18bfa69d00bfc56
[ "MIT" ]
null
null
null
plot.py
Aravind-Suresh/non-uniform-betweenness-centrality
4473ea157d93322a8680c1cfc18bfa69d00bfc56
[ "MIT" ]
null
null
null
plot.py
Aravind-Suresh/non-uniform-betweenness-centrality
4473ea157d93322a8680c1cfc18bfa69d00bfc56
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import sys """ Utility script to plot Execution time Vs Number of vertices based on the log-files obtained by running tests/*.sh """ lines = open(sys.argv[1]).readlines()[1::2] x = map(lambda xx: 5*eval(xx.strip().split('\t')[1].split(' ')[1]), lines[::2]) # x = map(lambda xx: 400*eval(x...
25.942857
113
0.598018
import matplotlib.pyplot as plt import sys """ Utility script to plot Execution time Vs Number of vertices based on the log-files obtained by running tests/*.sh """ lines = open(sys.argv[1]).readlines()[1::2] x = map(lambda xx: 5*eval(xx.strip().split('\t')[1].split(' ')[1]), lines[::2]) # x = map(lambda xx: 400*eval(x...
0
0
0
ec87cbc371454a77008029d3d80e1d5a2d9cde1b
1,236
py
Python
microcosm_metrics/main.py
globality-corp/microcosm-metrics
ca63c7c7ef67c637c6f20cd37eac301f07e32c6d
[ "Apache-2.0" ]
1
2021-05-27T20:17:51.000Z
2021-05-27T20:17:51.000Z
microcosm_metrics/main.py
globality-corp/microcosm-metrics
ca63c7c7ef67c637c6f20cd37eac301f07e32c6d
[ "Apache-2.0" ]
1
2018-10-09T13:16:17.000Z
2018-10-09T13:16:17.000Z
microcosm_metrics/main.py
globality-corp/microcosm-metrics
ca63c7c7ef67c637c6f20cd37eac301f07e32c6d
[ "Apache-2.0" ]
1
2019-03-17T03:46:28.000Z
2019-03-17T03:46:28.000Z
""" Test CLI for metric integration. """ from argparse import ArgumentParser from getpass import getuser from time import sleep from microcosm.api import create_object_graph from microcosm.loaders import load_from_dict from microcosm_metrics.naming import name_for def publish(): """ Publish a metric (for...
23.320755
92
0.674757
""" Test CLI for metric integration. """ from argparse import ArgumentParser from getpass import getuser from time import sleep from microcosm.api import create_object_graph from microcosm.loaders import load_from_dict from microcosm_metrics.naming import name_for def parse_args(): parser = ArgumentParser() ...
443
0
46
e8dab8438c4953bc3ee00db7c8f6087572852097
2,854
py
Python
test_metrics_maes.py
maximdanilchenko/fusionBasedRecSys
42b47a6cb2691967aad8c65932b932f8ee5e231d
[ "MIT" ]
null
null
null
test_metrics_maes.py
maximdanilchenko/fusionBasedRecSys
42b47a6cb2691967aad8c65932b932f8ee5e231d
[ "MIT" ]
null
null
null
test_metrics_maes.py
maximdanilchenko/fusionBasedRecSys
42b47a6cb2691967aad8c65932b932f8ee5e231d
[ "MIT" ]
null
null
null
from metrics import * from itembased_recommender_system import * import shelve import matplotlib.pyplot as plt genData('base','u2.base') genData('test','u2.test') print("data ready") base = transform(shelve.open('base')) test = transform(shelve.open('test')) ##base = {'max':{'odin doma':3,'labirint strah...
38.567568
131
0.546952
from metrics import * from itembased_recommender_system import * import shelve import matplotlib.pyplot as plt genData('base','u2.base') genData('test','u2.test') print("data ready") base = transform(shelve.open('base')) test = transform(shelve.open('test')) ##base = {'max':{'odin doma':3,'labirint strah...
0
0
0
a2bcc15bc5cd3222f1d3285db315bac3a27b1e83
1,289
py
Python
qasm/circuits/combined_constraints_v2.py
JamesGopsill/ICED21-Quantum-Design
bbb3d60639f0dbb81aa18165647eb4a0769d1a26
[ "MIT" ]
null
null
null
qasm/circuits/combined_constraints_v2.py
JamesGopsill/ICED21-Quantum-Design
bbb3d60639f0dbb81aa18165647eb4a0769d1a26
[ "MIT" ]
null
null
null
qasm/circuits/combined_constraints_v2.py
JamesGopsill/ICED21-Quantum-Design
bbb3d60639f0dbb81aa18165647eb4a0769d1a26
[ "MIT" ]
null
null
null
from qiskit.circuit.quantumcircuit import QuantumCircuit, QuantumRegister, ClassicalRegister
18.955882
92
0.6827
from qiskit.circuit.quantumcircuit import QuantumCircuit, QuantumRegister, ClassicalRegister def combined_constraints_v2() -> QuantumCircuit: # Initialise the quantum register qreg = QuantumRegister(10, "q") creg = ClassicalRegister(4, "c") # Initialise the circuit circuit = QuantumCircuit(qreg, creg) circuit...
1,174
0
23
1167c2e8ebd9cd5d4995f31fedeb5bf1dfb82d45
2,492
py
Python
meiduo_mall/meiduo_mall/apps/oauth/utils.py
bapewing/MeiduoMall
2b1634de2b7bc9eec80716770894824d668ec314
[ "MIT" ]
null
null
null
meiduo_mall/meiduo_mall/apps/oauth/utils.py
bapewing/MeiduoMall
2b1634de2b7bc9eec80716770894824d668ec314
[ "MIT" ]
null
null
null
meiduo_mall/meiduo_mall/apps/oauth/utils.py
bapewing/MeiduoMall
2b1634de2b7bc9eec80716770894824d668ec314
[ "MIT" ]
null
null
null
import json import logging from urllib.parse import urlencode, parse_qs from urllib.request import urlopen from django.conf import settings from oauth.exceptions import QQAPIException logger = logging.getLogger('django') class OauthQQ(object): """ QQ认证工具类 """ def get_auth_url(self): """ ...
30.390244
121
0.58748
import json import logging from urllib.parse import urlencode, parse_qs from urllib.request import urlopen from django.conf import settings from oauth.exceptions import QQAPIException logger = logging.getLogger('django') class OauthQQ(object): """ QQ认证工具类 """ def __init__(self, app_id=None, app_ke...
278
0
27
bbc176cb39896e1eb962622b41c7feb57f5208ed
17,306
py
Python
src/state_base.py
akolishchak/doom-net-pytorch
96bad5b15c9c5267d494cd5791481801cd6d2107
[ "MIT" ]
143
2017-01-30T01:43:58.000Z
2021-11-15T07:53:22.000Z
src/state_base.py
akolishchak/doom-net-pytorch
96bad5b15c9c5267d494cd5791481801cd6d2107
[ "MIT" ]
7
2017-12-28T02:42:08.000Z
2020-05-23T23:12:33.000Z
src/state_base.py
akolishchak/doom-net-pytorch
96bad5b15c9c5267d494cd5791481801cd6d2107
[ "MIT" ]
27
2017-02-03T09:20:10.000Z
2020-07-19T21:35:28.000Z
# # aac_state_base.py, doom-net # # Created by Andrey Kolishchak on 01/21/17. # import os import datetime import glob from multiprocessing.pool import ThreadPool from threading import Thread import time import h5py import bisect import torch import torch.nn.functional as F import torch.optim as optim from torch.utils.d...
45.067708
229
0.570322
# # aac_state_base.py, doom-net # # Created by Andrey Kolishchak on 01/21/17. # import os import datetime import glob from multiprocessing.pool import ThreadPool from threading import Thread import time import h5py import bisect import torch import torch.nn.functional as F import torch.optim as optim from torch.utils.d...
16,596
-5
184
d85c96f9a4ab5c97f33e2f69851fd5509bf3d8bc
1,027
py
Python
dataset/TransNAS-Bench-101/models/utils/utils.py
mindspore-ai/contrib
85dccac7a2ba6e962092ecd51aefd962d7f2aeac
[ "Apache-2.0" ]
2
2021-11-10T06:16:55.000Z
2022-02-22T11:30:04.000Z
dataset/TransNAS-Bench-101/models/utils/utils.py
mindspore-ai/contrib
85dccac7a2ba6e962092ecd51aefd962d7f2aeac
[ "Apache-2.0" ]
null
null
null
dataset/TransNAS-Bench-101/models/utils/utils.py
mindspore-ai/contrib
85dccac7a2ba6e962092ecd51aefd962d7f2aeac
[ "Apache-2.0" ]
1
2022-03-22T06:03:15.000Z
2022-03-22T06:03:15.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
30.205882
78
0.627069
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
77
0
23
a155bdc515a1f2882b5a75befd2139acb09c7731
1,410
py
Python
tests/classes/test_channel_group_registry.py
vkottler/vtelem
3908f2445249ddb5f2057fe3a7f46c204b677bbb
[ "MIT" ]
3
2021-02-03T01:14:44.000Z
2022-02-27T00:14:13.000Z
tests/classes/test_channel_group_registry.py
vkottler/vtelem
3908f2445249ddb5f2057fe3a7f46c204b677bbb
[ "MIT" ]
27
2021-05-04T21:19:41.000Z
2022-02-27T00:49:18.000Z
tests/classes/test_channel_group_registry.py
vkottler/vtelem
3908f2445249ddb5f2057fe3a7f46c204b677bbb
[ "MIT" ]
null
null
null
""" vtelem - Test the channel-group registry's correctness. """ # module under test from vtelem.enums.primitive import Primitive from vtelem.channel.group_registry import ChannelGroupRegistry from vtelem.telemetry.environment import TelemetryEnvironment # internal from . import EnumA def test_group_registry_basic()...
29.375
74
0.61844
""" vtelem - Test the channel-group registry's correctness. """ # module under test from vtelem.enums.primitive import Primitive from vtelem.channel.group_registry import ChannelGroupRegistry from vtelem.telemetry.environment import TelemetryEnvironment # internal from . import EnumA def test_group_registry_basic()...
0
0
0
6eaccc68cf3c4a05bd6471980fcbe35ac2f815a9
775
py
Python
extra_scripts/plot_naive_expansion_length.py
wdecoster/exrede
3e1f81d55365c360ee0d2d620c5239b5f3488825
[ "MIT" ]
null
null
null
extra_scripts/plot_naive_expansion_length.py
wdecoster/exrede
3e1f81d55365c360ee0d2d620c5239b5f3488825
[ "MIT" ]
null
null
null
extra_scripts/plot_naive_expansion_length.py
wdecoster/exrede
3e1f81d55365c360ee0d2d620c5239b5f3488825
[ "MIT" ]
null
null
null
import pandas as pd import seaborn as sns import matplotlib.pyplot as plt res = [line.strip().split('\t') for line in open("sizes.txt").readlines()] a = [] for line in res: sizes = [int(i) for i in line[1].split(',')] strands = [j for j in line[2].split(',')] for si, st in zip(sizes, strands): a....
27.678571
74
0.590968
import pandas as pd import seaborn as sns import matplotlib.pyplot as plt res = [line.strip().split('\t') for line in open("sizes.txt").readlines()] a = [] for line in res: sizes = [int(i) for i in line[1].split(',')] strands = [j for j in line[2].split(',')] for si, st in zip(sizes, strands): a....
0
0
0
582bb6d45d5243b53f6b225ab85affb63b8d114d
11,102
py
Python
src/pyetllib/etllib/tools/streamtools.py
slouchart/pyetllib
133df36a1628f413cd60a86e4c7eac2738844d17
[ "MIT" ]
2
2020-04-01T10:08:02.000Z
2021-03-07T15:18:14.000Z
src/pyetllib/etllib/tools/streamtools.py
slouchart/pyetllib
133df36a1628f413cd60a86e4c7eac2738844d17
[ "MIT" ]
null
null
null
src/pyetllib/etllib/tools/streamtools.py
slouchart/pyetllib
133df36a1628f413cd60a86e4c7eac2738844d17
[ "MIT" ]
1
2020-10-13T13:23:02.000Z
2020-10-13T13:23:02.000Z
from itertools import starmap, filterfalse, zip_longest from itertools import chain import functools from functools import reduce as reduce_ import operator from collections import namedtuple import toolz from toolz import pipe as pipe_, compose as compose_ from ._iterators import _iterators_controller, _controlle...
26.245863
96
0.580796
from itertools import starmap, filterfalse, zip_longest from itertools import chain import functools from functools import reduce as reduce_ import operator from collections import namedtuple import toolz from toolz import pipe as pipe_, compose as compose_ from ._iterators import _iterators_controller, _controlle...
8,379
186
831
5d4a5045147d1f57d04c1ce247f1b2f1b13ede17
2,309
py
Python
tests/mocks.py
DJRavinszkha/pykeen
d79fe39f83bc2831137f22be6421b37568694cf4
[ "MIT" ]
null
null
null
tests/mocks.py
DJRavinszkha/pykeen
d79fe39f83bc2831137f22be6421b37568694cf4
[ "MIT" ]
null
null
null
tests/mocks.py
DJRavinszkha/pykeen
d79fe39f83bc2831137f22be6421b37568694cf4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Mocks for tests.""" from typing import Optional, Tuple import torch from torch import nn from pykeen.models import EntityRelationEmbeddingModel, Model from pykeen.nn.emb import EmbeddingSpecification, RepresentationModule from pykeen.triples import TriplesFactory __all__ = [ 'CustomR...
37.241935
100
0.705067
# -*- coding: utf-8 -*- """Mocks for tests.""" from typing import Optional, Tuple import torch from torch import nn from pykeen.models import EntityRelationEmbeddingModel, Model from pykeen.nn.emb import EmbeddingSpecification, RepresentationModule from pykeen.triples import TriplesFactory __all__ = [ 'CustomR...
1,177
0
189
82a0f8ff772d456c1a957e6548993cb6ed8fd932
3,968
py
Python
colander_validators/__init__.py
ixmatus/colander-validators
68b43e5d6596383ff604da5f2237d185bd5780c2
[ "BSD-3-Clause" ]
2
2015-06-01T15:17:23.000Z
2015-06-01T18:40:31.000Z
colander_validators/__init__.py
ixmatus/colander-validators
68b43e5d6596383ff604da5f2237d185bd5780c2
[ "BSD-3-Clause" ]
null
null
null
colander_validators/__init__.py
ixmatus/colander-validators
68b43e5d6596383ff604da5f2237d185bd5780c2
[ "BSD-3-Clause" ]
null
null
null
import re def email(value): """Validate an email address >>> email("barney@purpledino.com") True >>> email("barneydino.com") 'An email address must contain a single @' """ usernameRE = re.compile(r"^[^ \t\n\r@<>()]+$", re.I) domainRE = re.compile(r''' ^(?:[a-z0-9][a-z0-9\...
32.260163
106
0.521925
import re def email(value): """Validate an email address >>> email("barney@purpledino.com") True >>> email("barneydino.com") 'An email address must contain a single @' """ usernameRE = re.compile(r"^[^ \t\n\r@<>()]+$", re.I) domainRE = re.compile(r''' ^(?:[a-z0-9][a-z0-9\...
534
0
23
4db4f3928bb1714fb5828395c74a12d60da6ce54
7,963
py
Python
TwitchApi.py
borgej/BrexBot
2413bd4ec978ed40b8e02b1452dcfac9451ee2c5
[ "Apache-2.0" ]
null
null
null
TwitchApi.py
borgej/BrexBot
2413bd4ec978ed40b8e02b1452dcfac9451ee2c5
[ "Apache-2.0" ]
null
null
null
TwitchApi.py
borgej/BrexBot
2413bd4ec978ed40b8e02b1452dcfac9451ee2c5
[ "Apache-2.0" ]
null
null
null
import json import urllib import requests import Config import logging logging.basicConfig(level=logging.DEBUG) # Class to access the new Twitch 'HELIX' API # The class receives it's authentication from a dictionary (HEADERS) in the Config.py file. # The "Bearer" token must have the required scopes to perform succes...
42.811828
131
0.613337
import json import urllib import requests import Config import logging logging.basicConfig(level=logging.DEBUG) # Class to access the new Twitch 'HELIX' API # The class receives it's authentication from a dictionary (HEADERS) in the Config.py file. # The "Bearer" token must have the required scopes to perform succes...
6,102
-5
441
c41ff4afe695367041a744827d6210a2ecd34a31
829
py
Python
src/var.py
JayHeng/pzh-knockout-round
c34111da8d69f748e1bc3f7a658426ad59f79af7
[ "BSD-3-Clause" ]
null
null
null
src/var.py
JayHeng/pzh-knockout-round
c34111da8d69f748e1bc3f7a658426ad59f79af7
[ "BSD-3-Clause" ]
null
null
null
src/var.py
JayHeng/pzh-knockout-round
c34111da8d69f748e1bc3f7a658426ad59f79af7
[ "BSD-3-Clause" ]
null
null
null
#! /usr/bin/env python # -*- coding: utf-8 -*- import sys import os g_playerDict = {'player1':u"nobody", 'player2':u"nobody", 'player3':u"nobody", 'player4':u"nobody", 'player5':u"nobody", 'player6':u"nobody", 'player7':u"n...
26.741935
37
0.463209
#! /usr/bin/env python # -*- coding: utf-8 -*- import sys import os g_playerDict = {'player1':u"nobody", 'player2':u"nobody", 'player3':u"nobody", 'player4':u"nobody", 'player5':u"nobody", 'player6':u"nobody", 'player7':u"n...
96
0
46
5c5ab3597807a949bef2e7b63629871211bc1d50
7,620
py
Python
web/forms/account.py
HongDaMa/sass_project
d971a4307a4057ecb0bea72c34e6c2112cfc2497
[ "Apache-2.0" ]
1
2021-03-01T10:50:05.000Z
2021-03-01T10:50:05.000Z
web/forms/account.py
HongDaMa/sass_project
d971a4307a4057ecb0bea72c34e6c2112cfc2497
[ "Apache-2.0" ]
5
2021-06-08T21:20:53.000Z
2022-03-12T00:24:58.000Z
web/forms/account.py
HongDaMa/sass_project
d971a4307a4057ecb0bea72c34e6c2112cfc2497
[ "Apache-2.0" ]
null
null
null
#!E:\py_virtual_env\saas_project\Scripts\python.exe # -*- coding: utf-8 -*- from django import forms from web import models from django.core.validators import RegexValidator,ValidationError from django.core.exceptions import ValidationError from django.conf import settings from django_redis import get_redis_connection ...
31.229508
89
0.599213
#!E:\py_virtual_env\saas_project\Scripts\python.exe # -*- coding: utf-8 -*- from django import forms from web import models from django.core.validators import RegexValidator,ValidationError from django.core.exceptions import ValidationError from django.conf import settings from django_redis import get_redis_connection ...
1,797
6,108
115
52a139c5e62ffa00b24af6c10f5d0ac8fb2a1335
431
py
Python
CodingBat/Python/Logic-1/cigar_party.py
Togohogo1/pg
ee3c36acde47769c66ee13a227762ee677591375
[ "MIT" ]
null
null
null
CodingBat/Python/Logic-1/cigar_party.py
Togohogo1/pg
ee3c36acde47769c66ee13a227762ee677591375
[ "MIT" ]
1
2021-10-14T18:26:56.000Z
2021-10-14T18:26:56.000Z
CodingBat/Python/Logic-1/cigar_party.py
Togohogo1/pg
ee3c36acde47769c66ee13a227762ee677591375
[ "MIT" ]
1
2021-08-06T03:39:55.000Z
2021-08-06T03:39:55.000Z
''' When squirrels get together for a party, they like to have cigars. A squirrel party is successful when the number of cigars is between 40 and 60, inclusive. Unless it is the weekend, in which case there is no upper bound on the number of cigars. Return True if the party with the given values is successful, or False...
39.181818
77
0.758701
''' When squirrels get together for a party, they like to have cigars. A squirrel party is successful when the number of cigars is between 40 and 60, inclusive. Unless it is the weekend, in which case there is no upper bound on the number of cigars. Return True if the party with the given values is successful, or False...
72
0
23
537517161f8f98490b06de9ff4e5fad7cffa2079
7,138
py
Python
release/stubs.min/System/Windows/Forms/__init___parts/NotifyIcon.py
YKato521/ironpython-stubs
b1f7c580de48528490b3ee5791b04898be95a9ae
[ "MIT" ]
null
null
null
release/stubs.min/System/Windows/Forms/__init___parts/NotifyIcon.py
YKato521/ironpython-stubs
b1f7c580de48528490b3ee5791b04898be95a9ae
[ "MIT" ]
null
null
null
release/stubs.min/System/Windows/Forms/__init___parts/NotifyIcon.py
YKato521/ironpython-stubs
b1f7c580de48528490b3ee5791b04898be95a9ae
[ "MIT" ]
null
null
null
class NotifyIcon(Component, IComponent, IDisposable): """ Specifies a component that creates an icon in the notification area. This class cannot be inherited. NotifyIcon() NotifyIcon(container: IContainer) """ def Dispose(self): """ Dispose(self: NotifyIcon,disposing: bool) """ ...
23.95302
221
0.666293
class NotifyIcon(Component, IComponent, IDisposable): """ Specifies a component that creates an icon in the notification area. This class cannot be inherited. NotifyIcon() NotifyIcon(container: IContainer) """ def Dispose(self): """ Dispose(self: NotifyIcon,disposing: bool) """ ...
18
0
29
6219e63f4cbb5f076b00f07b3a8aca7479ab646f
1,052
py
Python
Python/DataCampChallenge-main/problem.py
BechirTr/Some_Projects
ac0d3975f5969903a0fcf67cf72f7d9cae42d272
[ "Apache-2.0" ]
null
null
null
Python/DataCampChallenge-main/problem.py
BechirTr/Some_Projects
ac0d3975f5969903a0fcf67cf72f7d9cae42d272
[ "Apache-2.0" ]
null
null
null
Python/DataCampChallenge-main/problem.py
BechirTr/Some_Projects
ac0d3975f5969903a0fcf67cf72f7d9cae42d272
[ "Apache-2.0" ]
1
2021-02-02T17:09:04.000Z
2021-02-02T17:09:04.000Z
import os import pandas as pd import rampwf as rw from sklearn.model_selection import ShuffleSplit import numpy as np problem_title = 'Salary prediction' _target_column_name = 'SalaryUSD' # A value which will be used to create wrapper objects for y_pred Predictions = rw.prediction_types.make_regression() ...
23.909091
75
0.694867
import os import pandas as pd import rampwf as rw from sklearn.model_selection import ShuffleSplit import numpy as np problem_title = 'Salary prediction' _target_column_name = 'SalaryUSD' # A value which will be used to create wrapper objects for y_pred Predictions = rw.prediction_types.make_regression() ...
458
0
100
f9f1f120411b015f12b61e2e79f925200ac0f016
6,008
py
Python
kochira/services/core/logger.py
nattofriends/kochira
8c41f9936ed588a8acc365a2829f06521388e55b
[ "MS-PL" ]
null
null
null
kochira/services/core/logger.py
nattofriends/kochira
8c41f9936ed588a8acc365a2829f06521388e55b
[ "MS-PL" ]
1
2019-05-13T22:02:18.000Z
2019-05-13T22:02:18.000Z
kochira/services/core/logger.py
nattofriends/kochira
8c41f9936ed588a8acc365a2829f06521388e55b
[ "MS-PL" ]
1
2019-05-13T21:22:02.000Z
2019-05-13T21:22:02.000Z
""" IRC message logger. Enables logging of messages to flat files. """ import threading from datetime import datetime from kochira import config from kochira.service import Service, Config from pathlib import Path service = Service(__name__, __doc__) @service.config @service.setup @service.shutdown @...
27.18552
85
0.651298
""" IRC message logger. Enables logging of messages to flat files. """ import threading from datetime import datetime from kochira import config from kochira.service import Service, Config from pathlib import Path service = Service(__name__, __doc__) @service.config class Config(Config): log_dir = config.Fiel...
4,261
77
601
c1339e18a7f733a5c9225797b9a9145e7b651fbb
4,560
py
Python
tests/test_classifier_api.py
pmatigakis/classifier
b37c89df947f26a8001aa7a51dad86af1921ed19
[ "MIT" ]
1
2020-01-07T00:05:09.000Z
2020-01-07T00:05:09.000Z
tests/test_classifier_api.py
pmatigakis/classifier
b37c89df947f26a8001aa7a51dad86af1921ed19
[ "MIT" ]
2
2019-12-20T19:02:37.000Z
2019-12-20T19:02:38.000Z
tests/test_classifier_api.py
pmatigakis/classifier
b37c89df947f26a8001aa7a51dad86af1921ed19
[ "MIT" ]
1
2017-05-24T19:56:08.000Z
2017-05-24T19:56:08.000Z
import json from unittest import main from unittest.mock import patch from common import ClassifierTestCaseWithMockClassifiers from classifier import __VERSION__ from classifier.ml import Classifier if __name__ == "__main__": main()
25.333333
75
0.557237
import json from unittest import main from unittest.mock import patch from common import ClassifierTestCaseWithMockClassifiers from classifier import __VERSION__ from classifier.ml import Classifier class ClassificationEndpointTests(ClassifierTestCaseWithMockClassifiers): def test_probability_classifier(self): ...
3,803
343
170
537e3e050876d7c9d2b8f2ecca7ee3f33f63f223
7,246
py
Python
utils.py
lobachevzky/on-policy-curiosity
1d1e9c05b04d313d15e698fb8a05c3116085381f
[ "MIT" ]
1
2021-11-22T09:43:13.000Z
2021-11-22T09:43:13.000Z
utils.py
lobachevzky/on-policy-curiosity
1d1e9c05b04d313d15e698fb8a05c3116085381f
[ "MIT" ]
2
2019-12-17T04:05:25.000Z
2020-03-18T18:38:31.000Z
utils.py
lobachevzky/on-policy-curiosity
1d1e9c05b04d313d15e698fb8a05c3116085381f
[ "MIT" ]
1
2020-05-29T15:14:36.000Z
2020-05-29T15:14:36.000Z
# third party import argparse import csv import random import re import subprocess from dataclasses import fields, is_dataclass from functools import reduce from io import StringIO from typing import List, Optional import numpy as np import torch import torch.jit import torch.nn as nn from gym import spaces import gym...
26.542125
87
0.635109
# third party import argparse import csv import random import re import subprocess from dataclasses import fields, is_dataclass from functools import reduce from io import StringIO from typing import List, Optional import numpy as np import torch import torch.jit import torch.nn as nn from gym import spaces import gym...
5,332
15
817
3e3b84b9bfcb2d82c9de1b00bbb595e034cc5661
28,845
py
Python
flatsat/comms/user_segment/radio/flowgraphs/unit_test/test_flatsat_rx.py
cromulencellc/hackasat-final-2021
d01a1b5d7947b3e41ae2da3ec63d5f43278a5eac
[ "MIT" ]
4
2022-02-25T05:45:27.000Z
2022-03-10T01:05:27.000Z
flatsat/comms/user_segment/radio/flowgraphs/unit_test/test_flatsat_rx.py
cromulencellc/hackasat-final-2021
d01a1b5d7947b3e41ae2da3ec63d5f43278a5eac
[ "MIT" ]
null
null
null
flatsat/comms/user_segment/radio/flowgraphs/unit_test/test_flatsat_rx.py
cromulencellc/hackasat-final-2021
d01a1b5d7947b3e41ae2da3ec63d5f43278a5eac
[ "MIT" ]
2
2022-03-02T02:14:16.000Z
2022-03-05T07:36:18.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # SPDX-License-Identifier: GPL-3.0 # # GNU Radio Python Flow Graph # Title: Flatsat RX Test # Author: dev # GNU Radio version: 3.9.3.0 from distutils.version import StrictVersion if __name__ == '__main__': import ctypes import sys if sys.platform.startswit...
42.988077
154
0.668123
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # SPDX-License-Identifier: GPL-3.0 # # GNU Radio Python Flow Graph # Title: Flatsat RX Test # Author: dev # GNU Radio version: 3.9.3.0 from distutils.version import StrictVersion if __name__ == '__main__': import ctypes import sys if sys.platform.startswit...
25,997
27
1,342
650df8b817d43a116b8c59edc813e4e70e09997b
715
py
Python
py/sc.py
Utsho/Car-Number-Plate-Reading
5c8c92bb320d9b19a0d54015d80a75dfc4cbf60a
[ "CNRI-Python" ]
1
2019-08-24T04:06:35.000Z
2019-08-24T04:06:35.000Z
py/sc.py
Utsho/Car-Number-Plate-Reading
5c8c92bb320d9b19a0d54015d80a75dfc4cbf60a
[ "CNRI-Python" ]
null
null
null
py/sc.py
Utsho/Car-Number-Plate-Reading
5c8c92bb320d9b19a0d54015d80a75dfc4cbf60a
[ "CNRI-Python" ]
null
null
null
from random import randint import os from PIL import Image path='final' classnames=os.listdir(path) images=[] f1=open('input_index.txt','w') for temp in classnames: images.append(Image.open('final/'+temp)) f1.write(temp+"\n") f1.close() k=len(images) im2=[] for i in range(k): img=images[i] im2.append(img) h=...
16.627907
41
0.653147
from random import randint import os from PIL import Image path='final' classnames=os.listdir(path) images=[] f1=open('input_index.txt','w') for temp in classnames: images.append(Image.open('final/'+temp)) f1.write(temp+"\n") f1.close() k=len(images) im2=[] for i in range(k): img=images[i] im2.append(img) h=...
0
0
0
e855e1e160879d94bc5165d60b4668e5bdedecc3
10,836
py
Python
ansible/venv/lib/python2.7/site-packages/ansible/modules/storage/netapp/na_elementsw_network_interfaces.py
gvashchenkolineate/gvashchenkolineate_infra_trytravis
0fb18850afe0d8609693ba4b23f29c7cda17d97f
[ "MIT" ]
17
2017-06-07T23:15:01.000Z
2021-08-30T14:32:36.000Z
ansible/ansible/modules/storage/netapp/na_elementsw_network_interfaces.py
SergeyCherepanov/ansible
875711cd2fd6b783c812241c2ed7a954bf6f670f
[ "MIT" ]
9
2017-06-25T03:31:52.000Z
2021-05-17T23:43:12.000Z
ansible/ansible/modules/storage/netapp/na_elementsw_network_interfaces.py
SergeyCherepanov/ansible
875711cd2fd6b783c812241c2ed7a954bf6f670f
[ "MIT" ]
3
2018-05-26T21:31:22.000Z
2019-09-28T17:00:45.000Z
#!/usr/bin/python # (c) 2018, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or # https://www.gnu.org/licenses/gpl-3.0.txt) ''' Element Software Node Network Interfaces - Bond 1G and 10G configuration ''' from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METAD...
36.362416
131
0.612126
#!/usr/bin/python # (c) 2018, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or # https://www.gnu.org/licenses/gpl-3.0.txt) ''' Element Software Node Network Interfaces - Bond 1G and 10G configuration ''' from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METAD...
2,521
0
27
327abded97602fd35ed2f1723e9822ff6005624c
6,589
py
Python
LoRaSensorMonitoringServer.py
TomNaiser/LoRa-Sensor-Monitoring
090edce9a14147b9eb62a2e065e02e248c41be84
[ "MIT" ]
null
null
null
LoRaSensorMonitoringServer.py
TomNaiser/LoRa-Sensor-Monitoring
090edce9a14147b9eb62a2e065e02e248c41be84
[ "MIT" ]
null
null
null
LoRaSensorMonitoringServer.py
TomNaiser/LoRa-Sensor-Monitoring
090edce9a14147b9eb62a2e065e02e248c41be84
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue Jan 28 10:14:42 2020 @author: Thomas """ #!/usr/bin/env python #Lora Base Server #Reads Data from the ESP32 Lora Receiver via serial Port and generates a CSV file for each LoRa sensor client import time import serial import re import datetime import os.path ...
36.403315
141
0.595386
# -*- coding: utf-8 -*- """ Created on Tue Jan 28 10:14:42 2020 @author: Thomas """ #!/usr/bin/env python #Lora Base Server #Reads Data from the ESP32 Lora Receiver via serial Port and generates a CSV file for each LoRa sensor client import time import serial import re import datetime import os.path class sens...
1,653
4
163
225465fb383bfcf90d72035fd4286c3072f0a432
750
py
Python
sapextractor/utils/tstct/extract_tstct.py
aarkue/sap-meta-explorer
613bf657bbaa72a3781a84664e5de7626516532f
[ "Apache-2.0" ]
2
2021-02-10T08:09:35.000Z
2021-05-21T06:25:34.000Z
sapextractor/utils/tstct/extract_tstct.py
aarkue/sap-meta-explorer
613bf657bbaa72a3781a84664e5de7626516532f
[ "Apache-2.0" ]
null
null
null
sapextractor/utils/tstct/extract_tstct.py
aarkue/sap-meta-explorer
613bf657bbaa72a3781a84664e5de7626516532f
[ "Apache-2.0" ]
3
2021-11-22T13:27:00.000Z
2022-03-16T22:08:51.000Z
from copy import copy
27.777778
116
0.644
from copy import copy class Shared: transactions_dictio = {} def apply(con, target_language="E"): df = con.prepare_and_execute_query("TSTCT", ["SPRSL", "TCODE", "TTEXT"], " WHERE SPRSL = '"+target_language+"'") df = df[df["SPRSL"] == target_language] stream = df.to_dict('records') dictio = {} ...
635
21
69
a606e61515f9330200bf5c9be613695f8e5414ce
7,873
py
Python
ogs5py/tools/download.py
GeoStat-Framework/ogs5py
2bc4428c4c485d094e02c129ba5051745df58391
[ "MIT" ]
12
2018-12-11T15:44:58.000Z
2022-03-30T19:04:42.000Z
ogs5py/tools/download.py
GeoStat-Framework/ogs5py
2bc4428c4c485d094e02c129ba5051745df58391
[ "MIT" ]
4
2019-07-09T17:47:05.000Z
2021-12-27T07:34:07.000Z
ogs5py/tools/download.py
GeoStat-Framework/ogs5py
2bc4428c4c485d094e02c129ba5051745df58391
[ "MIT" ]
5
2019-04-04T19:47:56.000Z
2021-04-28T21:56:39.000Z
# -*- coding: utf-8 -*- """ Downloader for ogs5. .. currentmodule:: ogs5py.tools.download Downloader ^^^^^^^^^^ A downloading routine to get the OSG5 executable. .. autosummary:: download_ogs add_exe reset_download OGS5PY_CONFIG ---- """ import os import shutil import tarfile import zipfile from urllib...
30.87451
78
0.587578
# -*- coding: utf-8 -*- """ Downloader for ogs5. .. currentmodule:: ogs5py.tools.download Downloader ^^^^^^^^^^ A downloading routine to get the OSG5 executable. .. autosummary:: download_ogs add_exe reset_download OGS5PY_CONFIG ---- """ import os import shutil import tarfile import zipfile from urllib...
138
13
75
2fc9e9e0b73e020f3c72b32bf69a10544d35b251
9,397
py
Python
release/stubs.min/Autodesk/Revit/DB/__init___parts/ViewCropRegionShapeManager.py
YKato521/ironpython-stubs
b1f7c580de48528490b3ee5791b04898be95a9ae
[ "MIT" ]
null
null
null
release/stubs.min/Autodesk/Revit/DB/__init___parts/ViewCropRegionShapeManager.py
YKato521/ironpython-stubs
b1f7c580de48528490b3ee5791b04898be95a9ae
[ "MIT" ]
null
null
null
release/stubs.min/Autodesk/Revit/DB/__init___parts/ViewCropRegionShapeManager.py
YKato521/ironpython-stubs
b1f7c580de48528490b3ee5791b04898be95a9ae
[ "MIT" ]
null
null
null
class ViewCropRegionShapeManager(object, IDisposable): """ A class that provides access to settings related to the crop assigned to a view or a reference callout. """ def Dispose(self): """ Dispose(self: ViewCropRegionShapeManager) """ pass def GetAnnotationCropShape(self): ...
24.728947
221
0.670427
class ViewCropRegionShapeManager(object, IDisposable): """ A class that provides access to settings related to the crop assigned to a view or a reference callout. """ def Dispose(self): """ Dispose(self: ViewCropRegionShapeManager) """ pass def GetAnnotationCropShape(self): ...
0
0
0
181263c57ee32e69218aebc26fb0790bf52e4b8e
1,788
py
Python
large-repo-master/test-3/nb14.py
victorsun123/numpy
1fb036758b4035ab2c132d26f420e5bc3ffc917e
[ "BSD-3-Clause" ]
null
null
null
large-repo-master/test-3/nb14.py
victorsun123/numpy
1fb036758b4035ab2c132d26f420e5bc3ffc917e
[ "BSD-3-Clause" ]
null
null
null
large-repo-master/test-3/nb14.py
victorsun123/numpy
1fb036758b4035ab2c132d26f420e5bc3ffc917e
[ "BSD-3-Clause" ]
null
null
null
# Databricks notebook source INSTGUYIKQEFVDAVPNQI DFXKJDJFAIGTQDFPNZXIHFBFJBXNSCAQMMDSAPVIFVULKEPYGJRUNILQPXYXVGWBNVBHBWSUEGQTKHMFFROKHGJKPJ OCRRFSYKRPOYFVBAHSCCPHGHUA ORMCLMKXZAKDXRSGAXPHGQDBBOGQKFQYRLQQ AKVWPNWJGXQTKSYPSLNOUXSWVYRQ YVOFGDXZWZHFASZQCMZFKHUUBCFUILVBZPHAAMMPWQPOCWRGVAHLTM NCUOQLVTIVWIMABZGYRFYFLMOIUDXEP...
45.846154
91
0.97651
# Databricks notebook source INSTGUYIKQEFVDAVPNQI DFXKJDJFAIGTQDFPNZXIHFBFJBXNSCAQMMDSAPVIFVULKEPYGJRUNILQPXYXVGWBNVBHBWSUEGQTKHMFFROKHGJKPJ OCRRFSYKRPOYFVBAHSCCPHGHUA ORMCLMKXZAKDXRSGAXPHGQDBBOGQKFQYRLQQ AKVWPNWJGXQTKSYPSLNOUXSWVYRQ YVOFGDXZWZHFASZQCMZFKHUUBCFUILVBZPHAAMMPWQPOCWRGVAHLTM NCUOQLVTIVWIMABZGYRFYFLMOIUDXEP...
0
0
0
87008688f730d39f20393ab216ba561f7bc783bc
2,446
py
Python
hyperbox/networks/bnnas/bn_blocks.py
marsggbo/hyperbox
91dcd04ad30164bcb12209d818df18961fa3f347
[ "MIT" ]
1
2022-01-17T00:34:14.000Z
2022-01-17T00:34:14.000Z
hyperbox/networks/bnnas/bn_blocks.py
marsggbo/hyperbox
91dcd04ad30164bcb12209d818df18961fa3f347
[ "MIT" ]
null
null
null
hyperbox/networks/bnnas/bn_blocks.py
marsggbo/hyperbox
91dcd04ad30164bcb12209d818df18961fa3f347
[ "MIT" ]
null
null
null
import torch import torch.nn as nn __all__ = [ 'blocks_dict', 'InvertedResidual', 'conv_1x1_bn', 'conv_bn' ] blocks_dict = { 'k3r3':lambda inp, oup, stride : InvertedResidual(inp, oup, 3, 1, stride, 3), 'k3r6':lambda inp, oup, stride : InvertedResidual(inp, oup, 3, 1, stride, 6), 'k5r3':l...
32.613333
129
0.554374
import torch import torch.nn as nn __all__ = [ 'blocks_dict', 'InvertedResidual', 'conv_1x1_bn', 'conv_bn' ] blocks_dict = { 'k3r3':lambda inp, oup, stride : InvertedResidual(inp, oup, 3, 1, stride, 3), 'k3r6':lambda inp, oup, stride : InvertedResidual(inp, oup, 3, 1, stride, 6), 'k5r3':l...
1,670
13
122
3c3d8da7b19f669775422aaf440d8177d4613006
5,682
py
Python
experiments/scripts/csv2hdf5_allinone.py
cvelten/DeepSurv
de9b365be6f994cb30eb0a50197930d24e48dee4
[ "MIT" ]
null
null
null
experiments/scripts/csv2hdf5_allinone.py
cvelten/DeepSurv
de9b365be6f994cb30eb0a50197930d24e48dee4
[ "MIT" ]
null
null
null
experiments/scripts/csv2hdf5_allinone.py
cvelten/DeepSurv
de9b365be6f994cb30eb0a50197930d24e48dee4
[ "MIT" ]
null
null
null
import h5py import numpy as np import pandas as pd import os from argparse import ArgumentParser if __name__ == '__main__': parser = ArgumentParser() parser.add_argument('ifile_os') parser.add_argument('ifile_pfs') # parser.add_argument('-e', '--event_col', default='OSEvent') # parser.add_argume...
41.474453
118
0.656987
import h5py import numpy as np import pandas as pd import os from argparse import ArgumentParser def dataframe_to_deepsurv_ds(df, event_col='Event', time_col='Time'): # Extract the event and time columns as numpy arrays e = df[event_col].values.astype(np.int32) t = df[time_col].values.astype(np.float32) ...
803
0
46
5802aafb5a9a958a3bfd48a3c740eee759d724b5
1,517
py
Python
francisco-topo/lit101.py
Cyphysecurity/ICS-SDN-1
c04d9e7bb7ad945166e969e071a2f82fb5bd18bf
[ "MIT" ]
4
2019-12-17T08:59:57.000Z
2022-01-09T19:52:27.000Z
francisco-topo/lit101.py
Cyphysecurity/ICS-SDN-1
c04d9e7bb7ad945166e969e071a2f82fb5bd18bf
[ "MIT" ]
3
2020-08-13T16:05:46.000Z
2021-10-17T07:49:33.000Z
francisco-topo/lit101.py
Cyphysecurity/ICS-SDN-1
c04d9e7bb7ad945166e969e071a2f82fb5bd18bf
[ "MIT" ]
4
2017-06-14T23:41:50.000Z
2021-03-01T18:54:03.000Z
from minicps.devices import PLC from utils import * import random import logging import time import socket import json import select import signal import sys SENSOR_ADDR = IP['lit101'] LIT101 = ('LIT101', 1) LIT102 = ('LIT102', 1) if __name__ == '__main__': lit101 = Lit101(name='lit101',state=STATE,protocol=L...
27.089286
109
0.633487
from minicps.devices import PLC from utils import * import random import logging import time import socket import json import select import signal import sys SENSOR_ADDR = IP['lit101'] LIT101 = ('LIT101', 1) LIT102 = ('LIT102', 1) class Lit101(PLC): def sigint_handler(self, sig, frame): print "I recei...
1,015
-3
130
25d702540d9307d9ec2607e46d357ccf5efcd861
268
py
Python
workbench/logbook/migrations/0015_remove_loggedcost_project.py
yoshson/workbench
701558cac3357cd82e4dc99f0fefed12ee81ddc5
[ "MIT" ]
15
2020-09-02T22:17:34.000Z
2022-02-01T20:09:10.000Z
workbench/logbook/migrations/0015_remove_loggedcost_project.py
yoshson/workbench
701558cac3357cd82e4dc99f0fefed12ee81ddc5
[ "MIT" ]
18
2020-01-08T15:28:26.000Z
2022-02-28T02:46:41.000Z
workbench/logbook/migrations/0015_remove_loggedcost_project.py
yoshson/workbench
701558cac3357cd82e4dc99f0fefed12ee81ddc5
[ "MIT" ]
8
2020-09-29T08:00:24.000Z
2022-01-16T11:58:19.000Z
# Generated by Django 2.2.5 on 2019-09-15 10:58 from django.db import migrations
24.363636
82
0.742537
# Generated by Django 2.2.5 on 2019-09-15 10:58 from django.db import migrations class Migration(migrations.Migration): dependencies = [("logbook", "0014_auto_20190915_1250")] operations = [migrations.RemoveField(model_name="loggedcost", name="project")]
0
162
23
e2a9aa8f84f161a41350b5252f7f5caf4c6451b5
10,445
py
Python
test.py
Michal-Hubert/backup_dropbox
6c9c622ce389e789f0eb7aaad16d1ac0b2f688c5
[ "Apache-2.0" ]
null
null
null
test.py
Michal-Hubert/backup_dropbox
6c9c622ce389e789f0eb7aaad16d1ac0b2f688c5
[ "Apache-2.0" ]
null
null
null
test.py
Michal-Hubert/backup_dropbox
6c9c622ce389e789f0eb7aaad16d1ac0b2f688c5
[ "Apache-2.0" ]
null
null
null
''' End to end testing ''' import shutil import os from ConfigParser import SafeConfigParser import textwrap import hashlib import pexpect import sys import leveldb import backup import tempfile from backup import dump_database from myutils import path_leaf TEST_CONFIG_NAME = "config" TEST_DROPBOX_NAME = "dropbox" TES...
29.094708
80
0.650742
''' End to end testing ''' import shutil import os from ConfigParser import SafeConfigParser import textwrap import hashlib import pexpect import sys import leveldb import backup import tempfile from backup import dump_database from myutils import path_leaf TEST_CONFIG_NAME = "config" TEST_DROPBOX_NAME = "dropbox" TES...
0
0
0
8dd0fb258cc91c20a8c501666b3b19c5e498c313
5,170
py
Python
lookup.py
vlee489/Turnip-Bot
2571846607d6ca57171325211c5eb6572013c767
[ "MIT" ]
5
2020-04-19T22:47:28.000Z
2020-06-01T04:37:12.000Z
lookup.py
vlee489/Turnip-Bot
2571846607d6ca57171325211c5eb6572013c767
[ "MIT" ]
7
2020-04-21T23:25:20.000Z
2021-04-20T07:50:11.000Z
lookup.py
vlee489/Turnip-Bot
2571846607d6ca57171325211c5eb6572013c767
[ "MIT" ]
null
null
null
""" This cog deals all the lookup commands """ import asyncio from discord.ext import commands, tasks import discord from lookupAPI import nookipediaAPI, localLookup import os from dotenv import load_dotenv load_dotenv(".env")
44.956522
105
0.547002
""" This cog deals all the lookup commands """ import asyncio from discord.ext import commands, tasks import discord from lookupAPI import nookipediaAPI, localLookup import os from dotenv import load_dotenv load_dotenv(".env") class Lookup(commands.Cog): nookAPI = nookipediaAPI.NookipediaAPI(os.environ.get("nook...
3,375
1,519
46
eda16405c98e51c8b837071049470bbd9e53cff0
1,068
py
Python
tests/extractors/test_azlyrics.py
marian-code/LyricsFinder
6a0c7fd3cf3fec6cc410b5d6d8a0e6ff9f48144a
[ "MIT" ]
3
2019-03-06T18:20:36.000Z
2019-12-05T06:23:16.000Z
tests/extractors/test_azlyrics.py
marian-code/LyricsFinder
6a0c7fd3cf3fec6cc410b5d6d8a0e6ff9f48144a
[ "MIT" ]
11
2018-05-04T10:49:39.000Z
2018-10-05T20:36:15.000Z
tests/extractors/test_azlyrics.py
GieselaDev/LyricsFinder
21afa8a6daf194ab0a77a4c0f5834c17eaca49f8
[ "MIT" ]
2
2019-03-05T14:08:25.000Z
2019-08-29T08:02:38.000Z
import hashlib import os import pytest from aiohttp import ClientSession from lyricsfinder.extractors.azlyrics import AZLyrics from lyricsfinder.utils import Request
38.142857
132
0.730337
import hashlib import os import pytest from aiohttp import ClientSession from lyricsfinder.extractors.azlyrics import AZLyrics from lyricsfinder.utils import Request class TestAZLyrics: @pytest.mark.asyncio async def test_can_handle(self): async with ClientSession() as session: assert aw...
642
234
23
40ea3f70f9ff9d6bc077279cbd34054808da8844
2,000
py
Python
polling_stations/settings/constants/councils.py
smsmith97/UK-Polling-Stations
ecbd98cb99e89e97354da3960b0063aa36181b11
[ "BSD-3-Clause" ]
null
null
null
polling_stations/settings/constants/councils.py
smsmith97/UK-Polling-Stations
ecbd98cb99e89e97354da3960b0063aa36181b11
[ "BSD-3-Clause" ]
null
null
null
polling_stations/settings/constants/councils.py
smsmith97/UK-Polling-Stations
ecbd98cb99e89e97354da3960b0063aa36181b11
[ "BSD-3-Clause" ]
null
null
null
# settings for councils scraper BOUNDARIES_URL = "https://ons-cache.s3.amazonaws.com/Local_Authority_Districts_April_2019_Boundaries_UK_BFE.geojson" EC_COUNCIL_CONTACT_DETAILS_API_URL = ( "https://electoralcommission.org.uk/api/v1/data/local-authorities.json" ) OLD_TO_NEW_MAP = {} NEW_COUNCILS = [] WELSH_COUNC...
54.054054
116
0.722
# settings for councils scraper BOUNDARIES_URL = "https://ons-cache.s3.amazonaws.com/Local_Authority_Districts_April_2019_Boundaries_UK_BFE.geojson" EC_COUNCIL_CONTACT_DETAILS_API_URL = ( "https://electoralcommission.org.uk/api/v1/data/local-authorities.json" ) OLD_TO_NEW_MAP = {} NEW_COUNCILS = [] WELSH_COUNC...
0
0
0
f7a75459af31c39231b2c99baeb705677f67cbf6
8,665
py
Python
.scripts/make_docs/event_tuples.py
daakru/X2WOTCCommunityHighlander
de544c30d98fd372b8798dd06adb6d3126fac66f
[ "MIT" ]
null
null
null
.scripts/make_docs/event_tuples.py
daakru/X2WOTCCommunityHighlander
de544c30d98fd372b8798dd06adb6d3126fac66f
[ "MIT" ]
null
null
null
.scripts/make_docs/event_tuples.py
daakru/X2WOTCCommunityHighlander
de544c30d98fd372b8798dd06adb6d3126fac66f
[ "MIT" ]
null
null
null
from enum import Enum from typing import Iterator, List, Optional, Tuple import re _PUNCTUATION = { "(": _Token(_TokenType.LPAREN), ")": _Token(_TokenType.RPAREN), "{": _Token(_TokenType.LBRACE), "}": _Token(_TokenType.RBRACE), "[": _Token(_TokenType.LBRACK), "]": _Token(_TokenType.RBRA...
27.507937
89
0.560415
from enum import Enum from typing import Iterator, List, Optional, Tuple import re class _TokenType(Enum): LPAREN = 1 RPAREN = 2 LBRACE = 3 RBRACE = 4 LBRACK = 5 RBRACK = 6 KW = 7 IDENT = 8 COMMA = 9 COLON = 10 class _Keyword(Enum): IN = 1 OUT = 2 INOUT = 3 clas...
5,911
360
611
2224eec49cd0fe31d6ede8185df188a65ec015a2
5,380
py
Python
Assignments/hw4/build_kNN.py
spacemanidol/CLMS572
f0380de9912c984ec21607cdb3b1f190853c5ca8
[ "MIT" ]
null
null
null
Assignments/hw4/build_kNN.py
spacemanidol/CLMS572
f0380de9912c984ec21607cdb3b1f190853c5ca8
[ "MIT" ]
null
null
null
Assignments/hw4/build_kNN.py
spacemanidol/CLMS572
f0380de9912c984ec21607cdb3b1f190853c5ca8
[ "MIT" ]
1
2020-12-26T01:28:41.000Z
2020-12-26T01:28:41.000Z
import sys import numpy as np import math from collections import Counter if __name__ == "__main__": if len(sys.argv) != 6: print("Usage:build_kNN.py <training_data> <test_data> <k_val> <similarity_func> <sys_output>") exit(-1) else: trainingData, features = readData(sys.argv[1]) ...
43.387097
193
0.573048
import sys import numpy as np import math from collections import Counter def readData(filename): labels, features, all_features = [], [], [] with open(filename, 'r') as f: for l in f: l = l.strip().split(' ') featureCount = {} labels.append(l[0]) for feat...
4,725
0
159
db5a483b7179a52757b1e303fa5cebe303f5944b
1,622
py
Python
pizzeria/workshop/forms.py
Zachary-Jackson/Django-Pizzeria
5948b10e9e99e7f2e8ffdbe6c0efbb87000808a9
[ "BSD-2-Clause" ]
1
2021-05-20T04:48:25.000Z
2021-05-20T04:48:25.000Z
pizzeria/workshop/forms.py
Zachary-Jackson/Django-Pizzeria
5948b10e9e99e7f2e8ffdbe6c0efbb87000808a9
[ "BSD-2-Clause" ]
null
null
null
pizzeria/workshop/forms.py
Zachary-Jackson/Django-Pizzeria
5948b10e9e99e7f2e8ffdbe6c0efbb87000808a9
[ "BSD-2-Clause" ]
null
null
null
from django import forms from . import models STATES = [ ('AL', 'AL'), ('AK', 'AK'), ('AZ', 'AZ'), ('AR', 'AR'), ('CA', 'CA'), ('CO', 'CO'), ('CT', 'CT'), ('DC', 'DC'), ('DE', 'DE'), ('FL', 'FL'), ('GA', 'GA'), ('HI', 'HI'), ('ID', 'ID'), ('IL', 'IL'), ('IN', 'IN'), ('IA', 'IA'), ('KS', 'KS'), ('KY', ...
36.044444
77
0.459926
from django import forms from . import models STATES = [ ('AL', 'AL'), ('AK', 'AK'), ('AZ', 'AZ'), ('AR', 'AR'), ('CA', 'CA'), ('CO', 'CO'), ('CT', 'CT'), ('DC', 'DC'), ('DE', 'DE'), ('FL', 'FL'), ('GA', 'GA'), ('HI', 'HI'), ('ID', 'ID'), ('IL', 'IL'), ('IN', 'IN'), ('IA', 'IA'), ('KS', 'KS'), ('KY', ...
0
0
0
69c717b6efcc64167d465109f16e86f9f2d5efd3
530
py
Python
server/src/tests/samples/classes2.py
jhutchings1/pyright
2b8593a58a2aecc95dac49cce92fc16678cd4e14
[ "MIT" ]
null
null
null
server/src/tests/samples/classes2.py
jhutchings1/pyright
2b8593a58a2aecc95dac49cce92fc16678cd4e14
[ "MIT" ]
1
2021-08-31T20:37:43.000Z
2021-08-31T20:37:43.000Z
server/src/tests/samples/classes2.py
jhutchings1/pyright
2b8593a58a2aecc95dac49cce92fc16678cd4e14
[ "MIT" ]
null
null
null
# This sample tests the reportIncompatibleMethodOverride # configuration option. # This should generate an error if reportIncompatibleMethodOverride # is enabled. # This should generate an error if reportIncompatibleMethodOverride # is enabled.
24.090909
71
0.684906
# This sample tests the reportIncompatibleMethodOverride # configuration option. class ParentClass(): def my_method1(self, a: int): return 1 def my_method2(self, a: int, b: int): return 1 class ChildClass(ParentClass): # This should generate an error if reportIncompatibleMethodOverride ...
108
8
151
fc04a536fd4df8abf991154f3648f8761ca61cd0
777
py
Python
ixnetwork_restpy/testplatform/sessions/ixnetwork/traffic/trafficitem/configelement/stack/l2VPNFrameRelay_template.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
20
2019-05-07T01:59:14.000Z
2022-02-11T05:24:47.000Z
ixnetwork_restpy/testplatform/sessions/ixnetwork/traffic/trafficitem/configelement/stack/l2VPNFrameRelay_template.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
60
2019-04-03T18:59:35.000Z
2022-02-22T12:05:05.000Z
ixnetwork_restpy/testplatform/sessions/ixnetwork/traffic/trafficitem/configelement/stack/l2VPNFrameRelay_template.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
13
2019-05-20T10:48:31.000Z
2021-10-06T07:45:44.000Z
from ixnetwork_restpy.base import Base from ixnetwork_restpy.files import Files
28.777778
92
0.680824
from ixnetwork_restpy.base import Base from ixnetwork_restpy.files import Files class L2VPNFrameRelay(Base): __slots__ = () _SDM_NAME = 'l2VPNFrameRelay' _SDM_ATT_MAP = { 'HeaderControlWord': 'l2VPNFrameRelay.header.controlWord-1', } def __init__(self, parent, list_op=False): supe...
152
521
23
adcf45cbcc17af82fe53acf28aef59d0c6beea07
1,105
py
Python
firstapp/rancher_api.py
mudong1991/DevOpsApi
8cc880c7c628f04492427fe73a1a684eadb94e84
[ "Apache-2.0" ]
1
2017-12-22T04:12:10.000Z
2017-12-22T04:12:10.000Z
firstapp/rancher_api.py
mudong1991/DevOpsApi
8cc880c7c628f04492427fe73a1a684eadb94e84
[ "Apache-2.0" ]
1
2020-01-08T01:49:03.000Z
2020-01-08T01:49:03.000Z
firstapp/rancher_api.py
mudong1991/DevOpsApi
8cc880c7c628f04492427fe73a1a684eadb94e84
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- # file: rancher_api # author: Mundy # date: 2017/9/1 0001 """ rancher api调用 """ import json import requests from django.conf import settings # --------requests设置-------- time_out = 8 headers = { 'content-type': 'application/json', 'Accept': 'application/json', } # 调用receiver_hooks api...
23.020833
78
0.697738
# -*- coding:utf-8 -*- # file: rancher_api # author: Mundy # date: 2017/9/1 0001 """ rancher api调用 """ import json import requests from django.conf import settings # --------requests设置-------- time_out = 8 headers = { 'content-type': 'application/json', 'Accept': 'application/json', } def get_response_json(r...
715
0
68