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
f775311ee1d86dc8e956845ea2a504a7a4829e92
1,542
py
Python
Exercises/python-ds-practice/fs_4_reverse_vowels/reverse_vowels.py
pedwards95/Springboard_Class
9df8dbd8832223e89b89d12db3f7e0b178e2ed79
[ "MIT" ]
null
null
null
Exercises/python-ds-practice/fs_4_reverse_vowels/reverse_vowels.py
pedwards95/Springboard_Class
9df8dbd8832223e89b89d12db3f7e0b178e2ed79
[ "MIT" ]
null
null
null
Exercises/python-ds-practice/fs_4_reverse_vowels/reverse_vowels.py
pedwards95/Springboard_Class
9df8dbd8832223e89b89d12db3f7e0b178e2ed79
[ "MIT" ]
null
null
null
def reverse_vowels(s): """Reverse vowels in a string. Characters which re not vowels do not change position in string, but all vowels (y is not a vowel), should reverse their order. >>> reverse_vowels("Hello!") 'Holle!' >>> reverse_vowels("Tomatoes") 'Temotaos' >>> reverse_vowels("Re...
29.09434
85
0.605058
def reverse_vowels(s): first_vowel = '' last_vowel = '' forward_index = 0 backward_index = len(s)-1 new_s = [] new_s[:0] = s s = new_s while forward_index < backward_index: while (not first_vowel or not last_vowel) and forward_index < backward_index: if not first_vo...
true
true
f775312f17cfb6ee3d43b0960c72772693c63a14
1,600
py
Python
barriers/models/history/assessments/resolvability.py
felix781/market-access-python-frontend
3b0e49feb4fdf0224816326938a46002aa4a2b1c
[ "MIT" ]
1
2021-12-15T04:14:03.000Z
2021-12-15T04:14:03.000Z
barriers/models/history/assessments/resolvability.py
felix781/market-access-python-frontend
3b0e49feb4fdf0224816326938a46002aa4a2b1c
[ "MIT" ]
19
2019-12-11T11:32:47.000Z
2022-03-29T15:40:57.000Z
barriers/models/history/assessments/resolvability.py
felix781/market-access-python-frontend
3b0e49feb4fdf0224816326938a46002aa4a2b1c
[ "MIT" ]
2
2021-02-09T09:38:45.000Z
2021-03-29T19:07:09.000Z
from ..base import BaseHistoryItem, GenericHistoryItem from ..utils import PolymorphicBase class ApprovedHistoryItem(BaseHistoryItem): field = "approved" field_name = "Resolvability assessment: Approval" def get_value(self, value): if value is True: return "Approved" elif valu...
25.806452
62
0.68625
from ..base import BaseHistoryItem, GenericHistoryItem from ..utils import PolymorphicBase class ApprovedHistoryItem(BaseHistoryItem): field = "approved" field_name = "Resolvability assessment: Approval" def get_value(self, value): if value is True: return "Approved" elif valu...
true
true
f77531b20470d24b82e56a80e77c124082d5d618
9,012
py
Python
statsmodels/tsa/statespace/tests/test_options.py
JarnoRFB/statsmodels
9913b6a4f0243f94a6331c90a3951849f06720f7
[ "BSD-3-Clause" ]
1
2019-04-20T09:42:23.000Z
2019-04-20T09:42:23.000Z
statsmodels/tsa/statespace/tests/test_options.py
JarnoRFB/statsmodels
9913b6a4f0243f94a6331c90a3951849f06720f7
[ "BSD-3-Clause" ]
null
null
null
statsmodels/tsa/statespace/tests/test_options.py
JarnoRFB/statsmodels
9913b6a4f0243f94a6331c90a3951849f06720f7
[ "BSD-3-Clause" ]
1
2019-04-20T09:42:12.000Z
2019-04-20T09:42:12.000Z
""" Tests for setting options in KalmanFilter, KalmanSmoother, SimulationSmoother (does not test the filtering, smoothing, or simulation smoothing for each option) Author: Chad Fulton License: Simplified-BSD """ from __future__ import division, absolute_import, print_function import numpy as np from statsmodels.tsa....
34.528736
118
0.694296
from __future__ import division, absolute_import, print_function import numpy as np from statsmodels.tsa.statespace.kalman_filter import ( FILTER_CONVENTIONAL, FILTER_EXACT_INITIAL, FILTER_AUGMENTED, FILTER_SQUARE_ROOT, FILTER_UNIVARIATE, FILTER_COLLAPSED, FILTER_EXTENDED, FILTER_UNSCEN...
true
true
f77531dd527117c23277f48c0909baf559241a7e
6,484
py
Python
indelvcf/etc/utils.py
ncod3/indelvcf
83481bfe0913a62227c16ff91310a5982f9a4658
[ "MIT" ]
null
null
null
indelvcf/etc/utils.py
ncod3/indelvcf
83481bfe0913a62227c16ff91310a5982f9a4658
[ "MIT" ]
null
null
null
indelvcf/etc/utils.py
ncod3/indelvcf
83481bfe0913a62227c16ff91310a5982f9a4658
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 # -*- coding: utf-8 -*- import sys import os import glob import pandas as pd import time import datetime import logging import logging.config # global configuration import vprimer.glv as glv import subprocess as sbp from subprocess import PIPE def start_log(): ''' from conf.py _set_pat...
22.129693
73
0.578192
import sys import os import glob import pandas as pd import time import datetime import logging import logging.config import vprimer.glv as glv import subprocess as sbp from subprocess import PIPE def start_log(): logging.config.dictConfig(glv.conf.log.config) global log log = logging.getLogger(__nam...
true
true
f7753268702c05887de8c80e25ff6077b0454b25
6,537
py
Python
data_loader.py
salesforce/burn-after-reading
939d969d67a9ba325eba9e1cb9c696908f9d88db
[ "BSD-3-Clause" ]
4
2022-03-30T18:02:10.000Z
2022-03-30T22:46:13.000Z
data_loader.py
salesforce/burn-after-reading
939d969d67a9ba325eba9e1cb9c696908f9d88db
[ "BSD-3-Clause" ]
null
null
null
data_loader.py
salesforce/burn-after-reading
939d969d67a9ba325eba9e1cb9c696908f9d88db
[ "BSD-3-Clause" ]
null
null
null
''' * Copyright (c) 2021, salesforce.com, inc. * All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause ''' from torchvision import datasets, transforms import torch import numpy as np import random...
33.870466
119
0.633165
from torchvision import datasets, transforms import torch import numpy as np import random from PIL import Image from torch.utils.data import Dataset import os import os.path import cv2 import torchvision from randaugment import RandAugmentMC from wilds.common.data_loaders import get_eval_loader from wilds.datasets.ca...
true
true
f77533143941c6fbc1293906a33f49ee2b392170
5,038
py
Python
tracardi_discord_webhook/plugin.py
Tracardi/tracardi-discord-webhook
085f9d4f2a20e8eeb0d4f2de76edcf08a5c8c98c
[ "MIT" ]
null
null
null
tracardi_discord_webhook/plugin.py
Tracardi/tracardi-discord-webhook
085f9d4f2a20e8eeb0d4f2de76edcf08a5c8c98c
[ "MIT" ]
null
null
null
tracardi_discord_webhook/plugin.py
Tracardi/tracardi-discord-webhook
085f9d4f2a20e8eeb0d4f2de76edcf08a5c8c98c
[ "MIT" ]
null
null
null
import asyncio import aiohttp from aiohttp import ClientConnectorError from tracardi_plugin_sdk.domain.register import Plugin, Spec, MetaData, Form, FormGroup, FormField, FormComponent from tracardi_plugin_sdk.domain.result import Result from tracardi_plugin_sdk.action_runner import ActionRunner from tracardi_dot_notat...
38.458015
116
0.478364
import asyncio import aiohttp from aiohttp import ClientConnectorError from tracardi_plugin_sdk.domain.register import Plugin, Spec, MetaData, Form, FormGroup, FormField, FormComponent from tracardi_plugin_sdk.domain.result import Result from tracardi_plugin_sdk.action_runner import ActionRunner from tracardi_dot_notat...
true
true
f775338c50a2e6bba8a040a8cb2c51060ee1be37
1,834
py
Python
web-search-engine/crawln/bing_crawl.py
robertwenquan/nyu-course-assignment
c03a4fb157d385b650c38feb861f283f2e1928fd
[ "Apache-2.0" ]
1
2018-01-22T21:35:42.000Z
2018-01-22T21:35:42.000Z
web-search-engine/crawln/bing_crawl.py
robertwenquan/nyu-course-assignment
c03a4fb157d385b650c38feb861f283f2e1928fd
[ "Apache-2.0" ]
null
null
null
web-search-engine/crawln/bing_crawl.py
robertwenquan/nyu-course-assignment
c03a4fb157d385b650c38feb861f283f2e1928fd
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import requests from bs4 import BeautifulSoup from urlparse import urljoin import validation_check as vc __author__ = "Robert Wen <robert.wen@nyu.edu>, Caicai Chen <caicai.chen@nyu.edu>" ''' Bing Web Search Engine Crawler ''' class BingWebCrawler(object): ''' Bing Web...
26.57971
143
0.636859
import requests from bs4 import BeautifulSoup from urlparse import urljoin import validation_check as vc __author__ = "Robert Wen <robert.wen@nyu.edu>, Caicai Chen <caicai.chen@nyu.edu>" class BingWebCrawler(object): def __init__(self, keywords, fake): self.queries = keywords self.fake = fake def make...
true
true
f775359e60d643fa4f286ba26e8629e3efbcc1e0
1,994
py
Python
src/utils.py
lRomul/argus-bengali-ai
e64374230f5390a17305769126ff4bfc9a2a8644
[ "MIT" ]
2
2020-05-08T09:25:38.000Z
2020-10-04T16:15:29.000Z
src/utils.py
lRomul/argus-bengali-ai
e64374230f5390a17305769126ff4bfc9a2a8644
[ "MIT" ]
2
2022-01-13T03:19:24.000Z
2022-03-12T00:48:13.000Z
src/utils.py
lRomul/argus-bengali-ai
e64374230f5390a17305769126ff4bfc9a2a8644
[ "MIT" ]
null
null
null
import re import numpy as np from pathlib import Path from scipy.stats.mstats import gmean from src.ema import ModelEma def initialize_amp(model, opt_level='O1', keep_batchnorm_fp32=None, loss_scale='dynamic'): from apex import amp model.nn_module, mod...
30.676923
67
0.614343
import re import numpy as np from pathlib import Path from scipy.stats.mstats import gmean from src.ema import ModelEma def initialize_amp(model, opt_level='O1', keep_batchnorm_fp32=None, loss_scale='dynamic'): from apex import amp model.nn_module, mod...
true
true
f7753600d4f95f443ad8c7ed91793bd7693db666
6,837
py
Python
psyneulink/core/components/shellclasses.py
bdsinger/PsyNeuLink
71d8a0bb1691ff85061d4ad3de866d9930a69a73
[ "Apache-2.0" ]
null
null
null
psyneulink/core/components/shellclasses.py
bdsinger/PsyNeuLink
71d8a0bb1691ff85061d4ad3de866d9930a69a73
[ "Apache-2.0" ]
null
null
null
psyneulink/core/components/shellclasses.py
bdsinger/PsyNeuLink
71d8a0bb1691ff85061d4ad3de866d9930a69a73
[ "Apache-2.0" ]
null
null
null
# Princeton University licenses this file to You 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 writin...
38.195531
120
0.584759
from psyneulink.core.components.component import Component __all__ = [ 'Function', 'Mechanism', 'Process_Base', 'Projection', 'ShellClass', 'ShellClassError', 'State', 'System_Base', ] class ShellClassError(Exception): def __init__(self, error_value): self.error_value = error_value def __str__...
true
true
f775373b0df1dcaa77932c9ecced1e8b49bf9b16
5,677
py
Python
depot/storage.py
jportasa/depot
849f41af5a1bbb6e98739a7cd2d15abe065abed1
[ "Apache-2.0" ]
null
null
null
depot/storage.py
jportasa/depot
849f41af5a1bbb6e98739a7cd2d15abe065abed1
[ "Apache-2.0" ]
null
null
null
depot/storage.py
jportasa/depot
849f41af5a1bbb6e98739a7cd2d15abe065abed1
[ "Apache-2.0" ]
null
null
null
import hashlib import os import tempfile import six import libcloud.security from libcloud.storage.providers import get_driver from libcloud.storage.types import ContainerDoesNotExistError, ObjectDoesNotExistError from six.moves.urllib.parse import urlparse # Include the current cURL CA bundle as a fallback _base_pat...
34.615854
132
0.566849
import hashlib import os import tempfile import six import libcloud.security from libcloud.storage.providers import get_driver from libcloud.storage.types import ContainerDoesNotExistError, ObjectDoesNotExistError from six.moves.urllib.parse import urlparse _base_path = os.path.abspath(os.path.dirname(__file__)) libc...
true
true
f775377885a5f54647082b427f9370bfc0aeedf9
901
py
Python
zpylib/compiler/compiler.py
louisyoungx/zpycli
87deb188d1fd7782c60912edf1eeedb719b649a6
[ "MIT" ]
null
null
null
zpylib/compiler/compiler.py
louisyoungx/zpycli
87deb188d1fd7782c60912edf1eeedb719b649a6
[ "MIT" ]
null
null
null
zpylib/compiler/compiler.py
louisyoungx/zpycli
87deb188d1fd7782c60912edf1eeedb719b649a6
[ "MIT" ]
null
null
null
from .tokenhandler import TokenHandler # 编译器 class Compiler(object): # 编译 def compile(self, file, targetType): self.file = file self.targetType = targetType self.result = '' if self.targetType == 'zpy': return self.pyToZpy(self.file) elif self.targetType == ...
25.742857
71
0.584906
from .tokenhandler import TokenHandler class Compiler(object): def compile(self, file, targetType): self.file = file self.targetType = targetType self.result = '' if self.targetType == 'zpy': return self.pyToZpy(self.file) elif self.targetType == 'py': ...
true
true
f775381c4ec6b222f617f595b7c0063df2bcdce1
3,704
py
Python
homeassistant/components/sensor/ios.py
sgrzys/AIS-home-assistant
7bfc4d6d90de75eea06702c36474d91bf38df3bf
[ "Apache-2.0" ]
2
2020-08-29T07:24:56.000Z
2020-10-27T21:47:35.000Z
homeassistant/components/sensor/ios.py
sgrzys/AIS-home-assistant
7bfc4d6d90de75eea06702c36474d91bf38df3bf
[ "Apache-2.0" ]
6
2021-02-08T20:25:50.000Z
2022-03-11T23:27:53.000Z
homeassistant/components/sensor/ios.py
sgrzys/AIS-home-assistant
7bfc4d6d90de75eea06702c36474d91bf38df3bf
[ "Apache-2.0" ]
3
2018-09-14T07:34:09.000Z
2018-09-29T12:57:10.000Z
""" Support for Home Assistant iOS app sensors. For more details about this platform, please refer to the documentation at https://home-assistant.io/ecosystem/ios/ """ from homeassistant.components import ios from homeassistant.helpers.entity import Entity from homeassistant.helpers.icon import icon_for_battery_level ...
34.616822
78
0.649568
from homeassistant.components import ios from homeassistant.helpers.entity import Entity from homeassistant.helpers.icon import icon_for_battery_level DEPENDENCIES = ['ios'] SENSOR_TYPES = { 'level': ['Battery Level', '%'], 'state': ['Battery State', None] } DEFAULT_ICON_LEVEL = 'mdi:battery' DEFAULT_ICON_ST...
true
true
f7753836cd1392726918b291be25a936a14676b3
362
py
Python
Lights/adafruit-circuitpython-bundle-6.x-mpy-20210310/examples/ltr390_simpletest.py
IanSMoyes/SpiderPi
cc3469980ae87b92d0dc43c05dbd579f0fa8c4b1
[ "Apache-2.0" ]
7
2021-03-15T10:06:20.000Z
2022-03-23T02:53:15.000Z
Lights/adafruit-circuitpython-bundle-6.x-mpy-20210310/examples/ltr390_simpletest.py
IanSMoyes/SpiderPi
cc3469980ae87b92d0dc43c05dbd579f0fa8c4b1
[ "Apache-2.0" ]
null
null
null
Lights/adafruit-circuitpython-bundle-6.x-mpy-20210310/examples/ltr390_simpletest.py
IanSMoyes/SpiderPi
cc3469980ae87b92d0dc43c05dbd579f0fa8c4b1
[ "Apache-2.0" ]
null
null
null
# SPDX-FileCopyrightText: 2020 by Bryan Siepert, written for Adafruit Industries # # SPDX-License-Identifier: Unlicense import time import board import busio import adafruit_ltr390 i2c = busio.I2C(board.SCL, board.SDA) ltr = adafruit_ltr390.LTR390(i2c) while True: print("UV:", ltr.uvs, "\t\tAmbient ...
22.625
81
0.71547
import time import board import busio import adafruit_ltr390 i2c = busio.I2C(board.SCL, board.SDA) ltr = adafruit_ltr390.LTR390(i2c) while True: print("UV:", ltr.uvs, "\t\tAmbient Light:", ltr.light) time.sleep(1.0)
true
true
f77538d46a5ce0a517a4ae89f4151029ee5daff8
5,200
py
Python
cogdl/utils/evaluator.py
li-ziang/cogdl
60022d3334e3abae2d2a505e6e049a26acf10f39
[ "MIT" ]
6
2020-07-09T02:48:41.000Z
2021-06-16T09:04:14.000Z
cogdl/utils/evaluator.py
li-ziang/cogdl
60022d3334e3abae2d2a505e6e049a26acf10f39
[ "MIT" ]
null
null
null
cogdl/utils/evaluator.py
li-ziang/cogdl
60022d3334e3abae2d2a505e6e049a26acf10f39
[ "MIT" ]
1
2020-05-19T11:45:45.000Z
2020-05-19T11:45:45.000Z
from typing import Union, Callable import numpy as np import warnings import torch import torch.nn as nn from sklearn.metrics import f1_score def setup_evaluator(metric: Union[str, Callable]): if isinstance(metric, str): metric = metric.lower() if metric == "acc" or metric == "accuracy": ...
28.888889
78
0.598077
from typing import Union, Callable import numpy as np import warnings import torch import torch.nn as nn from sklearn.metrics import f1_score def setup_evaluator(metric: Union[str, Callable]): if isinstance(metric, str): metric = metric.lower() if metric == "acc" or metric == "accuracy": ...
true
true
f7753974e15ff74f8cb8e47336a6d827cb089c6c
2,506
py
Python
auxiliary/np_ioueval.py
bjajoh/lidar_transfer
63cbdf0000c5c64e710dc28771cb95ad104feac8
[ "MIT" ]
55
2021-02-09T08:05:59.000Z
2022-03-31T07:59:07.000Z
auxiliary/np_ioueval.py
ZiyiLiubird/semantic-kitti-api
9a6366264b1fd95d7a84e05bd41659524fd9fd32
[ "MIT" ]
4
2021-02-15T11:15:45.000Z
2021-09-27T08:06:30.000Z
auxiliary/np_ioueval.py
ZiyiLiubird/semantic-kitti-api
9a6366264b1fd95d7a84e05bd41659524fd9fd32
[ "MIT" ]
10
2021-02-10T08:12:27.000Z
2021-12-23T02:43:36.000Z
#!/usr/bin/env python3 # This file is covered by the LICENSE file in the root of this project. import sys import numpy as np class iouEval: def __init__(self, n_classes, ignore=None): # classes self.n_classes = n_classes # What to include and ignore from the means self.ignore = np.array(ignore, dt...
26.104167
83
0.61652
import sys import numpy as np class iouEval: def __init__(self, n_classes, ignore=None): self.n_classes = n_classes self.ignore = np.array(ignore, dtype=np.int64) self.include = np.array( [n for n in range(self.n_classes) if n not in self.ignore], dtype=np.int64) print("[IOU EVAL] ...
true
true
f77539a2f8f585e513baf64ef54d563ca069fffe
1,628
py
Python
FFT.py
ssalopek/DFT_FFT_ImageDenoise
9ced6175b39c0c8f205b84fcd7d3fbb16bdca8d8
[ "MIT" ]
null
null
null
FFT.py
ssalopek/DFT_FFT_ImageDenoise
9ced6175b39c0c8f205b84fcd7d3fbb16bdca8d8
[ "MIT" ]
null
null
null
FFT.py
ssalopek/DFT_FFT_ImageDenoise
9ced6175b39c0c8f205b84fcd7d3fbb16bdca8d8
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt from scipy import fftpack from matplotlib.colors import LogNorm import cv2 import time start = time.time() #Load input image image_source = cv2.imread('C:/FaksGit/FourierFilter/TestImages/man.png') gray_image = cv2.cvtColor(image_source, cv2.COLOR_BGR2GRAY) #Plot in...
23.594203
87
0.756757
import numpy as np import matplotlib.pyplot as plt from scipy import fftpack from matplotlib.colors import LogNorm import cv2 import time start = time.time() image_source = cv2.imread('C:/FaksGit/FourierFilter/TestImages/man.png') gray_image = cv2.cvtColor(image_source, cv2.COLOR_BGR2GRAY) plt.figure() plt.imshow(gr...
true
true
f77539fc614bca38dd9fa891326d3ec0c66a5733
6,832
py
Python
tests/test_datautils.py
michaelgale/toolbox-py
7349991da690bb4149072b000a8038396f2507a9
[ "MIT" ]
null
null
null
tests/test_datautils.py
michaelgale/toolbox-py
7349991da690bb4149072b000a8038396f2507a9
[ "MIT" ]
null
null
null
tests/test_datautils.py
michaelgale/toolbox-py
7349991da690bb4149072b000a8038396f2507a9
[ "MIT" ]
null
null
null
# Sample Test passing with nose and pytest # system modules import math, os.path import sys import pytest import pprint from math import pi # my modules from toolbox import * def test_str_constraint(): x = str_constraint("5.0", 5) assert x x = str_constraint("5.0", 4.75) assert not x x = str_con...
26.792157
85
0.656323
import math, os.path import sys import pytest import pprint from math import pi from toolbox import * def test_str_constraint(): x = str_constraint("5.0", 5) assert x x = str_constraint("5.0", 4.75) assert not x x = str_constraint(">3.0", 3.5) assert x x = str_constraint(">3.0", 3.0) ...
true
true
f7753a69c0061d83c3597a261be9c294413bfccc
43,481
py
Python
refex/test_cli.py
ssbr/refex
221d343b8584362900fb93a07ff96a4b9d9d4ece
[ "Apache-2.0" ]
11
2020-08-28T03:54:49.000Z
2022-01-06T05:55:21.000Z
refex/test_cli.py
ssbr/refex
221d343b8584362900fb93a07ff96a4b9d9d4ece
[ "Apache-2.0" ]
5
2020-08-25T16:19:05.000Z
2021-06-07T21:31:03.000Z
refex/test_cli.py
ssbr/refex
221d343b8584362900fb93a07ff96a4b9d9d4ece
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Google LLC # # 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, ...
36.385774
107
0.611003
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import contextlib import json import os import re import sys import textwrap import unittest from unittest import mock from absl.testing import absltest from absl.testing import parameterized ...
true
true
f7753a6c6cb409742dfa2a8fbdb83953a3660e52
1,716
py
Python
get_info_on_all_users/contact_methods.py
DuncanMillard/public-support-scripts
8981fd33a010fa4605028205b1d139c484b4ceac
[ "Apache-2.0" ]
null
null
null
get_info_on_all_users/contact_methods.py
DuncanMillard/public-support-scripts
8981fd33a010fa4605028205b1d139c484b4ceac
[ "Apache-2.0" ]
null
null
null
get_info_on_all_users/contact_methods.py
DuncanMillard/public-support-scripts
8981fd33a010fa4605028205b1d139c484b4ceac
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import argparse import pdpyras import sys # Disables noisy warning logging from pdpyras import logging logging.disable(logging.WARNING) # Get all users' contact methods. # Originally by Ryan Hoskin def get_users(session): sys.stdout.write("Listing All Users' Contact Methods:\n") for us...
35.75
79
0.636364
import argparse import pdpyras import sys import logging logging.disable(logging.WARNING) # Originally by Ryan Hoskin def get_users(session): sys.stdout.write("Listing All Users' Contact Methods:\n") for user in session.iter_all('users'): sys.stdout.write("User: ") sys.stdout.write(user['nam...
true
true
f7753ad4a7694a001f4600ae0cbe288739b2a522
3,045
py
Python
micropsi_core/tests/test_runtime_nodenet_copy.py
brucepro/micropsi2
84c304d5339f25d112da5565fb2cd98c31524f94
[ "Apache-2.0" ]
null
null
null
micropsi_core/tests/test_runtime_nodenet_copy.py
brucepro/micropsi2
84c304d5339f25d112da5565fb2cd98c31524f94
[ "Apache-2.0" ]
null
null
null
micropsi_core/tests/test_runtime_nodenet_copy.py
brucepro/micropsi2
84c304d5339f25d112da5565fb2cd98c31524f94
[ "Apache-2.0" ]
null
null
null
#!/usr/local/bin/python # -*- coding: utf-8 -*- """ """ from micropsi_core import runtime as micropsi __author__ = 'joscha' __date__ = '12.11.12' def test_copy_nodes(): success, nodenet_uid1 = micropsi.new_nodenet("Origin_Nodenet", worldadapter="Default", owner="tester") success, nodenet_uid2 = micropsi.ne...
40.6
121
0.671593
from micropsi_core import runtime as micropsi __author__ = 'joscha' __date__ = '12.11.12' def test_copy_nodes(): success, nodenet_uid1 = micropsi.new_nodenet("Origin_Nodenet", worldadapter="Default", owner="tester") success, nodenet_uid2 = micropsi.new_nodenet("Target_Nodenet", worldadapter="Default", owner...
true
true
f7753b3464c81f8f58fc74078c299dab0c6e68d9
689
py
Python
horovodUntar.py
NanoNabla/HorovodTar
ef99981fdc1e07bedbb4987d9977b95fedad3c8c
[ "BSD-3-Clause" ]
null
null
null
horovodUntar.py
NanoNabla/HorovodTar
ef99981fdc1e07bedbb4987d9977b95fedad3c8c
[ "BSD-3-Clause" ]
null
null
null
horovodUntar.py
NanoNabla/HorovodTar
ef99981fdc1e07bedbb4987d9977b95fedad3c8c
[ "BSD-3-Clause" ]
null
null
null
import os import argparse import horovod.tensorflow as hvd import tarfile def horovod_untar(in_file, out_dir): hvd.init() if hvd.local_rank() == 0: if not os.path.isdir(out_dir): os.makedirs(out_dir) # if not tarfile.is_tarfile(in_file): # raise Exception() tar =...
28.708333
81
0.679245
import os import argparse import horovod.tensorflow as hvd import tarfile def horovod_untar(in_file, out_dir): hvd.init() if hvd.local_rank() == 0: if not os.path.isdir(out_dir): os.makedirs(out_dir) tar = tarfile.open(in_file).extractall(out_dir) if __name__ == "__main__...
true
true
f7753cd27f531d96b35c8f9ded9341e0b1affcd4
30,090
py
Python
histolab/filters/image_filters_functional.py
histolab/histolab
e5e28846fada56d04b90cf32a2772fbdb2e0786a
[ "Apache-2.0" ]
149
2020-06-23T17:56:04.000Z
2022-03-26T05:51:08.000Z
histolab/filters/image_filters_functional.py
histolab/histolab
e5e28846fada56d04b90cf32a2772fbdb2e0786a
[ "Apache-2.0" ]
245
2020-06-22T22:56:06.000Z
2022-03-28T03:18:11.000Z
histolab/filters/image_filters_functional.py
histolab/histolab
e5e28846fada56d04b90cf32a2772fbdb2e0786a
[ "Apache-2.0" ]
31
2020-06-23T17:56:36.000Z
2022-02-07T07:41:26.000Z
# encoding: utf-8 # ------------------------------------------------------------------------ # Copyright 2020 All Histolab Contributors # # 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 # # ...
31.149068
88
0.640213
import math import operator from functools import reduce from typing import Any, Callable import numpy as np import PIL import PIL.ImageOps import skimage.color as sk_color import skimage.exposure as sk_exposure import skimage.feature as sk_feature import skimage.filters as sk_filters import skimage.future as sk_fut...
true
true
f7753cf092a1e715def89bc975674abca186479b
24,730
py
Python
lib/python2.7/site-packages/django/core/urlresolvers.py
ervinpepic/E-commerce
2c15255d1730728cf35c166b9f88cffcb99f5323
[ "MIT" ]
null
null
null
lib/python2.7/site-packages/django/core/urlresolvers.py
ervinpepic/E-commerce
2c15255d1730728cf35c166b9f88cffcb99f5323
[ "MIT" ]
null
null
null
lib/python2.7/site-packages/django/core/urlresolvers.py
ervinpepic/E-commerce
2c15255d1730728cf35c166b9f88cffcb99f5323
[ "MIT" ]
2
2019-04-29T14:16:10.000Z
2020-07-23T12:04:17.000Z
""" This module converts requested URLs to callback view functions. RegexURLResolver is the main class here. Its resolve() method takes a URL (as a string) and returns a tuple in this format: (view_function, function_args, function_kwargs) """ from __future__ import unicode_literals import functools import re im...
37.987711
107
0.594865
from __future__ import unicode_literals import functools import re import warnings from importlib import import_module from threading import local from django.core.exceptions import ImproperlyConfigured, ViewDoesNotExist from django.http import Http404 from django.utils import lru_cache, six from django.utils.datastr...
true
true
f7753d92842cab56acd598a66414299fcba29940
7,488
py
Python
tests/system/python/e2e/test_e2e_filter_fft_threshold.py
ashish-ScaleDB/FogLAMP
fd52bc53f6a10752acdb1c549279dcaa406893a5
[ "Apache-2.0" ]
1
2020-09-10T11:34:04.000Z
2020-09-10T11:34:04.000Z
tests/system/python/e2e/test_e2e_filter_fft_threshold.py
YashTatkondawar/FogLAMP
6a3a6d45db9c9f0058110252202826e9859ccfa1
[ "Apache-2.0" ]
1
2017-09-06T14:05:21.000Z
2017-09-06T14:05:21.000Z
tests/system/python/e2e/test_e2e_filter_fft_threshold.py
YashTatkondawar/FogLAMP
6a3a6d45db9c9f0058110252202826e9859ccfa1
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # FOGLAMP_BEGIN # See: http://foglamp.readthedocs.io/ # FOGLAMP_END """ Test end to end flow with: Playback south plugin FFT Filter on playback south plugin and Threshold on PI north PI Server (C) plugin """ import http.client import os import json import time import ...
40.695652
122
0.64196
import http.client import os import json import time import pytest import utils import subprocess __author__ = "Vaibhav Singhal" __copyright__ = "Copyright (c) 2019 Dianomic Systems Inc." __license__ = "Apache 2.0" __version__ = "${VERSION}" SVC_NAME = "playfilter" CSV_NAME = "wind-data.csv" CSV_HEADERS = "10 Mi...
true
true
f7753dd73e344a8ecdc66bb6a0c502c56a307f6a
973
py
Python
setup.py
coeyl/Projectile_Prediction-1
dbc01c2ed7d274e1c43a825f511132a37edc33b8
[ "MIT" ]
null
null
null
setup.py
coeyl/Projectile_Prediction-1
dbc01c2ed7d274e1c43a825f511132a37edc33b8
[ "MIT" ]
2
2019-04-25T21:20:52.000Z
2019-06-12T20:20:34.000Z
setup.py
coeyl/Projectile_Prediction-1
dbc01c2ed7d274e1c43a825f511132a37edc33b8
[ "MIT" ]
2
2019-04-26T20:30:46.000Z
2019-04-26T20:41:01.000Z
try: from setuptools import setup, find_packages except ImportError: from distutils.core import setup setup( name='ProP', version='1.0.2', description='Predict projectile requirements through machine learning.', author='Levi Coey', author_email='coeyl@oregonstate.edu', url='https://gith...
29.484848
76
0.618705
try: from setuptools import setup, find_packages except ImportError: from distutils.core import setup setup( name='ProP', version='1.0.2', description='Predict projectile requirements through machine learning.', author='Levi Coey', author_email='coeyl@oregonstate.edu', url='https://gith...
true
true
f7753dfd6aa25dc8313f8a54266cb07ac0bf5af5
18,408
py
Python
object_detection/exporter.py
paulchou0309/obj
d7ae404fa73db60a6fe539d613e48f478b81dbef
[ "MIT" ]
null
null
null
object_detection/exporter.py
paulchou0309/obj
d7ae404fa73db60a6fe539d613e48f478b81dbef
[ "MIT" ]
null
null
null
object_detection/exporter.py
paulchou0309/obj
d7ae404fa73db60a6fe539d613e48f478b81dbef
[ "MIT" ]
null
null
null
# Copyright 2017 The TensorFlow 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 applica...
40.546256
95
0.703607
import logging import os import tempfile import tensorflow as tf from tensorflow.core.protobuf import rewriter_config_pb2 from tensorflow.python import pywrap_tensorflow from tensorflow.python.client import session from tensorflow.python.framework import graph_util from tensorflow.python.platform import gfile from ten...
true
true
f7753f21c18d8756535acf482a2d6c0db63197d3
20,216
py
Python
lino_xl/lib/vat/mixins.py
khchine5/xl
b1634937a9ce87af1e948eb712b934b11f221d9d
[ "BSD-2-Clause" ]
1
2018-01-12T14:09:48.000Z
2018-01-12T14:09:48.000Z
lino_xl/lib/vat/mixins.py
khchine5/xl
b1634937a9ce87af1e948eb712b934b11f221d9d
[ "BSD-2-Clause" ]
1
2019-09-10T05:03:47.000Z
2019-09-10T05:03:47.000Z
lino_xl/lib/vat/mixins.py
khchine5/xl
b1634937a9ce87af1e948eb712b934b11f221d9d
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: UTF-8 -*- # Copyright 2012-2018 Rumma & Ko Ltd # License: BSD (see file COPYING for details) from __future__ import unicode_literals from __future__ import print_function from decimal import Decimal from django.conf import settings from django.db import models # from django.core.exceptions import Vali...
34.091062
83
0.5833
from __future__ import unicode_literals from __future__ import print_function from decimal import Decimal from django.conf import settings from django.db import models from lino.utils import SumCollector from lino.api import dd, rt, _ from lino_xl.lib.excerpts.mixins import Certifiable from lino_xl.lib.ledger.uti...
true
true
f7753ffb69f356047b50b8a71158406285acf0ef
169
py
Python
tests/model_control/detailed/transf_Anscombe/model_control_one_enabled_Anscombe_MovingAverage_Seasonal_DayOfWeek_ARX.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
tests/model_control/detailed/transf_Anscombe/model_control_one_enabled_Anscombe_MovingAverage_Seasonal_DayOfWeek_ARX.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
1
2019-11-30T23:39:38.000Z
2019-12-01T04:34:35.000Z
tests/model_control/detailed/transf_Anscombe/model_control_one_enabled_Anscombe_MovingAverage_Seasonal_DayOfWeek_ARX.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Anscombe'] , ['MovingAverage'] , ['Seasonal_DayOfWeek'] , ['ARX'] );
42.25
91
0.763314
import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Anscombe'] , ['MovingAverage'] , ['Seasonal_DayOfWeek'] , ['ARX'] );
true
true
f77540d335ee8e63f03f15f3bac0bade78758858
210
py
Python
bootcamp_igti/03_web/django/igtiflixweb/principal/views.py
joymaxnascimento/python
6d25270b6738565a2ba95faa1e3e4ba80e8c63fe
[ "MIT" ]
1
2020-06-23T00:11:34.000Z
2020-06-23T00:11:34.000Z
bootcamp_igti/03_web/django/igtiflixweb/principal/views.py
joymaxnascimento/python
6d25270b6738565a2ba95faa1e3e4ba80e8c63fe
[ "MIT" ]
null
null
null
bootcamp_igti/03_web/django/igtiflixweb/principal/views.py
joymaxnascimento/python
6d25270b6738565a2ba95faa1e3e4ba80e8c63fe
[ "MIT" ]
null
null
null
from django.shortcuts import render import os from pathlib import Path from django.http import HttpResponse # Create your views here. def index(request): return render(request, 'principal/index.html')
16.153846
50
0.77619
from django.shortcuts import render import os from pathlib import Path from django.http import HttpResponse def index(request): return render(request, 'principal/index.html')
true
true
f775412a96af87f1d8356bff5007a09c9d6a938d
3,374
py
Python
WorkoutBuddyDataScraper/Scraper.py
paul-mcnamee/WorkoutBuddy
e4a602bbbd6ced1dec9b9287d8edc49f8c93e0fa
[ "MIT" ]
null
null
null
WorkoutBuddyDataScraper/Scraper.py
paul-mcnamee/WorkoutBuddy
e4a602bbbd6ced1dec9b9287d8edc49f8c93e0fa
[ "MIT" ]
null
null
null
WorkoutBuddyDataScraper/Scraper.py
paul-mcnamee/WorkoutBuddy
e4a602bbbd6ced1dec9b9287d8edc49f8c93e0fa
[ "MIT" ]
null
null
null
__author__ = 'paulm_000' import time import shutil import os import re import sys import datetime import urllib import scrapy def create_dir(name, zipcode): # get the current base file path and create a new directory # use the given name and date to make the new directory # TODO: check to ...
31.240741
114
0.596918
__author__ = 'paulm_000' import time import shutil import os import re import sys import datetime import urllib import scrapy def create_dir(name, zipcode): date = datetime.datetime dir = os.path.dirname() filename = name + "_" + zipcode + "_" + date newdir = os.path.join(...
true
true
f775418e0fdf9d8adc351cafc30bd4395932431e
7,853
py
Python
sdk/python/pulumi_azure_native/databoxedge/v20210201preview/get_storage_account_credential.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/databoxedge/v20210201preview/get_storage_account_credential.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/databoxedge/v20210201preview/get_storage_account_credential.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
36.868545
230
0.65007
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs __all__ = [ 'GetStorageAccountCredentialResult', 'AwaitableGetStorageAccountCredentialResult', 'get_storage_account_credential', ] @pul...
true
true
f775432b4d5e6b1a33ee0c6ecc7e1e44e84cf48b
172
py
Python
listeners/shortcuts/__init__.py
slack-samples/bolt-python-starter-template
103bc032e8f158694dbb839beb35545685889525
[ "MIT" ]
1
2022-03-29T16:13:25.000Z
2022-03-29T16:13:25.000Z
listeners/shortcuts/__init__.py
slack-samples/bolt-python-starter-template
103bc032e8f158694dbb839beb35545685889525
[ "MIT" ]
null
null
null
listeners/shortcuts/__init__.py
slack-samples/bolt-python-starter-template
103bc032e8f158694dbb839beb35545685889525
[ "MIT" ]
null
null
null
from slack_bolt import App from .sample_shortcut import sample_shortcut_callback def register(app: App): app.shortcut("sample_shortcut_id")(sample_shortcut_callback)
24.571429
64
0.825581
from slack_bolt import App from .sample_shortcut import sample_shortcut_callback def register(app: App): app.shortcut("sample_shortcut_id")(sample_shortcut_callback)
true
true
f77543614c593161c27b434ad55e613668617c68
876
py
Python
code/L14-9.py
8bitidea/omac-solved-lessons-
b78ee1b41dd310b97a0d5c3c64ab184186e1238f
[ "MIT" ]
null
null
null
code/L14-9.py
8bitidea/omac-solved-lessons-
b78ee1b41dd310b97a0d5c3c64ab184186e1238f
[ "MIT" ]
null
null
null
code/L14-9.py
8bitidea/omac-solved-lessons-
b78ee1b41dd310b97a0d5c3c64ab184186e1238f
[ "MIT" ]
null
null
null
#------------------------------------------- #One Million Arabic Coder (OMRC) #patch Full Stack Web Dev .1 #Lisson 13 Problem Solving #Please note that i am sharing this code to #find the idea behined the problem not for #copy and pasting ! #and i wish if you can find a mistake or ha #ve a better answer let me know ...
22.461538
44
0.635845
#------------------------------------------- # Define a procedure, product_list, # that takes as input a list of numbers, # and returns a number that is # the result of multiplying all # those numbers together. def product_list(list_of_numbers): r = 1 x= 0 while x < len(list_of_numbers): r = r * list_of_number...
false
true
f7754388647465cd74ef689f9d8843793570438b
470
py
Python
settings.py
yawok/target_practice
d9b7bb68f8fdc804cfd51bbacf11b97447ff6577
[ "MIT" ]
null
null
null
settings.py
yawok/target_practice
d9b7bb68f8fdc804cfd51bbacf11b97447ff6577
[ "MIT" ]
null
null
null
settings.py
yawok/target_practice
d9b7bb68f8fdc804cfd51bbacf11b97447ff6577
[ "MIT" ]
null
null
null
class Settings: """class to manage game settings""" def __init__(self): self.screen_size = (700, 550) self.screen_caption = "Target Practice" self.bg_colour = (20, 20, 20) self.ship_colour = (255, 255, 255) self.ship_width = 30 self.ship_height = 20 self....
27.647059
47
0.580851
class Settings: def __init__(self): self.screen_size = (700, 550) self.screen_caption = "Target Practice" self.bg_colour = (20, 20, 20) self.ship_colour = (255, 255, 255) self.ship_width = 30 self.ship_height = 20 self.ship_speed = 2 self.target_colo...
true
true
f775445a655eabfdddfb8d00ed814cb5501616c7
6,726
py
Python
userbot/modules/profile.py
RysepProject/WeebProject
eb153d1901ba8dcf028f395ede9e7f52a19f58e7
[ "Naumen", "Condor-1.1", "MS-PL" ]
1
2021-01-28T08:56:47.000Z
2021-01-28T08:56:47.000Z
userbot/modules/profile.py
RysepProject/WeebProject
eb153d1901ba8dcf028f395ede9e7f52a19f58e7
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/profile.py
RysepProject/WeebProject
eb153d1901ba8dcf028f395ede9e7f52a19f58e7
[ "Naumen", "Condor-1.1", "MS-PL" ]
21
2021-02-01T14:01:42.000Z
2021-08-22T01:13:28.000Z
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.c (the "License"); # you may not use this file except in compliance with the License. # """ Userbot module for changing your Telegram profile details. """ import os from telethon.errors import ImageProcess...
34.849741
101
0.636039
import os from telethon.errors import ImageProcessFailedError, PhotoCropSizeSmallError from telethon.errors.rpcerrorlist import PhotoExtInvalidError, UsernameOccupiedError from telethon.tl.functions.account import UpdateProfileRequest, UpdateUsernameRequest from telethon.tl.functions.channels import GetAdminedPublicC...
true
true
f77544842bb932f4774b4907bdc5566138d6faae
1,521
py
Python
mdsearch/Similarity/sentence_similarity.py
lydia07/mdsearch
a328e822d6d66869aeefef687887b0a39d4f4512
[ "MIT" ]
null
null
null
mdsearch/Similarity/sentence_similarity.py
lydia07/mdsearch
a328e822d6d66869aeefef687887b0a39d4f4512
[ "MIT" ]
null
null
null
mdsearch/Similarity/sentence_similarity.py
lydia07/mdsearch
a328e822d6d66869aeefef687887b0a39d4f4512
[ "MIT" ]
null
null
null
import torch from scipy.spatial.distance import cosine from transformers import BertModel, BertTokenizer import os class SentenceSimilarity: def __init__(self, model_path='bert-base-uncased'): self.tokenizer = BertTokenizer.from_pretrained(model_path) self.model = BertModel.from_pretrained(model_...
29.823529
80
0.656147
import torch from scipy.spatial.distance import cosine from transformers import BertModel, BertTokenizer import os class SentenceSimilarity: def __init__(self, model_path='bert-base-uncased'): self.tokenizer = BertTokenizer.from_pretrained(model_path) self.model = BertModel.from_pretrained(model_...
true
true
f77544ab6c164e7da1548247a206c57ea05c093c
2,541
py
Python
cogs/utils/dataIO.py
nihaals/DabbitPrimeBot
a7c0e906a9065e3de7665a5f050c43e2cc11259d
[ "MIT" ]
null
null
null
cogs/utils/dataIO.py
nihaals/DabbitPrimeBot
a7c0e906a9065e3de7665a5f050c43e2cc11259d
[ "MIT" ]
null
null
null
cogs/utils/dataIO.py
nihaals/DabbitPrimeBot
a7c0e906a9065e3de7665a5f050c43e2cc11259d
[ "MIT" ]
1
2019-12-19T04:14:22.000Z
2019-12-19T04:14:22.000Z
import json import os import logging from random import randint class InvalidFileIO(Exception): pass class DataIO(): def __init__(self): self.logger = logging.getLogger("red") def save_json(self, filename, data): """Atomically saves json file""" rnd = randint(1000, 9999) p...
32.164557
76
0.582054
import json import os import logging from random import randint class InvalidFileIO(Exception): pass class DataIO(): def __init__(self): self.logger = logging.getLogger("red") def save_json(self, filename, data): rnd = randint(1000, 9999) path, ext = os.path.splitext(filename) ...
true
true
f775458ee9dec8643d4b334bdf8409a1eef1756a
1,627
py
Python
blazar/cmd/status.py
takanattie/blazar
63d94170b59937995247ff8443a3303e5288d304
[ "Apache-2.0" ]
24
2015-10-18T02:53:07.000Z
2022-01-04T12:01:07.000Z
blazar/cmd/status.py
takanattie/blazar
63d94170b59937995247ff8443a3303e5288d304
[ "Apache-2.0" ]
19
2017-05-23T21:34:09.000Z
2022-02-21T19:15:29.000Z
blazar/cmd/status.py
takanattie/blazar
63d94170b59937995247ff8443a3303e5288d304
[ "Apache-2.0" ]
22
2015-10-30T07:42:40.000Z
2021-05-31T14:33:38.000Z
# Copyright (c) 2018 NEC, Corp. # # 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 agr...
31.901961
79
0.717886
import sys from oslo_config import cfg from oslo_upgradecheck import common_checks from oslo_upgradecheck import upgradecheck from blazar.i18n import _ class Checks(upgradecheck.UpgradeCommands): # summary will be rolled up at the end of the check() method. _upgrade_checks = ( ...
true
true
f775461222d0b9b4ad196b21e2e144d1159fc077
2,630
py
Python
ucsmsdk/mometa/adaptor/AdaptorEthWorkQueueProfile.py
anoop1984/python_sdk
c4a226bad5e10ad233eda62bc8f6d66a5a82b651
[ "Apache-2.0" ]
null
null
null
ucsmsdk/mometa/adaptor/AdaptorEthWorkQueueProfile.py
anoop1984/python_sdk
c4a226bad5e10ad233eda62bc8f6d66a5a82b651
[ "Apache-2.0" ]
null
null
null
ucsmsdk/mometa/adaptor/AdaptorEthWorkQueueProfile.py
anoop1984/python_sdk
c4a226bad5e10ad233eda62bc8f6d66a5a82b651
[ "Apache-2.0" ]
null
null
null
"""This module contains the general information for AdaptorEthWorkQueueProfile ManagedObject.""" import sys, os from ...ucsmo import ManagedObject from ...ucscoremeta import UcsVersion, MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class AdaptorEthWorkQueueProfileConsts(): pass class AdaptorEthWork...
51.568627
304
0.664259
import sys, os from ...ucsmo import ManagedObject from ...ucscoremeta import UcsVersion, MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class AdaptorEthWorkQueueProfileConsts(): pass class AdaptorEthWorkQueueProfile(ManagedObject): consts = AdaptorEthWorkQueueProfileConsts() naming_props = ...
true
true
f77547470c5b8de7f9e1f28defb3798da19360a9
689
py
Python
manage.py
Thuhaa/goalspatial
349c3a8e96d6553dedba6791f0102f2d02ee9c00
[ "MIT" ]
null
null
null
manage.py
Thuhaa/goalspatial
349c3a8e96d6553dedba6791f0102f2d02ee9c00
[ "MIT" ]
null
null
null
manage.py
Thuhaa/goalspatial
349c3a8e96d6553dedba6791f0102f2d02ee9c00
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'goalspatial.settings') try: from django.core.management import execute_from_command_line ...
29.956522
76
0.658926
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'goalspatial.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installe...
true
true
f775476598df351443f989f6efe333252fa28cf6
4,132
py
Python
ibms_project/ibms/migrations/0002_auto_20170904_1150.py
mohdbakhrayba/ibms
029e1f3bf108586289c65bb1d547f86851f9494f
[ "Apache-2.0" ]
2
2019-09-07T20:39:29.000Z
2021-09-16T12:02:16.000Z
ibms_project/ibms/migrations/0002_auto_20170904_1150.py
mohdbakhrayba/ibms
029e1f3bf108586289c65bb1d547f86851f9494f
[ "Apache-2.0" ]
11
2020-06-18T06:53:01.000Z
2022-02-11T01:55:42.000Z
ibms_project/ibms/migrations/0002_auto_20170904_1150.py
mohdbakhrayba/ibms
029e1f3bf108586289c65bb1d547f86851f9494f
[ "Apache-2.0" ]
5
2016-01-18T04:36:48.000Z
2017-09-07T06:38:28.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-09-04 03:50 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ibms', '0001_initial'), ] operations = [ migrations.AlterField( ...
62.606061
316
0.549371
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ibms', '0001_initial'), ] operations = [ migrations.AlterField( model_name='corporatestrategy', name='financialYear', ...
true
true
f7754780fcea46ddd7ed6ab2f1be7ec63aa9c9fa
257
py
Python
scuole/states/sitemaps.py
texastribune/scuole
8ab316ee50ef0d8e71b94b50dc889d10c6e83412
[ "MIT" ]
1
2019-03-12T04:30:02.000Z
2019-03-12T04:30:02.000Z
scuole/states/sitemaps.py
texastribune/scuole
8ab316ee50ef0d8e71b94b50dc889d10c6e83412
[ "MIT" ]
616
2017-08-18T21:15:39.000Z
2022-03-25T11:17:10.000Z
scuole/states/sitemaps.py
texastribune/scuole
8ab316ee50ef0d8e71b94b50dc889d10c6e83412
[ "MIT" ]
null
null
null
from django.contrib.sitemaps import Sitemap from scuole.states.models import State class StateSitemap(Sitemap): changefreq = 'yearly' priority = 0.5 protocol = 'https' limit = 1000 def items(self): return State.objects.all()
18.357143
43
0.684825
from django.contrib.sitemaps import Sitemap from scuole.states.models import State class StateSitemap(Sitemap): changefreq = 'yearly' priority = 0.5 protocol = 'https' limit = 1000 def items(self): return State.objects.all()
true
true
f775488bb6f33adf2da5d1859e964d9e81a6bd82
7,001
py
Python
oneflow/python/nn/optimizer/rmsprop.py
MaoXianXin/oneflow
6caa52f3c5ba11a1d67f183bac4c1559b2a58ef5
[ "Apache-2.0" ]
1
2021-02-22T00:43:08.000Z
2021-02-22T00:43:08.000Z
oneflow/python/nn/optimizer/rmsprop.py
MaoXianXin/oneflow
6caa52f3c5ba11a1d67f183bac4c1559b2a58ef5
[ "Apache-2.0" ]
null
null
null
oneflow/python/nn/optimizer/rmsprop.py
MaoXianXin/oneflow
6caa52f3c5ba11a1d67f183bac4c1559b2a58ef5
[ "Apache-2.0" ]
null
null
null
""" Copyright 2020 The OneFlow 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 law or agr...
37.438503
104
0.584345
from typing import List, Dict, Callable, Union, Iterator import collections import oneflow as flow from oneflow.python.oneflow_export import oneflow_export, experimental_api from oneflow.python.nn.parameter import Parameter from oneflow.python.nn.optimizer.optimizer import ParamGroup, Optimizer @oneflow_export("op...
true
true
f77548f9736b14d53fcd743c5d9e06ff129e2e30
2,775
py
Python
research/cv/mobilenetV3_small_x1_0/src/monitor.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
1
2021-11-18T08:17:44.000Z
2021-11-18T08:17:44.000Z
research/cv/mobilenetV3_small_x1_0/src/monitor.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
null
null
null
research/cv/mobilenetV3_small_x1_0/src/monitor.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
2
2019-09-01T06:17:04.000Z
2019-10-04T08:39:45.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # 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...
38.013699
118
0.603604
import time import numpy as np from mindspore import Tensor from mindspore.train.callback import Callback class Monitor(Callback): def __init__(self, lr_init=None): super(Monitor, self).__init__() self.lr_init = lr_init self.lr_init_len = len(lr_init) def epoch_begin(self, run_context)...
true
true
f775491e4a29997f2672e9dd9aa413ca98a3f484
34,672
bzl
Python
tensorflow/workspace.bzl
lulzsec2012/tensorflow
d68d869e397515655e9f41570f4db463df770563
[ "Apache-2.0" ]
4
2019-02-18T17:38:14.000Z
2019-09-05T14:14:47.000Z
tensorflow/workspace.bzl
lulzsec2012/tensorflow
d68d869e397515655e9f41570f4db463df770563
[ "Apache-2.0" ]
null
null
null
tensorflow/workspace.bzl
lulzsec2012/tensorflow
d68d869e397515655e9f41570f4db463df770563
[ "Apache-2.0" ]
3
2018-04-11T03:08:18.000Z
2021-05-09T21:51:42.000Z
# TensorFlow external dependencies that can be loaded in WORKSPACE files. load("//third_party/gpus:cuda_configure.bzl", "cuda_configure") load("//third_party/tensorrt:tensorrt_configure.bzl", "tensorrt_configure") load("//third_party:nccl/nccl_configure.bzl", "nccl_configure") load("//third_party/mkl:build_defs.bzl", ...
42.752158
163
0.702555
load("//third_party/gpus:cuda_configure.bzl", "cuda_configure") load("//third_party/tensorrt:tensorrt_configure.bzl", "tensorrt_configure") load("//third_party:nccl/nccl_configure.bzl", "nccl_configure") load("//third_party/mkl:build_defs.bzl", "mkl_repository") load("//third_party/git:git_configure.bzl", "git_configu...
true
true
f775493c7920fe89374fbbd724489ed931405146
15,952
py
Python
nanome/_internal/_ui/_serialization/_button_serializer.py
nanome-ai/nanome-plugin-api
f2ce6a5e3123ee7449a90c2659f3891124289f4a
[ "MIT" ]
3
2020-07-02T13:08:27.000Z
2021-11-24T14:32:53.000Z
nanome/_internal/_ui/_serialization/_button_serializer.py
nanome-ai/nanome-plugin-api
f2ce6a5e3123ee7449a90c2659f3891124289f4a
[ "MIT" ]
11
2020-09-14T17:01:47.000Z
2022-02-18T04:00:52.000Z
nanome/_internal/_ui/_serialization/_button_serializer.py
nanome-ai/nanome-plugin-api
f2ce6a5e3123ee7449a90c2659f3891124289f4a
[ "MIT" ]
5
2020-08-12T16:30:03.000Z
2021-12-06T18:04:23.000Z
from nanome._internal._util._serializers import _StringSerializer, _ColorSerializer, _Vector3Serializer, _CachedImageSerializer from nanome.util.enums import VertAlignOptions, HorizAlignOptions, ToolTipPositioning from . import _UIBaseSerializer from .. import _Button from nanome._internal._util._serializers import _T...
59.301115
127
0.68073
from nanome._internal._util._serializers import _StringSerializer, _ColorSerializer, _Vector3Serializer, _CachedImageSerializer from nanome.util.enums import VertAlignOptions, HorizAlignOptions, ToolTipPositioning from . import _UIBaseSerializer from .. import _Button from nanome._internal._util._serializers import _T...
true
true
f7754a8a536531d8dd4175548faf8014fa1e5420
1,087
py
Python
parser/parser/test/util.py
MADE-realtime/realtime_news
0a63687cad0ccefd772b2c28d7138d8db52d5f20
[ "MIT" ]
null
null
null
parser/parser/test/util.py
MADE-realtime/realtime_news
0a63687cad0ccefd772b2c28d7138d8db52d5f20
[ "MIT" ]
null
null
null
parser/parser/test/util.py
MADE-realtime/realtime_news
0a63687cad0ccefd772b2c28d7138d8db52d5f20
[ "MIT" ]
null
null
null
import os from scrapy.http import HtmlResponse, Request def fake_response_from_file(file_path, url=None): """ Create a Scrapy fake HTTP response from a HTML file @param file_path: The relative filename from the responses directory, but absolute paths are also accepted. @param url...
28.605263
73
0.669733
import os from scrapy.http import HtmlResponse, Request def fake_response_from_file(file_path, url=None): if not url: url = 'http://www.example.com' request = Request(url=url) file_path = get_abs_path(file_path) file_content = open(file_path, 'rb').read() response = HtmlResponse(url=url...
true
true
f7754ac3de2299594bc13acba6946cd43fa10311
4,772
py
Python
pypureclient/flasharray/FA_2_10/models/drive_get_response.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
14
2018-12-07T18:30:27.000Z
2022-02-22T09:12:33.000Z
pypureclient/flasharray/FA_2_10/models/drive_get_response.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
28
2019-09-17T21:03:52.000Z
2022-03-29T22:07:35.000Z
pypureclient/flasharray/FA_2_10/models/drive_get_response.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
15
2020-06-11T15:50:08.000Z
2022-03-21T09:27:25.000Z
# coding: utf-8 """ FlashArray REST API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 2.10 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re import six import typing from ...
36.707692
524
0.604568
import pprint import re import six import typing from ....properties import Property if typing.TYPE_CHECKING: from pypureclient.flasharray.FA_2_10 import models class DriveGetResponse(object): swagger_types = { 'more_items_remaining': 'bool', 'total_item_count': 'int', 'continuatio...
true
true
f7754ae292991dfad56c8afa68c4dbfaa4fad951
15,175
py
Python
pysrc/ild_disp.py
javiereguiluz/xed
42830f15ebb1e97ebf94b70448259bfa11c79aa1
[ "Apache-2.0" ]
17
2019-01-13T23:15:34.000Z
2022-03-30T20:21:33.000Z
pysrc/ild_disp.py
andreas-abel/XED-to-XML
a65089eca7cc2fbfde152eab5b8283fa602bd26d
[ "Apache-2.0" ]
null
null
null
pysrc/ild_disp.py
andreas-abel/XED-to-XML
a65089eca7cc2fbfde152eab5b8283fa602bd26d
[ "Apache-2.0" ]
null
null
null
#BEGIN_LEGAL # #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 applicable ...
38.515228
81
0.643031
import collections import ild_nt import ildutil import codegen import ild_eosz import ild_easz import ild_info import ild_codegen import operand_storage import mbuild _disp_token = 'DISP_WIDTH' _brdisp_token = 'BRDISP_WIDTH' _ild_t_disp_member = 'disp_width' _l3_c_fn = 'xed-ild-disp-l3.c' _l2_c...
true
true
f7754bcec7216a246f522c90138c5e55cb275683
313
py
Python
datahub/investment/project/report/apps.py
Staberinde/data-hub-api
3d0467dbceaf62a47158eea412a3dba827073300
[ "MIT" ]
6
2019-12-02T16:11:24.000Z
2022-03-18T10:02:02.000Z
datahub/investment/project/report/apps.py
Staberinde/data-hub-api
3d0467dbceaf62a47158eea412a3dba827073300
[ "MIT" ]
1,696
2019-10-31T14:08:37.000Z
2022-03-29T12:35:57.000Z
datahub/investment/project/report/apps.py
Staberinde/data-hub-api
3d0467dbceaf62a47158eea412a3dba827073300
[ "MIT" ]
9
2019-11-22T12:42:03.000Z
2021-09-03T14:25:05.000Z
from django.apps import AppConfig class InvestmentReportConfig(AppConfig): """ Configuration class for this app. For legacy reasons the label of this application is report when ideally it should be investment_report. """ name = 'datahub.investment.project.report' label = 'report'
22.357143
67
0.71885
from django.apps import AppConfig class InvestmentReportConfig(AppConfig): name = 'datahub.investment.project.report' label = 'report'
true
true
f7754bd996a118960d0e9da9e69b26c243158d0a
2,411
py
Python
nextstrain/cli/__init__.py
nextstrain/cli
77c97bfecaf3dda84a8c20c343afc70cc6659f53
[ "Apache-2.0", "MIT" ]
22
2019-11-06T01:47:30.000Z
2022-03-29T15:39:27.000Z
nextstrain/cli/__init__.py
nextstrain/cli
77c97bfecaf3dda84a8c20c343afc70cc6659f53
[ "Apache-2.0", "MIT" ]
141
2018-06-29T23:45:45.000Z
2022-03-31T21:02:03.000Z
nextstrain/cli/__init__.py
nextstrain/cli
77c97bfecaf3dda84a8c20c343afc70cc6659f53
[ "Apache-2.0", "MIT" ]
18
2018-07-24T16:33:52.000Z
2021-02-16T20:12:11.000Z
""" Nextstrain command-line interface (CLI) The `nextstrain` program and its subcommands aim to provide a consistent way to run and visualize pathogen builds and access Nextstrain components like Augur and Auspice across computing environments such as Docker, Conda, and AWS Batch. """ import sys import argparse from...
27.089888
112
0.668187
import sys import argparse from argparse import ArgumentParser from types import SimpleNamespace from .argparse import HelpFormatter, register_commands, register_default_command from .command import build, view, deploy, remote, shell, update, check_setup, login, logout, whoami, version from .errors im...
true
true
f7754be5742031d0e7f299be83acaebeab5d60c0
5,356
py
Python
core/clients/pennsieve_api.py
clohr/model-service
dca436188e062fd07dfe589ee61e8bb97aa3ea98
[ "Apache-2.0" ]
null
null
null
core/clients/pennsieve_api.py
clohr/model-service
dca436188e062fd07dfe589ee61e8bb97aa3ea98
[ "Apache-2.0" ]
null
null
null
core/clients/pennsieve_api.py
clohr/model-service
dca436188e062fd07dfe589ee61e8bb97aa3ea98
[ "Apache-2.0" ]
1
2021-03-18T14:17:10.000Z
2021-03-18T14:17:10.000Z
from dataclasses import dataclass from typing import Dict, List, Union from urllib.parse import urlparse import requests import structlog # type: ignore from audit_middleware import Auditor # type: ignore from flask import current_app, has_request_context from requests.adapters import HTTPAdapter from requests.packa...
32.658537
88
0.639843
from dataclasses import dataclass from typing import Dict, List, Union from urllib.parse import urlparse import requests import structlog from audit_middleware import Auditor from flask import current_app, has_request_context from requests.adapters import HTTPAdapter from requests.packages.urllib3.util.retry import ...
true
true
f7754c32591af4db77c31413f6c24c7b944022e6
1,487
py
Python
plenum/test/primary_election/helpers.py
spivachuk/plenum
05123166e8ffa89520541ea3b59b20390aaf92a4
[ "Apache-2.0" ]
null
null
null
plenum/test/primary_election/helpers.py
spivachuk/plenum
05123166e8ffa89520541ea3b59b20390aaf92a4
[ "Apache-2.0" ]
null
null
null
plenum/test/primary_election/helpers.py
spivachuk/plenum
05123166e8ffa89520541ea3b59b20390aaf92a4
[ "Apache-2.0" ]
2
2017-12-13T21:14:54.000Z
2021-06-06T15:48:03.000Z
from plenum.common.messages.node_messages import Nomination, Primary from plenum.server.replica import Replica from plenum.test.test_node import TestNode def checkNomination(node: TestNode, nomineeName: str): matches = [replica.name for instId, replica in enumerate(node.elector.replicas) if node.el...
39.131579
90
0.689307
from plenum.common.messages.node_messages import Nomination, Primary from plenum.server.replica import Replica from plenum.test.test_node import TestNode def checkNomination(node: TestNode, nomineeName: str): matches = [replica.name for instId, replica in enumerate(node.elector.replicas) if node.el...
true
true
f7754c361e222bf6093ddcb1a51af0506f4ea24c
226
py
Python
Hackerrank_python/1.introduction/06.Write a function.py
manish1822510059/Hackerrank
7c6e4553f033f067e04dc6c756ef90cb43f3c4a8
[ "MIT" ]
39
2020-09-27T05:32:05.000Z
2022-01-08T18:04:05.000Z
Hackerrank_python/1.introduction/06.Write a function.py
manish1822510059/Hackerrank
7c6e4553f033f067e04dc6c756ef90cb43f3c4a8
[ "MIT" ]
5
2020-10-02T13:33:00.000Z
2021-03-01T14:06:08.000Z
Hackerrank_python/1.introduction/06.Write a function.py
manish1822510059/Hackerrank
7c6e4553f033f067e04dc6c756ef90cb43f3c4a8
[ "MIT" ]
6
2020-10-03T04:04:55.000Z
2021-10-18T04:07:53.000Z
def is_leap(year): leap = False # Write your logic here if year%400==0: leap=True elif year%100==0: leap=False elif year%4==0: leap=True return leap year = int(input())
13.294118
27
0.530973
def is_leap(year): leap = False if year%400==0: leap=True elif year%100==0: leap=False elif year%4==0: leap=True return leap year = int(input())
true
true
f7754cee2571bfc4e2c923c8c0360768aa3e9e63
1,642
py
Python
python/pycylon/test/test_df_dist_sorting.py
deHasara/cylon
f5e31a1191d6a30c0a8c5778a7db4a07c5802da8
[ "Apache-2.0" ]
229
2020-07-01T14:05:10.000Z
2022-03-25T12:26:58.000Z
python/pycylon/test/test_df_dist_sorting.py
deHasara/cylon
f5e31a1191d6a30c0a8c5778a7db4a07c5802da8
[ "Apache-2.0" ]
261
2020-06-30T23:23:15.000Z
2022-03-16T09:55:40.000Z
python/pycylon/test/test_df_dist_sorting.py
deHasara/cylon
f5e31a1191d6a30c0a8c5778a7db4a07c5802da8
[ "Apache-2.0" ]
36
2020-06-30T23:14:52.000Z
2022-03-03T02:37:09.000Z
## # 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 the...
29.854545
78
0.661998
import pytest from pycylon import DataFrame, CylonEnv from pycylon.net import MPIConfig import random @pytest.mark.mpi def test_df_dist_sorting(): df1 = DataFrame([random.sample(range(10, 30), 5), random.sample(range(10, 30), 5)]) def check_sort(df, col, ascending): arr = df.to_...
true
true
f7754d5468a48dea478aae7d927ca3859155468b
1,009
py
Python
life_time/life_time/urls.py
FelipeChiriboga/project_life_time
d1d30570d992693102e168af8a9c423066756e6b
[ "MIT" ]
null
null
null
life_time/life_time/urls.py
FelipeChiriboga/project_life_time
d1d30570d992693102e168af8a9c423066756e6b
[ "MIT" ]
null
null
null
life_time/life_time/urls.py
FelipeChiriboga/project_life_time
d1d30570d992693102e168af8a9c423066756e6b
[ "MIT" ]
null
null
null
"""life_time URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-bas...
34.793103
80
0.70664
from django.contrib import admin from django.urls import path from life.views import main, sub_person_1, sub_person_2, sub_relation, sub_times urlpatterns = [ path('admin/', admin.site.urls), path('first_person/', sub_person_1), path('second_person/', sub_person_2), path('relation/', sub_relation), ...
true
true
f7754d688ea81f849e8caedb18747b0314de8ed3
1,674
py
Python
Chanet.py
ParadoxZW/CIFAR100-PRACTICE
175d9a72fc8e7d79ec3ef8670028d1efe830e5b9
[ "MIT" ]
1
2020-04-15T11:01:28.000Z
2020-04-15T11:01:28.000Z
Chanet.py
ParadoxZW/CIFAR100-PRACTICE
175d9a72fc8e7d79ec3ef8670028d1efe830e5b9
[ "MIT" ]
null
null
null
Chanet.py
ParadoxZW/CIFAR100-PRACTICE
175d9a72fc8e7d79ec3ef8670028d1efe830e5b9
[ "MIT" ]
null
null
null
# just for fun, give channel some meanings about relations # between positions. from modules import * from torch import tensor import torch import numpy as np import torch.nn.functional as F from torch import nn class Group(nn.Module): """ resblocks with same input and output size. """ def __init__(...
32.192308
85
0.569892
from modules import * from torch import tensor import torch import numpy as np import torch.nn.functional as F from torch import nn class Group(nn.Module): def __init__(self, n, in_channels, in_width): super(Group, self).__init__() branch1 = [SeResBlock(channels=in_channels) for _ in range(n)] ...
true
true
f7754da97110afbd9d86bb2d0c3abd9790dc4286
7,770
py
Python
examples/second/configs/kitti_car_vfev3_spmiddlefhd_rpn1_mghead_syncbn.py
reinforcementdriving/CIA-SSD
f7b4a9ed4a2b852845303efc6c972125438817a6
[ "Apache-2.0" ]
382
2020-12-05T06:46:28.000Z
2022-03-29T17:40:58.000Z
examples/second/configs/kitti_car_vfev3_spmiddlefhd_rpn1_mghead_syncbn.py
reinforcementdriving/CIA-SSD
f7b4a9ed4a2b852845303efc6c972125438817a6
[ "Apache-2.0" ]
28
2020-12-08T07:50:57.000Z
2022-03-20T03:54:43.000Z
examples/second/configs/kitti_car_vfev3_spmiddlefhd_rpn1_mghead_syncbn.py
reinforcementdriving/CIA-SSD
f7b4a9ed4a2b852845303efc6c972125438817a6
[ "Apache-2.0" ]
57
2020-12-10T02:19:03.000Z
2022-03-19T09:49:38.000Z
import itertools import logging from pathlib import Path from det3d.builder import build_box_coder from det3d.utils.config_tool import get_downsample_factor data_root_prefix = "/mnt/proj50/zhengwu" norm_cfg = None tasks = [dict(num_class=1, class_names=["Car"],),] class_names = list(itertools.chain(*[t["class_names"] ...
32.240664
147
0.683398
import itertools import logging from pathlib import Path from det3d.builder import build_box_coder from det3d.utils.config_tool import get_downsample_factor data_root_prefix = "/mnt/proj50/zhengwu" norm_cfg = None tasks = [dict(num_class=1, class_names=["Car"],),] class_names = list(itertools.chain(*[t["class_names"] ...
true
true
f7754dbd688a9d1f59873cf6531f2a59d9bd1ca5
4,950
py
Python
MLR/nn.py
JingweiToo/Machine-Learning-Regression-Toolbox
77f2b1ee49cf5e5116102197064ce2dc13a23ed0
[ "BSD-3-Clause" ]
1
2021-08-24T06:48:02.000Z
2021-08-24T06:48:02.000Z
MLR/nn.py
JingweiToo/Machine-Learning-Regression-Toolbox
77f2b1ee49cf5e5116102197064ce2dc13a23ed0
[ "BSD-3-Clause" ]
null
null
null
MLR/nn.py
JingweiToo/Machine-Learning-Regression-Toolbox
77f2b1ee49cf5e5116102197064ce2dc13a23ed0
[ "BSD-3-Clause" ]
1
2021-05-09T19:25:33.000Z
2021-05-09T19:25:33.000Z
import numpy as np from sklearn.neural_network import MLPRegressor from sklearn.model_selection import train_test_split from sklearn.model_selection import KFold from sklearn.model_selection import LeaveOneOut from sklearn.metrics import r2_score def jho(feat, label, opts): ho = 0.3 # ratio of...
29.464286
94
0.527475
import numpy as np from sklearn.neural_network import MLPRegressor from sklearn.model_selection import train_test_split from sklearn.model_selection import KFold from sklearn.model_selection import LeaveOneOut from sklearn.metrics import r2_score def jho(feat, label, opts): ho = 0.3 hls ...
true
true
f7754e38cb5a5352edbd8f2e60250ed6af11842e
6,879
py
Python
model_zoo/official/cv/densenet121/src/datasets/classification.py
noaeilat14/mindspore
837bd032ef37ba24be61259acd9474bb4e148d76
[ "Apache-2.0" ]
2
2021-04-22T07:00:59.000Z
2021-11-08T02:49:09.000Z
model_zoo/official/cv/densenet121/src/datasets/classification.py
noaeilat14/mindspore
837bd032ef37ba24be61259acd9474bb4e148d76
[ "Apache-2.0" ]
1
2020-12-29T06:46:38.000Z
2020-12-29T06:46:38.000Z
model_zoo/official/cv/densenet121/src/datasets/classification.py
kungfu-ml/mindspore
3fa5dd4495f4071b701e7ff490b7085b8824aaaa
[ "Apache-2.0" ]
1
2021-05-12T06:30:29.000Z
2021-05-12T06:30:29.000Z
# Copyright 2020 Huawei Technologies Co., Ltd # # 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...
44.096154
117
0.612298
import os from PIL import Image, ImageFile from mindspore import dtype as mstype import mindspore.dataset as de import mindspore.dataset.vision.c_transforms as vision_C import mindspore.dataset.transforms.c_transforms as normal_C from src.datasets.sampler import DistributedSampler ImageFile.LOAD_TRUNCATED_IMAGES = T...
true
true
f7754eb461c9ccc5018f1598a817c6d9a4754d6e
1,305
py
Python
PEPit/primitive_steps/proximal_step.py
bgoujaud/PEPit
7352607069f5e90fb1919fc689ec5e9d745c3bac
[ "MIT" ]
44
2021-11-18T16:41:20.000Z
2022-02-14T09:59:13.000Z
PEPit/primitive_steps/proximal_step.py
bgoujaud/PEPit
7352607069f5e90fb1919fc689ec5e9d745c3bac
[ "MIT" ]
2
2021-10-05T09:20:25.000Z
2022-02-19T13:58:01.000Z
PEPit/primitive_steps/proximal_step.py
PerformanceEstimation/PEPit
7005bc9a9da11dea448966437365c897734ec341
[ "MIT" ]
1
2022-02-08T12:03:29.000Z
2022-02-08T12:03:29.000Z
from PEPit.point import Point from PEPit.expression import Expression def proximal_step(x0, f, gamma): """ This routine performs a proximal step of step-size **gamma**, starting from **x0**, and on function **f**. That is, it performs: .. math:: :nowrap: \\begin{eqnarray} ...
29.659091
155
0.547126
from PEPit.point import Point from PEPit.expression import Expression def proximal_step(x0, f, gamma): gx = Point() fx = Expression() x = x0 - gamma * gx f.add_point((x, gx, fx)) return x, gx, fx
true
true
f7754ee2c8d03cafc6a8d9d934568cd221406404
3,132
py
Python
examples/sheets_copy_example.py
Ressmann/starthinker
301c5cf17e382afee346871974ca2f4ae905a94a
[ "Apache-2.0" ]
138
2018-11-28T21:42:44.000Z
2022-03-30T17:26:35.000Z
examples/sheets_copy_example.py
Ressmann/starthinker
301c5cf17e382afee346871974ca2f4ae905a94a
[ "Apache-2.0" ]
36
2019-02-19T18:33:20.000Z
2022-01-24T18:02:44.000Z
examples/sheets_copy_example.py
Ressmann/starthinker
301c5cf17e382afee346871974ca2f4ae905a94a
[ "Apache-2.0" ]
54
2018-12-06T05:47:32.000Z
2022-02-21T22:01:01.000Z
########################################################################### # # Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/l...
34.417582
104
0.653576
import argparse import textwrap from starthinker.util.configuration import Configuration from starthinker.task.sheets.run import sheets def recipe_sheets_copy(config, auth_read, from_sheet, from_tab, to_sheet, to_tab): sheets(config, { 'auth':auth_read, 'template':{ 'sheet':from_sheet, 'tab':...
true
true
f7755038412c3a4f0d5d97156de0fa410dbf1d24
1,750
py
Python
Markov_comp.py
xxelloss/Markov-Learning
56b47f046fcc130b33aeaff7792fd73ee40f0501
[ "MIT" ]
null
null
null
Markov_comp.py
xxelloss/Markov-Learning
56b47f046fcc130b33aeaff7792fd73ee40f0501
[ "MIT" ]
null
null
null
Markov_comp.py
xxelloss/Markov-Learning
56b47f046fcc130b33aeaff7792fd73ee40f0501
[ "MIT" ]
null
null
null
# Markov chain comparison class # create multiple Markov_learning classes, and conduct comparison import numpy as np import Markov_learning as ml import copy class Markov_comp(object): # attributes # it may have multiple Markov_learning objects # maximum, 10 ML=[] # how many MLs? for comparison be...
29.166667
82
0.564
import numpy as np import Markov_learning as ml import copy class Markov_comp(object): ML=[] num_ML = 0 test_mode = 0 conditions = 0 size = 0 status_t0 = 0 length = 0 comp_matrix = [] def __init__(self, conditions, size, length, schedu...
true
true
f775504a7d497cf5f30614b748b271820c9d9859
4,112
py
Python
tests/test_prototypes.py
claytondaley/basecrm-client
b2fc056770cdf3e5b18eaaefe113e422c27f6791
[ "Apache-2.0" ]
1
2015-03-22T18:23:41.000Z
2015-03-22T18:23:41.000Z
tests/test_prototypes.py
claytondaley/basecrm-client
b2fc056770cdf3e5b18eaaefe113e422c27f6791
[ "Apache-2.0" ]
13
2015-04-20T20:21:50.000Z
2015-04-26T13:46:08.000Z
tests/test_prototypes.py
claytondaley/basecrm-client
b2fc056770cdf3e5b18eaaefe113e422c27f6791
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """Test the functionality of Prototypes""" import logging logger = logging.getLogger(__name__) from mock import Mock from nose.tools import assert_raises, eq_ from prototype import Resource from tests.test_common import SAMPLES __author__ = 'Clayton Daley III' __copyright__ = "Copyright 2015, C...
28.358621
115
0.686284
import logging logger = logging.getLogger(__name__) from mock import Mock from nose.tools import assert_raises, eq_ from prototype import Resource from tests.test_common import SAMPLES __author__ = 'Clayton Daley III' __copyright__ = "Copyright 2015, Clayton Daley III" __license__ = "Apache License 2.0" __version__ ...
true
true
f7755258e6773db0235771ec643e53499a9856d3
14,984
py
Python
tests/test_cli.py
fphonor/flask
d8bf589d4835ab03daee3101a91c80ee648e72b6
[ "BSD-3-Clause" ]
3
2019-11-02T01:32:09.000Z
2021-08-12T19:48:56.000Z
tests/test_cli.py
fphonor/flask
d8bf589d4835ab03daee3101a91c80ee648e72b6
[ "BSD-3-Clause" ]
null
null
null
tests/test_cli.py
fphonor/flask
d8bf589d4835ab03daee3101a91c80ee648e72b6
[ "BSD-3-Clause" ]
1
2018-03-12T13:49:18.000Z
2018-03-12T13:49:18.000Z
# -*- coding: utf-8 -*- """ tests.test_cli ~~~~~~~~~~~~~~ :copyright: © 2010 by the Pallets team. :license: BSD, see LICENSE for more details. """ # This file was part of Flask-CLI and was modified under the terms of # its Revised BSD License. Copyright © 2015 CERN. from __future__ import absolute_im...
28.059925
91
0.636546
from __future__ import absolute_import import os import ssl import sys import types from functools import partial import click import pytest from _pytest.monkeypatch import notset from click.testing import CliRunner from flask import Flask, current_app from flask.cli import ( AppGroup, FlaskGroup, NoAppExcepti...
true
true
f7755259b7f193348ecc98fff5eefeb253f5c416
14,530
py
Python
model/layers/multiscale_fusion_blocks.py
Shank2358/NPMMR-Det
414d148ff2ba5edbe870a8dafb6336845fb9ffbb
[ "Apache-2.0" ]
27
2021-01-09T07:35:45.000Z
2022-02-06T03:18:54.000Z
model/layers/multiscale_fusion_blocks.py
Shank2358/NPMMR-Det
414d148ff2ba5edbe870a8dafb6336845fb9ffbb
[ "Apache-2.0" ]
4
2021-07-20T07:16:03.000Z
2022-03-29T14:22:59.000Z
modelR/layers/multiscale_fusion_blocks.py
Shank2358/LO-Det
869f3f537af9bc656f2bfdfa97ebb95bf70847a7
[ "Apache-2.0" ]
1
2021-12-26T09:12:08.000Z
2021-12-26T09:12:08.000Z
import torch import torch.nn as nn from ..layers.convolutions import Convolutional, Separable_Conv_dila, Separable_Conv, Deformable_Convolutional import torch.nn.functional as F from ..layers.attention_blocks import SELayer class SPP(nn.Module): def __init__(self, depth=512): super(SPP,self).__init__() ...
52.078853
144
0.656986
import torch import torch.nn as nn from ..layers.convolutions import Convolutional, Separable_Conv_dila, Separable_Conv, Deformable_Convolutional import torch.nn.functional as F from ..layers.attention_blocks import SELayer class SPP(nn.Module): def __init__(self, depth=512): super(SPP,self).__init__() ...
true
true
f77552ae08bfd6a97adbd21f2bf64a62757d0b68
132
py
Python
HolyJS-2021/demos/2_callbacks-python-nodejs/module.py
kuraakhilesh8230/talks
022e6523bdd7153dc5e839f0930b0353b3035008
[ "Apache-2.0" ]
1
2021-04-24T12:19:02.000Z
2021-04-24T12:19:02.000Z
HolyJS-2021/demos/2_callbacks-python-nodejs/module.py
kuraakhilesh8230/talks
022e6523bdd7153dc5e839f0930b0353b3035008
[ "Apache-2.0" ]
3
2021-04-23T07:58:25.000Z
2022-03-08T09:06:33.000Z
HolyJS-2021/demos/2_callbacks-python-nodejs/module.py
kuraakhilesh8230/talks
022e6523bdd7153dc5e839f0930b0353b3035008
[ "Apache-2.0" ]
2
2022-03-05T07:44:46.000Z
2022-03-09T04:50:47.000Z
def operateNumbers(numbers, callback): results = [] for i in numbers: results.append(callback(i)) return results
26.4
38
0.659091
def operateNumbers(numbers, callback): results = [] for i in numbers: results.append(callback(i)) return results
true
true
f7755383ed56106216f5688696e82d2cf5dd595e
1,318
py
Python
consensus/poet/common/sawtooth_poet_common/sgx_structs/__init__.py
ltavag/sawtooth-core
50659f23437b27ecd666d4cf129f812e6adaedc4
[ "Apache-2.0" ]
14
2018-07-27T06:06:31.000Z
2021-12-03T00:30:39.000Z
consensus/poet/common/sawtooth_poet_common/sgx_structs/__init__.py
ltavag/sawtooth-core
50659f23437b27ecd666d4cf129f812e6adaedc4
[ "Apache-2.0" ]
20
2018-07-24T00:58:10.000Z
2021-12-05T22:42:14.000Z
consensus/poet/common/sawtooth_poet_common/sgx_structs/__init__.py
ltavag/sawtooth-core
50659f23437b27ecd666d4cf129f812e6adaedc4
[ "Apache-2.0" ]
38
2018-07-20T19:54:48.000Z
2022-03-20T07:27:46.000Z
# Copyright 2017 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
48.814815
80
0.788316
from sawtooth_poet_common.sgx_structs._sgx_attributes import SgxAttributes from sawtooth_poet_common.sgx_structs._sgx_basename import SgxBasename from sawtooth_poet_common.sgx_structs._sgx_cpu_svn import SgxCpuSvn from sawtooth_poet_common.sgx_structs._sgx_key_id import SgxKeyId from sawtooth_poet_common.sgx_structs._...
true
true
f77553844eca29c98729d8cbcbc75681e92aad19
6,910
py
Python
tests/test_client_api.py
textbook/atmbd
cab14547d2e777a1e26c2560266365c484855789
[ "0BSD" ]
5
2017-12-24T18:35:19.000Z
2021-01-07T15:25:03.000Z
tests/test_client_api.py
textbook/atmbd
cab14547d2e777a1e26c2560266365c484855789
[ "0BSD" ]
4
2016-05-03T22:50:15.000Z
2017-07-26T20:31:29.000Z
tests/test_client_api.py
textbook/atmbd
cab14547d2e777a1e26c2560266365c484855789
[ "0BSD" ]
1
2020-02-19T16:43:17.000Z
2020-02-19T16:43:17.000Z
from datetime import datetime, timedelta, timezone from http import HTTPStatus from asynctest import mock import pytest from atmdb import TMDbClient from tests.helpers import future_from, SimpleSessionMock def test_client_instantiation(client, token): assert client.api_token == token @mock.patch('atmdb.core....
33.872549
96
0.636179
from datetime import datetime, timedelta, timezone from http import HTTPStatus from asynctest import mock import pytest from atmdb import TMDbClient from tests.helpers import future_from, SimpleSessionMock def test_client_instantiation(client, token): assert client.api_token == token @mock.patch('atmdb.core....
true
true
f77554e2c52bca4226315b5ba79be99e5168dac3
232
py
Python
tests/basic_auth_qa.py
yuki-inaho/superannotate-python-sdk
cae3ab09125631ef48d76e6ac017b94a4d7bc4a7
[ "MIT" ]
null
null
null
tests/basic_auth_qa.py
yuki-inaho/superannotate-python-sdk
cae3ab09125631ef48d76e6ac017b94a4d7bc4a7
[ "MIT" ]
null
null
null
tests/basic_auth_qa.py
yuki-inaho/superannotate-python-sdk
cae3ab09125631ef48d76e6ac017b94a4d7bc4a7
[ "MIT" ]
null
null
null
import sys import superannotate as sa try: sa.init(sys.argv[1]) except sa.SABaseException as e: if e.message == "Couldn't authorize": print("Couldn't authorize.") sys.exit(1) else: print("Authorized.")
17.846154
41
0.642241
import sys import superannotate as sa try: sa.init(sys.argv[1]) except sa.SABaseException as e: if e.message == "Couldn't authorize": print("Couldn't authorize.") sys.exit(1) else: print("Authorized.")
true
true
f77555071aefa1f9f3f0af8993170d32504b7554
4,022
py
Python
plugin/depth_v3/model.py
a1600012888/mmdetection3d
2e01549c56dabf1965abc975a7301a8d746973ad
[ "Apache-2.0" ]
null
null
null
plugin/depth_v3/model.py
a1600012888/mmdetection3d
2e01549c56dabf1965abc975a7301a8d746973ad
[ "Apache-2.0" ]
null
null
null
plugin/depth_v3/model.py
a1600012888/mmdetection3d
2e01549c56dabf1965abc975a7301a8d746973ad
[ "Apache-2.0" ]
null
null
null
from mmdet.models import DETECTORS import torch import torch.nn as nn from mmcv.runner import auto_fp16 from mmdet.models.backbones import ResNetV1d from .utils import DepthPredictHead2Up, get_depth_metrics @DETECTORS.register_module() class ResDepthModel(nn.Module): def __init__(self, depth=50, s...
35.910714
111
0.551964
from mmdet.models import DETECTORS import torch import torch.nn as nn from mmcv.runner import auto_fp16 from mmdet.models.backbones import ResNetV1d from .utils import DepthPredictHead2Up, get_depth_metrics @DETECTORS.register_module() class ResDepthModel(nn.Module): def __init__(self, depth=50, s...
true
true
f7755540be24dd702b643bf0d5e58c9d4527ce93
1,106
py
Python
WalklineUtility/tcpclient.py
Walkline80/Iot-Platform-SDK
1c50c2c81ea327712919686023936088ad91a9c5
[ "MIT" ]
null
null
null
WalklineUtility/tcpclient.py
Walkline80/Iot-Platform-SDK
1c50c2c81ea327712919686023936088ad91a9c5
[ "MIT" ]
null
null
null
WalklineUtility/tcpclient.py
Walkline80/Iot-Platform-SDK
1c50c2c81ea327712919686023936088ad91a9c5
[ "MIT" ]
null
null
null
from Walkline.WalklineConfig import * from module import urequests import ujson # import urequests class TCPClient(object): def __init__(self): self._response = None self._status_code = None self._reason = None self._text = None self._json = None def request(self, command: str, data: str): url = "{0}/{...
22.571429
66
0.699819
from Walkline.WalklineConfig import * from module import urequests import ujson class TCPClient(object): def __init__(self): self._response = None self._status_code = None self._reason = None self._text = None self._json = None def request(self, command: str, data: str): url = "{0}/{1}".format(WALKLINE...
true
true
f77556da690f33584794d9746125f17b9f9b146d
1,670
py
Python
src/mlio-py/mlio/integ/scipy.py
babak2520/ml-io
87bedf9537959260723ed0419a0803c76e015ef5
[ "Apache-2.0" ]
69
2019-10-14T18:55:50.000Z
2022-02-28T05:50:39.000Z
src/mlio-py/mlio/integ/scipy.py
cbalioglu/ml-io
d79a895c3fe5e10f0f832cfdcee5a73058abb7c7
[ "Apache-2.0" ]
18
2019-11-16T12:45:40.000Z
2022-01-29T03:47:52.000Z
src/mlio-py/mlio/integ/scipy.py
cbalioglu/ml-io
d79a895c3fe5e10f0f832cfdcee5a73058abb7c7
[ "Apache-2.0" ]
16
2019-10-24T22:35:51.000Z
2021-09-03T18:23:04.000Z
# Copyright 2019-2020 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fi...
28.305085
78
0.668862
import numpy as np from mlio._core import CooTensor from scipy.sparse import coo_matrix def to_coo_matrix(tensor): if not isinstance(tensor, CooTensor): raise ValueError("The Tensor must be an Instance of CooTensor.") s = tensor.shape if len(s) > 2: raise ValueError("Only one- and two...
true
true
f7755722c8be4443871d6b74ac695a8a5ba4340f
2,572
py
Python
qurkexp/join/workers.py
marcua/qurk_experiments
453c207ff50e730aefb6e1118e0f93e33babdb0b
[ "BSD-3-Clause" ]
1
2015-09-30T00:09:06.000Z
2015-09-30T00:09:06.000Z
qurkexp/join/workers.py
marcua/qurk_experiments
453c207ff50e730aefb6e1118e0f93e33babdb0b
[ "BSD-3-Clause" ]
null
null
null
qurkexp/join/workers.py
marcua/qurk_experiments
453c207ff50e730aefb6e1118e0f93e33babdb0b
[ "BSD-3-Clause" ]
null
null
null
# Retrieves the unique worker ids for experiments # for testing overlap between experiments #!/usr/bin/env python import sys, os ROOT = os.path.abspath('%s/../..' % os.path.abspath(os.path.dirname(__file__))) sys.path.append(ROOT) os.environ['DJANGO_SETTINGS_MODULE'] = 'qurkexp.settings' from decimal import Decimal f...
27.655914
127
0.732893
import sys, os ROOT = os.path.abspath('%s/../..' % os.path.abspath(os.path.dirname(__file__))) sys.path.append(ROOT) os.environ['DJANGO_SETTINGS_MODULE'] = 'qurkexp.settings' from decimal import Decimal from django.core.management import setup_environ from django.conf import settings from qurkexp.join.models import ...
false
true
f775574e493a40bdd65aad76a66a127686cc2d17
18,170
py
Python
loopy/codegen/__init__.py
alexfikl/loopy
814612b63fe14dd94af12d4238c387a9929b97b9
[ "MIT" ]
null
null
null
loopy/codegen/__init__.py
alexfikl/loopy
814612b63fe14dd94af12d4238c387a9929b97b9
[ "MIT" ]
null
null
null
loopy/codegen/__init__.py
alexfikl/loopy
814612b63fe14dd94af12d4238c387a9929b97b9
[ "MIT" ]
null
null
null
from __future__ import division, absolute_import __copyright__ = "Copyright (C) 2012 Andreas Kloeckner" __license__ = """ 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, incl...
31.545139
85
0.663952
from __future__ import division, absolute_import __copyright__ = "Copyright (C) 2012 Andreas Kloeckner" __license__ = """ 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, incl...
true
true
f77557ea437b4ad68e57adf39a2c72744252698a
1,489
py
Python
config/i3/bar.py
dalloriam/tooling
b69493f0440cc6d411cce1242eb466807635fc66
[ "MIT" ]
null
null
null
config/i3/bar.py
dalloriam/tooling
b69493f0440cc6d411cce1242eb466807635fc66
[ "MIT" ]
null
null
null
config/i3/bar.py
dalloriam/tooling
b69493f0440cc6d411cce1242eb466807635fc66
[ "MIT" ]
null
null
null
from i3pystatus import Status from i3pystatus.core.color import ColorRangeModule from pathlib import Path import json import os COLOR_THING_GOOD = "#16A085" COLOR_THING_BAD = "#AA6161" def load_interfaces(): try: with open(Path("~").expanduser() / ".interfaces.json") as inf: data = json.lo...
22.907692
108
0.633983
from i3pystatus import Status from i3pystatus.core.color import ColorRangeModule from pathlib import Path import json import os COLOR_THING_GOOD = "#16A085" COLOR_THING_BAD = "#AA6161" def load_interfaces(): try: with open(Path("~").expanduser() / ".interfaces.json") as inf: data = json.lo...
true
true
f77559d68fa951938c362420d5d0bb3fc45202fb
2,610
py
Python
multicurrency/nakfa.py
fscm/multicurrency
5eabdcbfbf427dcafe08d4d05cfce8c9348aeb91
[ "MIT" ]
2
2021-03-26T18:19:57.000Z
2021-07-27T01:15:50.000Z
multicurrency/nakfa.py
fscm/multicurrency
5eabdcbfbf427dcafe08d4d05cfce8c9348aeb91
[ "MIT" ]
null
null
null
multicurrency/nakfa.py
fscm/multicurrency
5eabdcbfbf427dcafe08d4d05cfce8c9348aeb91
[ "MIT" ]
null
null
null
# -*- coding: UTF-8 -*- # # copyright: 2020-2022, Frederico Martins # author: Frederico Martins <http://github.com/fscm> # license: SPDX-License-Identifier: MIT """Nakfa currency representation(s).""" from decimal import Decimal from typing import Optional, Union from .currency import Currency class Nakfa(Currency)...
33.896104
77
0.601916
from decimal import Decimal from typing import Optional, Union from .currency import Currency class Nakfa(Currency): __slots__ = [] def __new__( cls, amount: Union[int, float, Decimal], decimal_places: Optional[int] = 2, decimal_sign: Optional[str] = '.', ...
true
true
f7755a56d92ab07735fa5ddb1e9b8c106dd518bf
750
py
Python
openslides/urls.py
boehlke/OpenSlides
7a64fb83ebda2cb41706f62d7cfc5a63dbcab4a2
[ "MIT" ]
null
null
null
openslides/urls.py
boehlke/OpenSlides
7a64fb83ebda2cb41706f62d7cfc5a63dbcab4a2
[ "MIT" ]
null
null
null
openslides/urls.py
boehlke/OpenSlides
7a64fb83ebda2cb41706f62d7cfc5a63dbcab4a2
[ "MIT" ]
null
null
null
from django.conf import settings from django.conf.urls import include, url from openslides.mediafiles.views import protected_serve from openslides.utils.rest_api import router from .core import views as core_views urlpatterns = [ # URLs for /media/ url( r"^%s(?P<path>.*)$" % settings.MEDIA_URL.lstri...
30
73
0.672
from django.conf import settings from django.conf.urls import include, url from openslides.mediafiles.views import protected_serve from openslides.utils.rest_api import router from .core import views as core_views urlpatterns = [ url( r"^%s(?P<path>.*)$" % settings.MEDIA_URL.lstrip("/"), pro...
true
true
f7755a8c9f8fd0802fbb52c48086b12305afb3eb
408
py
Python
data/scripts/templates/object/ship/shared_bwing_tier3.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/ship/shared_bwing_tier3.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/ship/shared_bwing_tier3.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Ship() result.template = "object/ship/shared_bwing_tier3.iff" result.attribute_template_id = -1 result.stfName("...
24
55
0.703431
from swgpy.object import * def create(kernel): result = Ship() result.template = "object/ship/shared_bwing_tier3.iff" result.attribute_template_id = -1 result.stfName("","") return result
true
true
f7755b259344241b500fe8e1829c7d21995e9d4b
3,972
py
Python
gamebench_api_client/api/requests_retriever/builder/request_director.py
bigfishgames/GameBenchAPI-PyClient
22e5f1b80047b2c3f0955cd81662b95d22f11e3d
[ "BSD-3-Clause" ]
7
2019-04-10T22:22:26.000Z
2019-08-05T07:07:35.000Z
gamebench_api_client/api/requests_retriever/builder/request_director.py
bigfishgames/GameBenchAPI-PyClient
22e5f1b80047b2c3f0955cd81662b95d22f11e3d
[ "BSD-3-Clause" ]
42
2019-04-11T03:29:54.000Z
2019-06-04T17:02:32.000Z
gamebench_api_client/api/requests_retriever/builder/request_director.py
bigfishgames/GameBenchAPI-PyClient
22e5f1b80047b2c3f0955cd81662b95d22f11e3d
[ "BSD-3-Clause" ]
2
2020-01-06T21:36:17.000Z
2020-09-29T22:34:34.000Z
"""" Director interface for getting requests from the builder.""" from gamebench_api_client.api.requests_retriever.builder.request_builder import AuthRequest, \ SessionRequest from gamebench_api_client.api.requests_retriever.builder.url.url_director import \ URLDirector class RequestDirector: """ Constru...
32.826446
101
0.636707
from gamebench_api_client.api.requests_retriever.builder.request_builder import AuthRequest, \ SessionRequest from gamebench_api_client.api.requests_retriever.builder.url.url_director import \ URLDirector class RequestDirector: def __init__(self, **request_parameters): self.request_parameters =...
true
true
f7755cd7ae3d102691c6626af1a8652d2b356b3f
692
py
Python
Python/eight_kyu/digitize.py
Brokenshire/codewars-projects
db9cd09618b8a7085b0d53ad76f73f9e249b9396
[ "Apache-2.0" ]
1
2019-12-20T04:09:56.000Z
2019-12-20T04:09:56.000Z
Python/eight_kyu/digitize.py
Brokenshire/codewars-projects
db9cd09618b8a7085b0d53ad76f73f9e249b9396
[ "Apache-2.0" ]
null
null
null
Python/eight_kyu/digitize.py
Brokenshire/codewars-projects
db9cd09618b8a7085b0d53ad76f73f9e249b9396
[ "Apache-2.0" ]
null
null
null
# Python solution for 'Convert number to reversed array of digits' codewars question. # Level: 8 kyu # Tags: Fundamentals, Numbers, and Arrays # Author: Jack Brokenshire # Date: 11/02/2020 import unittest def digitize(n): """ You have to return the digits of this number within an array in reverse order. ...
24.714286
85
0.677746
import unittest def digitize(n): return list(map(int, str(n)[::-1])) class TestDigitize(unittest.TestCase): def test_digitize(self): self.assertEqual(digitize(35231), [1, 3, 2, 5, 3]) if __name__ == '__main__': unittest.main()
true
true
f7755d47f7e619508e3afffe6fa8024bd94e692c
1,284
py
Python
test/programytest/utils/logging/test_snapshot.py
cdoebler1/AIML2
ee692ec5ea3794cd1bc4cc8ec2a6b5e5c20a0d6a
[ "MIT" ]
345
2016-11-23T22:37:04.000Z
2022-03-30T20:44:44.000Z
test/programytest/utils/logging/test_snapshot.py
MikeyBeez/program-y
00d7a0c7d50062f18f0ab6f4a041068e119ef7f0
[ "MIT" ]
275
2016-12-07T10:30:28.000Z
2022-02-08T21:28:33.000Z
test/programytest/utils/logging/test_snapshot.py
VProgramMist/modified-program-y
f32efcafafd773683b3fe30054d5485fe9002b7d
[ "MIT" ]
159
2016-11-28T18:59:30.000Z
2022-03-20T18:02:44.000Z
import unittest from programy.utils.logging.ylogger import YLoggerSnapshot class YLoggerSnapshotTests(unittest.TestCase): def test_snapshot_with_defaults(self): snapshot = YLoggerSnapshot() self.assertIsNotNone(snapshot) self.assertEquals("Critical(0) Fatal(0) Error(0) Exception(0) Warn...
36.685714
115
0.516355
import unittest from programy.utils.logging.ylogger import YLoggerSnapshot class YLoggerSnapshotTests(unittest.TestCase): def test_snapshot_with_defaults(self): snapshot = YLoggerSnapshot() self.assertIsNotNone(snapshot) self.assertEquals("Critical(0) Fatal(0) Error(0) Exception(0) Warn...
true
true
f7755e11396af6986c0342035837228f42d87e80
21,068
py
Python
callbacks/message_callbacks.py
plastr/extrasolar-game
1aad5971556d498e3617afe75f27e2f4132d4668
[ "MIT", "Unlicense" ]
null
null
null
callbacks/message_callbacks.py
plastr/extrasolar-game
1aad5971556d498e3617afe75f27e2f4132d4668
[ "MIT", "Unlicense" ]
null
null
null
callbacks/message_callbacks.py
plastr/extrasolar-game
1aad5971556d498e3617afe75f27e2f4132d4668
[ "MIT", "Unlicense" ]
null
null
null
# Copyright (c) 2010-2011 Lazy 8 Studios, LLC. # All rights reserved. from front.lib import utils from front.models import progress, mission from front.models import message as message_module from front.models import rover as rover_module from front.models import target as target_module from front.models import achiev...
46.610619
130
0.702582
from front.lib import utils from front.models import progress, mission from front.models import message as message_module from front.models import rover as rover_module from front.models import target as target_module from front.models import achievement as achievement_module from front.callbacks import mission_callba...
true
true
f775601206641409a4a5a3782a1165d42ca2fc01
1,500
py
Python
kubernetes_asyncio/test/test_authorization_v1_api.py
lsst-sqre/kubernetes_asyncio
f028cc793e3a2c519be6a52a49fb77ff0b014c9b
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/test/test_authorization_v1_api.py
lsst-sqre/kubernetes_asyncio
f028cc793e3a2c519be6a52a49fb77ff0b014c9b
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/test/test_authorization_v1_api.py
lsst-sqre/kubernetes_asyncio
f028cc793e3a2c519be6a52a49fb77ff0b014c9b
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1.19.15 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unitt...
23.4375
124
0.708
from __future__ import absolute_import import unittest import kubernetes_asyncio.client from kubernetes_asyncio.client.api.authorization_v1_api import AuthorizationV1Api from kubernetes_asyncio.client.rest import ApiException class TestAuthorizationV1Api(unittest.TestCase): def setUp(self): self.ap...
true
true
f775604d2ce9a75a7d2219e9b5a59c73f55efad8
752
py
Python
Validation/GlobalHits/python/globalhits_tester_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
Validation/GlobalHits/python/globalhits_tester_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
Validation/GlobalHits/python/globalhits_tester_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
# The following comments couldn't be translated into the new config version: # needed geometries # #include "Geometry/TrackerGeometryBuilder/data/trackerGeometry.cfi" #es_module = EcalPreshowerGeometryEP {} #es_module = EcalBarrelGeometryEP {} #es_module = EcalEndcapGeometryEP {} #es_module = HcalHardcodeGeometryEP {}...
31.333333
76
0.8125
# needed geometries # #include "Geometry/TrackerGeometryBuilder/data/trackerGeometry.cfi" #es_module = EcalPreshowerGeometryEP {} #es_module = EcalBarrelGeometryEP {} #es_module = EcalEndcapGeometryEP {} #es_module = HcalHardcodeGeometryEP {} #es_module = CaloTowerHardcodeGeometryEP {} #include "Geometry/CaloEventSetu...
true
true
f77560a04d329c6e884a8cbe588002d88d382847
694
py
Python
microblog/blog/views/__init__.py
zaldis/MAcademy2021
1a6bc8ba5de5d2b1e83100824ebaec82ebf565ba
[ "MIT" ]
null
null
null
microblog/blog/views/__init__.py
zaldis/MAcademy2021
1a6bc8ba5de5d2b1e83100824ebaec82ebf565ba
[ "MIT" ]
null
null
null
microblog/blog/views/__init__.py
zaldis/MAcademy2021
1a6bc8ba5de5d2b1e83100824ebaec82ebf565ba
[ "MIT" ]
null
null
null
from django.core.exceptions import BadRequest, PermissionDenied from .books import books_list, BookListView, BookDetailView, BookDeleteView from .index import index, IndexView from .readers import readers_list, ReaderListView from .users import users_list, UserListView, CreateUserView def server_death(request): ...
22.387097
75
0.788184
from django.core.exceptions import BadRequest, PermissionDenied from .books import books_list, BookListView, BookDetailView, BookDeleteView from .index import index, IndexView from .readers import readers_list, ReaderListView from .users import users_list, UserListView, CreateUserView def server_death(request): ...
true
true
f77563110f49a8884f6a65c6d88b40ef25335106
9,835
py
Python
src/MSongsDB/Tasks_Demos/CoverSongs/waspaa11/compute_hashcodes_mprocess.py
lxchavez/Yeezy-Taught-Me
c08f09b773602ad252ed89f4d0c11677803487ce
[ "MIT" ]
1
2016-07-28T23:20:13.000Z
2016-07-28T23:20:13.000Z
src/MSongsDB/Tasks_Demos/CoverSongs/waspaa11/compute_hashcodes_mprocess.py
lxchavez/Yeezy-Taught-Me
c08f09b773602ad252ed89f4d0c11677803487ce
[ "MIT" ]
4
2020-11-18T21:14:32.000Z
2021-12-13T19:45:55.000Z
src/MSongsDB/Tasks_Demos/CoverSongs/waspaa11/compute_hashcodes_mprocess.py
lxchavez/Yeezy-Taught-Me
c08f09b773602ad252ed89f4d0c11677803487ce
[ "MIT" ]
null
null
null
""" Code to compute and aggregate hashcodes over a large collection of data, e.g. the whole million song dataset, using multiple processes. Many parameters are hard-coded! For the help menu, simply launch the code: python compute_hashcodes_mprocess.py Copyright 2011, Thierry Bertin-Mahieux <tb2332@columbia.edu> ...
33.114478
94
0.6485
""" Code to compute and aggregate hashcodes over a large collection of data, e.g. the whole million song dataset, using multiple processes. Many parameters are hard-coded! For the help menu, simply launch the code: python compute_hashcodes_mprocess.py Copyright 2011, Thierry Bertin-Mahieux <tb2332@columbia.edu> ...
false
true
f7756499823a8c0cd22f714dd9f54db25f692e2e
700
py
Python
primer/t5_imports.py
xxdreck/google-research
dac724bc2b9362d65c26747a8754504fe4c615f8
[ "Apache-2.0" ]
23,901
2018-10-04T19:48:53.000Z
2022-03-31T21:27:42.000Z
primer/t5_imports.py
xxdreck/google-research
dac724bc2b9362d65c26747a8754504fe4c615f8
[ "Apache-2.0" ]
891
2018-11-10T06:16:13.000Z
2022-03-31T10:42:34.000Z
primer/t5_imports.py
admariner/google-research
7cee4b22b925581d912e8d993625c180da2a5a4f
[ "Apache-2.0" ]
6,047
2018-10-12T06:31:02.000Z
2022-03-31T13:59:28.000Z
# coding=utf-8 # Copyright 2021 The Google Research 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 applicab...
33.333333
74
0.761429
import t5_models import t5_tasks
true
true
f775655d4c6b03d35834304ef8dea835cf3b53f3
910
py
Python
env/Lib/site-packages/plotly/validators/scattercarpet/_textposition.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
11,750
2015-10-12T07:03:39.000Z
2022-03-31T20:43:15.000Z
env/Lib/site-packages/plotly/validators/scattercarpet/_textposition.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
2,951
2015-10-12T00:41:25.000Z
2022-03-31T22:19:26.000Z
env/Lib/site-packages/plotly/validators/scattercarpet/_textposition.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
2,623
2015-10-15T14:40:27.000Z
2022-03-28T16:05:50.000Z
import _plotly_utils.basevalidators class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="textposition", parent_name="scattercarpet", **kwargs ): super(TextpositionValidator, self).__init__( plotly_name=plotly_name, ...
31.37931
79
0.474725
import _plotly_utils.basevalidators class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="textposition", parent_name="scattercarpet", **kwargs ): super(TextpositionValidator, self).__init__( plotly_name=plotly_name, ...
true
true
f775660da404643ea976e42882ef8d5345ec6dad
7,091
py
Python
Regression/prepare_file_ci.py
hklion/WarpX
3c2d0ee2815ab1df21b9f78d899fe7b1a9651758
[ "BSD-3-Clause-LBNL" ]
null
null
null
Regression/prepare_file_ci.py
hklion/WarpX
3c2d0ee2815ab1df21b9f78d899fe7b1a9651758
[ "BSD-3-Clause-LBNL" ]
null
null
null
Regression/prepare_file_ci.py
hklion/WarpX
3c2d0ee2815ab1df21b9f78d899fe7b1a9651758
[ "BSD-3-Clause-LBNL" ]
null
null
null
# Copyright 2018-2019 Andrew Myers, Luca Fedeli, Maxence Thevenet # Remi Lehe # # This file is part of WarpX. # # License: BSD-3-Clause-LBNL import os # This script modifies `WarpX-test.ini` (which is used for nightly builds) # and creates the file `ci-test.ini` (which is used for continous # integration) # The subtes...
42.208333
110
0.69835
import os import re arch = os.environ.get('WARPX_TEST_ARCH', 'CPU') ci_regular_cartesian_1d = os.environ.get('WARPX_CI_REGULAR_CARTESIAN_1D') == 'TRUE' ci_regular_cartesian_2d = os.environ.get('WARPX_CI_REGULAR_CARTESIAN_2D') == 'TRUE' ci_regular_cartesian_3d = os.environ.get('WARPX_CI_REGULAR_CARTESIAN_3D') == 'TRU...
true
true
f77566715d12aaf1d6735638832c4181ebfa99db
2,536
py
Python
tests/api/test_config.py
HaidongHe/rqalpha
bb824178425909e051c456f6062a6c5bdc816421
[ "Apache-2.0" ]
1
2020-11-10T05:44:39.000Z
2020-11-10T05:44:39.000Z
tests/api/test_config.py
HaidongHe/rqalpha
bb824178425909e051c456f6062a6c5bdc816421
[ "Apache-2.0" ]
null
null
null
tests/api/test_config.py
HaidongHe/rqalpha
bb824178425909e051c456f6062a6c5bdc816421
[ "Apache-2.0" ]
1
2020-03-05T05:06:45.000Z
2020-03-05T05:06:45.000Z
# -*- coding: utf-8 -*- # 版权所有 2019 深圳米筐科技有限公司(下称“米筐科技”) # # 除非遵守当前许可,否则不得使用本软件。 # # * 非商业用途(非商业用途指个人出于非商业目的使用本软件,或者高校、研究所等非营利机构出于教育、科研等目的使用本软件): # 遵守 Apache License 2.0(下称“Apache 2.0 许可”),您可以在以下位置获得 Apache 2.0 许可的副本:http://www.apache.org/licenses/LICENSE-2.0。 # 除非法律有要求或以书面形式达成协议,否则本软件分发时需保持当前许可“原样”...
31.308642
144
0.602524
from rqalpha.environment import Environment from ..utils import make_test_strategy_decorator test_strategies = [] as_test_strategy = make_test_strategy_decorator({ "base": { "start_date": "2018-04-01", "end_date": "2018-05-01", "frequency": "1d", "accounts": {...
true
true
f775677eba9bafb291501fa03f6294bd7e6993e6
11,380
py
Python
.mywaflib/waflib/Tools/vala.py
simonjheiler/ui_human_capital
4c5f9b3c56f03cb777cc78958b72d6ffc65a6e79
[ "MIT" ]
null
null
null
.mywaflib/waflib/Tools/vala.py
simonjheiler/ui_human_capital
4c5f9b3c56f03cb777cc78958b72d6ffc65a6e79
[ "MIT" ]
null
null
null
.mywaflib/waflib/Tools/vala.py
simonjheiler/ui_human_capital
4c5f9b3c56f03cb777cc78958b72d6ffc65a6e79
[ "MIT" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 # Ali Sabil, 2007 # Radosław Szkodziński, 2010 """ At this point, vala is still unstable, so do not expect this tool to be too stable either (apis, etc) """ import re from waflib import Build, Context, Errors, Logs, Node, Options, Task, Utils from waflib.TaskGen import extensio...
31.966292
128
0.695958
import re from waflib import Build, Context, Errors, Logs, Node, Options, Task, Utils from waflib.TaskGen import extension, taskgen_method from waflib.Configure import conf class valac(Task.Task): vars = ["VALAC", "VALAC_VERSION", "VALAFLAGS"] ext_out = ['.h'] def run(self): cmd = self.env.VALAC + self.env.V...
true
true
f77568dc08f82cf074eff7d38ee5402b13d45e65
1,011
py
Python
tests/unit/cli/verbose_proxy_test.py
matthieudelaro/dockernut
998f614c6ad018873f3b3aee58841c62e1b160da
[ "Apache-2.0" ]
1
2019-11-04T06:52:35.000Z
2019-11-04T06:52:35.000Z
tests/unit/cli/verbose_proxy_test.py
matthieudelaro/dockernut
998f614c6ad018873f3b3aee58841c62e1b160da
[ "Apache-2.0" ]
2
2018-06-26T03:38:32.000Z
2019-03-09T16:36:56.000Z
tests/unit/cli/verbose_proxy_test.py
matthieudelaro/dockernut
998f614c6ad018873f3b3aee58841c62e1b160da
[ "Apache-2.0" ]
1
2019-11-04T06:52:37.000Z
2019-11-04T06:52:37.000Z
from __future__ import absolute_import from __future__ import unicode_literals import six from compose.cli import verbose_proxy from tests import unittest class VerboseProxyTestCase(unittest.TestCase): def test_format_call(self): prefix = '' if six.PY3 else 'u' expected = "(%(p)s'arg1', True, k...
29.735294
75
0.659743
from __future__ import absolute_import from __future__ import unicode_literals import six from compose.cli import verbose_proxy from tests import unittest class VerboseProxyTestCase(unittest.TestCase): def test_format_call(self): prefix = '' if six.PY3 else 'u' expected = "(%(p)s'arg1', True, k...
true
true
f7756a34613444ba32c793e5c574014d3ccc4027
21
py
Python
challenge_0/python/CindyB/src/helloworld.py
rchicoli/2017-challenges
44f0b672e5dea34de1dde131b6df837d462f8e29
[ "Apache-2.0" ]
271
2017-01-01T22:58:36.000Z
2021-11-28T23:05:29.000Z
language/gnuplot/helloworld.plt
A1rPun/nurture
d050837444a7ffb6d38be78044e7c1678f92b2b0
[ "MIT" ]
283
2017-01-01T23:26:05.000Z
2018-03-23T00:48:55.000Z
language/gnuplot/helloworld.plt
A1rPun/nurture
d050837444a7ffb6d38be78044e7c1678f92b2b0
[ "MIT" ]
311
2017-01-01T22:59:23.000Z
2021-09-23T00:29:12.000Z
print 'Hello world!'
10.5
20
0.714286
print 'Hello world!'
false
true
f7756af8f61ee033f05fb16e37005c2e52d1ed9c
1,604
py
Python
wandb/sdk/lib/module.py
borisgrafx/client
c079f7816947a3092b500751eb920fda3866985f
[ "MIT" ]
3,968
2017-08-23T21:27:19.000Z
2022-03-31T22:00:19.000Z
wandb/sdk/lib/module.py
borisgrafx/client
c079f7816947a3092b500751eb920fda3866985f
[ "MIT" ]
2,725
2017-04-17T00:29:15.000Z
2022-03-31T21:01:53.000Z
wandb/sdk/lib/module.py
borisgrafx/client
c079f7816947a3092b500751eb920fda3866985f
[ "MIT" ]
351
2018-04-08T19:39:34.000Z
2022-03-30T19:38:08.000Z
# import wandb from . import preinit def set_global( run=None, config=None, log=None, summary=None, save=None, use_artifact=None, log_artifact=None, define_metric=None, alert=None, plot_table=None, mark_preempting=None, ): if run: wandb.run = run if config ...
26.295082
87
0.670823
import wandb from . import preinit def set_global( run=None, config=None, log=None, summary=None, save=None, use_artifact=None, log_artifact=None, define_metric=None, alert=None, plot_table=None, mark_preempting=None, ): if run: wandb.run = run if config is...
true
true
f7756b2c7cbd1bfa47ccd8cc39d37db2e39ce28d
24,980
py
Python
nltk/text.py
virresh/nltk
bd802d597b5f54cdaee624b2070ae52fed7a1060
[ "Apache-2.0" ]
1
2019-03-23T17:31:04.000Z
2019-03-23T17:31:04.000Z
nltk/text.py
virresh/nltk
bd802d597b5f54cdaee624b2070ae52fed7a1060
[ "Apache-2.0" ]
null
null
null
nltk/text.py
virresh/nltk
bd802d597b5f54cdaee624b2070ae52fed7a1060
[ "Apache-2.0" ]
null
null
null
# Natural Language Toolkit: Texts # # Copyright (C) 2001-2019 NLTK Project # Author: Steven Bird <stevenbird1@gmail.com> # Edward Loper <edloper@gmail.com> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT """ This module brings together a variety of NLTK functionality for text analysis, and...
35.482955
88
0.588351
from __future__ import print_function, division, unicode_literals, absolute_import from math import log from collections import defaultdict, Counter, namedtuple from functools import reduce import re from six import text_type from nltk.probability import FreqDist from nltk.probability import ConditionalFreqDist as ...
true
true
f7756b727471701b7f9910027fd70fd368826fa1
101
py
Python
Zoocmd/new_core/feed_manager.py
helicontech/zoo
a33ba547f553bcce415f7a54bd89c444f82e48ee
[ "Apache-2.0" ]
2
2017-05-01T07:35:24.000Z
2018-04-12T13:36:03.000Z
Zoocmd/new_core/feed_manager.py
helicontech/zoo
a33ba547f553bcce415f7a54bd89c444f82e48ee
[ "Apache-2.0" ]
2
2017-03-23T17:28:37.000Z
2018-06-07T06:38:08.000Z
Zoocmd/new_core/feed_manager.py
helicontech/zoo
a33ba547f553bcce415f7a54bd89c444f82e48ee
[ "Apache-2.0" ]
3
2016-06-22T11:11:16.000Z
2019-10-25T15:09:46.000Z
""" Copyright © Helicon Tech. All rights reserved. """ import yaml def load_feed(stream): pass
11.222222
46
0.683168
import yaml def load_feed(stream): pass
true
true
f7756c1310e8c44b31cccf959ad674f9cac9a4ce
11,492
py
Python
IMU/VTK-6.2.0/ThirdParty/Twisted/twisted/web/twcgi.py
timkrentz/SunTracker
9a189cc38f45e5fbc4e4c700d7295a871d022795
[ "MIT" ]
4
2016-03-30T14:31:52.000Z
2019-02-02T05:01:32.000Z
IMU/VTK-6.2.0/ThirdParty/Twisted/twisted/web/twcgi.py
timkrentz/SunTracker
9a189cc38f45e5fbc4e4c700d7295a871d022795
[ "MIT" ]
1
2020-03-06T04:49:42.000Z
2020-03-06T04:49:42.000Z
IMU/VTK-6.2.0/ThirdParty/Twisted/twisted/web/twcgi.py
timkrentz/SunTracker
9a189cc38f45e5fbc4e4c700d7295a871d022795
[ "MIT" ]
2
2019-08-30T23:36:13.000Z
2019-11-08T16:52:01.000Z
# -*- test-case-name: twisted.web.test.test_cgi -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ I hold resource classes and helper classes that deal with CGI scripts. """ # System Imports import os import urllib # Twisted Imports from twisted.web import http from twist...
37.311688
104
0.558301
import os import urllib from twisted.web import http from twisted.internet import protocol from twisted.spread import pb from twisted.python import log, filepath from twisted.web import resource, server, static class CGIDirectory(resource.Resource, filepath.FilePath): def __init__(self, pathname...
true
true
f7756cddd8ed425d553c21a8c084e7d031d6eace
1,558
py
Python
pytglib/api/functions/get_login_url.py
iTeam-co/pytglib
e5e75e0a85f89b77762209b32a61b0a883c0ae61
[ "MIT" ]
6
2019-10-30T08:57:27.000Z
2021-02-08T14:17:43.000Z
pytglib/api/functions/get_login_url.py
iTeam-co/python-telegram
e5e75e0a85f89b77762209b32a61b0a883c0ae61
[ "MIT" ]
1
2021-08-19T05:44:10.000Z
2021-08-19T07:14:56.000Z
pytglib/api/functions/get_login_url.py
iTeam-co/python-telegram
e5e75e0a85f89b77762209b32a61b0a883c0ae61
[ "MIT" ]
5
2019-12-04T05:30:39.000Z
2021-05-21T18:23:32.000Z
from ..utils import Object class GetLoginUrl(Object): """ Returns an HTTP URL which can be used to automatically authorize the user on a website after clicking an inline button of type inlineKeyboardButtonTypeLoginUrl.Use the method getLoginUrlInfo to find whether a prior user confirmation is needed. If an ...
34.622222
330
0.653402
from ..utils import Object class GetLoginUrl(Object): ID = "getLoginUrl" def __init__(self, chat_id, message_id, button_id, allow_write_access, extra=None, **kwargs): self.extra = extra self.chat_id = chat_id self.message_id = message_id self.button_id = button_id ...
true
true
f7756ebb66ade9210cf2bf9a1c4a535e18328d87
318
py
Python
backend/app/api/api_v1/router.py
mabdullahadeel/through-docs
cebb03207c4a0640d1cb874efd6683011f975c5f
[ "Apache-2.0" ]
null
null
null
backend/app/api/api_v1/router.py
mabdullahadeel/through-docs
cebb03207c4a0640d1cb874efd6683011f975c5f
[ "Apache-2.0" ]
null
null
null
backend/app/api/api_v1/router.py
mabdullahadeel/through-docs
cebb03207c4a0640d1cb874efd6683011f975c5f
[ "Apache-2.0" ]
null
null
null
from fastapi import APIRouter from app.api.api_v1.endpoints import users from app.api.api_v1.endpoints import th_docs api_v1_router = APIRouter() api_v1_router.include_router(users.user_router, prefix="/users", tags=["users"]) api_v1_router.include_router(th_docs.th_docs_router, prefix="/d/docs", tags=["th_docs"])
35.333333
88
0.801887
from fastapi import APIRouter from app.api.api_v1.endpoints import users from app.api.api_v1.endpoints import th_docs api_v1_router = APIRouter() api_v1_router.include_router(users.user_router, prefix="/users", tags=["users"]) api_v1_router.include_router(th_docs.th_docs_router, prefix="/d/docs", tags=["th_docs"])
true
true