hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7fc4340d2b6a8628244829406520e082b98cff1
3,024
py
Python
polaris2/geomvis/R2toR.py
talonchandler/polaris2
2ec215edf7f63967af109661d40bc55b10d836da
[ "MIT" ]
null
null
null
polaris2/geomvis/R2toR.py
talonchandler/polaris2
2ec215edf7f63967af109661d40bc55b10d836da
[ "MIT" ]
null
null
null
polaris2/geomvis/R2toR.py
talonchandler/polaris2
2ec215edf7f63967af109661d40bc55b10d836da
[ "MIT" ]
null
null
null
import tifffile import numpy as np from polaris2.geomvis import utilmpl import logging log = logging.getLogger('log') class xy: def __init__(self, data, px_dims=[1,1], cmap='gray', title='', fov=[0,1], plotfov=[0,1], vmin=None, vmax=None): self.data = data self.px...
40.32
172
0.538029
import tifffile import numpy as np from polaris2.geomvis import utilmpl import logging log = logging.getLogger('log') class xy: def __init__(self, data, px_dims=[1,1], cmap='gray', title='', fov=[0,1], plotfov=[0,1], vmin=None, vmax=None): self.data = data self.px...
true
true
f7fc43832095bd13bf18e789848e36fef5a4bd7a
3,596
py
Python
tests/unit/test_manager.py
rbaltrusch/bach_generator
a5de2d55c982b94d22c62d2cbc8adecd25456069
[ "MIT" ]
null
null
null
tests/unit/test_manager.py
rbaltrusch/bach_generator
a5de2d55c982b94d22c62d2cbc8adecd25456069
[ "MIT" ]
null
null
null
tests/unit/test_manager.py
rbaltrusch/bach_generator
a5de2d55c982b94d22c62d2cbc8adecd25456069
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Tests for the manager module""" import random from typing import List import pytest from bach_generator.src import manager, model # pylint: disable=protected-access class MockModel: def __init__(self, inputs: int = 2): self.inputs = inputs self.jumbled_with = None ...
29.47541
80
0.679644
import random from typing import List import pytest from bach_generator.src import manager, model class MockModel: def __init__(self, inputs: int = 2): self.inputs = inputs self.jumbled_with = None def jumble(self, jumble_strategy, weight_divergence): self.jumbled_with = (jumble_...
true
true
f7fc43af608992a57d11353d6656045b8db8185f
32
py
Python
src/test/resources/python-code-examples/import_from_var/use_imported.py
florayym/depends
6c437a78268d91d54059b560c0273ae3c9253452
[ "BSD-3-Clause", "MIT" ]
146
2019-03-09T03:02:59.000Z
2022-03-28T11:28:41.000Z
src/test/resources/python-code-examples/import_from_var/use_imported.py
florayym/depends
6c437a78268d91d54059b560c0273ae3c9253452
[ "BSD-3-Clause", "MIT" ]
27
2019-03-11T02:12:54.000Z
2021-12-21T00:24:13.000Z
src/test/resources/python-code-examples/import_from_var/use_imported.py
florayym/depends
6c437a78268d91d54059b560c0273ae3c9253452
[ "BSD-3-Clause", "MIT" ]
41
2019-03-09T03:04:50.000Z
2022-01-14T06:53:14.000Z
from pkg.core import c c.foo()
8
22
0.6875
from pkg.core import c c.foo()
true
true
f7fc459a39797bfd71ba44df3a7aec515af29d51
236
py
Python
withrestc3/testapp/models.py
Ajitkumar1995/Django_REST_API
e7e3b0912602f4478415337fda4a851171e967ee
[ "MIT" ]
null
null
null
withrestc3/testapp/models.py
Ajitkumar1995/Django_REST_API
e7e3b0912602f4478415337fda4a851171e967ee
[ "MIT" ]
null
null
null
withrestc3/testapp/models.py
Ajitkumar1995/Django_REST_API
e7e3b0912602f4478415337fda4a851171e967ee
[ "MIT" ]
null
null
null
from django.db import models # Create your models here. class Employee(models.Model): eno=models.IntegerField() ename=models.CharField(max_length=64) esal=models.FloatField() eaddr=models.CharField(max_length=64)
29.5
42
0.733051
from django.db import models class Employee(models.Model): eno=models.IntegerField() ename=models.CharField(max_length=64) esal=models.FloatField() eaddr=models.CharField(max_length=64)
true
true
f7fc45cb1e6ef9e9a6179cd21f990518afe34905
26,032
py
Python
libs/blocks/tests/bricks/test_recurrent.py
dendisuhubdy/attention-lvcsr
598d487c118e66875fdd625baa84ed29d283b800
[ "MIT" ]
295
2015-09-25T21:15:04.000Z
2022-01-13T01:16:18.000Z
libs/blocks/tests/bricks/test_recurrent.py
shenshenzhanzhan/attention-lvcsr
598d487c118e66875fdd625baa84ed29d283b800
[ "MIT" ]
21
2015-10-28T19:06:32.000Z
2022-03-11T23:13:05.000Z
libs/blocks/tests/bricks/test_recurrent.py
shenshenzhanzhan/attention-lvcsr
598d487c118e66875fdd625baa84ed29d283b800
[ "MIT" ]
114
2015-09-26T21:23:02.000Z
2021-11-19T02:36:41.000Z
import itertools import unittest from collections import OrderedDict import numpy import theano from numpy.testing import assert_allclose, assert_raises from theano import tensor from theano.gof.graph import is_same_graph from blocks.utils import is_shared_variable from blocks.bricks.base import application from block...
42.054927
79
0.566111
import itertools import unittest from collections import OrderedDict import numpy import theano from numpy.testing import assert_allclose, assert_raises from theano import tensor from theano.gof.graph import is_same_graph from blocks.utils import is_shared_variable from blocks.bricks.base import application from block...
true
true
f7fc45d78af97d852668c067ce6794119ebb9659
67,770
py
Python
pandas/tests/series/test_operators.py
jackieleng/pandas
ccec504e31ce74f8016952ac75add1cc4bec7080
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause" ]
null
null
null
pandas/tests/series/test_operators.py
jackieleng/pandas
ccec504e31ce74f8016952ac75add1cc4bec7080
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause" ]
null
null
null
pandas/tests/series/test_operators.py
jackieleng/pandas
ccec504e31ce74f8016952ac75add1cc4bec7080
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause" ]
1
2021-01-02T02:27:25.000Z
2021-01-02T02:27:25.000Z
# coding=utf-8 # pylint: disable-msg=E1101,W0612 from datetime import datetime, timedelta import operator from itertools import product, starmap from numpy import nan, inf import numpy as np import pandas as pd from pandas import (Index, Series, DataFrame, isnull, bdate_range, NaT, date_range, ti...
38.22335
79
0.554877
from datetime import datetime, timedelta import operator from itertools import product, starmap from numpy import nan, inf import numpy as np import pandas as pd from pandas import (Index, Series, DataFrame, isnull, bdate_range, NaT, date_range, timedelta_range, _np_version_...
true
true
f7fc4793014b6ae4f4764af79dff30029ab092e7
491
py
Python
obywatele/migrations/0032_auto_20210911_2051.py
soma115/wikikracja
7715ca1daa4ca09888e1c7389ed5f8a2df29898b
[ "MIT" ]
7
2016-02-21T17:25:54.000Z
2021-10-09T19:36:10.000Z
obywatele/migrations/0032_auto_20210911_2051.py
soma115/wikikracja
7715ca1daa4ca09888e1c7389ed5f8a2df29898b
[ "MIT" ]
19
2020-02-11T23:55:01.000Z
2022-03-31T18:11:56.000Z
obywatele/migrations/0032_auto_20210911_2051.py
soma115/wikikracja
7715ca1daa4ca09888e1c7389ed5f8a2df29898b
[ "MIT" ]
3
2016-01-20T22:34:58.000Z
2020-09-16T07:45:42.000Z
# Generated by Django 3.1.12 on 2021-09-11 18:51 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('obywatele', '0031_auto_20210911_2049'), ] operations = [ migrations.AlterField( model_name='uzytkownik', name='phon...
25.842105
149
0.631365
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('obywatele', '0031_auto_20210911_2049'), ] operations = [ migrations.AlterField( model_name='uzytkownik', name='phone', field=models.CharField(blank=Tru...
true
true
f7fc47ee9828b852894df4f635b387bc277449f2
27,218
py
Python
corehq/apps/couch_sql_migration/statedb.py
scottwedge/commcare-hq
900ccf81c9f23fb3b435962f065648669817f37a
[ "BSD-3-Clause" ]
null
null
null
corehq/apps/couch_sql_migration/statedb.py
scottwedge/commcare-hq
900ccf81c9f23fb3b435962f065648669817f37a
[ "BSD-3-Clause" ]
null
null
null
corehq/apps/couch_sql_migration/statedb.py
scottwedge/commcare-hq
900ccf81c9f23fb3b435962f065648669817f37a
[ "BSD-3-Clause" ]
null
null
null
import errno import json import logging import os import os.path from collections import defaultdict, namedtuple from contextlib import contextmanager from datetime import datetime from functools import partial from itertools import groupby import attr from memoized import memoized from sqlalchemy import ( Column,...
35.394018
87
0.594937
import errno import json import logging import os import os.path from collections import defaultdict, namedtuple from contextlib import contextmanager from datetime import datetime from functools import partial from itertools import groupby import attr from memoized import memoized from sqlalchemy import ( Column,...
true
true
f7fc4874255b60ca2a2524b6a6b2aafbdb140069
54
py
Python
casepro/statistics/__init__.py
rapidpro/ureport-partners
16e5b95eae36ecbbe8ab2a59f34a2f5fd32ceacd
[ "BSD-3-Clause" ]
21
2015-07-21T15:57:49.000Z
2021-11-04T18:26:35.000Z
casepro/statistics/__init__.py
rapidpro/ureport-partners
16e5b95eae36ecbbe8ab2a59f34a2f5fd32ceacd
[ "BSD-3-Clause" ]
357
2015-05-22T07:26:45.000Z
2022-03-12T01:08:28.000Z
casepro/statistics/__init__.py
rapidpro/ureport-partners
16e5b95eae36ecbbe8ab2a59f34a2f5fd32ceacd
[ "BSD-3-Clause" ]
24
2015-05-28T12:30:25.000Z
2021-11-19T01:57:38.000Z
default_app_config = "casepro.statistics.apps.Config"
27
53
0.833333
default_app_config = "casepro.statistics.apps.Config"
true
true
f7fc4ad86d567854dbbab3c4b96313f1fc47a00f
4,041
py
Python
scripts/use_evaluation_model_distmult.py
wang-yuhao/Practical-Big-Data-Science-ADL-AI
0bf63bf210f506e287f8492e716bb3394137d74b
[ "MIT" ]
null
null
null
scripts/use_evaluation_model_distmult.py
wang-yuhao/Practical-Big-Data-Science-ADL-AI
0bf63bf210f506e287f8492e716bb3394137d74b
[ "MIT" ]
null
null
null
scripts/use_evaluation_model_distmult.py
wang-yuhao/Practical-Big-Data-Science-ADL-AI
0bf63bf210f506e287f8492e716bb3394137d74b
[ "MIT" ]
1
2021-12-24T00:26:26.000Z
2021-12-24T00:26:26.000Z
import argparse import pickle import torch import os import numpy as np from src.models.api import EvaluationModel, NegSampleGenerator from torch import nn class Namespace: def __init__(self, **kwargs): self.__dict__.update(kwargs) class DistMult: def get_score(self, head: torch.tensor, relation: t...
33.675
79
0.655778
import argparse import pickle import torch import os import numpy as np from src.models.api import EvaluationModel, NegSampleGenerator from torch import nn class Namespace: def __init__(self, **kwargs): self.__dict__.update(kwargs) class DistMult: def get_score(self, head: torch.tensor, relation: t...
true
true
f7fc4b3659b6971196dde3e9411032bf94ac77e3
4,604
py
Python
lanedet/engine/runner.py
zhangzhongshuai/lanedet
bff96fcbed122ac0f876d8e64ada7795ca34e4b6
[ "Apache-2.0" ]
null
null
null
lanedet/engine/runner.py
zhangzhongshuai/lanedet
bff96fcbed122ac0f876d8e64ada7795ca34e4b6
[ "Apache-2.0" ]
null
null
null
lanedet/engine/runner.py
zhangzhongshuai/lanedet
bff96fcbed122ac0f876d8e64ada7795ca34e4b6
[ "Apache-2.0" ]
1
2022-02-02T10:33:10.000Z
2022-02-02T10:33:10.000Z
import time import torch from tqdm import tqdm import pytorch_warmup as warmup import numpy as np import random import cv2 from lanedet.models.registry import build_net from .registry import build_trainer, build_evaluator from .optimizer import build_optimizer from .scheduler import build_scheduler from lanedet.datase...
37.737705
94
0.60404
import time import torch from tqdm import tqdm import pytorch_warmup as warmup import numpy as np import random import cv2 from lanedet.models.registry import build_net from .registry import build_trainer, build_evaluator from .optimizer import build_optimizer from .scheduler import build_scheduler from lanedet.datase...
true
true
f7fc4b3e9a8c1b9f418fcf6693153927305cbf34
6,803
py
Python
statistics/mySQLvsPostgreSQLall.36.py
biosoda/bioquery
de80b6a06f079d3383a6b159151043d1f2b77d52
[ "CC0-1.0" ]
1
2019-07-01T01:36:28.000Z
2019-07-01T01:36:28.000Z
statistics/mySQLvsPostgreSQLall.36.py
biosoda/bioquery
de80b6a06f079d3383a6b159151043d1f2b77d52
[ "CC0-1.0" ]
1
2020-04-30T01:09:38.000Z
2020-04-30T01:09:38.000Z
statistics/mySQLvsPostgreSQLall.36.py
biosoda/bioquery
de80b6a06f079d3383a6b159151043d1f2b77d52
[ "CC0-1.0" ]
1
2021-11-02T17:08:21.000Z
2021-11-02T17:08:21.000Z
import requests, os, re, json, sys import argparse import urllib.parse from pprint import pprint import datetime if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--loops') parser.add_argument('--outputfile') parser.add_argument('--inputfile') args = parser.parse_args() ...
35.617801
216
0.588123
import requests, os, re, json, sys import argparse import urllib.parse from pprint import pprint import datetime if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--loops') parser.add_argument('--outputfile') parser.add_argument('--inputfile') args = parser.parse_args() ...
true
true
f7fc4b9fe018ec1e58e9615fa9df7e1ec204ebfb
554
py
Python
PythonEx.py
microsoft/MSRC-Microsoft-Engage-API
b7e8c06388dcfaa5ebcf7911a8578dd0e81f8b21
[ "MIT" ]
9
2019-06-18T01:51:32.000Z
2021-07-26T17:40:30.000Z
PythonEx.py
microsoft/MSRC-Microsoft-Engage-API
b7e8c06388dcfaa5ebcf7911a8578dd0e81f8b21
[ "MIT" ]
3
2020-04-22T20:31:38.000Z
2021-02-19T23:00:49.000Z
PythonEx.py
microsoft/MSRC-Microsoft-Engage-API
b7e8c06388dcfaa5ebcf7911a8578dd0e81f8b21
[ "MIT" ]
9
2019-05-22T01:14:42.000Z
2021-06-08T19:10:23.000Z
import http.client, urllib.request, urllib.parse, urllib.error, base64 headers = { 'Content-Type': 'application/json' } params = urllib.parse.urlencode({ }) try: conn = http.client.HTTPSConnection('https://api.msrc.microsoft.com') # Data model documentation at https://msrc.microsoft.com/report/developer s...
25.181818
75
0.685921
import http.client, urllib.request, urllib.parse, urllib.error, base64 headers = { 'Content-Type': 'application/json' } params = urllib.parse.urlencode({ }) try: conn = http.client.HTTPSConnection('https://api.msrc.microsoft.com') str = "{}" conn.request("POST", "/report/v2.0/abuse?%s" % params, str...
true
true
f7fc4c4ee59cae38919336f439189961e59371b2
2,519
py
Python
tests/unit/resources/scales/test_log_scale.py
primitybio/cellengine-python-toolk
1f9dd168f1f27e2beba69f02e340371190857b33
[ "MIT" ]
4
2021-01-12T17:03:37.000Z
2021-12-16T13:23:57.000Z
tests/unit/resources/scales/test_log_scale.py
primitybio/cellengine-python-toolk
1f9dd168f1f27e2beba69f02e340371190857b33
[ "MIT" ]
61
2021-01-11T05:27:16.000Z
2022-03-08T01:50:09.000Z
tests/unit/resources/scales/test_log_scale.py
primitybio/cellengine-python-toolkit
1f9dd168f1f27e2beba69f02e340371190857b33
[ "MIT" ]
null
null
null
import pytest from math import isclose from numpy import log10 from pandas import Series from cellengine.utils.scale_utils import apply_scale @pytest.fixture(scope="module") def scale(): return {"minimum": 5, "maximum": 10, "type": "LogScale"} def test_should_apply_scale(scale): # fmt: off input = Seri...
33.144737
79
0.627233
import pytest from math import isclose from numpy import log10 from pandas import Series from cellengine.utils.scale_utils import apply_scale @pytest.fixture(scope="module") def scale(): return {"minimum": 5, "maximum": 10, "type": "LogScale"} def test_should_apply_scale(scale): input = Series([ ...
true
true
f7fc4cec09dd5d7696ea7e3c67f53b28631935e4
538
py
Python
setup.py
neal-o-r/-ireamh-n
a7cdb55dfbf3e871b17f2621f536f0f04ac5ed57
[ "MIT" ]
36
2017-07-05T05:47:41.000Z
2021-05-19T22:58:27.000Z
setup.py
neal-o-r/-ireamh-n
a7cdb55dfbf3e871b17f2621f536f0f04ac5ed57
[ "MIT" ]
1
2017-10-18T09:13:04.000Z
2017-10-18T15:11:06.000Z
setup.py
neal-o-r/-ireamh-n
a7cdb55dfbf3e871b17f2621f536f0f04ac5ed57
[ "MIT" ]
6
2017-07-08T03:46:41.000Z
2019-10-25T13:12:11.000Z
from distutils.core import setup setup( name = 'aireamhan', packages = ['aireamhan'], # this must be the same as the name above version = '1.4', description = 'Teanga Ríomhchlárúchain as Gaeilge', author = 'Neal Ó Riain', author_email = 'neal@n-o-r.xyz', url = 'https://github.com/neal-o-r/aireamhan', # us...
35.866667
81
0.67658
from distutils.core import setup setup( name = 'aireamhan', packages = ['aireamhan'], version = '1.4', description = 'Teanga Ríomhchlárúchain as Gaeilge', author = 'Neal Ó Riain', author_email = 'neal@n-o-r.xyz', url = 'https://github.com/neal-o-r/aireamhan', download_url = 'https://github.com/neal-o-...
true
true
f7fc4d2c32f0a20cbdfd1104ad91a5665b4b7810
4,095
py
Python
tests/Tester.py
FelixKleineBoesing/FeatureSelector
b33454be39d53881b1c1b5b7b6dca8d782cabd36
[ "MIT" ]
null
null
null
tests/Tester.py
FelixKleineBoesing/FeatureSelector
b33454be39d53881b1c1b5b7b6dca8d782cabd36
[ "MIT" ]
6
2019-02-25T08:09:48.000Z
2019-02-25T08:11:55.000Z
tests/Tester.py
FelixKleineBoesing/pyFeatSel
b33454be39d53881b1c1b5b7b6dca8d782cabd36
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np import logging import time from pyFeatSel.Models.Model import XGBoostModel from pyFeatSel.FeatureSelectors.CompleteFeatureSpace import CompleteFeatureSpace from pyFeatSel.FeatureSelectors.GreedySearch import GreedySearch from pyFeatSel.Evaluator.Evaluator import Accuracy from pyF...
51.835443
115
0.529915
import pandas as pd import numpy as np import logging import time from pyFeatSel.Models.Model import XGBoostModel from pyFeatSel.FeatureSelectors.CompleteFeatureSpace import CompleteFeatureSpace from pyFeatSel.FeatureSelectors.GreedySearch import GreedySearch from pyFeatSel.Evaluator.Evaluator import Accuracy from pyF...
true
true
f7fc4e2f3208e5c193c965cb1d4327dc1a76b3b9
6,526
py
Python
salt/modules/kmod.py
vamshi98/salt-formulas
30edeadafd5d173efe4e1f767a8d562547ad128a
[ "Apache-2.0" ]
null
null
null
salt/modules/kmod.py
vamshi98/salt-formulas
30edeadafd5d173efe4e1f767a8d562547ad128a
[ "Apache-2.0" ]
null
null
null
salt/modules/kmod.py
vamshi98/salt-formulas
30edeadafd5d173efe4e1f767a8d562547ad128a
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Module to manage Linux kernel modules ''' from __future__ import absolute_import # Import python libs import os import re # Import salt libs import salt.utils def __virtual__(): ''' Only runs on Linux systems ''' return __grains__['kernel'] == 'Linux' def _new_mods(pre_...
24.081181
79
0.576923
from __future__ import absolute_import import os import re import salt.utils def __virtual__(): return __grains__['kernel'] == 'Linux' def _new_mods(pre_mods, post_mods): pre = set() post = set() for mod in pre_mods: pre.add(mod['module']) for mod in post_mods: post.add(mod[...
true
true
f7fc4f740c5d682298503e82253d52538deb549c
2,505
py
Python
flaskr/auth.py
bkoz/flask-tutorial
8d0bda113e15cb712beb085c7da0a16c1ae03f24
[ "Apache-2.0" ]
null
null
null
flaskr/auth.py
bkoz/flask-tutorial
8d0bda113e15cb712beb085c7da0a16c1ae03f24
[ "Apache-2.0" ]
null
null
null
flaskr/auth.py
bkoz/flask-tutorial
8d0bda113e15cb712beb085c7da0a16c1ae03f24
[ "Apache-2.0" ]
null
null
null
import functools from flask import ( Blueprint, flash, g, redirect, render_template, request, session, url_for ) from werkzeug.security import check_password_hash, generate_password_hash from flaskr.db import get_db bp = Blueprint('auth', __name__, url_prefix='/auth') # # register # @bp.route('/register', metho...
25.30303
77
0.583234
import functools from flask import ( Blueprint, flash, g, redirect, render_template, request, session, url_for ) from werkzeug.security import check_password_hash, generate_password_hash from flaskr.db import get_db bp = Blueprint('auth', __name__, url_prefix='/auth') @bp.route('/register', methods=('GET', '...
true
true
f7fc4fb5e66d1021a5d3d8e4fa3489b9d352701f
8,921
py
Python
crossdock/server/server.py
sunset3000/jaeger-client-python
6a10175d2fdb0c72fb804b9252ff4b40e3ebf104
[ "Apache-2.0" ]
null
null
null
crossdock/server/server.py
sunset3000/jaeger-client-python
6a10175d2fdb0c72fb804b9252ff4b40e3ebf104
[ "Apache-2.0" ]
1
2021-11-04T04:36:24.000Z
2021-11-04T04:42:16.000Z
crossdock/server/server.py
sunset3000/jaeger-client-python
6a10175d2fdb0c72fb804b9252ff4b40e3ebf104
[ "Apache-2.0" ]
4
2019-03-11T14:39:04.000Z
2021-03-15T18:23:43.000Z
# Modified by SignalFx # Copyright (c) 2016 Uber Technologies, 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 appli...
38.786957
99
0.696783
import logging import tornado.web import opentracing import tornado.ioloop import tornado.httpclient from tornado.web import asynchronous from jaeger_client import Tracer, ConstSampler from jaeger_client.reporter import NullReporter import crossdock.server.constants as constants import crossdock.server....
true
true
f7fc5024f188039fda1d0c1a94d45b12bc8eefaa
3,346
py
Python
craftassist/agent/dialogue_objects/facing_helper.py
Dhiraj100892/droidlet
e4ea578672531524552b6ff021165fc9371b0ec8
[ "MIT" ]
null
null
null
craftassist/agent/dialogue_objects/facing_helper.py
Dhiraj100892/droidlet
e4ea578672531524552b6ff021165fc9371b0ec8
[ "MIT" ]
null
null
null
craftassist/agent/dialogue_objects/facing_helper.py
Dhiraj100892/droidlet
e4ea578672531524552b6ff021165fc9371b0ec8
[ "MIT" ]
null
null
null
""" Copyright (c) Facebook, Inc. and its affiliates. """ from base_agent.base_util import ErrorWithResponse from base_agent.dialogue_objects import interpret_relative_direction from word2number.w2n import word_to_num def number_from_span(span): # this will fail in many cases.... words = span.split() degr...
39.833333
84
0.547818
from base_agent.base_util import ErrorWithResponse from base_agent.dialogue_objects import interpret_relative_direction from word2number.w2n import word_to_num def number_from_span(span): words = span.split() degrees = None for w in words: try: degrees = int(w) except: ...
true
true
f7fc502f018ff0a4b901789ed78e73f55ab73b9a
843
py
Python
tests/__init__.py
Cadair/synapse
466866a1d9dd1fcf82348a36c0532cb0c6614767
[ "Apache-2.0" ]
1
2019-09-14T03:24:03.000Z
2019-09-14T03:24:03.000Z
tests/__init__.py
Cadair/synapse
466866a1d9dd1fcf82348a36c0532cb0c6614767
[ "Apache-2.0" ]
4
2020-03-04T23:47:05.000Z
2021-12-09T21:41:44.000Z
tests/__init__.py
Cadair/synapse
466866a1d9dd1fcf82348a36c0532cb0c6614767
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2014-2016 OpenMarket Ltd # Copyright 2018 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.0...
33.72
74
0.771056
from twisted.trial import util import tests.patch_inline_callbacks tests.patch_inline_callbacks.do_patch() util.DEFAULT_TIMEOUT_DURATION = 20
true
true
f7fc514a52d7fd959e3b80d9c3b97a0d2c8a549c
3,204
py
Python
cinder/db/sqlalchemy/migrate_repo/versions/021_add_default_quota_class.py
yanheven/cinder
89797971f30d547acbf715fea099c52d90966d1f
[ "Apache-2.0" ]
null
null
null
cinder/db/sqlalchemy/migrate_repo/versions/021_add_default_quota_class.py
yanheven/cinder
89797971f30d547acbf715fea099c52d90966d1f
[ "Apache-2.0" ]
null
null
null
cinder/db/sqlalchemy/migrate_repo/versions/021_add_default_quota_class.py
yanheven/cinder
89797971f30d547acbf715fea099c52d90966d1f
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
36.409091
78
0.645443
import datetime from oslo_config import cfg from oslo_log import log as logging from sqlalchemy import MetaData, Table from cinder.i18n import _LE, _LI CONF = cfg.CONF CONF.import_opt('quota_volumes', 'cinder.quota') CONF.import_opt('quota_snapshots', 'cinder.quota') CONF.import_opt('quota_gigabyte...
true
true
f7fc520a7fa9cfbf5c91d46a60e8a8c682a4a51f
612
py
Python
fileuploads/migrations/0016_attachment.py
fr33ky/signalserver
ce360cd89732c9d9270d7af04e38e55f6570d6a7
[ "MIT" ]
23
2016-03-24T00:31:47.000Z
2022-02-10T21:27:53.000Z
fileuploads/migrations/0016_attachment.py
fr33ky/signalserver
ce360cd89732c9d9270d7af04e38e55f6570d6a7
[ "MIT" ]
148
2016-04-03T00:22:55.000Z
2020-08-01T20:08:03.000Z
fileuploads/migrations/0016_attachment.py
fr33ky/signalserver
ce360cd89732c9d9270d7af04e38e55f6570d6a7
[ "MIT" ]
11
2016-04-24T03:31:31.000Z
2019-09-03T16:51:08.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.dev20160107235441 on 2016-06-08 07:17 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('fileuploads', '0015_auto_20160606_0712'), ] operations = [ ...
26.608696
114
0.614379
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('fileuploads', '0015_auto_20160606_0712'), ] operations = [ migrations.CreateModel( name='Attachment', fields=[ ...
true
true
f7fc522b7620c2b8cb95f33879398ac00dcbe666
377
py
Python
excursions/migrations/0004_alter_excursion_date.py
timptner/farafmb.de
2b154278d8b44ea3adecafcb8554c1b0b0055e01
[ "MIT" ]
1
2017-04-06T09:12:45.000Z
2017-04-06T09:12:45.000Z
excursions/migrations/0004_alter_excursion_date.py
timptner/farafmb.de
2b154278d8b44ea3adecafcb8554c1b0b0055e01
[ "MIT" ]
2
2017-09-07T22:09:50.000Z
2020-06-09T14:46:30.000Z
excursions/migrations/0004_alter_excursion_date.py
timptner/farafmb.de
2b154278d8b44ea3adecafcb8554c1b0b0055e01
[ "MIT" ]
null
null
null
# Generated by Django 3.2.4 on 2021-09-18 14:01 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('excursions', '0003_auto_20210918_1341'), ] operations = [ migrations.AlterField( model_name='excursion', name='date'...
19.842105
50
0.591512
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('excursions', '0003_auto_20210918_1341'), ] operations = [ migrations.AlterField( model_name='excursion', name='date', field=models.DateField(), ...
true
true
f7fc527a89d72629d6026538921e96b1a060b7d6
6,380
py
Python
frappe/desk/doctype/dashboard_chart/dashboard_chart.py
vigneshpp/globaas-dev-frappe
2ecc45b4949adefa083574d46c8d5a23da76b92e
[ "MIT" ]
null
null
null
frappe/desk/doctype/dashboard_chart/dashboard_chart.py
vigneshpp/globaas-dev-frappe
2ecc45b4949adefa083574d46c8d5a23da76b92e
[ "MIT" ]
5
2020-12-04T21:18:22.000Z
2022-03-12T00:43:08.000Z
frappe/desk/doctype/dashboard_chart/dashboard_chart.py
vigneshpp/globaas-dev-frappe
2ecc45b4949adefa083574d46c8d5a23da76b92e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ import datetime from frappe.core.page.dashboard.dashboard import cache_source, get_from_date_from_timespan from...
28.609865
108
0.726646
from __future__ import unicode_literals import frappe from frappe import _ import datetime from frappe.core.page.dashboard.dashboard import cache_source, get_from_date_from_timespan from frappe.utils import nowdate, add_to_date, getdate, get_last_day, formatdate from frappe.model.document import Document @frappe.w...
true
true
f7fc52c835209cfbcd7e5ec513d91b7f010974ac
4,859
py
Python
ephypype/power.py
annapasca/ephypype
6dbacdd6913234a28b690b401862ff062accecc7
[ "BSD-3-Clause" ]
18
2018-04-18T12:14:52.000Z
2022-02-25T19:31:44.000Z
ephypype/power.py
annapasca/ephypype
6dbacdd6913234a28b690b401862ff062accecc7
[ "BSD-3-Clause" ]
106
2017-12-09T13:34:30.000Z
2022-03-12T01:02:17.000Z
ephypype/power.py
annapasca/ephypype
6dbacdd6913234a28b690b401862ff062accecc7
[ "BSD-3-Clause" ]
13
2017-05-28T20:38:56.000Z
2022-03-06T15:58:02.000Z
"""Power functions.""" # Author: Dmitrii Altukhov <dm-altukhov@ya.ru> # Annalisa Pascarella <a.pascarella@iac.cnr.it> import os import numpy as np from nipype.utils.filemanip import split_filename from mne import read_epochs from mne.io import read_raw_fif from scipy.signal import welch from .fif2array impor...
31.75817
79
0.63902
import os import numpy as np from nipype.utils.filemanip import split_filename from mne import read_epochs from mne.io import read_raw_fif from scipy.signal import welch from .fif2array import _get_raw_array def _compute_and_save_psd(data_fname, fmin=0, fmax=120, method='welch', is_epoc...
true
true
f7fc5376a52ebd7b7f95d9e276104aba47fd2418
3,136
py
Python
lib/society/test.py
Sciteb-code/CODiT
f70bf57e6d4710066e2c9ef8f2203f04245715d1
[ "MIT" ]
null
null
null
lib/society/test.py
Sciteb-code/CODiT
f70bf57e6d4710066e2c9ef8f2203f04245715d1
[ "MIT" ]
null
null
null
lib/society/test.py
Sciteb-code/CODiT
f70bf57e6d4710066e2c9ef8f2203f04245715d1
[ "MIT" ]
null
null
null
import logging from collections import defaultdict class Test: def __init__(self, person, notes, time_to_complete, days_delayed_start=0): self.days_elapsed = 0 self.person = person self.positive = None self.days_to_complete = time_to_complete + days_delayed_start self.notes ...
35.636364
116
0.656888
import logging from collections import defaultdict class Test: def __init__(self, person, notes, time_to_complete, days_delayed_start=0): self.days_elapsed = 0 self.person = person self.positive = None self.days_to_complete = time_to_complete + days_delayed_start self.notes ...
true
true
f7fc5386c69541a6b6eb6011d702e49b1549aa6a
2,166
py
Python
tools/trainval.py
carpedkm/vedatad
55f8dced57f698ee9fc0da9bcf471d171e718d0c
[ "Apache-2.0" ]
null
null
null
tools/trainval.py
carpedkm/vedatad
55f8dced57f698ee9fc0da9bcf471d171e718d0c
[ "Apache-2.0" ]
null
null
null
tools/trainval.py
carpedkm/vedatad
55f8dced57f698ee9fc0da9bcf471d171e718d0c
[ "Apache-2.0" ]
null
null
null
import argparse import os.path as osp import shutil import time from vedacore.misc import Config, mkdir_or_exist, set_random_seed from vedacore.parallel import init_dist from vedatad.assembler import trainval # calls for the first time in the code from vedatad.misc import get_root_logger def parse_args(): parse...
32.328358
126
0.685134
import argparse import os.path as osp import shutil import time from vedacore.misc import Config, mkdir_or_exist, set_random_seed from vedacore.parallel import init_dist from vedatad.assembler import trainval from vedatad.misc import get_root_logger def parse_args(): parser = argparse.ArgumentParser(descriptio...
true
true
f7fc541ab96dd0d95df2f48a893452765495b1ff
1,428
py
Python
examples/peripherals/timer_group/example_test.py
mishafarms/esp-idf
b886dc699880e6f068d5abc0433deb60a6466fee
[ "Apache-2.0" ]
5
2021-11-22T06:47:54.000Z
2022-01-04T06:58:43.000Z
examples/peripherals/timer_group/example_test.py
mishafarms/esp-idf
b886dc699880e6f068d5abc0433deb60a6466fee
[ "Apache-2.0" ]
null
null
null
examples/peripherals/timer_group/example_test.py
mishafarms/esp-idf
b886dc699880e6f068d5abc0433deb60a6466fee
[ "Apache-2.0" ]
1
2021-03-01T11:52:31.000Z
2021-03-01T11:52:31.000Z
#!/usr/bin/env python # # SPDX-FileCopyrightText: 2019-2021 Espressif Systems (Shanghai) CO LTD # # SPDX-License-Identifier: CC0-1.0 # from __future__ import unicode_literals import re from typing import Any import ttfw_idf @ttfw_idf.idf_example_test(env_tag='Example_GENERIC', target=['esp32', 'esp32s2', 'esp32c3'...
33.209302
94
0.69958
from __future__ import unicode_literals import re from typing import Any import ttfw_idf @ttfw_idf.idf_example_test(env_tag='Example_GENERIC', target=['esp32', 'esp32s2', 'esp32c3']) def test_examples_timergroup(env, extra_data): dut = env.get_dut('timer_group', 'examples/peripherals/timer_group') ...
true
true
f7fc54d91b35df22264277bb1c9469b1d61e960e
98,018
py
Python
top2vec/Top2Vec.py
taghizad3h/Top2Vec
0237989ecd6a28df184b6a2b245239c501676da2
[ "BSD-3-Clause" ]
null
null
null
top2vec/Top2Vec.py
taghizad3h/Top2Vec
0237989ecd6a28df184b6a2b245239c501676da2
[ "BSD-3-Clause" ]
null
null
null
top2vec/Top2Vec.py
taghizad3h/Top2Vec
0237989ecd6a28df184b6a2b245239c501676da2
[ "BSD-3-Clause" ]
null
null
null
# Author: Dimo Angelov # # License: BSD 3 clause import logging import numpy as np import pandas as pd from gensim.models.doc2vec import Doc2Vec, TaggedDocument from gensim.utils import simple_preprocess from gensim.parsing.preprocessing import strip_tags import umap import hdbscan from wordcloud import WordCloud impor...
40.419794
120
0.613357
import logging import numpy as np import pandas as pd from gensim.models.doc2vec import Doc2Vec, TaggedDocument from gensim.utils import simple_preprocess from gensim.parsing.preprocessing import strip_tags import umap import hdbscan from wordcloud import WordCloud import matplotlib.pyplot as plt from joblib import ...
true
true
f7fc54d9346560e9db56dde1a2b49fc6469fe28f
11,154
py
Python
test/fakedata_generation.py
AlessandroLaRocca96/vision
d4195587166134c3806ae81458d08b06f5e00295
[ "BSD-3-Clause" ]
1
2019-08-22T00:50:56.000Z
2019-08-22T00:50:56.000Z
test/fakedata_generation.py
AlessandroLaRocca96/vision
d4195587166134c3806ae81458d08b06f5e00295
[ "BSD-3-Clause" ]
27
2019-11-06T10:06:13.000Z
2020-11-06T11:34:20.000Z
test/fakedata_generation.py
AlessandroLaRocca96/vision
d4195587166134c3806ae81458d08b06f5e00295
[ "BSD-3-Clause" ]
null
null
null
import os import contextlib import tarfile import json import numpy as np import PIL import torch from common_utils import get_tmp_dir import pickle import random from itertools import cycle from torchvision.io.video import write_video import unittest.mock import hashlib from distutils import dir_util import re def m...
35.864952
113
0.633584
import os import contextlib import tarfile import json import numpy as np import PIL import torch from common_utils import get_tmp_dir import pickle import random from itertools import cycle from torchvision.io.video import write_video import unittest.mock import hashlib from distutils import dir_util import re def m...
true
true
f7fc55a2b7b053b3b7296d141796a25fb46580bf
144
py
Python
gis/__init__.py
DiviPeople/villudyr
b9de79f3985787685a00d407488909da183a5ccf
[ "Apache-2.0" ]
null
null
null
gis/__init__.py
DiviPeople/villudyr
b9de79f3985787685a00d407488909da183a5ccf
[ "Apache-2.0" ]
null
null
null
gis/__init__.py
DiviPeople/villudyr
b9de79f3985787685a00d407488909da183a5ccf
[ "Apache-2.0" ]
null
null
null
"""Module initializing the package.""" import os import django os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'gis.docker') django.setup()
14.4
61
0.756944
import os import django os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'gis.docker') django.setup()
true
true
f7fc56499362846a5ade9d6580121d8beb2af7f0
1,038
py
Python
setup.py
mir-group/PyfileUtils
925046a5e328ab144e8b554de9efc2655c686b0a
[ "MIT" ]
null
null
null
setup.py
mir-group/PyfileUtils
925046a5e328ab144e8b554de9efc2655c686b0a
[ "MIT" ]
null
null
null
setup.py
mir-group/PyfileUtils
925046a5e328ab144e8b554de9efc2655c686b0a
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages from pathlib import Path package_names = ["pyfile", "utils"] _name = "_".join(package_names) name = "-".join(package_names) # see https://packaging.python.org/guides/single-sourcing-package-version/ version_dict = {} with open(Path(__file__).parents[0] / _name / "_version.p...
28.833333
78
0.659923
from setuptools import setup, find_packages from pathlib import Path package_names = ["pyfile", "utils"] _name = "_".join(package_names) name = "-".join(package_names) version_dict = {} with open(Path(__file__).parents[0] / _name / "_version.py") as fp: exec(fp.read(), version_dict) version = version_dict["__ver...
true
true
f7fc565ac3b40a146237178344e60fd3947c3d50
3,693
py
Python
pyaoscx/utils/list_attributes.py
aopdal/pyaoscx
b21adba63ace0b9e2a54f65e82b284a6d023791c
[ "Apache-2.0" ]
null
null
null
pyaoscx/utils/list_attributes.py
aopdal/pyaoscx
b21adba63ace0b9e2a54f65e82b284a6d023791c
[ "Apache-2.0" ]
null
null
null
pyaoscx/utils/list_attributes.py
aopdal/pyaoscx
b21adba63ace0b9e2a54f65e82b284a6d023791c
[ "Apache-2.0" ]
null
null
null
# (C) Copyright 2019-2022 Hewlett Packard Enterprise Development LP. # Apache License 2.0 from pyaoscx.exceptions.generic_op_error import GenericOperationError class ListDescriptor(list): """ Attribute descriptor class to keep track of a list that contains pyaoscx_module objects simulating a Referenc...
27.559701
75
0.562957
from pyaoscx.exceptions.generic_op_error import GenericOperationError class ListDescriptor(list): def __init__( self, name, ): self.name = name def __get__(self, instance, owner): return instance.__dict__[self.name] def __set__(self, instance, new_list): n...
true
true
f7fc577bc363a918f7b55dcea299ff98c58e511c
395
py
Python
Random Python Projects/Hypixel Skyblock/BAZAARE.py
n0rel/self
f9f44af42aa652f9a72279e44ffd8d4387a4bdae
[ "MIT" ]
null
null
null
Random Python Projects/Hypixel Skyblock/BAZAARE.py
n0rel/self
f9f44af42aa652f9a72279e44ffd8d4387a4bdae
[ "MIT" ]
null
null
null
Random Python Projects/Hypixel Skyblock/BAZAARE.py
n0rel/self
f9f44af42aa652f9a72279e44ffd8d4387a4bdae
[ "MIT" ]
null
null
null
import json, requests, datetime item = 'HOT_POTATO_BOOK' r = requests.get(f"https://api.hypixel.net/skyblock/bazaar/product?key=7e8355c8-a50b-4473-ba41-b03d0473a0d8&productId={item}").json() for i in r['product_info']['week_historic']: time = datetime.datetime.fromtimestamp(i['timestamp']/1000).strftime("%a, %H:%...
49.375
133
0.681013
import json, requests, datetime item = 'HOT_POTATO_BOOK' r = requests.get(f"https://api.hypixel.net/skyblock/bazaar/product?key=7e8355c8-a50b-4473-ba41-b03d0473a0d8&productId={item}").json() for i in r['product_info']['week_historic']: time = datetime.datetime.fromtimestamp(i['timestamp']/1000).strftime("%a, %H:%...
true
true
f7fc57bb32b25b6b9c1161a740b9ac75acd0d10e
6,967
py
Python
utils/SwiftBuildSupport.py
YogeshBharate/Swift
a14a836caa42b1652f8f30b725370eff2ad6d799
[ "Apache-2.0" ]
3
2016-10-13T11:30:36.000Z
2016-12-10T05:00:31.000Z
utils/SwiftBuildSupport.py
YogeshBharate/Swift
a14a836caa42b1652f8f30b725370eff2ad6d799
[ "Apache-2.0" ]
null
null
null
utils/SwiftBuildSupport.py
YogeshBharate/Swift
a14a836caa42b1652f8f30b725370eff2ad6d799
[ "Apache-2.0" ]
1
2019-02-10T19:49:36.000Z
2019-02-10T19:49:36.000Z
# utils/SwiftBuildSupport.py - Utilities for Swift build scripts -*- python -*- # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See http://swift.org/LICENSE.tx...
31.524887
79
0.648486
from __future__ import print_function try: import ConfigParser except ImportError: import configparser as ConfigParser import os import pipes import platform import subprocess import sys HOME = os.environ.get("HOME", "/") def _get_default_source_root(): result = "" ...
true
true
f7fc57d0e520c850d41edf11f01047f9f128d125
63
py
Python
archives/workflows/simple_uq/swift/junk.py
mdorier/Supervisor
f1e43b2b33fb2cf9e03ea3ac49378aba37bd9839
[ "MIT" ]
10
2017-03-14T14:36:19.000Z
2021-01-21T00:39:36.000Z
archives/workflows/simple_uq/swift/junk.py
mdorier/Supervisor
f1e43b2b33fb2cf9e03ea3ac49378aba37bd9839
[ "MIT" ]
58
2017-03-03T21:07:53.000Z
2021-07-19T18:51:03.000Z
archives/workflows/simple_uq/swift/junk.py
ORNL-BSEC/Supervisor
14a73ad19b10cebab0d7d2d48e52692485957ad2
[ "MIT" ]
21
2017-03-08T16:07:47.000Z
2020-11-24T04:23:00.000Z
inputs = eval(permutation_sets) training, validation = inputs
15.75
31
0.793651
inputs = eval(permutation_sets) training, validation = inputs
true
true
f7fc57e78b69253de269a68cdc3bf266b165bc16
38,765
py
Python
libs/utils/env.py
MIPS/external-lisa
48024e3bdcb39528f69bb897a3aff57347535c7d
[ "Apache-2.0" ]
null
null
null
libs/utils/env.py
MIPS/external-lisa
48024e3bdcb39528f69bb897a3aff57347535c7d
[ "Apache-2.0" ]
null
null
null
libs/utils/env.py
MIPS/external-lisa
48024e3bdcb39528f69bb897a3aff57347535c7d
[ "Apache-2.0" ]
null
null
null
# SPDX-License-Identifier: Apache-2.0 # # Copyright (C) 2015, ARM Limited and contributors. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
37.274038
114
0.559551
import datetime import json import logging import os import re import shutil import sys import time import unittest import devlib from devlib.utils.misc import memoized from devlib import Platform, TargetError from trappy.stats.Topology import Topology from wlgen import RTA from energy import EnergyM...
true
true
f7fc597cf60e169ead5aa52a321aafdec4e6ab17
5,263
py
Python
Lib/site-packages/pytz/lazy.py
inging44/python3
fcd8d9d2ee54b46b757ecf34f284b4e60a43097a
[ "bzip2-1.0.6" ]
5,079
2015-01-01T03:39:46.000Z
2022-03-31T07:38:22.000Z
Lib/site-packages/pytz/lazy.py
inging44/python3
fcd8d9d2ee54b46b757ecf34f284b4e60a43097a
[ "bzip2-1.0.6" ]
1,623
2015-01-01T08:06:24.000Z
2022-03-30T19:48:52.000Z
Lib/site-packages/pytz/lazy.py
inging44/python3
fcd8d9d2ee54b46b757ecf34f284b4e60a43097a
[ "bzip2-1.0.6" ]
2,033
2015-01-04T07:18:02.000Z
2022-03-28T19:55:47.000Z
from threading import RLock try: from UserDict import DictMixin except ImportError: from collections import Mapping as DictMixin # With lazy loading, we might end up with multiple threads triggering # it at the same time. We need a lock. _fill_lock = RLock() class LazyDict(DictMixin): """Dictionary popu...
31.142012
75
0.534296
from threading import RLock try: from UserDict import DictMixin except ImportError: from collections import Mapping as DictMixin _fill_lock = RLock() class LazyDict(DictMixin): data = None def __getitem__(self, key): if self.data is None: _fill_lock.acquire() try: ...
true
true
f7fc5a0780d1c180220fb33393752c42353aee2c
4,957
py
Python
pcd8544_fb.py
mbaser/micropython-pcd8544
791d4239d77b0d06192c7ab7903d81a72a53f992
[ "MIT" ]
46
2017-08-03T15:33:26.000Z
2022-02-24T04:00:31.000Z
pcd8544_fb.py
mbaser/micropython-pcd8544
791d4239d77b0d06192c7ab7903d81a72a53f992
[ "MIT" ]
3
2018-08-20T23:42:26.000Z
2021-11-01T13:07:35.000Z
pcd8544_fb.py
mcauser/micropython-pcd8544
791d4239d77b0d06192c7ab7903d81a72a53f992
[ "MIT" ]
12
2017-07-18T20:17:18.000Z
2022-02-24T02:32:40.000Z
""" MicroPython Nokia 5110 PCD8544 84x48 LCD driver https://github.com/mcauser/micropython-pcd8544 MIT License Copyright (c) 2016-2018 Mike Causer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software ...
28.988304
83
0.701231
from micropython import const from ustruct import pack from utime import sleep_us import framebuf FUNCTION_SET = const(0x20) POWER_DOWN = const(0x04) ADDRESSING_VERT = const(0x02) EXTENDED_INSTR = const(0x01) DISPLAY_BLANK = const(0x08) DISPLAY_ALL = const(0x09) DISPLAY_NORMAL = const(0x0c) ...
true
true
f7fc5a4829d2c5c3e2d1cfdd48692904f0fe3c3d
521
py
Python
python_algorithom/binary-search.py
Andrewpqc/Python_Ex
6f1770f2c209d4510696bcbca92ee9f31b9d169b
[ "MIT" ]
null
null
null
python_algorithom/binary-search.py
Andrewpqc/Python_Ex
6f1770f2c209d4510696bcbca92ee9f31b9d169b
[ "MIT" ]
null
null
null
python_algorithom/binary-search.py
Andrewpqc/Python_Ex
6f1770f2c209d4510696bcbca92ee9f31b9d169b
[ "MIT" ]
null
null
null
""" 二分查找 """ def binary_search(list, item): """ list:有序列表(从小到大排列) item:需要查找的元素 """ low = 0 high = len(list) - 1 while low < high: mid = (low + high) // 2 if item == list[mid]: return mid elif item > list[mid]: #查找值位于mid右边 low = mid + 1 ...
17.965517
43
0.485605
def binary_search(list, item): low = 0 high = len(list) - 1 while low < high: mid = (low + high) // 2 if item == list[mid]: return mid elif item > list[mid]: low = mid + 1 else: high = mid - 1 return None if __name__ == "...
true
true
f7fc5a9bde43e185bd4736081242be419b42f393
1,026
py
Python
selfdrive/messaging_arne/messaging_pyx_setup.py
1Thamer/openpilot0.6.6
e31f5a864870d22cf62c0ef298598dbe96bfb3a0
[ "MIT" ]
1
2019-12-25T17:59:05.000Z
2019-12-25T17:59:05.000Z
selfdrive/messaging_arne/messaging_pyx_setup.py
1Thamer/openpilot0.6.6
e31f5a864870d22cf62c0ef298598dbe96bfb3a0
[ "MIT" ]
null
null
null
selfdrive/messaging_arne/messaging_pyx_setup.py
1Thamer/openpilot0.6.6
e31f5a864870d22cf62c0ef298598dbe96bfb3a0
[ "MIT" ]
null
null
null
import os import subprocess from distutils.core import Extension, setup # pylint: disable=import-error,no-name-in-module from Cython.Build import cythonize from common.basedir import BASEDIR from common.cython_hacks import BuildExtWithoutPlatformSuffix sourcefiles = ['messaging_pyx.pyx'] extra_compile_args = ["-std...
29.314286
115
0.674464
import os import subprocess from distutils.core import Extension, setup from Cython.Build import cythonize from common.basedir import BASEDIR from common.cython_hacks import BuildExtWithoutPlatformSuffix sourcefiles = ['messaging_pyx.pyx'] extra_compile_args = ["-std=c++11"] libraries = [] ARCH = subprocess.check_...
true
true
f7fc5aae452fb92c82be02ab42e3ae71146bf451
969
py
Python
2015/Source/Day1.py
akshayupendran/AdventOfCodeInPython
8f9ac317258e8286f11e9ccc7d654a1a16307860
[ "MIT" ]
null
null
null
2015/Source/Day1.py
akshayupendran/AdventOfCodeInPython
8f9ac317258e8286f11e9ccc7d654a1a16307860
[ "MIT" ]
null
null
null
2015/Source/Day1.py
akshayupendran/AdventOfCodeInPython
8f9ac317258e8286f11e9ccc7d654a1a16307860
[ "MIT" ]
null
null
null
# Imports import os # Need OS for checking if file exists # Global Variables # InputFile = None if __name__ == '__main__': # global InputFile Path2File = '.\\..\\Inputs\\Day1_Input.txt' EnablePartTwo = 0 FloorNumber = 0 CharacterPosition = 0 if os.path.exists(Path2File): InputFile = o...
28.5
80
0.52322
import os if __name__ == '__main__': Path2File = '.\\..\\Inputs\\Day1_Input.txt' EnablePartTwo = 0 FloorNumber = 0 CharacterPosition = 0 if os.path.exists(Path2File): InputFile = open(Path2File, mode='r', encoding='utf-8', errors='strict') a = InputFile.read() for...
true
true
f7fc5bd172eb880e2a57ae66b2cc0fdd5f42d2bc
610
py
Python
homeworks/homework2/src/binomial.py
luizirber/cse891-parallel-computing
9f14d97de655ee9175b6298421d2db69bc8352ea
[ "BSD-3-Clause" ]
2
2015-06-10T20:58:59.000Z
2015-11-05T14:51:36.000Z
homeworks/homework2/src/binomial.py
luizirber/cse891-parallel-computing
9f14d97de655ee9175b6298421d2db69bc8352ea
[ "BSD-3-Clause" ]
null
null
null
homeworks/homework2/src/binomial.py
luizirber/cse891-parallel-computing
9f14d97de655ee9175b6298421d2db69bc8352ea
[ "BSD-3-Clause" ]
null
null
null
import math import sys procs = int(sys.argv[1]) m = int(math.log(procs, 2)) sender = 0 receiver = 0 for i in range(1, m + 1): for rank in range(procs): sender = 0 receiver = 0 divider = 2 << (i - 1) #pow(2, i) offset = divider >> 1 # divider / 2 if (rank % divider == 0): ...
21.034483
43
0.485246
import math import sys procs = int(sys.argv[1]) m = int(math.log(procs, 2)) sender = 0 receiver = 0 for i in range(1, m + 1): for rank in range(procs): sender = 0 receiver = 0 divider = 2 << (i - 1) offset = divider >> 1 if (rank % divider == 0): receiver = ...
false
true
f7fc5c855213598c594a98071c7bfcdb77768078
13,986
py
Python
tests/python/unittest/onnx/test_node.py
MoisesHer/incubator-mxnet
73d1b055d04a0f0f511a9cc2dd46ae2eb03a8628
[ "BSL-1.0", "Apache-2.0" ]
1
2019-02-22T13:53:48.000Z
2019-02-22T13:53:48.000Z
tests/python/unittest/onnx/test_node.py
MoisesHer/incubator-mxnet
73d1b055d04a0f0f511a9cc2dd46ae2eb03a8628
[ "BSL-1.0", "Apache-2.0" ]
1
2020-08-27T06:39:07.000Z
2020-08-31T03:29:27.000Z
tests/python/unittest/onnx/test_node.py
MoisesHer/incubator-mxnet
73d1b055d04a0f0f511a9cc2dd46ae2eb03a8628
[ "BSL-1.0", "Apache-2.0" ]
1
2020-08-14T22:56:19.000Z
2020-08-14T22:56:19.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
46.932886
120
0.600887
from __future__ import absolute_import import sys import os import unittest import logging import tarfile from collections import namedtuple import numpy as np import numpy.testing as npt from onnx import checker, numpy_helper, helper, load_model from onnx import TensorProto from mxnet.test_utils impo...
true
true
f7fc5ecd94ea31dbd97c3848c46a2891c0fb0bee
5,034
py
Python
IPython/core/tests/test_oinspect.py
dchichkov/ipython
8096bb8640ee7e7c5ebdf3f428fe69cd390e1cd4
[ "BSD-3-Clause-Clear" ]
1
2015-01-09T21:10:58.000Z
2015-01-09T21:10:58.000Z
IPython/core/tests/test_oinspect.py
dchichkov/ipython
8096bb8640ee7e7c5ebdf3f428fe69cd390e1cd4
[ "BSD-3-Clause-Clear" ]
3
2015-04-01T13:14:57.000Z
2015-05-26T16:01:37.000Z
IPython/core/tests/test_oinspect.py
dchichkov/ipython
8096bb8640ee7e7c5ebdf3f428fe69cd390e1cd4
[ "BSD-3-Clause-Clear" ]
1
2015-05-17T14:14:26.000Z
2015-05-17T14:14:26.000Z
"""Tests for the object inspection functionality. """ #----------------------------------------------------------------------------- # Copyright (C) 2010-2011 The IPython Development Team. # # Distributed under the terms of the BSD License. # # The full license is in the file COPYING.txt, distributed with this softw...
31.4625
88
0.547874
from __future__ import print_function import nose.tools as nt from .. import oinspect from IPython.utils import py3compat inspector = oinspect.Inspector() class Call(object): def __init__(self, x, y=1): def __call__(self, *a, **kw): def method(self, x, z=2): class OldStyle: ...
true
true
f7fc5f0ef70cd12d59ed2a98fd5202d893e4080d
14,949
py
Python
lib/roi_data_layer/roibatchLoader.py
Yoo-Youngjae/One-Shot-Object-Detection
c560a3dfb042776854bb928682dbbf545e2cd1bf
[ "MIT" ]
null
null
null
lib/roi_data_layer/roibatchLoader.py
Yoo-Youngjae/One-Shot-Object-Detection
c560a3dfb042776854bb928682dbbf545e2cd1bf
[ "MIT" ]
null
null
null
lib/roi_data_layer/roibatchLoader.py
Yoo-Youngjae/One-Shot-Object-Detection
c560a3dfb042776854bb928682dbbf545e2cd1bf
[ "MIT" ]
null
null
null
"""The data layer used during training to train a Fast R-CNN network. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import torch.utils.data as data from PIL import Image import torch from collections import Counter from scipy.misc import imread from...
37.466165
138
0.545455
from __future__ import absolute_import from __future__ import division from __future__ import print_function import torch.utils.data as data from PIL import Image import torch from collections import Counter from scipy.misc import imread from model.utils.config import cfg from roi_data_layer.minibatch import get_mi...
true
true
f7fc60173d989e7edf88fe61822fd317c7a6c21c
20,488
py
Python
custom_components/spacex/sensor.py
QziP22/HomeAssistantConfig
6b05fa20c8267222dc66f90e94f03f5d865c57a9
[ "Unlicense" ]
136
2019-06-27T08:11:47.000Z
2022-03-11T12:26:53.000Z
custom_components/spacex/sensor.py
QziP22/HomeAssistantConfig
6b05fa20c8267222dc66f90e94f03f5d865c57a9
[ "Unlicense" ]
5
2020-05-30T00:19:22.000Z
2022-03-25T18:49:47.000Z
custom_components/spacex/sensor.py
QziP22/HomeAssistantConfig
6b05fa20c8267222dc66f90e94f03f5d865c57a9
[ "Unlicense" ]
63
2019-07-15T21:11:58.000Z
2022-03-13T09:43:24.000Z
"""Definition and setup of the SpaceX Binary Sensors for Home Assistant.""" import logging import time import datetime from homeassistant.util.dt import as_local, utc_from_timestamp from homeassistant.components.sensor import ENTITY_ID_FORMAT, DEVICE_CLASS_TIMESTAMP from homeassistant.const import LENGTH_KILOMETERS, ...
34.608108
116
0.540951
import logging import time import datetime from homeassistant.util.dt import as_local, utc_from_timestamp from homeassistant.components.sensor import ENTITY_ID_FORMAT, DEVICE_CLASS_TIMESTAMP from homeassistant.const import LENGTH_KILOMETERS, SPEED_KILOMETERS_PER_HOUR, ATTR_NAME from homeassistant.helpers.entity impor...
true
true
f7fc62d633477d6d3ece9ba91ce54f2bc62a7f27
7,646
py
Python
sdk/python/pulumi_azure_native/web/v20201001/get_web_app_source_control_slot.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/web/v20201001/get_web_app_source_control_slot.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/web/v20201001/get_web_app_source_control_slot.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
38.23
220
0.654852
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs __all__ = [ 'GetWebAppSourceControlSlotResult', 'AwaitableGetWebAppSourceControlSlotResult', 'get_web_app_source_control_slot', ] @p...
true
true
f7fc63f7e8ee91a7e9ad6fbd19fb602bc0c5b147
10,770
py
Python
pdil/_core/math.py
Mikfr83/fossil
5bba97e6ea05bc59a76dae7f6ea11d09fe09e3bf
[ "BSD-3-Clause" ]
null
null
null
pdil/_core/math.py
Mikfr83/fossil
5bba97e6ea05bc59a76dae7f6ea11d09fe09e3bf
[ "BSD-3-Clause" ]
null
null
null
pdil/_core/math.py
Mikfr83/fossil
5bba97e6ea05bc59a76dae7f6ea11d09fe09e3bf
[ "BSD-3-Clause" ]
null
null
null
''' Utilities to deal with math nodes with ease so it feel more like writing equations as well as a few other things. All regular math operations functions (`add`, `divide`, etc.) take two params which can either be numbers, plugs or mixed and returns the plug of the output. Examples are better: add(someCube.tx, ...
25.951807
110
0.578273
from __future__ import print_function, absolute_import import ast import inspect import math import numbers from pymel.core import * class VECTOR: pass class _VECTOR_ATTR(VECTOR): pass class _VECTOR_NUMBER(VECTOR): pass VECTOR_ATTR = _VECTOR_ATTR() VECTOR_NUMBER = _VECTOR_NUMBER() class _NUMBER: pass class _N...
true
true
f7fc6594baba7e7e616e0caf25f35439aa83c89e
112
py
Python
init_classes/repost_first.py
xtuyaowu/jtyd_python_spider
ca5c3efd5519f592c0d587c22f03812e7756c8ea
[ "MIT" ]
7
2017-08-19T22:36:29.000Z
2018-06-03T07:02:04.000Z
init_classes/repost_first.py
xtuyaowu/jtyd_python_spider
ca5c3efd5519f592c0d587c22f03812e7756c8ea
[ "MIT" ]
2
2021-04-30T20:37:14.000Z
2021-12-13T19:46:29.000Z
init_classes/repost_first.py
xtuyaowu/jtyd_python_spider
ca5c3efd5519f592c0d587c22f03812e7756c8ea
[ "MIT" ]
4
2017-09-06T03:00:11.000Z
2017-12-10T08:04:21.000Z
# coding:utf-8 from celery_tasks.weibo import repost if __name__ == '__main__': repost.excute_repost_task()
22.4
37
0.758929
from celery_tasks.weibo import repost if __name__ == '__main__': repost.excute_repost_task()
true
true
f7fc6670dc680e9f1455e31ca758e0e10a321e53
2,918
py
Python
models/visual7w_attention_model.py
ronghanghu/cmn
85644ad56f8f62d04a5e8636ad3efe9ef7b34705
[ "MIT" ]
72
2017-04-12T17:07:36.000Z
2021-06-18T08:20:47.000Z
models/visual7w_attention_model.py
ronghanghu/cmn
85644ad56f8f62d04a5e8636ad3efe9ef7b34705
[ "MIT" ]
8
2017-07-06T04:24:04.000Z
2020-09-17T10:29:44.000Z
models/visual7w_attention_model.py
ronghanghu/cmn
85644ad56f8f62d04a5e8636ad3efe9ef7b34705
[ "MIT" ]
21
2017-04-19T07:38:09.000Z
2021-02-28T13:39:22.000Z
from models import modules, fastrcnn_vgg_net, lstm_net import tensorflow as tf from tensorflow import convert_to_tensor as to_T def visual7w_attbilstm_net(input_batch, bbox_batch1, spatial_batch1, bbox_batch2, spatial_batch2, expr_obj, num_vocab, embed_dim, lstm_dim, vgg_dropout, lstm_dropout): # a senten...
44.212121
80
0.719671
from models import modules, fastrcnn_vgg_net, lstm_net import tensorflow as tf from tensorflow import convert_to_tensor as to_T def visual7w_attbilstm_net(input_batch, bbox_batch1, spatial_batch1, bbox_batch2, spatial_batch2, expr_obj, num_vocab, embed_dim, lstm_dim, vgg_dropout, lstm_dropout): ...
true
true
f7fc66a4a6bddc05971a524df8faeb0b86622937
15,988
py
Python
cime/scripts/lib/CIME/case/case_run.py
apcraig/E3SM
61479712b58efe14e1c906818aaa7381d077e227
[ "zlib-acknowledgement", "RSA-MD", "FTL" ]
1
2020-10-16T07:24:21.000Z
2020-10-16T07:24:21.000Z
cime/scripts/lib/CIME/case/case_run.py
apcraig/E3SM
61479712b58efe14e1c906818aaa7381d077e227
[ "zlib-acknowledgement", "RSA-MD", "FTL" ]
3
2019-04-25T18:18:33.000Z
2019-05-07T16:43:36.000Z
cime/scripts/lib/CIME/case/case_run.py
apcraig/E3SM
61479712b58efe14e1c906818aaa7381d077e227
[ "zlib-acknowledgement", "RSA-MD", "FTL" ]
1
2020-03-02T21:55:25.000Z
2020-03-02T21:55:25.000Z
""" case_run is a member of Class Case '""" from CIME.XML.standard_module_setup import * from CIME.utils import gzip_existing_file, new_lid, run_and_log_case_status from CIME.utils import run_sub_or_cmd, append_status, safe_copy, model_log from CIME.get_timing impo...
47.301775
142
0.575557
from CIME.XML.standard_module_setup import * from CIME.utils import gzip_existing_file, new_lid, run_and_log_case_status from CIME.utils import run_sub_or_cmd, append_status, safe_copy, model_log from CIME.get_timing import get_timing from CIME.provenance ...
true
true
f7fc673eb617a6d182d67356cefed3b69a0c2fda
1,102
py
Python
python/src/nnabla/backward_function/reshape.py
daniel-falk/nnabla
3fe132ea52dc10521cc029a5d6ba8f565cf65ccf
[ "Apache-2.0" ]
2,792
2017-06-26T13:05:44.000Z
2022-03-28T07:55:26.000Z
python/src/nnabla/backward_function/reshape.py
daniel-falk/nnabla
3fe132ea52dc10521cc029a5d6ba8f565cf65ccf
[ "Apache-2.0" ]
138
2017-06-27T07:04:44.000Z
2022-02-28T01:37:15.000Z
python/src/nnabla/backward_function/reshape.py
daniel-falk/nnabla
3fe132ea52dc10521cc029a5d6ba8f565cf65ccf
[ "Apache-2.0" ]
380
2017-06-26T13:23:52.000Z
2022-03-25T16:51:30.000Z
# Copyright 2019,2020,2021 Sony Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
33.393939
86
0.72686
import nnabla.functions as F def reshape_backward(inputs, shape, inplace=True): dy = inputs[0] x0 = inputs[1] x0_shape = x0.shape dx0 = F.reshape(dy, x0_shape, inplace=inplace) return dx0
true
true
f7fc6791f440d5a1abb097672ea3935ce3129e62
6,094
py
Python
scripts/revredirs.py
Facenapalm/NapalmBot
ce775a270f374e626bcabc313676e4e2f9dbb843
[ "MIT" ]
4
2016-05-14T17:42:03.000Z
2018-09-24T18:43:03.000Z
scripts/revredirs.py
Facenapalm/NapalmBot
ce775a270f374e626bcabc313676e4e2f9dbb843
[ "MIT" ]
null
null
null
scripts/revredirs.py
Facenapalm/NapalmBot
ce775a270f374e626bcabc313676e4e2f9dbb843
[ "MIT" ]
1
2021-05-08T15:45:30.000Z
2021-05-08T15:45:30.000Z
"""This script automatically reviews obvious redirects in ruwiki.""" import re import pywikibot from pywikibot.data.api import Request def get_review_token(site): """Get a review token on the given site.""" return site.get_tokens(["csrf"])["csrf"] def review(site, token, page): """Review the latest revisi...
33.855556
104
0.541844
import re import pywikibot from pywikibot.data.api import Request def get_review_token(site): return site.get_tokens(["csrf"])["csrf"] def review(site, token, page): revid = page.latest_revision_id request = Request(site=site, action="review", token=token, ...
true
true
f7fc685b8192cfcf4f40e99374acadfaaa852b48
10,441
py
Python
src/vs_definitions.py
DIAGNijmegen/adhesion_detection
21a9c810a4dee3c640d31f30ee5fdff1bbce9146
[ "Apache-2.0" ]
2
2021-10-08T13:14:49.000Z
2022-03-18T17:53:45.000Z
src/vs_definitions.py
DIAGNijmegen/adhesion_detection
21a9c810a4dee3c640d31f30ee5fdff1bbce9146
[ "Apache-2.0" ]
6
2021-10-12T20:55:53.000Z
2021-10-12T21:03:45.000Z
src/vs_definitions.py
DIAGNijmegen/adhesion_detection
21a9c810a4dee3c640d31f30ee5fdff1bbce9146
[ "Apache-2.0" ]
null
null
null
import numpy as np from pathlib import Path from enum import Enum, unique from cinemri.contour import Contour from config import * @unique class VSExpectationNormType(Enum): # Division by mean mean_div = 0 # Standardize with std standardize = 1 # Transformation to apply to visceral slide values @uniq...
32.730408
107
0.57552
import numpy as np from pathlib import Path from enum import Enum, unique from cinemri.contour import Contour from config import * @unique class VSExpectationNormType(Enum): mean_div = 0 standardize = 1 @unique class VSTransform(Enum): none = 0 log = 1 sqrt = 2 class Region: def...
true
true
f7fc68b41ca221c80c0798f92eb11cddfffd90e7
23,561
py
Python
src/python/pants/backend/jvm/tasks/jvm_compile/zinc/zinc_compile.py
traviscrawford/pants
587df52d68e612d2f2c87dbe1f504a7bc69b2c46
[ "Apache-2.0" ]
1
2016-12-27T08:46:10.000Z
2016-12-27T08:46:10.000Z
src/python/pants/backend/jvm/tasks/jvm_compile/zinc/zinc_compile.py
traviscrawford/pants
587df52d68e612d2f2c87dbe1f504a7bc69b2c46
[ "Apache-2.0" ]
null
null
null
src/python/pants/backend/jvm/tasks/jvm_compile/zinc/zinc_compile.py
traviscrawford/pants
587df52d68e612d2f2c87dbe1f504a7bc69b2c46
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import errno import ...
44.370998
100
0.70222
from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import errno import logging import os import re import textwrap from contextlib import closing from hashlib import sha1 from xml.etree import ElementTree from pan...
true
true
f7fc6c4e5b5689fc7d3141bbbe2b805bc50f0486
1,061
py
Python
minigest/docfisc/views/fatture_acquisto.py
ctrlmaniac/minigest
2bfceb57e41c872e4112e24d0e6991164846888b
[ "MIT" ]
null
null
null
minigest/docfisc/views/fatture_acquisto.py
ctrlmaniac/minigest
2bfceb57e41c872e4112e24d0e6991164846888b
[ "MIT" ]
1
2021-09-22T19:10:20.000Z
2021-09-22T19:10:20.000Z
minigest/docfisc/views/fatture_acquisto.py
ctrlmaniac/minigest
2bfceb57e41c872e4112e24d0e6991164846888b
[ "MIT" ]
null
null
null
from datetime import datetime from django.contrib.auth.mixins import LoginRequiredMixin from django.http import HttpResponseNotFound from django.shortcuts import render from django.views import View from minigest.anagrafica.models import SoggettoFiscale as Azienda from minigest.docfisc.models import Fattura class F...
30.314286
78
0.68049
from datetime import datetime from django.contrib.auth.mixins import LoginRequiredMixin from django.http import HttpResponseNotFound from django.shortcuts import render from django.views import View from minigest.anagrafica.models import SoggettoFiscale as Azienda from minigest.docfisc.models import Fattura class F...
true
true
f7fc6d211e3523a6b958a102f4f7e6accb98b3f4
870
py
Python
examples/charges/get_charge_by_id.py
pagarme/pagarme-core-api-python
c7b11ca78ab3e7e896e5b75048e6f72b511db00e
[ "MIT" ]
6
2021-09-02T19:55:04.000Z
2022-03-16T14:06:15.000Z
examples/charges/get_charge_by_id.py
pagarme/pagarme-core-api-python
c7b11ca78ab3e7e896e5b75048e6f72b511db00e
[ "MIT" ]
2
2021-10-11T22:48:15.000Z
2022-01-24T18:24:23.000Z
examples/charges/get_charge_by_id.py
pagarme/pagarme-core-api-python
c7b11ca78ab3e7e896e5b75048e6f72b511db00e
[ "MIT" ]
2
2021-09-12T21:43:32.000Z
2022-03-07T16:58:54.000Z
from pagarmecoreapi.pagarmecoreapi_client import PagarmecoreapiClient from pagarmecoreapi.controllers import * from pagarmecoreapi.exceptions.error_exception import * # Configuration parameters and credentials basic_auth_user_name = 'basic_auth_user_name' # The username to use with basic authentication basic_auth_pass...
33.461538
93
0.796552
from pagarmecoreapi.pagarmecoreapi_client import PagarmecoreapiClient from pagarmecoreapi.controllers import * from pagarmecoreapi.exceptions.error_exception import * basic_auth_user_name = 'basic_auth_user_name' basic_auth_password = 'basic_auth_password' PagarmecoreapiClient(basic_auth_user_name, basic_auth_pass...
true
true
f7fc6dd3c9474d6fdbcd1d888d51be532d61f43b
13,920
py
Python
google/ads/google_ads/v3/services/geo_target_constant_service_client.py
andy0937/google-ads-python
cb5da7f4a75076828d1fc3524b08cc167670435a
[ "Apache-2.0" ]
1
2019-11-30T23:42:39.000Z
2019-11-30T23:42:39.000Z
google/ads/google_ads/v3/services/geo_target_constant_service_client.py
andy0937/google-ads-python
cb5da7f4a75076828d1fc3524b08cc167670435a
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v3/services/geo_target_constant_service_client.py
andy0937/google-ads-python
cb5da7f4a75076828d1fc3524b08cc167670435a
[ "Apache-2.0" ]
1
2020-09-30T17:04:06.000Z
2020-09-30T17:04:06.000Z
# -*- coding: utf-8 -*- # # Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
46.245847
153
0.656753
import pkg_resources import warnings from google.oauth2 import service_account import google.api_core.gapic_v1.client_info import google.api_core.gapic_v1.config import google.api_core.gapic_v1.method import google.api_core.gapic_v1.routing_header import google.api_core.grpc_helpers import google.api_...
true
true
f7fc6e41b013f84c69c048468acdb03cc6f422c1
576
py
Python
base/migrations/0002_orderitem_user.py
vishnu-sagubandi/LIAVYS_BACKEND
34c8a28d741cf6ca47ce1bcca045c3256945e309
[ "MIT" ]
null
null
null
base/migrations/0002_orderitem_user.py
vishnu-sagubandi/LIAVYS_BACKEND
34c8a28d741cf6ca47ce1bcca045c3256945e309
[ "MIT" ]
null
null
null
base/migrations/0002_orderitem_user.py
vishnu-sagubandi/LIAVYS_BACKEND
34c8a28d741cf6ca47ce1bcca045c3256945e309
[ "MIT" ]
null
null
null
# Generated by Django 3.2.5 on 2021-08-03 12:16 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('base', '0001_initial'), ...
26.181818
122
0.670139
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('base', '0001_initial'), ] operations = [ migrations.Ad...
true
true
f7fc6e66f890099ef1128bbc0f90165ab1a1e187
1,784
py
Python
dev/Gems/CloudGemMetric/v1/AWS/lambda-code/ServiceLambda/api/dashboard.py
brianherrera/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
[ "AML" ]
1,738
2017-09-21T10:59:12.000Z
2022-03-31T21:05:46.000Z
dev/Gems/CloudGemMetric/v1/AWS/lambda-code/ServiceLambda/api/dashboard.py
olivier-be/lumberyard
3d688932f919dbf5821f0cb8a210ce24abe39e9e
[ "AML" ]
427
2017-09-29T22:54:36.000Z
2022-02-15T19:26:50.000Z
dev/Gems/CloudGemMetric/v1/AWS/lambda-code/ServiceLambda/api/dashboard.py
olivier-be/lumberyard
3d688932f919dbf5821f0cb8a210ce24abe39e9e
[ "AML" ]
671
2017-09-21T08:04:01.000Z
2022-03-29T14:30:07.000Z
# # All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or # its licensors. # # For complete copyright and license terms please see the LICENSE at the root of this # distribution (the "License"). All use of this software is governed by the License, # or, if provided, by the license below or th...
37.957447
197
0.767937
from __future__ import print_function import service import os import util import metric_constant as c import json from dynamodb import DynamoDb from cgf_utils import custom_resource_response @service.api def get(request, facetid): db = DynamoDb() result = db.get_key(facetid) result = j...
true
true
f7fc6e967a45b9376a2835c57c448e5de9227bfd
622
py
Python
tools/_init_paths.py
Buki2/MAttNet
8abae2ba521de494b45ac6f1821602d6e17a6c59
[ "MIT" ]
null
null
null
tools/_init_paths.py
Buki2/MAttNet
8abae2ba521de494b45ac6f1821602d6e17a6c59
[ "MIT" ]
null
null
null
tools/_init_paths.py
Buki2/MAttNet
8abae2ba521de494b45ac6f1821602d6e17a6c59
[ "MIT" ]
null
null
null
import os.path as osp import sys # mrcn path this_dir = osp.dirname(__file__) # mrcn_dir = osp.join(this_dir, '..', 'pyutils', 'mask-faster-rcnn') # mrcn_dir = osp.join(this_dir, '..', 'pyutils', 'tf-faster-rcnn') mrcn_dir = osp.join(this_dir, '..', 'pyutils', 'pytorch-faster-rcnn') sys.path.insert(0, osp.join(mrcn_d...
34.555556
69
0.672026
import os.path as osp import sys this_dir = osp.dirname(__file__) mrcn_dir = osp.join(this_dir, '..', 'pyutils', 'pytorch-faster-rcnn') sys.path.insert(0, osp.join(mrcn_dir, 'lib')) sys.path.insert(0, osp.join(mrcn_dir, 'data', 'refer')) sys.path.insert(0, osp.join(mrcn_dir, 'data', 'coco', 'PythonAPI')) refer_d...
true
true
f7fc6ffc11d4d4e152350d055d1b9d727c367d08
3,617
py
Python
tests/models/input/types/test_list_input.py
TheLabbingProject/django_analyses
08cac40a32754a265b37524f08ec6160c69ebea8
[ "Apache-2.0" ]
1
2020-12-30T12:43:34.000Z
2020-12-30T12:43:34.000Z
tests/models/input/types/test_list_input.py
TheLabbingProject/django_analyses
08cac40a32754a265b37524f08ec6160c69ebea8
[ "Apache-2.0" ]
59
2019-12-25T13:14:56.000Z
2021-07-22T12:24:46.000Z
tests/models/input/types/test_list_input.py
TheLabbingProject/django_analyses
08cac40a32754a265b37524f08ec6160c69ebea8
[ "Apache-2.0" ]
2
2020-05-24T06:44:27.000Z
2020-07-09T15:47:31.000Z
from django.core.exceptions import ValidationError from django.test import TestCase from django_analyses.models.input.types.input_types import InputTypes from django_analyses.models.input.utils import ListElementTypes from tests.factories.input.definitions.list_input_definition import \ ListInputDefinitionFactory f...
36.535354
90
0.65828
from django.core.exceptions import ValidationError from django.test import TestCase from django_analyses.models.input.types.input_types import InputTypes from django_analyses.models.input.utils import ListElementTypes from tests.factories.input.definitions.list_input_definition import \ ListInputDefinitionFactory f...
true
true
f7fc71a1a0870e917d58bfac6f67f255356963b5
2,193
py
Python
xsoccer/games/models.py
awyrough/xsoccer
5f3d5f73ede21f6ba3baa0089a821b0a8d151b8d
[ "MIT" ]
null
null
null
xsoccer/games/models.py
awyrough/xsoccer
5f3d5f73ede21f6ba3baa0089a821b0a8d151b8d
[ "MIT" ]
null
null
null
xsoccer/games/models.py
awyrough/xsoccer
5f3d5f73ede21f6ba3baa0089a821b0a8d151b8d
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from django.db import models # Create your models here. class Game(models.Model): """ An Opta game. """ # Opta UUID (NB: Different than Django-generated pk/id) uuid = models.CharField("Opta uID", max_length=255, unique=True) date = models.DateField("Date Played") attend...
36.55
119
0.735978
from __future__ import unicode_literals from django.db import models class Game(models.Model): uuid = models.CharField("Opta uID", max_length=255, unique=True) date = models.DateField("Date Played") attendance = models.IntegerField("Attendance", null=True, blank=True) venue = models.ForeignKey('venues.Venue', ...
true
true
f7fc72ed5e5d6f7fdb5691e04ef154a07fc19d2e
10,785
py
Python
upstream/test/functional-tests-legacy/PfwTestCase/Types/tUINT16.py
TinkerEdgeR-Android/external_parameter-framework
108db75a59dbea562ac4bcaf8c6cc862c4919af0
[ "BSD-3-Clause" ]
null
null
null
upstream/test/functional-tests-legacy/PfwTestCase/Types/tUINT16.py
TinkerEdgeR-Android/external_parameter-framework
108db75a59dbea562ac4bcaf8c6cc862c4919af0
[ "BSD-3-Clause" ]
null
null
null
upstream/test/functional-tests-legacy/PfwTestCase/Types/tUINT16.py
TinkerEdgeR-Android/external_parameter-framework
108db75a59dbea562ac4bcaf8c6cc862c4919af0
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python2 # -*-coding:utf-8 -* # Copyright (c) 2011-2015, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above co...
42.968127
133
0.538248
import os import commands from Util.PfwUnitTestLib import PfwTestCase from Util import ACTLogging log=ACTLogging.Logger() class TestCases(PfwTestCase): def setUp(self): self.param_name = "/Test/Test/TEST_DIR/UINT16" self.pfw.sendCmd("setTuningMode", "on") def ...
true
true
f7fc7465e40ae9c9761950d5879c2d974be5b2a8
1,436
py
Python
python_utils/gunicorn/log/loggers.py
thegreendog/python-utils
e3d20d7a53880cc2276e6254b6fed74b43eb894b
[ "MIT" ]
3
2018-09-27T09:59:07.000Z
2020-04-13T03:21:01.000Z
python_utils/gunicorn/log/loggers.py
thegreendog/python-utils
e3d20d7a53880cc2276e6254b6fed74b43eb894b
[ "MIT" ]
null
null
null
python_utils/gunicorn/log/loggers.py
thegreendog/python-utils
e3d20d7a53880cc2276e6254b6fed74b43eb894b
[ "MIT" ]
1
2020-04-13T03:21:01.000Z
2020-04-13T03:21:01.000Z
import traceback from gunicorn import glogging class GunicornLogger(glogging.Logger): def access(self, resp, req, environ, request_time): """ See http://httpd.apache.org/docs/2.0/logs.html#combined for format details """ if not (self.cfg.accesslog or self.cfg.logconfig or ...
42.235294
86
0.486769
import traceback from gunicorn import glogging class GunicornLogger(glogging.Logger): def access(self, resp, req, environ, request_time): if not (self.cfg.accesslog or self.cfg.logconfig or self.cfg.logconfig_dict or (self.cfg.syslog and not self.cfg.disable_redirect_acces...
true
true
f7fc747387731a0b2a60200b416d632e8bc9f068
11,586
py
Python
01_matplotlib.py
Munazza12/Python
b550e3bf8a5468602bec4f23b4d4d1f2f696342f
[ "Apache-2.0" ]
null
null
null
01_matplotlib.py
Munazza12/Python
b550e3bf8a5468602bec4f23b4d4d1f2f696342f
[ "Apache-2.0" ]
null
null
null
01_matplotlib.py
Munazza12/Python
b550e3bf8a5468602bec4f23b4d4d1f2f696342f
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """01_Matplotlib.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1kcVik8w7TtrXYaCSklntRqq2av-7N7-6 #Introduction to Matplotlib ![alt text](https://matplotlib.org/_static/logo2.png) Matplotlib is the "grandfather" library...
33.97654
450
0.707837
import matplotlib.pyplot as plt import numpy as np x = np.linspace(0, 5, 11) y = x ** 2 x y plt.plot(x, y, 'r') plt.xlabel('X Axis Title Here') plt.ylabel('Y Axis Title Here') plt.title('String Title Here') plt.show() plt.subplot(1,2,1) plt.plot(x, y, 'r*') plt.subplot(1,2,2) plt.plot(y, x, 'g*-'); fig ...
true
true
f7fc74f1f0523af27081e1fde1407266088d0bc7
1,641
py
Python
pydef_core/follow_convergence_OSZICAR.py
wangvei/PyDEF-2.0
ee5bd0a01d241e5df45ccbf10f3c27e1b796418b
[ "MIT" ]
1
2019-01-12T14:30:21.000Z
2019-01-12T14:30:21.000Z
pydef_core/follow_convergence_OSZICAR.py
wangvei/PyDEF-2.0
ee5bd0a01d241e5df45ccbf10f3c27e1b796418b
[ "MIT" ]
null
null
null
pydef_core/follow_convergence_OSZICAR.py
wangvei/PyDEF-2.0
ee5bd0a01d241e5df45ccbf10f3c27e1b796418b
[ "MIT" ]
3
2019-03-01T15:15:00.000Z
2020-04-19T13:30:41.000Z
""" 12/12/17 Simple script to follow convergence from OSZICAR file author: Adrien Stoliaroff email: adrien.stoliaroff@cnrs-imn.fr """ import matplotlib.pyplot as plt def isInt(s): try: int(s) return True except ValueError: return False #Read OSZICAR content infile...
23.782609
105
0.636807
import matplotlib.pyplot as plt def isInt(s): try: int(s) return True except ValueError: return False infile = open("OSZICAR","r") eList, dEList, dEpsList, rmsList, eSCF, dESCF = [], [], [], [], [], [] for line in infile: content = line.replace('d eps','deps').split() if(isInt(c...
true
true
f7fc758c45c2bcf614451febcd14664fc1b6a9c0
1,659
py
Python
examples/mnist_lenet_multigpu.py
Bhumbra/DeepNodal
33afb2efa5e78ae6558ce60a36bb87c186c1f448
[ "BSD-3-Clause" ]
1
2019-01-06T09:49:42.000Z
2019-01-06T09:49:42.000Z
examples/mnist_lenet_multigpu.py
Bhumbra/DeepNodal
33afb2efa5e78ae6558ce60a36bb87c186c1f448
[ "BSD-3-Clause" ]
3
2020-10-14T14:43:33.000Z
2022-02-09T23:46:40.000Z
examples/mnist_lenet_multigpu.py
Bhumbra/DeepNodal
33afb2efa5e78ae6558ce60a36bb87c186c1f448
[ "BSD-3-Clause" ]
null
null
null
""" An example of a LeNet convolutional network with SGD back-prop on MNIST data. """ import deepnodal as dn from time import time import datetime # PARAMETERS n_epochs = 20 batch_size = 60 learning_rate = 0.01 input_dims = [28, 28, 1] arch = [ [6, [5, 5], [1, 1]], [[2, 2], [2, 2]], [16, [5, 5], [1, 1]], ...
22.12
94
0.599156
import deepnodal as dn from time import time import datetime n_epochs = 20 batch_size = 60 learning_rate = 0.01 input_dims = [28, 28, 1] arch = [ [6, [5, 5], [1, 1]], [[2, 2], [2, 2]], [16, [5, 5], [1, 1]], [[2, 2], [2, 2]], [120, [5, 5], [1, 1]], [[2, 2], [2, 2]], "84", 10]...
true
true
f7fc75c11f972d1d7ae775d687ae7930041738ec
999
py
Python
src/log_VF.py
MarkBlanco/userland_dvfs_gov
d26e1e2e24163370d5815fa0bb23e30636b806aa
[ "BSD-3-Clause" ]
null
null
null
src/log_VF.py
MarkBlanco/userland_dvfs_gov
d26e1e2e24163370d5815fa0bb23e30636b806aa
[ "BSD-3-Clause" ]
null
null
null
src/log_VF.py
MarkBlanco/userland_dvfs_gov
d26e1e2e24163370d5815fa0bb23e30636b806aa
[ "BSD-3-Clause" ]
1
2019-01-18T22:50:26.000Z
2019-01-18T22:50:26.000Z
import time import sys, os import sysfs_paths as sysfs import atexit import cpu_usage atexit.register(cpu_usage.unsetUserSpace) cpu_usage.setUserSpace() big_freqs = cpu_usage.getAvailFreqs(4) little_freqs = cpu_usage.getAvailFreqs(0) print(big_freqs) print(little_freqs) cpu_usage.setClusterFreq(0, little_freqs[0]...
22.2
61
0.718719
import time import sys, os import sysfs_paths as sysfs import atexit import cpu_usage atexit.register(cpu_usage.unsetUserSpace) cpu_usage.setUserSpace() big_freqs = cpu_usage.getAvailFreqs(4) little_freqs = cpu_usage.getAvailFreqs(0) print(big_freqs) print(little_freqs) cpu_usage.setClusterFreq(0, little_freqs[0]...
true
true
f7fc7658c41dec1c3c1fca7b6696753387305f37
721
py
Python
core/interfaces/logger.py
microsoft/Guardinel
bc49c4fe051c3e533064c7043e1cee39cfb25d3a
[ "MIT" ]
2
2022-01-26T07:34:44.000Z
2022-03-29T19:51:45.000Z
core/interfaces/logger.py
microsoft/Guardinel
bc49c4fe051c3e533064c7043e1cee39cfb25d3a
[ "MIT" ]
null
null
null
core/interfaces/logger.py
microsoft/Guardinel
bc49c4fe051c3e533064c7043e1cee39cfb25d3a
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. from abc import ABC, abstractmethod class AbstractLogger(ABC): """ Abstract base class for all the logger implementations of this tool """ __debug = False @abstractmethod def info(self, tag, message): raise Not...
20.6
71
0.674064
from abc import ABC, abstractmethod class AbstractLogger(ABC): __debug = False @abstractmethod def info(self, tag, message): raise NotImplementedError @abstractmethod def error(self, tag, message): raise NotImplementedError @abstractmethod def debug(self, tag, messag...
true
true
f7fc767351ee43f61ba2c9cbc4e390d6ba8b5ace
784,552
py
Python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/models/_models_py3.py
jalauzon-msft/azure-sdk-for-python
15967f5c6d3376f2334a382486ba86339786e028
[ "MIT" ]
1
2022-02-01T18:50:12.000Z
2022-02-01T18:50:12.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/models/_models_py3.py
ellhe-blaster/azure-sdk-for-python
82193ba5e81cc5e5e5a5239bba58abe62e86f469
[ "MIT" ]
null
null
null
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_01/models/_models_py3.py
ellhe-blaster/azure-sdk-for-python
82193ba5e81cc5e5e5a5239bba58abe62e86f469
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
50.570581
742
0.692241
import datetime from typing import Any, Dict, List, Optional, Union import msrest.serialization from ._compute_management_client_enums import * class AdditionalCapabilities(msrest.serialization.Model): _attribute_map = { 'ultra_ssd_enabled': {'key': 'ultraSSDEnabled', 'type': 'bool'}, '...
true
true
f7fc767435f6a2472d95d1126b394b806c578b4c
127,306
py
Python
gear/__init__.py
drifterza/gear
9933f068213c9da6c4b0ea59659c13bcf2ebe104
[ "Apache-2.0" ]
null
null
null
gear/__init__.py
drifterza/gear
9933f068213c9da6c4b0ea59659c13bcf2ebe104
[ "Apache-2.0" ]
null
null
null
gear/__init__.py
drifterza/gear
9933f068213c9da6c4b0ea59659c13bcf2ebe104
[ "Apache-2.0" ]
null
null
null
# Copyright 2013-2014 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
36.094698
79
0.584395
import errno import logging import os import select import six import socket import ssl import struct import threading import time import uuid as uuid_module from gear import constants from gear.acl import ACLError, ACLEntry, ACL try: import Queue as queue_mod except ImportError: import queue ...
true
true
f7fc7740848542dfa85c88d49022ec626b2b3b3f
849
py
Python
com/install/configTemp/MysqlConfigTemp.py
hao707822882/Bichon
54092e69c9316ee592ee392dc85e1f7fd0c47b68
[ "Apache-2.0" ]
null
null
null
com/install/configTemp/MysqlConfigTemp.py
hao707822882/Bichon
54092e69c9316ee592ee392dc85e1f7fd0c47b68
[ "Apache-2.0" ]
null
null
null
com/install/configTemp/MysqlConfigTemp.py
hao707822882/Bichon
54092e69c9316ee592ee392dc85e1f7fd0c47b68
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/env python # --coding:utf-8-- # coding: utf-8 # ━━━━━━神兽出没━━━━━━ #    ┏┓   ┏┓ #   ┏┛┻━━━┛┻┓ #   ┃       ┃ #   ┃   ━   ┃ #   ┃ ┳┛ ┗┳ ┃ #   ┃       ┃ #   ┃   ┻   ┃ #   ┃       ┃ #   ┗━┓   ┏━┛ #     ┃   ┃神兽保佑, 永无BUG! #     ┃   ┃Code is far away from bug with the animal protecting #     ┃   ┗━━━┓ # ...
18.06383
64
0.479388
__author__ = 'Administrator' class MysqlConfigTemp(object): temp = ''' [mysqld] character-set-server=utf8 default-character-set=utf8 datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql symbolic-links=0 [mysqld_safe] character-set-server=utf8 log-error=/var/log/mysqld.lo...
true
true
f7fc77711d138e48524e60ec2c8ebc732c2f81ad
1,305
py
Python
tcp_echo_client.py
jlim262/py-socket-programming
87f5b655f9275fc75d19a999a0cd399e8bb48cab
[ "MIT" ]
null
null
null
tcp_echo_client.py
jlim262/py-socket-programming
87f5b655f9275fc75d19a999a0cd399e8bb48cab
[ "MIT" ]
null
null
null
tcp_echo_client.py
jlim262/py-socket-programming
87f5b655f9275fc75d19a999a0cd399e8bb48cab
[ "MIT" ]
null
null
null
import socket import sys import argparse host = 'localhost' def echo_client(port): """ A simple echo client """ # Create a TCP/IP socket sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Connect the socket to the server print(f"Connecting to {host} port {port}") sock.connect((host, ...
29
73
0.616858
import socket import sys import argparse host = 'localhost' def echo_client(port): sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) print(f"Connecting to {host} port {port}") sock.connect((host, port)) try: message = "Test message. This will be echoed" ...
true
true
f7fc77bfa401cc402649eb5cd805955a38db3e6e
492
py
Python
Python/LPTHW/ex39.py
vanonselenp/Learning
477239defa81a1d4435c72e1cde151ac32160e39
[ "MIT" ]
null
null
null
Python/LPTHW/ex39.py
vanonselenp/Learning
477239defa81a1d4435c72e1cde151ac32160e39
[ "MIT" ]
null
null
null
Python/LPTHW/ex39.py
vanonselenp/Learning
477239defa81a1d4435c72e1cde151ac32160e39
[ "MIT" ]
null
null
null
person = {'name': 'Peter', 'age': 29} person['city'] = 'Cape Town' print person print person['name'] del person['city'] print person states = { 'Oregon': 'OR', 'Florida': 'FL', 'California': 'CA', 'New York': 'NY', 'Michigan': 'MI', } cities = { 'OR':'Portland', 'FL':'Jacksonville', 'CA':'San Francisco', ...
14.909091
40
0.601626
person = {'name': 'Peter', 'age': 29} person['city'] = 'Cape Town' print person print person['name'] del person['city'] print person states = { 'Oregon': 'OR', 'Florida': 'FL', 'California': 'CA', 'New York': 'NY', 'Michigan': 'MI', } cities = { 'OR':'Portland', 'FL':'Jacksonville', 'CA':'San Francisco', ...
false
true
f7fc786cd3dadfd413da87f87fb25b57d75ff278
719
py
Python
hubspot/auth/oauth/models/__init__.py
cclauss/hubspot-api-python
7c60c0f572b98c73e1f1816bf5981396a42735f6
[ "Apache-2.0" ]
117
2020-04-06T08:22:53.000Z
2022-03-18T03:41:29.000Z
hubspot/auth/oauth/models/__init__.py
cclauss/hubspot-api-python
7c60c0f572b98c73e1f1816bf5981396a42735f6
[ "Apache-2.0" ]
62
2020-04-06T16:21:06.000Z
2022-03-17T16:50:44.000Z
hubspot/auth/oauth/models/__init__.py
cclauss/hubspot-api-python
7c60c0f572b98c73e1f1816bf5981396a42735f6
[ "Apache-2.0" ]
45
2020-04-06T16:13:52.000Z
2022-03-30T21:33:17.000Z
# coding: utf-8 # flake8: noqa """ OAuthService 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 """ from __future__ import absolute_import #...
32.681818
124
0.815021
from __future__ import absolute_import from hubspot.auth.oauth.models.access_token_info_response import AccessTokenInfoResponse from hubspot.auth.oauth.models.error import Error from hubspot.auth.oauth.models.error_detail import ErrorDetail from hubspot.auth.oauth.models.refresh_token_info_response import Refres...
true
true
f7fc79bd981c6ee38a3ec8c61da89a9e6b7045d4
7,285
py
Python
google/ads/google_ads/v4/proto/enums/hotel_placeholder_field_pb2.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
1
2021-04-09T04:28:47.000Z
2021-04-09T04:28:47.000Z
google/ads/google_ads/v4/proto/enums/hotel_placeholder_field_pb2.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v4/proto/enums/hotel_placeholder_field_pb2.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/googleads_v4/proto/enums/hotel_placeholder_field.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf...
41.392045
1,332
0.758133
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db ...
true
true
f7fc7a2dcaf432d5f99d19955e605c076ead8c11
510
py
Python
Blogg/admin.py
waregagbagbo/Blog
aaafcf454abbf9a792227e4a6f8d24da62dae27d
[ "MIT" ]
null
null
null
Blogg/admin.py
waregagbagbo/Blog
aaafcf454abbf9a792227e4a6f8d24da62dae27d
[ "MIT" ]
null
null
null
Blogg/admin.py
waregagbagbo/Blog
aaafcf454abbf9a792227e4a6f8d24da62dae27d
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import* # Register your models here. class PostAdmin(admin.ModelAdmin): list_display =('title', 'slug', 'status','created_on') list_filter = ('status',) prepopulated_fields = {"slug":('title',)} class BookAdmin(admin.ModelAdmin): list_display = ('name','...
24.285714
58
0.72549
from django.contrib import admin from .models import* class PostAdmin(admin.ModelAdmin): list_display =('title', 'slug', 'status','created_on') list_filter = ('status',) prepopulated_fields = {"slug":('title',)} class BookAdmin(admin.ModelAdmin): list_display = ('name','image','author','price') ...
true
true
f7fc7a2fcd8674466b1654e8053c9a78f1a0eb61
16,676
py
Python
evidently/tests/test_readme_examples.py
jim-fun/evidently
eb3479b8ce39e43601fb2d1ffbf61e0624541865
[ "Apache-2.0" ]
null
null
null
evidently/tests/test_readme_examples.py
jim-fun/evidently
eb3479b8ce39e43601fb2d1ffbf61e0624541865
[ "Apache-2.0" ]
null
null
null
evidently/tests/test_readme_examples.py
jim-fun/evidently
eb3479b8ce39e43601fb2d1ffbf61e0624541865
[ "Apache-2.0" ]
null
null
null
import json import pandas as pd import numpy as np from sklearn import datasets from unittest import TestCase from evidently import ColumnMapping from evidently.dashboard import Dashboard from evidently.model_profile import Profile from evidently.profile_sections import DataDriftProfileSection, CatTargetDriftProfileS...
56.914676
117
0.720197
import json import pandas as pd import numpy as np from sklearn import datasets from unittest import TestCase from evidently import ColumnMapping from evidently.dashboard import Dashboard from evidently.model_profile import Profile from evidently.profile_sections import DataDriftProfileSection, CatTargetDriftProfileS...
true
true
f7fc7ac1722de66b9faa483bb47f087e4fa66fa3
1,819
py
Python
robot_sidelights.py
kholm777/maqueen
4bfec1e28d6e51991a8839fade38f64190ff56eb
[ "MIT" ]
null
null
null
robot_sidelights.py
kholm777/maqueen
4bfec1e28d6e51991a8839fade38f64190ff56eb
[ "MIT" ]
null
null
null
robot_sidelights.py
kholm777/maqueen
4bfec1e28d6e51991a8839fade38f64190ff56eb
[ "MIT" ]
null
null
null
# MIT License # Copyright (c) 2021 Kristoffer Holm # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge...
34.320755
79
0.759758
from maqueen import Maqueen from microbit import * import utime import random robot = Maqueen() utime.sleep_ms(1000) for x in range(256): robot.rgb_front_left(0,0,x) robot.rgb_rear_left(0,0,x) robot.rgb_front_right(0,0,x) robot.rgb_rear_right(0,0,x) utime.sleep_ms(1000) for x ...
true
true
f7fc7b298fa9c9514eb7101c3b6efe74205fc692
4,327
py
Python
contrib/seeds/generate-seeds.py
thnass/nakedcash
08b2c52cd0a846d52701967acf20f5f4d7773d94
[ "MIT" ]
null
null
null
contrib/seeds/generate-seeds.py
thnass/nakedcash
08b2c52cd0a846d52701967acf20f5f4d7773d94
[ "MIT" ]
null
null
null
contrib/seeds/generate-seeds.py
thnass/nakedcash
08b2c52cd0a846d52701967acf20f5f4d7773d94
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2017 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Script to generate list of seed nodes for chainparams.cpp. This script expects two text files in the dir...
31.355072
98
0.581465
from base64 import b32decode from binascii import a2b_hex import sys, os import re pchIPv4 = bytearray([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff]) pchOnionCat = bytearray([0xFD,0x87,0xD8,0x7E,0xEB,0x43]) def name_to_ipv6(addr): if len(addr)>6 and addr.endswith('.onion'): vchAddr = b32decode(addr[0:...
true
true
f7fc7b6039d08d325b6e4d393fb00d85bc6cc112
13,833
py
Python
projects/TGS_salt/training/train1_all_Unet_scSE_hyper.py
liaopeiyuan/ml-arsenal-public
f8938ce3cb58b35fc7cc20d096c39a85ec9780b2
[ "Apache-2.0" ]
280
2018-10-21T01:07:18.000Z
2021-12-30T11:29:48.000Z
projects/TGS_salt/training/train1_all_Unet_scSE_hyper.py
liaopeiyuan/ml-arsenal-public
f8938ce3cb58b35fc7cc20d096c39a85ec9780b2
[ "Apache-2.0" ]
3
2018-11-13T08:04:48.000Z
2020-04-17T09:20:03.000Z
projects/TGS_salt/training/train1_all_Unet_scSE_hyper.py
liaopeiyuan/ml-arsenal-public
f8938ce3cb58b35fc7cc20d096c39a85ec9780b2
[ "Apache-2.0" ]
59
2018-10-21T04:38:23.000Z
2021-03-29T07:58:47.000Z
import os import sys sys.path.append('../../') from dependencies import * from settings import * from reproducibility import * from models.TGS_salt.Unet34_scSE_hyper import Unet_scSE_hyper as Net SIZE = 128 FACTOR = 128 FOLD = 1 ne = "" initial_checkpoint = None#'/home/liaop20/data/salt/checkpoints/list_train'+str(FO...
35.836788
201
0.52382
import os import sys sys.path.append('../../') from dependencies import * from settings import * from reproducibility import * from models.TGS_salt.Unet34_scSE_hyper import Unet_scSE_hyper as Net SIZE = 128 FACTOR = 128 FOLD = 1 ne = "" initial_checkpoint = Noneold=FOLD): super().__init__() self.fold=...
true
true
f7fc7bcf72b628a4ccce95214c12abee5e811d3e
665
py
Python
migrations/versions/07f6e404201c_.py
tomasfarias/fariasweb
ec908ef8068b0019cb04ab1c96f738c11224fa03
[ "MIT" ]
2
2019-07-25T02:25:18.000Z
2019-08-30T04:00:52.000Z
migrations/versions/07f6e404201c_.py
tomasfarias/fariasweb
ec908ef8068b0019cb04ab1c96f738c11224fa03
[ "MIT" ]
1
2019-08-29T02:12:51.000Z
2019-08-29T02:12:51.000Z
migrations/versions/07f6e404201c_.py
tomasfarias/fariasweb
ec908ef8068b0019cb04ab1c96f738c11224fa03
[ "MIT" ]
null
null
null
"""empty message Revision ID: 07f6e404201c Revises: 90c05db34e87 Create Date: 2019-04-02 14:16:58.606184 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '07f6e404201c' down_revision = '90c05db34e87' branch_labels = None depends_on = None def upgrade(): # ...
22.931034
71
0.688722
from alembic import op import sqlalchemy as sa revision = '07f6e404201c' down_revision = '90c05db34e87' branch_labels = None depends_on = None def upgrade():
true
true
f7fc7beea028640e622f981e3f2fe9aa8129f1fa
5,719
py
Python
intersight/models/storage_physical_port_ref.py
sdnit-se/intersight-python
551f7685c0f76bb8af60ec83ffb6f9672d49a4ae
[ "Apache-2.0" ]
21
2018-03-29T14:20:35.000Z
2021-10-13T05:11:41.000Z
intersight/models/storage_physical_port_ref.py
sdnit-se/intersight-python
551f7685c0f76bb8af60ec83ffb6f9672d49a4ae
[ "Apache-2.0" ]
14
2018-01-30T15:45:46.000Z
2022-02-23T14:23:21.000Z
intersight/models/storage_physical_port_ref.py
sdnit-se/intersight-python
551f7685c0f76bb8af60ec83ffb6f9672d49a4ae
[ "Apache-2.0" ]
18
2018-01-03T15:09:56.000Z
2021-07-16T02:21:54.000Z
# coding: utf-8 """ Cisco Intersight OpenAPI specification. The Cisco Intersight OpenAPI specification. OpenAPI spec version: 1.0.9-1461 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class StoragePhysicalPo...
31.423077
576
0.606749
from pprint import pformat from six import iteritems import re class StoragePhysicalPortRef(object): swagger_types = { 'object_type': 'str', 'moid': 'str', 'selector': 'str' } attribute_map = { 'object_type': 'ObjectType', 'moid': 'Moid', 'selector': ...
true
true
f7fc7c7780d7a6562770da748b0838e0f4cae4ca
5,403
py
Python
ecommerce/migrations/0001_initial.py
umarmughal824/bootcamp-ecommerce
681bcc788a66867b8f240790c0ed33680b73932b
[ "BSD-3-Clause" ]
2
2018-06-20T19:37:03.000Z
2021-01-06T09:51:40.000Z
ecommerce/migrations/0001_initial.py
mitodl/bootcamp-ecommerce
ba7d6aefe56c6481ae2a5afc84cdd644538b6d50
[ "BSD-3-Clause" ]
1,226
2017-02-23T14:52:28.000Z
2022-03-29T13:19:54.000Z
ecommerce/migrations/0001_initial.py
umarmughal824/bootcamp-ecommerce
681bcc788a66867b8f240790c0ed33680b73932b
[ "BSD-3-Clause" ]
3
2017-03-20T03:51:27.000Z
2021-03-19T15:54:31.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-03-22 17:58 from __future__ import unicode_literals from django.conf import settings import django.contrib.postgres.fields.jsonb from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial =...
34.196203
81
0.393855
from __future__ import unicode_literals from django.conf import settings import django.contrib.postgres.fields.jsonb from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [migrations.swappable_dependency(settings.AUT...
true
true
f7fc7d70e0d022f438642dceac16636cba308c45
4,203
py
Python
tasks.py
EuroPython/ep-tools
3b7efce56a11625a5560313880aa6737a5afc16f
[ "MIT" ]
3
2018-08-02T19:17:14.000Z
2021-08-03T10:19:16.000Z
tasks.py
EuroPython/ep-tools
3b7efce56a11625a5560313880aa6737a5afc16f
[ "MIT" ]
5
2016-03-08T14:38:43.000Z
2017-05-07T10:11:55.000Z
tasks.py
EuroPython/ep-tools
3b7efce56a11625a5560313880aa6737a5afc16f
[ "MIT" ]
4
2016-02-15T21:15:50.000Z
2018-07-10T15:38:35.000Z
""" Invoke tasks to be run from the command line. """ import os from invoke import task from eptools import talks, people from eptools.gspread_utils import get_api_key_file from eptools.config import ( conference, sponsors_billing_worksheet, finaid_submissions_worksheet ) @task def sponsor_agreement(ctx,...
33.357143
122
0.692363
import os from invoke import task from eptools import talks, people from eptools.gspread_utils import get_api_key_file from eptools.config import ( conference, sponsors_billing_worksheet, finaid_submissions_worksheet ) @task def sponsor_agreement(ctx, company_name, output_dir, template_file="", api_key_f...
true
true
f7fc7dd9bbeac171283b48484e35cdf8acf5d5ff
4,555
py
Python
solo/args/setup.py
wx-b/solo-learn
a516747e40a17050976c90e72b16a63ffcef42d6
[ "MIT" ]
null
null
null
solo/args/setup.py
wx-b/solo-learn
a516747e40a17050976c90e72b16a63ffcef42d6
[ "MIT" ]
null
null
null
solo/args/setup.py
wx-b/solo-learn
a516747e40a17050976c90e72b16a63ffcef42d6
[ "MIT" ]
null
null
null
# Copyright 2021 solo-learn development team. # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to use, # copy, modify, merge, publ...
34.770992
102
0.753897
import argparse import pytorch_lightning as pl from solo.args.dataset import ( augmentations_args, custom_dataset_args, dataset_args, linear_augmentations_args, ) from solo.args.utils import additional_setup_linear, additional_setup_pretrain from solo.methods import METHODS from solo...
true
true
f7fc7e26a78cf93f54fea2297185f5131d6287f3
3,790
py
Python
drf_registration/utils/email.py
rti/drf-registration
0d631730e1730a7778398f4c1e811ca0df57e260
[ "MIT" ]
1
2020-12-07T04:44:51.000Z
2020-12-07T04:44:51.000Z
drf_registration/utils/email.py
cunguyendev/drf-registration
2a9e5ffbffa23bdc787c8363bdd0ffd170cf6bb6
[ "MIT" ]
null
null
null
drf_registration/utils/email.py
cunguyendev/drf-registration
2a9e5ffbffa23bdc787c8363bdd0ffd170cf6bb6
[ "MIT" ]
null
null
null
from django.core.mail import send_mail from django.template.loader import render_to_string from django.conf import settings from django.urls import reverse from drf_registration.constants import DEFAULT_EMAIL_BODY from drf_registration.tokens import activation_token, reset_password_token from drf_registration.utils.us...
28.074074
92
0.695515
from django.core.mail import send_mail from django.template.loader import render_to_string from django.conf import settings from django.urls import reverse from drf_registration.constants import DEFAULT_EMAIL_BODY from drf_registration.tokens import activation_token, reset_password_token from drf_registration.utils.us...
true
true
f7fc7eaf67f555dd6142377fd960383b759ec2fa
750
py
Python
python/ql/test/library-tests/PointsTo/new/code/a_simple.py
vadi2/codeql
a806a4f08696d241ab295a286999251b56a6860c
[ "MIT" ]
4,036
2020-04-29T00:09:57.000Z
2022-03-31T14:16:38.000Z
python/ql/test/library-tests/PointsTo/new/code/a_simple.py
vadi2/codeql
a806a4f08696d241ab295a286999251b56a6860c
[ "MIT" ]
2,970
2020-04-28T17:24:18.000Z
2022-03-31T22:40:46.000Z
python/ql/test/library-tests/PointsTo/new/code/a_simple.py
ScriptBox99/github-codeql
2ecf0d3264db8fb4904b2056964da469372a235c
[ "MIT" ]
794
2020-04-29T00:28:25.000Z
2022-03-30T08:21:46.000Z
f1 = 1.0 dict tuple i1 = 0 s = () def func(): pass class C(object): pass def vararg_kwarg(*t, **d): t d def multi_loop(seq): x = None for x, y in seq: x def with_definition(x): with x as y: y def multi_loop_in_try(x): try: # This causes additional exception edges, ...
12.5
61
0.458667
f1 = 1.0 dict tuple i1 = 0 s = () def func(): pass class C(object): pass def vararg_kwarg(*t, **d): t d def multi_loop(seq): x = None for x, y in seq: x def with_definition(x): with x as y: y def multi_loop_in_try(x): try: for p, q in x: p ...
true
true
f7fc7eb94d597b11c40b9ad45838d791b39708f4
66
py
Python
poster/data/__init__.py
chrisbrake/poster
3044188fdcb9b8add0f8af4f77a57975c4d0108f
[ "BSD-3-Clause" ]
null
null
null
poster/data/__init__.py
chrisbrake/poster
3044188fdcb9b8add0f8af4f77a57975c4d0108f
[ "BSD-3-Clause" ]
null
null
null
poster/data/__init__.py
chrisbrake/poster
3044188fdcb9b8add0f8af4f77a57975c4d0108f
[ "BSD-3-Clause" ]
null
null
null
from .room import Room from .message import Message rooms = dict()
22
28
0.772727
from .room import Room from .message import Message rooms = dict()
true
true
f7fc7fce6fef735ed9aa57b9a0b083d38a3e86a3
789
py
Python
les_8/lab_8/01-classes-as-objects.py
Timurdov/Python3.Advanced
a99ae1ab9e0424aeb7f8e93c53d0e08319b426a2
[ "Apache-2.0" ]
1
2018-09-10T12:04:53.000Z
2018-09-10T12:04:53.000Z
les_8/lab_8/01-classes-as-objects.py
Timurdov/Python3.Advanced
a99ae1ab9e0424aeb7f8e93c53d0e08319b426a2
[ "Apache-2.0" ]
null
null
null
les_8/lab_8/01-classes-as-objects.py
Timurdov/Python3.Advanced
a99ae1ab9e0424aeb7f8e93c53d0e08319b426a2
[ "Apache-2.0" ]
null
null
null
# В Python всё является объектами, в том числе # и сами классы # Объявление пустого класса MyClass class MyClass: pass # Создание экземпляра класса obj = MyClass() # Объект obj -- это экземпляр класса MyClass, # то есть он имеет тип MyClass print(type(obj)) # <class '__main__.MyClass'> # MyClas...
28.178571
68
0.726236
class MyClass: pass obj = MyClass() print(type(obj)) print(type(MyClass)) AnotherClass = MyClass print(type(AnotherClass)) print(isinstance(obj, AnotherClass))
true
true
f7fc80a03be4788494b89c551f0987caa7bb87a1
1,525
py
Python
samples/generated_samples/speech_v1p1beta1_generated_adaptation_list_phrase_set_async.py
zmtkr/python-speech
6000370242a4c548a3306ae274a0302e2bbb2445
[ "Apache-2.0" ]
null
null
null
samples/generated_samples/speech_v1p1beta1_generated_adaptation_list_phrase_set_async.py
zmtkr/python-speech
6000370242a4c548a3306ae274a0302e2bbb2445
[ "Apache-2.0" ]
null
null
null
samples/generated_samples/speech_v1p1beta1_generated_adaptation_list_phrase_set_async.py
zmtkr/python-speech
6000370242a4c548a3306ae274a0302e2bbb2445
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2022 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...
32.446809
85
0.761311
from google.cloud import speech_v1p1beta1 async def sample_list_phrase_set(): client = speech_v1p1beta1.AdaptationAsyncClient() request = speech_v1p1beta1.ListPhraseSetRequest( parent="parent_value", ) page_result = client.list_phrase_set(request=requ...
true
true
f7fc816dfe173059b38770c65a9ae5130d92a79f
17,455
py
Python
sdk/lusid_asyncio/api/relation_definitions_api.py
finbourne/lusid-sdk-python-asyncio-preview
290f93590ab5485661216c8622d3de9f7af0ed60
[ "MIT" ]
null
null
null
sdk/lusid_asyncio/api/relation_definitions_api.py
finbourne/lusid-sdk-python-asyncio-preview
290f93590ab5485661216c8622d3de9f7af0ed60
[ "MIT" ]
null
null
null
sdk/lusid_asyncio/api/relation_definitions_api.py
finbourne/lusid-sdk-python-asyncio-preview
290f93590ab5485661216c8622d3de9f7af0ed60
[ "MIT" ]
null
null
null
# coding: utf-8 """ LUSID API FINBOURNE Technology # noqa: E501 The version of the OpenAPI document: 0.11.3923 Contact: info@finbourne.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 # python 2 and python 3 compatibility lib...
48.756983
174
0.626296
from __future__ import absolute_import import re import six from lusid_asyncio.api_client import ApiClient from lusid_asyncio.exceptions import ( ApiTypeError, ApiValueError ) from lusid_asyncio.models.create_relation_definition_request import CreateRelationDefinitionRequest from lusid_asyncio.model...
true
true
f7fc816fb7ae10599f933fbcd095e85c1e016639
2,792
py
Python
ML/train_keras.py
hoopoe/face_liveness_detection
834963001ee36b36264624b3c2fbec90f2343ce3
[ "MIT" ]
5
2018-08-23T15:01:00.000Z
2019-03-19T09:39:25.000Z
ML/train_keras.py
hoopoe/face_liveness_detection
834963001ee36b36264624b3c2fbec90f2343ce3
[ "MIT" ]
null
null
null
ML/train_keras.py
hoopoe/face_liveness_detection
834963001ee36b36264624b3c2fbec90f2343ce3
[ "MIT" ]
2
2018-10-20T08:00:02.000Z
2021-01-30T14:49:48.000Z
from __future__ import print_function import os from tqdm import tqdm import cv2 import numpy as np import argparse import keras from keras.datasets import mnist from keras.models import Sequential from keras.layers import Dense, Dropout, Flatten from keras.layers import Conv2D, MaxPooling2D from keras import backen...
31.022222
129
0.687321
from __future__ import print_function import os from tqdm import tqdm import cv2 import numpy as np import argparse import keras from keras.datasets import mnist from keras.models import Sequential from keras.layers import Dense, Dropout, Flatten from keras.layers import Conv2D, MaxPooling2D from keras import backen...
true
true
f7fc81c2a763630762303d95ef3011d8831f8a7d
1,535
py
Python
djangocms_reversion2/migrations/0001_initial.py
PeterW-LWL/djangocms-reversion2
06d113f803a10aa915bf9664bf09c7f2f35fa38a
[ "MIT" ]
11
2017-02-01T12:53:23.000Z
2019-12-28T22:25:23.000Z
djangocms_reversion2/migrations/0001_initial.py
PeterW-LWL/djangocms-reversion2
06d113f803a10aa915bf9664bf09c7f2f35fa38a
[ "MIT" ]
39
2017-02-02T08:56:04.000Z
2020-04-02T11:35:59.000Z
djangocms_reversion2/migrations/0001_initial.py
PeterW-LWL/djangocms-reversion2
06d113f803a10aa915bf9664bf09c7f2f35fa38a
[ "MIT" ]
10
2017-02-01T12:54:31.000Z
2020-05-25T01:00:45.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cms', '0016_auto_20160608_1535'), ] operations = [ migrations.CreateModel( name='PageVersion', field...
47.96875
206
0.628013
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cms', '0016_auto_20160608_1535'), ] operations = [ migrations.CreateModel( name='PageVersion', fields=[ ('i...
true
true
f7fc828efbd7d492fb1b9747607f8c757b582053
158,410
py
Python
yt_dlp/YoutubeDL.py
CHJ85/yt-dlp
1720fd49aed36efce923a22b7df1074fc11958df
[ "Unlicense" ]
null
null
null
yt_dlp/YoutubeDL.py
CHJ85/yt-dlp
1720fd49aed36efce923a22b7df1074fc11958df
[ "Unlicense" ]
null
null
null
yt_dlp/YoutubeDL.py
CHJ85/yt-dlp
1720fd49aed36efce923a22b7df1074fc11958df
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python3 # coding: utf-8 from __future__ import absolute_import, unicode_literals import collections import contextlib import copy import datetime import errno import fileinput import io import itertools import json import locale import operator import os import platform import re import shutil import s...
46.728614
194
0.564238
from __future__ import absolute_import, unicode_literals import collections import contextlib import copy import datetime import errno import fileinput import io import itertools import json import locale import operator import os import platform import re import shutil import subprocess import sys import tempfile ...
true
true
f7fc83a1e47fd15ed999dae9cb79ffc725ec6bfa
8,154
py
Python
hexrd/ui/overlay_manager.py
HEXRD/hexrdgui
d92915463f237e0521b5830655ae73bc5bcd9f80
[ "BSD-3-Clause" ]
13
2020-02-18T00:23:02.000Z
2022-02-24T20:04:36.000Z
hexrd/ui/overlay_manager.py
HEXRD/hexrdgui
d92915463f237e0521b5830655ae73bc5bcd9f80
[ "BSD-3-Clause" ]
656
2020-01-14T02:33:40.000Z
2022-03-26T15:31:17.000Z
hexrd/ui/overlay_manager.py
HEXRD/hexrdgui
d92915463f237e0521b5830655ae73bc5bcd9f80
[ "BSD-3-Clause" ]
6
2020-01-17T15:02:53.000Z
2020-11-01T22:02:48.000Z
from PySide2.QtCore import Qt, QItemSelectionModel, QSignalBlocker from PySide2.QtWidgets import ( QCheckBox, QComboBox, QHBoxLayout, QSizePolicy, QWidget ) from hexrd.ui.constants import OverlayType from hexrd.ui.hexrd_config import HexrdConfig from hexrd.ui.overlay_editor import OverlayEditor from hexrd.ui.overl...
34.117155
79
0.654035
from PySide2.QtCore import Qt, QItemSelectionModel, QSignalBlocker from PySide2.QtWidgets import ( QCheckBox, QComboBox, QHBoxLayout, QSizePolicy, QWidget ) from hexrd.ui.constants import OverlayType from hexrd.ui.hexrd_config import HexrdConfig from hexrd.ui.overlay_editor import OverlayEditor from hexrd.ui.overl...
true
true
f7fc83b37257da7c212147a2b2ab73f0f54f497f
1,695
py
Python
postshiftapi.py
retart1337/PyTempMail
45bc30c2dbd8c43b30a78025f8668e765adb0251
[ "Unlicense" ]
1
2019-06-25T20:51:47.000Z
2019-06-25T20:51:47.000Z
postshiftapi.py
retart1337/PyTempMail
45bc30c2dbd8c43b30a78025f8668e765adb0251
[ "Unlicense" ]
null
null
null
postshiftapi.py
retart1337/PyTempMail
45bc30c2dbd8c43b30a78025f8668e765adb0251
[ "Unlicense" ]
null
null
null
import requests import json class Api(object): def ReturnContent(self, res): return json.loads(res.content.decode('utf-8')) def CreateNew(self, name): if name is not None: return Api.ReturnContent(0, requests.get('https://post-shift.ru/api.php?action=new&name='+name+'&type=json')) ...
56.5
152
0.634218
import requests import json class Api(object): def ReturnContent(self, res): return json.loads(res.content.decode('utf-8')) def CreateNew(self, name): if name is not None: return Api.ReturnContent(0, requests.get('https://post-shift.ru/api.php?action=new&name='+name+'&type=json')) ...
true
true