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
1c0a83b7f6c7dc26fea57c794d161895a02881d9
2,585
py
Python
tigerforecast/utils/optimizers/ogd.py
danielsuo/TigerForecast
ae18b169d96dd81db88ab27a8b055036845d3a8f
[ "Apache-2.0" ]
1
2020-07-28T09:07:29.000Z
2020-07-28T09:07:29.000Z
tigerforecast/utils/optimizers/ogd.py
danielsuo/TigerForecast
ae18b169d96dd81db88ab27a8b055036845d3a8f
[ "Apache-2.0" ]
null
null
null
tigerforecast/utils/optimizers/ogd.py
danielsuo/TigerForecast
ae18b169d96dd81db88ab27a8b055036845d3a8f
[ "Apache-2.0" ]
1
2021-04-12T22:39:26.000Z
2021-04-12T22:39:26.000Z
''' OGD optimizer ''' import jax.numpy as np from tigerforecast.utils.optimizers.core import Optimizer from tigerforecast.utils.optimizers.losses import mse from tigerforecast import error class OGD(Optimizer): """ Description: Ordinary Gradient Descent optimizer. Args: pred (function): a predictio...
36.928571
115
0.63559
import jax.numpy as np from tigerforecast.utils.optimizers.core import Optimizer from tigerforecast.utils.optimizers.losses import mse from tigerforecast import error class OGD(Optimizer): def __init__(self, pred=None, loss=mse, learning_rate=1.0, hyperparameters={}): self.initialized = False self....
true
true
1c0a8457afee6303b9163cccfee33c1cb442d783
1,514
py
Python
PILDemo.py
yu961549745/pynote
5976aeeca6368c0956baddf6a9ccb93ae8e0612a
[ "MIT" ]
null
null
null
PILDemo.py
yu961549745/pynote
5976aeeca6368c0956baddf6a9ccb93ae8e0612a
[ "MIT" ]
null
null
null
PILDemo.py
yu961549745/pynote
5976aeeca6368c0956baddf6a9ccb93ae8e0612a
[ "MIT" ]
null
null
null
""" PIL Demo Ref: http://www.liaoxuefeng.com/wiki/0014316089557264a6b348958f449949df42a6d3a2e542c000/0014320027235877860c87af5544f25a8deeb55141d60c5000 """ #%% from PIL import Image, ImageDraw, ImageFont, ImageFilter import random def rndChar(): return chr(random.randint(65, 90)) # 根据随机ascii码,返回对应字符 def rndCol...
32.212766
138
0.677015
from PIL import Image, ImageDraw, ImageFont, ImageFilter import random def rndChar(): return chr(random.randint(65, 90)) def rndColor(): return (random.randint(64, 255), random.randint(64, 255), random.randint(64, 255)) def rndColor2(): return (random.randint(32, 127), random.randint(32, 127), ra...
true
true
1c0a84bd5ffceb6a3560a4ec2bf7d1bd86a67432
2,371
py
Python
asyncsleepiq/sleeper.py
mfugate1/asyncsleepiq
aeec67cdf017b0e8fc50f7da37001e7a984f37d2
[ "MIT" ]
null
null
null
asyncsleepiq/sleeper.py
mfugate1/asyncsleepiq
aeec67cdf017b0e8fc50f7da37001e7a984f37d2
[ "MIT" ]
null
null
null
asyncsleepiq/sleeper.py
mfugate1/asyncsleepiq
aeec67cdf017b0e8fc50f7da37001e7a984f37d2
[ "MIT" ]
null
null
null
"""Sleeper representation for SleepIQ API.""" from __future__ import annotations from .api import SleepIQAPI class SleepIQSleeper: """Sleeper representation for SleepIQ API.""" def __init__( self, api: SleepIQAPI, bed_id: str, sleeper_id: str, side: str ) -> None: """Initiali...
39.516667
105
0.60523
from __future__ import annotations from .api import SleepIQAPI class SleepIQSleeper: def __init__( self, api: SleepIQAPI, bed_id: str, sleeper_id: str, side: str ) -> None: self.api = api self.bed_id = bed_id self.sleeper_id = sleeper_id self.side = side[...
true
true
1c0a84c3c838d8aaeb7f83d1537492075cbd478b
4,938
py
Python
migration/pocs/weblogic-wls-2017-10271_all_rce.py
cocobear/fuxi
a3916131689d82ce6b804e0993d89f755d1108ec
[ "MIT" ]
731
2018-06-13T05:41:04.000Z
2019-09-06T01:36:57.000Z
migration/pocs/weblogic-wls-2017-10271_all_rce.py
riusksk/fuxi
fadb1136b8896fe2a0f7783627bda867d5e6fd98
[ "MIT" ]
16
2019-10-14T08:17:13.000Z
2021-12-13T20:13:23.000Z
migration/pocs/weblogic-wls-2017-10271_all_rce.py
riusksk/fuxi
fadb1136b8896fe2a0f7783627bda867d5e6fd98
[ "MIT" ]
238
2018-06-14T08:59:44.000Z
2019-09-04T06:35:37.000Z
#!/usr/bin/env python # coding: utf-8 import random import string import time from urllib.parse import urlparse from pocsuite3.api import requests as req from pocsuite3.api import register_poc from pocsuite3.api import Output, POCBase from pocsuite3.api import POC_CATEGORY, VUL_TYPE class TestPOC(POCBase): vulID ...
35.782609
189
0.552653
import random import string import time from urllib.parse import urlparse from pocsuite3.api import requests as req from pocsuite3.api import register_poc from pocsuite3.api import Output, POCBase from pocsuite3.api import POC_CATEGORY, VUL_TYPE class TestPOC(POCBase): vulID = '0' version = '1.0' author =...
true
true
1c0a84ec84947eae3052228bb1bb5dddf8a94e80
1,948
py
Python
commands/pregame/Join.py
Shepherdwhen/Mafioso-Bot
22d2e6e2724d07e5944db904bc1c50a36d4e2f91
[ "MIT" ]
2
2021-07-14T13:55:36.000Z
2022-02-07T23:32:29.000Z
commands/pregame/Join.py
Shepherdwhen/Mafioso-Bot
22d2e6e2724d07e5944db904bc1c50a36d4e2f91
[ "MIT" ]
10
2021-06-10T20:05:39.000Z
2021-09-07T18:39:02.000Z
commands/pregame/Join.py
Shepherdwhen/Mafioso-Bot
22d2e6e2724d07e5944db904bc1c50a36d4e2f91
[ "MIT" ]
1
2021-06-10T18:49:28.000Z
2021-06-10T18:49:28.000Z
"""Contains commands related to joining/leaving a lobby """ from discord.ext import commands import globvars from mafia.errors import AlreadyJoined, NotJoined, PlayerCannotHost from mafia.util import MemberConverter, check_if_is_host_or_admin class Join(commands.Cog): def __init__(self, bot): self.bot ...
31.934426
103
0.630903
from discord.ext import commands import globvars from mafia.errors import AlreadyJoined, NotJoined, PlayerCannotHost from mafia.util import MemberConverter, check_if_is_host_or_admin class Join(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command( name='join', a...
true
true
1c0a86173546e2660e984a1b3ea8b77b76efaa05
1,736
py
Python
sktime/classification/base.py
Multivin12/sktime
3731c550a9ee708c5b485aeffbbc72ca0a9062bf
[ "BSD-3-Clause" ]
1
2020-09-11T06:26:08.000Z
2020-09-11T06:26:08.000Z
sktime/classification/base.py
chrinide/sktime
979aed585983fb820ddb0ca8a619d5730dbed4a7
[ "BSD-3-Clause" ]
null
null
null
sktime/classification/base.py
chrinide/sktime
979aed585983fb820ddb0ca8a619d5730dbed4a7
[ "BSD-3-Clause" ]
1
2022-02-14T18:19:01.000Z
2022-02-14T18:19:01.000Z
__all__ = ["BaseClassifier", "is_classifier"] __author__ = ["Markus Löning"] from sktime.base import BaseEstimator from sktime.utils import comparison from sktime.utils.validation.series_as_features import check_X class BaseClassifier(BaseEstimator): """ Base class for classifiers, for identification. "...
27.125
76
0.634217
__all__ = ["BaseClassifier", "is_classifier"] __author__ = ["Markus Löning"] from sktime.base import BaseEstimator from sktime.utils import comparison from sktime.utils.validation.series_as_features import check_X class BaseClassifier(BaseEstimator): def fit(self, X, y): raise NotImplementedError("abst...
true
true
1c0a862366706fbca264ff3a658d00cf10d0866f
101
py
Python
crude/sb/py2pydantic.py
i2mint/crude
29fea0c7cd7cf58055b14bc47519bd527469f8d0
[ "Apache-2.0" ]
null
null
null
crude/sb/py2pydantic.py
i2mint/crude
29fea0c7cd7cf58055b14bc47519bd527469f8d0
[ "Apache-2.0" ]
null
null
null
crude/sb/py2pydantic.py
i2mint/crude
29fea0c7cd7cf58055b14bc47519bd527469f8d0
[ "Apache-2.0" ]
null
null
null
""" Moved to seperate py2pydantic package """ raise DeprecationWarning("Moved to front.py2pydantic")
20.2
54
0.782178
raise DeprecationWarning("Moved to front.py2pydantic")
true
true
1c0a864c2e4a5754a211aa7444a1f9103d4a11f3
8,126
py
Python
climateeconomics/tests/_l1_test_gradient_industrial_discipline.py
os-climate/witness-core
3ef9a44d86804c5ad57deec3c9916348cb3bfbb8
[ "MIT", "Apache-2.0", "BSD-3-Clause" ]
1
2022-01-14T06:37:42.000Z
2022-01-14T06:37:42.000Z
climateeconomics/tests/_l1_test_gradient_industrial_discipline.py
os-climate/witness-core
3ef9a44d86804c5ad57deec3c9916348cb3bfbb8
[ "MIT", "Apache-2.0", "BSD-3-Clause" ]
null
null
null
climateeconomics/tests/_l1_test_gradient_industrial_discipline.py
os-climate/witness-core
3ef9a44d86804c5ad57deec3c9916348cb3bfbb8
[ "MIT", "Apache-2.0", "BSD-3-Clause" ]
null
null
null
''' Copyright 2022 Airbus SAS Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dis...
46.971098
138
0.601649
import unittest import numpy as np import pandas as pd from os.path import join, dirname from pandas import DataFrame, read_csv from scipy.interpolate import interp1d from sos_trades_core.execution_engine.execution_engine import ExecutionEngine from sos_trades_core.tests.core.abstract_jacobian_unit_test import Abstrac...
true
true
1c0a87415a5cba8672b0e4e024a1e2ff1732aae7
524
py
Python
tests/unit/utils/test_task.py
wmarcuse/pokeman
5d654c227c456a065b2fea6a0d5827bff424c703
[ "BSD-3-Clause" ]
null
null
null
tests/unit/utils/test_task.py
wmarcuse/pokeman
5d654c227c456a065b2fea6a0d5827bff424c703
[ "BSD-3-Clause" ]
null
null
null
tests/unit/utils/test_task.py
wmarcuse/pokeman
5d654c227c456a065b2fea6a0d5827bff424c703
[ "BSD-3-Clause" ]
null
null
null
import unittest from pokeman.utils import task class TaskStatusTests(unittest.TestCase): def test_base_name(self): self.assertEqual(task.TaskStatus.__name__, 'TaskStatus') def test_enums(self): self.assertEqual(task.TaskStatus.PENDING.name, 'PENDING') self.assertEqual(task.TaskStatus...
29.111111
65
0.719466
import unittest from pokeman.utils import task class TaskStatusTests(unittest.TestCase): def test_base_name(self): self.assertEqual(task.TaskStatus.__name__, 'TaskStatus') def test_enums(self): self.assertEqual(task.TaskStatus.PENDING.name, 'PENDING') self.assertEqual(task.TaskStatus...
true
true
1c0a87b4acf3ae9e548aac438d6ce6e7a0b02c76
55,723
py
Python
venv/Lib/site-packages/sqlalchemy/engine/default.py
NathanMuniz/flask_treinaweb
56671e4d6d02002b3e32297043da825c401cc1c6
[ "MIT" ]
2
2021-02-20T22:43:47.000Z
2021-05-06T03:43:20.000Z
venv/Lib/site-packages/sqlalchemy/engine/default.py
Suspir0n/Care-API
13e9a5116b77a81ed356ab6a8f1d0db1eb8b9a00
[ "MIT" ]
8
2021-03-26T19:13:07.000Z
2021-04-19T18:34:33.000Z
venv/Lib/site-packages/sqlalchemy/engine/default.py
Suspir0n/Care-API
13e9a5116b77a81ed356ab6a8f1d0db1eb8b9a00
[ "MIT" ]
1
2021-02-25T05:36:24.000Z
2021-02-25T05:36:24.000Z
# engine/default.py # Copyright (C) 2005-2021 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Default implementations of per-dialect sqlalchemy.engine classes. These are se...
34.675171
79
0.600865
import codecs import random import re import weakref from . import interfaces from . import reflection from . import result from .. import event from .. import exc from .. import pool from .. import processors from .. import types as sqltypes from .. import util from ..sql import compiler from ..sql import expressio...
true
true
1c0a87be30449c0f2cddd242f72f2f7d75613456
8,775
py
Python
paas-ce/paas/esb/components/generic/templates/cmsi/send_weixin.py
canway-bk/bk-PaaS
7a6fe1ef38a7e4e2bd11a6c2efa871a967ac2a3c
[ "Apache-2.0" ]
767
2019-03-25T06:35:43.000Z
2022-03-30T08:57:51.000Z
paas-ce/paas/esb/components/generic/templates/cmsi/send_weixin.py
canway-bk/bk-PaaS
7a6fe1ef38a7e4e2bd11a6c2efa871a967ac2a3c
[ "Apache-2.0" ]
194
2019-03-29T07:16:41.000Z
2022-03-30T06:17:49.000Z
paas-ce/paas/esb/components/generic/templates/cmsi/send_weixin.py
canway-bk/bk-PaaS
7a6fe1ef38a7e4e2bd11a6c2efa871a967ac2a3c
[ "Apache-2.0" ]
381
2019-03-25T07:19:54.000Z
2022-03-29T03:22:42.000Z
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
41.197183
305
0.546667
import base64 from django import forms from django.utils import timezone from components.component import Component, SetupConfMixin from common.forms import BaseComponentForm, ListField, TypeCheckField, DefaultBooleanField from common.constants import API_TYPE_OP from .toolkit import configs, tools class SendWeixin...
true
true
1c0a87fc65584b90c76c35791943bfd18cc2b8eb
575
py
Python
meiduo_mall/apps/payment/models.py
5703863336/electriity
768687deaa76a431732c806dce0774397fd1d196
[ "MIT" ]
null
null
null
meiduo_mall/apps/payment/models.py
5703863336/electriity
768687deaa76a431732c806dce0774397fd1d196
[ "MIT" ]
null
null
null
meiduo_mall/apps/payment/models.py
5703863336/electriity
768687deaa76a431732c806dce0774397fd1d196
[ "MIT" ]
null
null
null
from django.db import models # Create your models here. from django.db import models # Create your models here. from django.db import models from apps.orders.models import OrderInfo from utils.models import BaseModel class Payment(BaseModel): """支付信息""" order = models.ForeignKey(OrderInfo, on_delete=models....
27.380952
104
0.732174
from django.db import models from django.db import models from django.db import models from apps.orders.models import OrderInfo from utils.models import BaseModel class Payment(BaseModel): order = models.ForeignKey(OrderInfo, on_delete=models.CASCADE, verbose_name='订单') trade_id = models.CharField(max_lengt...
true
true
1c0a894205c5eab35ae774cc1bd43f388a39eb54
2,078
py
Python
pinhook/cli.py
larsks/pinhook
7c62e59c3a75ef0bf8bb36746a9beb5fc95c1f93
[ "MIT" ]
null
null
null
pinhook/cli.py
larsks/pinhook
7c62e59c3a75ef0bf8bb36746a9beb5fc95c1f93
[ "MIT" ]
null
null
null
pinhook/cli.py
larsks/pinhook
7c62e59c3a75ef0bf8bb36746a9beb5fc95c1f93
[ "MIT" ]
null
null
null
import click from .bot import Bot from marshmallow import Schema, fields, validate, INCLUDE class Config(Schema): nickname = fields.Str(required=True) channels = fields.List(fields.Str(), required=True) server = fields.Str(required=True) port = fields.Int() ops = fields.List(fields.Str()) ssl_r...
34.065574
106
0.611165
import click from .bot import Bot from marshmallow import Schema, fields, validate, INCLUDE class Config(Schema): nickname = fields.Str(required=True) channels = fields.List(fields.Str(), required=True) server = fields.Str(required=True) port = fields.Int() ops = fields.List(fields.Str()) ssl_r...
true
true
1c0a8b15781819d6ec3aab42181f6d7f7e170cf9
719
py
Python
filteralchemy/filters.py
jmcarp/filteralchemy
564b19bfc10dd960f5adfc48a40c7d565bea8d87
[ "MIT" ]
78
2015-10-26T04:00:39.000Z
2021-11-14T13:54:30.000Z
filteralchemy/filters.py
jmcarp/filteralchemy
564b19bfc10dd960f5adfc48a40c7d565bea8d87
[ "MIT" ]
2
2015-10-19T04:18:14.000Z
2018-02-05T21:44:44.000Z
filteralchemy/filters.py
jmcarp/filteralchemy
564b19bfc10dd960f5adfc48a40c7d565bea8d87
[ "MIT" ]
7
2015-10-25T10:48:18.000Z
2021-05-31T08:45:04.000Z
# -*- coding: utf-8 -*- from filteralchemy import operators class Filter(object): """Base filter. :param Field field: Field to deserialize filter parameter :param str attr: Model attribute name :param str label: Lookup key on input dictionary :param operator: Operator or filter callable """ ...
32.681818
88
0.674548
from filteralchemy import operators class Filter(object): def __init__(self, field=None, attr=None, label=None, operator=operators.Equal): self.field = field self.attr = attr self.label = label self.operator = operator def filter(self, query, model, attr, value): opera...
true
true
1c0a8b71f69c396643cf5dae12b140dac8e912cc
3,394
py
Python
day12/12_passage_pathing.py
KDawid/AdventOfCode2021
af0229bbae8b2aaf12cb59ef17a00ac972c22c47
[ "Apache-2.0" ]
null
null
null
day12/12_passage_pathing.py
KDawid/AdventOfCode2021
af0229bbae8b2aaf12cb59ef17a00ac972c22c47
[ "Apache-2.0" ]
null
null
null
day12/12_passage_pathing.py
KDawid/AdventOfCode2021
af0229bbae8b2aaf12cb59ef17a00ac972c22c47
[ "Apache-2.0" ]
null
null
null
class GraphEdge: def __init__(self, from_node, to_node): self.nodes = {from_node, to_node} def get_nodes(self): return self.nodes def __str__(self): nodes = list(self.nodes) return f'{nodes[0]} - {nodes[1]}' class Graph: START_NODE = 'start' END_NODE = 'end' ...
32.018868
111
0.616676
class GraphEdge: def __init__(self, from_node, to_node): self.nodes = {from_node, to_node} def get_nodes(self): return self.nodes def __str__(self): nodes = list(self.nodes) return f'{nodes[0]} - {nodes[1]}' class Graph: START_NODE = 'start' END_NODE = 'end' ...
true
true
1c0a8c04243ac088fa40c35172413347b5c7860d
6,222
py
Python
src/wrappers/metrics.py
synwalk/synwalk-analysis
964aa5c1e1ee5596227264ab2f804b50bc458799
[ "Apache-2.0" ]
2
2021-06-03T08:39:34.000Z
2022-03-03T04:33:40.000Z
src/wrappers/metrics.py
synwalk/synwalk-analysis
964aa5c1e1ee5596227264ab2f804b50bc458799
[ "Apache-2.0" ]
null
null
null
src/wrappers/metrics.py
synwalk/synwalk-analysis
964aa5c1e1ee5596227264ab2f804b50bc458799
[ "Apache-2.0" ]
null
null
null
import networkx as nx import numpy as np from clusim.clustering import Clustering from networkx import Graph from sklearn.metrics import adjusted_mutual_info_score def ami_score(clu_file_pred, clu_file_true, graph_file=None): """Compute adjusted mutual (AMI) information between two clusterings. This method c...
33.632432
111
0.654613
import networkx as nx import numpy as np from clusim.clustering import Clustering from networkx import Graph from sklearn.metrics import adjusted_mutual_info_score def ami_score(clu_file_pred, clu_file_true, graph_file=None): clu_pred = Clustering().load(clu_file_pred) clu_true = Clustering().load(clu_file_tr...
true
true
1c0a8cffc70c9ced22da71aead3d518ea3abf3a6
2,834
py
Python
pythontools/webbot/webbot.py
CrawlerCode/PythonTools
927893b80dd803eb73edc98d905191d90eb1aede
[ "MIT" ]
null
null
null
pythontools/webbot/webbot.py
CrawlerCode/PythonTools
927893b80dd803eb73edc98d905191d90eb1aede
[ "MIT" ]
null
null
null
pythontools/webbot/webbot.py
CrawlerCode/PythonTools
927893b80dd803eb73edc98d905191d90eb1aede
[ "MIT" ]
null
null
null
import time, pickle from selenium import webdriver from selenium.webdriver.chrome.options import Options from pythontools.core import tools, logger class WebBot: def Chrome(self, chromedriver, hide=False, user_agent=None, arguments=[]): chrome_options = Options() if hide is True: chro...
32.953488
127
0.628793
import time, pickle from selenium import webdriver from selenium.webdriver.chrome.options import Options from pythontools.core import tools, logger class WebBot: def Chrome(self, chromedriver, hide=False, user_agent=None, arguments=[]): chrome_options = Options() if hide is True: chro...
true
true
1c0a8d13532d841f999008b7d7f64c1d79adaea5
20,822
py
Python
tests/gcp/hooks/test_dataflow.py
data-weirdo/lumi-airflow
95ff487602c2fe62546d1b3f7ceb4a746e18c5d5
[ "Apache-2.0" ]
1
2020-02-08T10:56:38.000Z
2020-02-08T10:56:38.000Z
tests/gcp/hooks/test_dataflow.py
data-weirdo/lumi-airflow
95ff487602c2fe62546d1b3f7ceb4a746e18c5d5
[ "Apache-2.0" ]
null
null
null
tests/gcp/hooks/test_dataflow.py
data-weirdo/lumi-airflow
95ff487602c2fe62546d1b3f7ceb4a746e18c5d5
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # 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 #...
39.736641
110
0.636826
import copy import unittest from parameterized import parameterized from airflow.gcp.hooks.dataflow import ( DataFlowHook, DataflowJobStatus, DataflowJobType, _Dataflow, _DataflowJob, ) from tests.compat import MagicMock, mock TASK_ID = 'test-dataflow-operator' JOB_NAME = 'test-dataflow-pipeline' TEMPLATE = 'gs...
true
true
1c0a8d2a387358b19f48322bb153b789a68e274b
1,409
py
Python
script/check_changelogs.py
Titch990/apm-server
4fdbefc42f8b6b0a52e66d4bf85ddee463fe1ba3
[ "ECL-2.0", "Apache-2.0" ]
3
2019-06-21T11:59:36.000Z
2020-01-16T05:45:11.000Z
script/check_changelogs.py
Titch990/apm-server
4fdbefc42f8b6b0a52e66d4bf85ddee463fe1ba3
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
script/check_changelogs.py
Titch990/apm-server
4fdbefc42f8b6b0a52e66d4bf85ddee463fe1ba3
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
#!/Users/gil/.venv/ipy/bin/python import io import hashlib import os import requests VERSIONS = ["6.0", "6.1", "6.2", "6.3", "6.4", "6.5", "6.6", "6.7", "6.8", "7.0", "7.1", "7.x"] def parse_version(version): return tuple([int(x) if x != "x" else 100 for x in version.split('.')]) def shasum(fp): h = has...
26.092593
97
0.508872
import io import hashlib import os import requests VERSIONS = ["6.0", "6.1", "6.2", "6.3", "6.4", "6.5", "6.6", "6.7", "6.8", "7.0", "7.1", "7.x"] def parse_version(version): return tuple([int(x) if x != "x" else 100 for x in version.split('.')]) def shasum(fp): h = hashlib.sha1() while True: ...
true
true
1c0a8dbc19ccd83208c884957d659a1eb89cf0a0
89,718
py
Python
pandas/util/testing.py
josibake/pandas
02675e3376fea7d3cd484ace874d676c142cf003
[ "BSD-3-Clause" ]
null
null
null
pandas/util/testing.py
josibake/pandas
02675e3376fea7d3cd484ace874d676c142cf003
[ "BSD-3-Clause" ]
null
null
null
pandas/util/testing.py
josibake/pandas
02675e3376fea7d3cd484ace874d676c142cf003
[ "BSD-3-Clause" ]
1
2019-10-04T09:05:32.000Z
2019-10-04T09:05:32.000Z
import bz2 from collections import Counter from contextlib import contextmanager from datetime import datetime from functools import wraps import gzip import os import re from shutil import rmtree import string import tempfile from typing import Union, cast import warnings import zipfile import numpy as np from numpy....
30.746402
88
0.62682
import bz2 from collections import Counter from contextlib import contextmanager from datetime import datetime from functools import wraps import gzip import os import re from shutil import rmtree import string import tempfile from typing import Union, cast import warnings import zipfile import numpy as np from numpy....
true
true
1c0a8dcd20b64e1358035069dad61f591985837d
4,174
py
Python
scripts/nn/simple_lstm/train_lstm.py
mesielepush/Demi
c108d52c8e44949bc8bb67c0aef733a8772015f0
[ "MIT" ]
null
null
null
scripts/nn/simple_lstm/train_lstm.py
mesielepush/Demi
c108d52c8e44949bc8bb67c0aef733a8772015f0
[ "MIT" ]
null
null
null
scripts/nn/simple_lstm/train_lstm.py
mesielepush/Demi
c108d52c8e44949bc8bb67c0aef733a8772015f0
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import random import numpy as np import pandas as pd import joblib import tensorflow as tf from sklearn.metrics import confusion_matrix as cmx TOP_K = 20000 os.environ['PYTHONHASHSEED']='666' os.envi...
35.07563
93
0.538812
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import random import numpy as np import pandas as pd import joblib import tensorflow as tf from sklearn.metrics import confusion_matrix as cmx TOP_K = 20000 os.environ['PYTHONHASHSEED']='666' os.envi...
true
true
1c0a8e349101619ed92ddc968567b90f6cf33f07
12,629
py
Python
tea/process/process.py
alefnula/tea
37ac77ad3f0b1db6386fccc1c6228a976093ff34
[ "Apache-2.0" ]
1
2021-09-08T05:29:47.000Z
2021-09-08T05:29:47.000Z
tea/process/process.py
alefnula/tea
37ac77ad3f0b1db6386fccc1c6228a976093ff34
[ "Apache-2.0" ]
null
null
null
tea/process/process.py
alefnula/tea
37ac77ad3f0b1db6386fccc1c6228a976093ff34
[ "Apache-2.0" ]
1
2017-07-31T09:16:08.000Z
2017-07-31T09:16:08.000Z
import io import os import time import posix import signal import logging import threading import subprocess from pathlib import Path from tempfile import NamedTemporaryFile from typing import Optional, Dict, Union, List from tea.errors import TeaError logger = logging.getLogger(__name__) class ProcessError(TeaErr...
32.802597
79
0.578589
import io import os import time import posix import signal import logging import threading import subprocess from pathlib import Path from tempfile import NamedTemporaryFile from typing import Optional, Dict, Union, List from tea.errors import TeaError logger = logging.getLogger(__name__) class ProcessError(TeaErr...
true
true
1c0a8e4c5a03806a79ec389dfea20b5c5f1a7a3a
4,585
py
Python
obs/json/json_tq_import.py
PurpleGuitar/tools
13152bb925b568ed4d4375065ed5a7dbdeee99de
[ "MIT" ]
null
null
null
obs/json/json_tq_import.py
PurpleGuitar/tools
13152bb925b568ed4d4375065ed5a7dbdeee99de
[ "MIT" ]
null
null
null
obs/json/json_tq_import.py
PurpleGuitar/tools
13152bb925b568ed4d4375065ed5a7dbdeee99de
[ "MIT" ]
2
2020-07-16T20:10:12.000Z
2020-07-16T20:14:18.000Z
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # Copyright (c) 2015 unfoldingWord # http://creativecommons.org/licenses/MIT/ # See LICENSE file for details. # # Contributors: # Richard Mahn <richard_mahn@wycliffeassociates.org> # ''' Imports an OBS tQ json file into Door43 and commits it to Github ''' import o...
32.062937
184
0.578408
''' Imports an OBS tQ json file into Door43 and commits it to Github ''' import os import re import sys import json import codecs import argparse from general_tools.git_wrapper import * gen_tools = '/var/www/vhosts/door43.org/tools/general_tools' sys.path.append(gen_tools) try: from github import Github fro...
false
true
1c0a8e9a6d73b236560d63e413673b60a9ca7854
137
py
Python
desafio021.py
WebertiBarbosa/python
640a70c327c262d4e867a4b4620ca50d42398c00
[ "MIT" ]
null
null
null
desafio021.py
WebertiBarbosa/python
640a70c327c262d4e867a4b4620ca50d42398c00
[ "MIT" ]
1
2020-06-06T21:34:44.000Z
2020-06-06T21:44:58.000Z
desafio021.py
WebertiBarbosa/python
640a70c327c262d4e867a4b4620ca50d42398c00
[ "MIT" ]
null
null
null
import pygame pygame.mixer.init() pygame.mixer.music.load('ex021.mp3') pygame.mixer.music.play() #pygame.event.wait() input('Agora sim')
19.571429
36
0.751825
import pygame pygame.mixer.init() pygame.mixer.music.load('ex021.mp3') pygame.mixer.music.play() input('Agora sim')
true
true
1c0a8ee44ef06c6ed4ba1616820f225a7949f71e
7,200
py
Python
demo/demo_console.py
hsnlab/annabellaDB
daeaf394babd07b6d980a3eaa74be6614e7124b8
[ "Apache-2.0" ]
10
2020-08-25T23:37:31.000Z
2020-11-12T02:36:22.000Z
demo/demo_console.py
hsnlab/annabellaDB
daeaf394babd07b6d980a3eaa74be6614e7124b8
[ "Apache-2.0" ]
null
null
null
demo/demo_console.py
hsnlab/annabellaDB
daeaf394babd07b6d980a3eaa74be6614e7124b8
[ "Apache-2.0" ]
1
2020-11-04T03:53:41.000Z
2020-11-04T03:53:41.000Z
import shlex from cmd import Cmd import subprocess import time import docker import networkx as nx import matplotlib.pyplot as plt import copy import _thread import os G = nx.Graph() SERVER_IP = {"kvs1": "172.17.0.2", "kvs2": "172.17.0.3"} nf_server_assignment = {} client = docker.from_env(timeout=180) kvs1_exist = F...
34.951456
190
0.583611
import shlex from cmd import Cmd import subprocess import time import docker import networkx as nx import matplotlib.pyplot as plt import copy import _thread import os G = nx.Graph() SERVER_IP = {"kvs1": "172.17.0.2", "kvs2": "172.17.0.3"} nf_server_assignment = {} client = docker.from_env(timeout=180) kvs1_exist = F...
true
true
1c0a9224039ed993b5e28537c61e8615f1280952
3,053
py
Python
app/app/settings.py
DigitalCrypsis/recipe-app-api
7a740b1755c58be76b9942c1a1f3c811ebf151a0
[ "MIT" ]
null
null
null
app/app/settings.py
DigitalCrypsis/recipe-app-api
7a740b1755c58be76b9942c1a1f3c811ebf151a0
[ "MIT" ]
null
null
null
app/app/settings.py
DigitalCrypsis/recipe-app-api
7a740b1755c58be76b9942c1a1f3c811ebf151a0
[ "MIT" ]
null
null
null
""" Django settings for app project. Generated by 'django-admin startproject' using Django 3.1.4. For more information on this file, see https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ from pathlib imp...
25.231405
91
0.694726
from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = '&bho*a9^&-^kg3amo)n&nc-aguewhgx93uoa#ibn+63y=&ep&h' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', ...
true
true
1c0a9265dae8f114c39f4004ed1f68cc3c097e54
585
py
Python
plotly/validators/contourcarpet/stream/_token.py
gnestor/plotly.py
a8ae062795ddbf9867b8578fe6d9e244948c15ff
[ "MIT" ]
12
2020-04-18T18:10:22.000Z
2021-12-06T10:11:15.000Z
plotly/validators/contourcarpet/stream/_token.py
Vesauza/plotly.py
e53e626d59495d440341751f60aeff73ff365c28
[ "MIT" ]
27
2020-04-28T21:23:12.000Z
2021-06-25T15:36:38.000Z
plotly/validators/contourcarpet/stream/_token.py
Vesauza/plotly.py
e53e626d59495d440341751f60aeff73ff365c28
[ "MIT" ]
6
2020-04-18T23:07:08.000Z
2021-11-18T07:53:06.000Z
import _plotly_utils.basevalidators class TokenValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name='token', parent_name='contourcarpet.stream', **kwargs ): super(TokenValidator, self).__init__( plotly_name=plotly_name, ...
27.857143
67
0.594872
import _plotly_utils.basevalidators class TokenValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name='token', parent_name='contourcarpet.stream', **kwargs ): super(TokenValidator, self).__init__( plotly_name=plotly_name, ...
true
true
1c0a934b95a18ec0754cfd9ae1db035b8ad7bd3f
7,170
py
Python
bindings/python/ensmallen_graph/datasets/networkrepository/socfbmsu24.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/networkrepository/socfbmsu24.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/networkrepository/socfbmsu24.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
""" This file offers the methods to automatically retrieve the graph socfb-MSU24. The graph is automatically retrieved from the NetworkRepository repository. Report --------------------- At the time of rendering these methods (please see datetime below), the graph had the following characteristics: Datetime: 2021...
31.866667
103
0.669317
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen_graph import EnsmallenGraph def SocfbMsu24( directed: bool = False, verbose: int = 2, cache_path: str = "graphs/networkrepository", **additional_graph_kwargs: Dict ) -> EnsmallenGraph: r...
true
true
1c0a93a03d51bd0fff1bbab6db2ec5b909a7ea72
3,172
py
Python
src/py21cmfast/_cfg.py
charlottenosam/21cmFAST-v3
07b99e5f6d8f06f833eba33a82311e7ed793861b
[ "MIT" ]
null
null
null
src/py21cmfast/_cfg.py
charlottenosam/21cmFAST-v3
07b99e5f6d8f06f833eba33a82311e7ed793861b
[ "MIT" ]
null
null
null
src/py21cmfast/_cfg.py
charlottenosam/21cmFAST-v3
07b99e5f6d8f06f833eba33a82311e7ed793861b
[ "MIT" ]
null
null
null
"""Open and read the configuration file.""" import contextlib import copy import warnings from os import path from . import yaml class ConfigurationError(Exception): """An error with the config file.""" pass class Config(dict): """Simple over-ride of dict that adds a context manager.""" _defaults...
31.72
124
0.503468
import contextlib import copy import warnings from os import path from . import yaml class ConfigurationError(Exception): pass class Config(dict): _defaults = {"direc": "~/21cmFAST-cache", "regenerate": False, "write": True} _aliases = {"direc": ("boxdir",)} def __init__(self, *args, write=True...
true
true
1c0a93d91f1aeb1bc37d77b500c1e23ebed5af38
1,814
py
Python
src/sentry/tasks/sentry_apps.py
detouched/sentry
1d3cc332c9ee1c2cf5ddaf1e850e14386c3684dd
[ "BSD-3-Clause" ]
1
2018-12-04T12:57:00.000Z
2018-12-04T12:57:00.000Z
src/sentry/tasks/sentry_apps.py
detouched/sentry
1d3cc332c9ee1c2cf5ddaf1e850e14386c3684dd
[ "BSD-3-Clause" ]
1
2021-05-09T11:43:43.000Z
2021-05-09T11:43:43.000Z
src/sentry/tasks/sentry_apps.py
detouched/sentry
1d3cc332c9ee1c2cf5ddaf1e850e14386c3684dd
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import, print_function import six from time import time from requests.exceptions import RequestException from sentry.http import safe_urlopen from sentry.tasks.base import instrumented_task, retry from sentry.utils import json from sentry.utils.http import absolute_uri from sentry.mode...
28.34375
95
0.680265
from __future__ import absolute_import, print_function import six from time import time from requests.exceptions import RequestException from sentry.http import safe_urlopen from sentry.tasks.base import instrumented_task, retry from sentry.utils import json from sentry.utils.http import absolute_uri from sentry.mode...
true
true
1c0a94e588a76e265bbce54b8981da2fd94e824d
7,105
py
Python
neutron/tests/fullstack/test_dhcp_agent.py
mmidolesov2/neutron-1
a4d61687a191befd6fc940db8c0e74f89f0da1bd
[ "Apache-2.0" ]
null
null
null
neutron/tests/fullstack/test_dhcp_agent.py
mmidolesov2/neutron-1
a4d61687a191befd6fc940db8c0e74f89f0da1bd
[ "Apache-2.0" ]
null
null
null
neutron/tests/fullstack/test_dhcp_agent.py
mmidolesov2/neutron-1
a4d61687a191befd6fc940db8c0e74f89f0da1bd
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 OVH SAS # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
36.435897
79
0.668966
import random from neutron_lib import constants from oslo_utils import uuidutils from neutron.agent.linux import ip_lib from neutron.common import utils as common_utils from neutron.tests.fullstack import base from neutron.tests.fullstack.cmd import dhcp_agent as cmd from neutron.tests.fullstack.resources import env...
true
true
1c0a955dadfc10c6b40651d3b09b66ba28b55ff8
15,282
py
Python
Python3.6-Word_Recognition/tencentcloud/cms/v20190321/models.py
tencentyun/scf-demo-repo
c75f9b9e8be8d079f0510b14fb0c7098d0b6bb7e
[ "Python-2.0", "OLDAP-2.7" ]
46
2019-03-01T02:19:18.000Z
2021-12-18T12:37:02.000Z
Python2.7-IDCard_Detect_by_AI/tencentcloud/cms/v20190321/models.py
Juliiii/scf-demo-repo
766928f14c64fbccab0713d6c6af0de3e716c9b0
[ "Python-2.0", "OLDAP-2.7" ]
8
2019-01-22T10:46:43.000Z
2020-12-30T13:03:04.000Z
Python2.7-Word_Recognition/tencentcloud/cms/v20190321/models.py
tencentyun/scf-demo-repo
c75f9b9e8be8d079f0510b14fb0c7098d0b6bb7e
[ "Python-2.0", "OLDAP-2.7" ]
67
2018-10-29T09:50:49.000Z
2022-01-06T07:35:56.000Z
# -*- coding: utf8 -*- # Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. 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...
26.167808
150
0.610457
from tencentcloud.common.abstract_model import AbstractModel class AudioModerationRequest(AbstractModel): def __init__(self): self.CallbackUrl = None self.FileContent = None self.FileMD5 = None self.FileUrl = None def _deserialize(self, params): self.CallbackUrl = p...
true
true
1c0a97e90bc745377ac60d41d707c55cf4022260
4,705
py
Python
bbpyp/lexicomb_engine/lexicomb_pub_sub_client.py
BloggerBust/tag_script
985a4b6b8c026431842d608ba8feafe8751dd425
[ "Apache-2.0" ]
null
null
null
bbpyp/lexicomb_engine/lexicomb_pub_sub_client.py
BloggerBust/tag_script
985a4b6b8c026431842d608ba8feafe8751dd425
[ "Apache-2.0" ]
null
null
null
bbpyp/lexicomb_engine/lexicomb_pub_sub_client.py
BloggerBust/tag_script
985a4b6b8c026431842d608ba8feafe8751dd425
[ "Apache-2.0" ]
null
null
null
from bbpyp.message_bus.abstract_pub_sub_client import AbstractPubSubClient from bbpyp.common.exception.bbpyp_key_error import BbpypKeyError from bbpyp.lexicomb_engine.model.topic import Topic class LexicombPubSubClient(AbstractPubSubClient): __STATE_MACHINE_KEY = "STATE_MACHINE_KEY" def __init__(self, lexico...
48.010204
134
0.709671
from bbpyp.message_bus.abstract_pub_sub_client import AbstractPubSubClient from bbpyp.common.exception.bbpyp_key_error import BbpypKeyError from bbpyp.lexicomb_engine.model.topic import Topic class LexicombPubSubClient(AbstractPubSubClient): __STATE_MACHINE_KEY = "STATE_MACHINE_KEY" def __init__(self, lexico...
true
true
1c0a980bd8941ce11f2bbf92564dc2a10c69377d
304
py
Python
pirates/trades/TradeAI.py
Willy5s/Pirates-Online-Rewritten
7434cf98d9b7c837d57c181e5dabd02ddf98acb7
[ "BSD-3-Clause" ]
81
2018-04-08T18:14:24.000Z
2022-01-11T07:22:15.000Z
pirates/trades/TradeAI.py
Willy5s/Pirates-Online-Rewritten
7434cf98d9b7c837d57c181e5dabd02ddf98acb7
[ "BSD-3-Clause" ]
4
2018-09-13T20:41:22.000Z
2022-01-08T06:57:00.000Z
pirates/trades/TradeAI.py
Willy5s/Pirates-Online-Rewritten
7434cf98d9b7c837d57c181e5dabd02ddf98acb7
[ "BSD-3-Clause" ]
26
2018-05-26T12:49:27.000Z
2021-09-11T09:11:59.000Z
from direct.distributed.DistributedObjectAI import DistributedObjectAI from direct.directnotify import DirectNotifyGlobal class TradeAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('TradeAI') def __init__(self, air): DistributedObjectAI.__init__(self, air)
38
70
0.815789
from direct.distributed.DistributedObjectAI import DistributedObjectAI from direct.directnotify import DirectNotifyGlobal class TradeAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('TradeAI') def __init__(self, air): DistributedObjectAI.__init__(self, air)
true
true
1c0a98c194a3be827179f8c4faa175cfd83de690
1,462
py
Python
src/app/model/machine.py
SLeRest/3DSliceServer
3f93b240ef2b55200a7bf725bb983c8146b1cc9a
[ "MIT" ]
1
2021-05-21T10:27:08.000Z
2021-05-21T10:27:08.000Z
src/app/model/machine.py
SLeRest/3DSliceServer
3f93b240ef2b55200a7bf725bb983c8146b1cc9a
[ "MIT" ]
null
null
null
src/app/model/machine.py
SLeRest/3DSliceServer
3f93b240ef2b55200a7bf725bb983c8146b1cc9a
[ "MIT" ]
null
null
null
from model.base import BaseModel from schema.machine import MachineOut from sqlalchemy import ( Column, Float, Integer, String, ) class Machine(BaseModel): __tablename__ = 'MACHINE' manufacturer = Column('MANUFACTURER', String, nullable=False) model = Column('MODEL', String, nullable=False...
36.55
98
0.644323
from model.base import BaseModel from schema.machine import MachineOut from sqlalchemy import ( Column, Float, Integer, String, ) class Machine(BaseModel): __tablename__ = 'MACHINE' manufacturer = Column('MANUFACTURER', String, nullable=False) model = Column('MODEL', String, nullable=False...
true
true
1c0a98ceb8b6829e55a35b6cfd5413ccbc55803d
9,601
py
Python
train.py
mwoedlinger/compression
387742e6efaa85ddf85510c461a14e1a33125404
[ "Apache-2.0" ]
null
null
null
train.py
mwoedlinger/compression
387742e6efaa85ddf85510c461a14e1a33125404
[ "Apache-2.0" ]
null
null
null
train.py
mwoedlinger/compression
387742e6efaa85ddf85510c461a14e1a33125404
[ "Apache-2.0" ]
null
null
null
import logging import argparse import copy from tqdm import tqdm import random from collections import namedtuple from pathlib import Path import wandb import torch import torch.nn as nn from torchvision import transforms from model import * import aiutils import aiutils.schedule as schedule import aiutils.logger as...
34.16726
118
0.578898
import logging import argparse import copy from tqdm import tqdm import random from collections import namedtuple from pathlib import Path import wandb import torch import torch.nn as nn from torchvision import transforms from model import * import aiutils import aiutils.schedule as schedule import aiutils.logger as...
true
true
1c0a9a886615ace07095c45982f589b6a5058fe8
5,007
py
Python
taguchi/campaign.py
panuph/taguchi-python-api
c090b23a2208c67231c7d58b3fded03b854225d9
[ "MIT" ]
1
2021-04-16T02:00:55.000Z
2021-04-16T02:00:55.000Z
taguchi/campaign.py
panuph/taguchi-python-api
c090b23a2208c67231c7d58b3fded03b854225d9
[ "MIT" ]
null
null
null
taguchi/campaign.py
panuph/taguchi-python-api
c090b23a2208c67231c7d58b3fded03b854225d9
[ "MIT" ]
1
2020-07-20T09:40:51.000Z
2020-07-20T09:40:51.000Z
import json from taguchi.record import Record class Campaign(Record): def __init__(self, context): """ Instantiates an empty Campaign object. context: Context Determines the TM instance and organization to which the campaign belongs. """ super(Camp...
34.061224
78
0.583583
import json from taguchi.record import Record class Campaign(Record): def __init__(self, context): super(Campaign, self).__init__(context, resource_type="campaign") @property def record_id(self): return str(self.backing["id"]) @property def ref(self): return str(self.bac...
true
true
1c0a9c3fc2a716f1be2f769662e2783aae136fe4
2,555
py
Python
src/config/core.py
blewy/Insurance_Churn
528fc2ed31ae714eef8405bfd8a41260cbad28f7
[ "MIT" ]
null
null
null
src/config/core.py
blewy/Insurance_Churn
528fc2ed31ae714eef8405bfd8a41260cbad28f7
[ "MIT" ]
null
null
null
src/config/core.py
blewy/Insurance_Churn
528fc2ed31ae714eef8405bfd8a41260cbad28f7
[ "MIT" ]
null
null
null
from pathlib import Path import typing as t from pydantic import BaseModel from strictyaml import load, YAML import src # Project Directories PACKAGE_ROOT = Path(src.__file__).resolve().parent ROOT = PACKAGE_ROOT.parent CONFIG_FILE_PATH = PACKAGE_ROOT / "config.yml" TRAINED_MODEL_DIR = PACKAGE_ROOT / "models" DATASE...
23.878505
71
0.704892
from pathlib import Path import typing as t from pydantic import BaseModel from strictyaml import load, YAML import src PACKAGE_ROOT = Path(src.__file__).resolve().parent ROOT = PACKAGE_ROOT.parent CONFIG_FILE_PATH = PACKAGE_ROOT / "config.yml" TRAINED_MODEL_DIR = PACKAGE_ROOT / "models" DATASET_DIR = PACKAGE_ROOT /...
true
true
1c0a9ce0527df463924ddbe9a1f9aef72a3183c4
11,055
py
Python
map_label_tool/py_proto/modules/perception/onboard/proto/trafficlights_perception_component_pb2.py
freeclouds/OpenHDMap
b61c159fbdf4f50ae1d1650421596b28863f39be
[ "Apache-2.0" ]
null
null
null
map_label_tool/py_proto/modules/perception/onboard/proto/trafficlights_perception_component_pb2.py
freeclouds/OpenHDMap
b61c159fbdf4f50ae1d1650421596b28863f39be
[ "Apache-2.0" ]
null
null
null
map_label_tool/py_proto/modules/perception/onboard/proto/trafficlights_perception_component_pb2.py
freeclouds/OpenHDMap
b61c159fbdf4f50ae1d1650421596b28863f39be
[ "Apache-2.0" ]
1
2021-05-26T08:42:11.000Z
2021-05-26T08:42:11.000Z
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: modules/perception/onboard/proto/trafficlights_perception_component.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message ...
56.403061
1,589
0.762913
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database from google.p...
true
true
1c0a9d19ac188472a8f65b0ceaadd42ae07ba746
5,103
py
Python
i3pystatus/core/__init__.py
eBrnd/i3pystatus
47e5379a20f6e636fee38b68a363705b5b6b2364
[ "MIT" ]
null
null
null
i3pystatus/core/__init__.py
eBrnd/i3pystatus
47e5379a20f6e636fee38b68a363705b5b6b2364
[ "MIT" ]
null
null
null
i3pystatus/core/__init__.py
eBrnd/i3pystatus
47e5379a20f6e636fee38b68a363705b5b6b2364
[ "MIT" ]
null
null
null
import logging import os import sys from threading import Thread from i3pystatus.core import io, util from i3pystatus.core.exceptions import ConfigError from i3pystatus.core.imputil import ClassFinder from i3pystatus.core.modules import Module DEFAULT_LOG_FORMAT = '%(asctime)s [%(levelname)-8s][%(name)s %(lineno)d] %...
38.08209
127
0.613365
import logging import os import sys from threading import Thread from i3pystatus.core import io, util from i3pystatus.core.exceptions import ConfigError from i3pystatus.core.imputil import ClassFinder from i3pystatus.core.modules import Module DEFAULT_LOG_FORMAT = '%(asctime)s [%(levelname)-8s][%(name)s %(lineno)d] %...
true
true
1c0a9db098589454545a0717805e4a8c0bd867e1
9,162
py
Python
MetaFGNet_with_Sample_Selection/main.py
YBZh/MetaFGNet
a9c2128f5d2a6cdffa25d49291b037270f3de166
[ "MIT" ]
16
2019-01-31T06:12:44.000Z
2020-11-11T08:27:35.000Z
MetaFGNet_with_Sample_Selection/main.py
ysdfanfan/MetaFGNet
a9c2128f5d2a6cdffa25d49291b037270f3de166
[ "MIT" ]
1
2020-10-08T07:28:18.000Z
2020-11-19T11:03:45.000Z
MetaFGNet_with_Sample_Selection/main.py
ysdfanfan/MetaFGNet
a9c2128f5d2a6cdffa25d49291b037270f3de166
[ "MIT" ]
5
2019-01-21T11:44:54.000Z
2020-11-18T02:15:45.000Z
############################################################################## # # All the codes about the model constructing should be kept in the folder ./models/ # All the codes about the data process should be kept in the folder ./data/ # The file ./opts.py stores the options. # The file ./trainer.py stores the tra...
46.744898
260
0.61635
import os import json import shutil import torch.optim from torch.autograd import Variable import torch.nn as nn import random import numpy as np import torch.backends.cudnn as cudnn from models.resnet import resnet from trainer import train from trainer import validate from opts import opts from data.prepare_data ...
true
true
1c0a9dda1be8cb4e83a13bc54bf0c4b0514fd83e
5,776
py
Python
dagfactory/utils.py
iercan/dag-factory
ae9227ac9fa3cd4d80ff31312c1cb1a92a024537
[ "MIT" ]
702
2018-11-21T15:11:37.000Z
2022-03-30T22:17:26.000Z
dagfactory/utils.py
iercan/dag-factory
ae9227ac9fa3cd4d80ff31312c1cb1a92a024537
[ "MIT" ]
104
2019-01-28T14:52:29.000Z
2022-03-03T20:30:27.000Z
dagfactory/utils.py
iercan/dag-factory
ae9227ac9fa3cd4d80ff31312c1cb1a92a024537
[ "MIT" ]
108
2018-11-22T18:16:09.000Z
2022-03-11T09:40:10.000Z
"""Module contains various utilities used by dag-factory""" import importlib.util import os import re import sys import ast import types from datetime import date, datetime, timedelta from pathlib import Path from typing import Any, AnyStr, Dict, Match, Optional, Pattern, Union import pendulum def get_datetime( ...
34.380952
126
0.683172
import importlib.util import os import re import sys import ast import types from datetime import date, datetime, timedelta from pathlib import Path from typing import Any, AnyStr, Dict, Match, Optional, Pattern, Union import pendulum def get_datetime( date_value: Union[str, datetime, date], timezone: str = "UTC...
true
true
1c0a9f8ff8cc732e254a54fdab07674c030149da
1,601
py
Python
jointcd/change_point_estimator.py
willemolding/JointGaussianChangeDetector
6f67d479a08999cc6427658c64591bf639e67689
[ "MIT" ]
null
null
null
jointcd/change_point_estimator.py
willemolding/JointGaussianChangeDetector
6f67d479a08999cc6427658c64591bf639e67689
[ "MIT" ]
null
null
null
jointcd/change_point_estimator.py
willemolding/JointGaussianChangeDetector
6f67d479a08999cc6427658c64591bf639e67689
[ "MIT" ]
2
2019-06-19T16:05:16.000Z
2021-01-20T00:53:00.000Z
from change_detector import ChangeDetector import numpy as np from functools import partial from scipy.spatial.distance import mahalanobis from scipy.linalg import pinvh def partition(sigma, k): """ Partitions a covariance matrix by zeroing out off diagonal blocks to create independence """ S = np.cop...
32.673469
105
0.687071
from change_detector import ChangeDetector import numpy as np from functools import partial from scipy.spatial.distance import mahalanobis from scipy.linalg import pinvh def partition(sigma, k): S = np.copy(sigma) S[k:,:k] = 0 S[:k,k:] = 0 return S def distance(x, mu, precisions): distances = np....
true
true
1c0aa057f76c05118d4733cf1fba1b8f5ecce8e0
15,702
py
Python
src/sentry/api/endpoints/group_details.py
pierredup/sentry
0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80
[ "BSD-3-Clause" ]
null
null
null
src/sentry/api/endpoints/group_details.py
pierredup/sentry
0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80
[ "BSD-3-Clause" ]
null
null
null
src/sentry/api/endpoints/group_details.py
pierredup/sentry
0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from datetime import timedelta import functools import logging from uuid import uuid4 from django.utils import timezone from rest_framework.response import Response from sentry import eventstream, tsdb, tagstore from sentry.api import client from sentry.api.base import DocSecti...
36.859155
100
0.596102
from __future__ import absolute_import from datetime import timedelta import functools import logging from uuid import uuid4 from django.utils import timezone from rest_framework.response import Response from sentry import eventstream, tsdb, tagstore from sentry.api import client from sentry.api.base import DocSecti...
true
true
1c0aa0cb525881a43c971c741ee820311209e62c
323
py
Python
fixture_packages/base/setup.py
hugovk/morepath
5596f9ce43ee4e5cd73eaa2ab9ef37825f88ae28
[ "BSD-3-Clause" ]
314
2015-01-01T01:42:52.000Z
2022-01-07T21:46:15.000Z
fixture_packages/base/setup.py
hugovk/morepath
5596f9ce43ee4e5cd73eaa2ab9ef37825f88ae28
[ "BSD-3-Clause" ]
369
2015-01-02T19:10:40.000Z
2021-07-03T04:37:27.000Z
fixture_packages/base/setup.py
hugovk/morepath
5596f9ce43ee4e5cd73eaa2ab9ef37825f88ae28
[ "BSD-3-Clause" ]
37
2015-01-11T09:22:02.000Z
2021-07-02T20:48:20.000Z
from setuptools import setup, find_packages setup( name="base", version="0.1.dev0", description="Base Test Fixture", author="Martijn Faassen", author_email="faassen@startifact.com", license="BSD", packages=find_packages(), zip_safe=False, install_requires=["setuptools", "morepath"],...
23.071429
48
0.681115
from setuptools import setup, find_packages setup( name="base", version="0.1.dev0", description="Base Test Fixture", author="Martijn Faassen", author_email="faassen@startifact.com", license="BSD", packages=find_packages(), zip_safe=False, install_requires=["setuptools", "morepath"],...
true
true
1c0aa1604f519962a11a563803754ae30395d547
3,452
py
Python
src/oscar/profiling/middleware.py
akiyoko/oscar_sandbox
b384f1c0b5f297fd4b84509a575f6766a48630a5
[ "BSD-3-Clause" ]
68
2016-11-06T05:07:57.000Z
2021-12-17T09:17:38.000Z
src/oscar/profiling/middleware.py
akiyoko/oscar_sandbox
b384f1c0b5f297fd4b84509a575f6766a48630a5
[ "BSD-3-Clause" ]
null
null
null
src/oscar/profiling/middleware.py
akiyoko/oscar_sandbox
b384f1c0b5f297fd4b84509a575f6766a48630a5
[ "BSD-3-Clause" ]
28
2016-12-04T07:12:50.000Z
2021-02-06T21:13:15.000Z
import cProfile import hotshot import hotshot.stats import pstats import sys import tempfile from cStringIO import StringIO def profile_this(fn): def profiled_fn(*args, **kwargs): filepath = "/tmp/%s.profile" % fn.__name__ prof = cProfile.Profile() ret = prof.runcall(fn, *args, **kwargs) ...
30.017391
95
0.595886
import cProfile import hotshot import hotshot.stats import pstats import sys import tempfile from cStringIO import StringIO def profile_this(fn): def profiled_fn(*args, **kwargs): filepath = "/tmp/%s.profile" % fn.__name__ prof = cProfile.Profile() ret = prof.runcall(fn, *args, **kwargs) ...
true
true
1c0aa16bd56eeb6bb1dc70812efc4d29935e39be
20,619
py
Python
tests/graphs/adapters/fixture_osm.py
pedrofreitascampospro/locintel
eb9c56cdc308660c31d90abe9fe62bd3634ba273
[ "MIT" ]
null
null
null
tests/graphs/adapters/fixture_osm.py
pedrofreitascampospro/locintel
eb9c56cdc308660c31d90abe9fe62bd3634ba273
[ "MIT" ]
null
null
null
tests/graphs/adapters/fixture_osm.py
pedrofreitascampospro/locintel
eb9c56cdc308660c31d90abe9fe62bd3634ba273
[ "MIT" ]
null
null
null
from locintel.core.datamodel.geo import GeoCoordinate, Geometry from locintel.graphs.datamodel.jurbey import Edge, Node from locintel.graphs.datamodel.types import ( EdgeType, RoadClass, RoadAccessibility, VehicleType, ) from unittest.mock import Mock """ ==============================================...
31.672811
96
0.427712
from locintel.core.datamodel.geo import GeoCoordinate, Geometry from locintel.graphs.datamodel.jurbey import Edge, Node from locintel.graphs.datamodel.types import ( EdgeType, RoadClass, RoadAccessibility, VehicleType, ) from unittest.mock import Mock expected_nodes = { 1: { "data": Node( ...
true
true
1c0aa1bf41db6fcf71fc262033605322a9e1005a
180,932
py
Python
src/ecoshard/geoprocessing/geoprocessing.py
richpsharp/ecoshard
4f5e15835160901b83001e82496576236b2328e5
[ "Apache-2.0" ]
null
null
null
src/ecoshard/geoprocessing/geoprocessing.py
richpsharp/ecoshard
4f5e15835160901b83001e82496576236b2328e5
[ "Apache-2.0" ]
null
null
null
src/ecoshard/geoprocessing/geoprocessing.py
richpsharp/ecoshard
4f5e15835160901b83001e82496576236b2328e5
[ "Apache-2.0" ]
null
null
null
# coding=UTF-8 """A collection of raster and vector algorithms and utilities.""" import collections import functools import logging import math import os import pprint import queue import shutil import sys import tempfile import threading import time from . import geoprocessing_core from .geoprocessing_core import DEF...
44.564532
86
0.645784
import collections import functools import logging import math import os import pprint import queue import shutil import sys import tempfile import threading import time from . import geoprocessing_core from .geoprocessing_core import DEFAULT_GTIFF_CREATION_TUPLE_OPTIONS from .geoprocessing_core import DEFAULT_OSR_AXI...
true
true
1c0aa252922b15cd4bac438f072a036d5169f0ef
750
py
Python
api/security/token.py
nguyenquangthang1997/bml
d91ca3ea33cab18e7b71eb88ec767ec29f36882c
[ "MIT" ]
null
null
null
api/security/token.py
nguyenquangthang1997/bml
d91ca3ea33cab18e7b71eb88ec767ec29f36882c
[ "MIT" ]
null
null
null
api/security/token.py
nguyenquangthang1997/bml
d91ca3ea33cab18e7b71eb88ec767ec29f36882c
[ "MIT" ]
null
null
null
from itsdangerous import TimedJSONWebSignatureSerializer as Serializer from itsdangerous import URLSafeSerializer as URLSafeSerializer def generate_auth_token(secret_key, username, password): serializer = Serializer(secret_key, expires_in=15000) token = serializer.dumps({'username': username, "password": pass...
30
74
0.786667
from itsdangerous import TimedJSONWebSignatureSerializer as Serializer from itsdangerous import URLSafeSerializer as URLSafeSerializer def generate_auth_token(secret_key, username, password): serializer = Serializer(secret_key, expires_in=15000) token = serializer.dumps({'username': username, "password": pass...
true
true
1c0aa39e2625edc345e58b00ecd0ef55e84e08e4
4,981
py
Python
scripts/csv-cat.py
jhostetler/jmcplan
489994fa60a084d4c361a6c62b22d1a5f713c117
[ "BSD-2-Clause" ]
2
2020-03-11T13:14:33.000Z
2021-07-17T22:45:15.000Z
scripts/csv-cat.py
jhostetler/jmcplan
489994fa60a084d4c361a6c62b22d1a5f713c117
[ "BSD-2-Clause" ]
null
null
null
scripts/csv-cat.py
jhostetler/jmcplan
489994fa60a084d4c361a6c62b22d1a5f713c117
[ "BSD-2-Clause" ]
null
null
null
# LICENSE # Copyright (c) 2013-2016, Jesse Hostetler (jessehostetler@gmail.com) # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyri...
35.326241
93
0.632805
import math from optparse import OptionParser import re import sys from csv import CsvDataset output_file = None options = None args = None def on_error( s ): global options if options.loose: print( "Warning: " + s ) else: raise ValueError( s ) def process_data( master, data ): global options for f...
true
true
1c0aa455f5a004848f13573929662b38785b39af
3,680
py
Python
my_neat.py
praxidike97/pyjump
9c6265562db3071584a057cf86212f7a0a512bcd
[ "MIT" ]
null
null
null
my_neat.py
praxidike97/pyjump
9c6265562db3071584a057cf86212f7a0a512bcd
[ "MIT" ]
null
null
null
my_neat.py
praxidike97/pyjump
9c6265562db3071584a057cf86212f7a0a512bcd
[ "MIT" ]
null
null
null
import sys import os import pickle import neat import argparse from game import Game def test_model(genome, capture=False): local_dir = os.path.dirname(__file__) config_file = os.path.join(local_dir, 'config-feedforward.txt') config = neat.Config(neat.DefaultGenome, neat.DefaultReproduction, ...
28.75
108
0.627989
import sys import os import pickle import neat import argparse from game import Game def test_model(genome, capture=False): local_dir = os.path.dirname(__file__) config_file = os.path.join(local_dir, 'config-feedforward.txt') config = neat.Config(neat.DefaultGenome, neat.DefaultReproduction, ...
true
true
1c0aa480c37b200cb280e620e5241d0858632b20
73,752
py
Python
aioipfs_api/autoapi.py
bmuller/aioipfs-api
8a855e31b4ca846b6cca8ecac153c7d2d2d18b1c
[ "MIT" ]
6
2018-05-06T16:58:04.000Z
2022-02-09T03:06:44.000Z
aioipfs_api/autoapi.py
bmuller/aioipfs-api
8a855e31b4ca846b6cca8ecac153c7d2d2d18b1c
[ "MIT" ]
null
null
null
aioipfs_api/autoapi.py
bmuller/aioipfs-api
8a855e31b4ca846b6cca8ecac153c7d2d2d18b1c
[ "MIT" ]
null
null
null
# IPFS Interface, autogenerated, don't touch! # pylint: disable=too-many-public-methods,line-too-long,too-many-lines class IPFSInterface: """ Autogenerated interface to the IPFS HTTP API version 0.4.15 """ VERSION = '0.4.15' def __init__(self, client): self.client = client async de...
32.093995
168
0.473967
# pylint: disable=too-many-public-methods,line-too-long,too-many-lines class IPFSInterface: VERSION = '0.4.15' def __init__(self, client): self.client = client async def add(self, path, **kwargs): endpoint = 'add' args = [(path, 'file')] return await self.client.get_par...
true
true
1c0aa6092a74cd543e0058e40b43b418d2c0f454
1,374
py
Python
rastertodataframe/tiling.py
mblackgeo/rastertodataframe
15a82e5a868cbb655e61d6bd2b8188ce8eda25ad
[ "MIT" ]
4
2021-10-11T16:15:55.000Z
2022-02-17T21:09:21.000Z
rastertodataframe/tiling.py
mblackgeo/rastertodataframe
15a82e5a868cbb655e61d6bd2b8188ce8eda25ad
[ "MIT" ]
30
2018-07-08T16:15:06.000Z
2021-09-15T20:17:52.000Z
rastertodataframe/tiling.py
mblackgeo/rastertodataframe
15a82e5a868cbb655e61d6bd2b8188ce8eda25ad
[ "MIT" ]
1
2019-09-03T11:38:34.000Z
2019-09-03T11:38:34.000Z
# -*- coding: utf-8 -*- """Utils for reading a GDAL Dataset in small tiles.""" def windows(ras, size=256): """Generator for raster window size/offsets. Parameters ---------- ras : gdal.Dataset Input raster. size : int Size of window in pixels. One value required which is used for ...
28.040816
79
0.593159
def windows(ras, size=256): ras_x = ras.RasterXSize ras_y = ras.RasterYSize for xoff in range(0, ras_x, size): xsize = (size if size + xoff <= ras_x else ras_x - xoff) for yoff in range(0, ras_y, size): ysize = (size if size + yoff <= ras_y else ras_y - yoff) yield ...
true
true
1c0aa78e6aae84e13c60ee16fe889abb02ac63e2
1,206
py
Python
contacts/models.py
juliusbentz/Django-CRM
e64296c4148a05ee201077ff2932bdb3f4d90c19
[ "MIT" ]
1
2019-03-04T05:21:14.000Z
2019-03-04T05:21:14.000Z
contacts/models.py
HodardHazwinayo/Django-CRM
a260b12704ceeeabfabd0eaa301ed909db58227e
[ "MIT" ]
null
null
null
contacts/models.py
HodardHazwinayo/Django-CRM
a260b12704ceeeabfabd0eaa301ed909db58227e
[ "MIT" ]
null
null
null
from django.db import models from django.utils.translation import ugettext_lazy as _ from accounts.models import Account from common.models import Address, User, Team class Contact(models.Model): first_name = models.CharField(_("First name"), max_length=255) last_name = models.CharField(_("Last name"), max_l...
44.666667
127
0.754561
from django.db import models from django.utils.translation import ugettext_lazy as _ from accounts.models import Account from common.models import Address, User, Team class Contact(models.Model): first_name = models.CharField(_("First name"), max_length=255) last_name = models.CharField(_("Last name"), max_l...
true
true
1c0aa78f9bb2edbb726b53ed693dd119b441f226
1,145
py
Python
tests/functional/test_client_class_names.py
gabrieldrs/ibm-cos-sdk-python-core
767fe2a42e047dcd2bd5b0f2bbc8259d83dbd4d8
[ "Apache-2.0" ]
6
2018-01-18T02:18:28.000Z
2021-03-16T17:42:48.000Z
tests/functional/test_client_class_names.py
gabrieldrs/ibm-cos-sdk-python-core
767fe2a42e047dcd2bd5b0f2bbc8259d83dbd4d8
[ "Apache-2.0" ]
12
2017-09-21T13:55:17.000Z
2022-01-25T16:48:28.000Z
tests/functional/test_client_class_names.py
gabrieldrs/ibm-cos-sdk-python-core
767fe2a42e047dcd2bd5b0f2bbc8259d83dbd4d8
[ "Apache-2.0" ]
10
2018-01-18T02:17:55.000Z
2020-06-29T13:50:59.000Z
# Copyright 2015 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
32.714286
73
0.762445
from nose.tools import assert_equal import ibm_botocore.session REGION = 'us-east-1' SERVICE_TO_CLASS_NAME = { 's3': 'S3' } def test_client_has_correct_class_name(): session = ibm_botocore.session.get_session() for service_name in SERVICE_TO_CLASS_NAME: client = session.create_client(service_n...
true
true
1c0aa7cccceec4766f5e9ca389c9fc67ef286bcb
4,530
py
Python
src/db/database.py
ahmed-gohary/CarRentalSystem
285cbbe9052903e60f8a38676af256c8a6b54fb8
[ "Xnet", "X11" ]
null
null
null
src/db/database.py
ahmed-gohary/CarRentalSystem
285cbbe9052903e60f8a38676af256c8a6b54fb8
[ "Xnet", "X11" ]
null
null
null
src/db/database.py
ahmed-gohary/CarRentalSystem
285cbbe9052903e60f8a38676af256c8a6b54fb8
[ "Xnet", "X11" ]
null
null
null
import os import threading import mysql.connector as ms_connector lock = threading.Lock() def locked(func): def wrapper(*args, **kwargs): try: lock.acquire(True) return func(*args, **kwargs) finally: lock.release() return wrapper class DBConfig: de...
28.853503
100
0.598455
import os import threading import mysql.connector as ms_connector lock = threading.Lock() def locked(func): def wrapper(*args, **kwargs): try: lock.acquire(True) return func(*args, **kwargs) finally: lock.release() return wrapper class DBConfig: de...
true
true
1c0aa7f9b9ee45b9eaf82dc46a2648d834dcd4ad
403
py
Python
python/paddle/trainer_config_helpers/tests/configs/test_cost_layers_with_weight.py
OleNet/Paddle
59271d643b13b13346889d12355611b9a2ce4e31
[ "Apache-2.0" ]
1
2016-10-07T20:40:11.000Z
2016-10-07T20:40:11.000Z
python/paddle/trainer_config_helpers/tests/configs/test_cost_layers_with_weight.py
anuranrc/Paddle
21fa3eb0688459d3b71141d316e8358d31882b8d
[ "Apache-2.0" ]
1
2017-05-26T18:33:00.000Z
2017-05-26T18:33:00.000Z
python/paddle/trainer_config_helpers/tests/configs/test_cost_layers_with_weight.py
anuranrc/Paddle
21fa3eb0688459d3b71141d316e8358d31882b8d
[ "Apache-2.0" ]
1
2016-10-07T00:50:53.000Z
2016-10-07T00:50:53.000Z
from paddle.trainer_config_helpers import * settings(learning_rate=1e-4, batch_size=1000) data = data_layer(name='input', size=300) lbl = data_layer(name='label', size=1) wt = data_layer(name='weight', size=1) fc = fc_layer(input=data, size=10, act=SoftmaxActivation()) outputs( classification_cost( input...
26.866667
59
0.707196
from paddle.trainer_config_helpers import * settings(learning_rate=1e-4, batch_size=1000) data = data_layer(name='input', size=300) lbl = data_layer(name='label', size=1) wt = data_layer(name='weight', size=1) fc = fc_layer(input=data, size=10, act=SoftmaxActivation()) outputs( classification_cost( input...
true
true
1c0aa83160cb9416fd75f671037a153d1af7d4d5
14,138
py
Python
tests/unit/common/test_utils.py
onecloud/gbp-rally
7589b1788c4de26bb66c531ef340ba080754f8c3
[ "Apache-2.0" ]
null
null
null
tests/unit/common/test_utils.py
onecloud/gbp-rally
7589b1788c4de26bb66c531ef340ba080754f8c3
[ "Apache-2.0" ]
null
null
null
tests/unit/common/test_utils.py
onecloud/gbp-rally
7589b1788c4de26bb66c531ef340ba080754f8c3
[ "Apache-2.0" ]
null
null
null
# Copyright 2013: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
32.726852
78
0.613382
from __future__ import print_function import string import sys import time import mock import testtools from rally.common.i18n import _ from rally.common import utils from rally import exceptions from tests.unit import test class ImmutableMixinTestCase(test.TestCase): def test_without_base_values(self): ...
true
true
1c0aa87b08c9f272fbc81c58d4a3d3b9d86ed7f7
4,706
py
Python
src/python/pants/base/exception_sink_test.py
Kludex/pants
3576b75b378f71196aaba9fd07925b5b2d294a7f
[ "Apache-2.0" ]
1
2016-04-27T15:35:42.000Z
2016-04-27T15:35:42.000Z
src/python/pants/base/exception_sink_test.py
Kludex/pants
3576b75b378f71196aaba9fd07925b5b2d294a7f
[ "Apache-2.0" ]
13
2022-02-18T22:52:57.000Z
2022-03-30T10:11:29.000Z
src/python/pants/base/exception_sink_test.py
Kludex/pants
3576b75b378f71196aaba9fd07925b5b2d294a7f
[ "Apache-2.0" ]
4
2021-06-18T09:11:27.000Z
2021-09-30T08:38:43.000Z
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import os import re import unittest.mock import pytest from pants.base.exception_sink import ExceptionSink from pants.engine.platform import Platform from pants.util.contextutil import t...
36.48062
101
0.675096
import os import re import unittest.mock import pytest from pants.base.exception_sink import ExceptionSink from pants.engine.platform import Platform from pants.util.contextutil import temporary_dir from pants.util.enums import match pytestmark = pytest.mark.platform_specific_behavior def _gen_sink_subclass(): ...
true
true
1c0aa8e2351b73b37a7dbb62c2b1e36c64512ebc
9,233
py
Python
tests/test_sample_generator.py
micheleantonazzi/gibson-dataset
cb5fc81061bbda1a653d6fc7b625b14c8a517f3c
[ "MIT" ]
3
2021-10-31T17:43:50.000Z
2022-03-21T08:55:01.000Z
tests/test_sample_generator.py
micheleantonazzi/gibson-dataset
cb5fc81061bbda1a653d6fc7b625b14c8a517f3c
[ "MIT" ]
null
null
null
tests/test_sample_generator.py
micheleantonazzi/gibson-dataset
cb5fc81061bbda1a653d6fc7b625b14c8a517f3c
[ "MIT" ]
null
null
null
import numpy as np import pytest from generic_dataset.data_pipeline import DataPipeline from generic_dataset.generic_sample import GenericSample, AnotherActivePipelineException, FieldHasIncorrectTypeException from generic_dataset.sample_generator import SampleGenerator, FieldNameAlreadyExistsException, \ FieldDoes...
44.389423
189
0.738438
import numpy as np import pytest from generic_dataset.data_pipeline import DataPipeline from generic_dataset.generic_sample import GenericSample, AnotherActivePipelineException, FieldHasIncorrectTypeException from generic_dataset.sample_generator import SampleGenerator, FieldNameAlreadyExistsException, \ FieldDoes...
true
true
1c0aa97a3d129da4d4dd04638771b56082fe72f8
140
py
Python
tools/run_train.py
firmamentqj/AlignPS
4aa8e4d200eea19269048c4382def8c4990001f4
[ "Apache-2.0" ]
144
2021-03-22T07:29:51.000Z
2022-03-30T03:04:09.000Z
tools/run_train.py
firmamentqj/AlignPS
4aa8e4d200eea19269048c4382def8c4990001f4
[ "Apache-2.0" ]
27
2021-03-27T13:57:20.000Z
2022-03-29T09:31:55.000Z
tools/run_train.py
firmamentqj/AlignPS
4aa8e4d200eea19269048c4382def8c4990001f4
[ "Apache-2.0" ]
31
2021-03-24T09:04:18.000Z
2022-02-02T13:18:47.000Z
python tools/train.py configs/fcos/fcos_center-normbbox-centeronreg-giou_r50_caffe_fpn_gn-head_4x4_1x_cuhk.py --gpus 1 --work-dir work_dirs
70
139
0.85
python tools/train.py configs/fcos/fcos_center-normbbox-centeronreg-giou_r50_caffe_fpn_gn-head_4x4_1x_cuhk.py --gpus 1 --work-dir work_dirs
false
true
1c0aa9e97ad89f57a975bada2496f409f461554d
55,635
py
Python
pytorch_pretrained_bert/modeling.py
calofmijuck/pytorch-bert-fine-tuning
9ef6454352ec4d25e1f33ce62b26f579dc5a406d
[ "MIT" ]
15
2019-07-02T15:23:45.000Z
2021-08-08T11:03:55.000Z
pytorch_pretrained_bert/modeling.py
calofmijuck/pytorch-bert-fine-tuning
9ef6454352ec4d25e1f33ce62b26f579dc5a406d
[ "MIT" ]
1
2019-10-24T11:12:52.000Z
2020-12-08T01:43:05.000Z
pytorch_pretrained_bert/modeling.py
calofmijuck/pytorch-bert-fine-tuning
9ef6454352ec4d25e1f33ce62b26f579dc5a406d
[ "MIT" ]
3
2019-07-10T18:18:13.000Z
2021-03-17T09:39:41.000Z
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HugginFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy...
49.017621
139
0.679033
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import copy import json import math import logging import tarfile import tempfile import shutil import torch from torch import nn from torch.nn import CrossEntropyLoss from .file_utils import cache...
true
true
1c0aaaa89197763963ef5f3ea8180cabeda32644
1,877
py
Python
apm_logging.py
drines/APmaker
05cf9ff672a06e7f1071fd81a07f6278ffed3e0e
[ "BSD-3-Clause" ]
null
null
null
apm_logging.py
drines/APmaker
05cf9ff672a06e7f1071fd81a07f6278ffed3e0e
[ "BSD-3-Clause" ]
null
null
null
apm_logging.py
drines/APmaker
05cf9ff672a06e7f1071fd81a07f6278ffed3e0e
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # PROGRAMMER: Daniel Rines # DATE CREATED: 2019.05.15 # REVISED DATE: 2019.05.15 # PURPOSE: Built-in logging capabilities # # NOTES: To help debug issues relating to exceptions or # JSON file development, APmaker utilizes a set of # ...
29.328125
68
0.622802
import logging from time import time, sleep class MyLogger: def __init__(self, function): self.function = function self.logger = logging.getLogger("function") self.logger.setLevel(logging.INFO) self.fh = logging.FileHandler("./logs/apm_info.log") ...
true
true
1c0aac8e6f05a5232f1cc5ce863903dd5e3b1c4f
1,589
py
Python
doslib/tripointertext.py
hmsjayne/ffr-hmsj
2fdae0788c1a6f5d6ac57c05ebbf7ba3c4e31f99
[ "Apache-2.0" ]
3
2020-01-19T03:42:46.000Z
2021-07-29T02:22:27.000Z
doslib/tripointertext.py
hmsjayne/ffr-hmsj
2fdae0788c1a6f5d6ac57c05ebbf7ba3c4e31f99
[ "Apache-2.0" ]
25
2019-06-16T02:17:17.000Z
2021-08-07T03:25:03.000Z
doslib/tripointertext.py
hmsjayne/ffr-hmsj
2fdae0788c1a6f5d6ac57c05ebbf7ba3c4e31f99
[ "Apache-2.0" ]
1
2020-04-02T01:48:28.000Z
2020-04-02T01:48:28.000Z
# Copyright 2020 Nicole Borrelli # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
34.543478
75
0.697294
from doslib.rom import Rom from doslib.textblock import TextBlock class TriPointerTextBlock(TextBlock): def __init__(self, rom: Rom, lut_offset: int, count: int): super().__init__(rom, lut_offset, count * 3) def __getitem__(self, index: int): return super().__getitem__(index * 3) ...
true
true
1c0aad769e01ce7978678efc069566e2129299a8
3,743
py
Python
samples/pymba_acquisition_continuous.py
lcarde/pymanip
d6f0b90b678d6f508d86d2d3ba3b580615c9566f
[ "CECILL-B" ]
null
null
null
samples/pymba_acquisition_continuous.py
lcarde/pymanip
d6f0b90b678d6f508d86d2d3ba3b580615c9566f
[ "CECILL-B" ]
null
null
null
samples/pymba_acquisition_continuous.py
lcarde/pymanip
d6f0b90b678d6f508d86d2d3ba3b580615c9566f
[ "CECILL-B" ]
null
null
null
from pathlib import Path import time import matplotlib.pyplot as plt import numpy as np import png from pymba import * from pymba.vimbaexception import VimbaException from pymba.vimbainterface import VimbaInterface from pymanip import Session # Paramètres de l'acquisition destination_dir = Path(r'C:\Users\Julien Sal...
27.522059
76
0.617954
from pathlib import Path import time import matplotlib.pyplot as plt import numpy as np import png from pymba import * from pymba.vimbaexception import VimbaException from pymba.vimbainterface import VimbaInterface from pymanip import Session destination_dir = Path(r'C:\Users\Julien Salort\Documents\Acquis') acquisi...
true
true
1c0aadef78353ac061dc50eff3cccf88d4593b16
26,165
py
Python
segan/models/generator.py
BaiYuhaoSpiceeYJ/SEGAN_denoise
5bf65ae72b9f0a996ae338c53c68c4967e08cd59
[ "MIT" ]
null
null
null
segan/models/generator.py
BaiYuhaoSpiceeYJ/SEGAN_denoise
5bf65ae72b9f0a996ae338c53c68c4967e08cd59
[ "MIT" ]
null
null
null
segan/models/generator.py
BaiYuhaoSpiceeYJ/SEGAN_denoise
5bf65ae72b9f0a996ae338c53c68c4967e08cd59
[ "MIT" ]
null
null
null
import torch from torch.autograd import Variable import torch.nn.functional as F import torch.nn.utils as nnu import torch.nn as nn import random import numpy as np try: from core import * from modules import * except ImportError: from .core import * from .modules import * # BEWARE: PyTorch >= 0.4.1 RE...
41.075353
97
0.456488
import torch from torch.autograd import Variable import torch.nn.functional as F import torch.nn.utils as nnu import torch.nn as nn import random import numpy as np try: from core import * from modules import * except ImportError: from .core import * from .modules import * from torch.nn.utils.spectral_...
true
true
1c0aae4eb377903aefba5e00d3ddf3b9cff3362c
4,093
py
Python
cars/models.py
gitRipan/carzone
7bf90783a4f8779d11a1263cf0dc5dc44dce15e4
[ "MIT" ]
null
null
null
cars/models.py
gitRipan/carzone
7bf90783a4f8779d11a1263cf0dc5dc44dce15e4
[ "MIT" ]
null
null
null
cars/models.py
gitRipan/carzone
7bf90783a4f8779d11a1263cf0dc5dc44dce15e4
[ "MIT" ]
null
null
null
from django.db import models from datetime import datetime from ckeditor.fields import RichTextField from multiselectfield import MultiSelectField class Car(models.Model): state_choice = ( ('AL', 'Alabama'), ('AK', 'Alaska'), ('AZ', 'Arizona'), ('AR', 'Arkansas'), ('CA', 'C...
33.826446
77
0.554361
from django.db import models from datetime import datetime from ckeditor.fields import RichTextField from multiselectfield import MultiSelectField class Car(models.Model): state_choice = ( ('AL', 'Alabama'), ('AK', 'Alaska'), ('AZ', 'Arizona'), ('AR', 'Arkansas'), ('CA', 'C...
true
true
1c0aafc099a28cc7b48c7c3a901c221e33a5a8d6
3,316
py
Python
model_cnn_svm.py
anchitagarwal/facial-expression-recognizer
270378b5f382c881f84c4932abb52bbf39f55ad5
[ "MIT" ]
3
2017-05-28T18:43:48.000Z
2020-04-18T13:49:35.000Z
model_cnn_svm.py
anchitagarwal/facial-expression-recognizer
270378b5f382c881f84c4932abb52bbf39f55ad5
[ "MIT" ]
null
null
null
model_cnn_svm.py
anchitagarwal/facial-expression-recognizer
270378b5f382c881f84c4932abb52bbf39f55ad5
[ "MIT" ]
4
2017-08-21T07:15:45.000Z
2021-05-11T16:31:34.000Z
from load_data import load_fer2013 import numpy as np from keras.models import Model from keras.layers import Input, Conv2D, MaxPooling2D, Dense, Dropout, Activation from keras.layers.pooling import GlobalAveragePooling2D from keras.layers.normalization import BatchNormalization from keras.utils import np_utils from ke...
33.494949
89
0.738842
from load_data import load_fer2013 import numpy as np from keras.models import Model from keras.layers import Input, Conv2D, MaxPooling2D, Dense, Dropout, Activation from keras.layers.pooling import GlobalAveragePooling2D from keras.layers.normalization import BatchNormalization from keras.utils import np_utils from ke...
false
true
1c0ab03d41f1aeeb6e051414964962fed7455b60
4,695
py
Python
scraper/configuration.py
Stimson-Center/stimson-web-scraper
c2e6c3ae4abb8e8697b10d844bfb0fa3d305d05f
[ "MIT" ]
1
2020-09-11T01:13:27.000Z
2020-09-11T01:13:27.000Z
scraper/configuration.py
Stimson-Center/stimson-web-scraper
c2e6c3ae4abb8e8697b10d844bfb0fa3d305d05f
[ "MIT" ]
15
2020-06-19T01:14:36.000Z
2021-09-08T02:00:20.000Z
scraper/configuration.py
Stimson-Center/stimson-web-scraper
c2e6c3ae4abb8e8697b10d844bfb0fa3d305d05f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ This class holds configuration objects, which can be thought of as settings.py but dynamic and changing for whatever parent object holds them. For example, pass in a config object to an Article object, Source object, or even network methods, and it just works. """ import logging from .pars...
32.832168
119
0.653674
import logging from .parser import Parser from .text import (StopWords, StopWordsArabic, StopWordsChinese, StopWordsKorean, StopWordsHindi, StopWordsJapanese, StopWordsThai, StopWordsNepali) from .version import __version__ __title__ = 'stimson-web-scraper' __author__ = 'Lucas Ou-Yang' __license__...
true
true
1c0ab0ca0e11062bd1a1e26086e84d9c70b22f92
3,091
py
Python
src/posts/api/serializers.py
lichi6174/django-api-lab
8772c36e8c044170fccf6445960974ef99fa5839
[ "MIT" ]
null
null
null
src/posts/api/serializers.py
lichi6174/django-api-lab
8772c36e8c044170fccf6445960974ef99fa5839
[ "MIT" ]
null
null
null
src/posts/api/serializers.py
lichi6174/django-api-lab
8772c36e8c044170fccf6445960974ef99fa5839
[ "MIT" ]
null
null
null
from rest_framework.serializers import ( ModelSerializer, HyperlinkedIdentityField, SerializerMethodField, ) from comments.api.serializers import CommentSerializer from accounts.api.serializers import UserDetailSerializer from comments.models import Comment from posts.models import Post class PostCreateUp...
23.59542
58
0.581042
from rest_framework.serializers import ( ModelSerializer, HyperlinkedIdentityField, SerializerMethodField, ) from comments.api.serializers import CommentSerializer from accounts.api.serializers import UserDetailSerializer from comments.models import Comment from posts.models import Post class PostCreateUp...
true
true
1c0ab103f074c28636ad3a02d17f13d86161272e
5,856
py
Python
t01_adventure.py
2019-fall-csc-226/t01-choose-your-own-adventure-richardsonmas-zapatamezaj-t01
d4445e709250f45c98823b885fee3a6753932357
[ "MIT" ]
null
null
null
t01_adventure.py
2019-fall-csc-226/t01-choose-your-own-adventure-richardsonmas-zapatamezaj-t01
d4445e709250f45c98823b885fee3a6753932357
[ "MIT" ]
null
null
null
t01_adventure.py
2019-fall-csc-226/t01-choose-your-own-adventure-richardsonmas-zapatamezaj-t01
d4445e709250f45c98823b885fee3a6753932357
[ "MIT" ]
null
null
null
###################################################################### # Author: Mason Richardson Jose Zapata Meza TODO: Change this to your names # Username: Richardsonmas zapatamezaj TODO: Change this to your usernames # # Assignment: T01: Choose Your Own Adventure # # Purpose: To create a choose-your-own-advent...
45.046154
181
0.622097
from time import sleep delay = 1.0 dead = False username = input("What do they call you, unworthy adversary? ") print() print("Welcome,", username, ", to the labyrinth.") sleep(delay) print("Before you lies two paths. One path leads to treasures of unimaginable worth.") print("The other, certain dea...
true
true
1c0ab109dbfe0ca5c032131fb1f59f7c5b63c8e1
267
py
Python
lite/config/desktop.py
ahmad18189/erptag-setup-wizard
14c893366e9fb2d258dd4c3d9374d3926a78e795
[ "MIT" ]
null
null
null
lite/config/desktop.py
ahmad18189/erptag-setup-wizard
14c893366e9fb2d258dd4c3d9374d3926a78e795
[ "MIT" ]
null
null
null
lite/config/desktop.py
ahmad18189/erptag-setup-wizard
14c893366e9fb2d258dd4c3d9374d3926a78e795
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "module_name": "ERP Setup", "color": "grey", "icon": "octicon octicon-file-directory", "type": "module", "label": _("ERP Setup") } ]
17.8
44
0.610487
from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "module_name": "ERP Setup", "color": "grey", "icon": "octicon octicon-file-directory", "type": "module", "label": _("ERP Setup") } ]
true
true
1c0ab34b3800c96c4cf3ff8c966700c14dbda9b6
5,187
py
Python
apps/users/handlers.py
opaniagu/fastapi_mongodb
2a58c89a16efca8f656cc64d923e1eecb4120a80
[ "MIT" ]
null
null
null
apps/users/handlers.py
opaniagu/fastapi_mongodb
2a58c89a16efca8f656cc64d923e1eecb4120a80
[ "MIT" ]
null
null
null
apps/users/handlers.py
opaniagu/fastapi_mongodb
2a58c89a16efca8f656cc64d923e1eecb4120a80
[ "MIT" ]
null
null
null
import datetime import fastapi import pymongo import pymongo.errors import pymongo.results from apps.common.enums import CodeAudiences from apps.common.handlers import PasswordsHandler, TokensHandler from apps.users.models import UserModel from apps.users.repositories import UserRepository from apps.users.schemas imp...
42.170732
118
0.672065
import datetime import fastapi import pymongo import pymongo.errors import pymongo.results from apps.common.enums import CodeAudiences from apps.common.handlers import PasswordsHandler, TokensHandler from apps.users.models import UserModel from apps.users.repositories import UserRepository from apps.users.schemas imp...
true
true
1c0ab3ee283f58699671a5e7224784d4934d8c3b
265
py
Python
plugin/constants.py
angry-tony/mist-cloudify-plugin
7034623e5f80060a2d00d62392b5634503dc545c
[ "Apache-2.0" ]
6
2016-05-14T07:03:30.000Z
2019-01-30T02:43:08.000Z
plugin/constants.py
angry-tony/mist-cloudify-plugin
7034623e5f80060a2d00d62392b5634503dc545c
[ "Apache-2.0" ]
3
2016-05-10T10:18:47.000Z
2016-07-29T18:48:31.000Z
plugin/constants.py
angry-tony/mist-cloudify-plugin
7034623e5f80060a2d00d62392b5634503dc545c
[ "Apache-2.0" ]
5
2015-09-04T14:12:49.000Z
2021-07-07T21:56:54.000Z
INSTANCE_REQUIRED_PROPERTIES = ( 'cloud_id', 'key_id', 'size_id', 'image_id', 'location_id', 'networks', ) STORAGE = ( "/tmp/templates/kubernetes-blueprint/local-storage/local/node-instances" ) CLOUD_INIT_PROVIDERS = [ "libvirt" ]
15.588235
76
0.645283
INSTANCE_REQUIRED_PROPERTIES = ( 'cloud_id', 'key_id', 'size_id', 'image_id', 'location_id', 'networks', ) STORAGE = ( "/tmp/templates/kubernetes-blueprint/local-storage/local/node-instances" ) CLOUD_INIT_PROVIDERS = [ "libvirt" ]
true
true
1c0ab4c082b3cf1065f54b56fd952ceac29e6ab2
11,142
py
Python
utils.py
virajmehta/vae-training
dc99fea6f012b7256ad65f65972183fc22e82c8e
[ "MIT" ]
null
null
null
utils.py
virajmehta/vae-training
dc99fea6f012b7256ad65f65972183fc22e82c8e
[ "MIT" ]
null
null
null
utils.py
virajmehta/vae-training
dc99fea6f012b7256ad65f65972183fc22e82c8e
[ "MIT" ]
null
null
null
import os import jax import jax.numpy as jnp from jax import lax import jax.nn.initializers as initializers import flax import numpy as np import cv2 import json DATA_DIR = 'data/' class Constants: """ Recommended hyperparameters (Feel free to add/remove/modify these values). """ lambd = 10 alph...
34.177914
89
0.578442
import os import jax import jax.numpy as jnp from jax import lax import jax.nn.initializers as initializers import flax import numpy as np import cv2 import json DATA_DIR = 'data/' class Constants: lambd = 10 alpha = 0.1 epsilon_singular_value = 1e-7 def sigmoid(x): return 1 / (1 + jnp.exp(-x)...
true
true
1c0ab565840dd214f29c6bc92e2836a489443d34
168
py
Python
wikum-env3/lib/python3.7/site-packages/pinax/apps/account/signals.py
xuericlin/wikum
f0171f1697efa91d6957f976f473c9201db85648
[ "MIT" ]
null
null
null
wikum-env3/lib/python3.7/site-packages/pinax/apps/account/signals.py
xuericlin/wikum
f0171f1697efa91d6957f976f473c9201db85648
[ "MIT" ]
null
null
null
wikum-env3/lib/python3.7/site-packages/pinax/apps/account/signals.py
xuericlin/wikum
f0171f1697efa91d6957f976f473c9201db85648
[ "MIT" ]
null
null
null
import django.dispatch user_logged_in = django.dispatch.Signal(providing_args=["request", "user"]) password_changed = django.dispatch.Signal(providing_args=["user",])
33.6
75
0.791667
import django.dispatch user_logged_in = django.dispatch.Signal(providing_args=["request", "user"]) password_changed = django.dispatch.Signal(providing_args=["user",])
true
true
1c0ab66778f3e8e5466500956639dc02c88b7722
1,984
py
Python
Plugins/Transforms/Text.py
bvbohnen/X4_Customizer
6f865008690916a66a44c97331d9a2692baedb35
[ "MIT" ]
25
2018-12-10T12:52:11.000Z
2022-01-29T14:42:57.000Z
Plugins/Transforms/Text.py
bvbohnen/X4_Customizer
6f865008690916a66a44c97331d9a2692baedb35
[ "MIT" ]
4
2019-08-01T19:09:11.000Z
2022-01-02T01:47:42.000Z
Plugins/Transforms/Text.py
bvbohnen/X4_Customizer
6f865008690916a66a44c97331d9a2692baedb35
[ "MIT" ]
6
2019-02-16T08:39:04.000Z
2021-12-21T06:11:58.000Z
from Framework import Transform_Wrapper, Settings, Load_File, File_System ''' Note: color codes may be given as \033#RRGGBB# where the rgb values are given as 16-bit hex characters, eg. \033#7F7F7F# for grey. TODO: verify this before adding to function doc. ''' @Transform_Wrapper(category = 'Text') def Color_Text( ...
29.61194
82
0.610383
from Framework import Transform_Wrapper, Settings, Load_File, File_System @Transform_Wrapper(category = 'Text') def Color_Text( *page_t_colors ): game_files = File_System.Load_Files('t/*.xml') for game_file in game_files: xml_root = game_file.Get_Root() ...
true
true
1c0ab678dd33085660a8601117870b15f4998dd3
564
py
Python
cycles/utils/invisibleGround.py
em-yu/BlenderToolbox
ac9da757c8c372237458467aa6663bcdbb86b803
[ "Apache-2.0" ]
3
2020-08-25T12:37:41.000Z
2021-11-15T15:26:02.000Z
cycles/utils/invisibleGround.py
em-yu/BlenderToolbox
ac9da757c8c372237458467aa6663bcdbb86b803
[ "Apache-2.0" ]
null
null
null
cycles/utils/invisibleGround.py
em-yu/BlenderToolbox
ac9da757c8c372237458467aa6663bcdbb86b803
[ "Apache-2.0" ]
1
2021-11-15T15:26:08.000Z
2021-11-15T15:26:08.000Z
import bpy def invisibleGround(location = (0,0,0), groundSize = 20, shadowBrightness = 0.7): # initialize a ground for shadow bpy.context.scene.cycles.film_transparent = True bpy.ops.mesh.primitive_plane_add(location = location, size = groundSize) bpy.context.object.cycles.is_shadow_catcher = True # # set materi...
35.25
86
0.769504
import bpy def invisibleGround(location = (0,0,0), groundSize = 20, shadowBrightness = 0.7): bpy.context.scene.cycles.film_transparent = True bpy.ops.mesh.primitive_plane_add(location = location, size = groundSize) bpy.context.object.cycles.is_shadow_catcher = True ground = bpy.context.object mat = bpy.data.ma...
true
true
1c0ab91a03d4c4884aae05e00d094fe8aa128d03
7,337
py
Python
pubsub/tests/unit/pubsub_v1/publisher/test_publisher_client.py
cclauss/google-cloud-python
90f3d0b5304fd8aef9cedc35d9323d257b5a36fb
[ "Apache-2.0" ]
1
2021-06-30T11:43:47.000Z
2021-06-30T11:43:47.000Z
pubsub/tests/unit/pubsub_v1/publisher/test_publisher_client.py
cclauss/google-cloud-python
90f3d0b5304fd8aef9cedc35d9323d257b5a36fb
[ "Apache-2.0" ]
null
null
null
pubsub/tests/unit/pubsub_v1/publisher/test_publisher_client.py
cclauss/google-cloud-python
90f3d0b5304fd8aef9cedc35d9323d257b5a36fb
[ "Apache-2.0" ]
1
2021-06-30T11:44:03.000Z
2021-06-30T11:44:03.000Z
# Copyright 2017, Google LLC All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
32.039301
77
0.703557
from __future__ import absolute_import from google.auth import credentials import mock import pytest from google.cloud.pubsub_v1.gapic import publisher_client from google.cloud.pubsub_v1 import publisher from google.cloud.pubsub_v1 import types def test_init(): creds = mock.Mock(spec=credentials.Credentials) ...
true
true
1c0aba4ece687094d9519d88a3e6b128367ac9aa
4,382
py
Python
_lambda/ask_sdk_model/interfaces/connections/entities/base_entity.py
desarroyo/alexa-skill-mi-abecedario
71fb9dc5a9ce2aeb7e336474d5162053e3af0369
[ "MIT" ]
null
null
null
_lambda/ask_sdk_model/interfaces/connections/entities/base_entity.py
desarroyo/alexa-skill-mi-abecedario
71fb9dc5a9ce2aeb7e336474d5162053e3af0369
[ "MIT" ]
null
null
null
_lambda/ask_sdk_model/interfaces/connections/entities/base_entity.py
desarroyo/alexa-skill-mi-abecedario
71fb9dc5a9ce2aeb7e336474d5162053e3af0369
[ "MIT" ]
null
null
null
# coding: utf-8 # # Copyright 2019 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "lice...
31.3
111
0.606801
import pprint import re import six import typing from enum import Enum from abc import ABCMeta, abstractmethod if typing.TYPE_CHECKING: from typing import Dict, List, Optional from datetime import datetime class BaseEntity(object): deserialized_types = { 'object_type': 'str', 'version...
true
true
1c0abaa5a3b20465c7c4db14928ac9173e2762da
29,479
py
Python
skfda/exploratory/visualization/_boxplot.py
jdtuck/scikit-fda
28259dffbc45dfc8dbf3c12839b928f9df200351
[ "BSD-3-Clause" ]
null
null
null
skfda/exploratory/visualization/_boxplot.py
jdtuck/scikit-fda
28259dffbc45dfc8dbf3c12839b928f9df200351
[ "BSD-3-Clause" ]
null
null
null
skfda/exploratory/visualization/_boxplot.py
jdtuck/scikit-fda
28259dffbc45dfc8dbf3c12839b928f9df200351
[ "BSD-3-Clause" ]
null
null
null
"""Functional Data Boxplot Module. This module contains the classes to construct the functional data boxplot and visualize it. """ from abc import ABC, abstractmethod import math import matplotlib import matplotlib.pyplot as plt import numpy as np from ..depth import ModifiedBandDepth from ..outliers import _envel...
38.434159
80
0.506123
from abc import ABC, abstractmethod import math import matplotlib import matplotlib.pyplot as plt import numpy as np from ..depth import ModifiedBandDepth from ..outliers import _envelopes from ._utils import (_figure_to_svg, _get_figure_and_axes, _set_figure_layout_for_fdata, _set_labels) __a...
true
true
1c0abc4e2daea142aad6448100cacf6af6e65bd0
891
py
Python
app/main/forms.py
ErastusNjaramba/Pitch
d51b2e284bef3752b16b9f129916eb956fd60897
[ "MIT" ]
null
null
null
app/main/forms.py
ErastusNjaramba/Pitch
d51b2e284bef3752b16b9f129916eb956fd60897
[ "MIT" ]
null
null
null
app/main/forms.py
ErastusNjaramba/Pitch
d51b2e284bef3752b16b9f129916eb956fd60897
[ "MIT" ]
null
null
null
from flask_wtf import FlaskForm from wtforms import StringField,PasswordField,SubmitField,BooleanField,TextAreaField,SelectField from wtforms.validators import Required,Email,EqualTo from wtforms import ValidationError from ..models import User class updateProfile(FlaskForm): bio = TextAreaField('Tell us about yo...
44.55
179
0.75982
from flask_wtf import FlaskForm from wtforms import StringField,PasswordField,SubmitField,BooleanField,TextAreaField,SelectField from wtforms.validators import Required,Email,EqualTo from wtforms import ValidationError from ..models import User class updateProfile(FlaskForm): bio = TextAreaField('Tell us about yo...
true
true
1c0abceba0e3dccd55541a4bf3574836b8650547
32,544
py
Python
astropy/convolution/kernels.py
jairideout/astropy
2534a2dd747da3d50644812ce4faab6d909e7f36
[ "BSD-3-Clause" ]
null
null
null
astropy/convolution/kernels.py
jairideout/astropy
2534a2dd747da3d50644812ce4faab6d909e7f36
[ "BSD-3-Clause" ]
null
null
null
astropy/convolution/kernels.py
jairideout/astropy
2534a2dd747da3d50644812ce4faab6d909e7f36
[ "BSD-3-Clause" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst import math import numpy as np from .core import Kernel1D, Kernel2D, Kernel from .utils import KernelSizeError from ..modeling import models from ..modeling.core import Fittable1DModel, Fittable2DModel from ..utils.decorators import deprecated_renamed_a...
31.688413
86
0.603153
import math import numpy as np from .core import Kernel1D, Kernel2D, Kernel from .utils import KernelSizeError from ..modeling import models from ..modeling.core import Fittable1DModel, Fittable2DModel from ..utils.decorators import deprecated_renamed_argument __all__ = ['Gaussian1DKernel', 'Gaussian2DKernel', 'Cus...
true
true
1c0abd33f9c1bd07b3369bf985ed4d6c6c007e77
3,110
py
Python
src/mcedit2/widgets/blocktype_list.py
elcarrion06/mcedit2
4bb98da521447b6cf43d923cea9f00acf2f427e9
[ "BSD-3-Clause" ]
673
2015-01-02T02:08:13.000Z
2022-03-24T19:38:14.000Z
src/mcedit2/widgets/blocktype_list.py
ozzhates/mcedit2
4bb98da521447b6cf43d923cea9f00acf2f427e9
[ "BSD-3-Clause" ]
526
2015-01-01T02:10:53.000Z
2022-02-06T16:24:21.000Z
src/mcedit2/widgets/blocktype_list.py
ozzhates/mcedit2
4bb98da521447b6cf43d923cea9f00acf2f427e9
[ "BSD-3-Clause" ]
231
2015-01-01T16:47:30.000Z
2022-03-31T21:51:55.000Z
""" blocktype_list """ from __future__ import absolute_import, division, print_function, unicode_literals from PySide import QtGui, QtCore import logging from mcedit2.resourceloader import ResourceNotFound from mcedit2.ui.blocktype_list import Ui_blocktypeList log = logging.getLogger(__name__) class BlockListWidg...
34.555556
116
0.651768
from __future__ import absolute_import, division, print_function, unicode_literals from PySide import QtGui, QtCore import logging from mcedit2.resourceloader import ResourceNotFound from mcedit2.ui.blocktype_list import Ui_blocktypeList log = logging.getLogger(__name__) class BlockListWidget(QtGui.QWidget, Ui_blockt...
true
true
1c0abd3a872a68a839f79816b5a286305cbf6d5c
6,465
py
Python
Lib/test/test_importlib/test_windows.py
fochoao/CPython
c92e0770af558fe3e440e44d3605c3acaf3c5b68
[ "TCL", "0BSD" ]
null
null
null
Lib/test/test_importlib/test_windows.py
fochoao/CPython
c92e0770af558fe3e440e44d3605c3acaf3c5b68
[ "TCL", "0BSD" ]
null
null
null
Lib/test/test_importlib/test_windows.py
fochoao/CPython
c92e0770af558fe3e440e44d3605c3acaf3c5b68
[ "TCL", "0BSD" ]
null
null
null
from . import util as test_util machinery = test_util.import_importlib('importlib.machinery') import os import re import sys import unittest from test import support from distutils.util import get_platform from contextlib import contextmanager from .util import temp_module support.import_module('winreg', required_on=...
38.945783
89
0.623511
from . import util as test_util machinery = test_util.import_importlib('importlib.machinery') import os import re import sys import unittest from test import support from distutils.util import get_platform from contextlib import contextmanager from .util import temp_module support.import_module('winreg', required_on=...
true
true
1c0abde104fcf296141fdc5abe3e7f16a8632ef0
16,687
py
Python
data/user_input/plots/acoustic/plot_TL_NR_Input.py
open-pulse/OpenPulse
ef49cd1ff672821c4b57729c0ef9f4ff5a83eadf
[ "MIT" ]
23
2020-01-14T12:49:11.000Z
2021-11-10T05:19:29.000Z
data/user_input/plots/acoustic/plot_TL_NR_Input.py
open-pulse/OpenPulse
ef49cd1ff672821c4b57729c0ef9f4ff5a83eadf
[ "MIT" ]
101
2020-01-23T19:29:00.000Z
2022-03-15T17:56:23.000Z
data/user_input/plots/acoustic/plot_TL_NR_Input.py
open-pulse/OpenPulse
ef49cd1ff672821c4b57729c0ef9f4ff5a83eadf
[ "MIT" ]
3
2020-01-14T12:49:26.000Z
2022-01-13T02:06:53.000Z
from PyQt5.QtWidgets import QMessageBox, QLineEdit, QDialog, QFileDialog, QWidget, QTreeWidget, QRadioButton, QTreeWidgetItem, QTabWidget, QLabel, QCheckBox, QPushButton, QToolButton, QSpinBox from pulse.utils import error from os.path import basename from PyQt5.QtGui import QIcon from PyQt5.QtGui import QColor, QBrush...
41.822055
192
0.630671
from PyQt5.QtWidgets import QMessageBox, QLineEdit, QDialog, QFileDialog, QWidget, QTreeWidget, QRadioButton, QTreeWidgetItem, QTabWidget, QLabel, QCheckBox, QPushButton, QToolButton, QSpinBox from pulse.utils import error from os.path import basename from PyQt5.QtGui import QIcon from PyQt5.QtGui import QColor, QBrush...
true
true
1c0ac005ed9ac15747a8d2e7d99880ec45458b77
596
py
Python
gallery/googleplaystore_analytics/intro.py
arvkevi/awesome-streamlit
be454e29c35a9a1a760b1737a5176a47f4f9717b
[ "CC0-1.0" ]
1,194
2019-10-09T06:15:27.000Z
2022-03-31T14:53:00.000Z
gallery/googleplaystore_analytics/intro.py
arvkevi/awesome-streamlit
be454e29c35a9a1a760b1737a5176a47f4f9717b
[ "CC0-1.0" ]
55
2019-10-09T12:08:39.000Z
2022-02-10T00:48:53.000Z
gallery/googleplaystore_analytics/intro.py
arvkevi/awesome-streamlit
be454e29c35a9a1a760b1737a5176a47f4f9717b
[ "CC0-1.0" ]
272
2019-10-09T12:04:31.000Z
2022-03-29T02:43:30.000Z
import streamlit as st # not used as originally intended to be render on the page itself, but not able to do so. # with open("website/assets/overall_100_topics_enhanced.html", 'r') as f: # html_string = f.read() def write(): st.title("Google Playstore Analytics") st.write( "Trends in App Store Da...
28.380952
90
0.637584
import streamlit as st def write(): st.title("Google Playstore Analytics") st.write( "Trends in App Store Data, App Reviews and Prediction of Individual Star Ratings") st.write( """ Team members: - Chua Wan Yun - Tey Siew Wen - Marooth Nath Chaowan...
true
true
1c0ac22683b4c00de54c8d204ad4c35013eb1609
5,864
py
Python
pyglet-hg/examples/fixed_resolution.py
sangh/LaserShow
abc95e465e3455dc220cc602dd58358c84666f29
[ "BSD-3-Clause" ]
21
2015-11-03T03:15:36.000Z
2021-03-15T22:00:47.000Z
examples/fixed_resolution.py
seeminglee/pyglet64
3dd167b5b0d3ad132a157e404586e53c2bb21736
[ "BSD-3-Clause" ]
3
2017-09-14T14:08:28.000Z
2019-05-20T04:38:15.000Z
examples/fixed_resolution.py
seeminglee/pyglet64
3dd167b5b0d3ad132a157e404586e53c2bb21736
[ "BSD-3-Clause" ]
23
2017-04-15T19:23:08.000Z
2020-09-08T11:55:29.000Z
#!/usr/bin/env python # ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are ...
37.350318
78
0.681787
from pyglet.gl import * import pyglet # also use this technique on ordinary resizable windows. window = pyglet.window.Window(fullscreen=True) # Use 320x200 fixed resolution to make the effect completely obvious. You # can change this to a more reasonable value such as 800x600 here. target_resolution = 320, 200 cl...
true
true
1c0ac28a18466920f4ffd3ef81c691f7b4bd3cfa
485
py
Python
ABC/202/d.py
buchi1002/AtCoder
e678a8a1f0edb3eab922ee5f65f6742791c231b3
[ "MIT" ]
null
null
null
ABC/202/d.py
buchi1002/AtCoder
e678a8a1f0edb3eab922ee5f65f6742791c231b3
[ "MIT" ]
null
null
null
ABC/202/d.py
buchi1002/AtCoder
e678a8a1f0edb3eab922ee5f65f6742791c231b3
[ "MIT" ]
null
null
null
import math def comb(n, r): return math.factorial(n) // (math.factorial(n - r) * math.factorial(r)) def main(): # input A, B, K = map(int, input().split()) # compute N = 0 n = A + B for i in range(A): c = comb(n, i) if K > c**c: N += 1 else: ...
20.208333
76
0.426804
import math def comb(n, r): return math.factorial(n) // (math.factorial(n - r) * math.factorial(r)) def main(): A, B, K = map(int, input().split()) N = 0 n = A + B for i in range(A): c = comb(n, i) if K > c**c: N += 1 else: break ...
true
true
1c0ac2aa1986ba32e2abbbb4db1fadfcc154e76f
1,964
py
Python
observations/r/alcohol.py
hajime9652/observations
2c8b1ac31025938cb17762e540f2f592e302d5de
[ "Apache-2.0" ]
199
2017-07-24T01:34:27.000Z
2022-01-29T00:50:55.000Z
observations/r/alcohol.py
hajime9652/observations
2c8b1ac31025938cb17762e540f2f592e302d5de
[ "Apache-2.0" ]
46
2017-09-05T19:27:20.000Z
2019-01-07T09:47:26.000Z
observations/r/alcohol.py
hajime9652/observations
2c8b1ac31025938cb17762e540f2f592e302d5de
[ "Apache-2.0" ]
45
2017-07-26T00:10:44.000Z
2022-03-16T20:44:59.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import csv import numpy as np import os import sys from observations.util import maybe_download_and_extract def alcohol(path): """Alcohol Solubility in Water Data The solubility ...
26.186667
74
0.70112
from __future__ import absolute_import from __future__ import division from __future__ import print_function import csv import numpy as np import os import sys from observations.util import maybe_download_and_extract def alcohol(path): import pandas as pd path = os.path.expanduser(path) filename = 'alcohol.cs...
true
true
1c0ac2e5fb46b4b9d9d958daa91a4d8c90835fc8
329
py
Python
__init__.py
CCapelini/superficies-skill
b2aa3cab40f2ed3dee68dcfe00bf8b87cec12814
[ "Apache-2.0" ]
null
null
null
__init__.py
CCapelini/superficies-skill
b2aa3cab40f2ed3dee68dcfe00bf8b87cec12814
[ "Apache-2.0" ]
null
null
null
__init__.py
CCapelini/superficies-skill
b2aa3cab40f2ed3dee68dcfe00bf8b87cec12814
[ "Apache-2.0" ]
null
null
null
from mycroft import MycroftSkill, intent_file_handler class Superficies(MycroftSkill): def __init__(self): MycroftSkill.__init__(self) @intent_file_handler('superficies.intent') def handle_superficies(self, message): self.speak_dialog('superficies') def create_skill(): return Superf...
20.5625
53
0.735562
from mycroft import MycroftSkill, intent_file_handler class Superficies(MycroftSkill): def __init__(self): MycroftSkill.__init__(self) @intent_file_handler('superficies.intent') def handle_superficies(self, message): self.speak_dialog('superficies') def create_skill(): return Superf...
true
true
1c0ac3c505d8c2c1320210046322c3a43bde5f3c
9,728
py
Python
image_labelling_tool/labelling_tool_jupyter.py
claytonbrown/image-labelling-tool
4a8f046d729f68a2fb214104a7522111a88c100a
[ "MIT" ]
61
2017-07-31T00:38:49.000Z
2022-01-22T02:09:36.000Z
image_labelling_tool/labelling_tool_jupyter.py
claytonbrown/image-labelling-tool
4a8f046d729f68a2fb214104a7522111a88c100a
[ "MIT" ]
4
2017-08-24T21:51:16.000Z
2020-04-03T09:32:59.000Z
image_labelling_tool/labelling_tool_jupyter.py
claytonbrown/image-labelling-tool
4a8f046d729f68a2fb214104a7522111a88c100a
[ "MIT" ]
22
2017-08-09T14:36:53.000Z
2022-02-07T01:37:54.000Z
# The MIT License (MIT) # # Copyright (c) 2015 University of East Anglia, Norwich, UK # # 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 r...
38.912
123
0.62315
import base64, json, sys from ipywidgets import widgets from IPython.utils.traitlets import Unicode, Integer, List, Dict from . import labelling_tool class ImageLabellingTool (widgets.DOMWidget): _view_name = Unicode('ImageLabellingToolView', sync=True) _view_module = Unicode('image-labelling-tool', ...
true
true
1c0ac3c5b76df6ac5f9c8f833dc484ff721277e0
1,742
py
Python
aws-dev/awsdev8/venv/Scripts/rst2odt_prepstyles.py
PacktPublishing/-AWS-Certified-Developer---Associate-Certification
3f76e3d3df6797705b5b30ae574fe678250d5e92
[ "MIT" ]
13
2020-02-02T13:53:50.000Z
2022-03-20T19:50:02.000Z
aws-dev/awsdev63/venv/Scripts/rst2odt_prepstyles.py
PacktPublishing/-AWS-Certified-Developer---Associate-Certification
3f76e3d3df6797705b5b30ae574fe678250d5e92
[ "MIT" ]
2
2020-03-29T19:08:04.000Z
2021-06-02T00:57:44.000Z
aws-dev/awsdev63/venv/Scripts/rst2odt_prepstyles.py
PacktPublishing/-AWS-Certified-Developer---Associate-Certification
3f76e3d3df6797705b5b30ae574fe678250d5e92
[ "MIT" ]
10
2019-12-25T20:42:37.000Z
2021-11-17T15:19:00.000Z
#!E:\Dropbox\projects\aws-dev\awsdev63\venv\Scripts\python.exe # $Id: rst2odt_prepstyles.py 5839 2009-01-07 19:09:28Z dkuhlman $ # Author: Dave Kuhlman <dkuhlman@rexx.com> # Copyright: This module has been placed in the public domain. """ Fix a word-processor-generated styles.odt for odtwriter use: Drop page size spe...
25.617647
75
0.641791
from lxml import etree import sys import zipfile from tempfile import mkstemp import shutil import os NAMESPACES = { "style": "urn:oasis:names:tc:opendocument:xmlns:style:1.0", "fo": "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" } def prepstyle(filename): zin = zipfile.ZipFile(fil...
true
true
1c0ac43cd18220fce057ad169422897064732d44
399
py
Python
symbolic_activations.py
mkofinas/machine-learning-tutorials
b130fcc25fc6710bd6eb4f198c96b7d8fb340643
[ "MIT" ]
null
null
null
symbolic_activations.py
mkofinas/machine-learning-tutorials
b130fcc25fc6710bd6eb4f198c96b7d8fb340643
[ "MIT" ]
null
null
null
symbolic_activations.py
mkofinas/machine-learning-tutorials
b130fcc25fc6710bd6eb4f198c96b7d8fb340643
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import sage.all def activation(H, activation_function): if activation_function == 'sigmoid': return H.apply_map(lambda x: 1 / (1 + sage.all.exp(-x))) elif activation_function == 'tanh': return H.apply_map(sage.all.tanh) elif activation_function...
28.5
65
0.651629
import sage.all def activation(H, activation_function): if activation_function == 'sigmoid': return H.apply_map(lambda x: 1 / (1 + sage.all.exp(-x))) elif activation_function == 'tanh': return H.apply_map(sage.all.tanh) elif activation_function == 'relu': return H.apply_map(lambda ...
true
true
1c0ac4eceff42c21b7544fde31a9f5361858dedf
3,553
py
Python
lib/geo.py
SebastienChauvin/faer
dddcb1cced0cbae210238cccc38c5eebc327c75b
[ "MIT" ]
27
2016-05-14T07:46:21.000Z
2021-09-27T08:04:26.000Z
lib/geo.py
SebastienChauvin/faer
dddcb1cced0cbae210238cccc38c5eebc327c75b
[ "MIT" ]
13
2016-05-15T10:54:45.000Z
2020-01-29T21:54:24.000Z
lib/geo.py
SebastienChauvin/faer
dddcb1cced0cbae210238cccc38c5eebc327c75b
[ "MIT" ]
17
2016-05-14T08:02:33.000Z
2021-11-15T09:24:45.000Z
import math EARTH_RADIUS_KM = 6371.0 def sphere_distance(lat1, lon1, lat2, lon2): """Computes the great circle distance on a unit sphere. All angles and the return value are in radians. Args: lat1: A float, latitude of the first point. lon1: A float, longitude of the first point. ...
32.898148
72
0.630735
import math EARTH_RADIUS_KM = 6371.0 def sphere_distance(lat1, lon1, lat2, lon2): dlon = lon2 - lon1 dlat = lat2 - lat1 a = (math.sin(dlat/2)**2 + math.cos(lat1) * math.cos(lat2) * math.sin(dlon/2)**2) return 2.0 * math.asin(math.sqrt(a)) def earth_distance(lat1, lon1, lat2, lon2): lat...
true
true
1c0ac5189014651f7701974ba39ca182d7c2c237
2,741
py
Python
datasets/cifar10.py
Friedrich1006/ESNAC
8f9d304976ceb5fed8f4fbb37e7be209796dd573
[ "MIT" ]
31
2019-04-26T14:59:29.000Z
2021-04-14T13:36:28.000Z
datasets/cifar10.py
KlabCMU/ESNAC
8f9d304976ceb5fed8f4fbb37e7be209796dd573
[ "MIT" ]
2
2019-06-21T08:39:08.000Z
2021-09-06T22:09:09.000Z
datasets/cifar10.py
KlabCMU/ESNAC
8f9d304976ceb5fed8f4fbb37e7be209796dd573
[ "MIT" ]
4
2019-07-09T22:07:46.000Z
2020-10-14T16:50:55.000Z
import torch import torchvision import torchvision.transforms as transforms from torch.utils.data import DataLoader from torch.utils.data.sampler import SubsetRandomSampler class CIFAR10(object): def __init__(self, batch_size=128, num_workers=4): train_transform = transforms.Compose([ transfor...
42.169231
76
0.657059
import torch import torchvision import torchvision.transforms as transforms from torch.utils.data import DataLoader from torch.utils.data.sampler import SubsetRandomSampler class CIFAR10(object): def __init__(self, batch_size=128, num_workers=4): train_transform = transforms.Compose([ transfor...
true
true
1c0ac8762ea1f5597a171ab541bf64f06cce3d80
12,252
py
Python
tests/buildpackage.py
Vye/salt
89ef86096c8f3aa02834cf2e94fc542fd2127879
[ "Apache-2.0" ]
3
2016-09-03T06:26:42.000Z
2019-06-30T13:04:53.000Z
tests/buildpackage.py
hulu/salt
b96b852aa15e32a95fceae8b4210a31f89a1100f
[ "Apache-2.0" ]
null
null
null
tests/buildpackage.py
hulu/salt
b96b852aa15e32a95fceae8b4210a31f89a1100f
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Maintainer: Erik Johnson (https://github.com/terminalmage) # # WARNING: This script will recursively remove the build and artifact # directories. # # This script is designed for speed, therefore it does not use mock and does not # run tests. It *will* install the build deps on the machine runn...
33.024259
80
0.587169
import errno import glob import logging import os import re import shutil import subprocess import sys from optparse import OptionParser, OptionGroup logging.QUIET = 0 logging.GARBAGE = 1 logging.TRACE = 5 logging.addLevelName(logging.QUIET, 'QUIET') logging.addLevelName(logging.TRACE, 'TRACE') logging.addLevelName...
true
true
1c0acb190ba47a6034e9fc415ae33eaed7ba42f8
2,076
py
Python
setup.py
irinabov/debian-pyngus
a57b831f20173e0503c5656f14f9137ede06b67a
[ "Apache-2.0" ]
null
null
null
setup.py
irinabov/debian-pyngus
a57b831f20173e0503c5656f14f9137ede06b67a
[ "Apache-2.0" ]
null
null
null
setup.py
irinabov/debian-pyngus
a57b831f20173e0503c5656f14f9137ede06b67a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # 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 # "...
39.169811
76
0.711464
from setuptools import setup _VERSION = "2.0.4" # will not think proton is installed, and will attempt to install it, # overwriting the distro's installation. To prevent this, don't set the # 'install_requires' if the proton python module is already installed # _dependencies = [] try: import proton except Imp...
true
true
1c0acc3e501c4e841911fedf579e74874efa5cb6
24,300
py
Python
toontown/pets/Pet.py
AnonymousDeveloper65535/open-toontown
3d05c22a7d960ad843dde231140447c46973dba5
[ "BSD-3-Clause" ]
8
2017-10-10T11:41:01.000Z
2021-02-23T12:55:47.000Z
toontown/pets/Pet.py
AnonymousDeveloper65535/open-toontown
3d05c22a7d960ad843dde231140447c46973dba5
[ "BSD-3-Clause" ]
1
2018-07-28T20:07:04.000Z
2018-07-30T18:28:34.000Z
toontown/pets/Pet.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 direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * from direct.fsm.ClassicFSM import * from direct.fsm.State import * from direct.distributed.ClockDelta import globalClockDelta from otp.avatar import Avatar from direct.actor import Actor fro...
36.053412
427
0.611358
from pandac.PandaModules import * from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * from direct.fsm.ClassicFSM import * from direct.fsm.State import * from direct.distributed.ClockDelta import globalClockDelta from otp.avatar import Avatar from direct.actor import Actor fro...
true
true
1c0acc84ba5e2a2d5cca6f1cfe93b3d574e98354
1,680
py
Python
examples/boilerplate.py
Jordan-Cottle/domonic
05d70af0d1564d3ba80c860bb5f5bfe089293b18
[ "MIT" ]
1
2022-03-09T03:39:04.000Z
2022-03-09T03:39:04.000Z
examples/boilerplate.py
Jordan-Cottle/domonic
05d70af0d1564d3ba80c860bb5f5bfe089293b18
[ "MIT" ]
null
null
null
examples/boilerplate.py
Jordan-Cottle/domonic
05d70af0d1564d3ba80c860bb5f5bfe089293b18
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import sys sys.path.insert(0, '..') from domonic.javascript import Math from domonic.html import * DOMAIN = "mywebsite" # <!DOCTYPE html> page = lambda content : html(_lang="en", _class="no-js", _dir="auto").html( head( meta( _charset="UTF-8"), meta( _name="viewport", _content="width...
35
78
0.66369
import sys sys.path.insert(0, '..') from domonic.javascript import Math from domonic.html import * DOMAIN = "mywebsite" page = lambda content : html(_lang="en", _class="no-js", _dir="auto").html( head( meta( _charset="UTF-8"), meta( _name="viewport", _content="width=device-width"), title("Unique page ti...
true
true