hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 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
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
08fc15b1c67749b770e80eb820f214f9daab595e
9,724
py
Python
trainer/image/directory_iterator.py
Vottivott/mildnet
4787dc756f1abcab4f7cb57ffb8701dcaf27edba
[ "Apache-2.0" ]
null
null
null
trainer/image/directory_iterator.py
Vottivott/mildnet
4787dc756f1abcab4f7cb57ffb8701dcaf27edba
[ "Apache-2.0" ]
null
null
null
trainer/image/directory_iterator.py
Vottivott/mildnet
4787dc756f1abcab4f7cb57ffb8701dcaf27edba
[ "Apache-2.0" ]
null
null
null
import logging import multiprocessing import os from functools import partial import numpy as np from trainer.image.iterator import MildBatchFromFilesMixin, MildIterator def _count_valid_files_in_directory(directory, white_list_formats, follow_links): """Count files with extension in `white_list_formats` contai...
42.278261
120
0.549568
import logging import multiprocessing import os from functools import partial import numpy as np from trainer.image.iterator import MildBatchFromFilesMixin, MildIterator def _count_valid_files_in_directory(directory, white_list_formats, follow_links): def _recursive_list(subpath): return sorted(os.walk...
true
true
08fc15f7e2ca61ba84e780c58777e4dc1d5d1d69
24,040
py
Python
bin/isonet.py
Heng-Z/IsoNet
f641b3deb10db4d0e63c8ab3e66a212af4b05a33
[ "MIT" ]
21
2021-07-21T06:27:11.000Z
2022-03-24T10:26:08.000Z
bin/isonet.py
Heng-Z/IsoNet
f641b3deb10db4d0e63c8ab3e66a212af4b05a33
[ "MIT" ]
14
2021-07-28T12:35:32.000Z
2022-02-19T03:23:29.000Z
bin/isonet.py
Heng-Z/IsoNet
f641b3deb10db4d0e63c8ab3e66a212af4b05a33
[ "MIT" ]
1
2021-11-08T21:16:03.000Z
2021-11-08T21:16:03.000Z
#!/usr/bin/env python3 import fire import logging import os, sys, traceback from IsoNet.util.dict2attr import Arg,check_parse,idx2list from fire import core from IsoNet.util.metadata import MetaData,Label,Item class ISONET: """ ISONET: Train on tomograms and Predict to restore missing-wedge\n for detail di...
55.391705
409
0.633403
import fire import logging import os, sys, traceback from IsoNet.util.dict2attr import Arg,check_parse,idx2list from fire import core from IsoNet.util.metadata import MetaData,Label,Item class ISONET: def prepare_star(self,folder_name, output_star='tomograms.star',pixel_size = 10.0, defocus = 0.0, number_subt...
true
true
08fc1697e1232cb685d62af42367c2c2d0779c52
264
py
Python
assoc/assoc/doctype/distribution_aide/distribution_aide.py
saidtazi/assoc
5dd5d2fe088cf40e996d917176201c17114f02a9
[ "MIT" ]
null
null
null
assoc/assoc/doctype/distribution_aide/distribution_aide.py
saidtazi/assoc
5dd5d2fe088cf40e996d917176201c17114f02a9
[ "MIT" ]
null
null
null
assoc/assoc/doctype/distribution_aide/distribution_aide.py
saidtazi/assoc
5dd5d2fe088cf40e996d917176201c17114f02a9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2020, TAZI Said and contributors # For license information, please see license.txt from __future__ import unicode_literals # import frappe from frappe.model.document import Document class DistributionAide(Document): pass
24
49
0.776515
from __future__ import unicode_literals from frappe.model.document import Document class DistributionAide(Document): pass
true
true
08fc16a41481a4303f231dd48f4160d513e564c3
4,443
py
Python
src/pretix/base/templatetags/rich_text.py
NicsTr/pretix
e6d2380d9ed1836cc64a688b2be20d00a8500eab
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/pretix/base/templatetags/rich_text.py
NicsTr/pretix
e6d2380d9ed1836cc64a688b2be20d00a8500eab
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/pretix/base/templatetags/rich_text.py
NicsTr/pretix
e6d2380d9ed1836cc64a688b2be20d00a8500eab
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
import urllib.parse import bleach import markdown from bleach import DEFAULT_CALLBACKS from bleach.linkifier import build_email_re, build_url_re from django import template from django.conf import settings from django.core import signing from django.urls import reverse from django.utils.http import url_has_allowed_hos...
26.289941
133
0.627504
import urllib.parse import bleach import markdown from bleach import DEFAULT_CALLBACKS from bleach.linkifier import build_email_re, build_url_re from django import template from django.conf import settings from django.core import signing from django.urls import reverse from django.utils.http import url_has_allowed_hos...
true
true
08fc16d01cd7e23168e04edb2acae84e00a6f1ce
5,382
py
Python
nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/ssl/sslfipssimtarget.py
culbertm/NSttyPython
ff9f6aedae3fb8495342cd0fc4247c819cf47397
[ "Apache-2.0" ]
null
null
null
nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/ssl/sslfipssimtarget.py
culbertm/NSttyPython
ff9f6aedae3fb8495342cd0fc4247c819cf47397
[ "Apache-2.0" ]
null
null
null
nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/ssl/sslfipssimtarget.py
culbertm/NSttyPython
ff9f6aedae3fb8495342cd0fc4247c819cf47397
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2008-2016 Citrix Systems, Inc. # # 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 l...
32.227545
167
0.725381
from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_resource from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_response from nssrc.com.citrix.netscaler.nitro.service.options import options from nssrc.com.citrix.netscaler.nitro.exception.nitro_exception import nitro...
true
true
08fc180d9920440c6c17b9b1fd88da7bc38f5a2c
1,390
py
Python
unplug_vif_br_ex.py
CiscoSystems/openstack-csr
42ed44b4112e088dfb2a44bb125987fe96e630a1
[ "Apache-2.0" ]
null
null
null
unplug_vif_br_ex.py
CiscoSystems/openstack-csr
42ed44b4112e088dfb2a44bb125987fe96e630a1
[ "Apache-2.0" ]
null
null
null
unplug_vif_br_ex.py
CiscoSystems/openstack-csr
42ed44b4112e088dfb2a44bb125987fe96e630a1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python import sys from oslo.config import cfg import neutron.openstack.common.gettextutils as gtutil gtutil.install('') import neutron.agent.linux.interface as vif_driver from neutronclient.neutron import client as qclient import neutronclient.common.exceptions as qcexp from neutron.agent.common import con...
24.385965
64
0.732374
import sys from oslo.config import cfg import neutron.openstack.common.gettextutils as gtutil gtutil.install('') import neutron.agent.linux.interface as vif_driver from neutronclient.neutron import client as qclient import neutronclient.common.exceptions as qcexp from neutron.agent.common import config host = sys.a...
false
true
08fc194762a1cdaf18b96dc439d1737cc7ac7056
2,404
py
Python
tests/functional/examples/test_reference_to_python.py
stanislaw/textX
cccb0e0680635e884841f7ef929b1234131716d3
[ "MIT" ]
346
2018-12-30T18:47:09.000Z
2022-03-31T23:07:13.000Z
tests/functional/examples/test_reference_to_python.py
stanislaw/textX
cccb0e0680635e884841f7ef929b1234131716d3
[ "MIT" ]
183
2018-12-27T17:22:28.000Z
2022-03-28T08:31:09.000Z
tests/functional/examples/test_reference_to_python.py
stanislaw/textX
cccb0e0680635e884841f7ef929b1234131716d3
[ "MIT" ]
46
2019-01-01T07:58:04.000Z
2022-01-01T14:15:38.000Z
from __future__ import unicode_literals from textx import metamodel_from_str from pytest import raises from textx.scoping.tools import get_unique_named_object metamodel_str = r''' Model: access+=Access ; Access: 'access' name=ID pyobj=[OBJECT] '.' pyattr=[OBJECT]? ; Comment: /\/\/.*$/; ''' class PythonScope...
27.953488
73
0.637687
from __future__ import unicode_literals from textx import metamodel_from_str from pytest import raises from textx.scoping.tools import get_unique_named_object metamodel_str = r''' Model: access+=Access ; Access: 'access' name=ID pyobj=[OBJECT] '.' pyattr=[OBJECT]? ; Comment: /\/\/.*$/; ''' class PythonScope...
true
true
08fc198f981a38b34d5ade9ddb3b17b7b9a35d77
729
py
Python
utail_base/devmode_support.py
UnlimitTail/ut-base-py
1fb1401cf1554ec31035a1a98f0f0f0a76f8f70d
[ "MIT" ]
null
null
null
utail_base/devmode_support.py
UnlimitTail/ut-base-py
1fb1401cf1554ec31035a1a98f0f0f0a76f8f70d
[ "MIT" ]
null
null
null
utail_base/devmode_support.py
UnlimitTail/ut-base-py
1fb1401cf1554ec31035a1a98f0f0f0a76f8f70d
[ "MIT" ]
null
null
null
import os import utail_base import logging import html import re from .string_support import clean_html import threading from timeit import default_timer as timer from .web_support import HttpError from .selenium_pool import SeleniumPool def processBootStrap(useChdir=True, useLogger=True, logFilePath='/tmp/logFileName...
33.136364
101
0.762689
import os import utail_base import logging import html import re from .string_support import clean_html import threading from timeit import default_timer as timer from .web_support import HttpError from .selenium_pool import SeleniumPool def processBootStrap(useChdir=True, useLogger=True, logFilePath='/tmp/logFileName...
true
true
08fc1a98306e12a3839bc911fb759f29eed0cdfc
2,857
py
Python
perceptron.py
gbenznyc/neural-network
84a7127cf5107facce0a5504f299e84135aa199f
[ "MIT" ]
null
null
null
perceptron.py
gbenznyc/neural-network
84a7127cf5107facce0a5504f299e84135aa199f
[ "MIT" ]
null
null
null
perceptron.py
gbenznyc/neural-network
84a7127cf5107facce0a5504f299e84135aa199f
[ "MIT" ]
null
null
null
import numpy as np class Perceptron: def __init__(self, input_nodes, learning_rate, epochs=50, one_output=False): self.input_nodes = input_nodes self.learning_rate = learning_rate self.epochs = epochs self.one_output = one_output #Initialize weights, we add one to the input_nodes #to account for the extr...
32.101124
86
0.696535
import numpy as np class Perceptron: def __init__(self, input_nodes, learning_rate, epochs=50, one_output=False): self.input_nodes = input_nodes self.learning_rate = learning_rate self.epochs = epochs self.one_output = one_output self.weights = np.random.uniform(low=-0.15, high=0.15, size=(input_nodes ...
true
true
08fc1bd78005e4e8aa41e3bcd53e0e3738561821
2,867
py
Python
esp32/esp32_ble.py
sunnymax2002/embedded
aa49955a3aaffc6f2548e913027aa6ef64b226f2
[ "MIT" ]
null
null
null
esp32/esp32_ble.py
sunnymax2002/embedded
aa49955a3aaffc6f2548e913027aa6ef64b226f2
[ "MIT" ]
null
null
null
esp32/esp32_ble.py
sunnymax2002/embedded
aa49955a3aaffc6f2548e913027aa6ef64b226f2
[ "MIT" ]
null
null
null
# Code Reference: https://forum.micropython.org/viewtopic.php?t=8645 from machine import Pin, Timer from time import sleep_ms import ubluetooth from esp32 import raw_temperature class BLE(): def __init__(self, name): # Stores connection status self._status = False self.name = name ...
31.163043
104
0.565051
from machine import Pin, Timer from time import sleep_ms import ubluetooth from esp32 import raw_temperature class BLE(): def __init__(self, name): self._status = False self.name = name self.ble = ubluetooth.BLE() self.ble.active(True) self.led = Pin(2, Pin.OU...
true
true
08fc1c1f5b5835511d99558f995f50d0ec0dfc89
402
py
Python
src/main.py
vishaltanwar96/Py-iTrack
53fbd73829320337f204f3d03ec667ffa3477592
[ "MIT" ]
4
2020-08-06T11:07:20.000Z
2020-11-20T15:45:13.000Z
src/main.py
vishaltanwar96/Py-iTrack
53fbd73829320337f204f3d03ec667ffa3477592
[ "MIT" ]
null
null
null
src/main.py
vishaltanwar96/Py-iTrack
53fbd73829320337f204f3d03ec667ffa3477592
[ "MIT" ]
null
null
null
import sys from app import Application app = Application.get_instance(__name__) if __name__ == '__main__': """Entry Point to Application""" try: app.run(host=app.config['HOST'], port=app.config['PORT']) except Exception as exc: tc, te, tb = sys.exc_info() print('Class: {} | Exc...
23.647059
111
0.624378
import sys from app import Application app = Application.get_instance(__name__) if __name__ == '__main__': try: app.run(host=app.config['HOST'], port=app.config['PORT']) except Exception as exc: tc, te, tb = sys.exc_info() print('Class: {} | Exception: {} | Line Number: {} | File: ...
true
true
08fc1c31e08ea3f5194b98c820b75dab2d025294
2,223
py
Python
google_image_search_service.py
kakkoyun/image_searcher
1762049c6ce6ba576c3b4464f266dcbd43d270cd
[ "MIT" ]
4
2017-02-09T10:02:28.000Z
2018-01-24T21:26:06.000Z
google_image_search_service.py
kakkoyun/image-searcher
1762049c6ce6ba576c3b4464f266dcbd43d270cd
[ "MIT" ]
null
null
null
google_image_search_service.py
kakkoyun/image-searcher
1762049c6ce6ba576c3b4464f266dcbd43d270cd
[ "MIT" ]
1
2017-02-14T06:14:54.000Z
2017-02-14T06:14:54.000Z
import logging import json from googleapiclient.discovery import build logger = logging.getLogger(__name__) class GoogleImageSearchService: DEFAULT_SEARCH_FIELDS = 'items(fileFormat,image(byteSize,height,width),labels,link,mime,snippet,title),queries,searchInformation(searchTime,totalResults)' DEFAULT_PAGE_...
30.040541
158
0.59874
import logging import json from googleapiclient.discovery import build logger = logging.getLogger(__name__) class GoogleImageSearchService: DEFAULT_SEARCH_FIELDS = 'items(fileFormat,image(byteSize,height,width),labels,link,mime,snippet,title),queries,searchInformation(searchTime,totalResults)' DEFAULT_PAGE_...
true
true
08fc1d14f94121d96158232f7341b6028da77965
1,042
py
Python
src/open.py
romberli/alfred-cal
5c7a0c10e4239bf61646ec5a2010979f79760045
[ "MIT" ]
69
2015-01-02T02:16:50.000Z
2022-03-29T05:55:26.000Z
src/open.py
tudr/alfred-cal
b44d5a779d7267722aa98295b7b6147ef9c21d1c
[ "MIT" ]
16
2015-01-01T04:04:00.000Z
2021-02-10T16:12:20.000Z
src/open.py
tudr/alfred-cal
b44d5a779d7267722aa98295b7b6147ef9c21d1c
[ "MIT" ]
10
2016-03-29T11:04:57.000Z
2022-03-30T09:42:32.000Z
#!/usr/bin/python # encoding: utf-8 import subprocess from config import Config applescript_name_tem = "osascript/open_%s.scpt" arg_tem = { "calendar": "%s %s %s", "fantastical": "%s-%s-%s", "busycal": "%s-%s-%s", "google": "%s%s%s" } SOFTWARE = 'software' def open_cal(arg): arg = arg.strip() ...
23.155556
82
0.621881
import subprocess from config import Config applescript_name_tem = "osascript/open_%s.scpt" arg_tem = { "calendar": "%s %s %s", "fantastical": "%s-%s-%s", "busycal": "%s-%s-%s", "google": "%s%s%s" } SOFTWARE = 'software' def open_cal(arg): arg = arg.strip() if arg.endswith(".json"): ...
true
true
08fc1d47e051688389b7c25ee4fd5e18fe97dd66
12,203
py
Python
input_fn/input_fn_2d/data_gen_2dt/data_gen_t2d_util/triangle_2d_helper.py
JochenZoellner/tf_neiss-1
c91019e5bce6d3c7512237eec5ea997fd95304ac
[ "Apache-2.0" ]
null
null
null
input_fn/input_fn_2d/data_gen_2dt/data_gen_t2d_util/triangle_2d_helper.py
JochenZoellner/tf_neiss-1
c91019e5bce6d3c7512237eec5ea997fd95304ac
[ "Apache-2.0" ]
1
2020-08-07T13:04:43.000Z
2020-08-10T12:32:46.000Z
input_fn/input_fn_2d/data_gen_2dt/data_gen_t2d_util/triangle_2d_helper.py
JochenZoellner/tf_neiss-1
c91019e5bce6d3c7512237eec5ea997fd95304ac
[ "Apache-2.0" ]
1
2019-12-16T15:46:45.000Z
2019-12-16T15:46:45.000Z
import logging import numpy as np class Fcalculator: def __init__(self, p1=np.array([0.0, 0.0]), p2=np.array([1.0, 0.0]), p3=np.array([0.0, 1.0]), epsilon=np.array(0.0001), no_check=False, complex_phi=False): self._p1 = np.array(p1, dtype=np.float128) self._p2 = np.array(p2, dtyp...
45.364312
121
0.535524
import logging import numpy as np class Fcalculator: def __init__(self, p1=np.array([0.0, 0.0]), p2=np.array([1.0, 0.0]), p3=np.array([0.0, 1.0]), epsilon=np.array(0.0001), no_check=False, complex_phi=False): self._p1 = np.array(p1, dtype=np.float128) self._p2 = np.array(p2, dtyp...
true
true
08fc1db7e96a497546a3be1169c354ac539d18d4
37,318
py
Python
fairseq/models/rand_noise_transformer.py
sinhngn/Context-Aware
1b8497cf76e269f50b763dad641d8fdd5e8df599
[ "BSD-3-Clause" ]
40
2020-05-14T20:32:42.000Z
2022-03-07T03:30:49.000Z
fairseq/models/rand_noise_transformer.py
lhcoder/Context-Aware
ba7fae6f713336451e43ed74917b8c15ae604517
[ "BSD-3-Clause" ]
2
2020-07-03T12:41:44.000Z
2020-07-12T10:19:25.000Z
fairseq/models/rand_noise_transformer.py
lhcoder/Context-Aware
ba7fae6f713336451e43ed74917b8c15ae604517
[ "BSD-3-Clause" ]
11
2020-05-19T15:59:58.000Z
2021-01-26T16:15:56.000Z
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import math import torch import t...
44.53222
119
0.658154
import math import torch import torch.nn as nn import torch.nn.functional as F from fairseq import options, utils from fairseq.modules import ( AdaptiveInput, AdaptiveSoftmax, CharacterTokenEmbedder, LayerNorm, LearnedPositionalEmbedding, MultiheadAttention, SinusoidalPositionalEmbedding, RelativeMultihe...
true
true
08fc1e8334bcab175646ba15396242deeb8a3582
30,976
py
Python
measurements/api/private.py
SaptakS/api
385cc5deba11e0c4a01c1723ecd99c5239a92a6f
[ "BSD-3-Clause" ]
null
null
null
measurements/api/private.py
SaptakS/api
385cc5deba11e0c4a01c1723ecd99c5239a92a6f
[ "BSD-3-Clause" ]
null
null
null
measurements/api/private.py
SaptakS/api
385cc5deba11e0c4a01c1723ecd99c5239a92a6f
[ "BSD-3-Clause" ]
null
null
null
""" prefix: /api/_ In here live private API endpoints for use only by OONI services. You should not rely on these as they are likely to change, break in unexpected ways. Also there is no versioning on them. """ from datetime import datetime, timedelta from dateutil.relativedelta import relativedelta from urllib.parse...
31.543788
131
0.60634
from datetime import datetime, timedelta from dateutil.relativedelta import relativedelta from urllib.parse import urljoin, urlencode import json import math import requests from flask import Blueprint, current_app, request from flask.json import jsonify from sqlalchemy import func, and_, or_, distinct, sql, selec...
true
true
08fc1f3a9f7dbd785de7651176dc2a3c12d717aa
6,759
py
Python
stats/contrast_cluster_perm/cluster_correction.py
athiede13/free_speech
bde32c2d48724c98f089376876cf9888f67a9f20
[ "MIT" ]
null
null
null
stats/contrast_cluster_perm/cluster_correction.py
athiede13/free_speech
bde32c2d48724c98f089376876cf9888f67a9f20
[ "MIT" ]
null
null
null
stats/contrast_cluster_perm/cluster_correction.py
athiede13/free_speech
bde32c2d48724c98f089376876cf9888f67a9f20
[ "MIT" ]
null
null
null
""" Apply cluster correction for independent-samples T-test based on spatial proximity and cluster size. Inspired by MNE tutorial. Created on Fri Feb 22 13:21:40 2019 @author: Anja Thiede <anja.thiede@helsinki.fi> """ import numpy as np from scipy import stats from scipy.io import loadmat import matplotlib.pyplot as...
45.06
100
0.47078
import numpy as np from scipy import stats from scipy.io import loadmat import matplotlib.pyplot as plt import os from permutation_cluster_test_AT import _permutation_cluster_test_AT print(__doc__) conn = '/media/cbru/SMEDY/scripts_speech_rest/stats/mantel/connectivity.npy' results_dir = '/media/cbru/SMEDY/results...
true
true
08fc1fa1724d319558fad0a1c71e86dc8c366d50
6,993
py
Python
wtc/wtc.py
osu-anticheat/wtc-lzma-compressor
bc67eeea6928f505b65e90b2884067c23671bf9d
[ "MIT" ]
1
2020-12-17T23:48:37.000Z
2020-12-17T23:48:37.000Z
wtc/wtc.py
circleguard/wtc-lzma-compressor
bc67eeea6928f505b65e90b2884067c23671bf9d
[ "MIT" ]
1
2019-02-01T16:44:25.000Z
2019-02-02T21:15:15.000Z
wtc/wtc.py
circleguard/wtc-lzma-compressor
bc67eeea6928f505b65e90b2884067c23671bf9d
[ "MIT" ]
1
2019-02-02T19:36:15.000Z
2019-02-02T19:36:15.000Z
import lzma import struct import numpy as np def unsorted_diff_pack_16_8(int16s): """ Packs the differential of the input to bytes in little endian order. Args: List ints16s: The list of shorts to differentially compress. Returns: The differential data as a list of bytes...
25.064516
120
0.540541
import lzma import struct import numpy as np def unsorted_diff_pack_16_8(int16s): escape = -2 ** 7 small = 2 ** 7 - 1 start = int16s[0] diff = np.diff(int16s) packed = [] def pack(word): if abs(word) <= small: packed.append(word) else: ...
true
true
08fc20de443ed8e2b211842182222e7efec6db0a
16,363
py
Python
kitsune/wiki/migrations/0008_auto__add_field_document_share_link.py
Dinodog/kitsune
3c8ee61a57bb9b4bd9e6a6c2ace7cf6029f3235b
[ "BSD-3-Clause" ]
1
2020-11-03T23:46:56.000Z
2020-11-03T23:46:56.000Z
kitsune/wiki/migrations/0008_auto__add_field_document_share_link.py
983834572/kitsune
d4b3dcdce3294214dbc659c375c8491504473213
[ "BSD-3-Clause" ]
8
2020-06-05T18:42:14.000Z
2022-03-11T23:26:51.000Z
kitsune/wiki/migrations/0008_auto__add_field_document_share_link.py
safwanrahman/Ford
87e91dea1cc22b1759eea81cef069359ccb5cd0b
[ "BSD-3-Clause" ]
1
2020-11-03T23:47:55.000Z
2020-11-03T23:47:55.000Z
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Document.share_link' db.add_column(u'wiki_document', 'share_link', sel...
83.484694
195
0.568111
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.add_column(u'wiki_document', 'share_link', self.gf('django.db.models.fields.CharField')(default='', max_len...
true
true
08fc215b0f662a53adfd8fd5aed9068f1adcb759
6,103
py
Python
visualization/simple_data_vis.py
Just-DIRECT-Capstone/Protein-Purification-Model-Public
cf18d9669dfc4d49e53bb3e6e78c06cb42bf404a
[ "MIT" ]
1
2021-10-11T10:15:14.000Z
2021-10-11T10:15:14.000Z
visualization/simple_data_vis.py
Just-DIRECT-Capstone/Protein-Purification-Model-Public
cf18d9669dfc4d49e53bb3e6e78c06cb42bf404a
[ "MIT" ]
1
2021-04-30T16:24:12.000Z
2021-05-04T22:17:31.000Z
visualization/simple_data_vis.py
Just-DIRECT-Capstone/Protein-Purification-Model-Public
cf18d9669dfc4d49e53bb3e6e78c06cb42bf404a
[ "MIT" ]
null
null
null
"""imports""" from inspect import isdatadescriptor import numpy as np import matplotlib.pyplot as plt import utils from surrogate_models.nn_defs import multi_mse def histograms(data,x_data,y_data): """builds histograms""" n_outputs = len(y_data) n_inputs = len(x_data) n_gen = int(np.ceil(n_inputs**0.5)...
42.678322
134
0.560708
from inspect import isdatadescriptor import numpy as np import matplotlib.pyplot as plt import utils from surrogate_models.nn_defs import multi_mse def histograms(data,x_data,y_data): n_outputs = len(y_data) n_inputs = len(x_data) n_gen = int(np.ceil(n_inputs**0.5)) fig, axis = plt.subplots(n_gen, n_g...
true
true
08fc2221f51c38d2cf00c8e7dd5862180cb03b2b
2,965
py
Python
samples/disable_sync_service.py
kevinsigwart/ArcREST
2d83bd87e23f3f78d6bba2131e6d47cf8e2e07c1
[ "Apache-2.0" ]
208
2015-01-08T18:14:02.000Z
2022-03-31T02:45:42.000Z
samples/disable_sync_service.py
kevinsigwart/ArcREST
2d83bd87e23f3f78d6bba2131e6d47cf8e2e07c1
[ "Apache-2.0" ]
279
2015-01-16T16:30:35.000Z
2020-03-31T11:57:47.000Z
samples/disable_sync_service.py
kevinsigwart/ArcREST
2d83bd87e23f3f78d6bba2131e6d47cf8e2e07c1
[ "Apache-2.0" ]
164
2015-01-21T13:49:05.000Z
2021-12-01T18:13:05.000Z
""" This sample shows how to disable sync on a feature service CSV requires the following fields - itemid - ID of AGOL item """ import arcrest from arcrest.security import AGOLTokenSecurityHandler from arcrest.security import PortalTokenSecurityHandler import os, datetime import csv import ar...
33.314607
81
0.57774
""" This sample shows how to disable sync on a feature service CSV requires the following fields - itemid - ID of AGOL item """ import arcrest from arcrest.security import AGOLTokenSecurityHandler from arcrest.security import PortalTokenSecurityHandler import os, datetime import csv import ar...
false
true
08fc241e32adcb5c88d1986fe156f4e71c685e5f
1,561
py
Python
cpg_transformer/camelia.py
Jonbroad15/cpg-transformer
2d2a1ca787bb25869f3981ba977632fc0d2b5eb1
[ "MIT" ]
10
2021-05-28T16:51:35.000Z
2022-02-08T04:05:18.000Z
cpg_transformer/camelia.py
Jonbroad15/cpg-transformer
2d2a1ca787bb25869f3981ba977632fc0d2b5eb1
[ "MIT" ]
1
2021-11-04T17:53:03.000Z
2021-12-01T13:48:10.000Z
cpg_transformer/camelia.py
Jonbroad15/cpg-transformer
2d2a1ca787bb25869f3981ba977632fc0d2b5eb1
[ "MIT" ]
4
2021-07-20T08:05:12.000Z
2022-03-30T12:14:59.000Z
from catboost import CatBoostClassifier import pandas as pd import numpy as np class CaMeliaModel(): def __init__(self, dropnans=False, learning_rate=0.1, max_depth=7, verbose=100, eval_metric='AUC', device='GPU', train_dir=None): self.dropnans = dropnans self.model = CatBoostClass...
41.078947
105
0.586163
from catboost import CatBoostClassifier import pandas as pd import numpy as np class CaMeliaModel(): def __init__(self, dropnans=False, learning_rate=0.1, max_depth=7, verbose=100, eval_metric='AUC', device='GPU', train_dir=None): self.dropnans = dropnans self.model = CatBoostClass...
true
true
08fc25cafde7e9c9293835dc780250f996349401
152
py
Python
loggingsetup/setup.py
MCardus/GuruFinder
cfa6b9fb0401a0fd9e637c5549b69d49b6b857e5
[ "MIT" ]
null
null
null
loggingsetup/setup.py
MCardus/GuruFinder
cfa6b9fb0401a0fd9e637c5549b69d49b6b857e5
[ "MIT" ]
1
2021-06-01T22:28:57.000Z
2021-06-01T22:28:57.000Z
loggingsetup/setup.py
MCardus/GuruFinder
cfa6b9fb0401a0fd9e637c5549b69d49b6b857e5
[ "MIT" ]
null
null
null
from distutils.core import setup setup( name='loggingsetup', version='0.1', license='MIT', long_description=open('README.md').read() )
16.888889
45
0.657895
from distutils.core import setup setup( name='loggingsetup', version='0.1', license='MIT', long_description=open('README.md').read() )
true
true
08fc25e22391f5ddcab2d93eb4daa5ede852d6a3
606
py
Python
spotify/migrations/0004_auto_20210329_0103.py
SU-Palm/spotify_main
119f2023619784432b5825f95d5726dac7214bd6
[ "MIT" ]
2
2021-03-07T22:35:50.000Z
2021-03-14T18:52:39.000Z
spotify/migrations/0004_auto_20210329_0103.py
SU-Palm/spotify_main
119f2023619784432b5825f95d5726dac7214bd6
[ "MIT" ]
null
null
null
spotify/migrations/0004_auto_20210329_0103.py
SU-Palm/spotify_main
119f2023619784432b5825f95d5726dac7214bd6
[ "MIT" ]
null
null
null
# Generated by Django 3.1.7 on 2021-03-29 01:03 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('spotify', '0003_account'), ] operations = [ migrations.AddField( model_name='account', name='high_age', ...
25.25
89
0.590759
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('spotify', '0003_account'), ] operations = [ migrations.AddField( model_name='account', name='high_age', field=models.IntegerField(blank=True, null=True,...
true
true
08fc266e4c90989627bd9c81e737c88d8774b332
109,886
py
Python
cvpysdk/subclient.py
sridhargoudrangu/cvpysdk
c8fb9c38d3171bfb459fae416b4ac97700360ba6
[ "Apache-2.0" ]
null
null
null
cvpysdk/subclient.py
sridhargoudrangu/cvpysdk
c8fb9c38d3171bfb459fae416b4ac97700360ba6
[ "Apache-2.0" ]
null
null
null
cvpysdk/subclient.py
sridhargoudrangu/cvpysdk
c8fb9c38d3171bfb459fae416b4ac97700360ba6
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # -------------------------------------------------------------------------- # Copyright Commvault Systems, Inc. # # 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 a...
38.897699
120
0.524562
from __future__ import absolute_import from __future__ import unicode_literals import math import time import copy from base64 import b64encode from past.builtins import basestring from future.standard_library import install_aliases from .job import Job from .job import JobController from .schedules i...
true
true
08fc27792fd8d7f812c0731476bf4d427ece49a0
484
py
Python
exercises/Hackerrank_01_matrix_sum.py
Felipalds/algorithms-and-data-structure
cbd698b673499ce8fcec6227b04b3ecabd99f146
[ "MIT" ]
null
null
null
exercises/Hackerrank_01_matrix_sum.py
Felipalds/algorithms-and-data-structure
cbd698b673499ce8fcec6227b04b3ecabd99f146
[ "MIT" ]
null
null
null
exercises/Hackerrank_01_matrix_sum.py
Felipalds/algorithms-and-data-structure
cbd698b673499ce8fcec6227b04b3ecabd99f146
[ "MIT" ]
null
null
null
#Given an square matrix , calculate the absolute sum of its diagonals m = [[11, 2, 4], [4, 5, 6], [10, 8, -12]] leftSum = 0 rightSum = 0 iRight = 0 jRight = len(m[0]) - 1 for i in range(len(m)): for j in range(len(m[i])): while jRight >= 0: rightSum = rightSum + m[iRight][jRight] iR...
28.470588
69
0.551653
m = [[11, 2, 4], [4, 5, 6], [10, 8, -12]] leftSum = 0 rightSum = 0 iRight = 0 jRight = len(m[0]) - 1 for i in range(len(m)): for j in range(len(m[i])): while jRight >= 0: rightSum = rightSum + m[iRight][jRight] iRight = iRight + 1 jRight = jRight - 1 if i == j: ...
true
true
08fc27ad4da2667769ef829edd34229a4be4969c
7,554
py
Python
azure-devops/azext_devops/dev/team/arguments.py
mitchdenny/azure-devops-cli-extension
3a01c5b5d0c58dfa07f4e7803e0e0bdf7b61d630
[ "MIT" ]
null
null
null
azure-devops/azext_devops/dev/team/arguments.py
mitchdenny/azure-devops-cli-extension
3a01c5b5d0c58dfa07f4e7803e0e0bdf7b61d630
[ "MIT" ]
null
null
null
azure-devops/azext_devops/dev/team/arguments.py
mitchdenny/azure-devops-cli-extension
3a01c5b5d0c58dfa07f4e7803e0e0bdf7b61d630
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
54.345324
116
0.66071
from knack.arguments import enum_choice_list from azure.cli.core.commands.parameters import get_enum_type from azext_devops.dev.common.const import _TRUE_FALSE_SWITCH from .const import (SERVICE_ENDPOINT_AUTHORIZATION_PERSONAL_ACCESS_TOKEN, SERVICE_ENDPOINT_TYPE_GITHUB, SERVICE...
true
true
08fc286426f22e3bcd57c604b40dc432385d55fe
9,146
py
Python
sensor.py
slashx57/HA_teleinfo
2a1ed32bdbf1fa740b84d9b8382d8c0fc44d4fa7
[ "MIT" ]
1
2021-01-10T13:42:42.000Z
2021-01-10T13:42:42.000Z
sensor.py
slashx57/HA_teleinfo
2a1ed32bdbf1fa740b84d9b8382d8c0fc44d4fa7
[ "MIT" ]
null
null
null
sensor.py
slashx57/HA_teleinfo
2a1ed32bdbf1fa740b84d9b8382d8c0fc44d4fa7
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import time import optparse import logging from datetime import timedelta import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( CONF_NAME, CONF_R...
34.775665
229
0.624317
import sys import time import optparse import logging from datetime import timedelta import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( CONF_NAME, CONF_RESOURCES, STATE_UNKNOWN, ATTR_ATTRIBUTION)...
true
true
08fc28ce55478bbefdf1e5a9cbe82356faaa2d0a
507
py
Python
env/lib/python3.8/site-packages/plotly/validators/scattermapbox/marker/colorbar/_tickcolor.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
76
2020-07-06T14:44:05.000Z
2022-02-14T15:30:21.000Z
env/lib/python3.8/site-packages/plotly/validators/scattermapbox/marker/colorbar/_tickcolor.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
11
2020-08-09T02:30:14.000Z
2022-03-12T00:50:14.000Z
env/lib/python3.8/site-packages/plotly/validators/scattermapbox/marker/colorbar/_tickcolor.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
11
2020-07-12T16:18:07.000Z
2022-02-05T16:48:35.000Z
import _plotly_utils.basevalidators class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="scattermapbox.marker.colorbar", **kwargs ): super(TickcolorValidator, self).__init__( plotly_...
28.166667
70
0.619329
import _plotly_utils.basevalidators class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="scattermapbox.marker.colorbar", **kwargs ): super(TickcolorValidator, self).__init__( plotly_...
true
true
08fc2935d9f685404f25477a33672a5673b3c0c4
857
py
Python
toggle.py
joshprewitt/dash-lights
1f6dc62b2e3dea7882835a263d379bdb29d8c0a2
[ "MIT" ]
null
null
null
toggle.py
joshprewitt/dash-lights
1f6dc62b2e3dea7882835a263d379bdb29d8c0a2
[ "MIT" ]
null
null
null
toggle.py
joshprewitt/dash-lights
1f6dc62b2e3dea7882835a263d379bdb29d8c0a2
[ "MIT" ]
null
null
null
#!/usr/bin/env python from scapy.all import * import requests,json bridgeIP = "192.168.1.72" #IP Address of your Bridge user = "newdeveloper" #Username you generated dashMac = "74:c2:46:5a:57:62" #MAC address of your Dash button lightID = "8" #ID of ...
31.740741
81
0.606768
from scapy.all import * import requests,json bridgeIP = "192.168.1.72" user = "newdeveloper" dashMac = "74:c2:46:5a:57:62" lightID = "8" def toggle(lightID): url = "http://"+bridgeIP+"/api/"+user+"/lights/"+lightID r = requests.get(url) data = js...
false
true
08fc2a430a2858f1eb698dd0f0077d49d5073990
10,070
py
Python
python/onshape_client/oas/models/btp_property_accessor23.py
toebes/onshape-clients
a26cf6a77cfc7901321e603d5a097e23eb51e35c
[ "MIT" ]
14
2019-06-23T08:47:41.000Z
2021-11-29T16:28:45.000Z
python/onshape_client/oas/models/btp_property_accessor23.py
toebes/onshape-clients
a26cf6a77cfc7901321e603d5a097e23eb51e35c
[ "MIT" ]
40
2019-05-22T14:39:46.000Z
2022-03-10T10:36:17.000Z
python/onshape_client/oas/models/btp_property_accessor23.py
toebes/onshape-clients
a26cf6a77cfc7901321e603d5a097e23eb51e35c
[ "MIT" ]
24
2019-06-02T01:03:41.000Z
2022-03-29T13:25:36.000Z
# coding: utf-8 """ Onshape REST API The Onshape REST API consumed by all clients. # noqa: E501 The version of the OpenAPI document: 1.113 Contact: api-support@onshape.zendesk.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 im...
38.143939
100
0.620258
from __future__ import absolute_import import re import sys import six import nulltype from onshape_client.oas.model_utils import ( ModelComposed, ModelNormal, ModelSimple, date, datetime, file_type, int, none_type, str, validate_get_composed_info, ) try: from onsh...
true
true
08fc2b105794edb2b5e7a47040fdcb2de6f9f4cb
3,553
py
Python
discordbot/stocks/options/unu.py
minhhoang1023/GamestonkTerminal
195dc19b491052df080178c0cc6a9d535a91a704
[ "MIT" ]
1
2022-02-18T04:02:52.000Z
2022-02-18T04:02:52.000Z
discordbot/stocks/options/unu.py
minhhoang1023/GamestonkTerminal
195dc19b491052df080178c0cc6a9d535a91a704
[ "MIT" ]
null
null
null
discordbot/stocks/options/unu.py
minhhoang1023/GamestonkTerminal
195dc19b491052df080178c0cc6a9d535a91a704
[ "MIT" ]
null
null
null
import df2img import disnake import numpy as np import pandas as pd import requests from PIL import Image import discordbot.config_discordbot as cfg from discordbot.config_discordbot import logger from discordbot.helpers import autocrop_image from gamestonk_terminal.helper_funcs import get_user_agent async def unu_c...
29.363636
102
0.497326
import df2img import disnake import numpy as np import pandas as pd import requests from PIL import Image import discordbot.config_discordbot as cfg from discordbot.config_discordbot import logger from discordbot.helpers import autocrop_image from gamestonk_terminal.helper_funcs import get_user_agent async def unu_c...
true
true
08fc2c47174c7e7c6bd690009186737b4540bafa
146
py
Python
seafileapi/admin.py
ilyaglow/python-seafile
93d220204be0ab191a321c1bddbef5f6ec043762
[ "Apache-2.0" ]
31
2015-05-09T21:16:50.000Z
2022-01-16T04:05:48.000Z
seafileapi/admin.py
ilyaglow/python-seafile
93d220204be0ab191a321c1bddbef5f6ec043762
[ "Apache-2.0" ]
10
2015-06-02T02:26:24.000Z
2021-11-21T15:47:41.000Z
seafileapi/admin.py
ilyaglow/python-seafile
93d220204be0ab191a321c1bddbef5f6ec043762
[ "Apache-2.0" ]
37
2015-05-10T09:39:34.000Z
2022-02-22T19:51:45.000Z
class SeafileAdmin(object): def lists_users(self, maxcount=100): pass def list_user_repos(self, username): pass
18.25
40
0.616438
class SeafileAdmin(object): def lists_users(self, maxcount=100): pass def list_user_repos(self, username): pass
true
true
08fc2c7f26de3d57beace4c3e575f8532b0911e1
2,800
py
Python
homeassistant/components/sonarr/__init__.py
formatBCE/HA-core
66a055d80a14406b6b953d75c757ca8cfd99682e
[ "Apache-2.0" ]
5
2018-10-23T14:15:05.000Z
2021-11-26T06:38:44.000Z
homeassistant/components/sonarr/__init__.py
formatBCE/HA-core
66a055d80a14406b6b953d75c757ca8cfd99682e
[ "Apache-2.0" ]
64
2020-11-03T13:35:27.000Z
2022-03-31T06:04:00.000Z
homeassistant/components/sonarr/__init__.py
formatBCE/HA-core
66a055d80a14406b6b953d75c757ca8cfd99682e
[ "Apache-2.0" ]
2
2019-06-11T12:13:14.000Z
2020-12-24T23:17:53.000Z
"""The Sonarr component.""" from __future__ import annotations from datetime import timedelta import logging from sonarr import Sonarr, SonarrAccessRestricted, SonarrError from homeassistant.config_entries import ConfigEntry from homeassistant.const import ( CONF_API_KEY, CONF_HOST, CONF_PORT, CONF_S...
28.865979
82
0.715357
from __future__ import annotations from datetime import timedelta import logging from sonarr import Sonarr, SonarrAccessRestricted, SonarrError from homeassistant.config_entries import ConfigEntry from homeassistant.const import ( CONF_API_KEY, CONF_HOST, CONF_PORT, CONF_SSL, CONF_VERIFY_SSL, ) f...
true
true
08fc2d3b77c76200936d4a22dd384e87ab07eb0a
3,172
py
Python
server/DjangoApp/dashboard/clientManager/migrations/0011_auto_20170421_2145.py
nakamura9/deploy_ad_server
654b874381c88c29e3f6fd7ffdfb728ea3b03c80
[ "MIT" ]
null
null
null
server/DjangoApp/dashboard/clientManager/migrations/0011_auto_20170421_2145.py
nakamura9/deploy_ad_server
654b874381c88c29e3f6fd7ffdfb728ea3b03c80
[ "MIT" ]
null
null
null
server/DjangoApp/dashboard/clientManager/migrations/0011_auto_20170421_2145.py
nakamura9/deploy_ad_server
654b874381c88c29e3f6fd7ffdfb728ea3b03c80
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-04-21 19:45 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('clientManager', '0010_auto_20170408_1301'), ] oper...
39.160494
114
0.57377
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('clientManager', '0010_auto_20170408_1301'), ] operations = [ migrations.CreateModel( name='ad_schedule'...
true
true
08fc2e3855e9a92718d3004f822a0b28bf9f88d1
718
py
Python
1stRound/Easy/404 Sum of Left Leaves/Inorder.py
ericchen12377/Leetcode-Algorithm-Python
eb58cd4f01d9b8006b7d1a725fc48910aad7f192
[ "MIT" ]
2
2020-04-24T18:36:52.000Z
2020-04-25T00:15:57.000Z
1stRound/Easy/404 Sum of Left Leaves/Inorder.py
ericchen12377/Leetcode-Algorithm-Python
eb58cd4f01d9b8006b7d1a725fc48910aad7f192
[ "MIT" ]
null
null
null
1stRound/Easy/404 Sum of Left Leaves/Inorder.py
ericchen12377/Leetcode-Algorithm-Python
eb58cd4f01d9b8006b7d1a725fc48910aad7f192
[ "MIT" ]
null
null
null
#Definition for a binary tree node. class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: def sumOfLeftLeaves(self, root): """ :type root: TreeNode :rtype: int """ if not root: return 0 self...
26.592593
58
0.557103
class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: def sumOfLeftLeaves(self, root): if not root: return 0 self.sum = 0 self.inOrder(root) return self.sum def inOrder(self, root): if not root...
true
true
08fc2e91e7c80a0edd426445ebcf65ae92c60a74
11,169
py
Python
main.py
bigaidream-projects/citylearn-2020-pikapika
8c9389eb4b4e979faf269b8c0ce87b499af97ac1
[ "Apache-2.0" ]
3
2021-12-20T03:40:55.000Z
2022-02-02T04:26:33.000Z
main.py
bigaidream-projects/citylearn-2020-pikapika
8c9389eb4b4e979faf269b8c0ce87b499af97ac1
[ "Apache-2.0" ]
null
null
null
main.py
bigaidream-projects/citylearn-2020-pikapika
8c9389eb4b4e979faf269b8c0ce87b499af97ac1
[ "Apache-2.0" ]
4
2022-02-11T20:30:51.000Z
2022-02-27T01:17:34.000Z
import os import argparse from collections import OrderedDict from pathlib import Path import torch import torch.nn as nn from torch.utils.tensorboard import SummaryWriter from citylearn import CityLearn from agent import RL_Agents from utils.io import get_output_folder from reward_function import reward_function fro...
38.381443
158
0.670875
import os import argparse from collections import OrderedDict from pathlib import Path import torch import torch.nn as nn from torch.utils.tensorboard import SummaryWriter from citylearn import CityLearn from agent import RL_Agents from utils.io import get_output_folder from reward_function import reward_function fro...
true
true
08fc2f7d509a05cc37a89bbafd3d5eaed3f479d2
3,185
py
Python
qwiic_library_examples/VL53L1X/ex2_set_short_distance_mode.py
sparkfun/sparkfun_autonomous_kit
2d3339167240ff061c50b79215e555aa96dd7170
[ "MIT" ]
4
2020-02-17T18:09:43.000Z
2021-03-07T20:01:22.000Z
qwiic_library_examples/VL53L1X/ex2_set_short_distance_mode.py
sparkfun/sparkfun_autonomous_kit
2d3339167240ff061c50b79215e555aa96dd7170
[ "MIT" ]
null
null
null
qwiic_library_examples/VL53L1X/ex2_set_short_distance_mode.py
sparkfun/sparkfun_autonomous_kit
2d3339167240ff061c50b79215e555aa96dd7170
[ "MIT" ]
2
2021-03-08T04:18:35.000Z
2021-03-09T19:39:20.000Z
#----------------------------------------------------------------------- # VL53L1X - Example 2 #----------------------------------------------------------------------- # # Ported by SparkFun Electronics, October 2019 # Author: Nathan Seidle # Ported: Wes Furuya # SparkFun Electronics # # License: This code is public ...
37.916667
83
0.683516
import qwiic import time print("VL53L1X Qwiic Test\n") ToF = qwiic.QwiicVL53L1X() if (ToF.SensorInit() == None): print("Sensor online!\n") ToF.SetDistanceMode(1) while True: try: ToF.StartRanging() time.sleep(.005) distance = ToF.GetDistance() time.sleep(.005) ToF.StopRanging() distance...
true
true
08fc2fd56ef5e3f4b9ba961a3fa911a553c01128
377
py
Python
dephell_pythons/pep514tools/__init__.py
espdev/dephell_pythons
e1848f8228cde07aaee9bc8ae3a4652727b0e0c8
[ "MIT" ]
null
null
null
dephell_pythons/pep514tools/__init__.py
espdev/dephell_pythons
e1848f8228cde07aaee9bc8ae3a4652727b0e0c8
[ "MIT" ]
null
null
null
dephell_pythons/pep514tools/__init__.py
espdev/dephell_pythons
e1848f8228cde07aaee9bc8ae3a4652727b0e0c8
[ "MIT" ]
null
null
null
#------------------------------------------------------------------------- # Copyright (c) Steve Dower # All rights reserved. # # Distributed under the terms of the MIT License #------------------------------------------------------------------------- __author__ = 'Steve Dower <steve.dower@python.org>' __version__ = '...
31.416667
74
0.448276
__author__ = 'Steve Dower <steve.dower@python.org>' __version__ = '0.1.13' from .environment import findall, find, findone
true
true
08fc3061bc13a7242fe546cac8a70846d2fc6498
10,093
py
Python
tf_agents/policies/categorical_q_policy_test.py
PeterDomanski/agents
63c1c76f16f2068a637b26282c34a8825583e73e
[ "Apache-2.0" ]
2
2020-10-29T02:21:27.000Z
2021-07-26T07:38:23.000Z
tf_agents/policies/categorical_q_policy_test.py
qxcv/agents
1c4f2a0dd0abf3795a221dfc8a1771cff0e6ebb9
[ "Apache-2.0" ]
13
2019-06-18T03:36:39.000Z
2019-08-28T18:30:29.000Z
tf_agents/policies/categorical_q_policy_test.py
qxcv/agents
1c4f2a0dd0abf3795a221dfc8a1771cff0e6ebb9
[ "Apache-2.0" ]
2
2019-10-23T23:31:30.000Z
2019-10-25T21:32:26.000Z
# coding=utf-8 # Copyright 2018 The TF-Agents 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...
38.086792
80
0.715149
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os from absl import flags import numpy as np import tensorflow as tf from tf_agents.networks import categorical_q_network from tf_agents.networks import network from tf_agents.policies import categor...
true
true
08fc30f886c983ba289dc757c87a201279dfcc1f
1,459
py
Python
setup.py
alekam/django-http-exceptions
7ae86223d7f2fc84577f21df3bcb72a63c23e2bf
[ "Apache-2.0" ]
null
null
null
setup.py
alekam/django-http-exceptions
7ae86223d7f2fc84577f21df3bcb72a63c23e2bf
[ "Apache-2.0" ]
null
null
null
setup.py
alekam/django-http-exceptions
7ae86223d7f2fc84577f21df3bcb72a63c23e2bf
[ "Apache-2.0" ]
null
null
null
from setuptools import setup, find_packages version = __import__('http_exceptions').get_version() def get_requires_list(filename): s = open(filename).read().split("\n") dependenses = [] if len(s): for pkg in s: if pkg.strip() == '' or pkg.startswith("#"): continue ...
31.717391
67
0.543523
from setuptools import setup, find_packages version = __import__('http_exceptions').get_version() def get_requires_list(filename): s = open(filename).read().split("\n") dependenses = [] if len(s): for pkg in s: if pkg.strip() == '' or pkg.startswith("#"): continue ...
true
true
08fc31242a9e5895c4bcf05faa202eae1d0cd3ec
2,097
bzl
Python
tools/ts-api-guardian/index.bzl
robphoenix/angular
948f507ba00beedbab74dfc5c602ab42cc8b6599
[ "MIT" ]
3
2018-09-29T06:15:21.000Z
2021-09-16T09:50:22.000Z
tools/ts-api-guardian/index.bzl
robphoenix/angular
948f507ba00beedbab74dfc5c602ab42cc8b6599
[ "MIT" ]
2
2021-05-09T07:39:29.000Z
2022-03-02T09:54:50.000Z
tools/ts-api-guardian/index.bzl
robphoenix/angular
948f507ba00beedbab74dfc5c602ab42cc8b6599
[ "MIT" ]
1
2021-08-19T10:09:47.000Z
2021-08-19T10:09:47.000Z
# Copyright 2017 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
34.95
160
0.664759
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary", "nodejs_test") COMMON_MODULE_IDENTIFIERS = ["angular", "jasmine", "protractor"] def ts_api_guardian_test(name, golden, actual, data = [], strip_export_pattern = ["^__", "^ɵ"], allow_module_identifiers = COMMON_MODULE_IDENTIFIERS, **kwargs): data += [...
true
true
08fc339021328680c0643ffb7753d5f8505d73d1
5,905
py
Python
pyannote/audio/labeling/tasks/domain_classification.py
avramandrei/pyannote-audio
ad7e48bac22e347c5688cb1bdc996e573024c4cf
[ "MIT" ]
1,543
2016-10-05T08:13:06.000Z
2022-03-31T21:43:19.000Z
pyannote/audio/labeling/tasks/domain_classification.py
avramandrei/pyannote-audio
ad7e48bac22e347c5688cb1bdc996e573024c4cf
[ "MIT" ]
739
2016-09-23T09:13:51.000Z
2022-03-30T08:24:19.000Z
pyannote/audio/labeling/tasks/domain_classification.py
avramandrei/pyannote-audio
ad7e48bac22e347c5688cb1bdc996e573024c4cf
[ "MIT" ]
348
2016-09-22T15:33:49.000Z
2022-03-28T07:28:48.000Z
#!/usr/bin/env python # encoding: utf-8 # The MIT License (MIT) # Copyright (c) 2019 CNRS # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation ...
33.174157
87
0.660796
from typing import Optional from typing import Text import numpy as np from .base import LabelingTask from .base import LabelingTaskGenerator from pyannote.audio.train.task import Task, TaskType, TaskOutput from pyannote.audio.features.wrapper import Wrappable from pyannote.database import Protocol from pyanno...
true
true
08fc33b6687e43a6f0308cf93d2af615ed6e8120
1,657
py
Python
test/test_webhook_grafana.py
dwang159/iris-api
f607fe4c5595469766470b899950d97570e8aebe
[ "BSD-2-Clause" ]
null
null
null
test/test_webhook_grafana.py
dwang159/iris-api
f607fe4c5595469766470b899950d97570e8aebe
[ "BSD-2-Clause" ]
null
null
null
test/test_webhook_grafana.py
dwang159/iris-api
f607fe4c5595469766470b899950d97570e8aebe
[ "BSD-2-Clause" ]
null
null
null
# Copyright (c) LinkedIn Corporation. All rights reserved. Licensed under the BSD-2 Clause license. # See LICENSE in the project root for license information. import pytest from falcon import HTTPBadRequest def test_parse_valid_body(): from iris.webhooks.grafana import grafana grafana_webhook = grafana() ...
29.070175
99
0.564876
import pytest from falcon import HTTPBadRequest def test_parse_valid_body(): from iris.webhooks.grafana import grafana grafana_webhook = grafana() fake_post = { "evalMatches": [{ "value": 100, "metric": "High value", "tags": "", }, { "value...
true
true
08fc3443e9069702afa5032d5ef24049583e843c
3,564
py
Python
support/razor_display.py
renuchauhan625/RazorPyOfficial
e5e3c2cb638b0e402f665aa2e756debd7c456237
[ "Apache-2.0" ]
3
2021-07-11T03:52:50.000Z
2022-01-06T11:30:08.000Z
support/razor_display.py
renuchauhan625/RazorPyOfficial
e5e3c2cb638b0e402f665aa2e756debd7c456237
[ "Apache-2.0" ]
null
null
null
support/razor_display.py
renuchauhan625/RazorPyOfficial
e5e3c2cb638b0e402f665aa2e756debd7c456237
[ "Apache-2.0" ]
1
2021-07-18T05:42:40.000Z
2021-07-18T05:42:40.000Z
''' Created on 01-Feb-2021 @author: Abhishek Prajapati ''' class RazorPyDisplay(object): ''' classdocs ''' def __init__(self, params): ''' Constructor ''' pass @classmethod def display_head(cls): print(r""" ...
55.6875
178
0.133838
class RazorPyDisplay(object): def __init__(self, params): pass @classmethod def display_head(cls): print(r""" _______ _______ | \ | \ ...
true
true
08fc357a52d0403941f527fc6dd06b3d3541791f
4,193
py
Python
otcextensions/sdk/auto_scaling/v1/policy.py
kucerakk/python-otcextensions
d74d6aaa6dcf7c46d2c5fbe3676656baaf8e81d6
[ "Apache-2.0" ]
null
null
null
otcextensions/sdk/auto_scaling/v1/policy.py
kucerakk/python-otcextensions
d74d6aaa6dcf7c46d2c5fbe3676656baaf8e81d6
[ "Apache-2.0" ]
null
null
null
otcextensions/sdk/auto_scaling/v1/policy.py
kucerakk/python-otcextensions
d74d6aaa6dcf7c46d2c5fbe3676656baaf8e81d6
[ "Apache-2.0" ]
null
null
null
# 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 writing, software # distributed under t...
37.106195
78
0.66301
from openstack import resource from otcextensions.sdk.auto_scaling.v1 import _base class ScheduledPolicy(resource.Resource): launch_time = resource.Body('launch_time') recurrence_type = resource.Body('recurrence_type') recurrence_value = resource.Body('rec...
true
true
08fc35d478e84d2420b6ea763417804d4598bf0c
18,796
py
Python
iic/cluster_sobel_twohead.py
felizang/IIC-pytorch3
c16928fd497089b3776c7dc3a2ac89b863314a62
[ "MIT" ]
1
2020-09-18T23:37:58.000Z
2020-09-18T23:37:58.000Z
iic/cluster_sobel_twohead.py
felizang/IIC-pytorch3
c16928fd497089b3776c7dc3a2ac89b863314a62
[ "MIT" ]
null
null
null
iic/cluster_sobel_twohead.py
felizang/IIC-pytorch3
c16928fd497089b3776c7dc3a2ac89b863314a62
[ "MIT" ]
null
null
null
from __future__ import print_function import argparse # import itertools import os import pickle import sys from datetime import datetime import matplotlib import numpy as np import torch import matplotlib.pyplot as plt from torch.optim import Adam import archs as archs from utils_cluster import config_to_str, get_...
37.895161
104
0.617631
from __future__ import print_function import argparse import os import pickle import sys from datetime import datetime import matplotlib import numpy as np import torch import matplotlib.pyplot as plt from torch.optim import Adam import archs as archs from utils_cluster import config_to_str, get_opt, update_lr, nic...
true
true
08fc369d65cb74ef1bc1c6c287378106cd04b663
3,843
py
Python
driver.py
0bLondon/SudokuSolver
73e6bf14045a19b14c3d8dd257035e1efe4acc12
[ "MIT" ]
null
null
null
driver.py
0bLondon/SudokuSolver
73e6bf14045a19b14c3d8dd257035e1efe4acc12
[ "MIT" ]
null
null
null
driver.py
0bLondon/SudokuSolver
73e6bf14045a19b14c3d8dd257035e1efe4acc12
[ "MIT" ]
null
null
null
import time from sudoku import Sudoku ERROR = False SOLVED = True def backtracking(sudoku, assignment): if (len(assignment) == len(sudoku.variables)): return assignment var = select_unassigned_variable(sudoku, assignment) for value in order_domain_value(sudoku, var): if(sudoku.consistent(var, value, assignme...
24.634615
97
0.68254
import time from sudoku import Sudoku ERROR = False SOLVED = True def backtracking(sudoku, assignment): if (len(assignment) == len(sudoku.variables)): return assignment var = select_unassigned_variable(sudoku, assignment) for value in order_domain_value(sudoku, var): if(sudoku.consistent(var, value, assignme...
true
true
08fc37071fa9535fa6e7406cd0fe263aeea32110
3,943
py
Python
dicom_tools/ml_out_roi.py
carlomt/dicom_tools
4fc7dae1eadce562894792cae441721deaf01b5f
[ "MIT" ]
7
2017-04-28T08:51:48.000Z
2021-08-22T20:50:14.000Z
dicom_tools/ml_out_roi.py
carlomt/dicom_tools
4fc7dae1eadce562894792cae441721deaf01b5f
[ "MIT" ]
null
null
null
dicom_tools/ml_out_roi.py
carlomt/dicom_tools
4fc7dae1eadce562894792cae441721deaf01b5f
[ "MIT" ]
3
2017-04-28T08:51:49.000Z
2020-09-02T19:48:04.000Z
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Thu Nov 22 09:46:37 2018 @author: andrea """ from __future__ import division, print_function import cv2 import numpy as np try: from keras import backend as K K.set_image_data_format('channels_last') keras_found = True except ImportError: ...
27.573427
134
0.64773
from __future__ import division, print_function import cv2 import numpy as np try: from keras import backend as K K.set_image_data_format('channels_last') keras_found = True except ImportError: keras_found = False print("WARNING ml_out_roi.py: keras not found") import SimpleITK as sitk from skima...
true
true
08fc374374c52b223d10391c3d60738446762336
329
py
Python
argmining/models/thf_sentence_export.py
ertogrul/ArgMining
2b7777ad6172723ece1cfe8df09c47c5c362ef5d
[ "MIT" ]
13
2018-01-26T13:20:53.000Z
2022-03-04T15:26:59.000Z
argmining/models/thf_sentence_export.py
ertogrul/ArgMining
2b7777ad6172723ece1cfe8df09c47c5c362ef5d
[ "MIT" ]
null
null
null
argmining/models/thf_sentence_export.py
ertogrul/ArgMining
2b7777ad6172723ece1cfe8df09c47c5c362ef5d
[ "MIT" ]
6
2018-04-11T15:27:42.000Z
2020-12-10T13:34:06.000Z
class THFSentenceExport: def __init__(self, uniqueID, label, text, tokens, dependencies, textdepth): self.uniqueID = uniqueID self.label = label self.text = text self.tokens = tokens self.dependencies = dependencies self.textdepth = textdepth self.lda_embeddin...
32.9
79
0.650456
class THFSentenceExport: def __init__(self, uniqueID, label, text, tokens, dependencies, textdepth): self.uniqueID = uniqueID self.label = label self.text = text self.tokens = tokens self.dependencies = dependencies self.textdepth = textdepth self.lda_embeddin...
true
true
08fc385a58bde45c49716150c23fb9fcd6869824
157
py
Python
sklearn/cdk-example/app.py
spugachev/mlops
dad5e17b77475675ecf9faf37dc7aa2061bffa0a
[ "MIT" ]
null
null
null
sklearn/cdk-example/app.py
spugachev/mlops
dad5e17b77475675ecf9faf37dc7aa2061bffa0a
[ "MIT" ]
null
null
null
sklearn/cdk-example/app.py
spugachev/mlops
dad5e17b77475675ecf9faf37dc7aa2061bffa0a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from aws_cdk import core from stacks.example_stack import ExampleStack app = core.App() ExampleStack(app, "example") app.synth()
13.083333
45
0.751592
from aws_cdk import core from stacks.example_stack import ExampleStack app = core.App() ExampleStack(app, "example") app.synth()
true
true
08fc39517de8f6a9d04c9951237f5c54cd049bfc
1,095
py
Python
Analysis/ThreeSum_problem.py
RomanSharapov/algorithms_part1
bf62e797d8662a8e6b3bdfba261d9ed3386108d7
[ "MIT" ]
null
null
null
Analysis/ThreeSum_problem.py
RomanSharapov/algorithms_part1
bf62e797d8662a8e6b3bdfba261d9ed3386108d7
[ "MIT" ]
null
null
null
Analysis/ThreeSum_problem.py
RomanSharapov/algorithms_part1
bf62e797d8662a8e6b3bdfba261d9ed3386108d7
[ "MIT" ]
null
null
null
import time from Analysis.ThreeSum_bruteForce import three_sum def main(source): a = [int(i.strip()) for i in source if i] start = time.time() print(three_sum(a)) print('Elapsed {} seconds'.format(time.time() - start)) if __name__ == "__main__": while True: choice = input('What do you ...
31.285714
79
0.487671
import time from Analysis.ThreeSum_bruteForce import three_sum def main(source): a = [int(i.strip()) for i in source if i] start = time.time() print(three_sum(a)) print('Elapsed {} seconds'.format(time.time() - start)) if __name__ == "__main__": while True: choice = input('What do you ...
true
true
08fc399d753bca8659b7fba2d97990f71c85a5ea
1,489
py
Python
src/qclassify/encoding_circ.py
zapatacomputing/QClassify
f1d8b8038b7761338d3f546a15965020fe623da4
[ "Apache-2.0" ]
26
2019-05-03T13:50:05.000Z
2022-03-07T22:54:15.000Z
src/qclassify/encoding_circ.py
ramanan12345/QClassify
f1d8b8038b7761338d3f546a15965020fe623da4
[ "Apache-2.0" ]
null
null
null
src/qclassify/encoding_circ.py
ramanan12345/QClassify
f1d8b8038b7761338d3f546a15965020fe623da4
[ "Apache-2.0" ]
5
2019-12-10T21:27:53.000Z
2021-03-30T08:57:09.000Z
############################################################################## # Copyright 2018 Yudong Cao and Zapata Computing, Inc. # # 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...
30.387755
78
0.640698
from pyquil.gates import * from pyquil.quil import Program def x_product(input_vec, qubits_chosen): out = Program() for i in range(0, len(qubits_chosen)): out = out + Program(RX(input_vec[i], qubits_chosen[i])) return out
true
true
08fc39df9ad0267e9f41dc45171fadad2c9763a4
2,419
py
Python
tests/python/relay/test_memory_alloc.py
yongfeng-nv/incubator-tvm
a6cb4b8d3778db5341f991db9adf76ff735b72ea
[ "Apache-2.0" ]
4
2018-01-09T07:35:33.000Z
2021-04-20T05:52:50.000Z
tests/python/relay/test_memory_alloc.py
yongfeng-nv/incubator-tvm
a6cb4b8d3778db5341f991db9adf76ff735b72ea
[ "Apache-2.0" ]
null
null
null
tests/python/relay/test_memory_alloc.py
yongfeng-nv/incubator-tvm
a6cb4b8d3778db5341f991db9adf76ff735b72ea
[ "Apache-2.0" ]
3
2020-12-10T23:21:18.000Z
2020-12-11T01:04:50.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
30.2375
65
0.677966
import tvm from tvm import te import numpy as np from tvm import relay from tvm.relay import memory_alloc def check_vm_alloc(func, check_fn): mod = tvm.IRModule() mod['main'] = func ex = relay.create_executor('vm', mod) args = [] for param in func.params: param = param.type_annotation ...
true
true
08fc3acfd1e85a0683acd83277ce9b3740500cce
276
py
Python
aoc_cqkh42/year_2019/tests/test_day_14.py
cqkh42/advent-of-code
bcf31cf8973a5b6d67492c412dce10df742e04d1
[ "MIT" ]
null
null
null
aoc_cqkh42/year_2019/tests/test_day_14.py
cqkh42/advent-of-code
bcf31cf8973a5b6d67492c412dce10df742e04d1
[ "MIT" ]
null
null
null
aoc_cqkh42/year_2019/tests/test_day_14.py
cqkh42/advent-of-code
bcf31cf8973a5b6d67492c412dce10df742e04d1
[ "MIT" ]
null
null
null
import pytest from aoc_cqkh42.year_2019 import day_14 @pytest.mark.parametrize( 'needs, gives, answer', [(1, 1, 1), (2, 2, 1), (1, 100, 1), (100, 1, 100)] ) def test__find_multiple_above(needs, gives, answer): assert day_14._count_iterations(needs, gives) == answer
27.6
78
0.692029
import pytest from aoc_cqkh42.year_2019 import day_14 @pytest.mark.parametrize( 'needs, gives, answer', [(1, 1, 1), (2, 2, 1), (1, 100, 1), (100, 1, 100)] ) def test__find_multiple_above(needs, gives, answer): assert day_14._count_iterations(needs, gives) == answer
true
true
08fc3b42d504fefa476ae151e82eb0874af30549
41,660
py
Python
tests/test_model_serializer.py
Raja27/rfw
18b4131ff4a67ae900c1b38672f2fbee72dacc31
[ "BSD-2-Clause" ]
null
null
null
tests/test_model_serializer.py
Raja27/rfw
18b4131ff4a67ae900c1b38672f2fbee72dacc31
[ "BSD-2-Clause" ]
null
null
null
tests/test_model_serializer.py
Raja27/rfw
18b4131ff4a67ae900c1b38672f2fbee72dacc31
[ "BSD-2-Clause" ]
5
2016-01-04T19:03:35.000Z
2017-12-21T23:42:54.000Z
""" The `ModelSerializer` and `HyperlinkedModelSerializer` classes are essentially shortcuts for automatically creating serializers based on a given model class. These tests deal with ensuring that we correctly map the model fields onto an appropriate set of serializer fields for each case. """ from __future__ import ...
37.701357
208
0.627868
from __future__ import unicode_literals import decimal from collections import OrderedDict import pytest from django.core.exceptions import ImproperlyConfigured from django.core.validators import ( MaxValueValidator, MinLengthValidator, MinValueValidator ) from django.db import models from django.db.models import...
true
true
08fc3bc5c174fb9ae5b770cb933d22810107e661
1,639
py
Python
qiskit_metal/_gui/widgets/library_new_qcomponent/library_proxy_model.py
rupeshknn/qiskit-metal
94d2cd1ecac4b42828bca855adedcea5a6afe3b2
[ "Apache-2.0" ]
null
null
null
qiskit_metal/_gui/widgets/library_new_qcomponent/library_proxy_model.py
rupeshknn/qiskit-metal
94d2cd1ecac4b42828bca855adedcea5a6afe3b2
[ "Apache-2.0" ]
null
null
null
qiskit_metal/_gui/widgets/library_new_qcomponent/library_proxy_model.py
rupeshknn/qiskit-metal
94d2cd1ecac4b42828bca855adedcea5a6afe3b2
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any...
43.131579
181
0.680903
from PySide2.QtCore import QModelIndex, QSortFilterProxyModel class LibraryFileProxyModel(QSortFilterProxyModel): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) # (QComponent files) OR (Directories) self.accepted_files__regex = r"(^((?!\.))(?!__in...
true
true
08fc419abf9dadd33d15f72a2f722ee29faf7827
1,229
py
Python
keras/predict.py
Abhay242/language-identification-
4b05f6cba588bc4862a3034911407f5f503db0d0
[ "MIT" ]
3
2019-08-20T08:02:21.000Z
2020-10-17T17:45:13.000Z
keras/predict.py
Abhay242/language-identification-
4b05f6cba588bc4862a3034911407f5f503db0d0
[ "MIT" ]
13
2020-01-28T22:32:17.000Z
2022-02-10T00:01:56.000Z
keras/predict.py
Abhay242/language-identification-
4b05f6cba588bc4862a3034911407f5f503db0d0
[ "MIT" ]
null
null
null
import argparse import numpy as np import os import sys from keras.models import load_model from data_loaders.SpectrogramGenerator import SpectrogramGenerator class_labels = ["EN", "DE", "FR", "ES", "CN", "RU"] def predict(cli_args): config = {"pixel_per_second": 50, "input_shape": [129, 500, 1], "num_classes":...
29.261905
121
0.716029
import argparse import numpy as np import os import sys from keras.models import load_model from data_loaders.SpectrogramGenerator import SpectrogramGenerator class_labels = ["EN", "DE", "FR", "ES", "CN", "RU"] def predict(cli_args): config = {"pixel_per_second": 50, "input_shape": [129, 500, 1], "num_classes":...
true
true
08fc431b865ff55062d597f9d3e57470e355ef97
1,114
py
Python
wagtail/tests/testapp/migrations/0025_advertwithcustomprimarykey.py
brownaa/wagtail
c97bc56c6822eb1b6589d5c33e07f71acfc48845
[ "BSD-3-Clause" ]
8,851
2016-12-09T19:01:45.000Z
2022-03-31T04:45:06.000Z
wagtail/tests/testapp/migrations/0025_advertwithcustomprimarykey.py
brownaa/wagtail
c97bc56c6822eb1b6589d5c33e07f71acfc48845
[ "BSD-3-Clause" ]
5,197
2016-12-09T19:24:37.000Z
2022-03-31T22:17:55.000Z
wagtail/tests/testapp/migrations/0025_advertwithcustomprimarykey.py
brownaa/wagtail
c97bc56c6822eb1b6589d5c33e07f71acfc48845
[ "BSD-3-Clause" ]
2,548
2016-12-09T18:16:55.000Z
2022-03-31T21:34:38.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django class Migration(migrations.Migration): dependencies = [ ('tests', '0024_tableblockstreampage'), ] operations = [ migrations.CreateModel( name='AdvertWithCus...
32.764706
173
0.594255
from __future__ import unicode_literals from django.db import migrations, models import django class Migration(migrations.Migration): dependencies = [ ('tests', '0024_tableblockstreampage'), ] operations = [ migrations.CreateModel( name='AdvertWithCustomPrimaryKey', ...
true
true
08fc43a09e00dfbbdd7d4aa4b727ef8122a7b276
798
py
Python
scanner/main.py
paolobenve/photoshare
133e43fe71a52f20bf061eb58318645b39dfcdf0
[ "RSA-MD" ]
8
2017-08-22T10:30:48.000Z
2021-01-27T11:28:54.000Z
scanner/main.py
paolobenve/photofloatenhanced
133e43fe71a52f20bf061eb58318645b39dfcdf0
[ "RSA-MD" ]
65
2017-08-04T21:52:33.000Z
2018-06-03T05:09:03.000Z
scanner/main.py
paolobenve/photofloatenhanced
133e43fe71a52f20bf061eb58318645b39dfcdf0
[ "RSA-MD" ]
2
2018-01-06T17:00:20.000Z
2018-01-13T19:02:54.000Z
#!/usr/bin/env python2 # -*- coding: utf-8 -*- import sys import os # @python2 # Builtins removed in Python3 try: from imp import reload except ImportError: pass from TreeWalker import TreeWalker from Utilities import report_times, message import Options def main(): # @python2 if sys.version_info < (3,): rel...
18.55814
97
0.68797
import sys import os try: from imp import reload except ImportError: pass from TreeWalker import TreeWalker from Utilities import report_times, message import Options def main(): if sys.version_info < (3,): reload(sys) sys.setdefaultencoding("UTF-8") if len(sys.argv) != 3 and len(sys.argv) != 2: print("...
true
true
08fc43ce1b114e0e555601408a75144fe4c7adbe
845
py
Python
src/sdk/python/test/test_legal_tag_dto.py
mstest123/self-managed-osdu_from_Daniel
10a0c1d25804caa920bf18c6c7c1d8e711c63756
[ "MIT" ]
3
2021-11-05T20:52:54.000Z
2021-11-23T23:02:29.000Z
src/sdk/python/test/test_legal_tag_dto.py
mstest123/self-managed-osdu_from_Daniel
10a0c1d25804caa920bf18c6c7c1d8e711c63756
[ "MIT" ]
4
2021-11-05T19:57:08.000Z
2021-12-14T13:59:04.000Z
src/sdk/python/test/test_legal_tag_dto.py
mstest123/self-managed-osdu_from_Daniel
10a0c1d25804caa920bf18c6c7c1d8e711c63756
[ "MIT" ]
36
2021-08-31T20:58:25.000Z
2022-03-30T17:02:57.000Z
# coding: utf-8 """ self-managed-osdu Rest API Documentation for Self Managed OSDU # noqa: E501 OpenAPI spec version: 0.11.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import OsduClient from OsduClient.models.l...
20.609756
79
0.689941
from __future__ import absolute_import import unittest import OsduClient from OsduClient.models.legal_tag_dto import LegalTagDto from OsduClient.rest import ApiException class TestLegalTagDto(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def testLegalTagDto(se...
true
true
08fc447016d44294076192d0d704d79ceef119a8
19,542
py
Python
yeetbot_humantracker/scripts/human_stitcher.py
tbx1024/yeetbot
27be4fc44d0209b509383023a850ad11809ff6c3
[ "MIT" ]
null
null
null
yeetbot_humantracker/scripts/human_stitcher.py
tbx1024/yeetbot
27be4fc44d0209b509383023a850ad11809ff6c3
[ "MIT" ]
null
null
null
yeetbot_humantracker/scripts/human_stitcher.py
tbx1024/yeetbot
27be4fc44d0209b509383023a850ad11809ff6c3
[ "MIT" ]
null
null
null
#!/usr/bin/env python from threading import Lock from math import sqrt import rospy import tf from geometry_msgs.msg import Pose, PoseStamped from yeetbot_msgs.msg import YEETBotHumanPoseArray from visualization_msgs.msg import Marker class Human: def __init__(self, unique_id): # Calculated pose of the...
39.162325
107
0.498721
from threading import Lock from math import sqrt import rospy import tf from geometry_msgs.msg import Pose, PoseStamped from yeetbot_msgs.msg import YEETBotHumanPoseArray from visualization_msgs.msg import Marker class Human: def __init__(self, unique_id): self.pose = Pose() sel...
true
true
08fc46de8bed33b9981ac96db2d6d650042045b7
558
py
Python
src/layout.py
OhYee/beard
6f7049ef2d30070c4d53cf807d5029cfcc82e652
[ "BSD-3-Clause" ]
1
2017-09-19T03:46:58.000Z
2017-09-19T03:46:58.000Z
src/layout.py
OhYee/beard
6f7049ef2d30070c4d53cf807d5029cfcc82e652
[ "BSD-3-Clause" ]
null
null
null
src/layout.py
OhYee/beard
6f7049ef2d30070c4d53cf807d5029cfcc82e652
[ "BSD-3-Clause" ]
null
null
null
from config import get_config from flask import render_template @app.route('/hello/') @app.route('/hello/<name>') def hello(name=None): return render_template('hello.html', name=name) if __name__ == '__main__': Json = get_config() menus = Json["menu"] for menuItem in menus: print(m...
25.363636
52
0.562724
from config import get_config from flask import render_template @app.route('/hello/') @app.route('/hello/<name>') def hello(name=None): return render_template('hello.html', name=name) if __name__ == '__main__': Json = get_config() menus = Json["menu"] for menuItem in menus: print(m...
true
true
08fc46e0f15a19528c6d27c3c5fd92a1fb64cf5b
2,730
py
Python
conanfile.py
uurun/influxdb-cxx
cd9ed6a92d88e96ecc9bcb6e151713583264a983
[ "MIT" ]
null
null
null
conanfile.py
uurun/influxdb-cxx
cd9ed6a92d88e96ecc9bcb6e151713583264a983
[ "MIT" ]
null
null
null
conanfile.py
uurun/influxdb-cxx
cd9ed6a92d88e96ecc9bcb6e151713583264a983
[ "MIT" ]
null
null
null
import re import os from conans import ConanFile, CMake, tools from conans.errors import ConanInvalidConfiguration class InfluxdbCxxConan(ConanFile): name = "influxdb-cxx" license = "MIT" author = "offa <offa@github>" url = "https://github.com/offa/influxdb-cxx" hompage = url description = "Inf...
35.921053
99
0.598535
import re import os from conans import ConanFile, CMake, tools from conans.errors import ConanInvalidConfiguration class InfluxdbCxxConan(ConanFile): name = "influxdb-cxx" license = "MIT" author = "offa <offa@github>" url = "https://github.com/offa/influxdb-cxx" hompage = url description = "Inf...
true
true
08fc4891762cbd81711df9ac3c60265ac2dfaec3
1,110
py
Python
samples/rest_client_public_L0.py
cmin764/CEX.IO-Client-Python3.5
98963c36a1421295a2fcdcb1ea03a7d64acaced3
[ "MIT" ]
1
2020-02-07T22:21:07.000Z
2020-02-07T22:21:07.000Z
samples/rest_client_public_L0.py
cmin764/CEX.IO-Client-Python3.5
98963c36a1421295a2fcdcb1ea03a7d64acaced3
[ "MIT" ]
null
null
null
samples/rest_client_public_L0.py
cmin764/CEX.IO-Client-Python3.5
98963c36a1421295a2fcdcb1ea03a7d64acaced3
[ "MIT" ]
1
2021-08-12T03:23:01.000Z
2021-08-12T03:23:01.000Z
import logging import sys from asyncio import * from cexio.rest_client import * from config.my_config import config log_level = config.get('log_level', 'DEBUG') logger = logging.getLogger(__name__) logger.setLevel(log_level) logger.addHandler(logging.StreamHandler(sys.stdout)) ws_client_logger = logging.getLogger(...
27.073171
98
0.761261
import logging import sys from asyncio import * from cexio.rest_client import * from config.my_config import config log_level = config.get('log_level', 'DEBUG') logger = logging.getLogger(__name__) logger.setLevel(log_level) logger.addHandler(logging.StreamHandler(sys.stdout)) ws_client_logger = logging.getLogger(...
true
true
08fc48e59863ed1b9d0f02a1fe581f196d116aa5
10,874
py
Python
bin/mailmap_check.py
brandondavid/sympy
f1769a2a515e801ef4354ad7f0e85ea3bb8ee4d9
[ "BSD-3-Clause" ]
null
null
null
bin/mailmap_check.py
brandondavid/sympy
f1769a2a515e801ef4354ad7f0e85ea3bb8ee4d9
[ "BSD-3-Clause" ]
null
null
null
bin/mailmap_check.py
brandondavid/sympy
f1769a2a515e801ef4354ad7f0e85ea3bb8ee4d9
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ A tool to generate AUTHORS. We started tracking authors before moving to git, so we have to do some manual rearrangement of the git history authors in order to get the order in AUTHORS. bin/mailmap_check.py should be run before committing the results. See here for inst...
33.152439
120
0.638863
from __future__ import unicode_literals from __future__ import print_function import sys import os from pathlib import Path from subprocess import run, PIPE from collections import OrderedDict, defaultdict from argparse import ArgumentParser if sys.version_info < (3, 8): sys.exit("This script requires Python 3.8...
true
true
08fc49c7eda6b22131ba0e3183dc7585bc7076b3
4,712
py
Python
tensorflow_toolkit/text_detection/tools/export.py
AnastasiaaSenina/openvino_training_extensions
267425d64372dff5b9083dc0ca6abfc305a71449
[ "Apache-2.0" ]
1
2020-02-09T15:50:49.000Z
2020-02-09T15:50:49.000Z
tensorflow_toolkit/text_detection/tools/export.py
AnastasiaaSenina/openvino_training_extensions
267425d64372dff5b9083dc0ca6abfc305a71449
[ "Apache-2.0" ]
null
null
null
tensorflow_toolkit/text_detection/tools/export.py
AnastasiaaSenina/openvino_training_extensions
267425d64372dff5b9083dc0ca6abfc305a71449
[ "Apache-2.0" ]
1
2020-07-13T03:16:46.000Z
2020-07-13T03:16:46.000Z
#!/usr/bin/env python3 # # Copyright (C) 2019 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
35.69697
113
0.647496
import argparse import os import tensorflow as tf from tensorflow.python.tools.freeze_graph import freeze_graph from text_detection.model import pixel_link_model from text_detection.common import load_config tf.compat.v1.disable_v2_behavior() def arg_parser(): parser = argparse.ArgumentParser() parser...
true
true
08fc4a321b1468e02ef12112d54e0879ec3096c1
1,402
py
Python
Day_3_Calculator.py
ghostmanish/100_days_of_python
8d595bbf07dd41f9a86a511c5ea5d953aec43b5b
[ "MIT" ]
1
2021-12-30T20:11:09.000Z
2021-12-30T20:11:09.000Z
Day_3_Calculator.py
ghostmanish/100_days_of_python
8d595bbf07dd41f9a86a511c5ea5d953aec43b5b
[ "MIT" ]
null
null
null
Day_3_Calculator.py
ghostmanish/100_days_of_python
8d595bbf07dd41f9a86a511c5ea5d953aec43b5b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu Dec 30 23:54:09 2021 @author: Manish Kumar Goswami """ import re import pyfiglet from datetime import datetime #Banner Of my Calculator banner = pyfiglet.figlet_format("MKG CALCULATOR") print(banner) #Adding Banner print("-" * 100) print("Tool created...
20.318841
67
0.584879
import re import pyfiglet from datetime import datetime banner = pyfiglet.figlet_format("MKG CALCULATOR") print(banner) print("-" * 100) print("Tool created by Manish Kumar Goswami") print("Calculator Started At: "+ str(datetime.now())) print("-" * 100) print("\n") print("\n") print("\n") ...
true
true
08fc4b69641c5dba82ea487d5a91b7f337b3a995
5,074
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2016_12_01/aio/operations/_bgp_service_communities_operations.py
praveenkuttappan/azure-sdk-for-python
4b79413667b7539750a6c7dde15737013a3d4bd5
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2016_12_01/aio/operations/_bgp_service_communities_operations.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2016_12_01/aio/operations/_bgp_service_communities_operations.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
46.550459
133
0.66555
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline ...
true
true
08fc4ca980dc23f81b7630edec12dff9cd4f7366
152
py
Python
Basics/Return.py
caseysalvador/Python
19bc762a123e98ebbac427c69ce58925e507b045
[ "MIT" ]
null
null
null
Basics/Return.py
caseysalvador/Python
19bc762a123e98ebbac427c69ce58925e507b045
[ "MIT" ]
null
null
null
Basics/Return.py
caseysalvador/Python
19bc762a123e98ebbac427c69ce58925e507b045
[ "MIT" ]
null
null
null
# Return Statement def square(number): return number * number print(square(3)) print('\n') def sq(number): print(number * number) print(sq(3))
15.2
26
0.671053
def square(number): return number * number print(square(3)) print('\n') def sq(number): print(number * number) print(sq(3))
true
true
08fc4cce26a0d51c15097364618215e5bdb97c35
449
py
Python
src/ifns/management/commands/load_ifns.py
dmitricus/ifns
e620d07b1c5a4a7ae034e0e40fbe816c96b77ade
[ "Apache-2.0" ]
null
null
null
src/ifns/management/commands/load_ifns.py
dmitricus/ifns
e620d07b1c5a4a7ae034e0e40fbe816c96b77ade
[ "Apache-2.0" ]
null
null
null
src/ifns/management/commands/load_ifns.py
dmitricus/ifns
e620d07b1c5a4a7ae034e0e40fbe816c96b77ade
[ "Apache-2.0" ]
null
null
null
import sys from django.core.management.base import BaseCommand from django.utils import timezone from ifns.handlers import IFNSHandler class Command(BaseCommand): def handle(self, *args, **options): sys.stdout.write('Start load_ifns command at {}\n'.format(timezone.now().isoformat())) handler = ...
29.933333
94
0.706013
import sys from django.core.management.base import BaseCommand from django.utils import timezone from ifns.handlers import IFNSHandler class Command(BaseCommand): def handle(self, *args, **options): sys.stdout.write('Start load_ifns command at {}\n'.format(timezone.now().isoformat())) handler = ...
true
true
08fc4ddccade024deb757d33ff1de9c9b66a2f18
91
py
Python
trackers/apps.py
2600box/harvest
57264c15a3fba693b4b58d0b6d4fbf4bd5453bbd
[ "Apache-2.0" ]
9
2019-03-26T14:50:00.000Z
2020-11-10T16:44:08.000Z
trackers/apps.py
2600box/harvest
57264c15a3fba693b4b58d0b6d4fbf4bd5453bbd
[ "Apache-2.0" ]
22
2019-03-02T23:16:13.000Z
2022-02-27T10:36:36.000Z
trackers/apps.py
2600box/harvest
57264c15a3fba693b4b58d0b6d4fbf4bd5453bbd
[ "Apache-2.0" ]
5
2019-04-24T00:51:30.000Z
2020-11-06T18:31:49.000Z
from django.apps import AppConfig class TrackersConfig(AppConfig): name = 'trackers'
15.166667
33
0.758242
from django.apps import AppConfig class TrackersConfig(AppConfig): name = 'trackers'
true
true
08fc4e65e9ede999eef1bab3296f6a124c3e19bf
427
py
Python
clashroyalecampsite_sever/wsgi.py
Bruce-7/hd_django_sever
5f1b3f51e6604cb73eee44c12d484c1e9704460a
[ "MIT" ]
1
2020-06-17T03:54:10.000Z
2020-06-17T03:54:10.000Z
clashroyalecampsite_sever/wsgi.py
Bruce-7/hd_django_sever
5f1b3f51e6604cb73eee44c12d484c1e9704460a
[ "MIT" ]
9
2020-06-17T06:35:36.000Z
2022-01-13T02:53:14.000Z
clashroyalecampsite_sever/wsgi.py
Bruce-7/hd_django_sever
5f1b3f51e6604cb73eee44c12d484c1e9704460a
[ "MIT" ]
null
null
null
""" WSGI config for clashroyalecampsite_sever project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdef...
25.117647
85
0.803279
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'clashroyalecampsite_sever.settings') application = get_wsgi_application()
true
true
08fc4f4d16ab9f6523e1d763213867a97aef766a
4,195
py
Python
downpour/query.py
dhellmann/aerostat
0872727f99c549833e576dd23b39ed04d456074b
[ "Apache-2.0" ]
1
2018-02-01T14:53:13.000Z
2018-02-01T14:53:13.000Z
downpour/query.py
dhellmann/aerostat
0872727f99c549833e576dd23b39ed04d456074b
[ "Apache-2.0" ]
null
null
null
downpour/query.py
dhellmann/aerostat
0872727f99c549833e576dd23b39ed04d456074b
[ "Apache-2.0" ]
1
2020-01-06T15:36:14.000Z
2020-01-06T15:36:14.000Z
# -*- coding: utf-8 -*- # 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 writing, softw...
31.074074
79
0.620739
import logging from downpour import resources LOG = logging.getLogger(__name__) class ResourceFileEditor: def __init__(self, filename, save_state): self._filename = filename self._save_state = save_state self._resources = resources.load(filename, missing_ok=True) self._servers...
true
true
08fc4f5756c4137b120ab708b29f9a8d52620b6b
3,757
py
Python
quizzes/00.organize.me/Cracking the Coding Interview/quicksort.py
JiniousChoi/encyclopedia-in-code
77bc551a03a2a3e3808e50016ece14adb5cfbd96
[ "MIT" ]
2
2018-07-20T10:15:49.000Z
2018-07-20T10:16:54.000Z
quizzes/00.organize.me/Cracking the Coding Interview/quicksort.py
JiniousChoi/encyclopedia-in-code
77bc551a03a2a3e3808e50016ece14adb5cfbd96
[ "MIT" ]
2
2018-06-26T09:12:44.000Z
2019-12-18T00:09:14.000Z
quizzes/00.organize.me/Cracking the Coding Interview/quicksort.py
JiniousChoi/encyclopedia-in-code
77bc551a03a2a3e3808e50016ece14adb5cfbd96
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import unittest from random import randint, shuffle def quicksort(A, start=None, stop=None): if start==None: start = 0 if stop==None: stop = len(A) - 1 if stop - start <= 0: return if stop - start == 1: if A[start] > A[stop]: swap(A, start, stop) ...
24.717105
76
0.496939
import unittest from random import randint, shuffle def quicksort(A, start=None, stop=None): if start==None: start = 0 if stop==None: stop = len(A) - 1 if stop - start <= 0: return if stop - start == 1: if A[start] > A[stop]: swap(A, start, stop) return ...
true
true
08fc4fd3a442b063801552e7753cc91973ea6293
2,964
py
Python
modules/quadkey/redshift/test/integration/test_QUADINT_FROMLONGLAT.py
mhconradt/analytics-toolbox-core
021e219e9c2bdb4cd4a0d59162ef4d677e1789aa
[ "BSD-3-Clause" ]
46
2021-02-11T21:52:02.000Z
2022-03-08T05:35:06.000Z
modules/quadkey/redshift/test/integration/test_QUADINT_FROMLONGLAT.py
mhconradt/analytics-toolbox-core
021e219e9c2bdb4cd4a0d59162ef4d677e1789aa
[ "BSD-3-Clause" ]
165
2021-02-12T06:44:26.000Z
2022-03-07T09:07:42.000Z
modules/quadkey/redshift/test/integration/test_QUADINT_FROMLONGLAT.py
mhconradt/analytics-toolbox-core
021e219e9c2bdb4cd4a0d59162ef4d677e1789aa
[ "BSD-3-Clause" ]
7
2021-04-22T08:46:06.000Z
2022-03-05T18:39:20.000Z
from test_utils import run_query, redshift_connector import pytest def test_longlat_asquadint_success(): results = run_query( """WITH zoomContext AS( SELECT 0 AS zoom, -150 AS long, 60 AS lat UNION ALL SELECT 1, -150, 60 UNION ALL SELECT 2, 150, 60 UNION ALL ...
41.166667
82
0.626181
from test_utils import run_query, redshift_connector import pytest def test_longlat_asquadint_success(): results = run_query( """WITH zoomContext AS( SELECT 0 AS zoom, -150 AS long, 60 AS lat UNION ALL SELECT 1, -150, 60 UNION ALL SELECT 2, 150, 60 UNION ALL ...
true
true
08fc4feb11318326f09daa2b26452ba9a36ad468
735
py
Python
webapp/element43/apps/rest_api/filters.py
Ososope/eve_online
b368f77aaff403e5f1523a1a0e01d105fed0ada9
[ "BSD-3-Clause" ]
null
null
null
webapp/element43/apps/rest_api/filters.py
Ososope/eve_online
b368f77aaff403e5f1523a1a0e01d105fed0ada9
[ "BSD-3-Clause" ]
null
null
null
webapp/element43/apps/rest_api/filters.py
Ososope/eve_online
b368f77aaff403e5f1523a1a0e01d105fed0ada9
[ "BSD-3-Clause" ]
null
null
null
import django_filters from apps.market_data.models import Orders, OrderHistory, ItemRegionStat class OrdersFilter(django_filters.FilterSet): class Meta: model = Orders fields = ['mapregion', 'invtype', 'minimum_volume', 'is_bid', ...
22.272727
72
0.563265
import django_filters from apps.market_data.models import Orders, OrderHistory, ItemRegionStat class OrdersFilter(django_filters.FilterSet): class Meta: model = Orders fields = ['mapregion', 'invtype', 'minimum_volume', 'is_bid', ...
true
true
08fc516e6534e451d4946ab966d79b072b52b0a0
8,127
py
Python
seqpos/lib/python2.7/site-packages/mercurial/filelog.py
guanjue/seqpos
ab9308ad128547ca968a1d944490710e583703bc
[ "MIT" ]
null
null
null
seqpos/lib/python2.7/site-packages/mercurial/filelog.py
guanjue/seqpos
ab9308ad128547ca968a1d944490710e583703bc
[ "MIT" ]
null
null
null
seqpos/lib/python2.7/site-packages/mercurial/filelog.py
guanjue/seqpos
ab9308ad128547ca968a1d944490710e583703bc
[ "MIT" ]
null
null
null
# filelog.py - file history class for mercurial # # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from __future__ import absolute_import from .i18n import _ from .node import (...
33.8625
78
0.630983
from __future__ import absolute_import from .i18n import _ from .node import ( nullid, nullrev, ) from . import ( error, repository, revlog, ) from .utils import ( interfaceutil, storageutil, ) @interfaceutil.implementer(repository.ifilestorage) class filelog(object): def __init__(sel...
true
true
08fc52c50c227445e667f61bed11d1cfd3acd4ab
456
py
Python
indico/modules/rb/controllers/frontend.py
bpedersen2/indico
8410ee5f8f8530a8692f3dd2d4015c3074b0aa30
[ "MIT" ]
1
2021-12-27T17:51:27.000Z
2021-12-27T17:51:27.000Z
indico/modules/rb/controllers/frontend.py
bpedersen2/indico
8410ee5f8f8530a8692f3dd2d4015c3074b0aa30
[ "MIT" ]
5
2021-04-08T19:26:47.000Z
2022-01-24T16:30:18.000Z
indico/modules/rb/controllers/frontend.py
bpedersen2/indico
8410ee5f8f8530a8692f3dd2d4015c3074b0aa30
[ "MIT" ]
2
2019-02-24T17:29:10.000Z
2021-04-08T19:23:27.000Z
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from indico.modules.rb.controllers import RHRoomBookingBase from indico.modules.rb.views import WPRoomBook...
30.4
61
0.77193
from indico.modules.rb.controllers import RHRoomBookingBase from indico.modules.rb.views import WPRoomBookingBase class RHRoomBooking(RHRoomBookingBase): def _process(self): return WPRoomBookingBase.display('room_booking.html')
true
true
08fc52d771105d1c919994412595ee8fd70aba2c
31,377
py
Python
1_nas/evaluator.py
nuaa-QK/1_NAS
1660a9bb259d6f3844fa34e394921fea7f4183c3
[ "MIT" ]
null
null
null
1_nas/evaluator.py
nuaa-QK/1_NAS
1660a9bb259d6f3844fa34e394921fea7f4183c3
[ "MIT" ]
null
null
null
1_nas/evaluator.py
nuaa-QK/1_NAS
1660a9bb259d6f3844fa34e394921fea7f4183c3
[ "MIT" ]
null
null
null
import os import tensorflow as tf import numpy as np from base import Cell, NetworkItem from info_str import NAS_CONFIG from utils import NAS_LOG, Logger import pickle import random import sys import time import copy class DataSet: def __init__(self, image_size=32, num_class=10): self.I...
46.76155
180
0.558275
import os import tensorflow as tf import numpy as np from base import Cell, NetworkItem from info_str import NAS_CONFIG from utils import NAS_LOG, Logger import pickle import random import sys import time import copy class DataSet: def __init__(self, image_size=32, num_class=10): self.I...
true
true
08fc5355d704108f3edb8657f2475875b0ffdd90
384,568
py
Python
test/test_linalg.py
sanchitintel/pytorch
416f59308023b5d98f6ea4ecdd0bcd3829edb7a7
[ "Intel" ]
24
2020-11-02T21:25:12.000Z
2022-03-17T07:20:33.000Z
test/test_linalg.py
sanchitintel/pytorch
416f59308023b5d98f6ea4ecdd0bcd3829edb7a7
[ "Intel" ]
1
2021-02-23T21:52:37.000Z
2021-02-23T21:52:37.000Z
test/test_linalg.py
sanchitintel/pytorch
416f59308023b5d98f6ea4ecdd0bcd3829edb7a7
[ "Intel" ]
12
2020-11-06T05:00:37.000Z
2022-01-30T19:17:36.000Z
# -*- coding: utf-8 -*- import torch import numpy as np import unittest import itertools import warnings import math from math import inf, nan, isnan import random from random import randrange from itertools import product from functools import reduce from torch.testing._internal.common_utils import \ (TestCase, ...
47.987023
131
0.580841
import torch import numpy as np import unittest import itertools import warnings import math from math import inf, nan, isnan import random from random import randrange from itertools import product from functools import reduce from torch.testing._internal.common_utils import \ (TestCase, run_tests, TEST_SCIPY, I...
true
true
08fc537c7a88f2e1ab0de0fdf2a54401477d5812
343
py
Python
util/data/gen/wbemsvc.dll.py
56kyle/bloons_auto
419d55b51d1cddc49099593970adf1c67985b389
[ "MIT" ]
null
null
null
util/data/gen/wbemsvc.dll.py
56kyle/bloons_auto
419d55b51d1cddc49099593970adf1c67985b389
[ "MIT" ]
null
null
null
util/data/gen/wbemsvc.dll.py
56kyle/bloons_auto
419d55b51d1cddc49099593970adf1c67985b389
[ "MIT" ]
null
null
null
symbols = [] exports = [{'type': 'function', 'name': 'DllCanUnloadNow', 'address': '0x7ffb2a351560'}, {'type': 'function', 'name': 'DllGetClassObject', 'address': '0x7ffb2a3514a0'}, {'type': 'function', 'name': 'DllRegisterServer', 'address': '0x7ffb2a352550'}, {'type': 'function', 'name': 'DllUnregisterServer', 'addre...
171.5
330
0.670554
symbols = [] exports = [{'type': 'function', 'name': 'DllCanUnloadNow', 'address': '0x7ffb2a351560'}, {'type': 'function', 'name': 'DllGetClassObject', 'address': '0x7ffb2a3514a0'}, {'type': 'function', 'name': 'DllRegisterServer', 'address': '0x7ffb2a352550'}, {'type': 'function', 'name': 'DllUnregisterServer', 'addre...
true
true
08fc53e7ab28e8c6556c5e5d9ffd464ae7f5d136
504
py
Python
server/rideshare/migrations/0013_rideprofile_email.py
aadabi/tagrides
980a6f7df62f1bb9b396eca79421388c36987f45
[ "Unlicense" ]
2
2018-03-21T23:32:09.000Z
2018-03-22T01:39:51.000Z
server/rideshare/migrations/0013_rideprofile_email.py
aadabi/Cruzer
980a6f7df62f1bb9b396eca79421388c36987f45
[ "Unlicense" ]
null
null
null
server/rideshare/migrations/0013_rideprofile_email.py
aadabi/Cruzer
980a6f7df62f1bb9b396eca79421388c36987f45
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-03-17 00:18 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('rideshare', '0012_rideprofile'), ] operations = [ migrations.AddField( ...
22.909091
70
0.617063
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('rideshare', '0012_rideprofile'), ] operations = [ migrations.AddField( model_name='rideprofile', name='email', f...
true
true
08fc5400139c84cd62c5f21cb7719d19bd2f636d
147
py
Python
ABC015/ABC015a.py
VolgaKurvar/AtCoder
21acb489f1594bbb1cdc64fbf8421d876b5b476d
[ "Unlicense" ]
null
null
null
ABC015/ABC015a.py
VolgaKurvar/AtCoder
21acb489f1594bbb1cdc64fbf8421d876b5b476d
[ "Unlicense" ]
null
null
null
ABC015/ABC015a.py
VolgaKurvar/AtCoder
21acb489f1594bbb1cdc64fbf8421d876b5b476d
[ "Unlicense" ]
null
null
null
# ABC015a import sys input = sys.stdin.readline sys.setrecursionlimit(10**6) a = input()[:-1] b = input()[:-1] print(a if len(a) > len(b) else b)
16.333333
34
0.646259
import sys input = sys.stdin.readline sys.setrecursionlimit(10**6) a = input()[:-1] b = input()[:-1] print(a if len(a) > len(b) else b)
true
true
08fc548aefdc265473aa2fa0310cc0d2ce982602
1,379
py
Python
Chapter07/universities.py
elephantscale/Hands-On-Web-Scraping-with-Python
013069a23c5bc3846ab475c5774bc6ff9a27c348
[ "MIT" ]
43
2019-03-05T12:37:35.000Z
2022-01-24T11:43:37.000Z
Chapter07/universities.py
elephantscale/Hands-On-Web-Scraping-with-Python
013069a23c5bc3846ab475c5774bc6ff9a27c348
[ "MIT" ]
1
2019-12-29T10:34:13.000Z
2020-08-10T07:19:28.000Z
Chapter07/universities.py
elephantscale/Hands-On-Web-Scraping-with-Python
013069a23c5bc3846ab475c5774bc6ff9a27c348
[ "MIT" ]
42
2019-05-02T10:28:35.000Z
2022-02-16T16:45:48.000Z
import requests import json dataSet = [] url = 'http://universities.hipolabs.com/search?name=' def readUrl(search): results = requests.get(url+search) print("Status Code: ", results.status_code) print("Headers: Content-Type: ", results.headers['Content-Type']) # print("Headers: ", results.headers) ...
34.475
72
0.658448
import requests import json dataSet = [] url = 'http://universities.hipolabs.com/search?name=' def readUrl(search): results = requests.get(url+search) print("Status Code: ", results.status_code) print("Headers: Content-Type: ", results.headers['Content-Type']) return results.json() if __name__=="...
true
true
08fc54a6f1caaa491890e78e02137d7b29e7395f
127
py
Python
yc303/1585-1.py
c-yan/yukicoder
cdbbd65402177225dd989df7fe01f67908484a69
[ "MIT" ]
null
null
null
yc303/1585-1.py
c-yan/yukicoder
cdbbd65402177225dd989df7fe01f67908484a69
[ "MIT" ]
null
null
null
yc303/1585-1.py
c-yan/yukicoder
cdbbd65402177225dd989df7fe01f67908484a69
[ "MIT" ]
null
null
null
N = int(input()) for i in range(1, 10 ** 6 + 1): if i ** 3 == N: print('Yes') break else: print('No')
14.111111
31
0.425197
N = int(input()) for i in range(1, 10 ** 6 + 1): if i ** 3 == N: print('Yes') break else: print('No')
true
true
08fc54c52b529f39443cd91dd635c650b9030858
1,608
py
Python
azure-iot-device/samples/sync-samples/send_message_via_module_x509.py
olivakar/azure-iot-sdk-python
d8f2403030cf94510d381d8d5ac37af6e8d306f8
[ "MIT" ]
35
2018-12-01T05:42:30.000Z
2021-03-10T12:23:41.000Z
azure-iot-device/samples/sync-samples/send_message_via_module_x509.py
olivakar/azure-iot-sdk-python
d8f2403030cf94510d381d8d5ac37af6e8d306f8
[ "MIT" ]
81
2018-11-20T20:01:43.000Z
2019-09-06T23:57:17.000Z
azure-iot-device/samples/sync-samples/send_message_via_module_x509.py
olivakar/azure-iot-sdk-python
d8f2403030cf94510d381d8d5ac37af6e8d306f8
[ "MIT" ]
18
2019-03-19T18:53:43.000Z
2021-01-10T09:47:24.000Z
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- import os...
30.339623
76
0.666667
import os import time import uuid from azure.iot.device import IoTHubModuleClient, Message, X509 hostname = os.getenv("HOSTNAME") device_id = os.getenv("DEVICE_ID") module_id = os.getenv("MODULE_ID") x509 = X509( cert_file=os.getenv("X509_CERT_FILE"), key_file=os.getenv("X509_KEY_FILE"), pass_phrase=os...
true
true
08fc5506d2eccf819ca9b0d6939c5cd6948d1feb
353
py
Python
p1_basic/day01_07base/day07/06_深浅拷贝.py
dong-pro/fullStackPython
5ad8662f7b57f14c8529e7eaf64290eeda773557
[ "Apache-2.0" ]
1
2020-04-03T01:32:05.000Z
2020-04-03T01:32:05.000Z
p1_basic/day01_07base/day07/06_深浅拷贝.py
dong-pro/fullStackPython
5ad8662f7b57f14c8529e7eaf64290eeda773557
[ "Apache-2.0" ]
null
null
null
p1_basic/day01_07base/day07/06_深浅拷贝.py
dong-pro/fullStackPython
5ad8662f7b57f14c8529e7eaf64290eeda773557
[ "Apache-2.0" ]
null
null
null
# 引入copy模块 import copy lst1 = ['金毛狮王', '紫衫龙王', '青翼蝠王', '白眉鹰王', ['张无忌', '赵敏', '周芷若']] # lst2 = lst1[:] # 浅拷贝 # lst2 = lst1.copy() # 浅拷贝 lst2 = copy.deepcopy(lst1) lst1[4].append('小昭') print(lst1) print(lst2) print(id(lst1[4])) print(id(lst2[4])) # 1. 赋值操作. 没有创建新对象 # 2. 浅拷贝. 只拷贝第一层内容. [:] copy() # 3. 深拷贝. 把这个对象内...
17.65
61
0.597734
import copy lst1 = ['金毛狮王', '紫衫龙王', '青翼蝠王', '白眉鹰王', ['张无忌', '赵敏', '周芷若']] lst2 = copy.deepcopy(lst1) lst1[4].append('小昭') print(lst1) print(lst2) print(id(lst1[4])) print(id(lst2[4]))
true
true
08fc550e24bd000fd17431c88be4c824463de2d4
1,681
py
Python
comp0037_explorer/src/comp0037_explorer/explorer_node.py
zhongyi51/COMP0037_CW2_GROUPE
f18473d530bc47624d6c14dfa57aa32432694159
[ "BSD-3-Clause" ]
null
null
null
comp0037_explorer/src/comp0037_explorer/explorer_node.py
zhongyi51/COMP0037_CW2_GROUPE
f18473d530bc47624d6c14dfa57aa32432694159
[ "BSD-3-Clause" ]
null
null
null
comp0037_explorer/src/comp0037_explorer/explorer_node.py
zhongyi51/COMP0037_CW2_GROUPE
f18473d530bc47624d6c14dfa57aa32432694159
[ "BSD-3-Clause" ]
null
null
null
import rospy from explorer_node_base import ExplorerNodeBase # This class implements a super dumb explorer. It goes through the # current map and marks the first cell it sees as the one to go for class ExplorerNode(ExplorerNodeBase): def __init__(self): ExplorerNodeBase.__init__(self) self.blac...
31.716981
104
0.559786
import rospy from explorer_node_base import ExplorerNodeBase class ExplorerNode(ExplorerNodeBase): def __init__(self): ExplorerNodeBase.__init__(self) self.blackList = [] def updateFrontiers(self): pass def chooseNewDestination(self): candidateGood = False de...
true
true
08fc553b7a3a37a2997ca9f56c170176045ea8c3
35,452
py
Python
tools/qontract_cli.py
app-sre/qontract-reconcile
94301792a7913b7e9421bc6155c40d6dcc5afa0c
[ "Apache-2.0" ]
21
2019-10-22T16:50:26.000Z
2022-03-25T16:07:44.000Z
tools/qontract_cli.py
app-sre/qontract-reconcile
94301792a7913b7e9421bc6155c40d6dcc5afa0c
[ "Apache-2.0" ]
629
2018-12-13T12:46:53.000Z
2022-03-31T20:46:02.000Z
tools/qontract_cli.py
app-sre/qontract-reconcile
94301792a7913b7e9421bc6155c40d6dcc5afa0c
[ "Apache-2.0" ]
50
2019-01-04T10:22:45.000Z
2022-03-28T13:24:27.000Z
import json import sys from typing import Dict, Iterable, List, Mapping, Union from contextlib import suppress import click import requests import yaml from tabulate import tabulate from reconcile.status_page_components import ( update_component_status, fetch_pages) from reconcile.utils import dnsutils from reco...
31.967538
78
0.595735
import json import sys from typing import Dict, Iterable, List, Mapping, Union from contextlib import suppress import click import requests import yaml from tabulate import tabulate from reconcile.status_page_components import ( update_component_status, fetch_pages) from reconcile.utils import dnsutils from reco...
true
true
08fc56e5cf32c7771f65eaa2a43328152c498715
1,643
py
Python
neurokit2/signal/__init__.py
raimonpv/NeuroKit
cb37d83ee20d6a13a91c4848aa435f41e979e203
[ "MIT" ]
null
null
null
neurokit2/signal/__init__.py
raimonpv/NeuroKit
cb37d83ee20d6a13a91c4848aa435f41e979e203
[ "MIT" ]
null
null
null
neurokit2/signal/__init__.py
raimonpv/NeuroKit
cb37d83ee20d6a13a91c4848aa435f41e979e203
[ "MIT" ]
null
null
null
"""Submodule for NeuroKit.""" from .signal_autocor import signal_autocor from .signal_binarize import signal_binarize from .signal_changepoints import signal_changepoints from .signal_decompose import signal_decompose from .signal_detrend import signal_detrend from .signal_distort import signal_distort from .signal_fi...
29.872727
54
0.797931
from .signal_autocor import signal_autocor from .signal_binarize import signal_binarize from .signal_changepoints import signal_changepoints from .signal_decompose import signal_decompose from .signal_detrend import signal_detrend from .signal_distort import signal_distort from .signal_filter import signal_filter from...
true
true
08fc5814167577b1a769587dac76309ec398a45e
1,197
py
Python
Search Category/TC-10.py
aurora314156/TickTick-automated-testing
8617dfc4e7d2ffe2931debb46ee714e38a5e097f
[ "MIT" ]
null
null
null
Search Category/TC-10.py
aurora314156/TickTick-automated-testing
8617dfc4e7d2ffe2931debb46ee714e38a5e097f
[ "MIT" ]
null
null
null
Search Category/TC-10.py
aurora314156/TickTick-automated-testing
8617dfc4e7d2ffe2931debb46ee714e38a5e097f
[ "MIT" ]
null
null
null
from appium import webdriver import time desired_caps = {} desired_caps['platformName'] = 'Android' desired_caps['platformVersion'] = '8.0' desired_caps['deviceName'] = 'Android Emulator' desired_caps['appPackage'] = 'com.ticktick.task' desired_caps['appActivity'] = '.activity.MeTaskActivity' driver = webdriver.Remote...
35.205882
146
0.777778
from appium import webdriver import time desired_caps = {} desired_caps['platformName'] = 'Android' desired_caps['platformVersion'] = '8.0' desired_caps['deviceName'] = 'Android Emulator' desired_caps['appPackage'] = 'com.ticktick.task' desired_caps['appActivity'] = '.activity.MeTaskActivity' driver = webdriver.Remote...
true
true
08fc583d0b9e55ed4c490ed45d11a715324d51c1
1,141
py
Python
crypto/bitcoinScraping.py
metacogpe/python
f7b2bcd0fae9ae9899399e3a314ffea3955896b0
[ "Apache-2.0" ]
null
null
null
crypto/bitcoinScraping.py
metacogpe/python
f7b2bcd0fae9ae9899399e3a314ffea3955896b0
[ "Apache-2.0" ]
null
null
null
crypto/bitcoinScraping.py
metacogpe/python
f7b2bcd0fae9ae9899399e3a314ffea3955896b0
[ "Apache-2.0" ]
null
null
null
import requests # python -m pip install requests import datetime r = requests.get("https://api.korbit.co.kr/v1/ticker/detailed?currency_pair=btc_krw") bitcoin = r.json() timestamp = bitcoin['timestamp'] date = datetime.datetime.fromtimestamp(timestamp/1000) print(date) print(bitcoin['bid']) print(bitcoin['ask'])...
24.276596
88
0.707274
import requests import datetime r = requests.get("https://api.korbit.co.kr/v1/ticker/detailed?currency_pair=btc_krw") bitcoin = r.json() timestamp = bitcoin['timestamp'] date = datetime.datetime.fromtimestamp(timestamp/1000) print(date) print(bitcoin['bid']) print(bitcoin['ask']) print(bitcoin['volume']) print(r...
true
true
08fc58e68dbaee3e6fb6e546a43fb3151609e9bf
11,851
py
Python
tests/httpbin_test.py
druid8/decorest
c9d78394f3e84828bb31d4b266ad93eb32703277
[ "Apache-2.0" ]
null
null
null
tests/httpbin_test.py
druid8/decorest
c9d78394f3e84828bb31d4b266ad93eb32703277
[ "Apache-2.0" ]
null
null
null
tests/httpbin_test.py
druid8/decorest
c9d78394f3e84828bb31d4b266ad93eb32703277
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright 2018 Bartosz Kryza <bkryza@gmail.com> # # 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 requir...
21.469203
79
0.591933
import pytest import time import os import sys import json from decorest import __version__, HttpStatus from requests import cookies from requests.exceptions import ReadTimeout, HTTPError from requests.auth import HTTPBasicAuth, HTTPDigestAuth from requests_toolbelt.multipart.encoder import MultipartEncoder import xml...
true
true
08fc5aa478f4e0b950d3a5ef062eb8f5cc9034a1
13,517
py
Python
mne/viz/tests/test_ica.py
stlukyanenko/mne-python
508cfbc13bc2e068efb3bf8b7999b83047851729
[ "BSD-3-Clause" ]
1
2021-03-29T02:16:35.000Z
2021-03-29T02:16:35.000Z
mne/viz/tests/test_ica.py
Moonshadowzb/mne-python
89647f3363fcb5de306cc18e55e7b9fa89fe0315
[ "BSD-3-Clause" ]
null
null
null
mne/viz/tests/test_ica.py
Moonshadowzb/mne-python
89647f3363fcb5de306cc18e55e7b9fa89fe0315
[ "BSD-3-Clause" ]
null
null
null
# Authors: Denis Engemann <denis.engemann@gmail.com> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # # License: Simplified BSD import os.path as op import numpy as np from numpy.testing import assert_equal, assert_array_equal import pytest import matplotlib.pyplot as plt from mne import read_events, Ep...
37.032877
79
0.641562
import os.path as op import numpy as np from numpy.testing import assert_equal, assert_array_equal import pytest import matplotlib.pyplot as plt from mne import read_events, Epochs, read_cov, pick_types, Annotations from mne.io import read_raw_fif from mne.preprocessing import ICA, create_ecg_epochs, create_eog_epoc...
true
true
08fc5b54b27a2297b81e7f1f32927f318c1558e5
385
py
Python
kaggle_adcal_2021/__init__.py
sinchir0/kaggle_adcal_2021
15eec5c3b99e98afc07c11c278230191379a1e30
[ "MIT" ]
null
null
null
kaggle_adcal_2021/__init__.py
sinchir0/kaggle_adcal_2021
15eec5c3b99e98afc07c11c278230191379a1e30
[ "MIT" ]
null
null
null
kaggle_adcal_2021/__init__.py
sinchir0/kaggle_adcal_2021
15eec5c3b99e98afc07c11c278230191379a1e30
[ "MIT" ]
null
null
null
from kaggle_adcal_2021.model.sample import Sample from kaggle_adcal_2021.model.get_tweet import GetTweetTask from kaggle_adcal_2021.model.extract_text_info import PreprocessTextTask from kaggle_adcal_2021.model.merge_tweet import MergeTweetTask from kaggle_adcal_2021.model.classify_lang import AddClassifyLangColTask fr...
64.166667
72
0.909091
from kaggle_adcal_2021.model.sample import Sample from kaggle_adcal_2021.model.get_tweet import GetTweetTask from kaggle_adcal_2021.model.extract_text_info import PreprocessTextTask from kaggle_adcal_2021.model.merge_tweet import MergeTweetTask from kaggle_adcal_2021.model.classify_lang import AddClassifyLangColTask fr...
true
true
08fc5bbc772d0e4591c67e2a0bebed2b80f12e91
4,910
py
Python
boxm2/boxm2WriteSceneXML.py
mirestrepo/voxels-at-lems
df47d031653d2ad877a97b3c1ea574b924b7d4c2
[ "BSD-2-Clause" ]
2
2015-09-18T00:17:16.000Z
2019-02-06T04:41:29.000Z
boxm2/boxm2WriteSceneXML.py
mirestrepo/voxels-at-lems
df47d031653d2ad877a97b3c1ea574b924b7d4c2
[ "BSD-2-Clause" ]
null
null
null
boxm2/boxm2WriteSceneXML.py
mirestrepo/voxels-at-lems
df47d031653d2ad877a97b3c1ea574b924b7d4c2
[ "BSD-2-Clause" ]
null
null
null
import boxm2_batch, sys class dbvalue: def __init__(self, index, type): self.id = index # unsigned integer self.type = type # string def writeSceneFromBox(data_path, resolution, min_pt, max_pt, ntrees_x=64, ntrees_y=64, ntrees_z=32, max_num_lvls=4, appearance_model = "boxm2_mog3_grey...
47.669903
240
0.69389
import boxm2_batch, sys class dbvalue: def __init__(self, index, type): self.id = index self.type = type def writeSceneFromBox(data_path, resolution, min_pt, max_pt, ntrees_x=64, ntrees_y=64, ntrees_z=32, max_num_lvls=4, appearance_model = "boxm2_mog3_grey", occupancy_model = "boxm2_nu...
false
true
08fc5cb1dced07419054a946bb8215665b291c68
3,908
py
Python
demo.py
Ushk/fourier-feature-networks
af4947e137e31c5e3a887d800f1995485414297d
[ "MIT" ]
null
null
null
demo.py
Ushk/fourier-feature-networks
af4947e137e31c5e3a887d800f1995485414297d
[ "MIT" ]
null
null
null
demo.py
Ushk/fourier-feature-networks
af4947e137e31c5e3a887d800f1995485414297d
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torchvision import numpy as np from tqdm import tqdm from dataset import ImageDataset class Swish(nn.Module): def __init__(self): super().__init__() def forward(self, x): return x * torch.sigmoid(x) class SirenLayer(nn.Module): def __init__(se...
28.948148
92
0.591095
import torch import torch.nn as nn import torchvision import numpy as np from tqdm import tqdm from dataset import ImageDataset class Swish(nn.Module): def __init__(self): super().__init__() def forward(self, x): return x * torch.sigmoid(x) class SirenLayer(nn.Module): def __init__(se...
true
true
08fc5d1f31e39e5733c1020bb59ddcec42c5c807
2,085
py
Python
touchdown/tests/test_aws_external_account.py
yaybu/touchdown
70ecda5191ce2d095bc074dcb23bfa1584464814
[ "Apache-2.0" ]
14
2015-01-05T18:18:04.000Z
2022-02-07T19:35:12.000Z
touchdown/tests/test_aws_external_account.py
yaybu/touchdown
70ecda5191ce2d095bc074dcb23bfa1584464814
[ "Apache-2.0" ]
106
2015-01-06T00:17:13.000Z
2019-09-07T00:35:32.000Z
touchdown/tests/test_aws_external_account.py
yaybu/touchdown
70ecda5191ce2d095bc074dcb23bfa1584464814
[ "Apache-2.0" ]
5
2015-01-30T10:18:24.000Z
2022-02-07T19:35:13.000Z
# Copyright 2016 Isotoma Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
35.948276
88
0.633573
from touchdown.tests.aws import StubberTestCase from touchdown.tests.fixtures.aws import VpcFixture from touchdown.tests.stubs.aws import ExternalAccountStubber class TestExternalAccount(StubberTestCase): def test_acquire_role(self): goal = self.create_goal("apply") external_account = self.fixtu...
true
true
08fc5d8c5d3505334ae9288303604f1b7aea6a2c
3,534
py
Python
sunpy/conftest.py
tacaswell/sunpy
1e06d75408d1a621749a5d4e743ae44a31886100
[ "BSD-2-Clause" ]
null
null
null
sunpy/conftest.py
tacaswell/sunpy
1e06d75408d1a621749a5d4e743ae44a31886100
[ "BSD-2-Clause" ]
null
null
null
sunpy/conftest.py
tacaswell/sunpy
1e06d75408d1a621749a5d4e743ae44a31886100
[ "BSD-2-Clause" ]
null
null
null
import os import tempfile import importlib import pytest import astropy import astropy.config.paths # Force MPL to use non-gui backends for testing. try: import matplotlib except ImportError: pass else: matplotlib.use('Agg') # Don't actually import pytest_remotedata because that can do things to the # e...
27.184615
90
0.695812
import os import tempfile import importlib import pytest import astropy import astropy.config.paths try: import matplotlib except ImportError: pass else: matplotlib.use('Agg') # entrypoints code in pytest. remotedata_spec = importlib.util.find_spec("pytest_remotedata") HAVE_REMOTEDATA = remotedata_spec ...
true
true