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
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f740698a01dac54de2a3710be2e5c1b391811088
188,336
py
Python
autotest/ogr/ogr_shape.py
praiskup/gdal
abddfb4c4debbb37da239029f4e6d120c533eca7
[ "MIT" ]
null
null
null
autotest/ogr/ogr_shape.py
praiskup/gdal
abddfb4c4debbb37da239029f4e6d120c533eca7
[ "MIT" ]
null
null
null
autotest/ogr/ogr_shape.py
praiskup/gdal
abddfb4c4debbb37da239029f4e6d120c533eca7
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # $Id$ # # Project: GDAL/OGR Test Suite # Purpose: Shapefile driver testing. # Author: Frank Warmerdam <warmerdam@pobox.com> # ###############################################################...
33.721755
3,679
0.600607
0365.0 4765015.5,480389.6875 4764950.0,480133.96875 4764856.5,480080.28125 4764979.5,480082.96875 4765049.5,480088.8125 4765139.5,480059.90625 4765239.5,480019.71875 4765319.5,479980.21875 4765409.5,479909.875 4765370.0,479859.875 4765270.0,479819.84375 4765180.5))' if ogrtest.check_feature_geometry(feat, wkt, ...
true
true
f7406ad4f0a3c43b6f488aebe7fcaed0be7de152
109
py
Python
app.py
gigq/flasktodo
0175ead27abd934ba88b20b0238cb27ea82ab816
[ "MIT" ]
12
2015-01-30T08:47:10.000Z
2021-09-30T11:41:05.000Z
app.py
spacecode-live/flasktodo
0175ead27abd934ba88b20b0238cb27ea82ab816
[ "MIT" ]
null
null
null
app.py
spacecode-live/flasktodo
0175ead27abd934ba88b20b0238cb27ea82ab816
[ "MIT" ]
10
2015-03-16T16:25:37.000Z
2020-10-18T17:43:18.000Z
#!/usr/bin/python from wsgiref.handlers import CGIHandler from application import app CGIHandler().run(app)
18.166667
39
0.798165
from wsgiref.handlers import CGIHandler from application import app CGIHandler().run(app)
true
true
f7406ad847deceec4516d2748311f6ff21431547
4,658
py
Python
GANs/WGANGP_Gulrajani_et_al_2017/driver.py
gonzrubio/ML_Papers
562f85c81b0afb8771708ff31063f722d838b9d2
[ "MIT" ]
6
2021-11-05T05:09:22.000Z
2022-03-10T03:32:30.000Z
GANs/WGANGP_Gulrajani_et_al_2017/driver.py
gonzrubio/ML_Papers
562f85c81b0afb8771708ff31063f722d838b9d2
[ "MIT" ]
null
null
null
GANs/WGANGP_Gulrajani_et_al_2017/driver.py
gonzrubio/ML_Papers
562f85c81b0afb8771708ff31063f722d838b9d2
[ "MIT" ]
1
2021-11-05T05:09:26.000Z
2021-11-05T05:09:26.000Z
"""Improved Training of Wasserstein GANs. Papers: https://arxiv.org/abs/1701.07875 https://arxiv.org/abs/1704.00028 Created on Tue Oct 26 15:17:08 2021 @author: gonzo """ import torch import torch.nn as nn import torch.optim as optim from torch.optim.lr_scheduler import CosineAnnealingLR from torch.utils...
30.644737
80
0.603907
import torch import torch.nn as nn import torch.optim as optim from torch.optim.lr_scheduler import CosineAnnealingLR from torch.utils.data import DataLoader, ConcatDataset from torch.utils.tensorboard import SummaryWriter from torchvision import transforms, datasets from torchvision.utils import make_grid from m...
true
true
f7406af353380d664b2a7909073c44bc985e150e
570
py
Python
tests/classifiers/test_amino_acid_delins.py
cancervariants/variant-normalization
e89a9f8366a659c82b2042aeb7effe339851bfb4
[ "MIT" ]
1
2022-01-19T18:17:49.000Z
2022-01-19T18:17:49.000Z
tests/classifiers/test_amino_acid_delins.py
cancervariants/variation-normalization
9c8fbab1562591ae9445d82ddd15df29f1ea1f5a
[ "MIT" ]
99
2021-06-07T12:50:34.000Z
2022-03-23T13:38:29.000Z
tests/classifiers/test_amino_acid_delins.py
cancervariants/variant-normalization
e89a9f8366a659c82b2042aeb7effe339851bfb4
[ "MIT" ]
null
null
null
"""Module for testing Amino Acid DelIns Classifier.""" import unittest from variation.classifiers import AminoAcidDelInsClassifier from .classifier_base import ClassifierBase class TestAminoAcidDelInsClassifier(ClassifierBase, unittest.TestCase): """A class to test the Amino Acid DelIns Classifier.""" def cl...
33.529412
71
0.759649
import unittest from variation.classifiers import AminoAcidDelInsClassifier from .classifier_base import ClassifierBase class TestAminoAcidDelInsClassifier(ClassifierBase, unittest.TestCase): def classifier_instance(self): return AminoAcidDelInsClassifier() def fixture_name(self): return 'am...
true
true
f7406d7decb2976099c01c0227278cc83acfacf1
1,657
py
Python
leetcode/valid_word_abbr.py
CarlosUrteaga/training_questions
292bd97fb8cccd21f4595565ee85de57d509c9d3
[ "MIT" ]
null
null
null
leetcode/valid_word_abbr.py
CarlosUrteaga/training_questions
292bd97fb8cccd21f4595565ee85de57d509c9d3
[ "MIT" ]
null
null
null
leetcode/valid_word_abbr.py
CarlosUrteaga/training_questions
292bd97fb8cccd21f4595565ee85de57d509c9d3
[ "MIT" ]
null
null
null
""" cant start a number with 0 we can have multiple characters without numbers iterate over each element on abbr always compare current i with the string if they are not equal we have a number, word[i] == abr[i] convert the string to number and find if the value i position exist is the same """ class Solution: de...
24.014493
79
0.442366
class Solution: def validWordAbbreviation(self, word: str, abbr: str) -> bool: idx = 0 carry = 0 alone = True for i in range(0, len(abbr)): if abbr[i].isdigit(): if abbr[i]=='0' and alone : return False else: ...
true
true
f7406debf0cebf0f29bb05a930668707e45c961e
61,109
py
Python
typings/bl_ui/properties_texture.py
Argmaster/PyR3
6786bcb6a101fe4bd4cc50fe43767b8178504b15
[ "MIT" ]
2
2021-12-12T18:51:52.000Z
2022-02-23T09:49:16.000Z
src/blender/blender_autocomplete-master/2.92/bl_ui/properties_texture.py
JonasWard/ClayAdventures
a716445ac690e4792e70658319aa1d5299f9c9e9
[ "MIT" ]
2
2021-11-08T12:09:02.000Z
2021-12-12T23:01:12.000Z
typings/bl_ui/properties_texture.py
Argmaster/PyR3
6786bcb6a101fe4bd4cc50fe43767b8178504b15
[ "MIT" ]
null
null
null
import sys import typing import bpy_types import rna_prop_ui class TEXTURE_MT_context_menu(bpy_types.Menu, bpy_types._GenericUI): COMPAT_ENGINES = None ''' ''' bl_label = None ''' ''' bl_rna = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ...
12.219356
79
0.38068
import sys import typing import bpy_types import rna_prop_ui class TEXTURE_MT_context_menu(bpy_types.Menu, bpy_types._GenericUI): COMPAT_ENGINES = None bl_label = None bl_rna = None id_data = None def append(self, draw_func): pass def as_pointer(self): pass def bl_rna...
true
true
f7406dedbb6f316b4914754696e5aa5f3021e930
147
py
Python
python/testData/inspections/PyUnresolvedReferencesInspection/contextManagerSubclass.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/inspections/PyUnresolvedReferencesInspection/contextManagerSubclass.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/inspections/PyUnresolvedReferencesInspection/contextManagerSubclass.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
class C(object): def __enter__(self): return self class D(C): def foo(self): pass with D() as cm: cm.foo() # pass
11.307692
24
0.52381
class C(object): def __enter__(self): return self class D(C): def foo(self): pass with D() as cm: cm.foo()
true
true
f74072a4b5989c7688aeaa3e82475874494d7e5d
8,710
py
Python
src/python/pants/init/logging.py
jsirois/pants
82199113869ddaa93ba1d115ff581c012ebcc93d
[ "Apache-2.0" ]
null
null
null
src/python/pants/init/logging.py
jsirois/pants
82199113869ddaa93ba1d115ff581c012ebcc93d
[ "Apache-2.0" ]
null
null
null
src/python/pants/init/logging.py
jsirois/pants
82199113869ddaa93ba1d115ff581c012ebcc93d
[ "Apache-2.0" ]
1
2021-08-01T05:43:34.000Z
2021-08-01T05:43:34.000Z
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import http.client import locale import logging import os import sys from contextlib import contextmanager from io import BufferedReader, TextIOWrapper from logging import Formatter, LogRe...
43.118812
121
0.722503
import http.client import locale import logging import os import sys from contextlib import contextmanager from io import BufferedReader, TextIOWrapper from logging import Formatter, LogRecord, StreamHandler from typing import Dict, Iterator import pants.util.logging as pants_logging from pants.base.deprecated impo...
true
true
f740730e1b7741e78a0dc8ce039764fe9cbbd668
2,433
py
Python
calh/cli.py
ricky-lim/calh
27185862b93cec92c9a5af4705aadea47b7a15d1
[ "Apache-2.0" ]
2
2020-05-05T20:12:26.000Z
2021-08-19T20:25:46.000Z
calh/cli.py
ricky-lim/calh
27185862b93cec92c9a5af4705aadea47b7a15d1
[ "Apache-2.0" ]
6
2020-04-11T04:59:28.000Z
2020-05-03T06:17:25.000Z
calh/cli.py
ricky-lim/calh
27185862b93cec92c9a5af4705aadea47b7a15d1
[ "Apache-2.0" ]
null
null
null
"""Console script for calh.""" import sys import click import click_spinner @click.group(invoke_without_command=True) @click.option("-v", "--version", is_flag=True, default=False) def cli(version): if version: import calh click.echo(f"Version: {calh.__version__}") @cli.command() @click.option(...
29.670732
84
0.658035
import sys import click import click_spinner @click.group(invoke_without_command=True) @click.option("-v", "--version", is_flag=True, default=False) def cli(version): if version: import calh click.echo(f"Version: {calh.__version__}") @cli.command() @click.option( "--input-file", required=T...
true
true
f74073c0d3ae07280f3b94844447ef655e24ba97
17,155
py
Python
ax/modelbridge/factory.py
KireinaHoro/Ax
e044c3a1b3cfc9228743cf7acbc5798c528a6494
[ "MIT" ]
1
2021-11-18T07:18:46.000Z
2021-11-18T07:18:46.000Z
ax/modelbridge/factory.py
michaeldeyzel/Ax
16cb868911eecba323759e2e129df8833361e614
[ "MIT" ]
null
null
null
ax/modelbridge/factory.py
michaeldeyzel/Ax
16cb868911eecba323759e2e129df8833361e614
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from logging import Logger from typing import Any, Dict, List, Optional, Type import torch from ax.core.data import Da...
35.371134
88
0.680268
from logging import Logger from typing import Any, Dict, List, Optional, Type import torch from ax.core.data import Data from ax.core.experiment import Experiment from ax.core.multi_type_experiment import MultiTypeExperiment from ax.core.objective import MultiObjective from ax.core.observation import Observation...
true
true
f740749ef03e9e8a600a6c215590eed198169133
7,902
py
Python
python/GafferUI/PythonEditor.py
ACFX/gaffer
4519dbfa2beb09d724eeb0b6d3d76dc4c1326cca
[ "BSD-3-Clause" ]
31
2017-07-10T10:02:07.000Z
2022-02-08T13:54:14.000Z
python/GafferUI/PythonEditor.py
ACFX/gaffer
4519dbfa2beb09d724eeb0b6d3d76dc4c1326cca
[ "BSD-3-Clause" ]
null
null
null
python/GafferUI/PythonEditor.py
ACFX/gaffer
4519dbfa2beb09d724eeb0b6d3d76dc4c1326cca
[ "BSD-3-Clause" ]
3
2017-11-04T15:30:11.000Z
2018-09-25T18:36:11.000Z
########################################################################## # # Copyright (c) 2011-2012, John Haddon. All rights reserved. # Copyright (c) 2011-2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted prov...
36.082192
141
0.692989
true
true
f74075cb1859064dee3e819231c7acbb3bc257f6
52,772
py
Python
FINE/storage.py
maximilian-hoffmann/FINE
62828f5feefefc2208dde0133435979d63398cc1
[ "MIT" ]
null
null
null
FINE/storage.py
maximilian-hoffmann/FINE
62828f5feefefc2208dde0133435979d63398cc1
[ "MIT" ]
null
null
null
FINE/storage.py
maximilian-hoffmann/FINE
62828f5feefefc2208dde0133435979d63398cc1
[ "MIT" ]
null
null
null
from FINE.component import Component, ComponentModel from FINE import utils import pyomo.environ as pyomo import warnings import pandas as pd class Storage(Component): """ A Storage component can store a commodity and thus transfers it between time steps. """ def __init__(self, esM, name, commodity, c...
63.580723
120
0.640207
from FINE.component import Component, ComponentModel from FINE import utils import pyomo.environ as pyomo import warnings import pandas as pd class Storage(Component): def __init__(self, esM, name, commodity, chargeRate=1, dischargeRate=1, chargeEfficiency=1, dischargeEfficiency=1, selfDischarge=...
true
true
f7407641c3ffb75d0425bbf6147b786de1cd376f
3,308
py
Python
src/transformers/data/processors/xnli.py
WERimagin/transformers
cc7d14511c647f8147494df72f8b0575015e37ab
[ "Apache-2.0" ]
47
2021-04-16T22:29:25.000Z
2022-02-11T08:19:13.000Z
src/transformers/data/processors/xnli.py
WERimagin/transformers
cc7d14511c647f8147494df72f8b0575015e37ab
[ "Apache-2.0" ]
15
2021-03-16T08:13:25.000Z
2022-02-01T12:22:33.000Z
src/transformers/data/processors/xnli.py
WERimagin/transformers
cc7d14511c647f8147494df72f8b0575015e37ab
[ "Apache-2.0" ]
7
2021-08-24T09:50:44.000Z
2022-02-23T13:55:28.000Z
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. 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 cop...
36.755556
128
0.643894
import os from ...utils import logging from .utils import DataProcessor, InputExample logger = logging.get_logger(__name__) class XnliProcessor(DataProcessor): def __init__(self, language, train_language=None): self.language = language self.train_language = train_language ...
true
true
f74077fb34a6bb313375934f4b2c1afe00bd750b
225
py
Python
mpan/generation/mimesis.py
limejump/mpan
143c82331397cd685a195fbeab18dff84fc76264
[ "MIT" ]
2
2021-03-19T09:43:15.000Z
2022-02-10T10:19:25.000Z
mpan/generation/mimesis.py
limejump/mpan
143c82331397cd685a195fbeab18dff84fc76264
[ "MIT" ]
3
2021-02-25T13:56:22.000Z
2022-01-22T00:08:41.000Z
mpan/generation/mimesis.py
limejump/mpan
143c82331397cd685a195fbeab18dff84fc76264
[ "MIT" ]
null
null
null
from mimesis.providers.base import BaseProvider from .helpers import generate class MPANProvider(BaseProvider): class Meta: name = "mpan" @staticmethod def generate() -> str: return generate()
17.307692
47
0.68
from mimesis.providers.base import BaseProvider from .helpers import generate class MPANProvider(BaseProvider): class Meta: name = "mpan" @staticmethod def generate() -> str: return generate()
true
true
f7407874a9970f13bb662e91d6a6551da1e3997a
722
py
Python
geo_coding_platform_test/apps/geocoding/utils.py
saduqz/geo-coding-platform-test
011de3a0644fd9c266258b7310c3b25028597306
[ "MIT" ]
null
null
null
geo_coding_platform_test/apps/geocoding/utils.py
saduqz/geo-coding-platform-test
011de3a0644fd9c266258b7310c3b25028597306
[ "MIT" ]
null
null
null
geo_coding_platform_test/apps/geocoding/utils.py
saduqz/geo-coding-platform-test
011de3a0644fd9c266258b7310c3b25028597306
[ "MIT" ]
null
null
null
import json import urllib.request class GoogleGeocodeAPI: def __init__(self, api_key): self.API_KEY = api_key self.url = "https://maps.googleapis.com/maps/api/geocode/json" def get_geocode(self, latitude, longitude): url = f'{self.url}?latlng={latitude},{longitude}' return sel...
28.88
70
0.65374
import json import urllib.request class GoogleGeocodeAPI: def __init__(self, api_key): self.API_KEY = api_key self.url = "https://maps.googleapis.com/maps/api/geocode/json" def get_geocode(self, latitude, longitude): url = f'{self.url}?latlng={latitude},{longitude}' return sel...
true
true
f740792bd6eff6203188dff3fe1349f4f9ebb2d0
16,961
py
Python
tests/unit/multivariate/test_gaussian.py
yzR1991/Copulas
72c0d9c398f7fe3eb075b56591911fea377cdc33
[ "MIT" ]
null
null
null
tests/unit/multivariate/test_gaussian.py
yzR1991/Copulas
72c0d9c398f7fe3eb075b56591911fea377cdc33
[ "MIT" ]
null
null
null
tests/unit/multivariate/test_gaussian.py
yzR1991/Copulas
72c0d9c398f7fe3eb075b56591911fea377cdc33
[ "MIT" ]
null
null
null
from unittest import TestCase from unittest.mock import Mock, patch import numpy as np import pandas as pd from copulas import get_qualified_name from copulas.multivariate.gaussian import GaussianMultivariate from copulas.univariate import GaussianUnivariate class TestGaussianMultivariate(TestCase): def setUp(...
36.164179
95
0.594364
from unittest import TestCase from unittest.mock import Mock, patch import numpy as np import pandas as pd from copulas import get_qualified_name from copulas.multivariate.gaussian import GaussianMultivariate from copulas.univariate import GaussianUnivariate class TestGaussianMultivariate(TestCase): def setUp(...
true
true
f7407a8837413032f4048a22bb42dd7c40c7fb01
3,873
py
Python
doridori.py
Cheol-H-Jeong/Doridori-Counter
c16da56dbbcccdc24033ddb9435d13506feb8b99
[ "MIT" ]
null
null
null
doridori.py
Cheol-H-Jeong/Doridori-Counter
c16da56dbbcccdc24033ddb9435d13506feb8b99
[ "MIT" ]
null
null
null
doridori.py
Cheol-H-Jeong/Doridori-Counter
c16da56dbbcccdc24033ddb9435d13506feb8b99
[ "MIT" ]
null
null
null
import cv2 import mediapipe as mp import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from scipy.spatial import distance from scipy.signal import find_peaks from celluloid import Camera from tqdm import tqdm class Doridori: def __init__(self,filepath): self.cap = cv...
36.885714
101
0.559773
import cv2 import mediapipe as mp import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from scipy.spatial import distance from scipy.signal import find_peaks from celluloid import Camera from tqdm import tqdm class Doridori: def __init__(self,filepath): self.cap = cv...
true
true
f7407a9f8f1d7dd6a6bff35ff7db27bdb720b0ab
2,794
py
Python
commands/sleep.py
zbylyrcxr/DennisMUD
cb9be389e3be3e267fd78b1520ed2902941742da
[ "MIT" ]
2
2022-02-21T17:55:03.000Z
2022-02-22T06:25:04.000Z
commands/sleep.py
zbylyrcxr/DennisMUD
cb9be389e3be3e267fd78b1520ed2902941742da
[ "MIT" ]
3
2022-02-09T18:18:29.000Z
2022-03-07T08:15:54.000Z
commands/sleep.py
zbylyrcxr/DennisMUD
cb9be389e3be3e267fd78b1520ed2902941742da
[ "MIT" ]
1
2022-03-07T08:10:59.000Z
2022-03-07T08:10:59.000Z
##################### # Dennis MUD # # sit.py # # Copyright 2020 # # Michael D. Reiley # ##################### # ********** # 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 Softwa...
41.701493
108
0.692913
will sleep on that item. Otherwise you will just sleep. You cannot sit down on an item that is in your inventory; it must be in the room. The modification to your description is affected by your pronouns; see `set pronouns`. Ex. `sleep` Ex2. `sleep on carpet`""" def COMMAND(console, args): if not COMMON.ch...
true
true
f7407aa267e2d2df5c2f3777d7f2f91249b5dedc
853
py
Python
tests/__init__.py
b00f/g2p-seq2seq
96c3e36754b9a4571d6416446a24c5eef2171128
[ "Apache-2.0" ]
661
2016-04-27T05:47:54.000Z
2022-03-20T08:42:43.000Z
tests/__init__.py
b00f/g2p-seq2seq
96c3e36754b9a4571d6416446a24c5eef2171128
[ "Apache-2.0" ]
189
2016-04-28T20:10:18.000Z
2021-08-19T02:04:34.000Z
tests/__init__.py
b00f/g2p-seq2seq
96c3e36754b9a4571d6416446a24c5eef2171128
[ "Apache-2.0" ]
219
2016-04-30T23:58:45.000Z
2022-03-09T16:05:37.000Z
# Copyright 2016 AC Technologies 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 required by applicable...
35.541667
80
0.702227
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tests import g2p_unittest
true
true
f7407acaf9ed7addaaf4169ae9bae54ef03583f2
1,383
py
Python
setup.py
ratschlab/spladder
8175c054a9b8fe7ae509f34fe5fb4d90a8cbe151
[ "BSD-3-Clause" ]
96
2015-03-27T01:06:09.000Z
2022-03-20T05:56:54.000Z
setup.py
ratschlab/spladder
8175c054a9b8fe7ae509f34fe5fb4d90a8cbe151
[ "BSD-3-Clause" ]
160
2015-01-20T20:45:48.000Z
2022-03-31T14:48:05.000Z
setup.py
ratschlab/spladder
8175c054a9b8fe7ae509f34fe5fb4d90a8cbe151
[ "BSD-3-Clause" ]
42
2015-03-27T20:49:15.000Z
2021-12-21T12:39:42.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """The setup script.""" from setuptools import setup, find_packages with open('README.md') as readme_file: readme = readme_file.read() setup_requirements = ['pytest-runner'] with open('requirements.txt') as f: requirements = list(f.readlines()) test_requiremen...
27.117647
110
0.65799
from setuptools import setup, find_packages with open('README.md') as readme_file: readme = readme_file.read() setup_requirements = ['pytest-runner'] with open('requirements.txt') as f: requirements = list(f.readlines()) test_requirements = ['pytest'] setup( author="Andre Kahles", author_email=...
true
true
f7407b7d9801b9ffd6250322dc7b75b1b23e563b
817
py
Python
apps/wx_logistics/urls.py
lianxiaopang/camel-store-api
b8021250bf3d8cf7adc566deebdba55225148316
[ "Apache-2.0" ]
12
2020-02-01T01:52:01.000Z
2021-04-28T15:06:43.000Z
apps/wx_logistics/urls.py
lianxiaopang/camel-store-api
b8021250bf3d8cf7adc566deebdba55225148316
[ "Apache-2.0" ]
5
2020-02-06T08:07:58.000Z
2020-06-02T13:03:45.000Z
apps/wx_logistics/urls.py
lianxiaopang/camel-store-api
b8021250bf3d8cf7adc566deebdba55225148316
[ "Apache-2.0" ]
11
2020-02-03T13:07:46.000Z
2020-11-29T01:44:06.000Z
from django.urls import path, include from rest_framework.routers import DefaultRouter from . import views router = DefaultRouter() router.include_root_view = False # 打印员 router.register('printer', views.DeliveryPrinterViewSet) # 账号管理 router.register('account', views.DeliveryAccountViewSet) # 发件人地址管理 router.regist...
24.029412
63
0.72093
from django.urls import path, include from rest_framework.routers import DefaultRouter from . import views router = DefaultRouter() router.include_root_view = False router.register('printer', views.DeliveryPrinterViewSet) router.register('account', views.DeliveryAccountViewSet) router.register('address', views....
true
true
f7407c92309cae3a8a2059d2fa9acb2cd0ef95f3
121
py
Python
blog/admin.py
EHoggard/Price-Comparison-Group2-BE
03175b360fb20f682730cd7b7f3fc80e2696dc00
[ "MIT" ]
null
null
null
blog/admin.py
EHoggard/Price-Comparison-Group2-BE
03175b360fb20f682730cd7b7f3fc80e2696dc00
[ "MIT" ]
26
2019-05-21T13:24:59.000Z
2019-06-13T10:24:29.000Z
blog/admin.py
EHoggard/Price-Comparison-Group2-BE
03175b360fb20f682730cd7b7f3fc80e2696dc00
[ "MIT" ]
2
2019-05-21T12:55:23.000Z
2019-05-21T14:31:14.000Z
from django.contrib import admin from .models import Comment # Register your models here. admin.site.register(Comment)
17.285714
32
0.801653
from django.contrib import admin from .models import Comment admin.site.register(Comment)
true
true
f7407ca4a495924fb0524d25592e375c90c4ca39
7,621
py
Python
ACO/ACO.py
MobTgZhang/CIAlgorithms
3aa1b249f526d75fb8e9bf7f37516f18a025d50a
[ "MIT" ]
null
null
null
ACO/ACO.py
MobTgZhang/CIAlgorithms
3aa1b249f526d75fb8e9bf7f37516f18a025d50a
[ "MIT" ]
null
null
null
ACO/ACO.py
MobTgZhang/CIAlgorithms
3aa1b249f526d75fb8e9bf7f37516f18a025d50a
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt import urllib.request import os import time def download(root_path,filename): if not os.path.exists(root_path): os.mkdir(root_path) if not os.path.exists(os.path.join(root_path,filename)): url = "http://elib.zib.de/pub/mp-testdata/tsp/tsplib/ts...
41.873626
108
0.556882
import numpy as np import matplotlib.pyplot as plt import urllib.request import os import time def download(root_path,filename): if not os.path.exists(root_path): os.mkdir(root_path) if not os.path.exists(os.path.join(root_path,filename)): url = "http://elib.zib.de/pub/mp-testdata/tsp/tsplib/ts...
true
true
f7407cce732581271d667580a3306ff8cf89c233
11,304
py
Python
src/torchphysics/utils/user_fun.py
uwe-iben/torchphysics
f0a56539cff331d49caaa90bc2fdd0d238b298f8
[ "Apache-2.0" ]
203
2021-11-10T10:33:29.000Z
2022-03-26T09:05:12.000Z
src/torchphysics/utils/user_fun.py
DKreuter/torchphysics
775d9aca71752a568f1fca972c958b99107f3b7c
[ "Apache-2.0" ]
3
2022-01-07T19:57:00.000Z
2022-03-10T08:04:49.000Z
src/torchphysics/utils/user_fun.py
DKreuter/torchphysics
775d9aca71752a568f1fca972c958b99107f3b7c
[ "Apache-2.0" ]
16
2021-09-30T08:35:37.000Z
2022-03-16T13:12:22.000Z
"""Contains a class which extracts the needed arguments of an arbitrary methode/function and wraps them for future usage. E.g correctly choosing the needed arguments and passing them on to the original function. """ import inspect import copy import torch from ..problem.spaces.points import Points class UserFunct...
36.115016
93
0.589791
import inspect import copy import torch from ..problem.spaces.points import Points class UserFunction: def __init__(self, fun, defaults={}, args={}): if isinstance(fun, (UserFunction, DomainUserFunction)): self.fun = fun.fun self.defaults = fun.defaults self.args = fu...
true
true
f7407d9960c1c58fdbeb6883ead3f6fad4d5bb00
581
py
Python
setup.py
Zenrac/monstercatFM.py
c1d21b6ce16f0c7b46731eebb5a80d16fbd111fe
[ "MIT" ]
null
null
null
setup.py
Zenrac/monstercatFM.py
c1d21b6ce16f0c7b46731eebb5a80d16fbd111fe
[ "MIT" ]
1
2019-02-14T22:17:22.000Z
2019-02-14T22:17:22.000Z
setup.py
Zenrac/monstercatFM
c1d21b6ce16f0c7b46731eebb5a80d16fbd111fe
[ "MIT" ]
null
null
null
from setuptools import setup setup( name='monstercatFM', packages=['monstercatFM'], version='v1.1.3', description='Unofficial shitty API wrapper to get information about the monstercat live stream', author='Zenrac', author_email='zenrac@outlook.fr', url='https://github.com/Zenrac/m...
36.3125
101
0.695353
from setuptools import setup setup( name='monstercatFM', packages=['monstercatFM'], version='v1.1.3', description='Unofficial shitty API wrapper to get information about the monstercat live stream', author='Zenrac', author_email='zenrac@outlook.fr', url='https://github.com/Zenrac/m...
true
true
f7407ddb71bd44b58b7c76a0de4badca6a016750
5,031
py
Python
src/297.serialize-and-deserialize-binary-tree.py
wisesky/LeetCode-Practice
65549f72c565d9f11641c86d6cef9c7988805817
[ "MIT" ]
null
null
null
src/297.serialize-and-deserialize-binary-tree.py
wisesky/LeetCode-Practice
65549f72c565d9f11641c86d6cef9c7988805817
[ "MIT" ]
null
null
null
src/297.serialize-and-deserialize-binary-tree.py
wisesky/LeetCode-Practice
65549f72c565d9f11641c86d6cef9c7988805817
[ "MIT" ]
null
null
null
# # @lc app=leetcode id=297 lang=python3 # # [297] Serialize and Deserialize Binary Tree # # https://leetcode.com/problems/serialize-and-deserialize-binary-tree/description/ # # algorithms # Hard (51.39%) # Likes: 4821 # Dislikes: 214 # Total Accepted: 480.7K # Total Submissions: 935.3K # Testcase Example: '[1,2...
26.203125
115
0.61777
class TreeNode(object): def __init__(self, x) -> None: self.val = x self.left = None self.right = None class Codec: def serialize(self, root): inOrder = self.inOrder(root) preOrder = self.preOrder...
true
true
f7407e387908383b4ac4b2a5c54c8bfbdfb1be5a
6,046
py
Python
ding/interaction/tests/base/test_network.py
sailxjx/DI-engine
c6763f8e2ba885a2a02f611195a1b5f8b50bff00
[ "Apache-2.0" ]
464
2021-07-08T07:26:33.000Z
2022-03-31T12:35:16.000Z
ding/interaction/tests/base/test_network.py
sailxjx/DI-engine
c6763f8e2ba885a2a02f611195a1b5f8b50bff00
[ "Apache-2.0" ]
177
2021-07-09T08:22:55.000Z
2022-03-31T07:35:22.000Z
ding/interaction/tests/base/test_network.py
sailxjx/DI-engine
c6763f8e2ba885a2a02f611195a1b5f8b50bff00
[ "Apache-2.0" ]
92
2021-07-08T12:16:37.000Z
2022-03-31T09:24:41.000Z
import json import time from contextlib import contextmanager from multiprocessing import Process import pytest import requests import responses from flask import Flask, request from requests import HTTPError from urlobject import URLObject from ..test_utils import silence from ...base import get_host_ip, success_res...
35.151163
114
0.576083
import json import time from contextlib import contextmanager from multiprocessing import Process import pytest import requests import responses from flask import Flask, request from requests import HTTPError from urlobject import URLObject from ..test_utils import silence from ...base import get_host_ip, success_res...
true
true
f7407e7c10ebdcbe4698f73720e95ff4d41abe49
256
py
Python
setup.py
Gokul-S-Kumar/child_health_casestudy
cd2e0bb03c2544b85c73e64d5b0ebe97ca688175
[ "BSD-3-Clause" ]
null
null
null
setup.py
Gokul-S-Kumar/child_health_casestudy
cd2e0bb03c2544b85c73e64d5b0ebe97ca688175
[ "BSD-3-Clause" ]
null
null
null
setup.py
Gokul-S-Kumar/child_health_casestudy
cd2e0bb03c2544b85c73e64d5b0ebe97ca688175
[ "BSD-3-Clause" ]
null
null
null
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='Repo containing codefiles developed for the case-study.', author='Gokul S Kumar, IIDS, ISB', license='BSD-3', )
23.272727
74
0.679688
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='Repo containing codefiles developed for the case-study.', author='Gokul S Kumar, IIDS, ISB', license='BSD-3', )
true
true
f7407ed62fa0d435d3371186dca1b2ec5f0e31db
1,158
py
Python
tutorial/examples/dashbio_components/speck.py
grofte/dash-docs
cbaa6b186652f2b869e16182152fb0f7109c2c6c
[ "MIT" ]
null
null
null
tutorial/examples/dashbio_components/speck.py
grofte/dash-docs
cbaa6b186652f2b869e16182152fb0f7109c2c6c
[ "MIT" ]
null
null
null
tutorial/examples/dashbio_components/speck.py
grofte/dash-docs
cbaa6b186652f2b869e16182152fb0f7109c2c6c
[ "MIT" ]
null
null
null
import six.moves.urllib.request as urlreq from six import PY3 import dash import dash_bio as dashbio import dash_html_components as html import dash_core_components as dcc from dash_bio_utils import xyz_reader external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css'] app = dash.Dash(__name__, external_st...
23.16
76
0.674439
import six.moves.urllib.request as urlreq from six import PY3 import dash import dash_bio as dashbio import dash_html_components as html import dash_core_components as dcc from dash_bio_utils import xyz_reader external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css'] app = dash.Dash(__name__, external_st...
true
true
f7407eed7f1c74c7130f9b9e9f63df2c44973047
2,133
py
Python
google/cloud/security/stubs.py
joshiumang107/forseti-security
c088e677426ec60daae0e44a5d1acbb337386ddb
[ "Apache-2.0" ]
null
null
null
google/cloud/security/stubs.py
joshiumang107/forseti-security
c088e677426ec60daae0e44a5d1acbb337386ddb
[ "Apache-2.0" ]
null
null
null
google/cloud/security/stubs.py
joshiumang107/forseti-security
c088e677426ec60daae0e44a5d1acbb337386ddb
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The Forseti Security Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
37.421053
90
0.78106
from google.apputils import run_script_module def RunForsetiInventory(): import google.cloud.security.inventory.inventory_loader as forseti_inventory run_script_module.RunScriptModule(forseti_inventory) def RunForsetiScanner(): import google.cloud.security.scanner.scanner as forseti_scann...
true
true
f740804cec2b95d85179c45985c800700bbbe8d5
6,432
py
Python
safelifeEnv/lib/python3.6/site-packages/pyglet/libs/win32/winkey.py
JohnBurden/safelife
338c9c42aa94fed49f6d80151c37dd28ba6f7978
[ "Apache-2.0" ]
2
2019-07-17T13:00:32.000Z
2019-07-17T13:09:30.000Z
safelifeEnv/lib/python3.6/site-packages/pyglet/libs/win32/winkey.py
JohnBurden/safelife
338c9c42aa94fed49f6d80151c37dd28ba6f7978
[ "Apache-2.0" ]
null
null
null
safelifeEnv/lib/python3.6/site-packages/pyglet/libs/win32/winkey.py
JohnBurden/safelife
338c9c42aa94fed49f6d80151c37dd28ba6f7978
[ "Apache-2.0" ]
null
null
null
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # Copyright (c) 2008-2019 pyglet contributors # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the follo...
26.8
78
0.581312
from __future__ import absolute_import __docformat__ = 'restructuredtext' __version__ = '$Id: $' from pyglet.window import key from .constants import * keymap = { ord('A'): key.A, ord('B'): key.B, ord('C'): key.C, ord('D'): key.D, ord('E'): key.E, ord('F'): ...
true
true
f740820decc2d41424a66c34cf2a2b5b709c1a24
830
py
Python
db.py
TheWebRage/Blog-Flask
ee1242154360afe9b299361891f9991346f24ab7
[ "MIT" ]
null
null
null
db.py
TheWebRage/Blog-Flask
ee1242154360afe9b299361891f9991346f24ab7
[ "MIT" ]
null
null
null
db.py
TheWebRage/Blog-Flask
ee1242154360afe9b299361891f9991346f24ab7
[ "MIT" ]
null
null
null
import sqlite3 import click from flask import current_app, g from flask.cli import with_appcontext def get_db(): if 'db' not in g: g.db = sqlite3.connect( 'database.db', detect_types=sqlite3.PARSE_DECLTYPES ) g.db.row_factory = sqlite3.Row return g.db def cl...
18.863636
56
0.645783
import sqlite3 import click from flask import current_app, g from flask.cli import with_appcontext def get_db(): if 'db' not in g: g.db = sqlite3.connect( 'database.db', detect_types=sqlite3.PARSE_DECLTYPES ) g.db.row_factory = sqlite3.Row return g.db def cl...
true
true
f7408242a2894fa43ae0e3ec4be11c764544f7df
326
py
Python
setting.py
lyddonb/gae-Checkbook
259b7a8b6558c20341a7b7331266b5afd76c0ef2
[ "Apache-2.0" ]
4
2019-05-20T13:15:28.000Z
2019-05-23T04:49:46.000Z
setting.py
lyddonb/gae-Checkbook
259b7a8b6558c20341a7b7331266b5afd76c0ef2
[ "Apache-2.0" ]
null
null
null
setting.py
lyddonb/gae-Checkbook
259b7a8b6558c20341a7b7331266b5afd76c0ef2
[ "Apache-2.0" ]
null
null
null
import logging import os import sys # Add lib to path. libs_dir = os.path.join(os.path.dirname(__file__), 'lib') if libs_dir not in sys.path: logging.debug('Adding lib to path.') sys.path.insert(0, libs_dir) import webapp2 url_map = [ ('.*/mybook', 'mybook.MainPage'), ] app = webapp2.WSGIApplication(ur...
18.111111
57
0.696319
import logging import os import sys libs_dir = os.path.join(os.path.dirname(__file__), 'lib') if libs_dir not in sys.path: logging.debug('Adding lib to path.') sys.path.insert(0, libs_dir) import webapp2 url_map = [ ('.*/mybook', 'mybook.MainPage'), ] app = webapp2.WSGIApplication(url_map)
true
true
f7408384e37d48745e377b46d0aae98f242b6bd2
1,133
py
Python
topaz/objects/bindingobject.py
ruby-compiler-survey/topaz
bf4a56adbe03ae9ab4984729c733fcbc64a164c4
[ "BSD-3-Clause" ]
241
2015-01-02T18:49:09.000Z
2022-03-15T15:08:45.000Z
topaz/objects/bindingobject.py
ruby-compiler-survey/topaz
bf4a56adbe03ae9ab4984729c733fcbc64a164c4
[ "BSD-3-Clause" ]
16
2015-05-04T21:31:08.000Z
2020-06-04T22:49:36.000Z
topaz/objects/bindingobject.py
ruby-compiler-survey/topaz
bf4a56adbe03ae9ab4984729c733fcbc64a164c4
[ "BSD-3-Clause" ]
24
2015-02-15T05:35:11.000Z
2022-03-22T13:29:04.000Z
from topaz.astcompiler import SymbolTable from topaz.module import ClassDef from topaz.objects.objectobject import W_Object class W_BindingObject(W_Object): classdef = ClassDef("Binding", W_Object.classdef) _immutable_fields_ = ["names[*]", "cells[*]", "w_self", "lexical_scope"] def __init__(self, space,...
37.766667
92
0.676081
from topaz.astcompiler import SymbolTable from topaz.module import ClassDef from topaz.objects.objectobject import W_Object class W_BindingObject(W_Object): classdef = ClassDef("Binding", W_Object.classdef) _immutable_fields_ = ["names[*]", "cells[*]", "w_self", "lexical_scope"] def __init__(self, space,...
true
true
f7408435676386b4846162d71344e472df6a3faf
2,625
py
Python
test/cmd/unix/test_cmd_uptime.py
carr-elagheb/moler
b896ff668d9cc3704b6f806f7c2bf6e76c13427d
[ "BSD-3-Clause" ]
null
null
null
test/cmd/unix/test_cmd_uptime.py
carr-elagheb/moler
b896ff668d9cc3704b6f806f7c2bf6e76c13427d
[ "BSD-3-Clause" ]
null
null
null
test/cmd/unix/test_cmd_uptime.py
carr-elagheb/moler
b896ff668d9cc3704b6f806f7c2bf6e76c13427d
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Testing of uptime command. """ __author__ = 'Marcin Usielski' __copyright__ = 'Copyright (C) 2018-2019, Nokia' __email__ = 'marcin.usielski@nokia.com' import pytest from moler.exceptions import CommandFailure from moler.exceptions import CommandTimeout def test_calling_uptime_returns_resu...
31.626506
102
0.743619
__author__ = 'Marcin Usielski' __copyright__ = 'Copyright (C) 2018-2019, Nokia' __email__ = 'marcin.usielski@nokia.com' import pytest from moler.exceptions import CommandFailure from moler.exceptions import CommandTimeout def test_calling_uptime_returns_result_parsed_from_command_output(buffer_connection, ...
true
true
f7408450d71ea02d8f22f8a56dd4c164c2b31432
5,104
py
Python
fn/monad.py
bofm/fn.py
9ad18489256c6af82980879b3072cf49bf0cc0fd
[ "Apache-2.0" ]
120
2016-03-18T14:14:04.000Z
2022-01-20T19:24:20.000Z
fn/monad.py
bofm/fn.py
9ad18489256c6af82980879b3072cf49bf0cc0fd
[ "Apache-2.0" ]
36
2016-03-18T15:12:41.000Z
2020-08-05T12:19:18.000Z
fn/monad.py
bofm/fn.py
9ad18489256c6af82980879b3072cf49bf0cc0fd
[ "Apache-2.0" ]
24
2016-03-18T15:09:37.000Z
2022-01-03T05:11:56.000Z
""" ``fn.monad.Option`` represents optional values, each instance of ``Option`` can be either instance of ``Full`` or ``Empty``. It provides you with simple way to write long computation sequences and get rid of many ``if/else`` blocks. See usage examples below. Assume that you have ``Request`` class that gives you pa...
26.174359
77
0.612265
from functools import partial, wraps from operator import eq, is_not class Option(object): def __new__(tp, value, checker=partial(is_not, None)): if isinstance(value, Option): return value return Full(value) if checker(value) else Empty() @staticmethod...
true
true
f740845c91894d8f0fba2197cb6b676f4fbf863d
80,991
py
Python
src/olympia/reviewers/tests/test_models.py
covariant/addons-server
41e6ee9e426facb19a1e1ca8d40277cb6f94a7da
[ "BSD-3-Clause" ]
843
2016-02-09T13:00:37.000Z
2022-03-20T19:17:06.000Z
src/olympia/reviewers/tests/test_models.py
covariant/addons-server
41e6ee9e426facb19a1e1ca8d40277cb6f94a7da
[ "BSD-3-Clause" ]
10,187
2016-02-05T23:51:05.000Z
2022-03-31T15:24:44.000Z
src/olympia/reviewers/tests/test_models.py
covariant/addons-server
41e6ee9e426facb19a1e1ca8d40277cb6f94a7da
[ "BSD-3-Clause" ]
551
2016-02-08T20:32:16.000Z
2022-03-15T16:49:24.000Z
import json import time from datetime import datetime, timedelta from unittest import mock from django.conf import settings from django.core import mail from olympia import amo from olympia.abuse.models import AbuseReport from olympia.access.models import Group, GroupUser from olympia.addons.models import AddonApprova...
39.546387
88
0.642899
import json import time from datetime import datetime, timedelta from unittest import mock from django.conf import settings from django.core import mail from olympia import amo from olympia.abuse.models import AbuseReport from olympia.access.models import Group, GroupUser from olympia.addons.models import AddonApprova...
true
true
f7408517f5f0c90d6e8d3f71ff7855266f5fb221
17,727
py
Python
pw_console/py/log_view_test.py
octml/pigweed
e273d46024ef7b5a7c7ec584e4aaada41c541fc4
[ "Apache-2.0" ]
86
2021-03-09T23:49:40.000Z
2022-03-30T08:14:51.000Z
pw_console/py/log_view_test.py
octml/pigweed
e273d46024ef7b5a7c7ec584e4aaada41c541fc4
[ "Apache-2.0" ]
4
2021-07-27T20:32:03.000Z
2022-03-08T10:39:07.000Z
pw_console/py/log_view_test.py
octml/pigweed
e273d46024ef7b5a7c7ec584e4aaada41c541fc4
[ "Apache-2.0" ]
22
2021-03-11T15:15:47.000Z
2022-02-09T06:16:36.000Z
# Copyright 2021 The Pigweed 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
38.204741
100
0.582388
import logging import time import sys import unittest from datetime import datetime from unittest.mock import MagicMock, patch from parameterized import parameterized from prompt_toolkit.data_structures import Point from prompt_toolkit.formatted_text import FormattedText from pw_console.console_prefs im...
true
true
f74086de121480ea400a10964d4e8f2984ff98d1
1,921
py
Python
prepro.py
DevRx28/pokemon-type
2f62d4b88856dcd9aff79bdda993a4ddc093d7b7
[ "Apache-2.0" ]
null
null
null
prepro.py
DevRx28/pokemon-type
2f62d4b88856dcd9aff79bdda993a4ddc093d7b7
[ "Apache-2.0" ]
null
null
null
prepro.py
DevRx28/pokemon-type
2f62d4b88856dcd9aff79bdda993a4ddc093d7b7
[ "Apache-2.0" ]
null
null
null
import numpy as np from scipy.optimize import fmin_l_bfgs_b import time import argparse import cv2 from tensorflow.keras.models import load_model import numpy as np import csv import sys from matplotlib import pyplot as plt from PIL import Image from keras.preprocessing.image import img_to_array img = cv2.imread('po...
25.276316
103
0.700677
import numpy as np from scipy.optimize import fmin_l_bfgs_b import time import argparse import cv2 from tensorflow.keras.models import load_model import numpy as np import csv import sys from matplotlib import pyplot as plt from PIL import Image from keras.preprocessing.image import img_to_array img = cv2.imread('po...
true
true
f740873de4a3531e99da51998cbcb2e41bde6227
2,748
py
Python
vvhgvs/dataproviders/seqfetcher.py
openvar/vv_hgvs
b3a18e0f1d7ec012d280bd6332ba2e6c2fa9e2b3
[ "Apache-2.0" ]
2
2020-11-13T02:40:26.000Z
2021-01-15T03:09:52.000Z
vvhgvs/dataproviders/seqfetcher.py
openvar/vv_hgvs
b3a18e0f1d7ec012d280bd6332ba2e6c2fa9e2b3
[ "Apache-2.0" ]
1
2022-03-08T05:31:10.000Z
2022-03-08T05:31:10.000Z
vvhgvs/dataproviders/seqfetcher.py
openvar/vv_hgvs
b3a18e0f1d7ec012d280bd6332ba2e6c2fa9e2b3
[ "Apache-2.0" ]
3
2020-06-24T09:18:06.000Z
2021-02-02T12:47:57.000Z
# -*- coding: utf-8 -*- """provides sequencing fetching from NCBI and Ensembl """ from __future__ import absolute_import, division, print_function, unicode_literals import logging import os import re import bioutils.seqfetcher from ..exceptions import HGVSDataNotAvailableError _logger = logging.getLogger(__name__...
34.78481
100
0.684498
from __future__ import absolute_import, division, print_function, unicode_literals import logging import os import re import bioutils.seqfetcher from ..exceptions import HGVSDataNotAvailableError _logger = logging.getLogger(__name__) class SeqFetcher(object): def __init__(self): s...
true
true
f7408776c8e5e20ab86f318d0a00921a6a63f843
1,867
py
Python
setup.py
caternuson/Adafruit_CircuitPython_PN532
51ee2ddff9f94d2f97be05d21b97402f875103b8
[ "MIT" ]
null
null
null
setup.py
caternuson/Adafruit_CircuitPython_PN532
51ee2ddff9f94d2f97be05d21b97402f875103b8
[ "MIT" ]
null
null
null
setup.py
caternuson/Adafruit_CircuitPython_PN532
51ee2ddff9f94d2f97be05d21b97402f875103b8
[ "MIT" ]
null
null
null
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.absp...
30.606557
89
0.700054
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() setup( name='adafruit-circuitpython-pn532', use_scm_version=True, setup...
true
true
f74087e8975578890643d004c26f27909458894b
2,965
py
Python
swarmform/core/swarmwork.py
AyeshW/SwarmForm
1b23c18b0dedb1be588b5f77ef3515f32a3953e1
[ "MIT" ]
2
2020-10-14T05:16:53.000Z
2020-10-20T10:36:35.000Z
swarmform/core/swarmwork.py
AyeshW/SwarmForm
1b23c18b0dedb1be588b5f77ef3515f32a3953e1
[ "MIT" ]
11
2020-04-19T05:06:38.000Z
2021-01-13T05:55:49.000Z
swarmform/core/swarmwork.py
AyeshW/SwarmForm
1b23c18b0dedb1be588b5f77ef3515f32a3953e1
[ "MIT" ]
5
2020-04-19T04:38:11.000Z
2020-06-01T09:10:40.000Z
from fireworks import Workflow, Firework class SwarmFlow(Workflow): def __init__(self, fireworks, links_dict=None, name=None, metadata=None, created_on=None, updated_on=None, fw_states=None, sf_id=None): """ Args: fireworks ([Firework]): all FireWorks in this SwarmFlo...
33.693182
110
0.586847
from fireworks import Workflow, Firework class SwarmFlow(Workflow): def __init__(self, fireworks, links_dict=None, name=None, metadata=None, created_on=None, updated_on=None, fw_states=None, sf_id=None): super().__init__(fireworks, links_dict, name, metadata, created_on, updated_on, fw_...
true
true
f7408808fc111ee42c942c22eb3cab024ba538a3
33,873
py
Python
lasso/dyna/FemzipMapper.py
vishalbelsare/lasso-python
319bf590599b4a4d50d9345e83e8030afe044aec
[ "BSD-3-Clause" ]
43
2019-06-20T20:23:15.000Z
2022-03-08T11:28:12.000Z
lasso/dyna/FemzipMapper.py
vishalbelsare/lasso-python
319bf590599b4a4d50d9345e83e8030afe044aec
[ "BSD-3-Clause" ]
19
2019-10-04T17:13:34.000Z
2022-02-16T16:49:59.000Z
lasso/dyna/FemzipMapper.py
vishalbelsare/lasso-python
319bf590599b4a4d50d9345e83e8030afe044aec
[ "BSD-3-Clause" ]
17
2020-02-09T08:19:03.000Z
2021-12-03T07:06:31.000Z
import logging import re import traceback from typing import Dict, List, Set, Tuple, Union import numpy as np from lasso.dyna.ArrayType import ArrayType from lasso.femzip.femzip_api import FemzipAPI, FemzipFileMetadata, VariableInfo from lasso.femzip.fz_config import (FemzipArrayType, FemzipVariableCategory,...
38.361268
111
0.64919
import logging import re import traceback from typing import Dict, List, Set, Tuple, Union import numpy as np from lasso.dyna.ArrayType import ArrayType from lasso.femzip.femzip_api import FemzipAPI, FemzipFileMetadata, VariableInfo from lasso.femzip.fz_config import (FemzipArrayType, FemzipVariableCategory,...
true
true
f74089310aed432bec1f1e532a6f991186a49aa9
296
py
Python
src/mop2/utils/files.py
robertfischer3/python-mop2
2f8f4da52092489bf2610818458f95f5c7fd9c6e
[ "MIT" ]
null
null
null
src/mop2/utils/files.py
robertfischer3/python-mop2
2f8f4da52092489bf2610818458f95f5c7fd9c6e
[ "MIT" ]
null
null
null
src/mop2/utils/files.py
robertfischer3/python-mop2
2f8f4da52092489bf2610818458f95f5c7fd9c6e
[ "MIT" ]
null
null
null
import os from contextlib import contextmanager @contextmanager def change_dir(destination): # Allows for temporary change of working directory when used with a with statement try: cwd = os.getcwd() os.chdir(destination) yield finally: os.chdir(cwd)
21.142857
86
0.682432
import os from contextlib import contextmanager @contextmanager def change_dir(destination): try: cwd = os.getcwd() os.chdir(destination) yield finally: os.chdir(cwd)
true
true
f74089ed0415b6fbf9bbd5f2d3dbfd98ea07d4ee
7,445
py
Python
tensorflow/python/distribute/cluster_resolver/kubernetes_cluster_resolver.py
EricRemmerswaal/tensorflow
141ff27877579c81a213fa113bd1b474c1749aca
[ "Apache-2.0" ]
190,993
2015-11-09T13:17:30.000Z
2022-03-31T23:05:27.000Z
tensorflow/python/distribute/cluster_resolver/kubernetes_cluster_resolver.py
EricRemmerswaal/tensorflow
141ff27877579c81a213fa113bd1b474c1749aca
[ "Apache-2.0" ]
48,461
2015-11-09T14:21:11.000Z
2022-03-31T23:17:33.000Z
tensorflow/python/distribute/cluster_resolver/kubernetes_cluster_resolver.py
EricRemmerswaal/tensorflow
141ff27877579c81a213fa113bd1b474c1749aca
[ "Apache-2.0" ]
104,981
2015-11-09T13:40:17.000Z
2022-03-31T19:51:54.000Z
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
40.906593
92
0.70141
from tensorflow.python.distribute.cluster_resolver.cluster_resolver import ClusterResolver from tensorflow.python.distribute.cluster_resolver.cluster_resolver import format_master_url from tensorflow.python.training import server_lib from tensorflow.python.util.tf_export import tf_export @tf_export('di...
true
true
f7408a8f58b4bb638001f83f7a9b2cc8f4e287e2
5,397
py
Python
open_test.py
rewin123/NNPreprocessingTomography
b630f4c2cb9705c3c8432480498e4307ed511edf
[ "MIT" ]
1
2021-12-21T03:30:06.000Z
2021-12-21T03:30:06.000Z
open_test.py
rewin123/NNPreprocessingTomography
b630f4c2cb9705c3c8432480498e4307ed511edf
[ "MIT" ]
null
null
null
open_test.py
rewin123/NNPreprocessingTomography
b630f4c2cb9705c3c8432480498e4307ed511edf
[ "MIT" ]
null
null
null
import torch from torch import nn from torch.nn import Sequential #model definition class Unet1D(nn.Module): def __init__(self): super(Unet1D, self).__init__() ch = 32 self.maxpool = nn.MaxPool2d((1,2)) self.unpool = nn.Upsample(scale_factor=(1,2)) self.startLayer =...
35.98
110
0.67556
import torch from torch import nn from torch.nn import Sequential class Unet1D(nn.Module): def __init__(self): super(Unet1D, self).__init__() ch = 32 self.maxpool = nn.MaxPool2d((1,2)) self.unpool = nn.Upsample(scale_factor=(1,2)) self.startLayer = nn.Conv2d(1, ch...
true
true
f7408aa00e4b70006014d70b64f325b8d62f3321
3,952
py
Python
djoser/utils.py
unacast/djoser
8b5d547f799bc1140fe587f78213ce9807796ee1
[ "MIT" ]
null
null
null
djoser/utils.py
unacast/djoser
8b5d547f799bc1140fe587f78213ce9807796ee1
[ "MIT" ]
null
null
null
djoser/utils.py
unacast/djoser
8b5d547f799bc1140fe587f78213ce9807796ee1
[ "MIT" ]
1
2015-11-24T11:37:50.000Z
2015-11-24T11:37:50.000Z
from django.conf import settings as django_settings from django.core.mail import EmailMultiAlternatives, EmailMessage from django.template import loader from rest_framework import response, status try: from django.contrib.sites.shortcuts import get_current_site except ImportError: from django.contrib.sites.mod...
35.927273
98
0.700152
from django.conf import settings as django_settings from django.core.mail import EmailMultiAlternatives, EmailMessage from django.template import loader from rest_framework import response, status try: from django.contrib.sites.shortcuts import get_current_site except ImportError: from django.contrib.sites.mod...
true
true
f7408b38dd09eb369e4748ec54dca9b6422b1793
9,328
py
Python
src/python/GazePal_PC.py
rran9235/GazePal-Application
88d6a74daeddd18ab37c0f2953a118f1f59e06a5
[ "MIT" ]
null
null
null
src/python/GazePal_PC.py
rran9235/GazePal-Application
88d6a74daeddd18ab37c0f2953a118f1f59e06a5
[ "MIT" ]
null
null
null
src/python/GazePal_PC.py
rran9235/GazePal-Application
88d6a74daeddd18ab37c0f2953a118f1f59e06a5
[ "MIT" ]
null
null
null
""" GazePal Application Author: Rishi Rangarajan Year: 2021 File: GazePal_PC.py Info: GazePal_PC class definition """ # Imports import csv import os import pyautogui import time import torch import torchvision import cv2 as cv import numpy as np import torchvision.transforms as transforms from collections import Cou...
32.388889
108
0.545883
import csv import os import pyautogui import time import torch import torchvision import cv2 as cv import numpy as np import torchvision.transforms as transforms from collections import Counter from threading import Thread from Class_CNN import CNN class GazePal_PC: def __init__(self): ...
true
true
f7408c53a424884c9788fa23c9e5d5ebeca169b7
189
py
Python
read/read/str/readers/sqlite3.py
vitalfadeev/read
f8893daa732d50bb6f1da94e66d016d5611f1983
[ "MIT" ]
null
null
null
read/read/str/readers/sqlite3.py
vitalfadeev/read
f8893daa732d50bb6f1da94e66d016d5611f1983
[ "MIT" ]
null
null
null
read/read/str/readers/sqlite3.py
vitalfadeev/read
f8893daa732d50bb6f1da94e66d016d5611f1983
[ "MIT" ]
null
null
null
import io import sqlite3 def Reader( f, url, stream=False, tag=None ): db = sqlite3.connect( url ) c = db.cursor() rows = c.execute("select * from wikipedia") return rows
18.9
47
0.640212
import io import sqlite3 def Reader( f, url, stream=False, tag=None ): db = sqlite3.connect( url ) c = db.cursor() rows = c.execute("select * from wikipedia") return rows
true
true
f7408d91513ed5fa925381e05fef7e56e5857ff0
5,937
py
Python
pysigview/widgets/transforms/filters.py
ICRC-BME/PySigView
8ac60960dea0e5c70757c76545a896c76a95f68d
[ "Apache-2.0" ]
1
2021-03-26T12:48:49.000Z
2021-03-26T12:48:49.000Z
pysigview/widgets/transforms/filters.py
ICRC-BME/PySigView
8ac60960dea0e5c70757c76545a896c76a95f68d
[ "Apache-2.0" ]
39
2018-09-06T21:32:54.000Z
2020-10-12T09:04:52.000Z
pysigview/widgets/transforms/filters.py
ICRC-BME/PySigView
8ac60960dea0e5c70757c76545a896c76a95f68d
[ "Apache-2.0" ]
2
2019-12-24T02:57:47.000Z
2022-02-28T22:22:09.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Jun 29 09:23:17 2017 Annotations plugin for pysigview Ing.,Mgr. (MSc.) Jan Cimbálník Biomedical engineering International Clinical Research Center St. Anne's University Hospital in Brno Czech Republic & Mayo systems electrophysiology lab Mayo Clinic 20...
28.406699
77
0.623547
from PyQt5.QtCore import pyqtSignal, Qt from PyQt5.QtWidgets import (QVBoxLayout, QWidget, QLineEdit, QComboBox, QLabel, QMessageBox, QPushButton) from scipy.signal import butter, filtfilt from pysigview.core.plot_transform import BasePlotTransform cl...
true
true
f7408e51c1f36d4b11644bab222cd99ac6f0fc29
713
py
Python
t/test_kill.py
texttheater/produce
202e3196daf7ac53c1998ac2ee9b0f8cbb1c6615
[ "MIT" ]
14
2015-03-04T12:40:25.000Z
2021-07-07T04:06:09.000Z
t/test_kill.py
texttheater/produce
202e3196daf7ac53c1998ac2ee9b0f8cbb1c6615
[ "MIT" ]
43
2015-01-27T13:52:39.000Z
2020-10-17T19:51:20.000Z
t/test_kill.py
texttheater/produce
202e3196daf7ac53c1998ac2ee9b0f8cbb1c6615
[ "MIT" ]
2
2015-11-23T08:59:07.000Z
2019-04-17T13:04:49.000Z
import prodtest import produce import time class KillTest(prodtest.ProduceTestCase): """ Tests that a single recipe failing causes immediate abort and cleanup. """ def test(self): self.assertDirectoryContents(['produce.ini']) with self.assertRaises(produce.ProduceError): s...
28.52
74
0.603086
import prodtest import produce import time class KillTest(prodtest.ProduceTestCase): def test(self): self.assertDirectoryContents(['produce.ini']) with self.assertRaises(produce.ProduceError): self.produce(**{'-j': '3'}) now = time.time() self.assertDirectoryContents([...
true
true
f7408e69f7dec714131ba17aed5eaeab24d02d9e
75,117
py
Python
pandas/core/arrays/datetimes.py
monferrand/pandas
a3477c769b3d2ea4950ae69f8867e3b291b743c1
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
1
2020-06-04T21:46:19.000Z
2020-06-04T21:46:19.000Z
pandas/core/arrays/datetimes.py
monferrand/pandas
a3477c769b3d2ea4950ae69f8867e3b291b743c1
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/core/arrays/datetimes.py
monferrand/pandas
a3477c769b3d2ea4950ae69f8867e3b291b743c1
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
from datetime import datetime, time, timedelta from typing import Union import warnings import numpy as np from pytz import utc from pandas._libs import lib, tslib from pandas._libs.tslibs import ( NaT, Timestamp, ccalendar, conversion, fields, iNaT, normalize_date, resolution as libre...
32.073868
88
0.557743
from datetime import datetime, time, timedelta from typing import Union import warnings import numpy as np from pytz import utc from pandas._libs import lib, tslib from pandas._libs.tslibs import ( NaT, Timestamp, ccalendar, conversion, fields, iNaT, normalize_date, resolution as libre...
true
true
f7408e6bc242ee0612f2cb9cab7eeb0d1bdfe38f
2,055
py
Python
old/dedupe/data.py
rec/dedupe
315bc8f6859e284f95ea3b6cb06564508ca8006d
[ "MIT" ]
2
2019-05-26T15:09:38.000Z
2019-06-15T10:18:44.000Z
old/dedupe/data.py
rec/dedupe
315bc8f6859e284f95ea3b6cb06564508ca8006d
[ "MIT" ]
null
null
null
old/dedupe/data.py
rec/dedupe
315bc8f6859e284f95ea3b6cb06564508ca8006d
[ "MIT" ]
null
null
null
import attr import contextlib import json import os import shutil import sys @attr.dataclass class Data: load_kwds: dict = attr.Factory(dict) dump_kwds: dict = attr.Factory(dict) binary: bool = False backup: bool = True write: bool = False loader: object = json output_file: object = sys.st...
27.4
67
0.57129
import attr import contextlib import json import os import shutil import sys @attr.dataclass class Data: load_kwds: dict = attr.Factory(dict) dump_kwds: dict = attr.Factory(dict) binary: bool = False backup: bool = True write: bool = False loader: object = json output_file: object = sys.st...
true
true
f7408ec2802d4fc566c8f3a932c89d6a89bd2001
932
py
Python
var/spack/repos/builtin/packages/py-bandit/package.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2,360
2017-11-06T08:47:01.000Z
2022-03-31T14:45:33.000Z
var/spack/repos/builtin/packages/py-bandit/package.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
13,838
2017-11-04T07:49:45.000Z
2022-03-31T23:38:39.000Z
var/spack/repos/builtin/packages/py-bandit/package.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1,793
2017-11-04T07:45:50.000Z
2022-03-30T14:31:53.000Z
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyBandit(PythonPackage): """Security oriented static analyser for python code.""" hom...
38.833333
95
0.67382
from spack import * class PyBandit(PythonPackage): homepage = "https://bandit.readthedocs.io/en/latest/" pypi = "bandit/bandit-1.7.0.tar.gz" version('1.7.0', sha256='8a4c7415254d75df8ff3c3b15cfe9042ecee628a1e40b44c15a98890fbfc2608') depends_on('python@3.5:', type=('build', 'run')) depe...
true
true
f7408fc16ebf0021079ff787183426f9e4409034
842
py
Python
spacy/tests/lang/lt/test_lemmatizer.py
jaydeepborkar/spaCy
16aa092fb5cffb5ec7079951ea0c04cb96733b3e
[ "MIT" ]
null
null
null
spacy/tests/lang/lt/test_lemmatizer.py
jaydeepborkar/spaCy
16aa092fb5cffb5ec7079951ea0c04cb96733b3e
[ "MIT" ]
1
2021-08-16T13:39:17.000Z
2021-08-16T13:39:40.000Z
spacy/tests/lang/lt/test_lemmatizer.py
jaydeepborkar/spaCy
16aa092fb5cffb5ec7079951ea0c04cb96733b3e
[ "MIT" ]
null
null
null
# coding: utf-8 from __future__ import unicode_literals import pytest # fmt: off TEST_CASES = [ (["Galime", "vadinti", "gerovės", "valstybe", ",", "turime", "išvystytą", "socialinę", "apsaugą", ",", "sveikatos", "apsaugą", "ir", "prieinamą", "švietimą", "."], ["galėti", "vadintas", "gerovė", "valstybė"...
40.095238
106
0.612827
from __future__ import unicode_literals import pytest TEST_CASES = [ (["Galime", "vadinti", "gerovės", "valstybe", ",", "turime", "išvystytą", "socialinę", "apsaugą", ",", "sveikatos", "apsaugą", "ir", "prieinamą", "švietimą", "."], ["galėti", "vadintas", "gerovė", "valstybė", ",", "turėti", "išvysty...
true
true
f7409031ea60f66e97fd738d8d477b7d1ceba72f
453
py
Python
flexget/_version.py
qk4l/Flexget
d12350d0ad31f3add0374280b5d22ba86fdf7b4d
[ "MIT" ]
null
null
null
flexget/_version.py
qk4l/Flexget
d12350d0ad31f3add0374280b5d22ba86fdf7b4d
[ "MIT" ]
null
null
null
flexget/_version.py
qk4l/Flexget
d12350d0ad31f3add0374280b5d22ba86fdf7b4d
[ "MIT" ]
null
null
null
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
41.181818
114
0.785872
__version__ = '2.10.94.dev'
true
true
f7409052e991f74d3f09e333b94e7c31a46d3a3a
6,081
py
Python
Bio/Alphabet/Reduced.py
xzy3/biopython
4bd06c16bbcef7a0f5bc43ba9bb936b9557996e9
[ "BSD-3-Clause" ]
2
2020-06-25T12:52:03.000Z
2020-07-11T09:47:34.000Z
Bio/Alphabet/Reduced.py
EmmanuelOwusu/biopython
4e9a15172ba26bae104eaa7f05819cd6d41d0da8
[ "BSD-3-Clause" ]
null
null
null
Bio/Alphabet/Reduced.py
EmmanuelOwusu/biopython
4e9a15172ba26bae104eaa7f05819cd6d41d0da8
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2004 by Iddo Friedberg. # All rights reserved. # # This file is part of the Biopython distribution and governed by your # choice of the "Biopython License Agreement" or the "BSD 3-Clause License". # Please see the LICENSE file that should have been included as part of this # package. """Reduced alphabets wh...
21.336842
79
0.527874
from Bio import Alphabet murphy_15_tab = { "L": "L", "V": "L", "I": "L", "M": "L", "C": "C", "A": "A", "G": "G", "S": "S", "T": "T", "P": "P", "F": "F", "Y": "F", "W": "W", "E": "E", "D": "D", "N": "N", "Q": "Q", "K": "K", "R": "K", ...
true
true
f74090bcbcebe95489aa5c181192d16399ae0d39
3,648
py
Python
fairseq/optim/lr_scheduler/inverse_square_root_decay_schedule.py
steventan0110/multiDDS
9ca17bd6a8f546f4ed26716397c2d0dd2df3358f
[ "MIT" ]
20
2020-09-06T20:45:27.000Z
2022-03-10T05:50:08.000Z
fairseq/optim/lr_scheduler/inverse_square_root_decay_schedule.py
steventan0110/NMT_RL_Filter
b77d0ad7b8f38d5b3b1b0e63e2671e0de0e3da00
[ "MIT" ]
5
2020-09-19T02:49:44.000Z
2021-11-29T06:22:51.000Z
fairseq/optim/lr_scheduler/inverse_square_root_decay_schedule.py
steventan0110/NMT_RL_Filter
b77d0ad7b8f38d5b3b1b0e63e2671e0de0e3da00
[ "MIT" ]
6
2020-09-08T00:54:50.000Z
2021-04-03T04:01:41.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from . import FairseqLRScheduler, register_lr_scheduler import torch @register_lr_scheduler('inverse_sqrt_decay') class InverseSquareRootDeca...
42.917647
97
0.647478
from . import FairseqLRScheduler, register_lr_scheduler import torch @register_lr_scheduler('inverse_sqrt_decay') class InverseSquareRootDecaySchedule(FairseqLRScheduler): def __init__(self, args, optimizer): super().__init__(args, optimizer) if len(args.lr) > 1: raise ValueError(...
true
true
f740912029b085237e692618d7137b5cbd2fb6a9
8,803
py
Python
typhon/objects/networking/endpoints.py
monte-language/typhon
ee7cd9712407370116fea076819e5a9891010219
[ "Apache-2.0" ]
63
2015-02-19T20:47:16.000Z
2021-12-27T23:29:54.000Z
typhon/objects/networking/endpoints.py
monte-language/typhon
ee7cd9712407370116fea076819e5a9891010219
[ "Apache-2.0" ]
197
2015-02-23T23:05:24.000Z
2021-04-05T16:15:04.000Z
typhon/objects/networking/endpoints.py
monte-language/typhon
ee7cd9712407370116fea076819e5a9891010219
[ "Apache-2.0" ]
9
2015-02-15T09:27:09.000Z
2018-02-14T17:27:40.000Z
# Copyright (C) 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
28.767974
78
0.628309
from rpython.rlib.debug import debug_print from rpython.rlib.objectmodel import we_are_translated from rpython.rlib.rarithmetic import intmask from typhon import ruv from typhon.atoms import getAtom from typhon.autohelp import autohelp, method from typhon.errors import userError from typhon.futures impor...
true
true
f7409120990c2d302f9ac19e16d639e51bab81ae
2,033
py
Python
telegrambots/examples/telegram_1.py
carlfarterson/telegrambots
adce297620403b2369d0e6b3ac8897537d809d5e
[ "MIT" ]
null
null
null
telegrambots/examples/telegram_1.py
carlfarterson/telegrambots
adce297620403b2369d0e6b3ac8897537d809d5e
[ "MIT" ]
null
null
null
telegrambots/examples/telegram_1.py
carlfarterson/telegrambots
adce297620403b2369d0e6b3ac8897537d809d5e
[ "MIT" ]
null
null
null
from api import token from telegram import InlineKeyboardButton, InlineKeyboardMarkup from telegram.ext import Updater, CommandHandler, CallbackQueryHandler import logging logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO) logger = logging.getLog...
27.472973
106
0.688146
from api import token from telegram import InlineKeyboardButton, InlineKeyboardMarkup from telegram.ext import Updater, CommandHandler, CallbackQueryHandler import logging logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO) logger = logging.getLog...
true
true
f7409178df94be7adb2e2e58834805025a2e8984
4,039
py
Python
corehq/apps/cloudcare/touchforms_api.py
akashkj/commcare-hq
b00a62336ec26cea1477dfb8c048c548cc462831
[ "BSD-3-Clause" ]
471
2015-01-10T02:55:01.000Z
2022-03-29T18:07:18.000Z
corehq/apps/cloudcare/touchforms_api.py
akashkj/commcare-hq
b00a62336ec26cea1477dfb8c048c548cc462831
[ "BSD-3-Clause" ]
14,354
2015-01-01T07:38:23.000Z
2022-03-31T20:55:14.000Z
corehq/apps/cloudcare/touchforms_api.py
akashkj/commcare-hq
b00a62336ec26cea1477dfb8c048c548cc462831
[ "BSD-3-Clause" ]
175
2015-01-06T07:16:47.000Z
2022-03-29T13:27:01.000Z
from corehq.apps.app_manager.suite_xml.sections.entries import EntriesHelper from corehq.apps.cloudcare import CLOUDCARE_DEVICE_ID from corehq.apps.users.models import CouchUser from corehq.form_processor.interfaces.dbaccessors import CaseAccessors DELEGATION_STUB_CASE_TYPE = "cc_delegation_stub" class BaseSessionDa...
35.743363
103
0.664769
from corehq.apps.app_manager.suite_xml.sections.entries import EntriesHelper from corehq.apps.cloudcare import CLOUDCARE_DEVICE_ID from corehq.apps.users.models import CouchUser from corehq.form_processor.interfaces.dbaccessors import CaseAccessors DELEGATION_STUB_CASE_TYPE = "cc_delegation_stub" class BaseSessionDa...
true
true
f74091b926be364ce1af026b849b0662ae49afdc
1,121
py
Python
backend/middleware.py
MrGrote/forms-backend
1b4b4fe6819352f1f072ce307eee892866a11dcf
[ "MIT" ]
13
2020-10-10T14:22:51.000Z
2022-02-25T23:35:05.000Z
backend/middleware.py
MrGrote/forms-backend
1b4b4fe6819352f1f072ce307eee892866a11dcf
[ "MIT" ]
89
2020-11-22T08:31:54.000Z
2022-03-14T11:18:17.000Z
backend/middleware.py
LaudateCorpus1/forms-backend
f949747aadca05f746530f261fefabeac3e98230
[ "MIT" ]
8
2020-12-14T14:50:21.000Z
2022-01-10T13:50:53.000Z
import typing as t import ssl from motor.motor_asyncio import AsyncIOMotorClient from starlette.middleware.base import BaseHTTPMiddleware from starlette.requests import Request from starlette.responses import JSONResponse, Response from backend.constants import DATABASE_URL, DOCS_PASSWORD, MONGO_DATABASE class Data...
35.03125
82
0.723461
import typing as t import ssl from motor.motor_asyncio import AsyncIOMotorClient from starlette.middleware.base import BaseHTTPMiddleware from starlette.requests import Request from starlette.responses import JSONResponse, Response from backend.constants import DATABASE_URL, DOCS_PASSWORD, MONGO_DATABASE class Data...
true
true
f74091cd762967657470e6888f6454ffab4dcfe2
309
py
Python
tools/fileinfo/detection/installers/inno/test.py
stepanek-m/retdec-regression-tests
12b834b14ede2826fec451368fa8192ab00ddadf
[ "MIT" ]
null
null
null
tools/fileinfo/detection/installers/inno/test.py
stepanek-m/retdec-regression-tests
12b834b14ede2826fec451368fa8192ab00ddadf
[ "MIT" ]
null
null
null
tools/fileinfo/detection/installers/inno/test.py
stepanek-m/retdec-regression-tests
12b834b14ede2826fec451368fa8192ab00ddadf
[ "MIT" ]
null
null
null
from regression_tests import * class TestInnoSetupDetection(Test): settings = TestSettings( tool='fileinfo', input='inno.exe' ) def test_detected_inno(self): assert self.fileinfo.succeeded assert self.fileinfo.output.contains(r'.*Inno Setup \(5.4.0 - 5.5.1\)')
22.071429
79
0.650485
from regression_tests import * class TestInnoSetupDetection(Test): settings = TestSettings( tool='fileinfo', input='inno.exe' ) def test_detected_inno(self): assert self.fileinfo.succeeded assert self.fileinfo.output.contains(r'.*Inno Setup \(5.4.0 - 5.5.1\)')
true
true
f740922faa62f51b191c87217cbb011168b37e34
60,557
py
Python
tests/lax_numpy_indexing_test.py
mariogeiger/jax
7098088f4eb15cf750398889e4341dbc15cda1b3
[ "Apache-2.0" ]
null
null
null
tests/lax_numpy_indexing_test.py
mariogeiger/jax
7098088f4eb15cf750398889e4341dbc15cda1b3
[ "Apache-2.0" ]
null
null
null
tests/lax_numpy_indexing_test.py
mariogeiger/jax
7098088f4eb15cf750398889e4341dbc15cda1b3
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
41.083446
107
0.616923
from contextlib import contextmanager import enum from functools import partial import itertools import typing from typing import Any, Optional, Tuple import warnings from absl.testing import absltest from absl.testing import parameterized import numpy as np import jax from jax import lax from jax imp...
true
true
f740927f3053a7019204b01f443b2defa1439973
1,171
py
Python
config-default.py
marsDurden/UnipdBot
402b74f6bd876265b952f052e2c132f6aa3c050d
[ "Unlicense" ]
4
2018-04-12T03:39:36.000Z
2019-11-26T07:52:30.000Z
config-default.py
marsDurden/UnipdBot
402b74f6bd876265b952f052e2c132f6aa3c050d
[ "Unlicense" ]
null
null
null
config-default.py
marsDurden/UnipdBot
402b74f6bd876265b952f052e2c132f6aa3c050d
[ "Unlicense" ]
1
2019-10-07T16:50:48.000Z
2019-10-07T16:50:48.000Z
# Configuration file # Bot token bot_token = 'bot token here' botAdminID = 123456789 # Orario list_url = 'https://gestionedidattica.unipd.it/PortaleStudenti/combo_call.php' orario_url = 'https://gestionedidattica.unipd.it/PortaleStudenti/grid_call.php' # File locations global_path = '/path/to/this/folder/' db_path =...
35.484848
156
0.694278
bot_token = 'bot token here' botAdminID = 123456789 list_url = 'https://gestionedidattica.unipd.it/PortaleStudenti/combo_call.php' orario_url = 'https://gestionedidattica.unipd.it/PortaleStudenti/grid_call.php' global_path = '/path/to/this/folder/' db_path = 'database/database.db' captions_path = 'database/langu...
true
true
f740937db06159befc79ce60ca9fd330e88325fb
9,288
py
Python
empyro/charcode.py
aymanizz/empyro
225be4af935d81d6dfa53a77e9bea1de0971a922
[ "MIT" ]
null
null
null
empyro/charcode.py
aymanizz/empyro
225be4af935d81d6dfa53a77e9bea1de0971a922
[ "MIT" ]
null
null
null
empyro/charcode.py
aymanizz/empyro
225be4af935d81d6dfa53a77e9bea1de0971a922
[ "MIT" ]
null
null
null
"""Unicode code points and alt codes for code page 437. this module defines: class CharCode(IntEnum) -- an enum of the unicode code points. CharCode.altcode -- the alt code of the character, for convenience. altcodes -- a mapping from code points to alt codes. """ from enum import IntEnum class Cha...
29.96129
75
0.741064
from enum import IntEnum class CharCode(IntEnum): NULL = 0x0000 WHITE_SMILING_FACE = 0x263a BLACK_SMILING_FACE = 0x263b BLACK_HEART_SUIT = 0x2665 BLACK_DIAMOND_SUIT = 0x2666 BLACK_CLUB_SUIT = 0x2663 BLACK_SPADE_SUIT = 0x2660 BULLET = 0x2022 INVERSE_BULLET = 0x25d8 W...
true
true
f74094b4da58e8f5be707bf6bc35acfb4c67d701
2,352
py
Python
opensfm/commands/extract_metadata.py
cjld/OpenSfM
016b852d581f2bd0b93318b852a17090954abd6b
[ "BSD-2-Clause" ]
1
2018-04-18T08:49:40.000Z
2018-04-18T08:49:40.000Z
opensfm/commands/extract_metadata.py
cjld/OpenSfM
016b852d581f2bd0b93318b852a17090954abd6b
[ "BSD-2-Clause" ]
1
2018-04-19T13:57:35.000Z
2018-04-19T13:57:35.000Z
opensfm/commands/extract_metadata.py
cjld/OpenSfM
016b852d581f2bd0b93318b852a17090954abd6b
[ "BSD-2-Clause" ]
1
2020-08-17T13:47:25.000Z
2020-08-17T13:47:25.000Z
import copy import logging import time from opensfm import dataset from opensfm import exif logger = logging.getLogger(__name__) logging.getLogger("exifread").setLevel(logging.WARNING) class Command: name = 'extract_metadata' help = "Extract metadata from images' EXIF tag" def add_arguments(self, pars...
32.219178
76
0.591837
import copy import logging import time from opensfm import dataset from opensfm import exif logger = logging.getLogger(__name__) logging.getLogger("exifread").setLevel(logging.WARNING) class Command: name = 'extract_metadata' help = "Extract metadata from images' EXIF tag" def add_arguments(self, pars...
true
true
f74094f5d51c631615b3335675b38a5598d892a2
59,187
py
Python
mpl4qt/widgets/mplbasewidget.py
archman/python-mpl4qt
f84fefb95113492407899206269ff82b609279b2
[ "MIT" ]
null
null
null
mpl4qt/widgets/mplbasewidget.py
archman/python-mpl4qt
f84fefb95113492407899206269ff82b609279b2
[ "MIT" ]
null
null
null
mpl4qt/widgets/mplbasewidget.py
archman/python-mpl4qt
f84fefb95113492407899206269ff82b609279b2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ mplbasewidget.py Base class for matplotlib widget for PyQt. Copyright (C) 2018 Tong Zhang <zhangt@frib.msu.edu> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either ve...
31.46571
147
0.578539
import time import numpy as np from collections import deque from collections import OrderedDict from functools import partial from PyQt5.QtCore import QTimer from PyQt5.QtCore import QVariant from PyQt5.QtCore import Qt from PyQt5.QtCore import pyqtProperty from PyQt5.QtCore import pyqtSignal from PyQt5.QtCore impo...
true
true
f74095d9ee8abd512fbaa19a8b53f2c67f503d14
140
py
Python
python/p005.py
RUiNtheExtinct/project-euler
5c3e64c7dfcbf52d5213df88d2310550f4ee9ce1
[ "MIT" ]
null
null
null
python/p005.py
RUiNtheExtinct/project-euler
5c3e64c7dfcbf52d5213df88d2310550f4ee9ce1
[ "MIT" ]
null
null
null
python/p005.py
RUiNtheExtinct/project-euler
5c3e64c7dfcbf52d5213df88d2310550f4ee9ce1
[ "MIT" ]
null
null
null
from math import gcd t = list(range(1, 21)) print(t) ans = 1 for i in t: if ans % i: ans = (ans * i) // gcd(ans, i) print(ans)
14
38
0.535714
from math import gcd t = list(range(1, 21)) print(t) ans = 1 for i in t: if ans % i: ans = (ans * i) // gcd(ans, i) print(ans)
true
true
f740985a4028569cb1a6c799da538cd07c4134e0
255
py
Python
setup.py
jgmartinss/animeinfo
1d754bb8b4c0388dc4c95b78e97465ac3bd917de
[ "MIT" ]
1
2019-07-08T16:43:48.000Z
2019-07-08T16:43:48.000Z
setup.py
jgmartinss/animeinfo
1d754bb8b4c0388dc4c95b78e97465ac3bd917de
[ "MIT" ]
1
2019-07-08T16:44:31.000Z
2019-07-08T16:44:31.000Z
setup.py
jgmartinss/animeinfo
1d754bb8b4c0388dc4c95b78e97465ac3bd917de
[ "MIT" ]
null
null
null
from setuptools import setup setup( name='Animeinfo', author='João Martins', author_email='jgmartinsss@hotmail.com', description='An API to know everything about your favorite anime', url='https://github.com/jgmartinss/animeinfo', )
23.181818
70
0.717647
from setuptools import setup setup( name='Animeinfo', author='João Martins', author_email='jgmartinsss@hotmail.com', description='An API to know everything about your favorite anime', url='https://github.com/jgmartinss/animeinfo', )
true
true
f74098e015fd4bb31098204237131c4867f72839
475
py
Python
melodic-manatees/early_internet/templatetags/form_tags.py
Vthechamp22/summer-code-jam-2021
0a8bf1f22f6c73300891fd779da36efd8e1304c1
[ "MIT" ]
40
2020-08-02T07:38:22.000Z
2021-07-26T01:46:50.000Z
melodic-manatees/early_internet/templatetags/form_tags.py
Vthechamp22/summer-code-jam-2021
0a8bf1f22f6c73300891fd779da36efd8e1304c1
[ "MIT" ]
134
2020-07-31T12:15:45.000Z
2020-12-13T04:42:19.000Z
melodic-manatees/early_internet/templatetags/form_tags.py
Vthechamp22/summer-code-jam-2021
0a8bf1f22f6c73300891fd779da36efd8e1304c1
[ "MIT" ]
101
2020-07-31T12:00:47.000Z
2021-11-01T09:06:58.000Z
from django import template register = template.Library() @register.filter(name='add_class') def add_class(field, classname): existing_classes = field.field.widget.attrs.get('class', None) if existing_classes: if existing_classes.find(given_class) == -1: classes = existing_classes + ' ' +...
27.941176
66
0.667368
from django import template register = template.Library() @register.filter(name='add_class') def add_class(field, classname): existing_classes = field.field.widget.attrs.get('class', None) if existing_classes: if existing_classes.find(given_class) == -1: classes = existing_classes + ' ' +...
true
true
f740998b9d5953f27eb9b4de74780b3dc9e77f61
12,293
py
Python
bin/apps/bash/hhs-app/plugins/firebase/firebase.py
yorevs/homesetup
6e77fd0bffbda3a44d4daf95c974b8d2c744eb5d
[ "MIT" ]
34
2018-08-29T11:07:41.000Z
2022-03-31T12:18:39.000Z
bin/apps/bash/hhs-app/plugins/firebase/firebase.py
yorevs/homesetup
6e77fd0bffbda3a44d4daf95c974b8d2c744eb5d
[ "MIT" ]
22
2020-01-11T01:04:04.000Z
2020-03-05T17:27:12.000Z
bin/apps/bash/hhs-app/plugins/firebase/firebase.py
yorevs/homesetup
6e77fd0bffbda3a44d4daf95c974b8d2c744eb5d
[ "MIT" ]
4
2020-02-28T03:35:32.000Z
2020-06-05T15:09:55.000Z
""" @package: - @script: firebase.py @purpose: This application is a firebase integration @created: Mon 27, 2020 @author: <B>H</B>ugo <B>S</B>aporetti <B>J</B>unior @mailto: yorevs@hotmail.com @site: https://github.com/yorevs/homesetup @license: Please refer to <https://opensource.or...
32.957105
110
0.608964
import json import os import sys import ast import atexit import base64 import getopt import getpass import signal import traceback import uuid import subprocess from datetime import datetime from hhslib.colors import cprint, Colors from hhslib.commons import log_init, check_arguments, exit_handler, read, create_file ...
true
true
f7409aa4a047d52ccbf948a6164682ae33e8686a
1,025
py
Python
test_project/test_project/urls.py
mpasternak/django-nginx-http-push-stream
9689071ca53fe958c9652dafe87316ed097a1ec8
[ "MIT" ]
4
2019-01-19T15:56:52.000Z
2020-01-16T08:13:50.000Z
test_project/test_project/urls.py
mpasternak/django-nginx-http-push-stream
9689071ca53fe958c9652dafe87316ed097a1ec8
[ "MIT" ]
3
2019-03-01T18:13:12.000Z
2021-06-10T21:08:35.000Z
test_project/test_project/urls.py
mpasternak/django-nginx-http-push-stream
9689071ca53fe958c9652dafe87316ed097a1ec8
[ "MIT" ]
null
null
null
"""test_project URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-...
36.607143
77
0.725854
from django.contrib import admin from django.urls import path from nginx_push_stream.auth import auth_request from test_app.views import TestAppView, message_received urlpatterns = [ path('admin/', admin.site.urls), path('', TestAppView.as_view()), path('message_received', message_received, name="message_...
true
true
f7409bb1ec7378bd7439951ba0b05ae0df9c1973
16,724
py
Python
tests/test_corosync_config.py
whamcloud/iml-agent
fecb2468fd6edc822f3ab37ced444d98d8725730
[ "MIT" ]
1
2020-04-22T16:43:09.000Z
2020-04-22T16:43:09.000Z
tests/test_corosync_config.py
whamcloud/iml-agent
fecb2468fd6edc822f3ab37ced444d98d8725730
[ "MIT" ]
53
2018-07-07T18:17:50.000Z
2021-03-19T23:15:28.000Z
tests/test_corosync_config.py
whamcloud/iml-agent
fecb2468fd6edc822f3ab37ced444d98d8725730
[ "MIT" ]
6
2018-06-18T08:51:38.000Z
2019-10-24T12:16:42.000Z
import sys import mock from iml_common.test.command_capture_testcase import ( CommandCaptureTestCase, CommandCaptureCommand, ) from iml_common.lib.firewall_control import FirewallControlEL7 from iml_common.lib.service_control import ServiceControlEL7 from iml_common.lib.agent_rpc import agent_result_ok class...
34.914405
119
0.581918
import sys import mock from iml_common.test.command_capture_testcase import ( CommandCaptureTestCase, CommandCaptureCommand, ) from iml_common.lib.firewall_control import FirewallControlEL7 from iml_common.lib.service_control import ServiceControlEL7 from iml_common.lib.agent_rpc import agent_result_ok class...
true
true
f7409bee1a8697b884df149ff76b3342e2824c6a
4,396
py
Python
src/rankfun.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
3
2021-04-23T23:29:26.000Z
2022-03-23T10:00:30.000Z
src/rankfun.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
null
null
null
src/rankfun.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
1
2021-11-17T22:02:56.000Z
2021-11-17T22:02:56.000Z
from __future__ import annotations from typing import FrozenSet, Optional from pysmt.environment import Environment as PysmtEnv from pysmt.fnode import FNode from pysmt.typing import PySMTType from utils import to_next class RankFun(): """Represents a ranking function. `expr` that can decrease of `delta` a ...
39.963636
94
0.617834
from __future__ import annotations from typing import FrozenSet, Optional from pysmt.environment import Environment as PysmtEnv from pysmt.fnode import FNode from pysmt.typing import PySMTType from utils import to_next class RankFun(): def __init__(self, env: PysmtEnv, expr: FNode, delta: FNode...
true
true
f7409c17631a1926bf69b56bf975747c208a4ca5
22,529
py
Python
distributed/tests/test_utils.py
phobson/distributed
b7fc7be45751f6bc0294f785e9dde376f2d88bd6
[ "BSD-3-Clause" ]
null
null
null
distributed/tests/test_utils.py
phobson/distributed
b7fc7be45751f6bc0294f785e9dde376f2d88bd6
[ "BSD-3-Clause" ]
null
null
null
distributed/tests/test_utils.py
phobson/distributed
b7fc7be45751f6bc0294f785e9dde376f2d88bd6
[ "BSD-3-Clause" ]
null
null
null
import array import asyncio import contextvars import functools import io import os import queue import socket import traceback import warnings from collections import deque from time import sleep import pytest from tornado.ioloop import IOLoop import dask from distributed.compatibility import MACOS, WINDOWS from di...
25.143973
88
0.606507
import array import asyncio import contextvars import functools import io import os import queue import socket import traceback import warnings from collections import deque from time import sleep import pytest from tornado.ioloop import IOLoop import dask from distributed.compatibility import MACOS, WINDOWS from di...
true
true
f7409e17d3b433e35871f9a9f3137069f635afc6
1,382
py
Python
app/fetcher/used_fetcher.py
msusicky/ockovani-covid
2835943b5796b04a3542782ecda125b6766cd317
[ "Apache-2.0" ]
62
2021-01-16T18:02:57.000Z
2022-01-12T21:10:34.000Z
app/fetcher/used_fetcher.py
msusicky/ockovani-covid
2835943b5796b04a3542782ecda125b6766cd317
[ "Apache-2.0" ]
224
2021-01-16T19:11:01.000Z
2022-03-15T19:42:37.000Z
app/fetcher/used_fetcher.py
msusicky/ockovani-covid
2835943b5796b04a3542782ecda125b6766cd317
[ "Apache-2.0" ]
13
2021-01-16T18:38:11.000Z
2021-07-02T20:09:47.000Z
import pandas as pd from app import db, app from app.fetcher.fetcher import Fetcher from app.models import OckovaniSpotreba, OckovaciMisto class UsedFetcher(Fetcher): """ Class for updating used vaccines table. """ USED_CSV = 'https://onemocneni-aktualne.mzcr.cz/api/v2/covid-19/ockovani-spotreba.csv...
33.707317
118
0.659913
import pandas as pd from app import db, app from app.fetcher.fetcher import Fetcher from app.models import OckovaniSpotreba, OckovaciMisto class UsedFetcher(Fetcher): USED_CSV = 'https://onemocneni-aktualne.mzcr.cz/api/v2/covid-19/ockovani-spotreba.csv' def __init__(self): super().__init__(Ockovani...
true
true
f7409e9a4f7b4008d8ef35f97087b065704d72e8
5,951
py
Python
assignment1/src/offboard_UMD/script/plot_position.py
rodrigodelazcano/AerialRobotics
44d7929721eaf3c817cf7f70966e805b36f66981
[ "BSD-3-Clause" ]
null
null
null
assignment1/src/offboard_UMD/script/plot_position.py
rodrigodelazcano/AerialRobotics
44d7929721eaf3c817cf7f70966e805b36f66981
[ "BSD-3-Clause" ]
null
null
null
assignment1/src/offboard_UMD/script/plot_position.py
rodrigodelazcano/AerialRobotics
44d7929721eaf3c817cf7f70966e805b36f66981
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import rosbag import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from tf.transformations import euler_from_quaternion # Read bag file bag = rosbag.Bag('2021-09-21-19-57-22.bag') x = [] y = [] z = [] roll = [] pitch = [] yaw = [] time = [] cycles = [] cycle_time = [] init_time ...
31.321053
101
0.603428
import numpy as np import rosbag import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from tf.transformations import euler_from_quaternion bag = rosbag.Bag('2021-09-21-19-57-22.bag') x = [] y = [] z = [] roll = [] pitch = [] yaw = [] time = [] cycles = [] cycle_time = [] init_time = 0 for topic,...
true
true
f7409f45daac33af68428cd523b8c7bf33613292
21,647
py
Python
sdk/python/pulumi_google_native/compute/v1/instance_iam_policy.py
AaronFriel/pulumi-google-native
75d1cda425e33d4610348972cd70bddf35f1770d
[ "Apache-2.0" ]
44
2021-04-18T23:00:48.000Z
2022-02-14T17:43:15.000Z
sdk/python/pulumi_google_native/compute/v1/instance_iam_policy.py
AaronFriel/pulumi-google-native
75d1cda425e33d4610348972cd70bddf35f1770d
[ "Apache-2.0" ]
354
2021-04-16T16:48:39.000Z
2022-03-31T17:16:39.000Z
sdk/python/pulumi_google_native/compute/v1/instance_iam_policy.py
AaronFriel/pulumi-google-native
75d1cda425e33d4610348972cd70bddf35f1770d
[ "Apache-2.0" ]
8
2021-04-24T17:46:51.000Z
2022-01-05T10:40:21.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
74.388316
1,118
0.699496
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs from ._enums import * from ._inputs import * __all__ = ['InstanceIamPolicyArgs', 'InstanceIamPolicy'] @pulumi.input_type class InstanceIamPolicy...
true
true
f7409f4eaae89d3c6ff2e7cfb8808712be74ed5c
12,386
py
Python
pyqtgraph/graphicsItems/PlotItem/plotConfigTemplate_pyside6.py
secantsquared/pyqtgraph
3ef7f5b91639543e43bcd66a84290fb9bc18fc5c
[ "MIT" ]
null
null
null
pyqtgraph/graphicsItems/PlotItem/plotConfigTemplate_pyside6.py
secantsquared/pyqtgraph
3ef7f5b91639543e43bcd66a84290fb9bc18fc5c
[ "MIT" ]
null
null
null
pyqtgraph/graphicsItems/PlotItem/plotConfigTemplate_pyside6.py
secantsquared/pyqtgraph
3ef7f5b91639543e43bcd66a84290fb9bc18fc5c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ################################################################################ ## Form generated from reading UI file 'plotConfigTemplate.ui' ## ## Created by: Qt User Interface Compiler version 6.1.0 ## ## WARNING! All changes made in this file will be lost when recompiling UI file! ########...
48.76378
242
0.708865
self.alphaGroup = QGroupBox(Form) self.alphaGroup.setObjectName(u"alphaGroup") self.alphaGroup.setGeometry(QRect(10, 390, 234, 60)) self.alphaGroup.setCheckable(True) self.horizontalLayout = QHBoxLayout(self.alphaGroup) self.horizontalLayout.setObjectName(u"horizontalLayou...
true
true
f740a0cc1f8fb202a58c824b51793171338613d3
347
py
Python
motorodm/fields/object_id_field.py
rob-blackbourn/motorodm
c77e79bd2b11c896b9a971ba6a9c4947dce96163
[ "Apache-2.0" ]
null
null
null
motorodm/fields/object_id_field.py
rob-blackbourn/motorodm
c77e79bd2b11c896b9a971ba6a9c4947dce96163
[ "Apache-2.0" ]
null
null
null
motorodm/fields/object_id_field.py
rob-blackbourn/motorodm
c77e79bd2b11c896b9a971ba6a9c4947dce96163
[ "Apache-2.0" ]
null
null
null
from bson import ObjectId from .field import Field class ObjectIdField(Field): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def to_mongo(self, value): return ObjectId(value) if value else None async def from_mongo(self, value, resolver=None): return str...
23.133333
53
0.677233
from bson import ObjectId from .field import Field class ObjectIdField(Field): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def to_mongo(self, value): return ObjectId(value) if value else None async def from_mongo(self, value, resolver=None): return str...
true
true
f740a1ce279b58707c4fd78dbf8f15d6b2d3195e
266
py
Python
delivery/delivery/ext/config/__init__.py
Wprosdocimo/curso-flask
d7093793bdd4a9da236ab1766606e46d5e4c7369
[ "Unlicense" ]
null
null
null
delivery/delivery/ext/config/__init__.py
Wprosdocimo/curso-flask
d7093793bdd4a9da236ab1766606e46d5e4c7369
[ "Unlicense" ]
null
null
null
delivery/delivery/ext/config/__init__.py
Wprosdocimo/curso-flask
d7093793bdd4a9da236ab1766606e46d5e4c7369
[ "Unlicense" ]
null
null
null
def init_app(app): app.config["SECRET_KEY"] = "abacate01" app.config["SQLALCHEMY_DATABASE_URI"] = 'sqlite:///delivery.db' if app.debug: app.config['DEBUG_TB_TEMPLATE_EDITOR_ENABLED'] = True app.config['DEBUG_TB_PROFILER_ENABLED'] = True
33.25
67
0.68797
def init_app(app): app.config["SECRET_KEY"] = "abacate01" app.config["SQLALCHEMY_DATABASE_URI"] = 'sqlite:///delivery.db' if app.debug: app.config['DEBUG_TB_TEMPLATE_EDITOR_ENABLED'] = True app.config['DEBUG_TB_PROFILER_ENABLED'] = True
true
true
f740a27fb79c8586fdc8e5d632c3e0d223d5706a
6,549
py
Python
spark_fhir_schemas/stu3/complex_types/coding.py
icanbwell/SparkFhirSchemas
8c828313c39850b65f8676e67f526ee92b7d624e
[ "Apache-2.0" ]
2
2020-10-31T23:25:01.000Z
2021-06-09T14:12:42.000Z
spark_fhir_schemas/stu3/complex_types/coding.py
icanbwell/SparkFhirSchemas
8c828313c39850b65f8676e67f526ee92b7d624e
[ "Apache-2.0" ]
null
null
null
spark_fhir_schemas/stu3/complex_types/coding.py
icanbwell/SparkFhirSchemas
8c828313c39850b65f8676e67f526ee92b7d624e
[ "Apache-2.0" ]
null
null
null
from typing import Union, List, Optional from pyspark.sql.types import ( StructType, StructField, StringType, ArrayType, BooleanType, DataType, ) # This file is auto-generated by generate_schema so do not edit manually # noinspection PyPep8Naming class CodingSchema: """ A reference to...
45.165517
96
0.592915
from typing import Union, List, Optional from pyspark.sql.types import ( StructType, StructField, StringType, ArrayType, BooleanType, DataType, ) class CodingSchema: @staticmethod def get_schema( max_nesting_depth: Optional[int] = 6, nesting_depth: int = 0, ...
true
true
f740a2eacc84f38fa36d15e7d6de98de7d4cd37f
229
py
Python
tests/sphinx_ext/utils.py
arareko/conformity
a24d6027e7195d20c43065a06f610182a16fe9cd
[ "Apache-2.0" ]
26
2017-07-03T04:52:35.000Z
2021-08-15T00:19:00.000Z
tests/sphinx_ext/utils.py
arareko/conformity
a24d6027e7195d20c43065a06f610182a16fe9cd
[ "Apache-2.0" ]
16
2017-05-01T19:31:56.000Z
2019-10-10T14:22:01.000Z
tests/sphinx_ext/utils.py
arareko/conformity
a24d6027e7195d20c43065a06f610182a16fe9cd
[ "Apache-2.0" ]
8
2019-05-13T17:48:24.000Z
2021-09-08T11:27:39.000Z
from __future__ import ( absolute_import, unicode_literals, ) import functools def decorated(func): @functools.wraps(func) def wrapper(*args, **kwargs): return func(*args, **kwargs) return wrapper
15.266667
36
0.668122
from __future__ import ( absolute_import, unicode_literals, ) import functools def decorated(func): @functools.wraps(func) def wrapper(*args, **kwargs): return func(*args, **kwargs) return wrapper
true
true
f740a43a893f47bb47896118e7a0b20d8545edbc
7,280
py
Python
tslib/__init__.py
mpetazzoni/tslib
8cafb834401c39149049c56bc1e78d8a4cdf1cb6
[ "Apache-2.0" ]
null
null
null
tslib/__init__.py
mpetazzoni/tslib
8cafb834401c39149049c56bc1e78d8a4cdf1cb6
[ "Apache-2.0" ]
null
null
null
tslib/__init__.py
mpetazzoni/tslib
8cafb834401c39149049c56bc1e78d8a4cdf1cb6
[ "Apache-2.0" ]
1
2020-12-11T13:55:53.000Z
2020-12-11T13:55:53.000Z
# Copyright (C) 2015-2019 SignalFx, Inc. All rights reserved. # Copyright (C) 2020-2021 Splunk, Inc. All rights reserved. from __future__ import print_function import argparse import calendar from datetime import datetime as dt from datetime import timedelta as delta import os import pytz import re import six import ...
31.652174
79
0.607967
from __future__ import print_function import argparse import calendar from datetime import datetime as dt from datetime import timedelta as delta import os import pytz import re import six import sys from . import version __author__ = 'Maxime Petazzoni <max@signalfuse.com>' __copyright__ = 'Copyright (C) 2015 Si...
true
true
f740a4a6987b3f1ac23b401ea751a754cf37ce2d
1,135
py
Python
test/test_package_version_resource.py
cvent/octopus-deploy-api-client
0e03e842e1beb29b132776aee077df570b88366a
[ "Apache-2.0" ]
null
null
null
test/test_package_version_resource.py
cvent/octopus-deploy-api-client
0e03e842e1beb29b132776aee077df570b88366a
[ "Apache-2.0" ]
null
null
null
test/test_package_version_resource.py
cvent/octopus-deploy-api-client
0e03e842e1beb29b132776aee077df570b88366a
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Octopus Server API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: 2019.6.7+Branch.tags-2019.6.7.Sha.aa18dc6809953218c66f57eff7d26481d9b23d6a Generated by: https://github.com/swagger-api...
27.682927
119
0.753304
from __future__ import absolute_import import unittest import octopus_deploy_swagger_client from octopus_deploy_swagger_client.models.package_version_resource import PackageVersionResource from octopus_deploy_swagger_client.rest import ApiException class TestPackageVersionResource(unittest.TestCase): def...
true
true
f740a5c65f1abcb18c4bc57fcab42b6dda732540
4,647
py
Python
src/azure-cli-core/azure/cli/core/extension/tests/latest/test_wheel_type_extension.py
chef-davin/azure-cli
2ebd33d5f69a27d07404cc48cf475d5fbdda6378
[ "MIT" ]
null
null
null
src/azure-cli-core/azure/cli/core/extension/tests/latest/test_wheel_type_extension.py
chef-davin/azure-cli
2ebd33d5f69a27d07404cc48cf475d5fbdda6378
[ "MIT" ]
1
2021-06-02T02:38:22.000Z
2021-06-02T02:38:22.000Z
src/azure-cli-core/azure/cli/core/extension/tests/latest/test_wheel_type_extension.py
chef-davin/azure-cli
2ebd33d5f69a27d07404cc48cf475d5fbdda6378
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
43.027778
118
0.667743
import os import tempfile import zipfile import tarfile import shutil import unittest from azure.cli.core.extension import WheelExtension from azure.cli.core.extension.tests.latest import ExtensionTypeTestMixin, get_test_data_file class TestWheelTypeExtensionMetadata(ExtensionTypeTestMixin): def test_readi...
true
true
f740a5f16141c263aa7fbec51acca6a70543f06f
3,509
py
Python
homeassistant/components/switch/tplink.py
Norien/Home-Assistant
0aa8933df675aa3ea93126c0b1eb7c9a77208331
[ "Apache-2.0" ]
2
2017-02-25T00:27:06.000Z
2017-02-25T03:09:30.000Z
homeassistant/components/switch/tplink.py
Norien/Home-Assistant
0aa8933df675aa3ea93126c0b1eb7c9a77208331
[ "Apache-2.0" ]
null
null
null
homeassistant/components/switch/tplink.py
Norien/Home-Assistant
0aa8933df675aa3ea93126c0b1eb7c9a77208331
[ "Apache-2.0" ]
null
null
null
""" Support for TPLink HS100/HS110/HS200 smart switch. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/switch.tplink/ """ import logging import time import voluptuous as vol from homeassistant.components.switch import (SwitchDevice, PLATFORM_SCHEMA) fr...
31.053097
78
0.629524
import logging import time import voluptuous as vol from homeassistant.components.switch import (SwitchDevice, PLATFORM_SCHEMA) from homeassistant.const import (CONF_HOST, CONF_NAME) import homeassistant.helpers.config_validation as cv REQUIREMENTS = ['pyHS100==0.2.3'] _LOGGER = logging.getLogger(__name__) ATTR_C...
true
true
f740a92024db78aef6a002c14abc6cca91e560c0
2,964
py
Python
src/python/WMCore/BossAir/MySQL/JobStatusForMonitoring.py
hufnagel/WMCore
b150cc725b68fc1cf8e6e0fa07c826226a4421fa
[ "Apache-2.0" ]
1
2015-02-05T13:43:46.000Z
2015-02-05T13:43:46.000Z
src/python/WMCore/BossAir/MySQL/JobStatusForMonitoring.py
hufnagel/WMCore
b150cc725b68fc1cf8e6e0fa07c826226a4421fa
[ "Apache-2.0" ]
1
2016-10-13T14:57:35.000Z
2016-10-13T14:57:35.000Z
src/python/WMCore/BossAir/MySQL/JobStatusForMonitoring.py
hufnagel/WMCore
b150cc725b68fc1cf8e6e0fa07c826226a4421fa
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """ _JobStatusMonitoring_ MySQL implementation for loading a job by scheduler status """ from WMCore.Database.DBFormatter import DBFormatter class JobStatusForMonitoring(DBFormatter): """ _LoadForMonitoring_ Load all jobs with a certain scheduler status including all the joine...
36.592593
86
0.606613
from WMCore.Database.DBFormatter import DBFormatter class JobStatusForMonitoring(DBFormatter): sql = """SELECT STRAIGHT_JOIN wwf.name as workflow, count(rj.wmbs_id) AS num_jobs, st.name AS status, wl.plugin AS plugin, wu.cert_dn AS owner FROM bl_runjob rj LEFT...
true
true
f740a96ff6c044923f1adc4849b3807cc475fd3d
18,079
py
Python
adapya/era/scripts/inq.py
SoftwareAG/adapya-era
6b12b44527fe2d02e3614c18e9e47cd237793b23
[ "Apache-2.0" ]
null
null
null
adapya/era/scripts/inq.py
SoftwareAG/adapya-era
6b12b44527fe2d02e3614c18e9e47cd237793b23
[ "Apache-2.0" ]
null
null
null
adapya/era/scripts/inq.py
SoftwareAG/adapya-era
6b12b44527fe2d02e3614c18e9e47cd237793b23
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/env python # -*- coding: latin1 -*- """ ---- inq.py -- Reptor input queue writer ---- Write messages to the Reptor input queue via EntireX Broker ACI call interface Usage: python inq.py [options] Options: -h, --help display this help -b, --broker .. id of broker ETBxxxxx ...
31.829225
90
0.549864
from __future__ import print_function import sys, time, getopt from adapya.base import datamap from adapya.era import reptor from adapya.entirex.broker import Broker,OPT_COMMIT tap=0 msgn=0 if sys.hexversion > 0x03010100: long = int def reqOpen(dest='', rdest='', token=''): global bb ...
true
true
f740aab5e17d64461d602d94500053566a5a3e2b
7,150
py
Python
src/python/dart/web/api/engine.py
RetailMeNotSandbox/dart
58a05f56c04fadd6741501262d92aeb143cd2f2e
[ "MIT" ]
18
2016-03-03T19:10:21.000Z
2021-07-14T22:37:35.000Z
src/python/dart/web/api/engine.py
RetailMeNotSandbox/dart
58a05f56c04fadd6741501262d92aeb143cd2f2e
[ "MIT" ]
62
2016-04-11T15:17:23.000Z
2017-09-08T17:18:53.000Z
src/python/dart/web/api/engine.py
RetailMeNotSandbox/dart
58a05f56c04fadd6741501262d92aeb143cd2f2e
[ "MIT" ]
15
2016-03-03T15:38:34.000Z
2019-03-27T19:33:08.000Z
import json from flask import Blueprint, request, current_app from flask.ext.jsontools import jsonapi from flask.ext.login import login_required from dart.auth.required_roles import required_roles from dart.message.trigger_proxy import TriggerProxy from dart.model.action import ActionState from dart.model.engine impo...
32.207207
119
0.742517
import json from flask import Blueprint, request, current_app from flask.ext.jsontools import jsonapi from flask.ext.login import login_required from dart.auth.required_roles import required_roles from dart.message.trigger_proxy import TriggerProxy from dart.model.action import ActionState from dart.model.engine impo...
true
true
f740ab0a7b7c56b89d33a7adfff022f6a8c5d553
438
py
Python
Q1344.py
Linchin/python_leetcode_git
3d08ab04bbdbd2ce268f33c501fbb149662872c7
[ "MIT" ]
null
null
null
Q1344.py
Linchin/python_leetcode_git
3d08ab04bbdbd2ce268f33c501fbb149662872c7
[ "MIT" ]
null
null
null
Q1344.py
Linchin/python_leetcode_git
3d08ab04bbdbd2ce268f33c501fbb149662872c7
[ "MIT" ]
null
null
null
""" 1344 medium angle between hands of a clock """ class Solution: def angleClock(self, hour: int, minutes: int) -> float: min_angle = minutes * 6 hour_angle = hour * 30 + minutes / 2 hand_angles = abs(min_angle - hour_angle) if hand_angles > 180: hand_angles = 360 - ...
18.25
59
0.625571
class Solution: def angleClock(self, hour: int, minutes: int) -> float: min_angle = minutes * 6 hour_angle = hour * 30 + minutes / 2 hand_angles = abs(min_angle - hour_angle) if hand_angles > 180: hand_angles = 360 - hand_angles return hand_angles sol = Solu...
true
true
f740ac4142cdf6e3ce0cd700b916f6337b170f2c
379
py
Python
code-everyday-challenge/n29_sum_n.py
ved93/deliberate-practice-challenges
2fccdbb9d2baaa16f888055c081a8d04804c0045
[ "MIT" ]
null
null
null
code-everyday-challenge/n29_sum_n.py
ved93/deliberate-practice-challenges
2fccdbb9d2baaa16f888055c081a8d04804c0045
[ "MIT" ]
null
null
null
code-everyday-challenge/n29_sum_n.py
ved93/deliberate-practice-challenges
2fccdbb9d2baaa16f888055c081a8d04804c0045
[ "MIT" ]
null
null
null
def countConsecutive(N): # constraint on values of L gives us the # time Complexity as O(N^0.5) count = 0 L = 1 while( L * (L + 1) < 2 * N): a = (1.0 * N - (L * (L + 1) ) / 2) / (L + 1) if (a - int(a) == 0.0): count += 1 L += 1 return cou...
16.478261
53
0.427441
def countConsecutive(N): count = 0 L = 1 while( L * (L + 1) < 2 * N): a = (1.0 * N - (L * (L + 1) ) / 2) / (L + 1) if (a - int(a) == 0.0): count += 1 L += 1 return count N = 15 print(countConsecutive(N))
true
true
f740ac67103a6b45b261106bbf37463c3bbaac79
35,243
py
Python
coremltools/models/_graph_visualization.py
kizill/coremltools
11e143089a66ee219ce3a2ed98aa1aae794d4794
[ "BSD-3-Clause" ]
null
null
null
coremltools/models/_graph_visualization.py
kizill/coremltools
11e143089a66ee219ce3a2ed98aa1aae794d4794
[ "BSD-3-Clause" ]
null
null
null
coremltools/models/_graph_visualization.py
kizill/coremltools
11e143089a66ee219ce3a2ed98aa1aae794d4794
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2017, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause """ Functions related to graph visualization of mlmodels """ import ast as _ast import json as _json im...
43.780124
129
0.576483
import ast as _ast import json as _json import os as _os import numpy as _np from ._infer_shapes_nn_mlmodel import infer_shapes as _infer_shapes from coremltools.proto import NeuralNetwork_pb2 as _NeuralNetwork_pb2 def _calculate_edges(cy_nodes, cy_edges, shape_dict=None): node_len = len(cy_nodes) for ...
true
true
f740acfc8edc3484bea80f46732a075ec258e256
2,481
py
Python
src/compas_rhino/uninstall_plugin.py
funkchaser/compas
b58de8771484aa0c6068d43df78b1679503215de
[ "MIT" ]
null
null
null
src/compas_rhino/uninstall_plugin.py
funkchaser/compas
b58de8771484aa0c6068d43df78b1679503215de
[ "MIT" ]
null
null
null
src/compas_rhino/uninstall_plugin.py
funkchaser/compas
b58de8771484aa0c6068d43df78b1679503215de
[ "MIT" ]
null
null
null
from __future__ import print_function from __future__ import absolute_import from __future__ import division import os import compas_rhino from compas._os import remove_symlink __all__ = ['uninstall_plugin'] def uninstall_plugin(plugin, version=None): """Uninstall a Rhino Python Command Plugin. Paramete...
25.57732
83
0.585248
from __future__ import print_function from __future__ import absolute_import from __future__ import division import os import compas_rhino from compas._os import remove_symlink __all__ = ['uninstall_plugin'] def uninstall_plugin(plugin, version=None): version = compas_rhino._check_rhino_version(version) ...
true
true
f740ae3b0e5ab6c9e3870fd96f1dcc6a4352536a
65,014
py
Python
cinder/volume/drivers/rbd.py
etaivan/stx-cinder
58f54bd42e4bc352ae96ea1f9df9e9dc71e461a3
[ "Apache-2.0" ]
null
null
null
cinder/volume/drivers/rbd.py
etaivan/stx-cinder
58f54bd42e4bc352ae96ea1f9df9e9dc71e461a3
[ "Apache-2.0" ]
null
null
null
cinder/volume/drivers/rbd.py
etaivan/stx-cinder
58f54bd42e4bc352ae96ea1f9df9e9dc71e461a3
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
42.409654
79
0.575707
from __future__ import absolute_import import json import math import os import tempfile from eventlet import tpool from oslo_config import cfg from oslo_log import log as logging from oslo_utils import fileutils from oslo_utils import units import six from six.moves import urllib from cinder import exc...
true
true
f740afbd38d94cd86863cea699cfb26fe86204bc
496
py
Python
examples/getAUsersVideos.py
alancraft2002/tiktokScraper
7f46a774eedf5e25940505d01fbe2712bf19812a
[ "MIT" ]
9
2020-11-12T07:32:39.000Z
2021-09-07T10:39:11.000Z
examples/getAUsersVideos.py
alancraft2002/tiktokScraper
7f46a774eedf5e25940505d01fbe2712bf19812a
[ "MIT" ]
null
null
null
examples/getAUsersVideos.py
alancraft2002/tiktokScraper
7f46a774eedf5e25940505d01fbe2712bf19812a
[ "MIT" ]
3
2021-01-18T02:31:04.000Z
2021-11-30T23:16:03.000Z
from TikTokApi import TikTokApi # Starts TikTokApi api = TikTokApi.get_instance() # The Number of trending TikToks you want to be displayed results = 10 # Returns a list of dictionaries of the trending object userPosts = api.userPosts( "6745191554350760966", "MS4wLjABAAAAM3R2BtjzVT-uAtstkl2iugMzC6AtnpkojJbji...
23.619048
83
0.764113
from TikTokApi import TikTokApi api = TikTokApi.get_instance() results = 10 userPosts = api.userPosts( "6745191554350760966", "MS4wLjABAAAAM3R2BtjzVT-uAtstkl2iugMzC6AtnpkojJbjiOdDDrdsTiTR75-8lyWJCY5VvDrZ", 30, ) for tiktok in userPosts: print(tiktok["desc"]) print(len(userPosts))
true
true
f740b0970201a6d8b8fdfbe3c4d3f6ec97718acd
5,819
py
Python
Examples/Tensorboard/SimpleMNIST.py
catycaldwell/CNTK
86a20080b19255b96ada85b6a7ab6b8e7be7465b
[ "RSA-MD" ]
null
null
null
Examples/Tensorboard/SimpleMNIST.py
catycaldwell/CNTK
86a20080b19255b96ada85b6a7ab6b8e7be7465b
[ "RSA-MD" ]
null
null
null
Examples/Tensorboard/SimpleMNIST.py
catycaldwell/CNTK
86a20080b19255b96ada85b6a7ab6b8e7be7465b
[ "RSA-MD" ]
1
2021-01-21T05:58:03.000Z
2021-01-21T05:58:03.000Z
# Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE.md file in the project root # for full license information. # ============================================================================== import numpy as np import sys import os from cntk import Trainer from cntk.io import...
43.75188
119
0.706994
import numpy as np import sys import os from cntk import Trainer from cntk.io import MinibatchSource, CTFDeserializer, StreamDef, StreamDefs, INFINITELY_REPEAT, FULL_DATA_SWEEP from cntk.learner import sgd, learning_rate_schedule, UnitType from cntk.ops import input_variable, cross_entropy_with_softmax, classifica...
true
true
f740b1511160d9a755d88c1f3b7c6973861cdceb
4,460
py
Python
tests/cases/specified_location.py
riels89/gunpowder
e523b49ca846a9fd46ab6fc0dd1040cc4a4d53b4
[ "MIT" ]
null
null
null
tests/cases/specified_location.py
riels89/gunpowder
e523b49ca846a9fd46ab6fc0dd1040cc4a4d53b4
[ "MIT" ]
null
null
null
tests/cases/specified_location.py
riels89/gunpowder
e523b49ca846a9fd46ab6fc0dd1040cc4a4d53b4
[ "MIT" ]
null
null
null
# from .provider_test import ProviderTest, TestSource from gunpowder import (BatchProvider, ArrayKeys, ArraySpec, Roi, Batch, Coordinate, SpecifiedLocation, build, BatchRequest, Array, ArrayKey) import numpy as np import unittest class TestSourceSpecifiedLocation(BatchPro...
30.758621
79
0.465022
from gunpowder import (BatchProvider, ArrayKeys, ArraySpec, Roi, Batch, Coordinate, SpecifiedLocation, build, BatchRequest, Array, ArrayKey) import numpy as np import unittest class TestSourceSpecifiedLocation(BatchProvider): def __init__(self, roi, voxel_size): ...
true
true
f740b3006beea47d3d941af6c052a97016d87f3c
377
py
Python
setup.py
yang-lina/Bayesian-Hierarchical-Clustering
2e35d3c3d59e33cd851f8497d1cd592d601b8fbb
[ "MIT" ]
1
2019-09-23T18:51:58.000Z
2019-09-23T18:51:58.000Z
setup.py
yang-lina/Bayesian-Hierarchical-Clustering
2e35d3c3d59e33cd851f8497d1cd592d601b8fbb
[ "MIT" ]
null
null
null
setup.py
yang-lina/Bayesian-Hierarchical-Clustering
2e35d3c3d59e33cd851f8497d1cd592d601b8fbb
[ "MIT" ]
1
2020-05-08T17:42:37.000Z
2020-05-08T17:42:37.000Z
from setuptools import setup setup(name='bhc', version='0.1', description='Bayesian Hierarchical Clustering', url='https://github.com/qxxxd/bhc', author='Xiaodi Qin, Lina Yang', author_email='xq24@duke.edu, ly81@duke.edu', license='MIT', packages=['bhc'], #install_requir...
29
55
0.6313
from setuptools import setup setup(name='bhc', version='0.1', description='Bayesian Hierarchical Clustering', url='https://github.com/qxxxd/bhc', author='Xiaodi Qin, Lina Yang', author_email='xq24@duke.edu, ly81@duke.edu', license='MIT', packages=['bhc'], zip_safe...
true
true