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
f754dd6fa96d824d57031a4dad730cecf10cf6e6
2,416
py
Python
tests/test_config.py
CODAIT/pydax
f2ea33f91d472d934c4a33ad4fee5a57a5a40900
[ "Apache-2.0" ]
11
2020-11-12T21:51:49.000Z
2021-07-12T15:47:09.000Z
tests/test_config.py
CODAIT/pydax
f2ea33f91d472d934c4a33ad4fee5a57a5a40900
[ "Apache-2.0" ]
138
2020-11-14T01:35:08.000Z
2021-07-22T05:52:29.000Z
tests/test_config.py
CODAIT/pydax
f2ea33f91d472d934c4a33ad4fee5a57a5a40900
[ "Apache-2.0" ]
5
2020-12-03T22:04:39.000Z
2021-07-13T17:03:53.000Z
# # Copyright 2020--2021 IBM Corp. 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 la...
43.927273
120
0.74255
from urllib.parse import urlparse import pytest import requests.exceptions from pardata import init from pardata._config import Config from pardata._schema_retrieval import retrieve_schema_file class TestConfig: def test_default_schema_url_https(self): assert urlparse(Config.DATASET_SCHEMA_FILE_URL)....
true
true
f754e053d1e66b76128606583efe992b847a4467
528
py
Python
setup.py
danilocgsilva/wimi-api
3bd9ee83ef34dd107086ff19322aaa64e1f9a07f
[ "MIT" ]
null
null
null
setup.py
danilocgsilva/wimi-api
3bd9ee83ef34dd107086ff19322aaa64e1f9a07f
[ "MIT" ]
null
null
null
setup.py
danilocgsilva/wimi-api
3bd9ee83ef34dd107086ff19322aaa64e1f9a07f
[ "MIT" ]
null
null
null
from setuptools import setup VERSION = "1.1.0" def readme(): with open("README.md") as f: return f.read() setup( name="wimiapi", version=VERSION, description="Package to fetch the current external ip", long_description_content_type="text/markdown", long_description=readme(), keywo...
22.956522
59
0.679924
from setuptools import setup VERSION = "1.1.0" def readme(): with open("README.md") as f: return f.read() setup( name="wimiapi", version=VERSION, description="Package to fetch the current external ip", long_description_content_type="text/markdown", long_description=readme(), keywo...
true
true
f754e156d07935ccdc5ddf76e6f322d135c63ec2
903
py
Python
check_files/reify_centroid.py
shantanusharma/bigmler
3f9d76e8567de1aa7976a84b3e6130a2c83d4515
[ "Apache-2.0" ]
32
2015-01-12T10:11:42.000Z
2021-11-14T19:45:14.000Z
check_files/reify_centroid.py
shantanusharma/bigmler
3f9d76e8567de1aa7976a84b3e6130a2c83d4515
[ "Apache-2.0" ]
42
2015-02-12T09:54:11.000Z
2022-03-31T11:33:39.000Z
check_files/reify_centroid.py
shantanusharma/bigmler
3f9d76e8567de1aa7976a84b3e6130a2c83d4515
[ "Apache-2.0" ]
23
2015-03-04T13:25:23.000Z
2020-07-15T18:25:52.000Z
from bigml.api import BigML api = BigML() source1_file = "iris.csv" args = \ {'fields': {'000000': {'name': 'sepal length', 'optype': 'numeric'}, '000001': {'name': 'sepal width', 'optype': 'numeric'}, '000002': {'name': 'petal length', 'optype': 'numeric'}, '000003': {'name': 'petal width', 'optype': 'numeric'}, '0000...
26.558824
68
0.66113
from bigml.api import BigML api = BigML() source1_file = "iris.csv" args = \ {'fields': {'000000': {'name': 'sepal length', 'optype': 'numeric'}, '000001': {'name': 'sepal width', 'optype': 'numeric'}, '000002': {'name': 'petal length', 'optype': 'numeric'}, '000003': {'name': 'petal width', 'optype': 'numeric'}, '0000...
true
true
f754e2d923d119ca6a8b7a908c647df7c72aa2f4
9,885
py
Python
supybot/plugins/Unix/plugin.py
ekolis/ChancellorGerathIrc
f536c1901e743708101cb27249d0e395b8c0a493
[ "BSD-3-Clause" ]
1
2015-04-16T14:23:20.000Z
2015-04-16T14:23:20.000Z
plugins/Unix/plugin.py
kblin/supybot-gsoc
656f42f8d6b3fe4544a5270e0dab816fd3603118
[ "BSD-3-Clause" ]
null
null
null
plugins/Unix/plugin.py
kblin/supybot-gsoc
656f42f8d6b3fe4544a5270e0dab816fd3603118
[ "BSD-3-Clause" ]
null
null
null
### # Copyright (c) 2002-2005, Jeremiah Fincher # Copyright (c) 2008, James Vega # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyri...
38.019231
79
0.5652
import os import re import pwd import sys import crypt import errno import popen2 import random import select import struct import supybot.utils as utils from supybot.commands import * import supybot.plugins as plugins import supybot.ircutils as ircutils import supybot.callbacks as callbacks def progstats(): pw ...
true
true
f754e46873e113676c95bea824e20a249c88f214
6,400
py
Python
process_clip.py
dejanzelic/frigate
6e74e3ecf3dd9ddbe212aa95a0aaa9828156421a
[ "MIT" ]
2
2020-06-25T18:45:17.000Z
2021-09-13T18:25:43.000Z
process_clip.py
vinodsr/frigate
3b04169c8b53b5653ad9b26d5bbe6313cbeff08d
[ "MIT" ]
1
2020-09-18T03:16:53.000Z
2020-09-18T03:16:53.000Z
process_clip.py
vinodsr/frigate
3b04169c8b53b5653ad9b26d5bbe6313cbeff08d
[ "MIT" ]
null
null
null
import sys import click import os import datetime from unittest import TestCase, main from frigate.video import process_frames, start_or_restart_ffmpeg, capture_frames, get_frame_shape from frigate.util import DictFrameManager, EventsPerSecond, draw_box_with_label from frigate.motion import MotionDetector from frigate....
43.243243
177
0.646563
import sys import click import os import datetime from unittest import TestCase, main from frigate.video import process_frames, start_or_restart_ffmpeg, capture_frames, get_frame_shape from frigate.util import DictFrameManager, EventsPerSecond, draw_box_with_label from frigate.motion import MotionDetector from frigate....
true
true
f754e49437fce7f37e9b13bb91ff7519338ea8bd
1,091
py
Python
python/best-time-to-buy-and-sell-stock-with-transaction-fee.py
summer-vacation/AlgoExec
55c6c3e7890b596b709b50cafa415b9594c03edd
[ "MIT" ]
null
null
null
python/best-time-to-buy-and-sell-stock-with-transaction-fee.py
summer-vacation/AlgoExec
55c6c3e7890b596b709b50cafa415b9594c03edd
[ "MIT" ]
2
2019-12-09T06:12:51.000Z
2019-12-16T14:38:34.000Z
python/best-time-to-buy-and-sell-stock-with-transaction-fee.py
summer-vacation/AlgoExec
55c6c3e7890b596b709b50cafa415b9594c03edd
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ File Name: best-time-to-buy-and-sell-stock-with-transaction-fee.py Author : jynnezhang Date: 2020/12/17 1:40 下午 Description: https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-with-transaction-fee/ dp[i][0] 表示第 i 天交易完后手里没有股票的最大利润, dp[i][1] 表示第 i 天交易完后手里持有一支股票的最...
29.486486
86
0.540788
class Solution: def maxProfit(self, prices=[], fee=0) -> int: n = len(prices) dp = [[0, -prices[0]]] + [[0, 0] for _ in range(n - 1)] for i in range(1, n): dp[i][0] = max(dp[i - 1][0], dp[i - 1][1] + prices[i] - fee) dp[i][1] = max(dp[i - 1][1], dp[i - 1][0] - price...
true
true
f754e4fbb8d8b2da0c6489ae029e02f2e5d9bd54
1,198
py
Python
lioght/blueprints/api/views.py
Ketouem/lioght
ae016a314653cf547b992b06e5d77e13d8f62afc
[ "MIT" ]
null
null
null
lioght/blueprints/api/views.py
Ketouem/lioght
ae016a314653cf547b992b06e5d77e13d8f62afc
[ "MIT" ]
null
null
null
lioght/blueprints/api/views.py
Ketouem/lioght
ae016a314653cf547b992b06e5d77e13d8f62afc
[ "MIT" ]
null
null
null
from flask import jsonify, request, g, current_app, Response from . import api @api.route("/provider", methods=["GET"]) def get_provider(): return jsonify(provider=current_app.config["LIGHT_PROVIDER"]) @api.route("/lights/<int:lid>/color", methods=["POST"]) def set_color(lid): params = request.json red...
26.043478
68
0.682805
from flask import jsonify, request, g, current_app, Response from . import api @api.route("/provider", methods=["GET"]) def get_provider(): return jsonify(provider=current_app.config["LIGHT_PROVIDER"]) @api.route("/lights/<int:lid>/color", methods=["POST"]) def set_color(lid): params = request.json red...
true
true
f754e54a61a7e1a90862f9cc5bb8ccd84c001d2a
38,532
py
Python
FWCore/ParameterSet/python/Mixins.py
justinasr/cmssw
79d9ef38a7392b5a532dc7522f2c12f50be03e1b
[ "Apache-2.0" ]
null
null
null
FWCore/ParameterSet/python/Mixins.py
justinasr/cmssw
79d9ef38a7392b5a532dc7522f2c12f50be03e1b
[ "Apache-2.0" ]
null
null
null
FWCore/ParameterSet/python/Mixins.py
justinasr/cmssw
79d9ef38a7392b5a532dc7522f2c12f50be03e1b
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function from builtins import range, object import inspect import six class _ConfigureComponent(object): """Denotes a class that can be used by the Processes class""" def _isTaskComponent(self): return False class PrintOptions(object): def __init__(self, indent = 0, de...
41.746479
160
0.57329
from __future__ import print_function from builtins import range, object import inspect import six class _ConfigureComponent(object): def _isTaskComponent(self): return False class PrintOptions(object): def __init__(self, indent = 0, deltaIndent = 4, process = True, targetDirectory = None, useSubdirec...
true
true
f754e5e1c665321d79edd62539ae06dffbd741c9
2,412
py
Python
lib/html5lib/treewalkers/soup.py
eriser/chromabrush
15ad334789a30356eb0fe35e4470e6d06dc9c4f4
[ "Apache-2.0" ]
4
2020-07-15T16:28:57.000Z
2020-09-14T17:38:31.000Z
lib/html5lib/treewalkers/soup.py
eriser/chromabrush
15ad334789a30356eb0fe35e4470e6d06dc9c4f4
[ "Apache-2.0" ]
null
null
null
lib/html5lib/treewalkers/soup.py
eriser/chromabrush
15ad334789a30356eb0fe35e4470e6d06dc9c4f4
[ "Apache-2.0" ]
2
2017-07-20T21:34:25.000Z
2018-11-09T11:33:23.000Z
import re import gettext _ = gettext.gettext from BeautifulSoup import BeautifulSoup, Declaration, Comment, Tag from html5lib.constants import namespaces import _base class TreeWalker(_base.NonRecursiveTreeWalker): doctype_regexp = re.compile( r'(?P<name>[^\s]*)(\s*PUBLIC\s*"(?P<publicId>.*)"\s*"(?P<syste...
40.2
115
0.610282
import re import gettext _ = gettext.gettext from BeautifulSoup import BeautifulSoup, Declaration, Comment, Tag from html5lib.constants import namespaces import _base class TreeWalker(_base.NonRecursiveTreeWalker): doctype_regexp = re.compile( r'(?P<name>[^\s]*)(\s*PUBLIC\s*"(?P<publicId>.*)"\s*"(?P<syste...
true
true
f754e5e3dc5b1b9240a168dda6db2af9fc5979b7
1,939
py
Python
examples/text_graph/erniesage/models/loss.py
tanhanzhuo/PaddleNLP
d0d20678f2bec820570b4f09ca49cd402d20c3b6
[ "Apache-2.0" ]
7,091
2021-02-05T13:56:25.000Z
2022-03-31T11:42:50.000Z
examples/text_graph/erniesage/models/loss.py
svs1984/PaddleNLP
9eb9e23b01d044706c789158ac6cf0d365aea848
[ "Apache-2.0" ]
844
2021-02-10T01:09:29.000Z
2022-03-31T12:12:58.000Z
examples/text_graph/erniesage/models/loss.py
svs1984/PaddleNLP
9eb9e23b01d044706c789158ac6cf0d365aea848
[ "Apache-2.0" ]
1,035
2021-02-05T14:26:48.000Z
2022-03-31T11:42:57.000Z
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
26.202703
74
0.661681
import os import paddle import paddle.nn as nn import paddle.nn.functional as F def LossFactory(config): loss_type = config.loss_type if loss_type == "hinge": return HingeLoss(config.margin) elif loss_type == "softmax_with_cross_entropy": return SoftmaxWithCrossEntropy() else: ...
true
true
f754e7644422f3a6b98a3a21b6501da0d0e704ef
431
py
Python
env/Lib/site-packages/plotly/validators/choroplethmapbox/_customdata.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
11,750
2015-10-12T07:03:39.000Z
2022-03-31T20:43:15.000Z
env/Lib/site-packages/plotly/validators/choroplethmapbox/_customdata.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
2,951
2015-10-12T00:41:25.000Z
2022-03-31T22:19:26.000Z
env/Lib/site-packages/plotly/validators/choroplethmapbox/_customdata.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
2,623
2015-10-15T14:40:27.000Z
2022-03-28T16:05:50.000Z
import _plotly_utils.basevalidators class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__( self, plotly_name="customdata", parent_name="choroplethmapbox", **kwargs ): super(CustomdataValidator, self).__init__( plotly_name=plotly_name, ...
30.785714
80
0.668213
import _plotly_utils.basevalidators class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__( self, plotly_name="customdata", parent_name="choroplethmapbox", **kwargs ): super(CustomdataValidator, self).__init__( plotly_name=plotly_name, ...
true
true
f754e77e0074a176ec8fb4e93b42df1d845edfe2
6,046
py
Python
examples/example_visualization.py
SkBlaz/supertest
5d99034af820cc10c8f70271b55cc90c42328709
[ "BSD-3-Clause" ]
79
2018-10-22T14:54:04.000Z
2020-03-05T05:34:35.000Z
examples/example_visualization.py
SkBlaz/supertest
5d99034af820cc10c8f70271b55cc90c42328709
[ "BSD-3-Clause" ]
6
2019-02-19T16:33:14.000Z
2019-12-16T10:23:25.000Z
examples/example_visualization.py
SkBlaz/Py3Plex
5d99034af820cc10c8f70271b55cc90c42328709
[ "BSD-3-Clause" ]
16
2019-02-19T16:30:29.000Z
2020-02-13T05:57:16.000Z
# simple plot of a larger file from py3plex.visualization.multilayer import hairball_plot, plt from py3plex.visualization.colors import colors_default from py3plex.core import multinet from py3plex.wrappers import train_node2vec_embedding from py3plex.visualization.embedding_visualization import embedding_tools from py...
35.988095
155
0.661429
from py3plex.visualization.multilayer import hairball_plot, plt from py3plex.visualization.colors import colors_default from py3plex.core import multinet from py3plex.wrappers import train_node2vec_embedding from py3plex.visualization.embedding_visualization import embedding_tools from py3plex.algorithms.community_dete...
true
true
f754e7b68a3c4cfb9030465da5102a6e179a187c
18,818
py
Python
log_complete/model_346.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_complete/model_346.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_complete/model_346.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
# exported from PySB model 'model' from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('Ligand', ['Receptor']) Monomer('ParpU', ['C3A']) Monomer('C8A', ['BidU', 'C3pro']) Monomer('SmacM', ['BaxA']) Monomer('BaxM', ['BidM', '...
91.349515
710
0.806515
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('Ligand', ['Receptor']) Monomer('ParpU', ['C3A']) Monomer('C8A', ['BidU', 'C3pro']) Monomer('SmacM', ['BaxA']) Monomer('BaxM', ['BidM', 'BaxA']) Monomer('Apop', ['C3pro', '...
true
true
f754e8ccf0edcd6f3cebc3be03d7eba906052755
4,356
py
Python
server/apps/api/views/legal_basis.py
uktrade/legal-basis-api
a5bad3566f153859ca54dcd92832dcdc1e6eb78c
[ "MIT" ]
2
2021-07-29T08:01:44.000Z
2021-08-09T08:16:24.000Z
server/apps/api/views/legal_basis.py
uktrade/legal-basis-api
a5bad3566f153859ca54dcd92832dcdc1e6eb78c
[ "MIT" ]
12
2019-12-20T12:14:00.000Z
2022-02-15T15:48:54.000Z
server/apps/api/views/legal_basis.py
uktrade/legal-basis-api
a5bad3566f153859ca54dcd92832dcdc1e6eb78c
[ "MIT" ]
null
null
null
from hashlib import sha512 from django_filters.rest_framework import DjangoFilterBackend from drf_yasg.utils import swagger_auto_schema from rest_framework import status, viewsets from rest_framework.decorators import action from rest_framework.pagination import LimitOffsetPagination from rest_framework.response impor...
36
85
0.697199
from hashlib import sha512 from django_filters.rest_framework import DjangoFilterBackend from drf_yasg.utils import swagger_auto_schema from rest_framework import status, viewsets from rest_framework.decorators import action from rest_framework.pagination import LimitOffsetPagination from rest_framework.response impor...
true
true
f754e9308a975145049ad0f55ffb9aed2d49e03e
2,046
py
Python
a10sdk/core/cgnv6/cgnv6_nat46_stateless.py
deepfield/a10sdk-python
bfaa58099f51f085d5e91652d1d1a3fd5c529d5d
[ "Apache-2.0" ]
16
2015-05-20T07:26:30.000Z
2021-01-23T11:56:57.000Z
a10sdk/core/cgnv6/cgnv6_nat46_stateless.py
deepfield/a10sdk-python
bfaa58099f51f085d5e91652d1d1a3fd5c529d5d
[ "Apache-2.0" ]
6
2015-03-24T22:07:11.000Z
2017-03-28T21:31:18.000Z
a10sdk/core/cgnv6/cgnv6_nat46_stateless.py
deepfield/a10sdk-python
bfaa58099f51f085d5e91652d1d1a3fd5c529d5d
[ "Apache-2.0" ]
23
2015-03-29T15:43:01.000Z
2021-06-02T17:12:01.000Z
from a10sdk.common.A10BaseClass import A10BaseClass class Nat46Stateless(A10BaseClass): """ :param static_dest_mapping_list: {"minItems": 1, "items": {"type": "static-dest-mapping"}, "uniqueItems": true, "array": [{"required": ["v4-address", "v6-address"], "properties": {"count": {"platform-specific-range...
52.461538
1,083
0.648583
from a10sdk.common.A10BaseClass import A10BaseClass class Nat46Stateless(A10BaseClass): def __init__(self, **kwargs): self.ERROR_MSG = "" self.required=[] self.b_key = "nat46-stateless" self.a10_url="/axapi/v3/cgnv6/nat46-stateless" self.DeviceProxy = "" self.s...
true
true
f754e942f7ab0687e2e828a0cfad2ca00dada24a
290
py
Python
packages/maya-2017-win64/PIL/_imagingmorph.py
qinningfx/zfused_outsource
bfc5558f05e3d6005653794a47bd863b61b009b1
[ "Apache-2.0" ]
2
2019-02-22T03:33:26.000Z
2019-02-23T03:29:26.000Z
packages/maya-2017-win64/PIL/_imagingmorph.py
qinningfx/zfused_outsource
bfc5558f05e3d6005653794a47bd863b61b009b1
[ "Apache-2.0" ]
null
null
null
packages/maya-2017-win64/PIL/_imagingmorph.py
qinningfx/zfused_outsource
bfc5558f05e3d6005653794a47bd863b61b009b1
[ "Apache-2.0" ]
null
null
null
def __bootstrap__(): global __bootstrap__, __loader__, __file__ import sys, pkg_resources, imp __file__ = pkg_resources.resource_filename(__name__, '_imagingmorph.pyd') __loader__ = None; del __bootstrap__, __loader__ imp.load_dynamic(__name__,__file__) __bootstrap__()
36.25
77
0.772414
def __bootstrap__(): global __bootstrap__, __loader__, __file__ import sys, pkg_resources, imp __file__ = pkg_resources.resource_filename(__name__, '_imagingmorph.pyd') __loader__ = None; del __bootstrap__, __loader__ imp.load_dynamic(__name__,__file__) __bootstrap__()
true
true
f754ea53e994add38fad4d11e265a297db5a9817
5,323
py
Python
train.py
akjindal53244/text_classification_hierarchical_cnn
ac6de211cc8f0004279a86c435b4904e8884ed52
[ "Apache-2.0" ]
7
2017-12-07T04:12:57.000Z
2019-03-20T09:19:59.000Z
train.py
akjindal53244/text_classification_hierarchical_cnn
ac6de211cc8f0004279a86c435b4904e8884ed52
[ "Apache-2.0" ]
1
2017-12-07T14:55:33.000Z
2018-11-18T16:52:47.000Z
train.py
akjindal53244/text_classification_hierarchical_cnn
ac6de211cc8f0004279a86c435b4904e8884ed52
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/env python import tensorflow as tf import os import time from text_cnn import TextCNN from utils.feature_extraction import load_datasets, DataConfig, Flags from utils.general_utils import print_confusion_matrix def highlight_string(temp): print 80 * "=" print temp print 80 * "=" def main(fl...
44.731092
122
0.639865
import tensorflow as tf import os import time from text_cnn import TextCNN from utils.feature_extraction import load_datasets, DataConfig, Flags from utils.general_utils import print_confusion_matrix def highlight_string(temp): print 80 * "=" print temp print 80 * "=" def main(flag, load_existing_dump=...
false
true
f754ead45fa334bf2ea07ffcc21cd4b99c048ec7
568
py
Python
showminder/frontend/migrations/0002_auto_20170114_2214.py
chassing/showminder
136ef3f1a41fa3aa45574770dd5751b0b7b9edd3
[ "MIT" ]
1
2017-01-26T09:12:55.000Z
2017-01-26T09:12:55.000Z
showminder/frontend/migrations/0002_auto_20170114_2214.py
chassing/showminder
136ef3f1a41fa3aa45574770dd5751b0b7b9edd3
[ "MIT" ]
null
null
null
showminder/frontend/migrations/0002_auto_20170114_2214.py
chassing/showminder
136ef3f1a41fa3aa45574770dd5751b0b7b9edd3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-01-14 22:14 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('frontend', '0001_initial'), ] operations = [ migrations.AlterModelOptions( ...
22.72
50
0.580986
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('frontend', '0001_initial'), ] operations = [ migrations.AlterModelOptions( name='tvshow', options={'ordering': ['-last_seen'...
true
true
f754eb6a8091a24694aed900b6d5b7e42bc1bf45
5,484
py
Python
spike_swarm_sim/physics_engine.py
Robolabo/EvoSwarmSim
45f20f00b079a9481e324e091c46040182cf1d3c
[ "MIT" ]
null
null
null
spike_swarm_sim/physics_engine.py
Robolabo/EvoSwarmSim
45f20f00b079a9481e324e091c46040182cf1d3c
[ "MIT" ]
null
null
null
spike_swarm_sim/physics_engine.py
Robolabo/EvoSwarmSim
45f20f00b079a9481e324e091c46040182cf1d3c
[ "MIT" ]
null
null
null
import time import os import numpy as np import pybullet as p import pybullet_data import pybullet_utils.bullet_client as bc import pygame os.environ['PYGAME_HIDE_SUPPORT_PROMPT'] = "hide" import pymunk import pymunk.pygame_util # from pygame.color import THECOLORS # from pymunk.vec2d import Vec2d from spik...
37.82069
118
0.636761
import time import os import numpy as np import pybullet as p import pybullet_data import pybullet_utils.bullet_client as bc import pygame os.environ['PYGAME_HIDE_SUPPORT_PROMPT'] = "hide" import pymunk import pymunk.pygame_util from spike_swarm_sim.globals import global_states class Engine3D: def __i...
true
true
f754edb0e2a9ca74f1535588fe3cd5ed5b8fa321
2,867
py
Python
scripts/haplotype_imputation/impute_otf_multi_chr.py
liangyy/haplotype-po
2a6830095bcfa4298ad04ce0790888dbccd4a426
[ "MIT" ]
null
null
null
scripts/haplotype_imputation/impute_otf_multi_chr.py
liangyy/haplotype-po
2a6830095bcfa4298ad04ce0790888dbccd4a426
[ "MIT" ]
null
null
null
scripts/haplotype_imputation/impute_otf_multi_chr.py
liangyy/haplotype-po
2a6830095bcfa4298ad04ce0790888dbccd4a426
[ "MIT" ]
null
null
null
## # Implement idea 2: multi-chromosome version ## import argparse parser = argparse.ArgumentParser(prog='impute_otf_multi_chr.py', description=''' Impute parental origin of haplotypes and observed phenotypes. It takes preloaded phenotypes, covariates, and genotypes (generated by impute_otf_preload.py) ''...
30.178947
104
0.711196
import argparse parser = argparse.ArgumentParser(prog='impute_otf_multi_chr.py', description=''' Impute parental origin of haplotypes and observed phenotypes. It takes preloaded phenotypes, covariates, and genotypes (generated by impute_otf_preload.py) ''') parser.add_argument('--genotype-prefix-pattern'...
true
true
f754ee651c9586c7a6e5f1bd2b3f6b85b7172a1a
7,916
py
Python
mmcv/runner/base_module.py
twmht/mmcv
44e7eee835c3bc138ee0f667228777eca3db1a17
[ "Apache-2.0" ]
null
null
null
mmcv/runner/base_module.py
twmht/mmcv
44e7eee835c3bc138ee0f667228777eca3db1a17
[ "Apache-2.0" ]
null
null
null
mmcv/runner/base_module.py
twmht/mmcv
44e7eee835c3bc138ee0f667228777eca3db1a17
[ "Apache-2.0" ]
null
null
null
# Copyright (c) OpenMMLab. All rights reserved. import copy import warnings from abc import ABCMeta from collections import defaultdict from logging import FileHandler import torch.nn as nn from mmcv.runner.dist_utils import master_only from mmcv.utils.logging import get_logger, logger_initialized, print_log class ...
37.695238
78
0.597903
import copy import warnings from abc import ABCMeta from collections import defaultdict from logging import FileHandler import torch.nn as nn from mmcv.runner.dist_utils import master_only from mmcv.utils.logging import get_logger, logger_initialized, print_log class BaseModule(nn.Module, metaclass=ABCMeta): d...
true
true
f754eecf8af368b08a7471542a4027d0ed0314fa
54
py
Python
version.py
vabs22/zulip
470d0a481c0a990a81b2facc6dac63364791178a
[ "Apache-2.0" ]
null
null
null
version.py
vabs22/zulip
470d0a481c0a990a81b2facc6dac63364791178a
[ "Apache-2.0" ]
null
null
null
version.py
vabs22/zulip
470d0a481c0a990a81b2facc6dac63364791178a
[ "Apache-2.0" ]
null
null
null
ZULIP_VERSION = "1.6.0+git" PROVISION_VERSION = '6.0'
18
27
0.703704
ZULIP_VERSION = "1.6.0+git" PROVISION_VERSION = '6.0'
true
true
f754f000aa8fbb722128dbdcb114eb2ad21b05ce
2,791
py
Python
indico/util/struct/iterables.py
aiforrural/Digital-Events-Example
628aaa8727b259b9367ac0ae1c5ba8e9e95eca82
[ "MIT" ]
1
2021-02-08T09:34:27.000Z
2021-02-08T09:34:27.000Z
indico/util/struct/iterables.py
pamirk/indico
c3b4e06b11cc21ad497f74d0b2ca901bc1b2a768
[ "MIT" ]
null
null
null
indico/util/struct/iterables.py
pamirk/indico
c3b4e06b11cc21ad497f74d0b2ca901bc1b2a768
[ "MIT" ]
null
null
null
# This file is part of Indico. # Copyright (C) 2002 - 2020 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from functools import wraps from itertools import groupby, islice, zip_longest def group_list(data, key=...
31.011111
73
0.650663
from functools import wraps from itertools import groupby, islice, zip_longest def group_list(data, key=None, sort_by=None, sort_reverse=False): return {group: sorted(list(items), key=sort_by, reverse=sort_reverse) for group, items in groupby(sorted(data, key=key), key=key)} def committing_iterator...
true
true
f754f05045a8b8d16a435730b79e1958a18e13eb
1,097
py
Python
tasks/__init__.py
salotz/bimker
46a0d7c449edba348b0ea3c6ff73ffe82da54ca0
[ "MIT" ]
2
2020-03-31T17:44:31.000Z
2020-08-21T07:33:15.000Z
tasks/__init__.py
salotz/py_rsync
12240955dbe26e00b15219d7ab405e8d3ced2ee2
[ "MIT" ]
2
2020-04-03T21:09:33.000Z
2020-04-06T19:24:50.000Z
tasks/__init__.py
salotz/py_rsync
12240955dbe26e00b15219d7ab405e8d3ced2ee2
[ "MIT" ]
1
2020-08-21T07:33:39.000Z
2020-08-21T07:33:39.000Z
from invoke import Collection, Task, task import inspect ## Utilities # these helper functions are for automatically listing all of the # functions defined in the tasks module def _is_mod_task(mod, func): return issubclass(type(func), Task) and inspect.getmodule(func) == mod def _get_functions(mod): """ge...
21.096154
74
0.712853
from invoke import Collection, Task, task import inspect def _is_mod_task(mod, func): return issubclass(type(func), Task) and inspect.getmodule(func) == mod def _get_functions(mod): return {func.__name__ : func for func in mod.__dict__.values() if _is_mod_task(mod, func) } ns = Collection(...
true
true
f754f1444655d9fe4e06a6ad6312d2bad5a3c4f8
13,699
py
Python
sphinx/builders/latex/__init__.py
varphone/sphinx
01b44ebf3cb386612b10480a4917079c3abf87f9
[ "BSD-2-Clause" ]
null
null
null
sphinx/builders/latex/__init__.py
varphone/sphinx
01b44ebf3cb386612b10480a4917079c3abf87f9
[ "BSD-2-Clause" ]
null
null
null
sphinx/builders/latex/__init__.py
varphone/sphinx
01b44ebf3cb386612b10480a4917079c3abf87f9
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ sphinx.builders.latex ~~~~~~~~~~~~~~~~~~~~~ LaTeX builder. :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os from os import path from docutils import nodes from docutils.frontend import OptionParser ...
40.291176
114
0.598876
import os from os import path from docutils import nodes from docutils.frontend import OptionParser from docutils.io import FileOutput from six import text_type from sphinx import package_dir, addnodes, highlighting from sphinx.builders import Builder from sphinx.config import string_classes, ENUM from sphinx.enviro...
true
true
f754f1e8c5c7194360d953b768afadd8dd3247e0
2,908
py
Python
var/spack/repos/builtin/packages/magma/package.py
nkianggiss/spack
3477d3375142a30f5714bb5966a6d8bb22c33c06
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2018-08-20T06:55:11.000Z
2018-08-20T06:55:11.000Z
var/spack/repos/builtin/packages/magma/package.py
nkianggiss/spack
3477d3375142a30f5714bb5966a6d8bb22c33c06
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/magma/package.py
nkianggiss/spack
3477d3375142a30f5714bb5966a6d8bb22c33c06
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2020-03-12T19:27:17.000Z
2020-03-12T19:27:17.000Z
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Magma(CMakePackage): """The MAGMA project aims to develop a dense linear algebra library ...
36.35
95
0.614168
from spack import * class Magma(CMakePackage): homepage = "http://icl.cs.utk.edu/magma/" url = "http://icl.cs.utk.edu/projectsfiles/magma/downloads/magma-2.2.0.tar.gz" version('2.4.0', sha256='4eb839b1295405fd29c8a6f5b4ed578476010bf976af46573f80d1169f1f9a4f') version('2.3.0', sha256='010a4a057d7aa...
true
true
f754f43c719b2476f79dc6d991c664f0433a615c
38,537
py
Python
shared/mh2renderman.py
teddydragoone/makehuman1.0.0alpha7
9aa7735a0a1ea83e52b1acc0fb8760057dd72d99
[ "CC0-1.0" ]
2
2016-11-23T16:37:15.000Z
2018-02-13T04:18:23.000Z
shared/mh2renderman.py
Tomoyon/makehuman1.0.0alpha7
9aa7735a0a1ea83e52b1acc0fb8760057dd72d99
[ "CC0-1.0" ]
null
null
null
shared/mh2renderman.py
Tomoyon/makehuman1.0.0alpha7
9aa7735a0a1ea83e52b1acc0fb8760057dd72d99
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- """ Renderman Export functions B{Project Name:} MakeHuman B{Product Home Page:} U{http://www.makehuman.org/} B{Code Home Page:} U{http://code.google.com/p/makehuman/} B{Authors:} Marc Flerackers B{Copyright(c):} MakeHuman Team 2001-201...
39.203459
218
0.573086
import mh import os import aljabr import subprocess import time import math import gui3d class Shader(object): def __init__(self): pass def shade(self, x, y, u, v, w): return (255, 255, 255, 0) class ColorShader(Shader): def __init__(self, colors): ...
true
true
f754f4ffb5a4da8e6dec2480fe96fe79d6bc5de0
5,601
py
Python
run.py
Jungyhuk/plotcoder
4c5fe923dc69227c58d93f55b8a89fd8bb960703
[ "MIT" ]
10
2021-08-06T13:01:11.000Z
2022-01-26T16:58:48.000Z
run.py
Jungyhuk/plotcoder
4c5fe923dc69227c58d93f55b8a89fd8bb960703
[ "MIT" ]
1
2021-09-29T07:54:17.000Z
2021-10-06T00:23:01.000Z
run.py
Jungyhuk/plotcoder
4c5fe923dc69227c58d93f55b8a89fd8bb960703
[ "MIT" ]
2
2021-08-06T13:01:19.000Z
2021-10-05T14:16:59.000Z
import argparse import math import random import sys import os import json import numpy as np import time import torch import arguments import models import models.data_utils.data_utils as data_utils import models.model_utils as model_utils from models.model import PlotCodeGenerator def create_model(args, word_vocab...
38.627586
148
0.770755
import argparse import math import random import sys import os import json import numpy as np import time import torch import arguments import models import models.data_utils.data_utils as data_utils import models.model_utils as model_utils from models.model import PlotCodeGenerator def create_model(args, word_vocab...
true
true
f754f586f8a0b096fab5425371c2df3e9e909ca3
8,246
py
Python
aiopipe/__init__.py
jvansanten/aiopipe
662eabf25b01d22811cbe7c9abee77b4170f3ab8
[ "MIT" ]
21
2018-04-09T18:01:15.000Z
2021-09-29T14:25:03.000Z
aiopipe/__init__.py
jvansanten/aiopipe
662eabf25b01d22811cbe7c9abee77b4170f3ab8
[ "MIT" ]
2
2019-10-01T07:24:36.000Z
2020-02-21T07:21:31.000Z
aiopipe/__init__.py
jvansanten/aiopipe
662eabf25b01d22811cbe7c9abee77b4170f3ab8
[ "MIT" ]
6
2019-03-08T00:10:19.000Z
2021-03-23T13:04:42.000Z
""" This package wraps the [`os.pipe`](https://docs.python.org/3/library/os.html#os.pipe) simplex communication pipe so it can be used as part of the non-blocking [`asyncio`](https://docs.python.org/3/library/asyncio.html) event loop. A duplex pipe is also provided, which allows reading and writing on both ends. ## Si...
30.654275
92
0.633762
from asyncio import StreamReader, StreamWriter, StreamReaderProtocol, BaseTransport, \ get_running_loop, sleep from contextlib import contextmanager, asynccontextmanager from typing import Tuple, Any, ContextManager, AsyncContextManager import os __pdoc__ = {} def aiopipe() -> Tuple["AioPipeReader", "AioPipe...
true
true
f754f587e5aa8081956f589559ba7d810e90b875
929
py
Python
sysinv/cgts-client/cgts-client/cgtsclient/v1/certificate.py
etaivan/stx-config
281e1f110973f96e077645fb01f67b646fc253cc
[ "Apache-2.0" ]
null
null
null
sysinv/cgts-client/cgts-client/cgtsclient/v1/certificate.py
etaivan/stx-config
281e1f110973f96e077645fb01f67b646fc253cc
[ "Apache-2.0" ]
null
null
null
sysinv/cgts-client/cgts-client/cgtsclient/v1/certificate.py
etaivan/stx-config
281e1f110973f96e077645fb01f67b646fc253cc
[ "Apache-2.0" ]
1
2021-01-05T16:24:58.000Z
2021-01-05T16:24:58.000Z
# # Copyright (c) 2018 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # # -*- encoding: utf-8 -*- # from cgtsclient.common import base CREATION_ATTRIBUTES = ['cert_path', 'public_path', 'tpm_path'] class Certificate(base.Resource): def __repr__(self): return "<certificate %s>" % self....
23.820513
69
0.662002
from cgtsclient.common import base CREATION_ATTRIBUTES = ['cert_path', 'public_path', 'tpm_path'] class Certificate(base.Resource): def __repr__(self): return "<certificate %s>" % self._info class CertificateManager(base.Manager): resource_class = Certificate @staticmethod def _path(id=N...
true
true
f754f6e55cd1b4ae80ad8c8738a5c7a3b234695a
151
py
Python
utils/file_utils.py
natotthomer/nattr
f3f7b1bc67ff05f346e7f221d7f88b8500bd8e77
[ "MIT" ]
1
2017-11-10T19:55:12.000Z
2017-11-10T19:55:12.000Z
utils/file_utils.py
natotthomer/nattr
f3f7b1bc67ff05f346e7f221d7f88b8500bd8e77
[ "MIT" ]
9
2021-03-08T20:46:52.000Z
2022-03-11T23:26:33.000Z
utils/file_utils.py
natotthomer/nattr
f3f7b1bc67ff05f346e7f221d7f88b8500bd8e77
[ "MIT" ]
null
null
null
import os from django.conf import settings def get_image_file_path(instance, filename): return os.path.join('photos', str(instance.id), filename)
25.166667
61
0.774834
import os from django.conf import settings def get_image_file_path(instance, filename): return os.path.join('photos', str(instance.id), filename)
true
true
f754f80a898e13dff741277b89aa88dd250dd002
264
py
Python
my_script.py
nusc2016/lambdata-DS15
b98d13d2155c741bb4fdda7f0ad74cbb12be3bb1
[ "MIT" ]
null
null
null
my_script.py
nusc2016/lambdata-DS15
b98d13d2155c741bb4fdda7f0ad74cbb12be3bb1
[ "MIT" ]
null
null
null
my_script.py
nusc2016/lambdata-DS15
b98d13d2155c741bb4fdda7f0ad74cbb12be3bb1
[ "MIT" ]
null
null
null
import pandas def enlarge(n): return n * 100 print("HELLO WORLD") df = pandas.DataFrame({"state": ["CT", "CO", "CA", "TX"]}) print(df.head()) print("-----------------") x = 5 print("NUMBER", x) print("ENLARGED NUMBER", enlarge(x)) # invoking our function!!
18.857143
62
0.583333
import pandas def enlarge(n): return n * 100 print("HELLO WORLD") df = pandas.DataFrame({"state": ["CT", "CO", "CA", "TX"]}) print(df.head()) print("-----------------") x = 5 print("NUMBER", x) print("ENLARGED NUMBER", enlarge(x))
true
true
f754f86d7fd44e9b8abb0b1d1f9c6f81fa81a94c
24,494
py
Python
python/cm/tests_job.py
dimuha-rs/adcm
0f49cc9ece16c1e257be12375a64b65a34b3a3ae
[ "Apache-2.0" ]
null
null
null
python/cm/tests_job.py
dimuha-rs/adcm
0f49cc9ece16c1e257be12375a64b65a34b3a3ae
[ "Apache-2.0" ]
null
null
null
python/cm/tests_job.py
dimuha-rs/adcm
0f49cc9ece16c1e257be12375a64b65a34b3a3ae
[ "Apache-2.0" ]
null
null
null
# 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 # distributed under t...
43.123239
98
0.600351
import os from unittest.mock import patch, Mock, call from django.test import TestCase from django.utils import timezone import cm.config as config import cm.job as job_module from cm import models from cm.logger import log class TestJob(TestCase): def setUp(self): log.debug = Mock() ...
true
true
f754f9afd75e624f72b5abce4bcc1fd6ee591c94
7,063
py
Python
kubernetes_asyncio/client/models/v1_binding.py
tomplus/kubernetes-asyncio
11c3eb4d50ae822545572aa7b8c15f7153f65a1c
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v1_binding.py
tomplus/kubernetes-asyncio
11c3eb4d50ae822545572aa7b8c15f7153f65a1c
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v1_binding.py
tomplus/kubernetes-asyncio
11c3eb4d50ae822545572aa7b8c15f7153f65a1c
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1.23.6 Generated by: https://openapi-generator.tech """ try: from inspect import getfullargspec except Im...
32.851163
312
0.618009
try: from inspect import getfullargspec except ImportError: from inspect import getargspec as getfullargspec import pprint import re import six from kubernetes_asyncio.client.configuration import Configuration class V1Binding(object): openapi_types = { 'api_version': 'str', 'kind': '...
true
true
f754f9c29380e75c153d5433faed9e86942c9ffc
1,094
py
Python
unicodeit/export_data.py
svenkreiss/unicode
69658f8d76dbe0ecc3c5beeae8ac98431cb31c0b
[ "LPPL-1.3c", "MIT" ]
177
2015-01-23T22:12:49.000Z
2022-03-19T01:41:16.000Z
unicodeit/export_data.py
svenkreiss/unicode
69658f8d76dbe0ecc3c5beeae8ac98431cb31c0b
[ "LPPL-1.3c", "MIT" ]
42
2015-03-15T22:35:42.000Z
2022-03-02T14:19:37.000Z
unicodeit/export_data.py
svenkreiss/unicode
69658f8d76dbe0ecc3c5beeae8ac98431cb31c0b
[ "LPPL-1.3c", "MIT" ]
26
2015-03-15T19:16:19.000Z
2022-02-16T16:52:49.000Z
import sys from .data import REPLACEMENTS, COMBININGMARKS, SUBSUPERSCRIPTS if __name__ == "__main__": outname = 'ts_src/data.ts' if len(sys.argv) == 2: outname = sys.argv[1] with open(outname, 'w') as f: f.write('// autogenerated with python -m unicodeit.export_data\n\n') f.writ...
32.176471
81
0.459781
import sys from .data import REPLACEMENTS, COMBININGMARKS, SUBSUPERSCRIPTS if __name__ == "__main__": outname = 'ts_src/data.ts' if len(sys.argv) == 2: outname = sys.argv[1] with open(outname, 'w') as f: f.write('// autogenerated with python -m unicodeit.export_data\n\n') f.writ...
true
true
f754fa0a00505498cb49b8af7f1bf0e7fc35f292
462
py
Python
applications/tensorflow/contrastive_divergence_vae/utils/run_utils.py
payoto/graphcore_examples
46d2b7687b829778369fc6328170a7b14761e5c6
[ "MIT" ]
260
2019-11-18T01:50:00.000Z
2022-03-28T23:08:53.000Z
applications/tensorflow/contrastive_divergence_vae/utils/run_utils.py
payoto/graphcore_examples
46d2b7687b829778369fc6328170a7b14761e5c6
[ "MIT" ]
27
2020-01-28T23:07:50.000Z
2022-02-14T15:37:06.000Z
applications/tensorflow/contrastive_divergence_vae/utils/run_utils.py
payoto/graphcore_examples
46d2b7687b829778369fc6328170a7b14761e5c6
[ "MIT" ]
56
2019-11-18T02:13:12.000Z
2022-02-28T14:36:09.000Z
# Copyright (c) 2019 Graphcore Ltd. All rights reserved. # coding=utf-8 def is_nearest_multiple(m, a, b): """ Replacement for m % b == 0 operator when variable is incremented by value other than one at each iteration. m is assumed to be increased by a at each iteration. If not exactly divisible, this fun...
35.538462
119
0.688312
def is_nearest_multiple(m, a, b): return (a > b) or (m - m // b * b < a)
true
true
f754fa83098d68de13dd20a90a34297d5d194a7b
64,045
py
Python
inst/AnnotatorCore.py
jalavery/gnomeR
b0031bd5eb1c8c5636910d0b779a8808947245f5
[ "MIT" ]
15
2020-02-20T18:20:15.000Z
2021-12-23T08:49:09.000Z
inst/AnnotatorCore.py
jalavery/gnomeR
b0031bd5eb1c8c5636910d0b779a8808947245f5
[ "MIT" ]
36
2020-02-21T20:23:41.000Z
2022-03-04T21:12:44.000Z
inst/AnnotatorCore.py
MSKCC-Epi-Bio/gnomeR
4f165774eb3c5f442881a915ee70e18a5f33b387
[ "MIT" ]
9
2020-02-17T23:43:35.000Z
2022-03-21T12:01:36.000Z
import json import sys import csv from enum import Enum import requests import os.path import logging import re import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from datetime import date import ctypes as ct logging.basicConfig(level=logging.INFO) logging.getLogger("requests").setLevel(logging.W...
36.430603
203
0.607666
import json import sys import csv from enum import Enum import requests import os.path import logging import re import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from datetime import date import ctypes as ct logging.basicConfig(level=logging.INFO) logging.getLogger("requests").setLevel(logging.W...
true
true
f754fbd282c7e4cd1caf9ef441e8ccd2e128b008
1,476
py
Python
backend/appengine/routes/chamados/rest.py
cbeloni/pychronesapp
fff744dfdbc1932968a950fda614e8ec84d162a3
[ "MIT" ]
null
null
null
backend/appengine/routes/chamados/rest.py
cbeloni/pychronesapp
fff744dfdbc1932968a950fda614e8ec84d162a3
[ "MIT" ]
null
null
null
backend/appengine/routes/chamados/rest.py
cbeloni/pychronesapp
fff744dfdbc1932968a950fda614e8ec84d162a3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from gaebusiness.business import CommandExecutionException from gaecookie.decorator import no_csrf from gaepermission.decorator import login_not_required from tekton.gae.middleware.json_middleware import JsonResponse from chamado_app impor...
32.086957
77
0.79336
from __future__ import absolute_import, unicode_literals from gaebusiness.business import CommandExecutionException from gaecookie.decorator import no_csrf from gaepermission.decorator import login_not_required from tekton.gae.middleware.json_middleware import JsonResponse from chamado_app import chamado_facade @login...
true
true
f754fd1c33afc8c402bcfc24ba76127ee1ea1284
5,202
py
Python
tests/chainer_tests/functions_tests/activation_tests/test_relu.py
takeratta/chainer
02686e98cd6dc8f20979a1f3a79130f076cbfc6c
[ "MIT" ]
1
2020-05-28T10:07:25.000Z
2020-05-28T10:07:25.000Z
tests/chainer_tests/functions_tests/activation_tests/test_relu.py
takeratta/chainer
02686e98cd6dc8f20979a1f3a79130f076cbfc6c
[ "MIT" ]
null
null
null
tests/chainer_tests/functions_tests/activation_tests/test_relu.py
takeratta/chainer
02686e98cd6dc8f20979a1f3a79130f076cbfc6c
[ "MIT" ]
1
2022-02-20T10:32:59.000Z
2022-02-20T10:32:59.000Z
import unittest import mock import numpy import chainer from chainer import cuda from chainer import functions from chainer import gradient_check from chainer import testing from chainer.testing import attr @testing.parameterize(*testing.product({ 'shape': [(3, 2), ()], 'dtype': [numpy.float16, numpy.float3...
35.148649
79
0.628412
import unittest import mock import numpy import chainer from chainer import cuda from chainer import functions from chainer import gradient_check from chainer import testing from chainer.testing import attr @testing.parameterize(*testing.product({ 'shape': [(3, 2), ()], 'dtype': [numpy.float16, numpy.float3...
true
true
f754ffe038613129baf3bdcd833c2c6642aa182c
1,667
py
Python
frontend/root.py
VHugoBarnes/PROYECTO-SII
d6372c11c75e0f4cbd2f3746c17e5c2441ea9d3a
[ "MIT" ]
null
null
null
frontend/root.py
VHugoBarnes/PROYECTO-SII
d6372c11c75e0f4cbd2f3746c17e5c2441ea9d3a
[ "MIT" ]
null
null
null
frontend/root.py
VHugoBarnes/PROYECTO-SII
d6372c11c75e0f4cbd2f3746c17e5c2441ea9d3a
[ "MIT" ]
1
2020-11-16T06:56:11.000Z
2020-11-16T06:56:11.000Z
# coding: utf-8 import Tkinter as tk from program_constants import * from frontend.main import Main, Registro, DatosAlumnos, DatosProfesor, \ RegistroMateriaAlumno, RegistroMateriaProfesor class Root(tk.Tk): """ Proporciona una ventana raiz acondicionada y reutilizable """ def __init__(self, ico...
33.34
89
0.641872
import Tkinter as tk from program_constants import * from frontend.main import Main, Registro, DatosAlumnos, DatosProfesor, \ RegistroMateriaAlumno, RegistroMateriaProfesor class Root(tk.Tk): """ Proporciona una ventana raiz acondicionada y reutilizable """ def __init__(self, icono="", *args, **...
false
true
f755005d501f9798b04ffd4cde86bb16064a3671
9,618
py
Python
salt/__init__.py
outbrain/salt
65a6cb06da6bda06b97034b1083df950b7a0d7ef
[ "Apache-2.0" ]
1
2016-07-07T18:43:05.000Z
2016-07-07T18:43:05.000Z
salt/__init__.py
outbrain/salt
65a6cb06da6bda06b97034b1083df950b7a0d7ef
[ "Apache-2.0" ]
null
null
null
salt/__init__.py
outbrain/salt
65a6cb06da6bda06b97034b1083df950b7a0d7ef
[ "Apache-2.0" ]
1
2020-12-04T11:28:06.000Z
2020-12-04T11:28:06.000Z
''' Make me some salt! ''' # Import python libs import os import sys import logging # Import salt libs # We import log ASAP because we NEED to make sure that any logger instance salt # instantiates is using salt.log.SaltLoggingClass import salt.log # the try block below bypasses an issue at build time so that modul...
33.866197
95
0.527864
import os import sys import logging import salt.log # cause the build to fail from salt.version import __version__ # pylint: disable-msg=W402 from salt.utils import migrations try: from salt.utils import parsers from salt.utils.verify import check_user, verify_env, verify_socket from salt.utils.verify...
true
true
f755010f655c732a6e76a6991a8fd2e67e92aaa7
9,905
py
Python
csmpe/core_plugins/csm_node_status_check/exr/plugin_lib.py
csmserver/csmpe
552f5149b9be865f8bd3b03cf533e4552465ce61
[ "BSD-2-Clause" ]
1
2017-03-29T18:15:59.000Z
2017-03-29T18:15:59.000Z
csmpe/core_plugins/csm_node_status_check/exr/plugin_lib.py
csmserver/csmpe
552f5149b9be865f8bd3b03cf533e4552465ce61
[ "BSD-2-Clause" ]
45
2016-09-14T04:16:17.000Z
2017-10-17T02:54:19.000Z
csmpe/core_plugins/csm_node_status_check/exr/plugin_lib.py
csmserver/csmpe
552f5149b9be865f8bd3b03cf533e4552465ce61
[ "BSD-2-Clause" ]
56
2016-06-03T09:38:53.000Z
2020-03-03T21:41:14.000Z
# ============================================================================= # Copyright (c) 2016, Cisco Systems # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of source c...
49.278607
84
0.433417
import re def parse_show_platform(ctx, output): inventory = {} sl = ['node', 'type', 'state', 'config state'] dl = {} lines = output.split('\n') lines = [x for x in lines if x] for line in lines: line = line.strip() if line[0:4] == 'Node': line = line.lower() ...
true
true
f75503b39dc1344bc8613b92f47f22fb802c2290
521
py
Python
vrmapi.py
AKAGI-Rails/vrmnx-toruo
85437c47041a7d1656efabcbab5f5b76745f975d
[ "MIT" ]
null
null
null
vrmapi.py
AKAGI-Rails/vrmnx-toruo
85437c47041a7d1656efabcbab5f5b76745f975d
[ "MIT" ]
null
null
null
vrmapi.py
AKAGI-Rails/vrmnx-toruo
85437c47041a7d1656efabcbab5f5b76745f975d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """vrmapiのMock sphinx-apidocで撮る夫くんをビルドするときに, WindowsのPythonエンジンにvrmapiがないのでModuleNotFoundErrorが出る。 エラーを回避するための最小限のコードを含むガワだけ用意しておくのが目的。 """ import os from unittest.mock import MagicMock def LAYOUT(): return MagicMock() def SYSTEM(): return VRMSystem() def LOG(obj): return def C...
15.323529
53
0.692898
import os from unittest.mock import MagicMock def LAYOUT(): return MagicMock() def SYSTEM(): return VRMSystem() def LOG(obj): return def CLEARLOG(): return def ImGui(): return MagicMock() class VRMSystem(object): def __init__(self): pass def GetLayoutPath(self): retur...
true
true
f75503ca71a1b9d3555642d35ff630b9fb9a87e1
748
py
Python
run.py
zeee2/ZEEE-Discord-Bot
b902f35600f2938aec4fc57a8541bde03a88c425
[ "MIT" ]
1
2021-08-22T07:47:22.000Z
2021-08-22T07:47:22.000Z
run.py
zeee2/ZEEE-Discord-Bot
b902f35600f2938aec4fc57a8541bde03a88c425
[ "MIT" ]
null
null
null
run.py
zeee2/ZEEE-Discord-Bot
b902f35600f2938aec4fc57a8541bde03a88c425
[ "MIT" ]
null
null
null
import os import platform import pathlib from pip._internal.network.session import PipSession import pkg_resources import setuptools import sys # from zeee_bot.common import logging os.system("clear" if platform.system() == "Linux" else "cls") print("Before Starting, Auto-installing Python dependencies") if platform....
31.166667
82
0.713904
import os import platform import pathlib from pip._internal.network.session import PipSession import pkg_resources import setuptools import sys os.system("clear" if platform.system() == "Linux" else "cls") print("Before Starting, Auto-installing Python dependencies") if platform.system() == "Linux": os.system(f"p...
true
true
f75503cfaf9b530e0acd0a72032da1c92884bbff
1,040
py
Python
tests/test_0597-virtual-virtual-forms.py
BioGeek/awkward-1.0
0cfb4e43c41d5c7d9830cc7b1d750485c0a93eb2
[ "BSD-3-Clause" ]
519
2019-10-17T12:36:22.000Z
2022-03-26T23:28:19.000Z
tests/test_0597-virtual-virtual-forms.py
BioGeek/awkward-1.0
0cfb4e43c41d5c7d9830cc7b1d750485c0a93eb2
[ "BSD-3-Clause" ]
924
2019-11-03T21:05:01.000Z
2022-03-31T22:44:30.000Z
tests/test_0597-virtual-virtual-forms.py
BioGeek/awkward-1.0
0cfb4e43c41d5c7d9830cc7b1d750485c0a93eb2
[ "BSD-3-Clause" ]
56
2019-12-17T15:49:22.000Z
2022-03-09T20:34:06.000Z
# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE from __future__ import absolute_import import pytest # noqa: F401 import numpy as np # noqa: F401 import awkward as ak # noqa: F401 def test(): array = ak.Array( [[{"a": 1, "b": [1, 2, 3]}], [{"a": 1, "b": [4, 5]}...
32.5
87
0.515385
from __future__ import absolute_import import pytest import numpy as np import awkward as ak def test(): array = ak.Array( [[{"a": 1, "b": [1, 2, 3]}], [{"a": 1, "b": [4, 5]}, {"a": 4, "b": [2]}]] ) array_new = ak.Array( ak.layout.ListOffsetArray64( array.layout.offsets, ...
true
true
f7550470850da56f1379c3c4f1fa5d0e315aeb35
459
py
Python
bnb/config/crm.py
khaledhabsa/justpack
1ec01643c0ea624a15259af3de9bb4e5f867d32e
[ "MIT" ]
null
null
null
bnb/config/crm.py
khaledhabsa/justpack
1ec01643c0ea624a15259af3de9bb4e5f867d32e
[ "MIT" ]
null
null
null
bnb/config/crm.py
khaledhabsa/justpack
1ec01643c0ea624a15259af3de9bb4e5f867d32e
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "label": _("Crm"), "icon": "fa fa-star", "items": [ { "label":("Reservation"), "type": "doctype", "name": "Reservation", "onboard": 1, }, { "type": "doctype", "name": "Empl...
13.909091
39
0.457516
from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "label": _("Crm"), "icon": "fa fa-star", "items": [ { "label":("Reservation"), "type": "doctype", "name": "Reservation", "onboard": 1, }, { "type": "doctype", "name": "Empl...
true
true
f75505ee9ebabd5595b9bbdfda2803f69e4e139a
16,809
py
Python
ork.build/scripts/ork/build/slnprj.py
tweakoz/zed64
c0231444418999191182d53d9319bf7978422bfb
[ "CC-BY-3.0" ]
4
2015-06-04T01:14:43.000Z
2018-06-16T05:45:57.000Z
ork.build/scripts/ork/build/slnprj.py
tweakoz/zed64
c0231444418999191182d53d9319bf7978422bfb
[ "CC-BY-3.0" ]
null
null
null
ork.build/scripts/ork/build/slnprj.py
tweakoz/zed64
c0231444418999191182d53d9319bf7978422bfb
[ "CC-BY-3.0" ]
null
null
null
############################################################################### # Orkid SCONS Build System # Copyright 2010, Michael T. Mayers # email: michael@tweakoz.com # The Orkid Build System is published under the GPL 2.0 license # see http://www.gnu.org/licenses/gpl-2.0.html ###############################...
32.958824
144
0.594087
import glob, re, string import commands, sys, os import shutil, fnmatch, platform from sets import Set import ork.build.utils as utils import ork.build.common as common import ork.build.localopts as localopts HostIsOsx = common.IsOsx HostIsIrix = common.IsIrix HostIsLinux = common.IsLinux HostIsIx = commo...
false
true
f755078fb227814784b2f463f6929931190f7c74
2,811
py
Python
saleor/urls.py
3etechinns/saleor
9bf74258a28d7b91b05fb166b104223ab6ea3df4
[ "BSD-3-Clause" ]
6
2017-04-22T11:47:54.000Z
2021-03-27T17:15:40.000Z
saleor/urls.py
3etechinns/saleor
9bf74258a28d7b91b05fb166b104223ab6ea3df4
[ "BSD-3-Clause" ]
30
2017-11-02T20:46:02.000Z
2018-08-06T18:13:18.000Z
saleor/urls.py
3etechinns/saleor
9bf74258a28d7b91b05fb166b104223ab6ea3df4
[ "BSD-3-Clause" ]
2
2018-01-25T06:09:07.000Z
2018-01-25T20:55:34.000Z
from django.conf import settings from django.conf.urls import include, url from django.conf.urls.i18n import i18n_patterns from django.conf.urls.static import static from django.contrib.sitemaps.views import sitemap from django.contrib.staticfiles.views import serve from django.views.i18n import JavaScriptCatalog, set_...
42.590909
78
0.716115
from django.conf import settings from django.conf.urls import include, url from django.conf.urls.i18n import i18n_patterns from django.conf.urls.static import static from django.contrib.sitemaps.views import sitemap from django.contrib.staticfiles.views import serve from django.views.i18n import JavaScriptCatalog, set_...
true
true
f7550859cdf2071bdd6332e9debb03084cd43371
27
py
Python
examples/swatch3/__init__.py
jerry-git/flask-admin
88b3370b29e13de7010d71ba4a9f31c05c04c443
[ "BSD-3-Clause" ]
3
2018-07-04T12:21:31.000Z
2020-10-27T09:07:00.000Z
examples/swatch3/__init__.py
jerry-git/flask-admin
88b3370b29e13de7010d71ba4a9f31c05c04c443
[ "BSD-3-Clause" ]
8
2021-03-19T14:21:37.000Z
2022-03-12T00:43:04.000Z
newenv/lib/python2.7/site-packages/examples/swatch3/__init__.py
ahsanbagwan/flasktt
b74047172c652ddf510627ba1eff21a6ad9f4975
[ "MIT" ]
4
2017-05-23T19:36:28.000Z
2021-08-19T15:41:41.000Z
__author__ = 'rochacbruno'
13.5
26
0.777778
__author__ = 'rochacbruno'
true
true
f755093f9ca59a20d6f00803071637bfd82d9d59
1,284
py
Python
finder/views.py
plaunezkiy/unibase
31a7cb801349c329270e0e5c91ca5c02d146aeed
[ "MIT" ]
null
null
null
finder/views.py
plaunezkiy/unibase
31a7cb801349c329270e0e5c91ca5c02d146aeed
[ "MIT" ]
null
null
null
finder/views.py
plaunezkiy/unibase
31a7cb801349c329270e0e5c91ca5c02d146aeed
[ "MIT" ]
null
null
null
from django.shortcuts import render, redirect from django.http import HttpResponse from django.core.paginator import Paginator from .models import Subject import json def index(request): if request.method == "POST": value = request.POST.get("subject_title") subject_list = Subject.objects.filter(ti...
32.1
74
0.66433
from django.shortcuts import render, redirect from django.http import HttpResponse from django.core.paginator import Paginator from .models import Subject import json def index(request): if request.method == "POST": value = request.POST.get("subject_title") subject_list = Subject.objects.filter(ti...
true
true
f755094661b10b9d7c5a08a83bc8e263cfa3e413
11,069
py
Python
arcade/examples/pymunk_joint_builder.py
nrukin/arcade
6b3a0a0fd256a66dada494228b08461d7bfdacd5
[ "MIT" ]
null
null
null
arcade/examples/pymunk_joint_builder.py
nrukin/arcade
6b3a0a0fd256a66dada494228b08461d7bfdacd5
[ "MIT" ]
null
null
null
arcade/examples/pymunk_joint_builder.py
nrukin/arcade
6b3a0a0fd256a66dada494228b08461d7bfdacd5
[ "MIT" ]
null
null
null
""" Pymunk 2 If Python and Arcade are installed, this example can be run from the command line with: python -m arcade.examples.pymunk_joint_builder """ import arcade import pymunk import timeit import math import os SCREEN_WIDTH = 1200 SCREEN_HEIGHT = 800 SCREEN_TITLE = "Pymunk 2 Example" """ Key bindings: 1 - Drag...
33.850153
118
0.603397
import arcade import pymunk import timeit import math import os SCREEN_WIDTH = 1200 SCREEN_HEIGHT = 800 SCREEN_TITLE = "Pymunk 2 Example" class PhysicsSprite(arcade.Sprite): def __init__(self, pymunk_shape, filename): super().__init__(filename, center_x=pymunk_shape.body.position.x, center_y=pymunk_shap...
true
true
f7550a4ceb18a9717532a6c23591cd548a1a47bd
6,720
py
Python
sirepo/oauth.py
kalebswartz7/sirepo
8d1f2b3914cf9622eaae6b0bf32e23e38e4e5972
[ "Apache-2.0" ]
null
null
null
sirepo/oauth.py
kalebswartz7/sirepo
8d1f2b3914cf9622eaae6b0bf32e23e38e4e5972
[ "Apache-2.0" ]
null
null
null
sirepo/oauth.py
kalebswartz7/sirepo
8d1f2b3914cf9622eaae6b0bf32e23e38e4e5972
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- u"""OAUTH support :copyright: Copyright (c) 2016 RadiaSoft LLC. All Rights Reserved. :license: http://www.apache.org/licenses/LICENSE-2.0.html """ from __future__ import absolute_import, division, print_function from flask_sqlalchemy import SQLAlchemy from pykern import pkconfig, pkcollection...
32.780488
114
0.684375
from __future__ import absolute_import, division, print_function from flask_sqlalchemy import SQLAlchemy from pykern import pkconfig, pkcollections from pykern.pkdebug import pkdc, pkdexc, pkdlog, pkdp from sirepo import server from sirepo import simulation_db import flask import flask_oauthlib.client import os.path i...
true
true
f7550c26a4c65d1742f40d676f4084db4f132b03
317
py
Python
03. Python-Fundamentals-Lists/06 Odd numbers in odd positions.py
Bugzey/Softuni-Python-Fundamentals
6f66e143809988398896cfc771cce1db9220df27
[ "MIT" ]
1
2021-01-31T00:14:08.000Z
2021-01-31T00:14:08.000Z
03. Python-Fundamentals-Lists/06 Odd numbers in odd positions.py
Bugzey/Softuni-Python-Fundamentals
6f66e143809988398896cfc771cce1db9220df27
[ "MIT" ]
null
null
null
03. Python-Fundamentals-Lists/06 Odd numbers in odd positions.py
Bugzey/Softuni-Python-Fundamentals
6f66e143809988398896cfc771cce1db9220df27
[ "MIT" ]
null
null
null
# Ho many odd numbers at odd positions there are user_input = input().split() nums = enumerate([int(item) for item in user_input]) result = [(item_nr, item) for (item_nr, item) in nums if (item_nr % 2 != 0 and item % 2 != 0)] for result_set in result: print("Index %d -> %d" % (result_set[0], result_set[1]))
35.222222
94
0.659306
user_input = input().split() nums = enumerate([int(item) for item in user_input]) result = [(item_nr, item) for (item_nr, item) in nums if (item_nr % 2 != 0 and item % 2 != 0)] for result_set in result: print("Index %d -> %d" % (result_set[0], result_set[1]))
true
true
f7550cbf52d68dbeb9e3e6c528db53cdfaf6380f
766
py
Python
idpmodem/aterror.py
Inmarsat/idpmodem
2b77f7ead25fa71a390fb4eb97ae966a464d6132
[ "Apache-2.0" ]
3
2021-01-07T16:01:54.000Z
2021-12-19T04:15:12.000Z
idpmodem/aterror.py
Inmarsat/idpmodem
2b77f7ead25fa71a390fb4eb97ae966a464d6132
[ "Apache-2.0" ]
1
2021-12-17T15:09:06.000Z
2021-12-17T15:09:06.000Z
idpmodem/aterror.py
Inmarsat/idpmodem
2b77f7ead25fa71a390fb4eb97ae966a464d6132
[ "Apache-2.0" ]
2
2019-02-06T09:02:40.000Z
2020-03-17T02:55:16.000Z
"""Base classes for AT command errors. """ class AtException(Exception): """Base class for AT command exceptions.""" pass class AtTimeout(AtException): """Indicates a timeout waiting for response.""" pass class AtGnssTimeout(AtException): """Indicates a timeout waiting for a GNSS fix.""" pa...
20.702703
78
0.693211
class AtException(Exception): pass class AtTimeout(AtException): pass class AtGnssTimeout(AtException): pass class AtCrcError(AtException): pass class AtCrcConfigError(AtException): pass class AtUnsolicited(AtException): pass class AtBusy(AtException): pass
true
true
f7550cf06bff14b0be5c845e7680bd1c3e417b66
728
py
Python
start.py
meru-golang/instagram-bot
54bb9a2a9248f9b7efa652fd45a95fbeacc3a05f
[ "MIT" ]
1
2022-02-06T02:40:17.000Z
2022-02-06T02:40:17.000Z
start.py
meru-golang/instagram-bot
54bb9a2a9248f9b7efa652fd45a95fbeacc3a05f
[ "MIT" ]
null
null
null
start.py
meru-golang/instagram-bot
54bb9a2a9248f9b7efa652fd45a95fbeacc3a05f
[ "MIT" ]
null
null
null
from instagrapi import Client from instagrapi.types import StoryLink import config #Read user information from config ID = config.userID PW = config.userPW #Login Processing cl = Client() cl.login(ID, PW) #cl.login(ID, PW, verification_code="<2FA CODE HERE>") 2FA support #cl.loginby_sessionid("token") use this for to...
26
78
0.75
from instagrapi import Client from instagrapi.types import StoryLink import config ID = config.userID PW = config.userPW cl = Client() cl.login(ID, PW) print("login success!") print(cl.user_info(cl.user_id)) media_path = cl.video_download( cl.media_pk_from_url('https://www.instagram.com/p/CQlmi47j5ai/') ) cl.vi...
true
true
f7550dfe3909f746ab70c09375630e94b9616f6b
327
py
Python
Other_data_processing_scripts/35_randomize.py
peipeiwang6/Genomic_prediction_in_Switchgrass
1fba3508c0d81d16e0629e3cf94ff4d174a85b13
[ "MIT" ]
null
null
null
Other_data_processing_scripts/35_randomize.py
peipeiwang6/Genomic_prediction_in_Switchgrass
1fba3508c0d81d16e0629e3cf94ff4d174a85b13
[ "MIT" ]
null
null
null
Other_data_processing_scripts/35_randomize.py
peipeiwang6/Genomic_prediction_in_Switchgrass
1fba3508c0d81d16e0629e3cf94ff4d174a85b13
[ "MIT" ]
null
null
null
import os,sys import pandas as pd import numpy from numpy import random from numpy.random import shuffle file = sys.argv[1] df = pd.read_csv(file, sep=',', index_col = None, header = 0) # rowname = df.index.tolist() # row = shuffle(rowname) # df.index = rowname shuffle(df.ID) df.to_csv(file, index=False, header=True,se...
25.153846
61
0.718654
import os,sys import pandas as pd import numpy from numpy import random from numpy.random import shuffle file = sys.argv[1] df = pd.read_csv(file, sep=',', index_col = None, header = 0) shuffle(df.ID) df.to_csv(file, index=False, header=True,sep=",")
true
true
f7550e0054c2967ce2245f7428e0a695efb5935d
10,195
py
Python
sdk/python/pulumi_azure_native/appplatform/v20201101preview/binding.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/appplatform/v20201101preview/binding.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/appplatform/v20201101preview/binding.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
44.519651
667
0.654733
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs from ._inputs import * __all__ = ['BindingArgs', 'Binding'] @pulumi.input_type class BindingArgs: def __init__(__self__, *, ap...
true
true
f75510eda9da7c630b325ae27b72df05bb8fce29
1,120
py
Python
Algo and DSA/LeetCode-Solutions-master/Python/diagonal-traverse-ii.py
Sourav692/FAANG-Interview-Preparation
f523e5c94d582328b3edc449ea16ac6ab28cdc81
[ "Unlicense" ]
3,269
2018-10-12T01:29:40.000Z
2022-03-31T17:58:41.000Z
Algo and DSA/LeetCode-Solutions-master/Python/diagonal-traverse-ii.py
Sourav692/FAANG-Interview-Preparation
f523e5c94d582328b3edc449ea16ac6ab28cdc81
[ "Unlicense" ]
53
2018-12-16T22:54:20.000Z
2022-02-25T08:31:20.000Z
Algo and DSA/LeetCode-Solutions-master/Python/diagonal-traverse-ii.py
Sourav692/FAANG-Interview-Preparation
f523e5c94d582328b3edc449ea16ac6ab28cdc81
[ "Unlicense" ]
1,236
2018-10-12T02:51:40.000Z
2022-03-30T13:30:37.000Z
# Time: O(m * n) # Space: O(m) import itertools import collections class Solution(object): def findDiagonalOrder(self, nums): """ :type nums: List[List[int]] :rtype: List[int] """ result, dq, col = [], collections.deque(), 0 for i in xrange(len(nums)+max(itertools...
26.666667
68
0.483929
import itertools import collections class Solution(object): def findDiagonalOrder(self, nums): result, dq, col = [], collections.deque(), 0 for i in xrange(len(nums)+max(itertools.imap(len, nums))-1): new_dq = collections.deque() if i < len(nums): dq.append...
true
true
f755113369704762c244ba5f37abaf8f7e4affa5
2,795
py
Python
tests/unit-tests/test_config_prev_next.py
tonybaloney/sphinx-confluencebuilder
fd71fb5d5038b80fa3623dd673c198959dfbab03
[ "BSD-2-Clause" ]
90
2016-07-21T00:39:19.000Z
2019-03-08T08:27:17.000Z
tests/unit-tests/test_config_prev_next.py
tonybaloney/sphinx-confluencebuilder
fd71fb5d5038b80fa3623dd673c198959dfbab03
[ "BSD-2-Clause" ]
124
2016-10-18T20:06:48.000Z
2019-03-08T04:41:53.000Z
tests/unit-tests/test_config_prev_next.py
tonybaloney/sphinx-confluencebuilder
fd71fb5d5038b80fa3623dd673c198959dfbab03
[ "BSD-2-Clause" ]
39
2016-07-21T00:39:52.000Z
2019-03-06T14:33:31.000Z
# -*- coding: utf-8 -*- """ :copyright: Copyright 2020-2022 Sphinx Confluence Builder Contributors (AUTHORS) :license: BSD-2-Clause (LICENSE) """ from __future__ import unicode_literals from tests.lib.testcase import ConfluenceTestCase import io import os class TestConfluenceConfigPrevNext(ConfluenceTestCase): @...
38.287671
80
0.60966
from __future__ import unicode_literals from tests.lib.testcase import ConfluenceTestCase import io import os class TestConfluenceConfigPrevNext(ConfluenceTestCase): @classmethod def setUpClass(cls): super(TestConfluenceConfigPrevNext, cls).setUpClass() cls.dataset = os.path.join(cls.dataset...
true
true
f75512340b924f33fb14a945ef590d911e864cb3
7,485
py
Python
feeders/feederBoth.py
naternguyen/NAS_FinalExam
eade1174ab121576571c3a121a1aa0af6a99b1d7
[ "Apache-1.1" ]
146
2019-11-18T14:07:49.000Z
2022-03-28T09:21:10.000Z
feeders/feederBoth.py
liqier/GCN-NAS
da838b7df9615160d67092fade919e2251cf753f
[ "Apache-1.1" ]
16
2019-12-01T06:45:08.000Z
2022-02-01T03:00:50.000Z
feeders/feederBoth.py
liqier/GCN-NAS
da838b7df9615160d67092fade919e2251cf753f
[ "Apache-1.1" ]
32
2019-12-05T03:13:42.000Z
2022-03-28T09:21:19.000Z
import numpy as np import pickle import torch from torch.utils.data import Dataset import sys sys.path.extend(['../']) from feeders import tools class Feeder(Dataset): def __init__(self, data_path1, data_path2, label_path, random_choose=False, random_shift=False, random_move=False, ...
36.334951
116
0.545491
import numpy as np import pickle import torch from torch.utils.data import Dataset import sys sys.path.extend(['../']) from feeders import tools class Feeder(Dataset): def __init__(self, data_path1, data_path2, label_path, random_choose=False, random_shift=False, random_move=False, ...
true
true
f7551403129ff65a403bab6992e6d3be5d80d8f6
1,211
py
Python
fastidius/app_template/backend/main-sqlalchemy.py
johnckealy/fastidius
e63166b4dc39a9209fc9c3c7d829473648472807
[ "MIT" ]
null
null
null
fastidius/app_template/backend/main-sqlalchemy.py
johnckealy/fastidius
e63166b4dc39a9209fc9c3c7d829473648472807
[ "MIT" ]
null
null
null
fastidius/app_template/backend/main-sqlalchemy.py
johnckealy/fastidius
e63166b4dc39a9209fc9c3c7d829473648472807
[ "MIT" ]
null
null
null
from fastapi import Depends, FastAPI from typing import List, Any from fastapi.middleware.cors import CORSMiddleware from backend.db import create_db_and_tables % if auth: from backend.core.auth import auth_backend, fastapi_users from backend.api.endpoints.user_endpoints import router as user_routes % endif app = Fas...
22.018182
86
0.727498
from fastapi import Depends, FastAPI from typing import List, Any from fastapi.middleware.cors import CORSMiddleware from backend.db import create_db_and_tables % if auth: from backend.core.auth import auth_backend, fastapi_users from backend.api.endpoints.user_endpoints import router as user_routes % endif app = Fas...
false
true
f7551484f4b289484f615871c0eefc367dd60ef7
8,614
py
Python
python/ntp/commands/run/ntuple/DICE.py
EmyrClement/NTupleProduction
4c1b67ac8826656e804912512f4c4dc6695c7674
[ "Apache-2.0" ]
1
2018-02-20T21:23:21.000Z
2018-02-20T21:23:21.000Z
python/ntp/commands/run/ntuple/DICE.py
RickeyEstes/NTupleProduction
1319183de0ce00749c8f5841fa925479b9024b48
[ "Apache-2.0" ]
116
2015-01-09T22:38:07.000Z
2017-05-24T08:12:48.000Z
python/ntp/commands/run/ntuple/DICE.py
RickeyEstes/NTupleProduction
1319183de0ce00749c8f5841fa925479b9024b48
[ "Apache-2.0" ]
1
2020-11-01T00:01:17.000Z
2020-11-01T00:01:17.000Z
""" run ntuple where=DICE: Runs the ntuple production in the Data Intensive Computing Environment. See 'ntp help run ntuple' for a complete list of parameters. """ from __future__ import print_function import os import logging from . import Command as ParentCommand from ntp import NTPROOT from ntp....
33.258687
100
0.60274
from __future__ import print_function import os import logging from . import Command as ParentCommand from ntp import NTPROOT from ntp.commands.setup import WORKSPACE, LOGDIR, RESULTDIR from ntp.utils import find_latest_iteration, make_even_chunks from ntp.utils.hdfs import HDFS_STORE_BASE LOG = logging.getLogger(__n...
true
true
f75515b6c8ee236c1ca7ba80f6b7be25a5236ddb
3,658
py
Python
src/asset_calculation_tool.py
gongshichun/hsfund-tool
a74425ad813ea65bc99607cba2fc31dd1fe7e227
[ "Apache-2.0" ]
2
2018-02-13T00:50:30.000Z
2018-03-30T09:49:23.000Z
src/asset_calculation_tool.py
gongshichun/hsfund-tool
a74425ad813ea65bc99607cba2fc31dd1fe7e227
[ "Apache-2.0" ]
null
null
null
src/asset_calculation_tool.py
gongshichun/hsfund-tool
a74425ad813ea65bc99607cba2fc31dd1fe7e227
[ "Apache-2.0" ]
null
null
null
# -*-coding=utf-8-*- ''' @Created on 2016-12-26 @author gongsc@hsfund.com 交易系统资产单元份额计算工具 ''' from util.db_util import get_engine, query_asset_data, insert_message, query_msg_queue_sqe from util.logging_util import info, error from config.configuration import * import time from apscheduler.schedulers.blocking import Bl...
27.923664
112
0.687534
''' @Created on 2016-12-26 @author gongsc@hsfund.com 交易系统资产单元份额计算工具 ''' from util.db_util import get_engine, query_asset_data, insert_message, query_msg_queue_sqe from util.logging_util import info, error from config.configuration import * import time from apscheduler.schedulers.blocking import BlockingScheduler from ...
false
true
f75515c072f58594e6ce201e9b203bf0f8e0db87
5,080
py
Python
omega_miya/utils/omega_plugin_utils/cooldown.py
rinrini001/omega-miya
53a6683fccb0618e306abe9e103cec78445f3796
[ "MIT" ]
120
2021-04-20T13:20:46.000Z
2022-03-26T05:43:21.000Z
omega_miya/utils/omega_plugin_utils/cooldown.py
rinrini001/omega-miya
53a6683fccb0618e306abe9e103cec78445f3796
[ "MIT" ]
57
2021-04-20T08:10:14.000Z
2022-03-28T01:55:14.000Z
omega_miya/utils/omega_plugin_utils/cooldown.py
rinrini001/omega-miya
53a6683fccb0618e306abe9e103cec78445f3796
[ "MIT" ]
32
2021-04-21T01:57:17.000Z
2022-03-01T18:06:34.000Z
import datetime from omega_miya.database import DBCoolDownEvent, Result from dataclasses import dataclass, field @dataclass class PluginCoolDown: """ 插件冷却工具类, 用于声明当前 matcher 权限及冷却等信息, 并负责处理具体冷却事件 - type: 冷却类型 - cool_down_time: 冷却时间, 单位秒 """ type: str cool_down_time: int global_...
44.173913
112
0.63248
import datetime from omega_miya.database import DBCoolDownEvent, Result from dataclasses import dataclass, field @dataclass class PluginCoolDown: type: str cool_down_time: int global_group_type: str = field(default=DBCoolDownEvent.global_group_type, init=False) global_user_type: str = field(default=DB...
true
true
f75516c6950db0b20846f9787f5241d8e9d90adc
618
py
Python
alembic/versions/2ca4511880b_add_updated_to_packages.py
KnightOS/packages.knightos.org
69b2389a5fa3b937d3b7daa0dd55bdf6c0044c48
[ "MIT" ]
5
2015-02-08T04:50:30.000Z
2019-10-09T09:54:08.000Z
alembic/versions/2ca4511880b_add_updated_to_packages.py
KnightOS/packages.knightos.org
69b2389a5fa3b937d3b7daa0dd55bdf6c0044c48
[ "MIT" ]
8
2015-02-09T13:59:36.000Z
2016-08-20T16:57:41.000Z
alembic/versions/2ca4511880b_add_updated_to_packages.py
KnightOS/packages.knightos.org
69b2389a5fa3b937d3b7daa0dd55bdf6c0044c48
[ "MIT" ]
8
2015-01-19T20:25:38.000Z
2020-02-17T04:56:01.000Z
"""Add 'updated' to packages Revision ID: 2ca4511880b Revises: 1fc38fa913a Create Date: 2014-10-11 13:29:07.675201 """ # revision identifiers, used by Alembic. revision = '2ca4511880b' down_revision = '1fc38fa913a' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Al...
22.888889
80
0.692557
revision = '2ca4511880b' down_revision = '1fc38fa913a' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column('package', sa.Column('updated', sa.DateTime(), nullable=True)) def downgrade(): op.drop_column('package', 'updated')
true
true
f7551721faf216c7457fff830c30af8661977abf
3,372
py
Python
tests/attacks/inference/membership_inference/test_label_only_boundary_distance.py
minaremeli/adversarial-robustness-toolbox
3454f7f11c3ade9317d11637c8c8621c9f44e8fd
[ "MIT" ]
1
2021-02-08T20:15:19.000Z
2021-02-08T20:15:19.000Z
tests/attacks/inference/membership_inference/test_label_only_boundary_distance.py
minaremeli/adversarial-robustness-toolbox
3454f7f11c3ade9317d11637c8c8621c9f44e8fd
[ "MIT" ]
34
2021-06-23T09:14:19.000Z
2022-03-24T09:16:11.000Z
tests/attacks/inference/membership_inference/test_label_only_boundary_distance.py
minaremeli/adversarial-robustness-toolbox
3454f7f11c3ade9317d11637c8c8621c9f44e8fd
[ "MIT" ]
1
2021-06-07T22:46:25.000Z
2021-06-07T22:46:25.000Z
# MIT License # # Copyright (C) The Adversarial Robustness Toolbox (ART) Authors 2020 # # 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...
44.368421
120
0.776987
from __future__ import absolute_import, division, print_function, unicode_literals import logging import pytest from art.attacks.inference.membership_inference.label_only_boundary_distance import LabelOnlyDecisionBoundary from art.estimators.estimator import BaseEstimator from art.estimators.classification.classifier...
true
true
f7551728f47c9fc40a3a2924cf0a6138c55cc8d1
1,473
py
Python
built-in/TensorFlow/Official/cv/image_classification/ResnetVariant_for_TensorFlow/automl/vega/search_space/fine_grained_space/sample/random_search.py
Huawei-Ascend/modelzoo
df51ed9c1d6dbde1deef63f2a037a369f8554406
[ "Apache-2.0" ]
12
2020-12-13T08:34:24.000Z
2022-03-20T15:17:17.000Z
built-in/TensorFlow/Official/cv/image_classification/ResnetVariant_for_TensorFlow/automl/vega/search_space/fine_grained_space/sample/random_search.py
Huawei-Ascend/modelzoo
df51ed9c1d6dbde1deef63f2a037a369f8554406
[ "Apache-2.0" ]
3
2021-03-31T20:15:40.000Z
2022-02-09T23:50:46.000Z
built-in/TensorFlow/Research/cv/image_classification/Darts_for_TensorFlow/automl/vega/search_space/fine_grained_space/sample/random_search.py
Huawei-Ascend/modelzoo
df51ed9c1d6dbde1deef63f2a037a369f8554406
[ "Apache-2.0" ]
2
2021-07-10T12:40:46.000Z
2021-12-17T07:55:15.000Z
# -*- coding:utf-8 -*- # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved. # This program is free software; you can redistribute it and/or modify # it under the terms of the MIT License. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the ...
33.477273
78
0.696538
import random import logging from vega.core.common.class_factory import ClassFactory, ClassType from vega.search_space.search_algs import SearchAlgorithm @ClassFactory.register(ClassType.SEARCH_ALGORITHM) class RandomSearch(SearchAlgorithm): def __init__(self, search_space): super(RandomSearch, self)._...
true
true
f75518064427d54bf16e59aa446c4d99ede28d8e
1,131
py
Python
Chapter_01/blog/sitemaps.py
codingEzio/code_py_book_django2_by_example
d215d0c87a557685824286822186966b06fa8d59
[ "Unlicense" ]
1
2021-04-23T16:35:45.000Z
2021-04-23T16:35:45.000Z
Chapter_01/blog/sitemaps.py
codingEzio/code_py_book_django2_by_example
d215d0c87a557685824286822186966b06fa8d59
[ "Unlicense" ]
null
null
null
Chapter_01/blog/sitemaps.py
codingEzio/code_py_book_django2_by_example
d215d0c87a557685824286822186966b06fa8d59
[ "Unlicense" ]
null
null
null
from django.contrib.sitemaps import Sitemap from .models import Post class PostSiteMap(Sitemap): """ Just a reminder: We're (simply) override the (static) attrs of the class 'Sitemap' :P Some attrs & methods: changefreq possible vals: 'al...
31.416667
84
0.521662
from django.contrib.sitemaps import Sitemap from .models import Post class PostSiteMap(Sitemap): changefreq = 'weekly' priority = 0.9 def items(self): return Post.published.all() def lastmod(self, obj): return obj.updated
true
true
f7551a73356b63c9f23b9eaebac26b674c9561cf
3,213
py
Python
cofenseintelligence_consts.py
chunmanjimmyf/cofenseintelligence
b9c878f060f90ba2b4524debfb6b11cb651d7f9c
[ "Apache-2.0" ]
null
null
null
cofenseintelligence_consts.py
chunmanjimmyf/cofenseintelligence
b9c878f060f90ba2b4524debfb6b11cb651d7f9c
[ "Apache-2.0" ]
null
null
null
cofenseintelligence_consts.py
chunmanjimmyf/cofenseintelligence
b9c878f060f90ba2b4524debfb6b11cb651d7f9c
[ "Apache-2.0" ]
null
null
null
# File: cofenseintelligence_consts.py # # Copyright (c) 2020-2021 Splunk Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
51
150
0.831933
PHISHME_API_SEARCH = "https://www.threathq.com/apiv1" PHISHME_API_THREAT_UPDATE = "/threat/updates" PHISHME_ENDPOINT = "/threat/search" PHISHME_ENDPOINT_GET_REPORT_MALWARE = '/threat/malware/' PHISHME_ERR_API_UNSUPPORTED_METHOD = "Unsupported method {method}" PHISHME_CONNECTION_TEST_MSG = "Querying endpoint to verify t...
true
true
f7551bbcdd9ffb872d439194816295d99b16a557
524
py
Python
src/model.py
2019ds-fnw/FinalDFS
26d62256c2f2c5931bdd8ec2dda805926b634758
[ "MIT" ]
2
2020-01-12T13:26:46.000Z
2020-01-15T14:56:17.000Z
src/model.py
2019ds-fnw/FinalDFS
26d62256c2f2c5931bdd8ec2dda805926b634758
[ "MIT" ]
null
null
null
src/model.py
2019ds-fnw/FinalDFS
26d62256c2f2c5931bdd8ec2dda805926b634758
[ "MIT" ]
1
2020-01-13T08:32:01.000Z
2020-01-13T08:32:01.000Z
import time def time_stamp_now(): time_now = int(time.time()) time_local = time.localtime(time_now) return time.mktime(time_local) class FileMetaData: def __init__(self, fname, blocks=None, timestamp=None): if blocks is None: blocks = [] self.fname = fname self.bl...
24.952381
59
0.614504
import time def time_stamp_now(): time_now = int(time.time()) time_local = time.localtime(time_now) return time.mktime(time_local) class FileMetaData: def __init__(self, fname, blocks=None, timestamp=None): if blocks is None: blocks = [] self.fname = fname self.bl...
true
true
f7551c290b2fc89bba547070cf830e381536e403
1,203
py
Python
031902327/change_to_pinyin.py
wu372620060/031902327
1c42e3eda29cc7b7da433508d51dc10dd9fc8986
[ "MIT" ]
null
null
null
031902327/change_to_pinyin.py
wu372620060/031902327
1c42e3eda29cc7b7da433508d51dc10dd9fc8986
[ "MIT" ]
null
null
null
031902327/change_to_pinyin.py
wu372620060/031902327
1c42e3eda29cc7b7da433508d51dc10dd9fc8986
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2010 Yefe<yefe@ichuzhou.cn> from os import path import codecs class Hanzi2Pinyin(object): def __init__(self): self.table = {} try: fp = codecs.open(path.join(path.dirname( __file__), 'pinyin.txt'), 'r', 'utf-8') except IOError...
26.733333
64
0.487947
from os import path import codecs class Hanzi2Pinyin(object): def __init__(self): self.table = {} try: fp = codecs.open(path.join(path.dirname( __file__), 'pinyin.txt'), 'r', 'utf-8') except IOError: raise Exception("Can't load data from pinyin.txt")...
true
true
f7551c6762be9815a33fd5f6a0d76f6d763bc8ab
1,947
py
Python
publisher/build_template.py
gc3-uzh-ch/euroscipy_proceedings
14e197fb0acc0f0fb0fbeb115e797224f87c9d39
[ "CC-BY-3.0" ]
null
null
null
publisher/build_template.py
gc3-uzh-ch/euroscipy_proceedings
14e197fb0acc0f0fb0fbeb115e797224f87c9d39
[ "CC-BY-3.0" ]
null
null
null
publisher/build_template.py
gc3-uzh-ch/euroscipy_proceedings
14e197fb0acc0f0fb0fbeb115e797224f87c9d39
[ "CC-BY-3.0" ]
null
null
null
#!/usr/bin/env python import os import sys import shlex, subprocess import tempita from conf import bib_dir, build_dir, template_dir, html_dir from options import get_config def _from_template(tmpl_basename, config): tmpl = os.path.join(template_dir, tmpl_basename + '.tmpl') template = tempita.HTMLTemplate(o...
29.5
76
0.69697
import os import sys import shlex, subprocess import tempita from conf import bib_dir, build_dir, template_dir, html_dir from options import get_config def _from_template(tmpl_basename, config): tmpl = os.path.join(template_dir, tmpl_basename + '.tmpl') template = tempita.HTMLTemplate(open(tmpl, 'r').read())...
false
true
f7551d3145ea748d889516f8ca9244ed5929dc32
6,639
py
Python
test/banana/typeck/test_typeck_config.py
daisuke-fujita/monsaca-analytics_20181107
5809e66874d76bd9f102e7694197bd849210fa3b
[ "Apache-2.0" ]
1
2021-03-19T04:09:04.000Z
2021-03-19T04:09:04.000Z
test/banana/typeck/test_typeck_config.py
daisuke-fujita/monsaca-analytics_20181107
5809e66874d76bd9f102e7694197bd849210fa3b
[ "Apache-2.0" ]
1
2019-01-21T09:44:29.000Z
2019-01-21T09:44:29.000Z
test/banana/typeck/test_typeck_config.py
daisuke-fujita/monsaca-analytics_20181107
5809e66874d76bd9f102e7694197bd849210fa3b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2016 Hewlett Packard Enterprise Development Company, L.P. # # 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...
42.557692
79
0.590902
import logging import os import re import monasca_analytics.banana.pass_manager as p import monasca_analytics.exception.banana as exception from test.util_for_testing import MonanasTestCase logger = logging.getLogger(__name__) _has_some_file_that_should = dict() _has_some_file_that_should["pass"] = False _has_som...
true
true
f7551fb8d19851c95bac8551109b3a9eb0ec5739
467
py
Python
application/__init__.py
b-rbmp/Calculadora-Juros-Compostos
4f5cab0b5527f606e3593677279d762d223dcd92
[ "MIT" ]
null
null
null
application/__init__.py
b-rbmp/Calculadora-Juros-Compostos
4f5cab0b5527f606e3593677279d762d223dcd92
[ "MIT" ]
null
null
null
application/__init__.py
b-rbmp/Calculadora-Juros-Compostos
4f5cab0b5527f606e3593677279d762d223dcd92
[ "MIT" ]
null
null
null
from flask import Flask # Bibliotecas publicamente acessíveis #db = SQLAlchemy() def init_app(): # Inicializa a aplicação app = Flask(__name__, instance_relative_config=False) app.config.from_object('config.Config') # Inicializa Plugins #db.init_app(app) with app.app_context(): ...
20.304348
57
0.663812
from flask import Flask def init_app(): app = Flask(__name__, instance_relative_config=False) app.config.from_object('config.Config') with app.app_context(): from . import routes return app
true
true
f7551ff66f59f39204beedf1eb747d3823de062f
31,420
py
Python
tests/test_vlan.py
abdosi/sonic-swss
3f2b112bfc12f21fa14f8f5a2574026b058cc2f7
[ "Apache-2.0" ]
null
null
null
tests/test_vlan.py
abdosi/sonic-swss
3f2b112bfc12f21fa14f8f5a2574026b058cc2f7
[ "Apache-2.0" ]
null
null
null
tests/test_vlan.py
abdosi/sonic-swss
3f2b112bfc12f21fa14f8f5a2574026b058cc2f7
[ "Apache-2.0" ]
null
null
null
import time import re import json import pytest import platform from swsscommon import swsscommon from distutils.version import StrictVersion class TestVlan(object): def setup_db(self, dvs): self.pdb = swsscommon.DBConnector(0, dvs.redis_sock, 0) self.adb = swsscommon.DBConnector(1, dvs.redis_soc...
38.131068
187
0.605761
import time import re import json import pytest import platform from swsscommon import swsscommon from distutils.version import StrictVersion class TestVlan(object): def setup_db(self, dvs): self.pdb = swsscommon.DBConnector(0, dvs.redis_sock, 0) self.adb = swsscommon.DBConnector(1, dvs.redis_soc...
true
true
f7552011a555e63c9463b41d779d56dffec2e15c
691
py
Python
Season 06 - Files in Python/Episode 09 - Python Relative Imports : Children/utils/find.py
Pythobit/Python-tutorial
b0743eaa9c237c3578131ead1b3f2c295f11b7ee
[ "MIT" ]
3
2021-02-19T18:33:00.000Z
2021-08-03T14:56:50.000Z
Season 06 - Files in Python/Episode 09 - Python Relative Imports : Children/utils/find.py
barawalojas/Python-tutorial
3f4b2b073e421888b3d62ff634658317d9abcb9b
[ "MIT" ]
1
2021-07-10T14:37:57.000Z
2021-07-20T09:51:39.000Z
Season 06 - Files in Python/Episode 09 - Python Relative Imports : Children/utils/find.py
barawalojas/Python-tutorial
3f4b2b073e421888b3d62ff634658317d9abcb9b
[ "MIT" ]
1
2021-08-02T05:39:38.000Z
2021-08-02T05:39:38.000Z
# from common.file_operations import save_to_file [X] <-- Wrong Way # from utils.common.file_operations import save_to_file [+1] <-- Correct # from .common.file_operations import save_to_file [+1] <-- Correct """ Above methods are : Relative imports : that starts from current file we're working with and it can ...
34.55
107
0.648336
def find_in(iterable, finder, expected): for i in iterable: if finder(i) == expected: return i raise NotFoundError(f'{expected} not found at provided iterables.') class NotFoundError(Exception): pass
true
true
f75520877f6f9fc4ac46a8c3db16b446265eb941
5,404
py
Python
tests/rest/client/v1/test_events.py
ThiefMaster/synapse
f2af3e4fc550e7e93be1b0f425c3e9c484b96293
[ "Apache-2.0" ]
1
2020-07-21T17:51:02.000Z
2020-07-21T17:51:02.000Z
tests/rest/client/v1/test_events.py
mjvaldez/synapse
de119063f248981510e961e83f1515a3add19a21
[ "Apache-2.0" ]
null
null
null
tests/rest/client/v1/test_events.py
mjvaldez/synapse
de119063f248981510e961e83f1515a3add19a21
[ "Apache-2.0" ]
1
2020-09-23T12:36:11.000Z
2020-09-23T12:36:11.000Z
# -*- coding: utf-8 -*- # Copyright 2014-2016 OpenMarket Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
33.775
83
0.635825
from mock import Mock import synapse.rest.admin from synapse.rest.client.v1 import events, login, room from tests import unittest class EventStreamPermissionsTestCase(unittest.HomeserverTestCase): servlets = [ events.register_servlets, room.register_servlets, synapse.rest.admin.regist...
true
true
f755208ae05b65204f78947c9fdf33e9ebf579ad
395
py
Python
quiz/quizapp/migrations/0005_auto_20210329_1319.py
afshin-x76/BootCamp-and-Training
e016f9d8b05cabbcc0fcd5ad410e190a7e6f0b48
[ "MIT" ]
1
2021-04-11T07:05:12.000Z
2021-04-11T07:05:12.000Z
quiz/quizapp/migrations/0005_auto_20210329_1319.py
afshin-x76/Training
e016f9d8b05cabbcc0fcd5ad410e190a7e6f0b48
[ "MIT" ]
null
null
null
quiz/quizapp/migrations/0005_auto_20210329_1319.py
afshin-x76/Training
e016f9d8b05cabbcc0fcd5ad410e190a7e6f0b48
[ "MIT" ]
null
null
null
# Generated by Django 3.1.7 on 2021-03-29 13:19 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('quizapp', '0004_auto_20210329_1318'), ] operations = [ migrations.AlterField( model_name='student', name='points', ...
20.789474
58
0.6
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('quizapp', '0004_auto_20210329_1318'), ] operations = [ migrations.AlterField( model_name='student', name='points', field=models.JSONField(blank=True, nu...
true
true
f7552098abd265f505cb89767c6bafe1d11daf95
153,949
py
Python
controller/project_controller/projects/WaferFaultDetection_new/best_model_finder/tuner.py
rohandhanraj/Auto-AI-Pipeline
d5f39715c802db45afae0d5978d228bf0bcd2f0a
[ "MIT" ]
null
null
null
controller/project_controller/projects/WaferFaultDetection_new/best_model_finder/tuner.py
rohandhanraj/Auto-AI-Pipeline
d5f39715c802db45afae0d5978d228bf0bcd2f0a
[ "MIT" ]
null
null
null
controller/project_controller/projects/WaferFaultDetection_new/best_model_finder/tuner.py
rohandhanraj/Auto-AI-Pipeline
d5f39715c802db45afae0d5978d228bf0bcd2f0a
[ "MIT" ]
null
null
null
import uuid import numpy import pandas from sklearn.ensemble import RandomForestClassifier, RandomForestRegressor from sklearn.linear_model import LinearRegression from sklearn.model_selection import GridSearchCV from sklearn.neighbors import KNeighborsClassifier from sklearn.svm import SVC, SVR from sklearn.tree imp...
55.377338
149
0.563362
import uuid import numpy import pandas from sklearn.ensemble import RandomForestClassifier, RandomForestRegressor from sklearn.linear_model import LinearRegression from sklearn.model_selection import GridSearchCV from sklearn.neighbors import KNeighborsClassifier from sklearn.svm import SVC, SVR from sklearn.tree imp...
true
true
f7552153d83e6662c0ad2503dde4683c19e75271
26,557
py
Python
speculative_weather_report/classes.py
johnjung/weather
c694b937efa9dccc4ca07769d4621d615fc40531
[ "MIT" ]
1
2020-07-18T15:35:00.000Z
2020-07-18T15:35:00.000Z
speculative_weather_report/classes.py
johnjung/weather
c694b937efa9dccc4ca07769d4621d615fc40531
[ "MIT" ]
2
2019-05-29T13:58:35.000Z
2019-06-11T11:14:32.000Z
speculative_weather_report/classes.py
johnjung/weather
c694b937efa9dccc4ca07769d4621d615fc40531
[ "MIT" ]
null
null
null
import astral import csv import datetime import math import os import random import re import statistics def load_historical_data_headers(): """Load the headers for historical weather data.""" with open(os.path.dirname(os.path.realpath(__file__)) + '/../data/1711054.csv') as f: reader = csv.reader(f) ...
36.680939
178
0.560493
import astral import csv import datetime import math import os import random import re import statistics def load_historical_data_headers(): with open(os.path.dirname(os.path.realpath(__file__)) + '/../data/1711054.csv') as f: reader = csv.reader(f) return next(reader, None) def load_historical_...
true
true
f7552231651d53282d94fc8957e98e081061d472
816
py
Python
indoorair/instrument/serializers.py
caimingxiang/indoorair-webapp-b
1b21c495a36f62bb75134b50a659f029ce73f107
[ "BSD-3-Clause" ]
null
null
null
indoorair/instrument/serializers.py
caimingxiang/indoorair-webapp-b
1b21c495a36f62bb75134b50a659f029ce73f107
[ "BSD-3-Clause" ]
null
null
null
indoorair/instrument/serializers.py
caimingxiang/indoorair-webapp-b
1b21c495a36f62bb75134b50a659f029ce73f107
[ "BSD-3-Clause" ]
null
null
null
from rest_framework import serializers from rest_framework.validators import UniqueValidator from foundation.models import Instrument, Sensor, TimeSeriesDatum class InstrumentSerializer(serializers.Serializer): id = serializers.IntegerField(read_only=True) location = serializers.CharField(validators=[ ...
29.142857
65
0.737745
from rest_framework import serializers from rest_framework.validators import UniqueValidator from foundation.models import Instrument, Sensor, TimeSeriesDatum class InstrumentSerializer(serializers.Serializer): id = serializers.IntegerField(read_only=True) location = serializers.CharField(validators=[ ...
true
true
f75523b929c2d557047e02a9c0301c0fc2f5b5e2
665
py
Python
unit_tests/train/others/test_change_loading_device.py
XuMayi/PyABSA
3d71c0cdaea7ea1eff600d9091c3c63f61c111e5
[ "MIT" ]
66
2020-07-04T04:19:58.000Z
2021-05-27T07:35:38.000Z
unit_tests/train/others/test_change_loading_device.py
XuMayi/PyABSA
3d71c0cdaea7ea1eff600d9091c3c63f61c111e5
[ "MIT" ]
18
2020-06-29T04:41:56.000Z
2021-05-06T15:26:23.000Z
unit_tests/train/others/test_change_loading_device.py
XuMayi/PyABSA
3d71c0cdaea7ea1eff600d9091c3c63f61c111e5
[ "MIT" ]
10
2020-07-10T09:11:16.000Z
2021-04-26T14:12:27.000Z
# -*- coding: utf-8 -*- # file: change_loading_device.py # time: 2021/6/8 0008 # author: yangheng <yangheng@m.scnu.edu.cn> # github: https://github.com/yangheng95 # Copyright (C) 2021. All Rights Reserved. from pyabsa import APCConfigManager, APCCheckpointManager sent_classifier = APCCheckpointManager.get_sentiment_...
30.227273
95
0.754887
from pyabsa import APCConfigManager, APCCheckpointManager sent_classifier = APCCheckpointManager.get_sentiment_classifier('checkpoint', auto_device=True) sent_classifier.cpu() sent_classifier.cuda() sent_classifier.to('cuda:0')
true
true
f75523cf610308c51de5576072320f865261b17e
3,532
py
Python
marshmallow_utils/fields/babel.py
ppanero/marshmallow-utils
ddec07b3768e1c407a72cc47d0b8ad2067140232
[ "MIT" ]
null
null
null
marshmallow_utils/fields/babel.py
ppanero/marshmallow-utils
ddec07b3768e1c407a72cc47d0b8ad2067140232
[ "MIT" ]
null
null
null
marshmallow_utils/fields/babel.py
ppanero/marshmallow-utils
ddec07b3768e1c407a72cc47d0b8ad2067140232
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2016-2020 CERN. # # Marshmallow-Utils is free software; you can redistribute it and/or modify # it under the terms of the MIT License; see LICENSE file for more details. """Localized Extended Date(/Time) Format Level 0 date string field.""" import calendar from datetime impor...
28.715447
78
0.610985
import calendar from datetime import date, datetime import arrow from babel.dates import LC_TIME, format_date, format_datetime, format_time from babel_edtf import format_edtf from marshmallow import fields class BabelFormatField(fields.String): def __init__(self, format='medium', locale=LC_TIME, parse=True, *...
true
true
f7552409b8a02e55df7c80e13c0425d9e4c40fb4
8,413
py
Python
oauthlib/oauth2/rfc6749/grant_types/resource_owner_password_credentials.py
mccabe615/ebooks.py
d78b23f4c5b44d7d6d2c0df5bee34f50d8539b32
[ "MIT" ]
4
2019-10-03T21:58:22.000Z
2021-02-12T13:33:32.000Z
env/lib/python3.5/site-packages/oauthlib/oauth2/rfc6749/grant_types/resource_owner_password_credentials.py
mpvoss/RickAndMortyWeatherTweets
0ce804dccd0cdee9dfaba015e596f69e08513cdb
[ "MIT" ]
27
2017-04-01T15:06:36.000Z
2021-02-08T20:19:58.000Z
env/lib/python3.5/site-packages/oauthlib/oauth2/rfc6749/grant_types/resource_owner_password_credentials.py
mpvoss/RickAndMortyWeatherTweets
0ce804dccd0cdee9dfaba015e596f69e08513cdb
[ "MIT" ]
1
2021-01-13T09:30:29.000Z
2021-01-13T09:30:29.000Z
# -*- coding: utf-8 -*- """ oauthlib.oauth2.rfc6749.grant_types ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ """ from __future__ import unicode_literals, absolute_import import json import logging from .base import GrantTypeBase from .. import errors from ..request_validator import RequestValidator log = logging.getLogger(_...
42.489899
112
0.615119
from __future__ import unicode_literals, absolute_import import json import logging from .base import GrantTypeBase from .. import errors from ..request_validator import RequestValidator log = logging.getLogger(__name__) class ResourceOwnerPasswordCredentialsGrant(GrantTypeBase): def create_token_response(se...
true
true
f75524376fd6f310b55ca87513f9730c0048ea9b
11,122
py
Python
smartsim/settings/slurmSettings.py
Spartee/SmartSim
b091fc1fb22733b067430d6850d0494e1a399d7d
[ "BSD-2-Clause" ]
null
null
null
smartsim/settings/slurmSettings.py
Spartee/SmartSim
b091fc1fb22733b067430d6850d0494e1a399d7d
[ "BSD-2-Clause" ]
5
2021-12-21T20:27:21.000Z
2022-03-07T22:35:34.000Z
smartsim/settings/slurmSettings.py
al-rigazzi/SmartSim
b091fc1fb22733b067430d6850d0494e1a399d7d
[ "BSD-2-Clause" ]
null
null
null
# BSD 2-Clause License # # Copyright (c) 2021, Hewlett Packard Enterprise # 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 copyright noti...
34.865204
85
0.600432
import os from .base import BatchSettings, RunSettings class SrunSettings(RunSettings): def __init__( self, exe, exe_args=None, run_args=None, env_vars=None, alloc=None, **kwargs ): super().__init__( exe, exe_args, run_command="srun", run_args=...
true
true
f75524a6cc8865292d386ebb9c376cfd04c2eace
15,900
py
Python
resources/dementia_analysis.py
chance-alvarado/dementia-classifier
8c0d1735e072665c65c8d0bc4de32d0fa25fde87
[ "MIT" ]
null
null
null
resources/dementia_analysis.py
chance-alvarado/dementia-classifier
8c0d1735e072665c65c8d0bc4de32d0fa25fde87
[ "MIT" ]
null
null
null
resources/dementia_analysis.py
chance-alvarado/dementia-classifier
8c0d1735e072665c65c8d0bc4de32d0fa25fde87
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Defining functions and classes for classification of dementia features. The contents of this module define functions and classes for cleaning, visualizing, and making predictions based on clinical datasets collected by the Open Access Series of Imaging Studies (OASIS) project. Explore this ...
35.730337
79
0.54478
import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import numpy as np from sklearn.preprocessing import MinMaxScaler from sklearn.model_selection import train_test_split from sklearn.linear_model import LogisticRegression from sklearn.svm import SVC from sklearn.ensemble import RandomForestClass...
true
true
f7552525f13a61bc552ca071db06aab4a1edb0b5
6,894
py
Python
pore_mapper/inflater.py
andrewtarzia/PoreMapper
fc98324275e0e4fb3735b9a9cc4a79a34567eca2
[ "MIT" ]
7
2021-12-16T13:01:04.000Z
2021-12-29T10:09:37.000Z
pore_mapper/inflater.py
Chemwzd/PoreMapper
fc98324275e0e4fb3735b9a9cc4a79a34567eca2
[ "MIT" ]
null
null
null
pore_mapper/inflater.py
Chemwzd/PoreMapper
fc98324275e0e4fb3735b9a9cc4a79a34567eca2
[ "MIT" ]
1
2021-12-16T13:01:03.000Z
2021-12-16T13:01:03.000Z
""" Inflater ======== #. :class:`.Inflater` Generator of blob guests using nonbonded interactions and growth. """ from __future__ import annotations from collections import abc import typing import numpy as np from copy import deepcopy from scipy.spatial.distance import cdist from .host import Host from .blob imp...
28.725
71
0.551349
from __future__ import annotations from collections import abc import typing import numpy as np from copy import deepcopy from scipy.spatial.distance import cdist from .host import Host from .blob import Blob from .bead import Bead from .pore import Pore from .result import InflationResult, InflationStepResult cla...
true
true
f75525904114b6a10492ded01732d779c80945b4
3,821
py
Python
backend/api/services/summary.py
kuanfan99/zeva
57b506a108fe57438506569d5503c90c52216b2f
[ "Apache-2.0" ]
3
2020-03-25T03:06:20.000Z
2021-01-20T23:36:03.000Z
backend/api/services/summary.py
kuanfan99/zeva
57b506a108fe57438506569d5503c90c52216b2f
[ "Apache-2.0" ]
740
2019-12-16T15:53:39.000Z
2022-03-26T08:25:10.000Z
backend/api/services/summary.py
kuanfan99/zeva
57b506a108fe57438506569d5503c90c52216b2f
[ "Apache-2.0" ]
11
2019-11-28T20:39:15.000Z
2022-01-31T17:53:31.000Z
from datetime import date from api.models.account_balance import AccountBalance from api.models.credit_transaction import CreditTransaction from django.db.models import Sum def parse_summary_serializer(lst, serializer_data, category): index = 0 found = False model_year = serializer_data['model_year'].get(...
31.065041
79
0.638576
from datetime import date from api.models.account_balance import AccountBalance from api.models.credit_transaction import CreditTransaction from django.db.models import Sum def parse_summary_serializer(lst, serializer_data, category): index = 0 found = False model_year = serializer_data['model_year'].get(...
true
true
f75525aab1b9e45d8542fea1c9c7a83d7e6e992d
713
py
Python
xqdb/xqdb.py
maksimKorzh/wukong-xiangqi
9ef8db735e78ec640a64d50240698087b44c5294
[ "MIT" ]
16
2021-02-18T19:01:21.000Z
2022-03-22T07:04:24.000Z
xqdb/xqdb.py
maksimKorzh/wukong-xiangqi
9ef8db735e78ec640a64d50240698087b44c5294
[ "MIT" ]
1
2021-11-18T12:26:48.000Z
2021-11-18T12:26:48.000Z
xqdb/xqdb.py
maksimKorzh/wukong-xiangqi
9ef8db735e78ec640a64d50240698087b44c5294
[ "MIT" ]
9
2021-02-13T05:12:27.000Z
2022-03-06T07:20:05.000Z
# # Script to scrape 43877 encoded Xiangqi games from wxf.ca # import scrapy from scrapy.crawler import CrawlerProcess class Xqdb(scrapy.Spider): name = 'xqdb' def start_requests(self): for page in range(41, 43919): yield scrapy.Request( url='http://wxf.ca/xq/xqdb/jgam...
26.407407
81
0.603086
import scrapy from scrapy.crawler import CrawlerProcess class Xqdb(scrapy.Spider): name = 'xqdb' def start_requests(self): for page in range(41, 43919): yield scrapy.Request( url='http://wxf.ca/xq/xqdb/jgame_Dhtml.php?lan=&id=' + str(page), callback=sel...
true
true
f7552618123c936d0ea869e66b2e1870e3b14386
9,998
py
Python
foxylib/tools/cache/cache_tool.py
foxytrixy-com/foxylib
94b8c5b9f8b12423393c68f7d9f910258840ed18
[ "BSD-3-Clause" ]
null
null
null
foxylib/tools/cache/cache_tool.py
foxytrixy-com/foxylib
94b8c5b9f8b12423393c68f7d9f910258840ed18
[ "BSD-3-Clause" ]
null
null
null
foxylib/tools/cache/cache_tool.py
foxytrixy-com/foxylib
94b8c5b9f8b12423393c68f7d9f910258840ed18
[ "BSD-3-Clause" ]
null
null
null
import logging from dataclasses import field from functools import wraps, lru_cache import cachetools import dill import six from cachetools import Cache from frozendict import frozendict from future.utils import lmap from nose.tools import assert_is_not_none, assert_equal, assert_true from foxylib.tools.collections....
30.389058
116
0.587918
import logging from dataclasses import field from functools import wraps, lru_cache import cachetools import dill import six from cachetools import Cache from frozendict import frozendict from future.utils import lmap from nose.tools import assert_is_not_none, assert_equal, assert_true from foxylib.tools.collections....
true
true
f755272da435791173832e2c7d6accb7a6b7ae07
327
py
Python
pattern/object_factory.py
FurfurV/DistributedSystems
fcf8aa6520b87dce2fd4cb96b4bd501ca56e6068
[ "MIT" ]
null
null
null
pattern/object_factory.py
FurfurV/DistributedSystems
fcf8aa6520b87dce2fd4cb96b4bd501ca56e6068
[ "MIT" ]
null
null
null
pattern/object_factory.py
FurfurV/DistributedSystems
fcf8aa6520b87dce2fd4cb96b4bd501ca56e6068
[ "MIT" ]
null
null
null
class ObjectFactory: def __init__(self): self._builders={} def register_builder(self, key , builder): self._builders[key] = builder def create(self, key, **kwargs): builder = self._builders.get(key) if not builder: raise ValueError(key) return builder(**...
27.25
46
0.608563
class ObjectFactory: def __init__(self): self._builders={} def register_builder(self, key , builder): self._builders[key] = builder def create(self, key, **kwargs): builder = self._builders.get(key) if not builder: raise ValueError(key) return builder(**...
true
true
f7552733e67cd303b792bd7edb19e00c5ff71dbd
135
py
Python
authserver/utilities/errors.py
brighthive/authserver
848201324761269bc96b75ad9cb5242e2a6ee5a5
[ "MIT" ]
3
2019-07-31T16:10:26.000Z
2021-05-14T20:06:07.000Z
authserver/utilities/errors.py
brighthive/authserver
848201324761269bc96b75ad9cb5242e2a6ee5a5
[ "MIT" ]
25
2019-08-20T20:19:59.000Z
2021-05-14T19:06:41.000Z
authserver/utilities/errors.py
brighthive/authserver
848201324761269bc96b75ad9cb5242e2a6ee5a5
[ "MIT" ]
1
2020-04-29T18:18:21.000Z
2020-04-29T18:18:21.000Z
class RecordNotFoundError(Exception): def __init__(self, record_id): super().__init__() self.record_id = record_id
27
37
0.681481
class RecordNotFoundError(Exception): def __init__(self, record_id): super().__init__() self.record_id = record_id
true
true
f75527549420d03676cc13c3f4816467741776d0
2,005
py
Python
grafana_dashboards/schema/panel/table.py
marian-dub/grafyaml
d37aae319a3001238d18d7653e5c4f103682264e
[ "Apache-2.0" ]
null
null
null
grafana_dashboards/schema/panel/table.py
marian-dub/grafyaml
d37aae319a3001238d18d7653e5c4f103682264e
[ "Apache-2.0" ]
null
null
null
grafana_dashboards/schema/panel/table.py
marian-dub/grafyaml
d37aae319a3001238d18d7653e5c4f103682264e
[ "Apache-2.0" ]
1
2021-04-09T10:18:15.000Z
2021-04-09T10:18:15.000Z
# Copyright 2015 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
36.454545
75
0.584539
import voluptuous as v from grafana_dashboards.schema.panel.base import Base class Table(Base): def get_schema(self): style = { v.Optional("alias"): v.All(str), v.Optional("align"): v.All(str), v.Required("colors", default=[]): v.All(list), v.Optional("dat...
true
true
f7552755522ec18511965e45f6dafb7d6354799e
20,444
py
Python
insights/specs/insights_archive.py
haithcockce/insights-core
b2e197c6bfc25bcbe2926f07c35a80f2cf8232f5
[ "Apache-2.0" ]
null
null
null
insights/specs/insights_archive.py
haithcockce/insights-core
b2e197c6bfc25bcbe2926f07c35a80f2cf8232f5
[ "Apache-2.0" ]
null
null
null
insights/specs/insights_archive.py
haithcockce/insights-core
b2e197c6bfc25bcbe2926f07c35a80f2cf8232f5
[ "Apache-2.0" ]
null
null
null
from insights.core.spec_factory import glob_file, simple_file, head, first_file from functools import partial from insights.core.context import HostArchiveContext from insights.specs import Specs simple_file = partial(simple_file, context=HostArchiveContext) glob_file = partial(glob_file, context=HostArchiveContext) f...
80.806324
342
0.807474
from insights.core.spec_factory import glob_file, simple_file, head, first_file from functools import partial from insights.core.context import HostArchiveContext from insights.specs import Specs simple_file = partial(simple_file, context=HostArchiveContext) glob_file = partial(glob_file, context=HostArchiveContext) f...
true
true
f755277368951122ed4aa69d86c5d44b03959990
8,614
py
Python
eth/validation.py
davesque/py-evm
d2ccc1e8a9be1cb92cb15a8bb117bb6a1972636e
[ "MIT" ]
null
null
null
eth/validation.py
davesque/py-evm
d2ccc1e8a9be1cb92cb15a8bb117bb6a1972636e
[ "MIT" ]
null
null
null
eth/validation.py
davesque/py-evm
d2ccc1e8a9be1cb92cb15a8bb117bb6a1972636e
[ "MIT" ]
null
null
null
import functools from typing import ( Any, Dict, Iterable, Sequence, Tuple, Type, Union, ) from eth_typing import ( Address, Hash32, ) from eth_utils import ( ValidationError, ) from eth_utils.toolz import dicttoolz from eth_utils.toolz import functoolz from eth_utils.toolz ...
29.806228
96
0.59589
import functools from typing import ( Any, Dict, Iterable, Sequence, Tuple, Type, Union, ) from eth_typing import ( Address, Hash32, ) from eth_utils import ( ValidationError, ) from eth_utils.toolz import dicttoolz from eth_utils.toolz import functoolz from eth_utils.toolz ...
true
true
f7552795b727ff23482fa68a2ce214af22fbac6f
860
py
Python
tests/data/dependencies_skill/__init__.py
valory-xyz/agents-aea
8f38efa96041b0156ed1ae328178e395dbabf2fc
[ "Apache-2.0" ]
126
2019-09-07T09:32:44.000Z
2022-03-29T14:28:41.000Z
tests/data/dependencies_skill/__init__.py
valory-xyz/agents-aea
8f38efa96041b0156ed1ae328178e395dbabf2fc
[ "Apache-2.0" ]
1,814
2019-08-24T10:08:07.000Z
2022-03-31T14:28:36.000Z
tests/data/dependencies_skill/__init__.py
valory-xyz/agents-aea
8f38efa96041b0156ed1ae328178e395dbabf2fc
[ "Apache-2.0" ]
46
2019-09-03T22:13:58.000Z
2022-03-22T01:25:16.000Z
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI Limited # # 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 ...
40.952381
80
0.587209
true
true
f75529600b56bea21ac31f450b7ba36c9ef98a6f
1,884
py
Python
socket_multicast_sender.py
pressol/audio_streamer
7b4507e52e036062455c087e0fef03f8ab0c83a1
[ "MIT" ]
2
2020-02-21T12:15:19.000Z
2020-02-22T09:12:53.000Z
socket_multicast_sender.py
pressol/audio_streamer
7b4507e52e036062455c087e0fef03f8ab0c83a1
[ "MIT" ]
2
2020-05-17T22:00:21.000Z
2021-09-29T05:55:48.000Z
socket_multicast_sender.py
pressol/audio_streamer
7b4507e52e036062455c087e0fef03f8ab0c83a1
[ "MIT" ]
1
2020-05-17T21:59:53.000Z
2020-05-17T21:59:53.000Z
#socket_multicast_sender.py import socket import struct import sys import zlib import pyaudio message = b'very important data' multicast_group = ('224.3.29.71', 10000) # Create the datagram socket sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # Set a timeout so the socket does not block # ind...
26.914286
76
0.536093
import socket import struct import sys import zlib import pyaudio message = b'very important data' multicast_group = ('224.3.29.71', 10000) sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.settimeout(0.2) ttl = struct.pack('b', 1) sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL,...
true
true
f7552a5c8463043fa820ce8c7f0ef0a1a015f1c1
1,118
py
Python
lab12/heap_hack/exp.py
leitianjian/CS323-Compilers
0e4c2ef973dbdef866a6dba6671ade150189e884
[ "MIT" ]
33
2020-09-08T10:44:46.000Z
2021-01-14T05:27:59.000Z
lab12/heap_hack/exp.py
leitianjian/CS323-Compilers
0e4c2ef973dbdef866a6dba6671ade150189e884
[ "MIT" ]
7
2020-09-09T05:24:03.000Z
2020-12-05T04:41:30.000Z
lab12/heap_hack/exp.py
leitianjian/CS323-Compilers
0e4c2ef973dbdef866a6dba6671ade150189e884
[ "MIT" ]
29
2020-09-08T11:09:59.000Z
2020-10-26T06:58:01.000Z
from pwn import * # context.terminal = ['tmux', 'split', '-h'] # context.log_level = 'debug' p = process('./hack') # p = remote('127.0.0.1', 23455) def addi(size, content): p.sendlineafter('choice>', '1') p.sendlineafter('size>', str(size)) p.sendlineafter('content>', content) def deli(index): p.sen...
23.787234
59
0.647585
from pwn import * p = process('./hack') def addi(size, content): p.sendlineafter('choice>', '1') p.sendlineafter('size>', str(size)) p.sendlineafter('content>', content) def deli(index): p.sendlineafter('choice>', '2') p.sendlineafter('index>', str(index)) def modi(index, content): p.sendli...
true
true
f7552b21948249bc4a17093ee31424279b0be5cc
39,346
py
Python
endpoints/openapi_generator.py
twanwv/endpoints-python
545cfb0c8f24f0e9c20481fc98d2bf891a62d522
[ "Apache-2.0" ]
58
2016-09-01T16:40:33.000Z
2020-12-13T14:54:19.000Z
endpoints/openapi_generator.py
twanwv/endpoints-python
545cfb0c8f24f0e9c20481fc98d2bf891a62d522
[ "Apache-2.0" ]
148
2016-09-02T19:03:40.000Z
2021-03-25T21:56:24.000Z
endpoints/openapi_generator.py
twanwv/endpoints-python
545cfb0c8f24f0e9c20481fc98d2bf891a62d522
[ "Apache-2.0" ]
23
2016-09-01T22:06:40.000Z
2022-03-19T14:24:51.000Z
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
36.635009
106
0.677604
from __future__ import absolute_import import hashlib import json import logging import re from . import api_exceptions from . import message_parser from . import message_types from . import messages from . import remote from . import resource_container from . import util _logger = logging.getLogger(__name__) _PAT...
true
true
f7552bbfec29bc4266b24afb5841e8a2c68c8075
633
py
Python
socialNetwork/manage.py
VictorNS69/blockchainProject
937277c887ab079dc88dfde54f08b596ea5ad1c1
[ "MIT" ]
null
null
null
socialNetwork/manage.py
VictorNS69/blockchainProject
937277c887ab079dc88dfde54f08b596ea5ad1c1
[ "MIT" ]
20
2020-05-01T18:36:04.000Z
2021-09-22T18:57:29.000Z
socialNetwork/manage.py
VictorNS69/blockchainProject
937277c887ab079dc88dfde54f08b596ea5ad1c1
[ "MIT" ]
1
2020-05-01T19:26:10.000Z
2020-05-01T19:26:10.000Z
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'socialNetwork.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ...
28.772727
77
0.685624
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'socialNetwork.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " ...
true
true