hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7fd1105fe7302b867a2ec3c45f21c0dc13f8525
45,223
py
Python
mysql-dst/mysql-cluster/libevent/event_rpcgen.py
SJTU-IPADS/dst
897b929a692642cbf295c105d9d6e64090abb673
[ "Apache-2.0" ]
9
2020-12-17T01:59:13.000Z
2022-03-30T16:25:08.000Z
mysql-dst/mysql-cluster/libevent/event_rpcgen.py
SJTU-IPADS/dst
897b929a692642cbf295c105d9d6e64090abb673
[ "Apache-2.0" ]
1
2021-07-30T12:06:33.000Z
2021-07-31T10:16:09.000Z
mysql-dst/mysql-cluster/libevent/event_rpcgen.py
SJTU-IPADS/dst
897b929a692642cbf295c105d9d6e64090abb673
[ "Apache-2.0" ]
1
2021-08-01T13:47:07.000Z
2021-08-01T13:47:07.000Z
#!/usr/bin/env python # # Copyright (c) 2005 Niels Provos <provos@citi.umich.edu> # All rights reserved. # # Generates marshaling code based on libevent. import sys import re # _NAME = "event_rpcgen.py" _VERSION = "0.1" _STRUCT_RE = '[a-z][a-z_0-9]*' # Globals line_count = 0 white = re.compile(r'^\s+') cppcomment =...
31.892102
79
0.481105
import sys import re _NAME = "event_rpcgen.py" _VERSION = "0.1" _STRUCT_RE = '[a-z][a-z_0-9]*' line_count = 0 white = re.compile(r'^\s+') cppcomment = re.compile(r'\/\/.*$') headerdirect = [] cppdirect = [] class Struct: def __init__(self, name): self._name = name self._entries = [] ...
true
true
f7fd1297806e29b2d84c56a985e31e25414f44c9
748
py
Python
resources/textures/get_texture.py
liaojh1998/cross-modal-concept2robot
2a00937eb2ac02cbe3d5d5fa0f5868e85d194f6e
[ "MIT" ]
4
2021-08-04T08:14:36.000Z
2022-03-14T05:59:46.000Z
resources/textures/get_texture.py
liaojh1998/cross-modal-concept2robot
2a00937eb2ac02cbe3d5d5fa0f5868e85d194f6e
[ "MIT" ]
null
null
null
resources/textures/get_texture.py
liaojh1998/cross-modal-concept2robot
2a00937eb2ac02cbe3d5d5fa0f5868e85d194f6e
[ "MIT" ]
2
2021-08-28T13:19:31.000Z
2021-09-17T17:48:41.000Z
import cv2 import glob sun_data_path = '/scr1/workspace/dataset/sun/SUN2012/Images' def resize(filename='bg3.png',output_name=None): W = 256. oriimg = cv2.imread(filename) height, width, depth = oriimg.shape imgScale = W/width newX,newY = oriimg.shape[1]*imgScale, oriimg.shape[0]*imgScale newi...
31.166667
70
0.643048
import cv2 import glob sun_data_path = '/scr1/workspace/dataset/sun/SUN2012/Images' def resize(filename='bg3.png',output_name=None): W = 256. oriimg = cv2.imread(filename) height, width, depth = oriimg.shape imgScale = W/width newX,newY = oriimg.shape[1]*imgScale, oriimg.shape[0]*imgScale newi...
true
true
f7fd13c735953d3712d598b49e0672939502f80f
8,340
py
Python
src/discovergy/utils.py
a8/discovergy
7766a6eb74e8c3cf9b09dfdac21d79b31f5922e5
[ "MIT" ]
4
2020-03-27T12:41:28.000Z
2020-08-17T17:43:28.000Z
src/discovergy/utils.py
a8/discovergy
7766a6eb74e8c3cf9b09dfdac21d79b31f5922e5
[ "MIT" ]
null
null
null
src/discovergy/utils.py
a8/discovergy
7766a6eb74e8c3cf9b09dfdac21d79b31f5922e5
[ "MIT" ]
1
2020-04-01T22:10:40.000Z
2020-04-01T22:10:40.000Z
# -*- coding: utf-8 -*- """ Discovergy shared helper code """ __author__ = "Frank Becker <fb@alien8.de>" __copyright__ = "Frank Becker" __license__ = "mit" import gzip import json import os import re import sys from contextlib import ContextDecorator from pathlib import Path from timeit import default_timer from t...
32.578125
131
0.606115
__author__ = "Frank Becker <fb@alien8.de>" __copyright__ = "Frank Becker" __license__ = "mit" import gzip import json import os import re import sys from contextlib import ContextDecorator from pathlib import Path from timeit import default_timer from typing import Any, Callable, Dict, List, NamedTuple, Optional, U...
true
true
f7fd14ca425257edfcecad066cdc471c2fb58a9d
2,009
py
Python
lib/surface/datastore/databases/create.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
2
2019-11-10T09:17:07.000Z
2019-12-18T13:44:08.000Z
lib/surface/datastore/databases/create.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
null
null
null
lib/surface/datastore/databases/create.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
1
2020-07-25T01:40:19.000Z
2020-07-25T01:40:19.000Z
# -*- coding: utf-8 -*- # # Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
32.934426
79
0.696864
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from googlecloudsdk.api_lib.util import apis as core_apis from googlecloudsdk.calliope import base from googlecloudsdk.command_lib.firestore import create_util class Create(base.Command): pr...
true
true
f7fd1553194bcf60136927d7be8666c5c7533973
46,142
py
Python
obs-tn/generate_obs-tn_pdf.py
unfoldingWord-dev/tools
7251d64b4750f1615125dab3c09d6d00a9c284b4
[ "MIT" ]
6
2015-07-27T21:50:39.000Z
2020-06-25T14:32:35.000Z
obs-tn/generate_obs-tn_pdf.py
unfoldingWord-dev/tools
7251d64b4750f1615125dab3c09d6d00a9c284b4
[ "MIT" ]
89
2015-06-24T09:35:40.000Z
2022-02-13T14:40:31.000Z
obs-tn/generate_obs-tn_pdf.py
unfoldingWord-dev/tools
7251d64b4750f1615125dab3c09d6d00a9c284b4
[ "MIT" ]
12
2015-07-13T17:31:04.000Z
2021-08-06T06:50:21.000Z
#!/usr/bin/env python2 # -*- coding: utf8 -*- # # Copyright (c) 2019 unfoldingWord # http://creativecommons.org/licenses/MIT/ # See LICENSE file for details. # # Contributors: # Richard Mahn <rich.mahn@unfoldingword.org> """ This script generates the HTML and PDF OBS tN document """ from __future__ import unicode...
48.570526
695
0.531446
from __future__ import unicode_literals, print_function import os import sys import re import logging import argparse import tempfile import markdown2 import shutil import subprocess import json import git from glob import glob from bs4 import BeautifulSoup from ..general_tools.file_utils import write_file, r...
true
true
f7fd1584fa1051d2a90cee0d89bad3976d5ce615
196
py
Python
polyaxon_schemas/ops/tensorboard/__init__.py
orf/polyaxon-schemas
dce55df25ae752fc3fbf465ea53add126746d630
[ "MIT" ]
null
null
null
polyaxon_schemas/ops/tensorboard/__init__.py
orf/polyaxon-schemas
dce55df25ae752fc3fbf465ea53add126746d630
[ "MIT" ]
null
null
null
polyaxon_schemas/ops/tensorboard/__init__.py
orf/polyaxon-schemas
dce55df25ae752fc3fbf465ea53add126746d630
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from polyaxon_schemas.ops.tensorboard.op import ( # noqa TensorboardConfig, TensorboardSchema, )
24.5
64
0.75
from __future__ import absolute_import, division, print_function from polyaxon_schemas.ops.tensorboard.op import ( TensorboardConfig, TensorboardSchema, )
true
true
f7fd16037406f3f8a3401ff842b1c078646b9673
1,545
py
Python
flexget/components/estimate_release/estimators/est_movies_bluray.py
metaMMA/Flexget
a38986422461d7935ead1e2b4ed4c88bcd0a90f5
[ "MIT" ]
null
null
null
flexget/components/estimate_release/estimators/est_movies_bluray.py
metaMMA/Flexget
a38986422461d7935ead1e2b4ed4c88bcd0a90f5
[ "MIT" ]
1
2017-10-09T23:06:44.000Z
2017-10-09T23:06:44.000Z
flexget/components/estimate_release/estimators/est_movies_bluray.py
metaMMA/Flexget
a38986422461d7935ead1e2b4ed4c88bcd0a90f5
[ "MIT" ]
null
null
null
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin import logging import datetime from flexget import plugin from flexget.event import event from flexget.utils.database import Session log = logging.getLogger('est_movies_...
30.294118
94
0.649191
from __future__ import unicode_literals, division, absolute_import from builtins import * import logging import datetime from flexget import plugin from flexget.event import event from flexget.utils.database import Session log = logging.getLogger('est_movies_bluray') class EstimatesMoviesBluray(object): @pl...
true
true
f7fd166abd3a03bac5909e498669b482447435cf
2,178
py
Python
utils/pitch_utils.py
ishine/DiffSinger-1
9a5baf553f635f088ca110aa22e87b67ece6e947
[ "MIT" ]
288
2021-12-19T04:02:00.000Z
2022-03-27T16:13:44.000Z
utils/pitch_utils.py
ishine/DiffSinger-1
9a5baf553f635f088ca110aa22e87b67ece6e947
[ "MIT" ]
44
2021-12-27T07:11:20.000Z
2022-03-29T08:39:41.000Z
utils/pitch_utils.py
ishine/DiffSinger-1
9a5baf553f635f088ca110aa22e87b67ece6e947
[ "MIT" ]
37
2021-12-19T16:51:34.000Z
2022-03-23T09:22:31.000Z
######### # world ########## import librosa import numpy as np import torch gamma = 0 mcepInput = 3 # 0 for dB, 3 for magnitude alpha = 0.45 en_floor = 10 ** (-80 / 20) FFT_SIZE = 2048 f0_bin = 256 f0_max = 1100.0 f0_min = 50.0 f0_mel_min = 1127 * np.log(1 + f0_min / 700) f0_mel_max = 1127 * np.log(1 + f0_max / 700...
28.285714
105
0.588154
a = 0.45 en_floor = 10 ** (-80 / 20) FFT_SIZE = 2048 f0_bin = 256 f0_max = 1100.0 f0_min = 50.0 f0_mel_min = 1127 * np.log(1 + f0_min / 700) f0_mel_max = 1127 * np.log(1 + f0_max / 700) def f0_to_coarse(f0): is_torch = isinstance(f0, torch.Tensor) f0_mel = 1127 * (1 + f0 / 700).log() if is_torch else 1127 *...
true
true
f7fd16dd60e1619229bafbdfdda9f2ae7ffee305
2,734
py
Python
docs/source/user_guide/get_started/examples/pwimmigrant_short_example.py
ramirezfranciscof/aiida-quantumespresso
cb32be5361afa05bad617f00f8b187c96eb365ec
[ "MIT" ]
40
2017-09-25T20:22:43.000Z
2022-02-21T02:53:41.000Z
docs/source/user_guide/get_started/examples/pwimmigrant_short_example.py
ramirezfranciscof/aiida-quantumespresso
cb32be5361afa05bad617f00f8b187c96eb365ec
[ "MIT" ]
594
2017-08-08T17:28:52.000Z
2022-03-28T13:38:10.000Z
docs/source/user_guide/get_started/examples/pwimmigrant_short_example.py
ramirezfranciscof/aiida-quantumespresso
cb32be5361afa05bad617f00f8b187c96eb365ec
[ "MIT" ]
66
2017-08-08T16:58:56.000Z
2022-03-17T10:18:43.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
38.507042
82
0.688369
true
true
f7fd173e432d712db1bdcd59c7e0717652c20284
1,951
py
Python
Python/flask/pr1/main.py
honchardev/Fun
ca7c0076e9bb3017c5d7e89aa7d5bd54a83c8ecc
[ "MIT" ]
null
null
null
Python/flask/pr1/main.py
honchardev/Fun
ca7c0076e9bb3017c5d7e89aa7d5bd54a83c8ecc
[ "MIT" ]
3
2020-03-24T16:26:35.000Z
2020-04-15T19:40:41.000Z
Python/flask/pr1/main.py
honchardev/Fun
ca7c0076e9bb3017c5d7e89aa7d5bd54a83c8ecc
[ "MIT" ]
null
null
null
from flask import Flask # flask server from flask import request # how the user requested a resource from flask import render_template # to use templates/layouts app = Flask(__name__) # Something i can do in templates: # {{ var_name }} # {% """kind of python code on flask""" %} # [@] signifies a decorator - way...
27.871429
80
0.686827
from flask import Flask from flask import request from flask import render_template app = Flask(__name__) @app.route('/') def index(): return 'This is the homepage' @app.route('/about') def about(): return 'This is the about page.<br />brrr' @app.route('/profile/<username>') def profile(usern...
true
true
f7fd1811f21054458022c1c6a7013d152120b8ac
27,372
py
Python
deepchem/nn/model_ops.py
hssinejihene/deepchem-1.1.0
6efbe6b638b77bb2685ac617f4d6649755c01335
[ "MIT" ]
null
null
null
deepchem/nn/model_ops.py
hssinejihene/deepchem-1.1.0
6efbe6b638b77bb2685ac617f4d6649755c01335
[ "MIT" ]
null
null
null
deepchem/nn/model_ops.py
hssinejihene/deepchem-1.1.0
6efbe6b638b77bb2685ac617f4d6649755c01335
[ "MIT" ]
null
null
null
"""Ops for graph construction. Large amounts of code borrowed from Keras. Will try to incorporate into DeepChem properly. """ from __future__ import print_function from __future__ import division from __future__ import unicode_literals import os import sys import traceback import numpy as np import tensorflow as tf f...
27.648485
80
0.666192
from __future__ import print_function from __future__ import division from __future__ import unicode_literals import os import sys import traceback import numpy as np import tensorflow as tf from tensorflow.python.training import moving_averages from collections import defaultdict py_all = all _UID_PREFIXES = defau...
true
true
f7fd182a41dd01b7734166c0b90a9b2327e95a01
896
py
Python
235-lowest-common-ancestor-of-a-binary-search-tree/235-lowest-common-ancestor-of-a-binary-search-tree.py
jurayev/data-structures-algorithms-solutions
7103294bafb60117fc77efe4913edcffbeb1ac7a
[ "MIT" ]
null
null
null
235-lowest-common-ancestor-of-a-binary-search-tree/235-lowest-common-ancestor-of-a-binary-search-tree.py
jurayev/data-structures-algorithms-solutions
7103294bafb60117fc77efe4913edcffbeb1ac7a
[ "MIT" ]
null
null
null
235-lowest-common-ancestor-of-a-binary-search-tree/235-lowest-common-ancestor-of-a-binary-search-tree.py
jurayev/data-structures-algorithms-solutions
7103294bafb60117fc77efe4913edcffbeb1ac7a
[ "MIT" ]
null
null
null
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def lowestCommonAncestor(self, root: 'TreeNode', p: 'TreeNode', q: 'TreeNode') -> 'TreeNode': """ Time Complexity: ...
29.866667
97
0.530134
class Solution: def lowestCommonAncestor(self, root: 'TreeNode', p: 'TreeNode', q: 'TreeNode') -> 'TreeNode': return self.search(root, p.val, q.val) def search(self, root, min_val, max_val): if not root: return None if min_val < root.val and max_val < root.val: ...
true
true
f7fd18c02af864706e31f178877e39b514fb78cc
5,166
py
Python
dns_check/check.py
chadharvey/integrations-core
7f97b3f1b10f37c01cd598640145444072cd7aec
[ "BSD-3-Clause" ]
1
2021-06-17T20:22:35.000Z
2021-06-17T20:22:35.000Z
dns_check/check.py
chadharvey/integrations-core
7f97b3f1b10f37c01cd598640145444072cd7aec
[ "BSD-3-Clause" ]
null
null
null
dns_check/check.py
chadharvey/integrations-core
7f97b3f1b10f37c01cd598640145444072cd7aec
[ "BSD-3-Clause" ]
1
2020-02-12T02:15:27.000Z
2020-02-12T02:15:27.000Z
# (C) Datadog, Inc. 2010-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # stdlib import time # 3p import dns.resolver # project from utils.platform import Platform from checks.network_checks import NetworkCheck, Status # These imports are necessary because otherwise dynamic type # ...
36.638298
103
0.61595
import time import dns.resolver from utils.platform import Platform from checks.network_checks import NetworkCheck, Status if Platform.is_win32(): from dns.rdtypes.ANY import * from dns.rdtypes.IN import * time_func = time.clock else: time_func = time.time class BadConf...
true
true
f7fd18cf61a2824d85c7b91dde34e6e46449ba95
14,289
py
Python
Hyperparameters.py
thiagofigcosta/stock-pred-v2
a2905a2aaf87f083772c9c416aa755f7cf604319
[ "MIT" ]
null
null
null
Hyperparameters.py
thiagofigcosta/stock-pred-v2
a2905a2aaf87f083772c9c416aa755f7cf604319
[ "MIT" ]
null
null
null
Hyperparameters.py
thiagofigcosta/stock-pred-v2
a2905a2aaf87f083772c9c416aa755f7cf604319
[ "MIT" ]
null
null
null
#!/bin/python3 # -*- coding: utf-8 -*- import hashlib import math import json from Enums import Features from Utils import Utils class Hyperparameters: REGRESSION_OUTPUT_ACTIVATION_FUNCTION='linear' BINARY_OUTPUT_ACTIVATION_FUNCTION='sigmoid' def __init__(self,name='',input_features=['Close'],outpu...
62.39738
1,146
0.78284
import hashlib import math import json from Enums import Features from Utils import Utils class Hyperparameters: REGRESSION_OUTPUT_ACTIVATION_FUNCTION='linear' BINARY_OUTPUT_ACTIVATION_FUNCTION='sigmoid' def __init__(self,name='',input_features=['Close'],output_feature='Close',index_feature='Date',...
true
true
f7fd1a7c74e897ac68aa7ba5df6d5a96e7686531
5,979
py
Python
backbones/aggregator/ECAPA-TDNN.py
gzhu06/TDspkr-mismatch-study
1106a988e15a111646981c5b6fb30219d1ff6e8a
[ "MIT" ]
3
2021-11-13T15:45:22.000Z
2022-01-18T00:48:45.000Z
backbones/aggregator/ECAPA-TDNN.py
gzhu06/TDspkr-mismatch-study
1106a988e15a111646981c5b6fb30219d1ff6e8a
[ "MIT" ]
null
null
null
backbones/aggregator/ECAPA-TDNN.py
gzhu06/TDspkr-mismatch-study
1106a988e15a111646981c5b6fb30219d1ff6e8a
[ "MIT" ]
null
null
null
''' Reference: https://github.com/lawlict/ECAPA-TDNN ''' import torch import torch.nn as nn import torch.nn.functional as F ''' Res2Conv1d + BatchNorm1d + ReLU ''' class Res2Conv1dReluBn(nn.Module): ''' in_channels == out_channels == channels ''' def __init__(self, channels, kernel_size=1, stride=1, p...
38.574194
115
0.627362
import torch import torch.nn as nn import torch.nn.functional as F class Res2Conv1dReluBn(nn.Module): def __init__(self, channels, kernel_size=1, stride=1, padding=0, dilation=1, bias=False, scale=4): super().__init__() assert channels % scale == 0, "{} % {} != 0".format(channels, scale) s...
true
true
f7fd1b5bd5d34adf7d563ce08d8f4122fc67dbfc
9,413
py
Python
electrum/gui/qt/request_list.py
AvianNetwork/electrum
36c99526a0caed5fadf49db25db94717f96e39c0
[ "MIT" ]
1
2022-02-21T03:17:41.000Z
2022-02-21T03:17:41.000Z
electrum/gui/qt/request_list.py
AvianNetwork/electrum
36c99526a0caed5fadf49db25db94717f96e39c0
[ "MIT" ]
null
null
null
electrum/gui/qt/request_list.py
AvianNetwork/electrum
36c99526a0caed5fadf49db25db94717f96e39c0
[ "MIT" ]
1
2022-02-28T19:42:24.000Z
2022-02-28T19:42:24.000Z
#!/usr/bin/env python # # Electrum - lightweight Avian client # Copyright (C) 2015 Thomas Voegtlin # # 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 l...
42.786364
121
0.651652
from enum import IntEnum from typing import Optional, TYPE_CHECKING from PyQt5.QtGui import QStandardItemModel, QStandardItem from PyQt5.QtWidgets import QMenu, QAbstractItemView from PyQt5.QtCore import Qt, QItemSelectionModel, QModelIndex from electrum.i18n import _ from electrum.util impor...
true
true
f7fd1be48c1602a7c146c512000616d3ecceb815
603
py
Python
main.py
akiraak/gae-twitter-bot
420a752f3013ab42edccf7014df729f6e26c5bad
[ "MIT" ]
1
2016-08-09T21:33:01.000Z
2016-08-09T21:33:01.000Z
main.py
akiraak/gae-twitter-bot
420a752f3013ab42edccf7014df729f6e26c5bad
[ "MIT" ]
null
null
null
main.py
akiraak/gae-twitter-bot
420a752f3013ab42edccf7014df729f6e26c5bad
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from google.appengine.ext import webapp from google.appengine.ext.webapp import util import wsgiref.handlers from google.appengine.ext.webapp import template import handler def create_app(debug=True): return webapp.WSGIApplication( [ ('/'...
24.12
69
0.669983
import os from google.appengine.ext import webapp from google.appengine.ext.webapp import util import wsgiref.handlers from google.appengine.ext.webapp import template import handler def create_app(debug=True): return webapp.WSGIApplication( [ ('/', handler.TopHandler), ('/jobs_l...
true
true
f7fd1c3f2cfb7cf338795157041178d144e1a5e6
60,752
py
Python
matplotlib/collections.py
Solid-Mechanics/matplotlib-4-abaqus
1117070fb824210c217c564ac36e69112ce70501
[ "MIT" ]
35
2015-10-23T08:15:36.000Z
2022-02-03T10:17:15.000Z
site-packages/matplotlib-1.3.1/lib/matplotlib/collections.py
Nuevalgo/Feedbot
96bdd150fcd92fa155dfc7b13d930bab394e8e47
[ "BSD-3-Clause" ]
3
2015-09-17T16:27:45.000Z
2018-07-31T05:59:33.000Z
site-packages/matplotlib-1.3.1/lib/matplotlib/collections.py
Nuevalgo/Feedbot
96bdd150fcd92fa155dfc7b13d930bab394e8e47
[ "BSD-3-Clause" ]
25
2016-01-18T12:19:11.000Z
2021-12-11T15:45:17.000Z
""" Classes for the efficient drawing of large collections of objects that share most properties, e.g., a large number of line segments or polygons. The classes are not meant to be as flexible as their single element counterparts (e.g., you may not be able to select all line styles) but they are meant to be fast for c...
34.207207
87
0.580491
from __future__ import print_function import warnings import numpy as np import numpy.ma as ma import matplotlib as mpl import matplotlib.cbook as cbook import matplotlib.colors as mcolors import matplotlib.cm as cm from matplotlib import docstring import matplotlib.transforms as transforms import matplotlib.artist as ...
true
true
f7fd1ca7748dff860ba120b996166cf102457bfa
72,663
py
Python
sympy/sets/sets.py
SirAbhi13/sympy
5868aa1cc649f048cdbddd0082be67f2b65f0d95
[ "BSD-3-Clause" ]
null
null
null
sympy/sets/sets.py
SirAbhi13/sympy
5868aa1cc649f048cdbddd0082be67f2b65f0d95
[ "BSD-3-Clause" ]
null
null
null
sympy/sets/sets.py
SirAbhi13/sympy
5868aa1cc649f048cdbddd0082be67f2b65f0d95
[ "BSD-3-Clause" ]
null
null
null
from typing import Optional from functools import reduce from collections import defaultdict import inspect from sympy.core.basic import Basic from sympy.core.compatibility import ordered from sympy.core.containers import Tuple from sympy.core.decorators import (deprecated, sympify_method_args, sympify_return) fro...
28.709206
90
0.565047
from typing import Optional from functools import reduce from collections import defaultdict import inspect from sympy.core.basic import Basic from sympy.core.compatibility import ordered from sympy.core.containers import Tuple from sympy.core.decorators import (deprecated, sympify_method_args, sympify_return) fro...
true
true
f7fd1cc145f862634e937327d3fdb3afc0ebd5c5
841
py
Python
main.py
ak64th/weather_record
4724dad297244de6eca20b8944335efe086d2107
[ "Unlicense" ]
null
null
null
main.py
ak64th/weather_record
4724dad297244de6eca20b8944335efe086d2107
[ "Unlicense" ]
null
null
null
main.py
ak64th/weather_record
4724dad297244de6eca20b8944335efe086d2107
[ "Unlicense" ]
null
null
null
# coding=utf-8 import logging from apscheduler.schedulers.blocking import BlockingScheduler from apscheduler.jobstores.sqlalchemy import SQLAlchemyJobStore from apscheduler.executors.pool import ThreadPoolExecutor from pytz import timezone from task import get_weathers from db import db if __name__ == '__main__': ...
32.346154
105
0.768133
import logging from apscheduler.schedulers.blocking import BlockingScheduler from apscheduler.jobstores.sqlalchemy import SQLAlchemyJobStore from apscheduler.executors.pool import ThreadPoolExecutor from pytz import timezone from task import get_weathers from db import db if __name__ == '__main__': logging.basi...
true
true
f7fd1e37f1fb07cbe6b06acddff1f9f7c6fa3e6e
110,531
py
Python
elastalert/alerts.py
archfz/elastalert2
ec6160b77a3d891675e3cea4b3b58ead1a13772e
[ "Apache-2.0" ]
null
null
null
elastalert/alerts.py
archfz/elastalert2
ec6160b77a3d891675e3cea4b3b58ead1a13772e
[ "Apache-2.0" ]
null
null
null
elastalert/alerts.py
archfz/elastalert2
ec6160b77a3d891675e3cea4b3b58ead1a13772e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import copy import datetime import json import os import subprocess import sys import time import uuid import warnings from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart from email.mime.image import MIMEImage from email.utils import formatdate from smtplib import...
44.425643
138
0.607567
import copy import datetime import json import os import subprocess import sys import time import uuid import warnings from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart from email.mime.image import MIMEImage from email.utils import formatdate from smtplib import SMTP from smtplib impo...
true
true
f7fd1f0d60b5e0ffae9f966c2cd4da5f6d436edf
266
py
Python
HW7/AndriiBabii/CW_7.py
kolyasalubov/Lv-677.PythonCore
c9f9107c734a61e398154a90b8a3e249276c2704
[ "MIT" ]
null
null
null
HW7/AndriiBabii/CW_7.py
kolyasalubov/Lv-677.PythonCore
c9f9107c734a61e398154a90b8a3e249276c2704
[ "MIT" ]
null
null
null
HW7/AndriiBabii/CW_7.py
kolyasalubov/Lv-677.PythonCore
c9f9107c734a61e398154a90b8a3e249276c2704
[ "MIT" ]
6
2022-02-22T22:30:49.000Z
2022-03-28T12:51:19.000Z
#https://www.codewars.com/kata/counting-sheep-dot-dot-dot/train/python def count_sheeps(sheep): how_many = 0 for i in range(len(sheep)): if sheep[i] == True: how_many += 1 return how_many #def count_sheeps(sheep): # return sheep.count(True)
24.181818
70
0.672932
def count_sheeps(sheep): how_many = 0 for i in range(len(sheep)): if sheep[i] == True: how_many += 1 return how_many
true
true
f7fd205662587df3005c39c0ec6d73c6eba725f9
15,445
py
Python
tensorflow2/ABC_COVID-19/ABC_IPU.py
waterfallhyb/portfolio-examples
46ff40f593c88979495f0987f857d056f8addaf7
[ "MIT" ]
28
2020-09-26T21:36:32.000Z
2021-07-04T03:40:45.000Z
tensorflow2/ABC_COVID-19/ABC_IPU.py
waterfallhyb/portfolio-examples
46ff40f593c88979495f0987f857d056f8addaf7
[ "MIT" ]
8
2021-12-11T11:08:29.000Z
2022-03-30T10:50:55.000Z
tensorflow2/ABC_COVID-19/ABC_IPU.py
waterfallhyb/portfolio-examples
46ff40f593c88979495f0987f857d056f8addaf7
[ "MIT" ]
5
2021-11-29T07:55:08.000Z
2022-03-21T06:38:51.000Z
# Copyright 2020 Graphcore Ltd. """ ABC algorithm for COVID-19 modelling, replicated across multiple IPUs. See README for model background. """ import numpy as np import os import time as time from tensorflow.python import ipu import tensorflow as tf import tensorflow_probability as tfp import covid_da...
39.70437
88
0.600388
import numpy as np import os import time as time from tensorflow.python import ipu import tensorflow as tf import tensorflow_probability as tfp import covid_data from argparser import get_argparser tfd = tfp.distributions ap = get_argparser() args = ap.parse_args() assert (not args.enqueue_chunk_...
true
true
f7fd20877ed0eb552a777f5f4cbc0df13b888167
27,052
py
Python
azure_rm_deployment.py
lmazuel/azurerm
5fa38ae5b21b0eef8536ec81bafd7f646ba7b560
[ "MIT" ]
3
2017-10-20T14:12:53.000Z
2022-03-30T22:39:04.000Z
azure_rm_deployment.py
lmazuel/azurerm
5fa38ae5b21b0eef8536ec81bafd7f646ba7b560
[ "MIT" ]
null
null
null
azure_rm_deployment.py
lmazuel/azurerm
5fa38ae5b21b0eef8536ec81bafd7f646ba7b560
[ "MIT" ]
4
2017-12-07T12:05:43.000Z
2022-01-28T16:05:39.000Z
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
41.876161
184
0.61123
DOCUMENTATION = ''' --- module: azure_rm_deployment short_description: Create or destroy Azure Resource Manager template deployments version_added: "2.1" description: - "Create or destroy Azure Resource Manager template deployments via the Azure SDK for Python. You can find some quick sta...
true
true
f7fd20ad4b143ab38c36c3a93233672e2e38b92a
10,545
py
Python
datafunctions/datafunctions.py
alexmojaki/datafunctions
54274cce6fbe96f31dacb6fba44ea072b52c75fe
[ "MIT" ]
3
2020-09-23T01:21:13.000Z
2021-05-15T06:06:01.000Z
datafunctions/datafunctions.py
alexmojaki/datafunctions
54274cce6fbe96f31dacb6fba44ea072b52c75fe
[ "MIT" ]
null
null
null
datafunctions/datafunctions.py
alexmojaki/datafunctions
54274cce6fbe96f31dacb6fba44ea072b52c75fe
[ "MIT" ]
null
null
null
import functools import inspect from dataclasses import make_dataclass from functools import lru_cache, partial from typing import get_type_hints, NamedTuple, Type, Callable, Dict, Any, Tuple import marshmallow import marshmallow_dataclass from marshmallow import ValidationError class ArgumentError(Exception): "...
34.6875
118
0.615837
import functools import inspect from dataclasses import make_dataclass from functools import lru_cache, partial from typing import get_type_hints, NamedTuple, Type, Callable, Dict, Any, Tuple import marshmallow import marshmallow_dataclass from marshmallow import ValidationError class ArgumentError(Exception): cla...
true
true
f7fd2117907141c22a4b65c009c99379172b734b
1,201
py
Python
varparam.py
lamhacker/VPL-Compiler
c54850f95342504e962b990c5cac17679e7069a9
[ "Apache-2.0" ]
2
2020-01-28T12:41:09.000Z
2020-04-25T13:31:43.000Z
varparam.py
lamhacker/VPL-Compiler
c54850f95342504e962b990c5cac17679e7069a9
[ "Apache-2.0" ]
null
null
null
varparam.py
lamhacker/VPL-Compiler
c54850f95342504e962b990c5cac17679e7069a9
[ "Apache-2.0" ]
null
null
null
VAR_ASSEM = \ """ # place address of {N}th local variable into {destreg} movq %rdi, {destreg} imulq $4, {destreg}, {destreg} addq $16, {destreg} imulq ${N}, {destreg}, {destreg} subq %rbp, {destreg} negq {destreg} andq $-16, {destreg} """ REGISTERS = ["%rdi", "%rsi", "%rdx", "%rcx", "%r...
25.020833
70
0.625312
VAR_ASSEM = \ """ # place address of {N}th local variable into {destreg} movq %rdi, {destreg} imulq $4, {destreg}, {destreg} addq $16, {destreg} imulq ${N}, {destreg}, {destreg} subq %rbp, {destreg} negq {destreg} andq $-16, {destreg} """ REGISTERS = ["%rdi", "%rsi", "%rdx", "%rcx", "%r...
true
true
f7fd21502e5e69392a637c339298efdbea3621d0
21,887
py
Python
src/rubrix/client/models.py
davidkartchner/rubrix
33faa006d7498a806a9fd594036d4a42c7d70da2
[ "Apache-2.0" ]
1
2022-01-06T09:05:06.000Z
2022-01-06T09:05:06.000Z
src/rubrix/client/models.py
davidkartchner/rubrix
33faa006d7498a806a9fd594036d4a42c7d70da2
[ "Apache-2.0" ]
null
null
null
src/rubrix/client/models.py
davidkartchner/rubrix
33faa006d7498a806a9fd594036d4a42c7d70da2
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2021-present, the Recognai S.L. team. # # 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 ...
39.365108
120
0.602367
import datetime import logging import warnings from collections import defaultdict from typing import Any, Dict, List, Optional, Tuple, Union import pandas as pd from pydantic import BaseModel, Field, PrivateAttr, root_validator, validator from rubrix._constants import MAX_KEYWORD_LENGTH from rubrix.s...
true
true
f7fd21e62231f65c9c5562bb47fe7bdd8fa19e4a
2,803
py
Python
dipy/reconst/tests/test_shore_odf.py
oesteban/dipy
eb6ea58028959f4a507d70160dad770193449d66
[ "BSD-3-Clause" ]
1
2016-09-08T19:23:51.000Z
2016-09-08T19:23:51.000Z
dipy/reconst/tests/test_shore_odf.py
jyeatman/dipy
57f7ec926f914d72f7f2f8feb8ccb51ab827895d
[ "BSD-3-Clause" ]
null
null
null
dipy/reconst/tests/test_shore_odf.py
jyeatman/dipy
57f7ec926f914d72f7f2f8feb8ccb51ab827895d
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from dipy.data import get_sphere, get_3shell_gtab, get_isbi2013_2shell_gtab from dipy.reconst.shore import ShoreModel from dipy.reconst.shm import QballModel, sh_to_sf from dipy.reconst.peaks import gfa, peak_directions from numpy.testing import (assert_equal, assert_...
36.881579
93
0.646093
import numpy as np from dipy.data import get_sphere, get_3shell_gtab, get_isbi2013_2shell_gtab from dipy.reconst.shore import ShoreModel from dipy.reconst.shm import QballModel, sh_to_sf from dipy.reconst.peaks import gfa, peak_directions from numpy.testing import (assert_equal, assert_...
true
true
f7fd22a15c59e52d74f9b7f5868980ef7e90f162
5,428
py
Python
datazen/environment/manifest_cache.py
vkottler/datazen
e493a0427b0686811f8aeb719bae035f999c8a57
[ "MIT" ]
2
2021-02-17T00:16:07.000Z
2022-02-27T00:14:12.000Z
datazen/environment/manifest_cache.py
vkottler/datazen
e493a0427b0686811f8aeb719bae035f999c8a57
[ "MIT" ]
53
2020-11-02T07:10:21.000Z
2022-03-29T09:04:01.000Z
datazen/environment/manifest_cache.py
vkottler/datazen
e493a0427b0686811f8aeb719bae035f999c8a57
[ "MIT" ]
null
null
null
""" datazen - A class for adding caching to the manifest-loading environment. """ # built-in import logging import os from typing import List, Dict # third-party import jinja2 # internal from datazen.environment.manifest import ManifestEnvironment from datazen.paths import get_file_name from datazen import DEFAULT_M...
32.698795
79
0.635409
import logging import os from typing import List, Dict import jinja2 from datazen.environment.manifest import ManifestEnvironment from datazen.paths import get_file_name from datazen import DEFAULT_MANIFEST, CACHE_SUFFIX, ROOT_NAMESPACE from datazen.classes.file_info_cache import FileInfoCache, cmp_total_loaded f...
true
true
f7fd23d56f76c972c0b8db8433831ed654ed5b77
2,414
py
Python
filters_forAllData.py
BonizzoniLab/SVD
95ed967ae385ed0a339030763a07ea7acfa0c1d3
[ "MIT" ]
null
null
null
filters_forAllData.py
BonizzoniLab/SVD
95ed967ae385ed0a339030763a07ea7acfa0c1d3
[ "MIT" ]
null
null
null
filters_forAllData.py
BonizzoniLab/SVD
95ed967ae385ed0a339030763a07ea7acfa0c1d3
[ "MIT" ]
null
null
null
import argparse def txt_reader(txt): ''' read the data set and variants that satisfy the following condition are maintained: [ abs(length(REF) - length(ALT)) >= 6 & [AF_median > 0.3 OR Num_caller > 1 ] & STRBIAS_median < MaxStrandBias ] for INDELs and [AF_median > 0.3 OR Num_caller > 1 ] & STRBIAS_median...
34.985507
267
0.59652
import argparse def txt_reader(txt): ''' read the data set and variants that satisfy the following condition are maintained: [ abs(length(REF) - length(ALT)) >= 6 & [AF_median > 0.3 OR Num_caller > 1 ] & STRBIAS_median < MaxStrandBias ] for INDELs and [AF_median > 0.3 OR Num_caller > 1 ] & STRBIAS_median...
false
true
f7fd242a9b3de8506a17174cb91b570791fd17c8
576
py
Python
tests/test_tokenizer.py
Filter-Bubble/stanza_wrapper
04388869cbbe419132628422663e4c7c987cf1d0
[ "Apache-2.0" ]
null
null
null
tests/test_tokenizer.py
Filter-Bubble/stanza_wrapper
04388869cbbe419132628422663e4c7c987cf1d0
[ "Apache-2.0" ]
null
null
null
tests/test_tokenizer.py
Filter-Bubble/stanza_wrapper
04388869cbbe419132628422663e4c7c987cf1d0
[ "Apache-2.0" ]
null
null
null
import os import io from stanza_wrapper import parse __here__ = os.path.dirname(os.path.realpath(__file__)) txt = b'''Dit is een tekst. Er zijn twee zinnen.''' def assert_equal(val1, val2): assert val1 == val2 def test_tokenize(): my_obj = parse(io.BytesIO(txt)) token_list = list(my_obj.get_tokens()) ...
24
58
0.710069
import os import io from stanza_wrapper import parse __here__ = os.path.dirname(os.path.realpath(__file__)) txt = b'''Dit is een tekst. Er zijn twee zinnen.''' def assert_equal(val1, val2): assert val1 == val2 def test_tokenize(): my_obj = parse(io.BytesIO(txt)) token_list = list(my_obj.get_tokens()) ...
true
true
f7fd24395d39388e023a60068824ac65c82bc271
121
py
Python
Chapter 01/ch1_10.py
bpbpublications/TEST-YOUR-SKILLS-IN-PYTHON-LANGUAGE
f6a4194684515495d00aa38347a725dd08f39a0c
[ "MIT" ]
null
null
null
Chapter 01/ch1_10.py
bpbpublications/TEST-YOUR-SKILLS-IN-PYTHON-LANGUAGE
f6a4194684515495d00aa38347a725dd08f39a0c
[ "MIT" ]
null
null
null
Chapter 01/ch1_10.py
bpbpublications/TEST-YOUR-SKILLS-IN-PYTHON-LANGUAGE
f6a4194684515495d00aa38347a725dd08f39a0c
[ "MIT" ]
null
null
null
int1=float(input('Enter a floating value: ')) # Output: Enter a floating value: # Input from user: [23] print(int1)
24.2
46
0.677686
int1=float(input('Enter a floating value: ')) print(int1)
true
true
f7fd2452519a85cf12ff249f11683c3e7ae5e41e
14,000
py
Python
test/functional/p2p_unrequested_blocks.py
bitcoin-global/bitcoin-global
8f8783245ec209ba1ae4b2c0717f9d8f2d5658ea
[ "MIT" ]
3
2020-09-23T23:55:28.000Z
2021-07-10T03:21:46.000Z
test/functional/p2p_unrequested_blocks.py
Penny-Admixture/bitcoin-global
8f8783245ec209ba1ae4b2c0717f9d8f2d5658ea
[ "MIT" ]
2
2020-07-28T08:55:30.000Z
2021-04-22T10:57:10.000Z
test/functional/p2p_unrequested_blocks.py
Penny-Admixture/bitcoin-global
8f8783245ec209ba1ae4b2c0717f9d8f2d5658ea
[ "MIT" ]
1
2021-06-12T07:04:55.000Z
2021-06-12T07:04:55.000Z
#!/usr/bin/env python3 # Copyright (c) 2015-2019 The Bitcoin Core developers # Copyright (c) 2020 The Bitcoin Global developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test processing of unrequested blocks. Setup: two n...
44.444444
113
0.6825
import time from test_framework.blocktools import create_block, create_coinbase, create_tx_with_script from test_framework.messages import CBlockHeader, CInv, msg_block, msg_headers, msg_inv from test_framework.mininode import mininode_lock, P2PInterface from test_framework.test_framework import BitcoinTestFrame...
true
true
f7fd24a1951d2de758d9ba64113792fa048b8145
5,679
py
Python
tests/ext/django/test_middleware.py
musicinmybrain/aws-xray-sdk-python
b8e59423f1891351ceb1a0bd585603e0cd46c74c
[ "Apache-2.0" ]
294
2017-10-10T19:01:04.000Z
2022-03-18T15:52:19.000Z
tests/ext/django/test_middleware.py
musicinmybrain/aws-xray-sdk-python
b8e59423f1891351ceb1a0bd585603e0cd46c74c
[ "Apache-2.0" ]
285
2017-10-20T09:27:21.000Z
2022-03-29T15:33:45.000Z
tests/ext/django/test_middleware.py
musicinmybrain/aws-xray-sdk-python
b8e59423f1891351ceb1a0bd585603e0cd46c74c
[ "Apache-2.0" ]
134
2017-10-11T13:55:17.000Z
2022-03-23T07:21:17.000Z
import django from aws_xray_sdk import global_sdk_config from django.urls import reverse from django.test import TestCase from aws_xray_sdk.core import xray_recorder, lambda_launcher from aws_xray_sdk.core.context import Context from aws_xray_sdk.core.models import http, facade_segment, segment from aws_xray_sdk.core ...
32.637931
113
0.640606
import django from aws_xray_sdk import global_sdk_config from django.urls import reverse from django.test import TestCase from aws_xray_sdk.core import xray_recorder, lambda_launcher from aws_xray_sdk.core.context import Context from aws_xray_sdk.core.models import http, facade_segment, segment from aws_xray_sdk.core ...
true
true
f7fd252ea0293eea40bd41152d63537bbfb1b687
581
py
Python
api/migrations/0001_initial.py
alaasalman/aussieshopper
ac3584e7d0e7cb62d138f6dc9122f44a3a4d264e
[ "MIT" ]
null
null
null
api/migrations/0001_initial.py
alaasalman/aussieshopper
ac3584e7d0e7cb62d138f6dc9122f44a3a4d264e
[ "MIT" ]
15
2021-06-10T22:37:58.000Z
2022-02-17T04:45:09.000Z
api/migrations/0001_initial.py
alaasalman/aussieshopper
ac3584e7d0e7cb62d138f6dc9122f44a3a4d264e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-01-22 08:51 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='LogCha...
24.208333
114
0.604131
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='LogChatMessages', fields=[ ('id', models.AutoFiel...
true
true
f7fd254d829e3a09d5ec12731748d0207bc0ffa9
2,920
py
Python
cloudkitty/api/app.py
jeffrey4l/cloudkitty
c3eecc835db90d5eaf541cbb342149afae526159
[ "Apache-2.0" ]
1
2015-01-28T22:34:56.000Z
2015-01-28T22:34:56.000Z
cloudkitty/api/app.py
jeffrey4l/cloudkitty
c3eecc835db90d5eaf541cbb342149afae526159
[ "Apache-2.0" ]
null
null
null
cloudkitty/api/app.py
jeffrey4l/cloudkitty
c3eecc835db90d5eaf541cbb342149afae526159
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2014 Objectif Libre # # 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 ...
25.840708
78
0.666438
import os from wsgiref import simple_server from oslo.config import cfg from oslo import messaging from paste import deploy import pecan from cloudkitty.api import config as api_config from cloudkitty.api import hooks from cloudkitty.common import rpc from cloudkitty import config from cloudkitty.o...
true
true
f7fd25cf19ce15f4f313076f86cb90424e186ad0
1,164
py
Python
Python_simple/code.py
surajg163/greyatom-python-for-data-science
a77b3bc8b35a4609f2ce457fda1ef4282ff40698
[ "MIT" ]
null
null
null
Python_simple/code.py
surajg163/greyatom-python-for-data-science
a77b3bc8b35a4609f2ce457fda1ef4282ff40698
[ "MIT" ]
null
null
null
Python_simple/code.py
surajg163/greyatom-python-for-data-science
a77b3bc8b35a4609f2ce457fda1ef4282ff40698
[ "MIT" ]
null
null
null
# -------------- # Code starts here class_1=['Geoffrey Hinton','Andrew Ng','Sebastian Raschka','Yoshua Bengio'] class_2=['Hilary Mason','Carla Gentry','Corinna Cortes'] new_class=class_1+class_2 #Adding new_class.append('Peter Warden') print(new_class) #remove new_class.remove('Carla Gentry') print(new_class) # Code...
18.774194
147
0.698454
class_1=['Geoffrey Hinton','Andrew Ng','Sebastian Raschka','Yoshua Bengio'] class_2=['Hilary Mason','Carla Gentry','Corinna Cortes'] new_class=class_1+class_2 new_class.append('Peter Warden') print(new_class) new_class.remove('Carla Gentry') print(new_class) courses={'Math':65,'English':70,'History':80,'F...
true
true
f7fd26542b16b695e8eb0600a7e4a557eb3759af
517
py
Python
doc/jvsip_book/pyJvsip_examples/example1b.py
rrjudd/jvsip
56a965fff595b027139ff151d27d434f2480b9e8
[ "MIT" ]
10
2016-01-16T04:10:13.000Z
2022-03-22T02:17:44.000Z
doc/jvsip_book/pyJvsip_examples/example1b.py
rrjudd/jvsip
56a965fff595b027139ff151d27d434f2480b9e8
[ "MIT" ]
1
2015-09-11T04:48:03.000Z
2015-09-11T13:44:29.000Z
doc/jvsip_book/pyJvsip_examples/example1b.py
rrjudd/jvsip
56a965fff595b027139ff151d27d434f2480b9e8
[ "MIT" ]
4
2017-06-13T21:48:23.000Z
2020-08-26T15:07:44.000Z
import pyJvsip as pv N=6 A = pv.create('cvview_d',N).randn(7) B = A.empty.fill(5.0) C = A.empty.fill(0.0) print('A = '+A.mstring('%+.2f')) print('B = '+B.mstring('%+.2f')) pv.add(A,B,C) print('C = A+B') print('C = '+C.mstring('%+.2f')) """ OUTPUT A = [+0.16+0.50i -0.21-0.75i -0.56-0.09i \ +1.15+0.45i +0.10+0.43i ...
23.5
42
0.524178
import pyJvsip as pv N=6 A = pv.create('cvview_d',N).randn(7) B = A.empty.fill(5.0) C = A.empty.fill(0.0) print('A = '+A.mstring('%+.2f')) print('B = '+B.mstring('%+.2f')) pv.add(A,B,C) print('C = A+B') print('C = '+C.mstring('%+.2f'))
true
true
f7fd269f7a11b52775e079e6e27637386e7844b8
13,438
py
Python
kedro/extras/datasets/pandas/sql_dataset.py
andmikey/kedro
9b4e4135720609d44ffdf5248246fe805f0b5469
[ "Apache-2.0" ]
null
null
null
kedro/extras/datasets/pandas/sql_dataset.py
andmikey/kedro
9b4e4135720609d44ffdf5248246fe805f0b5469
[ "Apache-2.0" ]
null
null
null
kedro/extras/datasets/pandas/sql_dataset.py
andmikey/kedro
9b4e4135720609d44ffdf5248246fe805f0b5469
[ "Apache-2.0" ]
null
null
null
# Copyright 2018-2019 QuantumBlack Visual Analytics 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 License at # # http://www.apache.org/licenses/LICENSE-2.0 # # THE SOFTWARE IS PROVIDED "AS IS"...
38.614943
99
0.641985
import copy import re from typing import Any, Dict, Optional import pandas as pd from sqlalchemy import create_engine from sqlalchemy.exc import NoSuchModuleError from kedro.io.core import AbstractDataSet, DataSetError __all__ = ["SQLTableDataSet", "SQLQueryDataSet"] KNOWN_PIP_INSTALL = ...
true
true
f7fd26c7750a60cb2c4c1b6ee857bd61d19fca4b
4,044
py
Python
util/test/tests/Vulkan/VK_Spec_Constants.py
songtm/renderdoc
7533c6b7ac7cac7cfab2d1a1ddc011c693202a47
[ "MIT" ]
1
2019-11-14T08:52:26.000Z
2019-11-14T08:52:26.000Z
util/test/tests/Vulkan/VK_Spec_Constants.py
songtm/renderdoc
7533c6b7ac7cac7cfab2d1a1ddc011c693202a47
[ "MIT" ]
null
null
null
util/test/tests/Vulkan/VK_Spec_Constants.py
songtm/renderdoc
7533c6b7ac7cac7cfab2d1a1ddc011c693202a47
[ "MIT" ]
null
null
null
import renderdoc as rd import rdtest class VK_Spec_Constants(rdtest.TestCase): demos_test_name = 'VK_Spec_Constants' def check_capture(self): # find the first draw draw = self.find_draw("Draw") # We should have 4 draws, with spec constant values 0, 1, 2, 3 for num_colors in r...
48.142857
142
0.573442
import renderdoc as rd import rdtest class VK_Spec_Constants(rdtest.TestCase): demos_test_name = 'VK_Spec_Constants' def check_capture(self): draw = self.find_draw("Draw") for num_colors in range(4): self.check(draw is not None) self.controller.SetF...
true
true
f7fd277f580a32bad850ed6a6ba1d434b9a0005b
3,095
py
Python
src/sentry/api/endpoints/sentry_app_interaction.py
pierredup/sentry
0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80
[ "BSD-3-Clause" ]
null
null
null
src/sentry/api/endpoints/sentry_app_interaction.py
pierredup/sentry
0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80
[ "BSD-3-Clause" ]
null
null
null
src/sentry/api/endpoints/sentry_app_interaction.py
pierredup/sentry
0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from rest_framework.response import Response import logging from sentry import tsdb from sentry.api.base import StatsMixin from sentry.api.bases import SentryAppBaseEndpoint, SentryAppStatsPermission logger = logging.getLogger(__name__) TSDB_MODELS = [tsdb.models.sentry_app_v...
34.010989
112
0.615832
from __future__ import absolute_import from rest_framework.response import Response import logging from sentry import tsdb from sentry.api.base import StatsMixin from sentry.api.bases import SentryAppBaseEndpoint, SentryAppStatsPermission logger = logging.getLogger(__name__) TSDB_MODELS = [tsdb.models.sentry_app_v...
true
true
f7fd279aeef51f05dc4d9169a5bc770a85137db0
2,128
py
Python
daemon/pidfile.py
khorark/hostingMonitor
d7d401f164185a0499cfcc1312af809e4a52fb6a
[ "PSF-2.0" ]
15
2019-02-25T09:21:28.000Z
2022-02-13T02:43:36.000Z
daemon/pidfile.py
khorark/hostingMonitor
d7d401f164185a0499cfcc1312af809e4a52fb6a
[ "PSF-2.0" ]
1
2018-07-19T11:17:28.000Z
2018-08-04T05:40:03.000Z
daemon/pidfile.py
khorark/hostingMonitor
d7d401f164185a0499cfcc1312af809e4a52fb6a
[ "PSF-2.0" ]
11
2019-12-26T15:24:35.000Z
2022-03-04T03:26:16.000Z
# -*- coding: utf-8 -*- # daemon/pidfile.py # Part of ‘python-daemon’, an implementation of PEP 3143. # # Copyright © 2008–2016 Ben Finney <ben+python@benfinney.id.au> # # This is free software: you may copy, modify, and/or distribute this work # under the terms of the Apache License, version 2.0 as published by the #...
31.294118
77
0.646617
from __future__ import (absolute_import, unicode_literals) from lockfile.pidlockfile import PIDLockFile class TimeoutPIDLockFile(PIDLockFile, object): def __init__(self, path, acquire_timeout=None, *args, **kwargs): self.acquire_timeout = acquire_timeout super(TimeoutPIDLockFile, s...
true
true
f7fd27a12c8b0532d73202e650be75a041b17fe9
26,342
py
Python
sdk/python/pulumi_azure_native/containerregistry/v20191201preview/registry.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/containerregistry/v20191201preview/registry.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/containerregistry/v20191201preview/registry.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "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...
46.955437
1,346
0.667451
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs from ._enums import * from ._inputs import * __all__ = ['RegistryArgs', 'Registry'] @pulumi.input_type class RegistryArgs: def __init__(__se...
true
true
f7fd2823411e2855af0b3f2564fa84386d9e3031
6,105
py
Python
tensornetwork/contractors/opt_einsum_paths/path_contractors_node_test.py
jensenjhwang/TensorNetwork
35d1247cc3fb80768965f7429ac9b8b914a144a8
[ "Apache-2.0" ]
1
2020-02-17T00:12:30.000Z
2020-02-17T00:12:30.000Z
tensornetwork/contractors/opt_einsum_paths/path_contractors_node_test.py
jensenjhwang/TensorNetwork
35d1247cc3fb80768965f7429ac9b8b914a144a8
[ "Apache-2.0" ]
null
null
null
tensornetwork/contractors/opt_einsum_paths/path_contractors_node_test.py
jensenjhwang/TensorNetwork
35d1247cc3fb80768965f7429ac9b8b914a144a8
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 The TensorNetwork Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
30.373134
75
0.656839
import numpy as np import pytest from tensornetwork import Node from tensornetwork.contractors import auto from tensornetwork.contractors.opt_einsum_paths import path_contractors @pytest.fixture( name="path_algorithm", params=["optimal", "branch", "greedy", "auto"]) def path_algorithm_fixture(reques...
true
true
f7fd28549b3dc76929f0dd90840802ceaab7d1d3
823
py
Python
ckan/migration/versions/019_pkg_relationships_state.py
florianm/ckan
1cfd98d591ac70b4eb81048bcd227b6c1354b1bf
[ "Apache-2.0" ]
12
2015-08-28T16:59:07.000Z
2020-03-08T01:39:30.000Z
ckan/migration/versions/019_pkg_relationships_state.py
florianm/ckan
1cfd98d591ac70b4eb81048bcd227b6c1354b1bf
[ "Apache-2.0" ]
13
2019-05-02T21:01:28.000Z
2020-10-20T23:34:48.000Z
ckan/migration/versions/019_pkg_relationships_state.py
florianm/ckan
1cfd98d591ac70b4eb81048bcd227b6c1354b1bf
[ "Apache-2.0" ]
10
2015-05-08T04:33:20.000Z
2020-03-03T15:17:58.000Z
from sqlalchemy import * from migrate import * import migrate.changeset def upgrade(migrate_engine): metadata = MetaData() metadata.bind = migrate_engine package_relationship_table = Table('package_relationship', metadata, autoload=True) package_relationship_rev...
32.92
80
0.693803
from sqlalchemy import * from migrate import * import migrate.changeset def upgrade(migrate_engine): metadata = MetaData() metadata.bind = migrate_engine package_relationship_table = Table('package_relationship', metadata, autoload=True) package_relationship_rev...
true
true
f7fd2a3c1a5d0bb36005657256cc089cd952fa08
735
gyp
Python
Dependencies/gyp-master/test/prune_targets/test2.gyp
knight666/exlibris
b21b46e0c84e5c4f81f8048022cda88e7bb3dca2
[ "MIT" ]
null
null
null
Dependencies/gyp-master/test/prune_targets/test2.gyp
knight666/exlibris
b21b46e0c84e5c4f81f8048022cda88e7bb3dca2
[ "MIT" ]
null
null
null
Dependencies/gyp-master/test/prune_targets/test2.gyp
knight666/exlibris
b21b46e0c84e5c4f81f8048022cda88e7bb3dca2
[ "MIT" ]
null
null
null
# Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'targets': [ { 'target_name': 'lib1', 'type': 'static_library', 'sources': [ 'lib1.cc' ], 'dependencies': [ 'lib_indirect...
23.709677
73
0.506122
{ 'targets': [ { 'target_name': 'lib1', 'type': 'static_library', 'sources': [ 'lib1.cc' ], 'dependencies': [ 'lib_indirect' ], }, { 'target_name': 'lib2', 'type': 'static_library', 'sources': [ 'lib2.cc' ], 'dependencies': [ 'lib_indirect' ...
true
true
f7fd2c0275ccc8276d5b8a95673b4d0be8343ca6
5,738
py
Python
web/application.py
nancy301513/xmind2testlink
8345b6e157fa025ed019e4053f6d6c9a41636a2d
[ "MIT" ]
null
null
null
web/application.py
nancy301513/xmind2testlink
8345b6e157fa025ed019e4053f6d6c9a41636a2d
[ "MIT" ]
null
null
null
web/application.py
nancy301513/xmind2testlink
8345b6e157fa025ed019e4053f6d6c9a41636a2d
[ "MIT" ]
null
null
null
import os import sqlite3 from contextlib import closing from os.path import join, exists import arrow from flask import Flask, request, send_from_directory, g, render_template, abort, redirect, url_for from werkzeug.utils import secure_filename from xmind2testlink.main import xmind_to_suite, xmind_to_testlink from xm...
26.081818
102
0.645173
import os import sqlite3 from contextlib import closing from os.path import join, exists import arrow from flask import Flask, request, send_from_directory, g, render_template, abort, redirect, url_for from werkzeug.utils import secure_filename from xmind2testlink.main import xmind_to_suite, xmind_to_testlink from xm...
true
true
f7fd2c7b3875406c0082d068d4604f9815d68c42
1,142
py
Python
audio_pouring/pickle/spilt_train_test_data.py
lianghongzhuo/AudioPouring
25daabfb200eaab9f8fc269b8e882260f3bd6c6a
[ "MIT" ]
6
2019-03-25T13:07:41.000Z
2021-01-10T09:53:04.000Z
audio_pouring/pickle/spilt_train_test_data.py
lianghongzhuo/AudioPouring
25daabfb200eaab9f8fc269b8e882260f3bd6c6a
[ "MIT" ]
1
2020-11-19T17:43:57.000Z
2020-11-19T17:43:57.000Z
audio_pouring/pickle/spilt_train_test_data.py
lianghongzhuo/AudioPouring
25daabfb200eaab9f8fc269b8e882260f3bd6c6a
[ "MIT" ]
5
2019-04-24T14:17:12.000Z
2020-01-16T18:29:17.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author : Hongzhuo Liang # E-mail : liang@informatik.uni-hamburg.de # Description: move 20% of file from train to test # Date : 20/03/2019: 1:30 PM # File Name : spilt_train_test_data import glob import os import shutil if __name__ == "__main__": for b...
39.37931
89
0.582312
import glob import os import shutil if __name__ == "__main__": for bottle in [1, 3, 4]: pickle = glob.glob(os.path.join("./pickle_train_" + str(bottle), "*.pickle")) pickle_test = glob.glob(os.path.join("./pickle_test_" + str(bottle), "*.pickle")) pickle_num = len(pickle) pic...
true
true
f7fd2e2956a79e5dd0d74283a55acb2fe021635a
19,799
py
Python
monai/networks/utils.py
yiheng-wang-nv/MONAI
08f9bac8b1bc304ee4d61d32e060eb1c3646da3a
[ "Apache-2.0" ]
3
2020-06-22T20:59:14.000Z
2021-04-09T21:24:45.000Z
monai/networks/utils.py
ericspod/MONAI
885d5b947aeafc1a9bee2899cfd48fff9036e68a
[ "Apache-2.0" ]
null
null
null
monai/networks/utils.py
ericspod/MONAI
885d5b947aeafc1a9bee2899cfd48fff9036e68a
[ "Apache-2.0" ]
1
2020-06-22T19:22:59.000Z
2020-06-22T19:22:59.000Z
# Copyright (c) MONAI Consortium # 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...
39.837022
117
0.662256
import re import warnings from collections import OrderedDict from contextlib import contextmanager from typing import Any, Callable, Dict, Mapping, Optional, Sequence, Union import torch import torch.nn as nn from monai.utils.deprecate_utils import deprecated_arg from monai.utils.misc import ensure_tuple, ...
true
true
f7fd2f5a3f4427884533dedeb7ae9d2ef7ea9094
701
py
Python
multiprocessing/5_concurrent_futures.py
BenedictusAryo/python_threading
8133315ed59b2ad927dfe748f63a1f41dda3d0bc
[ "MIT" ]
1
2021-02-01T10:14:22.000Z
2021-02-01T10:14:22.000Z
multiprocessing/5_concurrent_futures.py
BenedictusAryo/python_threading
8133315ed59b2ad927dfe748f63a1f41dda3d0bc
[ "MIT" ]
null
null
null
multiprocessing/5_concurrent_futures.py
BenedictusAryo/python_threading
8133315ed59b2ad927dfe748f63a1f41dda3d0bc
[ "MIT" ]
null
null
null
# 5 Using concurrent future multiprocessing in python import concurrent.futures import time # Create simple function that sleep in 1 second def do_something(seconds): print(f'Sleeping {seconds} second(s) ..') time.sleep(seconds) return 'Done Sleeping...' if __name__ == '__main__': # Start counting ...
29.208333
62
0.687589
import concurrent.futures import time def do_something(seconds): print(f'Sleeping {seconds} second(s) ..') time.sleep(seconds) return 'Done Sleeping...' if __name__ == '__main__': start = time.perf_counter() with concurrent.futures.ProcessPoolExecutor() as executor: f1 = executor....
true
true
f7fd2fad3cde153bc58452438ae989c197b3f3ef
7,748
py
Python
model/backbone.py
buriedms/MASTER-paddle
e843b5e5d5bee27e2043c31c2d1f67a08ca63694
[ "MIT" ]
null
null
null
model/backbone.py
buriedms/MASTER-paddle
e843b5e5d5bee27e2043c31c2d1f67a08ca63694
[ "MIT" ]
null
null
null
model/backbone.py
buriedms/MASTER-paddle
e843b5e5d5bee27e2043c31c2d1f67a08ca63694
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # @Author: Wenwen Yu # @Created Time: 10/4/2020 14:19 # from torch import nn from model.context_block import MultiAspectGCAttention from paddle import nn from .init import constant_,kaiming_normal_ # CNN for Feature Extraction + Multi-Aspect GCAttention def conv3x3(in_planes, out_planes, str...
32.41841
111
0.5746
from model.context_block import MultiAspectGCAttention from paddle import nn from .init import constant_,kaiming_normal_ def conv3x3(in_planes, out_planes, stride=1): return nn.Conv2D(in_planes, out_planes, kernel_size=3, stride=stride, padding=1, bias_attr=False) def conv1x1(in_planes, out_planes, ...
true
true
f7fd30b57df11b122a0c4608a10476267940c007
9,102
py
Python
models/inverse_warp.py
jytime/Deep-SfM-Revisited
7645c7d524df8c8798ccc1902c1368b4ed59708a
[ "MIT" ]
126
2021-06-17T09:18:30.000Z
2022-03-18T02:53:34.000Z
models/inverse_warp.py
jytime/Deep-SfM-Revisited
7645c7d524df8c8798ccc1902c1368b4ed59708a
[ "MIT" ]
12
2021-06-23T05:34:32.000Z
2022-03-28T12:31:21.000Z
models/inverse_warp.py
jytime/Deep-SfM-Revisited
7645c7d524df8c8798ccc1902c1368b4ed59708a
[ "MIT" ]
9
2021-07-05T01:54:17.000Z
2022-02-10T16:39:24.000Z
from __future__ import division import torch from torch.autograd import Variable import torch.nn.functional as F pixel_coords = None def set_id_grid(depth): global pixel_coords b, h, w = depth.size() i_range = Variable(torch.arange(0, h).view(1, h, 1).expand(1,h,w)).type_as(depth) # [1, H, W] j_rang...
40.096916
136
0.643595
from __future__ import division import torch from torch.autograd import Variable import torch.nn.functional as F pixel_coords = None def set_id_grid(depth): global pixel_coords b, h, w = depth.size() i_range = Variable(torch.arange(0, h).view(1, h, 1).expand(1,h,w)).type_as(depth) j_range = Variabl...
true
true
f7fd31a1e830e497835f0015e1f5d1bbe8212c1b
668
py
Python
hog_descriptor.py
Var-ji/crux-fr-sprint
6a1e3b213d566580f5fecb1f2f83455f6a323310
[ "MIT" ]
2
2019-05-11T17:27:37.000Z
2019-07-25T11:26:59.000Z
hog_descriptor.py
Var-ji/crux-fr-sprint
6a1e3b213d566580f5fecb1f2f83455f6a323310
[ "MIT" ]
null
null
null
hog_descriptor.py
Var-ji/crux-fr-sprint
6a1e3b213d566580f5fecb1f2f83455f6a323310
[ "MIT" ]
null
null
null
import cv2 from skimage import data, exposure from skimage.feature import hog capture = cv2.VideoCapture(0) while True: ret, frame = capture.read() if not ret: continue image = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) (H, h_image) = hog(image, orientations=9, pixels_per_cell=(8, 8), ...
30.363636
89
0.648204
import cv2 from skimage import data, exposure from skimage.feature import hog capture = cv2.VideoCapture(0) while True: ret, frame = capture.read() if not ret: continue image = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) (H, h_image) = hog(image, orientations=9, pixels_per_cell=(8, 8), ...
true
true
f7fd323602444fb4d8bd004aee3525f0e13be23a
634
py
Python
config.py
e2jk/content-type-converter
daaed62191c3dd73cdd6d61e8c6882b0d64e3723
[ "MIT" ]
1
2021-03-17T15:30:17.000Z
2021-03-17T15:30:17.000Z
config.py
e2jk/content-type-converter
daaed62191c3dd73cdd6d61e8c6882b0d64e3723
[ "MIT" ]
9
2020-11-22T17:52:53.000Z
2021-10-18T21:29:54.000Z
config.py
e2jk/content-type-converter
daaed62191c3dd73cdd6d61e8c6882b0d64e3723
[ "MIT" ]
null
null
null
import os class Config(object): SECRET_KEY = os.environ.get("SECRET_KEY") or "you-will-never-guess" PROFILES = { "test_profile": {"base_url": "http://myhttpheader.com/", "aa": 1, "bb": 2}, "second_profile": { "base_url": "https://www.whatismybrowser.com/detect/what-http-headers-is-...
31.7
105
0.537855
import os class Config(object): SECRET_KEY = os.environ.get("SECRET_KEY") or "you-will-never-guess" PROFILES = { "test_profile": {"base_url": "http://myhttpheader.com/", "aa": 1, "bb": 2}, "second_profile": { "base_url": "https://www.whatismybrowser.com/detect/what-http-headers-is-...
true
true
f7fd32a7be3cb621a04f8be68403bf149be7dc06
7,611
py
Python
steamm.py
jesselangdon/steamm
815f0375d9590a5b14e329841c91f95ac51281eb
[ "BSD-2-Clause-FreeBSD" ]
1
2017-10-06T18:10:41.000Z
2017-10-06T18:10:41.000Z
steamm.py
jesselangdon/steamm
815f0375d9590a5b14e329841c91f95ac51281eb
[ "BSD-2-Clause-FreeBSD" ]
2
2016-03-23T16:28:36.000Z
2016-03-23T16:43:00.000Z
steamm.py
jesselangdon/steamm
815f0375d9590a5b14e329841c91f95ac51281eb
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
# -*- coding: utf-8 -*- """ /*************************************************************************** STeAMM A QGIS plugin Stream Temperature Automated Modeler using MODIS ------------------- begin : 2016-09-08 git sha ...
33.676991
128
0.572461
from PyQt4.QtCore import * from PyQt4.QtGui import * import resources from dialog_process import ProcessDialog from dialog_predict import PredictDialog import os import os.path import get_swaths.preprocess as process import predict_temp.predict_temp as predict class STeAMM: def __init__(self, iface): ...
true
true
f7fd330705a8b0de369616649805c50bac97b1e4
237
py
Python
BOJ/17000~17999/17600~17699/17626.py
shinkeonkim/today-ps
f3e5e38c5215f19579bb0422f303a9c18c626afa
[ "Apache-2.0" ]
2
2020-01-29T06:54:41.000Z
2021-11-07T13:23:27.000Z
BOJ/17000~17999/17600~17699/17626.py
shinkeonkim/Today_PS
bb0cda0ee1b9c57e1cfa38355e29d0f1c6167a44
[ "Apache-2.0" ]
null
null
null
BOJ/17000~17999/17600~17699/17626.py
shinkeonkim/Today_PS
bb0cda0ee1b9c57e1cfa38355e29d0f1c6167a44
[ "Apache-2.0" ]
null
null
null
from math import sqrt n = int(input()) L = [i*i for i in range(1,int(sqrt(n))+1)] D = [500000]*100000 for i in L: D[i] = 1 for i in range(1, n+1): for j in L: if D[i+j] > D[i] +1: D[i+j] = D[i]+1 print(D[n])
18.230769
42
0.489451
from math import sqrt n = int(input()) L = [i*i for i in range(1,int(sqrt(n))+1)] D = [500000]*100000 for i in L: D[i] = 1 for i in range(1, n+1): for j in L: if D[i+j] > D[i] +1: D[i+j] = D[i]+1 print(D[n])
true
true
f7fd3322128ae9745272ec7e23bb6d94e2dbe6cd
858
py
Python
test/win/gyptest-cl-pdbname.py
MIPS/external-chromium_org-tools-gyp
1cf7b53d022d00310b738b24a51dc98d6ea3eb00
[ "BSD-3-Clause" ]
11
2015-01-19T22:09:14.000Z
2019-10-03T21:45:31.000Z
test/win/gyptest-cl-pdbname.py
MIPS/external-chromium_org-tools-gyp
1cf7b53d022d00310b738b24a51dc98d6ea3eb00
[ "BSD-3-Clause" ]
null
null
null
test/win/gyptest-cl-pdbname.py
MIPS/external-chromium_org-tools-gyp
1cf7b53d022d00310b738b24a51dc98d6ea3eb00
[ "BSD-3-Clause" ]
16
2015-01-08T01:47:24.000Z
2022-02-25T06:06:06.000Z
#!/usr/bin/env python # Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Make sure pdb is named as expected (shared between .cc files). """ import TestGyp import sys if sys.platform == 'win32': test = Tes...
27.677419
77
0.729604
import TestGyp import sys if sys.platform == 'win32': test = TestGyp.TestGyp(formats=['ninja']) CHDIR = 'compiler-flags' test.run_gyp('pdbname.gyp', chdir=CHDIR) test.build('pdbname.gyp', test.ALL, chdir=CHDIR) test.built_file_must_exist('obj/test_pdbname.pdb', chdir=CHDIR) test.built_f...
true
true
f7fd33518c45f346fde500b2bf4682bf46f632ff
2,795
py
Python
dash_coreui_components/appsidebarfooter.py
sourcewerk/dash-coreui-components
d402eb1dccb2ed9bb52f98edfa3f880ec1eb8b95
[ "MIT" ]
11
2019-03-30T14:02:05.000Z
2021-11-12T11:25:02.000Z
dash_coreui_components/appsidebarfooter.py
sourcewerk/dash-coreui-components
d402eb1dccb2ed9bb52f98edfa3f880ec1eb8b95
[ "MIT" ]
6
2019-01-30T22:42:10.000Z
2019-10-29T13:01:02.000Z
dash_coreui_components/appsidebarfooter.py
sourcewerk/dash-coreui-components
d402eb1dccb2ed9bb52f98edfa3f880ec1eb8b95
[ "MIT" ]
null
null
null
# AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args class appsidebarfooter(Component): """A appsidebarfooter component. CoreUI sidebar footer component. Keyword arguments: - children (a list of or a singular dash component, string or number; optional): Th...
46.583333
128
0.572451
from dash.development.base_component import Component, _explicitize_args class appsidebarfooter(Component): @_explicitize_args def __init__(self, children=None, id=Component.UNDEFINED, className=Component.UNDEFINED, tag=Component.UNDEFINED, **kwargs): self._prop_names = ['children', 'id', 'className...
true
true
f7fd33a3787cdc760135ca676cc8bda1a0aa071d
2,265
py
Python
wacz/util.py
edsu/wacz
302003a5d1757594d54da14adb2cc5595a6c7919
[ "MIT" ]
null
null
null
wacz/util.py
edsu/wacz
302003a5d1757594d54da14adb2cc5595a6c7919
[ "MIT" ]
null
null
null
wacz/util.py
edsu/wacz
302003a5d1757594d54da14adb2cc5595a6c7919
[ "MIT" ]
null
null
null
import hashlib, datetime, json from warcio.timeutils import iso_date_to_timestamp import pkg_resources WACZ_VERSION = "1.1.1" def check_http_and_https(url, ts, pages_dict): """Checks for http and https versions of the passed url in the pages dict :param url to check, pages_dict the user passed :retur...
29.038462
163
0.633996
import hashlib, datetime, json from warcio.timeutils import iso_date_to_timestamp import pkg_resources WACZ_VERSION = "1.1.1" def check_http_and_https(url, ts, pages_dict): url_body = url.split(":")[1] checks = [ f"http:{url_body}", f"https:{url_body}", f"{ts}/http:{url_body}", ...
true
true
f7fd33a87c0c3ee6438ec38e38c7e4e9fe992d50
1,061
py
Python
tests/unit/fake_data_root/kubernetes/var/lib/juju/agents/unit-kubernetes-master-0/charm/reactive/cdk_service_kicker.py
KellenRenshaw/hotsos
e3fc51ab7f8af606a5846a3486a7fda23d761583
[ "Apache-2.0" ]
6
2021-10-01T19:46:14.000Z
2022-03-31T17:05:08.000Z
tests/unit/fake_data_root/kubernetes/var/lib/juju/agents/unit-kubernetes-master-0/charm/reactive/cdk_service_kicker.py
KellenRenshaw/hotsos
e3fc51ab7f8af606a5846a3486a7fda23d761583
[ "Apache-2.0" ]
111
2021-10-01T18:18:17.000Z
2022-03-29T12:23:20.000Z
tests/unit/fake_data_root/kubernetes/var/lib/juju/agents/unit-kubernetes-master-0/charm/reactive/cdk_service_kicker.py
KellenRenshaw/hotsos
e3fc51ab7f8af606a5846a3486a7fda23d761583
[ "Apache-2.0" ]
10
2021-09-29T14:47:54.000Z
2022-03-18T14:52:16.000Z
import os import subprocess from charms import layer from charms.reactive import hook, when_not, remove_state, set_state from charmhelpers.core.templating import render @hook('upgrade-charm') def upgrade_charm(): remove_state('cdk-service-kicker.installed') @when_not('cdk-service-kicker.installed') def install_...
32.151515
76
0.719133
import os import subprocess from charms import layer from charms.reactive import hook, when_not, remove_state, set_state from charmhelpers.core.templating import render @hook('upgrade-charm') def upgrade_charm(): remove_state('cdk-service-kicker.installed') @when_not('cdk-service-kicker.installed') def install_...
true
true
f7fd33bfee01c8d286fed3f10eb65a1ef1f8c79f
1,304
py
Python
consultas/consultas/dump consultas/doctype/consulta_privada/consulta_privada.py
Lewinta/Consultas
e01ad870a2bad0eb5938d8800e3e2934402fce62
[ "MIT" ]
null
null
null
consultas/consultas/dump consultas/doctype/consulta_privada/consulta_privada.py
Lewinta/Consultas
e01ad870a2bad0eb5938d8800e3e2934402fce62
[ "MIT" ]
null
null
null
consultas/consultas/dump consultas/doctype/consulta_privada/consulta_privada.py
Lewinta/Consultas
e01ad870a2bad0eb5938d8800e3e2934402fce62
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2015, Lewin Villar and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document from frappe.model.naming import make_autoname class ConsultaPrivada(Document): def before_inse...
27.166667
93
0.687117
from __future__ import unicode_literals import frappe from frappe.model.document import Document from frappe.model.naming import make_autoname class ConsultaPrivada(Document): def before_insert(self): self.id=make_autoname("CLP-.##########") def guardar_lista_de_precio(self): for row in self.pruebas: nom...
true
true
f7fd34a10c072c220bfe867aafd4ba9e7ed550a3
4,991
py
Python
tests/test_basics.py
OMAS-IIIF/cserve
8932ed36fa6f1935b3db97ed556f876e2e459c4b
[ "MIT" ]
1
2021-06-24T06:10:07.000Z
2021-06-24T06:10:07.000Z
tests/test_basics.py
OMAS-IIIF/cserve
8932ed36fa6f1935b3db97ed556f876e2e459c4b
[ "MIT" ]
null
null
null
tests/test_basics.py
OMAS-IIIF/cserve
8932ed36fa6f1935b3db97ed556f876e2e459c4b
[ "MIT" ]
null
null
null
import pytest import os def test_ping(manager): """ Test the ping route (which is programmed in C++) :param manager: defined in conftest.py :return: None """ response = manager.get('ping') assert response.text == 'PONG' assert response.headers['Content-Length'] == '4' def test_get_ht...
32.409091
80
0.648567
import pytest import os def test_ping(manager): response = manager.get('ping') assert response.text == 'PONG' assert response.headers['Content-Length'] == '4' def test_get_html(manager): with open('./testserver/docroot/test.html') as inf: str = inf.read() response = manager.get('/test.h...
true
true
f7fd34d97ad8317f1c22fd94f7ae058db7818685
1,856
py
Python
final/plot/plot_2D_distribution.py
YihaoChan/2021-Tianchi-GAIIC-Track1-Rank-3
a79a8ae4bc0f8b2662f71df4caaa7fa382735f9f
[ "Apache-2.0" ]
22
2021-06-04T13:01:08.000Z
2022-02-18T13:19:46.000Z
final/plot/plot_2D_distribution.py
YihaoChan/2021-Tianchi-GAIIC-Track1-Rank-3
a79a8ae4bc0f8b2662f71df4caaa7fa382735f9f
[ "Apache-2.0" ]
null
null
null
final/plot/plot_2D_distribution.py
YihaoChan/2021-Tianchi-GAIIC-Track1-Rank-3
a79a8ae4bc0f8b2662f71df4caaa7fa382735f9f
[ "Apache-2.0" ]
2
2021-06-06T09:41:08.000Z
2021-06-09T01:05:10.000Z
import numpy as np from sklearn.decomposition import PCA import pandas as pd import tensorflow as tf import matplotlib.pyplot as plt import os def plot(set_type, color): df = None title_name = None if set_type == 'train': df = pd.read_csv("./datasets/track1_round1_train_20210222.csv"...
30.42623
117
0.589978
import numpy as np from sklearn.decomposition import PCA import pandas as pd import tensorflow as tf import matplotlib.pyplot as plt import os def plot(set_type, color): df = None title_name = None if set_type == 'train': df = pd.read_csv("./datasets/track1_round1_train_20210222.csv"...
true
true
f7fd354d7fdd5c1519e198b3978bfca58df65d8d
1,611
py
Python
py/test/selenium/webdriver/remote/test_remote_interactions.py
chromium-googlesource-mirror/selenium
fcf26da81afa5d3e8edfc776f558eebf2e7d28b3
[ "Apache-2.0" ]
null
null
null
py/test/selenium/webdriver/remote/test_remote_interactions.py
chromium-googlesource-mirror/selenium
fcf26da81afa5d3e8edfc776f558eebf2e7d28b3
[ "Apache-2.0" ]
null
null
null
py/test/selenium/webdriver/remote/test_remote_interactions.py
chromium-googlesource-mirror/selenium
fcf26da81afa5d3e8edfc776f558eebf2e7d28b3
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2011 WebDriver committers # Copyright 2011 Google 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 # #...
35.021739
88
0.774674
from selenium.test.selenium.webdriver.common.webserver import SimpleWebServer from selenium.test.selenium.webdriver.common import interactions_tests from selenium import webdriver import pytest from selenium.test.selenium.common import utils def setup_module(module): utils.start_server(module) ...
true
true
f7fd358c0dd3696a4d9617da9d7be40ad188b5b9
15,856
py
Python
saleor/graphql/order/mutations/draft_orders.py
saurabhsingla15/himichain
f7e446c89951a60383632907fed14bde5c3ad6b5
[ "CC-BY-4.0" ]
null
null
null
saleor/graphql/order/mutations/draft_orders.py
saurabhsingla15/himichain
f7e446c89951a60383632907fed14bde5c3ad6b5
[ "CC-BY-4.0" ]
16
2020-02-12T03:06:29.000Z
2022-02-10T20:29:25.000Z
saleor/graphql/order/mutations/draft_orders.py
saurabhsingla15/himichain
f7e446c89951a60383632907fed14bde5c3ad6b5
[ "CC-BY-4.0" ]
null
null
null
import graphene from django.core.exceptions import ValidationError from graphene.types import InputObjectType from ....account.models import User from ....core.exceptions import InsufficientStock from ....core.taxes import zero_taxed_money from ....order import OrderStatus, events, models from ....order.actions import...
35.235556
86
0.627964
import graphene from django.core.exceptions import ValidationError from graphene.types import InputObjectType from ....account.models import User from ....core.exceptions import InsufficientStock from ....core.taxes import zero_taxed_money from ....order import OrderStatus, events, models from ....order.actions import...
true
true
f7fd3724d446da397e0bbd941cb3349fe603c71d
9,125
py
Python
aioarangodb/cursor.py
kumsumit/aioarangodb
2cac1717b4a9a84387f0de9e7563452a566a6e88
[ "MIT" ]
null
null
null
aioarangodb/cursor.py
kumsumit/aioarangodb
2cac1717b4a9a84387f0de9e7563452a566a6e88
[ "MIT" ]
null
null
null
aioarangodb/cursor.py
kumsumit/aioarangodb
2cac1717b4a9a84387f0de9e7563452a566a6e88
[ "MIT" ]
null
null
null
__all__ = ["Cursor"] from collections import deque from typing import Any, Deque, Optional, Sequence from .connection import BaseConnection from .exceptions import ( CursorCloseError, CursorCountError, CursorEmptyError, CursorNextError, CursorStateError, ) from .request import Request from .typing...
31.143345
85
0.58389
__all__ = ["Cursor"] from collections import deque from typing import Any, Deque, Optional, Sequence from .connection import BaseConnection from .exceptions import ( CursorCloseError, CursorCountError, CursorEmptyError, CursorNextError, CursorStateError, ) from .request import Request from .typing...
true
true
f7fd3739101e4408dce2a93c96579bb1715063e9
577
py
Python
regexlib/python_re_test_file/regexlib_8131.py
yetingli/ReDoS-Benchmarks
f5b5094d835649e957bf3fec6b8bd4f6efdb35fc
[ "MIT" ]
1
2022-01-24T14:43:23.000Z
2022-01-24T14:43:23.000Z
regexlib/python_re_test_file/regexlib_8131.py
yetingli/ReDoS-Benchmarks
f5b5094d835649e957bf3fec6b8bd4f6efdb35fc
[ "MIT" ]
null
null
null
regexlib/python_re_test_file/regexlib_8131.py
yetingli/ReDoS-Benchmarks
f5b5094d835649e957bf3fec6b8bd4f6efdb35fc
[ "MIT" ]
null
null
null
# 8131 # '`.*?((http|ftp|https)://[\w#$&+,\/:;=?@.-]+)[^\w#$&+,\/:;=?@.-]*?`i' # POLYNOMIAL # nums:4 # POLYNOMIAL AttackString:""+"'`"*5000+"! _1SLQ_2" import re from time import perf_counter regex = """'`.*?((http|ftp|https)://[\w#$&+,\/:;=?@.-]+)[^\w#$&+,\/:;=?@.-]*?`i'""" REGEX = re.compile(regex) for i in range(0...
30.368421
83
0.514731
import re from time import perf_counter regex = """'`.*?((http|ftp|https)://[\w#$&+,\/:;=?@.-]+)[^\w#$&+,\/:;=?@.-]*?`i'""" REGEX = re.compile(regex) for i in range(0, 150000): ATTACK = "" + "\'`" * i * 10000 + "! _1SLQ_2" LEN = len(ATTACK) BEGIN = perf_counter() m = REGEX.search(ATTACK) ...
true
true
f7fd38ef88c6efd439543a27298b821758c6f8eb
25,836
py
Python
src/sage/topology/filtered_simplicial_complex.py
yzpopulation/sage
d2dc2f80b5a8e039701e292653e25366e3e5ec1e
[ "BSL-1.0" ]
1,742
2015-01-04T07:06:13.000Z
2022-03-30T11:32:52.000Z
src/sage/topology/filtered_simplicial_complex.py
yzpopulation/sage
d2dc2f80b5a8e039701e292653e25366e3e5ec1e
[ "BSL-1.0" ]
66
2015-03-19T19:17:24.000Z
2022-03-16T11:59:30.000Z
src/sage/topology/filtered_simplicial_complex.py
yzpopulation/sage
d2dc2f80b5a8e039701e292653e25366e3e5ec1e
[ "BSL-1.0" ]
495
2015-01-10T10:23:18.000Z
2022-03-24T22:06:11.000Z
# -*- coding: utf-8 -*- r""" Finite filtered complexes AUTHORS: - Guillaume Rousseau (2021-05) This module implements the basic structures of finite filtered complexes. A filtered complex is a simplicial complex, where each simplex is given a weight, or "filtration value", such that the weight of a simplex is greate...
34.960758
107
0.549543
from sage.structure.sage_object import SageObject from sage.topology.simplicial_complex import Simplex, SimplicialComplex from sage.modules.free_module import FreeModule from sage.rings.finite_rings.finite_field_constructor import GF from sage.rings.integer import Integer from sage.rings.infinity import inf...
true
true
f7fd3914e3813b7167ac47088231c76e579ea698
3,828
py
Python
adafruit_ble_adafruit/adafruit_service.py
tekktrik/Adafruit_CircuitPython_BLE_Adafruit
ac24f9c333b80e23510fc2b78349d342984c2973
[ "MIT" ]
null
null
null
adafruit_ble_adafruit/adafruit_service.py
tekktrik/Adafruit_CircuitPython_BLE_Adafruit
ac24f9c333b80e23510fc2b78349d342984c2973
[ "MIT" ]
null
null
null
adafruit_ble_adafruit/adafruit_service.py
tekktrik/Adafruit_CircuitPython_BLE_Adafruit
ac24f9c333b80e23510fc2b78349d342984c2973
[ "MIT" ]
null
null
null
# SPDX-FileCopyrightText: 2020 Dan Halbert for Adafruit Industries # # SPDX-License-Identifier: MIT """ `adafruit_ble_adafruit.adafruit_service` ================================================================================ Access to sensors and hardware on or connected to BLE-capable boards. * Author(s): Dan Halb...
32.168067
86
0.6907
__version__ = "0.0.0-auto.0" __repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_BLE_Adafruit.git" import struct from micropython import const from adafruit_ble.advertising import Advertisement, LazyObjectField from adafruit_ble.advertising.standard import ManufacturerData, ManufacturerDataField from...
true
true
f7fd3a7d568678282b974af71a21c89e99333d61
6,059
py
Python
train.py
embracesource-cv-com/ruler_detection
89318b46b213ffb7774119d502b5aa520d34b50a
[ "Apache-2.0" ]
null
null
null
train.py
embracesource-cv-com/ruler_detection
89318b46b213ffb7774119d502b5aa520d34b50a
[ "Apache-2.0" ]
null
null
null
train.py
embracesource-cv-com/ruler_detection
89318b46b213ffb7774119d502b5aa520d34b50a
[ "Apache-2.0" ]
null
null
null
import os import argparse import collections import numpy as np import torch import torch.nn as nn import torch.optim as optim from torchvision import transforms import model from utils import _transfer_pretrained_weights from dataloader import CSVDataset, collater, Resizer, AspectRatioBasedSampler, Normalizer from aug...
50.915966
118
0.667437
import os import argparse import collections import numpy as np import torch import torch.nn as nn import torch.optim as optim from torchvision import transforms import model from utils import _transfer_pretrained_weights from dataloader import CSVDataset, collater, Resizer, AspectRatioBasedSampler, Normalizer from aug...
true
true
f7fd3a9f5a9ee863ee157dd34058d82e7651a113
101
py
Python
nupyserver/v2/__init__.py
BxNiom/Python.NuPyServer
be2a9e8f366806117bf767ab96d67635fff6029e
[ "MIT" ]
1
2021-12-18T11:30:58.000Z
2021-12-18T11:30:58.000Z
nupyserver/v2/__init__.py
BxNiom/Python.NuPyServer
be2a9e8f366806117bf767ab96d67635fff6029e
[ "MIT" ]
null
null
null
nupyserver/v2/__init__.py
BxNiom/Python.NuPyServer
be2a9e8f366806117bf767ab96d67635fff6029e
[ "MIT" ]
null
null
null
# Protocol v2 # https://joelverhagen.github.io/NuGetUndocs/?http#introduction __version__ = "0.1.0"
20.2
63
0.752475
= "0.1.0"
true
true
f7fd3b60c8a9d4f0687e5b60308a048085288f91
1,018
py
Python
台海舆论-数据分析(可视化系统)/demo/Taiwan_pie.py
13060923171/Crawl-Project2
effab1bf31979635756fc272a7bcc666bb499be2
[ "MIT" ]
14
2020-10-27T05:52:20.000Z
2021-11-07T20:24:55.000Z
台海舆论-数据分析(可视化系统)/demo/Taiwan_pie.py
13060923171/Crawl-Project2
effab1bf31979635756fc272a7bcc666bb499be2
[ "MIT" ]
1
2021-09-17T07:40:00.000Z
2021-09-17T07:40:00.000Z
台海舆论-数据分析(可视化系统)/demo/Taiwan_pie.py
13060923171/Crawl-Project2
effab1bf31979635756fc272a7bcc666bb499be2
[ "MIT" ]
8
2020-11-18T14:23:12.000Z
2021-11-12T08:55:08.000Z
import pyecharts.options as opts from pyecharts.charts import Pie from pyecharts.globals import ThemeType x_data = ["文化", "经贸", "媒体专栏", "网友专栏", "两岸专家","两岸","台商","部委","台海时事","网友快言","海峡时评","两岸快评"] y_data = [553,553,35,39,448,465,553,321,553,406,553,556] def taiwan_pie(): c = ( Pie(init_opts=opts.InitOpts(...
31.8125
88
0.577603
import pyecharts.options as opts from pyecharts.charts import Pie from pyecharts.globals import ThemeType x_data = ["文化", "经贸", "媒体专栏", "网友专栏", "两岸专家","两岸","台商","部委","台海时事","网友快言","海峡时评","两岸快评"] y_data = [553,553,35,39,448,465,553,321,553,406,553,556] def taiwan_pie(): c = ( Pie(init_opts=opts.InitOpts(...
true
true
f7fd3c11b4e40baa2ec6478624dc9f3894b3fc34
104
py
Python
Task/Logical-operations/Python/logical-operations.py
mullikine/RosettaCodeData
4f0027c6ce83daa36118ee8b67915a13cd23ab67
[ "Info-ZIP" ]
1
2021-05-05T13:42:20.000Z
2021-05-05T13:42:20.000Z
Task/Logical-operations/Python/logical-operations.py
seanwallawalla-forks/RosettaCodeData
9ad63ea473a958506c041077f1d810c0c7c8c18d
[ "Info-ZIP" ]
null
null
null
Task/Logical-operations/Python/logical-operations.py
seanwallawalla-forks/RosettaCodeData
9ad63ea473a958506c041077f1d810c0c7c8c18d
[ "Info-ZIP" ]
null
null
null
def logic(a, b): print('a and b:', a and b) print('a or b:', a or b) print('not a:', not a)
20.8
30
0.490385
def logic(a, b): print('a and b:', a and b) print('a or b:', a or b) print('not a:', not a)
true
true
f7fd3ca233d4f786f7b65a43a25fc84cfa2ba2df
12,347
py
Python
tests/test_dataservice.py
romepeng/jaqsplus
2923c01213d1e2f90ddcd95eb722f8120aa74426
[ "MIT" ]
null
null
null
tests/test_dataservice.py
romepeng/jaqsplus
2923c01213d1e2f90ddcd95eb722f8120aa74426
[ "MIT" ]
1
2020-01-30T04:37:38.000Z
2020-01-30T04:37:38.000Z
tests/test_dataservice.py
romepeng/jaqsplus
2923c01213d1e2f90ddcd95eb722f8120aa74426
[ "MIT" ]
null
null
null
# encoding: UTF-8 import pytest from jaqs.data import RemoteDataService import jaqs.util as jutil from config_path import DATA_CONFIG_PATH data_config = jutil.read_json(DATA_CONFIG_PATH) def test_remote_data_service_daily(): # test daily res, msg = ds.daily('002422.SZ,601607.SH', fields="", ...
36.208211
123
0.611566
import pytest from jaqs.data import RemoteDataService import jaqs.util as jutil from config_path import DATA_CONFIG_PATH data_config = jutil.read_json(DATA_CONFIG_PATH) def test_remote_data_service_daily(): res, msg = ds.daily('002422.SZ,601607.SH', fields="", start_da...
true
true
f7fd3d4118993a6fffaf5aabee52c620001dd9f7
409
py
Python
payments/razorpayapp/migrations/0006_auto_20200801_0100.py
Titan-BT-7274/Payment-Gateway
075417fa1d37446dde789acf50bea89e91dbc80c
[ "MIT" ]
1
2021-07-13T16:57:27.000Z
2021-07-13T16:57:27.000Z
payments/razorpayapp/migrations/0006_auto_20200801_0100.py
Titan-BT-7274/Payment-Gateway
075417fa1d37446dde789acf50bea89e91dbc80c
[ "MIT" ]
3
2021-04-08T21:40:44.000Z
2021-11-28T05:56:32.000Z
payments/razorpayapp/migrations/0006_auto_20200801_0100.py
Titan-BT-7274/Payment-Gateway
075417fa1d37446dde789acf50bea89e91dbc80c
[ "MIT" ]
null
null
null
# Generated by Django 3.0.8 on 2020-08-01 01:00 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('razorpayapp', '0005_remove_razorpayhistory_card_number'), ] operations = [ migrations.AlterField( model_name='razorpayhistory', ...
21.526316
67
0.623472
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('razorpayapp', '0005_remove_razorpayhistory_card_number'), ] operations = [ migrations.AlterField( model_name='razorpayhistory', name='txn_amount', fiel...
true
true
f7fd3eaf0bbb9367b562c3b47ecf60568cb29e8b
4,796
py
Python
src/craftr/stdlib/net.craftr.backend/ninja/build_server.py
creator-build/craftr
a2b95618d990baee192bb2d2f6bb4453ce83a005
[ "MIT" ]
1
2022-02-04T21:51:36.000Z
2022-02-04T21:51:36.000Z
src/craftr/stdlib/net.craftr.backend/ninja/build_server.py
craftr-build/craftr-build-4.x
a2b95618d990baee192bb2d2f6bb4453ce83a005
[ "MIT" ]
9
2015-08-31T15:39:20.000Z
2015-09-05T19:22:20.000Z
src/craftr/stdlib/net.craftr.backend/ninja/build_server.py
craftr-build/craftr-build-4.x
a2b95618d990baee192bb2d2f6bb4453ce83a005
[ "MIT" ]
null
null
null
# -*- coding: utf8 -*- # The MIT License (MIT) # # Copyright (c) 2018 Niklas Rosenstein # # 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 th...
33.538462
91
0.681401
import concurrent.futures import json import shlex import socket import socketserver import struct import threading class JsonifyProxy: def __init__(self, obj, **kwargs): self._obj = obj self._kwargs = kwargs def to_json(self, *args, **kwargs): kwargs.update(self._kwargs) ...
true
true
f7fd400b7a0645a6dee49c1abec5594c1c4a2fc8
30,384
py
Python
elements_sdk/models/parameters.py
elements-storage/elements-sdk-python
39c365fe079dcd5928c5fe1bbaa67389bd5a3d81
[ "MIT" ]
6
2020-11-16T23:15:18.000Z
2022-03-14T03:56:12.000Z
elements_sdk/models/parameters.py
elements-storage/elements-sdk-python
39c365fe079dcd5928c5fe1bbaa67389bd5a3d81
[ "MIT" ]
1
2021-07-28T13:03:49.000Z
2021-08-25T12:24:01.000Z
elements_sdk/models/parameters.py
elements-storage/elements-sdk-python
39c365fe079dcd5928c5fe1bbaa67389bd5a3d81
[ "MIT" ]
null
null
null
# coding: utf-8 """ ELEMENTS API The version of the OpenAPI document: 2 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from elements_sdk.configuration import Configuration class Parameters(object): """NOTE: This class is auto generated by OpenAP...
36
795
0.672525
import pprint import re import six from elements_sdk.configuration import Configuration class Parameters(object): openapi_types = { 'analytics': 'bool', 'branding_css': 'str', 'branding_logo': 'str', 'external_url': 'str', 'file_manager_recycle_bin': 'bool', ...
true
true
f7fd416df8bd42b82e718c3ef1f64e6c2ef9d427
3,746
py
Python
Omdena Projects/hourly_merge.py
DANancy/Coding-Playground
b82e3689ccc4771ee59c3472db78333ba17671b9
[ "MIT" ]
null
null
null
Omdena Projects/hourly_merge.py
DANancy/Coding-Playground
b82e3689ccc4771ee59c3472db78333ba17671b9
[ "MIT" ]
null
null
null
Omdena Projects/hourly_merge.py
DANancy/Coding-Playground
b82e3689ccc4771ee59c3472db78333ba17671b9
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np from datetime import datetime def main(consumption_data, weather_data, public_holidays_data, service_location_id): # Process consumption data df = consumption_data.astype({'date':'datetime64[ns]'}).rename(columns={'date':'datetime'}).set_index('datetime') df = ...
42.089888
118
0.628938
import pandas as pd import numpy as np from datetime import datetime def main(consumption_data, weather_data, public_holidays_data, service_location_id): df = consumption_data.astype({'date':'datetime64[ns]'}).rename(columns={'date':'datetime'}).set_index('datetime') df = pd.DataFrame(df['consumptio...
true
true
f7fd41d9446d61e4cdaed0640ec94a97e63efe89
5,198
py
Python
tests/integration/shell/master.py
pass-by-value/salt
2ede44fe54516242e10fe428629d5f5a18e5f7ea
[ "Apache-2.0", "MIT" ]
2
2015-09-21T14:13:30.000Z
2016-02-12T11:33:46.000Z
tests/integration/shell/master.py
pass-by-value/salt
2ede44fe54516242e10fe428629d5f5a18e5f7ea
[ "Apache-2.0", "MIT" ]
1
2019-09-06T13:57:28.000Z
2019-09-06T13:57:28.000Z
tests/integration/shell/master.py
pass-by-value/salt
2ede44fe54516242e10fe428629d5f5a18e5f7ea
[ "Apache-2.0", "MIT" ]
2
2017-01-05T16:14:59.000Z
2019-01-31T23:15:25.000Z
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Pedro Algarvio (pedro@algarvio.me)` tests.integration.shell.master ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ''' # Import python libs from __future__ import absolute_import import os import yaml import signal import shutil # Import Salt Testing libs from salttesting...
32.08642
108
0.590227
from __future__ import absolute_import import os import yaml import signal import shutil from salttesting.helpers import ensure_in_syspath ensure_in_syspath('../../') import integration import integration.utils from integration.utils import testprogram import salt.utils class MasterTest(integration.ShellCase, ...
true
true
f7fd42a89bf93e0aeff0ec7ab6f06aeaea6b42e9
1,154
py
Python
ProcessScripts/DevsetTransform.py
peterzheng98/fuzzy-system
6ae14714c73d9a70b4d4c0a27e9da0d54a0fe5a8
[ "MIT" ]
null
null
null
ProcessScripts/DevsetTransform.py
peterzheng98/fuzzy-system
6ae14714c73d9a70b4d4c0a27e9da0d54a0fe5a8
[ "MIT" ]
null
null
null
ProcessScripts/DevsetTransform.py
peterzheng98/fuzzy-system
6ae14714c73d9a70b4d4c0a27e9da0d54a0fe5a8
[ "MIT" ]
null
null
null
import pandas as pd import sys from collections import Counter from tqdm import tqdm import json if __name__ == '__main__': filepath = '../datasets/tokenized/in_domain_dev.tsv' output_word_cab = '../datasets/tokenized/wordlist.txt' df = pd.read_csv(filepath, sep='\t', header=0) word_list_cnt = open(o...
33.941176
79
0.646447
import pandas as pd import sys from collections import Counter from tqdm import tqdm import json if __name__ == '__main__': filepath = '../datasets/tokenized/in_domain_dev.tsv' output_word_cab = '../datasets/tokenized/wordlist.txt' df = pd.read_csv(filepath, sep='\t', header=0) word_list_cnt = open(o...
true
true
f7fd42bd1bdd15a643d253b8ce19570f564b7368
759
py
Python
cdk/kesher_service_cdk/service_stack/kesher_stack.py
CyberArkForTheCommunity/Kesher-Backend
51a86ac1901c08ba932e81f5c0cd2ba81b05d8e6
[ "MIT" ]
1
2021-05-13T10:58:06.000Z
2021-05-13T10:58:06.000Z
cdk/kesher_service_cdk/service_stack/kesher_stack.py
CyberArkForTheCommunity/Kesher-Backend
51a86ac1901c08ba932e81f5c0cd2ba81b05d8e6
[ "MIT" ]
null
null
null
cdk/kesher_service_cdk/service_stack/kesher_stack.py
CyberArkForTheCommunity/Kesher-Backend
51a86ac1901c08ba932e81f5c0cd2ba81b05d8e6
[ "MIT" ]
2
2021-04-06T15:28:16.000Z
2021-05-13T23:02:59.000Z
import getpass from aws_cdk import core from kesher_service_cdk.service_stack.kesher_construct import KesherServiceEnvironment from kesher_service_cdk.service_stack.stack_utils import get_stack_name from .auth_construct import KesherAuth from .db_construct import DatabaseConstruct class KesherStack(core.Stack): ...
37.95
117
0.778656
import getpass from aws_cdk import core from kesher_service_cdk.service_stack.kesher_construct import KesherServiceEnvironment from kesher_service_cdk.service_stack.stack_utils import get_stack_name from .auth_construct import KesherAuth from .db_construct import DatabaseConstruct class KesherStack(core.Stack): ...
true
true
f7fd43200a0198becb084621acb7b8574ad5ef45
6,077
py
Python
libs/parametric_models.py
kamieen03/style-transfer-server
91727ec62080215a0b870ce043faf0657137b84b
[ "BSD-2-Clause" ]
null
null
null
libs/parametric_models.py
kamieen03/style-transfer-server
91727ec62080215a0b870ce043faf0657137b84b
[ "BSD-2-Clause" ]
null
null
null
libs/parametric_models.py
kamieen03/style-transfer-server
91727ec62080215a0b870ce043faf0657137b84b
[ "BSD-2-Clause" ]
null
null
null
import torch import torch.nn as nn class encoder3(nn.Module): def __init__(self, W, v2): super(encoder3,self).__init__() # W - width # vgg # 224 x 224 self.conv1 = nn.Conv2d(3,3,1,1,0) self.reflecPad1 = nn.ZeroPad2d((1,1,1,1)) # 226 x 226 self.conv2 = nn.C...
32.497326
86
0.552082
import torch import torch.nn as nn class encoder3(nn.Module): def __init__(self, W, v2): super(encoder3,self).__init__() self.conv1 = nn.Conv2d(3,3,1,1,0) self.reflecPad1 = nn.ZeroPad2d((1,1,1,1)) self.conv2 = nn.Conv2d(3,32 if v2 else int(64*W),3,1,0)...
true
true
f7fd43c48d9247f178140699008c87759857dff9
4,687
py
Python
selfdrive/debug/mpc/tune_longitudinal.py
Neptos/openpilot
01914a1a91ade18bd7aead99e7d1bf38cd22ad89
[ "MIT" ]
43
2019-10-23T13:02:21.000Z
2021-09-09T04:41:49.000Z
selfdrive/debug/mpc/tune_longitudinal.py
Neptos/openpilot
01914a1a91ade18bd7aead99e7d1bf38cd22ad89
[ "MIT" ]
16
2021-04-01T00:28:36.000Z
2021-05-22T15:37:07.000Z
selfdrive/debug/mpc/tune_longitudinal.py
Neptos/openpilot
01914a1a91ade18bd7aead99e7d1bf38cd22ad89
[ "MIT" ]
28
2019-04-23T09:19:26.000Z
2022-03-14T04:01:09.000Z
#! /usr/bin/env python # type: ignore import numpy as np import matplotlib.pyplot as plt from selfdrive.controls.lib.longitudinal_mpc import libmpc_py from selfdrive.controls.lib.drive_helpers import MPC_COST_LONG # plot liongitudinal MPC trajectory by defining boundary conditions: # ego and lead vehicles state. Use t...
27.733728
159
0.671858
import numpy as np import matplotlib.pyplot as plt from selfdrive.controls.lib.longitudinal_mpc import libmpc_py from selfdrive.controls.lib.drive_helpers import MPC_COST_LONG def RW(v_ego, v_l): TR = 1.8 G = 9.81 return (v_ego * TR - (v_l - v_ego) * TR + v_ego*v_ego/(2*G) - v_l*v_l / (2*G)) def NOR...
true
true
f7fd43dd07736ba78ef3bcbcd4e5ba0fe1971312
142
py
Python
Task/JSON/Python/json-2.py
mullikine/RosettaCodeData
4f0027c6ce83daa36118ee8b67915a13cd23ab67
[ "Info-ZIP" ]
5
2021-01-29T20:08:05.000Z
2022-03-22T06:16:05.000Z
Task/JSON/Python/json-2.py
seanwallawalla-forks/RosettaCodeData
9ad63ea473a958506c041077f1d810c0c7c8c18d
[ "Info-ZIP" ]
null
null
null
Task/JSON/Python/json-2.py
seanwallawalla-forks/RosettaCodeData
9ad63ea473a958506c041077f1d810c0c7c8c18d
[ "Info-ZIP" ]
1
2018-11-09T22:08:40.000Z
2018-11-09T22:08:40.000Z
>>> true = True; false = False; null = None >>> data = eval('{ "foo": 1, "bar": [10, "apples"] }') >>> data {'foo': 1, 'bar': [10, 'apples']}
28.4
54
0.478873
>>> true = True; false = False; null = None >>> data = eval('{ "foo": 1, "bar": [10, "apples"] }') >>> data {'foo': 1, 'bar': [10, 'apples']}
false
true
f7fd456591c952286c4147c312e1a8e9ae09e578
9,950
py
Python
QQ_History.py
ZhangJun2017/QQ-History-Backup
434cdea878798fe7c107a580b12dfbdba288db4d
[ "MIT" ]
null
null
null
QQ_History.py
ZhangJun2017/QQ-History-Backup
434cdea878798fe7c107a580b12dfbdba288db4d
[ "MIT" ]
null
null
null
QQ_History.py
ZhangJun2017/QQ-History-Backup
434cdea878798fe7c107a580b12dfbdba288db4d
[ "MIT" ]
null
null
null
import hashlib import sqlite3 import time import os import traceback import json import base64 from proto.RichMsg_pb2 import PicRec from proto.RichMsg_pb2 import Elem _crc64_init = False _crc64_table = [0] * 256 def crc64(s): global _crc64_init if not _crc64_init: for i in range(256): bf ...
34.075342
101
0.500905
import hashlib import sqlite3 import time import os import traceback import json import base64 from proto.RichMsg_pb2 import PicRec from proto.RichMsg_pb2 import Elem _crc64_init = False _crc64_table = [0] * 256 def crc64(s): global _crc64_init if not _crc64_init: for i in range(256): bf ...
true
true
f7fd45ebe328c5bd4d613f500e5bdba837dad285
1,427
py
Python
cosmic_ray/plugins.py
rob-smallshire/cosmic-ray
4fd751b38eee30568f8366e09452d7aa60be4e26
[ "MIT" ]
null
null
null
cosmic_ray/plugins.py
rob-smallshire/cosmic-ray
4fd751b38eee30568f8366e09452d7aa60be4e26
[ "MIT" ]
null
null
null
cosmic_ray/plugins.py
rob-smallshire/cosmic-ray
4fd751b38eee30568f8366e09452d7aa60be4e26
[ "MIT" ]
null
null
null
"""Query and retrieve the various plugins in Cosmic Ray. """ from stevedore import driver, ExtensionManager def get_operator(name): """Get an operator class from a plugin. Attrs: name: The name of the plugin containing the operator class. Returns: The operator *class object* (i.e. not an instan...
26.425926
79
0.698669
from stevedore import driver, ExtensionManager def get_operator(name): return ExtensionManager('cosmic_ray.operators')[name].plugin def operator_names(): return ExtensionManager('cosmic_ray.operators').names() def get_test_runner(name, test_args): test_runner_manager = driver.DriverManager( n...
true
true
f7fd46a0ac1d951e4a0e0eedb61910a84f7a37fd
3,575
py
Python
desktop/core/ext-py/openpyxl-2.3.0-b2/openpyxl/styles/colors.py
kokosing/hue
2307f5379a35aae9be871e836432e6f45138b3d9
[ "Apache-2.0" ]
28
2021-07-23T16:08:55.000Z
2022-03-15T16:19:32.000Z
desktop/core/ext-py/openpyxl-2.3.0-b2/openpyxl/styles/colors.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
4
2021-03-11T04:02:00.000Z
2022-03-27T08:31:56.000Z
desktop/core/ext-py/openpyxl-2.3.0-b2/openpyxl/styles/colors.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
11
2021-07-15T04:40:27.000Z
2022-03-19T14:01:12.000Z
from __future__ import absolute_import # Copyright (c) 2010-2015 openpyxl import re from openpyxl.compat import safe_string, basestring from openpyxl.descriptors import Descriptor, Typed from .hashable import HashableObject from openpyxl.descriptors import String, Bool, MinMax, Integer # Default Color Index as per 1...
29.791667
105
0.612587
from __future__ import absolute_import import re from openpyxl.compat import safe_string, basestring from openpyxl.descriptors import Descriptor, Typed from .hashable import HashableObject from openpyxl.descriptors import String, Bool, MinMax, Integer COLOR_INDEX = ( '00000000', '00FFFFFF', '00FF0000', '0000FF...
true
true
f7fd48ace02257350871586614269671db6c47ba
1,362
py
Python
useintest/tests/modules/gitlab/test_gitlab.py
wtsi-hgi/startfortest
426343c0ff340d4d83575cdafe2c4184707e7693
[ "MIT" ]
1
2019-06-18T20:56:42.000Z
2019-06-18T20:56:42.000Z
useintest/tests/modules/gitlab/test_gitlab.py
wtsi-hgi/useintest
426343c0ff340d4d83575cdafe2c4184707e7693
[ "MIT" ]
3
2017-09-21T12:14:44.000Z
2018-02-19T11:18:47.000Z
useintest/tests/modules/gitlab/test_gitlab.py
wtsi-hgi/useintest
426343c0ff340d4d83575cdafe2c4184707e7693
[ "MIT" ]
null
null
null
import json import unittest from abc import ABCMeta import requests from useintest.modules.gitlab.gitlab import GitLabServiceController, gitlab_service_controllers from useintest.services.models import DockerisedServiceWithUsers, User from testhelpers import TypeUsedInTest, create_tests, get_classes_to_test from usei...
37.833333
108
0.788546
import json import unittest from abc import ABCMeta import requests from useintest.modules.gitlab.gitlab import GitLabServiceController, gitlab_service_controllers from useintest.services.models import DockerisedServiceWithUsers, User from testhelpers import TypeUsedInTest, create_tests, get_classes_to_test from usei...
true
true
f7fd48d6b9d7089fc3a110dcb04e669d5c8523e7
716
py
Python
demo.py
Peiiii/weatherChina
5ae50de41ec5ead988402eeb5acab2c33c2944bb
[ "MIT" ]
1
2021-04-14T15:50:10.000Z
2021-04-14T15:50:10.000Z
demo.py
Peiiii/weatherChina
5ae50de41ec5ead988402eeb5acab2c33c2944bb
[ "MIT" ]
1
2021-03-16T14:08:58.000Z
2021-04-13T03:54:57.000Z
demo.py
Peiiii/weatherChina
5ae50de41ec5ead988402eeb5acab2c33c2944bb
[ "MIT" ]
1
2021-11-20T07:08:43.000Z
2021-11-20T07:08:43.000Z
import weatherChina # 快速使用 # 主城区 weather=weatherChina.getWeatherByNames('上海', '上海') weather=weatherChina.getWeatherByNames('安徽', '合肥', '合肥') # 其它 weather=weatherChina.getWeatherByNames('上海', '浦东') weather=weatherChina.getWeatherByNames('西藏', '日喀则', '萨迦') # print(weather) # 查看所有地区、以及每个区域的id信息 regionData=weatherChina....
26.518519
160
0.674581
import weatherChina weather=weatherChina.getWeatherByNames('上海', '上海') weather=weatherChina.getWeatherByNames('安徽', '合肥', '合肥') weather=weatherChina.getWeatherByNames('上海', '浦东') weather=weatherChina.getWeatherByNames('西藏', '日喀则', '萨迦') print(weather) regionData=weatherChina.getRegionData() print(regionData) ...
true
true
f7fd4ab22da9fa5150ecadd4ca176a283d22a091
3,566
py
Python
chapter_6/diffall.py
bimri/programming_python
ba52ccd18b9b4e6c5387bf4032f381ae816b5e77
[ "MIT" ]
null
null
null
chapter_6/diffall.py
bimri/programming_python
ba52ccd18b9b4e6c5387bf4032f381ae816b5e77
[ "MIT" ]
null
null
null
chapter_6/diffall.py
bimri/programming_python
ba52ccd18b9b4e6c5387bf4032f381ae816b5e77
[ "MIT" ]
null
null
null
"Comparing Directory Trees" 'Finding Tree Differences' """ ################################################################################ Usage: "python diffall.py dir1 dir2". Recursive directory tree comparison: report unique files that exist in only dir1 or dir2, report files of the same name in dir1 and dir2 with...
37.93617
85
0.586652
import os, dirdiffs blocksize = 1024 * 1024 def intersect(seq1, seq2): return [item for item in seq1 if item in seq2] def comparetrees(dir1, dir2, diffs, verbose=False): print('-' * 20) names1 = os.listdir(dir1) names2 = os.listdir(dir2) if not dirdiffs.comparedir...
true
true
f7fd4ad24afe06422bc497d69f3c9d9e1412ca33
125
py
Python
project/server/main/modules/api/routes/user/__init__.py
ardikabs/flask-server-template
e1dfb33323cc89f6163d604007263b73ec5b6e12
[ "MIT" ]
1
2019-01-15T10:33:04.000Z
2019-01-15T10:33:04.000Z
project/server/main/modules/api/routes/user/__init__.py
ardikabs/flask-server-template
e1dfb33323cc89f6163d604007263b73ec5b6e12
[ "MIT" ]
null
null
null
project/server/main/modules/api/routes/user/__init__.py
ardikabs/flask-server-template
e1dfb33323cc89f6163d604007263b73ec5b6e12
[ "MIT" ]
null
null
null
from flask_restplus import Namespace api = Namespace("users", description="User Related Operation") from . import resource
20.833333
62
0.792
from flask_restplus import Namespace api = Namespace("users", description="User Related Operation") from . import resource
true
true
f7fd4b12c53e66fb958f8caf63bbc2ade57a36d4
263
py
Python
Stack_Using_List.py
thegautamkumarjaiswal/Data_Structures_in-_Python
5ca83b278aaa13b3eee9e8109aad97909545b523
[ "Apache-2.0" ]
null
null
null
Stack_Using_List.py
thegautamkumarjaiswal/Data_Structures_in-_Python
5ca83b278aaa13b3eee9e8109aad97909545b523
[ "Apache-2.0" ]
null
null
null
Stack_Using_List.py
thegautamkumarjaiswal/Data_Structures_in-_Python
5ca83b278aaa13b3eee9e8109aad97909545b523
[ "Apache-2.0" ]
null
null
null
# python stack using list # my_Stack = [10, 12, 13, 11, 33, 24, 56, 78, 13, 56, 31, 32, 33, 10, 15] # array # print(my_Stack) print(my_Stack.pop()) # think python simple just pop and push # print(my_Stack.pop()) print(my_Stack.pop()) print(my_Stack.pop())
21.916667
85
0.65019
my_Stack = [10, 12, 13, 11, 33, 24, 56, 78, 13, 56, 31, 32, 33, 10, 15] print(my_Stack) print(my_Stack.pop()) print(my_Stack.pop()) print(my_Stack.pop()) print(my_Stack.pop())
true
true
f7fd4b7de32a29a5b63794d096a3a939c1dc6f09
2,859
py
Python
bots/bot.py
HendrikCrause/hallite2-submission
fef9d836f393f7aa15768e6a424c52ff60702933
[ "MIT" ]
null
null
null
bots/bot.py
HendrikCrause/hallite2-submission
fef9d836f393f7aa15768e6a424c52ff60702933
[ "MIT" ]
null
null
null
bots/bot.py
HendrikCrause/hallite2-submission
fef9d836f393f7aa15768e6a424c52ff60702933
[ "MIT" ]
null
null
null
import argparse import json import hlt import operator import logging from rnn.rnn import DeepRecurrentNeuralNet class Bot: def __init__(self, name='bot', structure=None): self.game = hlt.Game(name) self.brain = DeepRecurrentNeuralNet(structure) def play(self): while True: ...
30.741935
100
0.564183
import argparse import json import hlt import operator import logging from rnn.rnn import DeepRecurrentNeuralNet class Bot: def __init__(self, name='bot', structure=None): self.game = hlt.Game(name) self.brain = DeepRecurrentNeuralNet(structure) def play(self): while True: ...
true
true
f7fd4b81687901bedc61a3a4d30ffa4e01308554
7,643
py
Python
creastephGAN2.py
Sup3Legacy/TIPE
7e01cef869183c4d609c45d5fcf0bb371a9579f5
[ "BSD-3-Clause" ]
null
null
null
creastephGAN2.py
Sup3Legacy/TIPE
7e01cef869183c4d609c45d5fcf0bb371a9579f5
[ "BSD-3-Clause" ]
null
null
null
creastephGAN2.py
Sup3Legacy/TIPE
7e01cef869183c4d609c45d5fcf0bb371a9579f5
[ "BSD-3-Clause" ]
1
2020-06-28T06:07:17.000Z
2020-06-28T06:07:17.000Z
from __future__ import print_function, division import os import random import argparse import torch import pandas as pd from skimage import io, transform import numpy as np import matplotlib.pyplot as plt from torch.utils.data import Dataset, DataLoader import torchvision.utils as vutils import torch.backends.cudnn as...
36.395238
247
0.61154
from __future__ import print_function, division import os import random import argparse import torch import pandas as pd from skimage import io, transform import numpy as np import matplotlib.pyplot as plt from torch.utils.data import Dataset, DataLoader import torchvision.utils as vutils import torch.backends.cudnn as...
true
true
f7fd4c8ccfaeb89edbcb3c758d67ae754d88a617
133
py
Python
app.py
tim-coutinho/cl
3103c3e8dda5250aa68c1a335dfd9db106a4c302
[ "MIT" ]
null
null
null
app.py
tim-coutinho/cl
3103c3e8dda5250aa68c1a335dfd9db106a4c302
[ "MIT" ]
null
null
null
app.py
tim-coutinho/cl
3103c3e8dda5250aa68c1a335dfd9db106a4c302
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from aws_cdk.core import App from cdk.cl_stack import ClStack app = App() ClStack(app, "cl2") app.synth()
12.090909
32
0.714286
from aws_cdk.core import App from cdk.cl_stack import ClStack app = App() ClStack(app, "cl2") app.synth()
true
true
f7fd4cfa842adfb38c1908a61c81749ee72bf13b
2,384
py
Python
Python/substring-with-concatenation-of-all-words.py
sm2774us/leetcode_interview_prep_2021
33b41bea66c266b733372d9a8b9d2965cd88bf8c
[ "Fair" ]
null
null
null
Python/substring-with-concatenation-of-all-words.py
sm2774us/leetcode_interview_prep_2021
33b41bea66c266b733372d9a8b9d2965cd88bf8c
[ "Fair" ]
null
null
null
Python/substring-with-concatenation-of-all-words.py
sm2774us/leetcode_interview_prep_2021
33b41bea66c266b733372d9a8b9d2965cd88bf8c
[ "Fair" ]
null
null
null
# Time: O((m + n) * k), where m is string length, n is dictionary size, k is word length # Space: O(n * k) import collections class Solution(object): def findSubstring(self, s, words): """ :type s: str :type words: List[str] :rtype: List[int] """ if not words: ...
30.177215
89
0.395973
import collections class Solution(object): def findSubstring(self, s, words): if not words: return [] result, m, n, k = [], len(s), len(words), len(words[0]) if m < n*k: return result lookup = collections.defaultdict(int) for i in words: ...
true
true
f7fd4d573e3b3b03754376eed6b380355b9f8567
1,960
py
Python
opencadd/tests/compounds/standardization/test_remove_salts.py
Allend95/opencadd
1fde238e3cf8e5e47e8266a504d9df0196505e97
[ "MIT" ]
1
2020-11-11T17:24:41.000Z
2020-11-11T17:24:41.000Z
opencadd/tests/compounds/standardization/test_remove_salts.py
Allend95/opencadd
1fde238e3cf8e5e47e8266a504d9df0196505e97
[ "MIT" ]
null
null
null
opencadd/tests/compounds/standardization/test_remove_salts.py
Allend95/opencadd
1fde238e3cf8e5e47e8266a504d9df0196505e97
[ "MIT" ]
null
null
null
""" test for the module `remove_salts` """ import pytest import sys import rdkit from rdkit import Chem from opencadd.compounds.standardization.remove_salts import remove_salts def _evaluation_mol_generator(test_smiles=None, test_inchi=None): """Creates mol files directly with rdkits functions for evaluation.""...
27.222222
122
0.60102
import pytest import sys import rdkit from rdkit import Chem from opencadd.compounds.standardization.remove_salts import remove_salts def _evaluation_mol_generator(test_smiles=None, test_inchi=None): if test_smiles is not None: return Chem.MolFromSmiles(test_smiles) if test_inchi is not None: ...
true
true
f7fd4efe5bd9f0ff30646b471aa32628dc9936d9
16,379
py
Python
lain_admin_cli/node.py
laincloud/lainctl
bbf662f1a0c322cfaa67d2b137516732918df692
[ "MIT" ]
3
2016-05-16T12:36:10.000Z
2017-08-02T09:31:51.000Z
lain_admin_cli/node.py
laincloud/lainctl
bbf662f1a0c322cfaa67d2b137516732918df692
[ "MIT" ]
11
2016-07-29T03:25:36.000Z
2018-01-16T04:28:29.000Z
lain_admin_cli/node.py
laincloud/lainctl
bbf662f1a0c322cfaa67d2b137516732918df692
[ "MIT" ]
9
2016-05-09T08:35:28.000Z
2017-08-02T09:31:54.000Z
# -*- coding: utf-8 -*- from argh import CommandError from argh.decorators import arg, expects_obj from lain_admin_cli.helpers import Node as NodeInfo from lain_admin_cli.helpers import ( yes_or_no, info, warn, error, RemoveException, AddNodeException, _yellow, TwoLevelCommandBase, run_ansible_cmd ) from subpr...
37.14059
124
0.550095
from argh import CommandError from argh.decorators import arg, expects_obj from lain_admin_cli.helpers import Node as NodeInfo from lain_admin_cli.helpers import ( yes_or_no, info, warn, error, RemoveException, AddNodeException, _yellow, TwoLevelCommandBase, run_ansible_cmd ) from subprocess import check_outp...
false
true
f7fd517df867da1766ccaf1ad8a6cc764b67f22e
1,305
py
Python
Advance_Python/Chapter 13. asyncio/5. thread_asyncio.py
pyforspider/LearningLog
ac5988d7fbb0d07d6e7485f9050250af5bcba089
[ "MIT" ]
null
null
null
Advance_Python/Chapter 13. asyncio/5. thread_asyncio.py
pyforspider/LearningLog
ac5988d7fbb0d07d6e7485f9050250af5bcba089
[ "MIT" ]
18
2020-02-12T01:18:12.000Z
2022-03-12T00:42:15.000Z
Advance_Python/Chapter 13. asyncio/5. thread_asyncio.py
pyforspider/LearningLog
ac5988d7fbb0d07d6e7485f9050250af5bcba089
[ "MIT" ]
null
null
null
# 使用多线程: 在协程中集成阻塞io import asyncio import socket import time from concurrent.futures.thread import ThreadPoolExecutor from urllib.parse import urlparse def get_url(url): url = urlparse(url) path = url.path host = url.netloc if path == "": path = "/" # client 为固定写法 client = socket.socket(socket.AF_INET, sock...
25.096154
104
0.696552
import asyncio import socket import time from concurrent.futures.thread import ThreadPoolExecutor from urllib.parse import urlparse def get_url(url): url = urlparse(url) path = url.path host = url.netloc if path == "": path = "/" client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) client.connect((...
true
true
f7fd5247a8ab3f3bdbbbda1cef1fc41df8863351
556
py
Python
day-06/part-2/jon.py
lypnol/adventofcode-2021
8ba277d698e8c59ca9cd554acc135473f5964b87
[ "MIT" ]
6
2021-11-29T15:32:27.000Z
2021-12-10T12:24:26.000Z
day-06/part-2/jon.py
lypnol/adventofcode-2021
8ba277d698e8c59ca9cd554acc135473f5964b87
[ "MIT" ]
9
2021-11-29T15:38:04.000Z
2021-12-13T14:54:16.000Z
day-06/part-2/jon.py
lypnol/adventofcode-2021
8ba277d698e8c59ca9cd554acc135473f5964b87
[ "MIT" ]
3
2021-12-02T19:11:44.000Z
2021-12-22T20:52:47.000Z
from tool.runners.python import SubmissionPy class JonSubmission(SubmissionPy): def run(self, s): l = [0]*9 for x in s.strip().split(","): l[int(x)] += 1 shift = 0 for _ in range(256): l[shift-2] += l[shift] shift = (shift+1) % 9 return...
17.935484
73
0.476619
from tool.runners.python import SubmissionPy class JonSubmission(SubmissionPy): def run(self, s): l = [0]*9 for x in s.strip().split(","): l[int(x)] += 1 shift = 0 for _ in range(256): l[shift-2] += l[shift] shift = (shift+1) % 9 return...
true
true