hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c366363cce7e6ca5b38f303f13a7ca147dfad65
996
py
Python
tests/test_simsalabim.py
simklein/simsalabim
feade4cf0c95d89e9d845feda2b5c3693eceb5f0
[ "MIT" ]
null
null
null
tests/test_simsalabim.py
simklein/simsalabim
feade4cf0c95d89e9d845feda2b5c3693eceb5f0
[ "MIT" ]
null
null
null
tests/test_simsalabim.py
simklein/simsalabim
feade4cf0c95d89e9d845feda2b5c3693eceb5f0
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Tests for `simsalabim` package.""" import pytest from click.testing import CliRunner # from simsalabim import simsalabim from simsalabim import cli @pytest.fixture def response(): """Sample pytest fixture. See more at: http://doc.pytest.org/en/latest/fixture.html """ # im...
26.210526
78
0.707831
import pytest from click.testing import CliRunner from simsalabim import cli @pytest.fixture def response(): def test_content(response): def test_command_line_interface(): runner = CliRunner() result = runner.invoke(cli.main) assert result.exit_code == 0 assert 'simsalabi...
true
true
1c36646167785fc30818342279b53c475754adb1
22,774
py
Python
train.py
cds-mipt/yolact
d226620495f16314ff8f5dda57bca18de54e004b
[ "MIT" ]
null
null
null
train.py
cds-mipt/yolact
d226620495f16314ff8f5dda57bca18de54e004b
[ "MIT" ]
null
null
null
train.py
cds-mipt/yolact
d226620495f16314ff8f5dda57bca18de54e004b
[ "MIT" ]
null
null
null
from data import * from utils.augmentations import SSDAugmentation, BaseTransform from utils.functions import MovingAverage, SavePath from utils.logger import Log from utils import timer from layers.modules import MultiBoxLoss from yolact import Yolact import os import sys import time import math, random from pathlib i...
43.461832
196
0.60029
from data import * from utils.augmentations import SSDAugmentation, BaseTransform from utils.functions import MovingAverage, SavePath from utils.logger import Log from utils import timer from layers.modules import MultiBoxLoss from yolact import Yolact import os import sys import time import math, random from pathlib i...
true
true
1c3664e5162aa7eecfb5a5efb953455e29eb37a7
453
py
Python
src/prefect/engine/executors/local.py
concreted/prefect
dd732f5990ee2b0f3d816adb285168fd63b239e4
[ "Apache-2.0" ]
8,633
2019-03-23T17:51:03.000Z
2022-03-31T22:17:42.000Z
src/prefect/engine/executors/local.py
concreted/prefect
dd732f5990ee2b0f3d816adb285168fd63b239e4
[ "Apache-2.0" ]
3,903
2019-03-23T19:11:21.000Z
2022-03-31T23:21:23.000Z
src/prefect/engine/executors/local.py
ngriffiths13/prefect
7f5613abcb182494b7dc12159277c3bc5f3c9898
[ "Apache-2.0" ]
937
2019-03-23T18:49:44.000Z
2022-03-31T21:45:13.000Z
import warnings from typing import Any from prefect.executors import LocalExecutor as _LocalExecutor class LocalExecutor(_LocalExecutor): def __new__(cls, *args: Any, **kwargs: Any) -> "LocalExecutor": warnings.warn( "prefect.engine.executors.LocalExecutor has been moved to " "`pr...
30.2
76
0.677704
import warnings from typing import Any from prefect.executors import LocalExecutor as _LocalExecutor class LocalExecutor(_LocalExecutor): def __new__(cls, *args: Any, **kwargs: Any) -> "LocalExecutor": warnings.warn( "prefect.engine.executors.LocalExecutor has been moved to " "`pr...
true
true
1c3665afa95ea066b427ed9ea62b8f525c9d89a6
715
py
Python
filter_balanced.py
rymoah/ca-boolfun-construction
9ee26fb4ac28076143a9929d40b4e6ad520e98ff
[ "MIT" ]
null
null
null
filter_balanced.py
rymoah/ca-boolfun-construction
9ee26fb4ac28076143a9929d40b4e6ad520e98ff
[ "MIT" ]
null
null
null
filter_balanced.py
rymoah/ca-boolfun-construction
9ee26fb4ac28076143a9929d40b4e6ad520e98ff
[ "MIT" ]
null
null
null
import os for filename in os.listdir('experiments/enumeration_quadratic_rules'): with open('experiments/enumeration_quadratic_rules'+filename, 'r') as fin, \ open('filtered_'+filename, 'w') as fout: lines = fin.readlines() for i, line in enumerate(lines): ...
26.481481
86
0.495105
import os for filename in os.listdir('experiments/enumeration_quadratic_rules'): with open('experiments/enumeration_quadratic_rules'+filename, 'r') as fin, \ open('filtered_'+filename, 'w') as fout: lines = fin.readlines() for i, line in enumerate(lines): ...
true
true
1c3665dff7a844f4cbbf9449c0c621ea7723dd7a
786
py
Python
board_import.py
Yamnasm/takuzu
1d5fee99c220273c229466d33126d06b18b3b188
[ "MIT" ]
null
null
null
board_import.py
Yamnasm/takuzu
1d5fee99c220273c229466d33126d06b18b3b188
[ "MIT" ]
null
null
null
board_import.py
Yamnasm/takuzu
1d5fee99c220273c229466d33126d06b18b3b188
[ "MIT" ]
null
null
null
from bs4 import BeautifulSoup class Tile: EMPTY = 0 RED = 1 BLUE = 2 def get_board_from_html(): def get_tile_status(cell): status = cell.div.get("class")[1] if status == "tile-": return Tile.EMPTY elif status == "tile-1": return Tile.RED elif s...
21.833333
60
0.571247
from bs4 import BeautifulSoup class Tile: EMPTY = 0 RED = 1 BLUE = 2 def get_board_from_html(): def get_tile_status(cell): status = cell.div.get("class")[1] if status == "tile-": return Tile.EMPTY elif status == "tile-1": return Tile.RED elif s...
true
true
1c366600ed4daefb88da8e0ff791d88dea78663d
9,737
py
Python
mkt/webapps/tests/test_tasks.py
oremj/zamboni
a751dc6d22f7af947da327b0a091cbab0a999f49
[ "BSD-3-Clause" ]
null
null
null
mkt/webapps/tests/test_tasks.py
oremj/zamboni
a751dc6d22f7af947da327b0a091cbab0a999f49
[ "BSD-3-Clause" ]
null
null
null
mkt/webapps/tests/test_tasks.py
oremj/zamboni
a751dc6d22f7af947da327b0a091cbab0a999f49
[ "BSD-3-Clause" ]
null
null
null
import json import os from django.conf import settings from django.core.files.storage import default_storage as storage from django.core.management import call_command import mock from nose.tools import eq_ import amo import amo.tests from editors.models import RereviewQueue from files.models import FileUpload from ...
36.062963
78
0.642087
import json import os from django.conf import settings from django.core.files.storage import default_storage as storage from django.core.management import call_command import mock from nose.tools import eq_ import amo import amo.tests from editors.models import RereviewQueue from files.models import FileUpload from ...
true
true
1c36664dd33c8065af344d7f36342e5482578b9f
1,327
py
Python
qiling/examples/simple_efi_x8664.py
mrTavas/owasp-fstm-auto
6e9ff36e46d885701c7419db3eca15f12063a7f3
[ "CC0-1.0" ]
2
2021-05-05T12:03:01.000Z
2021-06-04T14:27:15.000Z
qiling/examples/simple_efi_x8664.py
mrTavas/owasp-fstm-auto
6e9ff36e46d885701c7419db3eca15f12063a7f3
[ "CC0-1.0" ]
null
null
null
qiling/examples/simple_efi_x8664.py
mrTavas/owasp-fstm-auto
6e9ff36e46d885701c7419db3eca15f12063a7f3
[ "CC0-1.0" ]
2
2021-05-05T12:03:09.000Z
2021-06-04T14:27:21.000Z
#!/usr/bin/env python3 # # Cross Platform and Multi Architecture Advanced Binary Emulation Framework # import pickle import sys sys.path.append("..") from qiling import Qiling from qiling.const import QL_INTERCEPT, QL_VERBOSE from qiling.os.uefi.const import EFI_SUCCESS, EFI_INVALID_PARAMETER from qiling.os.uefi.ut...
28.234043
119
0.719668
import pickle import sys sys.path.append("..") from qiling import Qiling from qiling.const import QL_INTERCEPT, QL_VERBOSE from qiling.os.uefi.const import EFI_SUCCESS, EFI_INVALID_PARAMETER from qiling.os.uefi.utils import check_and_notify_protocols, signal_event def force_notify_RegisterProtocolNotify(ql: Qil...
true
true
1c36690f65fbbbe58293b8db6f331e0ffc08a85f
6,698
py
Python
hs_core/management/commands/ingest_irods_files.py
hydroshare/hydroshare
bf9888bbe61507aff070b1dfcec2fdec1921468d
[ "BSD-3-Clause" ]
178
2015-01-08T23:03:36.000Z
2022-03-03T13:56:45.000Z
hs_core/management/commands/ingest_irods_files.py
hydroshare/hydroshare
bf9888bbe61507aff070b1dfcec2fdec1921468d
[ "BSD-3-Clause" ]
4,125
2015-01-01T14:26:15.000Z
2022-03-31T16:38:55.000Z
hs_core/management/commands/ingest_irods_files.py
hydroshare/hydroshare
bf9888bbe61507aff070b1dfcec2fdec1921468d
[ "BSD-3-Clause" ]
53
2015-03-15T17:56:51.000Z
2022-03-17T00:32:16.000Z
# -*- coding: utf-8 -*- """ Check synchronization between iRODS and Django This checks that every file in IRODS corresponds to a ResourceFile in Django. If a file in iRODS is not present in Django, it attempts to register that file in Django. * By default, prints errors on stdout. * Optional argument --log instead l...
46.193103
99
0.457599
from django.core.management.base import BaseCommand from hs_core.models import BaseResource from hs_core.management.utils import ingest_irods_files import logging class Command(BaseCommand): help = "Check existence of proper Django metadata." def add_arguments(self, parser): parser.ad...
true
true
1c3669e33b3ef46d3630161bba99f3778ca71c59
1,557
py
Python
lib/googlecloudsdk/api_lib/app/flags.py
bopopescu/SDK
e6d9aaee2456f706d1d86e8ec2a41d146e33550d
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/api_lib/app/flags.py
bopopescu/SDK
e6d9aaee2456f706d1d86e8ec2a41d146e33550d
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/api_lib/app/flags.py
bopopescu/SDK
e6d9aaee2456f706d1d86e8ec2a41d146e33550d
[ "Apache-2.0" ]
1
2020-07-24T21:52:25.000Z
2020-07-24T21:52:25.000Z
# Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
32.4375
79
0.716763
import argparse from googlecloudsdk.calliope import base SERVER_FLAG = base.Argument( '--server', help=argparse.SUPPRESS) VERSION_FLAG = base.Argument( '--version', required=True, help='The version of the app that you want to operate on.') MODULES_ARG = base.Argument( 'modules...
true
true
1c366b4476d31eef747dfd6a4a9e924c5f8713e7
1,327
py
Python
slicedpy/utils.py
JackKelly/slicedpy
c2fa7eb4c7b7374f8192a43d8e617b63c9e25e62
[ "Apache-2.0" ]
3
2017-02-03T22:05:25.000Z
2017-08-29T19:06:17.000Z
slicedpy/utils.py
JackKelly/slicedpy
c2fa7eb4c7b7374f8192a43d8e617b63c9e25e62
[ "Apache-2.0" ]
null
null
null
slicedpy/utils.py
JackKelly/slicedpy
c2fa7eb4c7b7374f8192a43d8e617b63c9e25e62
[ "Apache-2.0" ]
null
null
null
from __future__ import division, print_function import pandas as pd import numpy as np def find_nearest(data, target, align='start', max_time_diff=None): """Finds the index of the nearest row in `data` to `target` time. Args: * data (pd.Series or pd.DataFrame): if `align==back` then `data` must ...
28.847826
80
0.61266
from __future__ import division, print_function import pandas as pd import numpy as np def find_nearest(data, target, align='start', max_time_diff=None): assert(align in ['start','end']) if data is None or data.shape[0] == 0: return None if isinstance(target, pd.Timestamp): target = targ...
true
true
1c366c0d55d5cf0b11f8a162f3fae00e8bc758b2
2,126
py
Python
stdplugins/fork.py
Jayraj448/TGUserBot
3b56fe32686ed35b8b2392f54fcaaa93f7b6d700
[ "Apache-2.0" ]
4
2019-10-03T04:59:02.000Z
2019-10-31T00:01:33.000Z
stdplugins/fork.py
Jayraj448/TGUserBot
3b56fe32686ed35b8b2392f54fcaaa93f7b6d700
[ "Apache-2.0" ]
1
2020-03-19T13:23:15.000Z
2020-03-25T09:18:56.000Z
stdplugins/fork.py
Jayraj448/TGUserBot
3b56fe32686ed35b8b2392f54fcaaa93f7b6d700
[ "Apache-2.0" ]
16
2019-09-30T17:26:32.000Z
2020-05-21T10:23:26.000Z
"""COMMAND : .fork""" from telethon import events import asyncio @borg.on(events.NewMessage(pattern=r"\.(.*)", outgoing=True)) async def _(event): if event.fwd_from: return animation_interval = 1 animation_ttl = range(0, 13) input_str = event.pattern_match.group(1) if input_str == "fork": ...
68.580645
208
0.5127
from telethon import events import asyncio @borg.on(events.NewMessage(pattern=r"\.(.*)", outgoing=True)) async def _(event): if event.fwd_from: return animation_interval = 1 animation_ttl = range(0, 13) input_str = event.pattern_match.group(1) if input_str == "fork": animation_chars ...
true
true
1c366c8d7429b7b092acdf3f387648308f89adc4
1,991
py
Python
predict2.py
ecdedios/ddfloww-site
bd582bc34a6248338abac8c2fe9c22bfbf69d79f
[ "MIT" ]
1
2019-06-19T02:40:38.000Z
2019-06-19T02:40:38.000Z
predict2.py
ecdedios/ddfloww-site
bd582bc34a6248338abac8c2fe9c22bfbf69d79f
[ "MIT" ]
3
2019-12-26T17:28:17.000Z
2022-03-21T22:17:22.000Z
predict2.py
ecdedios/ddfloww-site
bd582bc34a6248338abac8c2fe9c22bfbf69d79f
[ "MIT" ]
null
null
null
import pandas as pd from sklearn.model_selection import train_test_split from sklearn.linear_model import LogisticRegressionCV from collections import OrderedDict from sklearn.metrics import accuracy_score df = pd.read_csv('phase2_df.csv') x_columns = ['slap', 'threat_object', 'beaten', ...
31.603175
108
0.612757
import pandas as pd from sklearn.model_selection import train_test_split from sklearn.linear_model import LogisticRegressionCV from collections import OrderedDict from sklearn.metrics import accuracy_score df = pd.read_csv('phase2_df.csv') x_columns = ['slap', 'threat_object', 'beaten', ...
true
true
1c36706fffdc53a4bd7f96e38244557e8292ea2b
12,014
py
Python
lifelines/fitters/mixins.py
GrowthJeff/lifelines
4415be1bfeb7d15203109842926c1f6e50facaa6
[ "MIT" ]
null
null
null
lifelines/fitters/mixins.py
GrowthJeff/lifelines
4415be1bfeb7d15203109842926c1f6e50facaa6
[ "MIT" ]
null
null
null
lifelines/fitters/mixins.py
GrowthJeff/lifelines
4415be1bfeb7d15203109842926c1f6e50facaa6
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from typing import List, Optional, Dict, Any, Iterable from textwrap import dedent, fill from autograd import numpy as anp import numpy as np from pandas import DataFrame, Series from lifelines.statistics import proportional_hazard_test, TimeTransformers from lifelines.utils import format_p_valu...
45.335849
354
0.570168
from typing import List, Optional, Dict, Any, Iterable from textwrap import dedent, fill from autograd import numpy as anp import numpy as np from pandas import DataFrame, Series from lifelines.statistics import proportional_hazard_test, TimeTransformers from lifelines.utils import format_p_value from lifelines.utils....
true
true
1c3670c02a3741dceb7e217f61b810d5322434c7
429
py
Python
account/migrations/0004_alter_profile_photo.py
julesc00/socialmele
abed2f4ca73203afccf5de9ddd7d576aa627cf6b
[ "MIT" ]
null
null
null
account/migrations/0004_alter_profile_photo.py
julesc00/socialmele
abed2f4ca73203afccf5de9ddd7d576aa627cf6b
[ "MIT" ]
null
null
null
account/migrations/0004_alter_profile_photo.py
julesc00/socialmele
abed2f4ca73203afccf5de9ddd7d576aa627cf6b
[ "MIT" ]
null
null
null
# Generated by Django 3.2 on 2021-05-01 12:00 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('account', '0003_alter_profile_photo'), ] operations = [ migrations.AlterField( model_name='profile', name='photo', ...
22.578947
94
0.606061
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('account', '0003_alter_profile_photo'), ] operations = [ migrations.AlterField( model_name='profile', name='photo', field=models.ImageField(blank=True, ...
true
true
1c3671765dface0d62955322a8c4f99cc1df9d83
54
py
Python
carla/recourse_methods/catalog/face/library/__init__.py
jayanthyetukuri/CARLA
c3f3aaf11a5a8499c4bec5065e0c17ec8e6f5950
[ "MIT" ]
140
2021-08-03T21:53:32.000Z
2022-03-20T08:52:02.000Z
carla/recourse_methods/catalog/face/library/__init__.py
jayanthyetukuri/CARLA
c3f3aaf11a5a8499c4bec5065e0c17ec8e6f5950
[ "MIT" ]
54
2021-03-07T18:22:16.000Z
2021-08-03T12:06:31.000Z
carla/recourse_methods/catalog/face/library/__init__.py
jayanthyetukuri/CARLA
c3f3aaf11a5a8499c4bec5065e0c17ec8e6f5950
[ "MIT" ]
16
2021-08-23T12:14:58.000Z
2022-03-01T00:52:58.000Z
# flake8: noqa from .face_method import graph_search
13.5
37
0.796296
from .face_method import graph_search
true
true
1c3671bfc6332f3424ddea5eaeaa6013b8fc4c0b
18,139
py
Python
config/qtile/Managers/ScreenManager.py
dat-adi/Dotfiles
7a541aba2bbdd88736bebc9e82f6921ab4a3e03b
[ "Apache-2.0" ]
2
2021-05-06T15:58:29.000Z
2021-10-02T14:12:08.000Z
config/qtile/Managers/ScreenManager.py
dat-adi/dotfiles
7a541aba2bbdd88736bebc9e82f6921ab4a3e03b
[ "Apache-2.0" ]
null
null
null
config/qtile/Managers/ScreenManager.py
dat-adi/dotfiles
7a541aba2bbdd88736bebc9e82f6921ab4a3e03b
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- import os from libqtile import bar, layout, widget, hook, qtile from libqtile.config import Click, Drag, Group, Key, KeyChord, Match, Screen def get_two_screens(colors): groupbox_defaults = dict( margin_y=3, margin_x=0, padding_y=7, padding_x=7, borde...
39.177106
100
0.364077
import os from libqtile import bar, layout, widget, hook, qtile from libqtile.config import Click, Drag, Group, Key, KeyChord, Match, Screen def get_two_screens(colors): groupbox_defaults = dict( margin_y=3, margin_x=0, padding_y=7, padding_x=7, borderwidth=3, acti...
true
true
1c3671de991b760c1e3e6830247a65e28cd63810
1,022
py
Python
jogo_dados.py
rodrigo1708/scriptsComPython
1655451d7fbb8fa2899687de62df70e36ac97863
[ "MIT" ]
null
null
null
jogo_dados.py
rodrigo1708/scriptsComPython
1655451d7fbb8fa2899687de62df70e36ac97863
[ "MIT" ]
null
null
null
jogo_dados.py
rodrigo1708/scriptsComPython
1655451d7fbb8fa2899687de62df70e36ac97863
[ "MIT" ]
null
null
null
# JOGO DE DADOS - 4 jogadores jogam um dado e, no final, será mostrada a classificação dos jogadores from operator import itemgetter from random import randint from time import sleep jogo = {'jogador 1': randint(1, 6), 'jogador 2': randint(1, 6), 'jogador 3': randint(1, 6), 'jogador 4': randint(1, 6)} # Cria...
42.583333
118
0.576321
from operator import itemgetter from random import randint from time import sleep jogo = {'jogador 1': randint(1, 6), 'jogador 2': randint(1, 6), 'jogador 3': randint(1, 6), 'jogador 4': randint(1, 6)} ranking = {} print('='*15, 'VALORES ...
true
true
1c36728c1f5d05857b6a3f289d7ff101268f235a
4,355
py
Python
experiments/densenet169_medical_transfer_medico/_sources/util_47b99ae08126d90d5ce16b9f952f88cc.py
Stevenah/keras-training-system
ef15519d84335621f3e8f73db68cd54134e723fe
[ "MIT" ]
2
2018-09-19T14:53:15.000Z
2021-09-30T21:46:26.000Z
experiments/densenet169_medical_transfer_medico/_sources/util_47b99ae08126d90d5ce16b9f952f88cc.py
Stevenah/keras-training-system
ef15519d84335621f3e8f73db68cd54134e723fe
[ "MIT" ]
null
null
null
experiments/densenet169_medical_transfer_medico/_sources/util_47b99ae08126d90d5ce16b9f952f88cc.py
Stevenah/keras-training-system
ef15519d84335621f3e8f73db68cd54134e723fe
[ "MIT" ]
null
null
null
#!/usr/bin/env python from keras.callbacks import Callback from keras.models import model_from_json from scipy.misc import imsave, imread, imresize import numpy as np import tensorflow as tf import keras.backend as K import os import cv2 import shutil def merge_dict_of_lists(dict1, dict2): keys = set(dict1).union...
32.744361
100
0.649828
from keras.callbacks import Callback from keras.models import model_from_json from scipy.misc import imsave, imread, imresize import numpy as np import tensorflow as tf import keras.backend as K import os import cv2 import shutil def merge_dict_of_lists(dict1, dict2): keys = set(dict1).union(dict2) no = [] r...
true
true
1c3672dc5123c3d6dc052a1ac58ebe48fbfdee05
4,503
py
Python
tests/models/validators/v3_0_0/jsd_d83302be1f7c528e8211524aeaacd66d.py
CiscoISE/ciscoisesdk
860b0fc7cc15d0c2a39c64608195a7ab3d5f4885
[ "MIT" ]
36
2021-05-18T16:24:19.000Z
2022-03-05T13:44:41.000Z
tests/models/validators/v3_0_0/jsd_d83302be1f7c528e8211524aeaacd66d.py
CiscoISE/ciscoisesdk
860b0fc7cc15d0c2a39c64608195a7ab3d5f4885
[ "MIT" ]
15
2021-06-08T19:03:37.000Z
2022-02-25T14:47:33.000Z
tests/models/validators/v3_0_0/jsd_d83302be1f7c528e8211524aeaacd66d.py
CiscoISE/ciscoisesdk
860b0fc7cc15d0c2a39c64608195a7ab3d5f4885
[ "MIT" ]
6
2021-06-10T09:32:01.000Z
2022-01-12T08:34:39.000Z
# -*- coding: utf-8 -*- """Identity Services Engine getNetworkAccessDictionaryAttributesByDictionaryName data model. Copyright (c) 2021 Cisco and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to dea...
30.632653
92
0.463469
from __future__ import ( absolute_import, division, print_function, unicode_literals, ) import fastjsonschema import json from ciscoisesdk.exceptions import MalformedRequest from builtins import * class JSONSchemaValidatorD83302Be1F7C528E8211524Aeaacd66D(object): def __init__(self): s...
true
true
1c3672ecd96fb6b75f9411cb0ff9c463b3e2b4a3
14,901
py
Python
haymod/testsubthppi300_comb_fixed.py
ModelDBRepository/237469
15f71106b4f99577ee503178aaedbf2781ec61f6
[ "CC-BY-4.0" ]
null
null
null
haymod/testsubthppi300_comb_fixed.py
ModelDBRepository/237469
15f71106b4f99577ee503178aaedbf2781ec61f6
[ "CC-BY-4.0" ]
null
null
null
haymod/testsubthppi300_comb_fixed.py
ModelDBRepository/237469
15f71106b4f99577ee503178aaedbf2781ec61f6
[ "CC-BY-4.0" ]
null
null
null
from neuron import h import matplotlib matplotlib.use('Agg') import numpy from pylab import * import mytools import pickle import time import sys import random random.seed(1) v0 = -80 ca0 = 0.0001 proximalpoint = 400 distalpoint = 620 BACdt = 5.0 fs = 8 xs = range(700,1150,50); tstop = 11000.0 currCoeff = 0.9 # use t...
37.819797
238
0.60459
from neuron import h import matplotlib matplotlib.use('Agg') import numpy from pylab import * import mytools import pickle import time import sys import random random.seed(1) v0 = -80 ca0 = 0.0001 proximalpoint = 400 distalpoint = 620 BACdt = 5.0 fs = 8 xs = range(700,1150,50); tstop = 11000.0 currCoeff = 0.9 ITERS ...
false
true
1c3673553621c93211bfc7ebc739c0d8c7f40aff
251
py
Python
optimus/ml/contants.py
atwoodjw/Optimus
938463cec41a6683d2077c9afc7d6ba05c3b993f
[ "Apache-2.0" ]
null
null
null
optimus/ml/contants.py
atwoodjw/Optimus
938463cec41a6683d2077c9afc7d6ba05c3b993f
[ "Apache-2.0" ]
null
null
null
optimus/ml/contants.py
atwoodjw/Optimus
938463cec41a6683d2077c9afc7d6ba05c3b993f
[ "Apache-2.0" ]
null
null
null
CLUSTER_COL = "cluster" COUNT_COL = "count" RECOMMENDED_COL = "recommended" CLUSTER_SIZE_COL = "cluster_size" NGRAM_COL = "ngram" FINGERPRINT_COL = "fingerprint" NGRAM_FINGERPRINT_COL = "ngram_fingerprint" LEVENSHTEIN_DISTANCE = "LEVENSHTEIN_DISTANCE"
31.375
45
0.812749
CLUSTER_COL = "cluster" COUNT_COL = "count" RECOMMENDED_COL = "recommended" CLUSTER_SIZE_COL = "cluster_size" NGRAM_COL = "ngram" FINGERPRINT_COL = "fingerprint" NGRAM_FINGERPRINT_COL = "ngram_fingerprint" LEVENSHTEIN_DISTANCE = "LEVENSHTEIN_DISTANCE"
true
true
1c36755e5436d63d8309c37538f048289c08c336
229
py
Python
condominios/models.py
mpeyrotc/govector
5429d538d0bcee4d95d9069dd397b3b5b35b504c
[ "MIT" ]
null
null
null
condominios/models.py
mpeyrotc/govector
5429d538d0bcee4d95d9069dd397b3b5b35b504c
[ "MIT" ]
null
null
null
condominios/models.py
mpeyrotc/govector
5429d538d0bcee4d95d9069dd397b3b5b35b504c
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from django.db import models class Avisos (models.Model): Id = models.IntegerField() Nombre = models.CharField(max_length=50) Descripcion = models.CharField(max_length=500)
20.818182
50
0.759825
from __future__ import unicode_literals from django.db import models class Avisos (models.Model): Id = models.IntegerField() Nombre = models.CharField(max_length=50) Descripcion = models.CharField(max_length=500)
true
true
1c367584e1fa968de99aab27875653fd9d2ac6f9
332
py
Python
examples/basic/sys_example.py
SummerLife/micropython
de8072bc9eae02538f789b93a1711fed95dc77f1
[ "MIT" ]
null
null
null
examples/basic/sys_example.py
SummerLife/micropython
de8072bc9eae02538f789b93a1711fed95dc77f1
[ "MIT" ]
null
null
null
examples/basic/sys_example.py
SummerLife/micropython
de8072bc9eae02538f789b93a1711fed95dc77f1
[ "MIT" ]
1
2019-01-17T13:47:08.000Z
2019-01-17T13:47:08.000Z
# # Copyright (c) 2006-2019, RT-Thread Development Team # # SPDX-License-Identifier: MIT License # # Change Logs: # Date Author Notes # 2019-06-13 SummerGift first version # import sys print(sys.version) print(sys.version_info) print(sys.path) print(sys.__name__) print(sys.platform) print(sys...
17.473684
53
0.698795
import sys print(sys.version) print(sys.version_info) print(sys.path) print(sys.__name__) print(sys.platform) print(sys.byteorder)
true
true
1c36783d030b7b9f75ee3e4e616549c3c6ba72bd
583
py
Python
part2/servers/simple/simple_client.py
Coffee-fan/ThriftBook
5d0bf01811b898d24b0c4ff2cdb2e53fcb41a8ba
[ "Apache-2.0" ]
103
2015-03-25T05:41:05.000Z
2021-12-08T07:11:37.000Z
part2/servers/simple/simple_client.py
Coffee-fan/ThriftBook
5d0bf01811b898d24b0c4ff2cdb2e53fcb41a8ba
[ "Apache-2.0" ]
15
2015-02-06T10:21:57.000Z
2020-10-02T19:16:15.000Z
part2/servers/simple/simple_client.py
Coffee-fan/ThriftBook
5d0bf01811b898d24b0c4ff2cdb2e53fcb41a8ba
[ "Apache-2.0" ]
43
2015-01-27T21:13:52.000Z
2021-12-02T03:59:22.000Z
#!/usr/bin/env python import sys sys.path.append("gen-py") from thrift.transport import TSocket from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol from simple import Message trans = TSocket.TSocket("localhost", 9090) trans = TTransport.TBufferedTransport(trans) proto = TBinaryProtoco...
24.291667
70
0.723842
import sys sys.path.append("gen-py") from thrift.transport import TSocket from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol from simple import Message trans = TSocket.TSocket("localhost", 9090) trans = TTransport.TBufferedTransport(trans) proto = TBinaryProtocol.TBinaryProtocol(tra...
true
true
1c36784a322b882ed6cb4f0a486753cc02de5b3f
32,580
py
Python
lingvo/core/hyperparams.py
xsppp/gpipe_with_Mnist
4486e675c7b52c7519a6d39f97e9b22ed5461944
[ "Apache-2.0" ]
null
null
null
lingvo/core/hyperparams.py
xsppp/gpipe_with_Mnist
4486e675c7b52c7519a6d39f97e9b22ed5461944
[ "Apache-2.0" ]
null
null
null
lingvo/core/hyperparams.py
xsppp/gpipe_with_Mnist
4486e675c7b52c7519a6d39f97e9b22ed5461944
[ "Apache-2.0" ]
null
null
null
# Lint as: python3 # Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
34.696486
106
0.631369
import ast import copy import enum import importlib import inspect import re import sys from typing import Any, TypeVar, Generic, Sequence import dataclasses import lingvo.compat as tf from lingvo.core import hyperparams_pb2 from lingvo.core import symbolic from google.protobuf import message from goo...
true
true
1c367960001e5f99736b49d68f44c26095c3aa65
384
py
Python
app037.py
ChloeRuan/HelloWorld
e1297ee871c9a84a6e7c50e0d3aa1c332daef27f
[ "MIT" ]
null
null
null
app037.py
ChloeRuan/HelloWorld
e1297ee871c9a84a6e7c50e0d3aa1c332daef27f
[ "MIT" ]
null
null
null
app037.py
ChloeRuan/HelloWorld
e1297ee871c9a84a6e7c50e0d3aa1c332daef27f
[ "MIT" ]
null
null
null
# machine learning, artificial intelligence # step 1: import data, step 2: clean data, step 3: split teh data into Training/ Test data, Step 4: Create a model, step 5: Train teh model, step 6: make predictionss # python learning library step 7: evaluate and eimprove # load a dataset from a csv file in jupyter, jupyte...
64
167
0.770833
true
true
1c367997a96db0e841924b7d4cff96586c69656b
499
py
Python
bamboo/config/celeryconfig_test.py
pld/bamboo
a0fc77aebd6ff6b1087ba46896b0ce705fbb25a3
[ "BSD-3-Clause" ]
27
2015-01-14T15:57:54.000Z
2020-12-27T19:34:41.000Z
bamboo/config/celeryconfig_test.py
biswapanda/bamboo
72fc260822a27ce52cbe65de178f8fa1b60311f3
[ "BSD-3-Clause" ]
2
2015-08-06T15:23:28.000Z
2016-01-28T00:05:25.000Z
bamboo/config/celeryconfig_test.py
biswapanda/bamboo
72fc260822a27ce52cbe65de178f8fa1b60311f3
[ "BSD-3-Clause" ]
10
2015-08-07T01:50:39.000Z
2019-05-15T21:41:18.000Z
from bamboo.config import settings BROKER_BACKEND = 'mongodb' BROKER_URL = 'mongodb://localhost:27017/%s' % settings.TEST_DATABASE_NAME CELERY_RESULT_BACKEND = 'mongodb' CELERY_MONGODB_BACKEND_SETTINGS = { 'host': 'localhost', 'port': 27017, 'database': settings.TEST_DATABASE_NAME, 'taskmeta_collection...
26.263158
73
0.725451
from bamboo.config import settings BROKER_BACKEND = 'mongodb' BROKER_URL = 'mongodb://localhost:27017/%s' % settings.TEST_DATABASE_NAME CELERY_RESULT_BACKEND = 'mongodb' CELERY_MONGODB_BACKEND_SETTINGS = { 'host': 'localhost', 'port': 27017, 'database': settings.TEST_DATABASE_NAME, 'taskmeta_collection...
true
true
1c367a40aa021df8731766670141f0a87f722daa
476
py
Python
algos/example.py
acse-ra2617/algo_trading
7dc198c22cbaf71294e7f8c88730619b842394dd
[ "MIT" ]
null
null
null
algos/example.py
acse-ra2617/algo_trading
7dc198c22cbaf71294e7f8c88730619b842394dd
[ "MIT" ]
null
null
null
algos/example.py
acse-ra2617/algo_trading
7dc198c22cbaf71294e7f8c88730619b842394dd
[ "MIT" ]
1
2022-01-09T22:37:36.000Z
2022-01-09T22:37:36.000Z
# -*- coding: utf-8 -*- """ Created on Fri Feb 19 23:00:27 2021 @author: acse-ra2617 """ "Testing about" __all__ = ['summation'] def summation(a, b): """ given two values, 'a' and 'b' the sum of these values are returned parameters ---------- a : float or integer any value b : float...
15.354839
70
0.497899
__all__ = ['summation'] def summation(a, b): return a+b
true
true
1c367bac5f7aa642b61f4dd3377c4bc271528497
407
py
Python
backend/app/schemas/job.py
yangyuchi/ml-job-scheduler
bdafbf7fd266751a974d716e8d3ba64d3187fdcd
[ "MIT" ]
null
null
null
backend/app/schemas/job.py
yangyuchi/ml-job-scheduler
bdafbf7fd266751a974d716e8d3ba64d3187fdcd
[ "MIT" ]
null
null
null
backend/app/schemas/job.py
yangyuchi/ml-job-scheduler
bdafbf7fd266751a974d716e8d3ba64d3187fdcd
[ "MIT" ]
null
null
null
from datetime import datetime from datetime import datetime from enum import Enum from pydantic import BaseModel class TypeEnum(str, Enum): cron = "cron" single = "single" class ActionEnum(str, Enum): resume = "resume" pause = "pause" class JobCreate(BaseModel): name: str job_class: str ...
16.958333
33
0.690418
from datetime import datetime from datetime import datetime from enum import Enum from pydantic import BaseModel class TypeEnum(str, Enum): cron = "cron" single = "single" class ActionEnum(str, Enum): resume = "resume" pause = "pause" class JobCreate(BaseModel): name: str job_class: str ...
true
true
1c367bc3046f110da7694671b37f86b0c1fa7c86
3,508
py
Python
examples/pipelines/download_models.py
tcl326/forte
d0d7b8b97da5e1d507dfa7cd4ec51d96067770b8
[ "Apache-2.0" ]
null
null
null
examples/pipelines/download_models.py
tcl326/forte
d0d7b8b97da5e1d507dfa7cd4ec51d96067770b8
[ "Apache-2.0" ]
13
2019-12-01T04:51:38.000Z
2020-02-11T23:55:11.000Z
examples/pipelines/download_models.py
tcl326/forte
d0d7b8b97da5e1d507dfa7cd4ec51d96067770b8
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 The Forte Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
45.558442
80
0.662486
import argparse from collections import OrderedDict from pathlib import Path from forte.data.data_utils import maybe_download parser = argparse.ArgumentParser() parser.add_argument("--model-name", default="srl", help="Model name to download") parser.add_argument("--path", default="res...
true
true
1c367be144ed8242cd2bbbf542def3eacabe9053
5,586
py
Python
src/ggrc_basic_permissions/roles/Editor.py
lyykfi/ggrc-core
8c40308370897c1dff3ca631805ce17da4f87d8e
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/ggrc_basic_permissions/roles/Editor.py
lyykfi/ggrc-core
8c40308370897c1dff3ca631805ce17da4f87d8e
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/ggrc_basic_permissions/roles/Editor.py
lyykfi/ggrc-core
8c40308370897c1dff3ca631805ce17da4f87d8e
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright (C) 2018 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Editor permissions. """ # pylint: disable=invalid-name scope = "System" description = """ This role grants a user basic object creation and editing permission. """ permissions = { "read": [ ...
22.166667
78
0.463122
scope = "System" description = """ This role grants a user basic object creation and editing permission. """ permissions = { "read": [ "AccessControlRole", "BackgroundTask", "Workflow", "TaskGroup", "TaskGroupObject", "TaskGroupTask", "Cycle", ...
true
true
1c367c5624945a852fd90cb88491344d43a6d51d
818
py
Python
tests/test_rottenTomatoesMoviesBrowser.py
seanbreckenridge/rotten_tomatoes_cli
e250ad0d8bc70bf385540ab9264c440feb90d02c
[ "MIT" ]
null
null
null
tests/test_rottenTomatoesMoviesBrowser.py
seanbreckenridge/rotten_tomatoes_cli
e250ad0d8bc70bf385540ab9264c440feb90d02c
[ "MIT" ]
null
null
null
tests/test_rottenTomatoesMoviesBrowser.py
seanbreckenridge/rotten_tomatoes_cli
e250ad0d8bc70bf385540ab9264c440feb90d02c
[ "MIT" ]
null
null
null
from unittest import TestCase from mock import Mock, patch from data.services import RottenTomatoesMoviesBrowser class TestRottenTomatoesMoviesBrowser(TestCase): browser = RottenTomatoesMoviesBrowser() @patch("rotten_tomatoes_client.RottenTomatoesClient.browse_movies") def test_browse(self, mocked_clie...
35.565217
84
0.757946
from unittest import TestCase from mock import Mock, patch from data.services import RottenTomatoesMoviesBrowser class TestRottenTomatoesMoviesBrowser(TestCase): browser = RottenTomatoesMoviesBrowser() @patch("rotten_tomatoes_client.RottenTomatoesClient.browse_movies") def test_browse(self, mocked_clie...
true
true
1c367dde187ad06a25c92656822c65b0275512c4
279
py
Python
ncdjango/middleware.py
consbio/ncdjango
d35a896bc8fe0de1168171ed0e450f654c231319
[ "BSD-3-Clause" ]
6
2017-08-13T11:51:12.000Z
2021-07-26T13:07:02.000Z
ncdjango/middleware.py
consbio/ncdjango
d35a896bc8fe0de1168171ed0e450f654c231319
[ "BSD-3-Clause" ]
7
2015-10-13T00:55:06.000Z
2021-03-25T23:05:17.000Z
ncdjango/middleware.py
consbio/ncdjango
d35a896bc8fe0de1168171ed0e450f654c231319
[ "BSD-3-Clause" ]
null
null
null
from tastypie.authentication import ApiKeyAuthentication class TastypieApiKeyMiddleware(object): """Middleware to authenticate users using API keys for regular Django views""" def process_request(self, request): ApiKeyAuthentication().is_authenticated(request)
34.875
82
0.792115
from tastypie.authentication import ApiKeyAuthentication class TastypieApiKeyMiddleware(object): def process_request(self, request): ApiKeyAuthentication().is_authenticated(request)
true
true
1c367eda490abd607eea5d7d76879046faaf94c7
8,207
py
Python
sdk/python/pulumi_azure_native/network/v20191101/firewall_policy_rule_group.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20191101/firewall_policy_rule_group.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20191101/firewall_policy_rule_group.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
50.975155
1,519
0.679907
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs from ._enums import * from ._inputs import * __all__ = ['FirewallPolicyRuleGroup'] class FirewallPolicyRuleGroup(pulumi.CustomResource): def...
true
true
1c367edc638ba223845ce4f661ce8bfd0b5db630
76
wsgi
Python
1/index.wsgi
catsky/rebang
7053de769a3a7093f84cb6117a361ed394472ef0
[ "MIT" ]
29
2015-01-04T09:34:43.000Z
2019-02-20T20:16:03.000Z
1/index.wsgi
catsky/rebang
7053de769a3a7093f84cb6117a361ed394472ef0
[ "MIT" ]
1
2015-01-19T07:05:54.000Z
2015-06-02T05:01:38.000Z
1/index.wsgi
catsky/rebang
7053de769a3a7093f84cb6117a361ed394472ef0
[ "MIT" ]
17
2015-01-11T06:31:52.000Z
2018-09-03T05:55:23.000Z
import sae from chartnet import app application = sae.create_wsgi_app(app)
15.2
38
0.815789
import sae from chartnet import app application = sae.create_wsgi_app(app)
true
true
1c367ffc289bd6885a9c7f9b102884a07f96fd15
8,870
py
Python
mutagen/_file.py
lucienimmink/scanner.py
cecaa0a570ba8058321dea1c8efa9f77868effb3
[ "MIT" ]
2
2020-09-16T07:00:41.000Z
2020-12-20T19:56:03.000Z
mutagen/_file.py
lucienimmink/scanner.py
cecaa0a570ba8058321dea1c8efa9f77868effb3
[ "MIT" ]
null
null
null
mutagen/_file.py
lucienimmink/scanner.py
cecaa0a570ba8058321dea1c8efa9f77868effb3
[ "MIT" ]
2
2020-09-17T08:27:12.000Z
2021-08-23T11:13:52.000Z
# -*- coding: utf-8 -*- # Copyright (C) 2005 Michael Urman # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. import wa...
29.177632
79
0.607779
import warnings from mutagen._util import DictMixin, loadfile class FileType(DictMixin): __module__ = "mutagen" info = None tags = None filename = None _mimes = ["application/octet-stream"] def __init__(self, *args, **kwargs): if not args and not kwargs: warning...
true
true
1c3680e45aee221a37add29b429f5b29378d9092
1,714
py
Python
examples/mnist_example.py
cactusWhiskey/tensor-evolution
7e1f71667bd4c586236e48ec0ec55c68a3e99081
[ "Apache-2.0" ]
null
null
null
examples/mnist_example.py
cactusWhiskey/tensor-evolution
7e1f71667bd4c586236e48ec0ec55c68a3e99081
[ "Apache-2.0" ]
null
null
null
examples/mnist_example.py
cactusWhiskey/tensor-evolution
7e1f71667bd4c586236e48ec0ec55c68a3e99081
[ "Apache-2.0" ]
null
null
null
"""MNIST example using tensorflow dataset. Derived from Tensorflow quickstart beginner example. The original work contained the following copyright/notice info: Copyright 2019 The TensorFlow Authors. #@title Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complian...
30.607143
117
0.732205
import tensorflow as tf from tensorEvolution import tensor_evolution def main(): mnist = tf.keras.datasets.mnist (x_train, y_train), (x_test, y_test) = mnist.load_data() x_train, x_test = x_train / 255.0, x_test / 255.0 data = x_train, y_train, x_test, y_test worker = tensor...
true
true
1c36825fa3a796d0548f17227cfe023ceee9c27f
651
py
Python
tpubar/host.py
trisongz/tpubar
adf44909a9a1afb30aeb38664200f372a1d7f34d
[ "MIT" ]
3
2020-12-13T00:58:33.000Z
2021-02-17T22:30:44.000Z
tpubar/host.py
trisongz/tpubar
adf44909a9a1afb30aeb38664200f372a1d7f34d
[ "MIT" ]
1
2020-12-09T00:01:59.000Z
2020-12-09T00:01:59.000Z
tpubar/host.py
trisongz/tpubar
adf44909a9a1afb30aeb38664200f372a1d7f34d
[ "MIT" ]
1
2021-02-17T22:30:47.000Z
2021-02-17T22:30:47.000Z
import psutil import platform from tpubar.utils import run_command def queryhw(): host_os = platform.system() if host_os == 'Linux': cpu_name = run_command("lscpu |grep 'Model name'") cpu_name = cpu_name.split(':')[-1].strip() elif host_os == 'Darwin': # dunno why a TPU would run o...
34.263158
95
0.648233
import psutil import platform from tpubar.utils import run_command def queryhw(): host_os = platform.system() if host_os == 'Linux': cpu_name = run_command("lscpu |grep 'Model name'") cpu_name = cpu_name.split(':')[-1].strip() elif host_os == 'Darwin': cpu_name = run_comma...
true
true
1c3682f0aa02ce5a326ed581c79171e4ca8c0219
742
py
Python
esengine/utils/payload/suggesters.py
0mars/esengine
7da722e2950a51df46b3c6f8130477c00cff1d46
[ "MIT" ]
53
2017-04-29T16:39:13.000Z
2022-01-25T23:46:31.000Z
esengine/utils/payload/suggesters.py
0mars/esengine
7da722e2950a51df46b3c6f8130477c00cff1d46
[ "MIT" ]
9
2017-11-22T18:22:17.000Z
2020-06-05T19:26:07.000Z
esengine/utils/payload/suggesters.py
0mars/esengine
7da722e2950a51df46b3c6f8130477c00cff1d46
[ "MIT" ]
13
2017-10-27T13:44:04.000Z
2021-02-28T12:33:04.000Z
from esengine.utils.payload.meta import BaseSuggester, MetaSuggester from esengine.utils.payload.exception import NoSuggester SUGGESTERS = { 'term': { 'args': ('field', ), 'kwargs': ('analyzer', 'size', 'sort', 'suggest_mode') }, 'phrase': { 'args': ('field', ), 'kwargs': ( ...
24.733333
72
0.570081
from esengine.utils.payload.meta import BaseSuggester, MetaSuggester from esengine.utils.payload.exception import NoSuggester SUGGESTERS = { 'term': { 'args': ('field', ), 'kwargs': ('analyzer', 'size', 'sort', 'suggest_mode') }, 'phrase': { 'args': ('field', ), 'kwargs': ( ...
true
true
1c36862b813408d8d94891db534a30a2f6c31afe
1,156
py
Python
pynab/users.py
bigblue/pynab
3495bdfef2a3566c0545d09ec3ded6675fe80091
[ "BSD-3-Clause" ]
161
2015-01-09T12:45:26.000Z
2019-11-18T18:21:56.000Z
pynab/users.py
bigblue/pynab
3495bdfef2a3566c0545d09ec3ded6675fe80091
[ "BSD-3-Clause" ]
187
2015-01-01T02:18:25.000Z
2018-08-07T00:53:27.000Z
pynab/users.py
bigblue/pynab
3495bdfef2a3566c0545d09ec3ded6675fe80091
[ "BSD-3-Clause" ]
53
2015-01-04T09:42:53.000Z
2019-07-03T11:04:18.000Z
import hashlib import uuid from pynab.db import db_session, User def list(): """List all users.""" with db_session() as db: users = db.query(User).order_by(User.email) user_list = [] for user in users: user_list.append([user.email, user.api_key, user.grabs]) return...
23.591837
69
0.584775
import hashlib import uuid from pynab.db import db_session, User def list(): with db_session() as db: users = db.query(User).order_by(User.email) user_list = [] for user in users: user_list.append([user.email, user.api_key, user.grabs]) return user_list def info(email...
true
true
1c36862be396602451d98590ad0818253f4223ee
9,041
py
Python
hiveone_py/hive.py
hive-one/hive-py
98655cf0da2fa457f3bb767a78fe43d2497a59d6
[ "MIT" ]
null
null
null
hiveone_py/hive.py
hive-one/hive-py
98655cf0da2fa457f3bb767a78fe43d2497a59d6
[ "MIT" ]
null
null
null
hiveone_py/hive.py
hive-one/hive-py
98655cf0da2fa457f3bb767a78fe43d2497a59d6
[ "MIT" ]
null
null
null
import requests import json class HiveResponse: def __init__(self, data, etag): self.data = data self.etag = etag def __repr__(self): return repr(self.data) def __getitem__(self, key): return self.data.__getitem__(key) class Hive: def __init__(self, api_key, d...
35.316406
126
0.521402
import requests import json class HiveResponse: def __init__(self, data, etag): self.data = data self.etag = etag def __repr__(self): return repr(self.data) def __getitem__(self, key): return self.data.__getitem__(key) class Hive: def __init__(self, api_key, d...
true
true
1c3687dc86338cea79b91a8f77f1d39d9b83244d
530
py
Python
greens/routers/exceptions.py
grillazz/fastapi-mongodb
f3a38d93a1255d69218cee9a884bd862c50313be
[ "MIT" ]
4
2021-12-09T20:11:34.000Z
2022-03-01T20:31:23.000Z
greens/routers/exceptions.py
grillazz/fastapi-mongodb
f3a38d93a1255d69218cee9a884bd862c50313be
[ "MIT" ]
10
2021-09-27T13:03:28.000Z
2022-02-27T10:28:21.000Z
greens/routers/exceptions.py
grillazz/fastapi-mongodb
f3a38d93a1255d69218cee9a884bd862c50313be
[ "MIT" ]
null
null
null
from fastapi import HTTPException, status class NotFoundHTTPException(HTTPException): def __init__(self, msg: str): super().__init__( status_code=status.HTTP_404_NOT_FOUND, detail=msg if msg else "Requested resource is not found", ) class AlreadyExistsHTTPException(HTTPEx...
29.444444
79
0.669811
from fastapi import HTTPException, status class NotFoundHTTPException(HTTPException): def __init__(self, msg: str): super().__init__( status_code=status.HTTP_404_NOT_FOUND, detail=msg if msg else "Requested resource is not found", ) class AlreadyExistsHTTPException(HTTPEx...
true
true
1c3688346f3b428a588d08006ca5015f5dcfb08f
452
py
Python
multiplication_table/multiplication_table.py
hanyugeon/SimplePythonProject
e50729c50d9b3a7fa47403f7a508741637a71a6b
[ "MIT" ]
null
null
null
multiplication_table/multiplication_table.py
hanyugeon/SimplePythonProject
e50729c50d9b3a7fa47403f7a508741637a71a6b
[ "MIT" ]
null
null
null
multiplication_table/multiplication_table.py
hanyugeon/SimplePythonProject
e50729c50d9b3a7fa47403f7a508741637a71a6b
[ "MIT" ]
null
null
null
# 구구단 결과를 불러오는 함수를 적는다. # import를 활용하여 index.py 에 호출시킬것. # 자주일어나는 일은 간단 명료하게. def multiply(n): while n < 1 or n > 9: print('오류 : 1과 9 사이의 숫자를 입력하세요') n = int(input('구구단을 외자~ (숫자입력) :')) for m in range(1, 10): print('%d x %d = %d' % (n, m, n * m)) # def main(): # print("Testing mt....
20.545455
45
0.526549
def multiply(n): while n < 1 or n > 9: print('오류 : 1과 9 사이의 숫자를 입력하세요') n = int(input('구구단을 외자~ (숫자입력) :')) for m in range(1, 10): print('%d x %d = %d' % (n, m, n * m))
true
true
1c36889438334cbfa61ceaecb38c7913e32b677f
1,326
py
Python
audioFile.py
hsabillon7/multiplataforma
6a3dd7f7fb8d8f885dd2aa11c6908b614c358d98
[ "MIT" ]
3
2020-02-28T00:55:06.000Z
2020-03-13T20:38:27.000Z
audioFile.py
hsabillon7/multiplataforma
6a3dd7f7fb8d8f885dd2aa11c6908b614c358d98
[ "MIT" ]
null
null
null
audioFile.py
hsabillon7/multiplataforma
6a3dd7f7fb8d8f885dd2aa11c6908b614c358d98
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Programa: audioFile.py # Objetivo: Accede a los archivos soportados y verifica que # el archivo actual se puede reproducir. # Autor: Héctor Sabillón # Fecha: 25/febrero/2020 from supportedExtensions import Mp3File, WavFile, OggFile class AudioFile: """ Verifica y reproduce ...
34
72
0.606335
from supportedExtensions import Mp3File, WavFile, OggFile class AudioFile: def __init__(self, file_name): valid_format = Mp3File(file_name) if not file_name.endswith(valid_format.ext): valid_format = WavFile(file_name) if not file_name.endswith(valid_format.ext): ...
true
true
1c3688ef5fb7b5378fe2a18ccdd8e96411bacdbf
20,381
py
Python
spark_auto_mapper_fhir/value_sets/practice_setting_code_value_set.py
imranq2/SparkAutoMapper.FHIR
dd23b218fb0097d1edc2f3e688e8d6d4d7278bd2
[ "Apache-2.0" ]
1
2020-10-31T23:25:07.000Z
2020-10-31T23:25:07.000Z
spark_auto_mapper_fhir/value_sets/practice_setting_code_value_set.py
icanbwell/SparkAutoMapper.FHIR
98f368e781b46523142c7cb513c670d659a93c9b
[ "Apache-2.0" ]
null
null
null
spark_auto_mapper_fhir/value_sets/practice_setting_code_value_set.py
icanbwell/SparkAutoMapper.FHIR
98f368e781b46523142c7cb513c670d659a93c9b
[ "Apache-2.0" ]
null
null
null
from __future__ import annotations from spark_auto_mapper_fhir.fhir_types.uri import FhirUri from spark_auto_mapper_fhir.value_sets.generic_type import GenericTypeCode from spark_auto_mapper.type_definitions.defined_types import AutoMapperTextInputType # This file is auto-generated by generate_classes so do not edi...
39.26975
88
0.711692
from __future__ import annotations from spark_auto_mapper_fhir.fhir_types.uri import FhirUri from spark_auto_mapper_fhir.value_sets.generic_type import GenericTypeCode from spark_auto_mapper.type_definitions.defined_types import AutoMapperTextInputType class PracticeSettingCodeValueSetCode(GenericTypeCode): ...
true
true
1c368a5b14dca3856beeafe64910e58644b4fbed
9,803
py
Python
tests/conftest.py
adamchainz/sentry-python
d8c161fb289b44b5cd4b83d0bb31112031925713
[ "BSD-2-Clause" ]
null
null
null
tests/conftest.py
adamchainz/sentry-python
d8c161fb289b44b5cd4b83d0bb31112031925713
[ "BSD-2-Clause" ]
null
null
null
tests/conftest.py
adamchainz/sentry-python
d8c161fb289b44b5cd4b83d0bb31112031925713
[ "BSD-2-Clause" ]
null
null
null
import os import json import pytest import jsonschema import gevent import eventlet import sentry_sdk from sentry_sdk._compat import reraise, string_types, iteritems from sentry_sdk.transport import Transport from sentry_sdk.envelope import Envelope from sentry_sdk.utils import capture_internal_exceptions from test...
29.887195
103
0.649291
import os import json import pytest import jsonschema import gevent import eventlet import sentry_sdk from sentry_sdk._compat import reraise, string_types, iteritems from sentry_sdk.transport import Transport from sentry_sdk.envelope import Envelope from sentry_sdk.utils import capture_internal_exceptions from test...
true
true
1c368ab4cdad9f69e80c9f8066b56eaa588302f9
316
py
Python
hackerearth/practice/algorithm/i_demand_trial_by_combat_13/gen.py
amol9/hackerearth
d5f998c738058d06a0217fb54f9f03a646384bce
[ "MIT" ]
null
null
null
hackerearth/practice/algorithm/i_demand_trial_by_combat_13/gen.py
amol9/hackerearth
d5f998c738058d06a0217fb54f9f03a646384bce
[ "MIT" ]
null
null
null
hackerearth/practice/algorithm/i_demand_trial_by_combat_13/gen.py
amol9/hackerearth
d5f998c738058d06a0217fb54f9f03a646384bce
[ "MIT" ]
1
2018-06-24T03:28:32.000Z
2018-06-24T03:28:32.000Z
# random input generator # usage: gen.py [n] [no. of zeroes randomly inserted in it] import sys from random import randint n = int(sys.argv[1]) z = int(sys.argv[2]) print 1 print n, 1000 rz = map(lambda _ : randint(0, n-1), range(0, z)) print ' '.join(map(str, map(lambda i : 0 if i in rz else 1, range(0, n))))
21.066667
74
0.655063
import sys from random import randint n = int(sys.argv[1]) z = int(sys.argv[2]) print 1 print n, 1000 rz = map(lambda _ : randint(0, n-1), range(0, z)) print ' '.join(map(str, map(lambda i : 0 if i in rz else 1, range(0, n))))
false
true
1c368c294b9fbe391fd6ed3b79da06cbf2355d19
707
py
Python
web/routes.py
bdwlyon/devicehive-audio-analysis
8bd23578dbf043d9d6a618c40bc4c8161361df30
[ "Apache-2.0" ]
201
2017-11-10T18:19:20.000Z
2021-12-21T08:13:45.000Z
web/routes.py
bdwlyon/devicehive-audio-analysis
8bd23578dbf043d9d6a618c40bc4c8161361df30
[ "Apache-2.0" ]
17
2017-11-29T02:43:53.000Z
2021-07-08T07:12:48.000Z
web/routes.py
bdwlyon/devicehive-audio-analysis
8bd23578dbf043d9d6a618c40bc4c8161361df30
[ "Apache-2.0" ]
84
2017-11-16T11:26:04.000Z
2021-02-03T18:49:14.000Z
# Copyright (C) 2017 DataArt # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
33.666667
74
0.735502
from .controllers import Events, EventsUpdate routes = [ (r'^/events/$', Events), (r'^/events/update/$', EventsUpdate), ]
true
true
1c368c905d873422490eb916e211106a9912d4f5
6,457
py
Python
python/Lib/test/test_winconsoleio.py
jasam/ciclo_vida_datos_scraping
3f7cffc944a0a0752a502dc7868cf43c4144f16c
[ "MIT" ]
null
null
null
python/Lib/test/test_winconsoleio.py
jasam/ciclo_vida_datos_scraping
3f7cffc944a0a0752a502dc7868cf43c4144f16c
[ "MIT" ]
null
null
null
python/Lib/test/test_winconsoleio.py
jasam/ciclo_vida_datos_scraping
3f7cffc944a0a0752a502dc7868cf43c4144f16c
[ "MIT" ]
null
null
null
'''Tests for WindowsConsoleIO ''' import io import os import sys import tempfile import unittest from test import support if sys.platform != 'win32': raise unittest.SkipTest("test only relevant on win32") from _testconsole import write_input ConIO = io._WindowsConsoleIO class WindowsConsoleIOT...
33.283505
88
0.545919
import io import os import sys import tempfile import unittest from test import support if sys.platform != 'win32': raise unittest.SkipTest("test only relevant on win32") from _testconsole import write_input ConIO = io._WindowsConsoleIO class WindowsConsoleIOTests(unittest.TestCase): def te...
true
true
1c368ca4d0bd3f06ada72a008a49083823684fc4
241
py
Python
python programs/inheritence.py
saddam-gif/Python-crushcourse
63e1e1ff1eeb9a5d34bb0354cc86566c4de60260
[ "MIT" ]
null
null
null
python programs/inheritence.py
saddam-gif/Python-crushcourse
63e1e1ff1eeb9a5d34bb0354cc86566c4de60260
[ "MIT" ]
null
null
null
python programs/inheritence.py
saddam-gif/Python-crushcourse
63e1e1ff1eeb9a5d34bb0354cc86566c4de60260
[ "MIT" ]
null
null
null
class phone: def call(self): print("call") def message(self): print("message") class samsung(phone): def photo(self): print("photo") s = samsung() s.call() s.message() print(issubclass(phone,samsung))
14.176471
32
0.593361
class phone: def call(self): print("call") def message(self): print("message") class samsung(phone): def photo(self): print("photo") s = samsung() s.call() s.message() print(issubclass(phone,samsung))
true
true
1c368cb215bc8be5b20edc91b56a5b158d21a4ed
4,706
py
Python
aiocoap/blockwise.py
roysjosh/aiocoap
1f03d4ceb969b2b443c288c312d44c3b7c3e2031
[ "MIT" ]
null
null
null
aiocoap/blockwise.py
roysjosh/aiocoap
1f03d4ceb969b2b443c288c312d44c3b7c3e2031
[ "MIT" ]
null
null
null
aiocoap/blockwise.py
roysjosh/aiocoap
1f03d4ceb969b2b443c288c312d44c3b7c3e2031
[ "MIT" ]
null
null
null
# This file is part of the Python aiocoap library project. # # Copyright (c) 2012-2014 Maciej Wasilak <http://sixpinetrees.blogspot.com/>, # 2013-2014 Christian Amsüss <c.amsuess@energyharvesting.at> # # aiocoap is free software, this file is published under the MIT license as # described in the accompany...
35.923664
95
0.665108
import types from . import numbers from .numbers.optionnumbers import OptionNumber from .error import ConstructionRenderableError from .message import Message from .optiontypes import BlockOption from .util.asyncio.timeoutdict import TimeoutDict def _extract_block_key(message): return (message.remote.bl...
true
true
1c368d032835f38e783bd66da50df1e94cf9b3d7
756
py
Python
ooobuild/csslo/setup/__init__.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/csslo/setup/__init__.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/csslo/setup/__init__.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http: // www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
39.789474
82
0.771164
from ...lo.setup.update_check import UpdateCheck as UpdateCheck from ...lo.setup.update_check_config import UpdateCheckConfig as UpdateCheckConfig
true
true
1c368d03d7d6d609c75fcb71a12a42d3295ba672
1,747
py
Python
kolga/plugins/slack/messages.py
Hi-Fi/kolga
821169fc24eb7e3883e6b4993ac75117a0c59766
[ "MIT" ]
7
2020-04-24T13:47:21.000Z
2022-03-09T05:17:59.000Z
kolga/plugins/slack/messages.py
Hi-Fi/kolga
821169fc24eb7e3883e6b4993ac75117a0c59766
[ "MIT" ]
16
2021-01-19T13:18:27.000Z
2022-02-01T13:50:14.000Z
kolga/plugins/slack/messages.py
Hi-Fi/kolga
821169fc24eb7e3883e6b4993ac75117a0c59766
[ "MIT" ]
6
2020-08-17T08:56:56.000Z
2021-05-29T07:34:47.000Z
from typing import TYPE_CHECKING, Any, List, TypedDict if TYPE_CHECKING: from kolga.libs.project import Project class _SlackMessageField(TypedDict, total=False): type: str text: str class _SlackMessageBody(TypedDict, total=False): type: str fields: List[_SlackMessageField] def new_environment...
27.296875
98
0.576417
from typing import TYPE_CHECKING, Any, List, TypedDict if TYPE_CHECKING: from kolga.libs.project import Project class _SlackMessageField(TypedDict, total=False): type: str text: str class _SlackMessageBody(TypedDict, total=False): type: str fields: List[_SlackMessageField] def new_environment...
true
true
1c368d2ea1c7c053c9d189524d8dd68e73f02c99
6,622
py
Python
tests/test_utils_gsheets.py
harvard-dce/zoom-ingester
ef5c8910e35e84d33f1c612cfb4643309c52040d
[ "Apache-2.0" ]
18
2018-02-05T20:03:30.000Z
2022-01-19T00:58:00.000Z
tests/test_utils_gsheets.py
harvard-dce/zoom-ingester
ef5c8910e35e84d33f1c612cfb4643309c52040d
[ "Apache-2.0" ]
31
2018-01-19T14:21:03.000Z
2021-09-07T02:04:40.000Z
tests/test_utils_gsheets.py
harvard-dce/zoom-ingester
ef5c8910e35e84d33f1c612cfb4643309c52040d
[ "Apache-2.0" ]
5
2019-12-04T17:44:10.000Z
2021-02-23T03:14:24.000Z
import site from os.path import dirname, join import pytest site.addsitedir(join(dirname(dirname(__file__)), "functions")) from utils import gsheets def test_schedule_successful_parsing(mocker): mock_table_name = "mock_table_name" mock_json_to_dynamo = mocker.patch.object( gsheets, "schedule_json_to...
32.782178
74
0.53579
import site from os.path import dirname, join import pytest site.addsitedir(join(dirname(dirname(__file__)), "functions")) from utils import gsheets def test_schedule_successful_parsing(mocker): mock_table_name = "mock_table_name" mock_json_to_dynamo = mocker.patch.object( gsheets, "schedule_json_to...
true
true
1c368d4d5cea0ebbc7c219f6ca749505321bbbb3
1,402
py
Python
notifications/views.py
thulasi-ram/logistika
a9a7b649f0e15bf8cdad43fdab2a8bd61326f83d
[ "MIT" ]
null
null
null
notifications/views.py
thulasi-ram/logistika
a9a7b649f0e15bf8cdad43fdab2a8bd61326f83d
[ "MIT" ]
null
null
null
notifications/views.py
thulasi-ram/logistika
a9a7b649f0e15bf8cdad43fdab2a8bd61326f83d
[ "MIT" ]
null
null
null
from datetime import datetime from django.contrib.auth.mixins import LoginRequiredMixin from django.core.paginator import PageNotAnInteger, Paginator, EmptyPage from django.shortcuts import render # Create your views here. from django.template.response import TemplateResponse from django.views.generic import Template...
40.057143
114
0.728959
from datetime import datetime from django.contrib.auth.mixins import LoginRequiredMixin from django.core.paginator import PageNotAnInteger, Paginator, EmptyPage from django.shortcuts import render from django.template.response import TemplateResponse from django.views.generic import TemplateView from itertools impor...
true
true
1c368d84132844b5c51d4fdecc4d5f87324927af
5,054
py
Python
libtrust/rsa_key.py
tomwei7/libtrust-py3
b1d71eee57b95621b5111cebd3c44751442740c5
[ "Apache-2.0" ]
1
2020-03-26T13:17:10.000Z
2020-03-26T13:17:10.000Z
libtrust/rsa_key.py
tomwei7/libtrust-py3
b1d71eee57b95621b5111cebd3c44751442740c5
[ "Apache-2.0" ]
null
null
null
libtrust/rsa_key.py
tomwei7/libtrust-py3
b1d71eee57b95621b5111cebd3c44751442740c5
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals import copy from cryptography import utils as cry_utils from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives import padding from cryptography.hazmat.primitives import serialization from cr...
29.729412
102
0.651959
from __future__ import unicode_literals import copy from cryptography import utils as cry_utils from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives import padding from cryptography.hazmat.primitives import serialization from cr...
true
true
1c368e2412241e3f97b6cddb30678921750921d1
995
py
Python
Windows - Python 3.9, 3.6/src/explosion.py
Python-Coderss/Attack-Of-The-Robots-Compiled
5da1b9a7d8531879cf3c3061c2d2d5abde2586e8
[ "Apache-2.0" ]
1
2022-03-08T01:24:32.000Z
2022-03-08T01:24:32.000Z
Windows - Python 3.9, 3.6/src/explosion.py
Python-Coderss/Attack-Of-The-Robots-Compiled
5da1b9a7d8531879cf3c3061c2d2d5abde2586e8
[ "Apache-2.0" ]
null
null
null
Windows - Python 3.9, 3.6/src/explosion.py
Python-Coderss/Attack-Of-The-Robots-Compiled
5da1b9a7d8531879cf3c3061c2d2d5abde2586e8
[ "Apache-2.0" ]
null
null
null
import pygame class Explosion(pygame.sprite.Sprite): def __init__(self, screen, x, y, images, duration, damage, damage_player): pygame.sprite.Sprite.__init__(self, self.containers) self.screen = screen self.x = x self.y = y self.images = images self.duration = durati...
35.535714
78
0.60201
import pygame class Explosion(pygame.sprite.Sprite): def __init__(self, screen, x, y, images, duration, damage, damage_player): pygame.sprite.Sprite.__init__(self, self.containers) self.screen = screen self.x = x self.y = y self.images = images self.duration = durati...
true
true
1c368e62a56e684bcef585a3442b87c6538625d1
1,156
py
Python
nicos_mlz/jcnsse/setups/jhg1.py
ebadkamil/nicos
0355a970d627aae170c93292f08f95759c97f3b5
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
null
null
null
nicos_mlz/jcnsse/setups/jhg1.py
ebadkamil/nicos
0355a970d627aae170c93292f08f95759c97f3b5
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
1
2021-08-18T10:55:42.000Z
2021-08-18T10:55:42.000Z
nicos_mlz/jcnsse/setups/jhg1.py
ISISComputingGroup/nicos
94cb4d172815919481f8c6ee686f21ebb76f2068
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
null
null
null
description = 'JCNS humidity generator' group = 'plugplay' tango_base = 'tango://%s:10000/box/' % setupname devices = { '%s_flowrate' % setupname: device('nicos.devices.tango.WindowTimeoutAO', description = 'Flow rate through humidity cell', tangodevice = tango_base + 'mhg/flowrate', fmts...
32.111111
78
0.588235
description = 'JCNS humidity generator' group = 'plugplay' tango_base = 'tango://%s:10000/box/' % setupname devices = { '%s_flowrate' % setupname: device('nicos.devices.tango.WindowTimeoutAO', description = 'Flow rate through humidity cell', tangodevice = tango_base + 'mhg/flowrate', fmts...
true
true
1c368e99b4da3894ecbd4955cf1c4f25f7cd2607
3,367
py
Python
pyhpecw7/features/l2vpn.py
HPENetworking/hpe-cw7-ansible
a7569b1dd21ad38a53d825eb4d4b2caf8ff6ea16
[ "Apache-2.0" ]
4
2022-01-10T21:02:00.000Z
2022-03-09T03:05:22.000Z
pyhpecw7/features/l2vpn.py
flycoolman/hpe-cw7-ansible
a7569b1dd21ad38a53d825eb4d4b2caf8ff6ea16
[ "Apache-2.0" ]
null
null
null
pyhpecw7/features/l2vpn.py
flycoolman/hpe-cw7-ansible
a7569b1dd21ad38a53d825eb4d4b2caf8ff6ea16
[ "Apache-2.0" ]
2
2022-01-10T21:03:07.000Z
2022-01-20T09:11:44.000Z
"""Manage L2VPN on HPCOM7 devices. """ from pyhpecw7.utils.xml.lib import * class L2VPN(object): """Enable/Disable L2VPN globally on a HP Comware 7 switch. Args: device (HPCOM7): connected instance of a ``pyhpecw7.comware.HPCOM7`` object. Attributes: device (HPCOM7): connect...
27.373984
92
0.536086
from pyhpecw7.utils.xml.lib import * class L2VPN(object): def __init__(self, device): self.device = device def get_config(self): KEYMAP = { 'enable': 'Enable', 'vsi_supported': 'SupportVsiInterface' } VALUE_MAP = { 'Enable': { ...
true
true
1c368f7505cae4e893045856ca51c6b53254b34a
11,899
py
Python
lib/urlwatch/command.py
RXWatcher1/urlwatch
c171851693206ce1df4d9c47327d38996ed063a6
[ "BSD-3-Clause" ]
null
null
null
lib/urlwatch/command.py
RXWatcher1/urlwatch
c171851693206ce1df4d9c47327d38996ed063a6
[ "BSD-3-Clause" ]
null
null
null
lib/urlwatch/command.py
RXWatcher1/urlwatch
c171851693206ce1df4d9c47327d38996ed063a6
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # This file is part of urlwatch (https://thp.io/2008/urlwatch/). # Copyright (c) 2008-2019 Thomas Perl <m@thp.io> # 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....
40.199324
141
0.599966
import imp import logging import os import shutil import sys import requests from .filters import FilterBase from .handler import JobState from .jobs import JobBase, UrlJob from .reporters import ReporterBase from .util import atomic_rename, edit_file from .mailer import set_password, hav...
true
true
1c3690450ffbc0da5752a9490a5bca65d5a5ee89
690
py
Python
setup.py
emordonez/transfermarkt-transfers
147c7b025958f7bb6796a32e95b0867dd2681820
[ "MIT" ]
2
2021-09-21T07:34:07.000Z
2021-11-01T16:26:22.000Z
setup.py
emordonez/transfermarkt-transfers
147c7b025958f7bb6796a32e95b0867dd2681820
[ "MIT" ]
null
null
null
setup.py
emordonez/transfermarkt-transfers
147c7b025958f7bb6796a32e95b0867dd2681820
[ "MIT" ]
2
2021-09-21T07:34:08.000Z
2022-01-29T08:33:02.000Z
# -*- coding: utf-8 -*- from setuptools import setup, find_packages with open('requirements.txt') as f: requirements= f.read().splitlines() with open('README.md') as f: readme = f.read() with open('LICENSE') as f: license = f.read() setup( name='tmtransfers', version='0.1.0', install_requi...
24.642857
79
0.686957
from setuptools import setup, find_packages with open('requirements.txt') as f: requirements= f.read().splitlines() with open('README.md') as f: readme = f.read() with open('LICENSE') as f: license = f.read() setup( name='tmtransfers', version='0.1.0', install_requires=requirements, d...
true
true
1c36910fc81a9012e6fe1f8746d4dcb72467f9af
288
py
Python
Pig Latin Translator.py
navaneethmenon98/hackerearth
e103ef7cbc4d3e76cca8ae2aad888318f87a32a3
[ "MIT" ]
null
null
null
Pig Latin Translator.py
navaneethmenon98/hackerearth
e103ef7cbc4d3e76cca8ae2aad888318f87a32a3
[ "MIT" ]
null
null
null
Pig Latin Translator.py
navaneethmenon98/hackerearth
e103ef7cbc4d3e76cca8ae2aad888318f87a32a3
[ "MIT" ]
null
null
null
T=input() a=['a','e','i','o','u','A','E','I','O','U'] for f in range(T): d='' S=map(str,raw_input().split()) for i in range(len(S)): b=S[i] if b[0] in a: b=b+'ay' else: c=len(b) b=b[1:c]+b[0]+'ay' S[i]=b for t in range(len(b)): d=d+b[t] d=d+' ' print(d)
14.4
43
0.440972
T=input() a=['a','e','i','o','u','A','E','I','O','U'] for f in range(T): d='' S=map(str,raw_input().split()) for i in range(len(S)): b=S[i] if b[0] in a: b=b+'ay' else: c=len(b) b=b[1:c]+b[0]+'ay' S[i]=b for t in range(len(b)): d=d+b[t] d=d+' ' print(d)
true
true
1c3692c58723af2150d9710743d17bf37bbe56c4
6,827
py
Python
popupcad/graphics2d/proto.py
popupcad/popupcad
d3da448260cd5cb9e05417b0a723d7f73ae4e06e
[ "MIT" ]
19
2015-08-01T22:13:39.000Z
2020-03-07T03:55:46.000Z
popupcad/graphics2d/proto.py
CadQuery/popupcad
b0c7b406d4b288c7cb375340323bba0252aedbfb
[ "MIT" ]
106
2015-07-23T19:58:01.000Z
2019-05-14T03:46:08.000Z
popupcad/graphics2d/proto.py
CadQuery/popupcad
b0c7b406d4b288c7cb375340323bba0252aedbfb
[ "MIT" ]
9
2015-10-04T23:38:41.000Z
2020-07-16T03:50:34.000Z
# -*- coding: utf-8 -*- """ Written by Daniel M. Aukes and CONTRIBUTORS Email: danaukes<at>asu.edu. Please see LICENSE for full license. """ import qt.QtCore as qc import qt.QtGui as qg from popupcad.graphics2d.graphicsitems import Common, CommonShape from popupcad.geometry.vertex import ShapeVertex from popupcad.fil...
33.465686
158
0.634393
import qt.QtCore as qc import qt.QtGui as qg from popupcad.graphics2d.graphicsitems import Common, CommonShape from popupcad.geometry.vertex import ShapeVertex from popupcad.filetypes.genericshapes import GenericPoly, GenericPolyline, GenericLine, GenericCircle, GenericTwoPointRect import popupcad import qt.qt_hack...
true
true
1c3694502120cbcff9534c02328242a596c36aa8
208
py
Python
Mundo2/contRegressiva.py
DanieleMagalhaes/Exercicios-Python
394c68e8f06a10ec16539addd888960d11d1318f
[ "MIT" ]
null
null
null
Mundo2/contRegressiva.py
DanieleMagalhaes/Exercicios-Python
394c68e8f06a10ec16539addd888960d11d1318f
[ "MIT" ]
null
null
null
Mundo2/contRegressiva.py
DanieleMagalhaes/Exercicios-Python
394c68e8f06a10ec16539addd888960d11d1318f
[ "MIT" ]
null
null
null
from time import sleep sleep(1) print('\n\33[32mVamos para a contagem regressiva:\33[m \n') sleep(2) for c in range(10, 0 , -1): print(c, end=' ') sleep(1) print('\n\33[33mFeliz ANO NOVO!!! \33[m\n')
26
59
0.629808
from time import sleep sleep(1) print('\n\33[32mVamos para a contagem regressiva:\33[m \n') sleep(2) for c in range(10, 0 , -1): print(c, end=' ') sleep(1) print('\n\33[33mFeliz ANO NOVO!!! \33[m\n')
true
true
1c3695b32e50700b368ea8fee6965259c7b8b26f
9,049
py
Python
kivy/uix/recycleview/layout.py
JanMalte/kivy
aa267d1d026c6c2dd75d73d9e0523f58ec0bbad7
[ "MIT" ]
1
2019-05-03T08:36:01.000Z
2019-05-03T08:36:01.000Z
kivy/uix/recycleview/layout.py
gloc-mike/kivy
293ce1a7786c637cd825a0ab97560611a30fa890
[ "MIT" ]
null
null
null
kivy/uix/recycleview/layout.py
gloc-mike/kivy
293ce1a7786c637cd825a0ab97560611a30fa890
[ "MIT" ]
2
2017-03-09T14:27:03.000Z
2019-05-03T08:36:02.000Z
from kivy.compat import string_types from kivy.factory import Factory from kivy.properties import StringProperty, ObjectProperty from kivy.uix.behaviors import CompoundSelectionBehavior from kivy.uix.recycleview.views import RecycleDataViewBehavior, \ _view_base_cache class LayoutChangeException(Exception): ...
37.238683
83
0.65952
from kivy.compat import string_types from kivy.factory import Factory from kivy.properties import StringProperty, ObjectProperty from kivy.uix.behaviors import CompoundSelectionBehavior from kivy.uix.recycleview.views import RecycleDataViewBehavior, \ _view_base_cache class LayoutChangeException(Exception): ...
true
true
1c36987a3e27495d3cd68db28ebe968716373215
6,066
py
Python
elasticapm/utils/__init__.py
dpaluch-rp/apm-agent-python
8b11d232f37c0affe0a7c92f590b05106c55b3b3
[ "BSD-3-Clause" ]
null
null
null
elasticapm/utils/__init__.py
dpaluch-rp/apm-agent-python
8b11d232f37c0affe0a7c92f590b05106c55b3b3
[ "BSD-3-Clause" ]
null
null
null
elasticapm/utils/__init__.py
dpaluch-rp/apm-agent-python
8b11d232f37c0affe0a7c92f590b05106c55b3b3
[ "BSD-3-Clause" ]
null
null
null
# BSD 3-Clause License # # Copyright (c) 2012, the Sentry Team, see AUTHORS for more details # Copyright (c) 2019, Elasticsearch BV # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Red...
32.789189
110
0.670129
import base64 import os import re from functools import partial from elasticapm.conf import constants from elasticapm.utils import compat, encoding try: from functools import partialmethod partial_types = (partial, partialmethod) except ImportError: partial_types = (par...
true
true
1c369903477e7937c7eaa59d42f3fc714b291ead
16,475
py
Python
contrib/tools/python3/src/Lib/distutils/cygwinccompiler.py
HeyLey/catboost
f472aed90604ebe727537d9d4a37147985e10ec2
[ "Apache-2.0" ]
11,058
2018-05-29T07:40:06.000Z
2022-03-31T11:38:42.000Z
contrib/tools/python3/src/Lib/distutils/cygwinccompiler.py
HeyLey/catboost
f472aed90604ebe727537d9d4a37147985e10ec2
[ "Apache-2.0" ]
2,105
2018-06-01T10:07:16.000Z
2022-03-31T14:56:42.000Z
contrib/tools/python3/src/Lib/distutils/cygwinccompiler.py
HeyLey/catboost
f472aed90604ebe727537d9d4a37147985e10ec2
[ "Apache-2.0" ]
914
2018-07-27T09:36:14.000Z
2022-03-31T19:56:34.000Z
"""distutils.cygwinccompiler Provides the CygwinCCompiler class, a subclass of UnixCCompiler that handles the Cygwin port of the GNU C compiler to Windows. It also contains the Mingw32CCompiler class which handles the mingw32 port of GCC (same as cygwin in no-cygwin mode). """ # problems: # # * if you use a msvc com...
40.578818
79
0.597997
# --export-all-symbols because it doesn't worked reliable in some # see also http://starship.python.net/crew/kernr/mingw32/Notes.html # * mingw32 gcc 2.95.2/ld 2.9.4/dllwrap 0.2.4 works # (ld doesn't support -shared, so we use dllwrap) # see also http://sources.redhat.com/ml/cygwin/2000...
true
true
1c3699abd03c5d1dd5affb0ed50c17ce47d6c208
914
py
Python
userbot/modules/fun/scramble.py
ZJRDroid/PaperplaneRemix
b41dffad17cce076f174a3fb36f0aeba1177cefa
[ "MIT" ]
null
null
null
userbot/modules/fun/scramble.py
ZJRDroid/PaperplaneRemix
b41dffad17cce076f174a3fb36f0aeba1177cefa
[ "MIT" ]
null
null
null
userbot/modules/fun/scramble.py
ZJRDroid/PaperplaneRemix
b41dffad17cce076f174a3fb36f0aeba1177cefa
[ "MIT" ]
1
2019-12-21T03:44:42.000Z
2019-12-21T03:44:42.000Z
import random import re from ..help import add_help_item from userbot.events import register @register(outgoing=True, pattern=r"^\.scramble(\s+[\S\s]+|$)") async def scramble_message(e): reply_message = await e.get_reply_message() text = e.pattern_match.group(1) or reply_message.text words = re.split(r"\...
21.761905
63
0.650985
import random import re from ..help import add_help_item from userbot.events import register @register(outgoing=True, pattern=r"^\.scramble(\s+[\S\s]+|$)") async def scramble_message(e): reply_message = await e.get_reply_message() text = e.pattern_match.group(1) or reply_message.text words = re.split(r"\...
true
true
1c369ad7655b31ef6a1806353fd7ab1425ed1954
8,191
py
Python
lofarimaging/lofarimaging.py
lofar-astron/lofarimaging
9672b52bb9be8f3405e6e3f85701175bdc4bf211
[ "Apache-2.0" ]
5
2020-03-14T02:48:38.000Z
2022-02-18T12:19:22.000Z
lofarimaging/lofarimaging.py
lofar-astron/lofarimaging
9672b52bb9be8f3405e6e3f85701175bdc4bf211
[ "Apache-2.0" ]
1
2020-06-16T15:55:50.000Z
2020-06-16T15:55:50.000Z
lofarimaging/lofarimaging.py
lofar-astron/lofarimaging
9672b52bb9be8f3405e6e3f85701175bdc4bf211
[ "Apache-2.0" ]
3
2020-03-13T20:13:02.000Z
2020-10-08T07:36:51.000Z
"""Functions for working with LOFAR single station data""" from typing import Dict, List import numpy as np from numpy.linalg import norm, lstsq import numexpr as ne import numba from astropy.coordinates import SkyCoord, SkyOffsetFrame, CartesianRepresentation __all__ = ["nearfield_imager", "sky_imager", "ground_ima...
38.455399
116
0.636308
from typing import Dict, List import numpy as np from numpy.linalg import norm, lstsq import numexpr as ne import numba from astropy.coordinates import SkyCoord, SkyOffsetFrame, CartesianRepresentation __all__ = ["nearfield_imager", "sky_imager", "ground_imager", "skycoord_to_lmn", "calibrate", "simulate_sky_source"...
true
true
1c369b2ba4f2284a15f4bc84084547d05fa280f0
799
py
Python
atom/nucleus/python/test/test_cash.py
sumit4-ttn/SDK
b3ae385e5415e47ac70abd0b3fdeeaeee9aa7cff
[ "Apache-2.0" ]
null
null
null
atom/nucleus/python/test/test_cash.py
sumit4-ttn/SDK
b3ae385e5415e47ac70abd0b3fdeeaeee9aa7cff
[ "Apache-2.0" ]
null
null
null
atom/nucleus/python/test/test_cash.py
sumit4-ttn/SDK
b3ae385e5415e47ac70abd0b3fdeeaeee9aa7cff
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Hydrogen Atom API The Hydrogen Atom API # noqa: E501 OpenAPI spec version: 1.7.0 Contact: info@hydrogenplatform.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import nucleus_api from nucleus_...
19.487805
79
0.670839
from __future__ import absolute_import import unittest import nucleus_api from nucleus_api.models.cash import Cash from nucleus_api.rest import ApiException class TestCash(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def testCash(self): s ...
true
true
1c369bd018d66ebfeb25445a3c74ee8298cf1795
3,947
bzl
Python
kustomization.bzl
nateinaction/rules_kustomize
8fdb286e69216a979e432c5f2166426a390dd92e
[ "Apache-2.0" ]
null
null
null
kustomization.bzl
nateinaction/rules_kustomize
8fdb286e69216a979e432c5f2166426a390dd92e
[ "Apache-2.0" ]
null
null
null
kustomization.bzl
nateinaction/rules_kustomize
8fdb286e69216a979e432c5f2166426a390dd92e
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 BenchSci Analytics Inc. # Copyright 2021 Nate Gay # # 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 a...
37.235849
229
0.636686
load("@bazel_skylib//lib:dicts.bzl", "dicts") load("@bazel_skylib//lib:paths.bzl", "paths") load("@bazel_skylib//lib:shell.bzl", "shell") load("//:kustomize_image.bzl", "ImageInfo") def _impl(ctx): unhydrated_file = ctx.actions.declare_file('new/{}-unhydrated.yaml'.format(ctx.attr.name)) u...
true
true
1c369e2a0d2e5bc13e9fb4d88242336baf419780
644
py
Python
examples/train-1.py
SINeWang/magpie
4c6d806969795a2d5fc52645fced08adaf686959
[ "MIT" ]
null
null
null
examples/train-1.py
SINeWang/magpie
4c6d806969795a2d5fc52645fced08adaf686959
[ "MIT" ]
null
null
null
examples/train-1.py
SINeWang/magpie
4c6d806969795a2d5fc52645fced08adaf686959
[ "MIT" ]
null
null
null
import os import sys sys.path.append(os.path.realpath(os.getcwd())) sys.path.append("..") from magpie import Magpie magpie = Magpie() magpie.train_word2vec('../data/hep-categories', vec_dim=3) #训练一个word2vec magpie.fit_scaler('../data/hep-categories') #生成scaler magpie.init_word_vectors('../data/hep-categories', vec_d...
33.894737
92
0.746894
import os import sys sys.path.append(os.path.realpath(os.getcwd())) sys.path.append("..") from magpie import Magpie magpie = Magpie() magpie.train_word2vec('../data/hep-categories', vec_dim=3) magpie.fit_scaler('../data/hep-categories') magpie.init_word_vectors('../data/hep-categories', vec_dim=3) labels = ['军事',...
true
true
1c369e5832adc50f438c555f56dfcb9a9431f342
5,501
py
Python
solvers/generation_solver/img_interface.py
Anthony102899/Lego-ImageGenerator
52b19c8bb20f77a3394675e7c037c943a50c1e15
[ "Unlicense" ]
1
2022-03-20T10:23:38.000Z
2022-03-20T10:23:38.000Z
solvers/generation_solver/img_interface.py
Anthony102899/Lego-ImageGenerator
52b19c8bb20f77a3394675e7c037c943a50c1e15
[ "Unlicense" ]
null
null
null
solvers/generation_solver/img_interface.py
Anthony102899/Lego-ImageGenerator
52b19c8bb20f77a3394675e7c037c943a50c1e15
[ "Unlicense" ]
null
null
null
import os from tkinter import * import tkinter.filedialog as tkfd from PIL import Image import numpy as np import solvers.generation_solver.image_seperation as IS def layer_interface(img_num): layer_names = [] layer_nums = [] for k in range(img_num): master = Toplevel() master.title(f"Imag...
42.315385
158
0.616797
import os from tkinter import * import tkinter.filedialog as tkfd from PIL import Image import numpy as np import solvers.generation_solver.image_seperation as IS def layer_interface(img_num): layer_names = [] layer_nums = [] for k in range(img_num): master = Toplevel() master.title(f"Imag...
true
true
1c369e6b83847416415f729c831355feb66a9dc4
809
py
Python
tests/test_cli.py
gfogwill/dmps
d92826dbd37a363b01ea7a287edd56ae88326364
[ "MIT" ]
null
null
null
tests/test_cli.py
gfogwill/dmps
d92826dbd37a363b01ea7a287edd56ae88326364
[ "MIT" ]
null
null
null
tests/test_cli.py
gfogwill/dmps
d92826dbd37a363b01ea7a287edd56ae88326364
[ "MIT" ]
null
null
null
import unittest from click.testing import CliRunner from src import __version__ as version from src.cli import cli class TestCLI(unittest.TestCase): def test_cli(self): """Run `dmps` without arguments.""" result = CliRunner().invoke(cli, []) assert result.exit_code == 0 assert "...
24.515152
67
0.641533
import unittest from click.testing import CliRunner from src import __version__ as version from src.cli import cli class TestCLI(unittest.TestCase): def test_cli(self): result = CliRunner().invoke(cli, []) assert result.exit_code == 0 assert "dmps" in result.output def test_print_v...
true
true
1c36a014dfc6dfdd8d2a673bfeb4c459ddd8bbc3
3,897
py
Python
sensebert.py
AI21Labs/sense-bert
32773c4da8ba23674978170598498fe0239ddb1a
[ "Apache-2.0" ]
30
2020-07-13T17:29:48.000Z
2022-03-29T12:20:55.000Z
sensebert.py
AI21Labs/sense-bert
32773c4da8ba23674978170598498fe0239ddb1a
[ "Apache-2.0" ]
8
2020-09-25T04:27:20.000Z
2022-02-10T02:00:41.000Z
sensebert.py
AI21Labs/sense-bert
32773c4da8ba23674978170598498fe0239ddb1a
[ "Apache-2.0" ]
8
2020-07-30T10:51:19.000Z
2022-02-01T19:35:10.000Z
import os from collections import namedtuple import tensorflow as tf from tokenization import FullTokenizer _SenseBertGraph = namedtuple( 'SenseBertGraph', ('input_ids', 'input_mask', 'contextualized_embeddings', 'mlm_logits', 'supersense_losits') ) _MODEL_PATHS = { 'sensebert-base-uncased': 'gs://ai21-p...
41.457447
119
0.702335
import os from collections import namedtuple import tensorflow as tf from tokenization import FullTokenizer _SenseBertGraph = namedtuple( 'SenseBertGraph', ('input_ids', 'input_mask', 'contextualized_embeddings', 'mlm_logits', 'supersense_losits') ) _MODEL_PATHS = { 'sensebert-base-uncased': 'gs://ai21-p...
true
true
1c36a09dcf51bbbc1af03c87491000f450456c13
1,365
py
Python
rptk/format/jsonf.py
wolcomm/rptk
fe6c1b597741ff14e4c89519458bb0950f0aa955
[ "Apache-2.0" ]
15
2017-11-30T01:28:11.000Z
2021-08-12T09:17:36.000Z
rptk/format/jsonf.py
wolcomm/rptk
fe6c1b597741ff14e4c89519458bb0950f0aa955
[ "Apache-2.0" ]
71
2018-06-22T09:54:50.000Z
2020-10-21T07:10:54.000Z
rptk/format/jsonf.py
wolcomm/rptk
fe6c1b597741ff14e4c89519458bb0950f0aa955
[ "Apache-2.0" ]
2
2019-08-31T20:45:19.000Z
2019-10-02T18:26:58.000Z
# Copyright (c) 2018 Workonline Communications (Pty) Ltd. All rights reserved. # # The contents of this file are licensed under the Apache License version 2.0 # (the "License"); you may not use this file except in compliance with the # License. # # Unless required by applicable law or agreed to in writing, software # d...
34.125
79
0.711355
from __future__ import print_function from __future__ import unicode_literals import json from rptk.format import BaseFormat class JsonFormat(BaseFormat): description = "JSON object" content_type = "application/json" def format(self, result=None): self.log_method_enter(method=self....
true
true
1c36a126d10813046b4b085fc65220a3114442db
4,202
py
Python
server/api/covid_data_handler.py
will-riddy/Covid-Dashboard
f54b1e39435de59366163e5ffe394b47c86fd67a
[ "MIT" ]
null
null
null
server/api/covid_data_handler.py
will-riddy/Covid-Dashboard
f54b1e39435de59366163e5ffe394b47c86fd67a
[ "MIT" ]
null
null
null
server/api/covid_data_handler.py
will-riddy/Covid-Dashboard
f54b1e39435de59366163e5ffe394b47c86fd67a
[ "MIT" ]
null
null
null
'''Peforms all data handling for the covid data''' import csv, os from uk_covid19 import Cov19API from requests.exceptions import ConnectionError LOCATION = os.environ['LOCATION'] LOCATION_TYPE = os.environ['LOCATION_TYPE'] NATION = os.environ['NATION'] def parse_csv_data(csv_file : str) -> list: ''...
32.323077
119
0.652546
import csv, os from uk_covid19 import Cov19API from requests.exceptions import ConnectionError LOCATION = os.environ['LOCATION'] LOCATION_TYPE = os.environ['LOCATION_TYPE'] NATION = os.environ['NATION'] def parse_csv_data(csv_file : str) -> list: csv_list = [] with open(csv_file, 'r') as data:...
true
true
1c36a1fefd2e1a9dfc70b3a72627449bab62991e
5,970
py
Python
pyepal/models/nt.py
kjappelbaum/pyepal
fde3172e2d0e945f4e63a0289f049285730b5f27
[ "Apache-2.0" ]
22
2020-11-06T00:00:06.000Z
2022-02-17T15:42:19.000Z
pyepal/models/nt.py
kjappelbaum/pyepal
fde3172e2d0e945f4e63a0289f049285730b5f27
[ "Apache-2.0" ]
93
2020-11-03T20:19:46.000Z
2022-03-04T17:23:29.000Z
pyepal/models/nt.py
kjappelbaum/pypal
006be9440c3fcff223b1b2a3f98222d732c60a48
[ "Apache-2.0" ]
1
2021-06-01T03:37:39.000Z
2021-06-01T03:37:39.000Z
# -*- coding: utf-8 -*- # Copyright 2020 PyePAL authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
35.535714
88
0.691625
from dataclasses import dataclass from typing import Callable, Sequence, Union @dataclass class NTModel: init_fn: Callable apply_fn: Callable kernel_fn: Callable predict_fn: Union[Callable, None] = None scaler: Union[Callable, None] = None params: Union[list, ...
true
true
1c36a49acd778e78ca83a11411df2ce5a0a7fbb2
137
py
Python
dev/local/data/all.py
nareshr8/fastai_docs
c34bf4e0fe296cb4ff8410dea3895c0ad2f6fe93
[ "Apache-2.0" ]
null
null
null
dev/local/data/all.py
nareshr8/fastai_docs
c34bf4e0fe296cb4ff8410dea3895c0ad2f6fe93
[ "Apache-2.0" ]
null
null
null
dev/local/data/all.py
nareshr8/fastai_docs
c34bf4e0fe296cb4ff8410dea3895c0ad2f6fe93
[ "Apache-2.0" ]
null
null
null
from .block import * from .core import * from .external import * from .pipeline import * from .source import * from .transform import *
17.125
24
0.729927
from .block import * from .core import * from .external import * from .pipeline import * from .source import * from .transform import *
true
true
1c36a514cf27aa40d3e040e745c93484f44d8225
1,520
py
Python
Examples/sin_approximation.py
martinferianc/WineClassification-EIE3
f84e3a57dff336f03aa8358102977f0e936be06c
[ "MIT" ]
5
2018-07-12T11:58:35.000Z
2019-08-20T11:18:00.000Z
Examples/sin_approximation.py
fexter-svk/WineClassification-EIE3
f84e3a57dff336f03aa8358102977f0e936be06c
[ "MIT" ]
null
null
null
Examples/sin_approximation.py
fexter-svk/WineClassification-EIE3
f84e3a57dff336f03aa8358102977f0e936be06c
[ "MIT" ]
null
null
null
import numpy as np import random import matplotlib.pyplot as plt def gradient_descent(X,Y,lr, max_iter=1000, sc=0.001): W = np.ones(X.shape[1]) i = 0 previous_loss = 0 current_loss = -1 while i<max_iter and abs(previous_loss-current_loss)>0.001: h = np.dot(X,W) loss = h-Y c...
25.762712
115
0.594737
import numpy as np import random import matplotlib.pyplot as plt def gradient_descent(X,Y,lr, max_iter=1000, sc=0.001): W = np.ones(X.shape[1]) i = 0 previous_loss = 0 current_loss = -1 while i<max_iter and abs(previous_loss-current_loss)>0.001: h = np.dot(X,W) loss = h-Y c...
true
true
1c36a53e68b3b6ebb0e99c1bfcedccd2007599d3
995
py
Python
tests/test_utils.py
pasztorpisti/django-universal-view-decorator
95824b5d1ecd405b00d7845fde6e707a40e10752
[ "MIT" ]
1
2016-10-16T00:04:04.000Z
2016-10-16T00:04:04.000Z
tests/test_utils.py
pasztorpisti/django-universal-view-decorator
95824b5d1ecd405b00d7845fde6e707a40e10752
[ "MIT" ]
3
2019-10-02T15:10:15.000Z
2020-06-05T16:40:01.000Z
tests/test_utils.py
pasztorpisti/django-universal-view-decorator
95824b5d1ecd405b00d7845fde6e707a40e10752
[ "MIT" ]
null
null
null
from django.test import TestCase from django_universal_view_decorator.utils import class_property class TestClassProperty(TestCase): class MyClass(object): @class_property def my_class_property(cls): return cls, 'class_property' def test_with_class(self): self.assertEqual(...
36.851852
120
0.724623
from django.test import TestCase from django_universal_view_decorator.utils import class_property class TestClassProperty(TestCase): class MyClass(object): @class_property def my_class_property(cls): return cls, 'class_property' def test_with_class(self): self.assertEqual(...
true
true
1c36a798314b7c91602a2684e93d6013332e384a
30,398
py
Python
galaxy/main/models.py
tima/galaxy
b371b973e0e9150f3e8b9b08068828b092982f62
[ "Apache-2.0" ]
null
null
null
galaxy/main/models.py
tima/galaxy
b371b973e0e9150f3e8b9b08068828b092982f62
[ "Apache-2.0" ]
null
null
null
galaxy/main/models.py
tima/galaxy
b371b973e0e9150f3e8b9b08068828b092982f62
[ "Apache-2.0" ]
null
null
null
# (c) 2012-2018, Ansible by Red Hat # # This file is part of Ansible Galaxy # # Ansible Galaxy is free software: you can redistribute it and/or modify # it under the terms of the Apache License as published by # the Apache Software Foundation, either version 2 of the License, or # (at your option) any later version. # ...
27.509502
79
0.620797
import logging import operator import six from django.conf import settings from django.core.urlresolvers import reverse from django.db import models from django.forms.models import model_to_dict from django.contrib.postgres import fields as psql_fields from django.contrib.postgres import search as ps...
true
true
1c36a7cc6a3e744ace5fc5a8f768ead126374065
973
py
Python
codeforces/math数学/1300/515B传递快乐.py
yofn/pyacm
e573f8fdeea77513711f00c42f128795cbba65a6
[ "Apache-2.0" ]
null
null
null
codeforces/math数学/1300/515B传递快乐.py
yofn/pyacm
e573f8fdeea77513711f00c42f128795cbba65a6
[ "Apache-2.0" ]
null
null
null
codeforces/math数学/1300/515B传递快乐.py
yofn/pyacm
e573f8fdeea77513711f00c42f128795cbba65a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 #https://codeforces.com/problemset/problem/515/B #n个男孩,m个女孩; i天, i男孩和i女孩聚会, 有一人快乐另一人则也会变快乐 #问会不会都快乐! #可以暴力,但应该有更优雅的数学解 #Let g = greatest common divisor of n and m. #If i-th person is happy, then all people with number x satisfying x=i%g will become happy some day because of this person. #测试用例2有问...
30.40625
123
0.618705
def allHappy(ubl,ugl,n,m): if len(ubl)==0 or len(ugl)==0: return True gcd = lambda a,b: b if a%b==0 else gcd(b,a%b) g = gcd(n,m) hbl = [False]*g hgl = [False]*g for i in range(n): if i not in ubl: hbl[i%g] = True for i in range(m): if i not in ugl: ...
true
true
1c36aa262f4b224667ce0400b29a76ac90384539
3,572
py
Python
homeassistant/components/switch/rpi_gpio.py
evancohen/home-assistant
dafc0ced6b07025c03417d8e7a2c0133b4c622fc
[ "MIT" ]
14
2015-11-10T07:57:43.000Z
2021-08-29T13:45:26.000Z
homeassistant/components/switch/rpi_gpio.py
evancohen/home-assistant
dafc0ced6b07025c03417d8e7a2c0133b4c622fc
[ "MIT" ]
null
null
null
homeassistant/components/switch/rpi_gpio.py
evancohen/home-assistant
dafc0ced6b07025c03417d8e7a2c0133b4c622fc
[ "MIT" ]
8
2015-11-14T16:40:41.000Z
2020-02-17T19:48:08.000Z
""" homeassistant.components.switch.rpi_gpio ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Allows to control the GPIO pins of a Raspberry Pi. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/switch.rpi_gpio/ """ import logging try: import RPi.GPIO as GPIO e...
30.529915
74
0.632139
import logging try: import RPi.GPIO as GPIO except ImportError: GPIO = None from homeassistant.helpers.entity import ToggleEntity from homeassistant.const import (DEVICE_DEFAULT_NAME, EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP) DEFAULT_...
true
true
1c36aaf57102eb4bc951dd2537e2e3a9e177c6de
3,417
py
Python
redash/query_runner/phoenix.py
frextrite/redash
74beed80d20d858b51b5560e7984b20d5d2c874e
[ "BSD-2-Clause" ]
3
2018-06-01T00:05:18.000Z
2019-03-07T14:03:10.000Z
redash/query_runner/phoenix.py
frextrite/redash
74beed80d20d858b51b5560e7984b20d5d2c874e
[ "BSD-2-Clause" ]
10
2017-10-17T09:17:53.000Z
2019-12-05T07:13:41.000Z
redash/query_runner/phoenix.py
tradingfoe/redash-clone
94065b8dce0e27f6f40a7adc2b99e078b03115b3
[ "BSD-2-Clause" ]
5
2018-06-02T11:12:44.000Z
2020-05-13T18:34:33.000Z
from redash.query_runner import * from redash.utils import json_dumps, json_loads import logging logger = logging.getLogger(__name__) try: import phoenixdb from phoenixdb.errors import * enabled = True except ImportError: enabled = False TYPES_MAPPING = { 'VARCHAR': TYPE_STRING, 'CHAR': TYPE...
27.556452
106
0.586479
from redash.query_runner import * from redash.utils import json_dumps, json_loads import logging logger = logging.getLogger(__name__) try: import phoenixdb from phoenixdb.errors import * enabled = True except ImportError: enabled = False TYPES_MAPPING = { 'VARCHAR': TYPE_STRING, 'CHAR': TYPE...
true
true
1c36ab81488993d0dfe0b53b52871458f047b937
952
py
Python
Fusion_mechanism_analysis/nanopre_reads_analysis/scripts/get_huiwen.1.py
YinYuan-001/muntjac_code
a376cc95ad548903f047a0e169c06eed1e757c9b
[ "MIT" ]
2
2021-12-02T07:01:21.000Z
2022-03-04T08:27:05.000Z
Fusion_mechanism_analysis/nanopre_reads_analysis/scripts/get_huiwen.1.py
YinYuan-001/muntjac_code
a376cc95ad548903f047a0e169c06eed1e757c9b
[ "MIT" ]
2
2021-12-08T03:11:30.000Z
2022-03-22T07:47:20.000Z
Fusion_mechanism_analysis/nanopre_reads_analysis/scripts/get_huiwen.1.py
YinYuan-001/muntjac_code
a376cc95ad548903f047a0e169c06eed1e757c9b
[ "MIT" ]
5
2021-09-10T08:00:11.000Z
2021-12-08T11:40:58.000Z
#!/bin/env python import click @click.command() @click.option('--filehuiwen') @click.option('--filesize') @click.option('--fileout') def main(filehuiwen,filesize,fileout): file_out=open(fileout,'w') Size={} with open(filesize,'r') as file_size: for line in file_size: Line=line.strip()...
26.444444
45
0.483193
import click @click.command() @click.option('--filehuiwen') @click.option('--filesize') @click.option('--fileout') def main(filehuiwen,filesize,fileout): file_out=open(fileout,'w') Size={} with open(filesize,'r') as file_size: for line in file_size: Line=line.strip().split() ...
true
true
1c36aba3ab9d1f8671ab3bc8bd4d782854a69e0c
5,620
py
Python
variational_approximation.py
ChriPiv/stinespring-algo-paper
d61cf46c302c511286280e5de2b22d01284a4379
[ "Apache-2.0" ]
null
null
null
variational_approximation.py
ChriPiv/stinespring-algo-paper
d61cf46c302c511286280e5de2b22d01284a4379
[ "Apache-2.0" ]
null
null
null
variational_approximation.py
ChriPiv/stinespring-algo-paper
d61cf46c302c511286280e5de2b22d01284a4379
[ "Apache-2.0" ]
1
2021-11-29T10:02:13.000Z
2021-11-29T10:02:13.000Z
# (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative works of this code must retain this...
34.691358
92
0.614591
import autograd import autograd.numpy as np from scipy.optimize import minimize from qiskit import * from qiskit.quantum_info import * from qiskit.aqua.components.variational_forms import * from qiskit.providers.aer.noise import NoiseModel from qiskit.providers.aer.utils import insert_noise from json_tools i...
true
true
1c36ac95392a6b69caa1a0765d5a588d36a63e66
40,724
py
Python
suppressreflections.py
deapplegate/wtgpipeline
9693e8562022cc97bf5a96427e22965e1a5e8497
[ "MIT" ]
1
2019-03-15T04:01:19.000Z
2019-03-15T04:01:19.000Z
suppressreflections.py
deapplegate/wtgpipeline
9693e8562022cc97bf5a96427e22965e1a5e8497
[ "MIT" ]
5
2017-12-11T00:11:39.000Z
2021-07-09T17:05:16.000Z
suppressreflections.py
deapplegate/wtgpipeline
9693e8562022cc97bf5a96427e22965e1a5e8497
[ "MIT" ]
2
2017-08-15T21:19:11.000Z
2017-10-12T00:36:35.000Z
#!/usr/bin/env python ####################### ''' suppressreflections.py regiondir image1 image2 image3... Given the locations of reflection rings around stars, this module removes and masks reflections and rings. Each image needs a weight and flag file. Star reflections are marked by ds9 circle regions. Stars are ...
31.495746
141
0.567601
le regions. Stars are seperated by a non-circle region in the file. ''' range(0, len(rings)-1): select = np.logical_and(mask == 0,np.logical_and(dRs[i] > rings[i].r + buffer, dRs[i+1] < rings[i+1].r - buffer)) dr = dRs[i][select] if dr...
false
true
1c36af0a058b3d5579d85d6ce82a3a620835b8e8
16,775
py
Python
ComedyParser/ComedyParser.py
minoskt/ComedyParser
b7cf5b4be7b63ebae3e0e1f4ce316475793abb37
[ "MIT" ]
2
2019-06-11T21:09:38.000Z
2020-09-10T12:06:07.000Z
ComedyParser/ComedyParser.py
minoskt/ComedyParser
b7cf5b4be7b63ebae3e0e1f4ce316475793abb37
[ "MIT" ]
1
2019-06-18T12:24:36.000Z
2019-08-01T15:06:26.000Z
ComedyParser/ComedyParser.py
minoskt/ComedyParser
b7cf5b4be7b63ebae3e0e1f4ce316475793abb37
[ "MIT" ]
null
null
null
import sys import time import threading from Comedy import Comedy from Communication import CommunicationModule from AudienceAnalyser import AudienceAnalyser from datetime import datetime from datetime import timedelta from FileLogger import FileLogger # audience size expectedPeople = 45 # wait time for a respons...
29.429825
98
0.540984
import sys import time import threading from Comedy import Comedy from Communication import CommunicationModule from AudienceAnalyser import AudienceAnalyser from datetime import datetime from datetime import timedelta from FileLogger import FileLogger expectedPeople = 45 response_wait_time = 1.5 max_laughter...
false
true
1c36afca34a6ce3ee5ed1be12d1cc4d387ca18cc
1,883
py
Python
sunimage2stl/makeMovie.py
nathanielcrosby/sunimage2stl
31858c46f48eb33afc3a4415292ce14b36b1e712
[ "MIT" ]
null
null
null
sunimage2stl/makeMovie.py
nathanielcrosby/sunimage2stl
31858c46f48eb33afc3a4415292ce14b36b1e712
[ "MIT" ]
null
null
null
sunimage2stl/makeMovie.py
nathanielcrosby/sunimage2stl
31858c46f48eb33afc3a4415292ce14b36b1e712
[ "MIT" ]
1
2019-09-20T16:18:21.000Z
2019-09-20T16:18:21.000Z
import matplotlib.pyplot as plt import os import imageio def make_movie(files, output, fps=10, **kwargs): ''' uses the imageio library to take the jpegs created before and save them to a string of images that is spaced at a certain interval (duration) Parameters: files : the array of all the images output ...
32.465517
96
0.654275
import matplotlib.pyplot as plt import os import imageio def make_movie(files, output, fps=10, **kwargs): duration = 1 / fps images = [] for filename in files: images.append(imageio.imread(filename)) imageio.mimsave(output, images, duration=duration) def rotanimate(ax, output, azim, elev, fps=10, width=1...
true
true
1c36b03186f332d5d13ef11c095479254a65b2eb
4,367
py
Python
contrib/devtools/logprint-scanner.py
leviathan-help/LVT-MasternodeCoin
201329113c9e7ab79c193abe262bdfba6b540885
[ "MIT" ]
1
2019-11-13T09:17:16.000Z
2019-11-13T09:17:16.000Z
contrib/devtools/logprint-scanner.py
leviathan-help/LVT-MasternodeCoin
201329113c9e7ab79c193abe262bdfba6b540885
[ "MIT" ]
null
null
null
contrib/devtools/logprint-scanner.py
leviathan-help/LVT-MasternodeCoin
201329113c9e7ab79c193abe262bdfba6b540885
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2017-2018 The LEVIATHAN developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import os, sys from subprocess import check_output def countRelevantCommas(line): openParensPosStack = ...
42.398058
167
0.568583
import os, sys from subprocess import check_output def countRelevantCommas(line): openParensPosStack = [] openParensPos = 0 charCounter = 0 numRelevantCommas = 0 firstOpenParensIndex = line.find("(") for char in line: if char == '(': openParensPosStack.append(charCount...
true
true
1c36b11ef5fe55e4444f81c0e88b3bf952295475
16,291
py
Python
locust/contrib/fasthttp.py
cultureamp/locust
0cb12d88f70d4505b8cc45a70a13354e1a3c4492
[ "MIT" ]
null
null
null
locust/contrib/fasthttp.py
cultureamp/locust
0cb12d88f70d4505b8cc45a70a13354e1a3c4492
[ "MIT" ]
null
null
null
locust/contrib/fasthttp.py
cultureamp/locust
0cb12d88f70d4505b8cc45a70a13354e1a3c4492
[ "MIT" ]
null
null
null
from __future__ import absolute_import import re import six import socket from base64 import b64encode from six.moves.urllib.parse import urlparse, urlunparse from ssl import SSLError from timeit import default_timer if six.PY2: from cookielib import CookieJar class ConnectionRefusedError(Exception): ...
40.932161
162
0.636118
from __future__ import absolute_import import re import six import socket from base64 import b64encode from six.moves.urllib.parse import urlparse, urlunparse from ssl import SSLError from timeit import default_timer if six.PY2: from cookielib import CookieJar class ConnectionRefusedError(Exception): ...
true
true
1c36b1a340344a5da1803cd31d2193cafcea85a6
5,197
py
Python
docs/tutorials/1 - Beginer - Plot ALBEDOs from Smarts.py
NREL/pySMARTS
83e702ed508eedcd8f6a6e11f2e640557f649dcd
[ "BSD-3-Clause" ]
5
2021-10-04T12:41:59.000Z
2022-01-07T04:47:14.000Z
docs/tutorials/1 - Beginer - Plot ALBEDOs from Smarts.py
NREL/py-SMARTS
83e702ed508eedcd8f6a6e11f2e640557f649dcd
[ "BSD-3-Clause" ]
3
2021-09-22T21:54:43.000Z
2021-09-28T17:14:35.000Z
docs/tutorials/1 - Beginer - Plot ALBEDOs from Smarts.py
NREL/pySMARTS
83e702ed508eedcd8f6a6e11f2e640557f649dcd
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # # 1 - Beginner - Plot Spectra and Albedos from SMARTS # # ##### Generate & Plot Spectra and Albedos from SMARTS # ###### &ensp;&ensp;&ensp;&ensp; * 1. DNI and DHI for a particular time and location # ###### &ensp;&ensp;&ensp;&ensp; * 2. Ground Albedo for various materials at AM...
19.537594
261
0.655186
true
true
1c36b1faf43655ad512765e901d3ca72bc22fca3
1,728
py
Python
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/tests/test_unicode_names.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
8
2019-10-07T16:33:47.000Z
2020-12-07T03:59:58.000Z
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/tests/test_unicode_names.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
1
2018-04-03T22:37:40.000Z
2018-04-03T23:53:43.000Z
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/tests/test_unicode_names.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
5
2020-08-27T20:44:18.000Z
2021-08-21T22:54:11.000Z
# -*- coding: utf-8 -*- from __future__ import print_function, absolute_import from numba import njit, cfunc, cgutils from numba.six import exec_ from numba.utils import PY2 from .support import TestCase, unittest unicode_name1 = u""" def unicode_name1(ಠ_ರೃ, ಠਊಠ): return (ಠ_ರೃ) + (ಠਊಠ) """ unicode_name2 = u"""...
25.411765
72
0.640046
from __future__ import print_function, absolute_import from numba import njit, cfunc, cgutils from numba.six import exec_ from numba.utils import PY2 from .support import TestCase, unittest unicode_name1 = u""" def unicode_name1(ಠ_ರೃ, ಠਊಠ): return (ಠ_ರೃ) + (ಠਊಠ) """ unicode_name2 = u""" def Ծ_Ծ(ಠ_ರೃ, ಠਊಠ): ...
true
true
1c36b2c3e75904f393dc23366b2de01f1cfbceac
312
py
Python
FatherSon/HelloWorld2_source_code/listing_8-5.py
axetang/AxePython
3b517fa3123ce2e939680ad1ae14f7e602d446a6
[ "Apache-2.0" ]
1
2019-01-04T05:47:50.000Z
2019-01-04T05:47:50.000Z
FatherSon/HelloWorld2_source_code/listing_8-5.py
axetang/AxePython
3b517fa3123ce2e939680ad1ae14f7e602d446a6
[ "Apache-2.0" ]
null
null
null
FatherSon/HelloWorld2_source_code/listing_8-5.py
axetang/AxePython
3b517fa3123ce2e939680ad1ae14f7e602d446a6
[ "Apache-2.0" ]
null
null
null
# Listing_8-5.py # Copyright Warren & Carter Sande, 2013 # Released under MIT license http://www.opensource.org/licenses/mit-license.php # Version $version ---------------------------- # Printing the 8 times table using range() for looper in range(1, 11): print looper, "times 8 =", looper * 8
31.2
82
0.625
for looper in range(1, 11): print looper, "times 8 =", looper * 8
false
true
1c36b2e967d5b6bf57c223c551285b333e5b2dd0
8,735
py
Python
release/stubs.min/System/Windows/Media/Animation_parts/MatrixKeyFrame.py
YKato521/ironpython-stubs
b1f7c580de48528490b3ee5791b04898be95a9ae
[ "MIT" ]
null
null
null
release/stubs.min/System/Windows/Media/Animation_parts/MatrixKeyFrame.py
YKato521/ironpython-stubs
b1f7c580de48528490b3ee5791b04898be95a9ae
[ "MIT" ]
null
null
null
release/stubs.min/System/Windows/Media/Animation_parts/MatrixKeyFrame.py
YKato521/ironpython-stubs
b1f7c580de48528490b3ee5791b04898be95a9ae
[ "MIT" ]
null
null
null
class MatrixKeyFrame(Freezable, ISealable, IKeyFrame): """ Abstract class that,when implemented,defines an animation segment with its own target value and interpolation method for a System.Windows.Media.Animation.MatrixAnimationUsingKeyFrames. """ def CloneCore(self, *args): """ CloneCore(self: ...
26.231231
221
0.687235
class MatrixKeyFrame(Freezable, ISealable, IKeyFrame): def CloneCore(self, *args): pass def CloneCurrentValueCore(self, *args): pass def CreateInstance(self, *args): pass def CreateInstanceCore(self, *args): pass def FreezeCore(self, *args): ...
true
true
1c36b38c2e0e0cd671d509a564456eee309b7cf3
587
py
Python
districts/migrations/0001_initial.py
Aniketh896/CovidSurveillance
54b358a3fc31f0dc64032cba0150253e11fdbbd9
[ "MIT" ]
5
2020-05-06T08:10:43.000Z
2021-05-26T18:55:57.000Z
districts/migrations/0001_initial.py
Aniketh896/CovidSurveillance
54b358a3fc31f0dc64032cba0150253e11fdbbd9
[ "MIT" ]
9
2020-05-18T14:01:50.000Z
2022-03-12T00:30:23.000Z
districts/migrations/0001_initial.py
Aniketh896/CovidSurveillance
54b358a3fc31f0dc64032cba0150253e11fdbbd9
[ "MIT" ]
6
2020-05-06T09:01:29.000Z
2021-05-20T15:25:30.000Z
# Generated by Django 3.0.6 on 2020-05-05 21:42 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='DistrictsModel', fields=[ ('id', models.Aut...
24.458333
114
0.55707
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='DistrictsModel', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, ser...
true
true
1c36b3adf05871417441451bc5d79cf3af372fe2
8,367
py
Python
PrecisionRecallTest.py
PerttuHamalainen/DRMM
1d7d52df95adee344516322700209f3a9f8147fb
[ "MIT" ]
5
2020-08-04T07:23:24.000Z
2021-12-02T21:01:03.000Z
PrecisionRecallTest.py
PerttuHamalainen/DRMM
1d7d52df95adee344516322700209f3a9f8147fb
[ "MIT" ]
9
2020-08-10T00:39:21.000Z
2022-03-12T00:43:59.000Z
PrecisionRecallTest.py
PerttuHamalainen/DRMM
1d7d52df95adee344516322700209f3a9f8147fb
[ "MIT" ]
null
null
null
import numpy as np import random import os import matplotlib.pyplot as pp #os.environ["CUDA_VISIBLE_DEVICES"]="-1" #disable Tensorflow GPU usage, these simple graphs run faster on CPU import tensorflow as tf import DRMM as DRMM from skimage.util import view_as_blocks from precision_recall import knn_precision_recall_f...
40.616505
226
0.668101
import numpy as np import random import os import matplotlib.pyplot as pp t view_as_blocks from precision_recall import knn_precision_recall_features import MocapUtils as mocap import argparse parser = argparse.ArgumentParser() parser.add_argument('--datasetIdx', type=int, default=1) parser.add_argument('--modelIdx', ...
true
true
1c36b528cd2bec19c416e69edd29c1a4915ee0be
5,891
py
Python
docs/source/content/example_notebooks/cantilever/model_static_cantilever.py
ACea15/sharpy
c89ecb74be3cb9e37b23ac8a282c73b9b55dd792
[ "BSD-3-Clause" ]
80
2018-08-30T13:01:52.000Z
2022-03-24T15:02:48.000Z
docs/source/content/example_notebooks/cantilever/model_static_cantilever.py
ACea15/sharpy
c89ecb74be3cb9e37b23ac8a282c73b9b55dd792
[ "BSD-3-Clause" ]
88
2018-05-17T16:18:58.000Z
2022-03-11T21:05:48.000Z
docs/source/content/example_notebooks/cantilever/model_static_cantilever.py
ACea15/sharpy
c89ecb74be3cb9e37b23ac8a282c73b9b55dd792
[ "BSD-3-Clause" ]
44
2018-01-02T14:27:28.000Z
2022-03-12T13:49:36.000Z
import h5py as h5 import numpy as np import os def clean_test_files(route, case_name): fem_file_name = route + '/' + case_name + '.fem.h5' if os.path.isfile(fem_file_name): os.remove(fem_file_name) solver_file_name = route + '/' + case_name + '.sharpy' if os.path.isfile(solver_file_name): ...
38.503268
103
0.604312
import h5py as h5 import numpy as np import os def clean_test_files(route, case_name): fem_file_name = route + '/' + case_name + '.fem.h5' if os.path.isfile(fem_file_name): os.remove(fem_file_name) solver_file_name = route + '/' + case_name + '.sharpy' if os.path.isfile(solver_file_name): ...
true
true
1c36b5d77d327254097737fe7e632bce94d69f33
498
py
Python
src/openprocurement/tender/cfaua/models/submodels/cancellation.py
pontostroy/api
5afdd3a62a8e562cf77e2d963d88f1a26613d16a
[ "Apache-2.0" ]
10
2020-02-18T01:56:21.000Z
2022-03-28T00:32:57.000Z
src/openprocurement/tender/cfaua/models/submodels/cancellation.py
pontostroy/api
5afdd3a62a8e562cf77e2d963d88f1a26613d16a
[ "Apache-2.0" ]
26
2018-07-16T09:30:44.000Z
2021-02-02T17:51:30.000Z
src/openprocurement/tender/cfaua/models/submodels/cancellation.py
pontostroy/api
5afdd3a62a8e562cf77e2d963d88f1a26613d16a
[ "Apache-2.0" ]
15
2019-08-08T10:50:47.000Z
2022-02-05T14:13:36.000Z
from openprocurement.api.models import ListType from openprocurement.api.roles import RolesFromCsv from openprocurement.tender.core.models import EUDocument from openprocurement.tender.openua.models import Cancellation as BaseCancellation from schematics.types.compound import ModelType class Cancellation(BaseCancell...
35.571429
81
0.819277
from openprocurement.api.models import ListType from openprocurement.api.roles import RolesFromCsv from openprocurement.tender.core.models import EUDocument from openprocurement.tender.openua.models import Cancellation as BaseCancellation from schematics.types.compound import ModelType class Cancellation(BaseCancell...
true
true