hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
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
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
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
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f71e77b8f44d22273b61f23147bbe79a416e5b87
1,166
py
Python
aoc_2021/day03.py
guido-weber/AoC_2021
f5d41ea0600f702857b2c479a67f4f9578afb52b
[ "Unlicense" ]
null
null
null
aoc_2021/day03.py
guido-weber/AoC_2021
f5d41ea0600f702857b2c479a67f4f9578afb52b
[ "Unlicense" ]
null
null
null
aoc_2021/day03.py
guido-weber/AoC_2021
f5d41ea0600f702857b2c479a67f4f9578afb52b
[ "Unlicense" ]
null
null
null
import io from collections import Counter from typing import Iterable def read_input(): with io.open("input/day03") as f: return f.read() def most_common(bits: Iterable[str]): c = Counter(bits) return "0" if c["0"] > c["1"] else "1" def least_common(bits: Iterable[str]): c = Counter(bits) ...
22.423077
67
0.621784
import io from collections import Counter from typing import Iterable def read_input(): with io.open("input/day03") as f: return f.read() def most_common(bits: Iterable[str]): c = Counter(bits) return "0" if c["0"] > c["1"] else "1" def least_common(bits: Iterable[str]): c = Counter(bits) ...
true
true
f71e77d479a5c19a10183f4785ab075fdd327612
380
py
Python
vfio_isolate/action/action.py
spheenik/vfio-isolate
6d6a1f0d5e5d84a5ad9911c635a81b86710d12d5
[ "MIT" ]
44
2020-05-03T15:03:32.000Z
2022-03-23T19:03:23.000Z
vfio_isolate/action/action.py
darkguy2008/vfio-isolate
6c16cf363a627f02202586a17df58522e097ef10
[ "MIT" ]
7
2020-08-18T10:17:14.000Z
2022-01-14T14:18:47.000Z
vfio_isolate/action/action.py
darkguy2008/vfio-isolate
6c16cf363a627f02202586a17df58522e097ef10
[ "MIT" ]
6
2020-06-02T05:29:34.000Z
2022-02-04T17:12:40.000Z
from dataclasses import dataclass from typing import Generator @dataclass class Execution: action: type params: object class Action: @classmethod def can_execute(cls, p): return True @classmethod def execute(cls, p): pass @classmethod def record_undo(cls, p) -> Gene...
15.2
64
0.644737
from dataclasses import dataclass from typing import Generator @dataclass class Execution: action: type params: object class Action: @classmethod def can_execute(cls, p): return True @classmethod def execute(cls, p): pass @classmethod def record_undo(cls, p) -> Gene...
true
true
f71e781a9cac3e602bc48bcfc5f1e148c85a0985
1,536
py
Python
upy/__init__.py
transforma-digital/upy
b70b65ea3f8b8c47a64d54567289280fd78877fe
[ "BSD-3-Clause" ]
null
null
null
upy/__init__.py
transforma-digital/upy
b70b65ea3f8b8c47a64d54567289280fd78877fe
[ "BSD-3-Clause" ]
5
2021-08-04T01:30:48.000Z
2021-08-06T17:42:08.000Z
upy/__init__.py
transforma-digital/upy
b70b65ea3f8b8c47a64d54567289280fd78877fe
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2021 sinek-dev # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. #...
52.965517
75
0.775391
# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
true
true
f71e781ca6c1fe1d224c75e75b6f5fc9def42831
8,411
py
Python
lib/win32popen.py
manuvaldi/viewvc-wiki
a8627d695cc80425ed201ded9ab7030438d67a03
[ "BSD-2-Clause" ]
null
null
null
lib/win32popen.py
manuvaldi/viewvc-wiki
a8627d695cc80425ed201ded9ab7030438d67a03
[ "BSD-2-Clause" ]
null
null
null
lib/win32popen.py
manuvaldi/viewvc-wiki
a8627d695cc80425ed201ded9ab7030438d67a03
[ "BSD-2-Clause" ]
null
null
null
# -*-python-*- # # Copyright (C) 1999-2015 The ViewCVS Group. All Rights Reserved. # # By using this file, you agree to the terms and conditions set forth in # the LICENSE.html file which can be found at the top level of the ViewVC # distribution or at http://viewvc.org/license-1.html. # # For more information,...
35.639831
127
0.653311
import os, sys, traceback, string, thread try: import win32api except ImportError, e: raise ImportError, str(e) + """ Did you install the Python for Windows Extensions? http://sourceforge.net/projects/pywin32/ """ import win32process, win32pipe, win32con import win32event, win32fi...
false
true
f71e798522edd2d2ed86a48c227d9550e9392a77
19,740
py
Python
tests/wallet/did_wallet/test_did.py
MintNetwork/mint-blockchain
65ec05a015a07664ed25f83efa736065a17f7d7a
[ "Apache-2.0" ]
12
2021-08-18T20:53:31.000Z
2022-03-15T21:45:13.000Z
tests/wallet/did_wallet/test_did.py
MintNetwork/mint-blockchain
65ec05a015a07664ed25f83efa736065a17f7d7a
[ "Apache-2.0" ]
34
2021-08-18T19:12:11.000Z
2022-01-06T17:15:34.000Z
tests/wallet/did_wallet/test_did.py
MintNetwork/mint-blockchain
65ec05a015a07664ed25f83efa736065a17f7d7a
[ "Apache-2.0" ]
7
2021-08-18T20:53:34.000Z
2022-03-15T08:37:40.000Z
import asyncio import pytest from mint.simulator.simulator_protocol import FarmNewBlockProtocol from mint.types.peer_info import PeerInfo from mint.util.ints import uint16, uint32, uint64 from tests.setup_nodes import setup_simulators_and_wallets from mint.wallet.did_wallet.did_wallet import DIDWallet from mint.types.b...
43.480176
119
0.693262
import asyncio import pytest from mint.simulator.simulator_protocol import FarmNewBlockProtocol from mint.types.peer_info import PeerInfo from mint.util.ints import uint16, uint32, uint64 from tests.setup_nodes import setup_simulators_and_wallets from mint.wallet.did_wallet.did_wallet import DIDWallet from mint.types.b...
true
true
f71e799f520b151af3e8ef5669e04ee4d51fa841
1,587
py
Python
amulog/external/tpl_match.py
cpflat/amulog
b7a8c7478d2e5253158f0bce3a7f7109d23e40cb
[ "BSD-3-Clause" ]
5
2019-07-03T09:57:30.000Z
2021-02-13T13:15:47.000Z
amulog/external/tpl_match.py
cpflat/amulog
b7a8c7478d2e5253158f0bce3a7f7109d23e40cb
[ "BSD-3-Clause" ]
null
null
null
amulog/external/tpl_match.py
cpflat/amulog
b7a8c7478d2e5253158f0bce3a7f7109d23e40cb
[ "BSD-3-Clause" ]
1
2021-09-09T02:21:42.000Z
2021-09-09T02:21:42.000Z
#!/usr/bin/env python # coding: utf-8 """Matching raw log messages and its templates that is generated by external tools.""" import re from collections import defaultdict # shortest match REPLACER_REGEX_ESCAPED = re.compile(r"\\\*[A-Z]*?\\\*") def add_esc_external(tpl): """Add escape sequence for imported exte...
29.388889
82
0.653434
import re from collections import defaultdict REPLACER_REGEX_ESCAPED = re.compile(r"\\\*[A-Z]*?\\\*") def add_esc_external(tpl): from amulog import strutil from amulog import lt_common l_wild = lt_common.REPLACER_REGEX.findall(tpl) l_others = [strutil.add_esc(tmp) for tmp in lt_c...
true
true
f71e79a12d7b5249926962e2bc9b26fef30bcffc
4,889
py
Python
PiSnapND/s2a_fm/Snap!Files/Snap!Mobile/arduino/scratch_http_server.py
rasplay/PiSnap-
657b97d2349604ee5d67dd8f055a1070ba57a676
[ "MIT" ]
null
null
null
PiSnapND/s2a_fm/Snap!Files/Snap!Mobile/arduino/scratch_http_server.py
rasplay/PiSnap-
657b97d2349604ee5d67dd8f055a1070ba57a676
[ "MIT" ]
null
null
null
PiSnapND/s2a_fm/Snap!Files/Snap!Mobile/arduino/scratch_http_server.py
rasplay/PiSnap-
657b97d2349604ee5d67dd8f055a1070ba57a676
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Nov 25 14:45:49 2013 @author: Alan Yorinks Copyright (c) 2013-14 Alan Yorinks All right reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; ei...
36.759398
113
0.689712
""" Created on Mon Nov 25 14:45:49 2013 @author: Alan Yorinks Copyright (c) 2013-14 Alan Yorinks All right reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the...
false
true
f71e79a6e2049d202d18bd4eb9b2e1332868a805
15,551
py
Python
tests/test_autointerface.py
sphinx-contrib/zopeext
b749d0023f4fb8b8eea3a8f3216f63397c6272de
[ "BSD-2-Clause" ]
1
2020-03-16T07:20:58.000Z
2020-03-16T07:20:58.000Z
tests/test_autointerface.py
sphinx-contrib/zopeext
b749d0023f4fb8b8eea3a8f3216f63397c6272de
[ "BSD-2-Clause" ]
3
2021-12-19T09:39:45.000Z
2022-01-06T05:05:03.000Z
tests/test_autointerface.py
sphinx-contrib/zopeext
b749d0023f4fb8b8eea3a8f3216f63397c6272de
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import os import sys import pytest # Add current directory to path so we can import the example.py file. sys.path.insert(0, os.path.abspath(__file__)) pytest_plugins = "sphinx.testing.fixtures" @pytest.mark.sphinx( "html", srcdir=os.path.join(os.path.dirname(__file__), "examples"), ...
64.795833
672
0.67957
import os import sys import pytest sys.path.insert(0, os.path.abspath(__file__)) pytest_plugins = "sphinx.testing.fixtures" @pytest.mark.sphinx( "html", srcdir=os.path.join(os.path.dirname(__file__), "examples"), ) @pytest.mark.skip(reason="Test needs updating.") def test_sphinx_build(app, status, warnin...
true
true
f71e7ab3cb5bcd17f3735b3ac4b491ebc205bce5
1,134
py
Python
Modules/Filtering/Smoothing/wrapping/test/MedianImageFilterFunctionalDocumentationTest.py
HongdaZ/ITK
f5d004fa3607b8e11edc30f1ba299df35af8aff8
[ "Apache-2.0" ]
1
2021-01-10T14:19:08.000Z
2021-01-10T14:19:08.000Z
Modules/Filtering/Smoothing/wrapping/test/MedianImageFilterFunctionalDocumentationTest.py
HongdaZ/ITK
f5d004fa3607b8e11edc30f1ba299df35af8aff8
[ "Apache-2.0" ]
1
2017-03-19T12:56:50.000Z
2018-10-24T10:40:21.000Z
Modules/Filtering/Smoothing/wrapping/test/MedianImageFilterFunctionalDocumentationTest.py
HongdaZ/ITK
f5d004fa3607b8e11edc30f1ba299df35af8aff8
[ "Apache-2.0" ]
1
2020-07-24T22:58:19.000Z
2020-07-24T22:58:19.000Z
#========================================================================== # # Copyright NumFOCUS # # 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/l...
35.4375
79
0.652557
import itk assert "Procedural interface for" not in itk.median_image_filter.__doc__ assert "Applies a median filter to an image" in itk.median_image_filter.__doc__
true
true
f71e7e5849fed1929fa7be9aa2c73ed76e795347
3,026
py
Python
statsmodels/graphics/tests/test_factorplots.py
aliavni/statsmodels
ef5d57a8d45de76a895e9401705280d558d688ad
[ "BSD-3-Clause" ]
1
2022-01-24T15:17:37.000Z
2022-01-24T15:17:37.000Z
statsmodels/graphics/tests/test_factorplots.py
aliavni/statsmodels
ef5d57a8d45de76a895e9401705280d558d688ad
[ "BSD-3-Clause" ]
null
null
null
statsmodels/graphics/tests/test_factorplots.py
aliavni/statsmodels
ef5d57a8d45de76a895e9401705280d558d688ad
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from numpy.testing import assert_equal, assert_raises from pandas import Series import pytest from statsmodels.graphics.factorplots import _recode, interaction_plot try: import matplotlib.pyplot as plt except ImportError: pass class TestInteractionPlot: @classmethod def setup_cla...
42.027778
118
0.653668
import numpy as np from numpy.testing import assert_equal, assert_raises from pandas import Series import pytest from statsmodels.graphics.factorplots import _recode, interaction_plot try: import matplotlib.pyplot as plt except ImportError: pass class TestInteractionPlot: @classmethod def setup_cla...
true
true
f71e7e75013346712238ce0f9ab6dfad2b41203f
2,066
py
Python
src/draw_pictures.py
mpeychev/disentangled-autoencoders
2d1f18fe198486f29c74ba5606ffcadaff7055cf
[ "MIT" ]
8
2017-11-24T22:26:50.000Z
2018-10-15T07:12:51.000Z
src/draw_pictures.py
mpeychev/disentangled-autoencoders
2d1f18fe198486f29c74ba5606ffcadaff7055cf
[ "MIT" ]
1
2018-01-10T03:44:37.000Z
2018-01-10T19:59:39.000Z
src/draw_pictures.py
mpeychev/disentangled-autoencoders
2d1f18fe198486f29c74ba5606ffcadaff7055cf
[ "MIT" ]
3
2017-12-22T01:07:14.000Z
2019-08-08T09:45:30.000Z
from PIL import Image import os import util import numpy as np import matplotlib import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec def show_images(images, save_name, hard=False): print images.shape dim = images.shape[0] if hard: images = np.array( map(lambda image...
32.793651
93
0.548403
from PIL import Image import os import util import numpy as np import matplotlib import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec def show_images(images, save_name, hard=False): print images.shape dim = images.shape[0] if hard: images = np.array( map(lambda image...
false
true
f71e7e82c3f619f7d9bc39e1ced2dcf72b788c44
1,977
py
Python
erpnext_furniture_to_go/erpnext_furniture_to_go/doctype/furniture_to_go_settings/furniture_to_go_settings.py
artykbasar/erpnext_furniture_to_go
c93894b2cc23bf64ff49ffb4485a30b5be38bfc1
[ "MIT" ]
null
null
null
erpnext_furniture_to_go/erpnext_furniture_to_go/doctype/furniture_to_go_settings/furniture_to_go_settings.py
artykbasar/erpnext_furniture_to_go
c93894b2cc23bf64ff49ffb4485a30b5be38bfc1
[ "MIT" ]
null
null
null
erpnext_furniture_to_go/erpnext_furniture_to_go/doctype/furniture_to_go_settings/furniture_to_go_settings.py
artykbasar/erpnext_furniture_to_go
c93894b2cc23bf64ff49ffb4485a30b5be38bfc1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2021, Artyk Basarov and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe # import erpnext_furniture_to_go.erpnext_furniture_to_go.doctype.furniture_to_go_settings.furniture_to_go_methods as f2g from frappe.model...
42.978261
160
0.828022
from __future__ import unicode_literals import frappe from frappe.model.document import Document class FurnitureToGoSettings(Document): @frappe.whitelist() def find_new_products(self): if self.enable == 1: frappe.enqueue('erpnext_furniture_to_go.erpnext_furniture_to_go.doctype.furniture_to_go_settings.furn...
true
true
f71e7ee02f11010b14d10aee34612e2db23ec030
83,913
py
Python
pycoalescence/tests/test_coalescence_tree.py
thompsonsed/pycoalescence
eddce52ad7b3584e1fb208532d6851751b27dd4a
[ "MIT" ]
null
null
null
pycoalescence/tests/test_coalescence_tree.py
thompsonsed/pycoalescence
eddce52ad7b3584e1fb208532d6851751b27dd4a
[ "MIT" ]
null
null
null
pycoalescence/tests/test_coalescence_tree.py
thompsonsed/pycoalescence
eddce52ad7b3584e1fb208532d6851751b27dd4a
[ "MIT" ]
null
null
null
""" Tests the coalescence tree object. """ import os import random import shutil import sqlite3 import sys import unittest import numpy as np import pandas as pd from pandas.testing import assert_frame_equal from setup_tests import setUpAll, tearDownAll, skipLongTest from pycoalescence import Simulation from pycoales...
47.515855
120
0.649506
import os import random import shutil import sqlite3 import sys import unittest import numpy as np import pandas as pd from pandas.testing import assert_frame_equal from setup_tests import setUpAll, tearDownAll, skipLongTest from pycoalescence import Simulation from pycoalescence.coalescence_tree import CoalescenceTr...
true
true
f71e7fc0b5d8bec62882115f024b707c4da34b3b
10,111
py
Python
xapp-image-base/swagger/swagger_client/models/detailed_gear.py
martinsallandm/hw-xapp-python-lenovo
2123289d3a5ea7122607dea8e8f0d03a348d131b
[ "Apache-2.0", "CC-BY-4.0" ]
null
null
null
xapp-image-base/swagger/swagger_client/models/detailed_gear.py
martinsallandm/hw-xapp-python-lenovo
2123289d3a5ea7122607dea8e8f0d03a348d131b
[ "Apache-2.0", "CC-BY-4.0" ]
null
null
null
xapp-image-base/swagger/swagger_client/models/detailed_gear.py
martinsallandm/hw-xapp-python-lenovo
2123289d3a5ea7122607dea8e8f0d03a348d131b
[ "Apache-2.0", "CC-BY-4.0" ]
null
null
null
# coding: utf-8 """ Strava API v3 The [Swagger Playground](https://developers.strava.com/playground) is the easiest way to familiarize yourself with the Strava API by submitting HTTP requests and observing the responses before you write any client code. It will show what a response will look like with differe...
29.564327
726
0.588666
import pprint import re import six class DetailedGear(object): swagger_types = { 'id': 'str', 'resource_state': 'int', 'primary': 'bool', 'name': 'str', 'distance': 'float', 'brand_name': 'str', 'model_name': 'str', 'frame_type': 'int', ...
true
true
f71e805336c27b6f2b7f452d5fbab1f6282e8202
2,315
py
Python
aliyun-python-sdk-bssopenapi/aliyunsdkbssopenapi/request/v20171214/QueryResourcePackageInstancesRequest.py
liumihust/aliyun-openapi-python-sdk
c7b5dd4befae4b9c59181654289f9272531207ef
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-bssopenapi/aliyunsdkbssopenapi/request/v20171214/QueryResourcePackageInstancesRequest.py
liumihust/aliyun-openapi-python-sdk
c7b5dd4befae4b9c59181654289f9272531207ef
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-bssopenapi/aliyunsdkbssopenapi/request/v20171214/QueryResourcePackageInstancesRequest.py
liumihust/aliyun-openapi-python-sdk
c7b5dd4befae4b9c59181654289f9272531207ef
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
34.552239
88
0.770194
from aliyunsdkcore.request import RpcRequest from aliyunsdkbssopenapi.endpoint import endpoint_data class QueryResourcePackageInstancesRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'BssOpenApi', '2017-12-14', 'QueryResourcePackageInstances') if hasattr(self, "endpoint_map"...
true
true
f71e80a48abdef12de18705d859ad1449bdec6da
7,884
py
Python
xAIbenchmark.py
cmougan/OODBenchmark
e5d7b9540840afe64f6a00139cbc41a44ed01a80
[ "MIT" ]
null
null
null
xAIbenchmark.py
cmougan/OODBenchmark
e5d7b9540840afe64f6a00139cbc41a44ed01a80
[ "MIT" ]
null
null
null
xAIbenchmark.py
cmougan/OODBenchmark
e5d7b9540840afe64f6a00139cbc41a44ed01a80
[ "MIT" ]
null
null
null
# %% from pmlb import fetch_data from sklearn.preprocessing import StandardScaler from sklearn.model_selection import cross_val_predict, KFold from sklearn.metrics import mean_squared_error, roc_auc_score from tqdm import tqdm import pandas as pd import numpy as np from collections import defaultdict import warnings im...
35.513514
110
0.535769
from pmlb import fetch_data from sklearn.preprocessing import StandardScaler from sklearn.model_selection import cross_val_predict, KFold from sklearn.metrics import mean_squared_error, roc_auc_score from tqdm import tqdm import pandas as pd import numpy as np from collections import defaultdict import warnings import...
true
true
f71e80df92838cc46c6391213b7e32330e5f7bba
2,216
py
Python
count_calls/count_calls.py
chimicus/addons
0fa1110df999fc9a8622a12e00453fc67b62fce1
[ "BSD-3-Clause" ]
null
null
null
count_calls/count_calls.py
chimicus/addons
0fa1110df999fc9a8622a12e00453fc67b62fce1
[ "BSD-3-Clause" ]
6
2019-08-23T15:53:05.000Z
2021-07-14T08:24:06.000Z
count_calls/count_calls.py
chimicus/addons
0fa1110df999fc9a8622a12e00453fc67b62fce1
[ "BSD-3-Clause" ]
3
2019-11-04T12:02:11.000Z
2020-03-05T13:57:11.000Z
#! /usr/bin/env udb-automate import sys import textwrap from undodb.udb_launcher import ( REDIRECTION_COLLECT, UdbLauncher, ) def main(argv): # Get the arguments from the command line. try: recording, func_name = argv[1:] except ValueError: # Wrong number of arguments. pr...
31.657143
84
0.610108
import sys import textwrap from undodb.udb_launcher import ( REDIRECTION_COLLECT, UdbLauncher, ) def main(argv): try: recording, func_name = argv[1:] except ValueError: print("{} RECORDING_FILE FUNCTION_NAME".format(sys.argv[0])) raise SystemExit(1) l...
true
true
f71e8181713f3cb6ee3858ac80a6422e514e559e
17,192
py
Python
obswebsocket/events.py
SirCleric/obs-websocket-py
f04104ab1db7f9164d0d9fe9842232450fc72048
[ "MIT" ]
null
null
null
obswebsocket/events.py
SirCleric/obs-websocket-py
f04104ab1db7f9164d0d9fe9842232450fc72048
[ "MIT" ]
null
null
null
obswebsocket/events.py
SirCleric/obs-websocket-py
f04104ab1db7f9164d0d9fe9842232450fc72048
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- ### THIS FILE WAS GENERATED BY generate_classes.py - DO NOT EDIT ### ### (Generated on 2018-11-01 23:48:48.307368) ### from . import base_classes class SourceOrderChanged(base_classes.Baseevents): """Scene items have been reordered. :Returns: *name* ...
27.463259
109
0.627966
f.datain["sources"] = None def getName(self): return self.datain["name"] def getSources(self): return self.datain["sources"] class SceneItemTransformChanged(base_classes.Baseevents): def __init__(self): base_classes.Baseevents.__init__(self) self.name = "SceneItemTransf...
true
true
f71e81879e0d08f2be5ab349bd6798f8f04829fe
346
py
Python
AllRoutesLeadToRome/app.py
kkhan01/softdev
60c94919e8a5aba3db3d91849878057b8426cb4c
[ "MIT" ]
1
2020-05-02T01:41:06.000Z
2020-05-02T01:41:06.000Z
AllRoutesLeadToRome/app.py
kkhan01/softdev
60c94919e8a5aba3db3d91849878057b8426cb4c
[ "MIT" ]
null
null
null
AllRoutesLeadToRome/app.py
kkhan01/softdev
60c94919e8a5aba3db3d91849878057b8426cb4c
[ "MIT" ]
null
null
null
from flask import Flask app = Flask(__name__) @app.route('/') def display00(): return 'Heya! </br> This is the first page! </br> Others are at: /01 /02' @app.route('/01') def display01(): return 'And now: The second page!' @app.route('/02') def display02(): return 'Woah! The last page!' if __name__ == ...
18.210526
77
0.627168
from flask import Flask app = Flask(__name__) @app.route('/') def display00(): return 'Heya! </br> This is the first page! </br> Others are at: /01 /02' @app.route('/01') def display01(): return 'And now: The second page!' @app.route('/02') def display02(): return 'Woah! The last page!' if __name__ == ...
true
true
f71e822e91707a7d824f5756df17632036e10f8a
2,936
py
Python
Browser/keywords/promises.py
emanlove/robotframework-browser
8d9dae4301fe263bc0f7682de58a6bf299211382
[ "Apache-2.0" ]
null
null
null
Browser/keywords/promises.py
emanlove/robotframework-browser
8d9dae4301fe263bc0f7682de58a6bf299211382
[ "Apache-2.0" ]
null
null
null
Browser/keywords/promises.py
emanlove/robotframework-browser
8d9dae4301fe263bc0f7682de58a6bf299211382
[ "Apache-2.0" ]
null
null
null
# Copyright 2020- Robot Framework Foundation # # 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 ag...
36.7
92
0.641008
from concurrent.futures import Future, ThreadPoolExecutor from robot.api.deco import keyword from robot.libraries.BuiltIn import EXECUTION_CONTEXTS from ..base import LibraryComponent class Promises(LibraryComponent): def __init__(self, library): LibraryComponent.__init__(self, library...
true
true
f71e828d2972790e9832de08ed3694172916c5fe
6,556
py
Python
andres@programo.ual.es/bayesian_pca_DR.py
andresmasegosa/PRML-CoreSets
fb768debb15e3ff6f5b65b7224915a41c1493f3d
[ "MIT" ]
null
null
null
andres@programo.ual.es/bayesian_pca_DR.py
andresmasegosa/PRML-CoreSets
fb768debb15e3ff6f5b65b7224915a41c1493f3d
[ "MIT" ]
null
null
null
andres@programo.ual.es/bayesian_pca_DR.py
andresmasegosa/PRML-CoreSets
fb768debb15e3ff6f5b65b7224915a41c1493f3d
[ "MIT" ]
null
null
null
import numpy as np from prml.feature_extractions.pca import PCA from sklearn.cluster import KMeans, MiniBatchKMeans from sklearn.preprocessing import StandardScaler class BayesianPCA_DR(PCA): def _clusteringError(self, X, kmeans): sum = 0 for i in range(0, kmeans.cluster_centers_.shape[0]): ...
43.706667
143
0.575046
import numpy as np from prml.feature_extractions.pca import PCA from sklearn.cluster import KMeans, MiniBatchKMeans from sklearn.preprocessing import StandardScaler class BayesianPCA_DR(PCA): def _clusteringError(self, X, kmeans): sum = 0 for i in range(0, kmeans.cluster_centers_.shape[0]): ...
true
true
f71e836c03860d0845b884fe67b551b2e44b4a7b
2,858
py
Python
pycfmodel/model/resources/properties/security_group_ingress_prop.py
donatoaz/pycfmodel
1586e290b67d2347493dd4a77d2b0c8ee6c0936b
[ "Apache-2.0" ]
null
null
null
pycfmodel/model/resources/properties/security_group_ingress_prop.py
donatoaz/pycfmodel
1586e290b67d2347493dd4a77d2b0c8ee6c0936b
[ "Apache-2.0" ]
null
null
null
pycfmodel/model/resources/properties/security_group_ingress_prop.py
donatoaz/pycfmodel
1586e290b67d2347493dd4a77d2b0c8ee6c0936b
[ "Apache-2.0" ]
null
null
null
from ipaddress import IPv4Network, IPv6Network from typing import Optional from pydantic import validator from pycfmodel.constants import IPV4_ZERO_VALUE, IPV6_ZERO_VALUE from pycfmodel.model.resources.properties.property import Property from pycfmodel.model.types import ( ResolvableInt, ResolvableIntOrStr, ...
41.42029
176
0.728132
from ipaddress import IPv4Network, IPv6Network from typing import Optional from pydantic import validator from pycfmodel.constants import IPV4_ZERO_VALUE, IPV6_ZERO_VALUE from pycfmodel.model.resources.properties.property import Property from pycfmodel.model.types import ( ResolvableInt, ResolvableIntOrStr, ...
true
true
f71e85137e6e9b5019198c6010110150cbe49a78
34
py
Python
pycl/Code/readfilec.py
dcavar/dcavar.github.io
bf96820f41563bab73ba35a98142da4ab5ad50a1
[ "Apache-2.0" ]
4
2018-01-11T22:14:11.000Z
2019-06-13T09:56:18.000Z
pycl/Code/readfilec.py
dcavar/dcavar.github.io
bf96820f41563bab73ba35a98142da4ab5ad50a1
[ "Apache-2.0" ]
null
null
null
pycl/Code/readfilec.py
dcavar/dcavar.github.io
bf96820f41563bab73ba35a98142da4ab5ad50a1
[ "Apache-2.0" ]
1
2020-01-25T02:16:38.000Z
2020-01-25T02:16:38.000Z
print open("readfilec.py").read()
17
33
0.705882
print open("readfilec.py").read()
false
true
f71e8601ba5f31a1c9d2c21ca11533def0e76aa3
1,022
py
Python
nostradamus/apps/description_assessment/serializers.py
exactpro/nostradamus
80df847a012374ad2b702cc9f9c9cb46c1153ee7
[ "Apache-2.0" ]
25
2019-12-18T05:32:41.000Z
2022-03-23T12:16:49.000Z
nostradamus/apps/description_assessment/serializers.py
Exactpro/nostradamus
80df847a012374ad2b702cc9f9c9cb46c1153ee7
[ "Apache-2.0" ]
12
2018-12-24T14:56:50.000Z
2019-11-29T16:53:49.000Z
nostradamus/apps/description_assessment/serializers.py
exactpro/nostradamus
80df847a012374ad2b702cc9f9c9cb46c1153ee7
[ "Apache-2.0" ]
7
2019-12-18T05:32:43.000Z
2021-08-18T05:27:04.000Z
from rest_framework import serializers class DescriptionAssessmentResponseSerializer(serializers.Serializer): priority = serializers.ListField(child=serializers.CharField()) resolution = serializers.ListField(child=serializers.CharField()) areas_of_testing = serializers.ListField(child=serializers.CharFie...
36.5
76
0.811155
from rest_framework import serializers class DescriptionAssessmentResponseSerializer(serializers.Serializer): priority = serializers.ListField(child=serializers.CharField()) resolution = serializers.ListField(child=serializers.CharField()) areas_of_testing = serializers.ListField(child=serializers.CharFie...
true
true
f71e8612627c373ae43be44f6304eef90f1f77b7
3,431
py
Python
diarization/toys/gen_xvec_lbl.py
theScrabi/kaldi_voxceleb_pytorch
bce3f8c5506df0128dd87f6aff60f9924806f5b6
[ "MIT" ]
3
2020-04-06T06:33:19.000Z
2020-04-08T06:24:15.000Z
diarization/toys/gen_xvec_lbl.py
theScrabi/kaldi_voxceleb_pytorch
bce3f8c5506df0128dd87f6aff60f9924806f5b6
[ "MIT" ]
null
null
null
diarization/toys/gen_xvec_lbl.py
theScrabi/kaldi_voxceleb_pytorch
bce3f8c5506df0128dd87f6aff60f9924806f5b6
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import sys import numpy as np from math import floor if len(sys.argv) <= 3: print("gen_xvec_lbl.py <segments_file> <frame_size> <stride>") print("You need to enter the segments file") print("generated by generate_segments.py") print("Second and third parameter need to be") print...
31.477064
142
0.633926
import sys import numpy as np from math import floor if len(sys.argv) <= 3: print("gen_xvec_lbl.py <segments_file> <frame_size> <stride>") print("You need to enter the segments file") print("generated by generate_segments.py") print("Second and third parameter need to be") print("length and strad...
true
true
f71e8647524eb5aa1aee85b239a44b7b231aacd1
9,304
py
Python
tests/test_data_collator.py
WERimagin/transformers
cc7d14511c647f8147494df72f8b0575015e37ab
[ "Apache-2.0" ]
47
2021-04-16T22:29:25.000Z
2022-02-11T08:19:13.000Z
tests/test_data_collator.py
WERimagin/transformers
cc7d14511c647f8147494df72f8b0575015e37ab
[ "Apache-2.0" ]
12
2021-04-28T19:45:02.000Z
2021-08-31T13:56:02.000Z
tests/test_data_collator.py
WERimagin/transformers
cc7d14511c647f8147494df72f8b0575015e37ab
[ "Apache-2.0" ]
5
2021-04-28T21:54:15.000Z
2022-02-11T07:48:17.000Z
import unittest from transformers import AutoTokenizer, is_torch_available from transformers.testing_utils import require_torch, slow if is_torch_available(): import torch from transformers import ( DataCollatorForLanguageModeling, DataCollatorForNextSentencePrediction, DataCollatorF...
47.228426
109
0.677343
import unittest from transformers import AutoTokenizer, is_torch_available from transformers.testing_utils import require_torch, slow if is_torch_available(): import torch from transformers import ( DataCollatorForLanguageModeling, DataCollatorForNextSentencePrediction, DataCollatorF...
true
true
f71e87941ec4d26a71c4d0edea7028a110dd3419
1,040
py
Python
examples/tensorflow_example.py
lucko515/cnn-raccoon
e1c46544372751d82cc0c0f9cb2218d881a21f70
[ "Apache-2.0" ]
30
2021-01-08T11:50:54.000Z
2021-08-01T07:31:54.000Z
examples/tensorflow_example.py
lucko515/cnn-raccoon
e1c46544372751d82cc0c0f9cb2218d881a21f70
[ "Apache-2.0" ]
1
2021-01-24T23:10:38.000Z
2021-01-24T23:10:38.000Z
examples/tensorflow_example.py
lucko515/cnn-raccoon
e1c46544372751d82cc0c0f9cb2218d881a21f70
[ "Apache-2.0" ]
4
2021-01-08T11:21:30.000Z
2021-02-26T16:06:37.000Z
import tensorflow as tf model = tf.keras.models.Sequential([ # YOUR CODE HERE tf.keras.layers.BatchNormalization(input_shape=(32, 32, 3)), tf.keras.layers.Conv2D(filters=64, kernel_size=(3, 3), activation="relu"), tf.keras.layers.MaxPool2D(2, 2), tf.keras.layers.Conv2D(filters=6...
40
88
0.682692
import tensorflow as tf model = tf.keras.models.Sequential([ tf.keras.layers.BatchNormalization(input_shape=(32, 32, 3)), tf.keras.layers.Conv2D(filters=64, kernel_size=(3, 3), activation="relu"), tf.keras.layers.MaxPool2D(2, 2), tf.keras.layers.Conv2D(filters=64, kernel_size=(...
true
true
f71e879b585ccedee624c36d400debbe26d4a4ba
2,235
py
Python
chaospy/distributions/collection/f.py
krystophny/chaospy
e09f8e3f6dfc26145f15774edd5b03665140712f
[ "MIT" ]
1
2019-12-20T00:32:44.000Z
2019-12-20T00:32:44.000Z
chaospy/distributions/collection/f.py
QianWanghhu/chaospy
18ff6c4fc56c632825e53fb24e17de51a7febd7d
[ "MIT" ]
null
null
null
chaospy/distributions/collection/f.py
QianWanghhu/chaospy
18ff6c4fc56c632825e53fb24e17de51a7febd7d
[ "MIT" ]
null
null
null
"""(Non-central) F distribution.""" import numpy from scipy import special from ..baseclass import Dist from ..operators.addition import Add class f(Dist): """F distribution.""" def __init__(self, dfn, dfd, nc): Dist.__init__(self, dfn=dfn, dfd=dfd, nc=nc) def _pdf(self, x, dfn, dfd, nc): ...
33.358209
93
0.555257
import numpy from scipy import special from ..baseclass import Dist from ..operators.addition import Add class f(Dist): def __init__(self, dfn, dfd, nc): Dist.__init__(self, dfn=dfn, dfd=dfd, nc=nc) def _pdf(self, x, dfn, dfd, nc): n1, n2 = dfn, dfd term = -nc/2.+nc*n1*x/(2*(n2+n1*x...
true
true
f71e88c0491436f3ee784fb6beab57efad7201e5
7,966
py
Python
third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py
google-ar/chromium
2441c86a5fd975f09a6c30cddb57dfb7fc239699
[ "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
777
2017-08-29T15:15:32.000Z
2022-03-21T05:29:41.000Z
third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py
harrymarkovskiy/WebARonARCore
2441c86a5fd975f09a6c30cddb57dfb7fc239699
[ "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
66
2017-08-30T18:31:18.000Z
2021-08-02T10:59:35.000Z
third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py
harrymarkovskiy/WebARonARCore
2441c86a5fd975f09a6c30cddb57dfb7fc239699
[ "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
123
2017-08-30T01:19:34.000Z
2022-03-17T22:55:31.000Z
# Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
39.435644
122
0.63407
import io import optparse import unittest from webkitpy.common.system.system_host_mock import MockSystemHost from webkitpy.layout_tests.port import mock_drt from webkitpy.layout_tests.port import port_testcase from webkitpy.layout_tests.port import test from webkitpy.layout_tests.port.fact...
true
true
f71e88e8cd933bb1d1bfa245c1fa64a7035fb1eb
32
py
Python
helpers/__init__.py
Rensselaer-AI-Leage/GeneralizedGameServer
e6e97371ca5697bb4842911dbf0f961058f09b9e
[ "MIT" ]
null
null
null
helpers/__init__.py
Rensselaer-AI-Leage/GeneralizedGameServer
e6e97371ca5697bb4842911dbf0f961058f09b9e
[ "MIT" ]
1
2016-03-29T22:49:44.000Z
2016-03-29T22:58:04.000Z
helpers/__init__.py
Rensselaer-AI-League/GeneralizedGameServer
e6e97371ca5697bb4842911dbf0f961058f09b9e
[ "MIT" ]
null
null
null
__all__ = ["config", "message"]
16
31
0.625
__all__ = ["config", "message"]
true
true
f71e89961dbf08ac30188dfd72f19f86d8c382f3
1,626
py
Python
pydocmd/preprocessors/smart.py
vemel/pydoc-markdown
7cd22c2ec8110df5a67205b7a641581914d0b45a
[ "MIT" ]
1
2021-02-16T10:01:34.000Z
2021-02-16T10:01:34.000Z
pydocmd/preprocessors/smart.py
vemel/pydoc-markdown
7cd22c2ec8110df5a67205b7a641581914d0b45a
[ "MIT" ]
null
null
null
pydocmd/preprocessors/smart.py
vemel/pydoc-markdown
7cd22c2ec8110df5a67205b7a641581914d0b45a
[ "MIT" ]
null
null
null
from pydocmd.preprocessors.rst import Preprocessor as RSTPreprocessor from pydocmd.preprocessors.google import Preprocessor as GooglePreprocessor class Preprocessor(object): """ This class implements the preprocessor for restructured text and google. """ def __init__(self, config=None): self.c...
32.52
83
0.660517
from pydocmd.preprocessors.rst import Preprocessor as RSTPreprocessor from pydocmd.preprocessors.google import Preprocessor as GooglePreprocessor class Preprocessor(object): def __init__(self, config=None): self.config = config self._google_preprocessor = GooglePreprocessor(config) self._r...
true
true
f71e89bcea253798193ff85e6610a0a39c8656d1
21,687
py
Python
ucsmsdk/mometa/sw/SwAccessDomain.py
Kego/ucsmsdk
244f283a5c295cf746110bb96686d079b19927ce
[ "Apache-2.0" ]
78
2015-11-30T14:10:05.000Z
2022-02-13T00:29:08.000Z
ucsmsdk/mometa/sw/SwAccessDomain.py
Kego/ucsmsdk
244f283a5c295cf746110bb96686d079b19927ce
[ "Apache-2.0" ]
113
2015-11-20T09:42:46.000Z
2022-03-16T16:53:29.000Z
ucsmsdk/mometa/sw/SwAccessDomain.py
Kego/ucsmsdk
244f283a5c295cf746110bb96686d079b19927ce
[ "Apache-2.0" ]
86
2015-12-12T08:22:18.000Z
2022-01-23T03:56:34.000Z
"""This module contains the general information for SwAccessDomain ManagedObject.""" from ...ucsmo import ManagedObject from ...ucscoremeta import MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class SwAccessDomainConsts: FSM_PREV_DEPLOY_BEGIN = "DeployBegin" FSM_PREV_DEPLOY_FAIL = "DeployFail" ...
92.679487
3,774
0.763729
from ...ucsmo import ManagedObject from ...ucscoremeta import MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class SwAccessDomainConsts: FSM_PREV_DEPLOY_BEGIN = "DeployBegin" FSM_PREV_DEPLOY_FAIL = "DeployFail" FSM_PREV_DEPLOY_SUCCESS = "DeploySuccess" FSM_PREV_DEPLOY_UPDATE_CONNECTIVITY =...
true
true
f71e8a1667be90cf32f5b0d97e063dc0e58bd349
1,061
py
Python
venv/lib/python3.8/site-packages/vsts/project_analysis/v4_0/models/code_change_trend_item.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/vsts/project_analysis/v4_0/models/code_change_trend_item.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/vsts/project_analysis/v4_0/models/code_change_trend_item.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
2
2021-05-23T16:46:31.000Z
2021-05-26T23:51:09.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -----------------------------------------------------------------...
35.366667
95
0.462771
from msrest.serialization import Model class CodeChangeTrendItem(Model): _attribute_map = { 'time': {'key': 'time', 'type': 'iso-8601'}, 'value': {'key': 'value', 'type': 'int'} } def __init__(self, time=None, value=None): super(CodeChangeTrendItem, self).__in...
true
true
f71e8a720251ce2de0a066d3b179ea50b2fd4a45
4,594
py
Python
tencentcloud/ocr/v20181119/ocr_client.py
liangzhengkang/tencentcloud-sdk-python
c8f990b33f3701e04149a3d613538829a88269eb
[ "Apache-2.0" ]
null
null
null
tencentcloud/ocr/v20181119/ocr_client.py
liangzhengkang/tencentcloud-sdk-python
c8f990b33f3701e04149a3d613538829a88269eb
[ "Apache-2.0" ]
null
null
null
tencentcloud/ocr/v20181119/ocr_client.py
liangzhengkang/tencentcloud-sdk-python
c8f990b33f3701e04149a3d613538829a88269eb
[ "Apache-2.0" ]
1
2019-03-25T02:21:47.000Z
2019-03-25T02:21:47.000Z
# -*- coding: utf8 -*- # Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. 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...
42.146789
148
0.637135
import json from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException from tencentcloud.common.abstract_client import AbstractClient from tencentcloud.ocr.v20181119 import models class OcrClient(AbstractClient): _apiVersion = '2018-11-19' _endpoint = 'ocr.t...
true
true
f71e8ab3c51338680d4b08a028ea1ec34d4be34f
2,675
py
Python
wxviews/core/tests/pipes_tests.py
eumis/wxviews
7b3adffb119e480807276ea3149d878c3879baaf
[ "MIT" ]
6
2018-04-12T20:30:57.000Z
2020-03-25T12:57:00.000Z
wxviews/core/tests/pipes_tests.py
eumis/wxviews
7b3adffb119e480807276ea3149d878c3879baaf
[ "MIT" ]
null
null
null
wxviews/core/tests/pipes_tests.py
eumis/wxviews
7b3adffb119e480807276ea3149d878c3879baaf
[ "MIT" ]
null
null
null
from unittest.mock import Mock, call, patch from pytest import fixture, mark, fail from pyviews.core import XmlAttr from wxviews.core import pipes, WxRenderingContext from wxviews.core.pipes import apply_attributes, add_to_sizer from wxviews.widgets import WxNode class TestControl: def __init__(self): s...
29.722222
90
0.662804
from unittest.mock import Mock, call, patch from pytest import fixture, mark, fail from pyviews.core import XmlAttr from wxviews.core import pipes, WxRenderingContext from wxviews.core.pipes import apply_attributes, add_to_sizer from wxviews.widgets import WxNode class TestControl: def __init__(self): s...
true
true
f71e8b07ffd796c578661e541401ebb3b60cb3f3
4,489
py
Python
tests/test_estimators.py
amgrigoriev/daal4py
97fbe7a9181410dac348dc724178e8605492e3c4
[ "Apache-2.0" ]
null
null
null
tests/test_estimators.py
amgrigoriev/daal4py
97fbe7a9181410dac348dc724178e8605492e3c4
[ "Apache-2.0" ]
null
null
null
tests/test_estimators.py
amgrigoriev/daal4py
97fbe7a9181410dac348dc724178e8605492e3c4
[ "Apache-2.0" ]
null
null
null
#******************************************************************************* # Copyright 2014-2020 Intel Corporation # All Rights Reserved. # # This software is licensed under the Apache License, Version 2.0 (the # "License"), the following terms apply: # # You may not use this file except in compliance with the Li...
35.626984
118
0.676543
import unittest from sklearn.utils.estimator_checks import check_estimator import sklearn.utils.estimator_checks from daal4py import __daal_run_version__ daal_run_version = tuple(map(int, (__daal_run_version__[0:4], __daal_run_version__[4:8]))) from daal4py.sklearn.neighbors import KNeighborsClassi...
true
true
f71e8b1a591ecfd26ed606bf4d5a7a7fd8179642
783
py
Python
glue_vispy_viewers/extern/vispy/io/__init__.py
jzuhone/glue-vispy-viewers
d940705f4ba95f8d7a9a74d37fb68c71080b490a
[ "BSD-2-Clause" ]
3
2018-05-09T17:55:53.000Z
2019-07-22T09:14:41.000Z
glue_vispy_viewers/extern/vispy/io/__init__.py
jzuhone/glue-vispy-viewers
d940705f4ba95f8d7a9a74d37fb68c71080b490a
[ "BSD-2-Clause" ]
9
2017-04-07T01:44:15.000Z
2018-12-16T20:47:08.000Z
graphViz/vispy/io/__init__.py
onecklam/ethereum-graphviz
6993accf0cb85e23013bf7ae6b04145724a6dbd2
[ "Apache-2.0" ]
1
2021-09-15T08:52:26.000Z
2021-09-15T08:52:26.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. """ Utilities related to data reading, writing, fetching, and generation. """ from os import path as _op from .datasets import (load_iris, load_crate, load_data_file, # noq...
34.043478
75
0.659004
from os import path as _op from .datasets import (load_iris, load_crate, load_data_file, load_spatial_filters) from .mesh import read_mesh, write_mesh from .image import (read_png, write_png, imread, imsave, _make_png, _check_img_lib) _data_dir = _op.join(_op....
true
true
f71e8b9167da6ce9a96bc811cf78357b138536ca
2,654
py
Python
dfp/create_creatives.py
togetter/dfp-prebid-setup
a9d0b2c60558c9b561de430a4f0b191996c98da0
[ "MIT" ]
null
null
null
dfp/create_creatives.py
togetter/dfp-prebid-setup
a9d0b2c60558c9b561de430a4f0b191996c98da0
[ "MIT" ]
null
null
null
dfp/create_creatives.py
togetter/dfp-prebid-setup
a9d0b2c60558c9b561de430a4f0b191996c98da0
[ "MIT" ]
null
null
null
import logging import os import pprint from googleads import ad_manager from dfp.client import get_client logger = logging.getLogger(__name__) def create_creatives(creatives): """ Creates creatives in DFP. Args: creatives (arr): an array of objects, each a creative configuration Returns: an array...
26.54
104
0.708365
import logging import os import pprint from googleads import ad_manager from dfp.client import get_client logger = logging.getLogger(__name__) def create_creatives(creatives): dfp_client = get_client() creative_service = dfp_client.GetService('CreativeService', version='v201811') creatives = creative_se...
true
true
f71e8d1c9a2ded59f56da7cb9494713a1bd65190
354
py
Python
pwgen.py
anokata/pythonPetProjects
245c3ff11ae560b17830970061d8d60013948fd7
[ "MIT" ]
3
2017-04-30T17:44:53.000Z
2018-02-03T06:02:11.000Z
pwgen.py
anokata/pythonPetProjects
245c3ff11ae560b17830970061d8d60013948fd7
[ "MIT" ]
10
2021-03-18T20:17:19.000Z
2022-03-11T23:14:19.000Z
pwgen.py
anokata/pythonPetProjects
245c3ff11ae560b17830970061d8d60013948fd7
[ "MIT" ]
null
null
null
for a in range(10): for b in range(10): for c in range(10): for d in range(10): for e in range(10): for f in range(10): for g in range(10): for h in range(10): print("{}{}{}{}{...
35.4
81
0.347458
for a in range(10): for b in range(10): for c in range(10): for d in range(10): for e in range(10): for f in range(10): for g in range(10): for h in range(10): print("{}{}{}{}{...
true
true
f71e8e3cc6255da0daeb05d09e65a982f946b838
521
py
Python
elements/python/11/1/soln.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
11
2019-02-08T06:54:34.000Z
2021-08-07T18:57:39.000Z
elements/python/11/1/soln.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
1
2019-05-21T08:14:10.000Z
2019-05-21T08:14:10.000Z
elements/python/11/1/soln.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
null
null
null
import heapq import random def merge(lists): heapq.heapify(lists) m = [] while len(lists) > 0: l = heapq.heappop(lists) if len(l) == 0: continue m.append(l.pop(0)) heapq.heappush(lists, l) return m def test(n, k): lists = [[] for _ in xrange(k)] fo...
16.28125
44
0.539347
import heapq import random def merge(lists): heapq.heapify(lists) m = [] while len(lists) > 0: l = heapq.heappop(lists) if len(l) == 0: continue m.append(l.pop(0)) heapq.heappush(lists, l) return m def test(n, k): lists = [[] for _ in xrange(k)] fo...
false
true
f71e8ea85b6b54c6670609e8e6c0a91688ec4952
87
py
Python
pyjswidgets/pyjamas/XMLDoc.py
takipsizad/pyjs
54db0ba6747aca744f9f3c3e985a17e913dfb951
[ "ECL-2.0", "Apache-2.0" ]
739
2015-01-01T02:05:11.000Z
2022-03-30T15:26:16.000Z
pyjswidgets/pyjamas/XMLDoc.py
takipsizad/pyjs
54db0ba6747aca744f9f3c3e985a17e913dfb951
[ "ECL-2.0", "Apache-2.0" ]
33
2015-03-25T23:17:04.000Z
2021-08-19T08:25:22.000Z
pyjswidgets/pyjamas/XMLDoc.py
takipsizad/pyjs
54db0ba6747aca744f9f3c3e985a17e913dfb951
[ "ECL-2.0", "Apache-2.0" ]
167
2015-01-01T22:27:47.000Z
2022-03-17T13:29:19.000Z
from __pyjamas__ import get_main_frame, JS def create_xml_doc(text): return None
14.5
42
0.781609
from __pyjamas__ import get_main_frame, JS def create_xml_doc(text): return None
true
true
f71e8f3a720d0140da369b16a9db389ed78c68db
1,016
py
Python
mak/libs/ircc/ir_grammar/ir_opcodes/ir_vector.py
bugengine/BugEngine
1b3831d494ee06b0bd74a8227c939dd774b91226
[ "BSD-3-Clause" ]
4
2015-05-13T16:28:36.000Z
2017-05-24T15:34:14.000Z
mak/libs/ircc/ir_grammar/ir_opcodes/ir_vector.py
bugengine/BugEngine
1b3831d494ee06b0bd74a8227c939dd774b91226
[ "BSD-3-Clause" ]
null
null
null
mak/libs/ircc/ir_grammar/ir_opcodes/ir_vector.py
bugengine/BugEngine
1b3831d494ee06b0bd74a8227c939dd774b91226
[ "BSD-3-Clause" ]
1
2017-03-21T08:28:07.000Z
2017-03-21T08:28:07.000Z
from ...ir_ast.instructions import IrInstExtractElement, IrInstInsertElement, IrInstShuffleVector from be_typing import TYPE_CHECKING def p_ir_opcode_vector_extract(p): # type: (YaccProduction) -> None """ ir-opcode : ir-instruction-assignment EXTRACTELEMENT ir-value COMMA ir-value ir-instruction-atta...
33.866667
129
0.694882
from ...ir_ast.instructions import IrInstExtractElement, IrInstInsertElement, IrInstShuffleVector from be_typing import TYPE_CHECKING def p_ir_opcode_vector_extract(p): p[0] = IrInstExtractElement(p[1], p[3], p[5], p[6]) def p_ir_opcode_vector_insert(p): p[0] = IrInstInsertElement(p[1], p[3], p[5]...
true
true
f71e8f9b1530c92926a1479f24db743c1cf1dcfc
3,414
py
Python
modules/boost/simd/predicates/script/is_eqz.py
timblechmann/nt2
6c71f7063ca4e5975c9c019877e6b2fe07c9e4ce
[ "BSL-1.0" ]
2
2016-09-14T00:23:53.000Z
2018-01-14T12:51:18.000Z
modules/boost/simd/predicates/script/is_eqz.py
timblechmann/nt2
6c71f7063ca4e5975c9c019877e6b2fe07c9e4ce
[ "BSL-1.0" ]
null
null
null
modules/boost/simd/predicates/script/is_eqz.py
timblechmann/nt2
6c71f7063ca4e5975c9c019877e6b2fe07c9e4ce
[ "BSL-1.0" ]
null
null
null
[ ## this file was manually modified by jt { 'functor' : { 'description' : ['Returns True<result_type>() or False<result_type>() according a0 is zero or not.'], 'module' : 'boost', 'arity' : '1', 'call_types' : [], 'ret_arity' : '0', 'rturn' : { ...
48.771429
110
0.411541
[ cription' : ['Returns True<result_type>() or False<result_type>() according a0 is zero or not.'], 'module' : 'boost', 'arity' : '1', 'call_types' : [], 'ret_arity' : '0', 'rturn' : { 'default' : 'typename boost::simd::meta::as_logical<T>::type', },...
true
true
f71e91cc662cdd088a323256c7ea4e2c01a5e589
4,175
py
Python
st2common/st2common/transport/utils.py
benmcbenben/st2
f067176640d86924b99bc035c2eb9aabe3b3a734
[ "Apache-2.0" ]
null
null
null
st2common/st2common/transport/utils.py
benmcbenben/st2
f067176640d86924b99bc035c2eb9aabe3b3a734
[ "Apache-2.0" ]
null
null
null
st2common/st2common/transport/utils.py
benmcbenben/st2
f067176640d86924b99bc035c2eb9aabe3b3a734
[ "Apache-2.0" ]
null
null
null
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
34.791667
98
0.679281
from __future__ import absolute_import import ssl as ssl_lib from oslo_config import cfg from kombu import Connection from st2common import log as logging __all__ = [ 'get_connection', 'get_messaging_urls' ] LOG = logging.getLogger(__name__) def get_messaging_urls(): if cfg.CONF.messa...
true
true
f71e9293b1b22dfe1dd09dc3be56a2df0b029670
2,578
py
Python
info/Modules/index/views.py
xihuaxone/NewsWeb
d6f0b7f854a9b21619c81d6c736c5f084c572dc2
[ "MIT" ]
null
null
null
info/Modules/index/views.py
xihuaxone/NewsWeb
d6f0b7f854a9b21619c81d6c736c5f084c572dc2
[ "MIT" ]
null
null
null
info/Modules/index/views.py
xihuaxone/NewsWeb
d6f0b7f854a9b21619c81d6c736c5f084c572dc2
[ "MIT" ]
null
null
null
# encoding=utf-8 from flask import Blueprint, make_response, render_template, current_app, session, jsonify, g from flask import session, request import math from info.utils.response_code import RET from info.models import * from info import constants from info.utils.common import LoginUser, RankList blue = Blueprin...
27.72043
148
0.669123
from flask import Blueprint, make_response, render_template, current_app, session, jsonify, g from flask import session, request import math from info.utils.response_code import RET from info.models import * from info import constants from info.utils.common import LoginUser, RankList blue = Blueprint('blue1', __nam...
true
true
f71e9396e107a5d1eba85299cfd4f19d90e0a5d8
3,987
py
Python
tests/unit/test_gff3_parser.py
dcolligan/ga4gh-server
dd0b00a52de9684609b7f04a9d70946c36afa8a5
[ "Apache-2.0" ]
83
2015-01-05T22:21:11.000Z
2017-02-20T01:25:28.000Z
tests/unit/test_gff3_parser.py
dcolligan/ga4gh-server
dd0b00a52de9684609b7f04a9d70946c36afa8a5
[ "Apache-2.0" ]
1,508
2015-01-02T14:06:12.000Z
2017-03-08T19:49:18.000Z
tests/unit/test_gff3_parser.py
dcolligan/ga4gh-server
dd0b00a52de9684609b7f04a9d70946c36afa8a5
[ "Apache-2.0" ]
99
2015-01-14T20:48:56.000Z
2017-03-08T18:35:06.000Z
""" GFF3 parser unit tests. """ from __future__ import division from __future__ import print_function from __future__ import unicode_literals import ga4gh.server.gff3 as gff3 import unittest _testDataDir = "tests/data/datasets/dataset1/sequenceAnnotations/" class TestGff3ParserOnTypicalFile(unittest.TestCase): ...
38.336538
79
0.676198
from __future__ import division from __future__ import print_function from __future__ import unicode_literals import ga4gh.server.gff3 as gff3 import unittest _testDataDir = "tests/data/datasets/dataset1/sequenceAnnotations/" class TestGff3ParserOnTypicalFile(unittest.TestCase): def setUp(self): testDat...
true
true
f71e939873aac156dae8e715c3fca52635645354
13,575
py
Python
dlex/datasets/nlp/utils.py
dvtrung/dl-torch
b49e57d10d32bb223e2d7643f2579ccc32c63a9a
[ "MIT" ]
null
null
null
dlex/datasets/nlp/utils.py
dvtrung/dl-torch
b49e57d10d32bb223e2d7643f2579ccc32c63a9a
[ "MIT" ]
null
null
null
dlex/datasets/nlp/utils.py
dvtrung/dl-torch
b49e57d10d32bb223e2d7643f2579ccc32c63a9a
[ "MIT" ]
null
null
null
"""NLP Dataset""" import os import re from typing import List, Union, Dict, Tuple import nltk import unicodedata import numpy as np from dlex.configs import ModuleConfigs from dlex.utils.logging import logger # nltk.download('punkt') # Turn a Unicode string to plain ASCII, thanks to # https://stack...
31.49652
115
0.550571
import os import re from typing import List, Union, Dict, Tuple import nltk import unicodedata import numpy as np from dlex.configs import ModuleConfigs from dlex.utils.logging import logger def unicodeToAscii(s): return ''.join( c for c in unicodedata.normalize('NFD', s) ...
true
true
f71e93dc1e8f76e4a04e77f4cc3875792895275e
2,360
py
Python
src/processData.py
mabelzunce/PETAtlases
438276ff06a8f2f61eb506e5f0e28a257c85d9aa
[ "MIT" ]
null
null
null
src/processData.py
mabelzunce/PETAtlases
438276ff06a8f2f61eb506e5f0e28a257c85d9aa
[ "MIT" ]
null
null
null
src/processData.py
mabelzunce/PETAtlases
438276ff06a8f2f61eb506e5f0e28a257c85d9aa
[ "MIT" ]
null
null
null
#! python3 from __future__ import print_function import SimpleITK as sitk import ImageRegistration as reg import numpy as np import sys import os outputPath = "D:\\Martin\\Personal\\UNSAM\\CursoNeuroimagenes\\TrabajosFinales\\NicolasFuentes\\ADNI\\002_S_5018\\RegisteredData\\" if not os.path.exists(outputPa...
53.636364
272
0.806356
from __future__ import print_function import SimpleITK as sitk import ImageRegistration as reg import numpy as np import sys import os outputPath = "D:\\Martin\\Personal\\UNSAM\\CursoNeuroimagenes\\TrabajosFinales\\NicolasFuentes\\ADNI\\002_S_5018\\RegisteredData\\" if not os.path.exists(outputPath): o...
true
true
f71e943cd279890286dde5c70ab1018c6adc2ce4
4,541
py
Python
allennlp/tests/data/fields/sequence_label_field_test.py
annaproxy/udify-metalearning
55206a3aac0aba74a3615a36192d03b6467cfd6f
[ "MIT" ]
65
2020-11-13T05:36:29.000Z
2022-03-26T22:45:46.000Z
allennlp/tests/data/fields/sequence_label_field_test.py
annaproxy/udify-metalearning
55206a3aac0aba74a3615a36192d03b6467cfd6f
[ "MIT" ]
11
2021-05-26T16:22:17.000Z
2022-03-02T04:03:18.000Z
allennlp/tests/data/fields/sequence_label_field_test.py
annaproxy/udify-metalearning
55206a3aac0aba74a3615a36192d03b6467cfd6f
[ "MIT" ]
10
2019-12-06T11:32:37.000Z
2022-01-06T15:39:09.000Z
# pylint: disable=no-self-use,invalid-name from collections import defaultdict import pytest import numpy from allennlp.common.checks import ConfigurationError from allennlp.common.testing import AllenNlpTestCase from allennlp.data import Token, Vocabulary from allennlp.data.fields import TextField, SequenceLabelFiel...
45.868687
102
0.679366
from collections import defaultdict import pytest import numpy from allennlp.common.checks import ConfigurationError from allennlp.common.testing import AllenNlpTestCase from allennlp.data import Token, Vocabulary from allennlp.data.fields import TextField, SequenceLabelField from allennlp.data.token_indexers import...
true
true
f71e947b79357afd20224cfeefc521067a15de20
476
py
Python
setup.py
CampbellCrowley/bplot
b5e5080cdcdc9c4d3e5114c13702cbb2f49fbb8c
[ "BSD-3-Clause" ]
null
null
null
setup.py
CampbellCrowley/bplot
b5e5080cdcdc9c4d3e5114c13702cbb2f49fbb8c
[ "BSD-3-Clause" ]
null
null
null
setup.py
CampbellCrowley/bplot
b5e5080cdcdc9c4d3e5114c13702cbb2f49fbb8c
[ "BSD-3-Clause" ]
null
null
null
from setuptools import setup setup( name="bplot", version="0.2", description="Functional plotting.", url="http://github.com/roualdes/bplot", author="Edward A. Roualdes", author_email="eroualdes@csuchico.edu", license="BSD (3-clause)", install_requires=[ "matplotlib>=3.0.0", ...
22.666667
43
0.573529
from setuptools import setup setup( name="bplot", version="0.2", description="Functional plotting.", url="http://github.com/roualdes/bplot", author="Edward A. Roualdes", author_email="eroualdes@csuchico.edu", license="BSD (3-clause)", install_requires=[ "matplotlib>=3.0.0", ...
true
true
f71e949573678c6e993f1d29898b3f2046e7012c
1,912
py
Python
imap_tools/errors.py
unqx/imap_tools
7f8fd5e4f3976bbd2efa507843c577affa61d996
[ "Apache-2.0" ]
344
2017-05-31T09:45:41.000Z
2022-03-31T18:32:16.000Z
imap_tools/errors.py
unqx/imap_tools
7f8fd5e4f3976bbd2efa507843c577affa61d996
[ "Apache-2.0" ]
153
2017-07-26T07:49:06.000Z
2022-03-31T16:43:52.000Z
imap_tools/errors.py
unqx/imap_tools
7f8fd5e4f3976bbd2efa507843c577affa61d996
[ "Apache-2.0" ]
53
2018-12-06T05:49:14.000Z
2022-02-19T12:42:56.000Z
class ImapToolsError(Exception): """Base lib error""" class MailboxFolderStatusValueError(ImapToolsError): """Wrong folder status value error""" class UnexpectedCommandStatusError(ImapToolsError): """Unexpected status in IMAP command response""" def __init__(self, command_result: tuple, expected: s...
21.010989
93
0.769874
class ImapToolsError(Exception): class MailboxFolderStatusValueError(ImapToolsError): class UnexpectedCommandStatusError(ImapToolsError): def __init__(self, command_result: tuple, expected: str): self.command_result = command_result self.expected = expected def __str__(self): retur...
true
true
f71e9497bcf482a547136061650f08ce8c27aa78
345
py
Python
app/__init__.py
gordinmitya/tgnotifierbot
200a27bc0ee63dcb74018f30cc5e855d8b30cda8
[ "MIT" ]
null
null
null
app/__init__.py
gordinmitya/tgnotifierbot
200a27bc0ee63dcb74018f30cc5e855d8b30cda8
[ "MIT" ]
null
null
null
app/__init__.py
gordinmitya/tgnotifierbot
200a27bc0ee63dcb74018f30cc5e855d8b30cda8
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 def api(environ, start_response): """Simplest possible application object""" data = b'{"code": 200}\n' status = '200 OK' response_headers = [ ('Content-type', 'application/json'), ('Content-Length', str(len(data))) ] start_response(status, response_headers...
28.75
46
0.623188
def api(environ, start_response): data = b'{"code": 200}\n' status = '200 OK' response_headers = [ ('Content-type', 'application/json'), ('Content-Length', str(len(data))) ] start_response(status, response_headers) return iter([data])
true
true
f71e99704e778f9397e5fa8db226d45e87f41161
19,241
py
Python
cinder/zonemanager/drivers/cisco/cisco_fc_zone_client_cli.py
yanheven/cinder
89797971f30d547acbf715fea099c52d90966d1f
[ "Apache-2.0" ]
null
null
null
cinder/zonemanager/drivers/cisco/cisco_fc_zone_client_cli.py
yanheven/cinder
89797971f30d547acbf715fea099c52d90966d1f
[ "Apache-2.0" ]
null
null
null
cinder/zonemanager/drivers/cisco/cisco_fc_zone_client_cli.py
yanheven/cinder
89797971f30d547acbf715fea099c52d90966d1f
[ "Apache-2.0" ]
null
null
null
# (c) Copyright 2014 Cisco Systems Inc. # 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 # # Unl...
39.754132
79
0.521958
import random import re from eventlet import greenthread from oslo_concurrency import processutils from oslo_log import log as logging from oslo_utils import excutils import six from cinder import exception from cinder.i18n import _, _LE, _LI from cinder import ssh_utils from cinder import utils impo...
true
true
f71e99cda0f1de1255e911ccc3a8bdebb2c5f5b9
3,846
py
Python
plugins/modules/netbox_manufacturer.py
FragmentedPacket/netbox_modules
608b387eb0d3af8a29222905a4ff19515f006a88
[ "MIT" ]
38
2019-08-28T18:43:20.000Z
2020-01-09T15:51:34.000Z
plugins/modules/netbox_manufacturer.py
FragmentedPacket/netbox_modules
608b387eb0d3af8a29222905a4ff19515f006a88
[ "MIT" ]
24
2019-09-11T03:46:35.000Z
2019-12-17T06:25:20.000Z
plugins/modules/netbox_manufacturer.py
FragmentedPacket/netbox_modules
608b387eb0d3af8a29222905a4ff19515f006a88
[ "MIT" ]
9
2019-09-20T12:27:39.000Z
2020-01-09T03:12:27.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Mikhail Yohman (@FragmentedPacket) <mikhail.yohman@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATI...
26.895105
92
0.642226
from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = r""" --- module: netbox_manufacturer short_description: Create or delete manufacturers within NetBox description: - Creates or removes manufacturers from NetBox notes: - Tags should be defined as a YAML list...
true
true
f71e9b85f8f4af462b5dcd665e455ebdbab39bbd
7,950
py
Python
tensorpack/dataflow/dataset/ilsvrc.py
andrewliao11/Andrew_tensorpack
735a2672e3d93b5b612a303b5b6d222e9b2d4280
[ "Apache-2.0" ]
1
2018-03-23T16:26:23.000Z
2018-03-23T16:26:23.000Z
tensorpack/dataflow/dataset/ilsvrc.py
andrewliao11/Andrew_tensorpack
735a2672e3d93b5b612a303b5b6d222e9b2d4280
[ "Apache-2.0" ]
null
null
null
tensorpack/dataflow/dataset/ilsvrc.py
andrewliao11/Andrew_tensorpack
735a2672e3d93b5b612a303b5b6d222e9b2d4280
[ "Apache-2.0" ]
2
2017-12-16T04:23:35.000Z
2021-03-04T23:44:13.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: ilsvrc.py # Author: Yuxin Wu <ppwwyyxxc@gmail.com> import os import tarfile import cv2 import numpy as np from six.moves import range import xml.etree.ElementTree as ET from ...utils import logger, get_rng, get_dataset_path from ...utils.loadcaffe import get_caffe_...
34.868421
103
0.550692
import os import tarfile import cv2 import numpy as np from six.moves import range import xml.etree.ElementTree as ET from ...utils import logger, get_rng, get_dataset_path from ...utils.loadcaffe import get_caffe_pb from ...utils.fs import mkdir_p, download from ...utils.timer import timed_operation from ..base i...
true
true
f71e9c66cde7730f1b239e26a61bd195378915a1
8,835
py
Python
app/clean_test_app.py
droyston/spectralize
572770e7358acc3ec433470659759c17453409f2
[ "MIT" ]
null
null
null
app/clean_test_app.py
droyston/spectralize
572770e7358acc3ec433470659759c17453409f2
[ "MIT" ]
null
null
null
app/clean_test_app.py
droyston/spectralize
572770e7358acc3ec433470659759c17453409f2
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Jun 18 18:54:48 2020 @author: dylanroyston """ # -*- coding: utf-8 -*- # import packages #import dash_player import dash import dash_table import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Out...
26.216617
101
0.603509
import dash import dash_table import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output, State import psycopg2 import os import pandas as pd import numpy as np import plotly import plotly.express as px import plotly.graph_objects as go import librosa impo...
true
true
f71e9d55e1ce3fe397a614f51b15c10f303d5fcd
2,491
py
Python
cogs/idk.py
Mr-Owllers/owll
4753ec57429dbf06da0850a40ddd0ba7c8964bc6
[ "MIT" ]
1
2022-01-12T17:11:10.000Z
2022-01-12T17:11:10.000Z
cogs/idk.py
Mr-Owllers/owll
4753ec57429dbf06da0850a40ddd0ba7c8964bc6
[ "MIT" ]
null
null
null
cogs/idk.py
Mr-Owllers/owll
4753ec57429dbf06da0850a40ddd0ba7c8964bc6
[ "MIT" ]
null
null
null
import discord from discord.ext import commands import aiohttp hug = ["https://c.tenor.com/bFZKN-tlQP4AAAAC/love-you-my-best-friend.gif", "https://c.tenor.com/KlkE8vt8gOIAAAAM/love-is-the-answer-to-everything-hug.gif", "https://c.tenor.com/OkpKo5iPu-8AAAAM/huge-hug.gif", "https://c.tenor.com/BW8ZMOHHrgMAAAAM/friends-jo...
44.482143
480
0.594942
import discord from discord.ext import commands import aiohttp hug = ["https://c.tenor.com/bFZKN-tlQP4AAAAC/love-you-my-best-friend.gif", "https://c.tenor.com/KlkE8vt8gOIAAAAM/love-is-the-answer-to-everything-hug.gif", "https://c.tenor.com/OkpKo5iPu-8AAAAM/huge-hug.gif", "https://c.tenor.com/BW8ZMOHHrgMAAAAM/friends-jo...
true
true
f71e9e447882fb2e25d1fc3c1cdbf309c949b7a8
7,334
py
Python
pychron/hardware/gauges/base_controller.py
ASUPychron/pychron
dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76
[ "Apache-2.0" ]
31
2016-03-07T02:38:17.000Z
2022-02-14T18:23:43.000Z
pychron/hardware/gauges/base_controller.py
ASUPychron/pychron
dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76
[ "Apache-2.0" ]
1,626
2015-01-07T04:52:35.000Z
2022-03-25T19:15:59.000Z
pychron/hardware/gauges/base_controller.py
UIllinoisHALPychron/pychron
f21b79f4592a9fb9dc9a4cb2e4e943a3885ededc
[ "Apache-2.0" ]
26
2015-05-23T00:10:06.000Z
2022-03-07T16:51:57.000Z
# =============================================================================== # Copyright 2017 ross # # 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/LICE...
33.036036
86
0.504363
from traits.api import HasTraits, List, Str, Float, Int from traitsui.api import View, HGroup, Item, Group, InstanceEditor, ListEditor from pychron.core.ui.color_map_bar_editor import BarGaugeEditor from pychron.graph.time_series_graph import TimeSeriesStreamStackedGraph class BaseGauge(HasTraits): ...
true
true
f71e9ef1b07ffec34348f9fc349bdc12ee2c9d58
2,061
py
Python
tanuki/history/views.py
addisonmaupin/capstone2020
cf8c8e7336aa9866859349838e4f42bc6831679c
[ "MIT" ]
null
null
null
tanuki/history/views.py
addisonmaupin/capstone2020
cf8c8e7336aa9866859349838e4f42bc6831679c
[ "MIT" ]
9
2021-03-19T14:50:48.000Z
2022-03-12T00:47:25.000Z
tanuki/history/views.py
pabsromo/capstone2020
cf8c8e7336aa9866859349838e4f42bc6831679c
[ "MIT" ]
null
null
null
from django.shortcuts import render from django import template register = template.Library() from django.contrib.auth.decorators import login_required import json from django.core.serializers.json import DjangoJSONEncoder from django.forms.models import model_to_dict from overview.models import AddItem from overview....
34.932203
88
0.585153
from django.shortcuts import render from django import template register = template.Library() from django.contrib.auth.decorators import login_required import json from django.core.serializers.json import DjangoJSONEncoder from django.forms.models import model_to_dict from overview.models import AddItem from overview....
true
true
f71e9f4ae8aeaa716d941ad00f7fd5c17c49b75c
1,182
py
Python
test/test_files/pylops/examples/plot_imag.py
SoftwareUnderstanding/inspect4py
9c4d7252535082ad938b26baf281d93f3a27285e
[ "BSD-3-Clause" ]
2
2022-02-15T20:30:57.000Z
2022-03-17T00:50:37.000Z
test/test_files/pylops/examples/plot_imag.py
SoftwareUnderstanding/code_inspector
a820b5a7bb18f5df9c3e79346108d8280b20c39a
[ "BSD-3-Clause" ]
101
2021-06-09T14:19:59.000Z
2022-01-24T13:24:39.000Z
test/test_files/pylops/examples/plot_imag.py
SoftwareUnderstanding/inspect4py
9c4d7252535082ad938b26baf281d93f3a27285e
[ "BSD-3-Clause" ]
1
2021-09-22T06:59:32.000Z
2021-09-22T06:59:32.000Z
""" Imag ==== This example shows how to use the :py:class:`pylops.basicoperators.Imag` operator. This operator returns the imaginary part of the data as a real value in forward mode, and the real part of the model as an imaginary value in adjoint mode (with zero real part). """ import numpy as np import matplotlib.pyp...
27.488372
79
0.643824
import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec as pltgs import pylops plt.close('all')
true
true
f71e9fc678e62a608c02041f6e0914f9fcbec0c2
674
py
Python
test/test_tensorboard.py
ethan4335/pytorch-YOLOv4
44f67130d83fc2949efb50afe67337735836169b
[ "Apache-2.0" ]
null
null
null
test/test_tensorboard.py
ethan4335/pytorch-YOLOv4
44f67130d83fc2949efb50afe67337735836169b
[ "Apache-2.0" ]
null
null
null
test/test_tensorboard.py
ethan4335/pytorch-YOLOv4
44f67130d83fc2949efb50afe67337735836169b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ __title__ = 'pytorch-YOLOv4' __author__ = 'deagle' __date__ = '11/23/2020 11:30' # code is far away from bugs with the god animal protecting I love animals. They taste delicious. """ import datetime from tensorboardX import SummaryWriter def main(): from tenso...
23.241379
59
0.663205
import datetime from tensorboardX import SummaryWriter def main(): from tensorboardX import SummaryWriter writer = SummaryWriter() x = range(100) for i in x: writer.add_scalar('y=2x', i * 2, i) writer.close() if __name__ == '__main__': start_time = datetime.datetime.now() main(...
true
true
f71e9fdd77eb43e16314dd553b822f51a7dab59b
3,213
py
Python
enCount/tests/gtfs.py
mstrazar/enCount
dcff565ce96afe37aa8a41995637d00cce02360d
[ "MIT" ]
null
null
null
enCount/tests/gtfs.py
mstrazar/enCount
dcff565ce96afe37aa8a41995637d00cce02360d
[ "MIT" ]
null
null
null
enCount/tests/gtfs.py
mstrazar/enCount
dcff565ce96afe37aa8a41995637d00cce02360d
[ "MIT" ]
null
null
null
# coding=utf-8 import os import enCount.gtfs as gtfs import enCount.db as db import enCount.queues as queue from enCount.config import genomes_root import datetime import unittest import time # Mock system calls from mock import Mock gtfs.rnastar.sp_call = Mock(return_value=0) gtfs.get_version_before = Mock(return_va...
33.123711
98
0.659197
import os import enCount.gtfs as gtfs import enCount.db as db import enCount.queues as queue from enCount.config import genomes_root import datetime import unittest import time from mock import Mock gtfs.rnastar.sp_call = Mock(return_value=0) gtfs.get_version_before = Mock(return_value="chM") class TestGtfs(unitte...
true
true
f71ea15a3576fb6c010db825bd3096593169e5a3
1,999
py
Python
apps/fithm-service/apps/model/models.py
sergio1221/flask-backend
11a9e0db5b5e664fcc820919d97039738176ac62
[ "BSD-3-Clause" ]
3
2022-03-04T03:05:55.000Z
2022-03-04T09:02:32.000Z
apps/fithm-service/apps/model/models.py
sergio1221/flask-backend
11a9e0db5b5e664fcc820919d97039738176ac62
[ "BSD-3-Clause" ]
null
null
null
apps/fithm-service/apps/model/models.py
sergio1221/flask-backend
11a9e0db5b5e664fcc820919d97039738176ac62
[ "BSD-3-Clause" ]
null
null
null
from sqlalchemy import ( Column, String, ForeignKey, Float, Integer, Boolean ) from sqlalchemy.orm import relationship from sqlalchemy.dialects import postgresql from libs.database import Base, Stateful class Model(Stateful): '''Model table''' __tablename__ = 'models' ...
32.770492
88
0.626313
from sqlalchemy import ( Column, String, ForeignKey, Float, Integer, Boolean ) from sqlalchemy.orm import relationship from sqlalchemy.dialects import postgresql from libs.database import Base, Stateful class Model(Stateful): __tablename__ = 'models' id = Column(Inte...
true
true
f71ea1692f9195dcc858ae156af3624dfca9a2ef
1,661
py
Python
TA-linode/bin/ta_linode/aob_py3/splunktalib/file_monitor.py
jriddle-linode/splunk-addon-linode
5954acd12ef88ab991365ef51072db68aed46aa1
[ "Apache-2.0" ]
11
2020-01-23T11:32:26.000Z
2021-09-23T09:24:02.000Z
TA-linode/bin/ta_linode/aob_py3/splunktalib/file_monitor.py
jriddle-linode/splunk-addon-linode
5954acd12ef88ab991365ef51072db68aed46aa1
[ "Apache-2.0" ]
26
2019-07-15T02:38:22.000Z
2021-12-01T04:14:17.000Z
TA-linode/bin/ta_linode/aob_py3/splunktalib/file_monitor.py
jriddle-linode/splunk-addon-linode
5954acd12ef88ab991365ef51072db68aed46aa1
[ "Apache-2.0" ]
6
2019-07-14T17:44:06.000Z
2020-11-17T17:33:23.000Z
# SPDX-FileCopyrightText: 2020 Splunk Inc. # # SPDX-License-Identifier: Apache-2.0 from builtins import object import os.path as op import traceback from splunktalib.common import log class FileMonitor(object): def __init__(self, callback, files): """ :files: files to be monidtored with full pat...
27.683333
76
0.53823
from builtins import object import os.path as op import traceback from splunktalib.common import log class FileMonitor(object): def __init__(self, callback, files): self._callback = callback self._files = files self.file_mtimes = {file_name: None for file_name in self._files} ...
true
true
f71ea182be9148ef98e2c8611759cbd24edced2a
1,333
py
Python
copilot/views.py
Feudo-Laranja-ave-do-paraiso-DS-2021-2/copilot-api
3f8c64cc2fafab1902dcd37f624fcff93f9494aa
[ "MIT" ]
null
null
null
copilot/views.py
Feudo-Laranja-ave-do-paraiso-DS-2021-2/copilot-api
3f8c64cc2fafab1902dcd37f624fcff93f9494aa
[ "MIT" ]
3
2022-03-10T21:40:58.000Z
2022-03-15T02:14:50.000Z
copilot/views.py
Feudo-Laranja-ave-do-paraiso-DS-2021-2/copilot-api
3f8c64cc2fafab1902dcd37f624fcff93f9494aa
[ "MIT" ]
null
null
null
from rest_framework.viewsets import ModelViewSet from .models import Profile, Group from .serializers import ProfileSerializers, GroupSerializers from rest_framework.response import Response from rest_framework.decorators import action from itertools import chain class ProfileViewSet(ModelViewSet): serializer_cla...
34.179487
61
0.702926
from rest_framework.viewsets import ModelViewSet from .models import Profile, Group from .serializers import ProfileSerializers, GroupSerializers from rest_framework.response import Response from rest_framework.decorators import action from itertools import chain class ProfileViewSet(ModelViewSet): serializer_cla...
true
true
f71ea2c7e4a8e614b8fbb239298e8c5e740555c8
3,282
py
Python
aliyun-python-sdk-bssopenapi/aliyunsdkbssopenapi/request/v20171214/QuerySettleBillRequest.py
ankitdobhal/aliyun-openapi-python-sdk
991b1c2d91adc468480defc23ba790d4369cce7b
[ "Apache-2.0" ]
1
2021-03-08T02:59:17.000Z
2021-03-08T02:59:17.000Z
aliyun-python-sdk-bssopenapi/aliyunsdkbssopenapi/request/v20171214/QuerySettleBillRequest.py
bricklayer-Liu/aliyun-openapi-python-sdk
20da2554de22679fc7c5462c483663e4d79512aa
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-bssopenapi/aliyunsdkbssopenapi/request/v20171214/QuerySettleBillRequest.py
bricklayer-Liu/aliyun-openapi-python-sdk
20da2554de22679fc7c5462c483663e4d79512aa
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
33.489796
75
0.771176
from aliyunsdkcore.request import RpcRequest from aliyunsdkbssopenapi.endpoint import endpoint_data class QuerySettleBillRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'BssOpenApi', '2017-12-14', 'QuerySettleBill') self.set_method('POST') if hasattr(self, "endpoint_map")...
true
true
f71ea31341a506b476c8ad73d75b95e72760cafc
48
py
Python
aiomatrix/dispatcher/storage/presence/engines/__init__.py
Forden/aiomatrix
d258076bae8eb776495b92be46ee9f4baec8d9a6
[ "MIT" ]
2
2021-10-29T18:07:08.000Z
2021-11-19T00:25:43.000Z
aiomatrix/dispatcher/storage/presence/engines/__init__.py
Forden/aiomatrix
d258076bae8eb776495b92be46ee9f4baec8d9a6
[ "MIT" ]
1
2022-03-06T11:17:43.000Z
2022-03-06T11:17:43.000Z
aiomatrix/dispatcher/storage/presence/engines/__init__.py
Forden/aiomatrix
d258076bae8eb776495b92be46ee9f4baec8d9a6
[ "MIT" ]
null
null
null
from .sqlite import SqlitePresenceStorageEngine
24
47
0.895833
from .sqlite import SqlitePresenceStorageEngine
true
true
f71ea377dea2ef46a9377c4904dbec66d0fe8968
7,373
py
Python
tensorflow_datasets/summarization/summscreen/summscreen.py
shubhamkumaR630/datasets
fe9ee91849cefed0953141ea3588f73b7def78fd
[ "Apache-2.0" ]
2
2022-02-14T09:51:39.000Z
2022-02-14T13:27:49.000Z
tensorflow_datasets/summarization/summscreen/summscreen.py
shubhamkumaR630/datasets
fe9ee91849cefed0953141ea3588f73b7def78fd
[ "Apache-2.0" ]
null
null
null
tensorflow_datasets/summarization/summscreen/summscreen.py
shubhamkumaR630/datasets
fe9ee91849cefed0953141ea3588f73b7def78fd
[ "Apache-2.0" ]
1
2020-12-13T22:11:33.000Z
2020-12-13T22:11:33.000Z
# coding=utf-8 # Copyright 2022 The TensorFlow Datasets Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
32.623894
91
0.655907
import json import os import tensorflow as tf import tensorflow_datasets.public_api as tfds _DESCRIPTION = """ SummScreen Summarization dataset, non-anonymized, non-tokenized version. Train/val/test splits and filtering are based on the final tokenized dataset, but transcripts and recaps provided are...
true
true
f71ea5d93843377ff6b080e7d44cc423b011871b
2,783
py
Python
components_library/cachehierarchies/abstract_cache_hierarchy.py
zinob15/gem5
fb2946e314ea9e63c7696ee8023150ed13956582
[ "BSD-3-Clause" ]
19
2018-07-20T15:08:50.000Z
2022-03-26T16:15:59.000Z
components_library/cachehierarchies/abstract_cache_hierarchy.py
zinob15/gem5
fb2946e314ea9e63c7696ee8023150ed13956582
[ "BSD-3-Clause" ]
148
2018-07-20T00:58:36.000Z
2021-11-16T01:52:33.000Z
components_library/cachehierarchies/abstract_cache_hierarchy.py
zinob15/gem5
fb2946e314ea9e63c7696ee8023150ed13956582
[ "BSD-3-Clause" ]
10
2019-01-10T03:01:30.000Z
2022-01-21T18:36:18.000Z
# Copyright (c) 2021 The Regents of the University of California # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this lis...
38.123288
78
0.743442
from abc import ABCMeta, abstractmethod from ..boards.abstract_board import AbstractBoard from m5.objects import SubSystem class AbstractCacheHierarchy(SubSystem): __metaclass__ = ABCMeta def __init__(self): super(AbstractCacheHierarchy, self).__init__() @abstractmet...
true
true
f71ea6560181038415ecc054dc22addd8cc08dd2
13,031
py
Python
mt3/datasets.py
AK391/mt3
e03242bdbb877c64677024adb3b9eb915d9929d6
[ "Apache-2.0" ]
1
2022-01-04T04:37:07.000Z
2022-01-04T04:37:07.000Z
mt3/datasets.py
dogdogshit/mt3
d43c95ccbf9caa08d18e985ca2f2fc7e286a2f66
[ "Apache-2.0" ]
null
null
null
mt3/datasets.py
dogdogshit/mt3
d43c95ccbf9caa08d18e985ca2f2fc7e286a2f66
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 The MT3 Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
43.875421
127
0.634027
import dataclasses from typing import Mapping, Sequence, Union from mt3 import note_sequences import tensorflow as tf @dataclasses.dataclass class InferEvalSplit: name: str suffix: str include_in_mixture: bool = True @dataclasses.dataclass class DatasetConfig: name: str path...
true
true
f71ea6594940687e4ec4ac3a81683903513d4887
6,303
py
Python
repo/script.module.liveresolver/lib/js2py/constructors/jsobject.py
Hades01/Addons
710da97ac850197498a3cd64be1811c593610add
[ "Apache-2.0" ]
3
2020-03-03T13:21:44.000Z
2021-07-21T09:53:31.000Z
repo/script.module.liveresolver/lib/js2py/constructors/jsobject.py
Hades01/Addons
710da97ac850197498a3cd64be1811c593610add
[ "Apache-2.0" ]
null
null
null
repo/script.module.liveresolver/lib/js2py/constructors/jsobject.py
Hades01/Addons
710da97ac850197498a3cd64be1811c593610add
[ "Apache-2.0" ]
2
2020-04-01T22:11:12.000Z
2020-05-07T23:54:52.000Z
from js2py.base import * #todo Double check everything is OK @Js def Object(): val = arguments.get('0') if val.is_null() or val.is_undefined(): return PyJsObject(prototype=ObjectPrototype) return val.to_object() @Js def object_constructor(): if len(arguments): val = arguments.get('0'...
37.517857
129
0.621609
from js2py.base import * @Js def Object(): val = arguments.get('0') if val.is_null() or val.is_undefined(): return PyJsObject(prototype=ObjectPrototype) return val.to_object() @Js def object_constructor(): if len(arguments): val = arguments.get('0') if val.TYPE=='Object': ...
true
true
f71ea68918003b20c8ce85f2c5cf70c422756b26
3,125
py
Python
fuji_server/models/license_output_inner.py
ignpelloz/fuji
5e6fe8333c1706d1b628a84108bff7a97fdf11a7
[ "MIT" ]
25
2020-09-22T08:28:45.000Z
2022-02-23T07:10:28.000Z
fuji_server/models/license_output_inner.py
ignpelloz/fuji
5e6fe8333c1706d1b628a84108bff7a97fdf11a7
[ "MIT" ]
188
2020-05-11T08:54:59.000Z
2022-03-31T12:28:15.000Z
fuji_server/models/license_output_inner.py
ignpelloz/fuji
5e6fe8333c1706d1b628a84108bff7a97fdf11a7
[ "MIT" ]
20
2020-05-04T13:56:26.000Z
2022-03-02T13:39:04.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import from datetime import date, datetime # noqa: F401 from typing import List, Dict # noqa: F401 from fuji_server.models.base_model_ import Model from fuji_server import util class LicenseOutputInner(Model): """NOTE: This class is auto generated by th...
28.935185
113
0.65056
from __future__ import absolute_import from datetime import date, datetime from typing import List, Dict from fuji_server.models.base_model_ import Model from fuji_server import util class LicenseOutputInner(Model): def __init__(self, license: str = None, osi_approved: bool = False, details_url: str = No...
true
true
f71ea6b4496eae33b99557e0515c9fe2901709df
244
py
Python
problems/303_range_sum_query_immutable.py
wasi0013/leet_code
c589c10f06043fa0ac7643e09ae3903d77c2f8e9
[ "MIT" ]
null
null
null
problems/303_range_sum_query_immutable.py
wasi0013/leet_code
c589c10f06043fa0ac7643e09ae3903d77c2f8e9
[ "MIT" ]
null
null
null
problems/303_range_sum_query_immutable.py
wasi0013/leet_code
c589c10f06043fa0ac7643e09ae3903d77c2f8e9
[ "MIT" ]
null
null
null
class NumArray: def __init__(self, nums: List[int]): self.n = list(accumulate(nums)) def sumRange(self, left: int, right: int) -> int: return self.n[right]- (self.n[left-1] if left>0 else 0)
22.181818
63
0.545082
class NumArray: def __init__(self, nums: List[int]): self.n = list(accumulate(nums)) def sumRange(self, left: int, right: int) -> int: return self.n[right]- (self.n[left-1] if left>0 else 0)
true
true
f71ea6bc8a22ebb8427b7204071db94474f6208a
5,847
py
Python
plugins/nxt_plugin/nxt/motcont.py
RodPy/Turtlebots.activity
f885d7d2e5d710c01294ae60da995dfb0eb36b21
[ "MIT" ]
null
null
null
plugins/nxt_plugin/nxt/motcont.py
RodPy/Turtlebots.activity
f885d7d2e5d710c01294ae60da995dfb0eb36b21
[ "MIT" ]
null
null
null
plugins/nxt_plugin/nxt/motcont.py
RodPy/Turtlebots.activity
f885d7d2e5d710c01294ae60da995dfb0eb36b21
[ "MIT" ]
1
2020-06-17T15:44:16.000Z
2020-06-17T15:44:16.000Z
# nxt.motcont module -- Interface to Linus Atorf's MotorControl NXC # Copyright (C) 2011 Marcus Wanner # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (a...
39.77551
83
0.677612
# Copyright (C) 2011 Marcus Wanner # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed i...
false
true
f71ea7abd7acda31d3df346c7631db22cb58ddb5
13,002
py
Python
house_rocket_app.py
Leonardodsch/house-rocket-insights
dd8405b776e223ec5ff8392a027d4b0116fcd7ca
[ "MIT" ]
1
2021-12-24T13:40:09.000Z
2021-12-24T13:40:09.000Z
house_rocket_app.py
Leonardodsch/house-rocket-insights
dd8405b776e223ec5ff8392a027d4b0116fcd7ca
[ "MIT" ]
null
null
null
house_rocket_app.py
Leonardodsch/house-rocket-insights
dd8405b776e223ec5ff8392a027d4b0116fcd7ca
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np import streamlit as st import plotly.express as px import ipywidgets as widgets from ipywidgets import fixed import seaborn as sns import matplotlib.pyplot as plt sns.set_style('whitegrid') st.set_page_config(layout='wide') @st.cache(allow_output_mutation=True) def get_data(path...
42.769737
199
0.659745
import pandas as pd import numpy as np import streamlit as st import plotly.express as px import ipywidgets as widgets from ipywidgets import fixed import seaborn as sns import matplotlib.pyplot as plt sns.set_style('whitegrid') st.set_page_config(layout='wide') @st.cache(allow_output_mutation=True) def get_data(path...
true
true
f71ea7c37ca8c9223d397b63be289fc1ae452dd6
10,645
py
Python
extractor.py
vivdiwakar/BambooHR
c1471d4b743aace11cb39efca42be6250d37dc6e
[ "BSD-3-Clause" ]
1
2019-05-15T07:25:01.000Z
2019-05-15T07:25:01.000Z
extractor.py
vivdiwakar/BambooHR
c1471d4b743aace11cb39efca42be6250d37dc6e
[ "BSD-3-Clause" ]
null
null
null
extractor.py
vivdiwakar/BambooHR
c1471d4b743aace11cb39efca42be6250d37dc6e
[ "BSD-3-Clause" ]
1
2021-08-04T20:44:48.000Z
2021-08-04T20:44:48.000Z
import argparse import datetime import sys import requests from os import makedirs from os.path import dirname, exists from re import search, sub, escape import xmltodict # Setup the CLI arguments parser parser = argparse.ArgumentParser() parser.add_argument('auth', help='User API auth key.', type=str) parser.add_arg...
42.242063
119
0.626867
import argparse import datetime import sys import requests from os import makedirs from os.path import dirname, exists from re import search, sub, escape import xmltodict parser = argparse.ArgumentParser() parser.add_argument('auth', help='User API auth key.', type=str) parser.add_argument('company', help='Company n...
true
true
f71ea8648cb914829cbd5e2b6998226a113ea3c8
2,831
py
Python
payment.py
trytonus/trytond-magento
f27e8d136e5e222fdf86b679d10d468de38262eb
[ "BSD-3-Clause" ]
3
2015-10-07T15:51:40.000Z
2016-04-06T09:00:57.000Z
payment.py
trytonus/trytond-magento
f27e8d136e5e222fdf86b679d10d468de38262eb
[ "BSD-3-Clause" ]
19
2015-07-28T14:24:24.000Z
2016-07-13T06:02:35.000Z
payment.py
trytonus/trytond-magento
f27e8d136e5e222fdf86b679d10d468de38262eb
[ "BSD-3-Clause" ]
15
2015-07-28T05:54:17.000Z
2016-05-27T12:23:29.000Z
# -*- coding: utf-8 -*- from trytond.pool import PoolMeta from trytond.model import fields, ModelSQL, ModelView from trytond.transaction import Transaction __metaclass__ = PoolMeta __all__ = ['MagentoPaymentGateway', 'Payment'] class MagentoPaymentGateway(ModelSQL, ModelView): """ This model maps the availab...
30.117021
75
0.604733
from trytond.pool import PoolMeta from trytond.model import fields, ModelSQL, ModelView from trytond.transaction import Transaction __metaclass__ = PoolMeta __all__ = ['MagentoPaymentGateway', 'Payment'] class MagentoPaymentGateway(ModelSQL, ModelView): __name__ = 'magento.instance.payment_gateway' _rec_nam...
true
true
f71ea87e24c61c899af7fdfebf66e69cf9fcd73b
1,841
py
Python
neutron/db/migration/alembic_migrations/agent_init_ops.py
NeCTAR-RC/neutron
acf78cc3c88aff638180819419a65145a9a79695
[ "Apache-2.0" ]
1
2019-01-13T04:42:21.000Z
2019-01-13T04:42:21.000Z
neutron/db/migration/alembic_migrations/agent_init_ops.py
NeCTAR-RC/neutron
acf78cc3c88aff638180819419a65145a9a79695
[ "Apache-2.0" ]
null
null
null
neutron/db/migration/alembic_migrations/agent_init_ops.py
NeCTAR-RC/neutron
acf78cc3c88aff638180819419a65145a9a79695
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 OpenStack Foundation # # 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 ...
42.813953
78
0.681152
from alembic import op import sqlalchemy as sa def upgrade(): op.create_table( 'agents', sa.Column('id', sa.String(length=36), nullable=False), sa.Column('agent_type', sa.String(length=255), nullable=False), sa.Column('binary', sa.String(length=255), nullable=Fa...
true
true
f71ea8a17abddd1dcc7b6d5c987d32eb1bff55b7
11,642
py
Python
nidm/experiment/tests/test_query.py
tvanerp/PyNIDM
6a94875969c6bc5247b09d7d2793ed979b18ab3f
[ "Apache-2.0" ]
null
null
null
nidm/experiment/tests/test_query.py
tvanerp/PyNIDM
6a94875969c6bc5247b09d7d2793ed979b18ab3f
[ "Apache-2.0" ]
null
null
null
nidm/experiment/tests/test_query.py
tvanerp/PyNIDM
6a94875969c6bc5247b09d7d2793ed979b18ab3f
[ "Apache-2.0" ]
null
null
null
import pytest from nidm.experiment import Project, Session, AssessmentAcquisition, AssessmentObject, Acquisition, AcquisitionObject, Query from nidm.core import Constants from rdflib import Namespace,URIRef import prov.model as pm from os import remove import pprint from prov.model import ProvDocument, QualifiedName f...
40.006873
165
0.707954
import pytest from nidm.experiment import Project, Session, AssessmentAcquisition, AssessmentObject, Acquisition, AcquisitionObject, Query from nidm.core import Constants from rdflib import Namespace,URIRef import prov.model as pm from os import remove import pprint from prov.model import ProvDocument, QualifiedName f...
true
true
f71eaa69788aff0d572f50f2d2f88af0daf622b4
624
py
Python
pizdyuk/test.py
DeathAdder1999/Pizdyuk
3fd7c71508c79b36e3cc801d78cd1a87eee5aa0b
[ "Apache-2.0" ]
1
2021-05-06T20:23:08.000Z
2021-05-06T20:23:08.000Z
pizdyuk/test.py
aufdnb/Pizdyuk
75096ffa54df831eb05360d7b39f49000d466f80
[ "Apache-2.0" ]
null
null
null
pizdyuk/test.py
aufdnb/Pizdyuk
75096ffa54df831eb05360d7b39f49000d466f80
[ "Apache-2.0" ]
null
null
null
import csv import random from pzd_constants import DATE_FORMAT from datetime import datetime, timedelta date = None price = 0 with open('stock_data/aapl.csv', mode="r") as f: reader = csv.reader(f, delimiter=',') for row in reader: date = datetime.strptime(row[0], DATE_FORMAT) price = float(ro...
29.714286
70
0.655449
import csv import random from pzd_constants import DATE_FORMAT from datetime import datetime, timedelta date = None price = 0 with open('stock_data/aapl.csv', mode="r") as f: reader = csv.reader(f, delimiter=',') for row in reader: date = datetime.strptime(row[0], DATE_FORMAT) price = float(ro...
true
true
f71eaaf92d5fa9575d3e1b1f9dadd5a505d8934d
1,578
py
Python
pirates/minigame/Distributed7StudTable.py
itsyaboyrocket/pirates
6ca1e7d571c670b0d976f65e608235707b5737e3
[ "BSD-3-Clause" ]
3
2021-02-25T06:38:13.000Z
2022-03-22T07:00:15.000Z
pirates/minigame/Distributed7StudTable.py
itsyaboyrocket/pirates
6ca1e7d571c670b0d976f65e608235707b5737e3
[ "BSD-3-Clause" ]
null
null
null
pirates/minigame/Distributed7StudTable.py
itsyaboyrocket/pirates
6ca1e7d571c670b0d976f65e608235707b5737e3
[ "BSD-3-Clause" ]
1
2021-02-25T06:38:17.000Z
2021-02-25T06:38:17.000Z
# uncompyle6 version 3.2.0 # Python bytecode 2.4 (62061) # Decompiled from: Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] # Embedded file name: pirates.minigame.Distributed7StudTable from pirates.minigame import PlayingCardGlobals from pirates.minigame import DistributedPokerTabl...
35.066667
104
0.691381
from pirates.minigame import PlayingCardGlobals from pirates.minigame import DistributedPokerTable from direct.interval.IntervalGlobal import * from pandac.PandaModules import Point3, Vec3 from pirates.piratesbase import PLocalizer class Distributed7StudTable(DistributedPokerTable.DistributedPokerTable): __mod...
true
true
f71eab8b25014501aa6d123e70fba4506c095cea
10,366
py
Python
youtube_dl/extractor/svt.py
NessDan/youtube-dl
62280188e6fa692f1dd1253eb21eb4b7a5e5fc20
[ "Unlicense" ]
24
2017-03-17T10:27:12.000Z
2022-02-16T05:55:50.000Z
youtube_dl/extractor/svt.py
NessDan/youtube-dl
62280188e6fa692f1dd1253eb21eb4b7a5e5fc20
[ "Unlicense" ]
7
2017-07-26T08:15:27.000Z
2018-09-20T12:56:53.000Z
youtube_dl/extractor/svt.py
NessDan/youtube-dl
62280188e6fa692f1dd1253eb21eb4b7a5e5fc20
[ "Unlicense" ]
3
2017-03-17T10:27:13.000Z
2019-01-28T01:19:17.000Z
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_parse_qs, compat_urllib_parse_urlparse, ) from ..utils import ( determine_ext, dict_get, int_or_none, try_get, urljoin, compat_str, ) class SVTBaseIE(Info...
35.138983
133
0.54071
from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_parse_qs, compat_urllib_parse_urlparse, ) from ..utils import ( determine_ext, dict_get, int_or_none, try_get, urljoin, compat_str, ) class SVTBaseIE(InfoExtractor): ...
true
true
f71eabb5fc9c2151ea1e3e4278d18a8e8b93c07f
1,032
py
Python
RecoLocalTracker/SubCollectionProducers/python/test/MCsplitStripsCustomize_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
RecoLocalTracker/SubCollectionProducers/python/test/MCsplitStripsCustomize_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
RecoLocalTracker/SubCollectionProducers/python/test/MCsplitStripsCustomize_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
# # With this customization the ClusterMCsplitStrips module will be substituted # for the standard clusterizer. If a cluster is matched to more than one simTrack # it will be split into the corresponding true clusters. # import FWCore.ParameterSet.Config as cms def splitMCmerged(process): process.siStripClustersU...
44.869565
146
0.782946
import FWCore.ParameterSet.Config as cms def splitMCmerged(process): process.siStripClustersUnsplit = process.siStripClusters.clone() stripClusIndex = process.striptrackerlocalreco.index(process.siStripClusters) process.striptrackerlocalre...
true
true
f71eac7b3cc16b05e2e80303287fcdacd9ff87af
9,986
py
Python
src/cmudict_parser/SentenceToIPA.py
stefantaubert/cmudict-parser
8f5d1b191a41929f1ce8c7acf391c23c08d2be15
[ "MIT" ]
null
null
null
src/cmudict_parser/SentenceToIPA.py
stefantaubert/cmudict-parser
8f5d1b191a41929f1ce8c7acf391c23c08d2be15
[ "MIT" ]
14
2020-12-01T08:45:16.000Z
2021-06-01T08:00:39.000Z
src/cmudict_parser/SentenceToIPA.py
stefantaubert/cmudict-parser
8f5d1b191a41929f1ce8c7acf391c23c08d2be15
[ "MIT" ]
null
null
null
""" Remarks: https://github.com/cmusphinx/cmudict is newer than 0.7b! It has for example 'declarative' but is has unfortunately no MIT-license. """ import string from logging import getLogger from typing import Callable, Dict, List, Optional, Tuple, Union PUNCTUATION_AND_LINEBREAK = f"{string.punctuation}\n" IPA_CAC...
46.446512
255
0.763168
import string from logging import getLogger from typing import Callable, Dict, List, Optional, Tuple, Union PUNCTUATION_AND_LINEBREAK = f"{string.punctuation}\n" IPA_CACHE: Dict[str, str] = {} def clear_cache() -> None: IPA_CACHE.clear() def sentence_to_ipa(dict: Dict[str, str], sentence: str, replace_unknown_...
true
true
f71eac9488b5831e389ba288de7a4535c5b2afd7
1,304
py
Python
controlapp/monitorapp/src/serverapp/serversocket/reptilesserversocket.py
kuspen/reptiles-monitor
ccb4a96e5b0091228a10eaa0e6fbf1a72795ca91
[ "MIT" ]
null
null
null
controlapp/monitorapp/src/serverapp/serversocket/reptilesserversocket.py
kuspen/reptiles-monitor
ccb4a96e5b0091228a10eaa0e6fbf1a72795ca91
[ "MIT" ]
null
null
null
controlapp/monitorapp/src/serverapp/serversocket/reptilesserversocket.py
kuspen/reptiles-monitor
ccb4a96e5b0091228a10eaa0e6fbf1a72795ca91
[ "MIT" ]
null
null
null
import sys import socket sys.path.append('../') import common.define BUF_SIZE = 2048 class ReptilesServerSocket(): def __init__(self, sock=None): if sock is None: self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) else: self.sock = sock def setsocket(self...
26.08
81
0.58819
import sys import socket sys.path.append('../') import common.define BUF_SIZE = 2048 class ReptilesServerSocket(): def __init__(self, sock=None): if sock is None: self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) else: self.sock = sock def setsocket(self...
true
true
f71eacb0cebaf99c989c8497d1bdf211436cdebe
774
py
Python
python_zabbix/client.py
zhenghuaHe/stu_python
e0937070248269527661ccf32e5bea048170ac17
[ "Apache-2.0" ]
null
null
null
python_zabbix/client.py
zhenghuaHe/stu_python
e0937070248269527661ccf32e5bea048170ac17
[ "Apache-2.0" ]
null
null
null
python_zabbix/client.py
zhenghuaHe/stu_python
e0937070248269527661ccf32e5bea048170ac17
[ "Apache-2.0" ]
null
null
null
# -*- coding=utf-8 -*- import socket import psutil import json # 创建链接 # 生成一个socket对象 sk = socket.socket(socket.AF_INET, socket.SOCK_STREAM) host = socket.gethostname() port = 8888 # 请求连接服务端 sk.connect((host, port)) #获取信息 #获取主机名 hostname = socket.getfqdn(socket.gethostname()) #获取主机IP地址 host_ip = socket.gethostbyname...
16.125
107
0.719638
import socket import psutil import json sk = socket.socket(socket.AF_INET, socket.SOCK_STREAM) host = socket.gethostname() port = 8888 sk.connect((host, port)) hostname = socket.getfqdn(socket.gethostname()) host_ip = socket.gethostbyname(hostname) host_memory = str(psutil.virtual_memory().percent) host_cp...
true
true
f71ead2ecdc6c76a593c5eab8b227fec6b66241f
3,111
py
Python
helloworld/helloworld/settings.py
yprateek136/complete_web_developement
e74faad9a9f0708a12df085d1c08170c4b6a7691
[ "MIT" ]
null
null
null
helloworld/helloworld/settings.py
yprateek136/complete_web_developement
e74faad9a9f0708a12df085d1c08170c4b6a7691
[ "MIT" ]
null
null
null
helloworld/helloworld/settings.py
yprateek136/complete_web_developement
e74faad9a9f0708a12df085d1c08170c4b6a7691
[ "MIT" ]
null
null
null
""" Django settings for helloworld project. Generated by 'django-admin startproject' using Django 3.0.8. For more information on this file, see https://docs.djangoproject.com/en/3.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.0/ref/settings/ """ import os...
25.710744
91
0.697525
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'r%rqu$hl0#i4xpvy@9cvj_2(_y+f1q6n%d%klw3tihj($v+3n-' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.content...
true
true
f71ead8c9b58fad05373969af02b648b96bc2ab9
3,950
py
Python
tests20/python_client/load/test_workload.py
reyoung/milvus
7557616fea7ff7a8b093c85a5c17134112fa89f8
[ "Apache-2.0" ]
null
null
null
tests20/python_client/load/test_workload.py
reyoung/milvus
7557616fea7ff7a8b093c85a5c17134112fa89f8
[ "Apache-2.0" ]
null
null
null
tests20/python_client/load/test_workload.py
reyoung/milvus
7557616fea7ff7a8b093c85a5c17134112fa89f8
[ "Apache-2.0" ]
null
null
null
import datetime import pytest from base.client_base import TestcaseBase from common import common_func as cf from common import common_type as ct from common.common_type import CaseLabel from utils.util_log import test_log as log from pymilvus_orm import utility rounds = 100 per_nb = 100000 default_field_name = ct.d...
41.578947
102
0.586076
import datetime import pytest from base.client_base import TestcaseBase from common import common_func as cf from common import common_type as ct from common.common_type import CaseLabel from utils.util_log import test_log as log from pymilvus_orm import utility rounds = 100 per_nb = 100000 default_field_name = ct.d...
true
true
f71ead9063e6e1999ccb1b30dc9112382068d484
293
py
Python
python exercicios/func/funct10.py
gabrielqoliveiraa/bomdia
b5e0fe6aa347a0e31b5960a69fbd6f32df352094
[ "MIT" ]
null
null
null
python exercicios/func/funct10.py
gabrielqoliveiraa/bomdia
b5e0fe6aa347a0e31b5960a69fbd6f32df352094
[ "MIT" ]
null
null
null
python exercicios/func/funct10.py
gabrielqoliveiraa/bomdia
b5e0fe6aa347a0e31b5960a69fbd6f32df352094
[ "MIT" ]
null
null
null
def leiaInt(msg): ok = False valor = 0 while True: n = str(input(msg)) if n.isnumeric(): valor = int(n) ok = True else: print('ERRO!') if ok: break return valor n = leiaInt('Digite um número: ')
18.3125
33
0.440273
def leiaInt(msg): ok = False valor = 0 while True: n = str(input(msg)) if n.isnumeric(): valor = int(n) ok = True else: print('ERRO!') if ok: break return valor n = leiaInt('Digite um número: ')
true
true
f71eadd98dbe3ba79d4203630eff5be2409e013c
3,410
py
Python
Bake_bot/migrations/0001_initial.py
annfike/Bake_Cake_bot
9407f99d1832d0bd5be409d1c02a6dfa8c3a4fff
[ "MIT" ]
null
null
null
Bake_bot/migrations/0001_initial.py
annfike/Bake_Cake_bot
9407f99d1832d0bd5be409d1c02a6dfa8c3a4fff
[ "MIT" ]
null
null
null
Bake_bot/migrations/0001_initial.py
annfike/Bake_Cake_bot
9407f99d1832d0bd5be409d1c02a6dfa8c3a4fff
[ "MIT" ]
null
null
null
# Generated by Django 3.2.7 on 2021-10-27 09:42 from django.db import migrations, models import django.db.models.deletion import phonenumber_field.modelfields class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='C...
47.361111
278
0.58827
from django.db import migrations, models import django.db.models.deletion import phonenumber_field.modelfields class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Customer', fields=[ ...
true
true
f71eae5bad1890b78020354c67dece0739586089
1,359
py
Python
blog/migrations/0001_initial.py
elasyaf/djangblog
d064662ad5eb6642022d957c99d434f96fc9fb51
[ "Unlicense" ]
null
null
null
blog/migrations/0001_initial.py
elasyaf/djangblog
d064662ad5eb6642022d957c99d434f96fc9fb51
[ "Unlicense" ]
null
null
null
blog/migrations/0001_initial.py
elasyaf/djangblog
d064662ad5eb6642022d957c99d434f96fc9fb51
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-02-27 15:28 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Creat...
33.146341
114
0.577631
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Blog', fields=[ ...
true
true
f71eaf00550df0365a2be759b57becb21a74722f
509
py
Python
university_dost/users/tests/test_tasks.py
dhavalsavalia/university_dost
ef6c78239dd648542b68b610528e0b9a23a94295
[ "MIT" ]
null
null
null
university_dost/users/tests/test_tasks.py
dhavalsavalia/university_dost
ef6c78239dd648542b68b610528e0b9a23a94295
[ "MIT" ]
null
null
null
university_dost/users/tests/test_tasks.py
dhavalsavalia/university_dost
ef6c78239dd648542b68b610528e0b9a23a94295
[ "MIT" ]
1
2020-06-05T09:29:09.000Z
2020-06-05T09:29:09.000Z
import pytest from celery.result import EagerResult from university_dost.users.tasks import get_users_count from university_dost.users.tests.factories import UserFactory pytestmark = pytest.mark.django_db def test_user_count(settings): """A basic test to execute the get_users_count Celery task.""" UserFacto...
29.941176
66
0.795678
import pytest from celery.result import EagerResult from university_dost.users.tasks import get_users_count from university_dost.users.tests.factories import UserFactory pytestmark = pytest.mark.django_db def test_user_count(settings): UserFactory.create_batch(3) settings.CELERY_TASK_ALWAYS_EAGER = True ...
true
true
f71eafe0c6ec1bcc5a035105c312dffa9e35645e
158
py
Python
Concursera - USP/Semana 2/Conversordetemperatura.py
Pablopfrj/Cursos-de-Python
805f1fa42d41e842df66d24420fed0f5c0cdc740
[ "MIT" ]
null
null
null
Concursera - USP/Semana 2/Conversordetemperatura.py
Pablopfrj/Cursos-de-Python
805f1fa42d41e842df66d24420fed0f5c0cdc740
[ "MIT" ]
null
null
null
Concursera - USP/Semana 2/Conversordetemperatura.py
Pablopfrj/Cursos-de-Python
805f1fa42d41e842df66d24420fed0f5c0cdc740
[ "MIT" ]
null
null
null
temperaturaF = input ("Qual temperatura desejada? ") K = float(temperaturaF) temperarturaC = 5*(K - 32)/9 print ('A temepratura celsius é ',temperarturaC)
22.571429
53
0.721519
temperaturaF = input ("Qual temperatura desejada? ") K = float(temperaturaF) temperarturaC = 5*(K - 32)/9 print ('A temepratura celsius é ',temperarturaC)
true
true
f71eb1bcceacb04d1e517066e97c304ca359d409
444
py
Python
Set0/p0_3.py
izzy-el/mitbrazil-intro-python
193d552832393d193eb24d6881be0ab2a37b41d1
[ "MIT" ]
null
null
null
Set0/p0_3.py
izzy-el/mitbrazil-intro-python
193d552832393d193eb24d6881be0ab2a37b41d1
[ "MIT" ]
null
null
null
Set0/p0_3.py
izzy-el/mitbrazil-intro-python
193d552832393d193eb24d6881be0ab2a37b41d1
[ "MIT" ]
null
null
null
kwh_used = 1000 out = 0 if(kwh_used < 500): out += 500 * 0.45 elif(kwh_used >= 500 and kwh_used < 1500): out += 500 * 0.45 + ((kwh_used - 500) * 0.74) elif(kwh_used >= 1500 and kwh_used < 2500): out += 500 * 0.45 + ((kwh_used - 500) * 0.74) + ((kwh_used - 1500) * 1.25) elif(kwh_used >= 2500): out += 50...
31.714286
104
0.547297
kwh_used = 1000 out = 0 if(kwh_used < 500): out += 500 * 0.45 elif(kwh_used >= 500 and kwh_used < 1500): out += 500 * 0.45 + ((kwh_used - 500) * 0.74) elif(kwh_used >= 1500 and kwh_used < 2500): out += 500 * 0.45 + ((kwh_used - 500) * 0.74) + ((kwh_used - 1500) * 1.25) elif(kwh_used >= 2500): out += 50...
true
true
f71eb2893c929f8c7aacf04acd0eedb825e80d13
2,653
py
Python
PyStationB/docs/conf.py
BrunoKM/station-b-libraries
ea3591837e4a33f0bef789d905467754c27913b3
[ "MIT" ]
6
2021-09-29T15:46:55.000Z
2021-12-14T18:39:51.000Z
PyStationB/docs/conf.py
BrunoKM/station-b-libraries
ea3591837e4a33f0bef789d905467754c27913b3
[ "MIT" ]
null
null
null
PyStationB/docs/conf.py
BrunoKM/station-b-libraries
ea3591837e4a33f0bef789d905467754c27913b3
[ "MIT" ]
3
2021-09-27T10:35:20.000Z
2021-10-02T17:53:07.000Z
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # --------------------------------------------------------------------------------------...
36.847222
93
0.640407
project = "PyStationB" copyright = "2021, Station B, Microsoft Research Cambridge" author = "Station B, Microsoft Research Cambridge" release = "0.0.1" extensions = [ "sphinx.ext.todo", "sphinx.ext.mathjax", "sphinx.ext.napoleon", "sphinx_rtd_theme", ] napoleon_google_d...
true
true
f71eb38201529059e853f2ffea8fb7a836decd22
4,485
py
Python
arturia_midi.py
rjuang/flstudio-arturia-keylab-mk2
91fe800769bb724010122d5f6a67af7f51418682
[ "MIT" ]
19
2020-11-25T18:31:57.000Z
2022-03-09T14:45:18.000Z
arturia_midi.py
rjuang/flstudio-arturia-keylab-mk2
91fe800769bb724010122d5f6a67af7f51418682
[ "MIT" ]
1
2021-01-24T11:31:16.000Z
2021-06-05T21:39:10.000Z
arturia_midi.py
rjuang/flstudio-arturia-keylab-mk2
91fe800769bb724010122d5f6a67af7f51418682
[ "MIT" ]
3
2021-03-20T03:50:10.000Z
2021-12-24T00:27:49.000Z
import debug import device # Status command to use when sending commands between scripts INTER_SCRIPT_STATUS_BYTE = 0x00 INTER_SCRIPT_DATA1_BTN_DOWN_CMD = 0x01 # Data2 contains the id of the button INTER_SCRIPT_DATA1_BTN_UP_CMD = 0x02 # Data2 contains the id of the button INTER_SCRIPT_DATA1_UPDATE_STATE = 0x...
41.915888
118
0.672464
import debug import device INTER_SCRIPT_STATUS_BYTE = 0x00 INTER_SCRIPT_DATA1_BTN_DOWN_CMD = 0x01 INTER_SCRIPT_DATA1_BTN_UP_CMD = 0x02 INTER_SCRIPT_DATA1_UPDATE_STATE = 0x03 INTER_SCRIPT_DATA1_BEGIN_PAYLOAD_CMD = 0xFE INTER_SCRIPT_DATA1_END_PAYLOAD_CMD = 0xFF PAYLOAD_STATUS_BYTE = 0x01 PLUGIN_PORT_N...
true
true
f71eb4e7d27b7bafa25c7ecc98bfe686ddc35042
6,389
py
Python
app/service/send_notification.py
cds-snc/notifier-api
90b385ec49efbaee7e607516fc7d9f08991af813
[ "MIT" ]
41
2019-11-28T16:58:41.000Z
2022-01-28T21:11:16.000Z
app/service/send_notification.py
cds-snc/notification-api
b1c1064f291eb860b494c3fa65ac256ad70bf47c
[ "MIT" ]
1,083
2019-07-08T12:57:24.000Z
2022-03-08T18:53:40.000Z
app/service/send_notification.py
cds-snc/notifier-api
90b385ec49efbaee7e607516fc7d9f08991af813
[ "MIT" ]
9
2020-01-24T19:56:43.000Z
2022-01-27T21:36:53.000Z
from flask import current_app from notifications_utils.s3 import S3ObjectNotFound from notifications_utils.s3 import s3download as utils_s3download from sqlalchemy.orm.exc import NoResultFound from app import create_random_identifier from app.dao.notifications_dao import _update_notification_status from app.dao.servic...
34.722826
114
0.728283
from flask import current_app from notifications_utils.s3 import S3ObjectNotFound from notifications_utils.s3 import s3download as utils_s3download from sqlalchemy.orm.exc import NoResultFound from app import create_random_identifier from app.dao.notifications_dao import _update_notification_status from app.dao.servic...
true
true
f71eb58503fb1ccaf1b57d0371c42c1a0e1947b6
2,952
py
Python
artifact_sdk/model/msgsender/send_message_with_appendix_request_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
5
2019-07-31T04:11:05.000Z
2021-01-07T03:23:20.000Z
artifact_sdk/model/msgsender/send_message_with_appendix_request_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
artifact_sdk/model/msgsender/send_message_with_appendix_request_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: send_message_with_appendix_request.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _messa...
39.36
343
0.817751
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db ...
true
true
f71eb5ed63903bcf15e5dee58dfa773837782770
1,333
py
Python
lib/galaxy/datatypes/display_applications/util.py
emily101-gif/immport-galaxy
8f353d1f9b4e0d044e1a9d0b1f928b440df78b8c
[ "CC-BY-3.0" ]
4
2018-10-29T18:34:38.000Z
2021-09-29T23:30:42.000Z
lib/galaxy/datatypes/display_applications/util.py
emily101-gif/immport-galaxy
8f353d1f9b4e0d044e1a9d0b1f928b440df78b8c
[ "CC-BY-3.0" ]
30
2016-10-20T15:35:12.000Z
2018-10-02T15:59:54.000Z
lib/galaxy/datatypes/display_applications/util.py
emily101-gif/immport-galaxy
8f353d1f9b4e0d044e1a9d0b1f928b440df78b8c
[ "CC-BY-3.0" ]
7
2016-11-03T19:11:01.000Z
2020-05-11T14:23:52.000Z
from Crypto.Cipher import Blowfish def encode_dataset_user(trans, dataset, user): # encode dataset id as usual # encode user id using the dataset create time as the key dataset_hash = trans.security.encode_id(dataset.id) if user is None: user_hash = 'None' else: user_hash = str(use...
40.393939
95
0.687922
from Crypto.Cipher import Blowfish def encode_dataset_user(trans, dataset, user): dataset_hash = trans.security.encode_id(dataset.id) if user is None: user_hash = 'None' else: user_hash = str(user.id) user_hash = ("!" * (8 - len(user_hash) % 8)) + user_hash ...
true
true
f71eb6e5d084bd30a401f2798f8959e21dc37208
2,157
py
Python
examples/phosim/phosim_pipeline.py
jchiang87/workflow_engine
983e0b1a07e4ca02719a22928028daea2a5fbff4
[ "BSD-3-Clause" ]
null
null
null
examples/phosim/phosim_pipeline.py
jchiang87/workflow_engine
983e0b1a07e4ca02719a22928028daea2a5fbff4
[ "BSD-3-Clause" ]
null
null
null
examples/phosim/phosim_pipeline.py
jchiang87/workflow_engine
983e0b1a07e4ca02719a22928028daea2a5fbff4
[ "BSD-3-Clause" ]
null
null
null
""" Script to generate xml for running phosim jobs with the SLAC workflow engine. """ from __future__ import absolute_import, print_function import os import desc.workflow_engine.workflow_engine as engine pipeline = engine.Pipeline('JC_phoSim_pipeline', '0.1') main_task = pipeline.main_task main_task.notation = 'PhoS...
38.517857
86
0.713491
from __future__ import absolute_import, print_function import os import desc.workflow_engine.workflow_engine as engine pipeline = engine.Pipeline('JC_phoSim_pipeline', '0.1') main_task = pipeline.main_task main_task.notation = 'PhoSim Execution Pipeline' main_task.set_variables() slac_root_dir = '/nfs/farm/g/lsst/...
true
true