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
f717df2260eeca7af7e3eeca0a806d32faa65970
26,960
py
Python
coops_ndbc_obs_collector.py
saeed-moghimi-noaa/prep_obs_ca
6a23128326c5d8fa32f972ebd5ce8cd4aa626b08
[ "CC0-1.0" ]
null
null
null
coops_ndbc_obs_collector.py
saeed-moghimi-noaa/prep_obs_ca
6a23128326c5d8fa32f972ebd5ce8cd4aa626b08
[ "CC0-1.0" ]
null
null
null
coops_ndbc_obs_collector.py
saeed-moghimi-noaa/prep_obs_ca
6a23128326c5d8fa32f972ebd5ce8cd4aa626b08
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Read obs from NDBC and Co-opc Generate csv data files functions to write and read the data Observations will be chosen based on the hurricane track to avoid more than neccessary download. """ __author__ = "Saeed Moghimi" __copyright__ = "Copyright 2018, UCAR/NOAA" __...
33.997478
155
0.541728
""" Read obs from NDBC and Co-opc Generate csv data files functions to write and read the data Observations will be chosen based on the hurricane track to avoid more than neccessary download. """ __author__ = "Saeed Moghimi" __copyright__ = "Copyright 2018, UCAR/NOAA" __license__ = "GPL" __version__ = "1.0" __email_...
false
true
f717df53a4c80dee569899eb3e7c32f7b58fef74
12,004
py
Python
main.py
lakmalniranga/OpenCV-average-color-detection
615ca69002d2bc37191c118247ddd8986f04edb1
[ "MIT" ]
null
null
null
main.py
lakmalniranga/OpenCV-average-color-detection
615ca69002d2bc37191c118247ddd8986f04edb1
[ "MIT" ]
null
null
null
main.py
lakmalniranga/OpenCV-average-color-detection
615ca69002d2bc37191c118247ddd8986f04edb1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ OpenCV Python image average color detection script. You can use this to finding darkest color. Coded by : Lakmal Niranga. 2016 """ import os import cv2 from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: def _fromUtf8(s): return ...
43.02509
116
0.673692
import os import cv2 from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: def _fromUtf8(s): return s try: _encoding = QtGui.QApplication.UnicodeUTF8 def _translate(context, text, disambig): return QtGui.QApplication.translate(context, text, ...
true
true
f717e0abb049f00234b9b3cbf5c4910e36250c30
1,028
py
Python
pyvortex/__init__.py
pankajkarman/pyvortex
ba92d9b7702c33218377ac88f3045e880339f3ad
[ "MIT" ]
5
2021-01-12T16:52:45.000Z
2021-10-13T23:26:42.000Z
pyvortex/__init__.py
pankajkarman/pyvortex
ba92d9b7702c33218377ac88f3045e880339f3ad
[ "MIT" ]
2
2020-12-18T15:16:37.000Z
2021-12-02T14:47:07.000Z
pyvortex/__init__.py
pankajkarman/pyvortex
ba92d9b7702c33218377ac88f3045e880339f3ad
[ "MIT" ]
3
2021-01-12T16:52:18.000Z
2021-10-14T02:18:06.000Z
""" This module consists of functions to calculate the [equivalent latitude](https://journals.ametsoc.org/doi/citedby/10.1175/1520-0469%282003%29060%3C0287%3ATELADT%3E2.0.CO%3B2) and edge of a polar vortex using [Nash criteria](https://agupubs.onlinelibrary.wiley.com/doi/10.1029/96JD00066). ### Installation ``` pip ...
22.844444
287
0.737354
from .pyvortex import PolarVortex
true
true
f717e10070ef6a2f208a3ff8fb842d2f4dcf4f84
3,440
py
Python
simulation/simulation.py
cyberImperial/attack-graphs
40c5c2bcc3eaf01c484e51d8339d29da5154dd42
[ "MIT" ]
18
2018-02-21T13:14:11.000Z
2021-07-25T05:15:56.000Z
simulation/simulation.py
BenDerPan/attack-graphs
40c5c2bcc3eaf01c484e51d8339d29da5154dd42
[ "MIT" ]
70
2017-10-16T22:18:26.000Z
2020-05-11T14:01:06.000Z
simulation/simulation.py
BenDerPan/attack-graphs
40c5c2bcc3eaf01c484e51d8339d29da5154dd42
[ "MIT" ]
14
2019-04-24T23:26:39.000Z
2021-12-03T09:36:13.000Z
from __future__ import absolute_import import logging logger = logging.getLogger(__name__) import sys import os sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) from topology.graph.graph import Graph from topology.graph.graph import Node from clint.textui import colored import json im...
34.4
80
0.62936
from __future__ import absolute_import import logging logger = logging.getLogger(__name__) import sys import os sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) from topology.graph.graph import Graph from topology.graph.graph import Node from clint.textui import colored import json im...
true
true
f717e11a8a97f2e8f936ce7233ccad30aa232626
7,806
py
Python
examples/pwr_run/checkpointing/final_trace/top50/job48.py
boringlee24/keras_old
1e1176c45c4952ba1b9b9e58e9cc4df027ab111d
[ "MIT" ]
null
null
null
examples/pwr_run/checkpointing/final_trace/top50/job48.py
boringlee24/keras_old
1e1176c45c4952ba1b9b9e58e9cc4df027ab111d
[ "MIT" ]
null
null
null
examples/pwr_run/checkpointing/final_trace/top50/job48.py
boringlee24/keras_old
1e1176c45c4952ba1b9b9e58e9cc4df027ab111d
[ "MIT" ]
null
null
null
""" #Trains a ResNet on the CIFAR10 dataset. """ from __future__ import print_function import keras from keras.layers import Dense, Conv2D, BatchNormalization, Activation from keras.layers import AveragePooling2D, Input, Flatten from keras.optimizers import Adam from keras.callbacks import ModelCheckpoint, LearningRa...
32.936709
118
0.691135
from __future__ import print_function import keras from keras.layers import Dense, Conv2D, BatchNormalization, Activation from keras.layers import AveragePooling2D, Input, Flatten from keras.optimizers import Adam from keras.callbacks import ModelCheckpoint, LearningRateScheduler from keras.callbacks import ReduceLROn...
true
true
f717e184728b5d47b6b0a24c1fd6cd16b391b36a
35,865
py
Python
pycromanager/zmq.py
ilyasdc/pycro-manager
5f0153e8a90104eb8715348c6eb22c4d8fdee477
[ "BSD-3-Clause" ]
null
null
null
pycromanager/zmq.py
ilyasdc/pycro-manager
5f0153e8a90104eb8715348c6eb22c4d8fdee477
[ "BSD-3-Clause" ]
null
null
null
pycromanager/zmq.py
ilyasdc/pycro-manager
5f0153e8a90104eb8715348c6eb22c4d8fdee477
[ "BSD-3-Clause" ]
null
null
null
import json import re import time import typing import warnings import inspect import numpy as np import zmq from weakref import WeakSet import threading import copy import sys from threading import Lock class DataSocket: """ Wrapper for ZMQ socket that sends and recieves dictionaries Includes ZMQ client,...
39.026115
138
0.597992
import json import re import time import typing import warnings import inspect import numpy as np import zmq from weakref import WeakSet import threading import copy import sys from threading import Lock class DataSocket: def __init__(self, context, port, type, debug=False, ip_address="127.0.0.1"): ...
true
true
f717e197e7a1baf6c61fc8fc8503678d23f39768
2,360
py
Python
app2.py
GFDRR/mobility_app
27285a0691fabcc2cede6772a04bb98d29e636da
[ "MIT" ]
null
null
null
app2.py
GFDRR/mobility_app
27285a0691fabcc2cede6772a04bb98d29e636da
[ "MIT" ]
null
null
null
app2.py
GFDRR/mobility_app
27285a0691fabcc2cede6772a04bb98d29e636da
[ "MIT" ]
null
null
null
import streamlit as st import pandas as pd import seaborn as sns import pylab as plt import datetime as dt #import geopandas as gpd df = pd.read_csv('/Users/nicholasjones/Desktop/code/wbg-location-data/notebooks/nick/df_india_may9.csv') df.ds = pd.to_datetime(df.ds) df = df.set_index('ds') df['datetime'] = df.index.co...
41.403509
198
0.747034
import streamlit as st import pandas as pd import seaborn as sns import pylab as plt import datetime as dt df = pd.read_csv('/Users/nicholasjones/Desktop/code/wbg-location-data/notebooks/nick/df_india_may9.csv') df.ds = pd.to_datetime(df.ds) df = df.set_index('ds') df['datetime'] = df.index.copy() st.title('Mobility...
true
true
f717e1a9e531045800c5e7a2a00ed7b1dc29c82c
2,569
py
Python
sdk/python/pulumi_azure_nextgen/media/v20180601preview/get_asset_encryption_key.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/media/v20180601preview/get_asset_encryption_key.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/media/v20180601preview/get_asset_encryption_key.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "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 from ... import _utilities, _tables __a...
37.779412
157
0.709225
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __all__ = [ 'GetAssetEncryptionKeyResult', 'AwaitableGetAssetEncryptionKeyResult', 'get_asset_encryption_key', ] @pulumi.output_type class GetAssetEncryptionK...
true
true
f717e1e1dd47ba1807b3c7b1e5175c4d151b536b
447
py
Python
students/k3340/practical_works/Voronov Alexey/jango1/project_first_app/migrations/0002_person_vehicles.py
voronoff2803/ITMO_ICT_WebProgramming_2020
c59d8b2cdefe8b821049a2716733070983d08ad2
[ "MIT" ]
null
null
null
students/k3340/practical_works/Voronov Alexey/jango1/project_first_app/migrations/0002_person_vehicles.py
voronoff2803/ITMO_ICT_WebProgramming_2020
c59d8b2cdefe8b821049a2716733070983d08ad2
[ "MIT" ]
null
null
null
students/k3340/practical_works/Voronov Alexey/jango1/project_first_app/migrations/0002_person_vehicles.py
voronoff2803/ITMO_ICT_WebProgramming_2020
c59d8b2cdefe8b821049a2716733070983d08ad2
[ "MIT" ]
null
null
null
# Generated by Django 3.0.5 on 2020-04-03 20:19 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('project_first_app', '0001_initial'), ] operations = [ migrations.AddField( model_name='person', name='vehicles', ...
23.526316
112
0.63311
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('project_first_app', '0001_initial'), ] operations = [ migrations.AddField( model_name='person', name='vehicles', field=models.ManyToManyField(through='p...
true
true
f717e28a218983e53bb05193c90627d19da33fc9
110
py
Python
CodeWars/7 Kyu/Average Array.py
anubhab-code/Competitive-Programming
de28cb7d44044b9e7d8bdb475da61e37c018ac35
[ "MIT" ]
null
null
null
CodeWars/7 Kyu/Average Array.py
anubhab-code/Competitive-Programming
de28cb7d44044b9e7d8bdb475da61e37c018ac35
[ "MIT" ]
null
null
null
CodeWars/7 Kyu/Average Array.py
anubhab-code/Competitive-Programming
de28cb7d44044b9e7d8bdb475da61e37c018ac35
[ "MIT" ]
null
null
null
def avg_array(arrs): x=[] for i in zip(*arrs): x.append(sum(i)/len(arrs)) return x
18.333333
34
0.5
def avg_array(arrs): x=[] for i in zip(*arrs): x.append(sum(i)/len(arrs)) return x
true
true
f717e456d5d1b3e37be07a8321b8d5d0fadafa26
10,526
py
Python
kubernetes/client/models/v1_persistent_volume_claim_spec.py
philipp-sontag-by/python
51c481692ab0d9c71b9dd96342bfa93b721b029d
[ "Apache-2.0" ]
1
2022-02-22T23:10:55.000Z
2022-02-22T23:10:55.000Z
kubernetes/client/models/v1_persistent_volume_claim_spec.py
philipp-sontag-by/python
51c481692ab0d9c71b9dd96342bfa93b721b029d
[ "Apache-2.0" ]
6
2021-09-13T19:03:02.000Z
2022-03-16T18:56:42.000Z
kubernetes/client/models/v1_persistent_volume_claim_spec.py
philipp-sontag-by/python
51c481692ab0d9c71b9dd96342bfa93b721b029d
[ "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: release-1.23 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
33.845659
219
0.652005
import pprint import re import six from kubernetes.client.configuration import Configuration class V1PersistentVolumeClaimSpec(object): openapi_types = { 'access_modes': 'list[str]', 'data_source': 'V1TypedLocalObjectReference', 'data_source_ref': 'V1TypedLocalObjectReference', ...
true
true
f717e46b95455cc849096cc7da73943ce2b7377f
2,104
py
Python
tests/test_searchalgo.py
Intelecy/chocolate
0ba4f6f0130eab851d32d5534241c8cac3f6666e
[ "BSD-3-Clause" ]
105
2017-10-27T02:14:22.000Z
2022-01-13T12:57:05.000Z
tests/test_searchalgo.py
Intelecy/chocolate
0ba4f6f0130eab851d32d5534241c8cac3f6666e
[ "BSD-3-Clause" ]
31
2017-10-03T13:41:35.000Z
2021-08-20T21:01:29.000Z
tests/test_searchalgo.py
areeh/chocolate
5f946cb9daf42c3ab44508648917d46bc105c2fc
[ "BSD-3-Clause" ]
38
2017-10-05T20:19:42.000Z
2022-03-28T11:34:04.000Z
import unittest from unittest.mock import MagicMock from chocolate.space import * from chocolate.base import SearchAlgorithm class TestSearchAlgorithm(unittest.TestCase): def setUp(self): self.mock_conn = MagicMock(name="connection") def test_space_none_none(self): self.mock_conn.get_space.r...
30.941176
78
0.663023
import unittest from unittest.mock import MagicMock from chocolate.space import * from chocolate.base import SearchAlgorithm class TestSearchAlgorithm(unittest.TestCase): def setUp(self): self.mock_conn = MagicMock(name="connection") def test_space_none_none(self): self.mock_conn.get_space.r...
true
true
f717e481bf8d3b27429577d92a41047f92b8a9d4
185
py
Python
exam_retake/grocery_shop/project/deliveries/food.py
PetkoAndreev/Python-OOP
2cc3094940cdf078f0ee60be938e883f843766e4
[ "MIT" ]
1
2021-05-27T07:59:17.000Z
2021-05-27T07:59:17.000Z
exam_retake/grocery_shop/project/deliveries/food.py
PetkoAndreev/Python-OOP
2cc3094940cdf078f0ee60be938e883f843766e4
[ "MIT" ]
null
null
null
exam_retake/grocery_shop/project/deliveries/food.py
PetkoAndreev/Python-OOP
2cc3094940cdf078f0ee60be938e883f843766e4
[ "MIT" ]
null
null
null
from project.deliveries.product import Product class Food(Product): food_quantity: int = 15 def __init__(self, name: str): super().__init__(name, self.food_quantity)
20.555556
50
0.708108
from project.deliveries.product import Product class Food(Product): food_quantity: int = 15 def __init__(self, name: str): super().__init__(name, self.food_quantity)
true
true
f717e56f1c9229960dfeaed5d108ebdcab4bd8a6
3,760
py
Python
contrib/macdeploy/custom_dsstore.py
sqoin/xdisk
7f93d461b0168f11512a9dcfd9cf133122157544
[ "MIT" ]
null
null
null
contrib/macdeploy/custom_dsstore.py
sqoin/xdisk
7f93d461b0168f11512a9dcfd9cf133122157544
[ "MIT" ]
null
null
null
contrib/macdeploy/custom_dsstore.py
sqoin/xdisk
7f93d461b0168f11512a9dcfd9cf133122157544
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2013-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from __future__ import division,print_function,unicode_literals import biplist from ds_store import DSStore...
61.639344
1,817
0.72633
from __future__ import division,print_function,unicode_literals import biplist from ds_store import DSStore from mac_alias import Alias import sys output_file = sys.argv[1] package_name_ns = sys.argv[2] ds = DSStore.open(output_file, 'w+') ds['.']['bwsp'] = { 'ShowStatusBar': False, 'WindowBounds': b'{{300, 2...
true
true
f717e5abe192eeacd489fb3abdcfc529c914593b
8,031
py
Python
src/tests/test_markdown2man.py
dante-signal31/markdown2man
ce57b905b01a6fb8fe6d3d0989af3a15f42c78cf
[ "BSD-3-Clause" ]
null
null
null
src/tests/test_markdown2man.py
dante-signal31/markdown2man
ce57b905b01a6fb8fe6d3d0989af3a15f42c78cf
[ "BSD-3-Clause" ]
null
null
null
src/tests/test_markdown2man.py
dante-signal31/markdown2man
ce57b905b01a6fb8fe6d3d0989af3a15f42c78cf
[ "BSD-3-Clause" ]
null
null
null
""" Test for markdown2man launcher.""" import gzip import os import sys import tempfile import test_common.fs.ops as test_ops from test_common.fs.temp import temp_dir # TODO: Refactor project layout to leave tests folder out of src. sys.path.append("src") import src.markdown2man as markdown2man def test_launcher_a...
43.410811
102
0.696551
import gzip import os import sys import tempfile import test_common.fs.ops as test_ops from test_common.fs.temp import temp_dir sys.path.append("src") import src.markdown2man as markdown2man def test_launcher_all_options_given(temp_dir): temporal_markdown_file = os.path.join(temp_dir, "README.md") test...
true
true
f717e6e123e9b4e6acce7b7cd6d35c7024149784
104
py
Python
rules/tabs_spaces.py
Ahuge/Pepper
2afe398629d0505dfa1b5ad7d13eb68a3df695bf
[ "MIT" ]
null
null
null
rules/tabs_spaces.py
Ahuge/Pepper
2afe398629d0505dfa1b5ad7d13eb68a3df695bf
[ "MIT" ]
3
2015-10-16T00:58:27.000Z
2019-06-20T16:57:03.000Z
rules/tabs_spaces.py
Ahuge/Pepper
2afe398629d0505dfa1b5ad7d13eb68a3df695bf
[ "MIT" ]
null
null
null
__author__ = 'Alex' import re def main(line): sub = re.sub(r"(\t)", r" ", line) return sub
13
40
0.548077
__author__ = 'Alex' import re def main(line): sub = re.sub(r"(\t)", r" ", line) return sub
true
true
f717e99028c5d14443a9263ee3de86569fca8475
377
py
Python
ppr-api/src/endpoints/api.py
gh2os/ppr
9f67321baa5bbb450ac5e06755e2838497a2cf96
[ "Apache-2.0" ]
null
null
null
ppr-api/src/endpoints/api.py
gh2os/ppr
9f67321baa5bbb450ac5e06755e2838497a2cf96
[ "Apache-2.0" ]
2
2020-03-18T23:26:53.000Z
2020-03-18T23:40:19.000Z
ppr-api/src/endpoints/api.py
gh2os/ppr
9f67321baa5bbb450ac5e06755e2838497a2cf96
[ "Apache-2.0" ]
null
null
null
""" Set up all the endpoints for the web service. """ import fastapi from . import financing_statement, healthcheck, search router = fastapi.APIRouter() router.include_router(healthcheck.router, prefix='/operations', tags=['Operations']) router.include_router(financing_statement.router, tags=['Financing Statement'...
29
84
0.777188
import fastapi from . import financing_statement, healthcheck, search router = fastapi.APIRouter() router.include_router(healthcheck.router, prefix='/operations', tags=['Operations']) router.include_router(financing_statement.router, tags=['Financing Statement']) router.include_router(search.router, tags=['Search'...
true
true
f717e9994215a9e2f730997e5778606b01734396
2,349
py
Python
openspeech_cli/hydra_train.py
tqslj2/openspeech
10307587f08615224df5a868fb5249c68c70b12d
[ "Apache-2.0", "MIT" ]
1
2022-03-04T02:52:44.000Z
2022-03-04T02:52:44.000Z
openspeech_cli/hydra_train.py
tqslj2/openspeech
10307587f08615224df5a868fb5249c68c70b12d
[ "Apache-2.0", "MIT" ]
null
null
null
openspeech_cli/hydra_train.py
tqslj2/openspeech
10307587f08615224df5a868fb5249c68c70b12d
[ "Apache-2.0", "MIT" ]
null
null
null
# MIT License # # Copyright (c) 2021 Soohwan Kim and Sangchun Ha and Soyoung Cho # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights...
39.15
90
0.787143
import os import hydra import wandb import pytorch_lightning as pl from omegaconf import DictConfig, OmegaConf from pytorch_lightning.utilities import rank_zero_info from openspeech.tokenizers import TOKENIZER_REGISTRY from openspeech.datasets import DATA_MODULE_REGISTRY from openspeech.dataclass.initialize import hy...
true
true
f717eab9315eef9eda1defc31f9c5122f0ff1655
1,026
py
Python
Math/x^2 = y^3.py
vsriv90/mechanical_engineering
c922cdce1a595e9acb6a87cf415fb3685caf51a3
[ "MIT" ]
1
2021-11-03T06:37:44.000Z
2021-11-03T06:37:44.000Z
Math/x^2 = y^3.py
vsriv90/mechanical_engineering
c922cdce1a595e9acb6a87cf415fb3685caf51a3
[ "MIT" ]
null
null
null
Math/x^2 = y^3.py
vsriv90/mechanical_engineering
c922cdce1a595e9acb6a87cf415fb3685caf51a3
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # #### Show the common numbers for $x^2=y^3$ # # [Link](https://www.quora.com/Is-64-the-first-perfect-square-and-a-perfect-cube-Is-it-the-only-one/answer/Alon-Amit?ch=3&share=e27e1c03&srid=iBLa) to Quora (Alon Amit's answer) # # # # In[1]: import numpy import sympy import p...
20.117647
177
0.674464
# # # # In[1]: import numpy import sympy import pandas import csv import matplotlib.pyplot as plt import seaborn as sn # to draw plots import plotly.express as px # In[2]: import keyword print(keyword.kwlist) # A list of all 33 keywords in python # In[68]: list1 = [] # for all sqaured values list2 = [] #...
true
true
f717eb7deff235aa9cb2449ef700d1d63d624333
155
py
Python
utilities/printing.py
tarsqi/ttk
085007047ab591426d5c08b123906c070deb6627
[ "Apache-2.0" ]
25
2016-02-28T16:42:57.000Z
2022-01-03T13:29:48.000Z
utilities/printing.py
tarsqi/ttk
085007047ab591426d5c08b123906c070deb6627
[ "Apache-2.0" ]
84
2016-02-13T01:07:55.000Z
2021-04-06T18:57:36.000Z
utilities/printing.py
tarsqi/ttk
085007047ab591426d5c08b123906c070deb6627
[ "Apache-2.0" ]
10
2016-05-30T14:35:59.000Z
2022-03-16T12:24:09.000Z
from __future__ import absolute_import import pprint def pp(stuff): pretty_printer = pprint.PrettyPrinter(indent=3) pretty_printer.pprint(stuff)
19.375
51
0.787097
from __future__ import absolute_import import pprint def pp(stuff): pretty_printer = pprint.PrettyPrinter(indent=3) pretty_printer.pprint(stuff)
true
true
f717ed1a92cd4103d8f8d7eecb5ad29aa817477f
8,388
py
Python
src/ingest_financials.py
ozacas/asxtrade
a3645ae526bfc7a546fdf2a39520feda99e3390a
[ "Apache-2.0" ]
8
2021-03-20T13:12:25.000Z
2022-02-07T11:17:40.000Z
src/ingest_financials.py
ozacas/asxtrade
a3645ae526bfc7a546fdf2a39520feda99e3390a
[ "Apache-2.0" ]
8
2021-03-07T03:23:46.000Z
2021-06-01T10:49:56.000Z
src/ingest_financials.py
ozacas/asxtrade
a3645ae526bfc7a546fdf2a39520feda99e3390a
[ "Apache-2.0" ]
3
2020-12-08T10:22:23.000Z
2021-08-04T01:59:24.000Z
#!/usr/bin/python3 """ Responsible for ingesting data related to the business performance over time. Data is placed into the asx_company_financial_metric collection, ready for the core viewer app to use. Stocks whose financial details have been retrieved in the past month are skipped. """ import pymongo import argparse...
35.542373
152
0.625298
import pymongo import argparse import yfinance as yf import time from utils import read_config import numpy as np import pandas as pd from datetime import datetime, timedelta from bson.objectid import ObjectId def melt_dataframes(dfs: tuple) -> pd.DataFrame: result = None for df in filter(lambda df: df is not...
true
true
f717eda1c497c2f501c58a071e0a58d22211d3f9
6,442
py
Python
src/waldur_slurm/serializers.py
opennode/nodeconductor-assembly-waldur
cad9966389dc9b52b13d2301940c99cf4b243900
[ "MIT" ]
2
2017-01-20T15:26:25.000Z
2017-08-03T04:38:08.000Z
src/waldur_slurm/serializers.py
opennode/nodeconductor-assembly-waldur
cad9966389dc9b52b13d2301940c99cf4b243900
[ "MIT" ]
null
null
null
src/waldur_slurm/serializers.py
opennode/nodeconductor-assembly-waldur
cad9966389dc9b52b13d2301940c99cf4b243900
[ "MIT" ]
null
null
null
import re from django.core.validators import MinValueValidator from django.utils.translation import gettext_lazy as _ from rest_framework import exceptions as rf_exceptions from rest_framework import serializers as rf_serializers from waldur_core.core import serializers as core_serializers from waldur_core.structure ...
31.42439
88
0.606023
import re from django.core.validators import MinValueValidator from django.utils.translation import gettext_lazy as _ from rest_framework import exceptions as rf_exceptions from rest_framework import serializers as rf_serializers from waldur_core.core import serializers as core_serializers from waldur_core.structure ...
true
true
f717efcb5290a464a7824eb3e23e80853f7e2668
1,230
py
Python
ddns_clienter_core/runtimes/address_providers/host_name.py
rexzhang/ddns-clienter
f170cb579d49df2aa4aa1f607bbcf088af9cd4a5
[ "MIT" ]
null
null
null
ddns_clienter_core/runtimes/address_providers/host_name.py
rexzhang/ddns-clienter
f170cb579d49df2aa4aa1f607bbcf088af9cd4a5
[ "MIT" ]
null
null
null
ddns_clienter_core/runtimes/address_providers/host_name.py
rexzhang/ddns-clienter
f170cb579d49df2aa4aa1f607bbcf088af9cd4a5
[ "MIT" ]
null
null
null
import socket from logging import getLogger from .abs import AddressProviderAbs, AddressProviderException logger = getLogger(__name__) class AddressProviderHostName(AddressProviderAbs): @property def name(self): return "hostname" def _detect_ip_address(self) -> None: try: da...
29.285714
83
0.550407
import socket from logging import getLogger from .abs import AddressProviderAbs, AddressProviderException logger = getLogger(__name__) class AddressProviderHostName(AddressProviderAbs): @property def name(self): return "hostname" def _detect_ip_address(self) -> None: try: da...
true
true
f717f02ea026ba8bb72ef7721a359f8e060f9f1e
1,289
py
Python
homeassistant/components/homekit/diagnostics.py
mtarjoianu/core
44e9146463ac505eb3d1c0651ad126cb25c28a54
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
homeassistant/components/homekit/diagnostics.py
mtarjoianu/core
44e9146463ac505eb3d1c0651ad126cb25c28a54
[ "Apache-2.0" ]
24,710
2016-04-13T08:27:26.000Z
2020-03-02T12:59:13.000Z
homeassistant/components/homekit/diagnostics.py
mtarjoianu/core
44e9146463ac505eb3d1c0651ad126cb25c28a54
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Diagnostics support for HomeKit.""" from __future__ import annotations from typing import Any from pyhap.accessory_driver import AccessoryDriver from pyhap.state import State from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from . import HomeKit from .const import...
28.644444
87
0.644686
from __future__ import annotations from typing import Any from pyhap.accessory_driver import AccessoryDriver from pyhap.state import State from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from . import HomeKit from .const import DOMAIN, HOMEKIT async def async_get_...
true
true
f717f0755133f546a112ab7edad203a839137d37
3,107
py
Python
tests/test_rmsa.py
ReleaseTheSpice/optical-rl-gym
1913e19ba59dfd1e426d5783b68c045d2daf354a
[ "MIT" ]
null
null
null
tests/test_rmsa.py
ReleaseTheSpice/optical-rl-gym
1913e19ba59dfd1e426d5783b68c045d2daf354a
[ "MIT" ]
null
null
null
tests/test_rmsa.py
ReleaseTheSpice/optical-rl-gym
1913e19ba59dfd1e426d5783b68c045d2daf354a
[ "MIT" ]
null
null
null
import os import gym from optical_rl_gym.envs.rmsa_env import shortest_path_first_fit, shortest_available_path_first_fit, \ least_loaded_path_first_fit, SimpleMatrixObservation from optical_rl_gym.utils import evaluate_heuristic, random_policy import pickle import logging import numpy as np import matplotlib.pypl...
51.783333
146
0.798519
import os import gym from optical_rl_gym.envs.rmsa_env import shortest_path_first_fit, shortest_available_path_first_fit, \ least_loaded_path_first_fit, SimpleMatrixObservation from optical_rl_gym.utils import evaluate_heuristic, random_policy import pickle import logging import numpy as np import matplotlib.pypl...
true
true
f717f2946a256963590e7fa9639348755efec876
244
py
Python
pay_using_try_catch.py
maainul/Paython
c72d7fff3b00bc4f379ca6f9dbef0678f01b55f9
[ "DOC" ]
null
null
null
pay_using_try_catch.py
maainul/Paython
c72d7fff3b00bc4f379ca6f9dbef0678f01b55f9
[ "DOC" ]
null
null
null
pay_using_try_catch.py
maainul/Paython
c72d7fff3b00bc4f379ca6f9dbef0678f01b55f9
[ "DOC" ]
null
null
null
try: Hours=input('Enter Hours:') Rates=input('Enter Rates:') if int(Hours)>40: pay=40*int(Rates)+(int(Hours)-40)*(int(Rates)*1.5) print(pay) else: pay=int(Hours)*int(Rates) print(pay) except: print('Error,Please enter numeric input.')
20.333333
52
0.680328
try: Hours=input('Enter Hours:') Rates=input('Enter Rates:') if int(Hours)>40: pay=40*int(Rates)+(int(Hours)-40)*(int(Rates)*1.5) print(pay) else: pay=int(Hours)*int(Rates) print(pay) except: print('Error,Please enter numeric input.')
false
true
f717f359062fe9bbd5d9893e4b7b8942420830f7
1,037
py
Python
auctionbot/users/migrations/0002_auto_20171231_1027.py
netvigator/auctions
f88bcce800b60083a5d1a6f272c51bb540b8342a
[ "MIT" ]
null
null
null
auctionbot/users/migrations/0002_auto_20171231_1027.py
netvigator/auctions
f88bcce800b60083a5d1a6f272c51bb540b8342a
[ "MIT" ]
13
2019-12-12T03:07:55.000Z
2022-03-07T12:59:27.000Z
auctionbot/users/migrations/0002_auto_20171231_1027.py
netvigator/auctions
f88bcce800b60083a5d1a6f272c51bb540b8342a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-12-31 03:27 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('users', '0001_initial'), ] # ('markets', '0012_aut...
30.5
152
0.611379
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('users', '0001_initial'), ] operations = [ migrations.AddField( model_name='user', name='cBi...
true
true
f717f4028211e6a9f3c853dde20a6d21323b607a
362
py
Python
examples/list_all_adb_devices.py
riquedev/WhatsAppManifest
bcbbd48f6f9152024a54172886876d3a725a3a62
[ "MIT" ]
15
2020-03-11T17:31:12.000Z
2021-11-19T03:26:09.000Z
examples/list_all_adb_devices.py
riquedev/WhatsAppManifest
bcbbd48f6f9152024a54172886876d3a725a3a62
[ "MIT" ]
5
2021-03-31T19:43:15.000Z
2022-03-12T00:18:38.000Z
examples/list_all_adb_devices.py
riquedev/WhatsAppManifest
bcbbd48f6f9152024a54172886876d3a725a3a62
[ "MIT" ]
4
2020-03-11T01:52:57.000Z
2021-03-16T04:14:33.000Z
from WhatsAppManifest import ADB, Automator # Note: We need the AdbServer class (even without using SSH) so that Automator can open the internal connection. with ADB(use_ssh=False) as AdbServer: automator = Automator(adb_server=AdbServer, adb_host="127.0.0.1", adb_port=5037) for device in automator.list_...
36.2
112
0.748619
from WhatsAppManifest import ADB, Automator with ADB(use_ssh=False) as AdbServer: automator = Automator(adb_server=AdbServer, adb_host="127.0.0.1", adb_port=5037) for device in automator.list_devices(state=None): help(device)
true
true
f717f4717d60ec922e24c1a81798c104320021d4
33,686
py
Python
scipy/interpolate/polyint.py
f0k/scipy
3145a226339b14bbc22f2e984848e05def7659c5
[ "BSD-3-Clause" ]
null
null
null
scipy/interpolate/polyint.py
f0k/scipy
3145a226339b14bbc22f2e984848e05def7659c5
[ "BSD-3-Clause" ]
null
null
null
scipy/interpolate/polyint.py
f0k/scipy
3145a226339b14bbc22f2e984848e05def7659c5
[ "BSD-3-Clause" ]
null
null
null
from __future__ import division, print_function, absolute_import import numpy as np from scipy.misc import factorial from scipy.lib.six.moves import xrange __all__ = ["KroghInterpolator", "krogh_interpolate", "BarycentricInterpolator", "barycentric_interpolate", "PiecewisePolynomial", "piecewise_polynomial_interpola...
34.514344
206
0.591759
from __future__ import division, print_function, absolute_import import numpy as np from scipy.misc import factorial from scipy.lib.six.moves import xrange __all__ = ["KroghInterpolator", "krogh_interpolate", "BarycentricInterpolator", "barycentric_interpolate", "PiecewisePolynomial", "piecewise_polynomial_interpola...
true
true
f717f5329e9080881c559dfd976b9a5f38d7606a
670
py
Python
680_Valid_Palindrome_II.py
yuqingchen/Leetcode
6cbcb36e66a10a226ddb0966701e61ce4c2434d4
[ "MIT" ]
1
2019-12-12T20:16:08.000Z
2019-12-12T20:16:08.000Z
680_Valid_Palindrome_II.py
yuqingchen/Leetcode
6cbcb36e66a10a226ddb0966701e61ce4c2434d4
[ "MIT" ]
null
null
null
680_Valid_Palindrome_II.py
yuqingchen/Leetcode
6cbcb36e66a10a226ddb0966701e61ce4c2434d4
[ "MIT" ]
null
null
null
class Solution: def validPalindrome(self, s: str) -> bool: left, right = self.twopointer(0, len(s) - 1, s) if left >= right : return True return self.valid(left + 1, right, s) or self.valid(left, right - 1, s) def valid(self, left, right, s) : l, r = self.twopoin...
30.454545
79
0.474627
class Solution: def validPalindrome(self, s: str) -> bool: left, right = self.twopointer(0, len(s) - 1, s) if left >= right : return True return self.valid(left + 1, right, s) or self.valid(left, right - 1, s) def valid(self, left, right, s) : l, r = self.twopoin...
true
true
f717f561ebd073978d59e58a6e54a7189383291d
24,623
py
Python
tensorflow_probability/python/distributions/student_t_process.py
hendriksanta/probability
6eedc0f01a539b3bee7be28ccd2a9cce15d92f7f
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/distributions/student_t_process.py
hendriksanta/probability
6eedc0f01a539b3bee7be28ccd2a9cce15d92f7f
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/distributions/student_t_process.py
hendriksanta/probability
6eedc0f01a539b3bee7be28ccd2a9cce15d92f7f
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
41.038333
92
0.699671
from __future__ import absolute_import from __future__ import division from __future__ import print_function import functools import warnings import tensorflow.compat.v2 as tf from tensorflow_probability.python.bijectors import identity as identity_bijector from tensorflow_probability.python.distributions import di...
true
true
f717f5f0396b42207e68544fbe1af909acdf9d1d
520
py
Python
rest/test-credentials/test-calls-example-2/test-calls-example-2.6.x.py
Tshisuaka/api-snippets
52b50037d4af0f3b96adf76197964725a1501e96
[ "MIT" ]
234
2016-01-27T03:04:38.000Z
2022-02-25T20:13:43.000Z
rest/test-credentials/test-calls-example-2/test-calls-example-2.6.x.py
Tshisuaka/api-snippets
52b50037d4af0f3b96adf76197964725a1501e96
[ "MIT" ]
351
2016-04-06T16:55:33.000Z
2022-03-10T18:42:36.000Z
rest/test-credentials/test-calls-example-2/test-calls-example-2.6.x.py
Tshisuaka/api-snippets
52b50037d4af0f3b96adf76197964725a1501e96
[ "MIT" ]
494
2016-03-30T15:28:20.000Z
2022-03-28T19:39:36.000Z
# Download the Python helper library from twilio.com/docs/python/install import os from twilio.rest import Client # Your Account Sid and Auth Token from twilio.com/user/account # To set up environmental variables, see http://twil.io/secure account_sid = os.environ['TWILIO_ACCOUNT_SID'] auth_token = os.environ['TWILIO_...
27.368421
72
0.755769
import os from twilio.rest import Client account_sid = os.environ['TWILIO_ACCOUNT_SID'] auth_token = os.environ['TWILIO_AUTH_TOKEN'] client = Client(account_sid, auth_token) call = client.calls.create( url="http://demo.twilio.com/docs/voice.xml", to="+15005550003", from_="+15005550006" ) print(call.sid)...
true
true
f717f64d749aac3930348898cd007d5ac9c4b917
1,314
py
Python
example/test_img_similarity.py
Pandinosaurus/img2vec
e80c2f46ee707fb95d7bd6944b5c224acc1ec8c0
[ "MIT" ]
1
2019-05-31T14:02:51.000Z
2019-05-31T14:02:51.000Z
example/test_img_similarity.py
Pandinosaurus/img2vec
e80c2f46ee707fb95d7bd6944b5c224acc1ec8c0
[ "MIT" ]
null
null
null
example/test_img_similarity.py
Pandinosaurus/img2vec
e80c2f46ee707fb95d7bd6944b5c224acc1ec8c0
[ "MIT" ]
null
null
null
import sys import os sys.path.append("../img2vec_pytorch") # Adds higher directory to python modules path. from img_to_vec import Img2Vec from PIL import Image from sklearn.metrics.pairwise import cosine_similarity input_path = './test_images' print("Getting vectors for test images...\n") img2vec = Img2Vec() # For...
29.2
128
0.642314
import sys import os sys.path.append("../img2vec_pytorch") from img_to_vec import Img2Vec from PIL import Image from sklearn.metrics.pairwise import cosine_similarity input_path = './test_images' print("Getting vectors for test images...\n") img2vec = Img2Vec() pics = {} for file in os.listdir(input_path): fil...
true
true
f717f6ee21c9fa11dd8b2998e6722883254a2f34
8,734
py
Python
testing/test_cde_io.py
eberharf/cfl
077b99a05824f1371ac47d76dfed6bb160222668
[ "BSD-3-Clause" ]
6
2021-01-09T04:46:55.000Z
2022-03-19T22:27:13.000Z
testing/test_cde_io.py
eberharf/cfl
077b99a05824f1371ac47d76dfed6bb160222668
[ "BSD-3-Clause" ]
12
2021-01-11T16:32:58.000Z
2022-03-19T13:21:30.000Z
testing/test_cde_io.py
eberharf/cfl
077b99a05824f1371ac47d76dfed6bb160222668
[ "BSD-3-Clause" ]
null
null
null
import os import shutil from shutil import Error import unittest import numpy as np import tensorflow as tf from cdes_for_testing import all_cdes from cfl.dataset import Dataset ''' The following code runs all tests in CondExpInputTests on all implemented CondExpXxxx classes. ''' def make_cde_io_tests(cond_ex...
39.342342
80
0.517174
import os import shutil from shutil import Error import unittest import numpy as np import tensorflow as tf from cdes_for_testing import all_cdes from cfl.dataset import Dataset def make_cde_io_tests(cond_exp_class): class CondExpIOTests(unittest.TestCase): def setUp(self): ...
true
true
f717f76f6731c769b821c9ceaf17edbc8eba9b54
50,551
py
Python
python/ccxt/async_support/bitbay.py
mariuszskon/ccxt
13253de7346e33cd384f79abf7dfb64dcbfdc35f
[ "MIT" ]
4
2021-09-24T09:18:36.000Z
2022-03-15T16:47:09.000Z
python/ccxt/async_support/bitbay.py
mariuszskon/ccxt
13253de7346e33cd384f79abf7dfb64dcbfdc35f
[ "MIT" ]
null
null
null
python/ccxt/async_support/bitbay.py
mariuszskon/ccxt
13253de7346e33cd384f79abf7dfb64dcbfdc35f
[ "MIT" ]
2
2021-10-01T21:51:37.000Z
2021-10-02T16:23:05.000Z
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.async_support.base.exchange import Exchange import hashlib from ccxt.base.errors import ExchangeError from ccxt.base.errors impor...
41.266122
137
0.46369
from ccxt.async_support.base.exchange import Exchange import hashlib from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import PermissionDenied from ccxt.base.errors import AccountSuspended from ccxt.base.errors import BadSymbol from ccxt.base.errors impo...
true
true
f717f7d7f8f771201fee15a195eb1be65208493e
207
py
Python
CodeHS/Unit 1/1.5/pancakes.py
nitrospam/APCSP2020
275f576036805d244c3244f3f3646951940c9575
[ "MIT" ]
null
null
null
CodeHS/Unit 1/1.5/pancakes.py
nitrospam/APCSP2020
275f576036805d244c3244f3f3646951940c9575
[ "MIT" ]
null
null
null
CodeHS/Unit 1/1.5/pancakes.py
nitrospam/APCSP2020
275f576036805d244c3244f3f3646951940c9575
[ "MIT" ]
null
null
null
def place_3_balls(): put_ball() put_ball() put_ball() def move_twice(): move() move() move() place_3_balls() move_twice() place_3_balls() move_twice() place_3_balls() move()
10.35
20
0.618357
def place_3_balls(): put_ball() put_ball() put_ball() def move_twice(): move() move() move() place_3_balls() move_twice() place_3_balls() move_twice() place_3_balls() move()
true
true
f717f82fd0f391aa09b205b652a744cfaac5ba2d
188
py
Python
testData/search/childrenKeywordArgument.py
seandstewart/typical-pycharm-plugin
4f6ec99766239421201faae9d75c32fa0ee3565a
[ "MIT" ]
null
null
null
testData/search/childrenKeywordArgument.py
seandstewart/typical-pycharm-plugin
4f6ec99766239421201faae9d75c32fa0ee3565a
[ "MIT" ]
null
null
null
testData/search/childrenKeywordArgument.py
seandstewart/typical-pycharm-plugin
4f6ec99766239421201faae9d75c32fa0ee3565a
[ "MIT" ]
null
null
null
from pydantic import BaseModel class A(BaseModel): abc: str class B(A): abc: str class C(A): abc: str # expected A(abc='cde') B(abc='cde') C(ab<caret>c='cde') ## count: 1
11.75
30
0.606383
from pydantic import BaseModel class A(BaseModel): abc: str class B(A): abc: str class C(A): abc: str A(abc='cde') B(abc='cde') C(ab<caret>c='cde')
false
true
f717f87eae6eff378694a1f1173d6bf41dba6abe
505
py
Python
66-plus-one/66-plus-one.py
yuzhengcuhk/MyLeetcodeRecord
bd516c6f2946b922da53e587fc186935c6a8819c
[ "MIT" ]
3
2022-02-07T12:47:43.000Z
2022-03-13T16:40:12.000Z
66-plus-one/66-plus-one.py
yuzhengcuhk/MyLeetcodeRecord
bd516c6f2946b922da53e587fc186935c6a8819c
[ "MIT" ]
null
null
null
66-plus-one/66-plus-one.py
yuzhengcuhk/MyLeetcodeRecord
bd516c6f2946b922da53e587fc186935c6a8819c
[ "MIT" ]
null
null
null
class Solution: def plusOne(self, digits: List[int]) -> List[int]: cnt = len(digits) if digits[cnt-1] != 9: digits[cnt-1] = digits[cnt-1] + 1 return digits else: for i in range(0, len(digits)): digits[i] = str(digits[i]) intd...
33.666667
54
0.463366
class Solution: def plusOne(self, digits: List[int]) -> List[int]: cnt = len(digits) if digits[cnt-1] != 9: digits[cnt-1] = digits[cnt-1] + 1 return digits else: for i in range(0, len(digits)): digits[i] = str(digits[i]) intd...
true
true
f717f8f11f852a6ff486c6c6a1bdbf3db226a42b
849
py
Python
Chapter_7_code/build/hector_quadrotor_controller_gazebo/catkin_generated/pkg.develspace.context.pc.py
crepuscularlight/ROSbyExample
fa7b1a60cacca9b1034e318a2ac16ce4c8530d7c
[ "MIT" ]
1
2021-04-23T10:01:22.000Z
2021-04-23T10:01:22.000Z
Chapter_7_code/build/hector_quadrotor_controller_gazebo/catkin_generated/pkg.develspace.context.pc.py
crepuscularlight/ROSbyExample
fa7b1a60cacca9b1034e318a2ac16ce4c8530d7c
[ "MIT" ]
null
null
null
Chapter_7_code/build/hector_quadrotor_controller_gazebo/catkin_generated/pkg.develspace.context.pc.py
crepuscularlight/ROSbyExample
fa7b1a60cacca9b1034e318a2ac16ce4c8530d7c
[ "MIT" ]
null
null
null
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/liudiyang1998/Git/ROS-Robotics-By-Example/Chapter_7_code/src/hector_quadrotor/hector_quadrotor_controller_gazebo/include".split(';') if "/home/liudiyang1998/Git/ROS-Robotics-By-Example/Chapter_7_...
94.333333
319
0.829211
CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/liudiyang1998/Git/ROS-Robotics-By-Example/Chapter_7_code/src/hector_quadrotor/hector_quadrotor_controller_gazebo/include".split(';') if "/home/liudiyang1998/Git/ROS-Robotics-By-Example/Chapter_7_code/src/hector_quadrotor/hector_quadrotor_controller_gaz...
true
true
f717f935bd346a3daf5e4df75d97e3d4a4dd5155
1,221
py
Python
tests/test_persistentkv.py
fakedrake/WikipediaBase
ab5aa92786bddcd7942ad3e3f1f4e433575ba3fb
[ "Apache-2.0" ]
1
2017-11-26T17:57:59.000Z
2017-11-26T17:57:59.000Z
tests/test_persistentkv.py
fakedrake/WikipediaBase
ab5aa92786bddcd7942ad3e3f1f4e433575ba3fb
[ "Apache-2.0" ]
34
2015-03-23T10:28:59.000Z
2021-12-13T20:16:48.000Z
tests/test_persistentkv.py
fakedrake/WikipediaBase
ab5aa92786bddcd7942ad3e3f1f4e433575ba3fb
[ "Apache-2.0" ]
2
2015-05-17T00:56:45.000Z
2015-06-27T22:10:59.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_persistentkv ---------------------------------- Tests for `persistentkv` module. """ try: import unittest2 as unittest except ImportError: import unittest import os import common from wikipediabase import persistentkv as pkv DATABASE = "/tmp/remove-me....
22.611111
74
0.585586
try: import unittest2 as unittest except ImportError: import unittest import os import common from wikipediabase import persistentkv as pkv DATABASE = "/tmp/remove-me.db" class TestPersistentkv(unittest.TestCase): def setUp(self): pass def test_non_persist(self): ps = pkv.Persiste...
true
true
f717f96bb0c2423c47e922ab54cdfb5493b76d10
2,593
py
Python
seinfeld_laugh_corpus/humor_recogniser/data_generation_scripts/word_prevalence_calc.py
ranyadshalom/seinfeld_laugh_corpus
b1e1a5208d2d3499144743028205336f8ca34552
[ "MIT" ]
null
null
null
seinfeld_laugh_corpus/humor_recogniser/data_generation_scripts/word_prevalence_calc.py
ranyadshalom/seinfeld_laugh_corpus
b1e1a5208d2d3499144743028205336f8ca34552
[ "MIT" ]
2
2018-09-04T05:32:22.000Z
2018-09-17T10:58:11.000Z
seinfeld_laugh_corpus/humor_recogniser/data_generation_scripts/word_prevalence_calc.py
ranyadshalom/seinfeld_laugh_corpus
b1e1a5208d2d3499144743028205336f8ca34552
[ "MIT" ]
null
null
null
import argparse import re import sys from collections import Counter sys.path.append("..") from ml_humor_recogniser import read_data from screenplay import Line def run(data, output): screenplays = read_data(data) txt = screenplays_to_txt(screenplays) word_counts = get_word_counts(txt) word_probabil...
32.822785
120
0.644042
import argparse import re import sys from collections import Counter sys.path.append("..") from ml_humor_recogniser import read_data from screenplay import Line def run(data, output): screenplays = read_data(data) txt = screenplays_to_txt(screenplays) word_counts = get_word_counts(txt) word_probabil...
true
true
f717f9a709ac6da00ce8729b7850f20a3de65921
59
py
Python
uiSimple.py
smithgoo/python3Learn
d0c066c10887db3942ca285b86ce464463998aad
[ "MIT" ]
1
2019-05-30T08:08:34.000Z
2019-05-30T08:08:34.000Z
uiSimple.py
smithgoo/python3Learn
d0c066c10887db3942ca285b86ce464463998aad
[ "MIT" ]
null
null
null
uiSimple.py
smithgoo/python3Learn
d0c066c10887db3942ca285b86ce464463998aad
[ "MIT" ]
null
null
null
from _tkinter import * root = tkinter.Tk() root.mainloop()
19.666667
23
0.728814
from _tkinter import * root = tkinter.Tk() root.mainloop()
true
true
f717f9e8df46378c8a416ad5be38e9da22664eeb
798
py
Python
deal/_cli/_main.py
toonarmycaptain/deal
9dff86e1dc5c8607f02ded34b6d64e770f1959fa
[ "MIT" ]
null
null
null
deal/_cli/_main.py
toonarmycaptain/deal
9dff86e1dc5c8607f02ded34b6d64e770f1959fa
[ "MIT" ]
null
null
null
deal/_cli/_main.py
toonarmycaptain/deal
9dff86e1dc5c8607f02ded34b6d64e770f1959fa
[ "MIT" ]
null
null
null
# built-in from argparse import ArgumentParser from types import MappingProxyType from typing import Callable, Mapping, Sequence # app from ._lint import lint_command from ._memtest import memtest_command from ._stub import stub_command from ._test import test_command CommandsType = Mapping[str, Callable[[Sequence[s...
27.517241
75
0.761905
from argparse import ArgumentParser from types import MappingProxyType from typing import Callable, Mapping, Sequence from ._lint import lint_command from ._memtest import memtest_command from ._stub import stub_command from ._test import test_command CommandsType = Mapping[str, Callable[[Sequence[str]], int]] COMMA...
true
true
f717fa3b3ac3c83afb7de4e2d210b524c7409f46
2,049
py
Python
examples/extract_table_names.py
hugovk/sqlparse
3598bf4670b0f4d80b7ca0557f156aa8bf87add4
[ "BSD-3-Clause" ]
null
null
null
examples/extract_table_names.py
hugovk/sqlparse
3598bf4670b0f4d80b7ca0557f156aa8bf87add4
[ "BSD-3-Clause" ]
null
null
null
examples/extract_table_names.py
hugovk/sqlparse
3598bf4670b0f4d80b7ca0557f156aa8bf87add4
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # # Copyright (C) 2009-2020 the sqlparse authors and contributors # <see AUTHORS file> # # This example is part of python-sqlparse and is released under # the BSD License: https://opensource.org/licenses/BSD-3-Clause # # This example illustrates how to extract table names from nested # SELECT stat...
29.695652
88
0.650073
import sqlparse from sqlparse.sql import IdentifierList, Identifier from sqlparse.tokens import Keyword, DML def is_subselect(parsed): if not parsed.is_group: return False for item in parsed.tokens: if item.ttype is DML and item.value.upper() == 'SELECT': return True return Fa...
true
true
f717faec2a4bce7642e1b452032a060d7e5853ec
3,970
py
Python
01-datamodeling/project02-data-modeling-with-cassandra/cassandra_mgr.py
ultranet1/DATA-ENGINEERING-NANODEGREE-UDACITY
d04e39e7312f04307f12257157c19ea40da2f11a
[ "Apache-2.0" ]
33
2020-09-01T20:10:28.000Z
2022-02-11T06:15:55.000Z
01-datamodeling/project02-data-modeling-with-cassandra/cassandra_mgr.py
ultranet1/DATA-ENGINEERING-NANODEGREE-UDACITY
d04e39e7312f04307f12257157c19ea40da2f11a
[ "Apache-2.0" ]
null
null
null
01-datamodeling/project02-data-modeling-with-cassandra/cassandra_mgr.py
ultranet1/DATA-ENGINEERING-NANODEGREE-UDACITY
d04e39e7312f04307f12257157c19ea40da2f11a
[ "Apache-2.0" ]
64
2021-01-21T11:55:34.000Z
2022-03-10T08:14:11.000Z
from cassandra.cluster import Cluster class CassandraMgr: """ Manage orerations with Apache Cassandra. """ def __init__(self, config): """ Constructor. :param config: configuration of the cluster of Apache Cassandra -> ip, replicator factor, replication class and key s...
29.626866
119
0.58262
from cassandra.cluster import Cluster class CassandraMgr: def __init__(self, config): self.ip = config['ip'] self.replication_factor = config["replication_factor"] self.replication_class = config["replication_class"] self.key_space = config["key_space"] self.cluster = Clus...
true
true
f717fc05188de674e02f5c99af90516ab0930a2f
814
py
Python
backend/server/apps/notes/migrations/0001_initial.py
Bonifase/django-react
ea18c3192ee28ce2291d6cabb08addd8cf8eb27e
[ "MIT" ]
508
2020-10-05T14:03:16.000Z
2022-03-30T09:04:42.000Z
backend/server/apps/notes/migrations/0001_initial.py
Bonifase/django-react
ea18c3192ee28ce2291d6cabb08addd8cf8eb27e
[ "MIT" ]
17
2020-12-10T08:23:55.000Z
2022-03-20T17:10:37.000Z
backend/server/apps/notes/migrations/0001_initial.py
Bonifase/django-react
ea18c3192ee28ce2291d6cabb08addd8cf8eb27e
[ "MIT" ]
80
2020-12-23T13:59:14.000Z
2022-03-12T03:52:21.000Z
# Generated by Django 3.1.3 on 2020-11-09 10:42 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
30.148148
124
0.637592
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( ...
true
true
f717fceec4380b1677eb124c6b56d04232940628
8,716
py
Python
tests/api_connexion/endpoints/test_task_endpoint.py
emilioego/airflow
3457c7847cd24413ff5b622e65c27d8370f94502
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
79
2021-10-15T07:32:27.000Z
2022-03-28T04:10:19.000Z
tests/api_connexion/endpoints/test_task_endpoint.py
emilioego/airflow
3457c7847cd24413ff5b622e65c27d8370f94502
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
153
2021-10-15T05:23:46.000Z
2022-02-23T06:07:10.000Z
tests/api_connexion/endpoints/test_task_endpoint.py
emilioego/airflow
3457c7847cd24413ff5b622e65c27d8370f94502
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
23
2021-10-15T02:36:37.000Z
2022-03-17T02:59:27.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
38.566372
109
0.58559
import os import unittest from datetime import datetime from airflow import DAG from airflow.models import DagBag from airflow.models.serialized_dag import SerializedDagModel from airflow.operators.dummy import DummyOperator from airflow.security import permissions from airflow.www import app from tests.test_utils.api...
true
true
f717fd45456b4946ca8ef640da5053f02d8f3da7
96
py
Python
venv/lib/python3.8/site-packages/numpy/core/tests/test_simd.py
GiulianaPola/select_repeats
17a0d053d4f874e42cf654dd142168c2ec8fbd11
[ "MIT" ]
2
2022-03-13T01:58:52.000Z
2022-03-31T06:07:54.000Z
venv/lib/python3.8/site-packages/numpy/core/tests/test_simd.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
19
2021-11-20T04:09:18.000Z
2022-03-23T15:05:55.000Z
venv/lib/python3.8/site-packages/numpy/core/tests/test_simd.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
null
null
null
/home/runner/.cache/pip/pool/70/91/d2/f5d75cdb5bed21a1004b1a4f5dbe1978b2a45ab6bedfa5d6b5bbb225e8
96
96
0.895833
/home/runner/.cache/pip/pool/70/91/d2/f5d75cdb5bed21a1004b1a4f5dbe1978b2a45ab6bedfa5d6b5bbb225e8
false
true
f717fe26b70d466a7b574b0a4659b534cb647013
961
py
Python
testapp/app.py
movermeyer/Flask-Dropbox
bfc59c64a6a55b50cacb9b362ed520c50705778a
[ "BSD-3-Clause" ]
22
2015-02-07T21:37:36.000Z
2021-12-06T07:12:49.000Z
testapp/app.py
movermeyer/Flask-Dropbox
bfc59c64a6a55b50cacb9b362ed520c50705778a
[ "BSD-3-Clause" ]
33
2020-03-16T03:48:37.000Z
2021-08-02T03:40:08.000Z
testapp/app.py
movermeyer/Flask-Dropbox
bfc59c64a6a55b50cacb9b362ed520c50705778a
[ "BSD-3-Clause" ]
6
2017-02-04T04:29:15.000Z
2021-12-06T07:12:51.000Z
import os import sys from flask import Flask from flask.ext.dropbox import Dropbox from flask.ext.lazyviews import LazyViews from flask.ext.script import Manager import settings # Initialize and configure Flask app app = Flask(__name__) app.config.from_object(settings) # Setup Dropbox and script extensions dropbox...
27.457143
71
0.715921
import os import sys from flask import Flask from flask.ext.dropbox import Dropbox from flask.ext.lazyviews import LazyViews from flask.ext.script import Manager import settings app = Flask(__name__) app.config.from_object(settings) dropbox = Dropbox(app) dropbox.register_blueprint(url_prefix='/dropbox') manager =...
true
true
f7180103c1420b4319a7785c69d208a63ea1cce0
3,462
py
Python
Code/all-starter-code/bases.py
stasi815/CS-1.3-Core-Data-Structures
8586d92a841a80bbfbb0f4acfabda8552f04ff92
[ "MIT" ]
null
null
null
Code/all-starter-code/bases.py
stasi815/CS-1.3-Core-Data-Structures
8586d92a841a80bbfbb0f4acfabda8552f04ff92
[ "MIT" ]
null
null
null
Code/all-starter-code/bases.py
stasi815/CS-1.3-Core-Data-Structures
8586d92a841a80bbfbb0f4acfabda8552f04ff92
[ "MIT" ]
null
null
null
#!python import string # Hint: Use these string constants to encode/decode hexadecimal digits and more # string.digits is '0123456789' # string.hexdigits is '0123456789abcdefABCDEF' # string.ascii_lowercase is 'abcdefghijklmnopqrstuvwxyz' # string.ascii_uppercase is 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' # string.ascii_letters ...
34.62
115
0.634027
import string def decode(digits, base): assert 2 <= base <= 36, f'base is out of range: {base}' decimal_num = 0 digits = digits[::-1] for i in range(len(digits)): digit = int(digits[i], base=base) decimal_num += digit * base ** i return decimal_num def encode(numb...
true
true
f71801af019ea004db2031fbf73a7074a38968cc
6,665
py
Python
eval_ke.py
naviocean/imgclsmob
f2993d3ce73a2f7ddba05da3891defb08547d504
[ "MIT" ]
2,649
2018-08-03T14:18:00.000Z
2022-03-31T08:08:17.000Z
eval_ke.py
naviocean/imgclsmob
f2993d3ce73a2f7ddba05da3891defb08547d504
[ "MIT" ]
95
2018-08-13T01:46:03.000Z
2022-03-13T08:38:14.000Z
eval_ke.py
naviocean/imgclsmob
f2993d3ce73a2f7ddba05da3891defb08547d504
[ "MIT" ]
549
2018-08-06T08:09:22.000Z
2022-03-31T08:08:21.000Z
""" Script for evaluating trained model on Keras (validate/test). """ import argparse import time import logging import keras from common.logger_utils import initialize_logging from keras_.utils import prepare_ke_context, prepare_model, get_data_rec, get_data_generator, backend_agnostic_compile def parse_args():...
28.361702
118
0.616954
import argparse import time import logging import keras from common.logger_utils import initialize_logging from keras_.utils import prepare_ke_context, prepare_model, get_data_rec, get_data_generator, backend_agnostic_compile def parse_args(): parser = argparse.ArgumentParser( description="Evaluate a mod...
true
true
f71802a5127f7c7fb60315e16f2f50fa2f4a7235
1,504
py
Python
app/auth/views.py
Bchizi/Pitch-app
f52398d270e812eab70b66df9f7f80d579bab7d4
[ "CNRI-Python", "Info-ZIP" ]
null
null
null
app/auth/views.py
Bchizi/Pitch-app
f52398d270e812eab70b66df9f7f80d579bab7d4
[ "CNRI-Python", "Info-ZIP" ]
null
null
null
app/auth/views.py
Bchizi/Pitch-app
f52398d270e812eab70b66df9f7f80d579bab7d4
[ "CNRI-Python", "Info-ZIP" ]
null
null
null
from flask import render_template,redirect,url_for,flash,request from . import auth from flask_login import login_user,logout_user,login_required from ..models import User from .forms import LoginForm,RegistrationForm from .. import db from ..email import mail_message @auth.route('/login',methods=['GET','POST']) def...
31.333333
165
0.696809
from flask import render_template,redirect,url_for,flash,request from . import auth from flask_login import login_user,logout_user,login_required from ..models import User from .forms import LoginForm,RegistrationForm from .. import db from ..email import mail_message @auth.route('/login',methods=['GET','POST']) def...
true
true
f71802e152bdc5a880b16e7aa88ec372a25c5854
193
py
Python
mani_sales/mani_sales/doctype/linked_suppliers/linked_suppliers.py
Momscode-Technologies/mani_sales
e3c8de6b50367bfd15adadf38c658e89559e71ab
[ "MIT" ]
null
null
null
mani_sales/mani_sales/doctype/linked_suppliers/linked_suppliers.py
Momscode-Technologies/mani_sales
e3c8de6b50367bfd15adadf38c658e89559e71ab
[ "MIT" ]
null
null
null
mani_sales/mani_sales/doctype/linked_suppliers/linked_suppliers.py
Momscode-Technologies/mani_sales
e3c8de6b50367bfd15adadf38c658e89559e71ab
[ "MIT" ]
null
null
null
# Copyright (c) 2021, jan and contributors # For license information, please see license.txt # import frappe from frappe.model.document import Document class LinkedSuppliers(Document): pass
21.444444
49
0.792746
from frappe.model.document import Document class LinkedSuppliers(Document): pass
true
true
f718043592242ea890cc97835b3f6db1a9ca2b43
322
py
Python
firmware/adafruit-circuitpython-bundle-5.x-mpy-20200915/examples/bd3491fs_simpletest.py
freeglow/microcontroller-cpy
5adfda49da6eefaece81be2a2f26122d68736355
[ "MIT" ]
null
null
null
firmware/adafruit-circuitpython-bundle-5.x-mpy-20200915/examples/bd3491fs_simpletest.py
freeglow/microcontroller-cpy
5adfda49da6eefaece81be2a2f26122d68736355
[ "MIT" ]
null
null
null
firmware/adafruit-circuitpython-bundle-5.x-mpy-20200915/examples/bd3491fs_simpletest.py
freeglow/microcontroller-cpy
5adfda49da6eefaece81be2a2f26122d68736355
[ "MIT" ]
null
null
null
import board import busio import adafruit_bd3491fs i2c = busio.I2C(board.SCL, board.SDA) bd3491fs = adafruit_bd3491fs.BD3491FS(i2c) bd3491fs.active_input = adafruit_bd3491fs.Input.A bd3491fs.input_gain = adafruit_bd3491fs.Level.LEVEL_20DB bd3491fs.channel_1_attenuation = 0 bd3491fs.channel_2_attenuation = 0...
26.833333
57
0.810559
import board import busio import adafruit_bd3491fs i2c = busio.I2C(board.SCL, board.SDA) bd3491fs = adafruit_bd3491fs.BD3491FS(i2c) bd3491fs.active_input = adafruit_bd3491fs.Input.A bd3491fs.input_gain = adafruit_bd3491fs.Level.LEVEL_20DB bd3491fs.channel_1_attenuation = 0 bd3491fs.channel_2_attenuation = 0...
true
true
f71806245033ff31b7f8e029e27f81e487b11834
20,468
py
Python
cadnano/views/pathview/tools/pathselection.py
sherwoodyao/cadnano2.5
ce6ff019b88ee7728de947bd86b35861cf57848d
[ "BSD-3-Clause" ]
69
2015-01-13T02:54:40.000Z
2022-03-27T14:25:51.000Z
cadnano/views/pathview/tools/pathselection.py
scholer/cadnano2.5
ce6ff019b88ee7728de947bd86b35861cf57848d
[ "BSD-3-Clause" ]
127
2015-01-01T06:26:34.000Z
2022-03-02T12:48:05.000Z
cadnano/views/pathview/tools/pathselection.py
scholer/cadnano2.5
ce6ff019b88ee7728de947bd86b35861cf57848d
[ "BSD-3-Clause" ]
48
2015-01-22T19:57:49.000Z
2022-03-27T14:27:53.000Z
# -*- coding: utf-8 -*- import logging from math import floor from PyQt5.QtCore import ( QPointF, QRectF, Qt ) from PyQt5.QtGui import ( QPainterPath, QKeyEvent, QMouseEvent ) from PyQt5.QtWidgets import ( QGraphicsItem, QGraphicsItemGroup, QGraphicsPathItem, QGraphicsSceneMouse...
28.467316
109
0.569572
import logging from math import floor from PyQt5.QtCore import ( QPointF, QRectF, Qt ) from PyQt5.QtGui import ( QPainterPath, QKeyEvent, QMouseEvent ) from PyQt5.QtWidgets import ( QGraphicsItem, QGraphicsItemGroup, QGraphicsPathItem, QGraphicsSceneMouseEvent, ) from cadnano.g...
true
true
f7180731325d42a74cf0349d5377f43a897a9155
12,937
py
Python
lama/elastix/invert_transforms.py
MiaRatkovic/LAMA
3ccfed0864001c8c270861e23cc81bc43d7d25c9
[ "Apache-2.0" ]
6
2016-08-15T22:07:02.000Z
2022-02-17T04:22:58.000Z
lama/elastix/invert_transforms.py
MiaRatkovic/LAMA
3ccfed0864001c8c270861e23cc81bc43d7d25c9
[ "Apache-2.0" ]
25
2019-12-05T02:02:20.000Z
2021-09-08T01:39:17.000Z
lama/elastix/invert_transforms.py
MiaRatkovic/LAMA
3ccfed0864001c8c270861e23cc81bc43d7d25c9
[ "Apache-2.0" ]
5
2019-12-05T00:15:29.000Z
2021-07-06T05:24:54.000Z
from pathlib import Path import tempfile import os import subprocess from collections import defaultdict from multiprocessing import Pool from os.path import join, abspath, isfile from typing import Union, List, Dict from logzero import logger as logging import yaml from lama import common from lama.common import cfg...
38.84985
175
0.678287
from pathlib import Path import tempfile import os import subprocess from collections import defaultdict from multiprocessing import Pool from os.path import join, abspath, isfile from typing import Union, List, Dict from logzero import logger as logging import yaml from lama import common from lama.common import cfg...
true
true
f718082ff8a1b480495d2fe2964e1b8479a5f70b
3,677
py
Python
tests/python/unittest/test_tir_ptx_ldmatrix.py
shengxinhu/tvm
06c443e9959452c6da3a911fe0c11e08c5554477
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
4,640
2017-08-17T19:22:15.000Z
2019-11-04T15:29:46.000Z
tests/python/unittest/test_tir_ptx_ldmatrix.py
shengxinhu/tvm
06c443e9959452c6da3a911fe0c11e08c5554477
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
2,863
2017-08-17T19:55:50.000Z
2019-11-04T17:18:41.000Z
tests/python/unittest/test_tir_ptx_ldmatrix.py
shengxinhu/tvm
06c443e9959452c6da3a911fe0c11e08c5554477
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
1,352
2017-08-17T19:30:38.000Z
2019-11-04T16:09:29.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
36.04902
100
0.536035
import tvm from tvm.script import tir as T import numpy as np import tvm.testing @T.prim_func def ptx_ldmatrix( A: T.Buffer[(16, 16), "float16"], B: T.Buffer[(16, 16), "float16"], num: T.int32, trans: T.uint8 ) -> None: T.func_attr({"global_symbol": "default_function", "tir.noalias": True}) bx = T.env_th...
true
true
f71808b9f205aac0b404b9509ad046d9f41b7eab
12,174
py
Python
google/ads/googleads/v10/services/services/conversion_value_rule_set_service/transports/grpc.py
JakobSteixner/google-ads-python
df2b802cc7e78295a4ece21cc7ef3787cd35dab0
[ "Apache-2.0" ]
null
null
null
google/ads/googleads/v10/services/services/conversion_value_rule_set_service/transports/grpc.py
JakobSteixner/google-ads-python
df2b802cc7e78295a4ece21cc7ef3787cd35dab0
[ "Apache-2.0" ]
null
null
null
google/ads/googleads/v10/services/services/conversion_value_rule_set_service/transports/grpc.py
JakobSteixner/google-ads-python
df2b802cc7e78295a4ece21cc7ef3787cd35dab0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # 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...
43.634409
122
0.637013
import warnings from typing import Callable, Dict, Optional, Sequence, Tuple from google.api_core import grpc_helpers from google.api_core import gapic_v1 import google.auth from google.auth import credentials as ga_credentials from google.auth.transport.grpc import SslCredentials import grpc from google.ads.goo...
true
true
f7180a3e45377a91711d6c8fa67895d8d860641f
1,780
py
Python
mlprocessors/consolecapture.py
flatironinstitute/mountaintools
d5680599381e0810c4aa5b309b9ef9ec7f2d1b25
[ "Apache-2.0" ]
2
2019-11-07T14:09:02.000Z
2021-09-23T01:09:04.000Z
mountaintools/mlprocessors/consolecapture.py
flatironinstitute/spikeforest_old
d9470194dc906b949178b9c44d14aea57a1f6c27
[ "Apache-2.0" ]
13
2019-05-04T09:34:53.000Z
2019-06-23T07:05:58.000Z
mountaintools/mlprocessors/consolecapture.py
flatironinstitute/spikeforest_old
d9470194dc906b949178b9c44d14aea57a1f6c27
[ "Apache-2.0" ]
1
2021-09-23T01:07:21.000Z
2021-09-23T01:07:21.000Z
from typing import Any import sys import time import os import tempfile class Logger2(): def __init__(self, file1: Any, file2: Any): self.file1 = file1 self.file2 = file2 def write(self, data: str) -> None: self.file1.write(data) self.file2.write(data) def flush(self) -> ...
28.709677
70
0.626404
from typing import Any import sys import time import os import tempfile class Logger2(): def __init__(self, file1: Any, file2: Any): self.file1 = file1 self.file2 = file2 def write(self, data: str) -> None: self.file1.write(data) self.file2.write(data) def flush(self) -> ...
true
true
f7180a3fe9d499c15ed0c134b63d4d7772dbd786
3,357
py
Python
profiles_project/settings.py
LaiZiSen/profiles_REST_API_course
83662a33b3a318dc7e52c5d56b577e4863ed7c5d
[ "MIT" ]
null
null
null
profiles_project/settings.py
LaiZiSen/profiles_REST_API_course
83662a33b3a318dc7e52c5d56b577e4863ed7c5d
[ "MIT" ]
null
null
null
profiles_project/settings.py
LaiZiSen/profiles_REST_API_course
83662a33b3a318dc7e52c5d56b577e4863ed7c5d
[ "MIT" ]
null
null
null
""" Django settings for profiles_project project. Generated by 'django-admin startproject' using Django 2.2. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ impor...
26.226563
91
0.699136
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '9%&3aa&mz9nkbfr0!b(^9a^((@_wbd&m3f$3wbyseq9ai9m!^v' DEBUG = bool(int(os.environ.get('DEBUG',1))) ALLOWED_HOSTS = ['ec2-18-117-223-244.us-east-2.compute.amazonaws.com','127.0.0.1'] # Application definition INSTALLED_...
true
true
f7180b932ca3d3eac6846747dbbfa23652d97e6d
1,458
py
Python
sa/profiles/AlliedTelesis/AT8100/get_version.py
xUndero/noc
9fb34627721149fcf7064860bd63887e38849131
[ "BSD-3-Clause" ]
1
2019-09-20T09:36:48.000Z
2019-09-20T09:36:48.000Z
sa/profiles/AlliedTelesis/AT8100/get_version.py
ewwwcha/noc
aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb
[ "BSD-3-Clause" ]
null
null
null
sa/profiles/AlliedTelesis/AT8100/get_version.py
ewwwcha/noc
aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # --------------------------------------------------------------------- # AlliedTelesis.AT8100.get_version # --------------------------------------------------------------------- # Copyright (C) 2007-2018 The NOC Project # See LICENSE for details # -----------------------------------------------...
34.714286
98
0.504801
from noc.core.script.base import BaseScript from noc.sa.interfaces.igetversion import IGetVersion import re class Script(BaseScript): name = "AlliedTelesis.AT8100.get_version" cache = True interface = IGetVersion rx_plat = re.compile( r"^Base\s+(?P<platform>AT-81\S+)\s+(?P<hardware>\S+)\s+(?P...
true
true
f7180d0a373f4396eb239868bbafcb05362fb150
18,059
py
Python
CodeIA/venv/Lib/site-packages/imblearn/pipeline.py
Finasty-lab/IA-Python
286113504906fec11a5aa5fd1d12e38536b1c859
[ "Apache-2.0" ]
2
2017-06-15T04:49:43.000Z
2020-06-20T02:29:29.000Z
CodeIA/venv/Lib/site-packages/imblearn/pipeline.py
Finasty-lab/IA-Python
286113504906fec11a5aa5fd1d12e38536b1c859
[ "Apache-2.0" ]
3
2016-07-26T09:39:44.000Z
2020-06-20T02:29:30.000Z
CodeIA/venv/Lib/site-packages/imblearn/pipeline.py
Finasty-lab/IA-Python
286113504906fec11a5aa5fd1d12e38536b1c859
[ "Apache-2.0" ]
null
null
null
""" The :mod:`imblearn.pipeline` module implements utilities to build a composite estimator, as a chain of transforms, samples and estimators. """ # Adapted from scikit-learn # Author: Edouard Duchesnay # Gael Varoquaux # Virgile Fritsch # Alexandre Gramfort # Lars Buitinck # C...
39.173536
79
0.5966
""" The :mod:`imblearn.pipeline` module implements utilities to build a composite estimator, as a chain of transforms, samples and estimators. """ from sklearn import pipeline from sklearn.base import clone from sklearn.utils import _print_elapsed_time from sklearn.utils.metaestimators import if_delegate_has_method f...
false
true
f7180d77b8c3f9bb8f6b2d45b2d1f43aa01a1d41
673
py
Python
net/wyun/tests/basic/test_basicfunction.py
michaelyin/im2markup-prep
0613e4f77f1b50084a85e5c0b1511c9ae007211d
[ "Apache-2.0" ]
3
2018-04-19T13:51:33.000Z
2020-10-04T12:35:50.000Z
net/wyun/tests/basic/test_basicfunction.py
michaelyin/im2markup-prep
0613e4f77f1b50084a85e5c0b1511c9ae007211d
[ "Apache-2.0" ]
null
null
null
net/wyun/tests/basic/test_basicfunction.py
michaelyin/im2markup-prep
0613e4f77f1b50084a85e5c0b1511c9ae007211d
[ "Apache-2.0" ]
1
2018-11-22T08:44:11.000Z
2018-11-22T08:44:11.000Z
import unittest from net.wyun.mer.basicfunction import BasicFunction class TestBasicFunction(unittest.TestCase): def setUp(self): self.func = BasicFunction() def test_1(self): self.assertTrue(True) def test_2(self): self.assertTrue(True) def test_3(self): self.ass...
20.393939
52
0.649331
import unittest from net.wyun.mer.basicfunction import BasicFunction class TestBasicFunction(unittest.TestCase): def setUp(self): self.func = BasicFunction() def test_1(self): self.assertTrue(True) def test_2(self): self.assertTrue(True) def test_3(self): self.ass...
true
true
f7180f9594e73d237384205187769766c8cda637
13,033
py
Python
google-cloud-sdk/lib/surface/compute/ssh.py
bopopescu/Social-Lite
ee05d6a7431c36ff582c8d6b58bb20a8c5f550bf
[ "Apache-2.0" ]
null
null
null
google-cloud-sdk/lib/surface/compute/ssh.py
bopopescu/Social-Lite
ee05d6a7431c36ff582c8d6b58bb20a8c5f550bf
[ "Apache-2.0" ]
4
2020-07-21T12:51:46.000Z
2022-01-22T10:29:25.000Z
google-cloud-sdk/lib/surface/compute/ssh.py
bopopescu/Social-Lite
ee05d6a7431c36ff582c8d6b58bb20a8c5f550bf
[ "Apache-2.0" ]
1
2020-07-25T18:17:57.000Z
2020-07-25T18:17:57.000Z
# -*- coding: utf-8 -*- # # Copyright 2014 Google LLC. 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 requir...
38.559172
108
0.682115
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import argparse import sys from googlecloudsdk.api_lib.compute import base_classes from googlecloudsdk.calliope import base from googlecloudsdk.command_lib.compute import completers from googlecloudsdk.com...
true
true
f7180fdca7de8d265e0d9027890060eff6ecc433
3,563
py
Python
playground/algorithms/ddpg.py
brandontrabucco/playground
069be961aaecb45d75f12f4a71cfa65d7152ea8a
[ "MIT" ]
3
2019-12-06T19:22:22.000Z
2020-01-20T01:57:26.000Z
playground/algorithms/ddpg.py
brandontrabucco/playground
069be961aaecb45d75f12f4a71cfa65d7152ea8a
[ "MIT" ]
null
null
null
playground/algorithms/ddpg.py
brandontrabucco/playground
069be961aaecb45d75f12f4a71cfa65d7152ea8a
[ "MIT" ]
null
null
null
"""Author: Brandon Trabucco, Copyright 2019, MIT License""" from playground.algorithms.algorithm import Algorithm import tensorflow as tf class DDPG(Algorithm): def __init__( self, policy, target_policy, qf, target_qf, replay_buffer, ...
35.989899
83
0.609879
from playground.algorithms.algorithm import Algorithm import tensorflow as tf class DDPG(Algorithm): def __init__( self, policy, target_policy, qf, target_qf, replay_buffer, reward_scale=1.0, discount=0.99, ...
true
true
f71810217649e9ce7c57c78566cb40789c548173
3,089
py
Python
google/ads/google_ads/v0/proto/resources/gender_view_pb2.py
jwygoda/google-ads-python
863892b533240cb45269d9c2cceec47e2c5a8b68
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v0/proto/resources/gender_view_pb2.py
jwygoda/google-ads-python
863892b533240cb45269d9c2cceec47e2c5a8b68
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v0/proto/resources/gender_view_pb2.py
jwygoda/google-ads-python
863892b533240cb45269d9c2cceec47e2c5a8b68
[ "Apache-2.0" ]
null
null
null
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/googleads_v0/proto/resources/gender_view.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from...
38.135802
488
0.767886
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _s...
true
true
f71810c4ecead08a935a56fcd5fb6be0cdf8d125
130
py
Python
pythreshold/global_th/entropy/__init__.py
pedrogalher/pythreshold
135e42fb4be1ff4d4c52ea05daca84be1acaa0fc
[ "MIT" ]
null
null
null
pythreshold/global_th/entropy/__init__.py
pedrogalher/pythreshold
135e42fb4be1ff4d4c52ea05daca84be1acaa0fc
[ "MIT" ]
null
null
null
pythreshold/global_th/entropy/__init__.py
pedrogalher/pythreshold
135e42fb4be1ff4d4c52ea05daca84be1acaa0fc
[ "MIT" ]
null
null
null
from .pun import pun_threshold from .kapur import kapur_threshold, kapur_multithreshold from .johannsen import johannsen_threshold
43.333333
56
0.876923
from .pun import pun_threshold from .kapur import kapur_threshold, kapur_multithreshold from .johannsen import johannsen_threshold
true
true
f71811f3f0271780fcc16a9db631d5dee72d81ba
1,078
py
Python
src/python/pants/backend/codegen/jaxb/targets.py
stuhood/pants
107b8335a03482516f64aefa98aadf9f5278b2ee
[ "Apache-2.0" ]
null
null
null
src/python/pants/backend/codegen/jaxb/targets.py
stuhood/pants
107b8335a03482516f64aefa98aadf9f5278b2ee
[ "Apache-2.0" ]
null
null
null
src/python/pants/backend/codegen/jaxb/targets.py
stuhood/pants
107b8335a03482516f64aefa98aadf9f5278b2ee
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from pants.backend.jvm.rules.targets import COMMON_JVM_FIELDS from pants.engine.target import Sources, StringField, Target class JaxbJavaPackage(StringField): """Java package (com.co...
31.705882
100
0.71243
from pants.backend.jvm.rules.targets import COMMON_JVM_FIELDS from pants.engine.target import Sources, StringField, Target class JaxbJavaPackage(StringField): alias = "package" class JaxbLanguage(StringField): alias = "language" valid_choices = ("java",) default = "java" value: str class Ja...
true
true
f718134ad71e50e6db3ca760f1916747c1d91ee2
4,100
py
Python
tests/plot_time_space.py
folk85/gen_turb
4390938c4cefae334e95414f83b9c484991bff67
[ "MIT" ]
1
2020-09-10T07:42:29.000Z
2020-09-10T07:42:29.000Z
tests/plot_time_space.py
folk85/gen_turb
4390938c4cefae334e95414f83b9c484991bff67
[ "MIT" ]
null
null
null
tests/plot_time_space.py
folk85/gen_turb
4390938c4cefae334e95414f83b9c484991bff67
[ "MIT" ]
1
2019-08-08T20:08:49.000Z
2019-08-08T20:08:49.000Z
# -*- coding: utf-8 -*- import os import numpy as np import matplotlib as m import matplotlib.pyplot as plt from scipy.fftpack import * from plot_spectr import * def main_routine(): print(os.getcwd()) nfile = './store.dat' #Read the file by blocks to reduce required memory with open(nfile,'r') as f: nel =...
30.37037
96
0.580488
import os import numpy as np import matplotlib as m import matplotlib.pyplot as plt from scipy.fftpack import * from plot_spectr import * def main_routine(): print(os.getcwd()) nfile = './store.dat' with open(nfile,'r') as f: nel = sum(1 for _ in f) f.close() nk = 64*64 *64 ntimes = nel / nk de...
true
true
f71813e7fa972b662bb12978d9498a527f879572
60
py
Python
tacotron2/__init__.py
samia-mmx/T2_PT
25ed08791f72492440e9a796d37c5e67a51aaf05
[ "BSD-3-Clause" ]
null
null
null
tacotron2/__init__.py
samia-mmx/T2_PT
25ed08791f72492440e9a796d37c5e67a51aaf05
[ "BSD-3-Clause" ]
null
null
null
tacotron2/__init__.py
samia-mmx/T2_PT
25ed08791f72492440e9a796d37c5e67a51aaf05
[ "BSD-3-Clause" ]
null
null
null
from .entrypoints import nvidia_tacotron2, nvidia_tts_utils
30
59
0.883333
from .entrypoints import nvidia_tacotron2, nvidia_tts_utils
true
true
f718170478283f6fd995f6b98c28ab10f3a084fa
5,620
py
Python
google/ads/google_ads/v4/proto/enums/change_status_resource_type_pb2.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
1
2021-04-09T04:28:47.000Z
2021-04-09T04:28:47.000Z
google/ads/google_ads/v4/proto/enums/change_status_resource_type_pb2.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v4/proto/enums/change_status_resource_type_pb2.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/googleads_v4/proto/enums/change_status_resource_type.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.prot...
41.62963
1,005
0.775801
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _s...
true
true
f718190eca4cc66afac5d11490eec0b6d1f694cf
10,310
py
Python
tests/unit/Stories.py
rashmi43/platform-engine
dd9a22742bc8dc43a530ea5edef39b3c35db57c1
[ "Apache-2.0" ]
null
null
null
tests/unit/Stories.py
rashmi43/platform-engine
dd9a22742bc8dc43a530ea5edef39b3c35db57c1
[ "Apache-2.0" ]
null
null
null
tests/unit/Stories.py
rashmi43/platform-engine
dd9a22742bc8dc43a530ea5edef39b3c35db57c1
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import pathlib import time from asyncy.Stories import MAX_BYTES_LOGGING, Stories from asyncy.utils import Dict, Resolver from pytest import mark def test_stories_init(app, logger, story): assert story.entrypoint == app.stories['hello.story']['entrypoint'] assert story.app == app ...
28.169399
79
0.562949
import pathlib import time from asyncy.Stories import MAX_BYTES_LOGGING, Stories from asyncy.utils import Dict, Resolver from pytest import mark def test_stories_init(app, logger, story): assert story.entrypoint == app.stories['hello.story']['entrypoint'] assert story.app == app assert story.name == 'he...
true
true
f7181a51ac70864c0872ec1652625be1aa4f459a
3,736
py
Python
code/UNET_lowered.py
sagnik1511/U-Net-Lowered-with-keras
364336b244ece288a52cf76df451501a665e745a
[ "MIT" ]
6
2021-06-14T14:42:48.000Z
2021-06-14T15:16:22.000Z
code/UNET_lowered.py
sagnik1511/U-Net-Reduced-with-TF-keras
364336b244ece288a52cf76df451501a665e745a
[ "MIT" ]
null
null
null
code/UNET_lowered.py
sagnik1511/U-Net-Reduced-with-TF-keras
364336b244ece288a52cf76df451501a665e745a
[ "MIT" ]
2
2021-12-16T12:40:36.000Z
2022-02-04T23:10:09.000Z
# -*- coding: utf-8 -*- """ UNET LOwered Model : This customized UNet Model has been generated lowering the filters to their 25% . """ import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers from tensorflow.keras.layers import Input , Conv2D , MaxPooling2D , D...
54.941176
131
0.677195
import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers from tensorflow.keras.layers import Input , Conv2D , MaxPooling2D , Dropout , concatenate , UpSampling2D from tensorflow.keras import models from tensorflow.keras import losses from tensorflow.keras import optimizers impo...
true
true
f7181b13ca73f4b482d5f775d442f82f8780cd58
20,330
py
Python
modin/experimental/engines/omnisci_on_ray/frame/calcite_builder.py
Rippling/modin
b2cf1d5fc704803a1ce6699e9a373dc7abeb409e
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
modin/experimental/engines/omnisci_on_ray/frame/calcite_builder.py
Rippling/modin
b2cf1d5fc704803a1ce6699e9a373dc7abeb409e
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
modin/experimental/engines/omnisci_on_ray/frame/calcite_builder.py
Rippling/modin
b2cf1d5fc704803a1ce6699e9a373dc7abeb409e
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Licensed to Modin Development Team under one or more contributor license agreements. # See the NOTICE file distributed with this work for additional information regarding # copyright ownership. The Modin Development Team licenses this file to you under the # Apache License, Version 2.0 (the "License"); you may not u...
37.302752
87
0.588096
from .expr import ( InputRefExpr, LiteralExpr, OpExpr, AggregateExpr, build_if_then_else, build_row_idx_filter_expr, ) from .calcite_algebra import ( CalciteBaseNode, CalciteInputRefExpr, CalciteInputIdxExpr, CalciteScanNode, CalciteProjectionNode, CalciteFilterNode, ...
true
true
f7181b87434e6a3a078b7f233f6a61d24e5fe9cc
3,374
py
Python
data/test/python/f7181b87434e6a3a078b7f233f6a61d24e5fe9ccbase.py
harshp8l/deep-learning-lang-detection
2a54293181c1c2b1a2b840ddee4d4d80177efb33
[ "MIT" ]
84
2017-10-25T15:49:21.000Z
2021-11-28T21:25:54.000Z
data/test/python/f7181b87434e6a3a078b7f233f6a61d24e5fe9ccbase.py
vassalos/deep-learning-lang-detection
cbb00b3e81bed3a64553f9c6aa6138b2511e544e
[ "MIT" ]
5
2018-03-29T11:50:46.000Z
2021-04-26T13:33:18.000Z
data/test/python/f7181b87434e6a3a078b7f233f6a61d24e5fe9ccbase.py
vassalos/deep-learning-lang-detection
cbb00b3e81bed3a64553f9c6aa6138b2511e544e
[ "MIT" ]
24
2017-11-22T08:31:00.000Z
2022-03-27T01:22:31.000Z
from __future__ import absolute_import import os import sys from django.core.management.base import BaseCommand import celery import djcelery DB_SHARED_THREAD = """\ DatabaseWrapper objects created in a thread can only \ be used in that same thread. The object with alias '%s' \ was created in thread id %s and this...
31.53271
74
0.590101
from __future__ import absolute_import import os import sys from django.core.management.base import BaseCommand import celery import djcelery DB_SHARED_THREAD = """\ DatabaseWrapper objects created in a thread can only \ be used in that same thread. The object with alias '%s' \ was created in thread id %s and this...
true
true
f7181bc2790949201ed0b3f57763455f00d8b77a
28,933
py
Python
Simulador.py
edrhat/simulator
d243443c84ccb3e4efa880990d11b395125d16d3
[ "MIT" ]
null
null
null
Simulador.py
edrhat/simulator
d243443c84ccb3e4efa880990d11b395125d16d3
[ "MIT" ]
null
null
null
Simulador.py
edrhat/simulator
d243443c84ccb3e4efa880990d11b395125d16d3
[ "MIT" ]
null
null
null
from tkinter import * from tkinter import messagebox import tkinter as tk from tkinter import ttk #IMAGENS DEFEITO: 240X240 class Tela: def fechar(self, event): janela.destroy() exit() def fecharPc(self, event): self.lb_simulador.place_forget() ...
35.544226
169
0.571631
from tkinter import * from tkinter import messagebox import tkinter as tk from tkinter import ttk class Tela: def fechar(self, event): janela.destroy() exit() def fecharPc(self, event): self.lb_simulador.place_forget() self.imgFundo.place_f...
true
true
f7181c55922ded847f3c093a97e05cf3a83a7542
502
py
Python
descarteslabs/vectors/exceptions.py
carderne/descarteslabs-python
757b480efb8d58474a3bf07f1dbd90652b46ed64
[ "Apache-2.0" ]
167
2017-03-23T22:16:58.000Z
2022-03-08T09:19:30.000Z
descarteslabs/vectors/exceptions.py
carderne/descarteslabs-python
757b480efb8d58474a3bf07f1dbd90652b46ed64
[ "Apache-2.0" ]
93
2017-03-23T22:11:40.000Z
2021-12-13T18:38:53.000Z
descarteslabs/vectors/exceptions.py
carderne/descarteslabs-python
757b480efb8d58474a3bf07f1dbd90652b46ed64
[ "Apache-2.0" ]
46
2017-03-25T19:12:14.000Z
2021-08-15T18:04:29.000Z
class VectorException(Exception): """Base exception for Vector operations""" pass class WaitTimeoutError(VectorException): """The timeout period for a wait operation has been exceeded""" pass class FailedJobError(VectorException): """Used to indicate that an asynchronous job has failed""" ...
18.592593
67
0.737052
class VectorException(Exception): pass class WaitTimeoutError(VectorException): pass class FailedJobError(VectorException): pass class InvalidQueryException(VectorException): pass FailedCopyError = FailedJobError
true
true
f7181d74255d1aac4659dd861c34a79c119960a0
2,097
py
Python
permutation.py
kaixindelele/self_demo
cdde94de6d7fa2beb4d0cc9d14eedcb6228cf0af
[ "Apache-2.0" ]
null
null
null
permutation.py
kaixindelele/self_demo
cdde94de6d7fa2beb4d0cc9d14eedcb6228cf0af
[ "Apache-2.0" ]
null
null
null
permutation.py
kaixindelele/self_demo
cdde94de6d7fa2beb4d0cc9d14eedcb6228cf0af
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Jul 9 14:56:07 2018 f(n) = n * f(n-1) and if a is a string variable a = "hello" b = a b = b+" world" print(b): hello world print(a): hello so "=" equal "copy" and creat a new date @author: lele """ a = "1234" #def permutation(a,size,n): # if n == 1:...
19.063636
58
0.44206
a = "1234" print("size:",size) ls = range(1,size+1) minimum = 0 for figure in ls: minimum += figure * (10 ** (size-1-ls.index(figure))) maximum = list(str(minimum)) maximum.reverse() maximum = "".join(maximum) def swap(temp,a,b): temp = list(temp) temp[a],temp[b] = temp[b],tem...
true
true
f7181e6bab2403dd9cc3515a9e46f280c4a1f683
4,961
py
Python
airbyte-integrations/connectors/source-smartsheets/source_smartsheets/source.py
OTRI-Unipd/OTRI-airbyte
50eeeb773f75246e86c6e167b0cd7d2dda6efe0d
[ "MIT" ]
2
2022-03-02T13:46:05.000Z
2022-03-05T12:31:28.000Z
airbyte-integrations/connectors/source-smartsheets/source_smartsheets/source.py
OTRI-Unipd/OTRI-airbyte
50eeeb773f75246e86c6e167b0cd7d2dda6efe0d
[ "MIT" ]
5
2022-02-22T14:49:48.000Z
2022-03-19T10:43:08.000Z
airbyte-integrations/connectors/source-smartsheets/source_smartsheets/source.py
OTRI-Unipd/OTRI-airbyte
50eeeb773f75246e86c6e167b0cd7d2dda6efe0d
[ "MIT" ]
1
2022-03-11T06:21:24.000Z
2022-03-11T06:21:24.000Z
# # Copyright (c) 2021 Airbyte, Inc., all rights reserved. # import json from datetime import datetime from typing import Dict, Generator import smartsheet from airbyte_cdk import AirbyteLogger from airbyte_cdk.models import ( AirbyteCatalog, AirbyteConnectionStatus, AirbyteMessage, AirbyteRecordMess...
37.583333
131
0.610966
import json from datetime import datetime from typing import Dict, Generator import smartsheet from airbyte_cdk import AirbyteLogger from airbyte_cdk.models import ( AirbyteCatalog, AirbyteConnectionStatus, AirbyteMessage, AirbyteRecordMessage, AirbyteStream, ConfiguredAirbyteCatalog, Sta...
true
true
f7181ee86ad8cc7e5af71dcdfa13dd1e97cf1945
4,658
py
Python
python/download-all-data.py
wizzardz/vehicle-statistics-india
a54f84460ce3129d170510ce2c33799008b1a7a6
[ "Apache-2.0" ]
null
null
null
python/download-all-data.py
wizzardz/vehicle-statistics-india
a54f84460ce3129d170510ce2c33799008b1a7a6
[ "Apache-2.0" ]
null
null
null
python/download-all-data.py
wizzardz/vehicle-statistics-india
a54f84460ce3129d170510ce2c33799008b1a7a6
[ "Apache-2.0" ]
null
null
null
import urllib.request import json import sys import os # specify the url format for downloading the json data url_format = 'https://data.gov.in/node/{0}/datastore/export/json' years = [2011, 2009, 2006, 2004, 2002] # default data for constructing the urls for each States and union teritories json_string = json.dumps(...
30.246753
84
0.542078
import urllib.request import json import sys import os url_format = 'https://data.gov.in/node/{0}/datastore/export/json' years = [2011, 2009, 2006, 2004, 2002] json_string = json.dumps({ "Data": [{ "Andaman and Nicobar Islands": [89524, 100624, 100681, 100729, 100794] }, { "Chandigarh": [89529...
true
true
f71820aea4c4ecfde9e0adb936a156185abd7e94
10,068
py
Python
constph/gromos_factory.py
bbraunsfeld/const_pH_gromos
6ef02da6fc0f451aa0082b726926c6fccabf324b
[ "MIT" ]
null
null
null
constph/gromos_factory.py
bbraunsfeld/const_pH_gromos
6ef02da6fc0f451aa0082b726926c6fccabf324b
[ "MIT" ]
1
2021-09-17T18:17:39.000Z
2021-09-17T18:17:39.000Z
constph/gromos_factory.py
bbraunsfeld/const_pH_gromos
6ef02da6fc0f451aa0082b726926c6fccabf324b
[ "MIT" ]
null
null
null
import datetime from os import stat class GromosFactory: """Class to build the string needed to create a Gromos input file (*.imd), a make_script fiel (*.arg) and a job file (*.job)""" def __init__(self, configuration: dict, structure: str) -> None: self.configuration = configuration self.str...
29.786982
131
0.527712
import datetime from os import stat class GromosFactory: def __init__(self, configuration: dict, structure: str) -> None: self.configuration = configuration self.structure = structure def _get_search_run_parameters(self): prms = {} for key in self.configuration["search_run"][...
true
true
f718217d51a3402d72204f81cd749070c51ae9c6
387
py
Python
borsa/asgi.py
bozcani/borsa-scraper-app
56c767a9b6d6c9be40046aa03763f13465860f6f
[ "MIT" ]
3
2020-02-06T10:05:29.000Z
2020-04-18T10:11:37.000Z
borsa/asgi.py
bozcani/borsa
56c767a9b6d6c9be40046aa03763f13465860f6f
[ "MIT" ]
10
2020-02-06T08:50:13.000Z
2020-04-25T12:17:17.000Z
borsa/asgi.py
bozcani/borsa-scraper-app
56c767a9b6d6c9be40046aa03763f13465860f6f
[ "MIT" ]
1
2020-02-06T07:40:06.000Z
2020-02-06T07:40:06.000Z
""" ASGI config for borsa project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTING...
22.764706
78
0.782946
import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'borsa.settings') application = get_asgi_application()
true
true
f71821ed4d2b1e66e27c2cefdf134e9907e7d2b1
8,869
py
Python
src/python/main/segeval/ml/PercentageTest.py
anna-ka/segmentation.evaluation
b7eddc9067fc773f3d040dd5eef33dabac07abc0
[ "BSD-3-Clause" ]
1
2017-05-09T06:16:58.000Z
2017-05-09T06:16:58.000Z
src/python/main/segeval/ml/PercentageTest.py
anna-ka/segmentation.evaluation
b7eddc9067fc773f3d040dd5eef33dabac07abc0
[ "BSD-3-Clause" ]
null
null
null
src/python/main/segeval/ml/PercentageTest.py
anna-ka/segmentation.evaluation
b7eddc9067fc773f3d040dd5eef33dabac07abc0
[ "BSD-3-Clause" ]
null
null
null
''' Tests the WindowDiff evaluation metric. .. moduleauthor:: Chris Fournier <chris.m.fournier@gmail.com> ''' #=============================================================================== # Copyright (c) 2011-2012, Chris Fournier # All rights reserved. # # Redistribution and use in source and binary forms, with or...
42.033175
80
0.56658
import unittest from decimal import Decimal from .Percentage import percentage, pairwise_percentage, \ find_boundary_position_freqs from ..data.Samples import KAZANTSEVA2012_G5, KAZANTSEVA2012_G2, \ COMPLETE_AGREEMENT, LARGE_DISAGREEMENT from .. import convert_positions_to_masses class TestPercentage(unittes...
true
true
f7182279ccd3d16543495752c131fb1fcf6fbcc0
5,356
py
Python
torchmetrics/regression/pearson.py
lucadiliello/metrics
e98fbafd2af5d217596958f9cfe6152543a00b7f
[ "Apache-2.0" ]
null
null
null
torchmetrics/regression/pearson.py
lucadiliello/metrics
e98fbafd2af5d217596958f9cfe6152543a00b7f
[ "Apache-2.0" ]
null
null
null
torchmetrics/regression/pearson.py
lucadiliello/metrics
e98fbafd2af5d217596958f9cfe6152543a00b7f
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # 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 i...
37.71831
120
0.626027
from typing import Any, List, Optional, Tuple import torch from torch import Tensor from torchmetrics.functional.regression.pearson import _pearson_corrcoef_compute, _pearson_corrcoef_update from torchmetrics.metric import Metric def _final_aggregation( means_x: Tensor, means_y: Tensor, vars_x: Tensor, ...
true
true
f718227f7c7f9f79e60bd34c13ee360426d8cedb
12,071
py
Python
8.SAC/SAC-continuous.py
Lizhi-sjtu/DRL-code-pytorch
2ca05f4ed64d2d032e161fc3a2d2a68c818c4337
[ "MIT" ]
2
2022-03-27T01:56:48.000Z
2022-03-31T05:02:39.000Z
8.SAC/SAC-continuous.py
Lizhi-sjtu/DRL-code-pytorch
2ca05f4ed64d2d032e161fc3a2d2a68c818c4337
[ "MIT" ]
null
null
null
8.SAC/SAC-continuous.py
Lizhi-sjtu/DRL-code-pytorch
2ca05f4ed64d2d032e161fc3a2d2a68c818c4337
[ "MIT" ]
null
null
null
import gym import torch import torch.nn as nn import torch.nn.functional as F import numpy as np import copy from torch.utils.tensorboard import SummaryWriter from torch.distributions import Normal class Actor(nn.Module): def __init__(self, state_dim, action_dim, hidden_width, max_action): sup...
42.65371
147
0.618341
import gym import torch import torch.nn as nn import torch.nn.functional as F import numpy as np import copy from torch.utils.tensorboard import SummaryWriter from torch.distributions import Normal class Actor(nn.Module): def __init__(self, state_dim, action_dim, hidden_width, max_action): sup...
true
true
f71823696e8d384656f678616b79009f7bcd95a6
14,225
py
Python
esrally/client.py
Kua-Fu/rally
7c58ef6f81f618fbc142dfa58b0ed00a5b05fbae
[ "Apache-2.0" ]
1,577
2016-04-19T12:38:58.000Z
2022-03-31T07:18:25.000Z
esrally/client.py
Kua-Fu/rally
7c58ef6f81f618fbc142dfa58b0ed00a5b05fbae
[ "Apache-2.0" ]
1,079
2016-04-19T12:09:16.000Z
2022-03-31T05:38:50.000Z
esrally/client.py
Kua-Fu/rally
7c58ef6f81f618fbc142dfa58b0ed00a5b05fbae
[ "Apache-2.0" ]
300
2016-04-19T18:27:12.000Z
2022-03-23T07:54:16.000Z
# Licensed to Elasticsearch B.V. under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch B.V. licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this f...
44.873817
139
0.664745
import contextvars import logging import time import certifi import urllib3 from esrally import doc_link, exceptions from esrally.utils import console, convert class RequestContextManager: def __init__(self, request_context_holder): self.ctx_holder = request_context_holder self.ctx = None ...
true
true
f71823bb0a9512d2ba7d2b03e46696bf17185a01
2,937
py
Python
cloudfeaster/privacy.py
simonsdave/clf
643ce7e6ba9bd47c35b235cb24264dbc9024367c
[ "MIT" ]
4
2015-12-17T17:32:23.000Z
2022-01-02T20:31:08.000Z
cloudfeaster/privacy.py
simonsdave/clf
643ce7e6ba9bd47c35b235cb24264dbc9024367c
[ "MIT" ]
61
2015-05-25T10:16:55.000Z
2022-01-15T23:49:38.000Z
cloudfeaster/privacy.py
simonsdave/clf
643ce7e6ba9bd47c35b235cb24264dbc9024367c
[ "MIT" ]
2
2015-12-10T18:18:10.000Z
2021-01-30T15:29:13.000Z
"""This module exists as a place to centralize functionality and configuration related to privacy. """ import hashlib import logging class RedactingFormatter(object): """ Credits - this formatter was heavily inspired by https://relaxdiego.com/2014/07/logging-in-python.html """ @classmethod def i...
36.7125
106
0.657133
import hashlib import logging class RedactingFormatter(object): @classmethod def install_for_all_handlers(self, crawl_args): for handler in logging.root.handlers: handler.setFormatter(self(handler.formatter, crawl_args)) def __init__(self, original_formatter, crawl_a...
true
true
f718246c9b97a010fbc0d6588245bd4852b549f4
1,163
py
Python
www/tests/test_import.py
sejalseth/brython
0b59368eac40a3b1eef7b13f2102b18cb5629687
[ "BSD-3-Clause" ]
5,926
2015-01-01T07:45:08.000Z
2022-03-31T12:34:38.000Z
www/tests/test_import.py
sejalseth/brython
0b59368eac40a3b1eef7b13f2102b18cb5629687
[ "BSD-3-Clause" ]
1,728
2015-01-01T01:09:12.000Z
2022-03-30T23:25:22.000Z
www/tests/test_import.py
sejalseth/brython
0b59368eac40a3b1eef7b13f2102b18cb5629687
[ "BSD-3-Clause" ]
574
2015-01-02T01:36:10.000Z
2022-03-26T10:18:48.000Z
import simple class Simple2: def __init__(self): self.info = "SimpleClass2" class Simple3(simple.Simple): def __init__(self): simple.Simple.__init__(self) text = "text in simple" assert simple.text == text _s = simple.Simple() _s3 = Simple3() assert _s.info == _s3.info import recursive_i...
18.758065
62
0.72485
import simple class Simple2: def __init__(self): self.info = "SimpleClass2" class Simple3(simple.Simple): def __init__(self): simple.Simple.__init__(self) text = "text in simple" assert simple.text == text _s = simple.Simple() _s3 = Simple3() assert _s.info == _s3.info import recursive_i...
true
true
f71824b21dd9aad49d682f6da45462de71c6c6b0
403
py
Python
mozillians/api/urls.py
caktus/mozillians
312eb5d993b60092fa4f8eb94548c1db4b21fa01
[ "BSD-3-Clause" ]
null
null
null
mozillians/api/urls.py
caktus/mozillians
312eb5d993b60092fa4f8eb94548c1db4b21fa01
[ "BSD-3-Clause" ]
null
null
null
mozillians/api/urls.py
caktus/mozillians
312eb5d993b60092fa4f8eb94548c1db4b21fa01
[ "BSD-3-Clause" ]
null
null
null
from django.conf.urls import include, patterns, url from tastypie.api import Api import mozillians.groups.api import mozillians.users.api v1_api = Api(api_name='v1') v1_api.register(mozillians.users.api.UserResource()) v1_api.register(mozillians.groups.api.GroupResource()) v1_api.register(mozillians.groups.api.Skil...
23.705882
54
0.769231
from django.conf.urls import include, patterns, url from tastypie.api import Api import mozillians.groups.api import mozillians.users.api v1_api = Api(api_name='v1') v1_api.register(mozillians.users.api.UserResource()) v1_api.register(mozillians.groups.api.GroupResource()) v1_api.register(mozillians.groups.api.Skil...
true
true
f71826ef8902c67bed889b8698b64504138920f2
10,060
py
Python
graspologic/layouts/render.py
tliu68/graspologic
d1cf7678bc63ab9769828a82a90f66bf1dfa0eff
[ "MIT" ]
1
2021-07-06T15:36:27.000Z
2021-07-06T15:36:27.000Z
graspologic/layouts/render.py
tliu68/graspologic
d1cf7678bc63ab9769828a82a90f66bf1dfa0eff
[ "MIT" ]
null
null
null
graspologic/layouts/render.py
tliu68/graspologic
d1cf7678bc63ab9769828a82a90f66bf1dfa0eff
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import networkx as nx from typing import Any, Dict, List, Optional, Tuple from graspologic.layouts.classes import NodePosition import matplotlib.pyplot as plt def _calculate_x_y_domain( positions: List[NodePosition], ) -> Tuple[Tuple[float,...
31.53605
103
0.641451
import networkx as nx from typing import Any, Dict, List, Optional, Tuple from graspologic.layouts.classes import NodePosition import matplotlib.pyplot as plt def _calculate_x_y_domain( positions: List[NodePosition], ) -> Tuple[Tuple[float, float], Tuple[float, float]]: min_x = min_y = float("inf") max_x...
true
true
f7182817f87774a0db791bb29d67b66f78795e8a
500
py
Python
multimodalDetection/splitAudio.py
Rubik90/TFM_AG
5e836245d0704122f2a0d47413e93bf53d966ca0
[ "MIT" ]
1
2021-02-16T18:32:38.000Z
2021-02-16T18:32:38.000Z
multimodalDetection/splitAudio.py
Rubik90/TFM_AG
5e836245d0704122f2a0d47413e93bf53d966ca0
[ "MIT" ]
null
null
null
multimodalDetection/splitAudio.py
Rubik90/TFM_AG
5e836245d0704122f2a0d47413e93bf53d966ca0
[ "MIT" ]
1
2021-02-16T18:32:39.000Z
2021-02-16T18:32:39.000Z
import subprocess import os import shutil def split(audio,output): command = f"ffmpeg -i '{audio}' -f segment -segment_time 0.0416666666666667 -c copy {output}" subprocess.call(command,shell=True) split('audio.wav','out%03d.wav') elements = os.listdir('./') if(os.path.isdir("./audioChunks/")): shutil.rmtree...
26.315789
97
0.688
import subprocess import os import shutil def split(audio,output): command = f"ffmpeg -i '{audio}' -f segment -segment_time 0.0416666666666667 -c copy {output}" subprocess.call(command,shell=True) split('audio.wav','out%03d.wav') elements = os.listdir('./') if(os.path.isdir("./audioChunks/")): shutil.rmtree...
true
true
f718289e90dd9a48a67856934c04c619c34d7999
252
py
Python
practice_exam/1070.py
omar115/code_for_Kids
3f50ffb1d492c6ea5aa09688944aa01a0cadf1fd
[ "MIT" ]
null
null
null
practice_exam/1070.py
omar115/code_for_Kids
3f50ffb1d492c6ea5aa09688944aa01a0cadf1fd
[ "MIT" ]
null
null
null
practice_exam/1070.py
omar115/code_for_Kids
3f50ffb1d492c6ea5aa09688944aa01a0cadf1fd
[ "MIT" ]
2
2021-01-08T03:52:46.000Z
2021-04-01T19:16:12.000Z
x = int(input()) if x % 2 == 0: y = x + 1 print(y) y = y + 2 print(y) y = y + 2 print(y) y = y + 2 print(y) else: y = x print(y) y = y + 2 print(y) y = y + 2 print(y) y = y + 2 print(y)
11.454545
16
0.353175
x = int(input()) if x % 2 == 0: y = x + 1 print(y) y = y + 2 print(y) y = y + 2 print(y) y = y + 2 print(y) else: y = x print(y) y = y + 2 print(y) y = y + 2 print(y) y = y + 2 print(y)
true
true
f718293c3ac36f83b257d72add6c9f74092f29f6
2,148
py
Python
src/git_portfolio/use_cases/gh.py
staticdev/github-portfolio
850461eed8160e046ee16664ac3dbc19e3ec0965
[ "MIT" ]
null
null
null
src/git_portfolio/use_cases/gh.py
staticdev/github-portfolio
850461eed8160e046ee16664ac3dbc19e3ec0965
[ "MIT" ]
null
null
null
src/git_portfolio/use_cases/gh.py
staticdev/github-portfolio
850461eed8160e046ee16664ac3dbc19e3ec0965
[ "MIT" ]
null
null
null
"""Base Github use case.""" from __future__ import annotations import traceback from typing import Any import git_portfolio.config_manager as cm import git_portfolio.github_service as gs import git_portfolio.responses as res class GhUseCase: """Github use case.""" def __init__( self, config...
35.8
86
0.635475
from __future__ import annotations import traceback from typing import Any import git_portfolio.config_manager as cm import git_portfolio.github_service as gs import git_portfolio.responses as res class GhUseCase: def __init__( self, config_manager: cm.ConfigManager, github_service: gs....
true
true
f7182afb3ce7fb885646e29465ecd1cff61e5f5f
1,224
py
Python
src/test/python/apache/thermos/common/test_pathspec.py
wickman/incubator-aurora
9906d217093568ed4c9cfe620862818f15ce4150
[ "Apache-2.0" ]
1
2016-05-01T20:17:24.000Z
2016-05-01T20:17:24.000Z
src/test/python/apache/thermos/common/test_pathspec.py
wickman/incubator-aurora
9906d217093568ed4c9cfe620862818f15ce4150
[ "Apache-2.0" ]
null
null
null
src/test/python/apache/thermos/common/test_pathspec.py
wickman/incubator-aurora
9906d217093568ed4c9cfe620862818f15ce4150
[ "Apache-2.0" ]
null
null
null
# # Copyright 2013 Apache Software Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
36
100
0.75
import os from apache.thermos.common.path import TaskPath def test_legacy_task_roots(): assert TaskPath().given(task_id='foo').getpath('checkpoint_path').startswith( TaskPath.DEFAULT_CHECKPOINT_ROOT) assert TaskPath(root='/var/lib/mesos').given(task_id='foo').getpath('checkpoint_path').startswith( '...
true
true
f7182bad3db9d7c2c8ceff11acfdcada87264c50
1,951
py
Python
ex35.py
sansanaye12/python_exercises
cfe13b34dba4414f421fd2302a9d620e4d32b987
[ "MIT" ]
null
null
null
ex35.py
sansanaye12/python_exercises
cfe13b34dba4414f421fd2302a9d620e4d32b987
[ "MIT" ]
null
null
null
ex35.py
sansanaye12/python_exercises
cfe13b34dba4414f421fd2302a9d620e4d32b987
[ "MIT" ]
null
null
null
from sys import exit def gold_room(): print("This room is full of gold. How much do you take?") choice=input("> ") if "0" in choice or "1" in choice: how_much=int(choice) else: dead("Man,learn to type a number.") if how_much < 50: print("Nice,you're not greedy,you win!")...
31.983607
68
0.579703
from sys import exit def gold_room(): print("This room is full of gold. How much do you take?") choice=input("> ") if "0" in choice or "1" in choice: how_much=int(choice) else: dead("Man,learn to type a number.") if how_much < 50: print("Nice,you're not greedy,you win!")...
false
true
f7182bb3084036979b843ba667b570839f34a904
430
py
Python
weather__openweathermap__pyowm.py
DazEB2/SimplePyScripts
1dde0a42ba93fe89609855d6db8af1c63b1ab7cc
[ "CC-BY-4.0" ]
117
2015-12-18T07:18:27.000Z
2022-03-28T00:25:54.000Z
weather__openweathermap__pyowm.py
DazEB2/SimplePyScripts
1dde0a42ba93fe89609855d6db8af1c63b1ab7cc
[ "CC-BY-4.0" ]
8
2018-10-03T09:38:46.000Z
2021-12-13T19:51:09.000Z
weather__openweathermap__pyowm.py
DazEB2/SimplePyScripts
1dde0a42ba93fe89609855d6db8af1c63b1ab7cc
[ "CC-BY-4.0" ]
28
2016-08-02T17:43:47.000Z
2022-03-21T08:31:12.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'ipetrash' API_KEY = '87c7712a9b72646a269102230858837b' place = 'Магнитогорск' # pip install pyowm import pyowm owm = pyowm.OWM(API_KEY) observation = owm.weather_at_place(place) w = observation.get_weather() temperature = w.get_temperature('celsius')['tem...
21.5
50
0.725581
__author__ = 'ipetrash' API_KEY = '87c7712a9b72646a269102230858837b' place = 'Магнитогорск' import pyowm owm = pyowm.OWM(API_KEY) observation = owm.weather_at_place(place) w = observation.get_weather() temperature = w.get_temperature('celsius')['temp'] status = w.get_status() print('Температура: {} °C'.format(temp...
true
true
f7182c6753abe0014d9e87b3ad738768a634aa00
10,275
py
Python
redis_simple_cache/test_rediscache.py
tru-software/redis-simple-cache
6480b38aa5efc022d91cfb87b168e75c03be181a
[ "BSD-3-Clause" ]
null
null
null
redis_simple_cache/test_rediscache.py
tru-software/redis-simple-cache
6480b38aa5efc022d91cfb87b168e75c03be181a
[ "BSD-3-Clause" ]
null
null
null
redis_simple_cache/test_rediscache.py
tru-software/redis-simple-cache
6480b38aa5efc022d91cfb87b168e75c03be181a
[ "BSD-3-Clause" ]
null
null
null
# SimpleCache Tests # ~~~~~~~~~~~~~~~~~~~ from datetime import timedelta from rediscache import SimpleCache, RedisConnect, cache_it, cache_it_json, CacheMissException, ExpiredKeyException, \ DoNotCache from unittest import TestCase, main import time class ComplexNumber(object): # used in pickle test def __in...
33.252427
117
0.588808
from datetime import timedelta from rediscache import SimpleCache, RedisConnect, cache_it, cache_it_json, CacheMissException, ExpiredKeyException, \ DoNotCache from unittest import TestCase, main import time class ComplexNumber(object): def __init__(self, real, imag): self.real = real self.im...
true
true
f7182cf422c1ce203e5951c6e5cd92b91dbb91ce
4,237
py
Python
chatbot_env/Lib/site-packages/nltk/test/unit/lm/test_counter.py
rakmakan/Chatbot
d04bc1526b56961a16c25148d9ef18c4f157e9c4
[ "MIT" ]
10
2021-05-31T07:18:08.000Z
2022-03-19T09:20:11.000Z
chatbot_env/Lib/site-packages/nltk/test/unit/lm/test_counter.py
rakmakan/Chatbot
d04bc1526b56961a16c25148d9ef18c4f157e9c4
[ "MIT" ]
37
2020-10-20T08:30:53.000Z
2020-12-22T13:15:45.000Z
chatbot_env/Lib/site-packages/nltk/test/unit/lm/test_counter.py
rakmakan/Chatbot
d04bc1526b56961a16c25148d9ef18c4f157e9c4
[ "MIT" ]
7
2015-09-30T03:00:44.000Z
2021-06-04T05:34:39.000Z
# Natural Language Toolkit: Language Model Unit Tests # # Copyright (C) 2001-2020 NLTK Project # Author: Ilia Kurenkov <ilia.kurenkov@gmail.com> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT import unittest from nltk import FreqDist from nltk.lm import NgramCounter from nltk.util import everygr...
31.857143
83
0.626623
import unittest from nltk import FreqDist from nltk.lm import NgramCounter from nltk.util import everygrams class NgramCounterTests(unittest.TestCase): @classmethod def setUpClass(cls): text = [list("abcd"), list("egdbe")] cls.trigram_counter = NgramCounter( (everygrams(sent, m...
true
true
f7182d31dac31bfb93476460c912fb64e81d7691
15,236
py
Python
ambari-server/target/classes/common-services/KAFKA/0.8.1.2.2/package/scripts/params.py
willwill1101/ambari
3bed8e0abd0b6f60f15ffd4fa0035b5a57cf81e1
[ "Apache-2.0", "MIT" ]
3
2016-12-01T15:55:11.000Z
2016-12-01T15:56:38.000Z
ambari-server/target/classes/common-services/KAFKA/0.8.1.2.2/package/scripts/params.py
willwill1101/ambari
3bed8e0abd0b6f60f15ffd4fa0035b5a57cf81e1
[ "Apache-2.0", "MIT" ]
null
null
null
ambari-server/target/classes/common-services/KAFKA/0.8.1.2.2/package/scripts/params.py
willwill1101/ambari
3bed8e0abd0b6f60f15ffd4fa0035b5a57cf81e1
[ "Apache-2.0", "MIT" ]
null
null
null
#!/usr/bin/env python """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License");...
52.537931
185
0.774416
from resource_management.libraries.functions import format from resource_management.libraries.script.script import Script from resource_management.libraries.functions.version import format_hdp_stack_version, compare_versions from resource_management.libraries.functions.default import default from utils import get_bare_...
true
true
f7182d6adde17e18d0bef7bffd4aa49b2b45e58d
22,427
py
Python
sdk/python/pulumi_azure_native/storagesync/v20190601/registered_server.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/storagesync/v20190601/registered_server.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/storagesync/v20190601/registered_server.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 __...
43.295367
1,633
0.661925
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities __all__ = ['RegisteredServerArgs', 'RegisteredServer'] @pulumi.input_type class RegisteredServerArgs: def __init__(__self__, *, resource_group_name:...
true
true