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
5c55da3acbe2a3fb755637361be2db476d2ff4cc
979
py
Python
UnitTests/test_type_checker.py
mjdroz/StatisticsCalculator
6be77b650b16e1c3e8ed6160905d99e58449e9b4
[ "MIT" ]
null
null
null
UnitTests/test_type_checker.py
mjdroz/StatisticsCalculator
6be77b650b16e1c3e8ed6160905d99e58449e9b4
[ "MIT" ]
18
2020-11-02T00:14:07.000Z
2020-11-09T04:07:07.000Z
UnitTests/test_type_checker.py
mjdroz/StatisticsCalculator
6be77b650b16e1c3e8ed6160905d99e58449e9b4
[ "MIT" ]
null
null
null
import unittest from AdditionalModules.type_checker import is_valid_number if __name__ == '__main__': unittest.main()
31.580645
61
0.733401
import unittest from AdditionalModules.type_checker import is_valid_number class MyTestCase(unittest.TestCase): def test_valid_whole_positive_number_string(self): self.assertTrue(is_valid_number("12345")) self.assertTrue(is_valid_number("123456")) def test_valid_negative_number_string(self): ...
655
15
185
be2c403274d5eaf1a9f49e212f01bb768a9e7069
59,185
py
Python
test/terra/backends/statevector_simulator/statevector_basics.py
sagarpahwa/qiskit-aer
77e40c8d99fd0490d85285e96f87e4905017b646
[ "Apache-2.0" ]
null
null
null
test/terra/backends/statevector_simulator/statevector_basics.py
sagarpahwa/qiskit-aer
77e40c8d99fd0490d85285e96f87e4905017b646
[ "Apache-2.0" ]
null
null
null
test/terra/backends/statevector_simulator/statevector_basics.py
sagarpahwa/qiskit-aer
77e40c8d99fd0490d85285e96f87e4905017b646
[ "Apache-2.0" ]
null
null
null
# This code is part of Qiskit. # # (C) Copyright IBM 2018, 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
45.986791
93
0.594019
# This code is part of Qiskit. # # (C) Copyright IBM 2018, 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
0
0
0
123ca78a2356ea365d65b74f4b9b8e4302d0f4f3
350
py
Python
account/migrations/0002_auto_20201105_1938.py
zzZ5/compost
00cc2cbc74df6626e07072c8c1e638ffd9bac8f1
[ "MIT" ]
1
2020-11-28T00:06:06.000Z
2020-11-28T00:06:06.000Z
account/migrations/0002_auto_20201105_1938.py
zzZ5/compost
00cc2cbc74df6626e07072c8c1e638ffd9bac8f1
[ "MIT" ]
null
null
null
account/migrations/0002_auto_20201105_1938.py
zzZ5/compost
00cc2cbc74df6626e07072c8c1e638ffd9bac8f1
[ "MIT" ]
null
null
null
# Generated by Django 3.0.8 on 2020-11-05 19:38 from django.db import migrations
18.421053
47
0.568571
# Generated by Django 3.0.8 on 2020-11-05 19:38 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('account', '0001_initial'), ] operations = [ migrations.RenameField( model_name='user', old_name='name', new_name...
0
244
23
ca706a41024e87211c983a6cb0fdc4ec44bdb20f
331
py
Python
tests/config.py
cjolowicz/muckr-service
014017ab92bd1d2034cd398f2e98a6fdaf30f164
[ "MIT" ]
null
null
null
tests/config.py
cjolowicz/muckr-service
014017ab92bd1d2034cd398f2e98a6fdaf30f164
[ "MIT" ]
12
2018-12-21T22:13:33.000Z
2019-08-03T20:03:19.000Z
tests/config.py
cjolowicz/muckr-service
014017ab92bd1d2034cd398f2e98a6fdaf30f164
[ "MIT" ]
null
null
null
"""Configuration for the test app.""" ADMIN_USERNAME = "admin" ADMIN_EMAIL = "admin@localhost" ADMIN_PASSWORD = "9V0aGfEGAkQTfn8GICqHjAqCzodsUL6IVp02GmtKML8" BCRYPT_LOG_ROUNDS = 4 SECRET_KEY = "lzlD6LdPmLI6rX-4eEMUeLsIcnkXaDDQYqrAIKahsdY" SQLALCHEMY_DATABASE_URI = "sqlite://" SQLALCHEMY_TRACK_MODIFICATIONS = False TEST...
33.1
62
0.821752
"""Configuration for the test app.""" ADMIN_USERNAME = "admin" ADMIN_EMAIL = "admin@localhost" ADMIN_PASSWORD = "9V0aGfEGAkQTfn8GICqHjAqCzodsUL6IVp02GmtKML8" BCRYPT_LOG_ROUNDS = 4 SECRET_KEY = "lzlD6LdPmLI6rX-4eEMUeLsIcnkXaDDQYqrAIKahsdY" SQLALCHEMY_DATABASE_URI = "sqlite://" SQLALCHEMY_TRACK_MODIFICATIONS = False TEST...
0
0
0
06c1e791f45b52a84e1415581c12c0bffeacd27b
3,932
py
Python
colordistance/app.py
chriskiehl/color-distance-tool
aa44db7bde5509d4b909cd635bc07a78adb0f4f0
[ "MIT" ]
1
2020-10-31T07:58:23.000Z
2020-10-31T07:58:23.000Z
colordistance/app.py
chriskiehl/color-distance-tool
aa44db7bde5509d4b909cd635bc07a78adb0f4f0
[ "MIT" ]
null
null
null
colordistance/app.py
chriskiehl/color-distance-tool
aa44db7bde5509d4b909cd635bc07a78adb0f4f0
[ "MIT" ]
null
null
null
import wx import wx.lib.mixins.inspection from pynput import mouse import sys import os import colordistance.core as core import colordistance.screen as screen from colordistance.components import ColorSelector, DifferenceLine from colordistance.util import assoc class Application(wx.Frame): """ Entry poin...
32.229508
113
0.637335
import wx import wx.lib.mixins.inspection from pynput import mouse import sys import os import colordistance.core as core import colordistance.screen as screen from colordistance.components import ColorSelector, DifferenceLine from colordistance.util import assoc class Application(wx.Frame): """ Entry poin...
1,404
0
76
402a5f09a08992f4c3337ba570a6e028e88dbbac
657
py
Python
Conceptos/funciones_integradas.py
jaramosperez/Pythonizando
3571a6451b383ed5fea35f84e3444fd946c6560d
[ "MIT" ]
1
2020-07-13T04:34:34.000Z
2020-07-13T04:34:34.000Z
Conceptos/funciones_integradas.py
jaramosperez/Pythonizando
3571a6451b383ed5fea35f84e3444fd946c6560d
[ "MIT" ]
null
null
null
Conceptos/funciones_integradas.py
jaramosperez/Pythonizando
3571a6451b383ed5fea35f84e3444fd946c6560d
[ "MIT" ]
null
null
null
n = '10.5' print(n) float(n) print(n) cadena = "Un numero podría ser " + str(10) + ' y un decimal podria ser ' + str(12.4) print(cadena) # CONVERSION DE UN NUMERO A BINARIO print(bin(10)) # CONVERSION DE UN NUMERO A HEXADECIMAL print(hex(13)) #CONVERSION DE UNA CADENA A BINARIO print(int('0b1010', 2)) #CONVERSION DE...
18.25
84
0.689498
n = '10.5' print(n) float(n) print(n) cadena = "Un numero podría ser " + str(10) + ' y un decimal podria ser ' + str(12.4) print(cadena) # CONVERSION DE UN NUMERO A BINARIO print(bin(10)) # CONVERSION DE UN NUMERO A HEXADECIMAL print(hex(13)) #CONVERSION DE UNA CADENA A BINARIO print(int('0b1010', 2)) #CONVERSION DE...
0
0
0
499c5dcfc041d8549b4e3d3dd514330f36a6074d
361
py
Python
test7.py
Tealaves/mypython
151f29eb720889710c7705a0c674b097bcec50f3
[ "Apache-2.0" ]
null
null
null
test7.py
Tealaves/mypython
151f29eb720889710c7705a0c674b097bcec50f3
[ "Apache-2.0" ]
null
null
null
test7.py
Tealaves/mypython
151f29eb720889710c7705a0c674b097bcec50f3
[ "Apache-2.0" ]
null
null
null
#!/bin/python print('I am:', __name__) if __name__ == '__main__': print(minmax(lessthan, 4, 2, 1, 5, 6, 3)) print(minmax(grtrthan, 4, 2, 1, 5, 6, 3))
20.055556
45
0.554017
#!/bin/python print('I am:', __name__) def minmax(test, *args): res = args[0] for arg in args[:-1]: if test(arg, res): res = arg return res def lessthan(x, y): return x < y def grtrthan(x, y): return x > y if __name__ == '__main__': print(minmax(lessthan, 4, 2, 1, 5, 6, 3)) p...
133
0
68
44a2faac9c8324a37b1a4590881412884bc6bc79
4,116
py
Python
xc7/utils/prjxray_create_place_constraints.py
mjasperse/symbiflow-arch-defs
ff3aedec45c0f886260b34ff5288482a89411d13
[ "ISC" ]
null
null
null
xc7/utils/prjxray_create_place_constraints.py
mjasperse/symbiflow-arch-defs
ff3aedec45c0f886260b34ff5288482a89411d13
[ "ISC" ]
null
null
null
xc7/utils/prjxray_create_place_constraints.py
mjasperse/symbiflow-arch-defs
ff3aedec45c0f886260b34ff5288482a89411d13
[ "ISC" ]
null
null
null
""" Convert a PCF file into a VPR io.place file. """ from __future__ import print_function import argparse import sys import vpr_place_constraints import sqlite3 import lxml.etree as ET if __name__ == '__main__': main()
24.35503
79
0.629981
""" Convert a PCF file into a VPR io.place file. """ from __future__ import print_function import argparse import sys import vpr_place_constraints import sqlite3 import lxml.etree as ET def get_tile_capacities(arch_xml_filename): arch = ET.parse(arch_xml_filename, ET.XMLParser(remove_blank_text=True)) root = ...
3,818
0
69
ea5d3faa9c5f5e6eaf055e946f6ea32a73b4a57e
7,301
py
Python
da/examples/ratoken/spec.py
yagrawal-sbu/distalgo
10e6db89b7db05d3b076dcf9295ce4f189558323
[ "MIT" ]
null
null
null
da/examples/ratoken/spec.py
yagrawal-sbu/distalgo
10e6db89b7db05d3b076dcf9295ce4f189558323
[ "MIT" ]
null
null
null
da/examples/ratoken/spec.py
yagrawal-sbu/distalgo
10e6db89b7db05d3b076dcf9295ce4f189558323
[ "MIT" ]
null
null
null
# -*- generated by 1.0.9 -*- import da PatternExpr_243 = da.pat.TuplePattern([da.pat.ConstantPattern('access'), da.pat.FreePattern('newtok')]) PatternExpr_255 = da.pat.TuplePattern([da.pat.ConstantPattern('request'), da.pat.FreePattern('c'), da.pat.FreePattern('p')]) PatternExpr_283 = da.pat.TuplePattern([da.pat.Consta...
49
1,219
0.618819
# -*- generated by 1.0.9 -*- import da PatternExpr_243 = da.pat.TuplePattern([da.pat.ConstantPattern('access'), da.pat.FreePattern('newtok')]) PatternExpr_255 = da.pat.TuplePattern([da.pat.ConstantPattern('request'), da.pat.FreePattern('c'), da.pat.FreePattern('p')]) PatternExpr_283 = da.pat.TuplePattern([da.pat.Consta...
5,715
368
100
819231ebcb82e1951e26b4701c363d5616596d38
13,846
py
Python
backend/moonstreamapi/providers/moonworm_provider.py
lsheiba/moonstream
1cead0413e3e7ad96e2cded6b9cc3a95c6b7e7e0
[ "Apache-2.0" ]
67
2021-07-22T11:09:30.000Z
2022-03-30T07:38:19.000Z
backend/moonstreamapi/providers/moonworm_provider.py
lsheiba/moonstream
1cead0413e3e7ad96e2cded6b9cc3a95c6b7e7e0
[ "Apache-2.0" ]
246
2021-07-19T15:40:59.000Z
2022-03-24T20:30:55.000Z
backend/moonstreamapi/providers/moonworm_provider.py
lsheiba/moonstream
1cead0413e3e7ad96e2cded6b9cc3a95c6b7e7e0
[ "Apache-2.0" ]
21
2021-07-25T18:36:05.000Z
2022-03-30T16:30:24.000Z
import logging from dataclasses import dataclass, field from typing import Any, Dict, List, Optional, Tuple, cast from bugout.app import Bugout from bugout.data import BugoutResource from moonstreamdb.blockchain import AvailableBlockchainType, get_label_model from sqlalchemy import and_, or_, text from sqlalchemy.orm ...
34.187654
178
0.640546
import logging from dataclasses import dataclass, field from typing import Any, Dict, List, Optional, Tuple, cast from bugout.app import Bugout from bugout.data import BugoutResource from moonstreamdb.blockchain import AvailableBlockchainType, get_label_model from sqlalchemy import and_, or_, text from sqlalchemy.orm ...
328
11,714
111
4fadd427d9e9cb1eb6aa7eccfdde1eb29b0ac329
4,994
py
Python
microscope/monitor/epresolver.py
cilium/microscope
db922b79fb28e500f9a2d1f749620485cfda9dc0
[ "Apache-2.0" ]
16
2018-04-24T16:54:41.000Z
2021-05-13T22:49:19.000Z
microscope/monitor/epresolver.py
cilium/microscope
db922b79fb28e500f9a2d1f749620485cfda9dc0
[ "Apache-2.0" ]
50
2018-02-06T11:32:46.000Z
2021-06-01T21:54:45.000Z
microscope/monitor/epresolver.py
cilium/monitor-mux
db922b79fb28e500f9a2d1f749620485cfda9dc0
[ "Apache-2.0" ]
4
2018-02-13T10:10:34.000Z
2022-02-28T11:50:41.000Z
from typing import Dict, List, Set, Callable # https://github.com/cilium/cilium/blob/master/pkg/identity/numericidentity.go#L33 reserved_identities = { 0: ["reserved:unknown"], 1: ["reserved:host"], 2: ["reserved:world"], 3: ["reserved:cluster"], 4: ["reserved:health"], 5: ["reserved:init"] } ...
33.972789
82
0.538046
from typing import Dict, List, Set, Callable # https://github.com/cilium/cilium/blob/master/pkg/identity/numericidentity.go#L33 reserved_identities = { 0: ["reserved:unknown"], 1: ["reserved:host"], 2: ["reserved:world"], 3: ["reserved:cluster"], 4: ["reserved:health"], 5: ["reserved:init"] } ...
3,634
0
238
6f98757d8929b926f6db70c57f06a707280ee1eb
3,229
py
Python
amqp_influxdb/tests/tests.py
cloudify-cosmo/cloudify-amqp-influxdb
60c1f99bcb04876bd6a148f2815d9c900602241b
[ "Apache-2.0" ]
3
2016-08-25T00:34:26.000Z
2017-05-11T09:46:44.000Z
amqp_influxdb/tests/tests.py
cloudify-cosmo/cloudify-amqp-influxdb
60c1f99bcb04876bd6a148f2815d9c900602241b
[ "Apache-2.0" ]
5
2015-03-16T19:53:25.000Z
2018-01-06T11:59:31.000Z
amqp_influxdb/tests/tests.py
cloudify-cosmo/cloudify-amqp-influxdb
60c1f99bcb04876bd6a148f2815d9c900602241b
[ "Apache-2.0" ]
6
2015-01-21T17:09:54.000Z
2017-03-27T02:06:06.000Z
######## # Copyright (c) 2014 GigaSpaces Technologies Ltd. All rights reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
29.623853
79
0.584391
######## # Copyright (c) 2014 GigaSpaces Technologies Ltd. All rights reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
2,173
9
96
e6e5d2f55796186a5638dbc834049ae6db8f09e8
486,178
py
Python
script.py
minecraft-design/minecraft-design.github.io
1b07c919e9dbc9a7e8c1833e2541fb5268d49a12
[ "MIT" ]
null
null
null
script.py
minecraft-design/minecraft-design.github.io
1b07c919e9dbc9a7e8c1833e2541fb5268d49a12
[ "MIT" ]
null
null
null
script.py
minecraft-design/minecraft-design.github.io
1b07c919e9dbc9a7e8c1833e2541fb5268d49a12
[ "MIT" ]
null
null
null
print("<!DOCTYPE html><html><body>") # arr =[[0, 152, 17, 252, 146, 88], [1, 260, 335, 63, 44, 17], [2, 53, 72, 130, 24, 80], [3, 352, 178, 32, 30, 287], [4, 80, 24, 17, 77, 28], [5, 85, 79, 276, 158, 63], [6, 376, 85, 16, 251, 382], [7, 17, 378, 16, 376, 384], [8, 79, 180, 183, 362, 85], [9, 80, 28, 17, 11, 36], [10, ...
5,227.72043
61,586
0.741782
print("<!DOCTYPE html><html><body>") # arr =[[0, 152, 17, 252, 146, 88], [1, 260, 335, 63, 44, 17], [2, 53, 72, 130, 24, 80], [3, 352, 178, 32, 30, 287], [4, 80, 24, 17, 77, 28], [5, 85, 79, 276, 158, 63], [6, 376, 85, 16, 251, 382], [7, 17, 378, 16, 376, 384], [8, 79, 180, 183, 362, 85], [9, 80, 28, 17, 11, 36], [10, ...
0
0
0
14d30ee0c043ae6980a427f35c470ba92110bfd2
1,446
py
Python
past-competitions/2018/src/brett-python/Prob07.py
gideontong/CodeQuest
8da4fe367221094cdf058402a4719ca0dc4bdaac
[ "MIT" ]
2
2021-05-23T01:21:59.000Z
2022-02-17T23:12:48.000Z
past-competitions/2018/src/brett-python/Prob07.py
gideontong/CodeQuest
8da4fe367221094cdf058402a4719ca0dc4bdaac
[ "MIT" ]
null
null
null
past-competitions/2018/src/brett-python/Prob07.py
gideontong/CodeQuest
8da4fe367221094cdf058402a4719ca0dc4bdaac
[ "MIT" ]
null
null
null
# Open the input file with open("Prob07.in.txt", "rt") as inputFile: # Read the number of test cases (trim out the newline) cases = int(inputFile.readline().replace("\n", "")) # For each test case for caseNum in range(cases): # Read the number of words wordCount = int(inputFile.readline(...
36.15
68
0.478562
# Open the input file with open("Prob07.in.txt", "rt") as inputFile: # Read the number of test cases (trim out the newline) cases = int(inputFile.readline().replace("\n", "")) # For each test case for caseNum in range(cases): # Read the number of words wordCount = int(inputFile.readline(...
0
0
0
8e677461788a883eb660d8987193edb44d9015eb
5,801
py
Python
see/context/resources/test/vbox_test.py
security-geeks/see
900472b8b3e45fbb414f3beba4df48e86eaa4b3a
[ "Apache-2.0" ]
851
2015-10-28T09:32:05.000Z
2022-03-31T02:32:28.000Z
see/context/resources/test/vbox_test.py
security-geeks/see
900472b8b3e45fbb414f3beba4df48e86eaa4b3a
[ "Apache-2.0" ]
29
2015-12-21T15:43:28.000Z
2021-05-16T10:57:09.000Z
see/context/resources/test/vbox_test.py
security-geeks/see
900472b8b3e45fbb414f3beba4df48e86eaa4b3a
[ "Apache-2.0" ]
110
2015-10-26T13:05:18.000Z
2021-11-17T18:00:17.000Z
import sys import mock import libvirt import difflib import unittest from see.context.resources import vbox def compare(text1, text2): """Utility function for comparing text and returining differences.""" diff = difflib.ndiff(text1.splitlines(True), text2.splitlines(True)) return '\n' + '\n'.join(diff) ...
44.968992
109
0.620927
import sys import mock import libvirt import difflib import unittest from see.context.resources import vbox def compare(text1, text2): """Utility function for comparing text and returining differences.""" diff = difflib.ndiff(text1.splitlines(True), text2.splitlines(True)) return '\n' + '\n'.join(diff) ...
0
5,386
92
9888e98a07ee556543a1ef4aa21ba395358d4ab3
9,658
py
Python
D3G/main.py
uber-research/D3G
475a1f2491d32da6369846361d77e372908fd1df
[ "Apache-2.0" ]
25
2020-02-25T14:30:11.000Z
2021-07-05T18:42:32.000Z
D3G/main.py
uber-research/D3G
475a1f2491d32da6369846361d77e372908fd1df
[ "Apache-2.0" ]
null
null
null
D3G/main.py
uber-research/D3G
475a1f2491d32da6369846361d77e372908fd1df
[ "Apache-2.0" ]
5
2020-03-17T12:59:43.000Z
2020-10-06T20:34:15.000Z
""" Modifications Copyright (c) 2019 Uber Technologies, Inc. """ import numpy as np import cv2 import torch import gym import argparse import os import utils import TD3 import OurDDPG import D3G import Standard_QSS # Runs policy for X episodes and returns average reward # A fixed seed is used for the eval environ...
41.273504
171
0.565231
""" Modifications Copyright (c) 2019 Uber Technologies, Inc. """ import numpy as np import cv2 import torch import gym import argparse import os import utils import TD3 import OurDDPG import D3G import Standard_QSS def done_condition(env_name, state): if 'Reacher' in env_name: return (np.abs(np.linalg.no...
2,054
0
114
3317dfd8291d9c905fca53c341d286e90afbe3ff
342
py
Python
pythonProject/03al88Criar_Ler_escrever_apagar_arquivo/ler_modo_try.py
D-Wolter/PycharmProjects
c8d6144efa30261bff72a3e0414a0d80f6730f9b
[ "MIT" ]
null
null
null
pythonProject/03al88Criar_Ler_escrever_apagar_arquivo/ler_modo_try.py
D-Wolter/PycharmProjects
c8d6144efa30261bff72a3e0414a0d80f6730f9b
[ "MIT" ]
null
null
null
pythonProject/03al88Criar_Ler_escrever_apagar_arquivo/ler_modo_try.py
D-Wolter/PycharmProjects
c8d6144efa30261bff72a3e0414a0d80f6730f9b
[ "MIT" ]
null
null
null
#https://docs.python.org/3/libraty/functions.html#open #costumase usar o bloco try para abrir arquivos try: file = open('abc.txt', 'w+') file.write('Linha')# o arquivo esta vazio entao escrevemos file.seek(0) print(file.read()) finally: #para garantir que o arquivo sera fechado se holver e...
28.5
78
0.672515
#https://docs.python.org/3/libraty/functions.html#open #costumase usar o bloco try para abrir arquivos try: file = open('abc.txt', 'w+') file.write('Linha')# o arquivo esta vazio entao escrevemos file.seek(0) print(file.read()) finally: #para garantir que o arquivo sera fechado se holver e...
0
0
0
a37330d8bd84ef702161d82dfa4cbf7705b5dc92
3,406
py
Python
code.py
Namrata-NM/olympics-data-analysis
7490f33f9335077532f652709fce0301fa3ca67c
[ "MIT" ]
null
null
null
code.py
Namrata-NM/olympics-data-analysis
7490f33f9335077532f652709fce0301fa3ca67c
[ "MIT" ]
null
null
null
code.py
Namrata-NM/olympics-data-analysis
7490f33f9335077532f652709fce0301fa3ca67c
[ "MIT" ]
null
null
null
# -------------- #Importing header files import pandas as pd import numpy as np import matplotlib.pyplot as plt #Path of the file is stored in the variable path #Code starts here # Data Loading data=pd.read_csv(path) data.rename(columns={'Total':'Total_Medals'},inplace=True) data.head(10) # Summer or Winter data['B...
29.617391
107
0.745449
# -------------- #Importing header files import pandas as pd import numpy as np import matplotlib.pyplot as plt #Path of the file is stored in the variable path #Code starts here # Data Loading data=pd.read_csv(path) data.rename(columns={'Total':'Total_Medals'},inplace=True) data.head(10) # Summer or Winter data['B...
121
0
22
b1d982527a36cd045a0ec9f565af25b1ae1a1041
921
py
Python
hw9/task_3.py
DashViolin/gb_python_lvl1
ce4d6e8a717122c4d492b724b249d881c885d30c
[ "Apache-2.0" ]
1
2021-11-01T18:24:38.000Z
2021-11-01T18:24:38.000Z
hw9/task_3.py
DashViolin/gb_python_lvl1
ce4d6e8a717122c4d492b724b249d881c885d30c
[ "Apache-2.0" ]
1
2021-10-04T17:48:29.000Z
2021-10-04T17:48:29.000Z
hw9/task_3.py
DashViolin/gb_python_lvl1
ce4d6e8a717122c4d492b724b249d881c885d30c
[ "Apache-2.0" ]
null
null
null
from typing import Union welder = Position(name='Alex', surname='Murphy', position='welder', wage=120000, bonus=30000) print(welder) print(welder.get_full_name()) miller = Position(name='Anne', surname='Lewis', position='miller', wage=150000, bonus=24000) print(miller) print(miller.get_total_income())
27.909091
114
0.647123
from typing import Union class Worker: def __init__(self, name: str, surname: str, position: str, wage: Union[int, float], bonus: Union[int, float]): self.name = name.capitalize() self.surname = surname.capitalize() self.position = position self._income = { "wage": wage...
467
-6
152
1274d5c5256b405787333273d1e01c0f02bbbaf3
9,903
py
Python
obstacle2osm.py
osmno/obstacle2osm
e45dad160812506f8dd6dddc1c89a75930710fab
[ "CC0-1.0" ]
1
2021-05-27T09:37:01.000Z
2021-05-27T09:37:01.000Z
obstacle2osm.py
osmno/obstacle2osm
e45dad160812506f8dd6dddc1c89a75930710fab
[ "CC0-1.0" ]
null
null
null
obstacle2osm.py
osmno/obstacle2osm
e45dad160812506f8dd6dddc1c89a75930710fab
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf8 # obstacle2osm # Converts aviation obstacles from Kartverket WFS/GML files for import/update in OSM # Usage: obstacle2.osm [county] # Creates OSM file with name "Luftfartshinder_" + county + ".osm" import html import time import sys import urllib.request import json import z...
28.456897
152
0.647783
#!/usr/bin/env python3 # -*- coding: utf8 # obstacle2osm # Converts aviation obstacles from Kartverket WFS/GML files for import/update in OSM # Usage: obstacle2.osm [county] # Creates OSM file with name "Luftfartshinder_" + county + ".osm" import html import time import sys import urllib.request import json import z...
136
0
23
5c9603f2e0ac2abb46a8160361bd4405030226f9
377
py
Python
calibrate.py
etanzapinsky/voyeur
0b8e6b212dec93a9fee0bbf45e639d63c691cea9
[ "MIT" ]
null
null
null
calibrate.py
etanzapinsky/voyeur
0b8e6b212dec93a9fee0bbf45e639d63c691cea9
[ "MIT" ]
null
null
null
calibrate.py
etanzapinsky/voyeur
0b8e6b212dec93a9fee0bbf45e639d63c691cea9
[ "MIT" ]
null
null
null
import time from blinds import Blinds, NEUTRAL, UP, DOWN # janky way to calibrate blinds to be open/closed to the right amount # edit this file to change UP/DOWN to move blinds in desired direction, # save and then run if __name__ == '__main__': main()
22.176471
71
0.708223
import time from blinds import Blinds, NEUTRAL, UP, DOWN # janky way to calibrate blinds to be open/closed to the right amount # edit this file to change UP/DOWN to move blinds in desired direction, # save and then run def main(): blinds = Blinds() blinds.run_servo(NEUTRAL + UP) time.sleep(1) blinds.r...
95
0
22
d3c9aa8d47bb2a5146cb0aeb909d6c72c15066cf
5,018
py
Python
test/test_compiler.py
timothyrenner/svl
a74c09c49f2e14046acd4b0eeb861f8fef6bca96
[ "MIT" ]
8
2019-03-27T12:49:21.000Z
2020-10-10T11:16:25.000Z
test/test_compiler.py
timothyrenner/svl
a74c09c49f2e14046acd4b0eeb861f8fef6bca96
[ "MIT" ]
65
2018-08-26T14:48:45.000Z
2020-03-17T12:24:42.000Z
test/test_compiler.py
timothyrenner/svl
a74c09c49f2e14046acd4b0eeb861f8fef6bca96
[ "MIT" ]
1
2019-09-13T19:39:07.000Z
2019-09-13T19:39:07.000Z
import pytest import os from jinja2 import Environment, BaseLoader from svl.compiler.compiler import _extract_additional_datasets, svl from svl.compiler.errors import ( SvlSyntaxError, SvlMissingFileError, SvlPlotError, SvlDataLoadError, SvlDataProcessingError, ) CURRENT_DIR = os.path.dirname(os...
27.723757
78
0.66381
import pytest import os from jinja2 import Environment, BaseLoader from svl.compiler.compiler import _extract_additional_datasets, svl from svl.compiler.errors import ( SvlSyntaxError, SvlMissingFileError, SvlPlotError, SvlDataLoadError, SvlDataProcessingError, ) CURRENT_DIR = os.path.dirname(os...
0
0
0
7dd6e58903392a293ee7778d9cdc919d3feae0dc
285
py
Python
djaveAPI/views/docs.py
dasmith2/djaveAPI
6cece89bb945a4c8ace1534cc007626a35af3c38
[ "MIT" ]
null
null
null
djaveAPI/views/docs.py
dasmith2/djaveAPI
6cece89bb945a4c8ace1534cc007626a35af3c38
[ "MIT" ]
null
null
null
djaveAPI/views/docs.py
dasmith2/djaveAPI
6cece89bb945a4c8ace1534cc007626a35af3c38
[ "MIT" ]
null
null
null
from djaveAPI.docs import docs from djaveURL import protocol_and_host
25.909091
53
0.8
from djaveAPI.docs import docs from djaveURL import protocol_and_host def api_doc_contents(request, model_names): api_root_url = protocol_and_host(request) model_docs = [] for model_name in model_names: model_docs.append(docs(model_name, api_root_url)) return model_docs
191
0
23
3e23295719475515500986c03f81d532318e434d
7,978
py
Python
utils/data_utils.py
Ailln/stock-prediction
9de77de5047446ffceeed83cb610c7edd2cb1ad3
[ "MIT" ]
11
2020-07-11T06:14:29.000Z
2021-12-02T08:48:53.000Z
utils/data_utils.py
HaveTwoBrush/stock-prediction
9de77de5047446ffceeed83cb610c7edd2cb1ad3
[ "MIT" ]
null
null
null
utils/data_utils.py
HaveTwoBrush/stock-prediction
9de77de5047446ffceeed83cb610c7edd2cb1ad3
[ "MIT" ]
8
2020-04-15T14:29:47.000Z
2021-12-19T09:26:53.000Z
from pathlib import Path import numpy as np import pandas as pd from pylab import plt from progressbar import ProgressBar from models import sklearn_model
37.455399
108
0.633116
from pathlib import Path import numpy as np import pandas as pd from pylab import plt from progressbar import ProgressBar from models import sklearn_model class DataUtils(object): def __init__(self, config): self.config = config self.origin_train_path = Path(self.config["datas"]["origin_train_p...
7,361
448
23
a2fa74364a6125d4e4765053cb76ca93208691d6
17,331
py
Python
rules/dr_default.py
00-ab/willows
14754329451b5a11a2ea626ecf939014c2bf4cac
[ "Unlicense" ]
null
null
null
rules/dr_default.py
00-ab/willows
14754329451b5a11a2ea626ecf939014c2bf4cac
[ "Unlicense" ]
null
null
null
rules/dr_default.py
00-ab/willows
14754329451b5a11a2ea626ecf939014c2bf4cac
[ "Unlicense" ]
null
null
null
from __future__ import print_function import math import copy import json dancer = { verbs : {} adjs: {} } # dancer describes the state of a conscious being # relation describes the feeling of one regarding another dancer["adjs"]["lust"] dancer["adjs"]["like"] # define the archetypal relations dancer["relati...
28.364975
104
0.667878
from __future__ import print_function import math import copy import json dancer = { verbs : {} adjs: {} } # dancer describes the state of a conscious being # relation describes the feeling of one regarding another dancer["adjs"]["lust"] dancer["adjs"]["like"] # define the archetypal relations dancer["relati...
1,342
59
366
29ccba1a2cac835de3bf2e7be861a69f13af32ef
4,653
py
Python
Arbre.py
AmadouSY/Construction-de-mobiles
5c954dc3d5fa99bbdce2bdab395008d863e6178c
[ "MIT" ]
null
null
null
Arbre.py
AmadouSY/Construction-de-mobiles
5c954dc3d5fa99bbdce2bdab395008d863e6178c
[ "MIT" ]
null
null
null
Arbre.py
AmadouSY/Construction-de-mobiles
5c954dc3d5fa99bbdce2bdab395008d863e6178c
[ "MIT" ]
null
null
null
##### CLASSE ARBRE ##### #Initialise l'arbre #Emplacement du sous arbre gauche #Feuille la plus lourde de l'arbre #Liste des feuille de l'arbre #Largeur du noeud #Place les arbres #Largeur de l'arbre pour le dessin #Longueur de l'arbre pour le dess...
26.140449
80
0.566301
##### CLASSE ARBRE ##### class Arbre: #Initialise l'arbre def __init__(self): #Valeur de l'arbre self.valeur = 0 #Fils gauche self.gauche = None #Fils droit self.droit = None #Position de l'arbre self.position = Position() def __str__(self): return "["+s...
3,359
-15
897
698ff5d66b57b03332ca7ef940aca00b96b031c8
1,275
py
Python
src/MouseClick.py
radialia/Gestured-Mouse
6c1a41fa552a959ba28453e916709f170142a682
[ "MIT" ]
1
2022-01-31T10:11:05.000Z
2022-01-31T10:11:05.000Z
src/MouseClick.py
radialia/Air-Mouse
6c1a41fa552a959ba28453e916709f170142a682
[ "MIT" ]
null
null
null
src/MouseClick.py
radialia/Air-Mouse
6c1a41fa552a959ba28453e916709f170142a682
[ "MIT" ]
null
null
null
import cv2 import math from pynput.mouse import Button
33.552632
78
0.546667
import cv2 import math from pynput.mouse import Button def MouseClick(frame, landmarkList, mouse): clicked = False if(len(landmarkList) != 0): # Gets landmarks of index and middle finger index_x, index_y = landmarkList[8][1], landmarkList[8][2] middle_x, middle_y = landmarkList[12][1]...
1,196
0
23
628e9f8ac0080ab46d87ed0261cbe4bc729e3273
2,003
py
Python
deewr/variables.py
fromz/deewr-tga
bd913d2b70dd83dc7dfa2f2da9cf19f64122ab0e
[ "MIT" ]
null
null
null
deewr/variables.py
fromz/deewr-tga
bd913d2b70dd83dc7dfa2f2da9cf19f64122ab0e
[ "MIT" ]
2
2021-03-31T19:58:26.000Z
2021-12-13T20:41:50.000Z
deewr/variables.py
fromz/deewr-tga
bd913d2b70dd83dc7dfa2f2da9cf19f64122ab0e
[ "MIT" ]
null
null
null
import re def elem2dict(node): """ Convert an lxml.etree node tree into a dict. """ d = {} for e in node.iterchildren(): key = e.tag.split('}')[1] if '}' in e.tag else e.tag value = e.text if e.text else elem2dict(e) d[key] = value return d
30.348485
92
0.624064
import re def elem2dict(node): """ Convert an lxml.etree node tree into a dict. """ d = {} for e in node.iterchildren(): key = e.tag.split('}')[1] if '}' in e.tag else e.tag value = e.text if e.text else elem2dict(e) d[key] = value return d class VariableExtractor: ...
1,520
16
173
e5deb6e08999615678849e1f02b3b0b5770df613
4,072
py
Python
setup.py
AlexBourassa/nspyre
d254af09c7c8377552e85dba6f60b150fbb8da2e
[ "MIT" ]
8
2019-12-06T14:49:34.000Z
2020-07-03T18:46:45.000Z
setup.py
nspyre-org/nspyre
d254af09c7c8377552e85dba6f60b150fbb8da2e
[ "BSD-3-Clause" ]
31
2020-09-21T21:01:06.000Z
2021-12-10T03:27:26.000Z
setup.py
NSpyre-Dev/nspyre
d254af09c7c8377552e85dba6f60b150fbb8da2e
[ "BSD-3-Clause" ]
4
2020-10-07T23:58:13.000Z
2022-03-01T15:22:34.000Z
from setuptools import setup, find_packages import codecs import pathlib import re here = pathlib.Path(__file__).parent.resolve() def read(*parts): """ Build an absolute path from *parts* and and return the contents of the resulting file. Assume UTF-8 encoding. """ with codecs.open(pathlib.Pure...
31.083969
97
0.585953
from setuptools import setup, find_packages import codecs import pathlib import re here = pathlib.Path(__file__).parent.resolve() def read(*parts): """ Build an absolute path from *parts* and and return the contents of the resulting file. Assume UTF-8 encoding. """ with codecs.open(pathlib.Pure...
0
0
0
ba08a1c3131298618b80139e7d5cc04315de0e4d
2,984
py
Python
code/generate_predictions.py
jpedrocm/jpcm-lista2-codigo
8c1f867e3cc659cd262f8d9cd3521ccc5f1e8fd8
[ "MIT" ]
1
2019-03-15T08:54:08.000Z
2019-03-15T08:54:08.000Z
code/generate_predictions.py
jpedrocm/pool-pruning-experiment
8c1f867e3cc659cd262f8d9cd3521ccc5f1e8fd8
[ "MIT" ]
null
null
null
code/generate_predictions.py
jpedrocm/pool-pruning-experiment
8c1f867e3cc659cd262f8d9cd3521ccc5f1e8fd8
[ "MIT" ]
null
null
null
############################################################################### import numpy as np import random as rn #DO NOT CHANGE THIS np.random.seed(1478) rn.seed(2264) ################### from utils import load_datasets_filenames, load_experiment_configuration from utils import load_dataset, save_predictions fr...
33.52809
81
0.696716
############################################################################### import numpy as np import random as rn #DO NOT CHANGE THIS np.random.seed(1478) rn.seed(2264) ################### from utils import load_datasets_filenames, load_experiment_configuration from utils import load_dataset, save_predictions fr...
0
0
0
f15b72c2d65ffa81c60de9b17f396cd340613c1e
4,350
py
Python
roonremote.py
matteck/roonrest
ce881a0ee89abc40b410f1b88764c4f0983fa3b0
[ "MIT" ]
1
2017-11-13T04:29:44.000Z
2017-11-13T04:29:44.000Z
roonremote.py
matteck/roonrest
ce881a0ee89abc40b410f1b88764c4f0983fa3b0
[ "MIT" ]
null
null
null
roonremote.py
matteck/roonrest
ce881a0ee89abc40b410f1b88764c4f0983fa3b0
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import evdev import select import requests import subprocess import re from datetime import datetime roon_base_url = "http://greenspeaker:3000/api/v1" harmony_base_url = "http://m1:8282/hubs/harmony-hub/devices/schiit-amp/commands" p = re.compile('"zone_id": "([a-z0-9]+)",\n *"display_name": "...
42.647059
116
0.437011
#!/usr/bin/env python3 import evdev import select import requests import subprocess import re from datetime import datetime roon_base_url = "http://greenspeaker:3000/api/v1" harmony_base_url = "http://m1:8282/hubs/harmony-hub/devices/schiit-amp/commands" p = re.compile('"zone_id": "([a-z0-9]+)",\n *"display_name": "...
0
0
0
8e4880e0ebce4707e9d80ed91abc80216cb3e5ab
15,179
py
Python
image_manipulation.py
shequin-joshua-9147/cs162-final-project
0edff7170ca0761b38c30774475bfecac2a18f01
[ "MIT" ]
null
null
null
image_manipulation.py
shequin-joshua-9147/cs162-final-project
0edff7170ca0761b38c30774475bfecac2a18f01
[ "MIT" ]
null
null
null
image_manipulation.py
shequin-joshua-9147/cs162-final-project
0edff7170ca0761b38c30774475bfecac2a18f01
[ "MIT" ]
null
null
null
""" Manipulate images in specific ways based on commands used on input. This module is used in order to manipulate images in a number of ways. All of this is done through the ImageO object. The ImageO object reads in a file and allows for manipulations to be done on an image and for that image to be output after the ...
34.974654
97
0.564332
""" Manipulate images in specific ways based on commands used on input. This module is used in order to manipulate images in a number of ways. All of this is done through the ImageO object. The ImageO object reads in a file and allows for manipulations to be done on an image and for that image to be output after the ...
0
0
0
7c3bdfb9f4ce43de33608bfbdf36e0f48a3e90c4
1,067
py
Python
CorePython/Networking/TCP/tsTserv.py
AnatoleZho/Python3
3d3d32b5ad0affef76287b89bc87267fc551127d
[ "MIT" ]
null
null
null
CorePython/Networking/TCP/tsTserv.py
AnatoleZho/Python3
3d3d32b5ad0affef76287b89bc87267fc551127d
[ "MIT" ]
null
null
null
CorePython/Networking/TCP/tsTserv.py
AnatoleZho/Python3
3d3d32b5ad0affef76287b89bc87267fc551127d
[ "MIT" ]
null
null
null
# 导入了 time.ctime()和 socket 模块的所有属性 from socket import * from time import ctime HOST = '' # HOST 变量是空白的,这是对 bind()方法的标识,表示它可以使用任何可用的地址 PORT = 21567 # 选择了一个随机的端口号,并且该端口号似乎没有被使用或被系统保留 BZUGSIZ = 1024 # 对于该 应用程序,将缓冲区大小设置为 1KB。可以根据网络性能和程序需要改变这个容量 ADDR = (HOST, PORT) tcpSerSock = socket(AF_INET, SOCK_STREAM) # ...
28.078947
76
0.716963
# 导入了 time.ctime()和 socket 模块的所有属性 from socket import * from time import ctime HOST = '' # HOST 变量是空白的,这是对 bind()方法的标识,表示它可以使用任何可用的地址 PORT = 21567 # 选择了一个随机的端口号,并且该端口号似乎没有被使用或被系统保留 BZUGSIZ = 1024 # 对于该 应用程序,将缓冲区大小设置为 1KB。可以根据网络性能和程序需要改变这个容量 ADDR = (HOST, PORT) tcpSerSock = socket(AF_INET, SOCK_STREAM) # ...
0
0
0
232477d1a2e19b60e70bb78d55802171edcce92e
4,693
py
Python
members/conferences/models.py
ocwc/ocwc-members
3ede8e0ff830e2aaff4ae09f9aaefd3eaa83146b
[ "MIT" ]
null
null
null
members/conferences/models.py
ocwc/ocwc-members
3ede8e0ff830e2aaff4ae09f9aaefd3eaa83146b
[ "MIT" ]
7
2015-11-27T15:59:52.000Z
2022-01-13T00:38:38.000Z
members/conferences/models.py
ocwc/ocwc-members
3ede8e0ff830e2aaff4ae09f9aaefd3eaa83146b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import uuid from tinymce import HTMLField from django.db import models from django.urls import reverse from django.core.mail import EmailMessage from django.conf import settings from django.contrib.postgres.fields import JSONField from crm.utils import print_pdf CONFERENCE_REGISTRATION_TYP...
32.590278
126
0.698061
# -*- coding: utf-8 -*- import uuid from tinymce import HTMLField from django.db import models from django.urls import reverse from django.core.mail import EmailMessage from django.conf import settings from django.contrib.postgres.fields import JSONField from crm.utils import print_pdf class ConferenceInterface(mod...
1,595
2,568
115
167b4b86ac839003f6f7230a884abb5014d92fce
9,100
py
Python
tests/test_types.py
krisHans3n/geoalchemy2-mysql
38a44d51c242d867f40d4c5503c91f52a8269ff4
[ "MIT" ]
1
2022-02-01T23:52:06.000Z
2022-02-01T23:52:06.000Z
tests/test_types.py
krisHans3n/geoalchemy2
604c1fcc824d243698ca46227fd05a8cbbb9db2c
[ "MIT" ]
null
null
null
tests/test_types.py
krisHans3n/geoalchemy2
604c1fcc824d243698ca46227fd05a8cbbb9db2c
[ "MIT" ]
null
null
null
import re import pytest from sqlalchemy import Column from sqlalchemy import MetaData from sqlalchemy import Table from sqlalchemy.sql import func from sqlalchemy.sql import insert from sqlalchemy.sql import text from geoalchemy2.exc import ArgumentError from geoalchemy2.types import Geography from geoalchemy2.types ...
33.828996
92
0.661648
import re import pytest from sqlalchemy import Column from sqlalchemy import MetaData from sqlalchemy import Table from sqlalchemy.sql import func from sqlalchemy.sql import insert from sqlalchemy.sql import text from geoalchemy2.exc import ArgumentError from geoalchemy2.types import Geography from geoalchemy2.types ...
7,144
22
1,472
d1b306d3b99abe243693a2787b9aba3bf7abb9c1
4,187
py
Python
custom_components/googlehome/config_flow.py
Drakulix/googlehome
fb671679b25be51e08bdce066f281b8fb703199a
[ "Apache-2.0" ]
29
2019-09-06T06:15:34.000Z
2021-12-01T13:23:58.000Z
custom_components/googlehome/config_flow.py
Drakulix/googlehome
fb671679b25be51e08bdce066f281b8fb703199a
[ "Apache-2.0" ]
24
2019-09-06T08:37:34.000Z
2021-08-24T15:29:27.000Z
custom_components/googlehome/config_flow.py
Drakulix/googlehome
fb671679b25be51e08bdce066f281b8fb703199a
[ "Apache-2.0" ]
6
2019-09-11T01:41:13.000Z
2022-03-14T10:18:58.000Z
from homeassistant import config_entries from homeassistant.core import callback from collections import OrderedDict from .auth import get_master_token, get_access_token from .const import ( DOMAIN, CONF_USERNAME, CONF_PASSWORD, CONF_MASTER_TOKEN, CONF_DEVICE_TYPES, CONF_RSSI_THRESHOLD, CONF...
40.650485
156
0.609983
from homeassistant import config_entries from homeassistant.core import callback from collections import OrderedDict from .auth import get_master_token, get_access_token from .const import ( DOMAIN, CONF_USERNAME, CONF_PASSWORD, CONF_MASTER_TOKEN, CONF_DEVICE_TYPES, CONF_RSSI_THRESHOLD, CONF...
1,823
1,672
46
6cafd7462c73dfa3da9224d6445ae29d17212194
5,913
py
Python
mmdet/core/visualization/TensorboardLoggerHookV2.py
flyingTan/QuantMmdetection
6126cd7725dcd0c4d3ad68f016908c500a0adbb9
[ "Apache-2.0" ]
2
2021-08-28T06:43:03.000Z
2022-01-17T00:04:23.000Z
mmdet/core/visualization/TensorboardLoggerHookV2.py
flyingTan/QuantMmdetection
6126cd7725dcd0c4d3ad68f016908c500a0adbb9
[ "Apache-2.0" ]
null
null
null
mmdet/core/visualization/TensorboardLoggerHookV2.py
flyingTan/QuantMmdetection
6126cd7725dcd0c4d3ad68f016908c500a0adbb9
[ "Apache-2.0" ]
null
null
null
import os.path as osp from mmcv.utils import TORCH_VERSION from mmcv.runner.dist_utils import master_only from mmcv.runner import HOOKS from torch.utils.data import DataLoader from mmcv.runner.hooks.logger import LoggerHook import torch import numpy as np from .utils import CompareMultiLayerDist @HOOKS.register_module...
45.137405
141
0.561813
import os.path as osp from mmcv.utils import TORCH_VERSION from mmcv.runner.dist_utils import master_only from mmcv.runner import HOOKS from torch.utils.data import DataLoader from mmcv.runner.hooks.logger import LoggerHook import torch import numpy as np from .utils import CompareMultiLayerDist @HOOKS.register_module...
3,328
2,241
22
061f629d484ea9933b245faef68b08783aae52d0
594
py
Python
classifier/classes/modules/text/transformer/ModelTransformer.py
canary-for-cognition/multimodal-dl-framework
54ebd3c6dcdfc48ed619316321d9f0e7a5f0fc9c
[ "MIT" ]
2
2021-08-31T08:58:30.000Z
2021-09-02T14:32:30.000Z
classifier/classes/modules/text/transformer/ModelTransformer.py
canary-for-cognition/multimodal-nn-framework
7733376b05840e2b3dead438dd3981db9694b6ae
[ "MIT" ]
5
2020-09-22T04:29:25.000Z
2020-12-20T16:16:47.000Z
classifier/classes/modules/text/transformer/ModelTransformer.py
canary-for-cognition/multimodal-nn-framework
7733376b05840e2b3dead438dd3981db9694b6ae
[ "MIT" ]
1
2021-02-09T18:40:55.000Z
2021-02-09T18:40:55.000Z
from typing import Dict, Tuple import torch from classifier.classes.core.Model import Model from classifier.classes.modules.text.transformer.Transformer import Transformer
31.263158
79
0.727273
from typing import Dict, Tuple import torch from classifier.classes.core.Model import Model from classifier.classes.modules.text.transformer.Transformer import Transformer class ModelTransformer(Model): def __init__(self, network_params: Dict): super().__init__(device=network_params["device"]) ...
333
9
77
dc8e765a423050be4a0f0acf7bd19d9cf552b8fa
892
py
Python
src/jvm/io/fsq/twofishes/scripts/fetch_and_fix_flickr.py
jglesner/fsqio
436dd3a7667fd23f638bf96bdcd9ec83266a2319
[ "Apache-2.0" ]
252
2016-01-08T23:12:13.000Z
2022-01-17T16:31:49.000Z
src/jvm/io/fsq/twofishes/scripts/fetch_and_fix_flickr.py
jglesner/fsqio
436dd3a7667fd23f638bf96bdcd9ec83266a2319
[ "Apache-2.0" ]
67
2016-01-13T17:34:12.000Z
2021-08-04T18:50:24.000Z
src/jvm/io/fsq/twofishes/scripts/fetch_and_fix_flickr.py
jglesner/fsqio
436dd3a7667fd23f638bf96bdcd9ec83266a2319
[ "Apache-2.0" ]
59
2016-03-25T20:49:03.000Z
2021-08-04T05:36:38.000Z
#!/usr/bin/env python import tarfile import urllib import re import StringIO import os basedir = 'src/jvm/io/fsq/twofishes/indexer/data/downloaded' flickr_shapes_file_name = os.path.join(basedir, 'flickr_shapes_public_dataset_2.0.tar.gz') try: open(flickr_shapes_file_name) except IOError as e: print 'Downloadin...
24.777778
96
0.751121
#!/usr/bin/env python import tarfile import urllib import re import StringIO import os basedir = 'src/jvm/io/fsq/twofishes/indexer/data/downloaded' flickr_shapes_file_name = os.path.join(basedir, 'flickr_shapes_public_dataset_2.0.tar.gz') try: open(flickr_shapes_file_name) except IOError as e: print 'Downloadin...
0
0
0
6ea13b23e201409046ac5f8b79ed0cf75e2bf2f7
559
py
Python
src/db/storage.py
BernarBerdikul/Async_API_part_1
0f218f38d099909fad629f6f9443fea4a29be3f8
[ "BSD-3-Clause" ]
null
null
null
src/db/storage.py
BernarBerdikul/Async_API_part_1
0f218f38d099909fad629f6f9443fea4a29be3f8
[ "BSD-3-Clause" ]
null
null
null
src/db/storage.py
BernarBerdikul/Async_API_part_1
0f218f38d099909fad629f6f9443fea4a29be3f8
[ "BSD-3-Clause" ]
null
null
null
from abc import ABC, abstractmethod from typing import Optional storage: Optional[AbstractStorage] = None # Функция понадобится при внедрении зависимостей
19.964286
54
0.697674
from abc import ABC, abstractmethod from typing import Optional class AbstractStorage(ABC): def __init__(self, storage_instance): self.storage = storage_instance @abstractmethod def get(self, index: str, target_id: str): pass @abstractmethod def search(self, index: str, _source, ...
181
173
45
55c7798fee43dcc97a6cfd5cbe15725d9078c8d0
8,714
py
Python
convnet3d/bin/train.py
yecharlie/convnet3d
0b2771eec149b196ef59b58d09eef71c9b201d40
[ "MIT" ]
6
2020-03-12T10:28:41.000Z
2021-11-18T16:17:20.000Z
convnet3d/bin/train.py
yecharlie/convnet3d
0b2771eec149b196ef59b58d09eef71c9b201d40
[ "MIT" ]
null
null
null
convnet3d/bin/train.py
yecharlie/convnet3d
0b2771eec149b196ef59b58d09eef71c9b201d40
[ "MIT" ]
1
2019-08-01T02:50:05.000Z
2019-08-01T02:50:05.000Z
import argparse import os import sys import keras import tensorflow as tf # print(__name__,'__package__:',__package__) if __name__ == "__main__" and __package__ is None: sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..')) import convnet3d.bin # noqa: F401 __package__ = "convnet3d.bin"...
34.039063
163
0.641726
import argparse import os import sys import keras import tensorflow as tf # print(__name__,'__package__:',__package__) if __name__ == "__main__" and __package__ is None: sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..')) import convnet3d.bin # noqa: F401 __package__ = "convnet3d.bin"...
6,119
0
142
373d0db4da6950d1bc8a4dabb4dea5dbcd544cf5
1,587
py
Python
pipeline_win.py
AndresRubianoM/DataScrapping
2523cd848939992ac4c01534fd0e45ad2ff7f179
[ "MIT" ]
null
null
null
pipeline_win.py
AndresRubianoM/DataScrapping
2523cd848939992ac4c01534fd0e45ad2ff7f179
[ "MIT" ]
null
null
null
pipeline_win.py
AndresRubianoM/DataScrapping
2523cd848939992ac4c01534fd0e45ad2ff7f179
[ "MIT" ]
null
null
null
import logging import subprocess logging.basicConfig(level = logging.INFO) logger = logging.getLogger(__name__) news_sites_uid = ['elpais'] if __name__ == '__main__': main()
32.387755
142
0.676118
import logging import subprocess logging.basicConfig(level = logging.INFO) logger = logging.getLogger(__name__) news_sites_uid = ['elpais'] def main(): _extract() _tranform() _load() def _extract(): logger.info('Beginning the extract process') for new_site_uid in news_sites_uid: #Comm...
1,308
0
92
b32bd4bfe56139d124371a82bdf53c931c3b5161
15,332
py
Python
vlc-ios-3.0.3/Tools/update_strings.py
qq644531343/vlc-ios
c12421e1d9842f268e3cb64518dd0e0dca32db3c
[ "Apache-2.0" ]
null
null
null
vlc-ios-3.0.3/Tools/update_strings.py
qq644531343/vlc-ios
c12421e1d9842f268e3cb64518dd0e0dca32db3c
[ "Apache-2.0" ]
null
null
null
vlc-ios-3.0.3/Tools/update_strings.py
qq644531343/vlc-ios
c12421e1d9842f268e3cb64518dd0e0dca32db3c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Update or create an Apple XCode project localization strings file. TODO: handle localization domains ''' from __future__ import with_statement import sys import os import os.path import re import tempfile import subprocess import codecs import unittest import optpar...
29.828794
78
0.604031
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Update or create an Apple XCode project localization strings file. TODO: handle localization domains ''' from __future__ import with_statement import sys import os import os.path import re import tempfile import subprocess import codecs import unittest import optpar...
389
0
54
86dfc395ff5ab6ef9c14be7ee4df1e0ab24a57c0
85
py
Python
mayday_control/scripts/side.py
LasseBoerresen/Lumos
2447adc7795ae07cb0a1df409d3b1a6178c2cd8b
[ "MIT" ]
null
null
null
mayday_control/scripts/side.py
LasseBoerresen/Lumos
2447adc7795ae07cb0a1df409d3b1a6178c2cd8b
[ "MIT" ]
null
null
null
mayday_control/scripts/side.py
LasseBoerresen/Lumos
2447adc7795ae07cb0a1df409d3b1a6178c2cd8b
[ "MIT" ]
null
null
null
from enum import Enum, auto
12.142857
27
0.611765
from enum import Enum, auto class Side(Enum): LEFT = auto() RIGHT = auto()
0
33
23
46f3c5c10009f79e8f58863d6137c6c1d59ef457
1,212
py
Python
examples/hlapi/v3arch/asyncore/sync/agent/ntforg/send-notification-with-additional-varbinds.py
fabriziovanni/pysnmp
eef4cc03b4da199e9c131ddd18ccb7501f1f2c40
[ "BSD-2-Clause" ]
null
null
null
examples/hlapi/v3arch/asyncore/sync/agent/ntforg/send-notification-with-additional-varbinds.py
fabriziovanni/pysnmp
eef4cc03b4da199e9c131ddd18ccb7501f1f2c40
[ "BSD-2-Clause" ]
null
null
null
examples/hlapi/v3arch/asyncore/sync/agent/ntforg/send-notification-with-additional-varbinds.py
fabriziovanni/pysnmp
eef4cc03b4da199e9c131ddd18ccb7501f1f2c40
[ "BSD-2-Clause" ]
null
null
null
""" Sending additional var-binds ++++++++++++++++++++++++++++ Send SNMP notification using the following options: * SNMPv2c * with community name 'public' * over IPv4/UDP * send INFORM notification * with TRAP ID 'coldStart' specified as a MIB symbol * include managed object information specified as a MIB symbol Fun...
27.545455
105
0.632838
""" Sending additional var-binds ++++++++++++++++++++++++++++ Send SNMP notification using the following options: * SNMPv2c * with community name 'public' * over IPv4/UDP * send INFORM notification * with TRAP ID 'coldStart' specified as a MIB symbol * include managed object information specified as a MIB symbol Fun...
0
0
0
8769954b2a2c6814333a757790542af24afd9ca2
16,490
py
Python
smt/surrogate_models/krg_mgp.py
joshuauk1026/smt
ec6aa20643b1e4fa772c6f470281c58df113c3a6
[ "BSD-3-Clause" ]
3
2017-09-08T21:32:16.000Z
2021-04-20T20:52:30.000Z
smt/surrogate_models/krg_mgp.py
joshuauk1026/smt
ec6aa20643b1e4fa772c6f470281c58df113c3a6
[ "BSD-3-Clause" ]
null
null
null
smt/surrogate_models/krg_mgp.py
joshuauk1026/smt
ec6aa20643b1e4fa772c6f470281c58df113c3a6
[ "BSD-3-Clause" ]
null
null
null
""" Author: Remy Priem (remy.priem@onera.fr) This package is distributed under New BSD license. """ from __future__ import division import numpy as np from scipy import linalg from smt.utils.kriging_utils import differences from smt.surrogate_models.krg_based import KrgBased from smt.utils.kriging_utils import compo...
31.833977
93
0.546574
""" Author: Remy Priem (remy.priem@onera.fr) This package is distributed under New BSD license. """ from __future__ import division import numpy as np from scipy import linalg from smt.utils.kriging_utils import differences from smt.surrogate_models.krg_based import KrgBased from smt.utils.kriging_utils import compo...
0
16,093
23
5239e00a83e4cff0b9a0629d3941b9bf6db58e7f
1,470
py
Python
L1Trigger/TrackerTFP/python/Producer_cfi.py
Jingyan95/cmssw
f78d843f0837f269ee6811b0e0f4c0432928c190
[ "Apache-2.0" ]
5
2020-07-02T19:05:26.000Z
2022-02-25T14:37:09.000Z
L1Trigger/TrackerTFP/python/Producer_cfi.py
Jingyan95/cmssw
f78d843f0837f269ee6811b0e0f4c0432928c190
[ "Apache-2.0" ]
61
2020-07-14T17:22:52.000Z
2022-03-16T11:11:12.000Z
L1Trigger/TrackerTFP/python/Producer_cfi.py
dally96/cmssw
c37b9bfa391850cb349c71190b0bbb2d04224cc8
[ "Apache-2.0" ]
8
2020-06-08T16:28:54.000Z
2021-11-16T14:40:00.000Z
import FWCore.ParameterSet.Config as cms TrackerTFPProducer_params = cms.PSet ( LabelDTC = cms.string( "TrackerDTCProducer" ), # LabelGP = cms.string( "TrackerTFPProducerGP" ), # LabelHT = cms.string( "TrackerTFPProducerHT" ), # LabelMHT = cms.string( "TrackerTF...
63.913043
132
0.621769
import FWCore.ParameterSet.Config as cms TrackerTFPProducer_params = cms.PSet ( LabelDTC = cms.string( "TrackerDTCProducer" ), # LabelGP = cms.string( "TrackerTFPProducerGP" ), # LabelHT = cms.string( "TrackerTFPProducerHT" ), # LabelMHT = cms.string( "TrackerTF...
0
0
0
e85d58a5f33f7110024d64347a8d77eba76faad1
1,012
py
Python
MyMxOnline/apps/organization/urls.py
xgq07/Django
a3bfa4fa0ebfc3cdcbc59bcaa810507889050d3b
[ "MIT" ]
null
null
null
MyMxOnline/apps/organization/urls.py
xgq07/Django
a3bfa4fa0ebfc3cdcbc59bcaa810507889050d3b
[ "MIT" ]
null
null
null
MyMxOnline/apps/organization/urls.py
xgq07/Django
a3bfa4fa0ebfc3cdcbc59bcaa810507889050d3b
[ "MIT" ]
null
null
null
from organization.views import OrgView,AddUserAskView,OrgHomeView,OrgCourseView,OrgDescView,\ OrgTeacherView,AddFavView,TeacherListView,TeacherDetailView from django.conf.urls import url,include #from django.urls import path,re_path # 要写上app的名字 app_name = "organization" urlpatterns = [ #课程机构列表页 url(r'^lis...
46
100
0.689723
from organization.views import OrgView,AddUserAskView,OrgHomeView,OrgCourseView,OrgDescView,\ OrgTeacherView,AddFavView,TeacherListView,TeacherDetailView from django.conf.urls import url,include #from django.urls import path,re_path # 要写上app的名字 app_name = "organization" urlpatterns = [ #课程机构列表页 url(r'^lis...
0
0
0
9f97f311276aac0c7752ed83fb0ee1d286767ec5
684
py
Python
tests/test_wake.py
rotdrop/rhasspy-hermes
ab822ad954da6da90368b65d72ed7e53694f085f
[ "MIT" ]
1
2020-07-11T19:25:32.000Z
2020-07-11T19:25:32.000Z
tests/test_wake.py
rotdrop/rhasspy-hermes
ab822ad954da6da90368b65d72ed7e53694f085f
[ "MIT" ]
15
2019-12-31T13:19:25.000Z
2022-01-17T17:40:13.000Z
tests/test_wake.py
rotdrop/rhasspy-hermes
ab822ad954da6da90368b65d72ed7e53694f085f
[ "MIT" ]
8
2019-12-31T10:40:53.000Z
2020-12-04T18:48:08.000Z
"""Tests for rhasspyhermes.wake""" from rhasspyhermes.wake import HotwordDetected, HotwordToggleOff, HotwordToggleOn wakeword_id = "testWakeWord" def test_hotword_detected(): """Test HotwordDetected.""" assert HotwordDetected.is_topic(HotwordDetected.topic(wakeword_id=wakeword_id)) assert ( Hotwo...
28.5
87
0.745614
"""Tests for rhasspyhermes.wake""" from rhasspyhermes.wake import HotwordDetected, HotwordToggleOff, HotwordToggleOn wakeword_id = "testWakeWord" def test_hotword_detected(): """Test HotwordDetected.""" assert HotwordDetected.is_topic(HotwordDetected.topic(wakeword_id=wakeword_id)) assert ( Hotwo...
0
0
0
1d8d5603276e76c3b2ea3734f7c017edeca526fb
2,267
py
Python
geography/management/commands/bootstrap/fixtures/_nation.py
The-Politico/politico-civic-geography
032b3ee773b50b65cfe672f230dda772df0f89e0
[ "MIT" ]
1
2018-07-31T13:54:38.000Z
2018-07-31T13:54:38.000Z
geography/management/commands/bootstrap/fixtures/_nation.py
The-Politico/politico-civic-geography
032b3ee773b50b65cfe672f230dda772df0f89e0
[ "MIT" ]
7
2018-04-18T20:57:40.000Z
2021-06-10T20:50:40.000Z
geography/management/commands/bootstrap/fixtures/_nation.py
The-Politico/politico-civic-geography
032b3ee773b50b65cfe672f230dda772df0f89e0
[ "MIT" ]
1
2018-12-15T20:17:52.000Z
2018-12-15T20:17:52.000Z
import json import os from tqdm import tqdm import geojson import shapefile from geography.models import Geometry
31.486111
71
0.521394
import json import os from tqdm import tqdm import geojson import shapefile from geography.models import Geometry class NationFixtures(object): def create_nation_fixtures(self): """ Create national US and State Map """ SHP_SLUG = "cb_{}_us_state_500k".format(self.YEAR) DO...
0
2,127
23
11d5c86e0a8bc126cada2f724bb16ebccefa8607
1,602
py
Python
test/models/test_value.py
firstof9/python-openzwave-mqtt
25f9f90ba586e33fee7b7a444743966371268787
[ "Apache-2.0" ]
63
2019-11-06T19:30:45.000Z
2022-02-04T22:19:07.000Z
test/models/test_value.py
firstof9/python-openzwave-mqtt
25f9f90ba586e33fee7b7a444743966371268787
[ "Apache-2.0" ]
66
2021-01-18T06:52:17.000Z
2022-03-28T08:04:22.000Z
test/models/test_value.py
firstof9/python-openzwave-mqtt
25f9f90ba586e33fee7b7a444743966371268787
[ "Apache-2.0" ]
12
2020-01-03T13:35:06.000Z
2020-10-10T20:50:20.000Z
"""Provide tests for the node value.""" from openzwavemqtt.const import ( EVENT_VALUE_ADDED, EVENT_VALUE_CHANGED, EVENT_VALUE_REMOVED, ) def test_value_events(mgr): """Test value events.""" events = [] # Fill parent data. mgr.mock_receive_json("OpenZWave/1/node/2", {}) mgr.mock_receiv...
30.226415
83
0.65231
"""Provide tests for the node value.""" from openzwavemqtt.const import ( EVENT_VALUE_ADDED, EVENT_VALUE_CHANGED, EVENT_VALUE_REMOVED, ) def test_value_events(mgr): """Test value events.""" events = [] # Fill parent data. mgr.mock_receive_json("OpenZWave/1/node/2", {}) mgr.mock_receiv...
0
0
0
7dc0816d12478814ffed3ae145d96cfd99595450
5,753
py
Python
hand_servo/JO_tester.py
JohnOmernik/pimeup
c68f84d699f67af71bb5561eb6c5885ccd8b4ac8
[ "Apache-2.0" ]
1
2017-10-21T16:52:21.000Z
2017-10-21T16:52:21.000Z
hand_servo/JO_tester.py
JohnOmernik/pimeup
c68f84d699f67af71bb5561eb6c5885ccd8b4ac8
[ "Apache-2.0" ]
null
null
null
hand_servo/JO_tester.py
JohnOmernik/pimeup
c68f84d699f67af71bb5561eb6c5885ccd8b4ac8
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # Import the PCA9685 module. import Adafruit_PCA9685 import time import random import sys import json # Initialise the PCA9685 using the default address (0x40). pwm = Adafruit_PCA9685.PCA9685(0x40) pwm.set_pwm_freq(60) SRV_OPTIONS = [] ACTIONS = {} STATUS="" thingfile = "/home/pi/pimeup/thingbox/t...
26.75814
158
0.460108
#!/usr/bin/python # Import the PCA9685 module. import Adafruit_PCA9685 import time import random import sys import json # Initialise the PCA9685 using the default address (0x40). pwm = Adafruit_PCA9685.PCA9685(0x40) pwm.set_pwm_freq(60) SRV_OPTIONS = [] ACTIONS = {} STATUS="" thingfile = "/home/pi/pimeup/thingbox/t...
5,147
0
161
e0ffbfca22a90ed69e2f3f3cd411e0e7e7d7c239
13,384
py
Python
PyFlow/Core/GraphManager.py
luzpaz/PyFlow
e00642794051b1d9b7b2665eee38567e9763558d
[ "Apache-2.0" ]
1,463
2019-07-29T15:45:22.000Z
2022-03-31T23:32:13.000Z
PyFlow/Core/GraphManager.py
luzpaz/PyFlow
e00642794051b1d9b7b2665eee38567e9763558d
[ "Apache-2.0" ]
58
2019-07-31T07:58:57.000Z
2022-02-23T05:46:08.000Z
PyFlow/Core/GraphManager.py
luzpaz/PyFlow
e00642794051b1d9b7b2665eee38567e9763558d
[ "Apache-2.0" ]
169
2019-08-03T16:38:57.000Z
2022-03-31T14:20:12.000Z
## Copyright 2015-2019 Ilgar Lunin, Pedro Cabrera ## 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...
32.485437
127
0.605424
## Copyright 2015-2019 Ilgar Lunin, Pedro Cabrera ## 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...
343
0
52
e00d9fd40434cd4d86af85a211851d99b4589f1a
9,011
py
Python
rethinkdb/tests/common.py
mchelen-gov/integrations-core
81281600b3cc7025a7a32148c59620c9592a564f
[ "BSD-3-Clause" ]
663
2016-08-23T05:23:45.000Z
2022-03-29T00:37:23.000Z
rethinkdb/tests/common.py
mchelen-gov/integrations-core
81281600b3cc7025a7a32148c59620c9592a564f
[ "BSD-3-Clause" ]
6,642
2016-06-09T16:29:20.000Z
2022-03-31T22:24:09.000Z
rethinkdb/tests/common.py
mchelen-gov/integrations-core
81281600b3cc7025a7a32148c59620c9592a564f
[ "BSD-3-Clause" ]
1,222
2017-01-27T15:51:38.000Z
2022-03-31T18:17:51.000Z
# (C) Datadog, Inc. 2020-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) import os from typing import Callable, Dict, List, Set, Tuple, Union import pytest from datadog_checks.base.stubs.aggregator import AggregatorStub from datadog_checks.dev import get_docker_hostname, get_...
40.959091
118
0.724559
# (C) Datadog, Inc. 2020-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) import os from typing import Callable, Dict, List, Set, Tuple, Union import pytest from datadog_checks.base.stubs.aggregator import AggregatorStub from datadog_checks.dev import get_docker_hostname, get_...
0
0
0
2c0645b579d4039d3fb0936a880573ee5a707aa0
396
py
Python
janitor/package/chef/__init__.py
nilesh-naik/lambda-functions
5daa2828914d23851538d5c3cb11f36b0f4bac52
[ "MIT" ]
77
2016-03-15T21:51:11.000Z
2021-09-15T18:40:25.000Z
janitor/package/chef/__init__.py
nilesh-naik/lambda-functions
5daa2828914d23851538d5c3cb11f36b0f4bac52
[ "MIT" ]
20
2016-04-15T18:40:57.000Z
2021-06-01T18:59:56.000Z
lambda/chef/__init__.py
novu/lambda-chef-node-cleanup
6659db950a3ab6b88ff608a6324f36a75fecebf2
[ "Apache-2.0" ]
53
2016-04-07T07:35:04.000Z
2022-01-25T18:48:10.000Z
# Copyright (c) 2010 Noah Kantrowitz <noah@coderanger.net> __version__ = (0, 3, 0) from chef.api import ChefAPI, autoconfigure from chef.client import Client from chef.data_bag import DataBag, DataBagItem from chef.exceptions import ChefError from chef.node import Node from chef.role import Role from chef.environment...
28.285714
58
0.810606
# Copyright (c) 2010 Noah Kantrowitz <noah@coderanger.net> __version__ = (0, 3, 0) from chef.api import ChefAPI, autoconfigure from chef.client import Client from chef.data_bag import DataBag, DataBagItem from chef.exceptions import ChefError from chef.node import Node from chef.role import Role from chef.environment...
0
0
0
ac828b22a576f4b7bb7ccd120bfa1776b6a53295
10,290
py
Python
pyspeckit/spectrum/models/nh2d.py
glangsto/pyspeckit
346b24fb828d1d33c7891cdde7609723e51af34c
[ "MIT" ]
null
null
null
pyspeckit/spectrum/models/nh2d.py
glangsto/pyspeckit
346b24fb828d1d33c7891cdde7609723e51af34c
[ "MIT" ]
1
2021-05-14T19:17:41.000Z
2021-05-14T19:17:41.000Z
pyspeckit/spectrum/models/nh2d.py
glangsto/pyspeckit
346b24fb828d1d33c7891cdde7609723e51af34c
[ "MIT" ]
1
2020-04-23T17:04:09.000Z
2020-04-23T17:04:09.000Z
""" =========== NH2D fitter: ortho- and para- in the same file, but not modeled together =========== Reference for line params: F. Daniel et al. (2016) line frequencies and line strengths. It includes HFS due to D http://adsabs.harvard.edu/abs/2016A%26A...586L...4D """ from . import hyperfine import astropy.units as ...
35.482759
132
0.636929
""" =========== NH2D fitter: ortho- and para- in the same file, but not modeled together =========== Reference for line params: F. Daniel et al. (2016) line frequencies and line strengths. It includes HFS due to D http://adsabs.harvard.edu/abs/2016A%26A...586L...4D """ from . import hyperfine import astropy.units as ...
0
0
0
5f8095707304f334fc478e2b1d6cdfd9581bb80b
44
py
Python
parameters_443.py
amonmoce/ElectionsStats
647fbd5ebc0aa25a027355e0cc851220328fec06
[ "BSD-3-Clause" ]
null
null
null
parameters_443.py
amonmoce/ElectionsStats
647fbd5ebc0aa25a027355e0cc851220328fec06
[ "BSD-3-Clause" ]
null
null
null
parameters_443.py
amonmoce/ElectionsStats
647fbd5ebc0aa25a027355e0cc851220328fec06
[ "BSD-3-Clause" ]
null
null
null
password="4bd9270216a6d2e7bc330cf396f7c8f2"
22
43
0.909091
password="4bd9270216a6d2e7bc330cf396f7c8f2"
0
0
0
5885938e77707f880d8da482e0285130b6697045
593
py
Python
src/utils/train/training_utils.py
chris4540/StudyMaskedLMForQG
2bf477b7b8cfb5d195c028db6d63aadf06af8fc5
[ "MIT" ]
6
2020-12-09T11:30:37.000Z
2022-03-03T12:06:44.000Z
src/utils/train/training_utils.py
chris4540/StudyMaskedLMForQG
2bf477b7b8cfb5d195c028db6d63aadf06af8fc5
[ "MIT" ]
null
null
null
src/utils/train/training_utils.py
chris4540/StudyMaskedLMForQG
2bf477b7b8cfb5d195c028db6d63aadf06af8fc5
[ "MIT" ]
3
2021-03-23T04:56:48.000Z
2022-02-02T19:31:46.000Z
from typing import List from typing import Dict from typing import NamedTuple # from typing import Optional
25.782609
66
0.627319
from typing import List from typing import Dict from typing import NamedTuple # from typing import Optional def build_generated_text(refs: List[str], hyps: List[str]) -> str: ret = "" linesep = " \n" # Tensorboard text uses format of markdown for i, (ref, hyp) in enumerate(zip(refs, hyps)): ret ...
337
100
46
6fb14605bf869967b78c62d65e4c34bd50dca9b2
884
py
Python
online/client/char-client.py
jas-dzied/quiz
39d19c952af8b71c8e407f7a650361ab49653bf3
[ "MIT" ]
null
null
null
online/client/char-client.py
jas-dzied/quiz
39d19c952af8b71c8e407f7a650361ab49653bf3
[ "MIT" ]
null
null
null
online/client/char-client.py
jas-dzied/quiz
39d19c952af8b71c8e407f7a650361ab49653bf3
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import asyncio import websockets import threading import queue import secrets asyncio.run(main())
24.555556
75
0.700226
#!/usr/bin/env python3 import asyncio import websockets import threading import queue import secrets async def worker(uid, q): async with websockets.connect("ws://localhost:8003") as websocket: await websocket.send(f'0:{uid}') async def receiver(uid, q): async with websockets.connect("ws://localhost:...
647
0
114
30261c9941c84f4da118943a0ab2701b46dde7d5
663
py
Python
ns/demux/flow_demux.py
lunarss/ns.py
9298c850290fb2ee98b047dfc757f4687763c2f8
[ "Apache-2.0" ]
null
null
null
ns/demux/flow_demux.py
lunarss/ns.py
9298c850290fb2ee98b047dfc757f4687763c2f8
[ "Apache-2.0" ]
1
2021-07-20T02:48:41.000Z
2021-07-20T02:48:41.000Z
ns/demux/flow_demux.py
JinJinGuang/ns.py
90415c4c83dd775cc50976c609ecbf551191cdf0
[ "Apache-2.0" ]
null
null
null
""" A demultiplexing element that splits packet streams by flow_id. """ class FlowDemux: """ The constructor takes a list of downstream elements for the corresponding output ports as its input. """ def put(self, packet): """ Sends a packet to this element. """ self.packets_receive...
26.52
63
0.603318
""" A demultiplexing element that splits packet streams by flow_id. """ class FlowDemux: """ The constructor takes a list of downstream elements for the corresponding output ports as its input. """ def __init__(self, outs=None, default=None): self.outs = outs self.default = default...
113
0
26
fcbf29f197cc47590cb289066bc6f4f0276442d6
4,621
py
Python
python-advanced/chapter1.py
Rokon-Uz-Zaman/thinkdiff_python_django
5010c5f1dd8a028fb9e5235319bb6bb434831e6c
[ "MIT" ]
92
2018-04-03T20:53:07.000Z
2022-03-04T05:53:10.000Z
python-language/python-advanced/chapter1.py
mostafijur-rahman299/thinkdiff
b0e0c01fe38c406f4dfa8cc80b2f0c5654017079
[ "MIT" ]
11
2018-10-01T15:35:33.000Z
2021-09-01T04:59:56.000Z
python-language/python-advanced/chapter1.py
mostafijur-rahman299/thinkdiff
b0e0c01fe38c406f4dfa8cc80b2f0c5654017079
[ "MIT" ]
98
2018-03-13T08:03:54.000Z
2022-03-22T08:11:44.000Z
# author: Mahmud Ahsan # code: https://github.com/mahmudahsan/thinkdiff # blog: http://thinkdiff.net # http://pythonbangla.com # MIT License # -------------------------- # Files # -------------------------- ## Reading full contents of a text file ''' Encouraged way with keyword close the file automatically ''' ...
21.79717
118
0.628003
# author: Mahmud Ahsan # code: https://github.com/mahmudahsan/thinkdiff # blog: http://thinkdiff.net # http://pythonbangla.com # MIT License # -------------------------- # Files # -------------------------- ## Reading full contents of a text file ''' Encouraged way with keyword close the file automatically ''' ...
0
0
0
3e3c54cdb703d3ef42b7087e51bdaa42632a5cbb
360
py
Python
src/services/ThresholdController/TestingServices/FakeSchedule.py
IAPark/PITherm
a334cb0843b1961997aa90e45671d556be91380f
[ "MIT" ]
null
null
null
src/services/ThresholdController/TestingServices/FakeSchedule.py
IAPark/PITherm
a334cb0843b1961997aa90e45671d556be91380f
[ "MIT" ]
null
null
null
src/services/ThresholdController/TestingServices/FakeSchedule.py
IAPark/PITherm
a334cb0843b1961997aa90e45671d556be91380f
[ "MIT" ]
null
null
null
from flask import Flask from flask import json from multiprocessing import Queue responses_ = Queue() port = 4001 app = Flask(__name__) @app.route("/state/<int:time>")
17.142857
41
0.716667
from flask import Flask from flask import json from multiprocessing import Queue responses_ = Queue() port = 4001 app = Flask(__name__) @app.route("/state/<int:time>") def state(time: int): global responses_ return json.jsonify(responses_.get()) def run(responses: Queue,): global responses_ respon...
142
0
45
d1fc830663f4626f0851f21db7dea2f0175a03fc
15,819
py
Python
portable_spreadsheet/cell_slice.py
david-salac/Portable-spreadsheet-generator
ca31b1e77f26b77ab2ca4d328b12e3cf14c8a029
[ "MIT" ]
28
2020-05-17T18:42:07.000Z
2021-06-01T14:58:22.000Z
portable_spreadsheet/cell_slice.py
david-salac/Portable-spreadsheet-generator
ca31b1e77f26b77ab2ca4d328b12e3cf14c8a029
[ "MIT" ]
3
2020-08-19T21:28:17.000Z
2021-01-10T20:00:56.000Z
portable_spreadsheet/cell_slice.py
david-salac/Portable-spreadsheet-generator
ca31b1e77f26b77ab2ca4d328b12e3cf14c8a029
[ "MIT" ]
4
2020-10-10T12:15:40.000Z
2021-11-08T02:08:34.000Z
from numbers import Number from typing import Iterable, Tuple, Union, List, Optional import copy import numpy as np from .cell import Cell from .cell_indices import CellIndices from .serialization import Serialization # Acceptable values for the slice T_slice = Union[np.ndarray, List[Number], List[st...
37.935252
79
0.554081
from numbers import Number from typing import Iterable, Tuple, Union, List, Optional import copy import numpy as np from .cell import Cell from .cell_indices import CellIndices from .serialization import Serialization # Acceptable values for the slice T_slice = Union[np.ndarray, List[Number], List[st...
0
0
0
03afcc1023649b896ec4f37fc2b3a99fcc1a2bca
2,546
py
Python
radiaTest-worker/worker/utils/bash.py
openeuler-mirror/radiaTest
4a067511d6ab69f76b8dc08667b8a1f8c1c73d23
[ "MulanPSL-1.0" ]
null
null
null
radiaTest-worker/worker/utils/bash.py
openeuler-mirror/radiaTest
4a067511d6ab69f76b8dc08667b8a1f8c1c73d23
[ "MulanPSL-1.0" ]
1
2022-03-23T06:53:25.000Z
2022-03-23T06:53:25.000Z
radiaTest-worker/worker/utils/bash.py
openeuler-mirror/radiaTest
4a067511d6ab69f76b8dc08667b8a1f8c1c73d23
[ "MulanPSL-1.0" ]
null
null
null
from shlex import quote from subprocess import getoutput, getstatusoutput # from flask import current_app
31.04878
154
0.516104
from shlex import quote from subprocess import getoutput, getstatusoutput # from flask import current_app def install_base(body, storage_pool): fixed_mac = "" if body.get("mac"): fixed_mac = ",mac={}".format(quote(body.get("mac"))) controller = "" if body.get("frame") == "aarch64": c...
2,273
0
161
0eff813d270b63670413294208f76ac98ecc73aa
2,025
py
Python
pyutilib/misc/twzzle.py
PyUtilib/PyUtilib
d99406f2af1fb62268c34453a2fbe6bd4a7348f0
[ "BSD-3-Clause" ]
24
2016-04-02T10:00:02.000Z
2021-03-02T16:40:18.000Z
pyutilib/misc/twzzle.py
PyUtilib/PyUtilib
d99406f2af1fb62268c34453a2fbe6bd4a7348f0
[ "BSD-3-Clause" ]
105
2015-10-29T03:29:58.000Z
2021-12-30T22:00:45.000Z
pyutilib/misc/twzzle.py
PyUtilib/PyUtilib
d99406f2af1fb62268c34453a2fbe6bd4a7348f0
[ "BSD-3-Clause" ]
22
2016-01-21T15:35:25.000Z
2021-05-15T20:17:44.000Z
# _________________________________________________________________________ # # PyUtilib: A Python utility library. # Copyright (c) 2008 Sandia Corporation. # This software is distributed under the BSD License. # Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, # the U.S. Government retains ...
26.298701
76
0.607407
# _________________________________________________________________________ # # PyUtilib: A Python utility library. # Copyright (c) 2008 Sandia Corporation. # This software is distributed under the BSD License. # Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, # the U.S. Government retains ...
958
7
235
980e573908e89dde46aaea141c146ea143777822
827
py
Python
performance-storage-service/pss_project/api/serializers/rest/metrics/IncrementalMetricsSerializer.py
cmu-db/noisepage-stats
d61a0e143904748b3f7f43628a5b29769a5c9cf8
[ "MIT" ]
23
2020-12-22T20:19:51.000Z
2021-11-24T06:11:01.000Z
performance-storage-service/pss_project/api/serializers/rest/metrics/IncrementalMetricsSerializer.py
cmu-db/noisepage-test
d61a0e143904748b3f7f43628a5b29769a5c9cf8
[ "MIT" ]
13
2020-06-05T22:36:49.000Z
2020-11-10T16:25:04.000Z
performance-storage-service/pss_project/api/serializers/rest/metrics/IncrementalMetricsSerializer.py
cmu-db/noisepage-test
d61a0e143904748b3f7f43628a5b29769a5c9cf8
[ "MIT" ]
2
2020-06-08T18:03:34.000Z
2020-10-06T18:01:35.000Z
from rest_framework.serializers import Serializer, DecimalField, IntegerField from pss_project.api.serializers.rest.metrics.LatencyMetricsSerializer \ import LatencyMetricsSerializer from pss_project.api.models.rest.metrics.IncrementalMetrics \ import IncrementalMetrics from pss_project.api.serializers.rest.met...
39.380952
77
0.754534
from rest_framework.serializers import Serializer, DecimalField, IntegerField from pss_project.api.serializers.rest.metrics.LatencyMetricsSerializer \ import LatencyMetricsSerializer from pss_project.api.models.rest.metrics.IncrementalMetrics \ import IncrementalMetrics from pss_project.api.serializers.rest.met...
64
353
23
c59a57fdb4853653342c36c7a372a1ad6827770f
2,673
py
Python
fsttest/_test_case.py
eddieantonio/fsttest
8ff71a9aa41a70a30832fa219b72e7478872c16f
[ "MIT" ]
null
null
null
fsttest/_test_case.py
eddieantonio/fsttest
8ff71a9aa41a70a30832fa219b72e7478872c16f
[ "MIT" ]
1
2020-01-27T21:43:04.000Z
2020-01-28T15:57:05.000Z
fsttest/_test_case.py
eddieantonio/fsttest
8ff71a9aa41a70a30832fa219b72e7478872c16f
[ "MIT" ]
1
2021-04-26T17:46:19.000Z
2021-04-26T17:46:19.000Z
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- from pathlib import Path from typing import Any, Dict, List, Optional, Union from ._fst import FST from ._results import FailedTestResult, PassedTestResult from .exceptions import TestCaseDefinitionError class TestCase: """ An executable test case. """ ...
33.835443
88
0.606061
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- from pathlib import Path from typing import Any, Dict, List, Optional, Union from ._fst import FST from ._results import FailedTestResult, PassedTestResult from .exceptions import TestCaseDefinitionError class TestCase: """ An executable test case. """ ...
946
0
54
84a25250ddea53d73b4571ee50268f072bd9f331
1,073
py
Python
2019/d19.py
max-f/advent-of-code
3c0ee995f7c0691418ecb86cbfa201b3d03131b8
[ "MIT" ]
null
null
null
2019/d19.py
max-f/advent-of-code
3c0ee995f7c0691418ecb86cbfa201b3d03131b8
[ "MIT" ]
null
null
null
2019/d19.py
max-f/advent-of-code
3c0ee995f7c0691418ecb86cbfa201b3d03131b8
[ "MIT" ]
null
null
null
#!/usr/bin/env python import copy from collections import deque, defaultdict from utils.intcode import Machine from utils.utils import get_input, ints if __name__ == "__main__": main()
21.897959
60
0.615098
#!/usr/bin/env python import copy from collections import deque, defaultdict from utils.intcode import Machine from utils.utils import get_input, ints def part1(intcode) -> int: total_affected = 0 for y in range(50): for x in range(50): pos_in = position_in_beam(intcode, x, y) ...
784
0
92
fe04686535636400f725184e167933f807600954
13,763
py
Python
src/core/task.py
gaotuan/Yearning-1.2.0_me
8b4a1a443abc39a638931907599b9306fc92531c
[ "Apache-2.0" ]
1
2020-06-05T06:17:48.000Z
2020-06-05T06:17:48.000Z
src/core/task.py
gaotuan/Yearning-1.2.0_me
8b4a1a443abc39a638931907599b9306fc92531c
[ "Apache-2.0" ]
5
2020-04-17T03:38:08.000Z
2020-04-17T03:39:26.000Z
src/core/task.py
gaotuan/SQL-Manager
8b4a1a443abc39a638931907599b9306fc92531c
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import, unicode_literals import logging import functools import threading import time from django.http import HttpResponse from libs import send_email, util from libs import call_inception from .models import ( Usermessage, DatabaseList, Account, globalpermissions, Sq...
35.65544
152
0.525612
from __future__ import absolute_import, unicode_literals import logging import functools import threading import time from django.http import HttpResponse from libs import send_email, util from libs import call_inception from .models import ( Usermessage, DatabaseList, Account, globalpermissions, Sq...
4,202
0
269
eac6a981fadd003fa43c9af833b6effbf17649fc
2,000
py
Python
snapshotcleanup/snapshotcleanup.py
meredith-digops/awsops
d3e4dc3d16866a95550602b924f97dc5c0c77642
[ "MIT" ]
4
2017-11-29T08:15:45.000Z
2020-03-23T18:43:10.000Z
snapshotcleanup/snapshotcleanup.py
meredith-digops/awsops
d3e4dc3d16866a95550602b924f97dc5c0c77642
[ "MIT" ]
6
2016-09-26T21:01:14.000Z
2021-05-03T13:33:31.000Z
snapshotcleanup/snapshotcleanup.py
meredith-digops/awsops
d3e4dc3d16866a95550602b924f97dc5c0c77642
[ "MIT" ]
5
2016-09-26T14:26:22.000Z
2018-01-26T00:38:01.000Z
#!/usr/bin/env python from __future__ import print_function from datetime import datetime, timedelta, tzinfo import boto3 from botocore.exceptions import ClientError DEFAULT_RETENTION_DAYS = None """If None, no default retention is applied""" ZERO = timedelta(0) class UTC(tzinfo): """ Implements UTC time...
25.316456
86
0.595
#!/usr/bin/env python from __future__ import print_function from datetime import datetime, timedelta, tzinfo import boto3 from botocore.exceptions import ClientError DEFAULT_RETENTION_DAYS = None """If None, no default retention is applied""" ZERO = timedelta(0) class UTC(tzinfo): """ Implements UTC time...
61
0
80
1b7a12539a5910e5b2156704a5c7a96622ee4933
6,698
py
Python
lib/threatminer.py
macdaliot/exist
65244f79c602c5a00c3ea6a7eef512ce9c21e60a
[ "MIT" ]
159
2019-03-15T10:46:19.000Z
2022-03-12T09:19:31.000Z
lib/threatminer.py
macdaliot/exist
65244f79c602c5a00c3ea6a7eef512ce9c21e60a
[ "MIT" ]
6
2019-03-16T12:51:24.000Z
2020-07-09T02:25:42.000Z
lib/threatminer.py
macdaliot/exist
65244f79c602c5a00c3ea6a7eef512ce9c21e60a
[ "MIT" ]
36
2019-03-16T10:37:14.000Z
2021-11-14T21:04:18.000Z
#!/usr/bin/env python import argparse import requests try: import simplejson as json except ImportError: import json version = '%(prog)s 20180912' ### From Domain ### From IP address ### From Sample ### From AV ### From Report ### Search APINotes if __name__ == '__main__': ...
31.744076
115
0.615557
#!/usr/bin/env python import argparse import requests try: import simplejson as json except ImportError: import json version = '%(prog)s 20180912' class ThreatMiner(): def __init__(self): self.__baseURL = "https://api.threatminer.org/v2/" def sendQuery(self, endpoint, rt, q): params...
3,665
-1
687
da4b158d8c736ac7723e882f97e8bcedc90b1567
3,541
py
Python
sym_api_client_python/clients/connections_client.py
symphony-thibault/symphony-api-client-python
628cbf3aa857d3bc66a98a3ec009ce1c82295d05
[ "MIT" ]
null
null
null
sym_api_client_python/clients/connections_client.py
symphony-thibault/symphony-api-client-python
628cbf3aa857d3bc66a98a3ec009ce1c82295d05
[ "MIT" ]
null
null
null
sym_api_client_python/clients/connections_client.py
symphony-thibault/symphony-api-client-python
628cbf3aa857d3bc66a98a3ec009ce1c82295d05
[ "MIT" ]
null
null
null
import logging from .api_client import APIClient # child class of APIClient --> Extends error handling functionality # ConnectionsClient class contains a series of functions corresponding to all # pod admin endpoints on the REST API.
42.154762
80
0.674386
import logging from .api_client import APIClient # child class of APIClient --> Extends error handling functionality # ConnectionsClient class contains a series of functions corresponding to all # pod admin endpoints on the REST API. class ConnectionsClient(APIClient): def __init__(self, bot_client): se...
47
3,236
22
16b08766cb370edf52b3d39c46180b630ddb5f0e
1,405
py
Python
server/services/weather.py
vipul0104/logistics-wizard-controller
bd2470a5847310fe0c7bccadf6179dd7bb866de0
[ "Apache-2.0" ]
null
null
null
server/services/weather.py
vipul0104/logistics-wizard-controller
bd2470a5847310fe0c7bccadf6179dd7bb866de0
[ "Apache-2.0" ]
5
2018-06-25T16:12:07.000Z
2019-11-08T21:47:47.000Z
server/services/weather.py
vipul0104/logistics-wizard-controller
bd2470a5847310fe0c7bccadf6179dd7bb866de0
[ "Apache-2.0" ]
1
2019-11-03T20:40:02.000Z
2019-11-03T20:40:02.000Z
""" Handle all actions on the weather resource. """ import json import requests from server.utils import call_openwhisk from server.exceptions import ResourceDoesNotExistException, APIException def get_recommendations(demoGuid): """ Get recommendations """ try: payload = dict() payload...
25.545455
73
0.659786
""" Handle all actions on the weather resource. """ import json import requests from server.utils import call_openwhisk from server.exceptions import ResourceDoesNotExistException, APIException def get_recommendations(demoGuid): """ Get recommendations """ try: payload = dict() payload...
0
0
0
d351744e79c3ee2c12d9ec03d2736c0dbd0359f3
7,788
py
Python
utils/gdb-printers/csd.py
kjcamann/csd-mirror
e0808cdb084404fc7319c76186c05eba0a56b056
[ "BSD-2-Clause" ]
null
null
null
utils/gdb-printers/csd.py
kjcamann/csd-mirror
e0808cdb084404fc7319c76186c05eba0a56b056
[ "BSD-2-Clause" ]
null
null
null
utils/gdb-printers/csd.py
kjcamann/csd-mirror
e0808cdb084404fc7319c76186c05eba0a56b056
[ "BSD-2-Clause" ]
null
null
null
"""GDB pretty-printers for CSD. """ import enum import gdb import gdb.xmethod import re _csd_printer_name = 'csd_pretty_printer' _csd_xmethod_name = 'csd_xmethods' _nttpIntegralSuffix = { 'long' : 'l', 'long long' : 'll', 'unsigned int' : 'u', 'unsigned long' : 'ul', 'unsigned long long' : 'ull' } def _ge...
35.081081
87
0.699666
"""GDB pretty-printers for CSD. """ import enum import gdb import gdb.xmethod import re _csd_printer_name = 'csd_pretty_printer' _csd_xmethod_name = 'csd_xmethods' def _remove_generics(typename): if type(typename) is gdb.Type: typename = typename.name or typename.tag or str(typename) match = re.match('^([^<]...
4,118
508
372
a6c66342d24401cf2bf73506e53eb58aa58133e0
1,222
py
Python
nets/attention/position_encoding.py
megvii-research/CREStereo
fce504591fbb0eb29642235544f1aaecd1198526
[ "Apache-2.0" ]
80
2022-03-22T06:32:47.000Z
2022-03-31T21:53:07.000Z
nets/attention/position_encoding.py
megvii-research/CREStereo
fce504591fbb0eb29642235544f1aaecd1198526
[ "Apache-2.0" ]
3
2022-03-24T06:10:27.000Z
2022-03-31T06:03:51.000Z
nets/attention/position_encoding.py
megvii-research/CREStereo
fce504591fbb0eb29642235544f1aaecd1198526
[ "Apache-2.0" ]
6
2022-03-23T08:15:58.000Z
2022-03-29T12:07:52.000Z
import math import megengine.module as M import megengine.functional as F class PositionEncodingSine(M.Module): """ This is a sinusoidal position encoding that generalized to 2-dimensional images """ def __init__(self, d_model, max_shape=(256, 256)): """ Args: max_shape (t...
32.157895
96
0.54419
import math import megengine.module as M import megengine.functional as F class PositionEncodingSine(M.Module): """ This is a sinusoidal position encoding that generalized to 2-dimensional images """ def __init__(self, d_model, max_shape=(256, 256)): """ Args: max_shape (t...
0
0
0
4a7bae05fad6d3a7ae3e34b5e332150a92ca6ee7
3,744
py
Python
data-science-not/weeks/m03_sequences/p0/stack.py
nurseiit/comm-unist
e7a122c910bf12eddf5c0ffc2c666995b4989408
[ "MIT" ]
4
2019-07-03T00:57:01.000Z
2020-12-11T23:06:11.000Z
data-science-not/weeks/m03_sequences/p0/stack.py
nurseiit/comm-unist
e7a122c910bf12eddf5c0ffc2c666995b4989408
[ "MIT" ]
1
2019-10-19T17:42:42.000Z
2019-10-19T17:42:42.000Z
data-science-not/weeks/m03_sequences/p0/stack.py
nurseiit/comm-unist
e7a122c910bf12eddf5c0ffc2c666995b4989408
[ "MIT" ]
1
2019-11-05T04:14:08.000Z
2019-11-05T04:14:08.000Z
# Copyright 2013, Michael H. Goldwasser # # Developed for use with the book: # # Data Structures and Algorithms in Python # Michael T. Goodrich, Roberto Tamassia, and Michael H. Goldwasser # John Wiley & Sons, 2013 # # This program is free software: you can redistribute it and/or modify # it under the terms of...
39.410526
86
0.554754
# Copyright 2013, Michael H. Goldwasser # # Developed for use with the book: # # Data Structures and Algorithms in Python # Michael T. Goodrich, Roberto Tamassia, and Michael H. Goldwasser # John Wiley & Sons, 2013 # # This program is free software: you can redistribute it and/or modify # it under the terms of...
59
0
27
fefc73a6ccd7110962995b4002d9d6080e706454
254
py
Python
preprocessing/smri/utils/features.py
GalBenZvi/BrainPrint
8dda22f130f60bac66fe05f0f5163ee3680616f5
[ "Apache-2.0" ]
null
null
null
preprocessing/smri/utils/features.py
GalBenZvi/BrainPrint
8dda22f130f60bac66fe05f0f5163ee3680616f5
[ "Apache-2.0" ]
1
2021-08-12T07:54:37.000Z
2021-08-12T07:54:37.000Z
preprocessing/dwi/utils/features.py
GalBenZvi/BrainPrint
8dda22f130f60bac66fe05f0f5163ee3680616f5
[ "Apache-2.0" ]
1
2021-08-08T11:56:19.000Z
2021-08-08T11:56:19.000Z
FEATURES = { "DWI": [ "MD", "FA", "AD", "RD", "EigenValue", "EigenVector", "CS", "CP", "CL", ], "SMRI": [ "Thickness", "Volume", "Sulc", ], }
13.368421
22
0.271654
FEATURES = { "DWI": [ "MD", "FA", "AD", "RD", "EigenValue", "EigenVector", "CS", "CP", "CL", ], "SMRI": [ "Thickness", "Volume", "Sulc", ], }
0
0
0
4e01f94c8ce0771d637f22aa24a5caf4396746e5
1,240
py
Python
tests/test_https_middleware.py
alxpy/aiohttp-middlewares
377740d21cdaf3142523eb81b0cee4c6dd01f6b5
[ "BSD-3-Clause" ]
34
2017-05-14T11:31:41.000Z
2022-03-24T06:07:31.000Z
tests/test_https_middleware.py
alxpy/aiohttp-middlewares
377740d21cdaf3142523eb81b0cee4c6dd01f6b5
[ "BSD-3-Clause" ]
77
2017-10-20T19:40:59.000Z
2022-03-01T05:07:36.000Z
tests/test_https_middleware.py
alxpy/aiohttp-middlewares
377740d21cdaf3142523eb81b0cee4c6dd01f6b5
[ "BSD-3-Clause" ]
2
2019-11-06T12:45:33.000Z
2021-11-24T14:55:28.000Z
import pytest from aiohttp import web from aiohttp_middlewares import https_middleware @pytest.mark.parametrize( "match_headers, request_headers, expected", [ (None, None, "http"), (None, {"X-Forwarded-Proto": "http"}, "http"), (None, {"X-Forwarded-Proto": "https"}, "https"), ...
32.631579
73
0.625806
import pytest from aiohttp import web from aiohttp_middlewares import https_middleware def create_app(match_headers): app = web.Application(middlewares=[https_middleware(match_headers)]) app.router.add_route("GET", "/", handler) return app async def handler(request): return web.json_response(reques...
441
0
68
2159bbd87ad1a044357a5af7ed39b624367234cb
1,066
py
Python
m2core/data_schemes/redis_system_scheme.py
mdutkin/m2core
1e08acbc99e9e6c60a03d63110e2fcec96a35ec0
[ "MIT" ]
18
2017-11-02T16:06:41.000Z
2019-04-16T08:11:37.000Z
m2core/data_schemes/redis_system_scheme.py
mdutkin/m2core
1e08acbc99e9e6c60a03d63110e2fcec96a35ec0
[ "MIT" ]
4
2018-06-19T08:45:26.000Z
2019-02-08T04:28:28.000Z
m2core/data_schemes/redis_system_scheme.py
mdutkin/m2core
1e08acbc99e9e6c60a03d63110e2fcec96a35ec0
[ "MIT" ]
2
2017-11-10T07:27:22.000Z
2018-06-27T12:16:27.000Z
# holds mapping between human key prefixes and real Redis prefixes minute = 60 hour = 60 * minute day = 24 * hour week = 7 * day month = 31 * day redis_scheme = { # # human-readable table name # | # | prefix for key in Redis + # | key placeholder ...
34.387097
87
0.366792
# holds mapping between human key prefixes and real Redis prefixes minute = 60 hour = 60 * minute day = 24 * hour week = 7 * day month = 31 * day redis_scheme = { # # human-readable table name # | # | prefix for key in Redis + # | key placeholder ...
0
0
0
83fef8c29fe6d4a012071d9b3885e0118d9aecd4
4,535
py
Python
python/paddle/fluid/tests/unittests/test_allclose_op.py
Steffy-zxf/Paddle
82b23b8fcf6f171ad72e1453c8a2b337e95ee8a9
[ "Apache-2.0" ]
null
null
null
python/paddle/fluid/tests/unittests/test_allclose_op.py
Steffy-zxf/Paddle
82b23b8fcf6f171ad72e1453c8a2b337e95ee8a9
[ "Apache-2.0" ]
null
null
null
python/paddle/fluid/tests/unittests/test_allclose_op.py
Steffy-zxf/Paddle
82b23b8fcf6f171ad72e1453c8a2b337e95ee8a9
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
33.592593
80
0.592944
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
3,291
125
375
bbe11f64ed969361559c9c408832f964831eb078
174
py
Python
flask_swag/extractor/__init__.py
Hardtack/Flask-Swag
84555d1b88434ed8813a7045f08a98398197e90a
[ "MIT" ]
10
2016-02-08T14:08:20.000Z
2019-07-21T02:25:02.000Z
flask_swag/extractor/__init__.py
Hardtack/Flask-Swag
84555d1b88434ed8813a7045f08a98398197e90a
[ "MIT" ]
2
2016-02-11T08:59:00.000Z
2017-05-08T06:49:28.000Z
flask_swag/extractor/__init__.py
Hardtack/Flask-Swag
84555d1b88434ed8813a7045f08a98398197e90a
[ "MIT" ]
null
null
null
""" extractor ========= Extract path info from flask application. """ from .base import Extractor from .mark import MarkExtractor __all__ = ['Extractor', 'MarkExtractor']
14.5
41
0.706897
""" extractor ========= Extract path info from flask application. """ from .base import Extractor from .mark import MarkExtractor __all__ = ['Extractor', 'MarkExtractor']
0
0
0
ab256a8a46bd4d6a36a50cb2513e20b4a1200245
1,676
py
Python
lib/process_util.py
hustwei/chromite
10eb79abeb64e859362546214b7e039096ac9830
[ "BSD-3-Clause" ]
null
null
null
lib/process_util.py
hustwei/chromite
10eb79abeb64e859362546214b7e039096ac9830
[ "BSD-3-Clause" ]
null
null
null
lib/process_util.py
hustwei/chromite
10eb79abeb64e859362546214b7e039096ac9830
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2014 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Process related utilities.""" from __future__ import print_function import errno import os import signal import sys import time def GetExitStatus(s...
25.014925
75
0.693914
# Copyright 2014 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Process related utilities.""" from __future__ import print_function import errno import os import signal import sys import time def GetExitStatus(s...
0
0
0
b6f9b268179e914aa4660fb6210f0fd47b82d044
7,204
py
Python
function_testing/test_pointcorr.py
simonsobs/soaculib
db829e74f9feba06b3b90e2b0fc997a4c86ae683
[ "BSD-2-Clause" ]
1
2022-02-16T22:33:46.000Z
2022-02-16T22:33:46.000Z
function_testing/test_pointcorr.py
simonsobs/soaculib
db829e74f9feba06b3b90e2b0fc997a4c86ae683
[ "BSD-2-Clause" ]
null
null
null
function_testing/test_pointcorr.py
simonsobs/soaculib
db829e74f9feba06b3b90e2b0fc997a4c86ae683
[ "BSD-2-Clause" ]
null
null
null
import soaculib import test_helpers as th import time import numpy as np import pickle # Locals. import spem_model import util parser = util.get_parser() parser.add_argument('mode', default='passive', nargs='?') args = parser.parse_args() SPEM_KEYS = [ 'IA', 'IE', 'TF', 'TFS', 'TFC', 'AN', 'AW', # ...
27.601533
92
0.575236
import soaculib import test_helpers as th import time import numpy as np import pickle # Locals. import spem_model import util parser = util.get_parser() parser.add_argument('mode', default='passive', nargs='?') args = parser.parse_args() SPEM_KEYS = [ 'IA', 'IE', 'TF', 'TFS', 'TFC', 'AN', 'AW', # ...
1,172
0
192
f8a8ba1c09a54c0a8400ac2ff929242b3d0ee342
995
py
Python
django/ledger_base/backend.py
phantomhieve/cashcenter
642a496c5e60847f4c4a6cc2c80b957ae2d6285b
[ "MIT" ]
null
null
null
django/ledger_base/backend.py
phantomhieve/cashcenter
642a496c5e60847f4c4a6cc2c80b957ae2d6285b
[ "MIT" ]
4
2021-04-08T22:00:11.000Z
2021-09-22T19:42:08.000Z
django/ledger_base/backend.py
phantomhieve/cashcenter
642a496c5e60847f4c4a6cc2c80b957ae2d6285b
[ "MIT" ]
null
null
null
from ledger.models import LedgerData
39.8
49
0.527638
from ledger.models import LedgerData def makeInstance(instance, request): new_instance = LedgerData( user = request.user, l_r_no = instance.l_r_no, l_r_date = instance.l_r_date, bale_no = instance.bale_no, supplier = instance.sup...
936
0
22
61379b4f083f9f81ebc303758aee285ce2476135
13,529
py
Python
tests/test_of_mangle.py
cloudysunny14/faucet
7e4414028f7696e67385b811518ae41d01fc830c
[ "Apache-2.0" ]
1
2016-12-28T15:14:51.000Z
2016-12-28T15:14:51.000Z
tests/test_of_mangle.py
cloudysunny14/of_mangle
78fbf4ca897da2995a6ecba6330519b8680ebadb
[ "Apache-2.0" ]
null
null
null
tests/test_of_mangle.py
cloudysunny14/of_mangle
78fbf4ca897da2995a6ecba6330519b8680ebadb
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Copyright 2014 cloudysunny14. # # 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...
35.69657
83
0.572326
#!/usr/bin/env python # # Copyright 2014 cloudysunny14. # # 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...
9,184
1,110
74
e644729f9f477affc4780f5fb80a7494502e4463
1,708
py
Python
orchestra/contrib/domains/utils.py
RubenPX/django-orchestra
5ab4779e1ae12ec99569d682601b7810587ed381
[ "Unlicense" ]
68
2015-02-09T10:28:44.000Z
2022-03-12T11:08:36.000Z
orchestra/contrib/domains/utils.py
RubenPX/django-orchestra
5ab4779e1ae12ec99569d682601b7810587ed381
[ "Unlicense" ]
17
2015-05-01T18:10:03.000Z
2021-03-19T21:52:55.000Z
orchestra/contrib/domains/utils.py
RubenPX/django-orchestra
5ab4779e1ae12ec99569d682601b7810587ed381
[ "Unlicense" ]
29
2015-03-31T04:51:03.000Z
2022-02-17T02:58:50.000Z
from collections import defaultdict from django.utils import timezone class RecordStorage(object): """ list-dict implementation for fast lookups of record types """ def format_hostmaster(hostmaster): """ The DNS encodes the <local-part> as a single label, and encodes the <mail-domain> as a...
32.226415
76
0.659251
from collections import defaultdict from django.utils import timezone class RecordStorage(object): """ list-dict implementation for fast lookups of record types """ def __init__(self, *args): self.records = list(*args) self.type = defaultdict(list) def __iter__(self): ...
444
0
178
edae5c03b18bc54c2307cfc6aff9c4173371eb1c
5,398
py
Python
dbinit/dump.py
mrdepth/libdgmpp
2721f7f905a2c015383868db5043c382fe682ab0
[ "MIT" ]
13
2016-04-30T17:14:59.000Z
2021-08-19T01:52:38.000Z
dbinit/dump.py
mrdepth/eufe
2721f7f905a2c015383868db5043c382fe682ab0
[ "MIT" ]
7
2017-12-19T23:13:35.000Z
2018-08-02T14:14:15.000Z
dbinit/dump.py
mrdepth/eufe
2721f7f905a2c015383868db5043c382fe682ab0
[ "MIT" ]
8
2016-01-26T16:52:37.000Z
2021-10-15T08:29:48.000Z
import yaml import json import sqlite3 from functools import reduce import operator import time f=open('./tmp/sde/typeIDs.json', 'r', encoding='utf-8') j=json.load(f) #y=load("./tmp/sde/fsd/typeIDs.yaml") #f=open('./tmp/sde/typeIDs.json', 'w', encoding='utf-8') #json.dump(y, f) #f.write(json.dump(y)) #f.close() #d...
27.682051
173
0.667469
import yaml import json import sqlite3 from functools import reduce import operator import time def f(): return None def load(path): t0 = time.time() s=open(path, "r", encoding="utf-8").read() result = yaml.load(s, yaml.CLoader) if isinstance(result, dict): result = result#.items() t...
570
0
91
35dca39e0121540a436f6da96d93d03e4d00edc2
689
py
Python
tests/theano/__init__.py
brandonwillard/symbolic-pymc
84e8d612c714f502f8d188c1766498f4ff7beecf
[ "Apache-2.0" ]
59
2019-02-16T21:07:48.000Z
2022-03-09T01:01:45.000Z
tests/theano/__init__.py
brandonwillard/symbolic-pymc
84e8d612c714f502f8d188c1766498f4ff7beecf
[ "Apache-2.0" ]
56
2019-02-20T09:06:04.000Z
2021-01-08T21:22:23.000Z
tests/theano/__init__.py
brandonwillard/symbolic-pymc
84e8d612c714f502f8d188c1766498f4ff7beecf
[ "Apache-2.0" ]
9
2019-02-22T06:22:31.000Z
2021-07-05T10:05:35.000Z
import warnings with warnings.catch_warnings(): warnings.filterwarnings("ignore", category=DeprecationWarning) import theano import pymc3 as pm from functools import wraps theano.config.compute_test_value = "ignore" theano.config.on_opt_error = "raise" theano.config.mode = "FAST_COMPILE" theano.config.cxx ...
19.685714
66
0.676343
import warnings with warnings.catch_warnings(): warnings.filterwarnings("ignore", category=DeprecationWarning) import theano import pymc3 as pm from functools import wraps theano.config.compute_test_value = "ignore" theano.config.on_opt_error = "raise" theano.config.mode = "FAST_COMPILE" theano.config.cxx ...
340
0
23
70778d96d5999b4ef52cb4dde6e9df7135bb617c
13,904
py
Python
Segmentation/eval_performance.py
atomized1/MRI_Segmentation_Radiomics
3998dd26b60972f41d3b397cecdad16563df4189
[ "Apache-2.0" ]
12
2020-02-14T05:33:24.000Z
2022-01-13T16:37:44.000Z
Segmentation/eval_performance.py
atomized1/MRI_Segmentation_Radiomics
3998dd26b60972f41d3b397cecdad16563df4189
[ "Apache-2.0" ]
3
2020-01-28T22:20:08.000Z
2022-02-09T23:33:30.000Z
Segmentation/eval_performance.py
atomized1/MRI_Segmentation_Radiomics
3998dd26b60972f41d3b397cecdad16563df4189
[ "Apache-2.0" ]
4
2020-06-12T02:59:55.000Z
2021-08-20T05:42:34.000Z
import os from MachineLearning.load_datasets import load_filenames_2nd, load_data, keep_t2 from glob2 import glob import nibabel as nib import numpy as np import keras from Segmentation.model_keras import * from sklearn.metrics import precision_recall_curve, precision_score, \ recall_score, roc_auc_score, f1_score,...
30.897778
133
0.562572
import os from MachineLearning.load_datasets import load_filenames_2nd, load_data, keep_t2 from glob2 import glob import nibabel as nib import numpy as np import keras from Segmentation.model_keras import * from sklearn.metrics import precision_recall_curve, precision_score, \ recall_score, roc_auc_score, f1_score,...
4,222
0
184
e1aab230d47c97b07e835f65d3a577d40d2af698
9,585
py
Python
fixed_stack_in_order_models.py
ekayen/rnng-pytorch
4cdfcb62f18a214011a8ea4c034fbf9041ac6012
[ "MIT" ]
null
null
null
fixed_stack_in_order_models.py
ekayen/rnng-pytorch
4cdfcb62f18a214011a8ea4c034fbf9041ac6012
[ "MIT" ]
null
null
null
fixed_stack_in_order_models.py
ekayen/rnng-pytorch
4cdfcb62f18a214011a8ea4c034fbf9041ac6012
[ "MIT" ]
null
null
null
import torch from torch import nn import torch.nn.functional as F from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence import numpy as np from fixed_stack_models import BeamItems, FixedStack, FixedStackRNNG, StackState
49.407216
121
0.676474
import torch from torch import nn import torch.nn.functional as F from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence import numpy as np from fixed_stack_models import BeamItems, FixedStack, FixedStackRNNG, StackState class FixedInOrderStack(FixedStack): def __init__(self, initial_hidden, stack...
8,951
53
340
9be6fb310c07fcd88eaec8696898000d5997cbdc
1,510
py
Python
linear_models/perceptron.py
lkk7/ml-library
bf338eb0d0f566ccb0fc51f27e04fafa1215ef93
[ "MIT" ]
null
null
null
linear_models/perceptron.py
lkk7/ml-library
bf338eb0d0f566ccb0fc51f27e04fafa1215ef93
[ "MIT" ]
null
null
null
linear_models/perceptron.py
lkk7/ml-library
bf338eb0d0f566ccb0fc51f27e04fafa1215ef93
[ "MIT" ]
null
null
null
import numpy as np from linear_models.logistic_regression import LogisticRegression class Perceptron(LogisticRegression): """A simple (binary classification) perceptron. Uses binary cross-entropy loss for updating weights. >>NOTE: it inherits most of the code from logistic regression for simplicity.<< Pa...
37.75
104
0.652318
import numpy as np from linear_models.logistic_regression import LogisticRegression class Perceptron(LogisticRegression): """A simple (binary classification) perceptron. Uses binary cross-entropy loss for updating weights. >>NOTE: it inherits most of the code from logistic regression for simplicity.<< Pa...
137
0
27
e465039836c2865c9891dbb3920bc30d8a2a4018
2,178
py
Python
Algo/004 (Contest)/F_test.py
abel1502/mipt_1s
f97974075ad82b4f1df4df1beee6ad895c363691
[ "MIT" ]
3
2020-10-01T17:21:49.000Z
2020-10-16T10:57:53.000Z
Algo/004 (Contest)/F_test.py
abel1502/mipt_1s
f97974075ad82b4f1df4df1beee6ad895c363691
[ "MIT" ]
2
2020-10-07T15:53:14.000Z
2020-10-07T16:26:02.000Z
Algo/004 (Contest)/F_test.py
abel1502/mipt_1s
f97974075ad82b4f1df4df1beee6ad895c363691
[ "MIT" ]
null
null
null
import subprocess import io import random INF = 10 ** 20 stress(100) exit() data = (16, 8, [8, 10, 15, 16, 4, 11]) """ 16 6 8 8 10 15 16 4 11 """ ans = solve(*data) print(test(*data, ans)) print(data, ans) """ [Error] (18, 3, [18, 8, 11, 2, 17, 10, 15, 5, 16]) (0, 1, 6) [Error] (80, 5, [61, 2]...
20.942308
101
0.495868
import subprocess import io import random INF = 10 ** 20 def test(l, k, cells, ans): inData = "{l} {n} {k}\n{cells}\n".format(n=len(cells), l=l, k=k, cells=' '.join(map(str, cells))) result = subprocess.run("F.exe", input=inData.encode(), stdout=subprocess.PIPE) d, c, s = map(int, result.stdout.decode().s...
1,580
0
92
0c88c092702f2372af93159b4d7525bfd1fe0502
2,820
py
Python
meta_policy_search/envs/mujoco_envs/half_cheetah_rand_direc.py
Zhiwei-Z/SeqPromp
d973b8564d500d95477624cfb992fb5a96e096ca
[ "MIT" ]
null
null
null
meta_policy_search/envs/mujoco_envs/half_cheetah_rand_direc.py
Zhiwei-Z/SeqPromp
d973b8564d500d95477624cfb992fb5a96e096ca
[ "MIT" ]
null
null
null
meta_policy_search/envs/mujoco_envs/half_cheetah_rand_direc.py
Zhiwei-Z/SeqPromp
d973b8564d500d95477624cfb992fb5a96e096ca
[ "MIT" ]
null
null
null
import numpy as np from meta_policy_search.envs.base import MetaEnv from meta_policy_search.utils import logger import gym from gym.envs.mujoco.mujoco_env import MujocoEnv IterationBound1 = 200 IterationBound2 = 600
37.105263
92
0.634752
import numpy as np from meta_policy_search.envs.base import MetaEnv from meta_policy_search.utils import logger import gym from gym.envs.mujoco.mujoco_env import MujocoEnv IterationBound1 = 200 IterationBound2 = 600 class HalfCheetahRandDirecEnv(MetaEnv, MujocoEnv, gym.utils.EzPickle): def __init__(self, goal_dir...
2,000
581
23
d9c30762e931c64e2c9bdf14b9468c8796124944
42,572
py
Python
pydia/cuda_functions_dp.py
koconnor4/pyDIA
7c0c2c21f039ae28bcda4af821f16dbafb27ceb5
[ "MIT" ]
2
2019-04-18T09:58:12.000Z
2020-03-03T09:27:25.000Z
pydia/cuda_functions_dp.py
koconnor4/pyDIA
7c0c2c21f039ae28bcda4af821f16dbafb27ceb5
[ "MIT" ]
null
null
null
pydia/cuda_functions_dp.py
koconnor4/pyDIA
7c0c2c21f039ae28bcda4af821f16dbafb27ceb5
[ "MIT" ]
1
2019-03-13T02:09:29.000Z
2019-03-13T02:09:29.000Z
import pycuda.autoinit from pycuda.compiler import SourceModule cu_matrix_kernel = SourceModule(""" #include <math.h> #include <stdio.h> #include "texture_fetch_functions.h" #include "texture_types.h" #define THREADS_PER_BLOCK 256 #define FIT_RADIUS 6 texture<float, cudaTextureType2DLayered, cudaReadModeElementTyp...
25.895377
219
0.485272
import pycuda.autoinit from pycuda.compiler import SourceModule cu_matrix_kernel = SourceModule(""" #include <math.h> #include <stdio.h> #include "texture_fetch_functions.h" #include "texture_types.h" #define THREADS_PER_BLOCK 256 #define FIT_RADIUS 6 texture<float, cudaTextureType2DLayered, cudaReadModeElementTyp...
0
0
0
127f75e4af1c5b7ee4fe6000ac7878906b35420f
5,466
py
Python
taro/jobs/job.py
taro-suite/taro
baa76e75706bc824a799928d9b7548431b898338
[ "MIT" ]
null
null
null
taro/jobs/job.py
taro-suite/taro
baa76e75706bc824a799928d9b7548431b898338
[ "MIT" ]
26
2021-04-05T12:32:21.000Z
2022-03-22T12:53:44.000Z
taro/jobs/job.py
taro-suite/taro
baa76e75706bc824a799928d9b7548431b898338
[ "MIT" ]
1
2021-04-16T21:04:53.000Z
2021-04-16T21:04:53.000Z
""" Job framework defines components used for job submission and management. It is built upon :mod:`execution` framework. It provides constructs for: 1. Creating of job definition 2. Implementing of job instance 3. Implementing of job observer There are two type of clients of the framework: 1. Job users 2. J...
24.079295
115
0.643981
""" Job framework defines components used for job submission and management. It is built upon :mod:`execution` framework. It provides constructs for: 1. Creating of job definition 2. Implementing of job instance 3. Implementing of job observer There are two type of clients of the framework: 1. Job users 2. J...
941
3,316
378
7e126c872bc77ec31b05758c5eda86b8368ea35a
305
py
Python
plugins/test/main.py
StyXman/pbt
83dac5b896e9037fac17453f21a4d14faa25c09e
[ "Apache-2.0" ]
1
2015-07-16T19:14:50.000Z
2015-07-16T19:14:50.000Z
plugins/test/main.py
StyXman/pbt
83dac5b896e9037fac17453f21a4d14faa25c09e
[ "Apache-2.0" ]
null
null
null
plugins/test/main.py
StyXman/pbt
83dac5b896e9037fac17453f21a4d14faa25c09e
[ "Apache-2.0" ]
null
null
null
import pbt import sys import unittest @pbt.command(name="test")
23.461538
53
0.704918
import pbt import sys import unittest @pbt.command(name="test") def run(ctx, args, project): loader = unittest.TestLoader() for test_dir in project.settings.test_paths: tests = loader.discover(test_dir) testRunner = unittest.runner.TextTestRunner() testRunner.run(tests)
217
0
22
258df39239a3f809e93d6348ebe51ed653b9433d
285
py
Python
test/api/test_nvgli.py
lonagi/pynvg
a7b28952960184509eba8060e10ddd824913b08e
[ "MIT" ]
null
null
null
test/api/test_nvgli.py
lonagi/pynvg
a7b28952960184509eba8060e10ddd824913b08e
[ "MIT" ]
null
null
null
test/api/test_nvgli.py
lonagi/pynvg
a7b28952960184509eba8060e10ddd824913b08e
[ "MIT" ]
null
null
null
import unittest from pynvg.api import nvgli if(__name__=="main"): unittest.main()
20.357143
39
0.642105
import unittest from pynvg.api import nvgli class NVGLiTestCase(unittest.TestCase): def test_nvgli(self): url = "nvg-grou.com"; result="https://nvg.li/nvg"; test=nvgli(url); self.assertEqual(test,result) if(__name__=="main"): unittest.main()
131
18
50
2a6533ef8ebb5fa457b07048f4ff5f7a4f159684
400
py
Python
hlwtadmin/migrations/0024_concertannouncement_seen_count.py
Kunstenpunt/havelovewilltravel
6a27824b4d3d8b1bf19e0bc0d0648f0f4e8abc83
[ "Apache-2.0" ]
1
2020-10-16T16:29:01.000Z
2020-10-16T16:29:01.000Z
hlwtadmin/migrations/0024_concertannouncement_seen_count.py
Kunstenpunt/havelovewilltravel
6a27824b4d3d8b1bf19e0bc0d0648f0f4e8abc83
[ "Apache-2.0" ]
365
2020-02-03T12:46:53.000Z
2022-02-27T17:20:46.000Z
hlwtadmin/migrations/0024_concertannouncement_seen_count.py
Kunstenpunt/havelovewilltravel
6a27824b4d3d8b1bf19e0bc0d0648f0f4e8abc83
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.0 on 2020-03-25 09:09 from django.db import migrations, models
21.052632
49
0.615
# Generated by Django 3.0 on 2020-03-25 09:09 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('hlwtadmin', '0023_auto_20200323_1239'), ] operations = [ migrations.AddField( model_name='concertannouncement', name='...
0
288
23
13c657a63c4bc6f64117453622ae0d605cc4d139
735
py
Python
uptee/lib/template_loader.py
teeworldsCNFun/upTee
1c04b7421f4834f83bbb9f59f43dfebac08e56b0
[ "BSD-3-Clause" ]
2
2018-12-26T18:48:58.000Z
2021-07-20T23:41:14.000Z
uptee/lib/template_loader.py
teeworldsCNFun/upTee
1c04b7421f4834f83bbb9f59f43dfebac08e56b0
[ "BSD-3-Clause" ]
13
2015-01-20T19:18:10.000Z
2022-03-07T21:35:55.000Z
uptee/lib/template_loader.py
teeworldsCNFun/upTee
1c04b7421f4834f83bbb9f59f43dfebac08e56b0
[ "BSD-3-Clause" ]
3
2015-12-04T20:10:50.000Z
2022-01-24T12:31:09.000Z
import os from django.template.loaders.filesystem import Loader as FileSystemLoader from accounts.models import get_template import settings
38.684211
85
0.711565
import os from django.template.loaders.filesystem import Loader as FileSystemLoader from accounts.models import get_template import settings class Loader(FileSystemLoader): def get_template_sources(self, template_name, template_dirs=None): if not template_dirs: template = settings.DEFAULT_TEM...
533
10
50
a7dbb1c47342dbe9ec25e6f02175caff451286c8
910
py
Python
oop/class_ipaddress.py
levs72/pyneng-examples
d6288292dcf9d1ebc5a9db4a0d620bd11b4a2df9
[ "MIT" ]
11
2021-04-05T09:30:23.000Z
2022-03-09T13:27:56.000Z
oop/class_ipaddress.py
levs72/pyneng-examples
d6288292dcf9d1ebc5a9db4a0d620bd11b4a2df9
[ "MIT" ]
null
null
null
oop/class_ipaddress.py
levs72/pyneng-examples
d6288292dcf9d1ebc5a9db4a0d620bd11b4a2df9
[ "MIT" ]
11
2021-04-06T03:44:35.000Z
2022-03-04T21:20:40.000Z
import ipaddress if __name__ == "__main__": ip1 = IPAddress("10.1.1.1/25") print(ip1 + 5) print(5 + ip1) print(ip1.__radd__(5))
26
62
0.579121
import ipaddress class IPAddress: def __init__(self, ip): address, mask = ip.split("/") self.address = address self.mask = int(mask) def __str__(self): return f"{self.address}/{self.mask}" def __repr__(self): return f"IPAddress('{self.address}/{self.mask}')" ...
611
-5
157