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
c0b3a1dd34d4af3e41ec71b11a5b0c0289b6b2cb
1,527
py
Python
partname_resolver/components/test_inductor.py
sakoPO/partname-resolver
ad881eb147b005f0e833a1c78fa9fc4b8b7a33bb
[ "BSD-3-Clause" ]
null
null
null
partname_resolver/components/test_inductor.py
sakoPO/partname-resolver
ad881eb147b005f0e833a1c78fa9fc4b8b7a33bb
[ "BSD-3-Clause" ]
null
null
null
partname_resolver/components/test_inductor.py
sakoPO/partname-resolver
ad881eb147b005f0e833a1c78fa9fc4b8b7a33bb
[ "BSD-3-Clause" ]
null
null
null
import unittest from partname_resolver.components.inductor import Inductor from partname_resolver.units.temperature import TemperatureRange
41.27027
78
0.513425
import unittest from partname_resolver.components.inductor import Inductor from partname_resolver.units.temperature import TemperatureRange class InductorTestCase(unittest.TestCase): def test_equality(self): A = Inductor(inductor_type=Inductor.Type.MultilayerInductor, manufacturer="Mu...
1,316
21
49
05d44356b2346be5b170ee2ffa3cfc38f895d3ff
3,433
py
Python
setup.py
oarepo/cesnet-openid-remote
4ca46fc94801e51267b7676e0c212a024e3af3a1
[ "MIT" ]
null
null
null
setup.py
oarepo/cesnet-openid-remote
4ca46fc94801e51267b7676e0c212a024e3af3a1
[ "MIT" ]
4
2021-02-19T10:53:28.000Z
2021-04-09T17:15:56.000Z
setup.py
oarepo/cesnet-openid-remote
4ca46fc94801e51267b7676e0c212a024e3af3a1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2021 CESNET. # # CESNET-OpenID-Remote is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see LICENSE file for more # details. """CESNET OIDC Auth backend for OARepo""" import os from setuptools import find_packages, setup readme...
29.594828
77
0.630061
# -*- coding: utf-8 -*- # # Copyright (C) 2021 CESNET. # # CESNET-OpenID-Remote is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see LICENSE file for more # details. """CESNET OIDC Auth backend for OARepo""" import os from setuptools import find_packages, setup readme...
0
0
0
0098e30c2ef9ea5e88b69f0c7ac211522ab302b6
476
py
Python
src/pos/utils.py
ExplorerFreda/sub2-augmentation
3f43e72a1b4eb5201472938ede8ea0fbe97be7c3
[ "MIT" ]
6
2021-07-14T22:49:32.000Z
2021-08-22T14:32:17.000Z
src/pos/utils.py
ExplorerFreda/sub2-augmentation
3f43e72a1b4eb5201472938ede8ea0fbe97be7c3
[ "MIT" ]
null
null
null
src/pos/utils.py
ExplorerFreda/sub2-augmentation
3f43e72a1b4eb5201472938ede8ea0fbe97be7c3
[ "MIT" ]
1
2021-07-15T03:19:39.000Z
2021-07-15T03:19:39.000Z
high_resource_language_list = [ 'bg', 'cs', 'da', 'de', 'en', 'es', 'eu', 'fa', 'fi', 'fr', 'he', 'hi', 'hr', 'id', 'it', 'nl', 'no', 'pl', 'pt', 'sl', 'sv' ] low_resource_language_list = [ 'el', 'et', 'ga', 'hu', 'ro', 'ta' ] extra_language_list_ud12 = [ 'ar', 'cu', 'fi_ftb', 'got', 'grc', 'grc_proie...
31.733333
76
0.539916
high_resource_language_list = [ 'bg', 'cs', 'da', 'de', 'en', 'es', 'eu', 'fa', 'fi', 'fr', 'he', 'hi', 'hr', 'id', 'it', 'nl', 'no', 'pl', 'pt', 'sl', 'sv' ] low_resource_language_list = [ 'el', 'et', 'ga', 'hu', 'ro', 'ta' ] extra_language_list_ud12 = [ 'ar', 'cu', 'fi_ftb', 'got', 'grc', 'grc_proie...
0
0
0
6a05f2d56018956a4ac6c006679c41bfd597e952
7,071
py
Python
cirq/ion/ion_device.py
joshp112358/Cirq
c4fac27a9849e589ee05b4f702f2d7c9049aaeea
[ "Apache-2.0" ]
15
2020-06-29T08:33:39.000Z
2022-02-12T00:28:51.000Z
cirq/ion/ion_device.py
joshp112358/Cirq
c4fac27a9849e589ee05b4f702f2d7c9049aaeea
[ "Apache-2.0" ]
4
2020-11-27T09:34:13.000Z
2021-04-30T21:13:41.000Z
cirq/ion/ion_device.py
joshp112358/Cirq
c4fac27a9849e589ee05b4f702f2d7c9049aaeea
[ "Apache-2.0" ]
11
2020-06-29T08:40:24.000Z
2022-02-24T17:39:16.000Z
# Copyright 2018 The Cirq Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
39.949153
80
0.623391
# Copyright 2018 The Cirq Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
4,274
0
374
4ab3bb9ddd1da5119cd9c519636fbb494ba987ad
10,910
py
Python
examples/tts/ljspeech/local/prepare_data.py
wgfi110/athena
e704884ec6a3a947769d892aa267578038e49ecb
[ "Apache-2.0" ]
791
2019-12-22T03:09:04.000Z
2022-03-26T01:57:42.000Z
examples/tts/ljspeech/local/prepare_data.py
wgfi110/athena
e704884ec6a3a947769d892aa267578038e49ecb
[ "Apache-2.0" ]
198
2019-12-22T03:06:27.000Z
2022-03-29T02:57:59.000Z
examples/tts/ljspeech/local/prepare_data.py
wgfi110/athena
e704884ec6a3a947769d892aa267578038e49ecb
[ "Apache-2.0" ]
194
2019-12-24T03:59:29.000Z
2022-03-25T02:44:51.000Z
#coding=utf-8 # Copyright (C) 2020 ATHENA AUTHORS; LanYu; # 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 ...
35.537459
153
0.628873
#coding=utf-8 # Copyright (C) 2020 ATHENA AUTHORS; LanYu; # 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 ...
2,812
0
192
09b04334000e84dd407ae506dce11f9969eacf3d
666
py
Python
yossarian/book_groups/migrations/0003_auto_20151231_1605.py
avinassh/yossarian
b485da0669d87ad29f57ba2a4a446131aaf820a6
[ "MIT" ]
null
null
null
yossarian/book_groups/migrations/0003_auto_20151231_1605.py
avinassh/yossarian
b485da0669d87ad29f57ba2a4a446131aaf820a6
[ "MIT" ]
null
null
null
yossarian/book_groups/migrations/0003_auto_20151231_1605.py
avinassh/yossarian
b485da0669d87ad29f57ba2a4a446131aaf820a6
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2015-12-31 16:05 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion
25.615385
101
0.62012
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2015-12-31 16:05 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('book_groups', '0002_progress'), ] operations = [ ...
0
457
23
f3f8f0663273ae09a08d463054d3e72903562007
1,347
py
Python
transactions/accounts/migrations/0001_initial.py
akash-dev-github/Transactions
7f1b8897d914a1cf297aeff750c197d21ce98ca8
[ "MIT" ]
null
null
null
transactions/accounts/migrations/0001_initial.py
akash-dev-github/Transactions
7f1b8897d914a1cf297aeff750c197d21ce98ca8
[ "MIT" ]
null
null
null
transactions/accounts/migrations/0001_initial.py
akash-dev-github/Transactions
7f1b8897d914a1cf297aeff750c197d21ce98ca8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-10-09 19:24 from __future__ import unicode_literals import datetime import django.db.models.deletion from django.conf import settings from django.db import migrations, models
35.447368
130
0.614699
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-10-09 19:24 from __future__ import unicode_literals import datetime import django.db.models.deletion from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [...
0
1,085
23
3d1c5ee77973eec7eef67ddca34a8343a0cf3724
6,691
py
Python
custom_components/edgeos/clients/web_socket.py
kcleong/homeassistant-config
15b7bc75f5d1055d8620ced87eed9d563475296d
[ "MIT" ]
null
null
null
custom_components/edgeos/clients/web_socket.py
kcleong/homeassistant-config
15b7bc75f5d1055d8620ced87eed9d563475296d
[ "MIT" ]
null
null
null
custom_components/edgeos/clients/web_socket.py
kcleong/homeassistant-config
15b7bc75f5d1055d8620ced87eed9d563475296d
[ "MIT" ]
null
null
null
""" This component provides support for Home Automation Manager (HAM). For more details about this component, please refer to the documentation at https://home-assistant.io/components/edgeos/ """ import asyncio import json import logging import re from typing import Optional from urllib.parse import urlparse import ai...
28.47234
87
0.606337
""" This component provides support for Home Automation Manager (HAM). For more details about this component, please refer to the documentation at https://home-assistant.io/components/edgeos/ """ import asyncio import json import logging import re from typing import Optional from urllib.parse import urlparse import ai...
5,670
452
23
9ca3fcb4f36e750dc158f22eee6d8701f2799cd8
1,918
py
Python
venv/lib/python3.8/site-packages/azureml/_base_sdk_common/workspace/models/linked_service_props.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/azureml/_base_sdk_common/workspace/models/linked_service_props.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/azureml/_base_sdk_common/workspace/models/linked_service_props.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
2
2021-05-23T16:46:31.000Z
2021-05-26T23:51:09.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator 2.3.3...
40.808511
107
0.637643
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator 2.3.3...
325
0
29
626ab922c10d3f79f86d1f22251f5d6b2a46edfe
963
py
Python
notebooks/1.0-vg-runtime-simulation/timing.py
v715/py-U-Rerf
d1821ce95a3ccc3345faa673371f7a8e9a797f72
[ "FTL" ]
2
2018-09-18T00:06:46.000Z
2018-09-18T12:59:38.000Z
notebooks/1.0-vg-runtime-simulation/timing.py
v715/py-U-Rerf
d1821ce95a3ccc3345faa673371f7a8e9a797f72
[ "FTL" ]
17
2018-09-17T23:50:25.000Z
2018-10-12T19:30:21.000Z
notebooks/1.0-vg-runtime-simulation/timing.py
v715/py-U-Rerf
d1821ce95a3ccc3345faa673371f7a8e9a797f72
[ "FTL" ]
null
null
null
#!/usr/bin/env python # graph.py # Created by Vivek Gopalakrishnan on 2018-11-13. # Email: vgopala4@jhu.edu # Copyright (c) 2018. All rights reserved. import timeit from src.features.summary import Stats from src.random.bernoulli import RandomGraph def measure_runtime(n, p, number=5): """ Calculates the ru...
26.027027
79
0.686397
#!/usr/bin/env python # graph.py # Created by Vivek Gopalakrishnan on 2018-11-13. # Email: vgopala4@jhu.edu # Copyright (c) 2018. All rights reserved. import timeit from src.features.summary import Stats from src.random.bernoulli import RandomGraph def measure_runtime(n, p, number=5): """ Calculates the ru...
0
0
0
8d1f18ed4554971d39a164bbe0c71bd5477eddf5
1,360
py
Python
NodeClassification/ADMM/ADMM/main_admm_auto_tune.py
x-zho14/Unified-LTH-GNN
edbb2f9aaa7cb363424dcfcb2ce198cfb66f3d55
[ "MIT" ]
29
2021-02-17T02:46:54.000Z
2022-03-18T02:09:03.000Z
NodeClassification/ADMM/ADMM/main_admm_auto_tune.py
x-zho14/Unified-LTH-GNN
edbb2f9aaa7cb363424dcfcb2ce198cfb66f3d55
[ "MIT" ]
1
2021-09-03T13:30:50.000Z
2021-09-03T13:30:50.000Z
NodeClassification/ADMM/ADMM/main_admm_auto_tune.py
x-zho14/Unified-LTH-GNN
edbb2f9aaa7cb363424dcfcb2ce198cfb66f3d55
[ "MIT" ]
10
2021-04-01T16:27:03.000Z
2022-03-07T09:20:38.000Z
import os import numpy as np learning_rate = [0.01, 0.001] prune_ratio = 30 ADMM_times = [2,3,4,5,6,7] Total_epochs = [10,30,40,50,60] target_accuracy = 0.76 count = 0 highest_acc = 0 for i in range(len(learning_rate)): for j in range(len(ADMM_times)): for k in range(len(Total_epochs)): lr = le...
35.789474
83
0.491912
import os import numpy as np learning_rate = [0.01, 0.001] prune_ratio = 30 ADMM_times = [2,3,4,5,6,7] Total_epochs = [10,30,40,50,60] target_accuracy = 0.76 count = 0 highest_acc = 0 for i in range(len(learning_rate)): for j in range(len(ADMM_times)): for k in range(len(Total_epochs)): lr = le...
0
0
0
7dc23fe92ba79adcfc96da36352928d104bdba79
490
py
Python
apps/users/admin.py
Mozilla-GitHub-Standards/93f18f14efcf5fdfc0e04f9bf247f66baf46663f37b1d2087ab8d850abc90803
4e374b4d52dfb9039ebe543e7f27682189022307
[ "BSD-3-Clause" ]
2
2015-04-06T15:20:29.000Z
2016-12-30T12:25:11.000Z
apps/users/admin.py
Mozilla-GitHub-Standards/93f18f14efcf5fdfc0e04f9bf247f66baf46663f37b1d2087ab8d850abc90803
4e374b4d52dfb9039ebe543e7f27682189022307
[ "BSD-3-Clause" ]
2
2019-02-17T17:38:02.000Z
2019-03-28T03:49:16.000Z
apps/users/admin.py
Mozilla-GitHub-Standards/93f18f14efcf5fdfc0e04f9bf247f66baf46663f37b1d2087ab8d850abc90803
4e374b4d52dfb9039ebe543e7f27682189022307
[ "BSD-3-Clause" ]
1
2019-03-28T03:49:18.000Z
2019-03-28T03:49:18.000Z
from django.contrib import admin from tower import ugettext_lazy as _ from users.models import Profile, Link username = lambda u: u.user.username username.short_description = _('Username') admin.site.register(Profile, ProfileAdmin) admin.site.register(Link, LinkAdmin)
21.304348
42
0.734694
from django.contrib import admin from tower import ugettext_lazy as _ from users.models import Profile, Link username = lambda u: u.user.username username.short_description = _('Username') class ProfileAdmin(admin.ModelAdmin): list_display = (username, 'name') search_fields = ('name',) class LinkAdmin(a...
0
168
46
324d309f43981206af584f6bc12c55d7e3d30736
4,574
py
Python
IMU/VTK-6.2.0/Filters/General/Testing/Python/TestMultiBlockStreamer.py
timkrentz/SunTracker
9a189cc38f45e5fbc4e4c700d7295a871d022795
[ "MIT" ]
4
2016-03-30T14:31:52.000Z
2019-02-02T05:01:32.000Z
IMU/VTK-6.2.0/Filters/General/Testing/Python/TestMultiBlockStreamer.py
timkrentz/SunTracker
9a189cc38f45e5fbc4e4c700d7295a871d022795
[ "MIT" ]
null
null
null
IMU/VTK-6.2.0/Filters/General/Testing/Python/TestMultiBlockStreamer.py
timkrentz/SunTracker
9a189cc38f45e5fbc4e4c700d7295a871d022795
[ "MIT" ]
2
2019-08-30T23:36:13.000Z
2019-11-08T16:52:01.000Z
#!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # we need to use composite data pipeline with multiblock datasets alg = vtk.vtkAlgorithm() pip = vtk.vtkCompositeDataPipeline() alg.SetDefaultExecutivePrototype(pip) #del pi...
30.291391
78
0.776782
#!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # we need to use composite data pipeline with multiblock datasets alg = vtk.vtkAlgorithm() pip = vtk.vtkCompositeDataPipeline() alg.SetDefaultExecutivePrototype(pip) #del pi...
0
0
0
716976b200135720854972a197428b45a78f6344
207
py
Python
pdbuddy/formatters/simple.py
emou/pdbuddy
5708c44803e46d06aca02a0402ebaec0c5ae4634
[ "MIT" ]
null
null
null
pdbuddy/formatters/simple.py
emou/pdbuddy
5708c44803e46d06aca02a0402ebaec0c5ae4634
[ "MIT" ]
null
null
null
pdbuddy/formatters/simple.py
emou/pdbuddy
5708c44803e46d06aca02a0402ebaec0c5ae4634
[ "MIT" ]
null
null
null
from __future__ import absolute_import from pdbuddy.formatters.base import BaseFormatter
20.7
49
0.772947
from __future__ import absolute_import from pdbuddy.formatters.base import BaseFormatter class SimpleFormatter(BaseFormatter): def __call__(self, frame, event, arg): return str(frame.f_code)
50
16
50
26e8cceb26d881c4c50d1907d6a8246ef169ec29
786
py
Python
Search_4_letter-webApp/vsearch4web.py
dlouima/python_project
2f84c5131efccfa04a633a608605b957b20b5f7e
[ "Apache-2.0" ]
null
null
null
Search_4_letter-webApp/vsearch4web.py
dlouima/python_project
2f84c5131efccfa04a633a608605b957b20b5f7e
[ "Apache-2.0" ]
null
null
null
Search_4_letter-webApp/vsearch4web.py
dlouima/python_project
2f84c5131efccfa04a633a608605b957b20b5f7e
[ "Apache-2.0" ]
null
null
null
import vsearch as vsearch from flask import Flask, render_template, request, redirect app= Flask(__name__) # # @app.route('/') # def hello() -> str: # return redirect('/entry') @app.route('/search4', methods=['POST']) @app.route('/') @app.route('/entry') if __name__ == '__main__0': app.run(debug=True)
22.457143
90
0.653944
import vsearch as vsearch from flask import Flask, render_template, request, redirect app= Flask(__name__) # # @app.route('/') # def hello() -> str: # return redirect('/entry') @app.route('/search4', methods=['POST']) def do_search(): phrase = request.form['phrase'] letters= request.form['letters'] ...
423
0
44
a0f8dba11d5c9d23036254d6bc2c8e4009334ab5
580
py
Python
src/tree/0669.trim-a-binary-search-tree/trim-a-binary-search-tree.py
lyphui/Just-Code
e0c3c3ecb67cb805080ff686e88522b2bffe7741
[ "MIT" ]
782
2019-11-19T08:20:49.000Z
2022-03-25T06:59:09.000Z
src/0669.trim-a-binary-search-tree/trim-a-binary-search-tree.py
Heitao5200/Just-Code
5bb3ee485a103418e693b7ec8e26dc84f3691c79
[ "MIT" ]
1
2021-03-04T12:21:01.000Z
2021-03-05T01:23:54.000Z
src/0669.trim-a-binary-search-tree/trim-a-binary-search-tree.py
Heitao5200/Just-Code
5bb3ee485a103418e693b7ec8e26dc84f3691c79
[ "MIT" ]
155
2019-11-20T08:20:42.000Z
2022-03-19T07:28:09.000Z
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None
27.619048
66
0.532759
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def trimBST(self, root: TreeNode, L: int, R: int) -> TreeNode: if not root: return None if root.val<...
376
-6
49
2d982d9e3ea381e0c12055f558db9cd1ac20e3d2
9,925
py
Python
set_up_grasp_models/check_models/thermodynamics_checks.py
martamatos/set_up_grasp_models
0028f063c41104e3c0404956aa225e76aa6ac983
[ "MIT" ]
null
null
null
set_up_grasp_models/check_models/thermodynamics_checks.py
martamatos/set_up_grasp_models
0028f063c41104e3c0404956aa225e76aa6ac983
[ "MIT" ]
5
2019-05-14T17:05:41.000Z
2019-05-29T13:17:11.000Z
set_up_grasp_models/check_models/thermodynamics_checks.py
martamatos/set_up_grasp_models
0028f063c41104e3c0404956aa225e76aa6ac983
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd def calculate_dG(data_dict: dict, gas_constant: float, temperature: float, rxn_order: list = None) -> tuple: """ Given a dictionary representing a GRASP input file, calculates the minimum and maximum reaction dGs based on the standard dGs in thermoRxns and metabolit...
38.173077
120
0.643829
import numpy as np import pandas as pd def _get_dG_list(rxn_names: list, stoic_matrix: np.ndarray, sub_conc: np.ndarray, prod_conc: np.ndarray, dG_std: np.ndarray, gas_constant: float, temperature: float) -> tuple: dG_list = [] dG_Q_list = [] ma_ratio_list = [] for rxn_i in range(le...
4,055
0
92
d194ea8db0f61bff0f8a955602ce8f2eb76abe18
8,432
py
Python
src/synthetic_data.py
tomogwen/fpdcluster
afbb16ce1e0e428304867084fb59d62ae3931b81
[ "MIT" ]
10
2020-06-05T12:46:21.000Z
2021-04-19T10:46:46.000Z
src/synthetic_data.py
tomogwen/fpdcluster
afbb16ce1e0e428304867084fb59d62ae3931b81
[ "MIT" ]
null
null
null
src/synthetic_data.py
tomogwen/fpdcluster
afbb16ce1e0e428304867084fb59d62ae3931b81
[ "MIT" ]
null
null
null
import clustering import numpy as np from sklearn import datasets import matplotlib.pyplot as plt import dionysus as dion import random if __name__ == '__main__': seed = 0 dataset = gen_data2(seed, noise=0.1, n_samples=100) diagrams = compute_diagrams(dataset) diagrams_cluster = clusterin...
27.736842
115
0.607448
import clustering import numpy as np from sklearn import datasets import matplotlib.pyplot as plt import dionysus as dion import random def plot_all(data, diagrams): fig = plt.figure(figsize=(20, 10)) for i in range(len(data)): num = 241 + i ax = plt.subplot(num) plt.scatter(data[i...
7,457
0
230
2e69f73189a3759642774829299275d95d3f03ef
3,821
py
Python
controllers/pathfinder.py
endymecy/NDIToolbox
f7a0a642b4a778d9d0c131871f4bfb9822ecb3da
[ "BSD-4-Clause" ]
5
2017-02-28T16:16:06.000Z
2020-07-13T06:49:34.000Z
controllers/pathfinder.py
endymecy/NDIToolbox
f7a0a642b4a778d9d0c131871f4bfb9822ecb3da
[ "BSD-4-Clause" ]
1
2018-08-19T19:08:14.000Z
2018-08-19T19:08:14.000Z
controllers/pathfinder.py
endymecy/NDIToolbox
f7a0a642b4a778d9d0c131871f4bfb9822ecb3da
[ "BSD-4-Clause" ]
4
2017-10-25T20:17:15.000Z
2021-07-26T11:39:50.000Z
"""pathfinder.py - specifies paths and common filenames""" __author__ = 'Chris R. Coughlin' from models import config import os.path import sys def normalized(path_fn): """Decorator to normalize (os.path.normcase) paths""" return normalize @normalized def app_path(): """Returns the base application pat...
25.993197
99
0.690395
"""pathfinder.py - specifies paths and common filenames""" __author__ = 'Chris R. Coughlin' from models import config import os.path import sys def normalized(path_fn): """Decorator to normalize (os.path.normcase) paths""" def normalize(): return os.path.normcase(path_fn()) return normalize @n...
38
0
27
1572db60c45a7a3e80068f389efcd4692bc26899
338
py
Python
djapi/api/constants.py
dgouldin/djangocon-eu-2015
890057a3451231f96d15c65011d867dedfd5f9fa
[ "MIT" ]
null
null
null
djapi/api/constants.py
dgouldin/djangocon-eu-2015
890057a3451231f96d15c65011d867dedfd5f9fa
[ "MIT" ]
null
null
null
djapi/api/constants.py
dgouldin/djangocon-eu-2015
890057a3451231f96d15c65011d867dedfd5f9fa
[ "MIT" ]
null
null
null
TRANSACTION_STATUS_PENDING = 'pending' TRANSACTION_STATUS_COMPLETE = 'complete' TRANSACTION_STATUS_REFUNDED = 'refunded' TRANSACTION_STATUSES = ( (TRANSACTION_STATUS_PENDING, TRANSACTION_STATUS_PENDING), (TRANSACTION_STATUS_COMPLETE, TRANSACTION_STATUS_COMPLETE), (TRANSACTION_STATUS_REFUNDED, TRANSACTION_ST...
37.555556
63
0.837278
TRANSACTION_STATUS_PENDING = 'pending' TRANSACTION_STATUS_COMPLETE = 'complete' TRANSACTION_STATUS_REFUNDED = 'refunded' TRANSACTION_STATUSES = ( (TRANSACTION_STATUS_PENDING, TRANSACTION_STATUS_PENDING), (TRANSACTION_STATUS_COMPLETE, TRANSACTION_STATUS_COMPLETE), (TRANSACTION_STATUS_REFUNDED, TRANSACTION_ST...
0
0
0
e81e348e3912f9783df345478bd8ba60a40bfcc1
2,040
py
Python
test/test_minmax.py
shoaibmahmod7/Turbomachinery-Rotors-Balancing
8bb4c1ec97c4646bcd69ed3398aafc7f985bc96d
[ "MIT" ]
1
2022-02-03T17:14:16.000Z
2022-02-03T17:14:16.000Z
test/test_minmax.py
shoaibmahmod7/Turbomachinery-Rotors-Balancing
8bb4c1ec97c4646bcd69ed3398aafc7f985bc96d
[ "MIT" ]
null
null
null
test/test_minmax.py
shoaibmahmod7/Turbomachinery-Rotors-Balancing
8bb4c1ec97c4646bcd69ed3398aafc7f985bc96d
[ "MIT" ]
null
null
null
import numpy as np import sys import yaml import pytest import test_tools import hsbalance as hs '''This module is for testing Min_Max model solver''' # Reading the test cases from config.yaml file, to add more tests follow the rules on the file tests, tests_id, timeout = test_tools.get_tests_from_yaml('Min_max') @p...
37.090909
118
0.673039
import numpy as np import sys import yaml import pytest import test_tools import hsbalance as hs '''This module is for testing Min_Max model solver''' # Reading the test cases from config.yaml file, to add more tests follow the rules on the file tests, tests_id, timeout = test_tools.get_tests_from_yaml('Min_max') @p...
0
0
0
fc71471e251cfc681a314a5d4c50edf2f39c8b52
8,471
py
Python
pymatex/search/IndexSearchVisitor.py
Gawaboumga/PyMatex
3ccc0aa23211a064aa31a9b509b108cd606a4992
[ "MIT" ]
1
2019-03-05T09:45:04.000Z
2019-03-05T09:45:04.000Z
pymatex/search/IndexSearchVisitor.py
Gawaboumga/PyMatex
3ccc0aa23211a064aa31a9b509b108cd606a4992
[ "MIT" ]
null
null
null
pymatex/search/IndexSearchVisitor.py
Gawaboumga/PyMatex
3ccc0aa23211a064aa31a9b509b108cd606a4992
[ "MIT" ]
null
null
null
from pymatex.listener import MatexASTVisitor from pymatex.node import *
35.894068
98
0.67678
from pymatex.listener import MatexASTVisitor from pymatex.node import * class IndexSearchVisitor(MatexASTVisitor.MatexASTVisitor): def __init__(self, data: dict): self.data = data self.results = {} self.seen_constants = {} self.seen_variables = {} self.bound_variables = se...
7,663
37
698
8c6e39a2577187b6a1f33f6467e3fe9575d74f83
1,157
py
Python
server/DbHourlyTask.py
chuckablack/quokka-prime
6429c09039f37887f4b0d5a196f1df2712136de7
[ "MIT" ]
5
2021-05-29T20:15:16.000Z
2021-11-01T18:35:55.000Z
server/DbHourlyTask.py
chuckablack/quokka-prime
6429c09039f37887f4b0d5a196f1df2712136de7
[ "MIT" ]
null
null
null
server/DbHourlyTask.py
chuckablack/quokka-prime
6429c09039f37887f4b0d5a196f1df2712136de7
[ "MIT" ]
4
2021-05-18T06:50:34.000Z
2021-09-23T10:23:09.000Z
from datetime import datetime, timedelta import time from db_apis import trim_tables, create_summaries
30.447368
74
0.638721
from datetime import datetime, timedelta import time from db_apis import trim_tables, create_summaries class DbHourlyTask: def __init__(self): self.terminate = False self.current_hour = str(datetime.now())[:13] print("---> starting background db hourly task") def set_terminate(self):...
951
-2
104
ecc51e60591a3f817b2262a421173a5caf35191e
591
py
Python
src/sequence/quick_sort.py
JadielTeofilo/General-Algorithms
dfcf86c6ecd727573079f8971187c47bdb7a37bb
[ "MIT" ]
null
null
null
src/sequence/quick_sort.py
JadielTeofilo/General-Algorithms
dfcf86c6ecd727573079f8971187c47bdb7a37bb
[ "MIT" ]
null
null
null
src/sequence/quick_sort.py
JadielTeofilo/General-Algorithms
dfcf86c6ecd727573079f8971187c47bdb7a37bb
[ "MIT" ]
null
null
null
##################### QuickSort ################### from typing import List def quick_sort(nums: List[int]) -> List[int]: """ Does recursive sorting using quick sort """ if len(nums) < 2: return nums mid: int = (len(nums) - 1)//2 smaller_values: List[int] = [num for i, num in enumerate(nums) ...
36.9375
79
0.509306
##################### QuickSort ################### from typing import List def quick_sort(nums: List[int]) -> List[int]: """ Does recursive sorting using quick sort """ if len(nums) < 2: return nums mid: int = (len(nums) - 1)//2 smaller_values: List[int] = [num for i, num in enumerate(nums) ...
0
0
0
65f87122c687e34d582f25f7881fa6227314080c
192
py
Python
Lesson 2 - Neural Networks/softmax.py
Yasir323/PyTorch-Course
18fdc866738b4f3dd9022cfe62863697c594b54c
[ "MIT" ]
null
null
null
Lesson 2 - Neural Networks/softmax.py
Yasir323/PyTorch-Course
18fdc866738b4f3dd9022cfe62863697c594b54c
[ "MIT" ]
null
null
null
Lesson 2 - Neural Networks/softmax.py
Yasir323/PyTorch-Course
18fdc866738b4f3dd9022cfe62863697c594b54c
[ "MIT" ]
null
null
null
import numpy as np
21.333333
38
0.604167
import numpy as np def softmax(arr): expL = np.exp(arr) # Broadcasting sumExpL = sum(expL) result = [] for i in expL: result.append(i * 1.0/sumExpL) return result
151
0
23
421dca101f5521f89f68b7427dd0c0fbbe13d896
590
py
Python
tests/test_end_to_end.py
MetroStar/bitnest
a8d9cef5a17a5366e088a774ae951a0f06f97ae7
[ "MIT" ]
4
2021-09-16T21:33:13.000Z
2022-01-18T22:05:57.000Z
tests/test_end_to_end.py
MetroStar/bitnest
a8d9cef5a17a5366e088a774ae951a0f06f97ae7
[ "MIT" ]
1
2021-12-02T03:47:45.000Z
2021-12-02T03:47:45.000Z
tests/test_end_to_end.py
MetroStar/bitnest
a8d9cef5a17a5366e088a774ae951a0f06f97ae7
[ "MIT" ]
null
null
null
import pytest from models.test import StructA from models.simple import MILSTD_1553_Message from models.chapter10 import MILSTD_1553_Data_Packet_Format_1 @pytest.mark.parametrize( "struct", [StructA, MILSTD_1553_Message, MILSTD_1553_Data_Packet_Format_1] )
28.095238
78
0.733898
import pytest from models.test import StructA from models.simple import MILSTD_1553_Message from models.chapter10 import MILSTD_1553_Data_Packet_Format_1 @pytest.mark.parametrize( "struct", [StructA, MILSTD_1553_Message, MILSTD_1553_Data_Packet_Format_1] ) def test_realize_paths(struct): expression = struct....
304
0
22
67c0fe84b4a431512636cf8da382dec2c62878d2
280
py
Python
actions/servers_list.py
nzlosh/stackstorm-powerdns
f554376af25dbdfa6c0df5e376a7a02287cee1cf
[ "Apache-2.0" ]
null
null
null
actions/servers_list.py
nzlosh/stackstorm-powerdns
f554376af25dbdfa6c0df5e376a7a02287cee1cf
[ "Apache-2.0" ]
null
null
null
actions/servers_list.py
nzlosh/stackstorm-powerdns
f554376af25dbdfa6c0df5e376a7a02287cee1cf
[ "Apache-2.0" ]
null
null
null
from lib.base import PowerDNSClientAction class ServerListAction(PowerDNSClientAction): """ List available PowerDNS servers. """
23.333333
53
0.703571
from lib.base import PowerDNSClientAction class ServerListAction(PowerDNSClientAction): """ List available PowerDNS servers. """ def run(self, response_timeout=5): super(ServerList, self).run(response_timeout) return (True, self.servers_list())
110
0
27
6ed442ecc79bec374b4c5e3179ec155f952e0f3e
14,122
py
Python
tests/test_results.py
SuadeLabs/rattr
22b82d31d4cebf0a7107fa1fb496a070b2e1f4ad
[ "MIT" ]
6
2021-11-10T11:13:37.000Z
2022-01-19T16:15:17.000Z
tests/test_results.py
SuadeLabs/ratter
22b82d31d4cebf0a7107fa1fb496a070b2e1f4ad
[ "MIT" ]
13
2021-11-10T11:39:12.000Z
2022-03-01T10:27:49.000Z
tests/test_results.py
SuadeLabs/rattr
22b82d31d4cebf0a7107fa1fb496a070b2e1f4ad
[ "MIT" ]
null
null
null
from unittest import mock from rattr.analyser.context import Call, Func, Import, Name from rattr.analyser.context.symbol import Class from rattr.analyser.results import generate_results_from_ir
29.117526
82
0.361139
from unittest import mock from rattr.analyser.context import Call, Func, Import, Name from rattr.analyser.context.symbol import Class from rattr.analyser.results import generate_results_from_ir class TestResults: def test_generate_results_from_ir_no_calls(self): # No calls fn_ir = { "...
13,664
-3
265
1ee8b3b441e3e386e5383b05e72b69bbd71f1a7d
15,586
py
Python
noname.py
sxnxhxrxkx/nonamechan
4830ee9852b790ae46d66bc1ed356b3f1b0a8404
[ "MIT" ]
1
2018-11-04T14:19:14.000Z
2018-11-04T14:19:14.000Z
noname.py
sxnxhxrxkx/nonamechan
4830ee9852b790ae46d66bc1ed356b3f1b0a8404
[ "MIT" ]
null
null
null
noname.py
sxnxhxrxkx/nonamechan
4830ee9852b790ae46d66bc1ed356b3f1b0a8404
[ "MIT" ]
null
null
null
# Work with Python 3.6 import discord import numpy as np import pandas as pd import random import subprocess import weather as wt from nlu_yahoo import nluservice from MorseCode import morse # from wc import noname_wc #import softalk as sf from calender import getCalender, getCalLink, getCommandList from news import ge...
40.801047
171
0.588926
# Work with Python 3.6 import discord import numpy as np import pandas as pd import random import subprocess import weather as wt from nlu_yahoo import nluservice from MorseCode import morse # from wc import noname_wc #import softalk as sf from calender import getCalender, getCalLink, getCommandList from news import ge...
16,119
0
67
e033047e653a5d284cd1d9c31bd1fb747d758d2a
5,522
py
Python
tensorflow_federated/python/core/backends/iree/compiler.py
truthiswill/federated
d25eeac036dfc2a485120a195fd904223cfc823a
[ "Apache-2.0" ]
1
2022-02-08T01:11:14.000Z
2022-02-08T01:11:14.000Z
tensorflow_federated/python/core/backends/iree/compiler.py
truthiswill/federated
d25eeac036dfc2a485120a195fd904223cfc823a
[ "Apache-2.0" ]
null
null
null
tensorflow_federated/python/core/backends/iree/compiler.py
truthiswill/federated
d25eeac036dfc2a485120a195fd904223cfc823a
[ "Apache-2.0" ]
null
null
null
# Copyright 2020, The TensorFlow Federated Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
39.726619
80
0.74828
# Copyright 2020, The TensorFlow Federated Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
0
0
0
39571e94baa89811230fb0af0126de9bc9159675
911
py
Python
legacy/apps/smokegen_blob.py
tailintalent/PDE-Control
7031909188e7ce217da2b1628236011d1dff161a
[ "MIT" ]
22
2020-04-27T12:48:32.000Z
2022-03-23T10:41:48.000Z
legacy/apps/smokegen_blob.py
tailintalent/PDE-Control
7031909188e7ce217da2b1628236011d1dff161a
[ "MIT" ]
5
2020-12-18T14:19:23.000Z
2022-01-22T18:29:27.000Z
legacy/apps/smokegen_blob.py
tailintalent/PDE-Control
7031909188e7ce217da2b1628236011d1dff161a
[ "MIT" ]
3
2021-05-29T23:30:53.000Z
2022-02-14T06:30:32.000Z
from phi.fluidformat import * # for scene in scenes("~/data/control/squares"): # scene.remove() scenecount = 1000 for scene_index in range(scenecount): scene = new_scene("~/data/control/squares") start_x, start_y, end_x, end_y = np.random.randint(10, 110, 4) print(scene) scenelength = 32 vx =...
37.958333
92
0.614709
from phi.fluidformat import * # for scene in scenes("~/data/control/squares"): # scene.remove() scenecount = 1000 for scene_index in range(scenecount): scene = new_scene("~/data/control/squares") start_x, start_y, end_x, end_y = np.random.randint(10, 110, 4) print(scene) scenelength = 32 vx =...
0
0
0
59c7971bdd0fbc42647fd2f3df68d614494ae493
12,561
py
Python
mango/marketmaking/modelstatebuilderfactory.py
bednie/mango-explorer
4575395488e97a1f8cb52cc567e3307f11a28932
[ "MIT" ]
null
null
null
mango/marketmaking/modelstatebuilderfactory.py
bednie/mango-explorer
4575395488e97a1f8cb52cc567e3307f11a28932
[ "MIT" ]
null
null
null
mango/marketmaking/modelstatebuilderfactory.py
bednie/mango-explorer
4575395488e97a1f8cb52cc567e3307f11a28932
[ "MIT" ]
null
null
null
# # ⚠ Warning # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT # LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN # NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIA...
33.857143
124
0.670727
# # ⚠ Warning # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT # LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN # NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIA...
10,922
190
183
5d4633ef46069b638eb4cd14d524fd4a344a3b49
2,753
py
Python
backend/tomato/lib/cmd/bittorrent.py
dswd/ToMaTo
355fd3a8c7f95dc72c62383b3edfa8f6c0396bf4
[ "BSD-4-Clause-UC" ]
2
2016-11-10T06:12:05.000Z
2016-11-10T06:12:10.000Z
hostmanager/tomato/lib/cmd/bittorrent.py
dswd/ToMaTo
355fd3a8c7f95dc72c62383b3edfa8f6c0396bf4
[ "BSD-4-Clause-UC" ]
2
2015-01-19T16:00:24.000Z
2015-01-20T11:33:56.000Z
backend/tomato/lib/cmd/bittorrent.py
dswd/ToMaTo
355fd3a8c7f95dc72c62383b3edfa8f6c0396bf4
[ "BSD-4-Clause-UC" ]
1
2016-11-10T06:12:15.000Z
2016-11-10T06:12:15.000Z
# -*- coding: utf-8 -*- # ToMaTo (Topology management software) # Copyright (C) 2010 Dennis Schwerdel, University of Kaiserslautern # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either vers...
30.588889
155
0.726843
# -*- coding: utf-8 -*- # ToMaTo (Topology management software) # Copyright (C) 2010 Dennis Schwerdel, University of Kaiserslautern # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either vers...
1,641
0
185
d12742fbf604ea579708c7757f0f38ebaac260d8
667
py
Python
hackathons/migrations/0014_auto_20190703_0453.py
Tookmund/hackerforce
d757910db1631e26e489a10a99fa67cd74292c4e
[ "Apache-2.0" ]
11
2019-11-11T23:27:21.000Z
2021-07-19T16:41:44.000Z
hackathons/migrations/0014_auto_20190703_0453.py
Tookmund/hackerforce
d757910db1631e26e489a10a99fa67cd74292c4e
[ "Apache-2.0" ]
11
2019-12-24T17:10:05.000Z
2021-06-09T18:22:59.000Z
hackathons/migrations/0014_auto_20190703_0453.py
hackumass/hackerforce
dfb6ac1304a7db21853765de9da795e8e9ef20bf
[ "Apache-2.0" ]
7
2019-11-21T03:32:06.000Z
2021-07-18T15:30:29.000Z
# Generated by Django 2.1.9 on 2019-07-03 04:53 from django.db import migrations, models
27.791667
161
0.593703
# Generated by Django 2.1.9 on 2019-07-03 04:53 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('hackathons', '0013_auto_20190702_0649'), ] operations = [ migrations.AddField( model_name='lead', name='times_contac...
0
553
23
ed9008157534fcd41bdd7451e2a5f8dc32ad3e1a
7,450
py
Python
oidv6/samples/run.py
chuangzhu/OIDv6
e46e66770c520c02e268f0b021fa72451c79ad1e
[ "MIT" ]
null
null
null
oidv6/samples/run.py
chuangzhu/OIDv6
e46e66770c520c02e268f0b021fa72451c79ad1e
[ "MIT" ]
null
null
null
oidv6/samples/run.py
chuangzhu/OIDv6
e46e66770c520c02e268f0b021fa72451c79ad1e
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Массовая загрузка набора данных Open Images Dataset V6 python oidv6/samples/run.py <command> --classes названия_классов_или_текстовый_файл [--dataset Dataset --type_data train --limit 0 --multi_classes --yes --no_labels --hide_metadata --no_clear_shell] """ # ##...
45.426829
120
0.468725
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Массовая загрузка набора данных Open Images Dataset V6 python oidv6/samples/run.py <command> --classes названия_классов_или_текстовый_файл [--dataset Dataset --type_data train --limit 0 --multi_classes --yes --no_labels --hide_metadata --no_clear_shell] """ # ##...
359
0
77
fe4004b04e6ea7f0d42e97de6ac9ec98151e1cda
4,585
py
Python
tests/_internal/test_auth_handling.py
unparalleled-js/py42
8c6b054ddd8c2bfea92bf77b0d648af76f1efcf1
[ "MIT" ]
1
2020-08-18T22:00:22.000Z
2020-08-18T22:00:22.000Z
tests/_internal/test_auth_handling.py
unparalleled-js/py42
8c6b054ddd8c2bfea92bf77b0d648af76f1efcf1
[ "MIT" ]
null
null
null
tests/_internal/test_auth_handling.py
unparalleled-js/py42
8c6b054ddd8c2bfea92bf77b0d648af76f1efcf1
[ "MIT" ]
1
2021-05-10T23:33:34.000Z
2021-05-10T23:33:34.000Z
import pytest from requests import Response from py42._internal.auth_handling import AuthHandler from py42._internal.auth_handling import HeaderModifier from py42._internal.auth_handling import TokenProvider ORIGINAL_VALUE = "test-original-value" UPDATED_VALUE = "test-updated-value" CUSTOM_NAME = "Custom-Name" DEFAUL...
38.208333
116
0.844711
import pytest from requests import Response from py42._internal.auth_handling import AuthHandler from py42._internal.auth_handling import HeaderModifier from py42._internal.auth_handling import TokenProvider ORIGINAL_VALUE = "test-original-value" UPDATED_VALUE = "test-updated-value" CUSTOM_NAME = "Custom-Name" DEFAUL...
3,793
0
366
a879ae95f3a28053a492d4080bbb2ca055bd192d
5,058
py
Python
python/tensor/tensor_new.py
BenOsborn/Cerci
5785ae0c9db8a88a5ac8d91aed29cdf0c0c7854a
[ "Apache-2.0" ]
null
null
null
python/tensor/tensor_new.py
BenOsborn/Cerci
5785ae0c9db8a88a5ac8d91aed29cdf0c0c7854a
[ "Apache-2.0" ]
null
null
null
python/tensor/tensor_new.py
BenOsborn/Cerci
5785ae0c9db8a88a5ac8d91aed29cdf0c0c7854a
[ "Apache-2.0" ]
null
null
null
# There is probably a more efficient way to do this # Now I need to do the actual backwards function
38.318182
124
0.619217
class AddElementwise: @staticmethod def forward(matrix_left, matrix_right, backwards=False): assert(matrix_left.shape == matrix_right.shape) new_tensor = [a+b for a, b in zip(matrix_left.tensor, matrix_right.tensor)] if (not backwards): return Tensor(new_tensor, matrix_left...
4,366
275
307
467c004ada7353bc4bb87367e3774a1bba52e193
3,027
py
Python
dfu/host/hex2dfu.py
LeHonk/usb-stack
3869706a951eb00bf9ab630f0adb27c5676c3426
[ "MIT" ]
null
null
null
dfu/host/hex2dfu.py
LeHonk/usb-stack
3869706a951eb00bf9ab630f0adb27c5676c3426
[ "MIT" ]
null
null
null
dfu/host/hex2dfu.py
LeHonk/usb-stack
3869706a951eb00bf9ab630f0adb27c5676c3426
[ "MIT" ]
null
null
null
#!/usr/bin/env python2.7 # TODO: Actual values devid = { 'p24fj256gb106': 0xFFFF , 'p18f2550': 0x1234 } targetmem = { 'int_flash': 0 , 'int_eeprom': 1 # , 'ext_flash': 2 # , 'ext_eeprom': 3 } # TODO: Actual values maxmem = { 'p24fj256gb106': {'int_flash':255*1024, 'int_eeprom':2048} , 'p18f...
36.914634
164
0.682524
#!/usr/bin/env python2.7 # TODO: Actual values devid = { 'p24fj256gb106': 0xFFFF , 'p18f2550': 0x1234 } targetmem = { 'int_flash': 0 , 'int_eeprom': 1 # , 'ext_flash': 2 # , 'ext_eeprom': 3 } # TODO: Actual values maxmem = { 'p24fj256gb106': {'int_flash':255*1024, 'int_eeprom':2048} , 'p18f...
0
0
0
43d92d931d95fafab64fab33655d9809b86351cf
2,098
py
Python
plots/midterm/FR_illustration.py
jokteur/ASMA
25ac8a0455c680232d56c18d31de62c3188b7153
[ "MIT" ]
2
2021-11-01T09:13:17.000Z
2022-03-08T14:34:16.000Z
plots/midterm/FR_illustration.py
jokteur/ASMA
25ac8a0455c680232d56c18d31de62c3188b7153
[ "MIT" ]
null
null
null
plots/midterm/FR_illustration.py
jokteur/ASMA
25ac8a0455c680232d56c18d31de62c3188b7153
[ "MIT" ]
null
null
null
import time import copy import os import numpy as np import matplotlib import matplotlib.pyplot as plt from matplotlib import gridspec from matplotlib.animation import FuncAnimation import matplotlib.animation as animation import flowrect from flowrect.simulations.util import calculate_age, calculate_mt, eta_SRM fro...
22.804348
87
0.64204
import time import copy import os import numpy as np import matplotlib import matplotlib.pyplot as plt from matplotlib import gridspec from matplotlib.animation import FuncAnimation import matplotlib.animation as animation import flowrect from flowrect.simulations.util import calculate_age, calculate_mt, eta_SRM fro...
0
0
0
29d451b8dd8c0ba5e18591eb336cbb335fe1a3fb
3,311
py
Python
tk_recoder/tab_text_converter.py
anton-pribora/py-recoder
ee3cd3a6dc9ff78081ed963a16d765d0a004f4d6
[ "MIT" ]
null
null
null
tk_recoder/tab_text_converter.py
anton-pribora/py-recoder
ee3cd3a6dc9ff78081ed963a16d765d0a004f4d6
[ "MIT" ]
null
null
null
tk_recoder/tab_text_converter.py
anton-pribora/py-recoder
ee3cd3a6dc9ff78081ed963a16d765d0a004f4d6
[ "MIT" ]
null
null
null
import tkinter as tk from tkinter import ttk import tkinter.scrolledtext as st from tkinter import filedialog from functools import partial """ Вкладка "перекодировать текст" """ def init_frame(self, frame: tk.Frame): """ Инициализация вкладки "Перекодировать текст" :param tk_recoder.gui.Gui self: Осно...
38.952941
116
0.598309
import tkinter as tk from tkinter import ttk import tkinter.scrolledtext as st from tkinter import filedialog from functools import partial """ Вкладка "перекодировать текст" """ def init_frame(self, frame: tk.Frame): """ Инициализация вкладки "Перекодировать текст" :param tk_recoder.gui.Gui self: Осно...
1,297
0
54
e35513963af5102e6dfdfe622a13488cd9004a55
595
py
Python
biggee.py
simretmengesha/PublicNLPA
eb62b32a3eb3f7db6fc03579c36f252b72266b65
[ "MIT" ]
null
null
null
biggee.py
simretmengesha/PublicNLPA
eb62b32a3eb3f7db6fc03579c36f252b72266b65
[ "MIT" ]
null
null
null
biggee.py
simretmengesha/PublicNLPA
eb62b32a3eb3f7db6fc03579c36f252b72266b65
[ "MIT" ]
null
null
null
# Bigram formation # using list comprehension + enumerate() + split() # initializing list test_list = ['በሙቀት ጀምሮ በቅዝቃዜ መጨረስ የዚህ ዓለም መገለጫ ሆኗል እልልታ በኡኡታ፣ ሠርግ በግልግል፣ ማሬ የሚለው ቃል እሬቴ በሚልይለወጣል', 'ጨርሰው የማይሰሩ አሳሳቢ አይደሉም፣ አይሠሩምና። ብልሽት ያለባቸው ማሞቂያዎች ግን ሰውዬው ሲሞክራቸው ይሠራሉ '] # printing the original list print ("The original list ...
33.055556
171
0.692437
# Bigram formation # using list comprehension + enumerate() + split() # initializing list test_list = ['በሙቀት ጀምሮ በቅዝቃዜ መጨረስ የዚህ ዓለም መገለጫ ሆኗል እልልታ በኡኡታ፣ ሠርግ በግልግል፣ ማሬ የሚለው ቃል እሬቴ በሚልይለወጣል', 'ጨርሰው የማይሰሩ አሳሳቢ አይደሉም፣ አይሠሩምና። ብልሽት ያለባቸው ማሞቂያዎች ግን ሰውዬው ሲሞክራቸው ይሠራሉ '] # printing the original list print ("The original list ...
0
0
0
be1ca7378afd4819c2e9608b28938a17a267e2d1
2,342
py
Python
chia/consensus/coinbase.py
Hydrangea-Network/hydrangea-blockchain
d15662329958dbdaa9cbd99733ba729f0e74ce54
[ "Apache-2.0" ]
1
2022-03-15T06:41:49.000Z
2022-03-15T06:41:49.000Z
chia/consensus/coinbase.py
Hydrangea-Network/hydrangea-blockchain
d15662329958dbdaa9cbd99733ba729f0e74ce54
[ "Apache-2.0" ]
null
null
null
chia/consensus/coinbase.py
Hydrangea-Network/hydrangea-blockchain
d15662329958dbdaa9cbd99733ba729f0e74ce54
[ "Apache-2.0" ]
null
null
null
from blspy import G1Element from chia.types.blockchain_format.coin import Coin from chia.types.blockchain_format.sized_bytes import bytes32 from chia.util.ints import uint32, uint64 from chia.wallet.puzzles.p2_delegated_puzzle_or_hidden_puzzle import puzzle_for_pk
45.038462
114
0.799744
from blspy import G1Element from chia.types.blockchain_format.coin import Coin from chia.types.blockchain_format.sized_bytes import bytes32 from chia.util.ints import uint32, uint64 from chia.wallet.puzzles.p2_delegated_puzzle_or_hidden_puzzle import puzzle_for_pk def create_puzzlehash_for_pk(pub_key: G1Element) -> ...
1,816
0
253
7190d4a76e2659164c8852533d26134a504bdea3
1,524
py
Python
apps/dcl/mdl/m_mdl.py
yt7589/cvep
1f77169bdbb614ea32a30d98eba87b028b19890b
[ "Apache-2.0" ]
null
null
null
apps/dcl/mdl/m_mdl.py
yt7589/cvep
1f77169bdbb614ea32a30d98eba87b028b19890b
[ "Apache-2.0" ]
null
null
null
apps/dcl/mdl/m_mdl.py
yt7589/cvep
1f77169bdbb614ea32a30d98eba87b028b19890b
[ "Apache-2.0" ]
1
2020-09-24T04:28:20.000Z
2020-09-24T04:28:20.000Z
# # from os import stat import pymongo from apps.wxs.model.m_mongodb import MMongoDb
33.130435
83
0.599738
# # from os import stat import pymongo from apps.wxs.model.m_mongodb import MMongoDb class MMdl(object): def __init__(self): self.name = 'apps.wxs.model.MModel' @staticmethod def is_model_exists(model_name): query_cond = {'model_name': model_name} fields = {'model_id'...
919
515
24
04031ae8151added17a1d39405820110dd82354f
661
py
Python
dags/book_data.py
blue-yonder/airflow-plugin-demo
c7044f97532c2f2a3d674762498cb6e58c3e1a1c
[ "CC0-1.0" ]
55
2016-07-23T21:09:43.000Z
2021-05-26T23:48:55.000Z
dags/book_data.py
blue-yonder/airflow-plugin-demo
c7044f97532c2f2a3d674762498cb6e58c3e1a1c
[ "CC0-1.0" ]
null
null
null
dags/book_data.py
blue-yonder/airflow-plugin-demo
c7044f97532c2f2a3d674762498cb6e58c3e1a1c
[ "CC0-1.0" ]
21
2016-10-24T17:15:32.000Z
2021-07-02T10:38:25.000Z
""" Workflow definition to book data """ from __future__ import division, absolute_import, print_function from datetime import datetime, timedelta from airflow import DAG from airflow.operators import ( BookData ) dag_id = "book_data" schedule_interval = None default_args = { 'owner': 'europython', 'de...
19.441176
64
0.709531
""" Workflow definition to book data """ from __future__ import division, absolute_import, print_function from datetime import datetime, timedelta from airflow import DAG from airflow.operators import ( BookData ) dag_id = "book_data" schedule_interval = None default_args = { 'owner': 'europython', 'de...
0
0
0
8e453bcd4f0e7baa3c63a6cdd373f14f6c2a93bc
1,103
py
Python
alex/components/tts/test_voicerss.py
oplatek/alex
73af644ec35c8a1cd0c37cd478c2afc1db717e0b
[ "Apache-2.0" ]
184
2015-02-11T04:14:41.000Z
2022-03-24T21:43:58.000Z
alex/components/tts/test_voicerss.py
oplatek/alex
73af644ec35c8a1cd0c37cd478c2afc1db717e0b
[ "Apache-2.0" ]
69
2015-01-11T04:57:22.000Z
2019-04-24T10:25:56.000Z
alex/components/tts/test_voicerss.py
oplatek/alex
73af644ec35c8a1cd0c37cd478c2afc1db717e0b
[ "Apache-2.0" ]
61
2015-03-04T10:52:13.000Z
2022-03-04T12:14:06.000Z
from unittest import TestCase from alex.components.tts.voicerss import VoiceRssTTS import alex.utils.audio as audio import wave from alex.utils.config import as_project_path __author__ = 'm2rtin'
30.638889
91
0.56029
from unittest import TestCase from alex.components.tts.voicerss import VoiceRssTTS import alex.utils.audio as audio import wave from alex.utils.config import as_project_path __author__ = 'm2rtin' class TestVoiceRssTTS(TestCase): def test_synthesise_en(self): text = 'Hello, this is alex, the call is reco...
845
11
49
1639b5d6c5f1c18d8197d2c4d3ba9d689afeb72f
2,096
py
Python
tests/test_cpu_ins_txa.py
hspaans/6502-emulator
02b802c43caf8a04833dd1f3d48077f9e2175e7e
[ "MIT" ]
null
null
null
tests/test_cpu_ins_txa.py
hspaans/6502-emulator
02b802c43caf8a04833dd1f3d48077f9e2175e7e
[ "MIT" ]
null
null
null
tests/test_cpu_ins_txa.py
hspaans/6502-emulator
02b802c43caf8a04833dd1f3d48077f9e2175e7e
[ "MIT" ]
null
null
null
""" TXA - Transfer Register X to Accumulator. A = X Copies the current contents of the X register into the accumulator and sets the zero and negative flags as appropriate. Processor Status after use: +------+-------------------+--------------------------+ | Flag | Description | State | +===...
30.823529
75
0.380725
""" TXA - Transfer Register X to Accumulator. A = X Copies the current contents of the X register into the accumulator and sets the zero and negative flags as appropriate. Processor Status after use: +------+-------------------+--------------------------+ | Flag | Description | State | +===...
0
0
0
68da65c7b02b2e46698372cf6c71f0e9a96ad209
392
py
Python
HSCTF/crypto/Randomization 1/solve.py
deut-erium/WriteUps
36b4193f5fab9f95527a48626ecba631d5a03796
[ "MIT" ]
11
2020-06-06T05:28:27.000Z
2022-01-09T00:42:49.000Z
2020/HSCTF/crypto/Randomization 1/solve.py
CSEA-IITB/WriteUps
46e7f36b0c4ef182cbaf375fd10fda954b6667a0
[ "MIT" ]
1
2020-09-06T18:19:55.000Z
2020-09-06T18:19:55.000Z
HSCTF/crypto/Randomization 1/solve.py
deut-erium/WriteUps
36b4193f5fab9f95527a48626ecba631d5a03796
[ "MIT" ]
6
2020-06-06T05:36:43.000Z
2021-08-11T10:17:18.000Z
import pwn HOST, PORT = "crypto.hsctf.com", 6001 rem = pwn.remote(HOST, PORT) rem.recvline() data = rem.recvline() initial = data.decode().strip().split(':')[-1] print(initial) initial = int(initial) for i in range(10): rem.sendline(str(nextval(initial)).encode()) print(rem.recvline().decode()) initial ...
19.6
48
0.668367
import pwn HOST, PORT = "crypto.hsctf.com", 6001 rem = pwn.remote(HOST, PORT) rem.recvline() data = rem.recvline() def nextval(num): return (num*0x25 + 0x41)&0xff initial = data.decode().strip().split(':')[-1] print(initial) initial = int(initial) for i in range(10): rem.sendline(str(nextval(initial)).enco...
30
0
23
f43edadce6082236a716b23df8d2ddde42461d1b
4,086
py
Python
camply/utils/yaml_utils.py
juftin/camply
d365ed10a62248edc428a68a8ee96743c4b8fa98
[ "MIT" ]
123
2021-05-19T04:56:47.000Z
2022-03-23T19:04:45.000Z
camply/utils/yaml_utils.py
juftin/camply
d365ed10a62248edc428a68a8ee96743c4b8fa98
[ "MIT" ]
11
2021-05-25T20:22:14.000Z
2022-03-05T16:31:32.000Z
camply/utils/yaml_utils.py
juftin/camply
62d1a4423710a5e0f0366b5e9204b3639b358070
[ "MIT" ]
21
2021-05-24T05:53:24.000Z
2022-03-31T02:03:41.000Z
#!/usr/bin/env python3 # Author:: Justin Flannery (mailto:juftin@juftin.com) """ YAML Utilities for Camply """ from datetime import datetime import logging import os from pathlib import Path from re import compile from typing import Dict, Tuple from yaml import load, SafeLoader from camply.config import Search...
34.627119
95
0.659325
#!/usr/bin/env python3 # Author:: Justin Flannery (mailto:juftin@juftin.com) """ YAML Utilities for Camply """ from datetime import datetime import logging import os from pathlib import Path from re import compile from typing import Dict, Tuple from yaml import load, SafeLoader from camply.config import Search...
0
0
0
b31ed0506aad94a74db97c7798537089fe97130a
9,136
py
Python
TD/src/plots_nips2016.py
lucasgit/rl
1c4bbfad0b11c040ece2b9a384f3781de2c729ca
[ "MIT" ]
1
2022-01-21T13:52:50.000Z
2022-01-21T13:52:50.000Z
TD/src/plots_nips2016.py
lucaslehnert/pgq
1c4bbfad0b11c040ece2b9a384f3781de2c729ca
[ "MIT" ]
null
null
null
TD/src/plots_nips2016.py
lucaslehnert/pgq
1c4bbfad0b11c040ece2b9a384f3781de2c729ca
[ "MIT" ]
null
null
null
''' Created on May 23, 2016 @author: Lucas Lehnert (lucas.lehnert@mail.mcgill.ca) Script to generate all plots from the NIPS 2016 paper. ''' import matplotlib matplotlib.use( 'agg' ) matplotlib.rcParams['text.usetex'] = True matplotlib.rcParams['text.latex.preamble'] = [r'\usepackage{amsmath}'] import matplotlib.p...
38.225941
118
0.611208
''' Created on May 23, 2016 @author: Lucas Lehnert (lucas.lehnert@mail.mcgill.ca) Script to generate all plots from the NIPS 2016 paper. ''' import matplotlib matplotlib.use( 'agg' ) matplotlib.rcParams['text.usetex'] = True matplotlib.rcParams['text.latex.preamble'] = [r'\usepackage{amsmath}'] import matplotlib.p...
8,361
0
206
7685a9c20c104421e0db1cc9e039a8d431b744a3
852
py
Python
project/Support/Code/actions/_accounts/account_group/edit/basic.py
fael07/Blog-Django-with-CBV
269747b2e663a34b99acae6368db49c6ad37c2b8
[ "MIT" ]
null
null
null
project/Support/Code/actions/_accounts/account_group/edit/basic.py
fael07/Blog-Django-with-CBV
269747b2e663a34b99acae6368db49c6ad37c2b8
[ "MIT" ]
null
null
null
project/Support/Code/actions/_accounts/account_group/edit/basic.py
fael07/Blog-Django-with-CBV
269747b2e663a34b99acae6368db49c6ad37c2b8
[ "MIT" ]
null
null
null
from Support.Code.actions.Support.utils.functions_dict import get_name from django.utils.text import slugify
38.727273
97
0.681925
from Support.Code.actions.Support.utils.functions_dict import get_name from django.utils.text import slugify def save_user_basic_and_update_user_save(request): user = request.user name: str = request.POST.get('name') new_file = request.FILES.get('photo') if new_file: user.photo = new_file ...
720
0
23
434db8b2f563775855ef95e274774e84780d15b1
5,444
py
Python
tests/aggregate/elements.py
nadirhamid/protean
d31bc634e05c9221e82136bf18c2ceaa0982c1c8
[ "BSD-3-Clause" ]
null
null
null
tests/aggregate/elements.py
nadirhamid/protean
d31bc634e05c9221e82136bf18c2ceaa0982c1c8
[ "BSD-3-Clause" ]
null
null
null
tests/aggregate/elements.py
nadirhamid/protean
d31bc634e05c9221e82136bf18c2ceaa0982c1c8
[ "BSD-3-Clause" ]
null
null
null
# Standard Library Imports from datetime import datetime from typing import List # Protean from protean.core.aggregate import BaseAggregate from protean.core.entity import BaseEntity from protean.core.field.association import HasMany, HasOne, Reference from protean.core.field.basic import Auto, DateTime, Integer, Stri...
25.203704
88
0.722998
# Standard Library Imports from datetime import datetime from typing import List # Protean from protean.core.aggregate import BaseAggregate from protean.core.entity import BaseEntity from protean.core.field.association import HasMany, HasOne, Reference from protean.core.field.basic import Auto, DateTime, Integer, Stri...
78
3,899
711
852e2170c0125511f1261888c3694601b5d7bab3
10,455
py
Python
bert_senteval.py
heartcored98/Trasnformer_Anatomy
2100f690947abe513d9e5fef9df0dd9e44e17a43
[ "MIT" ]
16
2020-07-05T20:50:23.000Z
2021-04-26T20:13:27.000Z
bert_senteval.py
heartcored98/Trasnformer_Anatomy
2100f690947abe513d9e5fef9df0dd9e44e17a43
[ "MIT" ]
null
null
null
bert_senteval.py
heartcored98/Trasnformer_Anatomy
2100f690947abe513d9e5fef9df0dd9e44e17a43
[ "MIT" ]
3
2020-11-02T14:32:07.000Z
2021-12-15T13:20:15.000Z
#!/usr/bin/env python # coding: utf-8 # In[ ]: #%load_ext autoreload #%autoreload 2 # In[ ]: import sys import torch import numpy as np import time import hashlib from os import listdir from os.path import isfile, join import pickle import argparse import json from tqdm import tqdm from copy import deepcopy impo...
33.402556
190
0.616069
#!/usr/bin/env python # coding: utf-8 # In[ ]: #%load_ext autoreload #%autoreload 2 # In[ ]: import sys import torch import numpy as np import time import hashlib from os import listdir from os.path import isfile, join import pickle import argparse import json from tqdm import tqdm from copy import deepcopy impo...
6,340
0
115
0668d699300db3de6998a525c2564293163ee37d
2,963
py
Python
sensors_test.py
kipkemoimayor/Traffic_control_system
840c01b8c031d613524b87b91c8d938a33348b3c
[ "MIT" ]
2
2019-06-15T09:58:08.000Z
2020-08-24T09:51:37.000Z
sensors_test.py
kipkemoimayor/Traffic_control_system
840c01b8c031d613524b87b91c8d938a33348b3c
[ "MIT" ]
null
null
null
sensors_test.py
kipkemoimayor/Traffic_control_system
840c01b8c031d613524b87b91c8d938a33348b3c
[ "MIT" ]
2
2019-06-26T07:30:05.000Z
2020-08-24T09:51:42.000Z
import RPi.GPIO as GPIO import time dis=0 while True: # Setup triggers and Echos of all sensors GPIO.setmode(GPIO.BOARD) TRIG=11 ECHO=13 GPIO.setup(TRIG,GPIO.OUT) GPIO.setup(3,GPIO.OUT) GPIO.setup(ECHO,GPIO.IN) GPIO.setup(5,GPIO.IN) GPIO.setup(35,GPIO.OUT) GPIO.setup(31,GPIO.OU...
20.576389
45
0.552143
import RPi.GPIO as GPIO import time dis=0 while True: # Setup triggers and Echos of all sensors GPIO.setmode(GPIO.BOARD) TRIG=11 ECHO=13 GPIO.setup(TRIG,GPIO.OUT) GPIO.setup(3,GPIO.OUT) GPIO.setup(ECHO,GPIO.IN) GPIO.setup(5,GPIO.IN) GPIO.setup(35,GPIO.OUT) GPIO.setup(31,GPIO.OU...
1,922
0
162
d7a3717a0624d7d45c29409cb86a2357bad037fd
2,829
py
Python
xbrlparser.py
emhlaos/bmv-scrapper
70df08cddae4c2b3e472c3c22e639fca07a14c86
[ "MIT" ]
4
2018-03-01T03:22:45.000Z
2021-09-25T02:44:51.000Z
xbrlparser.py
emhlaos/bmv-scrapper
70df08cddae4c2b3e472c3c22e639fca07a14c86
[ "MIT" ]
null
null
null
xbrlparser.py
emhlaos/bmv-scrapper
70df08cddae4c2b3e472c3c22e639fca07a14c86
[ "MIT" ]
3
2020-04-22T15:10:29.000Z
2021-06-23T03:45:08.000Z
""" Copyright C.C.: Emiliano Hernandez Laos https://github.com/emhlaos/ 28/02/2018 """ from urllib.request import urlopen import os from io import BytesIO from zipfile import ZipFile #LOAD FUNCTION: currentdirectory = os.getcwd() xbrldirectory = currentdirectory+"/xbrl" if not os.path.exist...
36.74026
112
0.487098
""" Copyright C.C.: Emiliano Hernandez Laos https://github.com/emhlaos/ 28/02/2018 """ from urllib.request import urlopen import os from io import BytesIO from zipfile import ZipFile #LOAD FUNCTION: currentdirectory = os.getcwd() xbrldirectory = currentdirectory+"/xbrl" if not os.path.exist...
0
0
0
b56ad7a7bc1fe9805d9331eef23690d49bce762e
2,351
py
Python
hpedockerplugin/cmd/cmd_createshare.py
renovate-bot/python-hpedockerplugin
b7fa6b3193fa6dd42574585b4c621ff6a16babc9
[ "Apache-2.0" ]
49
2016-06-14T22:25:40.000Z
2021-04-05T05:00:59.000Z
hpedockerplugin/cmd/cmd_createshare.py
imran-ansari/python-hpedockerplugin
e2726f48ac793dc894100e3772c40ce89bfe9bb8
[ "Apache-2.0" ]
550
2016-07-25T12:01:12.000Z
2021-11-15T17:52:40.000Z
hpedockerplugin/cmd/cmd_createshare.py
imran-ansari/python-hpedockerplugin
e2726f48ac793dc894100e3772c40ce89bfe9bb8
[ "Apache-2.0" ]
96
2016-06-01T22:07:03.000Z
2021-06-22T09:05:05.000Z
import six from oslo_log import log as logging from hpedockerplugin.cmd import cmd from hpedockerplugin import exception LOG = logging.getLogger(__name__)
40.534483
78
0.633348
import six from oslo_log import log as logging from hpedockerplugin.cmd import cmd from hpedockerplugin import exception LOG = logging.getLogger(__name__) class CreateShareCmd(cmd.Cmd): def __init__(self, file_mgr, share_args): self._file_mgr = file_mgr self._etcd = file_mgr.get_etcd() ...
2,080
9
103
fd444aca0dbc53e3b47c5e154be553cc2f88d847
156
py
Python
tests/asp/cautious/sum.example11.cautious.asp.test.py
bernardocuteri/wasp
05c8f961776dbdbf7afbf905ee00fc262eba51ad
[ "Apache-2.0" ]
19
2015-12-03T08:53:45.000Z
2022-03-31T02:09:43.000Z
tests/asp/cautious/sum.example11.cautious.asp.test.py
bernardocuteri/wasp
05c8f961776dbdbf7afbf905ee00fc262eba51ad
[ "Apache-2.0" ]
80
2017-11-25T07:57:32.000Z
2018-06-10T19:03:30.000Z
tests/asp/cautious/sum.example11.cautious.asp.test.py
bernardocuteri/wasp
05c8f961776dbdbf7afbf905ee00fc262eba51ad
[ "Apache-2.0" ]
6
2015-01-15T07:51:48.000Z
2020-06-18T14:47:48.000Z
input = """ 1 2 3 2 3 4 5 1 3 3 2 2 4 5 1 4 3 2 2 3 5 1 5 0 0 5 6 4 3 0 2 3 4 2 2 2 1 1 1 1 6 0 4 c 3 b 2 a 0 B+ 0 B- 1 0 1 """ output = """ INCOHERENT """
6.782609
21
0.487179
input = """ 1 2 3 2 3 4 5 1 3 3 2 2 4 5 1 4 3 2 2 3 5 1 5 0 0 5 6 4 3 0 2 3 4 2 2 2 1 1 1 1 6 0 4 c 3 b 2 a 0 B+ 0 B- 1 0 1 """ output = """ INCOHERENT """
0
0
0
a7a70d0fc999c0ac172fafb16600e4829015a6d0
1,660
py
Python
code4step2/register_images.py
yukeyi/MCDS-Capstone
f7ce48fc5d3f5f96c1f29556585ed2338683c7d2
[ "MIT" ]
null
null
null
code4step2/register_images.py
yukeyi/MCDS-Capstone
f7ce48fc5d3f5f96c1f29556585ed2338683c7d2
[ "MIT" ]
null
null
null
code4step2/register_images.py
yukeyi/MCDS-Capstone
f7ce48fc5d3f5f96c1f29556585ed2338683c7d2
[ "MIT" ]
null
null
null
import os import shutil import pickle as pkl import numpy as np import SimpleITK as sitk from data_registration import RegHearts LOAD_DIR = '/pylon5/ac5616p/Data/HeartSegmentationProject/CAP_challenge/CAP_challenge_training_set/test2/brain/total/' ''' Generator function to get one pair of fixed and moving image at a ...
31.923077
118
0.655422
import os import shutil import pickle as pkl import numpy as np import SimpleITK as sitk from data_registration import RegHearts LOAD_DIR = '/pylon5/ac5616p/Data/HeartSegmentationProject/CAP_challenge/CAP_challenge_training_set/test2/brain/total/' ''' Generator function to get one pair of fixed and moving image at a ...
1,109
0
44
d2dda46de2a802ec9a1d557c8bb1545bff13d2d7
4,235
py
Python
octoprint_LCD1602/__init__.py
Marien1993/LCD-octoprint
eae8fd9b2ab5a5799b25b6f0684b081c77cc0aad
[ "MIT" ]
null
null
null
octoprint_LCD1602/__init__.py
Marien1993/LCD-octoprint
eae8fd9b2ab5a5799b25b6f0684b081c77cc0aad
[ "MIT" ]
null
null
null
octoprint_LCD1602/__init__.py
Marien1993/LCD-octoprint
eae8fd9b2ab5a5799b25b6f0684b081c77cc0aad
[ "MIT" ]
null
null
null
# coding=utf-8 """ LCD1602 Plugin for Octoprint """ from __future__ import absolute_import from octoprint.printer.estimation import PrintTimeEstimator import octoprint.plugin import octoprint.events from RPLCD.i2c import CharLCD import time import datetime import os import sys from fake_rpi import printf import fak...
27.147436
120
0.651948
# coding=utf-8 """ LCD1602 Plugin for Octoprint """ from __future__ import absolute_import from octoprint.printer.estimation import PrintTimeEstimator import octoprint.plugin import octoprint.events from RPLCD.i2c import CharLCD import time import datetime import os import sys from fake_rpi import printf import fak...
3,542
141
179
f282ae2d0aacafe56cfc3e396879274fc628595a
4,876
py
Python
assignment2/PythonApplication1.py
JungChaeMoon/room_escape
1417caf6b9cc6228b2f1faf533d73c986cc04704
[ "MIT" ]
null
null
null
assignment2/PythonApplication1.py
JungChaeMoon/room_escape
1417caf6b9cc6228b2f1faf533d73c986cc04704
[ "MIT" ]
null
null
null
assignment2/PythonApplication1.py
JungChaeMoon/room_escape
1417caf6b9cc6228b2f1faf533d73c986cc04704
[ "MIT" ]
null
null
null
from bangtal import * import random import copy import time setGameOption(GameOption.INVENTORY_BUTTON, False) setGameOption(GameOption.MESSAGE_BOX_BUTTON, False) main_scene = Scene("퍼즐게임", "images/backgroud.PNG") scene1 = Scene("Loopy 퍼즐", "images/backgroud.PNG") scene2 ...
14.426036
209
0.561116
from bangtal import * import random import copy import time setGameOption(GameOption.INVENTORY_BUTTON, False) setGameOption(GameOption.MESSAGE_BOX_BUTTON, False) main_scene = Scene("퍼즐게임", "images/backgroud.PNG") scene1 = Scene("Loopy 퍼즐", "images/backgroud.PNG") scene2 ...
3,310
0
250
40b5fd4c0ce2924a38851bdad6bd0745fb2bd736
349
py
Python
akeydo/plugins/__init__.py
dangle/vfio-kvm
13ed6f6b2ebbc2e23afe267866e321a2fd51a337
[ "MIT" ]
30
2021-01-15T18:22:26.000Z
2021-06-02T14:10:40.000Z
akeydo/plugins/__init__.py
dangle/vfio-kvm
13ed6f6b2ebbc2e23afe267866e321a2fd51a337
[ "MIT" ]
11
2021-01-23T05:37:06.000Z
2021-04-21T21:50:37.000Z
akeydo/plugins/__init__.py
dangle/vfio-kvm
13ed6f6b2ebbc2e23afe267866e321a2fd51a337
[ "MIT" ]
null
null
null
import sys if sys.version_info < (3, 10): from importlib_metadata import entry_points else: from importlib.metadata import entry_points from . import ( cpu, devices, gpu, memory, ) __all__ = ( "cpu", "devices", "gpu", "installed_plugins", "memory", ) installed_plugins = ...
13.96
48
0.647564
import sys if sys.version_info < (3, 10): from importlib_metadata import entry_points else: from importlib.metadata import entry_points from . import ( cpu, devices, gpu, memory, ) __all__ = ( "cpu", "devices", "gpu", "installed_plugins", "memory", ) installed_plugins = ...
0
0
0
5d36cde055910519c7a52a7522ef39460d4a9945
3,888
py
Python
pltools/train/module.py
PhoenixDL/PytorchLightningTools
86185062d4792e6d5eae002a5594bb7b900106a1
[ "MIT" ]
3
2020-05-18T06:34:52.000Z
2020-07-17T07:11:57.000Z
pltools/train/module.py
PhoenixDL/PytorchLightningTools
86185062d4792e6d5eae002a5594bb7b900106a1
[ "MIT" ]
6
2021-06-25T18:21:06.000Z
2021-06-25T18:21:32.000Z
pltools/train/module.py
PhoenixDL/PytorchLightningTools
86185062d4792e6d5eae002a5594bb7b900106a1
[ "MIT" ]
1
2020-05-18T06:34:56.000Z
2020-05-18T06:34:56.000Z
from __future__ import annotations import typing import torch from torch.utils.data import DataLoader import pytorch_lightning as pl from pltools.config import Config transform_type = typing.Iterable[typing.Callable]
31.354839
72
0.590021
from __future__ import annotations import typing import torch from torch.utils.data import DataLoader import pytorch_lightning as pl from pltools.config import Config transform_type = typing.Iterable[typing.Callable] class Module(pl.LightningModule): def __init__(self, hparams: Config, ...
3,126
493
46
5be2c7014a6a8285c9a8486e36cad38accdcfdce
959
py
Python
postprocessors.py
ahmetb/simplegauges
c5a1e809f4534f72c436141f3c506b252ebb6b40
[ "Apache-2.0" ]
2
2015-02-14T22:26:36.000Z
2015-06-22T12:01:16.000Z
postprocessors.py
ahmetalpbalkan/simplegauges
c5a1e809f4534f72c436141f3c506b252ebb6b40
[ "Apache-2.0" ]
null
null
null
postprocessors.py
ahmetalpbalkan/simplegauges
c5a1e809f4534f72c436141f3c506b252ebb6b40
[ "Apache-2.0" ]
1
2019-04-15T13:45:11.000Z
2019-04-15T13:45:11.000Z
# coding: utf-8 from datetime import timedelta from helpers import make_record def day_fill(data, fill_value=None): """Given a data set with missing day values sorted by day, adds records with value of `fill_value` """ return generic_day_fill(1, data, fill_value) def week_fill(data, fill_value=None...
28.205882
75
0.630865
# coding: utf-8 from datetime import timedelta from helpers import make_record def day_fill(data, fill_value=None): """Given a data set with missing day values sorted by day, adds records with value of `fill_value` """ return generic_day_fill(1, data, fill_value) def week_fill(data, fill_value=None...
456
0
23
ac8a99e9b1eb5584ca24c2aca70dd9be5d5154e8
2,373
py
Python
Examples/AppKit/FieldGraph/CGraphModel.py
Khan/pyobjc-framework-Cocoa
f8b015ea2a72d8d78be6084fb12925c4785b8f1f
[ "MIT" ]
132
2015-01-01T10:02:42.000Z
2022-03-09T12:51:01.000Z
mac/pyobjc-framework-Cocoa/Examples/AppKit/FieldGraph/CGraphModel.py
mba811/music-player
7998986b34cfda2244ef622adefb839331b81a81
[ "BSD-2-Clause" ]
6
2015-01-06T08:23:19.000Z
2019-03-14T12:22:06.000Z
mac/pyobjc-framework-Cocoa/Examples/AppKit/FieldGraph/CGraphModel.py
mba811/music-player
7998986b34cfda2244ef622adefb839331b81a81
[ "BSD-2-Clause" ]
27
2015-02-23T11:51:43.000Z
2022-03-07T02:34:18.000Z
from Foundation import NSObject from objc import * from AppKit import NSBezierPath from fieldMath import * #____________________________________________________________
28.939024
122
0.572693
from Foundation import NSObject from objc import * from AppKit import NSBezierPath from fieldMath import * #____________________________________________________________ class CGraphModel(NSObject): def init(self): self.field = [1.0, 1.12, 0.567] self.phase = [degToRad(0), degToRad(152.6), degToRa...
1,902
7
292
e8a306946d3872aaea3b9a534d70503e4797fe01
1,549
py
Python
opticspy/ray_tracing/tests/test1_spotdiagram.py
benJephunneh/opticspy
a0b841f60f7c053b05444c0e8886cd4a99c4d082
[ "MIT" ]
null
null
null
opticspy/ray_tracing/tests/test1_spotdiagram.py
benJephunneh/opticspy
a0b841f60f7c053b05444c0e8886cd4a99c4d082
[ "MIT" ]
null
null
null
opticspy/ray_tracing/tests/test1_spotdiagram.py
benJephunneh/opticspy
a0b841f60f7c053b05444c0e8886cd4a99c4d082
[ "MIT" ]
null
null
null
from __future__ import division as division import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import field import traceray import surface import cal_tools # test ray.py and traceray.py # define rays l1 = np.linspace(-5,5,10) Pos1 = [] for i in l1: for j in l1: if i**2+j**...
19.123457
95
0.684312
from __future__ import division as division import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import field import traceray import surface import cal_tools # test ray.py and traceray.py # define rays l1 = np.linspace(-5,5,10) Pos1 = [] for i in l1: for j in l1: if i**2+j**...
0
0
0
0584d6f43da520c5c77daa1e83965714f77af218
2,050
py
Python
core/test/mime/test_mime_codec_register.py
bogonets/answer
57f892a9841980bcbc35fa1e27521b34cd94bc25
[ "MIT" ]
3
2021-06-20T02:24:10.000Z
2022-01-26T23:55:33.000Z
core/test/mime/test_mime_codec_register.py
bogonets/answer
57f892a9841980bcbc35fa1e27521b34cd94bc25
[ "MIT" ]
null
null
null
core/test/mime/test_mime_codec_register.py
bogonets/answer
57f892a9841980bcbc35fa1e27521b34cd94bc25
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from unittest import TestCase, main from recc.mime.mime_codec_register import get_global_mime_register if __name__ == "__main__": main()
36.607143
71
0.692683
# -*- coding: utf-8 -*- from unittest import TestCase, main from recc.mime.mime_codec_register import get_global_mime_register class _ComplexObject: def __init__(self): self.test_data1 = "text" self.test_data2 = 100 self.test_data3 = 3.14 class MimeCodecRegisterTestCase(TestCase): d...
1,680
21
179
59330cfcf5414e3f86a1a7f10c339aa1302b5819
4,186
py
Python
concise_fanyi.py
Yo-gurts/dict
86e662ba9b7599473332c61de05635e8dce24f83
[ "MIT" ]
null
null
null
concise_fanyi.py
Yo-gurts/dict
86e662ba9b7599473332c61de05635e8dce24f83
[ "MIT" ]
null
null
null
concise_fanyi.py
Yo-gurts/dict
86e662ba9b7599473332c61de05635e8dce24f83
[ "MIT" ]
null
null
null
#!/usr/bin/env python3.7 import sys import json import signal import urllib.request as urllib import threading import pyperclip import time if __name__ == '__main__': exitflag = False try: signal.signal(signal.SIGINT, quit) signal.signal(signal.SIGTERM, quit) thread1 = Cli...
29.272727
115
0.4742
#!/usr/bin/env python3.7 import sys import json import signal import urllib.request as urllib import threading import pyperclip import time class Dict: key = '716426270' keyFrom = 'wufeifei' api = 'http://fanyi.youdao.com/openapi.do?keyfrom=wufeifei&key=716426270&type=data&doctype=json&version=1.1&q=' ...
3,147
280
198
ce0cef8e0251b3e6085357fac68c61249be16c60
2,512
py
Python
wikipedia_fetch.py
nik7273/computational-medical-knowledge
03357fc63382bed49509d7860f87a3d010f03018
[ "Apache-2.0" ]
null
null
null
wikipedia_fetch.py
nik7273/computational-medical-knowledge
03357fc63382bed49509d7860f87a3d010f03018
[ "Apache-2.0" ]
null
null
null
wikipedia_fetch.py
nik7273/computational-medical-knowledge
03357fc63382bed49509d7860f87a3d010f03018
[ "Apache-2.0" ]
1
2019-09-17T18:38:44.000Z
2019-09-17T18:38:44.000Z
# -*- coding: utf-8 -*- #Search Wikipedia for Heart Attack import wikipedia, codecs, itertools, os, time from pprint import pprint relevant_categories = {'medical','emergencies','disease'} conditions = ["heart attack","palpitations"] #Search all related pages? make_filename = lambda aStr: aStr.replace(' ','_'...
55.822222
143
0.615844
# -*- coding: utf-8 -*- #Search Wikipedia for Heart Attack import wikipedia, codecs, itertools, os, time from pprint import pprint relevant_categories = {'medical','emergencies','disease'} def findRelevantArticles(term,data_path='.'): articleList = [] articles = wikipedia.search(term) #Setting suggestion = Fa...
2,033
0
23
dd59d853dc65578a9c1c4b63d4f2b0e492d54f61
14,741
py
Python
accounts/views.py
witty-technologies-empowerment/codeupblood
a0aa1725e5776d80e083b6d4e9e67476bb97e983
[ "MIT" ]
null
null
null
accounts/views.py
witty-technologies-empowerment/codeupblood
a0aa1725e5776d80e083b6d4e9e67476bb97e983
[ "MIT" ]
null
null
null
accounts/views.py
witty-technologies-empowerment/codeupblood
a0aa1725e5776d80e083b6d4e9e67476bb97e983
[ "MIT" ]
1
2022-01-19T11:09:13.000Z
2022-01-19T11:09:13.000Z
from django.shortcuts import render from django.contrib.auth.models import User from django.contrib.auth import authenticate, login, logout from django.http import HttpResponseRedirect from django.urls import reverse from django.contrib.auth.decorators import login_required from datetime import datetime, timedelta from...
35.86618
114
0.521606
from django.shortcuts import render from django.contrib.auth.models import User from django.contrib.auth import authenticate, login, logout from django.http import HttpResponseRedirect from django.urls import reverse from django.contrib.auth.decorators import login_required from datetime import datetime, timedelta from...
13,692
0
228
6bdd6d4d7f38f692c96a75ae5e82669cba9cf73b
1,036
py
Python
programs_tutorial_2/direct_disks_multirun.py
golu-golu/statistcal-mechanics
8ff66280ee5a6a816e6ca70934e92001e624dfad
[ "MIT" ]
null
null
null
programs_tutorial_2/direct_disks_multirun.py
golu-golu/statistcal-mechanics
8ff66280ee5a6a816e6ca70934e92001e624dfad
[ "MIT" ]
null
null
null
programs_tutorial_2/direct_disks_multirun.py
golu-golu/statistcal-mechanics
8ff66280ee5a6a816e6ca70934e92001e624dfad
[ "MIT" ]
null
null
null
import random, math N = 16 eta = 0.26 sigma = math.sqrt(eta / N / math.pi) n_runs = 100 print 'Note that this program might take a while!' for run in range(n_runs): iterations, config = direct_disks(N, sigma) print 'run',run print iterations - 1, 'tabula rasa wipe-outs before producing the following confi...
26.564103
94
0.542471
import random, math def dist(x,y): d_x = abs(x[0] - y[0]) % 1.0 d_x = min(d_x, 1.0 - d_x) d_y = abs(x[1] - y[1]) % 1.0 d_y = min(d_y, 1.0 - d_y) return math.sqrt(d_x**2 + d_y**2) def direct_disks(N, sigma): n_iter = 0 condition = False while condition == False: n_iter += 1...
628
0
50
9ae56ae95d290db134f2e153096fa8dd43af143f
190
py
Python
Python/Topics/Regexp functions in Python/Matching username requirements/main.py
drtierney/hyperskill-problems
b74da993f0ac7bcff1cbd5d89a3a1b06b05f33e0
[ "MIT" ]
5
2020-08-29T15:15:31.000Z
2022-03-01T18:22:34.000Z
Python/Topics/Regexp functions in Python/Matching username requirements/main.py
drtierney/hyperskill-problems
b74da993f0ac7bcff1cbd5d89a3a1b06b05f33e0
[ "MIT" ]
null
null
null
Python/Topics/Regexp functions in Python/Matching username requirements/main.py
drtierney/hyperskill-problems
b74da993f0ac7bcff1cbd5d89a3a1b06b05f33e0
[ "MIT" ]
1
2020-12-02T11:13:14.000Z
2020-12-02T11:13:14.000Z
import re template = r"[a-zA-Z]" username = input() match = re.match(template, username) if match: print("Thank you!") else: print("Oops! The username has to start with a letter.")
19
59
0.668421
import re template = r"[a-zA-Z]" username = input() match = re.match(template, username) if match: print("Thank you!") else: print("Oops! The username has to start with a letter.")
0
0
0
ac03251cb2681eb1fe70b4d5e22c86a343b0173e
1,428
py
Python
tools/get_comm.py
hfingler/ava
8ade884d82dc1465a24fd1ab682a54afe1765f6e
[ "BSD-2-Clause" ]
null
null
null
tools/get_comm.py
hfingler/ava
8ade884d82dc1465a24fd1ab682a54afe1765f6e
[ "BSD-2-Clause" ]
null
null
null
tools/get_comm.py
hfingler/ava
8ade884d82dc1465a24fd1ab682a54afe1765f6e
[ "BSD-2-Clause" ]
1
2021-06-17T16:13:27.000Z
2021-06-17T16:13:27.000Z
import argparse import numpy as np if __name__ == '__main__': main()
29.75
85
0.553221
import argparse import numpy as np def load_stats(file_name, stats): with open(file_name, 'r') as fin: for line in fin: sp = line.strip().split(",") time = sp[1].strip() namesp = sp[0].split(" ") name = namesp[1] if name not in stats: ...
1,305
0
46
6f33ee5e698e01170b6449db0fd472335c766d53
814
py
Python
src/livecoding/pythonreloader.py
ashwoods/python-qt-live-coding
b87e6fed021c5a9af72dee3b7b32f9c799816b8e
[ "MIT" ]
37
2018-07-08T04:53:12.000Z
2022-03-17T07:33:21.000Z
src/livecoding/pythonreloader.py
ashwoods/python-qt-live-coding
b87e6fed021c5a9af72dee3b7b32f9c799816b8e
[ "MIT" ]
2
2020-01-07T22:03:29.000Z
2020-09-28T12:15:57.000Z
src/livecoding/pythonreloader.py
ashwoods/python-qt-live-coding
b87e6fed021c5a9af72dee3b7b32f9c799816b8e
[ "MIT" ]
6
2020-02-12T18:55:13.000Z
2021-12-31T03:54:40.000Z
# -*- coding: utf-8 -*- import os import sys import signal import inspect from qtpy.QtCore import QObject, Slot
30.148148
84
0.638821
# -*- coding: utf-8 -*- import os import sys import signal import inspect from qtpy.QtCore import QObject, Slot class PythonReloader(QObject): def __init__(self, main, parent=None): super(PythonReloader, self).__init__(parent) self._main = main @Slot() def restart(self): import_d...
603
74
23
28dbf580557251c65f5af58073dd31f05369dcdd
482
py
Python
sla_cli/src/db/accessors/abbreviations.py
DavidWalshe93/SL-CLI
c92ca8a6e57eb51bf9c9433013ce16d443f8d152
[ "MIT" ]
2
2022-01-07T09:59:32.000Z
2022-01-25T12:04:06.000Z
sla_cli/src/db/accessors/abbreviations.py
DavidWalshe93/SL-CLI
c92ca8a6e57eb51bf9c9433013ce16d443f8d152
[ "MIT" ]
null
null
null
sla_cli/src/db/accessors/abbreviations.py
DavidWalshe93/SL-CLI
c92ca8a6e57eb51bf9c9433013ce16d443f8d152
[ "MIT" ]
1
2021-04-07T17:14:37.000Z
2021-04-07T17:14:37.000Z
""" Author: David Walshe Date: 08 April 2021 """ import logging from tabulate import tabulate from sla_cli.src.db.accessors.base import Accessor logger = logging.getLogger(__name__)
24.1
143
0.69917
""" Author: David Walshe Date: 08 April 2021 """ import logging from tabulate import tabulate from sla_cli.src.db.accessors.base import Accessor logger = logging.getLogger(__name__) class Abbreviations(Accessor): def abbreviations(self, tablefmt: str = "simple") -> str: """Returns the abbre...
0
262
23
2ef452770876cc4be160a58e302e2efdc1a66543
20,528
py
Python
tia/analysis/model/ret.py
lsternlicht/tia
fe74d1876260a946e52bd733bc32da0698749f2c
[ "BSD-3-Clause" ]
null
null
null
tia/analysis/model/ret.py
lsternlicht/tia
fe74d1876260a946e52bd733bc32da0698749f2c
[ "BSD-3-Clause" ]
null
null
null
tia/analysis/model/ret.py
lsternlicht/tia
fe74d1876260a946e52bd733bc32da0698749f2c
[ "BSD-3-Clause" ]
null
null
null
from collections import OrderedDict import pandas as pd import numpy as np from tia.util.decorator import lazy_property from tia.analysis.model.interface import TxnPlColumns as TPL from tia.analysis.perf import drawdown_info, drawdowns, guess_freq, downside_deviation, periodicity from tia.analysis.plots import plot_r...
42.589212
120
0.610581
from collections import OrderedDict import pandas as pd import numpy as np from tia.util.decorator import lazy_property from tia.analysis.model.interface import TxnPlColumns as TPL from tia.analysis.perf import drawdown_info, drawdowns, guess_freq, downside_deviation, periodicity from tia.analysis.plots import plot_r...
10,461
8,768
270
90edd1b0fcff1bcb117d544390d61e218a49058d
158
py
Python
lib/solutions/HLO/hello_solution.py
DPNT-Sourcecode/FIZ-rsof01
a1820f2122c122dbf574077f08014967f83fbd9b
[ "Apache-2.0" ]
null
null
null
lib/solutions/HLO/hello_solution.py
DPNT-Sourcecode/FIZ-rsof01
a1820f2122c122dbf574077f08014967f83fbd9b
[ "Apache-2.0" ]
null
null
null
lib/solutions/HLO/hello_solution.py
DPNT-Sourcecode/FIZ-rsof01
a1820f2122c122dbf574077f08014967f83fbd9b
[ "Apache-2.0" ]
null
null
null
# noinspection PyUnusedLocal # friend_name = unicode string #print(hello("Mike"))
15.8
39
0.664557
# noinspection PyUnusedLocal # friend_name = unicode string def hello(friend_name): return("Hello, %s!" %friend_name ) #print(hello("Mike"))
42
0
25
bd98f8d6beada389f1d1528af29830037c5efe1e
3,535
py
Python
sketch/srft.py
wangshusen/PyRLA
066876545c8501dca8ec857676465553a0ebb822
[ "MIT" ]
12
2018-06-15T09:49:36.000Z
2020-05-08T12:42:06.000Z
sketch/srft.py
wangshusen/PyRLA
066876545c8501dca8ec857676465553a0ebb822
[ "MIT" ]
1
2020-06-09T11:46:05.000Z
2020-06-09T12:24:59.000Z
sketch/srft.py
wangshusen/PyRLA
066876545c8501dca8ec857676465553a0ebb822
[ "MIT" ]
3
2018-11-05T19:14:21.000Z
2019-10-23T02:41:10.000Z
import numpy # Remark: # Real FFT with even n is faster than real FFT with odd n. # I do not know why. def realfft_col(a_mat): ''' Real Fast Fourier Transform (FFT) Independently Applied to Each Column of A Input a_mat: n-by-d dense NumPy matrix. Output c_mat: n-by-d matr...
31.008772
79
0.604809
import numpy # Remark: # Real FFT with even n is faster than real FFT with odd n. # I do not know why. def realfft_col(a_mat): ''' Real Fast Fourier Transform (FFT) Independently Applied to Each Column of A Input a_mat: n-by-d dense NumPy matrix. Output c_mat: n-by-d matr...
0
0
0
72f88fd1c8c07e12acd9c900a420a669aa067518
1,162
py
Python
ifsp2019/publication_plot.py
andrekorol/flare-hunter
530d29275429b934d0ee8a20e21ed3ccc514e40c
[ "MIT" ]
null
null
null
ifsp2019/publication_plot.py
andrekorol/flare-hunter
530d29275429b934d0ee8a20e21ed3ccc514e40c
[ "MIT" ]
1
2021-08-31T19:17:19.000Z
2021-08-31T19:17:19.000Z
ifsp2019/publication_plot.py
andrekorol/flare-hunter
530d29275429b934d0ee8a20e21ed3ccc514e40c
[ "MIT" ]
null
null
null
from urldl import download from pycallisto import fitsfile callisto_archives = 'http://soleil80.cs.technik.fhnw.ch/' \ 'solarradio/data/2002-20yy_Callisto/' filelist = [ "BLEN7M_20110216_133009_24.fit.gz", "BLEN7M_20110216_134510_24.fit.gz", "BLEN7M_20110216_140011_24.fit.gz", "BLEN7M_2011...
41.5
76
0.634251
from urldl import download from pycallisto import fitsfile callisto_archives = 'http://soleil80.cs.technik.fhnw.ch/' \ 'solarradio/data/2002-20yy_Callisto/' filelist = [ "BLEN7M_20110216_133009_24.fit.gz", "BLEN7M_20110216_134510_24.fit.gz", "BLEN7M_20110216_140011_24.fit.gz", "BLEN7M_2011...
0
0
0
81ae7822a3dffbe5464ea6afa6466f1447ad89c3
420
py
Python
script.py
aptmess/detectime
8e0eac3c93a984448731b3311741ee22a7e881f4
[ "MIT" ]
2
2021-07-04T16:08:04.000Z
2021-08-03T08:42:03.000Z
script.py
aptmess/detectime
8e0eac3c93a984448731b3311741ee22a7e881f4
[ "MIT" ]
null
null
null
script.py
aptmess/detectime
8e0eac3c93a984448731b3311741ee22a7e881f4
[ "MIT" ]
null
null
null
import logging import yaml from detectime.detectime import detectron from definitions import ROOT_DIR from detectime.utils import convert_dict_to_tuple log = logging.getLogger(__name__) CONFIG_PATH = 'config.yml' if __name__ == '__main__': main()
20
51
0.747619
import logging import yaml from detectime.detectime import detectron from definitions import ROOT_DIR from detectime.utils import convert_dict_to_tuple log = logging.getLogger(__name__) CONFIG_PATH = 'config.yml' def main(): with open(ROOT_DIR / CONFIG_PATH) as f: data = yaml.safe_load(f) config = c...
141
0
23
3fe7567364e0b02ea873d5bd1fc31a5761c15b2e
2,090
py
Python
CloneWars.py
hallba/UnicornWrightFisher
9ed4cc5e21b47cee7f2c70dc8638d031169a4b9c
[ "MIT" ]
4
2021-04-09T19:45:47.000Z
2021-04-29T11:04:19.000Z
CloneWars.py
hallba/UnicornWrightFisher
9ed4cc5e21b47cee7f2c70dc8638d031169a4b9c
[ "MIT" ]
null
null
null
CloneWars.py
hallba/UnicornWrightFisher
9ed4cc5e21b47cee7f2c70dc8638d031169a4b9c
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Clone wars simulator. Simulates the growth of clones in a 2D space. Mutations are induced by button presses. Currently untested. """ import splash splash.splashScreen("CloneWars!",rotation=270) import signal import sys import RPi.GPIO as GPIO try: import numpy as np ...
29.027778
83
0.688517
#!/usr/bin/env python """Clone wars simulator. Simulates the growth of clones in a 2D space. Mutations are induced by button presses. Currently untested. """ import splash splash.splashScreen("CloneWars!",rotation=270) import signal import sys import RPi.GPIO as GPIO try: import numpy as np ...
156
0
104
0d008bce694ff1d6c230937c72eb568aa96b7de2
3,146
py
Python
policy/migrations/0001_initial.py
agnihotri7/demo-api
ffccd7e7a21b99cb8282045b4c3343ff5888c527
[ "RSA-MD" ]
null
null
null
policy/migrations/0001_initial.py
agnihotri7/demo-api
ffccd7e7a21b99cb8282045b4c3343ff5888c527
[ "RSA-MD" ]
null
null
null
policy/migrations/0001_initial.py
agnihotri7/demo-api
ffccd7e7a21b99cb8282045b4c3343ff5888c527
[ "RSA-MD" ]
null
null
null
# Generated by Django 4.0.2 on 2022-02-06 09:41 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
47.666667
219
0.579148
# Generated by Django 4.0.2 on 2022-02-06 09:41 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
0
2,966
23
3b6a9325a976409cce0829d84577cbe4814d5ff2
2,660
py
Python
ann/neuralnetwork.py
manoloesparta/logicnet
97c6ee9be9bce9060c9cc4b51d0344df246500f9
[ "MIT" ]
2
2020-07-15T01:41:41.000Z
2020-12-10T03:19:40.000Z
ann/neuralnetwork.py
manoloesparta/logicnet
97c6ee9be9bce9060c9cc4b51d0344df246500f9
[ "MIT" ]
null
null
null
ann/neuralnetwork.py
manoloesparta/logicnet
97c6ee9be9bce9060c9cc4b51d0344df246500f9
[ "MIT" ]
null
null
null
import numpy as np
45.862069
113
0.687594
import numpy as np class NeuralNetwork: def __init__(self, inputs_nodes, hidden_layer1, hidden_layer2, output_nodes, learning_rate): self.inputs_nodes = inputs_nodes self.hidden_layer1 = hidden_layer1 self.hidden_layer2 = hidden_layer2 self.output_nodes = output_nodes self...
2,493
126
23
17ff2db4a4ef5d618281004b11bf14de2106dc58
885
py
Python
lh/tdd.py
skyf0cker/Statistical_learning_method
8151f3b8595ac086f08d161dc0cb961946f4b7fc
[ "MIT" ]
3
2019-03-25T14:15:30.000Z
2019-08-29T15:02:47.000Z
lh/tdd.py
skyf0cker/Statistical_learning_method
8151f3b8595ac086f08d161dc0cb961946f4b7fc
[ "MIT" ]
null
null
null
lh/tdd.py
skyf0cker/Statistical_learning_method
8151f3b8595ac086f08d161dc0cb961946f4b7fc
[ "MIT" ]
null
null
null
from EMAlgorithm import EmAlgorithm import numpy as np def create_data(mu0, sigma0, mu1, sigma1, alpha0, alpha1): ''' 初始化数据集 这里通过服从高斯分布的随机函数来伪造数据集 :param mu0: 高斯0的均值 :param sigma0: 高斯0的方差 :param mu1: 高斯1的均值 :param sigma1: 高斯1的方差 :param alpha0: 高斯0的系数 :param alpha1: 高斯1的系数 :retu...
21.071429
63
0.656497
from EMAlgorithm import EmAlgorithm import numpy as np def create_data(mu0, sigma0, mu1, sigma1, alpha0, alpha1): ''' 初始化数据集 这里通过服从高斯分布的随机函数来伪造数据集 :param mu0: 高斯0的均值 :param sigma0: 高斯0的方差 :param mu1: 高斯1的均值 :param sigma1: 高斯1的方差 :param alpha0: 高斯0的系数 :param alpha1: 高斯1的系数 :retu...
0
0
0
df7dd05fd77b54c6bccf40f3142f23f5cd3af718
662
py
Python
fcos_core/data/datasets/create_eccv_index.py
touchylk/fcoseccv
f9141bf98ffed6bd1292779ac022742c15d4555d
[ "BSD-2-Clause" ]
null
null
null
fcos_core/data/datasets/create_eccv_index.py
touchylk/fcoseccv
f9141bf98ffed6bd1292779ac022742c15d4555d
[ "BSD-2-Clause" ]
null
null
null
fcos_core/data/datasets/create_eccv_index.py
touchylk/fcoseccv
f9141bf98ffed6bd1292779ac022742c15d4555d
[ "BSD-2-Clause" ]
1
2020-10-04T13:23:33.000Z
2020-10-04T13:23:33.000Z
import os xmldir = '/media/e813/E/dataset/eccv/eccv/VisDrone2018-VID-val/xmlannotations' # datasetdir = '/media/e813/E/dataset/eccv/eccv/VisDrone2018-VID-train' # file = os.path.join(datasetdir,'index.txt') # f = open(file,'w') count=0 for seq in os.listdir(xmldir): seqpath = os.path.join(xmldir,seq) for n,xml_...
30.090909
78
0.610272
import os xmldir = '/media/e813/E/dataset/eccv/eccv/VisDrone2018-VID-val/xmlannotations' # datasetdir = '/media/e813/E/dataset/eccv/eccv/VisDrone2018-VID-train' # file = os.path.join(datasetdir,'index.txt') # f = open(file,'w') count=0 for seq in os.listdir(xmldir): seqpath = os.path.join(xmldir,seq) for n,xml_...
0
0
0
176c7ac46bee6e48a191724b39af0f412b02198f
3,298
py
Python
pepys_admin/maintenance/dialogs/add_dialog.py
debrief/pepys-import
12d29c0e0f69e1119400334983947893e7679b6b
[ "Apache-2.0" ]
4
2021-05-14T08:22:47.000Z
2022-02-04T19:48:25.000Z
pepys_admin/maintenance/dialogs/add_dialog.py
debrief/pepys-import
12d29c0e0f69e1119400334983947893e7679b6b
[ "Apache-2.0" ]
1,083
2019-11-06T17:01:07.000Z
2022-03-25T10:26:51.000Z
pepys_admin/maintenance/dialogs/add_dialog.py
debrief/pepys-import
12d29c0e0f69e1119400334983947893e7679b6b
[ "Apache-2.0" ]
4
2019-11-06T12:00:45.000Z
2021-06-09T04:18:28.000Z
import textwrap from asyncio import Future from prompt_toolkit.layout.containers import HSplit from prompt_toolkit.layout.dimension import D from prompt_toolkit.widgets import Button, Label from prompt_toolkit.widgets.dialogs import Dialog from pepys_admin.maintenance.utils import get_system_name_mappings from pepys_...
35.462366
97
0.650091
import textwrap from asyncio import Future from prompt_toolkit.layout.containers import HSplit from prompt_toolkit.layout.dimension import D from prompt_toolkit.widgets import Button, Label from prompt_toolkit.widgets.dialogs import Dialog from pepys_admin.maintenance.utils import get_system_name_mappings from pepys_...
1,180
1,707
23
bf0caeb72b9942c65f74bec1e761950a9b7f6e2d
624
py
Python
array/mergeTwoSortedArray.py
saai/LeetcodePythonSolutions
201f2054dda3f303ae6a376b40cbc7f98688322c
[ "MIT" ]
null
null
null
array/mergeTwoSortedArray.py
saai/LeetcodePythonSolutions
201f2054dda3f303ae6a376b40cbc7f98688322c
[ "MIT" ]
null
null
null
array/mergeTwoSortedArray.py
saai/LeetcodePythonSolutions
201f2054dda3f303ae6a376b40cbc7f98688322c
[ "MIT" ]
null
null
null
# @param {integer[]} nums1 # @param {integer} m # @param {integer[]} nums2 # @param {integer} n # @return {void} Do not return anything, modify nums1 in-place instead.
28.363636
75
0.421474
class Solution: # @param {integer[]} nums1 # @param {integer} m # @param {integer[]} nums2 # @param {integer} n # @return {void} Do not return anything, modify nums1 in-place instead. def merge(self, nums1, m, nums2, n): p1 = m-1 p2 = n-1 p3 = m+n-1 while(p1>=0 an...
395
-6
48
b9200d72886d859c7087fdff26f823fe6a74a941
4,928
py
Python
molecule/default/tests/test_default.py
chas0amx/ansible-postfix
b129c57fdddf00447a715cccea0758878de22d0b
[ "Apache-2.0" ]
1
2022-02-28T10:22:07.000Z
2022-02-28T10:22:07.000Z
molecule/default/tests/test_default.py
chas0amx/ansible-postfix
b129c57fdddf00447a715cccea0758878de22d0b
[ "Apache-2.0" ]
7
2021-11-18T07:25:50.000Z
2022-03-31T12:25:24.000Z
molecule/default/tests/test_default.py
chas0amx/ansible-postfix
b129c57fdddf00447a715cccea0758878de22d0b
[ "Apache-2.0" ]
1
2022-03-02T10:17:23.000Z
2022-03-02T10:17:23.000Z
from ansible.parsing.dataloader import DataLoader from ansible.template import Templar import json import pytest import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') @pytest.fixture() def get_...
26.494624
114
0.656859
from ansible.parsing.dataloader import DataLoader from ansible.template import Templar import json import pytest import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') def pp_json(json_thing, sort...
528
0
46
c7055528d28431a2d229dc6240bb39f42df97a2f
42,845
py
Python
tests/pydevtest/test_chunkydevtest.py
PlantandFoodResearch/irods
9dfe7ffe5aa0760b7493bd9392ea1270df9335d4
[ "BSD-3-Clause" ]
null
null
null
tests/pydevtest/test_chunkydevtest.py
PlantandFoodResearch/irods
9dfe7ffe5aa0760b7493bd9392ea1270df9335d4
[ "BSD-3-Clause" ]
null
null
null
tests/pydevtest/test_chunkydevtest.py
PlantandFoodResearch/irods
9dfe7ffe5aa0760b7493bd9392ea1270df9335d4
[ "BSD-3-Clause" ]
null
null
null
import sys if (sys.version_info >= (2,7)): import unittest else: import unittest2 as unittest import pydevtest_sessions as s from pydevtest_common import assertiCmd, assertiCmdFail, interruptiCmd from resource_suite import ResourceBase import commands import os, stat import datetime import time import shutil im...
49.474596
180
0.61328
import sys if (sys.version_info >= (2,7)): import unittest else: import unittest2 as unittest import pydevtest_sessions as s from pydevtest_common import assertiCmd, assertiCmdFail, interruptiCmd from resource_suite import ResourceBase import commands import os, stat import datetime import time import shutil im...
41,733
13
297
df366a12904a7d087fb699c3ddcbd77bc7584ac9
1,920
py
Python
app/models/trade_models.py
VaughnDV/instrument-trader
1d4d4b8a36ee834c7111768e9f0d8bc15d027893
[ "MIT" ]
null
null
null
app/models/trade_models.py
VaughnDV/instrument-trader
1d4d4b8a36ee834c7111768e9f0d8bc15d027893
[ "MIT" ]
null
null
null
app/models/trade_models.py
VaughnDV/instrument-trader
1d4d4b8a36ee834c7111768e9f0d8bc15d027893
[ "MIT" ]
null
null
null
from sqlalchemy import Column, ForeignKey, Integer, String, Enum, Float, DateTime, func from sqlalchemy.orm import relationship import enum from app.database import Base
31.47541
87
0.717708
from sqlalchemy import Column, ForeignKey, Integer, String, Enum, Float, DateTime, func from sqlalchemy.orm import relationship import enum from app.database import Base class Trader(Base): __tablename__ = "trader" id = Column(Integer, primary_key=True, index=True) name = Column(String, unique=True, index...
0
1,606
138
15c2fef63b2d4ac40cf07d490bc31012681666a9
7,940
py
Python
APC400000/MelodicComponent.py
martinpechmann/APC400000
0783dd2f7c3846684f785b15e651c61edf95e27c
[ "BSD-Source-Code" ]
6
2019-09-15T18:46:49.000Z
2021-09-10T06:36:10.000Z
APC400000/MelodicComponent.py
martinpechmann/APC400000
0783dd2f7c3846684f785b15e651c61edf95e27c
[ "BSD-Source-Code" ]
3
2015-06-14T22:47:01.000Z
2015-06-17T14:24:47.000Z
APC400000/MelodicComponent.py
martinpechmann/APC400000
0783dd2f7c3846684f785b15e651c61edf95e27c
[ "BSD-Source-Code" ]
1
2016-12-21T12:18:14.000Z
2016-12-21T12:18:14.000Z
# Embedded file name: c:\Jenkins\live\output\win_32_static\Release\midi-remote-scripts\Push\MelodicComponent.py from __future__ import with_statement from _Framework.Util import forward_property, find_if from _Framework.SubjectSlot import subject_slot from _Framework.ModesComponent import ModesComponent, LayerMode from...
44.111111
233
0.693955
# Embedded file name: c:\Jenkins\live\output\win_32_static\Release\midi-remote-scripts\Push\MelodicComponent.py from __future__ import with_statement from _Framework.Util import forward_property, find_if from _Framework.SubjectSlot import subject_slot from _Framework.ModesComponent import ModesComponent, LayerMode from...
5,891
1,276
23
1b385350022d77771f9fd2a0d89d1eb2b4a50830
2,917
py
Python
coral_deeplab/pretrained.py
xadrianzetx/coral-deeplab
aa685a9b694339685d3fc7510296ecbe513838bb
[ "MIT" ]
5
2021-03-15T10:26:14.000Z
2022-03-03T14:33:07.000Z
coral_deeplab/pretrained.py
xadrianzetx/coral-deeplab
aa685a9b694339685d3fc7510296ecbe513838bb
[ "MIT" ]
3
2021-06-28T22:07:29.000Z
2021-10-16T17:48:31.000Z
coral_deeplab/pretrained.py
xadrianzetx/coral-deeplab
aa685a9b694339685d3fc7510296ecbe513838bb
[ "MIT" ]
2
2021-06-29T08:06:02.000Z
2021-09-30T08:15:08.000Z
# MIT License # Copyright (c) 2021 xadrianzetx # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, pu...
39.418919
80
0.731231
# MIT License # Copyright (c) 2021 xadrianzetx # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, pu...
0
1,720
69
73296fabb1841f8ea0d871204567b5801050b15c
1,619
py
Python
metalprot/database/database_download.py
lonelu/Metalprot
e51bee472c975aa171bdb6ee426a07ca69f110ee
[ "MIT" ]
null
null
null
metalprot/database/database_download.py
lonelu/Metalprot
e51bee472c975aa171bdb6ee426a07ca69f110ee
[ "MIT" ]
null
null
null
metalprot/database/database_download.py
lonelu/Metalprot
e51bee472c975aa171bdb6ee426a07ca69f110ee
[ "MIT" ]
null
null
null
import os import prody as pr # Manipulate rcsb file def organize_rcsb_file(workdir = "/mnt/e/DesignData/ligands/NI_rcsb/"): ''' The .csv files downloaded from rcsb database will be combined first, then generate tab deliminated txt file. ''' all_lines = [] for file in os.listdir(workdir): ...
30.54717
91
0.551575
import os import prody as pr # Manipulate rcsb file def organize_rcsb_file(workdir = "/mnt/e/DesignData/ligands/NI_rcsb/"): ''' The .csv files downloaded from rcsb database will be combined first, then generate tab deliminated txt file. ''' all_lines = [] for file in os.listdir(workdir): ...
879
0
23
0ce7701a7823d8739f05f92a5128f0b1ff249404
2,146
py
Python
config.py
jackgibson2/lambda-cleaner
433fbf7b7393a6d49771346e5b48939428ed663a
[ "MIT" ]
null
null
null
config.py
jackgibson2/lambda-cleaner
433fbf7b7393a6d49771346e5b48939428ed663a
[ "MIT" ]
null
null
null
config.py
jackgibson2/lambda-cleaner
433fbf7b7393a6d49771346e5b48939428ed663a
[ "MIT" ]
null
null
null
import os import json import boto3 REGION = 'us-east-2' session = boto3.session.Session(profile_name='sandbox') #iam = boto3.resource('iam', region_name=REGION) policy = { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "ec2:DeleteVolume", "...
26.825
75
0.536813
import os import json import boto3 REGION = 'us-east-2' session = boto3.session.Session(profile_name='sandbox') #iam = boto3.resource('iam', region_name=REGION) policy = { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "ec2:DeleteVolume", "...
0
0
0
35ad11a063628120bac86d92a7d8d61ab2e3bf24
11,098
py
Python
python_modules/dagster-graphql/dagster_graphql/dauphin_registry.py
ericct/dagster
dd2c9f05751e1bae212a30dbc54381167a14f6c5
[ "Apache-2.0" ]
1
2021-04-30T00:19:20.000Z
2021-04-30T00:19:20.000Z
python_modules/dagster-graphql/dagster_graphql/dauphin_registry.py
ericct/dagster
dd2c9f05751e1bae212a30dbc54381167a14f6c5
[ "Apache-2.0" ]
null
null
null
python_modules/dagster-graphql/dagster_graphql/dauphin_registry.py
ericct/dagster
dd2c9f05751e1bae212a30dbc54381167a14f6c5
[ "Apache-2.0" ]
null
null
null
""" Dauphin is wrapper module around graphene meant to provide a couple additional features. Most importantly is a type registry. Instead of referring to the class that corresponds to the GraphQL type everywhere, you are instead allows to use the GraphQL string. This solves an immediate short term problem in that it is...
35.915858
100
0.67769
""" Dauphin is wrapper module around graphene meant to provide a couple additional features. Most importantly is a type registry. Instead of referring to the class that corresponds to the GraphQL type everywhere, you are instead allows to use the GraphQL string. This solves an immediate short term problem in that it is...
8,463
34
674
434f9a60d0158ff1d591eee55a9eecd875a4fe07
155
py
Python
10/00/7.py
pylangstudy/201708
126b1af96a1d1f57522d5a1d435b58597bea2e57
[ "CC0-1.0" ]
null
null
null
10/00/7.py
pylangstudy/201708
126b1af96a1d1f57522d5a1d435b58597bea2e57
[ "CC0-1.0" ]
39
2017-07-31T22:54:01.000Z
2017-08-31T00:19:03.000Z
10/00/7.py
pylangstudy/201708
126b1af96a1d1f57522d5a1d435b58597bea2e57
[ "CC0-1.0" ]
null
null
null
#!python3.6 print("int: {0:d}; hex: {0:x}; oct: {0:o}; bin: {0:b}".format(42)) print("int: {0:d}; hex: {0:#x}; oct: {0:#o}; bin: {0:#b}".format(42))
38.75
72
0.477419
#!python3.6 print("int: {0:d}; hex: {0:x}; oct: {0:o}; bin: {0:b}".format(42)) print("int: {0:d}; hex: {0:#x}; oct: {0:#o}; bin: {0:#b}".format(42))
0
0
0
aa2b998413ca4e625b5b5ade9809014351a9b998
1,592
py
Python
server.py
nagasudhirpulla/grafana_smscountry_webhook
d8ab182b8f5ec12f00eaf966ec15a234782154e0
[ "MIT" ]
null
null
null
server.py
nagasudhirpulla/grafana_smscountry_webhook
d8ab182b8f5ec12f00eaf966ec15a234782154e0
[ "MIT" ]
null
null
null
server.py
nagasudhirpulla/grafana_smscountry_webhook
d8ab182b8f5ec12f00eaf966ec15a234782154e0
[ "MIT" ]
null
null
null
from flask import Flask, request from waitress import serve from src.config.appConfig import loadAppConfig from src.logs.loggerFactory import getFileLogger from src.services.smsSender import SmsApi # get application config appConf = loadAppConfig() # setup logging based on application config backUpCount = appConf["b...
29.481481
76
0.702261
from flask import Flask, request from waitress import serve from src.config.appConfig import loadAppConfig from src.logs.loggerFactory import getFileLogger from src.services.smsSender import SmsApi # get application config appConf = loadAppConfig() # setup logging based on application config backUpCount = appConf["b...
358
0
44
2b3d9561450c764cc9dff63f42c7c64befb8dd30
1,213
py
Python
gans/CGAN/loader.py
IvLabs/Variational-DL
cd431564ae77ba42a485db17416a6033b32c48fb
[ "MIT" ]
37
2020-12-24T10:03:16.000Z
2022-01-18T05:37:07.000Z
gans/CGAN/loader.py
vignesh-creator/Variational-DL
cd431564ae77ba42a485db17416a6033b32c48fb
[ "MIT" ]
1
2021-10-03T20:04:36.000Z
2021-10-04T17:21:51.000Z
gans/CGAN/loader.py
vignesh-creator/Variational-DL
cd431564ae77ba42a485db17416a6033b32c48fb
[ "MIT" ]
36
2020-12-27T16:38:27.000Z
2022-03-21T17:20:22.000Z
import torch from torchvision import transforms, datasets from torch.utils.data import DataLoader device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') training_data = datasets.CIFAR10(root="data", train=True, download=True, transform=transforms.Compose([ ...
44.925926
96
0.575433
import torch from torchvision import transforms, datasets from torch.utils.data import DataLoader device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') training_data = datasets.CIFAR10(root="data", train=True, download=True, transform=transforms.Compose([ ...
0
0
0
cc96cf4d5225718933a96ae5b76fe27a222e3d90
11,003
py
Python
eservice/pdo/sservice/block_store_manager.py
sambacha/private-data-objects
635049918b362ba81ad74469cbea6b2c53380d9e
[ "Apache-2.0" ]
84
2018-05-04T15:07:53.000Z
2022-03-23T09:38:17.000Z
eservice/pdo/sservice/block_store_manager.py
sambacha/private-data-objects
635049918b362ba81ad74469cbea6b2c53380d9e
[ "Apache-2.0" ]
218
2018-05-07T20:10:25.000Z
2022-03-23T17:27:44.000Z
eservice/pdo/sservice/block_store_manager.py
sambacha/private-data-objects
635049918b362ba81ad74469cbea6b2c53380d9e
[ "Apache-2.0" ]
33
2018-03-02T20:32:18.000Z
2021-09-17T07:07:57.000Z
# Copyright 2019 Intel Corporation # # 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 in wri...
37.42517
103
0.624375
# Copyright 2019 Intel Corporation # # 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 in wri...
631
0
133
c47aef6a568a84a910fe9d901ba372f17176b9e3
1,435
py
Python
pymc/examples/gp/PyMCmodel.py
rsumner31/pymc3-23
539c0fc04c196679a1cdcbf4bc2dbea4dee10080
[ "Apache-2.0" ]
1
2019-03-01T02:47:20.000Z
2019-03-01T02:47:20.000Z
pymc/examples/gp/PyMCmodel.py
rsumner31/pymc3-23
539c0fc04c196679a1cdcbf4bc2dbea4dee10080
[ "Apache-2.0" ]
1
2019-08-17T06:58:38.000Z
2019-08-17T06:58:38.000Z
pymc/examples/gp/PyMCmodel.py
rsumner31/pymc3-23
539c0fc04c196679a1cdcbf4bc2dbea4dee10080
[ "Apache-2.0" ]
null
null
null
import pymc as pm import pymc.gp as gp from pymc.gp.cov_funs import matern import numpy as np import matplotlib.pyplot as pl from numpy.random import normal x = np.arange(-1.,1.,.1) # Prior parameters of C diff_degree = pm.Uniform('diff_degree', .1, 3) amp = pm.Lognormal('amp', mu=.4, tau=1.) scale = pm.Lognormal(...
25.625
89
0.65993
import pymc as pm import pymc.gp as gp from pymc.gp.cov_funs import matern import numpy as np import matplotlib.pyplot as pl from numpy.random import normal x = np.arange(-1.,1.,.1) # Prior parameters of C diff_degree = pm.Uniform('diff_degree', .1, 3) amp = pm.Lognormal('amp', mu=.4, tau=1.) scale = pm.Lognormal(...
275
0
66
1ff0470a82f8e325dec69db737d3ded8bf488a17
734
py
Python
HW4/PyMaxflow-master/examples/simple.py
ardaduz/math-cgv
bc89c0ce9beca9a9f02ca23bcf4a9116be187882
[ "MIT" ]
null
null
null
HW4/PyMaxflow-master/examples/simple.py
ardaduz/math-cgv
bc89c0ce9beca9a9f02ca23bcf4a9116be187882
[ "MIT" ]
null
null
null
HW4/PyMaxflow-master/examples/simple.py
ardaduz/math-cgv
bc89c0ce9beca9a9f02ca23bcf4a9116be187882
[ "MIT" ]
1
2021-02-14T10:41:17.000Z
2021-02-14T10:41:17.000Z
import maxflow # Create a graph with integer capacities. g = maxflow.Graph[int](2, 2) # Add two (non-terminal) nodes. Get the index to the first one. nodes = g.add_nodes(2) # Create two edges (forwards and backwards) with the given capacities. # The indices of the nodes are always consecutive. g.add_edge(nodes[0], nod...
31.913043
70
0.701635
import maxflow # Create a graph with integer capacities. g = maxflow.Graph[int](2, 2) # Add two (non-terminal) nodes. Get the index to the first one. nodes = g.add_nodes(2) # Create two edges (forwards and backwards) with the given capacities. # The indices of the nodes are always consecutive. g.add_edge(nodes[0], nod...
0
0
0
bb753e65a660ad6b0da4c898f341c53f5a413d54
395
py
Python
storm_analysis/diagnostics/frc/analyze_data.py
oxfordni/storm-analysis
835a5c17497c563c3632db561ae7e7c9144a8dd1
[ "CNRI-Python" ]
null
null
null
storm_analysis/diagnostics/frc/analyze_data.py
oxfordni/storm-analysis
835a5c17497c563c3632db561ae7e7c9144a8dd1
[ "CNRI-Python" ]
null
null
null
storm_analysis/diagnostics/frc/analyze_data.py
oxfordni/storm-analysis
835a5c17497c563c3632db561ae7e7c9144a8dd1
[ "CNRI-Python" ]
null
null
null
#!/usr/bin/env python """ Analyze FRC data. Hazen 01/18 """ import glob import storm_analysis.frc.frc_calc2d as frcCalc2d dirs = sorted(glob.glob("test*")) total_time = 0.0 for a_dir in dirs: print() print("Analyzing:", a_dir) print() hdf5 = a_dir + "/test.hdf5" frc_text = a_dir + "/frc.txt"...
15.8
49
0.643038
#!/usr/bin/env python """ Analyze FRC data. Hazen 01/18 """ import glob import storm_analysis.frc.frc_calc2d as frcCalc2d dirs = sorted(glob.glob("test*")) total_time = 0.0 for a_dir in dirs: print() print("Analyzing:", a_dir) print() hdf5 = a_dir + "/test.hdf5" frc_text = a_dir + "/frc.txt"...
0
0
0