hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
5d39bdcbff174082e5199143e653dd2c34282024
977
py
Python
PythonCode/drawing_image.py
Spstolar/BMachine
319e5efb72cd3ab07b8538b7c43bd93e75f2e38a
[ "MIT" ]
null
null
null
PythonCode/drawing_image.py
Spstolar/BMachine
319e5efb72cd3ab07b8538b7c43bd93e75f2e38a
[ "MIT" ]
3
2017-04-02T15:41:22.000Z
2017-04-03T06:43:06.000Z
PythonCode/drawing_image.py
Spstolar/BMachine
319e5efb72cd3ab07b8538b7c43bd93e75f2e38a
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import matplotlib.image as mpimg import numpy as np length = 28 dog = np.load('stabilization_small.npy') num_plot = 0 if num_plot == 1: for j in range(10): img = dog[j,:].reshape((length, length)) # for printing numbers # img = np.random.randint(0,2,size=(length,...
28.735294
72
0.660184
import matplotlib.pyplot as plt import matplotlib.image as mpimg import numpy as np length = 28 dog = np.load('stabilization_small.npy') num_plot = 0 if num_plot == 1: for j in range(10): img = dog[j,:].reshape((length, length)) # for printing numbers # img = np.random.randint(0,2,size=(length,...
0
0
0
f224cba2807c1bda25b178194830b1fe159bb6f9
806
py
Python
manual-evaluation/anal.py
Tijana37/chimera
bd496e43ba4bb8949eb593ce412b5e91aaae7023
[ "MIT" ]
125
2019-04-09T10:29:48.000Z
2022-02-24T07:57:09.000Z
manual-evaluation/anal.py
Tijana37/chimera
bd496e43ba4bb8949eb593ce412b5e91aaae7023
[ "MIT" ]
23
2019-04-10T08:38:40.000Z
2022-03-10T13:33:30.000Z
manual-evaluation/anal.py
Tijana37/chimera
bd496e43ba4bb8949eb593ce412b5e91aaae7023
[ "MIT" ]
26
2019-04-09T11:02:19.000Z
2022-03-06T06:37:30.000Z
from itertools import chain from json import load import numpy as np if __name__ == "__main__": samples = load(open("samples.json")) rdfs = list(chain.from_iterable([s["rdf"] for s in samples])) hal = np.sum([s["hal"] for s in samples]) total = len(rdfs) exists = len([r for s, r, o, res in rdfs i...
38.380952
128
0.58933
from itertools import chain from json import load import numpy as np if __name__ == "__main__": samples = load(open("samples.json")) rdfs = list(chain.from_iterable([s["rdf"] for s in samples])) hal = np.sum([s["hal"] for s in samples]) total = len(rdfs) exists = len([r for s, r, o, res in rdfs i...
0
0
0
a9a24622d02218f1e27841e99f0174d89c0c3866
300
py
Python
backend/contrib/management/commands/export_frontend.py
reckonsys/backend
1def18c23240ed769b308527a8d1b961e9e72d8f
[ "MIT" ]
2
2022-02-10T07:41:49.000Z
2022-02-17T11:17:58.000Z
backend/contrib/management/commands/export_frontend.py
reckonsys/backend
1def18c23240ed769b308527a8d1b961e9e72d8f
[ "MIT" ]
null
null
null
backend/contrib/management/commands/export_frontend.py
reckonsys/backend
1def18c23240ed769b308527a8d1b961e9e72d8f
[ "MIT" ]
null
null
null
from django.core import management from django.core.management.base import BaseCommand
27.272727
51
0.74
from django.core import management from django.core.management.base import BaseCommand class Command(BaseCommand): help = "Produce client-side JS files" def handle(self, *args, **options): management.call_command("export_choices") management.call_command("graphql_schema")
114
75
23
5edb306462b722ec70fd1df87b045be17a5272d4
1,106
py
Python
app/migrations/0014_pickassociationrules.py
lucashanke/houseofdota
c83fbb15d58928599f47f9754e3c401d98db3c24
[ "MIT" ]
5
2016-08-18T03:50:57.000Z
2018-11-20T21:02:59.000Z
app/migrations/0014_pickassociationrules.py
lucashanke/houseofdota
c83fbb15d58928599f47f9754e3c401d98db3c24
[ "MIT" ]
null
null
null
app/migrations/0014_pickassociationrules.py
lucashanke/houseofdota
c83fbb15d58928599f47f9754e3c401d98db3c24
[ "MIT" ]
2
2016-08-05T11:04:24.000Z
2018-11-20T21:03:04.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2017-07-05 22:01 from __future__ import unicode_literals import django.core.validators from django.db import migrations, models import django.db.models.deletion import re
38.137931
224
0.643761
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2017-07-05 22:01 from __future__ import unicode_literals import django.core.validators from django.db import migrations, models import django.db.models.deletion import re class Migration(migrations.Migration): dependencies = [ ('app', '0013_auto_2017...
0
856
23
cad28a7345e2f20a52591ec569f9df1622cd825f
3,257
py
Python
print_model_info.py
eleanorplatt/ProtoPNet
014ce4a95d07472f313f45a6a5af99023a054f1c
[ "MIT" ]
null
null
null
print_model_info.py
eleanorplatt/ProtoPNet
014ce4a95d07472f313f45a6a5af99023a054f1c
[ "MIT" ]
null
null
null
print_model_info.py
eleanorplatt/ProtoPNet
014ce4a95d07472f313f45a6a5af99023a054f1c
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.utils.model_zoo as model_zoo import torch.nn.functional as F import torchvision.transforms as transforms import torchvision.models as models import argparse import re import os from torchsummary import summary # local imports import model from preprocess import mean, std...
47.897059
195
0.735646
import torch import torch.nn as nn import torch.utils.model_zoo as model_zoo import torch.nn.functional as F import torchvision.transforms as transforms import torchvision.models as models import argparse import re import os from torchsummary import summary # local imports import model from preprocess import mean, std...
0
0
0
fa428d289bf620d69dd7ff09de58371910717df8
1,707
py
Python
tests/test_typehoon.py
BA7JCM/angr
187a713c35759d998d93dfc5280630976d42d717
[ "BSD-2-Clause" ]
null
null
null
tests/test_typehoon.py
BA7JCM/angr
187a713c35759d998d93dfc5280630976d42d717
[ "BSD-2-Clause" ]
null
null
null
tests/test_typehoon.py
BA7JCM/angr
187a713c35759d998d93dfc5280630976d42d717
[ "BSD-2-Clause" ]
null
null
null
# pylint:disable=missing-class-docstring,no-self-use import os import unittest import angr test_location = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'binaries', 'tests') if __name__ == "__main__": unittest.main()
32.207547
106
0.670767
# pylint:disable=missing-class-docstring,no-self-use import os import unittest import angr test_location = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'binaries', 'tests') class TestTypehoon(unittest.TestCase): def test_smoketest(self): p = angr.Project(os.path.join(test_loca...
1,363
17
76
d4022225502430ca54e78eceb3da2a4dac4eb498
7,862
py
Python
keras_unet_collection/losses.py
EunTaeJeon/keras-unet-collection
50ab6c6b76e94447228035445efa32d7b0a19b33
[ "MIT" ]
1
2021-04-15T05:45:44.000Z
2021-04-15T05:45:44.000Z
keras_unet_collection/losses.py
DARK-art108/keras-unet-collection
50ab6c6b76e94447228035445efa32d7b0a19b33
[ "MIT" ]
null
null
null
keras_unet_collection/losses.py
DARK-art108/keras-unet-collection
50ab6c6b76e94447228035445efa32d7b0a19b33
[ "MIT" ]
null
null
null
from __future__ import absolute_import import numpy as np import tensorflow as tf import tensorflow.keras.backend as K def _crps_tf(y_true, y_pred, factor=0.05): ''' core of (pseudo) CRPS loss y_true: two-dimensional arrays y_pred: two-dimensional arrays factor: importance of std term ...
29.118519
120
0.621216
from __future__ import absolute_import import numpy as np import tensorflow as tf import tensorflow.keras.backend as K def _crps_tf(y_true, y_pred, factor=0.05): ''' core of (pseudo) CRPS loss y_true: two-dimensional arrays y_pred: two-dimensional arrays factor: importance of std term ...
0
0
0
ece1e688cef65472a6d87f54841ff4238cebe371
295
py
Python
pvcnn/modules/__init__.py
paschalidoud/pvcnn
4894ab8de72fee29df952d5a92a22b6211ec15f8
[ "MIT" ]
null
null
null
pvcnn/modules/__init__.py
paschalidoud/pvcnn
4894ab8de72fee29df952d5a92a22b6211ec15f8
[ "MIT" ]
null
null
null
pvcnn/modules/__init__.py
paschalidoud/pvcnn
4894ab8de72fee29df952d5a92a22b6211ec15f8
[ "MIT" ]
null
null
null
from .ball_query import BallQuery from .frustum import FrustumPointNetLoss from .loss import KLLoss from .pointnet import PointNetAModule, PointNetSAModule, PointNetFPModule from .pvconv import PVConv from .se import SE3d from .shared_mlp import SharedMLP from .voxelization import Voxelization
32.777778
73
0.850847
from .ball_query import BallQuery from .frustum import FrustumPointNetLoss from .loss import KLLoss from .pointnet import PointNetAModule, PointNetSAModule, PointNetFPModule from .pvconv import PVConv from .se import SE3d from .shared_mlp import SharedMLP from .voxelization import Voxelization
0
0
0
06bc232e1db808dd9a2f96f163e890cdf0d7e5a9
878
py
Python
scripts/explore_icentia11k_dataset.py
KISMED-TUDa/ECG_Classification
7df7b6d28287f592536cdbf01b6aec73e7b045ef
[ "MIT" ]
3
2021-12-07T17:08:00.000Z
2021-12-08T23:16:57.000Z
scripts/explore_icentia11k_dataset.py
KISMED-TUDa/ECG_Classification
7df7b6d28287f592536cdbf01b6aec73e7b045ef
[ "MIT" ]
1
2021-12-09T00:33:41.000Z
2021-12-09T15:59:48.000Z
scripts/explore_icentia11k_dataset.py
KISMED-TUDa/ECG_Classification
7df7b6d28287f592536cdbf01b6aec73e7b045ef
[ "MIT" ]
1
2021-07-30T14:53:48.000Z
2021-07-30T14:53:48.000Z
import gzip import pickle import os if __name__ == '__main__': # Load sample with gzip.open("E:\\ECG_Data\\icentia11k\\00000_batched.pkl.gz", "rb") as file: data = pickle.load(file) print(data.shape) # Load label with gzip.open("E:\\ECG_Data\\icentia11k\\00000_batched_lbls.pkl.gz", "rb") a...
32.518519
89
0.559226
import gzip import pickle import os if __name__ == '__main__': # Load sample with gzip.open("E:\\ECG_Data\\icentia11k\\00000_batched.pkl.gz", "rb") as file: data = pickle.load(file) print(data.shape) # Load label with gzip.open("E:\\ECG_Data\\icentia11k\\00000_batched_lbls.pkl.gz", "rb") a...
0
0
0
6485ee546c55b7a9b830d92a98876ee30a7dd654
1,317
py
Python
tests.py
Unactived/python-tio
8128dfafa376c35a87bad5da78361f00b759883b
[ "MIT" ]
5
2020-11-06T17:40:03.000Z
2021-09-01T04:45:07.000Z
tests.py
Unactived/python-tio
8128dfafa376c35a87bad5da78361f00b759883b
[ "MIT" ]
1
2021-01-26T22:05:57.000Z
2021-05-17T01:46:12.000Z
tests.py
FrenchMasterSword/python-tio
8128dfafa376c35a87bad5da78361f00b759883b
[ "MIT" ]
1
2021-09-12T11:05:03.000Z
2021-09-12T11:05:03.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import Tio import asyncio import unittest site = Tio.Tio()
31.357143
112
0.602126
#!/usr/bin/env python # -*- coding: utf-8 -*- import Tio import asyncio import unittest site = Tio.Tio() class TestOutput(unittest.TestCase): def setUp(self): self.loop = asyncio.new_event_loop() asyncio.set_event_loop(None) def test_hello(self): async def go(self): req ...
1,010
15
185
4b8649a7f896860b98576d27ede3590288cba4c5
747
py
Python
TextAugmentation/pndictionary_process.py
cdli-gh/Sumerian-NER
bbb77f0aa8ab6fac6e2969784998378c43408094
[ "MIT" ]
15
2020-07-11T18:18:24.000Z
2021-08-25T09:06:15.000Z
TextAugmentation/pndictionary_process.py
cdli-gh/Sumerian-NER
bbb77f0aa8ab6fac6e2969784998378c43408094
[ "MIT" ]
3
2020-07-17T12:26:18.000Z
2020-09-21T14:55:38.000Z
TextAugmentation/pndictionary_process.py
cdli-gh/Sumerian-Translation-Pipeline
bbb77f0aa8ab6fac6e2969784998378c43408094
[ "MIT" ]
2
2020-11-16T14:35:52.000Z
2022-01-19T23:25:11.000Z
data2=pd.read_csv("Raw/pndictionary.csv",error_bad_lines=False,header=None) data2=data2.drop([0,3,4,5],axis=1) print(data2.head()) data2=data2.drop_duplicates(subset=[1],keep='first') data2=data2.reset_index(drop=True) l=[] for i in range(len(data2)): s=data2[2][i] if s==' `value`' or s==" 'GN ara[times]'": ...
25.758621
75
0.60241
data2=pd.read_csv("Raw/pndictionary.csv",error_bad_lines=False,header=None) data2=data2.drop([0,3,4,5],axis=1) print(data2.head()) data2=data2.drop_duplicates(subset=[1],keep='first') data2=data2.reset_index(drop=True) l=[] for i in range(len(data2)): s=data2[2][i] if s==' `value`' or s==" 'GN ara[times]'": ...
0
0
0
caaa6101a427d6787c264d4bfd4a1f4e0df16af7
2,665
py
Python
bin/alf_condense.py
rherriman/Avara
eaa68133ac273796b60162673b8f240619cb35ed
[ "MIT" ]
77
2016-10-30T18:37:14.000Z
2022-02-13T05:02:55.000Z
bin/alf_condense.py
tra/Avara
5a6b5a4f2cf29e8b2ddf7dd3f422579f37a14dab
[ "MIT" ]
135
2018-09-09T06:46:04.000Z
2022-01-29T19:33:12.000Z
bin/alf_condense.py
tra/Avara
5a6b5a4f2cf29e8b2ddf7dd3f422579f37a14dab
[ "MIT" ]
19
2018-09-09T02:02:46.000Z
2022-03-16T08:21:08.000Z
#!/usr/bin/env python3 import argparse import xml.etree.ElementTree as ET from dumb_round import dumb_round VESTIGIAL_ATTRS = { 'Walker': ['fill', 'frame', 'r'], 'Sphere': ['r'], 'Hologram': ['r'], 'Solid': ['r'], 'WallSolid': ['angle', 'cx', 'cz', 'r'], 'FreeSolid': ['r'], 'Dome': [], ...
33.3125
82
0.500188
#!/usr/bin/env python3 import argparse import xml.etree.ElementTree as ET from dumb_round import dumb_round VESTIGIAL_ATTRS = { 'Walker': ['fill', 'frame', 'r'], 'Sphere': ['r'], 'Hologram': ['r'], 'Solid': ['r'], 'WallSolid': ['angle', 'cx', 'cz', 'r'], 'FreeSolid': ['r'], 'Dome': [], ...
0
0
0
7a302964c54b3c8e8cb2f84095d6e94eba31fedc
1,547
py
Python
tracking/utils.py
penut85420/PCS_Fan
0f174d8f1d1c1d58ccecc005ec3fe93ebe976dc5
[ "MIT" ]
2
2021-05-07T10:50:35.000Z
2021-10-03T09:52:08.000Z
tracking/utils.py
penut85420/PCS_Fan
0f174d8f1d1c1d58ccecc005ec3fe93ebe976dc5
[ "MIT" ]
null
null
null
tracking/utils.py
penut85420/PCS_Fan
0f174d8f1d1c1d58ccecc005ec3fe93ebe976dc5
[ "MIT" ]
null
null
null
import re import json import string import urllib.request
28.127273
79
0.606335
import re import json import string import urllib.request def get_txt(url): ctx = urllib.request.urlopen(url).read() return ctx.decode('UTF-8') def get_json(url): return json.loads(get_txt(url)) def dump(data, path): with open(path, 'w', encoding='UTF-8') as f: json.dump(data, f, ensure_ascii...
1,332
0
161
e2d8be7e8f536c4424ba5c343467407a8df550a7
707
py
Python
var/spack/repos/builtin/packages/py-nibabel/package.py
lcnzg/spack
5b9f60f9bb159113bfd8a0c8f3f4a8a0c2f55d7e
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2021-03-05T10:54:32.000Z
2021-03-05T14:14:52.000Z
var/spack/repos/builtin/packages/py-nibabel/package.py
lcnzg/spack
5b9f60f9bb159113bfd8a0c8f3f4a8a0c2f55d7e
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
32
2020-12-15T17:29:20.000Z
2022-03-21T15:08:31.000Z
var/spack/repos/builtin/packages/py-nibabel/package.py
hainest/spack
c592e17d49118f253b552ef6165745ded8ac0ea5
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2021-07-19T20:31:27.000Z
2021-07-19T21:14:14.000Z
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyNibabel(PythonPackage): """Access a multitude of neuroimaging data formats""" homep...
33.666667
95
0.701556
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyNibabel(PythonPackage): """Access a multitude of neuroimaging data formats""" homep...
0
0
0
2293b89434ad022fe2df44b50f3d9d6b72b21017
6,098
py
Python
deepracer_follow_the_leader_ws/ftl_launcher/launch/ftl_launcher.py
jsspric/aws-deepracer-follow-the-leader-sample-project
d89f7b9c2810525b276543d7158d85ca6d473727
[ "Apache-2.0" ]
null
null
null
deepracer_follow_the_leader_ws/ftl_launcher/launch/ftl_launcher.py
jsspric/aws-deepracer-follow-the-leader-sample-project
d89f7b9c2810525b276543d7158d85ca6d473727
[ "Apache-2.0" ]
null
null
null
deepracer_follow_the_leader_ws/ftl_launcher/launch/ftl_launcher.py
jsspric/aws-deepracer-follow-the-leader-sample-project
d89f7b9c2810525b276543d7158d85ca6d473727
[ "Apache-2.0" ]
null
null
null
################################################################################# # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # # # # Licensed under the Apache License, Version 2.0 (the "License"). ...
34.845714
81
0.592161
################################################################################# # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # # # # Licensed under the Apache License, Version 2.0 (the "License"). ...
4,770
0
23
9884242c9a7ea6de0ecbe1d06f6ee0582986f10d
164
py
Python
pybrain/rl/learners/__init__.py
sveilleux1/pybrain
1e1de73142c290edb84e29ca7850835f3e7bca8b
[ "BSD-3-Clause" ]
2,208
2015-01-02T02:14:41.000Z
2022-03-31T04:45:46.000Z
pybrain/rl/learners/__init__.py
sveilleux1/pybrain
1e1de73142c290edb84e29ca7850835f3e7bca8b
[ "BSD-3-Clause" ]
91
2015-01-08T16:42:16.000Z
2021-12-11T19:16:35.000Z
pybrain/rl/learners/__init__.py
sveilleux1/pybrain
1e1de73142c290edb84e29ca7850835f3e7bca8b
[ "BSD-3-Clause" ]
786
2015-01-02T15:18:20.000Z
2022-02-23T23:42:40.000Z
from pybrain.rl.learners.directsearch.__init__ import * from pybrain.rl.learners.valuebased.__init__ import * from pybrain.rl.learners.modelbased.__init__ import *
41
55
0.835366
from pybrain.rl.learners.directsearch.__init__ import * from pybrain.rl.learners.valuebased.__init__ import * from pybrain.rl.learners.modelbased.__init__ import *
0
0
0
cf3517115099846efc4a26658d6fc59ba26fd31a
992
py
Python
app/controllers/last_location_controller.py
tyrylu/feel-the-streets
2ab5226e8ad3e343455bf209961cb9a5e2c83ba9
[ "MIT" ]
5
2018-03-19T19:04:53.000Z
2021-02-19T16:44:04.000Z
app/controllers/last_location_controller.py
tyrylu/feel-the-streets
2ab5226e8ad3e343455bf209961cb9a5e2c83ba9
[ "MIT" ]
6
2020-04-18T16:14:22.000Z
2021-08-14T09:23:16.000Z
app/controllers/last_location_controller.py
tyrylu/feel-the-streets
2ab5226e8ad3e343455bf209961cb9a5e2c83ba9
[ "MIT" ]
1
2021-01-10T18:47:38.000Z
2021-01-10T18:47:38.000Z
from ..entities import entity_post_move, entity_rotated from ..services import map
36.740741
108
0.663306
from ..entities import entity_post_move, entity_rotated from ..services import map class LastLocationController: def __init__(self, pov): self._point_of_view = pov self._restore_position() # We connect the post move signal here to not store the potentially restored position unneces...
752
8
148
560802e4d84db4f55cdef12d3de3abb8181af3c2
1,538
py
Python
write_token_counts.py
errantlinguist/storygenerator-preprocessing
93967912a78589856169a806e8a71cb416dfea62
[ "Apache-2.0" ]
null
null
null
write_token_counts.py
errantlinguist/storygenerator-preprocessing
93967912a78589856169a806e8a71cb416dfea62
[ "Apache-2.0" ]
null
null
null
write_token_counts.py
errantlinguist/storygenerator-preprocessing
93967912a78589856169a806e8a71cb416dfea62
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 """ Writes a lexicon to disk with the relevant counts of each word. Use with e.g. "find . -type f -iname "*.txt" -exec ./write_token_counts.py {} +" """ __author__ = "Todd Shore <errantlinguist+github@gmail.com>" __copyright__ = "Copyright (C) 2018 Todd Shore" __license__ = "Apache License, Ve...
26.982456
103
0.702861
#!/usr/bin/env python3 """ Writes a lexicon to disk with the relevant counts of each word. Use with e.g. "find . -type f -iname "*.txt" -exec ./write_token_counts.py {} +" """ __author__ = "Todd Shore <errantlinguist+github@gmail.com>" __copyright__ = "Copyright (C) 2018 Todd Shore" __license__ = "Apache License, Ve...
977
0
69
6f175a9aed19b63940cfe9deb8f1d7e2d536fa02
1,955
py
Python
tools/sdk.py
xunice/libs-for-android
3cd5a7cced337b843f2dbb6f74477f1ce58aacde
[ "Apache-2.0" ]
null
null
null
tools/sdk.py
xunice/libs-for-android
3cd5a7cced337b843f2dbb6f74477f1ce58aacde
[ "Apache-2.0" ]
null
null
null
tools/sdk.py
xunice/libs-for-android
3cd5a7cced337b843f2dbb6f74477f1ce58aacde
[ "Apache-2.0" ]
1
2016-01-04T20:29:39.000Z
2016-01-04T20:29:39.000Z
#!/usr/bin/env python # # Builds archives for SDK releases. # # Usage: # python tools/sdk.py <version> # import os import shutil import sys import tempfile if __name__ == "__main__": main()
28.333333
98
0.680307
#!/usr/bin/env python # # Builds archives for SDK releases. # # Usage: # python tools/sdk.py <version> # import os import shutil import sys import tempfile def execute(command): status = os.system(command) if status != 0: raise Exception('unexpected result: %d' % status) def sdk(version, output): # Find th...
1,689
0
69
4db9fd879ee2d1640193a796bf988646cbd55926
1,811
py
Python
setup.py
LukasVik/symbolator
9bb2dbfb1ea72e856e80327280aa54cea85faafa
[ "MIT" ]
5
2020-11-20T16:45:27.000Z
2020-11-27T17:06:35.000Z
setup.py
LukasVik/symbolator
9bb2dbfb1ea72e856e80327280aa54cea85faafa
[ "MIT" ]
5
2020-08-15T02:11:19.000Z
2021-05-19T15:30:30.000Z
setup.py
nobodywasishere/symbolator
9ff85e017e16d001107af4dff9fbac364d51cd49
[ "MIT" ]
4
2022-01-13T11:44:51.000Z
2022-03-13T00:47:30.000Z
import sys try: from setuptools import setup except ImportError: sys.exit('ERROR: setuptools is required.\nTry using "pip install setuptools".') # Use README.rst for the long description with open('README.rst') as fh: long_description = fh.read() def get_package_version(verfile): '''Scan the script for the...
29.688525
89
0.651574
import sys try: from setuptools import setup except ImportError: sys.exit('ERROR: setuptools is required.\nTry using "pip install setuptools".') # Use README.rst for the long description with open('README.rst') as fh: long_description = fh.read() def get_package_version(verfile): '''Scan the script for the...
0
0
0
bd94ba1f5e3fd5b63ad65aba4fad53d8c6e4c886
15,916
py
Python
sandbox/TSChristofides.py
AFRL-RY/Explore-Coarse-3D-Reconstruction-Path-Planning-Summer-2017
6c76e09f4fc2026d6b3efb421b7a56b480f5696b
[ "MIT" ]
null
null
null
sandbox/TSChristofides.py
AFRL-RY/Explore-Coarse-3D-Reconstruction-Path-Planning-Summer-2017
6c76e09f4fc2026d6b3efb421b7a56b480f5696b
[ "MIT" ]
null
null
null
sandbox/TSChristofides.py
AFRL-RY/Explore-Coarse-3D-Reconstruction-Path-Planning-Summer-2017
6c76e09f4fc2026d6b3efb421b7a56b480f5696b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu Jan 7 13:01:33 2016 this is a low-cost way to compute a decent solution to the traveling salesman problem using the christofides algorythm. It guarentees approximately 1.5 the global minimum @author: Landen Blackburn """ import scipy.io as scipy import numpy as np from mun...
51.176849
173
0.666939
# -*- coding: utf-8 -*- """ Created on Thu Jan 7 13:01:33 2016 this is a low-cost way to compute a decent solution to the traveling salesman problem using the christofides algorythm. It guarentees approximately 1.5 the global minimum @author: Landen Blackburn """ import scipy.io as scipy import numpy as np from mun...
13,249
582
238
4acfa6e08c91d6cf965af047f2b0bfd2e83e88a1
503
py
Python
coding_intereview/1656. Design an Ordered Stream.py
Jahidul007/Python-Bootcamp
3c870587465ff66c2c1871c8d3c4eea72463abda
[ "MIT" ]
2
2020-12-07T16:07:07.000Z
2020-12-07T16:08:53.000Z
coding_intereview/1656. Design an Ordered Stream.py
Jahidul007/Python-Bootcamp
3c870587465ff66c2c1871c8d3c4eea72463abda
[ "MIT" ]
null
null
null
coding_intereview/1656. Design an Ordered Stream.py
Jahidul007/Python-Bootcamp
3c870587465ff66c2c1871c8d3c4eea72463abda
[ "MIT" ]
1
2020-10-03T16:38:02.000Z
2020-10-03T16:38:02.000Z
# Your OrderedStream object will be instantiated and called as such: # obj = OrderedStream(n) # param_1 = obj.insert(id,value)
26.473684
80
0.584493
class OrderedStream: def __init__(self, n: int): self.data = [None]*n self.ptr = 0 def insert(self, id: int, value: str) -> List[str]: id -= 1 self.data[id] = value if id > self.ptr: return [] while self.ptr < len(self.data) and self.data[self.ptr]: ...
299
-1
76
11bf7be8f2b3c566553756419a798a3b4b544760
5,272
py
Python
scripts/fragment_free_space_tree.py
osandov/osandov-linux
495a99eb77fd0fcb2f0a6a56d58e074fb31c5f9f
[ "MIT" ]
35
2017-04-07T21:03:48.000Z
2022-03-28T13:45:22.000Z
scripts/fragment_free_space_tree.py
osandov/osandov-linux
495a99eb77fd0fcb2f0a6a56d58e074fb31c5f9f
[ "MIT" ]
3
2020-05-01T17:49:48.000Z
2021-01-05T00:55:54.000Z
scripts/fragment_free_space_tree.py
osandov/osandov-linux
495a99eb77fd0fcb2f0a6a56d58e074fb31c5f9f
[ "MIT" ]
27
2016-12-20T14:03:57.000Z
2022-03-21T15:58:22.000Z
#!/usr/bin/env python3 # SPDX-FileCopyrightText: Omar Sandoval <osandov@osandov.com> # SPDX-License-Identifier: MIT import argparse import os import os.path import shutil import subprocess import sys CHUNK_SIZE = 1024 * 1024 * 1024 # 1 GB if __name__ == '__main__': main()
35.38255
93
0.599962
#!/usr/bin/env python3 # SPDX-FileCopyrightText: Omar Sandoval <osandov@osandov.com> # SPDX-License-Identifier: MIT import argparse import os import os.path import shutil import subprocess import sys CHUNK_SIZE = 1024 * 1024 * 1024 # 1 GB def cycle_mount_btrfsck(dev, mnt): subprocess.check_call(['umount', '--...
4,869
0
115
69a14b2432872fa7ad5bc4643df5390cfb5e7c72
135,852
py
Python
challenge_submissions/submit_766922/supplements/util.py
opendilab/GoBigger-Challenge-2021
794897e94caf15b69635dcb36eb64e1341131db9
[ "Apache-2.0" ]
121
2021-11-01T01:24:31.000Z
2022-03-31T10:53:47.000Z
challenge_submissions/submit_766922/supplements/util.py
opendilab/GoBigger-Challenge-2021
794897e94caf15b69635dcb36eb64e1341131db9
[ "Apache-2.0" ]
2
2021-11-06T14:13:00.000Z
2022-01-25T09:19:41.000Z
challenge_submissions/submit_766922/supplements/util.py
opendilab/GoBigger-Challenge-2021
794897e94caf15b69635dcb36eb64e1341131db9
[ "Apache-2.0" ]
39
2021-11-01T12:48:19.000Z
2022-03-01T11:23:38.000Z
import copy import math import os import random import time from functools import wraps import numpy as np import torch from gobigger.agents import BotAgent from pygame import Vector2 def match_clones(last_clones, cur_clones, avg_move_x, avg_move_y): ...
37.321978
142
0.52552
import copy import math import os import random import time from functools import wraps import numpy as np import torch from gobigger.agents import BotAgent from pygame import Vector2 def fn_timer(function): @wraps(function) def function_timer(*args, **kwargs): t0 = time.time() ...
108,793
9,632
1,664
c58e7ba548e389aba765514fc1b58d6e3007008a
287
py
Python
main.py
Otterpohl/sql-schema-graph
307f7b2740c9f357d5bcd03c912e8480066e6ab6
[ "MIT" ]
null
null
null
main.py
Otterpohl/sql-schema-graph
307f7b2740c9f357d5bcd03c912e8480066e6ab6
[ "MIT" ]
null
null
null
main.py
Otterpohl/sql-schema-graph
307f7b2740c9f357d5bcd03c912e8480066e6ab6
[ "MIT" ]
null
null
null
from loguru import logger from pathlib import Path import sql_functions if __name__ == "__main__": LogPath = str(Path(__file__).resolve().parent) + "\\log\\file_{time}.log" logger.add(LogPath, level='DEBUG') sql_functions.main() logger.info("Completed Successfully")
22.076923
77
0.710801
from loguru import logger from pathlib import Path import sql_functions if __name__ == "__main__": LogPath = str(Path(__file__).resolve().parent) + "\\log\\file_{time}.log" logger.add(LogPath, level='DEBUG') sql_functions.main() logger.info("Completed Successfully")
0
0
0
60caf4412b18d00cc57d0dad64a2c4ae116f9699
10,390
py
Python
hhi_stmrftracking/mincut_model.py
bombardellif/hhi-stmrftracking
10cc4dddab3841b7296468e378aa42da52e1ffd0
[ "MIT" ]
5
2018-10-18T13:35:04.000Z
2021-12-23T05:06:23.000Z
hhi_stmrftracking/mincut_model.py
bombardellif/hhi-stmrftracking
10cc4dddab3841b7296468e378aa42da52e1ffd0
[ "MIT" ]
null
null
null
hhi_stmrftracking/mincut_model.py
bombardellif/hhi-stmrftracking
10cc4dddab3841b7296468e378aa42da52e1ffd0
[ "MIT" ]
5
2018-12-13T14:34:27.000Z
2022-02-21T15:34:35.000Z
""" Copyright: 2016 Fraunhofer Institute for Telecommunications, Heinrich-Hertz-Institut (HHI) The copyright of this software source code is the property of HHI. This software may be used and/or copied only with the written permission of HHI and in accordance with the terms and conditions stipulated in the ...
49.009434
96
0.643118
""" Copyright: 2016 Fraunhofer Institute for Telecommunications, Heinrich-Hertz-Institut (HHI) The copyright of this software source code is the property of HHI. This software may be used and/or copied only with the written permission of HHI and in accordance with the terms and conditions stipulated in the ...
7,560
1
142
7c42bc7885ffb85c1f085e2972fbc14757067540
2,072
py
Python
app/libs/swagger_filed.py
linrong/flask-server
5f0896c6ccedb6b172b9af7e1018600e38a2df43
[ "MIT" ]
null
null
null
app/libs/swagger_filed.py
linrong/flask-server
5f0896c6ccedb6b172b9af7e1018600e38a2df43
[ "MIT" ]
1
2019-09-06T10:06:47.000Z
2019-09-10T07:18:47.000Z
app/libs/swagger_filed.py
linrong/flask-server
5f0896c6ccedb6b172b9af7e1018600e38a2df43
[ "MIT" ]
null
null
null
# _*_ coding: utf-8 _*_ """ Created by lr on 2019/08/29. """ __author__ = 'lr'
28
79
0.712355
# _*_ coding: utf-8 _*_ """ Created by lr on 2019/08/29. """ __author__ = 'lr' class ParamFiled: def __init__(self, name, description, enum, required, default): self.name = name self.description = description self.enum = enum self.required = required self.default = default @property def data(s...
1,485
154
345
d4cde83fd143699511433f1dfb0129c83bcf29ab
8,066
py
Python
Pi/Deploy/Database/PostgreSql/DeployPostgreSqlModule.py
abs/Pi.Deploy
202b0677fefebe43bde7c2b7ea1f30f8c5a34470
[ "BSD-3-Clause" ]
2
2015-07-16T05:20:29.000Z
2015-07-18T05:50:49.000Z
Pi/Deploy/Database/PostgreSql/DeployPostgreSqlModule.py
abs/Pi.Deploy
202b0677fefebe43bde7c2b7ea1f30f8c5a34470
[ "BSD-3-Clause" ]
null
null
null
Pi/Deploy/Database/PostgreSql/DeployPostgreSqlModule.py
abs/Pi.Deploy
202b0677fefebe43bde7c2b7ea1f30f8c5a34470
[ "BSD-3-Clause" ]
null
null
null
# # (c) Peralta Informatics 2007 # $Id: DeployPostgreSqlModule.py 302 2008-01-21 09:36:01Z andrei $ # import clr import sys import os import shutil clr.AddReference("System.Data") clr.AddReference("System.Xml") import System.Data import System.Data.SqlClient import System.Diagnostics import System.Text import System...
30.209738
217
0.60786
# # (c) Peralta Informatics 2007 # $Id: DeployPostgreSqlModule.py 302 2008-01-21 09:36:01Z andrei $ # import clr import sys import os import shutil clr.AddReference("System.Data") clr.AddReference("System.Xml") import System.Data import System.Data.SqlClient import System.Diagnostics import System.Text import System...
7,067
335
46
46a031c1255bf237078387f5b765085108a60514
2,877
py
Python
submit_cgap/auth.py
dbmi-bgm/SubmitCGAP
e35466c8d203b4f07ac98f2cc0574bf290ac5c5a
[ "MIT" ]
null
null
null
submit_cgap/auth.py
dbmi-bgm/SubmitCGAP
e35466c8d203b4f07ac98f2cc0574bf290ac5c5a
[ "MIT" ]
2
2020-09-08T09:06:22.000Z
2021-06-10T17:26:09.000Z
submit_cgap/auth.py
dbmi-bgm/SubmitCGAP
e35466c8d203b4f07ac98f2cc0574bf290ac5c5a
[ "MIT" ]
null
null
null
import io import json import os from . import base as base_module from .base import KeyManager from .exceptions import CGAPEnvKeyMissing, CGAPServerKeyMissing def get_keydict_for_env(env=None): """ Gets the appropriate auth info for talking to a given beanstalk environment. Args: env: the nam...
29.357143
105
0.659715
import io import json import os from . import base as base_module from .base import KeyManager from .exceptions import CGAPEnvKeyMissing, CGAPServerKeyMissing def keypair_to_keydict(auth_tuple, server): auth_dict = { 'key': auth_tuple[0], 'secret': auth_tuple[1], 'server': server, } ...
525
0
92
6964933944426ba6922feb333d45e7a29406c5aa
573
py
Python
ecsswebauth/management/commands/clearusers.py
Lewes/ecssweb
62c332757c24d7edac52a04121d8b77eced783a1
[ "MIT" ]
4
2021-03-17T21:09:18.000Z
2022-03-03T17:10:51.000Z
ecsswebauth/management/commands/clearusers.py
Lewes/ecssweb
62c332757c24d7edac52a04121d8b77eced783a1
[ "MIT" ]
15
2018-08-21T19:01:06.000Z
2022-03-11T23:29:26.000Z
ecsswebauth/management/commands/clearusers.py
Lewes/ecssweb
62c332757c24d7edac52a04121d8b77eced783a1
[ "MIT" ]
2
2018-08-21T18:46:36.000Z
2021-11-13T16:23:53.000Z
from django.core.management.base import BaseCommand from django.contrib.auth.models import User from django.utils import timezone from datetime import timedelta
31.833333
119
0.736475
from django.core.management.base import BaseCommand from django.contrib.auth.models import User from django.utils import timezone from datetime import timedelta class Command(BaseCommand): help = 'Clear non-persistent users did not login within the last 24 hours' def handle(self, *args, **options): ...
273
113
23
699b1074abf51a8673e613b4c8ea6d52b5ac4194
4,450
py
Python
kaishi/image/ops.py
kungfuai/kaishi
e20360170ccac2111cab61fcd71b81be3c2a7468
[ "MIT" ]
10
2020-04-01T16:46:25.000Z
2021-02-09T15:56:42.000Z
kaishi/image/ops.py
kungfuai/kaishi
e20360170ccac2111cab61fcd71b81be3c2a7468
[ "MIT" ]
14
2020-03-23T13:32:35.000Z
2021-12-07T19:30:23.000Z
kaishi/image/ops.py
kungfuai/kaishi
e20360170ccac2111cab61fcd71b81be3c2a7468
[ "MIT" ]
2
2020-08-14T07:23:06.000Z
2021-12-06T18:20:42.000Z
"""Definitions for common operations on images.""" from io import BytesIO import numpy as np from PIL import Image def extract_patch(im, patch_size): """Extract a center cropped patch of size 'patch_size' (2-element tuple). :param im: input image :type im: PIL image object :param patch_size: size of ...
34.765625
127
0.688539
"""Definitions for common operations on images.""" from io import BytesIO import numpy as np from PIL import Image def extract_patch(im, patch_size): """Extract a center cropped patch of size 'patch_size' (2-element tuple). :param im: input image :type im: PIL image object :param patch_size: size of ...
0
0
0
f8474aea5174b614f89bf9e31a99d7770e8af9ab
495
py
Python
notebooks/utils/test_density.py
faemmi/climetlab-plugin-a6
c48d14fa230ba5ee7a5eccce07b20a1acfb0b334
[ "Apache-2.0" ]
1
2021-09-03T07:01:01.000Z
2021-09-03T07:01:01.000Z
notebooks/utils/test_density.py
faemmi/climetlab-plugin-a6
c48d14fa230ba5ee7a5eccce07b20a1acfb0b334
[ "Apache-2.0" ]
1
2021-08-30T14:42:50.000Z
2021-08-31T08:04:31.000Z
notebooks/utils/test_density.py
faemmi/climetlab-plugin-a6
c48d14fa230ba5ee7a5eccce07b20a1acfb0b334
[ "Apache-2.0" ]
1
2021-09-06T08:51:49.000Z
2021-09-06T08:51:49.000Z
import xarray as xr from . import density
24.75
47
0.680808
import xarray as xr from . import density def test_calculate_density(): temperature = xr.DataArray([1, 2, 3]) pressure = xr.DataArray([1, 2, 3]) relative_humidity = xr.DataArray([1, 2, 3]) specific_humidity = xr.DataArray([1, 2, 3]) result = density._calculate_density( temperature=temper...
428
0
23
9f16ab8445018c0beab4577a452d8877ee9756f2
381
py
Python
src/python/python-demo-app/flask_web/app.py
gregfullard/DevOpsDemo
bd183db601c1c48f7a2d4141869042c3da4ba4c9
[ "Apache-2.0" ]
null
null
null
src/python/python-demo-app/flask_web/app.py
gregfullard/DevOpsDemo
bd183db601c1c48f7a2d4141869042c3da4ba4c9
[ "Apache-2.0" ]
null
null
null
src/python/python-demo-app/flask_web/app.py
gregfullard/DevOpsDemo
bd183db601c1c48f7a2d4141869042c3da4ba4c9
[ "Apache-2.0" ]
null
null
null
# flask_web/app.py import os from flask import Flask app = Flask(__name__) @app.route("/") #@app.route('/') #def hello_world: # return 'Hey, we have Flask in a Docker container!' #if __name == '__main__': # app.run(debug=True, host='0.0.0.0')
19.05
55
0.643045
# flask_web/app.py import os from flask import Flask app = Flask(__name__) @app.route("/") def hello_world(): local_ip = os.environ["LOCAL_IP"] msg = "Hello, World! My Local IP is: " + local_ip return msg #@app.route('/') #def hello_world: # return 'Hey, we have Flask in a Docker container!' #if __...
105
0
22
c1697f37ea4679349065b32204cb3b3254036cac
2,111
py
Python
kibosh/test/test_deprovision.py
18F/cg-deploy-kibosh
a1b506aab52f82461aaba9fa88c84176c7b53fc0
[ "CC0-1.0" ]
52
2018-04-17T20:55:05.000Z
2021-03-06T06:52:19.000Z
kibosh/test/test_deprovision.py
18F/cg-deploy-kibosh
a1b506aab52f82461aaba9fa88c84176c7b53fc0
[ "CC0-1.0" ]
36
2018-05-03T21:31:07.000Z
2020-07-14T20:13:04.000Z
kibosh/test/test_deprovision.py
cloud-gov/cg-deploy-kibosh
a1b506aab52f82461aaba9fa88c84176c7b53fc0
[ "CC0-1.0" ]
16
2018-05-15T17:02:06.000Z
2020-09-04T16:51:01.000Z
import datetime import time import requests from test_broker_base import TestBrokerBase
41.392157
115
0.654192
import datetime import time import requests from test_broker_base import TestBrokerBase class TestDeprovision(TestBrokerBase): def test_deprovision(self): path = "/v2/service_instances/{}?service_id={}&plan_id={}".format( self.instance_id, self.service_id, self.plan_id ) del...
1,954
17
49
bb1946076f473bae05fd996beec7b4c7ada7ea20
1,150
py
Python
app/registries/permissions.py
cvarjao/gwells
cb47ec1d0c31b6f1586843e491f7cb5f1b98d61a
[ "Apache-2.0" ]
1
2020-01-29T22:42:40.000Z
2020-01-29T22:42:40.000Z
app/registries/permissions.py
matthewhall78/gwells
cb47ec1d0c31b6f1586843e491f7cb5f1b98d61a
[ "Apache-2.0" ]
1
2018-05-02T05:28:33.000Z
2018-05-09T15:58:07.000Z
app/registries/permissions.py
matthewhall78/gwells
cb47ec1d0c31b6f1586843e491f7cb5f1b98d61a
[ "Apache-2.0" ]
1
2018-05-02T23:56:48.000Z
2018-05-02T23:56:48.000Z
""" Registries view permission classes """ from rest_framework.permissions import BasePermission, IsAdminUser, SAFE_METHODS class IsAdminOrReadOnly(IsAdminUser): """ Allows read-only access to all users (including anonymous users) and write access to admin users only """ class IsGwellsAdmin(BasePermiss...
30.263158
105
0.681739
""" Registries view permission classes """ from rest_framework.permissions import BasePermission, IsAdminUser, SAFE_METHODS class IsAdminOrReadOnly(IsAdminUser): """ Allows read-only access to all users (including anonymous users) and write access to admin users only """ def has_permission(self, req...
670
0
54
d71c7b3b9793719ec17d721210c0b5a30c5520e3
1,063
py
Python
guamapa/towns/migrations/0002_surveyanswer_surveyquestion.py
brleinad/guamapa-api
5872589891a00ca02a1fc6e45a349f7e9a45a78e
[ "MIT" ]
null
null
null
guamapa/towns/migrations/0002_surveyanswer_surveyquestion.py
brleinad/guamapa-api
5872589891a00ca02a1fc6e45a349f7e9a45a78e
[ "MIT" ]
null
null
null
guamapa/towns/migrations/0002_surveyanswer_surveyquestion.py
brleinad/guamapa-api
5872589891a00ca02a1fc6e45a349f7e9a45a78e
[ "MIT" ]
1
2021-04-30T16:48:23.000Z
2021-04-30T16:48:23.000Z
# Generated by Django 3.1.5 on 2021-02-11 02:59 from django.db import migrations, models import django.db.models.deletion import uuid
33.21875
120
0.592662
# Generated by Django 3.1.5 on 2021-02-11 02:59 from django.db import migrations, models import django.db.models.deletion import uuid class Migration(migrations.Migration): dependencies = [ ('towns', '0001_initial'), ] operations = [ migrations.CreateModel( name='SurveyQuest...
0
904
23
d4b9a8e71ce5205cd1a2e7c71f00b372ee032270
22,883
py
Python
models/criterions/John.py
MorganeAyle/SNIP-it
df2bf44d6d3f7e4ea7733242a79c916735a7b49e
[ "MIT" ]
null
null
null
models/criterions/John.py
MorganeAyle/SNIP-it
df2bf44d6d3f7e4ea7733242a79c916735a7b49e
[ "MIT" ]
null
null
null
models/criterions/John.py
MorganeAyle/SNIP-it
df2bf44d6d3f7e4ea7733242a79c916735a7b49e
[ "MIT" ]
null
null
null
import copy import types import torch import torch.autograd as autograd import torch.nn as nn import torch.nn.functional as F from models.networks.assisting_layers.GateDecoratorLayers import GatedBatchNorm from models.criterions.SNIP import SNIP from utils.constants import SNIP_BATCH_ITERATIONS from utils.data_utils i...
43.669847
122
0.51016
import copy import types import torch import torch.autograd as autograd import torch.nn as nn import torch.nn.functional as F from models.networks.assisting_layers.GateDecoratorLayers import GatedBatchNorm from models.criterions.SNIP import SNIP from utils.constants import SNIP_BATCH_ITERATIONS from utils.data_utils i...
17,519
0
297
55c8553fd33c76be6a286e96ceebbe52d030587f
1,156
py
Python
examples/tiltcompensation.py
jckw/Adafruit_LSM9DS0
98ff135fbf1702160a9277df1fd637022f91e234
[ "MIT" ]
6
2017-11-14T07:21:58.000Z
2018-08-24T03:47:58.000Z
examples/tiltcompensation.py
jckw/Adafruit_LSM9DS0
98ff135fbf1702160a9277df1fd637022f91e234
[ "MIT" ]
null
null
null
examples/tiltcompensation.py
jckw/Adafruit_LSM9DS0
98ff135fbf1702160a9277df1fd637022f91e234
[ "MIT" ]
2
2017-09-26T16:57:16.000Z
2018-12-06T12:33:11.000Z
from __future__ import print_function import Adafruit_LSM9DS0 import math from itertools import permutations import time from tabulate import tabulate # Create new LSM9DS0 instance imu = Adafruit_LSM9DS0.LSM9DS0() table = [] while True: (mag_x, mag_y, mag_z) = imu.readMag() (acc_x, acc_y, acc_z) = imu.readAccel()...
23.591837
122
0.725779
from __future__ import print_function import Adafruit_LSM9DS0 import math from itertools import permutations import time from tabulate import tabulate # Create new LSM9DS0 instance imu = Adafruit_LSM9DS0.LSM9DS0() table = [] while True: (mag_x, mag_y, mag_z) = imu.readMag() (acc_x, acc_y, acc_z) = imu.readAccel()...
0
0
0
f7ae975bc4d1bec40d52c9209dd174a9422b13a2
1,726
py
Python
scripts/sprot_speclist_to_taxonomy.py
hyphaltip/uniprot_tools
df0a2194fa2935c59bd01f2e02ee267ba836860f
[ "MIT" ]
1
2021-07-09T22:59:36.000Z
2021-07-09T22:59:36.000Z
scripts/sprot_speclist_to_taxonomy.py
hyphaltip/uniprot_tools
df0a2194fa2935c59bd01f2e02ee267ba836860f
[ "MIT" ]
null
null
null
scripts/sprot_speclist_to_taxonomy.py
hyphaltip/uniprot_tools
df0a2194fa2935c59bd01f2e02ee267ba836860f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import argparse import urllib.request import sys import re import csv csv.register_dialect('tsv', delimiter='\t', quoting=csv.QUOTE_NONE) lookup_taxonomy = { 'A': 'Archaea', 'B': 'Bacteria', 'E': 'Eukaryota', 'V': 'Virus', ...
39.227273
122
0.607764
#!/usr/bin/env python3 import argparse import urllib.request import sys import re import csv csv.register_dialect('tsv', delimiter='\t', quoting=csv.QUOTE_NONE) lookup_taxonomy = { 'A': 'Archaea', 'B': 'Bacteria', 'E': 'Eukaryota', 'V': 'Virus', ...
0
0
0
04579d2d8ec2c1738e44ef70bc8558f4c420a574
8,992
py
Python
chainer_wing/subwindows/prediction.py
fukatani/ChainerWing
37a1435635cbc610dc86d15c8baca67622355757
[ "MIT", "BSD-3-Clause" ]
26
2017-07-03T13:50:28.000Z
2021-02-06T08:43:42.000Z
chainer_wing/subwindows/prediction.py
fukatani/CW_gui
37a1435635cbc610dc86d15c8baca67622355757
[ "MIT", "BSD-3-Clause" ]
10
2017-07-03T14:30:00.000Z
2017-12-21T13:26:43.000Z
chainer_wing/subwindows/prediction.py
fukatani/CW_gui
37a1435635cbc610dc86d15c8baca67622355757
[ "MIT", "BSD-3-Clause" ]
6
2017-03-15T13:48:09.000Z
2019-04-15T19:28:02.000Z
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file './prediction.ui' # # Created by: PyQt5 UI code generator 5.7.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets
59.157895
106
0.741882
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file './prediction.ui' # # Created by: PyQt5 UI code generator 5.7.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_PredictionWindow(object): def setupUi(self, PredictionWindow): ...
8,659
13
76
a2fd8c3fc12bea32afd7c3d2d0e6fdef55a1e5fb
323
py
Python
2015/08/puzzle2.py
jsvennevid/adventofcode
c6d5e3e3a166ffad5e8a7cc829599f49607a1efe
[ "MIT" ]
null
null
null
2015/08/puzzle2.py
jsvennevid/adventofcode
c6d5e3e3a166ffad5e8a7cc829599f49607a1efe
[ "MIT" ]
null
null
null
2015/08/puzzle2.py
jsvennevid/adventofcode
c6d5e3e3a166ffad5e8a7cc829599f49607a1efe
[ "MIT" ]
null
null
null
import re chars = 0 mem = 0 for i in open('day8.txt'): line = i.strip() chars += len(line) s = re.sub(r'(?:(\")|(\\))', repl, line, flags=re.I) mem += len(s) + 2 print mem - chars
17.944444
66
0.510836
import re chars = 0 mem = 0 def repl(p): return { '"': lambda: '\\"', '\\': lambda: '\\\\', }[filter(lambda x: x is not None, [p.group(0), p.group(1)])[0]]() for i in open('day8.txt'): line = i.strip() chars += len(line) s = re.sub(r'(?:(\")|(\\))', repl, line, flags=re.I) mem += len(s) + 2 print mem - cha...
114
0
23
327df5cb7462df6aa0ca1f214b64443189f0f951
1,694
py
Python
Layers/hog.py
michalnand/machine_vision
66391b78bf1ccfc67bffdfbc6530c6b339334766
[ "MIT" ]
null
null
null
Layers/hog.py
michalnand/machine_vision
66391b78bf1ccfc67bffdfbc6530c6b339334766
[ "MIT" ]
null
null
null
Layers/hog.py
michalnand/machine_vision
66391b78bf1ccfc67bffdfbc6530c6b339334766
[ "MIT" ]
null
null
null
import numpy from PIL import Image import torch img = Image.open("../images/computer.jpg") img_np = numpy.array(img)/255.0 img_t = torch.from_numpy(img_np).float() img_t = torch.mean(img_t, dim=2).unsqueeze(0).unsqueeze(1) hog = HOGLayer() y = hog(img_t) y_np = y.detach().to("cpu").numpy()[0] print(img_t.sh...
23.859155
91
0.572019
import numpy from PIL import Image import torch class HOGLayer(torch.nn.Module): def __init__(self, nbins=10, pool=8): super(HOGLayer, self).__init__() self.nbins = nbins self.conv = torch.nn.Conv2d(1, 2, kernel_size=3, stride=1, padding=1, bias=False) kernel = [ [1, 0, -1],...
1,180
11
76
07148ddc06960ef39552a28302a5e1f1cd4cadd5
2,800
py
Python
src/play.py
marmelab/quixo-python
7d0aee865ad7a10097d27846702f32803339b64c
[ "MIT" ]
1
2019-05-27T09:39:10.000Z
2019-05-27T09:39:10.000Z
src/play.py
marmelab/quixo-python
7d0aee865ad7a10097d27846702f32803339b64c
[ "MIT" ]
4
2019-05-27T12:36:23.000Z
2019-06-03T07:36:08.000Z
src/play.py
marmelab/quixo-python
7d0aee865ad7a10097d27846702f32803339b64c
[ "MIT" ]
null
null
null
import game.board as Board import game.success as Success import game.moves as Moves import cursesio as Ui import playerio as Ui_term from curses import wrapper import curses import sys
32.183908
118
0.651786
import game.board as Board import game.success as Success import game.moves as Moves import cursesio as Ui import playerio as Ui_term from curses import wrapper import curses import sys def launch_game_simple(): player_team = 1 board = Board.create_board() while True: Ui_term.clear() mova...
2,542
0
69
469a60f02319fb45a69fc654932cbb7829344987
28,809
py
Python
apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/hr_holidays/models/hr_holidays.py
gtfarng/Odoo_migrade
9cc28fae4c379e407645248a29d22139925eafe7
[ "Apache-2.0" ]
1
2019-12-19T01:53:13.000Z
2019-12-19T01:53:13.000Z
apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/hr_holidays/models/hr_holidays.py
gtfarng/Odoo_migrade
9cc28fae4c379e407645248a29d22139925eafe7
[ "Apache-2.0" ]
null
null
null
apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/hr_holidays/models/hr_holidays.py
gtfarng/Odoo_migrade
9cc28fae4c379e407645248a29d22139925eafe7
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (c) 2005-2006 Axelor SARL. (http://www.axelor.com) import logging import math from datetime import timedelta from werkzeug import url_encode from odoo import api, fields, models from odoo.exceptions import ...
50.365385
173
0.626436
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (c) 2005-2006 Axelor SARL. (http://www.axelor.com) import logging import math from datetime import timedelta from werkzeug import url_encode from odoo import api, fields, models from odoo.exceptions import ...
12,869
15,398
46
203f7fa3f4f52f91a7ab58299cd2b5a7e1d296c2
477
py
Python
blog/tests.py
pincoin/rakmai
d9daa399aff50712a86b2dec9d94e622237b25b0
[ "MIT" ]
11
2018-04-02T16:36:19.000Z
2019-07-10T05:54:58.000Z
blog/tests.py
pincoin/rakmai
d9daa399aff50712a86b2dec9d94e622237b25b0
[ "MIT" ]
22
2019-01-01T20:40:21.000Z
2022-02-10T08:06:39.000Z
blog/tests.py
pincoin/rakmai
d9daa399aff50712a86b2dec9d94e622237b25b0
[ "MIT" ]
4
2019-03-12T14:24:37.000Z
2022-01-07T16:20:22.000Z
from django.apps import apps from django.test import TestCase from .apps import BlogConfig # apps # models # widgets # forms # viewmixins # views
16.448276
66
0.637317
from django.apps import apps from django.test import TestCase from .apps import BlogConfig class BlogTest(TestCase): def setUp(self): pass def tearDown(self): pass # apps def test_apps(self): self.assertEqual(BlogConfig.name, 'blog') self.assertEqual(BlogConfig.verbo...
193
4
102
bd5c05c822b1bf38e9e52d649d8c699c0a7c18fd
13,659
py
Python
examples/api/brunel.py
tclose/Pype9
23f96c0885fd9df12d9d11ff800f816520e4b17a
[ "MIT" ]
null
null
null
examples/api/brunel.py
tclose/Pype9
23f96c0885fd9df12d9d11ff800f816520e4b17a
[ "MIT" ]
null
null
null
examples/api/brunel.py
tclose/Pype9
23f96c0885fd9df12d9d11ff800f816520e4b17a
[ "MIT" ]
1
2021-04-08T12:46:21.000Z
2021-04-08T12:46:21.000Z
#!/usr/bin/env python from __future__ import division from __future__ import print_function from builtins import zip import os.path from itertools import groupby from operator import itemgetter import ninemlcatalog import nest import numpy as np from nineml import units as un, Property from nineml.user import Initial i...
47.926316
83
0.540742
#!/usr/bin/env python from __future__ import division from __future__ import print_function from builtins import zip import os.path from itertools import groupby from operator import itemgetter import ninemlcatalog import nest import numpy as np from nineml import units as un, Property from nineml.user import Initial i...
13,000
0
46
79a5054426afd84063ce4023c3c85bd055c8d787
2,417
py
Python
XtDac/FixedBinSearch/fitsRegions.py
giacomov/XtDac
60eb1f1d492c7ab3099731738c257955502194a6
[ "BSD-3-Clause" ]
null
null
null
XtDac/FixedBinSearch/fitsRegions.py
giacomov/XtDac
60eb1f1d492c7ab3099731738c257955502194a6
[ "BSD-3-Clause" ]
null
null
null
XtDac/FixedBinSearch/fitsRegions.py
giacomov/XtDac
60eb1f1d492c7ab3099731738c257955502194a6
[ "BSD-3-Clause" ]
null
null
null
from astropy.io import fits as pyfits import pyregion import warnings import numpy
28.435294
93
0.413322
from astropy.io import fits as pyfits import pyregion import warnings import numpy class FitsRegionFile(object): def __init__(self, filename, minimumSize=0): with pyfits.open(filename) as f: header = f['EVENTS'].header self.X = f['EVENTS']....
1,425
816
77
806a8cea703e8f9a44dade655cb7b3da30017e99
32,399
py
Python
src/common/env.py
sarvi/wisk
b8de452c526508bd94d065b6ddf7f1ff47261631
[ "BSD-3-Clause" ]
2
2020-10-01T09:15:51.000Z
2020-10-06T17:28:29.000Z
src/common/env.py
sarvi/wisk
b8de452c526508bd94d065b6ddf7f1ff47261631
[ "BSD-3-Clause" ]
null
null
null
src/common/env.py
sarvi/wisk
b8de452c526508bd94d065b6ddf7f1ff47261631
[ "BSD-3-Clause" ]
null
null
null
''' Created on Feb 20, 2017 @author: sarvi @copyright: 2017 Cisco Inc. All rights reserved. ''' # pylint: disable=locally-disabled, too-many-lines from __future__ import print_function import base64 import collections import datetime import hashlib import logging.handlers import os import platform import pprint im...
38.206368
146
0.629032
''' Created on Feb 20, 2017 @author: sarvi @copyright: 2017 Cisco Inc. All rights reserved. ''' # pylint: disable=locally-disabled, too-many-lines from __future__ import print_function import base64 import collections import datetime import hashlib import logging.handlers import os import platform import pprint im...
78
0
27
65080b34dfd4ab397afe54617064401c6cb1c30e
548
py
Python
bin/get_access_token.py
jmatsu/remocon
f086a15c66861694994f77b98850e145dc89244c
[ "MIT" ]
31
2018-03-19T03:09:53.000Z
2021-05-21T02:00:32.000Z
bin/get_access_token.py
jmatsu/remocon
f086a15c66861694994f77b98850e145dc89244c
[ "MIT" ]
4
2018-03-18T15:36:17.000Z
2018-10-09T17:21:47.000Z
bin/get_access_token.py
jmatsu/remocon
f086a15c66861694994f77b98850e145dc89244c
[ "MIT" ]
null
null
null
#!/usr/bin/env python # python 2.x import sys from oauth2client.service_account import ServiceAccountCredentials print_access_token()
30.444444
100
0.762774
#!/usr/bin/env python # python 2.x import sys from oauth2client.service_account import ServiceAccountCredentials def print_access_token(): argv = sys.argv if (len(argv) < 1): print >> sys.stderr, 'a filepath to service-account.json must be specified as the 1st argument.' quit() credentials = ServiceAcc...
389
0
23
8a909a4fb565f6e2d6f4c36f3c8f766ff4b4f8eb
8,606
py
Python
main.py
LewisErick/swic-arch
81d742f70cfef728fb3572362e18f6019aee45cb
[ "MIT" ]
null
null
null
main.py
LewisErick/swic-arch
81d742f70cfef728fb3572362e18f6019aee45cb
[ "MIT" ]
null
null
null
main.py
LewisErick/swic-arch
81d742f70cfef728fb3572362e18f6019aee45cb
[ "MIT" ]
null
null
null
from copy import copy import functools import os import sys # Interfaces # Derived classes # Text # Reader # Tokenizer # array of sentences -> array of sentences # ["a b c", "d e f"] -> [["a", "b", "c"], ["d", "e", "f"]] # Permutator # Sorter # [["clouds", "are", "White"] , ["are", "White", "Cloud...
28.782609
114
0.592377
from copy import copy import functools import os import sys # Interfaces class Filter: def execute_filter(): raise Exception('interface method') class Text: def __init__(self, content: str): self._content = content class Reader(Filter): def __init__(self): self._children = [] ...
3,987
2,207
1,066
760eb38cd9104a572d95e79fdb3a9e728a753b83
1,206
py
Python
crudapp/employees/views.py
GillesJnr/Django-Employee-Database-App
b1d26b829b0e0d031f738859bafaf3a1c2074da2
[ "MIT" ]
null
null
null
crudapp/employees/views.py
GillesJnr/Django-Employee-Database-App
b1d26b829b0e0d031f738859bafaf3a1c2074da2
[ "MIT" ]
null
null
null
crudapp/employees/views.py
GillesJnr/Django-Employee-Database-App
b1d26b829b0e0d031f738859bafaf3a1c2074da2
[ "MIT" ]
null
null
null
from django.shortcuts import render, redirect from . forms import EmployeeForm from . models import Employee # Create your views here.
30.15
96
0.644279
from django.shortcuts import render, redirect from . forms import EmployeeForm from . models import Employee # Create your views here. def employee_list(request): employee_data = Employee.objects.all() # list_xs = {employee_data} list_result = [entry for entry in employee_data] # converts ValuesQuerySet...
999
0
69
6fd50a3078580f4c2ae447e7d7aac7fe3f559c16
2,655
py
Python
lib/rapidsms/templatetags/pagination_tags.py
dimagi/rapidsms-core-dev
aed753545ae01c279489f5a00e7f12ec432e11bf
[ "BSD-3-Clause" ]
3
2015-04-17T04:47:31.000Z
2018-04-02T17:44:19.000Z
lib/rapidsms/templatetags/pagination_tags.py
phillbaker/rapidsms-python2.5
fc89ee49d0a7e1c52f9f0e699436c2241f00b116
[ "BSD-3-Clause" ]
null
null
null
lib/rapidsms/templatetags/pagination_tags.py
phillbaker/rapidsms-python2.5
fc89ee49d0a7e1c52f9f0e699436c2241f00b116
[ "BSD-3-Clause" ]
4
2015-01-30T02:53:13.000Z
2019-11-08T11:08:20.000Z
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 import math from django import template register = template.Library() # when this module is imported via {% load pagination_tags %}, it is # imported as django.templatetags.pagination_tags, which prevents a # relative import (..conf) to rapidsms from working here. i...
32.777778
72
0.66968
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 import math from django import template register = template.Library() # when this module is imported via {% load pagination_tags %}, it is # imported as django.templatetags.pagination_tags, which prevents a # relative import (..conf) to rapidsms from working here. i...
2,029
0
45
d3639f5c290fdd4c9a3c05e0911e6fcda999acef
2,921
py
Python
DatasetIndexing/infoExtraction.py
eth-library-lab/inDexDa
55421454dd3c2ff7e39ee78d0d891ffdcaaa6791
[ "MIT" ]
7
2020-01-27T12:54:20.000Z
2021-06-28T10:44:28.000Z
DatasetIndexing/infoExtraction.py
eth-library-lab/inDexDa
55421454dd3c2ff7e39ee78d0d891ffdcaaa6791
[ "MIT" ]
2
2020-02-21T08:29:23.000Z
2020-12-01T16:30:20.000Z
DatasetIndexing/infoExtraction.py
eth-library-lab/inDexDa
55421454dd3c2ff7e39ee78d0d891ffdcaaa6791
[ "MIT" ]
2
2020-02-17T09:29:35.000Z
2020-02-17T13:05:42.000Z
import os import json from termcolor import colored from utils import getInfoAboutArchivesToScrape from PaperScraper.utils.command_line import printProgressBar from DatasetIndexing.lib.arxiv_scraper import ArXivScraper from DatasetIndexing.lib.sciencedirect_scraper import ScienceDirectScraper if __name__ == '__mai...
37.448718
469
0.647039
import os import json from termcolor import colored from utils import getInfoAboutArchivesToScrape from PaperScraper.utils.command_line import printProgressBar from DatasetIndexing.lib.arxiv_scraper import ArXivScraper from DatasetIndexing.lib.sciencedirect_scraper import ScienceDirectScraper def datasetIndexing(): ...
1,438
8
99
c5f57775774191a5bd3dc07e53150fb723cb908c
35
py
Python
src/__init__.py
jphacks/ON_1802
6d9a5b901907888642fbe68993086440a6422974
[ "MIT" ]
null
null
null
src/__init__.py
jphacks/ON_1802
6d9a5b901907888642fbe68993086440a6422974
[ "MIT" ]
null
null
null
src/__init__.py
jphacks/ON_1802
6d9a5b901907888642fbe68993086440a6422974
[ "MIT" ]
1
2018-10-27T07:49:04.000Z
2018-10-27T07:49:04.000Z
import manage_data import task_api
11.666667
18
0.885714
import manage_data import task_api
0
0
0
968628b5ca31b300f93f301c0f25da5720d9f276
3,697
py
Python
feeds/torrentpier.py
int3l/xbtit_tools
cca487c9bef60067f9ed76338e7191d75b417713
[ "MIT" ]
null
null
null
feeds/torrentpier.py
int3l/xbtit_tools
cca487c9bef60067f9ed76338e7191d75b417713
[ "MIT" ]
null
null
null
feeds/torrentpier.py
int3l/xbtit_tools
cca487c9bef60067f9ed76338e7191d75b417713
[ "MIT" ]
null
null
null
import argparse from asyncio import get_event_loop from asyncio import sleep as asleep from asyncio import TimeoutError from errno import ECONNRESET from functools import lru_cache from functools import partial from urllib.parse import urljoin from aioconsole.stream import aprint from aiohttp import ClientOSError from...
25.673611
78
0.661888
import argparse from asyncio import get_event_loop from asyncio import sleep as asleep from asyncio import TimeoutError from errno import ECONNRESET from functools import lru_cache from functools import partial from urllib.parse import urljoin from aioconsole.stream import aprint from aiohttp import ClientOSError from...
2,215
0
137
a5fdb7090d10057f9c017c39bf82dc472d82d846
390
py
Python
related_fields_patch.py
nuwainfo/treeio
f57bf9114d9774c11468a1b0e44614b04631beb1
[ "MIT" ]
null
null
null
related_fields_patch.py
nuwainfo/treeio
f57bf9114d9774c11468a1b0e44614b04631beb1
[ "MIT" ]
null
null
null
related_fields_patch.py
nuwainfo/treeio
f57bf9114d9774c11468a1b0e44614b04631beb1
[ "MIT" ]
null
null
null
# Django command helper to apply django related fields patch programattically # Will cd into 1st argument and run patch import os import sys from subprocess import Popen, PIPE patch_file = os.path.join( os.path.abspath('.'), 'bin', 'django-related-fields.patch') process = Popen(['patch', '-p1'], stdin=PIPE, shell...
32.5
77
0.741026
# Django command helper to apply django related fields patch programattically # Will cd into 1st argument and run patch import os import sys from subprocess import Popen, PIPE patch_file = os.path.join( os.path.abspath('.'), 'bin', 'django-related-fields.patch') process = Popen(['patch', '-p1'], stdin=PIPE, shell...
0
0
0
31561705b2a4367ab02712310d58975520781c14
324
py
Python
FastSimulation/Tracking/python/electronCkfTrackCandidates_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
FastSimulation/Tracking/python/electronCkfTrackCandidates_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
FastSimulation/Tracking/python/electronCkfTrackCandidates_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms import FastSimulation.Tracking.TrackCandidateProducer_cfi electronCkfTrackCandidates = FastSimulation.Tracking.TrackCandidateProducer_cfi.trackCandidateProducer.clone( src = cms.InputTag("electronMergedSeeds"), MinNumberOfCrossedLayers = 5, OverlapCleaning = True ...
36
109
0.824074
import FWCore.ParameterSet.Config as cms import FastSimulation.Tracking.TrackCandidateProducer_cfi electronCkfTrackCandidates = FastSimulation.Tracking.TrackCandidateProducer_cfi.trackCandidateProducer.clone( src = cms.InputTag("electronMergedSeeds"), MinNumberOfCrossedLayers = 5, OverlapCleaning = True ...
0
0
0
c22b61a2564fc489f610fbe8efb961e6f3c533c2
1,873
py
Python
resources/libExamples/terminateConn.py
andy897221/Proof-of-Play-Flow-Demo
018ec382801f1363711b7680e728535a2ac94d26
[ "MIT" ]
null
null
null
resources/libExamples/terminateConn.py
andy897221/Proof-of-Play-Flow-Demo
018ec382801f1363711b7680e728535a2ac94d26
[ "MIT" ]
null
null
null
resources/libExamples/terminateConn.py
andy897221/Proof-of-Play-Flow-Demo
018ec382801f1363711b7680e728535a2ac94d26
[ "MIT" ]
null
null
null
from py2p import mesh import asyncio, argparse, time, sys loop = asyncio.get_event_loop() parser = argparse.ArgumentParser() parser.add_argument("-b", "--bootstrap", type=int, help="whether this node in boostrap node") parser.add_argument("-p", "--myPort", type=int, help="my port") args = parser.parse_args() myPort ...
29.265625
93
0.595836
from py2p import mesh import asyncio, argparse, time, sys loop = asyncio.get_event_loop() parser = argparse.ArgumentParser() parser.add_argument("-b", "--bootstrap", type=int, help="whether this node in boostrap node") parser.add_argument("-p", "--myPort", type=int, help="my port") args = parser.parse_args() myPort ...
1,081
0
44
e577ffe126638f39e3ba59c1931a422671ebe463
3,077
py
Python
metrics.py
alexjercan/asr-toolkit
5c423fe49556cd96c888988a80c65e9c7a60556c
[ "MIT" ]
null
null
null
metrics.py
alexjercan/asr-toolkit
5c423fe49556cd96c888988a80c65e9c7a60556c
[ "MIT" ]
null
null
null
metrics.py
alexjercan/asr-toolkit
5c423fe49556cd96c888988a80c65e9c7a60556c
[ "MIT" ]
null
null
null
import numpy as np import torch.nn as nn # Reference: https://github.com/imalic3/python-word-error-rate
29.586538
86
0.546961
import numpy as np import torch.nn as nn class CTCLossFunction(nn.Module): def __init__(self, blank=0): super().__init__() self.blank = blank self.ctc_loss = nn.CTCLoss(blank) self.total_size = 0 self.loss_sum = {} self.loss_avg = {} def forwar...
2,612
26
318
34c6ce2dced856ed0688e706e9238d8ad4991a44
1,946
py
Python
deeprank/learn/model2d.py
DeepRank/DeepRank_VariantPred
42cd85c7a521463ab2b644ef8da87c107a2b5bce
[ "Apache-2.0" ]
84
2018-01-18T02:49:10.000Z
2022-03-05T00:47:49.000Z
deeprank/learn/model2d.py
DeepRank/DeepRank_VariantPred
42cd85c7a521463ab2b644ef8da87c107a2b5bce
[ "Apache-2.0" ]
228
2018-03-01T15:05:17.000Z
2022-03-25T13:00:36.000Z
deeprank/learn/model2d.py
DeepRank/DeepRank_VariantPred
42cd85c7a521463ab2b644ef8da87c107a2b5bce
[ "Apache-2.0" ]
25
2018-03-01T14:56:28.000Z
2022-01-20T07:32:35.000Z
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable ###################################################################### # # Model automatically generated by modelGenerator # ###################################################################### # ----------------...
33.551724
74
0.511305
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable ###################################################################### # # Model automatically generated by modelGenerator # ###################################################################### # ----------------...
933
0
131
109b121bff4c493b0ab47ce67d3b2be9661d8aa7
246
py
Python
squall/bindings.py
broHeryk/squall
47c844d45548ed62745ee8385d6e6bda9e8269ad
[ "MIT" ]
27
2021-12-04T15:54:59.000Z
2022-02-19T15:37:35.000Z
squall/bindings.py
broHeryk/squall
47c844d45548ed62745ee8385d6e6bda9e8269ad
[ "MIT" ]
21
2021-12-04T21:17:54.000Z
2022-01-30T23:45:43.000Z
squall/bindings.py
broHeryk/squall
47c844d45548ed62745ee8385d6e6bda9e8269ad
[ "MIT" ]
2
2021-12-29T10:53:59.000Z
2022-01-12T05:01:02.000Z
from dataclasses import dataclass from typing import Any, Optional from squall.params import Body @dataclass @dataclass
14.470588
35
0.743902
from dataclasses import dataclass from typing import Any, Optional from squall.params import Body @dataclass class RequestField: name: str model: Any settings: Optional[Body] = None @dataclass class ResponseField: model: Any
0
77
44
364360e1a05160e25452fe4c0df46a41eace3d91
637
py
Python
sfaira/__init__.py
johnmous/sfaira
c50240a74530e614ab7681bf9c63b04cb815b361
[ "BSD-3-Clause" ]
null
null
null
sfaira/__init__.py
johnmous/sfaira
c50240a74530e614ab7681bf9c63b04cb815b361
[ "BSD-3-Clause" ]
null
null
null
sfaira/__init__.py
johnmous/sfaira
c50240a74530e614ab7681bf9c63b04cb815b361
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """A Data and Model Zoo for Single-Cell Genomics.""" from ._settings import settings import sfaira.consts import sfaira.data import sfaira.models import sfaira.train import sfaira.ui import sfaira.versions from ._version import get_versions __version__ = get_versions()['version'] del get_versi...
21.965517
52
0.692308
# -*- coding: utf-8 -*- """A Data and Model Zoo for Single-Cell Genomics.""" from ._settings import settings import sfaira.consts import sfaira.data import sfaira.models import sfaira.train import sfaira.ui import sfaira.versions from ._version import get_versions __version__ = get_versions()['version'] del get_versi...
0
0
0
ebdf8d367c089ce810c252c23af0714e9737c64a
500
py
Python
server/apps/movie/serializers.py
Mayandev/django_morec
8d115f76ad69d7aa78b07dc06aa7047979ad134b
[ "MIT" ]
129
2019-04-20T08:23:25.000Z
2022-03-14T10:02:23.000Z
server/apps/movie/serializers.py
heartplus/django_morec
8d115f76ad69d7aa78b07dc06aa7047979ad134b
[ "MIT" ]
9
2019-05-19T15:06:17.000Z
2021-12-14T06:47:14.000Z
server/apps/movie/serializers.py
heartplus/django_morec
8d115f76ad69d7aa78b07dc06aa7047979ad134b
[ "MIT" ]
34
2019-05-06T06:37:17.000Z
2021-12-09T02:27:58.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019-04-19 21:49 # @Author : Mayandev # @Site : https://github.com/Mayandev/ # @File : serializers.py # @Software: PyCharm from rest_framework import serializers from .models import Movie, Genre
21.73913
51
0.66
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019-04-19 21:49 # @Author : Mayandev # @Site : https://github.com/Mayandev/ # @File : serializers.py # @Software: PyCharm from rest_framework import serializers from .models import Movie, Genre class MovieSerializer(serializers.ModelSerializer): ...
0
190
46
03f7a273070a77b4d974179aeb78183c7456a00d
336
py
Python
tests/accounts/test_github_account.py
zvtvz/play-github
30ad38ca88c1a57b2cec48b19ca31ffa28fa0154
[ "MIT" ]
2
2019-09-21T04:31:01.000Z
2020-01-21T03:45:51.000Z
tests/accounts/test_github_account.py
zvtvz/play-github
30ad38ca88c1a57b2cec48b19ca31ffa28fa0154
[ "MIT" ]
null
null
null
tests/accounts/test_github_account.py
zvtvz/play-github
30ad38ca88c1a57b2cec48b19ca31ffa28fa0154
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from github.accounts.github_account import GithubAccount
28
56
0.684524
# -*- coding: utf-8 -*- from github.accounts.github_account import GithubAccount def test_get_token(): current_token = GithubAccount.get_token(0) for i in range(1, 100): new_token = GithubAccount.get_token(i) assert new_token != None assert new_token != current_token current_to...
231
0
23
11321b4d09c4d9ab3d5fecea6e05cee3663f5ab9
1,289
py
Python
trade_remedies_public/core/templatetags/custom_filters.py
uktrade/trade-remedies-public
bf2984c49c445bc5f8c5087e37a3cf59d06a5a0f
[ "MIT" ]
1
2020-08-27T09:50:42.000Z
2020-08-27T09:50:42.000Z
trade_remedies_public/core/templatetags/custom_filters.py
uktrade/trade-remedies-public
bf2984c49c445bc5f8c5087e37a3cf59d06a5a0f
[ "MIT" ]
5
2020-08-27T22:19:06.000Z
2021-11-10T11:29:45.000Z
trade_remedies_public/core/templatetags/custom_filters.py
uktrade/trade-remedies-public
bf2984c49c445bc5f8c5087e37a3cf59d06a5a0f
[ "MIT" ]
null
null
null
from core.templatetags import register from django.utils.safestring import mark_safe import datetime @register.filter def addstr(arg1, arg2): """concatenate arg1 & arg2""" return str(arg1) + str(arg2) @register.filter def _not(arg1): """Boolean or""" return not arg1 @register.filter def _or(arg1, ...
20.140625
85
0.6346
from core.templatetags import register from django.utils.safestring import mark_safe import datetime @register.filter def addstr(arg1, arg2): """concatenate arg1 & arg2""" return str(arg1) + str(arg2) @register.filter def _not(arg1): """Boolean or""" return not arg1 @register.filter def _or(arg1, ...
336
0
45
4f5acb019d28b5b4400ff2869aea7212d53840ee
2,572
py
Python
aiida_fleur/tests/old_todo/util/btest_extract_corelevels.py
anoopkcn/aiida-fleur
5d4cc2092b7c3ce5402f1d4b89787eae53b2e60f
[ "MIT" ]
null
null
null
aiida_fleur/tests/old_todo/util/btest_extract_corelevels.py
anoopkcn/aiida-fleur
5d4cc2092b7c3ce5402f1d4b89787eae53b2e60f
[ "MIT" ]
null
null
null
aiida_fleur/tests/old_todo/util/btest_extract_corelevels.py
anoopkcn/aiida-fleur
5d4cc2092b7c3ce5402f1d4b89787eae53b2e60f
[ "MIT" ]
null
null
null
#!/usr/bin/env python from __future__ import absolute_import from __future__ import print_function import os import sys import time from aiida_fleur.calculation.fleur import FleurCalculation as FleurCalc from aiida_fleur_ad.util.extract_corelevels import extract_corelevels from aiida.orm import load_node from aiida.orm...
31.753086
101
0.71112
#!/usr/bin/env python from __future__ import absolute_import from __future__ import print_function import os import sys import time from aiida_fleur.calculation.fleur import FleurCalculation as FleurCalc from aiida_fleur_ad.util.extract_corelevels import extract_corelevels from aiida.orm import load_node from aiida.orm...
0
0
0
1862f570098bf9777d078a89b69ddd8cec2d7b28
866
py
Python
vulture-whitelist.py
lschmelzeisen/wallcrop
e6ab84154d2135f27609f9d29cec67c265b2744a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
vulture-whitelist.py
lschmelzeisen/wallcrop
e6ab84154d2135f27609f9d29cec67c265b2744a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
vulture-whitelist.py
lschmelzeisen/wallcrop
e6ab84154d2135f27609f9d29cec67c265b2744a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
_.error_on_external_run # unused attribute (/home/lschmelzeisen/Repositories/wallcrop/noxfile.py:20) _.reuse_existing_virtualenvs # unused attribute (/home/lschmelzeisen/Repositories/wallcrop/noxfile.py:21) _.stop_on_first_error # unused attribute (/home/lschmelzeisen/Repositories/wallcrop/noxfile.py:22) test # unu...
86.6
106
0.818707
_.error_on_external_run # unused attribute (/home/lschmelzeisen/Repositories/wallcrop/noxfile.py:20) _.reuse_existing_virtualenvs # unused attribute (/home/lschmelzeisen/Repositories/wallcrop/noxfile.py:21) _.stop_on_first_error # unused attribute (/home/lschmelzeisen/Repositories/wallcrop/noxfile.py:22) test # unu...
0
0
0
275b5ff1364981691bfaac1373fc1cb3eabb0e29
1,911
py
Python
src/rdiff_trimmer/rdiff_api.py
Bystroushaak/rsync_trimmer
76c7712c2a17f65b9ea78cedceb23dd7b813cac9
[ "MIT" ]
null
null
null
src/rdiff_trimmer/rdiff_api.py
Bystroushaak/rsync_trimmer
76c7712c2a17f65b9ea78cedceb23dd7b813cac9
[ "MIT" ]
3
2018-05-13T10:07:46.000Z
2020-09-26T08:02:53.000Z
src/rdiff_trimmer/rdiff_api.py
Bystroushaak/rsync_trimmer
76c7712c2a17f65b9ea78cedceb23dd7b813cac9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os from shutil import rmtree from tempfile import mkdtemp import sh
28.522388
79
0.651491
# -*- coding: utf-8 -*- import os from shutil import rmtree from tempfile import mkdtemp import sh class Increment(object): def __init__(self, timestamp): self.timestamp = timestamp @staticmethod def from_string(line): timestamp = int(line.strip().split()[0]) return Increment(tim...
1,553
76
180
f873716be2968a4a6ca7a9432ece2b12fa23016c
50
py
Python
tfsnippet/__init__.py
TsingHuasuya/tfsnippet
3f51f704e09c654eaf39e231948efed2868669fd
[ "MIT" ]
null
null
null
tfsnippet/__init__.py
TsingHuasuya/tfsnippet
3f51f704e09c654eaf39e231948efed2868669fd
[ "MIT" ]
null
null
null
tfsnippet/__init__.py
TsingHuasuya/tfsnippet
3f51f704e09c654eaf39e231948efed2868669fd
[ "MIT" ]
1
2020-02-08T15:33:41.000Z
2020-02-08T15:33:41.000Z
__version__ = '0.1.1' from .config import config
12.5
26
0.72
__version__ = '0.1.1' from .config import config
0
0
0
b248ce9c77029f8aa85d3fe83fbadb996063da4b
19,117
py
Python
vamb/encode.py
AndreLamurias/vamb
de5fe2c4c244ba5d6bc3fc44d3cf8ddb8afd9bbb
[ "MIT" ]
111
2019-06-22T15:10:06.000Z
2022-03-29T06:08:27.000Z
vamb/encode.py
AndreLamurias/vamb
de5fe2c4c244ba5d6bc3fc44d3cf8ddb8afd9bbb
[ "MIT" ]
86
2019-06-22T02:29:30.000Z
2022-03-31T06:56:18.000Z
vamb/encode.py
AndreLamurias/vamb
de5fe2c4c244ba5d6bc3fc44d3cf8ddb8afd9bbb
[ "MIT" ]
32
2019-08-28T09:53:18.000Z
2022-03-26T03:30:52.000Z
__doc__ = """Encode a depths matrix and a tnf matrix to latent representation. Creates a variational autoencoder in PyTorch and tries to represent the depths and tnf in the latent space under gaussian noise. Usage: >>> vae = VAE(nsamples=6) >>> dataloader, mask = make_dataloader(depths, tnf) >>> vae.trainmodel(datalo...
38.005964
106
0.60883
__doc__ = """Encode a depths matrix and a tnf matrix to latent representation. Creates a variational autoencoder in PyTorch and tries to represent the depths and tnf in the latent space under gaussian noise. Usage: >>> vae = VAE(nsamples=6) >>> dataloader, mask = make_dataloader(depths, tnf) >>> vae.trainmodel(datalo...
7,678
0
188
1c9f8d1747cae17c8c78cecbf90c7edeb9dac8dc
494
py
Python
ports/devel/py-evdev/dragonfly/patch-evdev_genecodes.py
liweitianux/DeltaPorts
b907de0ceb9c0e46ae8961896e97b361aa7c62c0
[ "BSD-2-Clause-FreeBSD" ]
31
2015-02-06T17:06:37.000Z
2022-03-08T19:53:28.000Z
ports/devel/py-evdev/dragonfly/patch-evdev_genecodes.py
liweitianux/DeltaPorts
b907de0ceb9c0e46ae8961896e97b361aa7c62c0
[ "BSD-2-Clause-FreeBSD" ]
236
2015-06-29T19:51:17.000Z
2021-12-16T22:46:38.000Z
ports/devel/py-evdev/dragonfly/patch-evdev_genecodes.py
liweitianux/DeltaPorts
b907de0ceb9c0e46ae8961896e97b361aa7c62c0
[ "BSD-2-Clause-FreeBSD" ]
52
2015-02-06T17:05:36.000Z
2021-10-21T12:13:06.000Z
--- evdev/genecodes.py.orig 2020-11-02 00:44:50 UTC +++ evdev/genecodes.py @@ -20,7 +20,7 @@ if sys.argv[1:]: #----------------------------------------------------------------------------- -macro_regex = r'#define +((?:KEY|ABS|REL|SW|MSC|LED|BTN|REP|SND|ID|EV|BUS|SYN|FF|UI_FF|INPUT_PROP)_\w+)' +macro_regex = r'#de...
41.166667
112
0.550607
--- evdev/genecodes.py.orig 2020-11-02 00:44:50 UTC +++ evdev/genecodes.py @@ -20,7 +20,7 @@ if sys.argv[1:]: #----------------------------------------------------------------------------- -macro_regex = r'#define +((?:KEY|ABS|REL|SW|MSC|LED|BTN|REP|SND|ID|EV|BUS|SYN|FF|UI_FF|INPUT_PROP)_\w+)' +macro_regex = r'#de...
0
0
0
07912828a9b33e98f4d3e85614bbb7ab0d4d3836
5,591
py
Python
real_time_dtln_audio.py
SaneBow/DTLN
e99eab9a9df73a755bbe42ea88684e74e9846d98
[ "MIT" ]
null
null
null
real_time_dtln_audio.py
SaneBow/DTLN
e99eab9a9df73a755bbe42ea88684e74e9846d98
[ "MIT" ]
null
null
null
real_time_dtln_audio.py
SaneBow/DTLN
e99eab9a9df73a755bbe42ea88684e74e9846d98
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This is a real time example how to implement DTLN tf light model with sounddevice. The script is based on the "wire.py" example of the sounddevice toolbox. If the command line shows "input underflow", restart the script. If there are still a lot of dropouts, increase...
35.386076
114
0.712753
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This is a real time example how to implement DTLN tf light model with sounddevice. The script is based on the "wire.py" example of the sounddevice toolbox. If the command line shows "input underflow", restart the script. If there are still a lot of dropouts, increase...
1,962
0
23
ba0a18c2d98cb16e290ceb4abec1776ac765d3c7
1,198
py
Python
ExPropostos2.py
DaviRestani/C111
9d2f550727cd66ecdc4b4834f56f3d3f6836af97
[ "MIT" ]
null
null
null
ExPropostos2.py
DaviRestani/C111
9d2f550727cd66ecdc4b4834f56f3d3f6836af97
[ "MIT" ]
null
null
null
ExPropostos2.py
DaviRestani/C111
9d2f550727cd66ecdc4b4834f56f3d3f6836af97
[ "MIT" ]
null
null
null
import numpy as np print("---------Exercicios propostos 2---------") #Definindo a seed #np.random.seed(5) #Exercicio 1 print("------------------------Exercicio 1------------------------") arr1 = np.random.randn(10) print("Array 1:",arr1) arr2 = arr1 * 100 print("Array 2:",arr2) arr3 = arr2.astype(int) print("Array 3...
26.043478
83
0.575125
import numpy as np print("---------Exercicios propostos 2---------") #Definindo a seed #np.random.seed(5) #Exercicio 1 print("------------------------Exercicio 1------------------------") arr1 = np.random.randn(10) print("Array 1:",arr1) arr2 = arr1 * 100 print("Array 2:",arr2) arr3 = arr2.astype(int) print("Array 3...
0
0
0
fc0af3ff0a0a99f4bf925fd1de2e01aabbf8da8b
848
py
Python
tests/regression.py
bigdata-memory/sgx-ra-tls
fb1c5658b5681a764071810e392073e0cd2a94ee
[ "Apache-2.0" ]
97
2018-01-08T23:54:36.000Z
2022-02-17T06:03:54.000Z
tests/regression.py
bigdata-memory/sgx-ra-tls
fb1c5658b5681a764071810e392073e0cd2a94ee
[ "Apache-2.0" ]
25
2018-08-06T23:45:08.000Z
2021-10-12T16:54:43.000Z
tests/regression.py
bigdata-memory/sgx-ra-tls
fb1c5658b5681a764071810e392073e0cd2a94ee
[ "Apache-2.0" ]
31
2018-01-10T07:45:08.000Z
2022-01-25T05:57:52.000Z
#!/usr/bin/env python3 import glob import imp import os import sys if __name__ == '__main__': main()
21.2
56
0.537736
#!/usr/bin/env python3 import glob import imp import os import sys def determine_testcases(): tcs = [] py_files = [] if len(sys.argv) > 1: py_files = sys.argv[1:] else: py_files = glob.glob('tests/[0-9]*.py') print(py_files) for f in py_files: modname = os...
695
0
46
e2bc99d999bd505438da73e937491585ec2258f4
18,858
py
Python
prep_scripts/prep_tcga_clinical.py
dfci/hotspot_logreg
fbd5585e69b39c54637ac240d23f974c5ae6e996
[ "MIT" ]
null
null
null
prep_scripts/prep_tcga_clinical.py
dfci/hotspot_logreg
fbd5585e69b39c54637ac240d23f974c5ae6e996
[ "MIT" ]
null
null
null
prep_scripts/prep_tcga_clinical.py
dfci/hotspot_logreg
fbd5585e69b39c54637ac240d23f974c5ae6e996
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 """ SYNOPSIS Prepare the TCGA BRCA Clinical data into a format that is suitable for input into the Hotspots 'Mutation_Counts' pipeline. NOTES (1) Data source: - Supplementary Table 1 of the Cell 2015 Paper: http://www.nature.com/nature/journal/v490/n7418/ful...
42.09375
134
0.653834
#!/usr/bin/env python2 """ SYNOPSIS Prepare the TCGA BRCA Clinical data into a format that is suitable for input into the Hotspots 'Mutation_Counts' pipeline. NOTES (1) Data source: - Supplementary Table 1 of the Cell 2015 Paper: http://www.nature.com/nature/journal/v490/n7418/ful...
1,014
0
23
a4cf4bd029d322e4c371f6b10506c55279d40509
6,099
py
Python
UkDatabaseCrawler/UkDatabase/spiders/uk_database_posts.py
kplachkov/UkDatabase
51db3183a86d3b07e0f97cc685f6f47ad4a8fc2e
[ "Apache-2.0" ]
null
null
null
UkDatabaseCrawler/UkDatabase/spiders/uk_database_posts.py
kplachkov/UkDatabase
51db3183a86d3b07e0f97cc685f6f47ad4a8fc2e
[ "Apache-2.0" ]
3
2018-04-02T20:32:51.000Z
2019-02-09T16:19:39.000Z
UkDatabaseCrawler/UkDatabase/spiders/uk_database_posts.py
kplachkov/UkDatabase
51db3183a86d3b07e0f97cc685f6f47ad4a8fc2e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from datetime import datetime import scrapy from bs4 import BeautifulSoup class UkDatabaseSpider(scrapy.Spider): """Collect information about people.""" name = "uk_database_posts" """str: The name of the spider.""" allowed_domains = ["theukdatabase.com"] """list: Allowed ...
37.648148
110
0.546155
# -*- coding: utf-8 -*- from datetime import datetime import scrapy from bs4 import BeautifulSoup class UkDatabaseSpider(scrapy.Spider): """Collect information about people.""" name = "uk_database_posts" """str: The name of the spider.""" allowed_domains = ["theukdatabase.com"] """list: Allowed ...
0
0
0
0eb218bad047b1ca68c4782bdd031e0b545913ff
1,593
py
Python
tests/query_test/test_local_fs.py
suifengzhuliu/impala
611f4c6f3b18cfcddff3b2956cbb87c295a87655
[ "Apache-2.0" ]
1,523
2015-01-01T03:42:24.000Z
2022-02-06T22:24:04.000Z
tests/query_test/test_local_fs.py
suifengzhuliu/impala
611f4c6f3b18cfcddff3b2956cbb87c295a87655
[ "Apache-2.0" ]
10
2015-01-09T06:46:05.000Z
2022-03-29T21:57:57.000Z
tests/query_test/test_local_fs.py
suifengzhuliu/impala
611f4c6f3b18cfcddff3b2956cbb87c295a87655
[ "Apache-2.0" ]
647
2015-01-02T04:01:40.000Z
2022-03-30T15:57:35.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
40.846154
77
0.780917
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
471
126
23
8a2a864a8c1d9319292f8845f8b5444c17a7e11f
457
py
Python
Core Concepts/Deep Learning/1_forward_progation.py
WyckliffeAluga/data-chronicles
5219fe9cdbafb9fd7be88727483952c4c13f2790
[ "MIT" ]
null
null
null
Core Concepts/Deep Learning/1_forward_progation.py
WyckliffeAluga/data-chronicles
5219fe9cdbafb9fd7be88727483952c4c13f2790
[ "MIT" ]
null
null
null
Core Concepts/Deep Learning/1_forward_progation.py
WyckliffeAluga/data-chronicles
5219fe9cdbafb9fd7be88727483952c4c13f2790
[ "MIT" ]
1
2021-02-09T12:22:55.000Z
2021-02-09T12:22:55.000Z
import numpy as np input_data = np.array([2,3]) weights = { 'node_0':np.array([1,1]), 'node_1':np.array([-1,1]), 'output':np.array([2,-1]) } node_0_value = (input_data * weights['node_0']).sum() node_1_value = (input_data * weights['node_1']).sum() hidden_layer_values = np.a...
22.85
61
0.630197
import numpy as np input_data = np.array([2,3]) weights = { 'node_0':np.array([1,1]), 'node_1':np.array([-1,1]), 'output':np.array([2,-1]) } node_0_value = (input_data * weights['node_0']).sum() node_1_value = (input_data * weights['node_1']).sum() hidden_layer_values = np.a...
0
0
0
bb56a0bb15c0fba55dadbce992b36133188140cf
1,701
py
Python
Python WebSite/commentManager.py
Brktrlw/E-Trade-System-With-Python-Flask
0e6568083c07abe8bf3f6df4eb0fecb700ea8862
[ "MIT" ]
1
2021-10-04T16:39:01.000Z
2021-10-04T16:39:01.000Z
Python WebSite/commentManager.py
Brktrlw/E-Trade-System-With-Python-Flask
0e6568083c07abe8bf3f6df4eb0fecb700ea8862
[ "MIT" ]
null
null
null
Python WebSite/commentManager.py
Brktrlw/E-Trade-System-With-Python-Flask
0e6568083c07abe8bf3f6df4eb0fecb700ea8862
[ "MIT" ]
null
null
null
from baseDatabaseManager import BaseDatabaseManager
41.487805
109
0.800118
from baseDatabaseManager import BaseDatabaseManager class CommentManager(): @staticmethod def increaseProductAmountFromCart(customerId, productId): BaseDatabaseManager.databaseType.increaseProductAmountFromCart(customerId, productId) @staticmethod def isLikeComment(customerId, commentId): ...
1,221
406
23
bd2a8be5f2509570872af94eb6112b69ff165a64
85
py
Python
Course 202009/Python/Scrapy/xuetang/begin.py
Seizzzz/DailyCodes
9a617fb64ee27b9f254be161850e9c9a61747cb1
[ "MIT" ]
null
null
null
Course 202009/Python/Scrapy/xuetang/begin.py
Seizzzz/DailyCodes
9a617fb64ee27b9f254be161850e9c9a61747cb1
[ "MIT" ]
null
null
null
Course 202009/Python/Scrapy/xuetang/begin.py
Seizzzz/DailyCodes
9a617fb64ee27b9f254be161850e9c9a61747cb1
[ "MIT" ]
null
null
null
from scrapy import cmdline cmdline.execute("scrapy crawl xtzx -o result.csv".split())
42.5
58
0.788235
from scrapy import cmdline cmdline.execute("scrapy crawl xtzx -o result.csv".split())
0
0
0
afd0753e8e33558fd2cb0adbe79b2cab71d1426c
562
py
Python
setup.py
tsupei/treeviz
47c2d840982d95a80381f2114313bd32f231ab88
[ "MIT" ]
6
2019-11-02T09:26:41.000Z
2021-03-13T15:26:49.000Z
setup.py
tsupei/treeviz
47c2d840982d95a80381f2114313bd32f231ab88
[ "MIT" ]
null
null
null
setup.py
tsupei/treeviz
47c2d840982d95a80381f2114313bd32f231ab88
[ "MIT" ]
null
null
null
from distutils.core import setup with open("README.md", "r") as fh: long_description = fh.read() setup( name = 'treeviz', packages = ['treeviz'], version = '1.1', license='MIT', description = 'Print tree in bash manner', author = 'Chen Tsu Pei', author_email = 'a5560648@gmail.com', url = 'https://...
26.761905
71
0.683274
from distutils.core import setup with open("README.md", "r") as fh: long_description = fh.read() setup( name = 'treeviz', packages = ['treeviz'], version = '1.1', license='MIT', description = 'Print tree in bash manner', author = 'Chen Tsu Pei', author_email = 'a5560648@gmail.com', url = 'https://...
0
0
0
e5adcecdec80e992e865b9182c527169e9d40330
2,874
py
Python
jasonParser.py
ibrahimsh/final-project-software-programming
13defea94b98b8772d8301bff32ad2136e6261f5
[ "Apache-2.0" ]
null
null
null
jasonParser.py
ibrahimsh/final-project-software-programming
13defea94b98b8772d8301bff32ad2136e6261f5
[ "Apache-2.0" ]
5
2015-04-30T12:46:05.000Z
2015-04-30T13:34:00.000Z
jasonParser.py
ibrahimsh/final-project-software-programming
13defea94b98b8772d8301bff32ad2136e6261f5
[ "Apache-2.0" ]
null
null
null
__author__ = 'MatrixRev' import json import codecs import glob import os import sys #path = u"C://Users//MatrixRev//Desktop//library_5//" path="C://Users//MatrixRev//Desktop//mainLib//" # input file outFile='C:/Users/MatrixRev/Desktop/books/output/mainsubjects.txt' #output file pathNew = u"C://Users//MatrixRev//Deskt...
40.478873
126
0.479471
__author__ = 'MatrixRev' import json import codecs import glob import os import sys #path = u"C://Users//MatrixRev//Desktop//library_5//" path="C://Users//MatrixRev//Desktop//mainLib//" # input file outFile='C:/Users/MatrixRev/Desktop/books/output/mainsubjects.txt' #output file pathNew = u"C://Users//MatrixRev//Deskt...
0
0
0
e84df9dae610f2465c8309e92c32430fc6ed2e22
1,955
py
Python
data/compress.py
Catosine/GDAS
da047fe30b5aeeb1121861458ad61fd7c171874e
[ "MIT" ]
20
2019-10-10T07:13:27.000Z
2022-03-25T11:33:16.000Z
data/compress.py
BaiYuYuan/GDAS
5eed8101a78d223a20a43494176051298b24ac3a
[ "MIT" ]
null
null
null
data/compress.py
BaiYuYuan/GDAS
5eed8101a78d223a20a43494176051298b24ac3a
[ "MIT" ]
6
2020-04-21T14:52:02.000Z
2021-08-05T15:00:22.000Z
# python ./data/compress.py $TORCH_HOME/ILSVRC2012/ $TORCH_HOME/ILSVRC2012-TAR tar # python ./data/compress.py $TORCH_HOME/ILSVRC2012/ $TORCH_HOME/ILSVRC2012-ZIP zip import os, sys from pathlib import Path if __name__ == '__main__': assert len(sys.argv) == 4, 'invalid argv : {:}'.format(sys.argv) source, destin...
50.128205
183
0.652174
# python ./data/compress.py $TORCH_HOME/ILSVRC2012/ $TORCH_HOME/ILSVRC2012-TAR tar # python ./data/compress.py $TORCH_HOME/ILSVRC2012/ $TORCH_HOME/ILSVRC2012-ZIP zip import os, sys from pathlib import Path def command(prefix, cmd): print ('{:}{:}'.format(prefix, cmd)) os.system(cmd) def main(source, destination...
1,503
0
46
18c4f10879cd2e41a1c2e314d35e296837a1a82d
2,934
py
Python
venv/lib/python3.6/site-packages/ansible_collections/ansible/utils/plugins/test/ipv6_ipv4_mapped.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
1
2020-01-22T13:11:23.000Z
2020-01-22T13:11:23.000Z
venv/lib/python3.6/site-packages/ansible_collections/ansible/utils/plugins/test/ipv6_ipv4_mapped.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
12
2020-02-21T07:24:52.000Z
2020-04-14T09:54:32.000Z
venv/lib/python3.6/site-packages/ansible_collections/ansible/utils/plugins/test/ipv6_ipv4_mapped.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2021 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ Test plugin file for netaddr tests: ipv6_ipv4_mapped """ from __future__ import absolute_import, division, print_function from ansible_collections.ansible.utils.plugins.p...
26.432432
96
0.621336
# -*- coding: utf-8 -*- # Copyright 2021 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ Test plugin file for netaddr tests: ipv6_ipv4_mapped """ from __future__ import absolute_import, division, print_function from ansible_collections.ansible.utils.plugins.p...
24
0
27
786fe6aeaee7a9de033be18da427dde43002880f
1,844
py
Python
tests/unit/test_auth_merge.py
neuro-inc/neuro-extras
cc42fdeff3b993b099850769b3f65a59c29815e7
[ "Apache-2.0" ]
2
2020-11-02T21:41:15.000Z
2020-11-03T01:51:31.000Z
tests/unit/test_auth_merge.py
neuro-inc/neuro-extras
cc42fdeff3b993b099850769b3f65a59c29815e7
[ "Apache-2.0" ]
137
2020-09-29T12:03:45.000Z
2022-03-31T03:11:35.000Z
tests/unit/test_auth_merge.py
neuro-inc/neuro-extras
cc42fdeff3b993b099850769b3f65a59c29815e7
[ "Apache-2.0" ]
null
null
null
import json import logging import os import subprocess import sys from pathlib import Path import pytest from deepdiff import DeepDiff TEST_ASSETS_ROOT = (Path(__file__).parent.parent / "assets").resolve() NEURO_EXTRAS_ROOT = Path(__file__).parent.parent.parent / "neuro_extras" LOGGER = logging.getLogger(__name__) ...
35.461538
82
0.706616
import json import logging import os import subprocess import sys from pathlib import Path import pytest from deepdiff import DeepDiff TEST_ASSETS_ROOT = (Path(__file__).parent.parent / "assets").resolve() NEURO_EXTRAS_ROOT = Path(__file__).parent.parent.parent / "neuro_extras" LOGGER = logging.getLogger(__name__) ...
1,418
0
22
51c067b62e55ecdf06e45c874e8c006c2a122ab2
1,285
py
Python
setup.py
easybe/kTorrent
432b3e1c29c407fc15393409f28a4bb8c95dc236
[ "MIT" ]
7
2015-11-14T20:28:32.000Z
2016-10-22T01:04:00.000Z
setup.py
easybe/kTorrent
432b3e1c29c407fc15393409f28a4bb8c95dc236
[ "MIT" ]
1
2015-11-14T20:30:05.000Z
2015-11-16T13:50:29.000Z
setup.py
easybe/kTorrent
432b3e1c29c407fc15393409f28a4bb8c95dc236
[ "MIT" ]
7
2015-12-06T13:10:05.000Z
2021-03-16T10:14:55.000Z
from setuptools import setup setup( name='ktorrent', version='0.4.7', description='Fetches and parses data from Kickass Torrents.', long_description=open('README.rst').read(), license='MIT', author='Udit Vasu', author_email='admin@codenirvana.in', url='https://github.com/codenirvana/kTo...
33.815789
71
0.595331
from setuptools import setup setup( name='ktorrent', version='0.4.7', description='Fetches and parses data from Kickass Torrents.', long_description=open('README.rst').read(), license='MIT', author='Udit Vasu', author_email='admin@codenirvana.in', url='https://github.com/codenirvana/kTo...
0
0
0
10f2e068e2a87600e7b9e2637711d264a1a1c769
1,548
py
Python
ocr/utils/dataset.py
anhlt/ocr
df516c51bdf1e62785d4e5c879315413258738af
[ "MIT" ]
null
null
null
ocr/utils/dataset.py
anhlt/ocr
df516c51bdf1e62785d4e5c879315413258738af
[ "MIT" ]
null
null
null
ocr/utils/dataset.py
anhlt/ocr
df516c51bdf1e62785d4e5c879315413258738af
[ "MIT" ]
null
null
null
from torch.utils.data.dataset import Dataset import os import json from PIL import Image from torchvision import transforms import logging import numpy as np import torch logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) SOS_token = 0 EOS_token = 1
27.157895
80
0.665375
from torch.utils.data.dataset import Dataset import os import json from PIL import Image from torchvision import transforms import logging import numpy as np import torch logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) SOS_token = 0 EOS_token = 1 class OCRDataset(Dataset): def __init__(self,...
1,122
5
150
d5c447b90d53d395016801b58991e1d0e1d50b4b
11,936
py
Python
cinder/tests/unit/volume/flows/test_create_volume_flow.py
potsmaster/cinder
275c2acdfb4282b0ec0314c9875b759958c093f8
[ "Apache-2.0" ]
null
null
null
cinder/tests/unit/volume/flows/test_create_volume_flow.py
potsmaster/cinder
275c2acdfb4282b0ec0314c9875b759958c093f8
[ "Apache-2.0" ]
null
null
null
cinder/tests/unit/volume/flows/test_create_volume_flow.py
potsmaster/cinder
275c2acdfb4282b0ec0314c9875b759958c093f8
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 Canonical Ltd. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
42.176678
79
0.603552
# Copyright 2013 Canonical Ltd. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
9,206
1,463
69
382d7e7ec20a9bcfd841c6bc2f53047718ae7d9d
1,923
py
Python
tests/conftest.py
xenadevel/PyXenaValkyrie
9bb1d0b058c45dc94a778fd674a679b53f03a34c
[ "Apache-2.0" ]
4
2018-07-13T08:09:38.000Z
2022-02-09T01:36:13.000Z
tests/conftest.py
xenadevel/PyXenaValkyrie
9bb1d0b058c45dc94a778fd674a679b53f03a34c
[ "Apache-2.0" ]
1
2019-07-31T04:56:43.000Z
2019-08-01T07:11:21.000Z
tests/conftest.py
xenadevel/PyXenaValkyrie
9bb1d0b058c45dc94a778fd674a679b53f03a34c
[ "Apache-2.0" ]
3
2019-05-30T23:47:02.000Z
2022-02-04T12:32:14.000Z
import pytest from trafficgenerator.tgn_utils import ApiType @pytest.fixture(scope='class', autouse=True)
50.605263
116
0.671867
import pytest from trafficgenerator.tgn_utils import ApiType def pytest_addoption(parser): parser.addoption("--api", action="append", default=['socket'], help="api option: socket or rest") parser.addoption("--server", action="store", default="localhost:57912", help="REST server, options...
1,743
0
68
fbf6d66cae31bca840f6d736dcc20928c941375a
2,863
py
Python
create_balanced_classes.py
hoytak/diabetic-retinopathy-code-private
fc17020fc33ea05f3add8340d8f64e0a25cd7787
[ "MIT" ]
103
2015-03-16T20:50:28.000Z
2022-01-23T02:14:37.000Z
create_balanced_classes.py
hoytak/diabetic-retinopathy-code-private
fc17020fc33ea05f3add8340d8f64e0a25cd7787
[ "MIT" ]
null
null
null
create_balanced_classes.py
hoytak/diabetic-retinopathy-code-private
fc17020fc33ea05f3add8340d8f64e0a25cd7787
[ "MIT" ]
79
2015-03-17T09:25:15.000Z
2021-05-20T22:57:03.000Z
import graphlab as gl import re import random from copy import copy import os import graphlab.aggregate as agg import array import numpy as np import sys # Run this script in the same directory as the train_path = "image-sframes/train-%d/" valid_path = "image-sframes/validation-%d/" X_data = gl.SFrame("image-sframe...
28.919192
105
0.654558
import graphlab as gl import re import random from copy import copy import os import graphlab.aggregate as agg import array import numpy as np import sys # Run this script in the same directory as the train_path = "image-sframes/train-%d/" valid_path = "image-sframes/validation-%d/" X_data = gl.SFrame("image-sframe...
440
0
23
29943cd62bab8fad145cb0653ab7587ac74c4c24
1,258
py
Python
main.py
xopherw/MarketWatch-API
4d36da8340014ed4db9da20500c8698bdde236fd
[ "MIT" ]
null
null
null
main.py
xopherw/MarketWatch-API
4d36da8340014ed4db9da20500c8698bdde236fd
[ "MIT" ]
null
null
null
main.py
xopherw/MarketWatch-API
4d36da8340014ed4db9da20500c8698bdde236fd
[ "MIT" ]
null
null
null
from flask import Flask, request, abort, jsonify, Response, json from marketwatch import marketwatch as MW from error import Error app = Flask(__name__) app.config['JSON_SORT_KEYS'] = False @app.route('/stock') @app.route('/stock/financial') if(__name__ == "__main__"): app.run(debug=True)
29.255814
64
0.604928
from flask import Flask, request, abort, jsonify, Response, json from marketwatch import marketwatch as MW from error import Error app = Flask(__name__) app.config['JSON_SORT_KEYS'] = False @app.route('/stock') def ticker(): ticker = request.args.get('ticker', default='') data = MW(ticker).data() json_dat...
917
0
44
b9f9d8237c315cbefc02573ccdec0ebade8aa1e8
609
py
Python
setup.py
muma7490/PyDIAMONDS-Background
769a8ad57003a7d342d5e21c0f6fa74fb74821c1
[ "MIT" ]
null
null
null
setup.py
muma7490/PyDIAMONDS-Background
769a8ad57003a7d342d5e21c0f6fa74fb74821c1
[ "MIT" ]
10
2017-09-28T13:45:11.000Z
2017-10-11T12:32:58.000Z
setup.py
muma7490/PyDIAMONDS-Background
769a8ad57003a7d342d5e21c0f6fa74fb74821c1
[ "MIT" ]
null
null
null
from setuptools import setup name = 'pyDiamondsBackground' version = '1.1' release = '1.1.0' setup( name=name, author='Marco Muellner', author_email='muellnermarco@gmail.com', version='1.1.2', packages=['pyDiamondsBackground','pyDiamondsBackground/models'], licencse = 'MIT', description='...
26.478261
110
0.678161
from setuptools import setup name = 'pyDiamondsBackground' version = '1.1' release = '1.1.0' setup( name=name, author='Marco Muellner', author_email='muellnermarco@gmail.com', version='1.1.2', packages=['pyDiamondsBackground','pyDiamondsBackground/models'], licencse = 'MIT', description='...
0
0
0
ad3d679c9e8950d1aa0ad3ce278c75cabf1051bf
1,077
py
Python
main/service/impl/ContactDetailServiceImpl.py
KesharaWaidyarathna/Lambo_ChatBot_AI
2ef599d0c5a5a9730e218d62f869e01188c60e43
[ "BSD-3-Clause" ]
null
null
null
main/service/impl/ContactDetailServiceImpl.py
KesharaWaidyarathna/Lambo_ChatBot_AI
2ef599d0c5a5a9730e218d62f869e01188c60e43
[ "BSD-3-Clause" ]
null
null
null
main/service/impl/ContactDetailServiceImpl.py
KesharaWaidyarathna/Lambo_ChatBot_AI
2ef599d0c5a5a9730e218d62f869e01188c60e43
[ "BSD-3-Clause" ]
null
null
null
from main.dto.ContactDetailDto import ContactDetailDto from main.repository.impl.ContactDetailRepositoryImpl import ContactDetailRepositoryImpl from main.service.ContactDetailService import ContactDetailService
43.08
88
0.807799
from main.dto.ContactDetailDto import ContactDetailDto from main.repository.impl.ContactDetailRepositoryImpl import ContactDetailRepositoryImpl from main.service.ContactDetailService import ContactDetailService class ContactDetailServiceImpl(ContactDetailService): __contactDetailRepository: ContactDetailRepositor...
629
213
23
5c16484fd0ad89c10f9780d31cc14fb60fd5464f
196
py
Python
autodeskvault/__init__.py
a-severin/autodeskvault
51e160ef982899993cfebd524257642605ca43f7
[ "MIT" ]
null
null
null
autodeskvault/__init__.py
a-severin/autodeskvault
51e160ef982899993cfebd524257642605ca43f7
[ "MIT" ]
null
null
null
autodeskvault/__init__.py
a-severin/autodeskvault
51e160ef982899993cfebd524257642605ca43f7
[ "MIT" ]
null
null
null
from .vault import Vault, EntityClassId, ClientProperties, ServerProperties, SearchOperation, PropertySearch, SearchRule, SysAclBeh, connect from .vault import generate_service_urls, VaultServices
98
140
0.862245
from .vault import Vault, EntityClassId, ClientProperties, ServerProperties, SearchOperation, PropertySearch, SearchRule, SysAclBeh, connect from .vault import generate_service_urls, VaultServices
0
0
0
0485649b132d40045e1554f5311ae8d3d48fdcfd
608
py
Python
samples/log_reg.py
ml-uem/data-sci-lab
ddc1d2aed28538a7fbf53ff1d26356fd8b8f0a9e
[ "MIT" ]
2
2020-01-12T23:24:53.000Z
2020-01-17T18:15:22.000Z
samples/log_reg.py
ml-uem/data-sci-lab
ddc1d2aed28538a7fbf53ff1d26356fd8b8f0a9e
[ "MIT" ]
28
2020-01-11T10:54:39.000Z
2020-02-28T18:00:58.000Z
samples/log_reg.py
ml-uem/data-sci-lab
ddc1d2aed28538a7fbf53ff1d26356fd8b8f0a9e
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd from mluem import LogisticRegression as LogReg if __name__ == "__main__": X, y = load_data() main(X, y)
19
63
0.592105
import numpy as np import pandas as pd from mluem import LogisticRegression as LogReg def main(X, y): model = LogReg(1, 10, 2) model.fit(X, y.T) prediction = model.predict(X) score = model.score(X, y.T) print('prediction =>', prediction) print('score =>', score) def load_data(): filep...
399
0
46
a04d8fc2d4997aee687d2050d55e49f8d4373062
2,185
py
Python
cloud/tune_hparams.py
aleksandrinvictor/drivendata-cloud
f85ac074cd9ace60aa4087d27fa281a931597e55
[ "MIT" ]
null
null
null
cloud/tune_hparams.py
aleksandrinvictor/drivendata-cloud
f85ac074cd9ace60aa4087d27fa281a931597e55
[ "MIT" ]
null
null
null
cloud/tune_hparams.py
aleksandrinvictor/drivendata-cloud
f85ac074cd9ace60aa4087d27fa281a931597e55
[ "MIT" ]
null
null
null
from copy import deepcopy from typing import Any, Dict import optuna import yaml from optuna.integration import PyTorchLightningPruningCallback from pytorch_lightning import Trainer, seed_everything from cloud.dataset import CloudDataModule from cloud.model import Cloud if __name__ == "__main__": with open("co...
33.106061
80
0.675973
from copy import deepcopy from typing import Any, Dict import optuna import yaml from optuna.integration import PyTorchLightningPruningCallback from pytorch_lightning import Trainer, seed_everything from cloud.dataset import CloudDataModule from cloud.model import Cloud def objective(trial: optuna.trial.Trial, cfg:...
1,298
0
23
e8dc80c1d3c7281f032270c4ab7f6bca23582ec8
2,739
py
Python
src/server/board_assets.py
vertumno/vocal
168f3578d93de9d6e2cbb91f2db959de962ce37b
[ "MIT" ]
null
null
null
src/server/board_assets.py
vertumno/vocal
168f3578d93de9d6e2cbb91f2db959de962ce37b
[ "MIT" ]
null
null
null
src/server/board_assets.py
vertumno/vocal
168f3578d93de9d6e2cbb91f2db959de962ce37b
[ "MIT" ]
null
null
null
import Adafruit_BBIO.GPIO as GPIO # Dictionary with the PIN number associated to each room house = { "KITCHEN": "P9_12", "BATHROOM": "P9_15", "LIVINGROOM": "P9_42" } def get_status(pin_number): """Verify the status of the GPIO pin with number equal to `pin_number`. Parameters ---------- pin_number : str Th...
20.440299
90
0.678715
import Adafruit_BBIO.GPIO as GPIO # Dictionary with the PIN number associated to each room house = { "KITCHEN": "P9_12", "BATHROOM": "P9_15", "LIVINGROOM": "P9_42" } def get_status(pin_number): """Verify the status of the GPIO pin with number equal to `pin_number`. Parameters ---------- pin_number : str Th...
0
0
0
bf18e85742c06399d60d9b38f228cd40841c9690
12,685
py
Python
cape_responder/responder_core.py
edwardmjackson/cape-responder
60e0b2fee2507034aae80691a89b07c8d39fa432
[ "Apache-2.0" ]
null
null
null
cape_responder/responder_core.py
edwardmjackson/cape-responder
60e0b2fee2507034aae80691a89b07c8d39fa432
[ "Apache-2.0" ]
null
null
null
cape_responder/responder_core.py
edwardmjackson/cape-responder
60e0b2fee2507034aae80691a89b07c8d39fa432
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 BLEMUNDSBURY AI LIMITED # # 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 ...
47.33209
121
0.630587
# Copyright 2018 BLEMUNDSBURY AI LIMITED # # 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 ...
4,248
6,656
23
e792d178e1066bf477940fb7baac0d7deb99d9bd
489
py
Python
scripts/load_data.py
nilsleiffischer/covid19
a227aa47a248589aa8e47dce18c50f86f3e1ef7c
[ "MIT" ]
4
2020-03-13T21:21:38.000Z
2020-03-30T09:41:21.000Z
scripts/load_data.py
nilsleiffischer/covid19
a227aa47a248589aa8e47dce18c50f86f3e1ef7c
[ "MIT" ]
1
2020-11-29T20:51:38.000Z
2020-11-29T20:51:40.000Z
scripts/load_data.py
nilsleiffischer/covid19
a227aa47a248589aa8e47dce18c50f86f3e1ef7c
[ "MIT" ]
3
2020-03-13T13:32:19.000Z
2020-03-29T22:06:19.000Z
import pandas as pd
32.6
161
0.680982
import pandas as pd def load_jhu_data(): data = pd.read_csv( 'https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_global.csv', index_col=1) data.index = data.index + (" (" + data['Province/State'] + ")").fi...
445
0
23
f8613eef64462503488290cd7035f3213120d27a
7,129
py
Python
src/main/python/variants_pca.py
deflaux/spark-examples
5e009fcab4fd13044a58f7fcf1fe0ad1b68d28a6
[ "Apache-2.0" ]
61
2015-01-13T11:49:49.000Z
2020-10-22T09:53:14.000Z
src/main/python/variants_pca.py
deflaux/spark-examples
5e009fcab4fd13044a58f7fcf1fe0ad1b68d28a6
[ "Apache-2.0" ]
31
2015-01-01T17:56:45.000Z
2016-06-21T20:50:38.000Z
src/main/python/variants_pca.py
deflaux/spark-examples
5e009fcab4fd13044a58f7fcf1fe0ad1b68d28a6
[ "Apache-2.0" ]
31
2015-01-23T06:37:57.000Z
2020-07-05T22:06:43.000Z
# spark-submit --jars googlegenomics-spark-examples-assembly-1.0.jar \ # --driver-class-path googlegenomics-spark-examples-assembly-1.0.jar \ # src/main/python/variants_pca.py --client-secrets client_secrets.json import json import numpy import operator import sys import pyspark from pyspark import serializers...
35.292079
80
0.662926
# spark-submit --jars googlegenomics-spark-examples-assembly-1.0.jar \ # --driver-class-path googlegenomics-spark-examples-assembly-1.0.jar \ # src/main/python/variants_pca.py --client-secrets client_secrets.json import json import numpy import operator import sys import pyspark from pyspark import serializers...
2,412
0
77