hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
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
130
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
130
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.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
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
# 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
0
0
0
99
0
0
0
7
44
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."""
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()
0
0
0
0
0
111
0
15
45
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
0
0
0
0
0
0
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
# Create your models here.
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...
2
756
0
2,371
0
0
0
145
338
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
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
0
0
269
0
0
0
11
46
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.nn as nn
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 ...
0
0
0
0
0
545
0
14
68
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 motod de compresin 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@ \x00H...
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...
4
0
0
0
0
0
0
0
0
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
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): ...
0
10,481
0
0
0
0
0
60
112
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...
0
0
0
0
0
122
0
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
import argparse import sys, os import torch.nn as nn sys.path.append(os.path.dirname(__file__)) sys.path.append(os.path.dirname(__file__)) if __name__ == "__main__": train()
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...
0
0
0
0
0
3,970
0
106
532
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
0
0
175
0
0
0
0
23
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
0
0
0
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 if __name__ == '__main__': task = 'optimize' if task == 'optimize': # Get training data text_file = np.loadtxt('EEG_data.csv', skiprows=1, delimiter=',') freqs = text_file[1:,0] ...
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_...
0
0
0
6,039
0
0
0
22
115
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 # 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 = ...
0
0
0
0
0
1,145
0
1
90
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...
0
0
0
0
0
877
0
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
0
0
0
0
0
0
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 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 need to download shape_...
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
0
0
0
0
0
23
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 # 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) ...
2
0
0
0
0
309
0
1
45
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
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
0
0
262
0
0
0
11
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...
0
0
0
0
0
67
0
9
52
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 # Cell # Cell def posts_list_to_dict(posts,key='id'): "Conver...
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...
0
0
0
3,369
0
1,097
0
20
198
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 # core package # 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__(...
0
0
0
1,158
0
0
0
3
139
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 import FMPasteBoxVersion setup( name = FMPasteBoxVersion.appname, version = FMPasteBoxVersion.version, description = FMPasteBoxVersion.description, long_description = FMPasteBoxVersion.longdescri...
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
0
0
0
0
13
45
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 from src.srgan.srgan_module import Generator as SRGANGenerator supportedModels = { "srcnn": SRCNN, "srcnn-bnorm": SRCNNBatchNorm, "srcnn-residual": SRCNNR, "srgan": lambda: SRGANGenerator(scale_factor=2), } if __name__ == "__main__": parser ...
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...
0
2,514
0
6,439
0
0
0
82
178
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
from .. import Transition HDF5_PATH = "/tmp/test_humblerl_callback.hdf5"
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...
0
0
0
4,712
0
0
0
6
89
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 if __name__ == '__main__': unittest.main()
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
3,075
0
0
0
-4
68
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
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
0
0
352
0
0
0
19
46
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
0
0
0
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 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.api import BedrockApi env = Env() OUTPUT_MODEL_PATH = env("OUTPUT_MODEL_PATH") TRAIN_DATA_PATH = env("TRAIN_DATA_PATH")...
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...
0
0
0
0
0
1,994
0
257
134
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...
0
0
0
0
0
4,856
0
235
637
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 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
0
0
0
0
-8
23
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 from sqlalchemy.orm import sessionmaker from sqlalchemy.orm import scoped_session DBSession = scoped_session(sessionmaker()) here = os.path.dirname(__file__) if __name__ == "__main__": # pragma: no cover main()
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...
0
0
0
0
0
589
0
87
159
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...
47
0
0
26,566
0
0
0
150
68
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
0
0
0
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
from os import path try: from . import settings except ImportError: # Running from source # Contains the graphics featured on the buttons graphics_directory = path.join(path.dirname(__file__), "graphics") ''' Hiearchy of Tkinter frames: GuiWindow.master = tk.Tk() GuiWindow(ttk.Frame) Ba...
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...
0
0
0
36,713
0
0
0
29
408
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
0
0
0
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...
0
0
0
0
0
44
0
0
23
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
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
0
0
3,645
0
0
0
41
90
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
0
0
0
0
0
7
0
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
0
0
0
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 getpass import getuser from time import sleep from microcosm_metrics.naming import name_for def publish(): """ Publish a metric (for testing). """ args = parse_args() statsd = create_statsd_client(args) if args.action == "increment": ...
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() ...
0
0
0
0
0
443
0
61
113
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
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 straha':5,'detektiv':2,'komnata':4}, ## 'dima':{'odin doma':...
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
0
0
0
0
21
46
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 logging logger = logging.getLogger('django')
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...
162
0
0
2,190
0
0
0
59
135
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 torch.optim as optim
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...
0
0
0
16,752
0
0
0
48
397
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...
0
0
0
0
0
77
0
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
0
0
0
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
0
0
0
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
""" designing a lookup scheme. accepts any Iterable for each item in this iterable - computes a key value from the item data using a provided callable - checks if a provided lookup map contains this key if yes: - outputs this item optionally enriched with the lookup data using another provided...
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...
0
1,751
0
3,020
1,138
3,332
0
128
826
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.""" __all__ = [ 'CustomRepresentations', 'MockModel', ]
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...
0
0
0
1,905
0
0
0
112
181
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\...
0
0
0
0
0
534
0
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 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 successful API calls.
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...
0
0
0
7,605
0
0
0
-32
110
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 -*- g_playerDict = {'player1':u"nobody", 'player2':u"nobody", 'player3':u"nobody", 'player4':u"nobody", 'player5':u"nobody", 'player6':u"nobody", 'player7':u"nobody", ...
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...
0
0
0
0
0
96
0
-23
90
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.core.validators import ValidationError
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,209
0
0
6,696
0
0
0
103
291
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...
0
0
0
0
0
72
0
0
23
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 rampwf as rw 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() # An object implementing the workflow workflow = rw.workflows.Estimator() score_types = [ ...
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() ...
0
0
0
0
0
458
0
10
192
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. """ from kochira.service import Service service = Service(__name__, __doc__)
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...
0
3,252
0
0
0
1,853
0
19
711
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
from unittest import main 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): ...
0
714
0
3,510
0
0
0
63
203
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 torch import torch.nn as nn # Necessary for my KFAC implementation. # https://github.com/openai/baselines/blob/master/baselines/common/tf_util.py#L87 RESET = "\033[0m"
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...
0
69
0
883
1,847
3,384
0
-15
860
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 if __name__ == '__main__': import ctypes import sys if sys.platform.startswith('linux'): try: x11 = ct...
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...
0
0
0
26,680
0
641
0
206
680
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
0
0
0
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...
0
0
0
5,669
0
0
0
83
116
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 datetime ...
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...
0
0
0
349
0
1,334
0
-19
181
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...
0
0
0
204
0
0
0
0
22
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
0
0
0
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.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':lambda inp, ou...
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...
0
0
0
1,433
0
303
0
-9
91
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 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_argument('-t', '--time_col', default=...
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) ...
0
0
0
0
0
803
0
-13
90
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
SENSOR_ADDR = IP['lit101'] LIT101 = ('LIT101', 1) LIT102 = ('LIT102', 1) if __name__ == '__main__': lit101 = Lit101(name='lit101',state=STATE,protocol=LIT101_PROTOCOL,memory=GENERIC_DATA,disk=GENERIC_DATA)
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...
0
0
0
1,119
0
0
0
-62
246
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
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
0
0
162
0
0
0
11
46
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
0
0
0
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 """ 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...
0
4,529
0
342
0
23
0
19
156
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...
2
0
0
0
0
0
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 typing import Optional import re _PUNCTUATION = { "(": _Token(_TokenType.LPAREN), ")": _Token(_TokenType.RPAREN), "{": _Token(_TokenType.LBRACE), "}": _Token(_TokenType.RBRACE), "[": _Token(_TokenType.LBRACK), "]": _Token(_TokenType.RBRACK), ",": _Token(_TokenType.COMMA), "...
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...
0
0
0
2,247
624
3,955
0
23
390
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 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]) testData, _ = readData(sys.argv[2]) candidate, truth =...
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...
0
0
0
0
0
4,725
0
-3
225
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
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', 'KY'), ('LA', 'LA'), ('ME', 'ME'), ('MD', '...
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
755
0
0
0
2
91
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.
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 ...
0
0
0
402
0
0
0
0
46
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 """ # --------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...
18
0
0
0
0
715
0
-5
134
9629e7a7a9bef340102ccfb4ccbdd868576c42f6
7,336
py
Python
cirq-core/cirq/sim/clifford/act_on_clifford_tableau_args.py
livenson/Cirq
b2fa642895089fba385999d675ab65d57a53e0df
[ "Apache-2.0" ]
1
2022-02-02T07:13:54.000Z
2022-02-02T07:13:54.000Z
cirq-core/cirq/sim/clifford/act_on_clifford_tableau_args.py
bradyb/Cirq
610b0d4ea3a7862169610797266734c844ddcc1f
[ "Apache-2.0" ]
null
null
null
cirq-core/cirq/sim/clifford/act_on_clifford_tableau_args.py
bradyb/Cirq
610b0d4ea3a7862169610797266734c844ddcc1f
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The Cirq Developers # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
40.98324
91
0.594193
# Copyright 2018 The Cirq Developers # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
0
0
0
6,363
0
0
0
92
139
b9ae65bc8f8cdccfa8ec57ea6f590f702a485148
5,875
py
Python
openGaussBase/testcase/CONNECTORS/PYTHON/PYOG/Opengauss_Function_Connect_Python_Case0005.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/CONNECTORS/PYTHON/PYOG/Opengauss_Function_Connect_Python_Case0005.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/CONNECTORS/PYTHON/PYOG/Opengauss_Function_Connect_Python_Case0005.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
""" Copyright (c) 2022 Huawei Technologies Co.,Ltd. openGauss is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W...
37.660256
84
0.621787
""" Copyright (c) 2022 Huawei Technologies Co.,Ltd. openGauss is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W...
417
0
0
4,667
0
0
0
168
245
961d257aa7ee40fc569bdad4eceb6e9d5d1eb49c
6,178
py
Python
main/environment.py
zzong2006/space-filling-curve-with-RF-learning
30823745dae91240c0977185fb1831c9b4771a40
[ "MIT" ]
1
2021-05-15T23:27:58.000Z
2021-05-15T23:27:58.000Z
main/environment.py
zzong2006/space-filling-curve-with-RF-learning
30823745dae91240c0977185fb1831c9b4771a40
[ "MIT" ]
null
null
null
main/environment.py
zzong2006/space-filling-curve-with-RF-learning
30823745dae91240c0977185fb1831c9b4771a40
[ "MIT" ]
null
null
null
if '__main__' == __name__: test_env = CurveEnvironment() for curve_name in ['z', 'hilbert', 'zig-zag']: test_env = CurveEnvironment(init_curve=curve_name) print(test_env.get_l2_norm_locality()) print(test_env.get_reward())
33.215054
111
0.570411
from itertools import combinations import numpy as np import matplotlib.pyplot as plt from utils import * import configparser import torch class CurveEnvironment: """ Curve 환경, 강화 학습 모델이 생성한 action을 기반으로 커브의 순서를 바꾸고, 바뀐 커브를 기반으로 reward를 측정 """ def __init__(self, order=3, dim=2, data_size=10, ini...
1,203
212
0
5,148
0
0
0
7
156
145d5556f43decc68e22fba23de0af8fd6b8a78f
806
py
Python
template_engine/jinja2_filters.py
samuelcouch/the-blue-alliance
8c7977071dbe9d9745ffdfbb03e37bd016792511
[ "MIT" ]
null
null
null
template_engine/jinja2_filters.py
samuelcouch/the-blue-alliance
8c7977071dbe9d9745ffdfbb03e37bd016792511
[ "MIT" ]
null
null
null
template_engine/jinja2_filters.py
samuelcouch/the-blue-alliance
8c7977071dbe9d9745ffdfbb03e37bd016792511
[ "MIT" ]
null
null
null
def strftime(datetime, formatstr): """ Uses Python's strftime with some tweaks """ return datetime.strftime(formatstr).lstrip("0").replace(" 0", " ") # def slugify(s): # """ # Use Django's slugify method # """ # return defaultfilters.slugify(s)
17.148936
70
0.611663
from email import utils import re import time import urllib def digits(s): if not s: return '' if type(s) is int: return s return re.sub('[^0-9]', '', s) def floatformat(num, num_decimals): return "%.{}f".format(num_decimals) % num def strftime(datetime, formatstr): """ Use...
0
0
0
0
0
345
0
-28
203
4d02e68b8ef0c65c77338fd1b55733f17d364293
12,812
py
Python
custom_components/openmediavault/omv_controller.py
firstof9/homeassistant-openmediavault
3a0cd5ae34b045e90b06b15760329e987c87b5fd
[ "Apache-2.0" ]
41
2020-04-20T15:57:14.000Z
2022-03-24T18:16:28.000Z
custom_components/openmediavault/omv_controller.py
firstof9/homeassistant-openmediavault
3a0cd5ae34b045e90b06b15760329e987c87b5fd
[ "Apache-2.0" ]
68
2020-04-27T08:36:47.000Z
2022-03-31T07:04:47.000Z
custom_components/openmediavault/omv_controller.py
firstof9/homeassistant-openmediavault
3a0cd5ae34b045e90b06b15760329e987c87b5fd
[ "Apache-2.0" ]
13
2020-09-11T12:45:51.000Z
2022-03-30T06:58:05.000Z
"""OpenMediaVault Controller.""" # --------------------------- # OMVControllerData # ---------------------------
36.501425
90
0.46956
"""OpenMediaVault Controller.""" import asyncio import time from datetime import timedelta from homeassistant.const import ( CONF_HOST, CONF_NAME, CONF_PASSWORD, CONF_SSL, CONF_USERNAME, CONF_VERIFY_SSL, ) from homeassistant.core import callback from homeassistant.helpers.dispatcher import asy...
0
329
1,502
10,375
0
0
0
245
245
246e0749cdd1714c65c0961416623be200a020e0
3,849
py
Python
trees/trees.py
patinousward/machine-learning
124b6c2e1a317f21238985ee4b74b638f5358b81
[ "MIT" ]
null
null
null
trees/trees.py
patinousward/machine-learning
124b6c2e1a317f21238985ee4b74b638f5358b81
[ "MIT" ]
null
null
null
trees/trees.py
patinousward/machine-learning
124b6c2e1a317f21238985ee4b74b638f5358b81
[ "MIT" ]
null
null
null
# # axis index value # #
37.009615
97
0.665887
from math import log import operator # 计算香农熵 def calcShannonEnt(dataSet): numEntries = len(dataSet) labelCounts = {} for featVec in dataSet: currentLabel = featVec[-1] # 数据的最后一列 if currentLabel not in labelCounts.keys(): labelCounts[currentLabel] = 0 # 默认值为0 labelCounts...
1,938
0
0
0
0
2,991
0
-7
179
504a306dad3ee3153b338e1d454699034e9ee967
1,850
py
Python
code/Solution_0052_totalNQueens.py
qizhenkang/myLeetCode
cb9edce69567eba9d96ce756507a5a7ac6e74293
[ "MIT" ]
null
null
null
code/Solution_0052_totalNQueens.py
qizhenkang/myLeetCode
cb9edce69567eba9d96ce756507a5a7ac6e74293
[ "MIT" ]
null
null
null
code/Solution_0052_totalNQueens.py
qizhenkang/myLeetCode
cb9edce69567eba9d96ce756507a5a7ac6e74293
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sat Oct 16 20:00:44 2021 @author: qizhe """ if __name__ == '__main__': solu = Solution() input_List = [[5,1,9,11],[2,4,8,10],[13,3,6,7],[15,14,12,16]] input_List = [[0,1,2,3],[4,5,6,7],[8,9,10,11],[12,13,14,15]] # input_List = 1 result = solu.solveNQueen...
27.61194
114
0.463784
# -*- coding: utf-8 -*- """ Created on Sat Oct 16 20:00:44 2021 @author: qizhe """ class Solution: def solveNQueens(self, n: int): """ 典型的回溯问题 读题目,他要的是,所有解,不是找到一个就可以 第三个思路对了,但性能很差,想办法剪枝一下,感觉主要问题在于valid 的恢复上面 答案: 核心思路: 1、答案搞了3个集合,也就是三个约束来构造,就很简单了,然后优...
972
0
0
1,111
0
0
0
0
23
5ebadfa1130eda16e18e9a569211fa885b32c271
1,835
py
Python
preprocess_hdf5_data.py
trane293/multimodal_brain_synthesis
29291f091c15121707fd0fdcb1245d2ad8b944e2
[ "MIT" ]
null
null
null
preprocess_hdf5_data.py
trane293/multimodal_brain_synthesis
29291f091c15121707fd0fdcb1245d2ad8b944e2
[ "MIT" ]
null
null
null
preprocess_hdf5_data.py
trane293/multimodal_brain_synthesis
29291f091c15121707fd0fdcb1245d2ad8b944e2
[ "MIT" ]
null
null
null
import h5py import numpy as np ''' if 't1.' i = 0 seq_name = 't1' elif 't2.' in imagefile: i = 1 seq_name = 't2' elif 't1ce.' in imagefile: i = 2 seq_name = 't1ce' elif 'flair.' in imagefile: i = 3 seq_name = 'flair' ''' import platform # to make the code portable even on cedar,you ne...
28.230769
112
0.683379
import h5py import numpy as np ''' if 't1.' i = 0 seq_name = 't1' elif 't2.' in imagefile: i = 1 seq_name = 't2' elif 't1ce.' in imagefile: i = 2 seq_name = 't1ce' elif 'flair.' in imagefile: i = 3 seq_name = 'flair' ''' import platform # to make the code portable even on cedar,you ne...
0
0
0
0
0
0
0
0
0
e81417a710f461b78ac0a327b034ccca776c6883
1,035
py
Python
tests/test_hessian.py
blevine37/pySpawn17
4fa65cfc3b4d399bcb586506782d00f86b453139
[ "MIT" ]
18
2018-03-30T16:11:13.000Z
2021-08-22T18:57:12.000Z
tests/test_hessian.py
dfedorov1988/MCDMS
215e18327ad9f806d82eb54d101d657d0ac29bd6
[ "MIT" ]
3
2018-03-30T17:26:51.000Z
2021-08-17T08:49:24.000Z
tests/test_hessian.py
dfedorov1988/MCDMS
215e18327ad9f806d82eb54d101d657d0ac29bd6
[ "MIT" ]
6
2018-11-21T15:30:38.000Z
2021-07-05T05:37:15.000Z
import numpy as np import pyspawn pyspawn.import_methods.into_hessian(pyspawn.potential.terachem_cas) hess = pyspawn.hessian() ndims = 18 istate = 0 pos = np.asarray([ 0.000000000, 0.000000000, 0.101944554, 0.000000000, 0.000000000, 2.598055446, 0.000...
23
67
0.547826
import numpy as np import pyspawn pyspawn.import_methods.into_hessian(pyspawn.potential.terachem_cas) hess = pyspawn.hessian() ndims = 18 istate = 0 pos = np.asarray([ 0.000000000, 0.000000000, 0.101944554, 0.000000000, 0.000000000, 2.598055446, 0.000...
0
0
0
0
0
0
0
0
0
0037bdf517203ae654e04612f90ba818f7dbac6d
2,434
py
Python
setup.py
mmcauliffe/Conch
7668612d7a610d0f5ae3332f990e71b26c5e8b34
[ "MIT" ]
33
2015-06-10T19:36:54.000Z
2017-09-18T23:57:46.000Z
setup.py
mmcauliffe/Conch
7668612d7a610d0f5ae3332f990e71b26c5e8b34
[ "MIT" ]
5
2015-03-22T07:05:21.000Z
2017-08-16T03:48:19.000Z
setup.py
mmcauliffe/Conch
7668612d7a610d0f5ae3332f990e71b26c5e8b34
[ "MIT" ]
10
2015-04-29T05:51:51.000Z
2017-07-12T18:52:18.000Z
from setuptools import setup import conch if __name__ == '__main__': setup(name='conch-sounds', version=conch.__version__, description='Analyze acoustic similarity in Python', classifiers=[ 'Development Status :: 3 - Alpha', 'Programming Language :: Pyt...
34.28169
91
0.527116
import sys import os from setuptools import setup from setuptools.command.test import test as TestCommand import conch def readme(): with open('README.md') as f: return f.read() class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args ...
0
0
0
508
0
49
0
11
112
2dc21830f816f4bcf684cb12098052219e1f3815
6,400
py
Python
router/run.py
Financial-Times/paasport
9f5ec95b99f03c06dc800907f6f0750f5eec7a35
[ "MIT" ]
2
2015-04-21T10:50:15.000Z
2015-04-22T15:48:45.000Z
router/run.py
Financial-Times/paasport
9f5ec95b99f03c06dc800907f6f0750f5eec7a35
[ "MIT" ]
null
null
null
router/run.py
Financial-Times/paasport
9f5ec95b99f03c06dc800907f6f0750f5eec7a35
[ "MIT" ]
1
2020-07-30T14:50:38.000Z
2020-07-30T14:50:38.000Z
#!/usr/bin/python # Layer 7 Router # from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer import json, re, os, subprocess PORT_NUMBER = 8080 # Writes config for a given service globaladdons = { 'example': [ 'ec2-52-16-13-243.eu-west-1.compute.amazonaws.com', ], } for name, machines in globaladdons.i...
29.090909
175
0.66375
#!/usr/bin/python # Layer 7 Router # from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer import json, re, os, subprocess PORT_NUMBER = 8080 class UserError(Exception): def __init__(self, value): self.value = value def __str__(self): return repr(self.value) def writedefaultvcl(): vcl = "vcl 4.0;\n\...
0
0
0
2,264
0
3,233
0
-1
90
ba89dd4cb6362cf1ebc95ae0ce94f8263fa0dede
2,621
py
Python
docs/build_cli_docs.py
TedrosGitHub/TSA-yatsm
8e328f366c8fd94d5cc57cd2cc42080c43d1f391
[ "MIT" ]
59
2015-02-03T19:56:17.000Z
2022-03-17T13:45:23.000Z
docs/build_cli_docs.py
TedrosGitHub/TSA-yatsm
8e328f366c8fd94d5cc57cd2cc42080c43d1f391
[ "MIT" ]
97
2015-02-12T05:18:38.000Z
2020-06-09T16:10:38.000Z
docs/build_cli_docs.py
TedrosGitHub/TSA-yatsm
8e328f366c8fd94d5cc57cd2cc42080c43d1f391
[ "MIT" ]
35
2015-02-27T19:43:23.000Z
2021-06-21T02:29:14.000Z
#!/usr/bin/env python """ Build CLI help pages to RST for dynamic inclusion of help messages This solves the problem of not being able to install YATSM on readthedocs because of its complicated dependencies without the need to mock out basically every import. Just run this script before pushing any new changes to the ...
30.126437
79
0.638306
#!/usr/bin/env python """ Build CLI help pages to RST for dynamic inclusion of help messages This solves the problem of not being able to install YATSM on readthedocs because of its complicated dependencies without the need to mock out basically every import. Just run this script before pushing any new changes to the ...
0
394
0
0
0
504
0
-2
136
2e975b39468ca0ba983a654b851314f2a36a1b84
151
py
Python
Python3/DebuggingAndErrorHandling/try_except.py
norbertosanchezdichi/TIL
2e9719ddd288022f53b094a42679e849bdbcc625
[ "MIT" ]
null
null
null
Python3/DebuggingAndErrorHandling/try_except.py
norbertosanchezdichi/TIL
2e9719ddd288022f53b094a42679e849bdbcc625
[ "MIT" ]
null
null
null
Python3/DebuggingAndErrorHandling/try_except.py
norbertosanchezdichi/TIL
2e9719ddd288022f53b094a42679e849bdbcc625
[ "MIT" ]
null
null
null
try: foobar except: #"catch all", highly discourage due to not being able to identify what went wrong print("PROBLEM") print("after the try")
30.2
91
0.708609
try: foobar except: #"catch all", highly discourage due to not being able to identify what went wrong print("PROBLEM") print("after the try")
0
0
0
0
0
0
0
0
0
2e644c0780b72db35e413e1216b0bdcb7a87ce73
3,895
py
Python
src/onnxruntime_numpy/einsum_helper.py
gf712/onnxruntime-numpy
752ecb90e97295384c96ff339165c461ba4caf87
[ "MIT" ]
2
2021-04-24T07:50:31.000Z
2021-09-07T18:56:51.000Z
src/onnxruntime_numpy/einsum_helper.py
gf712/onnxruntime-numpy
752ecb90e97295384c96ff339165c461ba4caf87
[ "MIT" ]
null
null
null
src/onnxruntime_numpy/einsum_helper.py
gf712/onnxruntime-numpy
752ecb90e97295384c96ff339165c461ba4caf87
[ "MIT" ]
null
null
null
import re import string # obtained and modified from # https://github.com/tensorflow/tensorflow/blob/590d6eef7e91a6a7392c8ffffb7b58f2e0c8bc6b/tensorflow/python/ops/special_math_ops.py#L311 def einsum_parse_and_resolve_equation(equation, input_shapes): """Helper for einsum() that splits/resolves inputs & outputs....
45.290698
135
0.618485
import re import string # obtained and modified from # https://github.com/tensorflow/tensorflow/blob/590d6eef7e91a6a7392c8ffffb7b58f2e0c8bc6b/tensorflow/python/ops/special_math_ops.py#L311 def einsum_parse_and_resolve_equation(equation, input_shapes): """Helper for einsum() that splits/resolves inputs & outputs....
0
0
0
0
0
0
0
0
0
3a061df687e9af5bce3beb7af1dbd2d6be9f9a0c
2,837
py
Python
src/lib/gcode_preview.py
utitankaspk/SPKCAM
a1ac8121e93faaecd0132d16b3c3a5ae7fa84343
[ "Apache-2.0" ]
1
2018-12-05T22:44:48.000Z
2018-12-05T22:44:48.000Z
src/lib/gcode_preview.py
utitankaspk/SPKCAM
a1ac8121e93faaecd0132d16b3c3a5ae7fa84343
[ "Apache-2.0" ]
null
null
null
src/lib/gcode_preview.py
utitankaspk/SPKCAM
a1ac8121e93faaecd0132d16b3c3a5ae7fa84343
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- color_palette = {"cut":(153,204,255),"plunge":(254,184,0),"point":(153,204,255)} LAYER_NAME = "vector_from_gcode" if __name__=="__main__": main()
31.175824
113
0.602749
#!/usr/bin/env python # -*- coding: utf-8 -*- import rhinoscriptsyntax as rs import Rhino import os color_palette = {"cut":(153,204,255),"plunge":(254,184,0),"point":(153,204,255)} LAYER_NAME = "vector_from_gcode" def parse_line(line): line = line.lower().replace("\n","") point = [] if line.sta...
3
0
0
0
0
2,477
0
-12
167
fae7b0157a18871e061420658fff8d1d8058b250
460
py
Python
dictionary_from_book5.py
AmitSuresh/learning-python
f1ea5b9f3659f21504b1b0e452c03239b03cde85
[ "MIT" ]
null
null
null
dictionary_from_book5.py
AmitSuresh/learning-python
f1ea5b9f3659f21504b1b0e452c03239b03cde85
[ "MIT" ]
null
null
null
dictionary_from_book5.py
AmitSuresh/learning-python
f1ea5b9f3659f21504b1b0e452c03239b03cde85
[ "MIT" ]
null
null
null
#A dictionary in a Dictionary users = { 'aeinstein':{ 'first':'albert', 'last':'einstein', 'location':'princeton', }, 'mcurie':{ 'first':'mary', 'last':'curie', 'location':'paris', }, } for username,user_info in users.items(): print(f'Username: {username}') full_name=f"{user_info['firs...
24.210526
55
0.621739
#A dictionary in a Dictionary users = { 'aeinstein':{ 'first':'albert', 'last':'einstein', 'location':'princeton', }, 'mcurie':{ 'first':'mary', 'last':'curie', 'location':'paris', }, } for username,user_info in users.items(): print(f'Username: {username}') full_name=f"{user_info['firs...
0
0
0
0
0
0
0
0
0
9308ccd54291ef3ae5d3f45ec6555591f94d6baa
36,724
py
Python
adi_study_watch/nrf5_sdk_15.2.0/validation/common.py
ArrowElectronics/Vital-Signs-Monitoring
ba43fe9a116d94170561433910fd7bffba5726e7
[ "Unlicense" ]
5
2021-06-13T17:11:19.000Z
2021-12-01T18:20:38.000Z
adi_study_watch/nrf5_sdk_15.2.0/validation/common.py
ArrowElectronics/Vital-Signs-Monitoring
ba43fe9a116d94170561433910fd7bffba5726e7
[ "Unlicense" ]
null
null
null
adi_study_watch/nrf5_sdk_15.2.0/validation/common.py
ArrowElectronics/Vital-Signs-Monitoring
ba43fe9a116d94170561433910fd7bffba5726e7
[ "Unlicense" ]
1
2022-01-08T15:01:44.000Z
2022-01-08T15:01:44.000Z
import os try: import tkinter import time import yaml from datetime import datetime from matplotlib import pyplot as plt from robot.libraries.BuiltIn import BuiltIn import shutil import inspect import logging import easygui import subprocess from utils.cli_map import CLI...
35.176245
124
0.61856
import os import sys try: import tkinter import time import yaml from tkinter import messagebox from utils.serial_comm import SerialIface from datetime import datetime from utils.test_utils import util_logger from matplotlib import pyplot as plt from robot.libraries.BuiltIn import B...
0
807
0
246
0
2,115
0
38
495
f5950857c677b000860033c3cad22749b7050775
181,473
py
Python
chesstab/tools/chesstab-4-1-1_castling-option-correction.py
RogerMarsh/chesstab
01d375dc6bf025b621612a84513e55c4640a78ad
[ "BSD-3-Clause" ]
null
null
null
chesstab/tools/chesstab-4-1-1_castling-option-correction.py
RogerMarsh/chesstab
01d375dc6bf025b621612a84513e55c4640a78ad
[ "BSD-3-Clause" ]
null
null
null
chesstab/tools/chesstab-4-1-1_castling-option-correction.py
RogerMarsh/chesstab
01d375dc6bf025b621612a84513e55c4640a78ad
[ "BSD-3-Clause" ]
null
null
null
# chesstab-4-1-1_castling-option-correction.py # Copyright 2020 Roger Marsh # Licence: See LICENCE (BSD licence) """Read games from a ChessTab database and report games with FENs where the castling options are not consistent with the piece placement, and attempt correction on request. The database must be compatible ...
34.738323
80
0.555603
# chesstab-4-1-1_castling-option-correction.py # Copyright 2020 Roger Marsh # Licence: See LICENCE (BSD licence) """Read games from a ChessTab database and report games with FENs where the castling options are not consistent with the piece placement, and attempt correction on request. The database must be compatible ...
0
518
0
150,066
0
1,484
0
530
542
95267cbca2f7b75442e0d4693416ef0ee8ad422a
4,439
py
Python
game/Hangman2.0.py
archu2020/python-2
19c626ca9fd37168db8a7ac075fd80c8e2971313
[ "Apache-2.0" ]
48
2017-12-24T12:19:55.000Z
2022-02-26T13:14:27.000Z
game/Hangman2.0.py
17610178081/python
3975c678d985c468deecd03560d882e9d316bb63
[ "Apache-2.0" ]
3
2018-12-05T08:48:14.000Z
2020-07-29T01:56:16.000Z
game/Hangman2.0.py
17610178081/python
3975c678d985c468deecd03560d882e9d316bb63
[ "Apache-2.0" ]
113
2017-08-09T03:10:04.000Z
2022-03-26T16:05:01.000Z
''' made by YeahKun in 2017-7-22 11:50:42 2.0 ''' HANGMANPICS = [ ''' ===== +---+ | | | | | | =====''', ''' ===== +---+ | | O | | | | =====''', ''' ===== +---+ | | O | | | | | =====''', ''' ====== +---+ ...
22.195
161
0.478937
''' made by YeahKun in 2017-7-22 11:50:42 猜字谜游戏2.0 增加了提示,扩展了单词的种类和数量 ''' import random HANGMANPICS = [ ''' ===== +---+ | | | | | | =====''', ''' ===== +---+ | | O | | | | =====''', ''' ===== +---+ | | O | | | | | ...
735
0
0
0
0
1,255
0
-8
122
ed5cb3b2ba71d67a9a4146c3d8fa1453b913f27b
13,743
py
Python
dt-learn.py
atasipanda/Decision-Trees
6719d5d4ff282b8858f0bf8222af6660a3c113d2
[ "MIT" ]
null
null
null
dt-learn.py
atasipanda/Decision-Trees
6719d5d4ff282b8858f0bf8222af6660a3c113d2
[ "MIT" ]
null
null
null
dt-learn.py
atasipanda/Decision-Trees
6719d5d4ff282b8858f0bf8222af6660a3c113d2
[ "MIT" ]
null
null
null
from collections import OrderedDict features = OrderedDict({}) trainingData = [] testFeatures = OrderedDict({}) testData = [] class_attribute = [] # returns # feature index of the best feature # information gain by that feature in data # -----------------------------------------------------------------------...
34.27182
150
0.594266
import sys import math import re from collections import OrderedDict import random import numpy import matplotlib.pyplot as plt features = OrderedDict({}) trainingData = [] testFeatures = OrderedDict({}) testData = [] class_attribute = [] def parse_file(filename): global lines, f, lines_read, l, m, fvalues, values,...
0
0
0
3,534
0
8,968
0
-40
497
787f01363f8f53606c734d695875b0fc99b9907f
392
py
Python
code/class.py
spartam/basic_python_course
5e940c2363ba01880386244ad17692b4593611f8
[ "MIT" ]
null
null
null
code/class.py
spartam/basic_python_course
5e940c2363ba01880386244ad17692b4593611f8
[ "MIT" ]
null
null
null
code/class.py
spartam/basic_python_course
5e940c2363ba01880386244ad17692b4593611f8
[ "MIT" ]
null
null
null
if __name__ == '__main__': P = coordinate() print(P) P = coordinate(x=2) print(P) P = coordinate(y=3) print(P) P = coordinate(x=5, y=7) print(P)
14.518519
42
0.57398
class coordinate: x = 0 y = 0 def __init__(self, **kwargs): keys = kwargs.keys() if 'x' in keys: self.x = kwargs['x'] if 'y' in keys: self.y = kwargs['y'] def __str__(self): return 'x : %s\ty: %s' %(self.x, self.y) if __name__ == '__main__': P = coordinate() print(P) P = coordinate(x=2) print...
0
0
0
213
0
0
0
0
23
3d084a7fbfa072a06df92b18c57c17c769087e2c
623
py
Python
ClickKaleidoscope.py
avinja/python-samples
0f4f94dbc1a886926ad31719a4f34b21c56f2056
[ "Apache-2.0" ]
null
null
null
ClickKaleidoscope.py
avinja/python-samples
0f4f94dbc1a886926ad31719a4f34b21c56f2056
[ "Apache-2.0" ]
null
null
null
ClickKaleidoscope.py
avinja/python-samples
0f4f94dbc1a886926ad31719a4f34b21c56f2056
[ "Apache-2.0" ]
null
null
null
#ClickKaleidoscope.py import turtle t = turtle.Pen() t.speed(0) t.hideturtle() turtle.bgcolor("black") colors = ["red", "yellow", "blue", "green", "orange", "purple", "white", "gray"] turtle.onscreenclick(draw_kaleido)
23.074074
63
0.598716
#ClickKaleidoscope.py import random import turtle t = turtle.Pen() t.speed(0) t.hideturtle() turtle.bgcolor("black") colors = ["red", "yellow", "blue", "green", "orange", "purple", "white", "gray"] def draw_kaleido(x,y): t.pencolor(random.choice(colors)) size = random.randint(10,40) draw_sp...
0
0
0
0
0
334
0
-8
67
0823e3f1378a191c96f2c6e83021f577431436d6
812
py
Python
tests/submodules/run.py
jonnyrocks/pyangbind
7a7c6df6ddad7cbec941800431840253b5e2f186
[ "Apache-2.0" ]
176
2015-06-17T15:44:07.000Z
2022-03-18T01:16:19.000Z
tests/submodules/run.py
jonnyrocks/pyangbind
7a7c6df6ddad7cbec941800431840253b5e2f186
[ "Apache-2.0" ]
245
2015-05-29T07:04:13.000Z
2022-03-25T14:44:37.000Z
tests/submodules/run.py
jonnyrocks/pyangbind
7a7c6df6ddad7cbec941800431840253b5e2f186
[ "Apache-2.0" ]
118
2015-07-02T07:04:36.000Z
2022-03-31T20:32:38.000Z
#!/usr/bin/env python import unittest if __name__ == "__main__": unittest.main()
23.2
55
0.644089
#!/usr/bin/env python import unittest from tests.base import PyangBindTestCase class PyangbindSubmoduleTests(PyangBindTestCase): yang_files = ["mod-a.yang"] pyang_flags = ["--use-extmethods"] def setUp(self): self.mod_a = self.bindings.mod_a() def test_001_check_correct_import(self): ...
0
0
0
658
0
0
0
19
46
c33950bf8d2032710832c6024b8e90c72bb403b7
5,340
py
Python
src/eduid_userdb/support/models.py
SUNET/eduid-userdb
5970880caf0b0e2bdee6c23869ef287acc87af2a
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
src/eduid_userdb/support/models.py
SUNET/eduid-userdb
5970880caf0b0e2bdee6c23869ef287acc87af2a
[ "BSD-2-Clause-FreeBSD" ]
12
2015-08-28T12:05:32.000Z
2020-06-23T13:31:29.000Z
src/eduid_userdb/support/models.py
SUNET/eduid-userdb
5970880caf0b0e2bdee6c23869ef287acc87af2a
[ "BSD-2-Clause-FreeBSD" ]
2
2016-10-24T06:37:33.000Z
2016-11-21T11:39:39.000Z
# -*- coding: utf-8 -*- __author__ = 'lundberg' # Models for filtering out unneeded or unwanted data from eduID database objects
28.55615
113
0.63633
# -*- coding: utf-8 -*- from copy import deepcopy from typing import List, Optional __author__ = 'lundberg' # Models for filtering out unneeded or unwanted data from eduID database objects class GenericFilterDict(dict): add_keys: Optional[List[str]] = None remove_keys: Optional[List[str]] = None def __...
0
0
0
4,790
0
0
0
16
388