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
1c2a3c4ee922275dfe52ab9f7b41eaaa0e1a5b9d
1,719
py
Python
venv/Lib/site-packages/nipype/interfaces/afni/tests/test_auto_Automask.py
richung99/digitizePlots
6b408c820660a415a289726e3223e8f558d3e18b
[ "MIT" ]
585
2015-01-12T16:06:47.000Z
2022-03-26T14:51:08.000Z
nipype/interfaces/afni/tests/test_auto_Automask.py
tamires-consulting/nipype
b7879d75a63b6500b2e7d2c3eba5aa7670339274
[ "Apache-2.0" ]
2,329
2015-01-01T09:56:41.000Z
2022-03-30T14:24:49.000Z
nipype/interfaces/afni/tests/test_auto_Automask.py
tamires-consulting/nipype
b7879d75a63b6500b2e7d2c3eba5aa7670339274
[ "Apache-2.0" ]
487
2015-01-20T01:04:52.000Z
2022-03-21T21:22:47.000Z
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from ..preprocess import Automask def test_Automask_inputs(): input_map = dict( args=dict( argstr="%s", ), brain_file=dict( argstr="-apply_prefix %s", extensions=None, name_source="in_file...
24.913043
67
0.502618
from ..preprocess import Automask def test_Automask_inputs(): input_map = dict( args=dict( argstr="%s", ), brain_file=dict( argstr="-apply_prefix %s", extensions=None, name_source="in_file", name_template="%s_masked", ), ...
true
true
1c2a3cff8d3692c4ac580b4c99d99dd26ef14b42
70,023
py
Python
patroni/ha.py
Anapaya/patroni
153ddd5b9bf3d3bc947c5e134bd3a9f531325aee
[ "MIT" ]
null
null
null
patroni/ha.py
Anapaya/patroni
153ddd5b9bf3d3bc947c5e134bd3a9f531325aee
[ "MIT" ]
3
2019-03-25T08:01:20.000Z
2019-09-04T09:05:48.000Z
patroni/ha.py
Anapaya/patroni
153ddd5b9bf3d3bc947c5e134bd3a9f531325aee
[ "MIT" ]
1
2019-03-19T11:29:50.000Z
2019-03-19T11:29:50.000Z
import datetime import functools import json import logging import psycopg2 import requests import sys import time import uuid from collections import namedtuple from multiprocessing.pool import ThreadPool from patroni.async_executor import AsyncExecutor, CriticalTask from patroni.exceptions import DCSError, PostgresC...
50.521645
120
0.627465
import datetime import functools import json import logging import psycopg2 import requests import sys import time import uuid from collections import namedtuple from multiprocessing.pool import ThreadPool from patroni.async_executor import AsyncExecutor, CriticalTask from patroni.exceptions import DCSError, PostgresC...
true
true
1c2a3ec5ba127a12888d9e04947fa8362edfbdd6
1,363
py
Python
setup.py
FriedBotStudio/short_lived_tokens
dd823cfd81ae6e211f9281826bb367a8fcb6fd5a
[ "MIT" ]
null
null
null
setup.py
FriedBotStudio/short_lived_tokens
dd823cfd81ae6e211f9281826bb367a8fcb6fd5a
[ "MIT" ]
null
null
null
setup.py
FriedBotStudio/short_lived_tokens
dd823cfd81ae6e211f9281826bb367a8fcb6fd5a
[ "MIT" ]
null
null
null
__version__ = '' import os import setuptools curr_dir = os.path.curdir with open('short_lived_tokens/VERSION') as version_file: __version__ = version_file.read().strip() short_description = "Short lived tokens v{}".format(__version__) with open("README.md", "r") as fh: long_description = fh.read() setupto...
30.288889
85
0.683786
__version__ = '' import os import setuptools curr_dir = os.path.curdir with open('short_lived_tokens/VERSION') as version_file: __version__ = version_file.read().strip() short_description = "Short lived tokens v{}".format(__version__) with open("README.md", "r") as fh: long_description = fh.read() setupto...
true
true
1c2a3f3cf086618942b658e64f967e06bb6596e3
7,719
py
Python
data_profiler/labelers/labeler_utils.py
gme5078/data-profiler
602cc5e4f4463f9b807000abf3893815918d0723
[ "Apache-2.0" ]
null
null
null
data_profiler/labelers/labeler_utils.py
gme5078/data-profiler
602cc5e4f4463f9b807000abf3893815918d0723
[ "Apache-2.0" ]
null
null
null
data_profiler/labelers/labeler_utils.py
gme5078/data-profiler
602cc5e4f4463f9b807000abf3893815918d0723
[ "Apache-2.0" ]
null
null
null
import scipy import numpy as np import os import sys from data_profiler.labelers.classification_report_utils import classification_report import warnings from sklearn.exceptions import UndefinedMetricWarning warnings.filterwarnings("ignore", category=UndefinedMetricWarning) # in case of data profiler in own repo _f...
41.951087
104
0.623785
import scipy import numpy as np import os import sys from data_profiler.labelers.classification_report_utils import classification_report import warnings from sklearn.exceptions import UndefinedMetricWarning warnings.filterwarnings("ignore", category=UndefinedMetricWarning) _file_dir = os.path.dirname(os.path.absp...
true
true
1c2a40a6628c6cac23b47ebf53f9f0e17851a164
524
py
Python
url_shortener/tests/test_link_model.py
Andrelpoj/hire.me
79428e2094a6b56e762a7f958e1b75f395f59cef
[ "Apache-2.0" ]
null
null
null
url_shortener/tests/test_link_model.py
Andrelpoj/hire.me
79428e2094a6b56e762a7f958e1b75f395f59cef
[ "Apache-2.0" ]
null
null
null
url_shortener/tests/test_link_model.py
Andrelpoj/hire.me
79428e2094a6b56e762a7f958e1b75f395f59cef
[ "Apache-2.0" ]
null
null
null
import pytest from src.models import Link, shorten_url def test_shorten_url_collision(client, db, mocker): mocker.patch( 'src.models.Link.find_by_alias', wraps= lambda x : x in db) long_url = "https://www.google.com/search?q=capivaras&oq=capivaras&aqs=chrome..69i57j35i39j69i59j46j...
27.578947
144
0.673664
import pytest from src.models import Link, shorten_url def test_shorten_url_collision(client, db, mocker): mocker.patch( 'src.models.Link.find_by_alias', wraps= lambda x : x in db) long_url = "https://www.google.com/search?q=capivaras&oq=capivaras&aqs=chrome..69i57j35i39j69i59j46j...
true
true
1c2a41f3fe66e18e60e15fa6a562476d51efa16f
14,292
py
Python
titanfp/fpbench/fpcparser.py
billzorn/fpunreal
5ba896298f2acc53652112ea4426508483d85a04
[ "MIT" ]
4
2019-02-21T06:15:26.000Z
2020-09-08T21:06:41.000Z
titanfp/fpbench/fpcparser.py
billzorn/fpunreal
5ba896298f2acc53652112ea4426508483d85a04
[ "MIT" ]
3
2019-02-22T02:21:09.000Z
2021-08-31T20:25:23.000Z
titanfp/fpbench/fpcparser.py
billzorn/fpunreal
5ba896298f2acc53652112ea4426508483d85a04
[ "MIT" ]
null
null
null
import typing import re import antlr4 from .FPCoreLexer import FPCoreLexer from .FPCoreParser import FPCoreParser from .FPCoreVisitor import FPCoreVisitor from .fpcommon import * from . import fpcast as ast class Visitor(FPCoreVisitor): def _parse_props(self, props): parsed = {} for prop in prop...
31.20524
105
0.559124
import typing import re import antlr4 from .FPCoreLexer import FPCoreLexer from .FPCoreParser import FPCoreParser from .FPCoreVisitor import FPCoreVisitor from .fpcommon import * from . import fpcast as ast class Visitor(FPCoreVisitor): def _parse_props(self, props): parsed = {} for prop in prop...
true
true
1c2a4318706a31b2d93fb44dc90a216ac4767c6a
488
py
Python
app/ui/views.py
Kanin/nginx-ui
12da0db2d289361cda0c8220429cac86802ee040
[ "MIT" ]
1
2022-01-26T18:59:04.000Z
2022-01-26T18:59:04.000Z
app/ui/views.py
Kanin/nginx-ui
12da0db2d289361cda0c8220429cac86802ee040
[ "MIT" ]
null
null
null
app/ui/views.py
Kanin/nginx-ui
12da0db2d289361cda0c8220429cac86802ee040
[ "MIT" ]
1
2021-07-08T04:53:07.000Z
2021-07-08T04:53:07.000Z
import os import flask from flask_login import login_required from app.ui import ui @ui.route("/", methods=["GET"]) @login_required def index(): """ Delivers the home page of Nginx UI. :return: Rendered HTML document. :rtype: str """ nginx_path = flask.current_app.config["NGINX_PATH"] c...
23.238095
104
0.702869
import os import flask from flask_login import login_required from app.ui import ui @ui.route("/", methods=["GET"]) @login_required def index(): nginx_path = flask.current_app.config["NGINX_PATH"] config = [file for file in os.listdir(nginx_path) if os.path.isfile(os.path.join(nginx_path, file))] return...
true
true
1c2a433284ab0ed9d28279e9297980256a630249
1,612
py
Python
src/summary.py
jonathanhines/cucSpiritVisuals
49f42e439afa12ebd16994053766cca9ce9b8cab
[ "MIT" ]
null
null
null
src/summary.py
jonathanhines/cucSpiritVisuals
49f42e439afa12ebd16994053766cca9ce9b8cab
[ "MIT" ]
null
null
null
src/summary.py
jonathanhines/cucSpiritVisuals
49f42e439afa12ebd16994053766cca9ce9b8cab
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np import matplotlib.pyplot as plt from numpy.polynomial.polynomial import polyfit def plot(year): filePath = "./data/CUC" + year + ".csv" chart_title = "CUC" + year + " Average Spirit Score vs Rank" chart_file_name = "./results/CUC" + year + "_SOTG_vs_rank.png" df =...
33.583333
121
0.574442
import pandas as pd import numpy as np import matplotlib.pyplot as plt from numpy.polynomial.polynomial import polyfit def plot(year): filePath = "./data/CUC" + year + ".csv" chart_title = "CUC" + year + " Average Spirit Score vs Rank" chart_file_name = "./results/CUC" + year + "_SOTG_vs_rank.png" df =...
true
true
1c2a451d3578319f6f0d9b67cb14bc09090a13d6
1,299
py
Python
code/python/c1000_create_webpage.py
jesnyder/allogenic
fa930d49770de75e512c02b41387c1bdb5755e66
[ "MIT" ]
1
2021-12-01T20:20:21.000Z
2021-12-01T20:20:21.000Z
code/python/c1000_create_webpage.py
jesnyder/allogenic
fa930d49770de75e512c02b41387c1bdb5755e66
[ "MIT" ]
null
null
null
code/python/c1000_create_webpage.py
jesnyder/allogenic
fa930d49770de75e512c02b41387c1bdb5755e66
[ "MIT" ]
null
null
null
import os import matplotlib.pyplot as plt import numpy as np import pandas as pd import requests from c0001_retrieve_meta import retrieve_path def create_webpage(): """ Objective: Summarize the projects and findings Tasks: 1. Write summary of html """ print("run...
18.041667
104
0.540416
import os import matplotlib.pyplot as plt import numpy as np import pandas as pd import requests from c0001_retrieve_meta import retrieve_path def create_webpage(): print("running create_webpage") tasks = [1] if 1 in tasks: introduction_html() print("completed create_webp...
true
true
1c2a458d866456b9963ffcb7cb7e68c637d038a8
1,226
py
Python
insights/parsr/tests/test_many.py
lhuett/insights-core
1c84eeffc037f85e2bbf60c9a302c83aa1a50cf8
[ "Apache-2.0" ]
121
2017-05-30T20:23:25.000Z
2022-03-23T12:52:15.000Z
insights/parsr/tests/test_many.py
lhuett/insights-core
1c84eeffc037f85e2bbf60c9a302c83aa1a50cf8
[ "Apache-2.0" ]
1,977
2017-05-26T14:36:03.000Z
2022-03-31T10:38:53.000Z
insights/parsr/tests/test_many.py
lhuett/insights-core
1c84eeffc037f85e2bbf60c9a302c83aa1a50cf8
[ "Apache-2.0" ]
244
2017-05-30T20:22:57.000Z
2022-03-26T10:09:39.000Z
import pytest from insights.parsr import Char, Many def test_many(): a = Char("a") b = Char("b") x = Char("x") xs = Many(x) assert xs("") == [] assert xs("a") == [] assert xs("x") == ["x"] assert xs("xxxxx") == ["x", "x", "x", "x", "x"] assert xs("xxxxb") == ["x", "x", "x", "x"] ...
22.290909
63
0.414356
import pytest from insights.parsr import Char, Many def test_many(): a = Char("a") b = Char("b") x = Char("x") xs = Many(x) assert xs("") == [] assert xs("a") == [] assert xs("x") == ["x"] assert xs("xxxxx") == ["x", "x", "x", "x", "x"] assert xs("xxxxb") == ["x", "x", "x", "x"] ...
true
true
1c2a45aa61ea99e236668d11ad575c2392a86af9
12,380
py
Python
crusaders/__init__.py
vladiibine/bots
795e4a67c748b47d8a55cbc31a57f15314de41e5
[ "MIT" ]
null
null
null
crusaders/__init__.py
vladiibine/bots
795e4a67c748b47d8a55cbc31a57f15314de41e5
[ "MIT" ]
null
null
null
crusaders/__init__.py
vladiibine/bots
795e4a67c748b47d8a55cbc31a57f15314de41e5
[ "MIT" ]
null
null
null
from __future__ import print_function from datetime import datetime import sys import time from autopy import mouse from autopy import screen from autopy import key p0_click_monsters = (1352, 407) p1_level_crusaders = (1440, 747) p2_confirm_upgrade = (870, 485) p3_buy_upgrades = (1441, 651) p4_next_page = (1443, 704...
37.289157
86
0.569709
from __future__ import print_function from datetime import datetime import sys import time from autopy import mouse from autopy import screen from autopy import key p0_click_monsters = (1352, 407) p1_level_crusaders = (1440, 747) p2_confirm_upgrade = (870, 485) p3_buy_upgrades = (1441, 651) p4_next_page = (1443, 704...
true
true
1c2a4620cbe8cdc20159b155535d5d5ad452d579
7,175
py
Python
jupyterdrive/mixednbmanager.py
Carreau/jupyter-drive
967955a90fd1b6123e2a79be72a3cb53705be33d
[ "BSD-2-Clause" ]
1
2020-04-21T15:05:31.000Z
2020-04-21T15:05:31.000Z
jupyterdrive/mixednbmanager.py
Carreau/jupyter-drive
967955a90fd1b6123e2a79be72a3cb53705be33d
[ "BSD-2-Clause" ]
null
null
null
jupyterdrive/mixednbmanager.py
Carreau/jupyter-drive
967955a90fd1b6123e2a79be72a3cb53705be33d
[ "BSD-2-Clause" ]
null
null
null
"""A contents manager that combine multiple content managers.""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from .compat import JUPYTER if JUPYTER: from notebook.services.contents.manager import ContentsManager from traitlets.traitlets import List ...
33.217593
104
0.615331
from .compat import JUPYTER if JUPYTER: from notebook.services.contents.manager import ContentsManager from traitlets.traitlets import List from traitlets import import_item else: from IPython.html.services.contents.manager import ContentsManager from IPython.utils.traitlets import List from...
true
true
1c2a479d09f93fe022429b08beca2c0a61c7759e
2,282
py
Python
pro_tes/factories/connexion_app.py
Ayush5120/proTES
5bf1a7394b7c528f6d5a5dc38c05689262ae033a
[ "Apache-2.0" ]
2
2020-02-14T18:41:08.000Z
2020-02-17T06:56:10.000Z
pro_tes/factories/connexion_app.py
Ayush5120/proTES
5bf1a7394b7c528f6d5a5dc38c05689262ae033a
[ "Apache-2.0" ]
22
2018-11-15T18:17:09.000Z
2019-11-21T14:14:40.000Z
pro_tes/factories/connexion_app.py
Ayush5120/proTES
5bf1a7394b7c528f6d5a5dc38c05689262ae033a
[ "Apache-2.0" ]
3
2020-03-25T11:28:40.000Z
2022-03-16T09:41:59.000Z
"""Factory for creating and configuring Connexion app instances.""" from inspect import stack import logging from typing import (Mapping, Optional) from connexion import App from pro_tes.errors.errors import handle_bad_request from pro_tes.config.config_parser import get_conf # Get logger instance logger = logging...
30.837838
79
0.674408
from inspect import stack import logging from typing import (Mapping, Optional) from connexion import App from pro_tes.errors.errors import handle_bad_request from pro_tes.config.config_parser import get_conf logger = logging.getLogger(__name__) def create_connexion_app(config: Optional[Mapping] = None) -> App:...
true
true
1c2a47d1801c0ef25460c345b1ab2ba43aef81e3
180
py
Python
tests/test_utils.py
msonderegger/PolyglotDB
583fd8ec14c2e34807b45b9f15fa19cffa130bfa
[ "MIT" ]
25
2016-01-28T20:47:07.000Z
2021-11-29T16:13:07.000Z
tests/test_utils.py
msonderegger/PolyglotDB
583fd8ec14c2e34807b45b9f15fa19cffa130bfa
[ "MIT" ]
120
2016-04-07T17:55:09.000Z
2022-03-24T18:30:10.000Z
tests/test_utils.py
PhonologicalCorpusTools/PolyglotDB
7640212c7062cf44ae911081241ce83a26ced2eb
[ "MIT" ]
10
2015-12-03T20:06:58.000Z
2021-02-11T03:02:48.000Z
from polyglotdb.utils import get_corpora_list def test_corpora_list(acoustic_config): corpora_list = get_corpora_list(acoustic_config) assert 'acoustic' in corpora_list
22.5
52
0.816667
from polyglotdb.utils import get_corpora_list def test_corpora_list(acoustic_config): corpora_list = get_corpora_list(acoustic_config) assert 'acoustic' in corpora_list
true
true
1c2a484abee859656aebf28041fdf3894471da21
398
py
Python
project/unievents/migrations/0024_rso_is_active.py
Ovsyanka83/COP4710_Project
b5abb192c8283830bbda2a0bed6bda9056b6abeb
[ "MIT" ]
null
null
null
project/unievents/migrations/0024_rso_is_active.py
Ovsyanka83/COP4710_Project
b5abb192c8283830bbda2a0bed6bda9056b6abeb
[ "MIT" ]
null
null
null
project/unievents/migrations/0024_rso_is_active.py
Ovsyanka83/COP4710_Project
b5abb192c8283830bbda2a0bed6bda9056b6abeb
[ "MIT" ]
3
2021-04-03T20:16:15.000Z
2021-04-05T18:08:44.000Z
# Generated by Django 3.2 on 2021-04-20 00:43 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('unievents', '0023_auto_20210419_1647'), ] operations = [ migrations.AddField( model_name='rso', name='is_active', ...
20.947368
64
0.605528
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('unievents', '0023_auto_20210419_1647'), ] operations = [ migrations.AddField( model_name='rso', name='is_active', field=models.BooleanField(blank=True,...
true
true
1c2a486d173f32eeaf007a605b5fb5b77fcc1cea
753
py
Python
solutions/python/2017/leastCommonDenominator.py
lucifer1198/Codesignal
07d6d6457b8b3a9f1c51118b0e8e44cce66ee039
[ "MIT" ]
2
2020-12-21T22:09:26.000Z
2021-01-01T15:40:01.000Z
solutions/python/2017/leastCommonDenominator.py
nsu1210/Codesignal
07d6d6457b8b3a9f1c51118b0e8e44cce66ee039
[ "MIT" ]
null
null
null
solutions/python/2017/leastCommonDenominator.py
nsu1210/Codesignal
07d6d6457b8b3a9f1c51118b0e8e44cce66ee039
[ "MIT" ]
1
2021-01-28T18:15:02.000Z
2021-01-28T18:15:02.000Z
""" You need to sum up a bunch of fractions that have different denominators. In order to do this, you need to find the least common denominator of all the fractions. As a professional programmer, you know that the least common denominator is in fact their LCM. Least common multiple (LCM) of numbers a and b is defined...
37.65
257
0.763612
from fractions import gcd from functools import reduce def leastCommonDenominator(denominators): return reduce(lambda x, y: (x * y) // gcd(x, y), denominators)
true
true
1c2a49363c6187426220c1d7036a72bb1fe691b7
9,658
py
Python
fit_Mdyn/run_fit_emcee_simp1.py
vegajustin26/dyn-masses
9ff73fcec53beac59557c95fb1e47dc22947a333
[ "MIT" ]
null
null
null
fit_Mdyn/run_fit_emcee_simp1.py
vegajustin26/dyn-masses
9ff73fcec53beac59557c95fb1e47dc22947a333
[ "MIT" ]
null
null
null
fit_Mdyn/run_fit_emcee_simp1.py
vegajustin26/dyn-masses
9ff73fcec53beac59557c95fb1e47dc22947a333
[ "MIT" ]
null
null
null
import os, sys, time import numpy as np import copy as copy from astropy.io import fits from cube_parser import cube_parser from vis_sample import vis_sample from vis_sample.file_handling import import_data_uvfits from scipy.ndimage import convolve1d from scipy.interpolate import interp1d import emcee from multiprocess...
35.638376
82
0.629841
import os, sys, time import numpy as np import copy as copy from astropy.io import fits from cube_parser import cube_parser from vis_sample import vis_sample from vis_sample.file_handling import import_data_uvfits from scipy.ndimage import convolve1d from scipy.interpolate import interp1d import emcee from multiprocess...
true
true
1c2a4a6f9f0b81737cf92ec20dbd6f105db13c1a
16,164
py
Python
eval.py
CheungBH/ssd.pytorch
0aac2d67072f6083555f87cc479df7e6fc4cc080
[ "MIT" ]
null
null
null
eval.py
CheungBH/ssd.pytorch
0aac2d67072f6083555f87cc479df7e6fc4cc080
[ "MIT" ]
null
null
null
eval.py
CheungBH/ssd.pytorch
0aac2d67072f6083555f87cc479df7e6fc4cc080
[ "MIT" ]
null
null
null
"""Adapted from: @longcw faster_rcnn_pytorch: https://github.com/longcw/faster_rcnn_pytorch @rbgirshick py-faster-rcnn https://github.com/rbgirshick/py-faster-rcnn Licensed under The MIT License [see LICENSE for details] """ from __future__ import print_function import torch import torch.nn as nn import to...
36.323596
80
0.561557
from __future__ import print_function import torch import torch.nn as nn import torch.backends.cudnn as cudnn from torch.autograd import Variable from data import VOC_ROOT, VOCAnnotationTransform, VOCDetection, BaseTransform from data import VOC_CLASSES as labelmap import torch.utils.data as data from ssd import buil...
true
true
1c2a4b27bb45f3dd99a2a45afedfa56be255d8aa
1,050
py
Python
src/github3/search/issue.py
butsyk/github3.py
72fa5125fce75c916733839963554765c907e9e7
[ "BSD-3-Clause" ]
null
null
null
src/github3/search/issue.py
butsyk/github3.py
72fa5125fce75c916733839963554765c907e9e7
[ "BSD-3-Clause" ]
null
null
null
src/github3/search/issue.py
butsyk/github3.py
72fa5125fce75c916733839963554765c907e9e7
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Issue search results implementation.""" from ..models import GitHubCore from ..issues import ShortIssue class IssueSearchResult(GitHubCore): """A representation of a search result containing an issue. This object has the following attributes: .. attribute:: issue A :...
26.25
74
0.644762
from ..models import GitHubCore from ..issues import ShortIssue class IssueSearchResult(GitHubCore): def _update_attributes(self, data): result = data.copy() self.score = result.pop("score") self.text_matches = result.pop("text_matches", []) self.issue = ShortIssue(result, self)...
true
true
1c2a4bfa4da32aa8f84bc6ce0f77895ce995dd6f
4,053
py
Python
code/src/nuvla/job/actions/deployment_log_fetch.py
nuvla/job-engine
58d42bd24d8dd2c6e28541c08df1455c9ac909f6
[ "Apache-2.0" ]
3
2019-04-27T10:36:21.000Z
2019-04-29T12:41:57.000Z
code/src/nuvla/job/actions/deployment_log_fetch.py
nuvla/job-engine
58d42bd24d8dd2c6e28541c08df1455c9ac909f6
[ "Apache-2.0" ]
131
2019-02-13T06:00:49.000Z
2022-03-29T15:06:03.000Z
code/src/nuvla/job/actions/deployment_log_fetch.py
nuvla/job-engine
58d42bd24d8dd2c6e28541c08df1455c9ac909f6
[ "Apache-2.0" ]
1
2020-12-03T11:35:21.000Z
2020-12-03T11:35:21.000Z
# -*- coding: utf-8 -*- import logging from ...connector import docker_cli_connector, \ docker_compose_cli_connector, kubernetes_cli_connector from nuvla.api.resources import Deployment from .deployment_start import initialize_connector from ..actions import action action_name = 'fetch_deployment_log' log = log...
34.641026
100
0.613373
import logging from ...connector import docker_cli_connector, \ docker_compose_cli_connector, kubernetes_cli_connector from nuvla.api.resources import Deployment from .deployment_start import initialize_connector from ..actions import action action_name = 'fetch_deployment_log' log = logging.getLogger(action_n...
true
true
1c2a4cce7f8eff746db9c585367dc4e97530557b
7,895
py
Python
synapse/replication/tcp/streams/events.py
ThiefMaster/synapse
f2af3e4fc550e7e93be1b0f425c3e9c484b96293
[ "Apache-2.0" ]
1
2020-07-12T00:18:52.000Z
2020-07-12T00:18:52.000Z
synapse/replication/tcp/streams/events.py
ThiefMaster/synapse
f2af3e4fc550e7e93be1b0f425c3e9c484b96293
[ "Apache-2.0" ]
null
null
null
synapse/replication/tcp/streams/events.py
ThiefMaster/synapse
f2af3e4fc550e7e93be1b0f425c3e9c484b96293
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2017 Vector Creations Ltd # Copyright 2019 New Vector Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2....
35.088889
88
0.661938
import heapq from collections import Iterable from typing import List, Tuple, Type import attr from ._base import Stream, StreamUpdateResult, Token, current_token_without_instance @attr.s(slots=True, frozen=True) class EventsStreamRow(object): type = attr.ib() data = attr.ib() class B...
true
true
1c2a4da8ba74fb1749f05d50de22b41adaf51f3e
1,675
py
Python
pyexamples/SimpleDisplay.py
lukka/Pangolin
86eb4975fc4fc8b5d92148c2e370045ae9bf9f5d
[ "MIT" ]
34
2019-08-20T00:14:49.000Z
2019-08-22T22:37:49.000Z
pyexamples/SimpleDisplay.py
lukka/Pangolin
86eb4975fc4fc8b5d92148c2e370045ae9bf9f5d
[ "MIT" ]
15
2021-05-19T23:40:50.000Z
2021-07-06T08:24:40.000Z
pyexamples/SimpleDisplay.py
lukka/Pangolin
86eb4975fc4fc8b5d92148c2e370045ae9bf9f5d
[ "MIT" ]
4
2021-05-26T02:10:43.000Z
2021-09-04T17:59:51.000Z
#!/usr/bin/env python3 import sys sys.path.append("../build/src") import pypangolin as pango from OpenGL.GL import * def a_callback(): print("a pressed") def main(): win = pango.CreateWindowAndBind("pySimpleDisplay", 640, 480) glEnable(GL_DEPTH_TEST) pm = pango.ProjectionMatrix(640, 480, 420, 420...
25
85
0.620299
import sys sys.path.append("../build/src") import pypangolin as pango from OpenGL.GL import * def a_callback(): print("a pressed") def main(): win = pango.CreateWindowAndBind("pySimpleDisplay", 640, 480) glEnable(GL_DEPTH_TEST) pm = pango.ProjectionMatrix(640, 480, 420, 420, 320, 240, 0.1, 1000)...
true
true
1c2a4e45e29b39849af34b4018cd28405ead2ca5
414
py
Python
src/main/migrations/0007_auto_20190414_1502.py
kirillismad/django_blog
9c5d1549ca415e02c8705e4797b55b1272c44428
[ "MIT" ]
null
null
null
src/main/migrations/0007_auto_20190414_1502.py
kirillismad/django_blog
9c5d1549ca415e02c8705e4797b55b1272c44428
[ "MIT" ]
12
2020-01-09T09:22:30.000Z
2022-03-11T23:43:55.000Z
src/main/migrations/0007_auto_20190414_1502.py
kirillismad/django_blog
9c5d1549ca415e02c8705e4797b55b1272c44428
[ "MIT" ]
null
null
null
# Generated by Django 2.1.7 on 2019-04-14 12:02 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('main', '0006_auto_20190323_1752'), ] operations = [ migrations.AlterField( model_name='tag', name='title', ...
21.789474
85
0.60628
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('main', '0006_auto_20190323_1752'), ] operations = [ migrations.AlterField( model_name='tag', name='title', field=models.CharField(max_length=16, unique...
true
true
1c2a4e63cc76f5ee20b0f794ecdac59c100c3bd1
8,267
py
Python
blockchain.py
volf52/blockpy
488d3757ed690c058c6e6e64572cd190c2b92fd5
[ "MIT" ]
null
null
null
blockchain.py
volf52/blockpy
488d3757ed690c058c6e6e64572cd190c2b92fd5
[ "MIT" ]
null
null
null
blockchain.py
volf52/blockpy
488d3757ed690c058c6e6e64572cd190c2b92fd5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ A simple implementation of Blockchain in Python. @author: Muhammad Arslan <rslnkrmt2552@gmail.com> """ import hashlib import json import requests from time import time from uuid import uuid4 from textwrap import dedent from flask import Flask, jsonify, request from urllib.parse import u...
28.905594
108
0.584734
import hashlib import json import requests from time import time from uuid import uuid4 from textwrap import dedent from flask import Flask, jsonify, request from urllib.parse import urlparse class Blockchain(object): def __init__(self): self.chain = [] self.current_transactions = [] sel...
true
true
1c2a4f856378f5f6862c783cf6cd99f449623c3f
3,271
py
Python
nlpir/native/classifier.py
NLPIR-team/nlpir-python
029f81e69ee561725fa017dce09cfd55acb34d20
[ "MIT" ]
18
2021-01-01T03:07:17.000Z
2022-03-20T11:25:46.000Z
nlpir/native/classifier.py
yangyaofei/nlpir-python
af7bca9e2c3ba5f07316364da8f5e46a2bbc7c52
[ "MIT" ]
23
2020-12-04T07:10:09.000Z
2022-03-10T09:39:26.000Z
nlpir/native/classifier.py
yangyaofei/nlpir-python
af7bca9e2c3ba5f07316364da8f5e46a2bbc7c52
[ "MIT" ]
13
2020-10-23T13:38:26.000Z
2022-03-18T12:10:10.000Z
# coding=utf-8 from nlpir.native.nlpir_base import NLPIRBase from ctypes import c_bool, c_char_p, c_int, POINTER, Structure, c_float class StDoc(Structure): __fields__ = [ ("sTitle", c_char_p), ("sContent", c_char_p), ("sAuthor", c_char_p), ("sBoard", c_char_p), ("sDatatype...
27.957265
112
0.597982
from nlpir.native.nlpir_base import NLPIRBase from ctypes import c_bool, c_char_p, c_int, POINTER, Structure, c_float class StDoc(Structure): __fields__ = [ ("sTitle", c_char_p), ("sContent", c_char_p), ("sAuthor", c_char_p), ("sBoard", c_char_p), ("sDatatype", c_char_p) ...
true
true
1c2a4fb0780d02319190b9bae9f8b719274379f8
2,082
py
Python
tests/test_aws_stacks_iam.py
ibejohn818/stackformation
7ab5b29b584c64cea31add470c4f6df847d19c1c
[ "MIT" ]
null
null
null
tests/test_aws_stacks_iam.py
ibejohn818/stackformation
7ab5b29b584c64cea31add470c4f6df847d19c1c
[ "MIT" ]
1,396
2017-12-24T18:25:05.000Z
2022-03-31T15:05:19.000Z
tests/test_aws_stacks_iam.py
ibejohn818/stackformation
7ab5b29b584c64cea31add470c4f6df847d19c1c
[ "MIT" ]
null
null
null
import pytest from stackformation.aws.stacks import iam, s3 from stackformation import (Infra) @pytest.fixture def test_infra(): infra = Infra('test') test_infra = infra.create_sub_infra('test') return { 'infra': infra, 'test_infra': test_infra } def test_iam_base(t...
24.209302
72
0.695485
import pytest from stackformation.aws.stacks import iam, s3 from stackformation import (Infra) @pytest.fixture def test_infra(): infra = Infra('test') test_infra = infra.create_sub_infra('test') return { 'infra': infra, 'test_infra': test_infra } def test_iam_base(t...
true
true
1c2a507795c761528a8d48e626090ae835941784
1,243
py
Python
tests/utils/test_validators.py
atz/CTFd
464f7bde58c7a6d5d45ee8be80a2b76c0ed25a3d
[ "Apache-2.0" ]
21
2019-06-15T14:28:51.000Z
2021-09-02T03:01:51.000Z
tests/utils/test_validators.py
atz/CTFd
464f7bde58c7a6d5d45ee8be80a2b76c0ed25a3d
[ "Apache-2.0" ]
132
2020-07-31T09:11:13.000Z
2022-03-30T22:05:18.000Z
tests/utils/test_validators.py
erseco/CTFd
a6a4906ab058b79bca7af48038fa7badc1744340
[ "Apache-2.0" ]
24
2019-06-06T09:47:24.000Z
2022-02-24T09:16:59.000Z
from marshmallow import ValidationError from CTFd.utils.validators import validate_country_code, validate_email def test_validate_country_code(): assert validate_country_code("") is None # TODO: This looks poor, when everything moves to pytest we should remove exception catches like this. try: va...
37.666667
106
0.717619
from marshmallow import ValidationError from CTFd.utils.validators import validate_country_code, validate_email def test_validate_country_code(): assert validate_country_code("") is None try: validate_country_code("ZZ") except ValidationError: pass def test_validate_email(): as...
true
true
1c2a50fed08ec897070d921f9fbeb80211283270
237
py
Python
nlp/2020-10-07/ex05.py
kogepanh/class-numeric
4fd4cb56818339c6348f9f691c64fb33a09e1b69
[ "MIT" ]
null
null
null
nlp/2020-10-07/ex05.py
kogepanh/class-numeric
4fd4cb56818339c6348f9f691c64fb33a09e1b69
[ "MIT" ]
null
null
null
nlp/2020-10-07/ex05.py
kogepanh/class-numeric
4fd4cb56818339c6348f9f691c64fb33a09e1b69
[ "MIT" ]
null
null
null
import MeCab text = "私はバナナが好きです。" mecabTagger = MeCab.Tagger("-Ochasen") node = mecabTagger.parseToNode(text) while node: word = node.surface hinshi = node.feature.split(",")[0] print(word+": "+hinshi) node = node.next
19.75
39
0.666667
import MeCab text = "私はバナナが好きです。" mecabTagger = MeCab.Tagger("-Ochasen") node = mecabTagger.parseToNode(text) while node: word = node.surface hinshi = node.feature.split(",")[0] print(word+": "+hinshi) node = node.next
true
true
1c2a513974f31442efd066d238d5a1b4a802d846
1,127
py
Python
swat/cas/__init__.py
arharvey918/python-swat
0db2db2d7c049b23391de419950954c8d505b325
[ "Apache-2.0" ]
133
2016-09-30T18:53:10.000Z
2022-03-25T20:54:06.000Z
swat/cas/__init__.py
arharvey918/python-swat
0db2db2d7c049b23391de419950954c8d505b325
[ "Apache-2.0" ]
113
2017-01-16T21:01:23.000Z
2022-03-29T11:02:21.000Z
swat/cas/__init__.py
arharvey918/python-swat
0db2db2d7c049b23391de419950954c8d505b325
[ "Apache-2.0" ]
65
2016-09-29T15:23:49.000Z
2022-03-04T12:45:43.000Z
#!/usr/bin/env python # encoding: utf-8 # # Copyright SAS Institute # # 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 b...
32.2
82
0.777285
from __future__ import print_function, division, absolute_import, unicode_literals from .utils import InitializeTK, vl, table, initialize_tk from .actions import CASAction, CASActionSet from .connection import CAS, getone, getnext, dir_actions, dir_members from .table import CASTable from .transform...
true
true
1c2a52b72765ab9d38a7438496e42ac9a4875896
5,184
py
Python
atom/http_interface.py
RusticiSoftware/SCORMCloud_GoogAppEngApp
6501fe0da7e4d0c3001750c33c532a7d2c40cecd
[ "Unlicense" ]
2
2015-05-15T20:28:45.000Z
2017-07-23T20:35:59.000Z
atom/http_interface.py
RusticiSoftware/SCORMCloud_GoogAppEngApp
6501fe0da7e4d0c3001750c33c532a7d2c40cecd
[ "Unlicense" ]
null
null
null
atom/http_interface.py
RusticiSoftware/SCORMCloud_GoogAppEngApp
6501fe0da7e4d0c3001750c33c532a7d2c40cecd
[ "Unlicense" ]
2
2021-05-03T01:30:32.000Z
2022-03-23T19:53:08.000Z
#!/usr/bin/python # # Copyright (C) 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
32.603774
77
0.703897
__author__ = 'api.jscudder (Jeff Scudder)' import StringIO USER_AGENT = '%s GData-Python/2.0.11' class Error(Exception): pass class UnparsableUrlObject(Error): pass class ContentLengthRequired(Error): pass class HttpResponse(object): def __init__(self, body=None, status=None, rea...
true
true
1c2a537c5c58563cef117facf3905fc4b36cbd8c
3,652
py
Python
tests/color_test.py
sketchfab/wand
b5e57ee1f8e50cb6af8a45c0a90d5c3d25650e6f
[ "MIT" ]
1
2021-10-10T12:38:30.000Z
2021-10-10T12:38:30.000Z
tests/color_test.py
Kudo/wand
b5e57ee1f8e50cb6af8a45c0a90d5c3d25650e6f
[ "MIT" ]
1
2021-02-24T01:21:40.000Z
2021-02-24T01:21:40.000Z
tests/color_test.py
Kudo/wand
b5e57ee1f8e50cb6af8a45c0a90d5c3d25650e6f
[ "MIT" ]
1
2021-01-04T11:34:26.000Z
2021-01-04T11:34:26.000Z
import platform import time from memory_profiler import memory_usage from pytest import mark from wand.color import Color from wand.compat import xrange from wand.version import MAGICK_VERSION_INFO def test_equals(): """Equality test.""" assert Color('#fff') == Color('#ffffff') == Color('white') assert ...
31.213675
79
0.588445
import platform import time from memory_profiler import memory_usage from pytest import mark from wand.color import Color from wand.compat import xrange from wand.version import MAGICK_VERSION_INFO def test_equals(): assert Color('#fff') == Color('#ffffff') == Color('white') assert Color('#000') == Color('#...
true
true
1c2a574d719d03f4236f11afc9265ee3651fc3a0
13,736
py
Python
specs/monitor/dashboards_v3_spec.py
marojor/sysdig-sdk-python
c554f9f747ff88ce075b50a50d81f75aff327bb1
[ "MIT" ]
45
2016-04-11T16:50:15.000Z
2020-07-11T23:37:51.000Z
specs/monitor/dashboards_v3_spec.py
marojor/sysdig-sdk-python
c554f9f747ff88ce075b50a50d81f75aff327bb1
[ "MIT" ]
74
2016-08-09T17:10:55.000Z
2020-07-09T08:36:16.000Z
specs/monitor/dashboards_v3_spec.py
sysdiglabs/python-sdc-client
283a2cb3ad8062730cc12469a28584ebcbaf2eb1
[ "MIT" ]
39
2016-04-20T17:22:23.000Z
2020-07-08T17:25:52.000Z
import json import os import tempfile from expects import expect, have_key, have_keys, contain, equal, start_with, be_false, have_len, be_empty, not_ from mamba import before, it, context, after, description from sdcclient import SdMonitorClient from specs import be_successful_api_call _DASHBOARD_NAME = "test_dashbo...
50.5
122
0.58576
import json import os import tempfile from expects import expect, have_key, have_keys, contain, equal, start_with, be_false, have_len, be_empty, not_ from mamba import before, it, context, after, description from sdcclient import SdMonitorClient from specs import be_successful_api_call _DASHBOARD_NAME = "test_dashbo...
true
true
1c2a578edcd328360391befacfac4fafbb396262
63,079
py
Python
lib/matplotlib/backends/backend_wx.py
pmarshwx/matplotlib
12be528dbf2114f7c25abf60de8100cb2d4494af
[ "MIT", "BSD-3-Clause" ]
null
null
null
lib/matplotlib/backends/backend_wx.py
pmarshwx/matplotlib
12be528dbf2114f7c25abf60de8100cb2d4494af
[ "MIT", "BSD-3-Clause" ]
null
null
null
lib/matplotlib/backends/backend_wx.py
pmarshwx/matplotlib
12be528dbf2114f7c25abf60de8100cb2d4494af
[ "MIT", "BSD-3-Clause" ]
null
null
null
""" A wxPython backend for matplotlib, based (very heavily) on backend_template.py and backend_gtk.py Author: Jeremy O'Donoghue (jeremy@o-donoghue.com) Derived from original copyright work by John Hunter (jdhunter@ace.bsd.uchicago.edu) Copyright (C) Jeremy O'Donoghue & John Hunter, 2003-4 License: This work ...
33.968228
131
0.595523
from __future__ import (absolute_import, division, print_function, unicode_literals) from six.moves import xrange import sys import os import os.path import math import weakref import warnings import numpy as np import matplotlib from matplotlib.backend_bases import (RendererBase, GraphicsCo...
true
true
1c2a57dd35e7dc840333770219316457482d67c2
5,206
py
Python
gitea_client/models/markdown_option.py
kedros-as/gitea_client
1d2979bed356f172a843c05b305423cf084f7f56
[ "BSD-3-Clause" ]
null
null
null
gitea_client/models/markdown_option.py
kedros-as/gitea_client
1d2979bed356f172a843c05b305423cf084f7f56
[ "BSD-3-Clause" ]
null
null
null
gitea_client/models/markdown_option.py
kedros-as/gitea_client
1d2979bed356f172a843c05b305423cf084f7f56
[ "BSD-3-Clause" ]
null
null
null
# coding: utf-8 """ Gitea API. This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class MarkdownOption(object): """NOTE: This class is...
25.772277
84
0.542259
import pprint import re import six class MarkdownOption(object): swagger_types = { 'context': 'str', 'mode': 'str', 'text': 'str', 'wiki': 'bool' } attribute_map = { 'context': 'Context', 'mode': 'Mode', 'text': 'Text', 'wiki': 'Wiki...
true
true
1c2a58e3623b7a617a1689ccb6ec7388c7d4202e
5,411
py
Python
ocrd_utils/ocrd_utils/logging.py
cclauss/core
cb0f94bc7affbff44ec53ad2258d8f8f6bf996d6
[ "Apache-2.0" ]
null
null
null
ocrd_utils/ocrd_utils/logging.py
cclauss/core
cb0f94bc7affbff44ec53ad2258d8f8f6bf996d6
[ "Apache-2.0" ]
null
null
null
ocrd_utils/ocrd_utils/logging.py
cclauss/core
cb0f94bc7affbff44ec53ad2258d8f8f6bf996d6
[ "Apache-2.0" ]
null
null
null
""" Logging setup By default: Log with lastResort logger, usually STDERR. Logging can be overridden either programmatically in code using the library or by creating one or more of - /etc/ocrd_logging.py - $HOME/ocrd_logging.py - $PWD/ocrd_logging.py These files will be executed in the context of ocrd/ocrd_logging.p...
32.596386
105
0.693957
from __future__ import absolute_import from traceback import format_stack import logging import logging.config import os from .constants import LOG_FORMAT, LOG_TIMEFMT __all__ = [ 'disableLogging', 'getLevelName', 'getLogger', 'initLogging', 'logging', 'setOverrideLogLevel', ] _initialized...
true
true
1c2a590691e276c9a3788234326a22b676fce9af
5,626
py
Python
theano/__init__.py
canyon289/Theano-PyMC
1a9b04bfe480b758ddfa54ba49c88bee3bec419c
[ "BSD-3-Clause" ]
null
null
null
theano/__init__.py
canyon289/Theano-PyMC
1a9b04bfe480b758ddfa54ba49c88bee3bec419c
[ "BSD-3-Clause" ]
null
null
null
theano/__init__.py
canyon289/Theano-PyMC
1a9b04bfe480b758ddfa54ba49c88bee3bec419c
[ "BSD-3-Clause" ]
null
null
null
""" Theano is an optimizing compiler in Python, built to evaluate complicated expressions (especially matrix-valued ones) as quickly as possible. Theano compiles expression graphs (see :doc:`graph` ) that are built by Python code. The expressions in these graphs are called `Apply` nodes and the variables in these grap...
28.558376
79
0.741379
__docformat__ = "restructuredtext en" import logging import os import sys theano_logger = logging.getLogger("theano") logging_default_handler = logging.StreamHandler() logging_default_formatter = logging.Formatter( fmt="%(levelname)s (%(name)s): %(message)s" ) logging_default_handler.setFormatter(logging_def...
true
true
1c2a5999b194d0712886cefe55f0dad7c6af9ea6
27,564
py
Python
research/efficient-hrl/train.py
hjkim-haga/TF-OD-API
22ac477ff4dfb93fe7a32c94b5f0b1e74330902b
[ "Apache-2.0" ]
1
2019-09-11T09:41:11.000Z
2019-09-11T09:41:11.000Z
research/efficient-hrl/train.py
hjkim-haga/TF-OD-API
22ac477ff4dfb93fe7a32c94b5f0b1e74330902b
[ "Apache-2.0" ]
null
null
null
research/efficient-hrl/train.py
hjkim-haga/TF-OD-API
22ac477ff4dfb93fe7a32c94b5f0b1e74330902b
[ "Apache-2.0" ]
null
null
null
# 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 ...
41.078987
109
0.654223
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import time import tensorflow as tf slim = tf.contrib.slim import gin.tf import train_utils import agent as agent_ from agents import circular_buffer from utils import...
true
true
1c2a5d46087afca6f7bbb9a34a6ea4cf49849599
881
py
Python
kubernetes_asyncio/test/test_discovery_api.py
tomplus/kubernetes-asyncio
11c3eb4d50ae822545572aa7b8c15f7153f65a1c
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/test/test_discovery_api.py
tomplus/kubernetes-asyncio
11c3eb4d50ae822545572aa7b8c15f7153f65a1c
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/test/test_discovery_api.py
tomplus/kubernetes-asyncio
11c3eb4d50ae822545572aa7b8c15f7153f65a1c
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1.23.6 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unitte...
22.025
124
0.716232
from __future__ import absolute_import import unittest import kubernetes_asyncio.client from kubernetes_asyncio.client.api.discovery_api import DiscoveryApi from kubernetes_asyncio.client.rest import ApiException class TestDiscoveryApi(unittest.TestCase): def setUp(self): self.api = kubernetes_as...
true
true
1c2a5d7232309f03f4d84ae23ec89e6dec40721c
572
py
Python
lino_xl/lib/tickets/roles.py
khchine5/xl
b1634937a9ce87af1e948eb712b934b11f221d9d
[ "BSD-2-Clause" ]
1
2018-01-12T14:09:48.000Z
2018-01-12T14:09:48.000Z
lino_xl/lib/tickets/roles.py
khchine5/xl
b1634937a9ce87af1e948eb712b934b11f221d9d
[ "BSD-2-Clause" ]
1
2019-09-10T05:03:47.000Z
2019-09-10T05:03:47.000Z
lino_xl/lib/tickets/roles.py
khchine5/xl
b1634937a9ce87af1e948eb712b934b11f221d9d
[ "BSD-2-Clause" ]
null
null
null
# Copyright 2015-2018 Rumma & Ko Ltd # License: BSD (see file COPYING for details) """User roles for `lino_xl.lib.tickets`. """ from lino.core.roles import UserRole class TicketsReader(UserRole): pass class Searcher(UserRole): """A user who can see all tickets. """ class Triager(UserRole): """...
17.333333
68
0.673077
from lino.core.roles import UserRole class TicketsReader(UserRole): pass class Searcher(UserRole): class Triager(UserRole): class Reporter(UserRole): class TicketsStaff(UserRole):
true
true
1c2a5da6ed04220a0e845e4a6b4c4875aa14230c
7,249
py
Python
bktree.py
epinal/pybkt
b35d65bda67669ae6ffeed314a35704ede1381b5
[ "MIT" ]
2
2018-04-06T16:10:47.000Z
2018-04-06T16:56:25.000Z
bktree.py
epinal/pybkt
b35d65bda67669ae6ffeed314a35704ede1381b5
[ "MIT" ]
null
null
null
bktree.py
epinal/pybkt
b35d65bda67669ae6ffeed314a35704ede1381b5
[ "MIT" ]
null
null
null
""" BK-tree data structure to allow fast querying of "close" matches. This code is licensed under a permissive MIT license -- see LICENSE.txt. GitHub https://github.com/elpinal/pybkt """ from collections import deque, Iterable from operator import itemgetter import numpy as np __all__ = ['levenshtein', 'BKTree'] __v...
31.111588
111
0.588357
from collections import deque, Iterable from operator import itemgetter import numpy as np __all__ = ['levenshtein', 'BKTree'] __version__ = '1.0' class BKTree: def __init__(self, distance_func: callable, words: Iterable = list()): self.distance_func = distance_func self.tree = None if...
true
true
1c2a5dc00c123ace87afd0c088ccc3a44efedce6
66,086
py
Python
jiraone/reporting.py
princenyeche/atlassian-cloud-api
78aaeda2b88f7fc9a2f91fca821d02267e4e20b0
[ "MIT" ]
3
2021-01-07T13:42:49.000Z
2021-12-12T17:00:24.000Z
jiraone/reporting.py
princenyeche/atlassian-cloud-api
78aaeda2b88f7fc9a2f91fca821d02267e4e20b0
[ "MIT" ]
5
2021-01-04T08:32:08.000Z
2021-09-02T19:13:17.000Z
jiraone/reporting.py
princenyeche/atlassian-cloud-api
78aaeda2b88f7fc9a2f91fca821d02267e4e20b0
[ "MIT" ]
1
2021-02-14T10:20:34.000Z
2021-02-14T10:20:34.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """Example methods of Generating reports Provided herein are Report Generator Classes and Methods, Easily generate report for the various endpoints """ from typing import Any, Optional, List, Iterable, Tuple, Union, Callable, Dict, NoReturn from collections import deque, n...
49.171131
120
0.502451
from typing import Any, Optional, List, Iterable, Tuple, Union, Callable, Dict, NoReturn from collections import deque, namedtuple, OrderedDict from jiraone import LOGIN, endpoint, add_log, WORK_PATH import json import csv import sys import os import re class Projects: @staticmethod def projects_accessible...
true
true
1c2a5e9a848faca08c63af29c2a564a512656fdc
8,693
py
Python
grind/block_stats.py
jarret/lightning-station
661da52c7b343f23c939dc6b2c9652719f065a5b
[ "MIT" ]
9
2018-12-23T20:13:21.000Z
2020-06-05T19:09:39.000Z
grind/block_stats.py
jarret/lightning-station
661da52c7b343f23c939dc6b2c9652719f065a5b
[ "MIT" ]
null
null
null
grind/block_stats.py
jarret/lightning-station
661da52c7b343f23c939dc6b2c9652719f065a5b
[ "MIT" ]
2
2019-03-07T20:59:01.000Z
2020-11-01T15:38:55.000Z
# Copyright (c) 2020 Jarret Dyrbye # Distributed under the MIT software license, see the accompanying # file LICENSE or http://www.opensource.org/licenses/mit-license.php from bitcoind import Bitcoind from bitcoind import StaticBitcoind import json import statistics from concurrent.futures import ThreadPoolExecutor ...
38.464602
81
0.527206
from bitcoind import Bitcoind from bitcoind import StaticBitcoind import json import statistics from concurrent.futures import ThreadPoolExecutor from concurrent.futures import ProcessPoolExecutor class BlockStats(): def __init__(self, block_hash, max_workers=4): self.block_hash = block_hash ...
true
true
1c2a5ee96f3904150283811665679e82453962c8
7,601
py
Python
continuation_livechat_crawler/main.py
sgfc/youtube_livechat_replay_crawler
e460e5642f1c16aa6660d28fc402d3e990aacf1d
[ "MIT" ]
null
null
null
continuation_livechat_crawler/main.py
sgfc/youtube_livechat_replay_crawler
e460e5642f1c16aa6660d28fc402d3e990aacf1d
[ "MIT" ]
null
null
null
continuation_livechat_crawler/main.py
sgfc/youtube_livechat_replay_crawler
e460e5642f1c16aa6660d28fc402d3e990aacf1d
[ "MIT" ]
null
null
null
import platform import json import sys import os import time import base64 from dotenv import load_dotenv from gcs_wrapper import gcs_wrapper from google.cloud import pubsub_v1 from bs4 import BeautifulSoup import requests if platform.system() == 'Darwin': # run locally load_dotenv('.env') bucket_name = os.e...
38.780612
162
0.617419
import platform import json import sys import os import time import base64 from dotenv import load_dotenv from gcs_wrapper import gcs_wrapper from google.cloud import pubsub_v1 from bs4 import BeautifulSoup import requests if platform.system() == 'Darwin': load_dotenv('.env') bucket_name = os.environ.get("G...
true
true
1c2a5fb17899700717478766447dafee204c2d48
1,362
py
Python
src/day14.py
fwcd/advent-of-code-2015
c2ef34e6bf328c099c5109a1e70680742cf30fb2
[ "MIT" ]
null
null
null
src/day14.py
fwcd/advent-of-code-2015
c2ef34e6bf328c099c5109a1e70680742cf30fb2
[ "MIT" ]
null
null
null
src/day14.py
fwcd/advent-of-code-2015
c2ef34e6bf328c099c5109a1e70680742cf30fb2
[ "MIT" ]
null
null
null
from itertools import islice import re def reindeer(speed, fly_time, rest_time): resting = False kms = 0 j = 0 while True: kms += 0 if resting else speed if (resting and j >= rest_time - 1) or (not resting and j >= fly_time - 1): resting = not resting j = 0 ...
31.674419
189
0.488253
from itertools import islice import re def reindeer(speed, fly_time, rest_time): resting = False kms = 0 j = 0 while True: kms += 0 if resting else speed if (resting and j >= rest_time - 1) or (not resting and j >= fly_time - 1): resting = not resting j = 0 ...
true
true
1c2a60fc3ee9d2095ed5241d6d6c3711ca922b58
2,448
py
Python
nodes/command_bridge_receiver_node.py
CCOMJHC/command_bridge
0db8bbad625041eec93e00672a6dab87daa18285
[ "BSD-2-Clause" ]
null
null
null
nodes/command_bridge_receiver_node.py
CCOMJHC/command_bridge
0db8bbad625041eec93e00672a6dab87daa18285
[ "BSD-2-Clause" ]
null
null
null
nodes/command_bridge_receiver_node.py
CCOMJHC/command_bridge
0db8bbad625041eec93e00672a6dab87daa18285
[ "BSD-2-Clause" ]
5
2019-01-21T20:46:18.000Z
2021-07-07T18:14:09.000Z
#!/usr/bin/env python3 from builtins import str import rospy from std_msgs.msg import String from std_msgs.msg import Bool try: from kongsberg_em_control.srv import EMControl from kongsberg_em_control.srv import EMControlRequest have_em_control = True except ModuleNotFoundError: have_em_control = False last_m...
31.384615
89
0.671569
from builtins import str import rospy from std_msgs.msg import String from std_msgs.msg import Bool try: from kongsberg_em_control.srv import EMControl from kongsberg_em_control.srv import EMControlRequest have_em_control = True except ModuleNotFoundError: have_em_control = False last_messages_received = {} ...
true
true
1c2a6149707db81a0fb329ae8e8203fc023e12e7
8,355
py
Python
test/functional/feature_proxy.py
manfromafar/safecash-temp
de9623678fe76bc58928c8a36b6491d4d0766588
[ "MIT" ]
3
2018-06-05T15:12:08.000Z
2018-07-01T04:51:42.000Z
test/functional/feature_proxy.py
manfromafar/safecash-temp
de9623678fe76bc58928c8a36b6491d4d0766588
[ "MIT" ]
null
null
null
test/functional/feature_proxy.py
manfromafar/safecash-temp
de9623678fe76bc58928c8a36b6491d4d0766588
[ "MIT" ]
2
2018-05-25T13:25:55.000Z
2018-06-30T18:14:10.000Z
#!/usr/bin/env python3 # Copyright (c) 2015-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test safecashd with different proxy configuration. Test plan: - Start safecashd's with different proxy...
41.361386
122
0.625254
import socket import os from test_framework.socks5 import Socks5Configuration, Socks5Command, Socks5Server, AddressType from test_framework.test_framework import SafeCashTestFramework from test_framework.util import ( PORT_MIN, PORT_RANGE, assert_equal, ) from test_framework.netutil import test_ipv6_l...
true
true
1c2a615954fe77e66b155dc3ff9ffd5cbd6e791d
3,230
py
Python
faces_with_hands_tracking/faces_with_hands_tracking.py
Delrom01/live-sign-language-translator
b123c6c7eba5b998340137b3419c003efac32149
[ "MIT" ]
null
null
null
faces_with_hands_tracking/faces_with_hands_tracking.py
Delrom01/live-sign-language-translator
b123c6c7eba5b998340137b3419c003efac32149
[ "MIT" ]
null
null
null
faces_with_hands_tracking/faces_with_hands_tracking.py
Delrom01/live-sign-language-translator
b123c6c7eba5b998340137b3419c003efac32149
[ "MIT" ]
null
null
null
import cv2 # Utilisé pour récupérer le live de la caméra import time # Utilisé pour obtenir la ...
97.878788
260
0.511146
import cv2 import time from hands_tracking.hands_tracking_module import HandsDetector from f...
true
true
1c2a62ab457097d84ee0c57aec5e81375f0e603c
332
py
Python
9498.py
ghdtjf/Beakjon
5e2e05540c53f277397a64a367294c6ba4dbeb43
[ "MIT" ]
null
null
null
9498.py
ghdtjf/Beakjon
5e2e05540c53f277397a64a367294c6ba4dbeb43
[ "MIT" ]
null
null
null
9498.py
ghdtjf/Beakjon
5e2e05540c53f277397a64a367294c6ba4dbeb43
[ "MIT" ]
null
null
null
score = int(input()) if 0<= score and score <=100: if 90 <= score and score <= 100: print("A") elif 80<= score and score <= 89: print('B') elif 70<= score and score <= 79: print('C') elif 60<= score and score <= 69: print('D') else: print("F") else: ...
23.714286
36
0.478916
score = int(input()) if 0<= score and score <=100: if 90 <= score and score <= 100: print("A") elif 80<= score and score <= 89: print('B') elif 70<= score and score <= 79: print('C') elif 60<= score and score <= 69: print('D') else: print("F") else: ...
true
true
1c2a62caa7fb7f6c0a4e36bf13a38fae4fc025b8
714
py
Python
app/core/management/commands/wait_for_db.py
ytingchou/recipe-app-api
6fde42fa1ea22ad93f92a3a6cb93c7338d93b676
[ "MIT" ]
null
null
null
app/core/management/commands/wait_for_db.py
ytingchou/recipe-app-api
6fde42fa1ea22ad93f92a3a6cb93c7338d93b676
[ "MIT" ]
null
null
null
app/core/management/commands/wait_for_db.py
ytingchou/recipe-app-api
6fde42fa1ea22ad93f92a3a6cb93c7338d93b676
[ "MIT" ]
null
null
null
import time from django.db import connections from django.db.utils import OperationalError from django.core.management.base import BaseCommand class Command(BaseCommand): """Django command to pause execution until database is available""" def handle(self, *args, **options): self.stdout.write('Waitin...
29.75
71
0.617647
import time from django.db import connections from django.db.utils import OperationalError from django.core.management.base import BaseCommand class Command(BaseCommand): def handle(self, *args, **options): self.stdout.write('Waiting for database...') db_conn = None while not db_conn: ...
true
true
1c2a642d0084c60a9a5478961aabdbcbc2dc63d9
478
py
Python
napari/qt/__init__.py
HarshCasper/napari
3ed7d2db678f4012753f53b2d40cff9d34a8011f
[ "BSD-3-Clause" ]
null
null
null
napari/qt/__init__.py
HarshCasper/napari
3ed7d2db678f4012753f53b2d40cff9d34a8011f
[ "BSD-3-Clause" ]
null
null
null
napari/qt/__init__.py
HarshCasper/napari
3ed7d2db678f4012753f53b2d40cff9d34a8011f
[ "BSD-3-Clause" ]
null
null
null
from .._qt.qt_event_loop import get_app, run from .._qt.qt_main_window import Window from .._qt.qt_resources import compile_qt_svgs, get_stylesheet from .._qt.qt_viewer import QtViewer from .._qt.widgets.qt_viewer_buttons import QtViewerButtons from .threading import create_worker, thread_worker __all__ = ( 'compi...
25.157895
62
0.73431
from .._qt.qt_event_loop import get_app, run from .._qt.qt_main_window import Window from .._qt.qt_resources import compile_qt_svgs, get_stylesheet from .._qt.qt_viewer import QtViewer from .._qt.widgets.qt_viewer_buttons import QtViewerButtons from .threading import create_worker, thread_worker __all__ = ( 'compi...
true
true
1c2a6448e6fef334501ac37f014009b05cb644b8
9,721
py
Python
src/main/python/rlbot/parsing/match_settings_config_parser.py
m0re4u/RLBot
97ee382a7b0add418f21988a920ae3227020303f
[ "MIT" ]
1
2019-07-24T13:53:25.000Z
2019-07-24T13:53:25.000Z
src/main/python/rlbot/parsing/match_settings_config_parser.py
m0re4u/RLBot
97ee382a7b0add418f21988a920ae3227020303f
[ "MIT" ]
null
null
null
src/main/python/rlbot/parsing/match_settings_config_parser.py
m0re4u/RLBot
97ee382a7b0add418f21988a920ae3227020303f
[ "MIT" ]
null
null
null
import time from rlbot.parsing.custom_config import ConfigObject from rlbot.utils.logging_utils import get_logger MUTATOR_CONFIGURATION_HEADER = "Mutator Configuration" MUTATOR_MATCH_LENGTH = "Match Length" MUTATOR_MAX_SCORE = "Max Score" MUTATOR_OVERTIME = "Overtime" MUTATOR_SERIES_LENGTH = "Series Length" MUTATOR_G...
31.767974
119
0.69355
import time from rlbot.parsing.custom_config import ConfigObject from rlbot.utils.logging_utils import get_logger MUTATOR_CONFIGURATION_HEADER = "Mutator Configuration" MUTATOR_MATCH_LENGTH = "Match Length" MUTATOR_MAX_SCORE = "Max Score" MUTATOR_OVERTIME = "Overtime" MUTATOR_SERIES_LENGTH = "Series Length" MUTATOR_G...
true
true
1c2a64ae254651f7841c4c690e104ac2086b7a24
191
py
Python
.cmake-format.py
steve-madden/opentelemetry-cpp
7374de86f28b3cf64f0d663416afd20da299e1b2
[ "Apache-2.0" ]
284
2019-06-23T20:29:08.000Z
2022-03-31T09:47:41.000Z
.cmake-format.py
steve-madden/opentelemetry-cpp
7374de86f28b3cf64f0d663416afd20da299e1b2
[ "Apache-2.0" ]
1,183
2019-08-15T18:31:50.000Z
2022-03-31T23:31:51.000Z
.cmake-format.py
steve-madden/opentelemetry-cpp
7374de86f28b3cf64f0d663416afd20da299e1b2
[ "Apache-2.0" ]
185
2019-09-20T04:10:38.000Z
2022-03-26T00:04:41.000Z
# If comment markup is enabled, don't reflow the first comment block in # eachlistfile. Use this to preserve formatting of your # copyright/licensestatements. first_comment_is_literal = True
38.2
71
0.811518
# eachlistfile. Use this to preserve formatting of your # copyright/licensestatements. first_comment_is_literal = True
true
true
1c2a65c69a2da2a679076b0c4d2f9708bf78e586
5,449
py
Python
mol_vae/mol_decoder/mol_decoder.py
Hanjun-Dai/sdvae
bd26ea949c496419634fd2cf4802fc8e19a9194c
[ "MIT" ]
70
2018-02-24T07:50:59.000Z
2021-12-27T02:42:37.000Z
mol_vae/mol_decoder/mol_decoder.py
Hanjun-Dai/sdvae
bd26ea949c496419634fd2cf4802fc8e19a9194c
[ "MIT" ]
7
2018-05-31T00:50:19.000Z
2021-09-28T11:58:22.000Z
mol_vae/mol_decoder/mol_decoder.py
Hanjun-Dai/sdvae
bd26ea949c496419634fd2cf4802fc8e19a9194c
[ "MIT" ]
19
2019-01-11T10:56:00.000Z
2022-03-23T23:09:39.000Z
#!/usr/bin/env python from __future__ import print_function import os import sys import csv import numpy as np import math import random from collections import defaultdict import torch from torch.autograd import Variable from torch.nn.parameter import Parameter import torch.nn as nn import torch.nn.functional as F ...
32.242604
99
0.658653
from __future__ import print_function import os import sys import csv import numpy as np import math import random from collections import defaultdict import torch from torch.autograd import Variable from torch.nn.parameter import Parameter import torch.nn as nn import torch.nn.functional as F import torch.optim as...
true
true
1c2a67f3bb156baade1087532de852be095cd8ff
666
py
Python
nipype/interfaces/ants/tests/test_auto_ANTSCommand.py
Conxz/nipype
1281723ae56eacd103597ff4081a205583706e62
[ "Apache-2.0" ]
null
null
null
nipype/interfaces/ants/tests/test_auto_ANTSCommand.py
Conxz/nipype
1281723ae56eacd103597ff4081a205583706e62
[ "Apache-2.0" ]
2
2017-10-05T21:08:38.000Z
2018-10-09T23:01:23.000Z
nipype/interfaces/ants/tests/test_auto_ANTSCommand.py
Conxz/nipype
1281723ae56eacd103597ff4081a205583706e62
[ "Apache-2.0" ]
1
2016-10-11T19:18:53.000Z
2016-10-11T19:18:53.000Z
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from ....testing import assert_equal from ..base import ANTSCommand def test_ANTSCommand_inputs(): input_map = dict(args=dict(argstr='%s', ), environ=dict(nohash=True, usedefault=True, ), ignore_exception=dict(nohash=True, usedefault=Tr...
24.666667
77
0.663664
from ....testing import assert_equal from ..base import ANTSCommand def test_ANTSCommand_inputs(): input_map = dict(args=dict(argstr='%s', ), environ=dict(nohash=True, usedefault=True, ), ignore_exception=dict(nohash=True, usedefault=True, ), num_threads=dict(nohash=True, used...
true
true
1c2a684bb389a99f8a6c5685f9343e8c9057009f
14,294
py
Python
disnake/interactions/application_command.py
awesomehet2124/disnake
213bafcffd4eba1ce6cc2f342dd6cca295f2cd2b
[ "MIT" ]
null
null
null
disnake/interactions/application_command.py
awesomehet2124/disnake
213bafcffd4eba1ce6cc2f342dd6cca295f2cd2b
[ "MIT" ]
null
null
null
disnake/interactions/application_command.py
awesomehet2124/disnake
213bafcffd4eba1ce6cc2f342dd6cca295f2cd2b
[ "MIT" ]
null
null
null
from __future__ import annotations from typing import Any, Dict, List, Mapping, Optional, TYPE_CHECKING, Union, Tuple, TypeVar from .base import Interaction from ..utils import MISSING from ..channel import _threaded_channel_factory from ..enums import OptionType, ApplicationCommandType, try_enum from ..guild import ...
35.824561
130
0.633063
from __future__ import annotations from typing import Any, Dict, List, Mapping, Optional, TYPE_CHECKING, Union, Tuple, TypeVar from .base import Interaction from ..utils import MISSING from ..channel import _threaded_channel_factory from ..enums import OptionType, ApplicationCommandType, try_enum from ..guild import ...
true
true
1c2a69120ef5ea9e0164b5d299e6b52a122e3af8
1,567
py
Python
Preprocess.py
Tushar8055/License-Plate-Recognition-Based-Smart-Parking-System
8cbc3e82f9ec13c27212f0eabbb6de4eb567f754
[ "MIT" ]
null
null
null
Preprocess.py
Tushar8055/License-Plate-Recognition-Based-Smart-Parking-System
8cbc3e82f9ec13c27212f0eabbb6de4eb567f754
[ "MIT" ]
null
null
null
Preprocess.py
Tushar8055/License-Plate-Recognition-Based-Smart-Parking-System
8cbc3e82f9ec13c27212f0eabbb6de4eb567f754
[ "MIT" ]
null
null
null
import cv2 import numpy as np import math GAUSSIAN_SMOOTH_FILTER_SIZE = (5, 5) ADAPTIVE_THRESH_BLOCK_SIZE = 19 ADAPTIVE_THRESH_WEIGHT = 9 def preprocess(imgOriginal): imgGrayscale = extractValue(imgOriginal) imgMaxContrastGrayscale = maximizeContrast(imgGrayscale) height, width = imgGrayscale.shape im...
44.771429
163
0.781749
import cv2 import numpy as np import math GAUSSIAN_SMOOTH_FILTER_SIZE = (5, 5) ADAPTIVE_THRESH_BLOCK_SIZE = 19 ADAPTIVE_THRESH_WEIGHT = 9 def preprocess(imgOriginal): imgGrayscale = extractValue(imgOriginal) imgMaxContrastGrayscale = maximizeContrast(imgGrayscale) height, width = imgGrayscale.shape im...
true
true
1c2a69f47ac627b0a78fdac30ec7934e1a9d5c90
37
py
Python
test/package/package_d/subpackage_0/subsubpackage_0/__init__.py
ljhOfGithub/pytorch
c568f7b16f2a98d72ff5b7c6c6161b67b2c27514
[ "Intel" ]
2
2020-03-13T06:57:49.000Z
2020-05-17T04:18:14.000Z
test/package/package_d/subpackage_0/subsubpackage_0/__init__.py
ellhe-blaster/pytorch
e5282c3cb8bf6ad8c5161f9d0cc271edb9abed25
[ "Intel" ]
1
2019-07-23T15:23:32.000Z
2019-07-23T15:32:23.000Z
test/package/package_d/subpackage_0/subsubpackage_0/__init__.py
ellhe-blaster/pytorch
e5282c3cb8bf6ad8c5161f9d0cc271edb9abed25
[ "Intel" ]
2
2019-07-23T14:37:31.000Z
2019-07-23T14:47:13.000Z
important_string = "subsubpackage_0"
18.5
36
0.837838
important_string = "subsubpackage_0"
true
true
1c2a6a7120cdc9af2ec88bcd2f4cebfe7d58d6a3
7,842
py
Python
SICAR/sicar.py
andre-carvalho/SICAR
a026c4d67cb494e3f9bfdfcfe5b78d2c39f481d7
[ "MIT" ]
null
null
null
SICAR/sicar.py
andre-carvalho/SICAR
a026c4d67cb494e3f9bfdfcfe5b78d2c39f481d7
[ "MIT" ]
null
null
null
SICAR/sicar.py
andre-carvalho/SICAR
a026c4d67cb494e3f9bfdfcfe5b78d2c39f481d7
[ "MIT" ]
null
null
null
import requests import random from urllib.parse import urlencode import re import shutil from pathlib import Path import time from html import unescape from tqdm import tqdm from typing import Dict import os from SICAR.exceptions import ( FailedToDownloadCaptchaException, FailedToDownloadShapefileException, ...
28.725275
163
0.515175
import requests import random from urllib.parse import urlencode import re import shutil from pathlib import Path import time from html import unescape from tqdm import tqdm from typing import Dict import os from SICAR.exceptions import ( FailedToDownloadCaptchaException, FailedToDownloadShapefileException, ...
true
true
1c2a6bd289365e9f2eff6601e46edac7cf6a05d8
6,359
py
Python
src/MaintenanceModels/PMmodel.py
idaholab/SR2ML
2aa5e0be02786523cdeaf898d42411a7068d30b7
[ "Apache-2.0" ]
5
2021-01-25T02:01:22.000Z
2021-12-27T03:14:49.000Z
src/MaintenanceModels/PMmodel.py
idaholab/SR2ML
2aa5e0be02786523cdeaf898d42411a7068d30b7
[ "Apache-2.0" ]
32
2021-01-12T18:43:29.000Z
2022-02-17T19:45:27.000Z
src/MaintenanceModels/PMmodel.py
idaholab/SR2ML
2aa5e0be02786523cdeaf898d42411a7068d30b7
[ "Apache-2.0" ]
null
null
null
# Copyright 2020, Battelle Energy Alliance, LLC # ALL RIGHTS RESERVED """ Created on May 1 2020 @author: mandd,wangc """ #External Modules------------------------------------------------------------------------------------ import numpy as np import numpy.ma as ma #External Modules End---------------------------------...
41.835526
162
0.647743
import numpy as np import numpy.ma as ma from utils import mathUtils as utils from utils import InputData, InputTypes from .MaintenanceBase import MaintenanceBase class PMModel(MaintenanceBase): @classmethod def getInputSpecification(cls): typeEnum = InputTypes.makeEnumType('PMType', 'PMTypeType', ['s...
true
true
1c2a6c47cac6042fa5ed70a0a6a471ea3fe6c77f
579
py
Python
backend/clubs/migrations/0087_questionanswer_users_liked.py
pennlabs/penn-clubs
6165e56ee5745295adc14fe114c4973173c2cb43
[ "MIT" ]
23
2020-01-15T20:11:06.000Z
2022-01-01T12:47:50.000Z
backend/clubs/migrations/0087_questionanswer_users_liked.py
pennlabs/penn-clubs
6165e56ee5745295adc14fe114c4973173c2cb43
[ "MIT" ]
397
2020-01-17T03:42:30.000Z
2022-03-07T23:37:16.000Z
backend/clubs/migrations/0087_questionanswer_users_liked.py
pennlabs/penn-clubs
6165e56ee5745295adc14fe114c4973173c2cb43
[ "MIT" ]
7
2020-01-29T05:11:38.000Z
2022-01-03T19:41:59.000Z
# Generated by Django 3.2.6 on 2021-10-03 16:57 from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("clubs", "0086_applicationsubmission_archived"), ] ...
25.173913
66
0.637306
from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("clubs", "0086_applicationsubmission_archived"), ] operations = [ migrations.AddField( ...
true
true
1c2a6c6acf66ff0db9bbda2679ae0d9fdee9db0f
25,100
py
Python
azure-mgmt-network/azure/mgmt/network/v2017_10_01/operations/network_security_groups_operations.py
Christina-Kang/azure-sdk-for-python
bbf982eb06aab04b8151f69f1d230b7f5fb96ebf
[ "MIT" ]
1
2022-03-30T22:39:15.000Z
2022-03-30T22:39:15.000Z
azure-mgmt-network/azure/mgmt/network/v2017_10_01/operations/network_security_groups_operations.py
Christina-Kang/azure-sdk-for-python
bbf982eb06aab04b8151f69f1d230b7f5fb96ebf
[ "MIT" ]
54
2016-03-25T17:25:01.000Z
2018-10-22T17:27:54.000Z
azure-mgmt-network/azure/mgmt/network/v2017_10_01/operations/network_security_groups_operations.py
Christina-Kang/azure-sdk-for-python
bbf982eb06aab04b8151f69f1d230b7f5fb96ebf
[ "MIT" ]
2
2017-01-20T18:25:46.000Z
2017-05-12T21:31:47.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
47.269303
186
0.675578
import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from msrest.polling import LROPoller, NoPolling from msrestazure.polling.arm_polling import ARMPolling from .. import models class NetworkSecurityGroupsOperations(object): models = models ...
true
true
1c2a6c8ea642d94925d49fddcbd87dec8f132817
1,392
py
Python
indra/databases/doid_client.py
johnbachman/belpy
1f8052c294fa05b3cd471c544b725f6f0adf9869
[ "BSD-2-Clause" ]
136
2016-02-11T22:06:37.000Z
2022-03-31T17:26:20.000Z
indra/databases/doid_client.py
johnbachman/belpy
1f8052c294fa05b3cd471c544b725f6f0adf9869
[ "BSD-2-Clause" ]
748
2016-02-03T16:27:56.000Z
2022-03-09T14:27:54.000Z
indra/databases/doid_client.py
johnbachman/belpy
1f8052c294fa05b3cd471c544b725f6f0adf9869
[ "BSD-2-Clause" ]
56
2015-08-28T14:03:44.000Z
2022-02-04T06:15:55.000Z
"""A client to the Disease Ontology.""" from indra.databases.obo_client import OboClient _client = OboClient(prefix='doid') def get_doid_name_from_doid_id(doid_id): """Return the name corresponding to the given Disease Ontology ID. Parameters ---------- doid_id : str The Disease Ontology id...
25.309091
80
0.676006
from indra.databases.obo_client import OboClient _client = OboClient(prefix='doid') def get_doid_name_from_doid_id(doid_id): return _client.get_name_from_id(doid_id) def get_doid_id_from_doid_name(doid_name): return _client.get_id_from_name(doid_name) def get_doid_id_from_doid_alt_id(doid_alt_id): r...
true
true
1c2a6cc39a916db059f75c6d48285b6e5da1be45
5,124
py
Python
barbican_tempest_plugin/tests/api/test_containers.py
openstack/barbican-tempest-plugin
378efe61acd169f4edb5601df8d4cf972acd4813
[ "Apache-2.0" ]
9
2017-01-03T15:00:10.000Z
2019-01-28T21:52:38.000Z
barbican_tempest_plugin/tests/api/test_containers.py
openstack/barbican-tempest-plugin
378efe61acd169f4edb5601df8d4cf972acd4813
[ "Apache-2.0" ]
null
null
null
barbican_tempest_plugin/tests/api/test_containers.py
openstack/barbican-tempest-plugin
378efe61acd169f4edb5601df8d4cf972acd4813
[ "Apache-2.0" ]
5
2017-12-11T11:17:17.000Z
2019-05-24T15:39:42.000Z
# Copyright (c) 2016 Johns Hopkins University Applied Physics Laboratory # # 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 ...
39.114504
77
0.657104
from tempest.lib import decorators from barbican_tempest_plugin.tests.api import base class ContainersTest(base.BaseKeyManagerTest): @decorators.idempotent_id('2e13d4bb-54de-463a-a358-0fb9a221d8f3') def test_create_list_delete_empty_container(self): body = self.create_containe...
true
true
1c2a6cfe42d8a1e09410e4f911dfedf89810bff8
688
py
Python
Desafio Python/Aula 16 des73.py
ayresmajor/Curso-python
006229cec38ea365bf43b19e3ce93fbd32e1dca6
[ "MIT" ]
null
null
null
Desafio Python/Aula 16 des73.py
ayresmajor/Curso-python
006229cec38ea365bf43b19e3ce93fbd32e1dca6
[ "MIT" ]
null
null
null
Desafio Python/Aula 16 des73.py
ayresmajor/Curso-python
006229cec38ea365bf43b19e3ce93fbd32e1dca6
[ "MIT" ]
null
null
null
equipas = ('Sporting', 'FC Porto', 'Sp. Braga', 'Benfica', 'Paços Ferreira', 'V. Guimarães', 'Moreirense', 'Santa Clara' , 'Rio Ave', 'Nacional', 'Tondela', 'Portimonense', 'Belenenses', 'Farense', 'Marítimo', 'Gil Vicente', 'Boavista', 'Famalicão', 'Académica', 'Estoril Praia') print('{:=^50}'.fo...
45.866667
120
0.639535
equipas = ('Sporting', 'FC Porto', 'Sp. Braga', 'Benfica', 'Paços Ferreira', 'V. Guimarães', 'Moreirense', 'Santa Clara' , 'Rio Ave', 'Nacional', 'Tondela', 'Portimonense', 'Belenenses', 'Farense', 'Marítimo', 'Gil Vicente', 'Boavista', 'Famalicão', 'Académica', 'Estoril Praia') print('{:=^50}'.fo...
true
true
1c2a6d5c55d4dabf725164549a87863bd7fc1c4e
2,767
py
Python
examples/scripts/tv/tvl2den_clr.py
vishalbelsare/sporco
afc3dae3ab81d84a23e8487812670ecb7457e869
[ "BSD-3-Clause" ]
217
2016-06-13T16:41:26.000Z
2022-03-22T06:31:05.000Z
examples/scripts/tv/tvl2den_clr.py
vishalbelsare/sporco
afc3dae3ab81d84a23e8487812670ecb7457e869
[ "BSD-3-Clause" ]
21
2016-06-13T23:28:35.000Z
2022-02-17T23:20:01.000Z
examples/scripts/tv/tvl2den_clr.py
vishalbelsare/sporco
afc3dae3ab81d84a23e8487812670ecb7457e869
[ "BSD-3-Clause" ]
47
2016-12-14T13:08:33.000Z
2021-12-12T01:59:49.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of the SPORCO package. Details of the copyright # and user license can be found in the 'LICENSE.txt' file distributed # with the package. """ Colour ℓ2-TV Denoising ====================== This example demonstrates the use of class :class:`.tvl2.TVL2Den...
27.127451
209
0.68558
from __future__ import print_function from builtins import input import numpy as np from sporco.admm import tvl2 from sporco import util from sporco import metric from sporco import plot img = util.ExampleImages().image('monarch.png', scaled=True, idxexp=np.s_[:,160:672]) ...
true
true
1c2a6d7f0ce536b93e9e4aa74d4b7acbab1fc11a
4,786
py
Python
tensorflow/python/compat/compat.py
reuben/tensorflow
ac15ffcf093505eee71548608b28287fbfdf17c3
[ "Apache-2.0" ]
null
null
null
tensorflow/python/compat/compat.py
reuben/tensorflow
ac15ffcf093505eee71548608b28287fbfdf17c3
[ "Apache-2.0" ]
null
null
null
tensorflow/python/compat/compat.py
reuben/tensorflow
ac15ffcf093505eee71548608b28287fbfdf17c3
[ "Apache-2.0" ]
null
null
null
# 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 applica...
35.191176
80
0.743209
from __future__ import absolute_import from __future__ import division from __future__ import print_function import datetime from tensorflow.python.util import tf_contextlib from tensorflow.python.util.tf_export import tf_export _FORWARD_COMPATIBILITY_HORIZON = datetime.date(2019, 3, 1) @tf_export("...
true
true
1c2a6edf4b631e48ed4d513e3662048ad9dfd53d
409
py
Python
Aula01/pratica_aula01/fetchoneBD.py
marceloamaro/Pratica_BD
6fe57111795ab64116f5bb35232831533c3b2d26
[ "MIT" ]
1
2021-06-05T21:38:08.000Z
2021-06-05T21:38:08.000Z
Aula01/pratica_aula01/fetchoneBD.py
marceloamaro/Pratica_BD
6fe57111795ab64116f5bb35232831533c3b2d26
[ "MIT" ]
null
null
null
Aula01/pratica_aula01/fetchoneBD.py
marceloamaro/Pratica_BD
6fe57111795ab64116f5bb35232831533c3b2d26
[ "MIT" ]
null
null
null
import sqlite3 conexao = sqlite3.connect("ctmombaça.db") cursor = conexao.cursor() # comando para fazer a busca na tabela cursor.execute("select * from ctmombaça") # fetchone retorna uma tupla com os resultados da consulta resultado = cursor.fetchone() # fstring que captura os dados da tupla através da indexação pr...
24.058824
60
0.757946
import sqlite3 conexao = sqlite3.connect("ctmombaça.db") cursor = conexao.cursor() cursor.execute("select * from ctmombaça") resultado = cursor.fetchone() print(f"Nome: {resultado[0]}\nModalidade: {resultado[1]}") cursor.close() conexao.close()
true
true
1c2a6eef08ba248d5ec8e6b481d37e46ba8e5f7d
3,706
py
Python
suspect/processing/water_suppression.py
hjiang1/suspect
f8b320b16bbd73a95d58eea1660921d6cad16f36
[ "MIT" ]
16
2016-08-31T21:05:06.000Z
2022-02-06T12:48:33.000Z
suspect/processing/water_suppression.py
hjiang1/suspect
f8b320b16bbd73a95d58eea1660921d6cad16f36
[ "MIT" ]
141
2016-07-28T21:34:17.000Z
2022-03-30T09:00:36.000Z
suspect/processing/water_suppression.py
hjiang1/suspect
f8b320b16bbd73a95d58eea1660921d6cad16f36
[ "MIT" ]
21
2016-08-04T14:54:19.000Z
2022-03-29T16:04:08.000Z
import numpy import suspect.basis def hsvd(data, rank, L=None): """ Parameters ---------- data : rank : L : Returns ------- Todo ---- """ if L is None: L = data.np // 2 # start by building the Hankel matrix hankel_matrix = numpy.zeros((L, data.np - L...
36.333333
82
0.590934
import numpy import suspect.basis def hsvd(data, rank, L=None): if L is None: L = data.np // 2 hankel_matrix = numpy.zeros((L, data.np - L), "complex") for i in range(int(data.np - L)): hankel_matrix[:, i] = data[i:(i + L)] U, s, V = numpy.linalg.svd(numpy.matrix(hankel_mat...
true
true
1c2a6f09feb2fd1c7f05e93361618f687d8c183d
13,892
py
Python
ACDC_Diagnosis/stage_2_diagnosis.py
manigalati/Automated-Cardiac-Segmentation-and-Disease-Diagnosis
fa0532b1664bf770a970ac240e42da80088e9abc
[ "MIT" ]
51
2018-03-19T09:13:24.000Z
2022-03-28T11:38:04.000Z
ACDC_Diagnosis/stage_2_diagnosis.py
nguyenquangduc2000/Automated-Cardiac-Segmentation-and-Disease-Diagnosis
cfa556f9cdd12586783821435fa84e73f20a72c8
[ "MIT" ]
4
2018-08-20T17:27:06.000Z
2020-12-02T09:45:55.000Z
ACDC_Diagnosis/stage_2_diagnosis.py
nguyenquangduc2000/Automated-Cardiac-Segmentation-and-Disease-Diagnosis
cfa556f9cdd12586783821435fa84e73f20a72c8
[ "MIT" ]
41
2018-11-20T12:46:04.000Z
2022-03-21T13:50:40.000Z
""" This code does training, validation and testing of the model for automated cardiac disease diagnosis. Basically Implementation of second stage of the disease diagnosis model for discriminating between DCM vs. MINF """ from __future__ import print_function import numpy as np import os import subprocess import matplo...
41.345238
142
0.671682
from __future__ import print_function import numpy as np import os import subprocess import matplotlib.pyplot as plt import itertools import sys import pandas as pd from sklearn.tree import DecisionTreeClassifier, export_graphviz from sklearn.ensemble import (RandomForestClassifier, ExtraTreesClassifier) import matplo...
true
true
1c2a6f2b52dac48f68d8253580d963595c72f0cf
4,058
py
Python
Lib/site-packages/qdarkstyle/utils/__init__.py
hirorin-demon/hirorin-streamlit
03fbb6f03ec94f909d451e708a3b30b177607695
[ "0BSD" ]
1
2021-06-20T14:52:40.000Z
2021-06-20T14:52:40.000Z
external-deps/qdarkstyle/qdarkstyle/utils/__init__.py
Pancakerr/spyder
34a9878bba97f427fbdd7b4a6d77ac0651327565
[ "MIT" ]
2
2020-12-18T04:02:58.000Z
2020-12-31T03:35:54.000Z
external-deps/qdarkstyle/qdarkstyle/utils/__init__.py
Pancakerr/spyder
34a9878bba97f427fbdd7b4a6d77ac0651327565
[ "MIT" ]
1
2020-06-14T07:03:50.000Z
2020-06-14T07:03:50.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Utilities for processing SASS and images from default and custom palette. """ # Standard library imports from __future__ import absolute_import, print_function import glob import os from subprocess import call # Local imports from qdarkstyle import PACKAGE_PATH from...
33.816667
88
0.580582
from __future__ import absolute_import, print_function import glob import os from subprocess import call from qdarkstyle import PACKAGE_PATH from qdarkstyle.utils.images import (create_images, create_palette_image, generate_qrc_file) from qdarkstyle.utils.scss import create_q...
true
true
1c2a7205ab9eae55f761d1ddcad89b115c29c947
16,870
py
Python
google/cloud/asset_v1p5beta1/services/asset_service/client.py
peter-zheng-g/python-asset
1123c61c71efbbb231fcdd6e21f13d27f545d40a
[ "Apache-2.0" ]
null
null
null
google/cloud/asset_v1p5beta1/services/asset_service/client.py
peter-zheng-g/python-asset
1123c61c71efbbb231fcdd6e21f13d27f545d40a
[ "Apache-2.0" ]
null
null
null
google/cloud/asset_v1p5beta1/services/asset_service/client.py
peter-zheng-g/python-asset
1123c61c71efbbb231fcdd6e21f13d27f545d40a
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
41.654321
106
0.649615
from collections import OrderedDict from distutils import util import os import re from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib from google.api_core import exceptions as core_exceptions ...
true
true
1c2a72c4817f7c20f832db3f598bc716c20a7feb
22,736
py
Python
python-profiles/STANDA/8MID18-1-AR.py
EPC-MSU/libximc
b0349721f57c8274b098a7b646d7ae67b8e70b9d
[ "BSD-2-Clause" ]
3
2020-12-08T14:41:48.000Z
2022-02-23T13:42:42.000Z
python-profiles/STANDA/8MID18-1-AR.py
EPC-MSU/libximc
b0349721f57c8274b098a7b646d7ae67b8e70b9d
[ "BSD-2-Clause" ]
4
2020-12-08T20:15:06.000Z
2021-12-08T14:15:24.000Z
python-profiles/STANDA/8MID18-1-AR.py
EPC-MSU/libximc
b0349721f57c8274b098a7b646d7ae67b8e70b9d
[ "BSD-2-Clause" ]
2
2020-11-02T02:17:35.000Z
2021-03-18T14:13:56.000Z
def set_profile_8MID18_1_AR(lib, id): worst_result = Result.Ok result = Result.Ok feedback_settings = feedback_settings_t() feedback_settings.IPS = 4000 class FeedbackType_: FEEDBACK_ENCODER_MEDIATED = 6 FEEDBACK_NONE = 5 FEEDBACK_EMF = 4 FEEDBACK_ENCODER = 1 fe...
35.974684
185
0.693658
def set_profile_8MID18_1_AR(lib, id): worst_result = Result.Ok result = Result.Ok feedback_settings = feedback_settings_t() feedback_settings.IPS = 4000 class FeedbackType_: FEEDBACK_ENCODER_MEDIATED = 6 FEEDBACK_NONE = 5 FEEDBACK_EMF = 4 FEEDBACK_ENCODER = 1 fe...
true
true
1c2a72c6288a156737fa844aa246d61ef0e8d5a6
1,789
py
Python
velbusaio/messages/set_date.py
brefra/velbus-aio
daf7f3f331bd3bea9ad51437d5aaa66d649378e0
[ "Apache-2.0" ]
null
null
null
velbusaio/messages/set_date.py
brefra/velbus-aio
daf7f3f331bd3bea9ad51437d5aaa66d649378e0
[ "Apache-2.0" ]
null
null
null
velbusaio/messages/set_date.py
brefra/velbus-aio
daf7f3f331bd3bea9ad51437d5aaa66d649378e0
[ "Apache-2.0" ]
null
null
null
""" :author: Maikel Punie <maikel.punie@gmail.com> """ from __future__ import annotations import json import logging import time from velbusaio.command_registry import register_command from velbusaio.message import Message COMMAND_CODE = 0xB7 class SetDate(Message): """ received by all modules """ ...
23.233766
55
0.556736
from __future__ import annotations import json import logging import time from velbusaio.command_registry import register_command from velbusaio.message import Message COMMAND_CODE = 0xB7 class SetDate(Message): def __init__(self, address=0x00): Message.__init__(self) self.logger = logging.get...
true
true
1c2a72d7147d4af598bf68b34f508b1ae778c47a
188
py
Python
01-cloudformation/scripted_bucket_common.py
ajbisoft/stelligent-u
b51d4fd5d70c7f531406f46b39a4f0a0e7af449c
[ "MIT" ]
null
null
null
01-cloudformation/scripted_bucket_common.py
ajbisoft/stelligent-u
b51d4fd5d70c7f531406f46b39a4f0a0e7af449c
[ "MIT" ]
null
null
null
01-cloudformation/scripted_bucket_common.py
ajbisoft/stelligent-u
b51d4fd5d70c7f531406f46b39a4f0a0e7af449c
[ "MIT" ]
null
null
null
import json def get_regions(config_file): ''' Loads regions from config ''' return json.load(open(config_file)) if __name__ == "__main__": print('This is a library.')
15.666667
39
0.654255
import json def get_regions(config_file): return json.load(open(config_file)) if __name__ == "__main__": print('This is a library.')
true
true
1c2a757efbad101e22c602f5df883207e394b331
1,671
py
Python
anime_downloader/sites/anitube.py
Alsira/anime-downloader
d82b4cfd5c7c6c358d0d8ffd36ce2d5c4a285595
[ "Unlicense" ]
1,077
2020-10-17T15:43:17.000Z
2022-03-31T15:24:29.000Z
anime_downloader/sites/anitube.py
Alsira/anime-downloader
d82b4cfd5c7c6c358d0d8ffd36ce2d5c4a285595
[ "Unlicense" ]
509
2018-06-01T13:07:56.000Z
2020-10-17T13:34:39.000Z
anime_downloader/sites/anitube.py
Alsira/anime-downloader
d82b4cfd5c7c6c358d0d8ffd36ce2d5c4a285595
[ "Unlicense" ]
255
2018-05-27T03:52:11.000Z
2020-10-12T17:27:38.000Z
from anime_downloader.sites.anime import Anime, AnimeEpisode, SearchResult from anime_downloader.sites import helpers import re class AniTube(Anime, sitename="anitube"): sitename = "anitube" @classmethod def search(cls, query): base_url = 'https://www.anitube.site' html = helpers.soupify(...
32.764706
74
0.576302
from anime_downloader.sites.anime import Anime, AnimeEpisode, SearchResult from anime_downloader.sites import helpers import re class AniTube(Anime, sitename="anitube"): sitename = "anitube" @classmethod def search(cls, query): base_url = 'https://www.anitube.site' html = helpers.soupify(...
true
true
1c2a7582afc658c21c1c1973be999962f61184a3
1,555
py
Python
azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/resource_group_patchable_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/resource_group_patchable_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/resource_group_patchable_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2018-08-28T14:36:47.000Z
2018-08-28T14:36:47.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
36.162791
110
0.601286
from msrest.serialization import Model class ResourceGroupPatchable(Model): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'ResourceGroupProperties'}, 'managed_by': {'key': 'managedBy', 'type': 'str'}, 'tags': {'ke...
true
true
1c2a760298ab48cb8895c541c4f62d4bf8346045
4,962
py
Python
paubox/helpers/mail.py
Paubox/paubox-python3
af09d86275ba6f656f00b478ac621db2bf1c79e5
[ "Apache-2.0" ]
1
2021-06-07T23:08:11.000Z
2021-06-07T23:08:11.000Z
paubox/helpers/mail.py
Paubox/paubox-python3
af09d86275ba6f656f00b478ac621db2bf1c79e5
[ "Apache-2.0" ]
null
null
null
paubox/helpers/mail.py
Paubox/paubox-python3
af09d86275ba6f656f00b478ac621db2bf1c79e5
[ "Apache-2.0" ]
null
null
null
""" This library allows you to send emails through the Paubox Transactional Email API application and get the email disposition of sent emails. Paubox Mail """ import base64 class Mail(object): """Paubox API send request formatter.""" def __init__( self, from_=None, subje...
41.35
105
0.592705
import base64 class Mail(object): def __init__( self, from_=None, subject=None, recipients=None, content=None, optional_headers=None): self._from_ = None self._subject = None self._recipients = [] self._conte...
true
true
1c2a76fef3263fed7d5f9c2e26905bcb7a74d4f3
4,396
py
Python
gluon/dal.py
aashay201297/projectify
5277b062255235579bdbf7427d7314e7592df29c
[ "BSD-3-Clause" ]
null
null
null
gluon/dal.py
aashay201297/projectify
5277b062255235579bdbf7427d7314e7592df29c
[ "BSD-3-Clause" ]
null
null
null
gluon/dal.py
aashay201297/projectify
5277b062255235579bdbf7427d7314e7592df29c
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ | This file is part of the web2py Web Framework | Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> | License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) Takes care of adapting pyDAL to web2py's needs ----------------------------------------------- """ f...
36.633333
77
0.642402
from pydal import DAL as DAL from pydal import Field from pydal.objects import Row, Rows, Table, Query, Set, Expression from pydal import SQLCustomType, geoPoint, geoLine, geoPolygon def _default_validators(db, field): from gluon import validators field_type, field_length = field.type, field.length re...
true
true
1c2a774ad962971a63b11bed3013c6e56210b826
236
py
Python
plot.py
shreshthatiwari/C103
6f94596f5164a41f89c89caab484f65bac61afdd
[ "MIT" ]
null
null
null
plot.py
shreshthatiwari/C103
6f94596f5164a41f89c89caab484f65bac61afdd
[ "MIT" ]
null
null
null
plot.py
shreshthatiwari/C103
6f94596f5164a41f89c89caab484f65bac61afdd
[ "MIT" ]
null
null
null
import pandas as pd import plotly.express as px df = pd.read_csv("Data-visualization-master/Teacher refrence/line_chart.csv") fig = px.line(df, x="Year", y="Per capita income", color="Country", title='Per Capita Income') fig.show()
23.6
94
0.733051
import pandas as pd import plotly.express as px df = pd.read_csv("Data-visualization-master/Teacher refrence/line_chart.csv") fig = px.line(df, x="Year", y="Per capita income", color="Country", title='Per Capita Income') fig.show()
true
true
1c2a777ec6b7d6af8c6aba037472b48c28041399
20,845
py
Python
activeClassifier/models/fullImgPred.py
dHonerkamp/ActiveClassifier
052675277153594db64261cd56699a057e633de2
[ "Apache-2.0" ]
null
null
null
activeClassifier/models/fullImgPred.py
dHonerkamp/ActiveClassifier
052675277153594db64261cd56699a057e633de2
[ "Apache-2.0" ]
null
null
null
activeClassifier/models/fullImgPred.py
dHonerkamp/ActiveClassifier
052675277153594db64261cd56699a057e633de2
[ "Apache-2.0" ]
null
null
null
import warnings import numpy as np import tensorflow as tf import logging logger = logging.getLogger(__name__) from activeClassifier.models import baseModel from activeClassifier.modules.policyNetwork import PolicyNetwork from activeClassifier.modules_fullImg.generator import Generator from activeClassifier.modules_fu...
59.050992
185
0.576541
import warnings import numpy as np import tensorflow as tf import logging logger = logging.getLogger(__name__) from activeClassifier.models import baseModel from activeClassifier.modules.policyNetwork import PolicyNetwork from activeClassifier.modules_fullImg.generator import Generator from activeClassifier.modules_fu...
true
true
1c2a77d29731038040634126392e41c6eee76391
111,719
py
Python
tensorflow/python/keras/layers/convolutional.py
sokian/tensorflow
359f53686c87ee76e80353c32a3d22cfb1cf0989
[ "Apache-2.0" ]
2
2018-06-18T15:45:18.000Z
2018-07-26T23:07:35.000Z
tensorflow/python/keras/layers/convolutional.py
hiflyin/tensorflow
8e86dcd1c59bb3f1dc978fcb5398dd3f2f51d9ad
[ "Apache-2.0" ]
null
null
null
tensorflow/python/keras/layers/convolutional.py
hiflyin/tensorflow
8e86dcd1c59bb3f1dc978fcb5398dd3f2f51d9ad
[ "Apache-2.0" ]
1
2019-01-09T17:09:47.000Z
2019-01-09T17:09:47.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
43.201469
104
0.646291
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.eager import context from tensorflow.python.framework import tensor_shape from tensorflow.python.keras import activations from tensorflow.python.keras import backend from t...
true
true
1c2a789b7ce63cc83d7617de3b0ce878c3681f07
302
py
Python
Python/Q5.py
fun-math/Autumn-of-Automation
08c04510f3500ac335f5c830ce3fbabb9c3fa05c
[ "MIT" ]
null
null
null
Python/Q5.py
fun-math/Autumn-of-Automation
08c04510f3500ac335f5c830ce3fbabb9c3fa05c
[ "MIT" ]
null
null
null
Python/Q5.py
fun-math/Autumn-of-Automation
08c04510f3500ac335f5c830ce3fbabb9c3fa05c
[ "MIT" ]
null
null
null
n=int(input()) prices=input().split(" ") temp_buy_date=0 buy_price=(1<<31)-1 buy_date=0 profit=0 for i in range(n) : p=int(prices[i]) if p<buy_price : buy_price=p temp_buy_date=i+1 elif p-buy_price>profit : buy_date=temp_buy_date profit=p-buy_price print(str(profit)+"\n"+str(buy_date))
15.1
37
0.698675
n=int(input()) prices=input().split(" ") temp_buy_date=0 buy_price=(1<<31)-1 buy_date=0 profit=0 for i in range(n) : p=int(prices[i]) if p<buy_price : buy_price=p temp_buy_date=i+1 elif p-buy_price>profit : buy_date=temp_buy_date profit=p-buy_price print(str(profit)+"\n"+str(buy_date))
true
true
1c2a7d3f6870652b9bf2b69fd4ca358c7341488c
7,156
py
Python
tests/httpsrv_test.py
nyrkovalex/httpsrv
0acc3298be56856f73bda1ed10c9ab5153894b01
[ "MIT" ]
4
2016-05-30T13:33:49.000Z
2017-01-25T16:16:05.000Z
tests/httpsrv_test.py
nyrkovalex/httpsrv
0acc3298be56856f73bda1ed10c9ab5153894b01
[ "MIT" ]
null
null
null
tests/httpsrv_test.py
nyrkovalex/httpsrv
0acc3298be56856f73bda1ed10c9ab5153894b01
[ "MIT" ]
1
2018-07-14T06:06:43.000Z
2018-07-14T06:06:43.000Z
# pylint: disable=missing-docstring,invalid-name import json import unittest import requests from httpsrv import Server, PendingRequestsLeftException server = Server(8080).start() class ServerTest(unittest.TestCase): def tearDown(self): server.reset() class TextResponses(ServerTest): def test_shou...
41.364162
91
0.649245
import json import unittest import requests from httpsrv import Server, PendingRequestsLeftException server = Server(8080).start() class ServerTest(unittest.TestCase): def tearDown(self): server.reset() class TextResponses(ServerTest): def test_should_launch_http_server(self): server.on('...
true
true
1c2a7d71370e223f6954e2c6da89d0d5374f9381
3,723
py
Python
libs/python/qumranica/models/image_institution_list_dto.py
Scripta-Qumranica-Electronica/SQE_API_Connectors
aaa9b9eb8709d4257c32ea57321a179c6b1e041a
[ "MIT" ]
null
null
null
libs/python/qumranica/models/image_institution_list_dto.py
Scripta-Qumranica-Electronica/SQE_API_Connectors
aaa9b9eb8709d4257c32ea57321a179c6b1e041a
[ "MIT" ]
null
null
null
libs/python/qumranica/models/image_institution_list_dto.py
Scripta-Qumranica-Electronica/SQE_API_Connectors
aaa9b9eb8709d4257c32ea57321a179c6b1e041a
[ "MIT" ]
null
null
null
# coding: utf-8 """ SQE API No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from qumra...
30.516393
124
0.608918
import pprint import re import six from qumranica.configuration import Configuration class ImageInstitutionListDTO(object): openapi_types = { 'institutions': 'list[ImageInstitutionDTO]' } attribute_map = { 'institutions': 'institutions' } def __init__(self, institutions=...
true
true
1c2a7ef98ccbac760430befc375a79cdebc51a7c
8,669
py
Python
ppdet/data/source/voc.py
leakyH/PaddleDetection
aa15eb945711baf248177a02d4d3dd3bd3abc4e8
[ "Apache-2.0" ]
7,782
2019-10-25T09:39:37.000Z
2022-03-31T13:44:14.000Z
ppdet/data/source/voc.py
leakyH/PaddleDetection
aa15eb945711baf248177a02d4d3dd3bd3abc4e8
[ "Apache-2.0" ]
3,499
2019-10-29T12:37:40.000Z
2022-03-31T14:51:56.000Z
ppdet/data/source/voc.py
leakyH/PaddleDetection
aa15eb945711baf248177a02d4d3dd3bd3abc4e8
[ "Apache-2.0" ]
1,874
2019-10-28T04:21:58.000Z
2022-03-31T05:41:21.000Z
# Copyright (c) 2019 PaddlePaddle 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 appli...
37.366379
80
0.505249
import os import numpy as np import xml.etree.ElementTree as ET from ppdet.core.workspace import register, serializable from .dataset import DetDataset from ppdet.utils.logger import setup_logger logger = setup_logger(__name__) @register @serializable class VOCDataSet(DetDataset): def __init__(...
true
true
1c2a7f65b3a79467362e25fc26c52437b821c23c
7,273
py
Python
myven/lib/python3.8/site-packages/ansible/modules/monitoring/grafana_plugin.py
baltham/dne-dna-code
4a13309a790a670d2f07e635c9264a0c29976c6a
[ "MIT" ]
1
2021-04-02T08:08:39.000Z
2021-04-02T08:08:39.000Z
myven/lib/python3.8/site-packages/ansible/modules/monitoring/grafana_plugin.py
baltham/dne-dna-code
4a13309a790a670d2f07e635c9264a0c29976c6a
[ "MIT" ]
null
null
null
myven/lib/python3.8/site-packages/ansible/modules/monitoring/grafana_plugin.py
baltham/dne-dna-code
4a13309a790a670d2f07e635c9264a0c29976c6a
[ "MIT" ]
1
2020-05-03T01:13:16.000Z
2020-05-03T01:13:16.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Thierry Sallé (@tsalle) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function ANSIBLE_METADATA = { 'status': ['preview'], 'supported_by': 'c...
32.039648
114
0.59384
from __future__ import absolute_import, division, print_function ANSIBLE_METADATA = { 'status': ['preview'], 'supported_by': 'community', 'metadata_version': '1.1' } DOCUMENTATION = ''' --- module: grafana_plugin author: - Thierry Sallé (@tsalle) version_added: "2.5" short_description: Manage Graf...
true
true
1c2a7f714ed82e60b88409bc8db1d37fd97a6e54
226
py
Python
tests/conftest.py
Mardoqueu-Pimentel/bdtp4
e96661d122dbad3cc46607ff4d9713084748bd45
[ "MIT" ]
null
null
null
tests/conftest.py
Mardoqueu-Pimentel/bdtp4
e96661d122dbad3cc46607ff4d9713084748bd45
[ "MIT" ]
null
null
null
tests/conftest.py
Mardoqueu-Pimentel/bdtp4
e96661d122dbad3cc46607ff4d9713084748bd45
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Dummy conftest.py for bdtp4. If you don't know what this is for, just leave it empty. Read more about conftest.py under: https://pytest.org/latest/plugins.html """ # import pytest
20.545455
60
0.646018
true
true
1c2a7f7bef469457ec86ee928bc4e87677fc4768
3,192
py
Python
get_lyrics_from_site.py
kastnerkyle/scrape_lyrics
e11d42fa50d63c62828282e7ec4ca0df18ff2b30
[ "BSD-3-Clause" ]
3
2016-03-20T19:26:12.000Z
2016-06-27T04:25:02.000Z
get_lyrics_from_site.py
kastnerkyle/scrape_lyrics
e11d42fa50d63c62828282e7ec4ca0df18ff2b30
[ "BSD-3-Clause" ]
null
null
null
get_lyrics_from_site.py
kastnerkyle/scrape_lyrics
e11d42fa50d63c62828282e7ec4ca0df18ff2b30
[ "BSD-3-Clause" ]
null
null
null
import spynner import os import zipfile import zlib compression = zipfile.ZIP_DEFLATED import threading import Queue out_dir = "results" if not os.path.exists(out_dir): os.makedirs(out_dir) class WriteThread(threading.Thread): def __init__(self, queue, out_queue): threading.Thread.__init__(self) ...
32.907216
74
0.544799
import spynner import os import zipfile import zlib compression = zipfile.ZIP_DEFLATED import threading import Queue out_dir = "results" if not os.path.exists(out_dir): os.makedirs(out_dir) class WriteThread(threading.Thread): def __init__(self, queue, out_queue): threading.Thread.__init__(self) ...
true
true
1c2a7fda1c793d5a991cfc0600b06a23bb16d65a
3,096
py
Python
lib/surface/ai/model_monitoring_jobs/resume.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
2
2019-11-10T09:17:07.000Z
2019-12-18T13:44:08.000Z
lib/surface/ai/model_monitoring_jobs/resume.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
null
null
null
lib/surface/ai/model_monitoring_jobs/resume.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
1
2020-07-25T01:40:19.000Z
2020-07-25T01:40:19.000Z
# -*- coding: utf-8 -*- # # Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
35.586207
104
0.760982
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from googlecloudsdk.api_lib.ai.model_monitoring_jobs import client from googlecloudsdk.calliope import base from googlecloudsdk.command_lib.ai import constants from googlecloudsdk.command_lib.ai...
true
true
1c2a7fe62b021a1976834edac64dd4aa68604e09
998
py
Python
src/RobotFrameworkCore/org.robotframework.ide.core-functions/src/main/python/scripts/classpath_updater.py
alex729/RED
128bf203cf035892c02805aabd0c915f96006bb0
[ "Apache-2.0" ]
null
null
null
src/RobotFrameworkCore/org.robotframework.ide.core-functions/src/main/python/scripts/classpath_updater.py
alex729/RED
128bf203cf035892c02805aabd0c915f96006bb0
[ "Apache-2.0" ]
null
null
null
src/RobotFrameworkCore/org.robotframework.ide.core-functions/src/main/python/scripts/classpath_updater.py
alex729/RED
128bf203cf035892c02805aabd0c915f96006bb0
[ "Apache-2.0" ]
1
2019-08-13T07:25:07.000Z
2019-08-13T07:25:07.000Z
class ClassPathUpdater : ########################################################## # from http://forum.java.sun.com/thread.jspa?threadID=300557 # # Author: SG Langer Jan 2007 translated the above Java to this # Jython class # Purpose: Allow runtime additions of new Class/jars either from # local fil...
36.962963
75
0.582164
class ClassPathUpdater :
true
true
1c2a80194a07af91544a4da2d2b9e2cd3f0f6a01
2,563
py
Python
rich/live_render.py
carltongibson/rich
bc8737ba238c86f32c94d6c203681592487ed0ca
[ "MIT" ]
2
2021-01-07T13:13:08.000Z
2021-04-09T11:59:53.000Z
rich/live_render.py
carltongibson/rich
bc8737ba238c86f32c94d6c203681592487ed0ca
[ "MIT" ]
42
2020-12-16T07:03:59.000Z
2022-03-28T20:11:50.000Z
rich/live_render.py
carltongibson/rich
bc8737ba238c86f32c94d6c203681592487ed0ca
[ "MIT" ]
3
2021-05-21T21:26:34.000Z
2021-10-05T16:57:57.000Z
from typing import Optional, Tuple from .console import Console, ConsoleOptions, RenderableType, RenderResult from .control import Control from .segment import Segment from .style import StyleType from ._loop import loop_last class LiveRender: """Creates a renderable that may be updated. Args: rende...
33.723684
98
0.613344
from typing import Optional, Tuple from .console import Console, ConsoleOptions, RenderableType, RenderResult from .control import Control from .segment import Segment from .style import StyleType from ._loop import loop_last class LiveRender: def __init__(self, renderable: RenderableType, style: StyleType = ""...
true
true
1c2a806f17d1478a2324b8dd8fd40218a360a52d
1,225
py
Python
src/utils/OutputReport.py
maiyajj/AutoTest_script-Appium_Connect
f9c2c42c281a9e2f984acb4a72dda0694b053f22
[ "Apache-2.0" ]
28
2017-11-10T00:19:16.000Z
2022-02-19T16:42:05.000Z
src/utils/OutputReport.py
maiyajj/AutoTest_script-Appium_Connect
f9c2c42c281a9e2f984acb4a72dda0694b053f22
[ "Apache-2.0" ]
null
null
null
src/utils/OutputReport.py
maiyajj/AutoTest_script-Appium_Connect
f9c2c42c281a9e2f984acb4a72dda0694b053f22
[ "Apache-2.0" ]
23
2017-08-22T06:12:19.000Z
2021-09-18T05:45:41.000Z
# -*- coding: utf-8 -*- import logging import logging.handlers import os import time # Create report file. # Record the result of launch case. def init_report(file_name, report1): logging.basicConfig(level=logging.INFO) # 设置打印级别 formatter = logging.Formatter("%(message)s") # log文件写入内容,此处为正文 handler = lo...
27.840909
90
0.654694
import logging import logging.handlers import os import time def init_report(file_name, report1): logging.basicConfig(level=logging.INFO) formatter = logging.Formatter("%(message)s") handler = logging.FileHandler(file_name, encoding="utf-8") handler.setFormatter(formatter) report1.addHand...
true
true
1c2a807e52645ea45fee8b1da10b4b14d641fdeb
73
py
Python
openpmd_viewer/addons/pic/__init__.py
pordyna/openPMD-viewer
f7b792be58d5dca1af5b36d9875b3d7768a3617d
[ "BSD-3-Clause-LBNL" ]
51
2015-10-08T21:07:28.000Z
2022-01-31T06:16:32.000Z
openpmd_viewer/addons/pic/__init__.py
pordyna/openPMD-viewer
f7b792be58d5dca1af5b36d9875b3d7768a3617d
[ "BSD-3-Clause-LBNL" ]
239
2015-10-09T18:11:00.000Z
2022-03-31T22:45:14.000Z
openpmd_viewer/addons/pic/__init__.py
pordyna/openPMD-viewer
f7b792be58d5dca1af5b36d9875b3d7768a3617d
[ "BSD-3-Clause-LBNL" ]
40
2015-10-08T17:11:36.000Z
2022-03-30T21:21:09.000Z
from .lpa_diagnostics import LpaDiagnostics __all__ = ['LpaDiagnostics']
24.333333
43
0.821918
from .lpa_diagnostics import LpaDiagnostics __all__ = ['LpaDiagnostics']
true
true
1c2a80c73ab38446eda4ba6a5301ba625ce7e89d
723
py
Python
flask_server/cli.py
fhirt/python-ocr
7354934420aad080439f60cf90c848e3aab6c11c
[ "MIT" ]
null
null
null
flask_server/cli.py
fhirt/python-ocr
7354934420aad080439f60cf90c848e3aab6c11c
[ "MIT" ]
null
null
null
flask_server/cli.py
fhirt/python-ocr
7354934420aad080439f60cf90c848e3aab6c11c
[ "MIT" ]
null
null
null
import sys from ocr import process_image if __name__ == '__main__': sys.stdout.write(""" ===OOOO=====CCCCC===RRRRRR=====\n ==OO==OO===CC=======RR===RR====\n ==OO==OO===CC=======RR===RR====\n ==OO==OO===CC=======RRRRRR=====\n ==OO==OO===CC=======RR==RR=====\n ==OO==OO===CC=======RR== RR====\n ===OOOO=====CCCCC===RR...
38.052632
80
0.507607
import sys from ocr import process_image if __name__ == '__main__': sys.stdout.write(""" ===OOOO=====CCCCC===RRRRRR=====\n ==OO==OO===CC=======RR===RR====\n ==OO==OO===CC=======RR===RR====\n ==OO==OO===CC=======RRRRRR=====\n ==OO==OO===CC=======RR==RR=====\n ==OO==OO===CC=======RR== RR====\n ===OOOO=====CCCCC===RR...
true
true
1c2a80d3c903ef51ddac6a0e158a6dba91a4c694
2,554
py
Python
Models/Transformer.py
shizhouxing/Robustness-Verification-for-Transformers
b1758c10826b7e00ebf3f030020548809be558a1
[ "BSD-2-Clause" ]
22
2020-03-09T13:14:54.000Z
2022-03-03T03:38:34.000Z
Models/Transformer.py
shizhouxing/Robustness-Verification-for-Transformers
b1758c10826b7e00ebf3f030020548809be558a1
[ "BSD-2-Clause" ]
null
null
null
Models/Transformer.py
shizhouxing/Robustness-Verification-for-Transformers
b1758c10826b7e00ebf3f030020548809be558a1
[ "BSD-2-Clause" ]
1
2020-03-18T23:39:51.000Z
2020-03-18T23:39:51.000Z
# Copyright (c) 2020, Zhouxing shi <zhouxingshichn@gmail.com> # Licenced under the BSD 2-Clause License. import torch import os from Models.BERT import BERT from Models.modeling import BertForSequenceClassification, BertConfig from pytorch_pretrained_bert.tokenization import BertTokenizer class Transformer(BERT): ...
37.558824
105
0.61668
import torch import os from Models.BERT import BERT from Models.modeling import BertForSequenceClassification, BertConfig from pytorch_pretrained_bert.tokenization import BertTokenizer class Transformer(BERT): def __init__(self, args, data_train): self.general_init(args, data_train) self.min_wo...
true
true
1c2a80e06b7f3788d7d742f70e311687b6357e75
10,874
py
Python
myplotlib/wrapper_plotly.py
SengerM/myplotlib
8282226e140647342da69530aadb79b61c7c3394
[ "MIT" ]
1
2020-10-07T08:46:35.000Z
2020-10-07T08:46:35.000Z
myplotlib/wrapper_plotly.py
SengerM/myplotlib
8282226e140647342da69530aadb79b61c7c3394
[ "MIT" ]
null
null
null
myplotlib/wrapper_plotly.py
SengerM/myplotlib
8282226e140647342da69530aadb79b61c7c3394
[ "MIT" ]
null
null
null
from .figure import MPLFigure import numpy as np class MPLPlotlyWrapper(MPLFigure): LINESTYLE_TRANSLATION = { 'solid': None, 'none': None, 'dashed': 'dash', 'dotted': 'dot', } def __init__(self): super().__init__() import plotly.graph_objects as go # Import here so if the user does not plot with this...
38.154386
369
0.669303
from .figure import MPLFigure import numpy as np class MPLPlotlyWrapper(MPLFigure): LINESTYLE_TRANSLATION = { 'solid': None, 'none': None, 'dashed': 'dash', 'dotted': 'dot', } def __init__(self): super().__init__() import plotly.graph_objects as go import plotly self.plotly_go = go self.plotl...
true
true
1c2a8196954baf2a1b3110d03a80ffdcbc9d850a
16,544
py
Python
tests/test_discussion_topic.py
eriktews/canvasapi
132146395ecf55227cae69dc4d5f6d94545172b9
[ "MIT" ]
null
null
null
tests/test_discussion_topic.py
eriktews/canvasapi
132146395ecf55227cae69dc4d5f6d94545172b9
[ "MIT" ]
null
null
null
tests/test_discussion_topic.py
eriktews/canvasapi
132146395ecf55227cae69dc4d5f6d94545172b9
[ "MIT" ]
null
null
null
from __future__ import absolute_import, division, print_function, unicode_literals import unittest import requests_mock import warnings from canvasapi import Canvas from canvasapi.course import Course from canvasapi.discussion_topic import DiscussionTopic, DiscussionEntry from canvasapi.exceptions import Forbidden fr...
37.6
87
0.671724
from __future__ import absolute_import, division, print_function, unicode_literals import unittest import requests_mock import warnings from canvasapi import Canvas from canvasapi.course import Course from canvasapi.discussion_topic import DiscussionTopic, DiscussionEntry from canvasapi.exceptions import Forbidden fr...
true
true
1c2a8274fb5ddfbb07767a34f39a5f19ae913b56
755
py
Python
lido/__init__.py
lidofinance/lido-python
6cf74b17c47e54cfead891d445c6071c25d0478d
[ "MIT" ]
3
2021-02-04T11:35:48.000Z
2021-09-12T22:19:13.000Z
lido/__init__.py
lidofinance/lido-python
6cf74b17c47e54cfead891d445c6071c25d0478d
[ "MIT" ]
2
2021-08-30T08:35:04.000Z
2021-09-02T17:17:08.000Z
lido/__init__.py
lidofinance/lido-python
6cf74b17c47e54cfead891d445c6071c25d0478d
[ "MIT" ]
3
2021-05-24T19:08:06.000Z
2021-09-12T22:19:20.000Z
__version__ = "1.1.0" from lido.get_operators_data import get_operators_data # noqa: F401 from lido.get_operators_keys import get_operators_keys # noqa: F401 from lido.validate_keys import validate_key # noqa: F401 from lido.validate_keys import validate_keys_mono # noqa: F401 from lido.validate_keys import valida...
50.333333
70
0.811921
__version__ = "1.1.0" from lido.get_operators_data import get_operators_data from lido.get_operators_keys import get_operators_keys from lido.validate_keys import validate_key from lido.validate_keys import validate_keys_mono from lido.validate_keys import validate_keys_multi from lido.validate_keys import v...
true
true
1c2a82cf217466687fc08d21f542dd65172b0d7a
6,225
py
Python
samples/outreach/blogs/blog_estimators_dataset.py
Dzinushi/models_1_4
d7e72793a68c1667d403b1542c205d1cd9b1d17c
[ "Apache-2.0" ]
null
null
null
samples/outreach/blogs/blog_estimators_dataset.py
Dzinushi/models_1_4
d7e72793a68c1667d403b1542c205d1cd9b1d17c
[ "Apache-2.0" ]
null
null
null
samples/outreach/blogs/blog_estimators_dataset.py
Dzinushi/models_1_4
d7e72793a68c1667d403b1542c205d1cd9b1d17c
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
38.90625
80
0.708434
import os import six.moves.urllib.request as request import tensorflow as tf tf_version = tf.__version__ print("TensorFlow version: {}".format(tf_version)) assert "1.4" <= tf_version, "TensorFlow r1.4 or later is needed" PATH = "/tmp/tf_dataset_and_estimator_apis" PATH_DATASET = PATH + os.sep ...
true
true
1c2a83ccd12ac78915b5060580f7ad7274200afa
970
py
Python
tests/elf/test.py
serge-sans-paille/LIEF
5d56141061bfc27e3c971e9e474dc86fdaf0c6a9
[ "Apache-2.0" ]
2
2020-11-06T23:31:52.000Z
2021-04-23T17:24:13.000Z
tests/elf/test.py
prarthanats/LIEF
b26abae9a9b0dc0e82dd803b7b54a2a9dfe1034a
[ "Apache-2.0" ]
null
null
null
tests/elf/test.py
prarthanats/LIEF
b26abae9a9b0dc0e82dd803b7b54a2a9dfe1034a
[ "Apache-2.0" ]
1
2021-12-21T08:11:23.000Z
2021-12-21T08:11:23.000Z
import lief from lief import Logger Logger.set_level(lief.LOGGING_LEVEL.DEBUG) from lief.ELF import Section ls = lief.parse("/home/romain/dev/LIEF/lief-samples/ELF/ELF64_x86-64_binary_static-binary.bin") stub = lief.parse("hello_lief.bin") #section = Section() #section.name = "test" #section.type ...
31.290323
97
0.680412
import lief from lief import Logger Logger.set_level(lief.LOGGING_LEVEL.DEBUG) from lief.ELF import Section ls = lief.parse("/home/romain/dev/LIEF/lief-samples/ELF/ELF64_x86-64_binary_static-binary.bin") stub = lief.parse("hello_lief.bin") = stub.segments[0] original_va = segment.virtual_a...
true
true