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
1c374b8bb42dcb373790b92d993e9916fdaac311
11,805
py
Python
CodeAnalysis/SourceMeter_Interface/SourceMeter-8.2.0-x64-linux/Python/Demo/ceilometer/ceilometer/tests/alarm/test_notifier.py
ishtjot/susereumutep
56e20c1777e0c938ac42bd8056f84af9e0b76e46
[ "Apache-2.0" ]
2
2018-11-07T20:52:53.000Z
2019-10-20T15:57:01.000Z
CodeAnalysis/SourceMeter_Interface/SourceMeter-8.2.0-x64-linux/Python/Demo/ceilometer/ceilometer/tests/alarm/test_notifier.py
ishtjot/susereumutep
56e20c1777e0c938ac42bd8056f84af9e0b76e46
[ "Apache-2.0" ]
3
2021-12-14T20:57:54.000Z
2022-01-21T23:50:36.000Z
CodeAnalysis/SourceMeter_Interface/SourceMeter-8.2.0-x64-linux/Python/Demo/ceilometer/ceilometer/tests/alarm/test_notifier.py
ishtjot/susereumutep
56e20c1777e0c938ac42bd8056f84af9e0b76e46
[ "Apache-2.0" ]
2
2018-11-16T04:20:06.000Z
2019-03-28T23:49:13.000Z
# # Copyright 2013-2014 eNovance # # Author: Julien Danjou <julien@danjou.info> # # 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 #...
45.057252
80
0.559085
import anyjson import mock from oslo.config import fixture as fixture_config from oslotest import mockpatch import requests import six.moves.urllib.parse as urlparse from ceilometer.alarm import service from ceilometer.openstack.common import context from ceilometer.tests import base as test...
true
true
1c374d160b1a7756eac4211a6e2f99baca4e1e95
4,253
py
Python
infer.py
Aleksa14/DeepRecommender
39716087ab18cfa7d42a042451b0b9bad7701359
[ "MIT" ]
1
2020-05-27T21:14:45.000Z
2020-05-27T21:14:45.000Z
infer.py
Aleksa14/DeepRecommender
39716087ab18cfa7d42a042451b0b9bad7701359
[ "MIT" ]
null
null
null
infer.py
Aleksa14/DeepRecommender
39716087ab18cfa7d42a042451b0b9bad7701359
[ "MIT" ]
null
null
null
# Copyright (c) 2017 NVIDIA Corporation import torch import argparse import copy from reco_encoder.data import input_layer from reco_encoder.model import model from torch.autograd import Variable from pathlib import Path parser = argparse.ArgumentParser(description='RecoEncoder') parser.add_argument('--drop_prob', ty...
44.768421
117
0.61486
import torch import argparse import copy from reco_encoder.data import input_layer from reco_encoder.model import model from torch.autograd import Variable from pathlib import Path parser = argparse.ArgumentParser(description='RecoEncoder') parser.add_argument('--drop_prob', type=float, default=0.0, metavar='N', ...
true
true
1c374d6ae3a88dac9c6729534d9d1bfafdca28de
90
py
Python
myauth/apps.py
dedol1/verauth_api
ca242abfdcc5296ca4c459e4e92c5dd313cd7160
[ "MIT" ]
null
null
null
myauth/apps.py
dedol1/verauth_api
ca242abfdcc5296ca4c459e4e92c5dd313cd7160
[ "MIT" ]
null
null
null
myauth/apps.py
dedol1/verauth_api
ca242abfdcc5296ca4c459e4e92c5dd313cd7160
[ "MIT" ]
1
2021-11-02T11:55:26.000Z
2021-11-02T11:55:26.000Z
from django.apps import AppConfig class AuthConfig(AppConfig): name = 'myauth'
15
34
0.7
from django.apps import AppConfig class AuthConfig(AppConfig): name = 'myauth'
true
true
1c374e31513a7c62f466af4a87dc098db92f3f28
147
py
Python
08-built-in/08-sys.py
ralexrivero/python_fundation
34a855db7380d3d91db6a8f02d97f287d038ef5f
[ "Apache-2.0" ]
1
2021-09-19T04:09:48.000Z
2021-09-19T04:09:48.000Z
08-built-in/08-sys.py
ralexrivero/python_fundation
34a855db7380d3d91db6a8f02d97f287d038ef5f
[ "Apache-2.0" ]
null
null
null
08-built-in/08-sys.py
ralexrivero/python_fundation
34a855db7380d3d91db6a8f02d97f287d038ef5f
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Execute ./filename argument1 argument2 import sys first = sys.argv[1] second = sys.argv[2] print(f"Hi {first} {second}")
18.375
40
0.707483
import sys first = sys.argv[1] second = sys.argv[2] print(f"Hi {first} {second}")
true
true
1c374e6a9426ed89d62da42b094b8f0e787764e6
7,359
py
Python
userbot/__init__.py
Neha1000000/userbot
3b88708da229f7d1e5163e64250b3cfde722dc6e
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/__init__.py
Neha1000000/userbot
3b88708da229f7d1e5163e64250b3cfde722dc6e
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/__init__.py
Neha1000000/userbot
3b88708da229f7d1e5163e64250b3cfde722dc6e
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.d (the "License"); # you may not use this file except in compliance with the License. # """ Userbot initialization. """ import os from sys import version_info from logging import basicConfig, getLogger, IN...
31.719828
143
0.718712
import os from sys import version_info from logging import basicConfig, getLogger, INFO, DEBUG from distutils.util import strtobool as sb from pylast import LastFMNetwork, md5 from pySmartDL import SmartDL from dotenv import load_dotenv from requests import get from telethon import TelegramClient from telethon....
true
true
1c375058d2ec067e74c6eede661ad706c1802e75
21,143
py
Python
src/ralph/scan/data.py
quamilek/ralph
bf7231ea096924332b874718b33cd1f43f9c783b
[ "Apache-2.0" ]
null
null
null
src/ralph/scan/data.py
quamilek/ralph
bf7231ea096924332b874718b33cd1f43f9c783b
[ "Apache-2.0" ]
null
null
null
src/ralph/scan/data.py
quamilek/ralph
bf7231ea096924332b874718b33cd1f43f9c783b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Translating between the device database model and the scan data. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from django.db import models as db from django.conf import settings f...
32.328746
78
0.516814
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from django.db import models as db from django.conf import settings from ralph.discovery.models_component import ( ComponentModel, ComponentType, DiskSha...
true
true
1c37509f13e11d36b9a9ac8d0e304095fd1cba3c
232
py
Python
python_modules/dagster/dagster/core/engine/engine_base.py
bambielli-flex/dagster
30b75ba7c62fc536bc827f177c1dc6ba20f5ae20
[ "Apache-2.0" ]
1
2019-07-15T17:34:04.000Z
2019-07-15T17:34:04.000Z
python_modules/dagster/dagster/core/engine/engine_base.py
bambielli-flex/dagster
30b75ba7c62fc536bc827f177c1dc6ba20f5ae20
[ "Apache-2.0" ]
null
null
null
python_modules/dagster/dagster/core/engine/engine_base.py
bambielli-flex/dagster
30b75ba7c62fc536bc827f177c1dc6ba20f5ae20
[ "Apache-2.0" ]
null
null
null
import abc import six class IEngine(six.with_metaclass(abc.ABCMeta)): # pylint: disable=no-init @staticmethod @abc.abstractmethod def execute(pipeline_context, execution_plan, step_keys_to_execute=None): pass
23.2
77
0.74569
import abc import six class IEngine(six.with_metaclass(abc.ABCMeta)): @staticmethod @abc.abstractmethod def execute(pipeline_context, execution_plan, step_keys_to_execute=None): pass
true
true
1c375280df1eca68f1c9b7ef13d8563c43f619fd
13,872
py
Python
projects/vdk-control-cli/src/vdk/internal/control/command_groups/job/deploy_cli_impl.py
vmware/versatile-data-kit
c4e10324a4f3203c58079cb18203880f68053f15
[ "Apache-2.0" ]
100
2021-10-04T09:32:04.000Z
2022-03-30T11:23:53.000Z
projects/vdk-control-cli/src/vdk/internal/control/command_groups/job/deploy_cli_impl.py
vmware/versatile-data-kit
c4e10324a4f3203c58079cb18203880f68053f15
[ "Apache-2.0" ]
208
2021-10-04T16:56:40.000Z
2022-03-31T10:41:44.000Z
projects/vdk-control-cli/src/vdk/internal/control/command_groups/job/deploy_cli_impl.py
vmware/versatile-data-kit
c4e10324a4f3203c58079cb18203880f68053f15
[ "Apache-2.0" ]
14
2021-10-11T14:15:13.000Z
2022-03-11T13:39:17.000Z
# Copyright 2021 VMware, Inc. # SPDX-License-Identifier: Apache-2.0 import glob import json import logging import os from typing import Optional import click import click_spinner from tabulate import tabulate from taurus_datajob_api import ApiException from taurus_datajob_api import DataJob from taurus_datajob_api imp...
43.760252
138
0.626081
import glob import json import logging import os from typing import Optional import click import click_spinner from tabulate import tabulate from taurus_datajob_api import ApiException from taurus_datajob_api import DataJob from taurus_datajob_api import DataJobConfig from taurus_datajob_api import DataJobContacts f...
true
true
1c3752a76d771bdb174957f32118bdb4672da833
6,471
py
Python
dapper/_core.py
markrwilliams/dapper
e18bc91d7b494437ef5946584b4d842dc03cb5d8
[ "MIT" ]
3
2016-12-14T08:55:47.000Z
2016-12-23T22:31:46.000Z
dapper/_core.py
markrwilliams/dapper
e18bc91d7b494437ef5946584b4d842dc03cb5d8
[ "MIT" ]
null
null
null
dapper/_core.py
markrwilliams/dapper
e18bc91d7b494437ef5946584b4d842dc03cb5d8
[ "MIT" ]
null
null
null
import attr import io import itertools import functools import struct _gen_id = functools.partial(next, itertools.count()) class Incomplete(Exception): """ Not enough data. """ @attr.s class ClaimableByteBuffer(object): _bio = attr.ib(default=attr.Factory(io.BytesIO)) _total = attr.ib(init=Fal...
26.412245
78
0.65214
import attr import io import itertools import functools import struct _gen_id = functools.partial(next, itertools.count()) class Incomplete(Exception): @attr.s class ClaimableByteBuffer(object): _bio = attr.ib(default=attr.Factory(io.BytesIO)) _total = attr.ib(init=False, default=0) _claimed = attr.ib...
true
true
1c3752c54c8dbbbee88f6d6a4aca79f6a3d3600f
18,042
py
Python
homeassistant/components/xiaomi_miio/switch.py
alindeman/home-assistant
b274b10f3874c196f0db8f9cfa5f47eb756d1f8e
[ "Apache-2.0" ]
4
2019-07-03T22:36:57.000Z
2019-08-10T15:33:25.000Z
homeassistant/components/xiaomi_miio/switch.py
alindeman/home-assistant
b274b10f3874c196f0db8f9cfa5f47eb756d1f8e
[ "Apache-2.0" ]
7
2019-08-23T05:26:02.000Z
2022-03-11T23:57:18.000Z
homeassistant/components/xiaomi_miio/switch.py
alindeman/home-assistant
b274b10f3874c196f0db8f9cfa5f47eb756d1f8e
[ "Apache-2.0" ]
2
2018-08-15T03:59:35.000Z
2018-10-18T12:20:05.000Z
"""Support for Xiaomi Smart WiFi Socket and Smart Power Strip.""" import asyncio from functools import partial import logging import voluptuous as vol from homeassistant.components.switch import ( DOMAIN, PLATFORM_SCHEMA, SwitchDevice) from homeassistant.const import ( ATTR_ENTITY_ID, CONF_HOST, CONF_NAME, CO...
33.723364
79
0.623046
import asyncio from functools import partial import logging import voluptuous as vol from homeassistant.components.switch import ( DOMAIN, PLATFORM_SCHEMA, SwitchDevice) from homeassistant.const import ( ATTR_ENTITY_ID, CONF_HOST, CONF_NAME, CONF_TOKEN) from homeassistant.exceptions import PlatformNotReady im...
true
true
1c3753e575e556df1bbc02d3d5873d36d3240a61
4,800
py
Python
icetray_version/trunk/python/llh_ratio_nd.py
hershalpandya/airshowerclassification_llhratio_test
a2a2ce5234c8f455fe56c332ab4fcc65008e9409
[ "MIT" ]
null
null
null
icetray_version/trunk/python/llh_ratio_nd.py
hershalpandya/airshowerclassification_llhratio_test
a2a2ce5234c8f455fe56c332ab4fcc65008e9409
[ "MIT" ]
7
2017-08-29T16:20:04.000Z
2018-06-12T16:58:36.000Z
icetray_version/trunk/python/llh_ratio_nd.py
hershalpandya/airshowerclassification_llhratio_test
a2a2ce5234c8f455fe56c332ab4fcc65008e9409
[ "MIT" ]
1
2018-04-03T20:56:40.000Z
2018-04-03T20:56:40.000Z
# -*- coding: utf-8 -*- # ## copyright (C) 2018 # The Icecube Collaboration # # $Id$ # # @version $Revision$ # @date $LastChangedDate$ # @author Hershal Pandya <hershal@udel.edu> Last changed by: $LastChangedBy$ # import numpy as np import copy def value_in_nborhood_new(heatmap,g_index,nborhd_size=1): ''' ...
35.036496
92
0.696458
as np import copy def value_in_nborhood_new(heatmap,g_index,nborhd_size=1): ''' return value of N-d histogram in the nborhood of g_index. nborhood defined by number of bins around g_index nborhd_size ''' slices=[] for dim in range(len(g_index)): slices.append(slice(g_index[dim]...
false
true
1c37540cc5870935640dc46567573fec3ea1c1e1
438
py
Python
anees/migrations/0032_auto_20200927_0511.py
ashish2020kashyap/cessini
9713fd76d2e31a95266ec69da2abc98424a46e52
[ "MIT" ]
null
null
null
anees/migrations/0032_auto_20200927_0511.py
ashish2020kashyap/cessini
9713fd76d2e31a95266ec69da2abc98424a46e52
[ "MIT" ]
null
null
null
anees/migrations/0032_auto_20200927_0511.py
ashish2020kashyap/cessini
9713fd76d2e31a95266ec69da2abc98424a46e52
[ "MIT" ]
null
null
null
# Generated by Django 3.1.1 on 2020-09-27 05:11 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('anees', '0031_auto_20200927_0401'), ] operations = [ migrations.RemoveField( model_name='campaign', name='mycustomer', ...
19.909091
47
0.56621
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('anees', '0031_auto_20200927_0401'), ] operations = [ migrations.RemoveField( model_name='campaign', name='mycustomer', ), migrations.RemoveField( ...
true
true
1c375696cd1d7fb1b8bc7e457af4d5fbd97e1a97
1,474
py
Python
.history/classes/Menu_20171107130940.py
reecebenson/DADSA-Tennis-PartA
d0763f819b300fcd0ce27041f5bc4ef0519c00bf
[ "MIT" ]
null
null
null
.history/classes/Menu_20171107130940.py
reecebenson/DADSA-Tennis-PartA
d0763f819b300fcd0ce27041f5bc4ef0519c00bf
[ "MIT" ]
null
null
null
.history/classes/Menu_20171107130940.py
reecebenson/DADSA-Tennis-PartA
d0763f819b300fcd0ce27041f5bc4ef0519c00bf
[ "MIT" ]
null
null
null
# DADSA - Assignment 1 # Reece Benson class Menu(): # Define the variables we will be using _app = None _menu = None _current_menu = [ 0 ] def __init__(self, app): # Set our Application self._app = app def load(self): # Define our Menu self.menu = { ...
24.983051
55
0.495251
class Menu(): _app = None _menu = None _current_menu = [ 0 ] def __init__(self, app): self._app = app def load(self): self.menu = { 'Item 1': { 'Sub Item 1': self.load_action, 'Sub Item 2': self.load_action ...
true
true
1c3756b3498489f11af3f11fbb569f02701ee7d2
1,413
py
Python
tests/test_param_count.py
DenXX/fvcore
4b91cf092f4f5d379b2c93398780a3b5755e7179
[ "Apache-2.0" ]
null
null
null
tests/test_param_count.py
DenXX/fvcore
4b91cf092f4f5d379b2c93398780a3b5755e7179
[ "Apache-2.0" ]
null
null
null
tests/test_param_count.py
DenXX/fvcore
4b91cf092f4f5d379b2c93398780a3b5755e7179
[ "Apache-2.0" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import unittest from torch import nn from fvcore.nn.parameter_count import parameter_count, parameter_count_table class NetWithReuse(nn.Module): def __init__(self, reuse: bool = False) -> None: super().__init__() self.conv1...
30.717391
76
0.635527
import unittest from torch import nn from fvcore.nn.parameter_count import parameter_count, parameter_count_table class NetWithReuse(nn.Module): def __init__(self, reuse: bool = False) -> None: super().__init__() self.conv1 = nn.Conv2d(100, 100, 3) self.conv2 = nn.Conv2d(100, 100, 3) ...
true
true
1c375718258e5aba8e221c8493b54ed4e2309394
4,848
py
Python
style_transfer/train.py
fredericgo/rl_morph_pytorch
743cd82d82c16c8d52e5265b6cc5cdf490cb8945
[ "MIT" ]
null
null
null
style_transfer/train.py
fredericgo/rl_morph_pytorch
743cd82d82c16c8d52e5265b6cc5cdf490cb8945
[ "MIT" ]
null
null
null
style_transfer/train.py
fredericgo/rl_morph_pytorch
743cd82d82c16c8d52e5265b6cc5cdf490cb8945
[ "MIT" ]
null
null
null
import argparse import datetime import gym import numpy as np import itertools import sys sys.path.insert(0, '..') from torch.utils.tensorboard import SummaryWriter import torch import torch.nn as nn from torch.nn import functional as F from torch.optim import Adam from torch.utils.data import DataLoader, ConcatData...
35.647059
89
0.669142
import argparse import datetime import gym import numpy as np import itertools import sys sys.path.insert(0, '..') from torch.utils.tensorboard import SummaryWriter import torch import torch.nn as nn from torch.nn import functional as F from torch.optim import Adam from torch.utils.data import DataLoader, ConcatData...
true
true
1c37572a567b9775579ee8e4f79a0542c64b9868
9,784
py
Python
optim/fd_optim_lbfgs_mod_distributed.py
slowlightx/peps-torch
3f94e2ac32e79cbdadf572c89e57ae8e17d4e012
[ "MIT" ]
33
2020-04-22T23:11:25.000Z
2022-03-27T09:11:29.000Z
optim/fd_optim_lbfgs_mod_distributed.py
jurajHasik/tn-torch
bc5068b2026e670a2795fc3fc060a3313bc1e3fb
[ "MIT" ]
4
2021-06-09T14:57:50.000Z
2021-11-29T14:46:08.000Z
optim/fd_optim_lbfgs_mod_distributed.py
jurajHasik/tn-torch
bc5068b2026e670a2795fc3fc060a3313bc1e3fb
[ "MIT" ]
8
2020-07-12T11:42:49.000Z
2022-02-09T07:34:23.000Z
import copy import time import json import logging log = logging.getLogger(__name__) import torch from optim import lbfgs_modified import config as cfg def store_checkpoint(checkpoint_file, state, optimizer, current_epoch, current_loss,\ verbosity=0): r""" :param checkpoint_file: target file :param sta...
44.072072
119
0.657093
import copy import time import json import logging log = logging.getLogger(__name__) import torch from optim import lbfgs_modified import config as cfg def store_checkpoint(checkpoint_file, state, optimizer, current_epoch, current_loss,\ verbosity=0): torch.save({ 'epoch': current_epoch, ...
true
true
1c37577a5f6a0f5b0a4b1b452367c16321d3926a
2,162
py
Python
chatterbox/migrations/0002_data.py
blitzagency/django-chatterbox
7bf17444f8308aa12b6718bd62ee1344021c21aa
[ "MIT" ]
8
2015-03-10T20:03:09.000Z
2018-06-14T23:03:58.000Z
chatterbox/migrations/0002_data.py
blitzagency/django-chatterbox
7bf17444f8308aa12b6718bd62ee1344021c21aa
[ "MIT" ]
3
2015-07-14T22:44:47.000Z
2020-06-05T23:43:05.000Z
chatterbox/migrations/0002_data.py
blitzagency/django-chatterbox
7bf17444f8308aa12b6718bd62ee1344021c21aa
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations def populate_collectors(apps): Service = apps.get_model('chatterbox', 'Service') Collector = apps.get_model('chatterbox', 'Collector') # Services fb = Service(label='Facebook', key='faceb...
28.077922
77
0.580019
from __future__ import unicode_literals from django.db import migrations def populate_collectors(apps): Service = apps.get_model('chatterbox', 'Service') Collector = apps.get_model('chatterbox', 'Collector') fb = Service(label='Facebook', key='facebook', driver='ch...
true
true
1c37579c0a84e141fc7080b5cf9806f91db521c0
598
py
Python
tests/gis_tests/inspectapp/models.py
imjvdn/scratch-game-1
5dffd79f17e0b66d3d2e57262749311aca28e850
[ "PSF-2.0", "BSD-3-Clause" ]
5,079
2015-01-01T03:39:46.000Z
2022-03-31T07:38:22.000Z
tests/gis_tests/inspectapp/models.py
imjvdn/scratch-game-1
5dffd79f17e0b66d3d2e57262749311aca28e850
[ "PSF-2.0", "BSD-3-Clause" ]
1,623
2015-01-01T08:06:24.000Z
2022-03-30T19:48:52.000Z
tests/gis_tests/inspectapp/models.py
imjvdn/scratch-game-1
5dffd79f17e0b66d3d2e57262749311aca28e850
[ "PSF-2.0", "BSD-3-Clause" ]
2,033
2015-01-04T07:18:02.000Z
2022-03-28T19:55:47.000Z
from django.contrib.gis.db import models class AllOGRFields(models.Model): f_decimal = models.FloatField() f_float = models.FloatField() f_int = models.IntegerField() f_char = models.CharField(max_length=10) f_date = models.DateField() f_datetime = models.DateTimeField() f_time = models.T...
27.181818
53
0.707358
from django.contrib.gis.db import models class AllOGRFields(models.Model): f_decimal = models.FloatField() f_float = models.FloatField() f_int = models.IntegerField() f_char = models.CharField(max_length=10) f_date = models.DateField() f_datetime = models.DateTimeField() f_time = models.T...
true
true
1c37589d145a5085b1d5059184b437797db2d06e
337
py
Python
mysite/myapp/migrations/0016_remove_gallerymodel_image.py
wiparraguirre/WI-Construction
22e3f5c615bffda6f9c1681d1ca00b0918362126
[ "MIT" ]
null
null
null
mysite/myapp/migrations/0016_remove_gallerymodel_image.py
wiparraguirre/WI-Construction
22e3f5c615bffda6f9c1681d1ca00b0918362126
[ "MIT" ]
null
null
null
mysite/myapp/migrations/0016_remove_gallerymodel_image.py
wiparraguirre/WI-Construction
22e3f5c615bffda6f9c1681d1ca00b0918362126
[ "MIT" ]
null
null
null
# Generated by Django 3.2.7 on 2022-05-18 04:31 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('myapp', '0015_alter_gallerymodel_image'), ] operations = [ migrations.RemoveField( model_name='gallerymodel', name='image', ...
18.722222
51
0.602374
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('myapp', '0015_alter_gallerymodel_image'), ] operations = [ migrations.RemoveField( model_name='gallerymodel', name='image', ), ]
true
true
1c37591beb7002f607bb4418787325b43a751b34
893
py
Python
setup.py
bbilly1/ryd-client
10b9b6f0fe0ba5d022375eed301f25ab51c31109
[ "MIT" ]
1
2021-12-24T19:46:02.000Z
2021-12-24T19:46:02.000Z
setup.py
bbilly1/ryd-client
10b9b6f0fe0ba5d022375eed301f25ab51c31109
[ "MIT" ]
null
null
null
setup.py
bbilly1/ryd-client
10b9b6f0fe0ba5d022375eed301f25ab51c31109
[ "MIT" ]
null
null
null
"""setup file with project metadata""" import setuptools with open("README_SHORT.md", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( name="ryd-client", version="0.0.3", author="Simon", author_email="simobilleter@gmail.com", description="api client for returnyoutu...
29.766667
70
0.662934
import setuptools with open("README_SHORT.md", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( name="ryd-client", version="0.0.3", author="Simon", author_email="simobilleter@gmail.com", description="api client for returnyoutubedislike.com", long_description=lo...
true
true
1c3759df5a38cc9eec92e29506b100742f627706
953
py
Python
Constellations/get_brightest_stars.py
PatD123/Polar-Constellation
86f54ae2028a4f351b9f1a056aa3166f49541679
[ "MIT" ]
null
null
null
Constellations/get_brightest_stars.py
PatD123/Polar-Constellation
86f54ae2028a4f351b9f1a056aa3166f49541679
[ "MIT" ]
null
null
null
Constellations/get_brightest_stars.py
PatD123/Polar-Constellation
86f54ae2028a4f351b9f1a056aa3166f49541679
[ "MIT" ]
null
null
null
from bs4 import BeautifulSoup as soup from urllib.request import urlopen as uReq import re, json # Getting the page URL = "https://www.astronomytrek.com/star-constellations-brightest-stars/" uClient = uReq(url=URL) page_html = uClient.read() page_soup = soup(page_html, "html.parser") # Opening a file to write in star...
27.228571
74
0.651626
from bs4 import BeautifulSoup as soup from urllib.request import urlopen as uReq import re, json URL = "https://www.astronomytrek.com/star-constellations-brightest-stars/" uClient = uReq(url=URL) page_html = uClient.read() page_soup = soup(page_html, "html.parser") stars_file = open("brightest_stars.txt", 'w') de...
true
true
1c375a895060c17d5bfde9430e870a0e67b39870
3,247
py
Python
parser.py
Anzurna/litels
a42bdea5839c2e35d49737310cb535a955b852a7
[ "MIT" ]
null
null
null
parser.py
Anzurna/litels
a42bdea5839c2e35d49737310cb535a955b852a7
[ "MIT" ]
null
null
null
parser.py
Anzurna/litels
a42bdea5839c2e35d49737310cb535a955b852a7
[ "MIT" ]
null
null
null
import gzip import json import io import re import mmap import os import warc import glob from pprint import pprint class Litels: def __init__(self): self.data = {} self.data["web_records"] = [] def extract_info(self, file, pattern): text = '' k = 0 with ...
40.08642
167
0.483523
import gzip import json import io import re import mmap import os import warc import glob from pprint import pprint class Litels: def __init__(self): self.data = {} self.data["web_records"] = [] def extract_info(self, file, pattern): text = '' k = 0 with ...
true
true
1c375b10601f89c806015c982e276e4293139232
138
py
Python
readBinary.py
bourneagain/pythonBytes
be115162147e52718aacbfb9cd2763aa02754f28
[ "MIT" ]
1
2017-05-29T02:02:27.000Z
2017-05-29T02:02:27.000Z
readBinary.py
bourneagain/pythonBytes
be115162147e52718aacbfb9cd2763aa02754f28
[ "MIT" ]
null
null
null
readBinary.py
bourneagain/pythonBytes
be115162147e52718aacbfb9cd2763aa02754f28
[ "MIT" ]
null
null
null
with open('/tmp/a.bin') as f: byte=f.read(1) while byte != "": byte=f.read(1) #print '{0:08b}'.format(ord(byte)), print byte,
17.25
38
0.565217
with open('/tmp/a.bin') as f: byte=f.read(1) while byte != "": byte=f.read(1) print byte,
false
true
1c375b252731acced1a231aa30744cea468d5502
3,876
py
Python
wunder.py
albymor/WunderPy
f111997570c943d80d7a2bb0a9e2604957eaf55f
[ "Apache-2.0" ]
null
null
null
wunder.py
albymor/WunderPy
f111997570c943d80d7a2bb0a9e2604957eaf55f
[ "Apache-2.0" ]
null
null
null
wunder.py
albymor/WunderPy
f111997570c943d80d7a2bb0a9e2604957eaf55f
[ "Apache-2.0" ]
null
null
null
# !/usr/bin/python # coding: utf-8 # Copyright 2017 Alberto Morato # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
29.363636
118
0.707688
from bs4 import BeautifulSoup as bs from optparse import OptionParser import requests import sys import re import json import ast reload(sys) sys.setdefaultencoding('utf-8') def get_page_content(id): page_content = requests.get('https://www.wunderground.com/personal-weather-station/dashboard?ID='...
false
true
1c375bb4f7bb541cc9dbfaf5556a99dd143fb8c9
19,110
py
Python
airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/streams.py
luizgribeiro/airbyte
71a96f5417b678c39b34e2e92234d8a51529e086
[ "MIT" ]
2
2021-08-04T03:17:38.000Z
2021-11-15T10:16:08.000Z
airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/streams.py
luizgribeiro/airbyte
71a96f5417b678c39b34e2e92234d8a51529e086
[ "MIT" ]
52
2021-06-11T12:39:05.000Z
2022-03-30T04:59:35.000Z
airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/streams.py
luizgribeiro/airbyte
71a96f5417b678c39b34e2e92234d8a51529e086
[ "MIT" ]
2
2021-12-14T17:15:40.000Z
2021-12-14T17:18:03.000Z
# # MIT License # # Copyright (c) 2020 Airbyte # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, pu...
39.647303
126
0.660858
import time import urllib.parse as urlparse from abc import ABC from collections import deque from datetime import datetime from typing import Any, Iterable, Iterator, List, Mapping, MutableMapping, Optional, Sequence import backoff import pendulum from airbyte_cdk.models import SyncMode from a...
true
true
1c375c2700db6553177987a2096c557093b61a2d
706
py
Python
google/ads/googleads/v6/services/services/hotel_performance_view_service/__init__.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
null
null
null
google/ads/googleads/v6/services/services/hotel_performance_view_service/__init__.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
null
null
null
google/ads/googleads/v6/services/services/hotel_performance_view_service/__init__.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
33.619048
74
0.760623
from .client import HotelPerformanceViewServiceClient __all__ = ("HotelPerformanceViewServiceClient",)
true
true
1c375ca98b8a2794402212dff0ce2cddb2d4c5cd
5,077
py
Python
perfkitbenchmarker/linux_packages/openmpi.py
Nowasky/PerfKitBenchmarker
cfa88e269eb373780910896ed4bdc8db09469753
[ "Apache-2.0" ]
3
2018-04-28T13:06:14.000Z
2020-06-09T02:39:44.000Z
perfkitbenchmarker/linux_packages/openmpi.py
Nowasky/PerfKitBenchmarker
cfa88e269eb373780910896ed4bdc8db09469753
[ "Apache-2.0" ]
1
2021-09-09T07:43:25.000Z
2021-09-09T10:47:56.000Z
perfkitbenchmarker/linux_packages/openmpi.py
Nowasky/PerfKitBenchmarker
cfa88e269eb373780910896ed4bdc8db09469753
[ "Apache-2.0" ]
6
2019-06-11T18:59:57.000Z
2021-03-02T19:14:42.000Z
# Copyright 2018 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
32.967532
79
0.694899
import posixpath import re from absl import flags from perfkitbenchmarker import linux_packages FLAGS = flags.FLAGS flags.DEFINE_string('openmpi_version', '3.1.2', 'OpenMPI version to install, such as 3.1.2 and 4.0.2.' 'Set to empty to ignore the intallation o...
true
true
1c37600be7a5fef79e0fc3ddf5761170495a02bf
859
py
Python
Graph.py
tylerrussin/data-structure-practice
9eca105bae012d5a9e1b346d046f49b772bd05d8
[ "MIT" ]
null
null
null
Graph.py
tylerrussin/data-structure-practice
9eca105bae012d5a9e1b346d046f49b772bd05d8
[ "MIT" ]
null
null
null
Graph.py
tylerrussin/data-structure-practice
9eca105bae012d5a9e1b346d046f49b772bd05d8
[ "MIT" ]
null
null
null
class Vertex(): def __init__(self, vertex_value, vertex): self.vertex_value = vertex_value self.vertex = vertex self.adjacent = {} def add_neighbor(self, adj_vertex): self.adjacent[adj_vertex.vertex_value] = adj_vertex class Graph(): def __init__(self): self....
22.605263
59
0.637951
class Vertex(): def __init__(self, vertex_value, vertex): self.vertex_value = vertex_value self.vertex = vertex self.adjacent = {} def add_neighbor(self, adj_vertex): self.adjacent[adj_vertex.vertex_value] = adj_vertex class Graph(): def __init__(self): self....
false
true
1c37613ee06eb74f96f1ffe86addd256d2965ae2
976
py
Python
src/elasticizefiles/extractors/metadata.py
pierluigi-failla/elasticize_files
2530d74f1b56344ee73ca113bcb2870566a565a0
[ "MIT" ]
null
null
null
src/elasticizefiles/extractors/metadata.py
pierluigi-failla/elasticize_files
2530d74f1b56344ee73ca113bcb2870566a565a0
[ "MIT" ]
null
null
null
src/elasticizefiles/extractors/metadata.py
pierluigi-failla/elasticize_files
2530d74f1b56344ee73ca113bcb2870566a565a0
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created by Pierluigi on 2020-02-04 project: elasticizefiles """ import logging from elasticizefiles.base import Extractor class ExtractExif(Extractor): def __init__(self): Extractor.__init__(self) def extract(self, filename): try: from hachoir.metadata...
28.705882
94
0.639344
import logging from elasticizefiles.base import Extractor class ExtractExif(Extractor): def __init__(self): Extractor.__init__(self) def extract(self, filename): try: from hachoir.metadata import extractMetadata from hachoir.parser import createParser except ...
true
true
1c3761696c14bc564c49dbdee8fad2a15923d854
10,602
py
Python
PuzzleSolver/solver/solver.py
cloudrave/logic-puzzle-generator
33d65da0776f1ef074c461a8599f71f6c3d192ea
[ "MIT" ]
1
2021-11-26T07:21:07.000Z
2021-11-26T07:21:07.000Z
PuzzleSolver/solver/solver.py
cloudrave/logic-puzzle-generator
33d65da0776f1ef074c461a8599f71f6c3d192ea
[ "MIT" ]
null
null
null
PuzzleSolver/solver/solver.py
cloudrave/logic-puzzle-generator
33d65da0776f1ef074c461a8599f71f6c3d192ea
[ "MIT" ]
null
null
null
from package.puzzle_generator import * def main(): p1 = Puzzle({ 'A': [ Biconditional( DisjunctiveStatement( # uncertain IsOfType('B', Knight), IsOfType('C', Knight), IsOfType('B', Monk), IsOfType(...
25.92176
71
0.396718
from package.puzzle_generator import * def main(): p1 = Puzzle({ 'A': [ Biconditional( DisjunctiveStatement( IsOfType('B', Knight), IsOfType('C', Knight), IsOfType('B', Monk), IsOfType('C', Monk),...
true
true
1c376169d3a20849d3b51fcf8972870fa9a4658b
807
py
Python
checkov/terraform/checks/resource/azure/AzureInstanceExtensions.py
jamesholland-uk/checkov
d73fd4bd7096d48ab3434a92a177bcc55605460a
[ "Apache-2.0" ]
1
2021-02-13T15:24:42.000Z
2021-02-13T15:24:42.000Z
checkov/terraform/checks/resource/azure/AzureInstanceExtensions.py
jamesholland-uk/checkov
d73fd4bd7096d48ab3434a92a177bcc55605460a
[ "Apache-2.0" ]
7
2021-04-12T06:54:07.000Z
2022-03-21T14:04:14.000Z
checkov/terraform/checks/resource/azure/AzureInstanceExtensions.py
jamesholland-uk/checkov
d73fd4bd7096d48ab3434a92a177bcc55605460a
[ "Apache-2.0" ]
1
2021-12-16T03:09:55.000Z
2021-12-16T03:09:55.000Z
from typing import Any from checkov.common.models.enums import CheckCategories from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck class AzureInstanceExtensions(BaseResourceValueCheck): def __init__(self) -> None: name = "Ensure Virtual Machine Extensions are no...
35.086957
106
0.763321
from typing import Any from checkov.common.models.enums import CheckCategories from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck class AzureInstanceExtensions(BaseResourceValueCheck): def __init__(self) -> None: name = "Ensure Virtual Machine Extensions are no...
true
true
1c3761753b08197305fbfa0a1376c13ef72b4aed
505
py
Python
note/models.py
ehomeshasha/easydata
0c599cc34d18b8865e06b15bbb96aa58612dfde2
[ "MIT" ]
1
2018-03-16T09:56:23.000Z
2018-03-16T09:56:23.000Z
note/models.py
ehomeshasha/easydata
0c599cc34d18b8865e06b15bbb96aa58612dfde2
[ "MIT" ]
null
null
null
note/models.py
ehomeshasha/easydata
0c599cc34d18b8865e06b15bbb96aa58612dfde2
[ "MIT" ]
null
null
null
from django.db import models from easydata.db.mysql.fields import C_SmallIntegerField, C_AutoField, C_IntegerField class Note(models.Model): id = C_AutoField(max_length=8, primary_key=True) uid = C_IntegerField(max_length=11, default=0) username = models.CharField(max_length=30) content = models.TextFi...
38.846154
85
0.760396
from django.db import models from easydata.db.mysql.fields import C_SmallIntegerField, C_AutoField, C_IntegerField class Note(models.Model): id = C_AutoField(max_length=8, primary_key=True) uid = C_IntegerField(max_length=11, default=0) username = models.CharField(max_length=30) content = models.TextFi...
true
true
1c37620533c2a68f63b0cbb3e74a99b8a8283d60
842
py
Python
tests/test_schema_utils.py
ITISFoundation/aiohttp_apiset
c12d05aabadbd6ee9f82e4f002908c2c08be44b7
[ "Apache-2.0" ]
null
null
null
tests/test_schema_utils.py
ITISFoundation/aiohttp_apiset
c12d05aabadbd6ee9f82e4f002908c2c08be44b7
[ "Apache-2.0" ]
null
null
null
tests/test_schema_utils.py
ITISFoundation/aiohttp_apiset
c12d05aabadbd6ee9f82e4f002908c2c08be44b7
[ "Apache-2.0" ]
null
null
null
import pytest from aiohttp_apiset.swagger.loader import deref from aiohttp_apiset.swagger.operations import OperationIdMapping data = { 'a': { 'b': [ {'$ref': '#/definitions/G'}, 3, ] } } spec = { 'definitions': { 'F': 1, 'G': {'$ref': '#/definition...
17.183673
64
0.535629
import pytest from aiohttp_apiset.swagger.loader import deref from aiohttp_apiset.swagger.operations import OperationIdMapping data = { 'a': { 'b': [ {'$ref': '#/definitions/G'}, 3, ] } } spec = { 'definitions': { 'F': 1, 'G': {'$ref': '#/definition...
true
true
1c37620e9821cf9f9ba0eede152f515e9f1e8787
4,842
py
Python
toontown/safezone/GSPlayground.py
AnonymousDeveloper65535/open-toontown
3d05c22a7d960ad843dde231140447c46973dba5
[ "BSD-3-Clause" ]
8
2017-10-10T11:41:01.000Z
2021-02-23T12:55:47.000Z
toontown/safezone/GSPlayground.py
AnonymousDeveloper65535/open-toontown
3d05c22a7d960ad843dde231140447c46973dba5
[ "BSD-3-Clause" ]
1
2018-07-28T20:07:04.000Z
2018-07-30T18:28:34.000Z
toontown/safezone/GSPlayground.py
AnonymousDeveloper65535/open-toontown
3d05c22a7d960ad843dde231140447c46973dba5
[ "BSD-3-Clause" ]
2
2019-10-22T22:16:49.000Z
2020-03-19T22:45:23.000Z
from pandac.PandaModules import * from toontown.toonbase import ToontownGlobals import Playground from toontown.launcher import DownloadForceAcknowledge from toontown.building import Elevator from toontown.toontowngui import TTDialog from toontown.toonbase import TTLocalizer from toontown.racing import RaceGlobals from...
41.384615
148
0.687526
from pandac.PandaModules import * from toontown.toonbase import ToontownGlobals import Playground from toontown.launcher import DownloadForceAcknowledge from toontown.building import Elevator from toontown.toontowngui import TTDialog from toontown.toonbase import TTLocalizer from toontown.racing import RaceGlobals from...
false
true
1c3762176513f80d2a2a93e3ec440f78cf0fe0ef
6,282
py
Python
pkgs/bokeh-0.11.1-py27_0/Examples/bokeh/plotting/server/fourier_animated.py
wangyum/anaconda
6e5a0dbead3327661d73a61e85414cf92aa52be6
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
pkgs/bokeh-0.11.1-py27_0/Examples/bokeh/plotting/server/fourier_animated.py
wangyum/anaconda
6e5a0dbead3327661d73a61e85414cf92aa52be6
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
pkgs/bokeh-0.11.1-py27_0/Examples/bokeh/plotting/server/fourier_animated.py
wangyum/anaconda
6e5a0dbead3327661d73a61e85414cf92aa52be6
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# You must first run "bokeh serve" to view this example # # Example inspired by: # # https://www.youtube.com/watch?v=LznjC4Lo7lE from __future__ import division from collections import OrderedDict from math import pi import numpy as np from bokeh.client import push_session from bokeh.driving import repeat from bo...
33.593583
114
0.586597
from __future__ import division from collections import OrderedDict from math import pi import numpy as np from bokeh.client import push_session from bokeh.driving import repeat from bokeh.io import vplot from bokeh.models.sources import ColumnDataSource as CDS from bokeh.plotting import figure, curdoc N = 10...
true
true
1c37621aafb0e31028386e7910f15bba4ec73003
44
py
Python
Src/Escher/tools/mesh_interpolate/__init__.py
sanjeevmk/GLASS
91c0954eab87d25d4866fea5c338f79fbca4f79e
[ "MIT" ]
2
2022-03-22T17:36:14.000Z
2022-03-27T05:03:39.000Z
Src/Escher/tools/mesh_interpolate/__init__.py
sanjeevmk/glass
91c0954eab87d25d4866fea5c338f79fbca4f79e
[ "MIT" ]
null
null
null
Src/Escher/tools/mesh_interpolate/__init__.py
sanjeevmk/glass
91c0954eab87d25d4866fea5c338f79fbca4f79e
[ "MIT" ]
null
null
null
from .main import deformation_interpolation
22
43
0.886364
from .main import deformation_interpolation
true
true
1c376246832b44019681cbf48ef845f33c434d11
12,945
py
Python
schemas/tests/test_defs/test_base.py
polyaxon/schemas
e0742a80a0e6c5d1439d15ceb03de1e149331594
[ "Apache-2.0" ]
7
2017-09-24T15:34:17.000Z
2020-02-14T19:54:08.000Z
schemas/tests/test_defs/test_base.py
polyaxon/schemas
e0742a80a0e6c5d1439d15ceb03de1e149331594
[ "Apache-2.0" ]
53
2017-10-16T14:43:15.000Z
2020-07-01T18:11:11.000Z
schemas/tests/test_defs/test_base.py
polyaxon/schemas
e0742a80a0e6c5d1439d15ceb03de1e149331594
[ "Apache-2.0" ]
15
2017-10-03T22:03:38.000Z
2021-12-03T07:11:45.000Z
#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
32.443609
88
0.575435
import pytest from unittest import TestCase from marshmallow import Schema, ValidationError, fields from polyaxon_schemas.base import BaseConfig, BaseOneOfSchema, BaseSchema REQUIRED_ERROR = u"Missing data for required field." class FooSchema(BaseSchema): value = fields.String(required=True) ...
true
true
1c3764399482c80bed57bf544783a90cda22efad
2,832
py
Python
aliyun-python-sdk-emr/aliyunsdkemr/request/v20160408/ListExecutionPlanInstancesRequest.py
leafcoder/aliyun-openapi-python-sdk
26b441ab37a5cda804de475fd5284bab699443f1
[ "Apache-2.0" ]
1,001
2015-07-24T01:32:41.000Z
2022-03-25T01:28:18.000Z
aliyun-python-sdk-emr/aliyunsdkemr/request/v20160408/ListExecutionPlanInstancesRequest.py
leafcoder/aliyun-openapi-python-sdk
26b441ab37a5cda804de475fd5284bab699443f1
[ "Apache-2.0" ]
363
2015-10-20T03:15:00.000Z
2022-03-08T12:26:19.000Z
aliyun-python-sdk-emr/aliyunsdkemr/request/v20160408/ListExecutionPlanInstancesRequest.py
leafcoder/aliyun-openapi-python-sdk
26b441ab37a5cda804de475fd5284bab699443f1
[ "Apache-2.0" ]
682
2015-09-22T07:19:02.000Z
2022-03-22T09:51:46.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
36.307692
98
0.764831
from aliyunsdkcore.request import RpcRequest from aliyunsdkemr.endpoint import endpoint_data class ListExecutionPlanInstancesRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Emr', '2016-04-08', 'ListExecutionPlanInstances','emr') self.set_method('POST') if hasattr(self, "...
true
true
1c37648a13789a415e017f2ba4c9aeb2b2f87007
11,687
py
Python
user/views.py
Samurai-XHe/myblog
c9e182b84c3cb06b3207e7359f0a4d352c28d043
[ "MIT" ]
1
2018-09-25T09:11:17.000Z
2018-09-25T09:11:17.000Z
user/views.py
Samurai-XHe/myblog
c9e182b84c3cb06b3207e7359f0a4d352c28d043
[ "MIT" ]
null
null
null
user/views.py
Samurai-XHe/myblog
c9e182b84c3cb06b3207e7359f0a4d352c28d043
[ "MIT" ]
null
null
null
import random,time, string,re from django.shortcuts import render, redirect from django.contrib import auth from django.contrib.auth.models import User from django.urls import reverse from django.http import JsonResponse from django.core.mail import send_mail from .forms import LoginForm, RegisterForm, ChangeNickNameFo...
36.182663
98
0.564816
import random,time, string,re from django.shortcuts import render, redirect from django.contrib import auth from django.contrib.auth.models import User from django.urls import reverse from django.http import JsonResponse from django.core.mail import send_mail from .forms import LoginForm, RegisterForm, ChangeNickNameFo...
true
true
1c376569d6eef2f1a3ba85061b8c447783559e60
275
py
Python
tests/utils/process.py
paweljasinski/ironclad
c37d08910dfd0cb531668e5218684130eee4e925
[ "PSF-2.0" ]
58
2015-03-02T15:13:45.000Z
2021-07-31T16:10:13.000Z
tests/utils/process.py
paweljasinski/ironclad
c37d08910dfd0cb531668e5218684130eee4e925
[ "PSF-2.0" ]
4
2015-01-02T11:45:46.000Z
2022-01-17T14:45:33.000Z
tests/utils/process.py
paweljasinski/ironclad
c37d08910dfd0cb531668e5218684130eee4e925
[ "PSF-2.0" ]
11
2015-01-22T11:56:32.000Z
2020-06-02T01:40:58.000Z
import os def spawn(executable, *args, **kwargs): cwd = kwargs.get('cwd') oldCwd = os.getcwd() if cwd: os.chdir(cwd) try: result = os.spawnl(os.P_WAIT, executable, executable, *args) finally: os.chdir(oldCwd) return result
17.1875
68
0.585455
import os def spawn(executable, *args, **kwargs): cwd = kwargs.get('cwd') oldCwd = os.getcwd() if cwd: os.chdir(cwd) try: result = os.spawnl(os.P_WAIT, executable, executable, *args) finally: os.chdir(oldCwd) return result
true
true
1c376586d982d9f8e652e29f7a8066a066c47dfc
1,133
py
Python
sql_orm/database.py
santomet/OpenSupportTool
9be84d2b3ab8418e9ffa9ac603e6d6dc3de4cf07
[ "MIT" ]
null
null
null
sql_orm/database.py
santomet/OpenSupportTool
9be84d2b3ab8418e9ffa9ac603e6d6dc3de4cf07
[ "MIT" ]
null
null
null
sql_orm/database.py
santomet/OpenSupportTool
9be84d2b3ab8418e9ffa9ac603e6d6dc3de4cf07
[ "MIT" ]
null
null
null
from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker # The default is with SQLite SQLALCHEMY_DATABASE_URL = "sqlite:///./sql_app.db" engine = create_engine( SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False} # these co...
27.634146
112
0.74669
from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker SQLALCHEMY_DATABASE_URL = "sqlite:///./sql_app.db" engine = create_engine( SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False} ) SessionLocal = ses...
true
true
1c37665fcd25bae8d136d03448b80439ad84bf88
5,475
py
Python
qiskit/algorithms/optimizers/nft.py
Roshan-Thomas/qiskit-terra
77219b5c7b7146b1545c5e5190739b36f4064b2f
[ "Apache-2.0" ]
1,599
2018-07-10T10:59:12.000Z
2022-03-31T23:56:25.000Z
qiskit/algorithms/optimizers/nft.py
Roshan-Thomas/qiskit-terra
77219b5c7b7146b1545c5e5190739b36f4064b2f
[ "Apache-2.0" ]
5,244
2018-07-10T06:20:13.000Z
2022-03-31T22:18:48.000Z
qiskit/algorithms/optimizers/nft.py
Roshan-Thomas/qiskit-terra
77219b5c7b7146b1545c5e5190739b36f4064b2f
[ "Apache-2.0" ]
1,409
2018-07-10T02:16:12.000Z
2022-03-31T09:01:32.000Z
# This code is part of Qiskit. # # (C) Copyright IBM 2019, 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 derivat...
32.205882
97
0.581735
from typing import Optional import numpy as np from scipy.optimize import OptimizeResult from .scipy_optimizer import SciPyOptimizer class NFT(SciPyOptimizer): _OPTIONS = ["maxiter", "maxfev", "disp", "reset_interval"] def __init__( self, maxiter: Optional[int] = None, ...
true
true
1c37683682256fd47f868e979c971a1b402d935b
10,956
py
Python
sysinv/sysinv/sysinv/sysinv/api/controllers/v1/interface_datanetwork.py
etaivan/stx-config
281e1f110973f96e077645fb01f67b646fc253cc
[ "Apache-2.0" ]
null
null
null
sysinv/sysinv/sysinv/sysinv/api/controllers/v1/interface_datanetwork.py
etaivan/stx-config
281e1f110973f96e077645fb01f67b646fc253cc
[ "Apache-2.0" ]
null
null
null
sysinv/sysinv/sysinv/sysinv/api/controllers/v1/interface_datanetwork.py
etaivan/stx-config
281e1f110973f96e077645fb01f67b646fc253cc
[ "Apache-2.0" ]
1
2021-01-05T16:24:58.000Z
2021-01-05T16:24:58.000Z
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 UnitedStack 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....
38.174216
79
0.683552
import uuid import wsme import pecan from pecan import rest from wsme import types as wtypes import wsmeext.pecan as wsme_pecan from sysinv.api.controllers.v1 import base from sysinv.api.controllers.v1 import collection from sysinv.api.controllers.v1 import types from sysinv.api.controllers.v1 ...
true
true
1c37683969b46b880d6a04272843917e691b430e
1,855
py
Python
tests/components/config/test_init.py
milaq/home-assistant
c32300a3868aceb1c4f2ba5a17f69d6ba9651baa
[ "Apache-2.0" ]
null
null
null
tests/components/config/test_init.py
milaq/home-assistant
c32300a3868aceb1c4f2ba5a17f69d6ba9651baa
[ "Apache-2.0" ]
null
null
null
tests/components/config/test_init.py
milaq/home-assistant
c32300a3868aceb1c4f2ba5a17f69d6ba9651baa
[ "Apache-2.0" ]
2
2018-06-03T11:14:44.000Z
2018-11-04T18:18:12.000Z
"""Test config init.""" import asyncio from unittest.mock import patch import pytest from homeassistant.const import EVENT_COMPONENT_LOADED from homeassistant.bootstrap import async_setup_component, ATTR_COMPONENT from homeassistant.components import config from tests.common import mock_http_component, mock_coro, mo...
30.916667
78
0.721294
import asyncio from unittest.mock import patch import pytest from homeassistant.const import EVENT_COMPONENT_LOADED from homeassistant.bootstrap import async_setup_component, ATTR_COMPONENT from homeassistant.components import config from tests.common import mock_http_component, mock_coro, mock_component @pytest.f...
true
true
1c376971c33a5b04365014688e29dbe6af0fb22f
1,609
py
Python
monero_glue/xmr/sub/creds.py
ph4r05/monero-agent
0bac0e6f33142b2bb885565bfd1ef8ac04559280
[ "MIT" ]
20
2018-04-05T22:06:10.000Z
2021-09-18T10:43:44.000Z
monero_glue/xmr/sub/creds.py
ph4r05/monero-agent
0bac0e6f33142b2bb885565bfd1ef8ac04559280
[ "MIT" ]
null
null
null
monero_glue/xmr/sub/creds.py
ph4r05/monero-agent
0bac0e6f33142b2bb885565bfd1ef8ac04559280
[ "MIT" ]
5
2018-08-06T15:06:04.000Z
2021-07-16T01:58:43.000Z
from monero_glue.xmr import crypto from monero_glue.xmr.sub.addr import encode_addr from monero_glue.xmr.sub.xmr_net import NetworkTypes, net_version from typing import Optional from monero_glue.xmr.crypto import Ge25519, Sc25519 class AccountCreds(object): """ Stores account private keys """ def __i...
32.836735
77
0.67371
from monero_glue.xmr import crypto from monero_glue.xmr.sub.addr import encode_addr from monero_glue.xmr.sub.xmr_net import NetworkTypes, net_version from typing import Optional from monero_glue.xmr.crypto import Ge25519, Sc25519 class AccountCreds(object): def __init__( self, view_key_private: O...
true
true
1c3769b750e9604dea47316cfeafb47fc3de7e9c
468
py
Python
doorbot/worker.py
masom/doorbot-api-python
daad4bd279661bee268ae2584769f09e4a132982
[ "MIT" ]
null
null
null
doorbot/worker.py
masom/doorbot-api-python
daad4bd279661bee268ae2584769f09e4a132982
[ "MIT" ]
null
null
null
doorbot/worker.py
masom/doorbot-api-python
daad4bd279661bee268ae2584769f09e4a132982
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from flask import Flask from .db import db from celery import Celery worker = Flask(__name__) worker.config.from_pyfile('../config.py') db.init_app(worker) celery = Celery(__name__) celery.conf.update( CELERY_IMPORTS=worker.config.get('CELERY_IMPORTS', ('doorbot.tasks',)), BROKER_URL=w...
26
75
0.735043
from flask import Flask from .db import db from celery import Celery worker = Flask(__name__) worker.config.from_pyfile('../config.py') db.init_app(worker) celery = Celery(__name__) celery.conf.update( CELERY_IMPORTS=worker.config.get('CELERY_IMPORTS', ('doorbot.tasks',)), BROKER_URL=worker.config.get('CELER...
true
true
1c376a2f136c794225944f9fc835de442fc0d8d5
897
py
Python
tests/test_driving_cycles.py
vishalbelsare/carculator
44516a5f3e7f7f42f0d0d7a5c2bd5af3d17d0fd4
[ "BSD-3-Clause" ]
32
2019-11-05T03:46:56.000Z
2022-01-10T09:34:20.000Z
tests/test_driving_cycles.py
vishalbelsare/carculator
44516a5f3e7f7f42f0d0d7a5c2bd5af3d17d0fd4
[ "BSD-3-Clause" ]
17
2019-08-05T15:46:43.000Z
2022-03-08T16:57:55.000Z
tests/test_driving_cycles.py
vishalbelsare/carculator
44516a5f3e7f7f42f0d0d7a5c2bd5af3d17d0fd4
[ "BSD-3-Clause" ]
8
2019-09-26T08:33:44.000Z
2021-07-17T12:41:26.000Z
import numpy as np import pytest from carculator.driving_cycles import get_standard_driving_cycle def test_cycle_retrieval_default(): dc = get_standard_driving_cycle() assert isinstance(dc, np.ndarray) assert dc.sum() == 83744.6 def test_cycle_retrieval_wltc(): dc = get_standard_driving_cycle("WLTC...
24.916667
64
0.731327
import numpy as np import pytest from carculator.driving_cycles import get_standard_driving_cycle def test_cycle_retrieval_default(): dc = get_standard_driving_cycle() assert isinstance(dc, np.ndarray) assert dc.sum() == 83744.6 def test_cycle_retrieval_wltc(): dc = get_standard_driving_cycle("WLTC...
true
true
1c376a4f2c15dbc72953409f6e73a7d2393354e7
9,027
py
Python
ravenframework/Optimizers/mutators/mutators.py
dgarrett622/raven
f36cc108f7500b0e2717df4832b69b801b43960d
[ "Apache-2.0" ]
null
null
null
ravenframework/Optimizers/mutators/mutators.py
dgarrett622/raven
f36cc108f7500b0e2717df4832b69b801b43960d
[ "Apache-2.0" ]
null
null
null
ravenframework/Optimizers/mutators/mutators.py
dgarrett622/raven
f36cc108f7500b0e2717df4832b69b801b43960d
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Battelle Energy Alliance, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
44.910448
137
0.680403
import numpy as np import xarray as xr from operator import itemgetter from ...utils import utils, randomUtils def swapMutator(offSprings, distDict, **kwargs): if kwargs['locs'] == None: locs = list(set(randomUtils.randomChoice(list(np.arange(offSprings.data.shape[1])),size=2,replace=False))) lo...
true
true
1c376ac09b79fcdf39fdae28583da0a291718718
2,728
py
Python
volatility/framework/symbols/windows/__init__.py
dl9rdz/volatility3
9d9cdfb7d43b98662089503fdb85f103d551b543
[ "Linux-OpenIB" ]
null
null
null
volatility/framework/symbols/windows/__init__.py
dl9rdz/volatility3
9d9cdfb7d43b98662089503fdb85f103d551b543
[ "Linux-OpenIB" ]
null
null
null
volatility/framework/symbols/windows/__init__.py
dl9rdz/volatility3
9d9cdfb7d43b98662089503fdb85f103d551b543
[ "Linux-OpenIB" ]
null
null
null
# This file is Copyright 2019 Volatility Foundation and licensed under the Volatility Software License 1.0 # which is available at https://www.volatilityfoundation.org/license/vsl-v1.0 # import volatility.framework.symbols.windows.extensions.pool from volatility.framework.symbols import intermed from volatility.framewo...
45.466667
106
0.719575
import volatility.framework.symbols.windows.extensions.pool from volatility.framework.symbols import intermed from volatility.framework.symbols.windows import extensions from volatility.framework.symbols.windows.extensions import registry, pool class WindowsKernelIntermedSymbols(intermed.IntermediateSymbolTable): ...
true
true
1c376b1c918a5e3eb46ec3ca502103cd459b1fc8
603
py
Python
Chapter04/bookmarks/account/authentication.py
prathmesh-jagtap/Django-4-by-example
8a9418f746117c1637db0900182e8f4454cdff5e
[ "MIT" ]
1
2022-02-08T09:43:23.000Z
2022-02-08T09:43:23.000Z
Chapter04/bookmarks/account/authentication.py
prathmesh-jagtap/Django-4-by-example
8a9418f746117c1637db0900182e8f4454cdff5e
[ "MIT" ]
null
null
null
Chapter04/bookmarks/account/authentication.py
prathmesh-jagtap/Django-4-by-example
8a9418f746117c1637db0900182e8f4454cdff5e
[ "MIT" ]
null
null
null
from django.contrib.auth.models import User class EmailAuthBackend(): """ Authenticate using an e-mail address. """ def authenticate(self, request, username=None, password=None): try: user = User.objects.get(email=username) if user.check_password(password): ...
27.409091
66
0.606965
from django.contrib.auth.models import User class EmailAuthBackend(): def authenticate(self, request, username=None, password=None): try: user = User.objects.get(email=username) if user.check_password(password): return user return None except (Us...
true
true
1c376b75a8c23b3a74357826c14c4f507f3c5a3e
4,606
py
Python
demo/hello/app.py
HorizonFTT/Flask
ee18c8aa9447a0c4f9c58e286233ce345dcd7127
[ "MIT" ]
1
2020-01-03T02:58:26.000Z
2020-01-03T02:58:26.000Z
demo/hello/app.py
HorizonFTT/Flask
ee18c8aa9447a0c4f9c58e286233ce345dcd7127
[ "MIT" ]
null
null
null
demo/hello/app.py
HorizonFTT/Flask
ee18c8aa9447a0c4f9c58e286233ce345dcd7127
[ "MIT" ]
null
null
null
import click import os from flask import ( Flask, redirect, url_for, jsonify, make_response, session, request, render_template, Markup, flash, ) from urllib.parse import urlparse, urljoin from jinja2.utils import generate_lorem_ipsum app = Flask(__name__) app.secret_key = os.get...
22.359223
120
0.614199
import click import os from flask import ( Flask, redirect, url_for, jsonify, make_response, session, request, render_template, Markup, flash, ) from urllib.parse import urlparse, urljoin from jinja2.utils import generate_lorem_ipsum app = Flask(__name__) app.secret_key = os.get...
true
true
1c376bcbeaeb04be53a3e08fa90e2bdb91dc0548
540
py
Python
Prepare_val_data.py
YiLunLee/VRDL_HW4
3cc236ad1829745f2402e862cbfbe316f0574b8c
[ "MIT" ]
null
null
null
Prepare_val_data.py
YiLunLee/VRDL_HW4
3cc236ad1829745f2402e862cbfbe316f0574b8c
[ "MIT" ]
null
null
null
Prepare_val_data.py
YiLunLee/VRDL_HW4
3cc236ad1829745f2402e862cbfbe316f0574b8c
[ "MIT" ]
null
null
null
import os import random HR_path = './vrdl_data/val/HR_x3' LR_path = './vrdl_data/val/LR_x3' images = os.listdir(LR_path) new_HR_path = './vrdl_data/vals_light/HR_x3s' new_LR_path = './vrdl_data/vals_light/LR_x3s' os.makedirs(new_HR_path, exist_ok=True) os.makedirs(new_LR_path, exist_ok=True) samples = random.sample(i...
38.571429
96
0.722222
import os import random HR_path = './vrdl_data/val/HR_x3' LR_path = './vrdl_data/val/LR_x3' images = os.listdir(LR_path) new_HR_path = './vrdl_data/vals_light/HR_x3s' new_LR_path = './vrdl_data/vals_light/LR_x3s' os.makedirs(new_HR_path, exist_ok=True) os.makedirs(new_LR_path, exist_ok=True) samples = random.sample(i...
true
true
1c376bf35755fbf88f43baf291fc29b2f88c8a20
2,375
py
Python
gupview/Secondary_Scripts/Flouroscence.py
BboyTian/gupview
6ef6693f8b58d224a89e2963bcd4d44312e957de
[ "MIT" ]
null
null
null
gupview/Secondary_Scripts/Flouroscence.py
BboyTian/gupview
6ef6693f8b58d224a89e2963bcd4d44312e957de
[ "MIT" ]
null
null
null
gupview/Secondary_Scripts/Flouroscence.py
BboyTian/gupview
6ef6693f8b58d224a89e2963bcd4d44312e957de
[ "MIT" ]
1
2021-09-29T04:06:33.000Z
2021-09-29T04:06:33.000Z
######### #Imports# ######### # Python Basics from decimal import Decimal # Graph Plotting import matplotlib matplotlib.use("TkAgg") from matplotlib.figure import Figure # Image process import numpy as np import PIL from .Masks import rectMask_func # Parameters import Parameters as para ########### #Operation# ##...
28.27381
93
0.635368
g") from matplotlib.figure import Figure import numpy as np import PIL from .Masks import rectMask_func import Parameters as para halfcropsize = int(cropsize/2) self.img = None self.count = 0 self.fig = Figure(figsize=(figsize, figsize), dpi=100) self.ax = self...
true
true
1c376c2c22243977c9d2bd5fc88a83d0caa3b4eb
3,454
py
Python
src/ui/turn/resourceinfo.py
szarta/stars-reborn
61a7847b027e2efd6a26a5d8c276e18210833d0c
[ "MIT" ]
null
null
null
src/ui/turn/resourceinfo.py
szarta/stars-reborn
61a7847b027e2efd6a26a5d8c276e18210833d0c
[ "MIT" ]
null
null
null
src/ui/turn/resourceinfo.py
szarta/stars-reborn
61a7847b027e2efd6a26a5d8c276e18210833d0c
[ "MIT" ]
null
null
null
""" resourceinfo.py The widget for displaying planet resource info. :author: Brandon Arrendondo :license: MIT, see LICENSE.txt for more details. """ from PySide.QtGui import QWidget from PySide.QtGui import QBoxLayout from PySide.QtGui import QLabel from PySide.QtGui import QFrame from PySide.QtGui im...
32.584906
75
0.624493
from PySide.QtGui import QWidget from PySide.QtGui import QBoxLayout from PySide.QtGui import QLabel from PySide.QtGui import QFrame from PySide.QtGui import QPixmap from PySide.QtCore import Qt from src.model.enumerations import ResourcePaths from src.model.enumerations import NeverSeenPlanet class PlanetInfo(QWidg...
true
true
1c376c302110ee92628db9f2b9059b89382814c7
270
py
Python
waroeng_bebek_selamet/waroeng_bebek_selamet/doctype/transaksi_pembayaran_line/transaksi_pembayaran_line.py
rifkisetyantto/frappe-digital-order
e1a9729a7d449ce7ef98a703d6a8d721fd5b5c5b
[ "MIT" ]
null
null
null
waroeng_bebek_selamet/waroeng_bebek_selamet/doctype/transaksi_pembayaran_line/transaksi_pembayaran_line.py
rifkisetyantto/frappe-digital-order
e1a9729a7d449ce7ef98a703d6a8d721fd5b5c5b
[ "MIT" ]
null
null
null
waroeng_bebek_selamet/waroeng_bebek_selamet/doctype/transaksi_pembayaran_line/transaksi_pembayaran_line.py
rifkisetyantto/frappe-digital-order
e1a9729a7d449ce7ef98a703d6a8d721fd5b5c5b
[ "MIT" ]
2
2019-10-29T17:03:16.000Z
2019-10-30T08:20:19.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2019, Kelompok 6 and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class TransaksiPembayaranLine(Document): pass
24.545455
49
0.788889
from __future__ import unicode_literals import frappe from frappe.model.document import Document class TransaksiPembayaranLine(Document): pass
true
true
1c376e09821b633ae0074cdc19887f5321bd9147
92
py
Python
dji_asdk_to_python/mission_control/timeline_element_feedback.py
msanchezc/dji-asdk-to-python
cf3e56691524624314a28f5ebc6f3f59cbd4d8cb
[ "BSD-3-Clause" ]
7
2020-11-02T16:31:28.000Z
2021-11-09T21:32:44.000Z
dji_asdk_to_python/mission_control/timeline_element_feedback.py
msanchezc/dji-asdk-to-python
cf3e56691524624314a28f5ebc6f3f59cbd4d8cb
[ "BSD-3-Clause" ]
64
2020-09-03T04:32:39.000Z
2022-02-21T20:30:16.000Z
dji_asdk_to_python/mission_control/timeline_element_feedback.py
PSBPOSAS/dji-asdk-to-python
39fd29e172249656ce9f6e7b6273eeff6790d8c1
[ "BSD-3-Clause" ]
4
2020-09-16T19:07:30.000Z
2022-02-21T04:48:10.000Z
class TimelineElementFeedback: def __init__(self, app_ip): self.app_ip = app_ip
23
31
0.706522
class TimelineElementFeedback: def __init__(self, app_ip): self.app_ip = app_ip
true
true
1c376e540bc74c7fd130ca8cf9efedabccf1a9ae
20,269
py
Python
github_comments/github_comments.py
alikins/github-comments
6ccca44d6f6fa87cdeaffe65ef695cb2b099d707
[ "MIT" ]
1
2015-11-05T14:32:35.000Z
2015-11-05T14:32:35.000Z
github_comments/github_comments.py
alikins/github-comments
6ccca44d6f6fa87cdeaffe65ef695cb2b099d707
[ "MIT" ]
1
2016-03-13T22:56:54.000Z
2016-03-14T01:35:58.000Z
github_comments/github_comments.py
alikins/github-comments
6ccca44d6f6fa87cdeaffe65ef695cb2b099d707
[ "MIT" ]
null
null
null
#!/usr/bin/python # show github pull request comments in a lint like format # # ala, pep8, jslint, etc, except for code review comments # # potentially useful to use with syntastic/flymake/etc # # Thoughts: # - it would be nice if this was a minimal dep one file script # - it would be nice if this could DWIM and f...
35.435315
97
0.627066
# to github, and isssued a pull request. I would like to see # the per line code review comments for that pull request" # - may eventually also support showing comments for arbitrary # pull requests. for example, if you are reviewing a pull # request, you could see the comments other have...
false
true
1c376eb6a89356b525641162329a18c774d6d155
340
py
Python
src/demo_tzbtc/types/tzbtc/parameter/transfer.py
pravin-d/dipdup-py
934703e1d9ade2f5c798e9da79dc6f2deb0a7a24
[ "MIT" ]
39
2021-04-13T10:53:27.000Z
2022-02-11T00:53:44.000Z
src/demo_tzbtc/types/tzbtc/parameter/transfer.py
pravin-d/dipdup-py
934703e1d9ade2f5c798e9da79dc6f2deb0a7a24
[ "MIT" ]
113
2021-06-01T18:16:42.000Z
2022-03-28T06:12:58.000Z
src/demo_tzbtc/types/tzbtc/parameter/transfer.py
pravin-d/dipdup-py
934703e1d9ade2f5c798e9da79dc6f2deb0a7a24
[ "MIT" ]
16
2021-05-26T07:04:40.000Z
2022-03-29T06:50:25.000Z
# generated by datamodel-codegen: # filename: transfer.json from __future__ import annotations from pydantic import BaseModel from pydantic import Extra from pydantic import Field class TransferParameter(BaseModel): class Config: extra = Extra.forbid from_: str = Field(..., alias='from') to:...
18.888889
41
0.717647
from __future__ import annotations from pydantic import BaseModel from pydantic import Extra from pydantic import Field class TransferParameter(BaseModel): class Config: extra = Extra.forbid from_: str = Field(..., alias='from') to: str value: str
true
true
1c376ee3e2ce66e1ce2ab29d9c05e500a4a0c0b5
10,325
py
Python
pymips.py
gwangmin/PyMIPS
d598a92dc9b90b32fae621396a794590d8899a11
[ "MIT" ]
null
null
null
pymips.py
gwangmin/PyMIPS
d598a92dc9b90b32fae621396a794590d8899a11
[ "MIT" ]
null
null
null
pymips.py
gwangmin/PyMIPS
d598a92dc9b90b32fae621396a794590d8899a11
[ "MIT" ]
null
null
null
''' PyMIPS ''' # registers # decimal ZERO = 0 AT = 1 V0, V1 = 2, 3 A0, A1, A2, A3 = range(4, 8) T0, T1, T2, T3, T4, T5, T6, T7 = range(8, 16) S0, S1, S2, S3, S4, S5, S6, S7 = range(16, 24) T8, T9 = 24, 25 K0, K1 = 26, 27 GP, SP, FP, RA = range(28, 32) # utils def handle_err(f, msg): ''' Error handler '''...
24.524941
97
0.538402
ZERO = 0 AT = 1 V0, V1 = 2, 3 A0, A1, A2, A3 = range(4, 8) T0, T1, T2, T3, T4, T5, T6, T7 = range(8, 16) S0, S1, S2, S3, S4, S5, S6, S7 = range(16, 24) T8, T9 = 24, 25 K0, K1 = 26, 27 GP, SP, FP, RA = range(28, 32) def handle_err(f, msg): return '[Error] ' + f.__name__ + ': ' + msg def ones_complement(bits):...
true
true
1c376f6d10c34346adf7e1b076c9671d1cbe0001
162
py
Python
plt/__init__.py
chicham/plt
f23e29c13ad9a5ed69abc3688f6716589180fba0
[ "MIT" ]
1
2018-03-08T02:46:06.000Z
2018-03-08T02:46:06.000Z
plt/__init__.py
chicham/plt
f23e29c13ad9a5ed69abc3688f6716589180fba0
[ "MIT" ]
null
null
null
plt/__init__.py
chicham/plt
f23e29c13ad9a5ed69abc3688f6716589180fba0
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Top-level package for plot.""" __author__ = """Hicham Randrianarivo""" __email__ = 'h.randrianarivo@qwant.com' __version__ = '0.1.0'
20.25
39
0.654321
__author__ = """Hicham Randrianarivo""" __email__ = 'h.randrianarivo@qwant.com' __version__ = '0.1.0'
true
true
1c376f81aced6badadb0eef4cc5b48f457ae1ce5
334
py
Python
iotbx/command_line/reflection_file_converter.py
hbrunie/cctbx_project
2d8cb383d50fe20cdbbe4bebae8ed35fabce61e5
[ "BSD-3-Clause-LBNL" ]
2
2021-03-18T12:31:57.000Z
2022-03-14T06:27:06.000Z
iotbx/command_line/reflection_file_converter.py
hbrunie/cctbx_project
2d8cb383d50fe20cdbbe4bebae8ed35fabce61e5
[ "BSD-3-Clause-LBNL" ]
null
null
null
iotbx/command_line/reflection_file_converter.py
hbrunie/cctbx_project
2d8cb383d50fe20cdbbe4bebae8ed35fabce61e5
[ "BSD-3-Clause-LBNL" ]
1
2021-03-26T12:52:30.000Z
2021-03-26T12:52:30.000Z
from __future__ import absolute_import, division, print_function # LIBTBX_SET_DISPATCHER_NAME phenix.reflection_file_converter from iotbx import reflection_file_converter import sys def run(): try: reflection_file_converter.run(args=sys.argv[1:]) except RuntimeError as e: print(e) if (__name__ == "__main...
22.266667
64
0.778443
from __future__ import absolute_import, division, print_function from iotbx import reflection_file_converter import sys def run(): try: reflection_file_converter.run(args=sys.argv[1:]) except RuntimeError as e: print(e) if (__name__ == "__main__"): run()
true
true
1c376fa5f02c462267fc408c9460d667c29e8341
2,495
py
Python
STAP/STAP_imcorr.py
rscalzo/subpipe
641067a65810ad4acafcc75e7b09cb65712f40f1
[ "BSD-3-Clause" ]
null
null
null
STAP/STAP_imcorr.py
rscalzo/subpipe
641067a65810ad4acafcc75e7b09cb65712f40f1
[ "BSD-3-Clause" ]
null
null
null
STAP/STAP_imcorr.py
rscalzo/subpipe
641067a65810ad4acafcc75e7b09cb65712f40f1
[ "BSD-3-Clause" ]
null
null
null
#! /usr/bin/env python """ Apply flat fielding and/or fringe correction Syntax: STAP_imcorr.py imname outname [-ff FFNAME] [-fr FRNAME] [-noampjoin] [-timeout TIMEOUT] Inputs: imname: filename of input image including full path outname: output filename of corrected image Optional inputs: ffname: fil...
35.140845
99
0.692184
import argparse import sys import pyfits parser = argparse.ArgumentParser(description='Apply flat fielding and/or fringe correction.') parser.add_argument('imname', help='filename of input image') parser.add_argument('outname', help='filename of output image') parser.add_argu...
true
true
1c3772af5821e21cb24aff095fc34b95781b7cca
3,151
py
Python
django_react_bot/django_react_bot/settings.py
codedak/Django-React-ChatBot
0b5da30ebad3a751cc18f7af494df001a539e7ec
[ "CC0-1.0" ]
null
null
null
django_react_bot/django_react_bot/settings.py
codedak/Django-React-ChatBot
0b5da30ebad3a751cc18f7af494df001a539e7ec
[ "CC0-1.0" ]
null
null
null
django_react_bot/django_react_bot/settings.py
codedak/Django-React-ChatBot
0b5da30ebad3a751cc18f7af494df001a539e7ec
[ "CC0-1.0" ]
null
null
null
""" Django settings for django_react_bot project. Generated by 'django-admin startproject' using Django 2.2. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ impor...
25.827869
91
0.700413
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'nfxo3yr-c5bj+s28o7y06ckfd+1-92_9^kxoguk26gyx8kd6iv' DEBUG = True ALLOWED_HOSTS = ["127.0.0.1"] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.cont...
true
true
1c3772bf171cb279a20e72ebd32e1208866b8b32
7,397
py
Python
tests/element_test.py
arunpersaud/becquerel
5f2aa2e00a62e022c061e4343117e3b0365b2a45
[ "BSD-3-Clause-LBNL" ]
null
null
null
tests/element_test.py
arunpersaud/becquerel
5f2aa2e00a62e022c061e4343117e3b0365b2a45
[ "BSD-3-Clause-LBNL" ]
null
null
null
tests/element_test.py
arunpersaud/becquerel
5f2aa2e00a62e022c061e4343117e3b0365b2a45
[ "BSD-3-Clause-LBNL" ]
null
null
null
"""Test Element class.""" from becquerel.tools import element import pytest class TestElementFunctions(object): """Test Element functions.""" def test_validated_z_good(self): """Test validated_z................................................""" for z1, sym1, name1, mass1 in element._Z_SYMBO...
39.345745
84
0.568609
from becquerel.tools import element import pytest class TestElementFunctions(object): def test_validated_z_good(self): for z1, sym1, name1, mass1 in element._Z_SYMBOL_NAME_MASS: assert element.validated_z(z1) == z1 def test_validated_z_exception(self): with pytest.raises(element...
true
true
1c37746fe71c84e31d57f848afd8b7c55214ccbc
3,265
py
Python
examples/field_mixin_example.py
ZSD-tim/dayu_widgets
31c2530bdc4161d9311574d9850c2e9471e53072
[ "MIT" ]
157
2019-03-10T05:55:21.000Z
2022-03-31T09:07:00.000Z
examples/field_mixin_example.py
ZSD-tim/dayu_widgets
31c2530bdc4161d9311574d9850c2e9471e53072
[ "MIT" ]
16
2019-07-15T11:30:53.000Z
2021-12-16T14:17:59.000Z
examples/field_mixin_example.py
ZSD-tim/dayu_widgets
31c2530bdc4161d9311574d9850c2e9471e53072
[ "MIT" ]
56
2019-06-19T03:35:27.000Z
2022-03-22T08:07:32.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- ################################################################### # Author: Mu yanru # Date : 2019.3 # Email : muyanru345@163.com ################################################################### from dayu_widgets.field_mixin import MFieldMixin from dayu_widgets.label...
39.337349
107
0.637366
true
true
1c3774f46ae2fc55a60f74c65a9126aab48b4517
2,445
py
Python
Benchmarks/benchmark-5.7.py
wangyonghong/RabbitMQ-in-Depth
56a35c6359d500b7597daf1bb2185b4c451a572c
[ "BSD-3-Clause" ]
111
2015-01-06T20:26:31.000Z
2022-03-14T13:17:12.000Z
Benchmarks/benchmark-5.7.py
wangyonghong/RabbitMQ-in-Depth
56a35c6359d500b7597daf1bb2185b4c451a572c
[ "BSD-3-Clause" ]
4
2018-06-15T20:35:36.000Z
2021-01-13T16:03:40.000Z
Benchmarks/benchmark-5.7.py
wangyonghong/RabbitMQ-in-Depth
56a35c6359d500b7597daf1bb2185b4c451a572c
[ "BSD-3-Clause" ]
43
2015-04-18T13:44:01.000Z
2022-03-14T13:17:13.000Z
import logging import pika import sys import time from pika.adapters import tornado_connection LOGGER = logging.getLogger(__name__) QOS = int(sys.argv[1]) if len(sys.argv) == 2 else None ROUTING_KEY = 'benchmark_qos_%s' % QOS PROPERTIES = pika.BasicProperties(content_type='text/plain', delivery_mode=1) ITERATIONS =...
28.103448
77
0.699387
import logging import pika import sys import time from pika.adapters import tornado_connection LOGGER = logging.getLogger(__name__) QOS = int(sys.argv[1]) if len(sys.argv) == 2 else None ROUTING_KEY = 'benchmark_qos_%s' % QOS PROPERTIES = pika.BasicProperties(content_type='text/plain', delivery_mode=1) ITERATIONS =...
true
true
1c37753db0c226b586f85e6accb6d327b27976d0
2,687
py
Python
i3pystatus/alsa.py
rampage644/i3pystatus
b9846936e187cd80f15928e93ad6318755f84285
[ "MIT" ]
null
null
null
i3pystatus/alsa.py
rampage644/i3pystatus
b9846936e187cd80f15928e93ad6318755f84285
[ "MIT" ]
null
null
null
i3pystatus/alsa.py
rampage644/i3pystatus
b9846936e187cd80f15928e93ad6318755f84285
[ "MIT" ]
null
null
null
from alsaaudio import Mixer, ALSAAudioError from i3pystatus import IntervalModule class ALSA(IntervalModule): """ Shows volume of ALSA mixer. You can also use this for inputs, btw. Requires pyalsaaudio .. rubric:: Available formatters * `{volume}` — the current volume in percent * `{muted}...
26.87
95
0.589877
from alsaaudio import Mixer, ALSAAudioError from i3pystatus import IntervalModule class ALSA(IntervalModule): interval = 1 settings = ( "format", ("format_muted", "optional format string to use when muted"), ("mixer", "ALSA mixer"), ("mixer_id", "ALSA mixer id"), ("c...
true
true
1c37760711e3974012d6cdd128c7ad441e28bdfc
3,284
py
Python
tests/model_fields/test_datetimefield.py
ni-ning/django
2e7ba6057cfc82a15a22b6021cd60cf307152e2d
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
61,676
2015-01-01T00:05:13.000Z
2022-03-31T20:37:54.000Z
tests/model_fields/test_datetimefield.py
ni-ning/django
2e7ba6057cfc82a15a22b6021cd60cf307152e2d
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
8,884
2015-01-01T00:12:05.000Z
2022-03-31T19:53:11.000Z
tests/model_fields/test_datetimefield.py
mustafa0x/django
d7394cfa13a4d1a02356e3a83e10ec100fbb9948
[ "BSD-3-Clause", "0BSD" ]
33,143
2015-01-01T02:04:52.000Z
2022-03-31T19:42:46.000Z
import datetime from django.db import models from django.test import ( SimpleTestCase, TestCase, override_settings, skipUnlessDBFeature, ) from django.test.utils import requires_tz_support from django.utils import timezone from .models import DateTimeModel class DateTimeFieldTests(TestCase): def test_datet...
43.210526
115
0.66687
import datetime from django.db import models from django.test import ( SimpleTestCase, TestCase, override_settings, skipUnlessDBFeature, ) from django.test.utils import requires_tz_support from django.utils import timezone from .models import DateTimeModel class DateTimeFieldTests(TestCase): def test_datet...
true
true
1c37766f47d4d26e31b4e5368e90e8cb9c60838f
3,887
py
Python
tests/executors/test_debug_executor.py
IGIT-CN/airflow
a6e5bcd59198afe5716813e84ebc4c59eade532c
[ "Apache-2.0" ]
8
2017-04-20T16:15:44.000Z
2020-10-11T13:44:10.000Z
tests/executors/test_debug_executor.py
IGIT-CN/airflow
a6e5bcd59198afe5716813e84ebc4c59eade532c
[ "Apache-2.0" ]
219
2017-03-15T18:40:16.000Z
2022-02-28T22:52:43.000Z
tests/executors/test_debug_executor.py
IGIT-CN/airflow
a6e5bcd59198afe5716813e84ebc4c59eade532c
[ "Apache-2.0" ]
12
2020-01-09T14:02:39.000Z
2022-01-24T07:18:51.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
33.222222
86
0.67044
from unittest import mock from unittest.mock import MagicMock from airflow.executors.debug_executor import DebugExecutor from airflow.utils.state import State class TestDebugExecutor: @mock.patch("airflow.executors.debug_executor.DebugExecutor._run_task") def test_sync(self, run_task_mock): ...
true
true
1c377682872dd7bdff2c0e9c9a984c373303d8dc
563
py
Python
env/lib/python3.8/site-packages/plotly/validators/choroplethmapbox/stream/_token.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
76
2020-07-06T14:44:05.000Z
2022-02-14T15:30:21.000Z
env/lib/python3.8/site-packages/plotly/validators/choroplethmapbox/stream/_token.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
11
2020-08-09T02:30:14.000Z
2022-03-12T00:50:14.000Z
env/lib/python3.8/site-packages/plotly/validators/choroplethmapbox/stream/_token.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
11
2020-07-12T16:18:07.000Z
2022-02-05T16:48:35.000Z
import _plotly_utils.basevalidators class TokenValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="token", parent_name="choroplethmapbox.stream", **kwargs ): super(TokenValidator, self).__init__( plotly_name=plotly_name, parent_name...
33.117647
82
0.623446
import _plotly_utils.basevalidators class TokenValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="token", parent_name="choroplethmapbox.stream", **kwargs ): super(TokenValidator, self).__init__( plotly_name=plotly_name, parent_name...
true
true
1c37775300054e63a7495c24c8732a2a07c8d6e5
5,649
py
Python
Python Tutorial Reinforcement Learning/10_mario_a3c/src/process.py
PaulPan00/donkey_wrapper
a03cf0f42f65625fbce792b06c98acd153c5d6c8
[ "MIT" ]
6
2021-03-26T01:42:31.000Z
2021-04-11T16:17:42.000Z
Python Tutorial Reinforcement Learning/10_mario_a3c/src/process.py
packetsss/Python
a03cf0f42f65625fbce792b06c98acd153c5d6c8
[ "MIT" ]
null
null
null
Python Tutorial Reinforcement Learning/10_mario_a3c/src/process.py
packetsss/Python
a03cf0f42f65625fbce792b06c98acd153c5d6c8
[ "MIT" ]
7
2021-04-06T06:55:22.000Z
2021-05-03T11:26:38.000Z
# Create by Packetsss # Personal use is allowed # Commercial use is prohibited """ @author: Viet Nguyen <nhviet1009@gmail.com> """ import torch from src.env import create_train_env from src.model import ActorCritic import torch.nn.functional as F from torch.distributions import Categorical from collections import deq...
34.03012
108
0.576562
import torch from src.env import create_train_env from src.model import ActorCritic import torch.nn.functional as F from torch.distributions import Categorical from collections import deque from tensorboardX import SummaryWriter import timeit def local_train(index, opt, global_model, optimizer, save=False): ...
true
true
1c3778b44b02b78550788610afcbd3ba008c32b8
10,024
py
Python
src/m2.py
hinetg/05a-Debugging-201930
59977b30596abb722b5d12337ea771cecbca34d7
[ "MIT" ]
null
null
null
src/m2.py
hinetg/05a-Debugging-201930
59977b30596abb722b5d12337ea771cecbca34d7
[ "MIT" ]
null
null
null
src/m2.py
hinetg/05a-Debugging-201930
59977b30596abb722b5d12337ea771cecbca34d7
[ "MIT" ]
null
null
null
""" This module lets you practice DEBUGGING when RUN-TIME EXCEPTIONS occur, focusing here on AttributeError exceptions: 'BLAHType' object has no attribute 'FOO' and on TypeError exceptions, in particular those of the form: 'BLAHType' object is not callable. Authors: David Mutchler, Vibha Alangar, Matt Boutell, ...
36.450909
79
0.543895
import rosegraphics as rg
true
true
1c3778e807e3d679801befdc2b80d6a0bb75d415
7,279
py
Python
tests/test-scenario/test_scenario_deployment.py
KellyGriffin/kalc
9b78c4177ed9ffccbf1ecfbf9a7946286cd7c583
[ "Apache-2.0" ]
null
null
null
tests/test-scenario/test_scenario_deployment.py
KellyGriffin/kalc
9b78c4177ed9ffccbf1ecfbf9a7946286cd7c583
[ "Apache-2.0" ]
null
null
null
tests/test-scenario/test_scenario_deployment.py
KellyGriffin/kalc
9b78c4177ed9ffccbf1ecfbf9a7946286cd7c583
[ "Apache-2.0" ]
null
null
null
import pytest import yaml from kalc.model.kubernetes import KubernetesCluster from kalc.model.kinds.Pod import Pod from kalc.model.kinds.Node import Node from kalc.model.kinds.Service import Service from kalc.model.kinds.PriorityClass import PriorityClass from kalc.model.system.Scheduler import Scheduler from kalc.misc...
47.266234
133
0.717406
import pytest import yaml from kalc.model.kubernetes import KubernetesCluster from kalc.model.kinds.Pod import Pod from kalc.model.kinds.Node import Node from kalc.model.kinds.Service import Service from kalc.model.kinds.PriorityClass import PriorityClass from kalc.model.system.Scheduler import Scheduler from kalc.misc...
true
true
1c37796bd6373f0d448d043663153ff5129d85dd
190
py
Python
apps/upload/urls.py
plsof/tabops_api
39f5d2fd5158ae0c22e43ab6ff7e2b07a68a62d8
[ "MIT" ]
1
2019-07-31T07:34:38.000Z
2019-07-31T07:34:38.000Z
apps/upload/urls.py
plsof/tabops_api
39f5d2fd5158ae0c22e43ab6ff7e2b07a68a62d8
[ "MIT" ]
9
2019-12-05T00:39:29.000Z
2022-02-10T14:13:29.000Z
apps/upload/urls.py
plsof/tabops_api
39f5d2fd5158ae0c22e43ab6ff7e2b07a68a62d8
[ "MIT" ]
null
null
null
from django.urls import path from .views import FileUploadView, FileDetailView urlpatterns = [ path(r'', FileUploadView.as_view()), path(r'<int:pk>/', FileDetailView.as_view()), ]
21.111111
49
0.710526
from django.urls import path from .views import FileUploadView, FileDetailView urlpatterns = [ path(r'', FileUploadView.as_view()), path(r'<int:pk>/', FileDetailView.as_view()), ]
true
true
1c3779f5382b829d1b98a26eb814a39ec688a54b
2,242
py
Python
parliament-member-details/__init__.py
it-pebune/ani-research-web-scraping
16a8ac9eaec93144a515f803e9579b96a041b817
[ "MIT" ]
null
null
null
parliament-member-details/__init__.py
it-pebune/ani-research-web-scraping
16a8ac9eaec93144a515f803e9579b96a041b817
[ "MIT" ]
18
2022-01-20T11:22:35.000Z
2022-03-06T21:22:48.000Z
parliament-member-details/__init__.py
it-pebune/ani-research-web-scraping
16a8ac9eaec93144a515f803e9579b96a041b817
[ "MIT" ]
null
null
null
import logging import azure.functions as func def main(req: func.HttpRequest) -> func.HttpResponse: logging.info("Python HTTP trigger function processed a request.") import requests import json from bs4 import BeautifulSoup from bs4.dammit import EncodingDetector legislature = req.params.ge...
32.028571
102
0.642284
import logging import azure.functions as func def main(req: func.HttpRequest) -> func.HttpResponse: logging.info("Python HTTP trigger function processed a request.") import requests import json from bs4 import BeautifulSoup from bs4.dammit import EncodingDetector legislature = req.params.ge...
true
true
1c377a566a79a1c13d9805eef9db66ccd897bedf
69,535
py
Python
lib/googlecloudsdk/command_lib/container/flags.py
bshaffer/google-cloud-sdk
f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/command_lib/container/flags.py
bshaffer/google-cloud-sdk
f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/command_lib/container/flags.py
bshaffer/google-cloud-sdk
f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright 2016 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 requir...
33.222647
152
0.708708
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from googlecloudsdk.api_lib.compute import constants as compute_constants from googlecloudsdk.api_lib.container import api_adapter from googlecloudsdk.api_lib.container import util from googlec...
true
true
1c377b03177a99ae33f94bd9d8e85c41376fd0a1
2,189
py
Python
test/11/Sort.py
behappycc/USB-Driver
d3a2f1fb195c69d4b4631ab392497cba81a71f1b
[ "MIT" ]
null
null
null
test/11/Sort.py
behappycc/USB-Driver
d3a2f1fb195c69d4b4631ab392497cba81a71f1b
[ "MIT" ]
null
null
null
test/11/Sort.py
behappycc/USB-Driver
d3a2f1fb195c69d4b4631ab392497cba81a71f1b
[ "MIT" ]
null
null
null
alist = [54,26,93,17,77,31,44,55,21] def bubbleSort(blist): for i in range(len(alist)-1, 0, -1): for j in range(i): if alist[j] > alist[j + 1]: alist[j], alist[j+1] = alist[j+1], alist[j] bubbleSort(alist) print alist def selectionSort(alist): for i in range(len(alist)-1,0,-1)...
27.3625
138
0.588397
alist = [54,26,93,17,77,31,44,55,21] def bubbleSort(blist): for i in range(len(alist)-1, 0, -1): for j in range(i): if alist[j] > alist[j + 1]: alist[j], alist[j+1] = alist[j+1], alist[j] bubbleSort(alist) print alist def selectionSort(alist): for i in range(len(alist)-1,0,-1)...
false
true
1c377b44182e00a970cf22713af3d0bbf658d4da
10,340
py
Python
mosdef_slitpore/analysis.py
rsdefever/mosdef_slitpore
2150d1d0e062bf6aac660be8ae73d94e2a3c4438
[ "MIT" ]
3
2021-01-20T15:05:19.000Z
2022-02-05T16:43:00.000Z
mosdef_slitpore/analysis.py
rsdefever/mosdef_slitpore
2150d1d0e062bf6aac660be8ae73d94e2a3c4438
[ "MIT" ]
3
2020-12-01T01:04:27.000Z
2020-12-09T01:00:15.000Z
mosdef_slitpore/analysis.py
rsdefever/mosdef_slitpore
2150d1d0e062bf6aac660be8ae73d94e2a3c4438
[ "MIT" ]
3
2021-01-20T02:27:33.000Z
2021-11-19T21:15:07.000Z
import numpy as np def compute_density( traj, area, surface_normal_dim=2, pore_center=0.0, max_distance=1.0, bin_width=0.01, symmetrize=False, ): """Compute the density of traj in atoms/nm^3 Parameters ---------- traj : mdtraj.Trajectory, trajectory to analyze ...
35.050847
91
0.611122
import numpy as np def compute_density( traj, area, surface_normal_dim=2, pore_center=0.0, max_distance=1.0, bin_width=0.01, symmetrize=False, ): if symmetrize: distances = abs(traj.xyz[:, :, surface_normal_dim] - pore_center) else: distances = traj.xyz[:, :, surfac...
true
true
1c377c34b7a688d8e50a75b5faa66c9c8af0bd98
3,645
py
Python
server/app/routes.py
fatematzuhora/2mb-random-objects
c9bd7e1477bf69d12ed300be912137aebdc1e5c3
[ "MIT" ]
null
null
null
server/app/routes.py
fatematzuhora/2mb-random-objects
c9bd7e1477bf69d12ed300be912137aebdc1e5c3
[ "MIT" ]
null
null
null
server/app/routes.py
fatematzuhora/2mb-random-objects
c9bd7e1477bf69d12ed300be912137aebdc1e5c3
[ "MIT" ]
null
null
null
'''app routes''' import os import traceback from random import choice, randint, uniform from string import ascii_lowercase, digits from flask import jsonify, make_response from flask_cors import cross_origin from app import app def alphabetical_string(limit): '''generate alphabetical_string with a given range ...
31.422414
90
0.579424
import os import traceback from random import choice, randint, uniform from string import ascii_lowercase, digits from flask import jsonify, make_response from flask_cors import cross_origin from app import app def alphabetical_string(limit): obj = ''.join(choice(ascii_lowercase) for _ in range(limit)) return...
true
true
1c377cad6be391bc997b30a47dba86eff9e00e25
390
py
Python
server/server.py
vertica/hackathon
2f42beda38052f2da02b80b4c7d3e0a499d6c1c7
[ "Apache-2.0" ]
6
2016-10-15T16:59:04.000Z
2018-02-22T17:22:28.000Z
server/server.py
vertica/hackathon
2f42beda38052f2da02b80b4c7d3e0a499d6c1c7
[ "Apache-2.0" ]
1
2016-10-12T17:23:33.000Z
2016-10-12T17:23:33.000Z
server/server.py
vertica/hackathon
2f42beda38052f2da02b80b4c7d3e0a499d6c1c7
[ "Apache-2.0" ]
null
null
null
import os import sys sys.path.append(os.getcwd() + "/deps") from flask import Flask from flask import render_template app = Flask(__name__) import db_model as db import json from datetime import date from datetime import timedelta @app.route("/") def index(): results = db.select_one() return render_temp...
15
40
0.712821
import os import sys sys.path.append(os.getcwd() + "/deps") from flask import Flask from flask import render_template app = Flask(__name__) import db_model as db import json from datetime import date from datetime import timedelta @app.route("/") def index(): results = db.select_one() return render_temp...
true
true
1c377d3e4195e40bbba9ebf6060736f88c5127cf
728
py
Python
meiduo_mall/meiduo_mall/apps/orders/adminx.py
huzing2524/Django_MallWeb
a48d5be95a20867efb57235b09e2d6c65c5d8e3c
[ "MIT" ]
2
2020-05-21T03:51:27.000Z
2020-10-21T06:58:58.000Z
meiduo_mall/meiduo_mall/apps/orders/adminx.py
huzing2524/Django_MallWeb
a48d5be95a20867efb57235b09e2d6c65c5d8e3c
[ "MIT" ]
4
2020-02-23T08:48:53.000Z
2021-06-10T20:43:47.000Z
meiduo_mall/meiduo_mall/apps/orders/adminx.py
huzing2524/Django_MallWeb
a48d5be95a20867efb57235b09e2d6c65c5d8e3c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import xadmin from orders.models import OrderInfo class OrderInfoAdmin(object): """订单信息折线图""" model_icon = "fa fa-shopping-cart" # 图标 refresh_times = [3, 5] # 可选以支持按多长时间(秒)刷新页面 # title 控制图标名称 # x-field 控制x轴字段 # y-field 控制y轴字段,可以是多个值 # title 控制图标名称;x-field 控制x轴字段;...
30.333333
97
0.589286
import xadmin from orders.models import OrderInfo class OrderInfoAdmin(object): model_icon = "fa fa-shopping-cart" refresh_times = [3, 5] data_charts = { "order_amount": {"title": "订单金额", "x-field": "create_time", "y-field": ("total_amount",), "or...
true
true
1c377ea32e1ab4c69a8929900cf11416ea8b8566
7,885
py
Python
cinder/volume/drivers/fujitsu/eternus_dx_fc.py
ISCAS-VDI/cinder-base
9529102548beef074264aaef31fa8267db99df61
[ "Apache-2.0" ]
null
null
null
cinder/volume/drivers/fujitsu/eternus_dx_fc.py
ISCAS-VDI/cinder-base
9529102548beef074264aaef31fa8267db99df61
[ "Apache-2.0" ]
1
2021-03-21T11:38:29.000Z
2021-03-21T11:38:29.000Z
cinder/volume/drivers/fujitsu/eternus_dx_fc.py
ISCAS-VDI/cinder-base
9529102548beef074264aaef31fa8267db99df61
[ "Apache-2.0" ]
1
2021-03-21T11:37:47.000Z
2021-03-21T11:37:47.000Z
# Copyright (c) 2015 FUJITSU LIMITED # Copyright (c) 2012 EMC Corporation. # Copyright (c) 2012 OpenStack Foundation # 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 Licen...
36.674419
79
0.611795
from oslo_log import log as logging import six from cinder.volume import driver from cinder.volume.drivers.fujitsu import eternus_dx_common from cinder.zonemanager import utils as fczm_utils LOG = logging.getLogger(__name__) class FJDXFCDriver(driver.FibreChannelDriver): def __init__(self, *a...
true
true
1c377fbdffc7e939aac9a2f7bc4d0933a1addc8e
4,062
py
Python
datasets/mvtec.py
endrol/Anomaly_Clustering
670546751543f1d919c4a788e96bcf4405e3423c
[ "MIT" ]
null
null
null
datasets/mvtec.py
endrol/Anomaly_Clustering
670546751543f1d919c4a788e96bcf4405e3423c
[ "MIT" ]
null
null
null
datasets/mvtec.py
endrol/Anomaly_Clustering
670546751543f1d919c4a788e96bcf4405e3423c
[ "MIT" ]
null
null
null
import os import sys from pathlib import Path from typing import List, Tuple, Union import numpy as np import torch from PIL import Image from torch import Tensor from torch.utils.data import Dataset from torchvision import transforms as T import config as c __all__ = ("MVTecDataset") # URL = 'ftp://guest:GU.205dld...
30.772727
105
0.549483
import os import sys from pathlib import Path from typing import List, Tuple, Union import numpy as np import torch from PIL import Image from torch import Tensor from torch.utils.data import Dataset from torchvision import transforms as T import config as c __all__ = ("MVTecDataset") MVTEC_CLASS_NAMES = [ "bo...
true
true
1c3780fe5e97c0cbeb6ccf8821cb0b6803774c70
3,750
py
Python
lib/lane.py
bajcmartinez/Finding-Car-Lanes-Without-Deep-Learning
2d660ce1f6f3ed5c57ddd919a13b65853dee0758
[ "MIT" ]
3
2021-09-06T18:02:33.000Z
2021-12-04T20:10:36.000Z
lib/lane.py
bajcmartinez/Finding-Car-Lanes-Without-Deep-Learning
2d660ce1f6f3ed5c57ddd919a13b65853dee0758
[ "MIT" ]
9
2021-04-26T15:08:20.000Z
2021-09-08T07:10:33.000Z
lib/lane.py
bajcmartinez/Finding-Car-Lanes-Without-Deep-Learning
2d660ce1f6f3ed5c57ddd919a13b65853dee0758
[ "MIT" ]
null
null
null
import numpy as np import cv2 class Lane(): """ Define a class to receive the characteristics of each line detection """ def __init__(self, xm_per_pix, ym_per_pix): # was the line detected in the last iteration? self.detected = False # x values of the last n fits of the line ...
36.764706
122
0.5984
import numpy as np import cv2 class Lane(): def __init__(self, xm_per_pix, ym_per_pix): self.detected = False self.recent_x_fitted = [] self.best_x = None self.best_fit = None self.current_fit = [np.array([False])] ...
true
true
1c37823592f2b40118fd94b5e61dc5fb79f4e468
1,390
py
Python
Data_Structures/Script02.py
Robert-Ma/Python_Exercises
73498f7e44aea452b549776dad57545ccc27f355
[ "MIT" ]
null
null
null
Data_Structures/Script02.py
Robert-Ma/Python_Exercises
73498f7e44aea452b549776dad57545ccc27f355
[ "MIT" ]
null
null
null
Data_Structures/Script02.py
Robert-Ma/Python_Exercises
73498f7e44aea452b549776dad57545ccc27f355
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ Write a Python program to iterate over an enum class and display individual member and their value; Write a Python program to display all the member name of an enum class ordered by their values. Write a Python program to get all values from an enum class. """ from enum import Enum class C...
25.740741
99
0.615827
from enum import Enum class Country(Enum): Afghaistan = 93 Albania = 355 Algeria = 213 Andorra = 376 Angola = 244 Antarctica = 672 def __ge__(self, other): if self.__class__ is other.__class__: return self.value >= other.value else: r...
true
true
1c37832438c7ced5e2d754a8126138d1e1be8b9e
14,324
py
Python
examples/03-magnetics/plot_inv_mag_MVI_Sparse_TreeMesh.py
jcapriot/simpeg
e88e653673c6b818592b6c075f76ee9215fe82b7
[ "MIT" ]
1
2020-06-04T21:57:47.000Z
2020-06-04T21:57:47.000Z
examples/03-magnetics/plot_inv_mag_MVI_Sparse_TreeMesh.py
jcapriot/simpeg
e88e653673c6b818592b6c075f76ee9215fe82b7
[ "MIT" ]
null
null
null
examples/03-magnetics/plot_inv_mag_MVI_Sparse_TreeMesh.py
jcapriot/simpeg
e88e653673c6b818592b6c075f76ee9215fe82b7
[ "MIT" ]
1
2021-01-05T18:16:54.000Z
2021-01-05T18:16:54.000Z
""" Magnetic inversion on a TreeMesh ================================ In this example, we demonstrate the use of a Magnetic Vector Inverison on 3D TreeMesh for the inversion of magnetic affected by remanence. The mesh is auto-generate based on the position of the observation locations and topography. We invert the da...
28.252465
86
0.669785
from discretize import TreeMesh from SimPEG import ( data, data_misfit, directives, maps, inverse_problem, optimization, inversion, regularization, ) from SimPEG import utils from SimPEG.utils import mkvc from discretize.utils import mesh_builder_xyz, refine_tree_xyz from SimPEG.poten...
true
true
1c378325f2d1b1ac52d86fca34abbb71261ec135
2,811
py
Python
tests/tests/correctness/EPLAnalytics/Detectors/Drift/drift_cor_006/run.py
rpeach-sag/apama-industry-analytics-kit
a3f6039915501d41251b6f7ec41b0cb8111baf7b
[ "Apache-2.0" ]
3
2019-09-02T18:21:22.000Z
2020-04-17T16:34:57.000Z
tests/tests/correctness/EPLAnalytics/Detectors/Drift/drift_cor_006/run.py
rpeach-sag/apama-industry-analytics-kit
a3f6039915501d41251b6f7ec41b0cb8111baf7b
[ "Apache-2.0" ]
null
null
null
tests/tests/correctness/EPLAnalytics/Detectors/Drift/drift_cor_006/run.py
rpeach-sag/apama-industry-analytics-kit
a3f6039915501d41251b6f7ec41b0cb8111baf7b
[ "Apache-2.0" ]
null
null
null
# $Copyright (c) 2015 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel an...
50.196429
343
0.711491
from industry.framework.AnalyticsBaseTest import AnalyticsBaseTest from pysys.constants import * class PySysTest(AnalyticsBaseTest): def execute(self): correlator = self.startTest(logfile='correlator.log', logLevel="DEBUG") self.injectAnalytic(correlator) self.injectDrift(correlator) self.read...
true
true
1c37840cb570ab3ca2252b7cfd8d758f9e8e0853
14,975
gyp
Python
chrome/chrome_nibs.gyp
pozdnyakov/chromium-crosswalk
0fb25c7278bf1d93e53a3b0bcb75aa8b99d4b26e
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2
2020-05-03T06:33:56.000Z
2021-11-14T18:39:42.000Z
chrome/chrome_nibs.gyp
pozdnyakov/chromium-crosswalk
0fb25c7278bf1d93e53a3b0bcb75aa8b99d4b26e
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
chrome/chrome_nibs.gyp
pozdnyakov/chromium-crosswalk
0fb25c7278bf1d93e53a3b0bcb75aa8b99d4b26e
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # This gyp file creates a fake target that is used to generate a minimal Xcode # project, useful for editing XIB files. # # The sole target is called "ch...
54.85348
82
0.71606
{ 'variables': { 'chromium_code': 1, }, 'includes': [ '../build/common.gypi', 'chrome_nibs.gypi', ], 'target_defaults': { 'include_dirs': [ '..', ], }, 'targets': [ { 'target_name': 'chrome_nibs', 'type': 'executable', 'mac_bundle': 1, ...
true
true
1c378411dc0d9a317865cb079a9677841b706018
1,737
py
Python
rules_default/castervoice/rules/apps/file_manager/fman.py
MLH-Fellowship/LarynxCode
840fee18c689a357052825607c27fc8e3e56571c
[ "MIT" ]
1
2021-09-17T06:11:02.000Z
2021-09-17T06:11:02.000Z
rules_default/castervoice/rules/apps/file_manager/fman.py
soma2000-lang/LarynxCode
840fee18c689a357052825607c27fc8e3e56571c
[ "MIT" ]
5
2021-02-03T05:29:41.000Z
2021-02-08T01:14:11.000Z
rules_default/castervoice/rules/apps/file_manager/fman.py
soma2000-lang/LarynxCode
840fee18c689a357052825607c27fc8e3e56571c
[ "MIT" ]
4
2021-02-03T05:05:00.000Z
2021-07-14T06:21:10.000Z
from dragonfly import Pause, Choice, MappingRule from castervoice.lib.actions import Key, Text from castervoice.lib.ctrl.mgr.rule_details import RuleDetails from castervoice.lib.merge.additions import IntegerRefST from castervoice.lib.merge.state.short import R class fmanRule(MappingRule): mapping = { "...
32.773585
81
0.513529
from dragonfly import Pause, Choice, MappingRule from castervoice.lib.actions import Key, Text from castervoice.lib.ctrl.mgr.rule_details import RuleDetails from castervoice.lib.merge.additions import IntegerRefST from castervoice.lib.merge.state.short import R class fmanRule(MappingRule): mapping = { "...
true
true
1c378428ca95d2a4b7ad7546d2de1252b906f46e
935
py
Python
spackmon/apps/users/urls.py
iarspider/spack-monitor
89acf94dc664b598d9f73292ae4d61fdccf3ac5b
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2021-02-24T23:16:27.000Z
2021-04-01T17:33:28.000Z
spackmon/apps/users/urls.py
iarspider/spack-monitor
89acf94dc664b598d9f73292ae4d61fdccf3ac5b
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
18
2021-02-11T00:57:53.000Z
2021-12-09T16:30:17.000Z
spackmon/apps/users/urls.py
iarspider/spack-monitor
89acf94dc664b598d9f73292ae4d61fdccf3ac5b
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1
2021-12-08T12:16:15.000Z
2021-12-08T12:16:15.000Z
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from django.conf.urls import url, include from spackmon.apps.users import views urlpatterns = [ url(r"^login/$", view...
40.652174
86
0.687701
from django.conf.urls import url, include from spackmon.apps.users import views urlpatterns = [ url(r"^login/$", views.login, name="login"), url(r"^accounts/login/$", views.login), url(r"^logout/$", views.logout, name="logout"), url(r"^token$", views.view_token, name="token"), url(r"^auth/toke...
true
true
1c378433f864aabda3b3f783b8fd8b24dfada973
1,633
py
Python
src/tars/utils/runner.py
fredmontet/tars
922786e8c6456fc0cc1a9db07714f11dd78219d9
[ "MIT" ]
3
2022-02-06T14:41:07.000Z
2022-03-25T16:27:45.000Z
src/tars/utils/runner.py
fredmontet/tars
922786e8c6456fc0cc1a9db07714f11dd78219d9
[ "MIT" ]
6
2021-09-20T03:33:31.000Z
2022-03-24T09:00:48.000Z
src/tars/utils/runner.py
fredmontet/tars
922786e8c6456fc0cc1a9db07714f11dd78219d9
[ "MIT" ]
null
null
null
import logging from typing import Callable, NoReturn from time import sleep from pandas import Timestamp, Timedelta class Runner: """ A Runner represent an object able to execute a function through time. The function can be executed with a chosen frequency e.g. every 10 seconds and for a optional du...
34.020833
168
0.636252
import logging from typing import Callable, NoReturn from time import sleep from pandas import Timestamp, Timedelta class Runner: def __init__(self): self.is_running = False def start(self, func: Callable, frequency: str, duration: str = None) \ -> NoReturn: self.is_runnin...
true
true
1c3784e5f59565c371126fac3abd2bbea28cfca3
7,188
py
Python
toontown/toon/DistributedNPCPetclerkAI.py
journeyfan/toontown-journey
7a4db507e5c1c38a014fc65588086d9655aaa5b4
[ "MIT" ]
1
2020-09-27T22:12:47.000Z
2020-09-27T22:12:47.000Z
toontown/toon/DistributedNPCPetclerkAI.py
journeyfan/toontown-journey
7a4db507e5c1c38a014fc65588086d9655aaa5b4
[ "MIT" ]
null
null
null
toontown/toon/DistributedNPCPetclerkAI.py
journeyfan/toontown-journey
7a4db507e5c1c38a014fc65588086d9655aaa5b4
[ "MIT" ]
2
2020-09-26T20:37:18.000Z
2020-11-15T20:55:33.000Z
from otp.ai.AIBaseGlobal import * from pandac.PandaModules import * from .DistributedNPCToonBaseAI import * from toontown.toonbase import TTLocalizer from direct.task import Task from toontown.fishing import FishGlobals from toontown.pets import PetUtil, PetDNA, PetConstants from toontown.hood import ZoneUtil class Di...
46.076923
135
0.644546
from otp.ai.AIBaseGlobal import * from pandac.PandaModules import * from .DistributedNPCToonBaseAI import * from toontown.toonbase import TTLocalizer from direct.task import Task from toontown.fishing import FishGlobals from toontown.pets import PetUtil, PetDNA, PetConstants from toontown.hood import ZoneUtil class Di...
true
true
1c3785219c8448bb97b21b1931f5cfeb475fe9a1
3,353
py
Python
alf/utils/encoding_network.py
ruizhaogit/alf
be1e65afa5f8401236d98db8f85a5e27fa1e18dc
[ "Apache-2.0" ]
2
2021-03-22T14:57:03.000Z
2021-09-28T07:02:10.000Z
alf/utils/encoding_network.py
ruizhaogit/alf
be1e65afa5f8401236d98db8f85a5e27fa1e18dc
[ "Apache-2.0" ]
null
null
null
alf/utils/encoding_network.py
ruizhaogit/alf
be1e65afa5f8401236d98db8f85a5e27fa1e18dc
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2019 Horizon Robotics. 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 applicab...
44.706667
85
0.66776
import tensorflow as tf from tf_agents.networks.encoding_network import EncodingNetwork as TFAEncodingNetwork from alf.layers import NestConcatenate class EncodingNetwork(TFAEncodingNetwork): def __init__(self, input_tensor_spec, last_layer_size, l...
true
true
1c378541630648325ed14f8cb9e318107b6a9270
828
py
Python
src/datadog_api_client/v2/__init__.py
MichaelTROEHLER/datadog-api-client-python
12c46626622fb1277bb1e172753b342c671348bd
[ "Apache-2.0" ]
null
null
null
src/datadog_api_client/v2/__init__.py
MichaelTROEHLER/datadog-api-client-python
12c46626622fb1277bb1e172753b342c671348bd
[ "Apache-2.0" ]
null
null
null
src/datadog_api_client/v2/__init__.py
MichaelTROEHLER/datadog-api-client-python
12c46626622fb1277bb1e172753b342c671348bd
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # flake8: noqa # Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2019-Present Datadog, Inc. __version__ = "0.1.0" # import ApiClient from datado...
33.12
108
0.838164
__version__ = "0.1.0" from datadog_api_client.v2.api_client import ApiClient from datadog_api_client.v2.configuration import Configuration from datadog_api_client.v2.exceptions import OpenApiException from datadog_api_client.v2.exceptions import ApiAttributeError from datadog_api_client.v2.exceptions imp...
true
true
1c378588a920518877a2c0491d68e007cd89eb9f
559
py
Python
portafolio/core/urls.py
jhonfmg7/portafolioDjangoV2
f8fe158b97a79c148b062ae0410ef2c2d5938b8f
[ "Apache-2.0" ]
null
null
null
portafolio/core/urls.py
jhonfmg7/portafolioDjangoV2
f8fe158b97a79c148b062ae0410ef2c2d5938b8f
[ "Apache-2.0" ]
null
null
null
portafolio/core/urls.py
jhonfmg7/portafolioDjangoV2
f8fe158b97a79c148b062ae0410ef2c2d5938b8f
[ "Apache-2.0" ]
null
null
null
from django.urls import path from django.conf import settings from django.conf.urls.static import static from .views import * urlpatterns = [ path('', index, name='home'), path('about/', about, name='about'), path('projects/', projects, name='projects'), path('career/', career, name='career'), path...
31.055556
80
0.683363
from django.urls import path from django.conf import settings from django.conf.urls.static import static from .views import * urlpatterns = [ path('', index, name='home'), path('about/', about, name='about'), path('projects/', projects, name='projects'), path('career/', career, name='career'), path...
true
true
1c378635eb3ba1d00f160fd94b3d23eeeb5edfc2
811
py
Python
dts_web/urls.py
StitchIQ/DTS_Django
56bc33cc2640d9f69b61e26960c7a5dd2fcca8ae
[ "MIT" ]
null
null
null
dts_web/urls.py
StitchIQ/DTS_Django
56bc33cc2640d9f69b61e26960c7a5dd2fcca8ae
[ "MIT" ]
11
2018-05-16T14:09:11.000Z
2018-05-24T14:21:44.000Z
dts_web/urls.py
StitchIQ/DTS_Django
56bc33cc2640d9f69b61e26960c7a5dd2fcca8ae
[ "MIT" ]
null
null
null
"""dts_web URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based...
32.44
77
0.709001
from django.contrib import admin from django.urls import path import apps.views as html_view urlpatterns = [ path('admin/', admin.site.urls), path('', html_view.index) ]
true
true
1c3788f81631f4e1393be698931fd2d2782edca1
2,494
py
Python
python/cloudNode.py
leekcake/CloudConvert
1d5d9d56f85118d2cdb2922975e571084001fb85
[ "MIT" ]
null
null
null
python/cloudNode.py
leekcake/CloudConvert
1d5d9d56f85118d2cdb2922975e571084001fb85
[ "MIT" ]
null
null
null
python/cloudNode.py
leekcake/CloudConvert
1d5d9d56f85118d2cdb2922975e571084001fb85
[ "MIT" ]
null
null
null
import logging import math import socket import subprocess import sys import threading import time from io import BytesIO def recvall(sock, n): data = bytearray() while len(data) < n: sock.settimeout(10.0) packet = sock.recv(n - len(data)) if not packet: continue da...
31.56962
120
0.520449
import logging import math import socket import subprocess import sys import threading import time from io import BytesIO def recvall(sock, n): data = bytearray() while len(data) < n: sock.settimeout(10.0) packet = sock.recv(n - len(data)) if not packet: continue da...
true
true
1c37897542d6f4130fd2a54c1f027e1c6ca61361
3,797
py
Python
files/targets/linux_app/verbs/build.py
archive-repository/ezored-udemy
87d8120cf3a81e204daa1fad6036deec82f85789
[ "MIT" ]
null
null
null
files/targets/linux_app/verbs/build.py
archive-repository/ezored-udemy
87d8120cf3a81e204daa1fad6036deec82f85789
[ "MIT" ]
null
null
null
files/targets/linux_app/verbs/build.py
archive-repository/ezored-udemy
87d8120cf3a81e204daa1fad6036deec82f85789
[ "MIT" ]
null
null
null
"""Build executable""" import os import ezored.app.const as const from ezored.modules import file from ezored.modules import log from ezored.modules import runner from ezored.modules import util from files.config import target_linux_app as config # -------------------------------------------------------------------...
34.834862
85
0.458257
import os import ezored.app.const as const from ezored.modules import file from ezored.modules import log from ezored.modules import runner from ezored.modules import util from files.config import target_linux_app as config def run(params): proj_path = params["proj_path"] target_name = params["target_name"...
true
true
1c3789df973937f74f2cd8884e7b642413a40bc3
3,395
py
Python
tests/test_clients_AliClient.py
amitmalav/service-fabrik-backup-restore
5c1c46de8c9aba618906dda7f91e3c210cbf49c5
[ "Apache-2.0" ]
null
null
null
tests/test_clients_AliClient.py
amitmalav/service-fabrik-backup-restore
5c1c46de8c9aba618906dda7f91e3c210cbf49c5
[ "Apache-2.0" ]
null
null
null
tests/test_clients_AliClient.py
amitmalav/service-fabrik-backup-restore
5c1c46de8c9aba618906dda7f91e3c210cbf49c5
[ "Apache-2.0" ]
null
null
null
from tests.utils.utilities import create_start_patcher, stop_all_patchers from lib.clients.AliClient import AliClient from lib.clients.BaseClient import BaseClient import oss2 import os import pytest #Test data valid_container = 'backup-container' invalid_container = 'invalid-container' configuration = { 'credh...
33.284314
148
0.699558
from tests.utils.utilities import create_start_patcher, stop_all_patchers from lib.clients.AliClient import AliClient from lib.clients.BaseClient import BaseClient import oss2 import os import pytest valid_container = 'backup-container' invalid_container = 'invalid-container' configuration = { 'credhub_url' : ...
true
true
1c378a4dc71a9174c39b3e4f11e98ba2f71d02d9
2,002
py
Python
cdApi/coupon.py
renqiukai/cd_api
4f1f641adaf031252b097db03249a2581268cc11
[ "MIT" ]
null
null
null
cdApi/coupon.py
renqiukai/cd_api
4f1f641adaf031252b097db03249a2581268cc11
[ "MIT" ]
null
null
null
cdApi/coupon.py
renqiukai/cd_api
4f1f641adaf031252b097db03249a2581268cc11
[ "MIT" ]
null
null
null
''' @说明 :优惠券接口。 @时间 :2020/3/19 下午4:51:48 @作者 :任秋锴 @版本 :1.0 ''' from .base import base class coupon(base): def __init__(self, token): super().__init__(token) def list(self, couponType=None, distType=None, storeId=None, companyId=None, name=None, typ...
25.341772
76
0.528472
from .base import base class coupon(base): def __init__(self, token): super().__init__(token) def list(self, couponType=None, distType=None, storeId=None, companyId=None, name=None, type=0, pageNum=1, pageSize=10): api_name = "manager/coup...
true
true