hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
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
247
max_issues_repo_name
stringlengths
4
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
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
247
max_forks_repo_name
stringlengths
4
125
max_forks_repo_head_hexsha
stringlengths
40
78
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
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
e348cfac18c80bd7b466cf308e654ac0c004c60b
5,977
py
Python
utils/parseHindi.py
anshulsamar/seq
c117cc4b30b3825b20afbdcf25d314b192951dcb
[ "Apache-2.0" ]
null
null
null
utils/parseHindi.py
anshulsamar/seq
c117cc4b30b3825b20afbdcf25d314b192951dcb
[ "Apache-2.0" ]
null
null
null
utils/parseHindi.py
anshulsamar/seq
c117cc4b30b3825b20afbdcf25d314b192951dcb
[ "Apache-2.0" ]
null
null
null
from random import shuffle import random import math import string import sys import os import string import pdb eng_punctuation = string.punctuation + '\xe2\x80\x9c' + '\xe2\x80\x9d' hindi_punctuation = ['\xe0\xa5\xa4'] #danda # words like don't are split into don ' t # This version doesn't do anything about punct...
31.962567
116
0.59913
from random import shuffle import random import math import string import sys import os import string import pdb eng_punctuation = string.punctuation + '\xe2\x80\x9c' + '\xe2\x80\x9d' hindi_punctuation = ['\xe0\xa5\xa4'] #danda # words like don't are split into don ' t def splitSentence(from_sent): split_sent =...
2,360
0
92
601f07a9d220323fc83bfb20cfcc81fe7983dd95
548
py
Python
easy/283. Move Zeroes.py
junyinglucn/leetcode
1fbd0962e4b7dc46b4ed4f0f86778cfedbda72e7
[ "MIT" ]
null
null
null
easy/283. Move Zeroes.py
junyinglucn/leetcode
1fbd0962e4b7dc46b4ed4f0f86778cfedbda72e7
[ "MIT" ]
null
null
null
easy/283. Move Zeroes.py
junyinglucn/leetcode
1fbd0962e4b7dc46b4ed4f0f86778cfedbda72e7
[ "MIT" ]
null
null
null
# Solution A # Solution B
21.92
51
0.421533
# Solution A class Solution: def moveZeroes(self, nums): if not nums: return 0 i = 0 for j in range(len(nums)): if nums[j]: nums[i] = nums[j] i += 1 for j in range(i, len(nums)): nums[j] = 0 # Solution B class Solu...
436
-12
96
f0c559f76ba2dfee10760eeb157eef237ae05544
2,967
py
Python
pypeman/endpoints.py
klausfmh/pypeman
4eabfc537fb9b995480d65f8233f767fe99efcc1
[ "Apache-2.0" ]
6
2016-04-19T15:26:11.000Z
2021-03-16T18:06:53.000Z
pypeman/endpoints.py
mhcomm/pypeman
6583fae28bcb47e3b8091c39a91854ae36172cbd
[ "Apache-2.0" ]
68
2016-05-12T16:10:11.000Z
2022-03-02T01:30:36.000Z
pypeman/endpoints.py
klausfmh/pypeman
4eabfc537fb9b995480d65f8233f767fe99efcc1
[ "Apache-2.0" ]
9
2015-12-23T08:23:03.000Z
2021-09-03T09:22:51.000Z
import asyncio import logging import socket logger = logging.getLogger(__name__) all_endpoints = [] def reset_pypeman_endpoints(): """ clears book keeping of all endpoints Can be useful for unit testing. """ all_endpoints.clear() from pypeman.helpers import lazyload # noqa: E402 wrap = l...
29.376238
99
0.560836
import asyncio import logging import socket logger = logging.getLogger(__name__) all_endpoints = [] def reset_pypeman_endpoints(): """ clears book keeping of all endpoints Can be useful for unit testing. """ all_endpoints.clear() class BaseEndpoint: def __init__(self): all_endpo...
414
1,976
100
162b96b51249301f1c4ae7e666bd60e4bfd68af2
677
py
Python
data/gen_GN.py
leo201313/pysimuComplexNetwork
5ee6b2e61b1b6f587edb2a948cafb4fd869ad8ba
[ "MIT" ]
null
null
null
data/gen_GN.py
leo201313/pysimuComplexNetwork
5ee6b2e61b1b6f587edb2a948cafb4fd869ad8ba
[ "MIT" ]
null
null
null
data/gen_GN.py
leo201313/pysimuComplexNetwork
5ee6b2e61b1b6f587edb2a948cafb4fd869ad8ba
[ "MIT" ]
null
null
null
import networkx as nx import matplotlib.pyplot as plt G_fb = nx.read_edgelist("facebook_combined.txt", create_using = nx.Graph(), nodetype=int) print(nx.info(G_fb)) # if need drawing ps = nx.spring_layout(G_fb) nx.draw(G_fb, ps, with_labels = False, node_size = 5) plt.show() # ps = nx.spring_layout(G_fb) # betCent =...
33.85
89
0.694239
import networkx as nx import matplotlib.pyplot as plt G_fb = nx.read_edgelist("facebook_combined.txt", create_using = nx.Graph(), nodetype=int) print(nx.info(G_fb)) # if need drawing ps = nx.spring_layout(G_fb) nx.draw(G_fb, ps, with_labels = False, node_size = 5) plt.show() # ps = nx.spring_layout(G_fb) # betCent =...
0
0
0
6482b7c2f93f1b8d9a3b2bfa04efecc920a5fabc
1,200
py
Python
path_planning/pyqtgraph_test.py
matthaeusheer/playground
407086c8070cf71280b426db61fbe03034283760
[ "MIT" ]
null
null
null
path_planning/pyqtgraph_test.py
matthaeusheer/playground
407086c8070cf71280b426db61fbe03034283760
[ "MIT" ]
1
2020-11-14T09:42:28.000Z
2020-11-14T09:42:28.000Z
path_planning/pyqtgraph_test.py
matthaeusheer/playground
407086c8070cf71280b426db61fbe03034283760
[ "MIT" ]
null
null
null
from pyqtgraph.Qt import QtGui, QtCore import numpy as np import pyqtgraph as pg import random # Create the main application instance pg.setConfigOption('background', 'w') app = pg.mkQApp() view = pg.PlotWidget() view.resize(800, 600) view.setWindowTitle('Scatter plot using pyqtgraph with PyQT5') view.setAspectLocked...
23.529412
82
0.6875
from pyqtgraph.Qt import QtGui, QtCore import numpy as np import pyqtgraph as pg import random # Create the main application instance pg.setConfigOption('background', 'w') app = pg.mkQApp() view = pg.PlotWidget() view.resize(800, 600) view.setWindowTitle('Scatter plot using pyqtgraph with PyQT5') view.setAspectLocked...
164
0
23
13bf024126f34b18d324f0ca9bb1bb8e2e18d82c
2,229
py
Python
model/train.py
enixjm/pix2code
ad617cbca9d0c39cbecf426cc9fdc6f08059f4d8
[ "Apache-2.0" ]
null
null
null
model/train.py
enixjm/pix2code
ad617cbca9d0c39cbecf426cc9fdc6f08059f4d8
[ "Apache-2.0" ]
null
null
null
model/train.py
enixjm/pix2code
ad617cbca9d0c39cbecf426cc9fdc6f08059f4d8
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python __author__ = 'Tony Beltramelli - www.tonybeltramelli.com' import tensorflow as tf sess = tf.Session(config=tf.ConfigProto(log_device_placement=True)) import sys from classes.dataset.Generator import * from classes.model.pix2code import * if __name__ == "__main__": argv = sys.argv[1:] ...
34.292308
126
0.720054
#!/usr/bin/env python __author__ = 'Tony Beltramelli - www.tonybeltramelli.com' import tensorflow as tf sess = tf.Session(config=tf.ConfigProto(log_device_placement=True)) import sys from classes.dataset.Generator import * from classes.model.pix2code import * def run(input_path, output_path, is_memory_intensive=Fa...
1,351
0
23
557b7f3c6e40e0d49df35a36e2bb1426aaf857c8
2,209
py
Python
chrome/browser/ash/policy/tools/generate_device_policy_remover.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
14,668
2015-01-01T01:57:10.000Z
2022-03-31T23:33:32.000Z
chrome/browser/ash/policy/tools/generate_device_policy_remover.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
86
2015-10-21T13:02:42.000Z
2022-03-14T07:50:50.000Z
chrome/browser/ash/policy/tools/generate_device_policy_remover.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
5,941
2015-01-02T11:32:21.000Z
2022-03-31T16:35:46.000Z
# Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Create function which removes the specified device policies from ChromeDeviceSettingsProto. This function is primarily intended to be used for the impleme...
31.112676
79
0.722952
# Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Create function which removes the specified device policies from ChromeDeviceSettingsProto. This function is primarily intended to be used for the impleme...
1,203
0
23
70c78495a8a8355cdf25a72248ee053acbe5d09e
4,051
py
Python
utility_functions/checkpoint_manager.py
MSREnable/GazeCapture
54f00ab428a7dbb51f8f0c37f22bba6b3cb54726
[ "RSA-MD" ]
15
2019-08-28T22:06:51.000Z
2021-10-08T09:52:13.000Z
utility_functions/checkpoint_manager.py
MSREnable/GazeCapture
54f00ab428a7dbb51f8f0c37f22bba6b3cb54726
[ "RSA-MD" ]
null
null
null
utility_functions/checkpoint_manager.py
MSREnable/GazeCapture
54f00ab428a7dbb51f8f0c37f22bba6b3cb54726
[ "RSA-MD" ]
6
2020-11-18T02:46:55.000Z
2021-07-08T11:12:11.000Z
import math import os import shutil import torch from collections import OrderedDict
41.762887
124
0.655887
import math import os import shutil import torch from collections import OrderedDict def extract_checkpoint_data(args, model): best_rms_error = math.inf epoch = 1 val_rms_errors = [] test_rms_errors = [] train_rms_errors = [] best_rms_errors = [] learning_rates = [] if not args.rese...
3,869
0
92
27a22c03eb1f5ac3a0f550ccf77ba60c76ff7601
1,418
py
Python
subreddit_simulator/database.py
dimitern/SubredditSimulator
b0a43746c688507547646019717ce9e630520f90
[ "MIT" ]
null
null
null
subreddit_simulator/database.py
dimitern/SubredditSimulator
b0a43746c688507547646019717ce9e630520f90
[ "MIT" ]
null
null
null
subreddit_simulator/database.py
dimitern/SubredditSimulator
b0a43746c688507547646019717ce9e630520f90
[ "MIT" ]
null
null
null
import json from logging import getLogger import attr from sqlalchemy import Text, TypeDecorator, create_engine from sqlalchemy.orm import sessionmaker logger = getLogger(__name__) @attr.s(auto_attribs=True)
24.033898
73
0.614951
import json from logging import getLogger import attr from sqlalchemy import Text, TypeDecorator, create_engine from sqlalchemy.orm import sessionmaker logger = getLogger(__name__) class JSONSerialized(TypeDecorator): impl = Text def process_bind_param(self, value, dialect): return json.dumps(value...
811
349
45
bec5a5fbc0c17c5944c8cd04be49c871c91a55a9
651
py
Python
class_setup.py
ilankham/wuss-2019-half-day-class
7b872e5ee294e62c62a20c5cd7b4e441df63f70a
[ "MIT" ]
2
2019-09-04T03:29:12.000Z
2021-03-02T07:22:08.000Z
class_setup.py
ilankham/wuss-2019-half-day-class
7b872e5ee294e62c62a20c5cd7b4e441df63f70a
[ "MIT" ]
null
null
null
class_setup.py
ilankham/wuss-2019-half-day-class
7b872e5ee294e62c62a20c5cd7b4e441df63f70a
[ "MIT" ]
3
2019-09-04T05:57:02.000Z
2019-09-15T21:21:47.000Z
# This modules contains definitions used in Exercise Files from typing import Any def print_with_title( output: Any, title: str = '', linebreaks_before: int = 2, linebreaks_after: int = 2, put_stars_after: bool = True, ) -> None: """ Print linebreak-padded output with a...
23.25
76
0.589862
# This modules contains definitions used in Exercise Files from typing import Any def print_with_title( output: Any, title: str = '', linebreaks_before: int = 2, linebreaks_after: int = 2, put_stars_after: bool = True, ) -> None: """ Print linebreak-padded output with a...
0
0
0
0778ebef3af258a1d259010e5612ff39de977bce
9,513
py
Python
vision/nn/mobilenetv3.py
wooramkang/competition___
5f2e409032f2eddc9d0a8237058129ca2d199b68
[ "MIT" ]
null
null
null
vision/nn/mobilenetv3.py
wooramkang/competition___
5f2e409032f2eddc9d0a8237058129ca2d199b68
[ "MIT" ]
null
null
null
vision/nn/mobilenetv3.py
wooramkang/competition___
5f2e409032f2eddc9d0a8237058129ca2d199b68
[ "MIT" ]
null
null
null
'''MobileNetV3 in PyTorch. See the paper "Inverted Residuals and Linear Bottlenecks: Mobile Networks for Classification, Detection and Segmentation" for more details. ''' import torch import torch.nn as nn import torch.nn.functional as F from torch.nn import init import os import sys sys.path.append(".") from meta_ut...
36.588462
130
0.589089
'''MobileNetV3 in PyTorch. See the paper "Inverted Residuals and Linear Bottlenecks: Mobile Networks for Classification, Detection and Segmentation" for more details. ''' import torch import torch.nn as nn import torch.nn.functional as F from torch.nn import init import os import sys sys.path.append(".") from meta_ut...
7,913
41
478
0ee0394192b51c955a40df3785735b6429d88380
5,445
py
Python
google/cloud/aiplatform/v1beta1/schema/trainingjob/definition_v1beta1/types/automl_image_classification.py
ivanmkc/python-aiplatform
151ed11f6da8e3e0bee5749d360d9a4b135ad988
[ "Apache-2.0" ]
null
null
null
google/cloud/aiplatform/v1beta1/schema/trainingjob/definition_v1beta1/types/automl_image_classification.py
ivanmkc/python-aiplatform
151ed11f6da8e3e0bee5749d360d9a4b135ad988
[ "Apache-2.0" ]
null
null
null
google/cloud/aiplatform/v1beta1/schema/trainingjob/definition_v1beta1/types/automl_image_classification.py
ivanmkc/python-aiplatform
151ed11f6da8e3e0bee5749d360d9a4b135ad988
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
37.8125
118
0.673462
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
0
0
0
498ed27d25aaf7bb70dce790b84d513d20aa617b
106
py
Python
code/fakeRPi/__init__.py
BubiDevs/MagnumPi
820038f7997379f0190c527914adbe2e2b615bb5
[ "MIT" ]
2
2018-08-09T10:35:42.000Z
2020-12-04T06:38:09.000Z
code/fakeRPi/__init__.py
BubiDevs/MagnumPi
820038f7997379f0190c527914adbe2e2b615bb5
[ "MIT" ]
2
2018-08-22T08:02:16.000Z
2019-12-05T08:23:31.000Z
code/fakeRPi/__init__.py
BubiDevs/MagnumPi
820038f7997379f0190c527914adbe2e2b615bb5
[ "MIT" ]
null
null
null
""" This package is used to simulate RPi.GPIO library during development or if GPIO are not available. """
35.333333
98
0.764151
""" This package is used to simulate RPi.GPIO library during development or if GPIO are not available. """
0
0
0
3231a1157ec2cc99477ddef20110685bb4430f56
2,155
py
Python
tools/python/insert_descriptions.py
dhis2/dhis2-api-specification
bdef355508ec150be4bf0b4346b8b0d6a8e665b5
[ "BSD-3-Clause" ]
5
2019-08-30T09:56:27.000Z
2021-02-22T11:08:34.000Z
tools/python/insert_descriptions.py
dhis2/dhis2-api-specification
bdef355508ec150be4bf0b4346b8b0d6a8e665b5
[ "BSD-3-Clause" ]
null
null
null
tools/python/insert_descriptions.py
dhis2/dhis2-api-specification
bdef355508ec150be4bf0b4346b8b0d6a8e665b5
[ "BSD-3-Clause" ]
6
2018-10-12T07:50:11.000Z
2020-10-18T05:39:49.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Apr 18 15:34:25 2018 @author: philld """ import requests import json import re specfile="../../docs/spec/src/info_openapi.json" #docsfile="../../docs/input/web_api.cm" docsfile="/home/philld/reps/dhis2-docs/src/commonmark/en/content/developer/web-api...
25.05814
121
0.49884
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Apr 18 15:34:25 2018 @author: philld """ import requests import json import re specfile="../../docs/spec/src/info_openapi.json" #docsfile="../../docs/input/web_api.cm" docsfile="/home/philld/reps/dhis2-docs/src/commonmark/en/content/developer/web-api...
1,455
0
69
edc42480a50e42e688504cc06387909d1322efa2
1,471
py
Python
src/compas_singular/rhino/geometry/curve.py
tkmmark/compas_pattern
50528a4f9d6a253e9b7864eae482d04490761a74
[ "MIT" ]
6
2019-02-12T17:49:41.000Z
2020-04-15T10:28:49.000Z
src/compas_singular/rhino/geometry/curve.py
tkmmark/compas_pattern
50528a4f9d6a253e9b7864eae482d04490761a74
[ "MIT" ]
3
2020-07-01T13:45:44.000Z
2020-10-07T14:40:52.000Z
src/compas_singular/rhino/geometry/curve.py
tkmmark/compas_pattern
50528a4f9d6a253e9b7864eae482d04490761a74
[ "MIT" ]
6
2019-02-21T11:20:19.000Z
2020-04-02T10:20:00.000Z
from __future__ import print_function from __future__ import absolute_import from __future__ import division import rhinoscriptsyntax as rs from compas_rhino.geometry import RhinoCurve __all__ = [ 'RhinoCurve' ]
27.240741
107
0.601632
from __future__ import print_function from __future__ import absolute_import from __future__ import division import rhinoscriptsyntax as rs from compas_rhino.geometry import RhinoCurve __all__ = [ 'RhinoCurve' ] class RhinoCurve(RhinoCurve): def __init__(self): super(RhinoCurve, self).__init__() ...
941
287
23
5852391e230d4b53f1a5d88b39b5c71c7f25ba44
467
py
Python
casedetails/serializers.py
LABETE/TestYourProject
416d5e7993343e42f031e48f4d78e5332d698519
[ "BSD-3-Clause" ]
null
null
null
casedetails/serializers.py
LABETE/TestYourProject
416d5e7993343e42f031e48f4d78e5332d698519
[ "BSD-3-Clause" ]
null
null
null
casedetails/serializers.py
LABETE/TestYourProject
416d5e7993343e42f031e48f4d78e5332d698519
[ "BSD-3-Clause" ]
null
null
null
from rest_framework import serializers from .models import CaseDetail class CaseDetailSerializer(serializers.ModelSerializer): """CaseDetailSerializer use the CaseDetail Model"""
29.1875
62
0.655246
from rest_framework import serializers from .models import CaseDetail class CaseDetailSerializer(serializers.ModelSerializer): """CaseDetailSerializer use the CaseDetail Model""" class Meta: model = CaseDetail # Fields displayed on the rest api for casedetails fields = ( ...
0
254
26
7eaede2556eae82c47ba4345831762e978e83739
547
py
Python
kloudless/auth.py
theonlybex/kloudless-python
3e00b4659e5f790a9129e858b19d0bf283cd8e1c
[ "MIT" ]
28
2015-08-25T06:13:44.000Z
2022-02-17T03:39:18.000Z
kloudless/auth.py
theonlybex/kloudless-python
3e00b4659e5f790a9129e858b19d0bf283cd8e1c
[ "MIT" ]
11
2015-09-15T07:31:02.000Z
2021-02-09T10:30:13.000Z
kloudless/auth.py
theonlybex/kloudless-python
3e00b4659e5f790a9129e858b19d0bf283cd8e1c
[ "MIT" ]
8
2015-02-17T23:45:06.000Z
2021-09-05T09:51:51.000Z
from __future__ import unicode_literals from requests import auth
17.09375
59
0.66362
from __future__ import unicode_literals from requests import auth class BaseAuth(auth.AuthBase): def __init__(self, key): self.key = key @property def scheme(self): raise NotImplementedError @property def auth_header(self): return '{} {}'.format(self.scheme, self.key) ...
200
208
69
4f209a3661740bb773beeff9691143e7078681ef
343
py
Python
PYROCKO/mom_to_sdr.py
alirezaniki/DPSA
24c6bbb51e3b27721d63140fd46dadd855e0f2b8
[ "MIT" ]
4
2018-06-13T23:50:13.000Z
2021-09-25T16:27:34.000Z
PYROCKO/mom_to_sdr.py
alirezaniki/DPSA
24c6bbb51e3b27721d63140fd46dadd855e0f2b8
[ "MIT" ]
null
null
null
PYROCKO/mom_to_sdr.py
alirezaniki/DPSA
24c6bbb51e3b27721d63140fd46dadd855e0f2b8
[ "MIT" ]
null
null
null
from pyrocko import moment_tensor as mtm magnitude = 5.4 exp = mtm.magnitude_to_moment(magnitude) # convert the mag to moment in [Nm] # init pyrocko moment tensor m = mtm.MomentTensor( mnn = 0.04*exp, mee = 0.6*exp, mdd = -0.63*exp, mne = 0.04*exp, mnd = 0.5*exp, med = 0.21*exp) print(m) #...
18.052632
77
0.638484
from pyrocko import moment_tensor as mtm magnitude = 5.4 exp = mtm.magnitude_to_moment(magnitude) # convert the mag to moment in [Nm] # init pyrocko moment tensor m = mtm.MomentTensor( mnn = 0.04*exp, mee = 0.6*exp, mdd = -0.63*exp, mne = 0.04*exp, mnd = 0.5*exp, med = 0.21*exp) print(m) #...
0
0
0
ba371eaf23d5032469dfe1818f54ece09f6d0052
1,384
py
Python
tests/Custom/app.py
bcsummers/falcon-provider-logger
c91573d6f8906c3e7e76bd00738c96f3f311d9d1
[ "Apache-2.0" ]
1
2020-08-03T18:09:46.000Z
2020-08-03T18:09:46.000Z
tests/Custom/app.py
bcsummers/falcon-provider-logger
c91573d6f8906c3e7e76bd00738c96f3f311d9d1
[ "Apache-2.0" ]
null
null
null
tests/Custom/app.py
bcsummers/falcon-provider-logger
c91573d6f8906c3e7e76bd00738c96f3f311d9d1
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """Falcon app used for testing.""" # standard library import logging from typing import Any # third-party import falcon # first-party from falcon_provider_logger.middleware import LoggerMiddleware class LoggerCustomLoggerResource: """Logger middleware testing resource.""" log = None...
31.454545
76
0.642341
# -*- coding: utf-8 -*- """Falcon app used for testing.""" # standard library import logging from typing import Any # third-party import falcon # first-party from falcon_provider_logger.middleware import LoggerMiddleware class LoggerCustomLoggerResource: """Logger middleware testing resource.""" log = None...
0
0
0
2504132d12d78a2baab76691825092820fad4917
4,063
py
Python
poshan_didi_bot.py
dimagi/poshan-didi-server
dde1b3008c6ba9febf781f3df702ef91ee4b25f8
[ "BSD-3-Clause" ]
2
2019-06-14T11:37:37.000Z
2020-04-16T08:30:43.000Z
poshan_didi_bot.py
dimagi/poshan-didi-server
dde1b3008c6ba9febf781f3df702ef91ee4b25f8
[ "BSD-3-Clause" ]
5
2020-01-28T22:44:22.000Z
2022-02-10T00:10:07.000Z
poshan_didi_bot.py
dimagi/poshan-didi-server
dde1b3008c6ba9febf781f3df702ef91ee4b25f8
[ "BSD-3-Clause" ]
1
2020-12-03T19:48:28.000Z
2020-12-03T19:48:28.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Poshan Didi! """ import logging import logging.handlers import beneficiary_bot import nurse_bot from telegram.ext import Updater, CommandHandler, MessageHandler, Filters from simple_settings import settings from registration import registration_conversation # Enable...
38.695238
105
0.679793
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Poshan Didi! """ import logging import logging.handlers import beneficiary_bot import nurse_bot from telegram.ext import Updater, CommandHandler, MessageHandler, Filters from simple_settings import settings from registration import registration_conversation # Enable...
0
0
0
445b411ea6aba700be77b4ec60ac04e0382d24d7
94,119
py
Python
curiosity/interaction/models.py
neuroailab/curiosity_deprecated
65f7cde13b07cdac52eed39535a94e7544c396b8
[ "Apache-2.0" ]
null
null
null
curiosity/interaction/models.py
neuroailab/curiosity_deprecated
65f7cde13b07cdac52eed39535a94e7544c396b8
[ "Apache-2.0" ]
2
2017-11-18T00:53:33.000Z
2017-11-18T00:53:40.000Z
curiosity/interaction/models.py
neuroailab/curiosity_deprecated
65f7cde13b07cdac52eed39535a94e7544c396b8
[ "Apache-2.0" ]
null
null
null
''' Policy and intrinsic reward models. ''' import numpy as np import tensorflow as tf from curiosity.models.model_building_blocks import ConvNetwithBypasses from curiosity.models import explicit_future_prediction_base as fp_base from curiosity.models import jerk_models import distutils.version use_tf1 = distutils.ve...
45.446161
239
0.591772
''' Policy and intrinsic reward models. ''' import numpy as np import tensorflow as tf from curiosity.models.model_building_blocks import ConvNetwithBypasses from curiosity.models import explicit_future_prediction_base as fp_base from curiosity.models import jerk_models import distutils.version use_tf1 = distutils.ve...
83,499
127
1,629
f285b53393c80a26f933621bf1ae088ff4e1744b
20
py
Python
part1/__init__.py
gdhGaoFei/Python01
a9fef5290479d575725e2ddbb83c5f2d192606c6
[ "MIT" ]
1
2019-06-22T23:27:48.000Z
2019-06-22T23:27:48.000Z
part1/__init__.py
gdhGaoFei/Python01
a9fef5290479d575725e2ddbb83c5f2d192606c6
[ "MIT" ]
null
null
null
part1/__init__.py
gdhGaoFei/Python01
a9fef5290479d575725e2ddbb83c5f2d192606c6
[ "MIT" ]
null
null
null
print("part1包被导入了~")
20
20
0.75
print("part1包被导入了~")
0
0
0
4c31524748798164fb9eae86397590e6f331b78e
3,554
py
Python
pipeline/models/User.py
FlyGoat/BangumiN
3fbf95886b116650820f5fbf4672d771fd1e5aae
[ "MIT" ]
56
2018-09-26T05:03:51.000Z
2022-02-16T12:27:46.000Z
pipeline/models/User.py
FlyGoat/BangumiN
3fbf95886b116650820f5fbf4672d771fd1e5aae
[ "MIT" ]
25
2018-08-14T05:33:29.000Z
2022-02-13T00:50:21.000Z
pipeline/models/User.py
FlyGoat/BangumiN
3fbf95886b116650820f5fbf4672d771fd1e5aae
[ "MIT" ]
5
2019-08-05T03:59:01.000Z
2022-01-07T06:44:12.000Z
from dictdiffer import diff from sqlalchemy import Column, Integer, String from sqlalchemy.dialects.postgresql import JSONB from sqlalchemy.ext.declarative import declarative_base Base = declarative_base()
33.847619
119
0.619021
from dictdiffer import diff from sqlalchemy import Column, Integer, String from sqlalchemy.dialects.postgresql import JSONB from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class User(Base): __tablename__ = 'user' MAX_NAME_LENGTH = 100 MAX_SIGN_LENGTH = 200 MAX_URL_L...
195
3,128
23
2424f44d4a7d2f813ed93006a67acd97aaa9bb66
1,067
py
Python
base64/komand_base64/actions/decode/action.py
xhennessy-r7/insightconnect-plugins
59268051313d67735b5dd3a30222eccb92aca8e9
[ "MIT" ]
6
2020-11-10T03:07:00.000Z
2022-02-24T18:07:57.000Z
base64/komand_base64/actions/decode/action.py
xhennessy-r7/insightconnect-plugins
59268051313d67735b5dd3a30222eccb92aca8e9
[ "MIT" ]
17
2020-01-21T16:02:04.000Z
2022-01-12T15:11:26.000Z
base64/komand_base64/actions/decode/action.py
xhennessy-r7/insightconnect-plugins
59268051313d67735b5dd3a30222eccb92aca8e9
[ "MIT" ]
2
2020-12-26T11:33:23.000Z
2021-09-30T22:22:43.000Z
import komand from .schema import DecodeInput, DecodeOutput import base64
31.382353
73
0.554827
import komand from .schema import DecodeInput, DecodeOutput import base64 class Decode(komand.Action): def __init__(self): super(self.__class__, self).__init__( name='decode', description='Decode Base64 to data', input=DecodeInput(), output=...
881
7
104
c6dcf725bd23764de094f21a2a52e9e26e955427
1,982
py
Python
augmentation/postprocessor.py
abamaxa/docvision_generator
8017f29c7d908cb80ddcd59e345a222271fa74de
[ "MIT" ]
2
2020-02-06T17:30:41.000Z
2020-08-04T10:35:46.000Z
augmentation/postprocessor.py
abamaxa/docvision_generator
8017f29c7d908cb80ddcd59e345a222271fa74de
[ "MIT" ]
null
null
null
augmentation/postprocessor.py
abamaxa/docvision_generator
8017f29c7d908cb80ddcd59e345a222271fa74de
[ "MIT" ]
null
null
null
import os import shutil import json import time import cv2 import numpy as np import PIL if __name__ == '__main__' : erode_all(True)
29.58209
88
0.639758
import os import shutil import json import time import cv2 import numpy as np import PIL def convert_image_to_numpy(image) : (im_width, im_height) = image.size image_np = np.fromstring(image.tobytes(), dtype='uint8', count=-1, sep='') array_shape = (im_height, im_width, int(image_np.shape[0] / (im_height...
1,726
0
117
1f5f867f3aa5f7e0ba66ce34207df1dc5f2a5fb9
1,636
py
Python
05_boarding.py
seanbechhofer/advent_of_code_2020
1684b3cab4d8f1792a62a4aa5f18094d6d8b0aad
[ "CC0-1.0" ]
null
null
null
05_boarding.py
seanbechhofer/advent_of_code_2020
1684b3cab4d8f1792a62a4aa5f18094d6d8b0aad
[ "CC0-1.0" ]
null
null
null
05_boarding.py
seanbechhofer/advent_of_code_2020
1684b3cab4d8f1792a62a4aa5f18094d6d8b0aad
[ "CC0-1.0" ]
null
null
null
import sys import unittest import re from operator import itemgetter import argparse import traceback # print arg if __name__=='__main__': codes = [] for line in sys.stdin: codes.append(line.strip()) print(part_one(codes)) print(part_two(codes))
25.968254
90
0.562958
import sys import unittest import re from operator import itemgetter import argparse import traceback class TestStuff(unittest.TestCase): def data(self): return [("FBFBBFFRLR",44,5,357), ("BFFFBBFRRR", 70,7,567), ("FFFBBBFRRR",14,7,119), ...
1,072
14
274
168126d2820d2157fdd1ef197a9231cf648a48f9
3,613
py
Python
fairseq/models/pronouns.py
liufly/refreader
25d371fc08d89174cfdac1c7e29984d8cb3beff2
[ "BSD-3-Clause" ]
19
2019-07-18T21:38:38.000Z
2020-10-24T09:23:37.000Z
fairseq/models/pronouns.py
liufly/refreader
25d371fc08d89174cfdac1c7e29984d8cb3beff2
[ "BSD-3-Clause" ]
1
2019-11-29T02:58:08.000Z
2019-12-01T06:11:16.000Z
fairseq/models/pronouns.py
liufly/refreader
25d371fc08d89174cfdac1c7e29984d8cb3beff2
[ "BSD-3-Clause" ]
2
2019-12-18T11:37:39.000Z
2020-02-04T16:23:20.000Z
from collections import defaultdict # name list obtained from: https://www.ssa.gov/oact/babynames/decades/century.html # accessed on Nov 6th, 2018 if __name__ == '__main__': lex = PronounLexicon() all_words = lex.all_words() in_file_path = "data/CBTest/data/cbt_train.txt" all_lens = [] all_gaps = ...
35.421569
104
0.549405
from collections import defaultdict # name list obtained from: https://www.ssa.gov/oact/babynames/decades/century.html # accessed on Nov 6th, 2018 class PronounLexicon(): def __init__(self, lexfile='pronouns.tsv'): self.lexicon = defaultdict(lambda : []) with open(lexfile) as fin: for ...
1,928
409
50
9b8cd41c9a88310c1ecf7675400e3a30e40f64f5
547
py
Python
EasyView/migrations/0008_viewpoint_fov.py
technoborsch/AtomREST
7cdcb79cded8f6f7ee4c56890ab99e99bdfb7adb
[ "CC0-1.0" ]
null
null
null
EasyView/migrations/0008_viewpoint_fov.py
technoborsch/AtomREST
7cdcb79cded8f6f7ee4c56890ab99e99bdfb7adb
[ "CC0-1.0" ]
null
null
null
EasyView/migrations/0008_viewpoint_fov.py
technoborsch/AtomREST
7cdcb79cded8f6f7ee4c56890ab99e99bdfb7adb
[ "CC0-1.0" ]
null
null
null
# Generated by Django 3.2.2 on 2021-06-29 09:49 import django.core.validators from django.db import migrations, models
27.35
169
0.669104
# Generated by Django 3.2.2 on 2021-06-29 09:49 import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('EasyView', '0007_viewpoint_clip_constants_status'), ] operations = [ migrations.AddField( model_na...
0
403
23
d31eb94754bb97b7c63aef350da8ea3fdf10c568
70
py
Python
jacdac/button/__init__.py
microsoft/jacdac-python
712ad5559e29065f5eccb5dbfe029c039132df5a
[ "MIT" ]
1
2022-02-15T21:30:36.000Z
2022-02-15T21:30:36.000Z
jacdac/button/__init__.py
microsoft/jacdac-python
712ad5559e29065f5eccb5dbfe029c039132df5a
[ "MIT" ]
null
null
null
jacdac/button/__init__.py
microsoft/jacdac-python
712ad5559e29065f5eccb5dbfe029c039132df5a
[ "MIT" ]
1
2022-02-08T19:32:45.000Z
2022-02-08T19:32:45.000Z
# Autogenerated file. from .client import ButtonClient # type: ignore
23.333333
47
0.785714
# Autogenerated file. from .client import ButtonClient # type: ignore
0
0
0
868d426e9569bb6634ef8b4f72fc5b8acd6b361f
1,938
py
Python
apps/findings/management/commands/import_vulnerability_templates.py
l3l3l/vulnman
f9d520dbf9f6838c459741bb1173a0382d5ecfd6
[ "MIT" ]
null
null
null
apps/findings/management/commands/import_vulnerability_templates.py
l3l3l/vulnman
f9d520dbf9f6838c459741bb1173a0382d5ecfd6
[ "MIT" ]
null
null
null
apps/findings/management/commands/import_vulnerability_templates.py
l3l3l/vulnman
f9d520dbf9f6838c459741bb1173a0382d5ecfd6
[ "MIT" ]
null
null
null
import yaml import os from pathlib import Path from django.conf import settings from django.core.management.base import BaseCommand from apps.findings import models
41.234043
184
0.645511
import yaml import os from pathlib import Path from django.conf import settings from django.core.management.base import BaseCommand from apps.findings import models class Command(BaseCommand): help = 'Import vulnerability templates from JSON file' def add_arguments(self, parser): parser.add_argument(...
1,548
201
23
3971d41dd74aa8b1d61ef664ed7ac809a3618325
1,153
py
Python
easymode/tests/testcases/testimportall.py
TGoldR/internationalize
802e918b41835a7d5406f33cebaff1bdf486649b
[ "MIT" ]
null
null
null
easymode/tests/testcases/testimportall.py
TGoldR/internationalize
802e918b41835a7d5406f33cebaff1bdf486649b
[ "MIT" ]
null
null
null
easymode/tests/testcases/testimportall.py
TGoldR/internationalize
802e918b41835a7d5406f33cebaff1bdf486649b
[ "MIT" ]
null
null
null
import sys from django.test import TestCase error_while_importing = None try: from easymode import * from easymode.admin import * from easymode.admin.forms import * from easymode.admin.models import * from easymode.debug import * from easymode.i18n import * from easymode.i18n.admin import ...
32.027778
83
0.711188
import sys from django.test import TestCase error_while_importing = None try: from easymode import * from easymode.admin import * from easymode.admin.forms import * from easymode.admin.models import * from easymode.debug import * from easymode.i18n import * from easymode.i18n.admin import ...
0
0
0
17f0d3a778365e7cf4affd00494092615fedf153
102
py
Python
arcade/intro/d. 36. different-symbols-naive/different_symbols_naive.py
jeury301/code-fights
379dd541aed0f3918cf1659b635ec51368b0b349
[ "MIT" ]
null
null
null
arcade/intro/d. 36. different-symbols-naive/different_symbols_naive.py
jeury301/code-fights
379dd541aed0f3918cf1659b635ec51368b0b349
[ "MIT" ]
null
null
null
arcade/intro/d. 36. different-symbols-naive/different_symbols_naive.py
jeury301/code-fights
379dd541aed0f3918cf1659b635ec51368b0b349
[ "MIT" ]
null
null
null
from collections import Counter
25.5
39
0.764706
from collections import Counter def differentSymbolsNaive(s): return len(dict(Counter(s)).keys())
48
0
22
1089085b26dac1cefaeed0f7ba6549de5f2202fb
2,107
py
Python
viewmodels/home/indexviewmodel.py
prcutler/circuitpythonshow
9e6ecf416cd8c9fe4625fb9ebac2f5688f73ade7
[ "MIT" ]
3
2022-01-11T04:06:38.000Z
2022-02-21T13:12:20.000Z
viewmodels/home/indexviewmodel.py
prcutler/circuitpythonshow
9e6ecf416cd8c9fe4625fb9ebac2f5688f73ade7
[ "MIT" ]
8
2022-01-22T16:51:46.000Z
2022-03-31T15:34:11.000Z
viewmodels/home/indexviewmodel.py
prcutler/circuitpythonshow
9e6ecf416cd8c9fe4625fb9ebac2f5688f73ade7
[ "MIT" ]
1
2022-01-14T15:24:48.000Z
2022-01-14T15:24:48.000Z
from starlette.requests import Request from typing import List, Optional from viewmodels.shared.viewmodel import ViewModelBase from services import episode_service from data.episode import Episode
33.983871
95
0.687708
from starlette.requests import Request from typing import List, Optional from viewmodels.shared.viewmodel import ViewModelBase from services import episode_service from data.episode import Episode class IndexViewModel(ViewModelBase): def __init__(self, request: Request): super().__init__(request) ...
1,815
15
76
4a957084737ee6e07aec48c0b2028bfbead767f9
16,779
py
Python
wal_steam.py
thereal-S/wal_steam
0524c0fe5c392b8784d68a692153da8155bd0cd2
[ "MIT" ]
177
2017-08-18T10:22:21.000Z
2022-03-06T23:20:12.000Z
wal_steam.py
thereal-S/wal_steam
0524c0fe5c392b8784d68a692153da8155bd0cd2
[ "MIT" ]
77
2017-08-18T00:40:15.000Z
2022-02-11T18:52:10.000Z
wal_steam.py
thereal-S/wal_steam
0524c0fe5c392b8784d68a692153da8155bd0cd2
[ "MIT" ]
36
2017-08-23T02:34:14.000Z
2022-01-03T13:12:02.000Z
#!/usr/bin/env python3 """ Wal Steam ======================================== oooo oooo . `888 .8P' .o8 888 d8' .ooooo. .o888oo .oooo. 88888[ d88' `88b 888 `P )88b 888`88b. 888 888 888 .oP"888 888 `88b. 888 888 888 . d8( 888 o888o o888o `Y8bod8P' ...
33.491018
181
0.630312
#!/usr/bin/env python3 """ Wal Steam ======================================== oooo oooo . `888 .8P' .o8 888 d8' .ooooo. .o888oo .oooo. 88888[ d88' `88b 888 `P )88b 888`88b. 888 888 888 .oP"888 888 `88b. 888 888 888 . d8( 888 o888o o888o `Y8bod8P' ...
12,920
0
505
2ccfa7cbd536230e887665371eaf8ff4ae36b4f9
200
py
Python
utils/network.py
buckyroberts/Discord-Python-Framework
8731e9a01c2e2f83af9882838ad809696fe89e22
[ "MIT" ]
10
2021-10-04T01:21:51.000Z
2021-11-17T09:26:17.000Z
utils/network.py
buckyroberts/Discord-Python-Framework
8731e9a01c2e2f83af9882838ad809696fe89e22
[ "MIT" ]
1
2021-10-04T01:38:15.000Z
2021-10-04T01:38:15.000Z
utils/network.py
buckyroberts/Discord-Python-Framework
8731e9a01c2e2f83af9882838ad809696fe89e22
[ "MIT" ]
2
2021-11-20T14:41:56.000Z
2022-02-09T18:49:29.000Z
import requests def fetch(*, url, headers): """ Send a GET request and return response as Python object """ response = requests.get(url, headers=headers) return response.json()
18.181818
59
0.66
import requests def fetch(*, url, headers): """ Send a GET request and return response as Python object """ response = requests.get(url, headers=headers) return response.json()
0
0
0
49792b33f19afed9efddc9395343ced3da2f19b6
2,942
py
Python
predict/helper.py
xjh19971/Autodetection
b88a320d23d943d391d90603ae18369d89bc8385
[ "MIT" ]
2
2020-06-04T20:41:30.000Z
2021-07-01T21:28:06.000Z
predict/helper.py
xjh19971/Autodetection
b88a320d23d943d391d90603ae18369d89bc8385
[ "MIT" ]
null
null
null
predict/helper.py
xjh19971/Autodetection
b88a320d23d943d391d90603ae18369d89bc8385
[ "MIT" ]
null
null
null
import torch from shapely.geometry import Polygon
33.816092
108
0.646839
import torch from shapely.geometry import Polygon def convert_map_to_lane_map(ego_map, binary_lane): mask = (ego_map[0, :, :] == ego_map[1, :, :]) * (ego_map[1, :, :] == ego_map[2, :, :]) + ( ego_map[0, :, :] == 250 / 255) if binary_lane: return (~ mask) return ego_map * (~ mask.view...
2,723
0
161
3da24ba73dbb35056c554b2c9b424a1f2befb527
1,453
py
Python
run_scripts/gds_import.py
zhaokai-l/bag
a496368ad8fc92ff0f5bf3bfb4ebaa45c540a104
[ "Apache-2.0", "BSD-3-Clause" ]
32
2019-05-16T19:25:00.000Z
2021-12-07T20:12:13.000Z
run_scripts/gds_import.py
zhaokai-l/bag
a496368ad8fc92ff0f5bf3bfb4ebaa45c540a104
[ "Apache-2.0", "BSD-3-Clause" ]
1
2021-01-07T03:08:33.000Z
2021-01-07T03:08:33.000Z
run_scripts/gds_import.py
zhaokai-l/bag
a496368ad8fc92ff0f5bf3bfb4ebaa45c540a104
[ "Apache-2.0", "BSD-3-Clause" ]
11
2019-07-23T17:37:48.000Z
2021-10-19T15:24:33.000Z
# SPDX-License-Identifier: Apache-2.0 # Copyright 2019 Blue Cheetah Analog Design 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 # # U...
29.653061
81
0.722643
# SPDX-License-Identifier: Apache-2.0 # Copyright 2019 Blue Cheetah Analog Design 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 # # U...
365
0
46
8f70e1a6887b98e59c86a33ce0edc6d78eddf21a
523
py
Python
instagram.py
abhi-s28/InstaFlask
ded93f75795d5bdcc9d9f06dac3bda094516e7cc
[ "MIT" ]
null
null
null
instagram.py
abhi-s28/InstaFlask
ded93f75795d5bdcc9d9f06dac3bda094516e7cc
[ "MIT" ]
null
null
null
instagram.py
abhi-s28/InstaFlask
ded93f75795d5bdcc9d9f06dac3bda094516e7cc
[ "MIT" ]
1
2020-10-01T03:30:42.000Z
2020-10-01T03:30:42.000Z
#!/usr/bin/env python3 import argparse import re import sys import requests
21.791667
57
0.594646
#!/usr/bin/env python3 import argparse import re import sys import requests def getID(username): url = "https://www.instagram.com/{}" r = requests.get(url.format(username)) html = r.text if r.ok: return re.findall('"id":"(.*?)",', html)[0] else: return "invalid_username" def userDe...
401
0
46
af41a834d1cccc2cce84e521eb37ee8cfb3a792d
2,123
py
Python
cloudformation/add_cloudflare_ips_to_sgs.py
juliecentofanti172/juliecentofanti.github.io
446ea8522b9f4a6709124ebb6e0f675acf7fe205
[ "CC0-1.0" ]
134
2018-05-23T14:00:29.000Z
2022-03-10T15:47:53.000Z
cloudformation/add_cloudflare_ips_to_sgs.py
ptrourke/concordia
56ff364dbf38cb8a763df489479821fe43b76d69
[ "CC0-1.0" ]
1,104
2018-05-22T20:18:22.000Z
2022-03-31T17:28:40.000Z
cloudformation/add_cloudflare_ips_to_sgs.py
ptrourke/concordia
56ff364dbf38cb8a763df489479821fe43b76d69
[ "CC0-1.0" ]
32
2018-05-22T20:22:38.000Z
2021-12-21T14:11:44.000Z
#!/usr/bin/env python3 """ Ensure that every security group tagged with “AllowCloudFlareIngress” has permissions for every public CloudFlare netblock """ import sys import boto3 import requests from botocore.exceptions import ClientError EC2_CLIENT = boto3.client("ec2") CLOUDFLARE_IPV4 = requests.get("https://www.c...
30.328571
87
0.681583
#!/usr/bin/env python3 """ Ensure that every security group tagged with “AllowCloudFlareIngress” has permissions for every public CloudFlare netblock """ import sys import boto3 import requests from botocore.exceptions import ClientError EC2_CLIENT = boto3.client("ec2") CLOUDFLARE_IPV4 = requests.get("https://www.c...
1,449
0
46
8081ee348f5ac1ea91c76d0d12aed0bb2eb67a0b
7,391
py
Python
ads/piccolo_migrations/2020-10-04T21:27:16.py
sinisaos/starlette-piccolo-rental
c837756c7930e058ea341c67285d0c38f005b007
[ "MIT" ]
3
2020-10-08T09:37:03.000Z
2022-03-29T04:05:42.000Z
ads/piccolo_migrations/2020-10-04T21:27:16.py
sinisaos/starlette-piccolo-rental
c837756c7930e058ea341c67285d0c38f005b007
[ "MIT" ]
null
null
null
ads/piccolo_migrations/2020-10-04T21:27:16.py
sinisaos/starlette-piccolo-rental
c837756c7930e058ea341c67285d0c38f005b007
[ "MIT" ]
null
null
null
from piccolo.apps.migrations.auto import MigrationManager from piccolo.columns.base import OnDelete, OnUpdate from piccolo.columns.defaults.timestamp import TimestampNow from piccolo.table import Table ID = "2020-10-04T21:27:16" VERSION = "0.13.4"
25.139456
63
0.492085
from piccolo.apps.migrations.auto import MigrationManager from piccolo.columns.base import OnDelete, OnUpdate from piccolo.columns.defaults.timestamp import TimestampNow from piccolo.table import Table class Ad(Table, tablename="ad"): pass class User(Table, tablename="piccolo_user"): pass ID = "2020-10-04...
7,017
52
69
470d82fe0f9ff4d06e37cfd357a2fd5d5db8cc6b
2,024
py
Python
lunar_python/SolarSeason.py
AD189/lunar-python
2463c7b493e67895476c11cf1a12ff146f2d54e4
[ "MIT" ]
2
2021-03-12T10:36:16.000Z
2021-04-03T09:45:54.000Z
lunar_python/SolarSeason.py
AD189/lunar-python
2463c7b493e67895476c11cf1a12ff146f2d54e4
[ "MIT" ]
null
null
null
lunar_python/SolarSeason.py
AD189/lunar-python
2463c7b493e67895476c11cf1a12ff146f2d54e4
[ "MIT" ]
1
2021-03-08T13:31:53.000Z
2021-03-08T13:31:53.000Z
# -*- coding: utf-8 -*- from math import ceil from .SolarMonth import SolarMonth class SolarSeason: """ 阳历季度 """ MONTH_COUNT = 3 @staticmethod @staticmethod def getIndex(self): """ 获取当月是第几季度 :return: 季度序号,从1开始 """ return int(ceil(self.__month * ...
23.811765
93
0.51581
# -*- coding: utf-8 -*- from math import ceil from .SolarMonth import SolarMonth class SolarSeason: """ 阳历季度 """ MONTH_COUNT = 3 def __init__(self, year, month): self.__year = year self.__month = month @staticmethod def fromDate(date): return SolarSeason(date.ye...
371
0
214
1ef5269a29ed14f340b7b35a1d453fbf4107d653
418
py
Python
dedupper/migrations/0004_auto_20181024_1902.py
anthowen/duplify
846d01c1b21230937fdf0281b0cf8c0b08a8c24e
[ "MIT" ]
1
2019-04-21T18:57:57.000Z
2019-04-21T18:57:57.000Z
dedupper/migrations/0004_auto_20181024_1902.py
anthowen/duplify
846d01c1b21230937fdf0281b0cf8c0b08a8c24e
[ "MIT" ]
null
null
null
dedupper/migrations/0004_auto_20181024_1902.py
anthowen/duplify
846d01c1b21230937fdf0281b0cf8c0b08a8c24e
[ "MIT" ]
null
null
null
# Generated by Django 2.0.5 on 2018-10-24 19:02 from django.db import migrations, models
23.222222
72
0.617225
# Generated by Django 2.0.5 on 2018-10-24 19:02 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('dedupper', '0003_auto_20181024_1653'), ] operations = [ migrations.AlterField( model_name='progress', name='completed...
0
304
23
6ba3dd8d2110f5406aabb2ce13d75dbd24ed27c4
943
py
Python
server.py
quixadhal/PyConq
af81685651d66a117b3a3c2f47e90d9be6d6119c
[ "MIT" ]
1
2017-04-14T11:53:47.000Z
2017-04-14T11:53:47.000Z
server.py
quixadhal/PyConq
af81685651d66a117b3a3c2f47e90d9be6d6119c
[ "MIT" ]
null
null
null
server.py
quixadhal/PyConq
af81685651d66a117b3a3c2f47e90d9be6d6119c
[ "MIT" ]
1
2019-11-06T00:15:48.000Z
2019-11-06T00:15:48.000Z
# -*- coding: utf-8 -*- line endings: unix -*- __author__ = 'quixadhal' import os import sys import time import sysutils import log_system import db_system logger = log_system.init_logging() sys.path.append(os.getcwd()) if __name__ == '__main__': logger.boot('System booting.') snapshot = sysutils.ResourceSn...
26.194444
98
0.706257
# -*- coding: utf-8 -*- line endings: unix -*- __author__ = 'quixadhal' import os import sys import time import sysutils import log_system import db_system logger = log_system.init_logging() sys.path.append(os.getcwd()) if __name__ == '__main__': logger.boot('System booting.') snapshot = sysutils.ResourceSn...
0
0
0
1594aebaf6d0841b2caf45d8aa4b867e7d74fc2d
616
py
Python
scripts/prediction_scripts/final_edit_django_dbs.py
amanparmar17/cultivo-1
06030116ba47f99fee8f413404777c9dbdb4e92a
[ "MIT" ]
null
null
null
scripts/prediction_scripts/final_edit_django_dbs.py
amanparmar17/cultivo-1
06030116ba47f99fee8f413404777c9dbdb4e92a
[ "MIT" ]
null
null
null
scripts/prediction_scripts/final_edit_django_dbs.py
amanparmar17/cultivo-1
06030116ba47f99fee8f413404777c9dbdb4e92a
[ "MIT" ]
1
2018-10-08T17:08:48.000Z
2018-10-08T17:08:48.000Z
import pandas as pa import numpy as np import matplotlib.pyplot as plt from sklearn.preprocessing import Imputer,LabelEncoder,OneHotEncoder from sklearn.model_selection import train_test_split from sklearn.linear_model import LinearRegression from sklearn.model_selection import cross_val_score #%% datset=pa.read_cs...
29.333333
73
0.751623
import pandas as pa import numpy as np import matplotlib.pyplot as plt from sklearn.preprocessing import Imputer,LabelEncoder,OneHotEncoder from sklearn.model_selection import train_test_split from sklearn.linear_model import LinearRegression from sklearn.model_selection import cross_val_score #%% datset=pa.read_cs...
0
0
0
983f1d8504e2d7ad92153087a3f6fde57e6d1a35
345
py
Python
python/load_data.py
dnbh/kpg
c9e79b8092434919e9ac90dc199f49845403c2ba
[ "MIT" ]
69
2018-01-08T19:56:55.000Z
2022-03-05T17:14:05.000Z
python/load_data.py
dnbaker/emp
c9e79b8092434919e9ac90dc199f49845403c2ba
[ "MIT" ]
6
2018-04-14T21:09:51.000Z
2021-07-17T21:08:54.000Z
python/load_data.py
dnbaker/emp
c9e79b8092434919e9ac90dc199f49845403c2ba
[ "MIT" ]
11
2018-03-21T19:28:35.000Z
2021-06-29T17:33:34.000Z
#!/usr/bin/env python import numpy as np if __name__ == "__main__": import sys data = load_data(sys.argv[1]) print("data: %s, %s" % (data, str(data.shape)))
23
59
0.542029
#!/usr/bin/env python import numpy as np def load_data(path): return np.array([line.strip().split('\t')[2:] for line in open(path) if line[0] != "#"], dtype=np.double) if __name__ == "__main__": import sys data = load_data(sys.argv[1]) print("data: %s, %s" % ...
150
0
23
db472a55122303d1be9380f2fcee3bbadb791f64
56
py
Python
examples/_tests_scripts/_alchemy.py
rhololkeolke/catalyst-rl
ec18ff4a58b6d00652f772231db8de86debb4b3d
[ "Apache-2.0" ]
46
2020-03-27T20:12:32.000Z
2021-11-21T19:08:51.000Z
examples/_tests_scripts/_alchemy.py
rhololkeolke/catalyst-rl
ec18ff4a58b6d00652f772231db8de86debb4b3d
[ "Apache-2.0" ]
2
2020-04-06T10:43:04.000Z
2020-07-01T18:26:10.000Z
examples/_tests_scripts/_alchemy.py
rhololkeolke/catalyst-rl
ec18ff4a58b6d00652f772231db8de86debb4b3d
[ "Apache-2.0" ]
5
2020-04-17T14:09:53.000Z
2021-05-10T08:58:29.000Z
# flake8: noqa from catalyst_rl.dl import AlchemyRunner
18.666667
40
0.821429
# flake8: noqa from catalyst_rl.dl import AlchemyRunner
0
0
0
74525a6c7c9b583ed6d5b4b3b60fdfe64f60b9f1
766
py
Python
piecash/__init__.py
aslehigh/piecash
797aca5abd08b686e5d47f077b00a095fb4804ed
[ "MIT" ]
null
null
null
piecash/__init__.py
aslehigh/piecash
797aca5abd08b686e5d47f077b00a095fb4804ed
[ "MIT" ]
null
null
null
piecash/__init__.py
aslehigh/piecash
797aca5abd08b686e5d47f077b00a095fb4804ed
[ "MIT" ]
1
2020-01-18T15:55:04.000Z
2020-01-18T15:55:04.000Z
# -*- coding: utf-8 -*- """Python interface to GnuCash documents""" from . import metadata __version__ = metadata.version __author__ = metadata.authors[0] __license__ = metadata.license __copyright__ = metadata.copyright from ._common import ( GncNoActiveSession, GnucashException, GncValidationError, GncImbal...
26.413793
60
0.761097
# -*- coding: utf-8 -*- """Python interface to GnuCash documents""" from . import metadata __version__ = metadata.version __author__ = metadata.authors[0] __license__ = metadata.license __copyright__ = metadata.copyright from ._common import ( GncNoActiveSession, GnucashException, GncValidationError, GncImbal...
0
0
0
8d7bbc000d01c91d54319de8215580d95edad4f0
3,304
py
Python
pyrealtime/record_layer.py
ewhitmire/pyrealtime
5cfd37ff7b05cf33d2aab9b9f45188ddf7c76db4
[ "MIT" ]
62
2017-07-27T18:09:14.000Z
2021-07-19T00:09:40.000Z
pyrealtime/record_layer.py
ewhitmire/pyrealtime
5cfd37ff7b05cf33d2aab9b9f45188ddf7c76db4
[ "MIT" ]
24
2017-06-24T03:26:45.000Z
2020-11-11T15:24:29.000Z
pyrealtime/record_layer.py
ewhitmire/pyrealtime
5cfd37ff7b05cf33d2aab9b9f45188ddf7c76db4
[ "MIT" ]
15
2017-07-02T23:22:25.000Z
2020-10-28T15:23:58.000Z
from datetime import datetime import numpy as np import time from pyrealtime.layer import ThreadLayer, TransformMixin, ProducerMixin, EncoderMixin
32.07767
125
0.590496
from datetime import datetime import numpy as np import time from pyrealtime.layer import ThreadLayer, TransformMixin, ProducerMixin, EncoderMixin class RecordLayer(TransformMixin, EncoderMixin, ThreadLayer): def __init__(self, port_in, filename=None, file_prefix="recording", append_time=False, split_axis=None,...
2,606
370
176
a7030cae2429a487b2f2fa49806ec37f38fc6875
107
py
Python
tests/test_get_data/__init__.py
jm-rivera/pydeflate
3e95950124de4bdcfb7fdcefdc91cbe1b2c32935
[ "MIT" ]
null
null
null
tests/test_get_data/__init__.py
jm-rivera/pydeflate
3e95950124de4bdcfb7fdcefdc91cbe1b2c32935
[ "MIT" ]
null
null
null
tests/test_get_data/__init__.py
jm-rivera/pydeflate
3e95950124de4bdcfb7fdcefdc91cbe1b2c32935
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Nov 20 12:17:30 2021 @author: jorge """
13.375
35
0.598131
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Nov 20 12:17:30 2021 @author: jorge """
0
0
0
07f74a95da853c13aa66d869a6ab1ec3af5c3c47
14,957
py
Python
pynet/models/unet.py
Duplums/pynet
5f91dc2e80c2eb4e44d57403dd65aa80e8a5875b
[ "CECILL-B" ]
null
null
null
pynet/models/unet.py
Duplums/pynet
5f91dc2e80c2eb4e44d57403dd65aa80e8a5875b
[ "CECILL-B" ]
null
null
null
pynet/models/unet.py
Duplums/pynet
5f91dc2e80c2eb4e44d57403dd65aa80e8a5875b
[ "CECILL-B" ]
null
null
null
# -*- coding: utf-8 -*- ########################################################################## # NSAp - Copyright (C) CEA, 2019 # Distributed under the terms of the CeCILL-B license, as published by # the CEA-CNRS-INRIA. Refer to the LICENSE file or to # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html #...
40.424324
119
0.588487
# -*- coding: utf-8 -*- ########################################################################## # NSAp - Copyright (C) CEA, 2019 # Distributed under the terms of the CeCILL-B license, as published by # the CEA-CNRS-INRIA. Refer to the LICENSE file or to # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html #...
6,489
14
358
d7b9d85d7abdc6211c2282d0512cf4ac7d2aadf3
113
py
Python
AlgoMethod/dp/simple_dp/03.py
Nishi05/Competitive-programming
e59a6755b706d9d5c1f359f4511d92c114e6a94e
[ "MIT" ]
null
null
null
AlgoMethod/dp/simple_dp/03.py
Nishi05/Competitive-programming
e59a6755b706d9d5c1f359f4511d92c114e6a94e
[ "MIT" ]
null
null
null
AlgoMethod/dp/simple_dp/03.py
Nishi05/Competitive-programming
e59a6755b706d9d5c1f359f4511d92c114e6a94e
[ "MIT" ]
null
null
null
n = int(input()) F = [0]*(n+1) F[0], F[1] = 0, 1 for i in range(2, n+1): F[i] = F[i-1] + F[i-2] print(F[n])
14.125
26
0.424779
n = int(input()) F = [0]*(n+1) F[0], F[1] = 0, 1 for i in range(2, n+1): F[i] = F[i-1] + F[i-2] print(F[n])
0
0
0
e6d489f5056d991fbe7591b3c1f265cf7f919903
5,917
py
Python
pts/model/lstnet/lstnet_estimator.py
nitinthedreamer/pytorch-ts
7f81b2fbab2e8913792d841b0d66deb489ee6185
[ "Apache-2.0", "MIT" ]
647
2020-03-16T16:47:50.000Z
2022-03-31T23:29:40.000Z
pts/model/lstnet/lstnet_estimator.py
nitinthedreamer/pytorch-ts
7f81b2fbab2e8913792d841b0d66deb489ee6185
[ "Apache-2.0", "MIT" ]
71
2020-03-17T10:58:14.000Z
2022-03-23T08:53:12.000Z
pts/model/lstnet/lstnet_estimator.py
nitinthedreamer/pytorch-ts
7f81b2fbab2e8913792d841b0d66deb489ee6185
[ "Apache-2.0", "MIT" ]
110
2020-03-16T17:39:45.000Z
2022-03-25T22:26:39.000Z
from typing import List, Optional import numpy as np import torch import torch.nn as nn from gluonts.core.component import validated from gluonts.dataset.field_names import FieldName from gluonts.torch.util import copy_parameters from gluonts.torch.model.predictor import PyTorchPredictor from gluonts.model.predictor ...
34.805882
88
0.653034
from typing import List, Optional import numpy as np import torch import torch.nn as nn from gluonts.core.component import validated from gluonts.dataset.field_names import FieldName from gluonts.torch.util import copy_parameters from gluonts.torch.model.predictor import PyTorchPredictor from gluonts.model.predictor ...
4,988
170
23
7a66572067f8305e5b63b5c06553c18be4e3c50c
829
py
Python
python/utils.py
oliche/NeuropixelsRegistration
6dc97ea46f531f2adaf2cf2cf5277d6aaf499e88
[ "MIT" ]
7
2021-01-25T17:29:53.000Z
2022-02-20T23:13:15.000Z
python/utils.py
oliche/NeuropixelsRegistration
6dc97ea46f531f2adaf2cf2cf5277d6aaf499e88
[ "MIT" ]
1
2021-04-08T04:10:54.000Z
2022-01-28T09:35:38.000Z
python/utils.py
oliche/NeuropixelsRegistration
6dc97ea46f531f2adaf2cf2cf5277d6aaf499e88
[ "MIT" ]
2
2021-01-25T17:29:56.000Z
2022-02-04T14:09:14.000Z
import numpy as np from scipy.io import loadmat import os
31.884615
79
0.677925
import numpy as np from scipy.io import loadmat import os def mat2npy(mat_chanmap_dir): mat_chanmap = loadmat(mat_chanmap_dir) x = mat_chanmap['xcoords'] y = mat_chanmap['ycoords'] npy_chanmap = np.hstack([x,y]) np.save('chanmap.npy', npy_chanmap) return npy_chanmap def merge_filtere...
726
0
46
f5f389bfc7ade10eb551a3065beaed24b6f9f866
2,295
py
Python
google/ads/google_ads/v4/proto/services/income_range_view_service_pb2_grpc.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
1
2021-04-09T04:28:47.000Z
2021-04-09T04:28:47.000Z
google/ads/google_ads/v4/proto/services/income_range_view_service_pb2_grpc.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v4/proto/services/income_range_view_service_pb2_grpc.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from google.ads.google_ads.v4.proto.resources import income_range_view_pb2 as google_dot_ads_dot_googleads__v4_dot_proto_dot_resources_dot_income__range__view__pb2 from google.ads.google_ads.v4.proto.services import income_range_view_ser...
44.134615
178
0.817865
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from google.ads.google_ads.v4.proto.resources import income_range_view_pb2 as google_dot_ads_dot_googleads__v4_dot_proto_dot_resources_dot_income__range__view__pb2 from google.ads.google_ads.v4.proto.services import income_range_view_ser...
701
0
23
d4c77b1a26c287554651e6a15191ae129fda0e2d
528
py
Python
images/migrations/0004_auto_20160606_1603.py
OpenCanada/website
6334ff412addc0562ac247080194e5d182e8e924
[ "MIT" ]
10
2015-12-18T16:41:33.000Z
2018-11-11T08:36:46.000Z
images/migrations/0004_auto_20160606_1603.py
OpenCanada/website
6334ff412addc0562ac247080194e5d182e8e924
[ "MIT" ]
96
2015-07-14T22:45:56.000Z
2017-07-25T19:59:48.000Z
images/migrations/0004_auto_20160606_1603.py
OpenCanada/website
6334ff412addc0562ac247080194e5d182e8e924
[ "MIT" ]
9
2015-07-28T14:38:43.000Z
2019-01-04T17:38:42.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import wagtail.images.models
25.142857
137
0.666667
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import wagtail.images.models class Migration(migrations.Migration): dependencies = [ ('images', '0003_auto_20160405_1542'), ] operations = [ migrations.AlterField( model_...
0
369
23
1ee85e632b42753a0f412f31534072b3a6255c3d
1,851
py
Python
make_phr2sg_id.py
Kyubyong/msg_reply
046f6308785d8e65d7ae429964df40a001a9675d
[ "Apache-2.0" ]
79
2019-05-21T06:41:46.000Z
2021-08-06T13:07:38.000Z
make_phr2sg_id.py
abhijitdalavi/msg_reply
046f6308785d8e65d7ae429964df40a001a9675d
[ "Apache-2.0" ]
2
2019-05-28T19:28:24.000Z
2020-04-07T01:17:45.000Z
make_phr2sg_id.py
abhijitdalavi/msg_reply
046f6308785d8e65d7ae429964df40a001a9675d
[ "Apache-2.0" ]
16
2019-05-27T06:10:38.000Z
2020-10-21T06:19:21.000Z
''' Make two dictionaries: phr2sg_id and sg_id2phr phr2sg_id["nice work']==6152 phr2sg_id["nicely done']==6152 phr2sg_id["nice going']==6152 sg_id2phr[6152]=="Well done." ''' import json, os import operator import pickle from hparams import hp import re from tqdm import tqdm if __name__ == "__main__": print("D...
29.380952
83
0.579687
''' Make two dictionaries: phr2sg_id and sg_id2phr phr2sg_id["nice work']==6152 phr2sg_id["nicely done']==6152 phr2sg_id["nice going']==6152 sg_id2phr[6152]=="Well done." ''' import json, os import operator import pickle from hparams import hp import re from tqdm import tqdm def refine(text): text = text.lower...
78
0
23
9ce2a8640535b80e39865e972b8191dfea0819ec
3,922
py
Python
cride/taskapp/tasks.py
jecs580/django_second_app
ef04b48342ef560eac8f58540ba684e5eb7d7926
[ "MIT" ]
null
null
null
cride/taskapp/tasks.py
jecs580/django_second_app
ef04b48342ef560eac8f58540ba684e5eb7d7926
[ "MIT" ]
2
2019-12-24T00:03:49.000Z
2019-12-24T00:03:50.000Z
cride/taskapp/tasks.py
jecs580/django_second_app
ef04b48342ef560eac8f58540ba684e5eb7d7926
[ "MIT" ]
null
null
null
"""Tareas de Celery.""" # Django from django.conf import settings from django.template.loader import render_to_string from django.utils import timezone from django.core.mail import EmailMultiAlternatives # Utilities import jwt from datetime import timedelta # Celery from celery.decorators import task, periodic_task ...
46.690476
114
0.703723
"""Tareas de Celery.""" # Django from django.conf import settings from django.template.loader import render_to_string from django.utils import timezone from django.core.mail import EmailMultiAlternatives # Utilities import jwt from datetime import timedelta # Celery from celery.decorators import task, periodic_task ...
0
0
0
0360fb911ea98bc93a9c5ce44d7d498eacc0e89d
727
py
Python
solutions/balanced-brackets/my_balanced_brackets.py
DuncanDHall/the-coding-interview
701f8aacea34336e084bc978b974fb4816ffff85
[ "MIT" ]
null
null
null
solutions/balanced-brackets/my_balanced_brackets.py
DuncanDHall/the-coding-interview
701f8aacea34336e084bc978b974fb4816ffff85
[ "MIT" ]
null
null
null
solutions/balanced-brackets/my_balanced_brackets.py
DuncanDHall/the-coding-interview
701f8aacea34336e084bc978b974fb4816ffff85
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Balanced Brackets # # Write a function that accepts a string consisting entiring of brackets # (`[](){}`) and returns whether it is balanced. Every "opening" bracket must # be followed by a closing bracket of the same type. There can also be nested # brackets, which...
22.030303
78
0.500688
#!/usr/bin/env python # -*- coding: utf-8 -*- # Balanced Brackets # # Write a function that accepts a string consisting entiring of brackets # (`[](){}`) and returns whether it is balanced. Every "opening" bracket must # be followed by a closing bracket of the same type. There can also be nested # brackets, which...
201
0
23
5d186bbf0c94ad97c379b5beb8f402cd5fe1c4a8
9,689
py
Python
pgcrypto/fields.py
fabiopintodacosta/django-pgcrypto
02108795ec97f80af92ff6800a1c55eb958c3496
[ "BSD-2-Clause" ]
null
null
null
pgcrypto/fields.py
fabiopintodacosta/django-pgcrypto
02108795ec97f80af92ff6800a1c55eb958c3496
[ "BSD-2-Clause" ]
null
null
null
pgcrypto/fields.py
fabiopintodacosta/django-pgcrypto
02108795ec97f80af92ff6800a1c55eb958c3496
[ "BSD-2-Clause" ]
null
null
null
from django import forms from django.conf import settings from django.core import validators from django.db import models from django.utils import six, timezone from django.utils.encoding import force_text from django.utils.translation import ugettext_lazy as _ import django from .base import aes_pad_key, armor, dearm...
39.386179
119
0.655898
from django import forms from django.conf import settings from django.core import validators from django.db import models from django.utils import six, timezone from django.utils.encoding import force_text from django.utils.translation import ugettext_lazy as _ import django from .base import aes_pad_key, armor, dearm...
6,048
2,680
242
0164ea9a92965c440456dfd2e3e253929b4f943e
571
py
Python
tmuxp/cli/ls.py
otherJL0/tmuxp
52d9c0d3c13556fd5d6ffdb3125fcf3afd0e845d
[ "MIT" ]
1,615
2015-01-05T19:31:48.000Z
2018-03-09T08:09:20.000Z
tmuxp/cli/ls.py
sthagen/tmuxp
1c8bfaec3d4f622c4fbc717a873279046c40a664
[ "MIT" ]
244
2015-02-13T16:24:53.000Z
2018-03-10T05:15:33.000Z
tmuxp/cli/ls.py
otherJL0/tmuxp
52d9c0d3c13556fd5d6ffdb3125fcf3afd0e845d
[ "MIT" ]
118
2015-01-16T13:47:39.000Z
2018-02-07T21:35:31.000Z
import os import click from .constants import VALID_CONFIG_DIR_FILE_EXTENSIONS from .utils import get_config_dir @click.command( name="ls", short_help="List configured sessions in :meth:`tmuxp.cli.utils.get_config_dir`.", )
27.190476
85
0.681261
import os import click from .constants import VALID_CONFIG_DIR_FILE_EXTENSIONS from .utils import get_config_dir @click.command( name="ls", short_help="List configured sessions in :meth:`tmuxp.cli.utils.get_config_dir`.", ) def command_ls(): tmuxp_dir = get_config_dir() if os.path.exists(tmuxp_dir) ...
313
0
22
f0c4eea2eb341f55afdd3f15c4cd9f1759fbd1e6
131
py
Python
examplePlugin/urls.py
uzairAK/serverom-panel
3dcde05ad618e6bef280db7d3180f926fe2ab1db
[ "MIT" ]
null
null
null
examplePlugin/urls.py
uzairAK/serverom-panel
3dcde05ad618e6bef280db7d3180f926fe2ab1db
[ "MIT" ]
null
null
null
examplePlugin/urls.py
uzairAK/serverom-panel
3dcde05ad618e6bef280db7d3180f926fe2ab1db
[ "MIT" ]
null
null
null
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.examplePlugin, name='examplePlugin'), ]
18.714286
58
0.70229
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.examplePlugin, name='examplePlugin'), ]
0
0
0
4105abcfda06aac463d907f00d48142f9f8cdc20
1,544
py
Python
scripts/Halofinding/rsVshm.py
Hoseung/pyRamAn
f9386fa5a9f045f98590039988d3cd50bc488dc2
[ "MIT" ]
1
2021-11-25T16:11:56.000Z
2021-11-25T16:11:56.000Z
scripts/Halofinding/rsVshm.py
Hoseung/pyRamAn
f9386fa5a9f045f98590039988d3cd50bc488dc2
[ "MIT" ]
6
2020-02-17T13:44:43.000Z
2020-06-25T15:35:05.000Z
scripts/Halofinding/rsVshm.py
Hoseung/pyRamAn
f9386fa5a9f045f98590039988d3cd50bc488dc2
[ "MIT" ]
1
2021-11-25T16:11:56.000Z
2021-11-25T16:11:56.000Z
# -*- coding: utf-8 -*- """ Test resemblance of HM and RS trees Created on Sun Jun 14 00:33:52 2015 @author: hoseung """ # Load HM from astropy.io import fits from astropy.table import Table import tree wdir = '/home/hoseung/Work/data/AGN2/' data = fits.getdata(wdir + "halo/TMtree.fits", 1) hmt = Table(data) #%% i...
26.169492
91
0.645078
# -*- coding: utf-8 -*- """ Test resemblance of HM and RS trees Created on Sun Jun 14 00:33:52 2015 @author: hoseung """ # Load HM from astropy.io import fits from astropy.table import Table import tree wdir = '/home/hoseung/Work/data/AGN2/' data = fits.getdata(wdir + "halo/TMtree.fits", 1) hmt = Table(data) #%% i...
0
0
0
3b29ed288583c49b6b5414b265a987a5d61de758
54,054
py
Python
src/PCE_Codes/variables/continuous.py
nasa/UQPCE
64f2143cddf83ca2e835442db2fc9ef33c6d26be
[ "NASA-1.3" ]
13
2020-11-07T22:03:35.000Z
2022-01-12T22:08:53.000Z
src/PCE_Codes/variables/continuous.py
nasa/UQPCE
64f2143cddf83ca2e835442db2fc9ef33c6d26be
[ "NASA-1.3" ]
null
null
null
src/PCE_Codes/variables/continuous.py
nasa/UQPCE
64f2143cddf83ca2e835442db2fc9ef33c6d26be
[ "NASA-1.3" ]
4
2020-11-23T16:24:03.000Z
2022-03-25T01:25:21.000Z
from builtins import setattr, getattr from fractions import Fraction import math from multiprocessing import Process, Manager from warnings import warn, showwarning try: from sympy import * import numpy as np from scipy.stats import norm, beta, gamma, expon from scipy.linalg import pascal from scip...
32.194163
116
0.566064
from builtins import setattr, getattr from fractions import Fraction import math from multiprocessing import Process, Manager from warnings import warn, showwarning try: from sympy import * import numpy as np from scipy.stats import norm, beta, gamma, expon from scipy.linalg import pascal from scip...
9,264
0
162
3b43290f57f5361d72dccd25ab08a3672574209a
518
py
Python
knn/test_light_cnn_in_numpy.py
Starman-SWA/Face-recognition-trolley-based-on-AX7010-FPGA-board
d518158c20da4b3f2536867cfda30848911d08c7
[ "MIT" ]
1
2021-02-05T03:17:43.000Z
2021-02-05T03:17:43.000Z
knn/test_light_cnn_in_numpy.py
Starman-SWA/Face-recognition-trolley-based-on-AX7010-FPGA-board
d518158c20da4b3f2536867cfda30848911d08c7
[ "MIT" ]
null
null
null
knn/test_light_cnn_in_numpy.py
Starman-SWA/Face-recognition-trolley-based-on-AX7010-FPGA-board
d518158c20da4b3f2536867cfda30848911d08c7
[ "MIT" ]
2
2020-10-20T12:36:35.000Z
2021-02-05T03:37:30.000Z
import os import numpy as np import cv2 from module.lightCNN_model_in_numpy import LightCNN9_in_numpy def get_net(path): ''' be used to get class net :param para: :return: ''' print('Loading network...') cfg = np.load(path, allow_pickle=True) cfg = cfg.item() net = LightCNN9_in_num...
20.72
61
0.65444
import os import numpy as np import cv2 from module.lightCNN_model_in_numpy import LightCNN9_in_numpy def get_net(path): ''' be used to get class net :param para: :return: ''' print('Loading network...') cfg = np.load(path, allow_pickle=True) cfg = cfg.item() net = LightCNN9_in_num...
111
0
23
74e42152f180c52cf37b991dd6644029a8a92167
414
py
Python
humon/iterators.py
spacemeat/humon-py
f67119be656c169fda5624ef1d33d639e0e84809
[ "MIT" ]
null
null
null
humon/iterators.py
spacemeat/humon-py
f67119be656c169fda5624ef1d33d639e0e84809
[ "MIT" ]
null
null
null
humon/iterators.py
spacemeat/humon-py
f67119be656c169fda5624ef1d33d639e0e84809
[ "MIT" ]
null
null
null
class ChildNodeIterator: '''Iterates over a Humon node's children.''' def __next__(self): '''Iterate.''' if self.idx < self.node.numChildren: res = self.node.getChild(self.idx) self.idx += 1 return res raise StopIteration
21.789474
48
0.550725
class ChildNodeIterator: '''Iterates over a Humon node's children.''' def __init__(self, node): self.node = node self.idx = 0 def __iter__(self): return self def __next__(self): '''Iterate.''' if self.idx < self.node.numChildren: res = self.node.ge...
68
0
53
f0b51b9f7d466f08118ff51d5a5c47810f375d48
13,354
py
Python
M1_Retinal_Image_quality_EyePACS/test_outside.py
rmaphoh/AutoMorph
0c82ce322c6cd8bd80f06bbd85c5c2542e534cb8
[ "Apache-2.0" ]
1
2022-01-28T00:56:23.000Z
2022-01-28T00:56:23.000Z
M1_Retinal_Image_quality_EyePACS/test_outside.py
rmaphoh/AutoMorph
0c82ce322c6cd8bd80f06bbd85c5c2542e534cb8
[ "Apache-2.0" ]
null
null
null
M1_Retinal_Image_quality_EyePACS/test_outside.py
rmaphoh/AutoMorph
0c82ce322c6cd8bd80f06bbd85c5c2542e534cb8
[ "Apache-2.0" ]
null
null
null
''' Code of testing ''' import argparse import logging import os import sys import csv import time import torch import numpy as np import pandas as pd import torch.nn as nn from tqdm import tqdm from pycm import * import matplotlib import matplotlib.pyplot as plt from dataset import BasicDataset_OUT from torch.utils.d...
43.640523
384
0.626704
''' Code of testing ''' import argparse import logging import os import sys import csv import time import torch import numpy as np import pandas as pd import torch.nn as nn from tqdm import tqdm from pycm import * import matplotlib import matplotlib.pyplot as plt from dataset import BasicDataset_OUT from torch.utils.d...
7,993
0
46
b90f7db21c8d8c225c6f1cad8ec1625177bb1306
128
py
Python
app/googlesearch.py
logoogol/docker-blog
57c1615b88474dd1e96fb6b4fb4311d7fd6b1e5f
[ "Unlicense" ]
null
null
null
app/googlesearch.py
logoogol/docker-blog
57c1615b88474dd1e96fb6b4fb4311d7fd6b1e5f
[ "Unlicense" ]
null
null
null
app/googlesearch.py
logoogol/docker-blog
57c1615b88474dd1e96fb6b4fb4311d7fd6b1e5f
[ "Unlicense" ]
null
null
null
from googlesearch import search query = "fastapi" for i in search(query, tld="co.in", num=10, stop=10, pause=2): print(i)
21.333333
62
0.679688
from googlesearch import search query = "fastapi" for i in search(query, tld="co.in", num=10, stop=10, pause=2): print(i)
0
0
0
1b70ce2758a4f45779a3bc09fae2ec3f214f03e2
1,403
py
Python
python/primary_implementation_case_1111.py
MichaelWehar/BooleanMatrixRectangleProblem
fb59e80d9c6b2d0d1137a9df38274648eee3c79e
[ "MIT" ]
6
2020-06-17T21:56:28.000Z
2021-12-17T18:15:51.000Z
python/primary_implementation_case_1111.py
MichaelWehar/BooleanMatrixRectangleProblem
fb59e80d9c6b2d0d1137a9df38274648eee3c79e
[ "MIT" ]
3
2019-05-24T00:03:45.000Z
2020-06-11T07:23:36.000Z
python/primary_implementation_case_1111.py
MichaelWehar/BooleanMatrixRectangleProblem
fb59e80d9c6b2d0d1137a9df38274648eee3c79e
[ "MIT" ]
1
2020-06-17T21:57:57.000Z
2020-06-17T21:57:57.000Z
# Created on 5/21/20 # Author: Ari Liloia and Michael Wehar
45.258065
95
0.595866
# Created on 5/21/20 # Author: Ari Liloia and Michael Wehar def rectExists(m, n, matrix): # This set will store pairs of column indexes columnPairs = set() # Traverse through the matrix row by row for i in range(m): currentRow = [] # Traverse through current row's elements to find all 1...
1,320
0
23
70b6edf1d7ed5c850c6fa6c6f71b89b1b6eca662
1,026
py
Python
mshtensorflow/utilities.py
adhamhesham97/Deep-Learning-framework
7904b993fd7c45f4c0b7fbe028eacd3ce2773d7f
[ "MIT" ]
null
null
null
mshtensorflow/utilities.py
adhamhesham97/Deep-Learning-framework
7904b993fd7c45f4c0b7fbe028eacd3ce2773d7f
[ "MIT" ]
1
2021-02-05T07:58:20.000Z
2021-02-05T07:58:20.000Z
mshtensorflow/utilities.py
adhamhesham97/Deep-Learning-framework
7904b993fd7c45f4c0b7fbe028eacd3ce2773d7f
[ "MIT" ]
2
2021-01-25T14:50:14.000Z
2021-05-24T22:07:12.000Z
# -*- coding: utf-8 -*- """ Created on Sun Jan 17 04:01:48 2021 @author: Adham """ from .Model import model import numpy as np import pickle
25.65
54
0.568226
# -*- coding: utf-8 -*- """ Created on Sun Jan 17 04:01:48 2021 @author: Adham """ from .Model import model import numpy as np import pickle def hot_one(labels, num_classes): num_of_examples = labels.shape[0] hot_one = np.zeros((num_classes, num_of_examples)) for i in range(num_of_examples): hot_...
815
0
69
92bd0a2d6dc3498cd87834e41655cd486ff86538
1,334
py
Python
src/modules/stepwise_log.py
ArturPrzybysz/ProbabilisticDeepDiffusionModels
3056d8da25107aeeb122106e63958bb3fc62d7a4
[ "MIT" ]
null
null
null
src/modules/stepwise_log.py
ArturPrzybysz/ProbabilisticDeepDiffusionModels
3056d8da25107aeeb122106e63958bb3fc62d7a4
[ "MIT" ]
null
null
null
src/modules/stepwise_log.py
ArturPrzybysz/ProbabilisticDeepDiffusionModels
3056d8da25107aeeb122106e63958bb3fc62d7a4
[ "MIT" ]
null
null
null
import numpy as np
35.105263
84
0.614693
import numpy as np class StepwiseLog: def __init__(self, diffusion_steps, max_keep=None): self.diffusion_steps = diffusion_steps self.max_keep = max_keep self.reset() def reset(self): self.metric_per_t = {t: [] for t in range(1, self.diffusion_steps + 1)} self.avg_per_...
1,133
-3
184
7a1e62a32c2100b9e0e9ce8499a978935b09eb5e
1,034
py
Python
src/model.py
vilelabruno/MarcowitzPortfolioOPT
54086d5004b5b05f811732efe229931f3af0a6fa
[ "MIT" ]
2
2020-03-09T14:39:50.000Z
2020-03-10T12:48:25.000Z
src/model.py
vilelabruno/MarkowitzPortfolioOPT
54086d5004b5b05f811732efe229931f3af0a6fa
[ "MIT" ]
null
null
null
src/model.py
vilelabruno/MarkowitzPortfolioOPT
54086d5004b5b05f811732efe229931f3af0a6fa
[ "MIT" ]
null
null
null
from pulp import * if __name__ == "main": main()
34.466667
75
0.569632
from pulp import * def main(): x = LpVariable('x') w_vars = [] problem = LpProblem('portfolio_theory', LpMaximize) for i in range(v.shape[0]): w_i = LpVariable('w_' + str(i), 0, 1) w_vars.append(w_i) for vector in vv_set.set: diff_list = [] for index, _ in enumerate(...
957
0
24
05914362d55bdb70b02c058cc14030c673112fc3
3,713
py
Python
bento/core/tests/test_package.py
abadger/Bento
3f1ddefd8d21decbc018d097d3ec5da4dc9364df
[ "BSD-3-Clause" ]
1
2015-10-25T13:08:36.000Z
2015-10-25T13:08:36.000Z
bento/core/tests/test_package.py
abadger/Bento
3f1ddefd8d21decbc018d097d3ec5da4dc9364df
[ "BSD-3-Clause" ]
null
null
null
bento/core/tests/test_package.py
abadger/Bento
3f1ddefd8d21decbc018d097d3ec5da4dc9364df
[ "BSD-3-Clause" ]
null
null
null
import unittest import os import tempfile from nose.tools import \ assert_equal from bento import PackageDescription from bento.core.package import file_list, static_representation from bento.core.meta import PackageMetadata from bento.core.pkg_objects import DataFiles from bento.core.node import Node
32.286957
88
0.601939
import unittest import os import tempfile from nose.tools import \ assert_equal from bento import PackageDescription from bento.core.package import file_list, static_representation from bento.core.meta import PackageMetadata from bento.core.pkg_objects import DataFiles from bento.core.node import Node def create...
3,088
69
247
63b3b97ccf4be9b5fc60a99d9e914cc8ddfdc44a
3,016
py
Python
Season_Data/RandomForest.py
mattyopl/FPL_ML
c39dbd2370860f0e31ccdd8950518f7042853ba1
[ "MIT" ]
null
null
null
Season_Data/RandomForest.py
mattyopl/FPL_ML
c39dbd2370860f0e31ccdd8950518f7042853ba1
[ "MIT" ]
null
null
null
Season_Data/RandomForest.py
mattyopl/FPL_ML
c39dbd2370860f0e31ccdd8950518f7042853ba1
[ "MIT" ]
null
null
null
import pandas as pd import math from sklearn.ensemble import RandomForestRegressor trainInput = pd.read_excel("FPL_Season_Data_Only_Inputs_Shuffled2.xlsx") trainInput = trainInput.drop(trainInput.columns[0], axis=1) trainOutput = pd.read_excel("FPL_Season_Data_Only_Outputs_Shuffled2.xlsx") trainOutput = trainOu...
33.142857
124
0.726459
import pandas as pd import math from sklearn.ensemble import RandomForestRegressor trainInput = pd.read_excel("FPL_Season_Data_Only_Inputs_Shuffled2.xlsx") trainInput = trainInput.drop(trainInput.columns[0], axis=1) trainOutput = pd.read_excel("FPL_Season_Data_Only_Outputs_Shuffled2.xlsx") trainOutput = trainOu...
0
0
0
338d5c5eac8fc90fd690b66c2251645f25f8ea2a
2,269
py
Python
load_helper.py
Alger-Z/ContainerEscapeDetection
c42357e301dd291e0250768ac8c0922207c71a96
[ "Apache-2.0" ]
null
null
null
load_helper.py
Alger-Z/ContainerEscapeDetection
c42357e301dd291e0250768ac8c0922207c71a96
[ "Apache-2.0" ]
null
null
null
load_helper.py
Alger-Z/ContainerEscapeDetection
c42357e301dd291e0250768ac8c0922207c71a96
[ "Apache-2.0" ]
null
null
null
import re import os from numpy.lib.function_base import insert from utils import * if __name__ =='__main__': pass #load_adfa_Attack_files("./ADFA-LD/Attack_Data_Master/")
25.494382
81
0.577347
import re import os from numpy.lib.function_base import insert from utils import * def load_one_flle(filename): x = [] with open(filename) as f: line = f.readline() x = line.strip('\n').split() return x def load_adfa_training_files(rootdir): x = [] y = [] list = os.listdir(roo...
1,901
0
182
b68228d5f4415656679f5941afc1efdf19942bde
3,455
py
Python
lebab.py
edasque/sublime-lebab
a2a3ac0d207650b89aa55d9500f905fc19340178
[ "MIT" ]
3
2016-07-29T02:53:26.000Z
2017-04-24T01:17:12.000Z
lebab.py
edasque/sublime-lebab
a2a3ac0d207650b89aa55d9500f905fc19340178
[ "MIT" ]
2
2016-07-29T02:58:37.000Z
2016-07-29T12:36:53.000Z
lebab.py
edasque/sublime-lebab
a2a3ac0d207650b89aa55d9500f905fc19340178
[ "MIT" ]
null
null
null
import sublime, sublime_plugin import json import os import platform import subprocess if platform.system() == 'Darwin': os_name = 'osx' elif platform.system() == 'Windows': os_name = 'windows' else: os_name = 'linux' # /usr/local/lib/node_modules/lebab/bin/index.js BIN_PATH = os.path.join( sublime....
31.697248
92
0.586397
import sublime, sublime_plugin import json import os import platform import subprocess if platform.system() == 'Darwin': os_name = 'osx' elif platform.system() == 'Windows': os_name = 'windows' else: os_name = 'linux' # /usr/local/lib/node_modules/lebab/bin/index.js BIN_PATH = os.path.join( sublime....
2,783
26
233
cbe337a29dd71a50920d6cfe3e1874dc9b6aa136
2,063
py
Python
setup.py
michhar/chantilly
6a8e4c3605a830c952d1cc8fd6405e5b4c104633
[ "BSD-3-Clause" ]
43
2019-10-03T12:30:38.000Z
2020-11-11T10:43:51.000Z
setup.py
michhar/chantilly
6a8e4c3605a830c952d1cc8fd6405e5b4c104633
[ "BSD-3-Clause" ]
16
2020-03-20T15:27:06.000Z
2020-10-07T21:04:07.000Z
setup.py
michhar/chantilly
6a8e4c3605a830c952d1cc8fd6405e5b4c104633
[ "BSD-3-Clause" ]
4
2020-04-26T00:06:39.000Z
2020-11-11T11:44:22.000Z
import io import os from setuptools import find_packages, setup here = os.path.abspath(os.path.dirname(__file__)) # Package meta-data. NAME = 'chantilly' DESCRIPTION = 'Deployment tool for online machine learning models' LONG_DESCRIPTION_CONTENT_TYPE = 'text/markdown' URL = 'https://github.com/creme-ml/chantilly' EMA...
29.056338
76
0.624818
import io import os from setuptools import find_packages, setup here = os.path.abspath(os.path.dirname(__file__)) # Package meta-data. NAME = 'chantilly' DESCRIPTION = 'Deployment tool for online machine learning models' LONG_DESCRIPTION_CONTENT_TYPE = 'text/markdown' URL = 'https://github.com/creme-ml/chantilly' EMA...
0
0
0
d06fd2bcde44153c0b0a860dc6c5189095e2d061
1,738
py
Python
em_stitch/utils/schemas.py
AllenInstitute/em_stitch
5b24e57b83fdda14cdd7c2bd540c517f68c0569c
[ "BSD-2-Clause" ]
2
2019-04-20T00:28:47.000Z
2020-01-31T11:12:43.000Z
em_stitch/utils/schemas.py
AllenInstitute/em_stitch
5b24e57b83fdda14cdd7c2bd540c517f68c0569c
[ "BSD-2-Clause" ]
14
2019-04-22T17:05:11.000Z
2020-11-03T20:49:35.000Z
em_stitch/utils/schemas.py
AllenInstitute/em_stitch
5b24e57b83fdda14cdd7c2bd540c517f68c0569c
[ "BSD-2-Clause" ]
1
2020-05-12T17:34:06.000Z
2020-05-12T17:34:06.000Z
import warnings from marshmallow.warnings import ChangedInMarshmallow3Warning from argschema import ArgSchema from argschema.fields import ( InputDir, InputFile, Float, Int, OutputFile, Str, Boolean) warnings.simplefilter( action='ignore', category=ChangedInMarshmallow3Warning)
35.469388
79
0.643268
import warnings from marshmallow.warnings import ChangedInMarshmallow3Warning from argschema import ArgSchema from argschema.fields import ( InputDir, InputFile, Float, Int, OutputFile, Str, Boolean) warnings.simplefilter( action='ignore', category=ChangedInMarshmallow3Warning) class G...
0
1,403
23
f311ad910ad7272315fb76662295b913c6b7bbed
435
py
Python
config.py
zhoukaigo/Blog
ccc72d2eb1c85f68f0cdc6cb17021638dd4c59b9
[ "MIT" ]
null
null
null
config.py
zhoukaigo/Blog
ccc72d2eb1c85f68f0cdc6cb17021638dd4c59b9
[ "MIT" ]
null
null
null
config.py
zhoukaigo/Blog
ccc72d2eb1c85f68f0cdc6cb17021638dd4c59b9
[ "MIT" ]
null
null
null
import os basedir = os.path.abspath(os.path.dirname(__file__))
20.714286
82
0.701149
import os basedir = os.path.abspath(os.path.dirname(__file__)) class config: SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string' SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'data-dev.sqlite') DEBUG = True OAUTH_CRENDENTIALS = { 'facebook':{ 'id': os.environ.get('FACEBOOK_I...
4
342
23
312e3692c41b0390ba6a7a1445764ad07fb9b002
3,923
py
Python
dataset.py
Montherapy/Deep-reinforcement-learning-for-multi-class-imbalanced-classification
19b9f5f758c9deaf490c942477d01e5e7c2ab94a
[ "MIT" ]
2
2021-11-09T07:28:52.000Z
2022-03-31T10:50:48.000Z
dataset.py
Montherapy/Deep-reinforcement-learning-for-multi-class-imbalanced-classification
19b9f5f758c9deaf490c942477d01e5e7c2ab94a
[ "MIT" ]
null
null
null
dataset.py
Montherapy/Deep-reinforcement-learning-for-multi-class-imbalanced-classification
19b9f5f758c9deaf490c942477d01e5e7c2ab94a
[ "MIT" ]
null
null
null
import tensorflow as tf import numpy as np
49.0375
188
0.644405
import tensorflow as tf import numpy as np class Dataset: def __init__(self, config): self.config = config self.n_class = len(self.config.new_class) self.label_connector = {} self.get_label_changer() self.set_data(self.config.minority_subsample_rate) self.get_rho() ...
3,021
836
23
9b18b289fbdc9eebf80838f115db5723f06bf47e
4,914
py
Python
hknweb/studentservices/views.py
jyxzhang/hknweb
a01ffd8587859bf63c46213be6a0c8b87164a5c2
[ "MIT" ]
null
null
null
hknweb/studentservices/views.py
jyxzhang/hknweb
a01ffd8587859bf63c46213be6a0c8b87164a5c2
[ "MIT" ]
null
null
null
hknweb/studentservices/views.py
jyxzhang/hknweb
a01ffd8587859bf63c46213be6a0c8b87164a5c2
[ "MIT" ]
null
null
null
from django.shortcuts import render, redirect from django.urls import reverse from django.http import JsonResponse from django.conf import settings from django.contrib import messages from django.core.mail import EmailMessage from django.template.loader import render_to_string from hknweb.events.views.aggregate_displa...
29.781818
103
0.61396
from django.shortcuts import render, redirect from django.urls import reverse from django.http import JsonResponse from django.conf import settings from django.contrib import messages from django.core.mail import EmailMessage from django.template.loader import render_to_string from hknweb.events.views.aggregate_displa...
3,953
0
132
f899e276be46e4a405d0eec3da36b75e4e966d04
3,695
py
Python
test/events/unix/test_event_ping_no_response.py
jochenparm/moler
0253d677e0ef150206758c7991197ba5687d0965
[ "BSD-3-Clause" ]
57
2018-02-20T08:16:47.000Z
2022-03-28T10:36:57.000Z
test/events/unix/test_event_ping_no_response.py
jochenparm/moler
0253d677e0ef150206758c7991197ba5687d0965
[ "BSD-3-Clause" ]
377
2018-07-19T11:56:27.000Z
2021-07-09T13:08:12.000Z
test/events/unix/test_event_ping_no_response.py
jochenparm/moler
0253d677e0ef150206758c7991197ba5687d0965
[ "BSD-3-Clause" ]
24
2018-04-14T20:49:40.000Z
2022-03-29T10:44:26.000Z
# -*- coding: utf-8 -*- __author__ = 'Marcin Usielski' __copyright__ = 'Copyright (C) 2020, Nokia' __email__ = 'marcin.usielski@nokia.com' import time from moler.events.unix.ping_no_response import PingNoResponse from moler.util.moler_test import MolerTest import datetime
38.489583
108
0.685792
# -*- coding: utf-8 -*- __author__ = 'Marcin Usielski' __copyright__ = 'Copyright (C) 2020, Nokia' __email__ = 'marcin.usielski@nokia.com' import time from moler.events.unix.ping_no_response import PingNoResponse from moler.util.moler_test import MolerTest import datetime def test_event_ping_no_response(buffer_con...
3,371
0
46
d3f75757c743ea36ba1c319f15db9a5bfa198f72
2,918
py
Python
lldb/test/API/commands/gui/viewlarge/TestGuiViewLarge.py
acidburn0zzz/llvm-project
7ca7a2547f00e34f5ec91be776a1d0bbca74b7a9
[ "Apache-2.0" ]
250
2019-05-07T12:56:44.000Z
2022-03-10T15:52:06.000Z
lldb/test/API/commands/gui/viewlarge/TestGuiViewLarge.py
acidburn0zzz/llvm-project
7ca7a2547f00e34f5ec91be776a1d0bbca74b7a9
[ "Apache-2.0" ]
410
2019-06-06T20:52:32.000Z
2022-01-18T14:21:48.000Z
lldb/test/API/commands/gui/viewlarge/TestGuiViewLarge.py
acidburn0zzz/llvm-project
7ca7a2547f00e34f5ec91be776a1d0bbca74b7a9
[ "Apache-2.0" ]
50
2019-05-10T21:12:24.000Z
2022-01-21T06:39:47.000Z
""" Test that the 'gui' displays long lines/names correctly without overruns. """ import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test.lldbpexpect import PExpectTest
41.098592
104
0.679232
""" Test that the 'gui' displays long lines/names correctly without overruns. """ import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test.lldbpexpect import PExpectTest class GuiViewLargeCommandTest(PExpectTest): mydir = TestBase.compute_mydir(__file__) ...
2,321
350
23
f3a3e3128a63e5c3648c9b0836ff421e5f592630
2,021
py
Python
src/gedml/core/samplers/m_per_class_sampler.py
wangck20/GeDML
1f76ac2094d7b88be7fd4eb6145e5586e547b9ca
[ "MIT" ]
null
null
null
src/gedml/core/samplers/m_per_class_sampler.py
wangck20/GeDML
1f76ac2094d7b88be7fd4eb6145e5586e547b9ca
[ "MIT" ]
null
null
null
src/gedml/core/samplers/m_per_class_sampler.py
wangck20/GeDML
1f76ac2094d7b88be7fd4eb6145e5586e547b9ca
[ "MIT" ]
null
null
null
import torch from torch.utils.data.sampler import Sampler from collections import defaultdict import numpy as np class MPerClassSampler(Sampler): """ Give m samples per class. Args: labels (np.ndarray): Ground truth of datasets m (int): M samples per class ...
31.092308
84
0.606136
import torch from torch.utils.data.sampler import Sampler from collections import defaultdict import numpy as np def safe_random_choice(input_list, size): replace = len(input_list) < size return np.random.choice(input_list, size=size, replace=replace) class MPerClassSampler(Sampler): """ Give m sampl...
1,471
0
146
5eb7587882143368b5cdfa592d36c79d3b11a897
403
py
Python
scrapy_framework/html/request.py
savor007/scrapy_framework
9f1266eb2d4bb7e181d1c5352b05298e77040980
[ "MIT" ]
null
null
null
scrapy_framework/html/request.py
savor007/scrapy_framework
9f1266eb2d4bb7e181d1c5352b05298e77040980
[ "MIT" ]
null
null
null
scrapy_framework/html/request.py
savor007/scrapy_framework
9f1266eb2d4bb7e181d1c5352b05298e77040980
[ "MIT" ]
null
null
null
class Request(object): """ create a instance of Request """
28.785714
110
0.595533
class Request(object): """ create a instance of Request """ def __init__(self, url, method="GET", headers=None, cookies=None, data=None, callback='parse', meta=None): self.url = url self.method = method self.headers = headers self.cookies = cookies self.data = da...
305
0
27
2f0322c38d68b54d2529d694030c2dbd8557d296
1,476
py
Python
astronomi/forms.py
hvarmis21/houseofapps
185d654d4403bd6bcf6fda5e3c9f5ad6efde2976
[ "MIT" ]
null
null
null
astronomi/forms.py
hvarmis21/houseofapps
185d654d4403bd6bcf6fda5e3c9f5ad6efde2976
[ "MIT" ]
4
2021-03-18T23:31:45.000Z
2021-09-22T18:32:21.000Z
astronomi/forms.py
hvarmis21/houseofapps
185d654d4403bd6bcf6fda5e3c9f5ad6efde2976
[ "MIT" ]
null
null
null
from django import forms from django.contrib.auth import authenticate from django.contrib.auth.models import User
39.891892
107
0.682927
from django import forms from django.contrib.auth import authenticate from django.contrib.auth.models import User class LoginForm(forms.Form): username = forms.CharField(max_length=30, label="Kullanıcı Adı Giriniz") password = forms.CharField(max_length=30, label="Parola Giriniz", widget=forms.PasswordInput) ...
649
682
45
1e6a136f2dc13323d6a0e69530cf58722831ce88
5,126
py
Python
bomeba0/utils/geometry.py
aloctavodia/bomeba0
e212986d8ee60be1da91d63a7a889db14ec851c3
[ "Apache-2.0" ]
null
null
null
bomeba0/utils/geometry.py
aloctavodia/bomeba0
e212986d8ee60be1da91d63a7a889db14ec851c3
[ "Apache-2.0" ]
28
2017-06-01T15:46:33.000Z
2021-07-01T18:28:36.000Z
bomeba0/utils/geometry.py
aloctavodia/bomeba0
e212986d8ee60be1da91d63a7a889db14ec851c3
[ "Apache-2.0" ]
6
2017-09-30T13:26:08.000Z
2022-02-13T10:01:18.000Z
""" A collection of common mathematical functions written for high performance with the help of numpy and numba. """ import numpy as np from math import sin as msin from math import cos as mcos from numba import jit @jit def dist(p, q): """ Compute distance between two 3D vectors p: array Cartesi...
22.384279
98
0.555989
""" A collection of common mathematical functions written for high performance with the help of numpy and numba. """ import numpy as np from math import sin as msin from math import cos as mcos from numba import jit @jit def dist(p, q): """ Compute distance between two 3D vectors p: array Cartesi...
0
0
0
8529c865f5483ed29537d0df2a81c1f23dd2e2c2
2,919
py
Python
examples/pymc/robertson_pymc.py
johnbachman/bayessb
0c4c4d57218edea2786616077600f07ed821337e
[ "BSD-2-Clause" ]
1
2015-04-02T21:04:39.000Z
2015-04-02T21:04:39.000Z
examples/pymc/robertson_pymc.py
LoLab-VU/bayessb
0a21da7383e78ab1d9666f4faa9a57893aa31397
[ "BSD-2-Clause" ]
null
null
null
examples/pymc/robertson_pymc.py
LoLab-VU/bayessb
0a21da7383e78ab1d9666f4faa9a57893aa31397
[ "BSD-2-Clause" ]
null
null
null
from pymc import deterministic, stochastic, MvNormal, Normal, Lognormal, Uniform, \ MCMC import pymc import numpy as np from pysb.examples.robertson import model from pysb.integrate import odesolve, Solver from matplotlib import pyplot as plt # Generate the synthetic data seed = 2 random = np.random.R...
36.4875
83
0.67112
from pymc import deterministic, stochastic, MvNormal, Normal, Lognormal, Uniform, \ MCMC import pymc import numpy as np from pysb.examples.robertson import model from pysb.integrate import odesolve, Solver from matplotlib import pyplot as plt # Generate the synthetic data seed = 2 random = np.random.R...
176
0
22
040444bcd04f4b65f9da89ffa08d0cc4db3aac35
2,818
py
Python
xcparse/Xcode/PBX/PBXShellScriptBuildPhase.py
samdmarshall/xcparser
4f78af149127325e60e3785b6e09d6dbfeedc799
[ "BSD-3-Clause" ]
59
2015-02-27T21:45:37.000Z
2021-03-16T04:37:40.000Z
xcparse/Xcode/PBX/PBXShellScriptBuildPhase.py
samdmarshall/xcparser
4f78af149127325e60e3785b6e09d6dbfeedc799
[ "BSD-3-Clause" ]
14
2015-03-02T18:53:51.000Z
2016-07-19T23:20:23.000Z
xcparse/Xcode/PBX/PBXShellScriptBuildPhase.py
samdmarshall/xcparser
4f78af149127325e60e3785b6e09d6dbfeedc799
[ "BSD-3-Clause" ]
8
2015-03-02T02:32:09.000Z
2017-07-31T21:14:51.000Z
from .PBXResolver import * from .PBX_Base_Phase import * from .PBX_Constants import * from ...Helpers import logging_helper from ...Helpers import xcrun_helper from ...Helpers import path_helper
46.966667
144
0.66572
from .PBXResolver import * from .PBX_Base_Phase import * from .PBX_Constants import * from ...Helpers import logging_helper from ...Helpers import xcrun_helper from ...Helpers import path_helper class PBXShellScriptBuildPhase(PBX_Base_Phase): def __init__(self, lookup_func, dictionary, project, identifier): ...
2,513
26
85
5a2c7ea488a79c7bc3ca61ffc7923ed29c059cad
181
py
Python
EstruturaSequencial/03.py
TheCarvalho/atividades-wikipython
9163d5de40dbed0d73917f6257e64a651a77e085
[ "Unlicense" ]
null
null
null
EstruturaSequencial/03.py
TheCarvalho/atividades-wikipython
9163d5de40dbed0d73917f6257e64a651a77e085
[ "Unlicense" ]
null
null
null
EstruturaSequencial/03.py
TheCarvalho/atividades-wikipython
9163d5de40dbed0d73917f6257e64a651a77e085
[ "Unlicense" ]
null
null
null
''' 3. Faça um Programa que peça dois números e imprima a soma. ''' num1 = int(input('Insira o primeiro número: ')) num2 = int(input('Insira o segundo número: ')) print(num1+num2)
22.625
59
0.685083
''' 3. Faça um Programa que peça dois números e imprima a soma. ''' num1 = int(input('Insira o primeiro número: ')) num2 = int(input('Insira o segundo número: ')) print(num1+num2)
0
0
0
a287fa8fd1aa9340094407b9ff28c613564df1de
8,205
py
Python
utils.py
kristinakupf/revisiting-self-supervised
1eac8a76c1b002d74b4b2983739d2e0280f5a09c
[ "Apache-2.0" ]
360
2019-01-25T17:59:18.000Z
2022-02-23T22:21:51.000Z
utils.py
kristinakupf/revisiting-self-supervised
1eac8a76c1b002d74b4b2983739d2e0280f5a09c
[ "Apache-2.0" ]
7
2019-02-05T15:09:31.000Z
2021-11-13T21:08:08.000Z
utils.py
rickyHong/Puzzle-tensorflow-latest-repl
86315b94bb8652eff37c5cd27459eae414d9143e
[ "Apache-2.0" ]
44
2019-01-28T02:05:31.000Z
2021-09-19T09:34:27.000Z
#!/usr/bin/python # # Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
30.276753
80
0.686776
#!/usr/bin/python # # Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
350
0
48
ea960da13a754b1b5f178921b94293782175191a
2,046
py
Python
Taller_Estructuras_de _Control_Selectivas/Ejercicio_15.py
Mariajosedibo19/Talleres_de_Algoritmos
db8f1eecc345be1877d9d7a62a3fa8cf3af2df7d
[ "MIT" ]
null
null
null
Taller_Estructuras_de _Control_Selectivas/Ejercicio_15.py
Mariajosedibo19/Talleres_de_Algoritmos
db8f1eecc345be1877d9d7a62a3fa8cf3af2df7d
[ "MIT" ]
null
null
null
Taller_Estructuras_de _Control_Selectivas/Ejercicio_15.py
Mariajosedibo19/Talleres_de_Algoritmos
db8f1eecc345be1877d9d7a62a3fa8cf3af2df7d
[ "MIT" ]
null
null
null
""" Datos de entrada edad del paciente = edad = int sexo del paciente = sexo_paciente = int Datos de salida Resultado positivo o negativo acerca de si el paciente tiene anemia = resultado = str """ # Entradas edad_paciente=int(input("Inserte la edad del paciente en su equivalente de años a meses ")) sexo_paciente=s...
39.346154
153
0.747312
""" Datos de entrada edad del paciente = edad = int sexo del paciente = sexo_paciente = int Datos de salida Resultado positivo o negativo acerca de si el paciente tiene anemia = resultado = str """ # Entradas edad_paciente=int(input("Inserte la edad del paciente en su equivalente de años a meses ")) sexo_paciente=s...
0
0
0
1aab9f57469dfa09590632b595dd434c94b550b5
4,350
py
Python
core/controllers/image.py
zihbot/vision-line
3718a51da7c3f5219da12a9a26cb7ebacafe9a2a
[ "MIT" ]
null
null
null
core/controllers/image.py
zihbot/vision-line
3718a51da7c3f5219da12a9a26cb7ebacafe9a2a
[ "MIT" ]
null
null
null
core/controllers/image.py
zihbot/vision-line
3718a51da7c3f5219da12a9a26cb7ebacafe9a2a
[ "MIT" ]
null
null
null
from collections import namedtuple from repositories.lines import LineORM import cv2 import logging from function_factory import FunctionFactory from api import models import time logger = logging.getLogger(__name__) _Line=namedtuple('_Line', 'name last_change nodes') lines: list[_Line] = [_Line(name='asd', last_chan...
30.208333
81
0.674253
from collections import namedtuple from repositories.lines import LineORM import cv2 import logging from function_factory import FunctionFactory from api import models import time logger = logging.getLogger(__name__) _Line=namedtuple('_Line', 'name last_change nodes') lines: list[_Line] = [_Line(name='asd', last_chan...
3,570
0
437
7decaa503e64ac854bcd7f073e2475e1fe4b741a
159
py
Python
config/config2D/scene_config/scene_jit2D.py
Jack12xl/a-toy-fluid-engine
45ce4007ce6e804dcfdee8da307e131c9c3e7c7d
[ "MIT" ]
21
2020-09-17T10:51:55.000Z
2022-03-15T20:27:00.000Z
config/config2D/scene_config/scene_jit2D.py
Jack12xl/a-toy-fluid-engine
45ce4007ce6e804dcfdee8da307e131c9c3e7c7d
[ "MIT" ]
8
2020-09-18T08:52:34.000Z
2021-02-07T09:27:49.000Z
config/config2D/scene_config/scene_jit2D.py
Jack12xl/myFluid
45ce4007ce6e804dcfdee8da307e131c9c3e7c7d
[ "MIT" ]
1
2020-09-20T11:10:35.000Z
2020-09-20T11:10:35.000Z
import taichi as ti import numpy as np m_fluid_color = ti.Vector(list(np.random.rand(3) * 0.7 + 0.3)) m_dye_decay = 0.99 m_f_gravity = ti.Vector([0.0, -9.8])
22.714286
62
0.691824
import taichi as ti import numpy as np m_fluid_color = ti.Vector(list(np.random.rand(3) * 0.7 + 0.3)) m_dye_decay = 0.99 m_f_gravity = ti.Vector([0.0, -9.8])
0
0
0
ad17f082f6fc9582bc3f0e858d696cbe52aa5dc5
11,427
py
Python
experiment.py
ClaartjeBarkhof/PyTorch-VAE
a1ac49015c306b1cfc0d4d797669b17044f0a1eb
[ "Apache-2.0" ]
null
null
null
experiment.py
ClaartjeBarkhof/PyTorch-VAE
a1ac49015c306b1cfc0d4d797669b17044f0a1eb
[ "Apache-2.0" ]
null
null
null
experiment.py
ClaartjeBarkhof/PyTorch-VAE
a1ac49015c306b1cfc0d4d797669b17044f0a1eb
[ "Apache-2.0" ]
null
null
null
import os import math import torch from torch import optim from models import BaseVAE from models.types_ import * from utils import data_loader import pytorch_lightning as pl from torchvision import transforms import torchvision.utils as vutils from torchvision.datasets import CelebA from torch.utils.data import DataLo...
41.857143
165
0.505032
import os import math import torch from torch import optim from models import BaseVAE from models.types_ import * from utils import data_loader import pytorch_lightning as pl from torchvision import transforms import torchvision.utils as vutils from torchvision.datasets import CelebA from torch.utils.data import DataLo...
9,386
18
212
f2402356296748d055dd98cf85fde7497edb18e5
51,002
py
Python
voting-simulator/district.py
S8A/voting-simulator
c39a57b096472348e7be507820d42d4970b03276
[ "MIT" ]
null
null
null
voting-simulator/district.py
S8A/voting-simulator
c39a57b096472348e7be507820d42d4970b03276
[ "MIT" ]
null
null
null
voting-simulator/district.py
S8A/voting-simulator
c39a57b096472348e7be507820d42d4970b03276
[ "MIT" ]
null
null
null
# coding=utf-8 """A district is the voter population of a constituency or geographical area.""" import itertools as itls import math as m import random as rd from .utils import generate_voter_groups, sort_dict_desc, make_table from .candidate import Candidate from .party import Party from .voter_group import VoterGro...
44.85664
81
0.598977
# coding=utf-8 """A district is the voter population of a constituency or geographical area.""" import itertools as itls import math as m import random as rd from .utils import generate_voter_groups, sort_dict_desc, make_table from .candidate import Candidate from .party import Party from .voter_group import VoterGro...
0
50,550
92
e5ad78c5dfb9a7cf808d457ea96e8cdd1767fd83
7,073
py
Python
plugins/drupalgeddonrce2.py
fakegit/google_explorer
0b21b57ef6fb7b9182fb13d00508164d007b2d19
[ "MIT" ]
155
2016-09-11T00:43:07.000Z
2018-05-02T06:36:43.000Z
plugins/drupalgeddonrce2.py
fakegit/google_explorer
0b21b57ef6fb7b9182fb13d00508164d007b2d19
[ "MIT" ]
19
2016-09-12T14:39:17.000Z
2018-04-24T00:47:01.000Z
plugins/drupalgeddonrce2.py
fakegit/google_explorer
0b21b57ef6fb7b9182fb13d00508164d007b2d19
[ "MIT" ]
85
2016-09-10T20:01:48.000Z
2018-05-16T15:01:28.000Z
from queue import Queue from urllib.parse import urlparse from threading import Thread import requests import threading import re import os from requests import get from requests import post from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureReques...
46.228758
139
0.405203
from queue import Queue from urllib.parse import urlparse from threading import Thread import requests import threading import re import os from requests import get from requests import post from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureReques...
7,243
161
46
37b0f78d2a093d2a9f348fbb7a08d7fc6097a6ad
636
py
Python
portfoliofinder/contributions/scheduled_contributions.py
asteffey/portfolio-finder
a0001975ce28d2b92552810f18715c1351fd1422
[ "MIT" ]
null
null
null
portfoliofinder/contributions/scheduled_contributions.py
asteffey/portfolio-finder
a0001975ce28d2b92552810f18715c1351fd1422
[ "MIT" ]
9
2018-12-18T00:15:41.000Z
2020-06-20T17:12:04.000Z
portfoliofinder/contributions/scheduled_contributions.py
apsteffey/portfolio-finder
fbb596a8bc908f20826d9592c94db3fc553b378b
[ "MIT" ]
1
2020-10-20T08:40:57.000Z
2020-10-20T08:40:57.000Z
from typing import Dict from .contributions import Contributions class ScheduledContributions(Contributions): # pylint: disable=too-few-public-methods """Contributions which occur at specific years in the life of the portfolio. :param scheduled_contributions: contributions by year relative to inception of ...
35.333333
92
0.756289
from typing import Dict from .contributions import Contributions class ScheduledContributions(Contributions): # pylint: disable=too-few-public-methods """Contributions which occur at specific years in the life of the portfolio. :param scheduled_contributions: contributions by year relative to inception of ...
245
0
53
c11715dba5441ac66af6f1c555d1d86364de8536
939
py
Python
src/sgk/celeryapp.py
mava-ar/sgk
cb8b3abf243b4614e6a45e4e2db5bb7cce94dee4
[ "Apache-2.0" ]
null
null
null
src/sgk/celeryapp.py
mava-ar/sgk
cb8b3abf243b4614e6a45e4e2db5bb7cce94dee4
[ "Apache-2.0" ]
32
2016-05-09T19:37:08.000Z
2022-01-13T01:00:52.000Z
src/sgk/celeryapp.py
mava-ar/sgk
cb8b3abf243b4614e6a45e4e2db5bb7cce94dee4
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import import os from tenant_schemas_celery.app import CeleryApp from django.conf import settings from celery.schedules import crontab # set the default Django settings module for the 'celery' program. if os.path.isfile(os.path.join(os.path.abspath('.'), 'sgk', 'settings', 'local.py'))...
32.37931
85
0.741214
from __future__ import absolute_import import os from tenant_schemas_celery.app import CeleryApp from django.conf import settings from celery.schedules import crontab # set the default Django settings module for the 'celery' program. if os.path.isfile(os.path.join(os.path.abspath('.'), 'sgk', 'settings', 'local.py'))...
0
0
0
f9018d542882a2b4348b7736cc1deaa344619663
9,971
py
Python
hybridbackend/tensorflow/distribute/nccl.py
fuhailin/HybridBackend
113383c5870b7180fa67c194208a27f76bdbf3f0
[ "Apache-2.0" ]
38
2021-12-01T06:54:36.000Z
2022-03-23T11:23:21.000Z
hybridbackend/tensorflow/distribute/nccl.py
fuhailin/HybridBackend
113383c5870b7180fa67c194208a27f76bdbf3f0
[ "Apache-2.0" ]
15
2021-12-01T09:15:26.000Z
2022-03-28T02:49:21.000Z
hybridbackend/tensorflow/distribute/nccl.py
fuhailin/HybridBackend
113383c5870b7180fa67c194208a27f76bdbf3f0
[ "Apache-2.0" ]
8
2021-12-02T01:16:14.000Z
2022-01-28T04:51:16.000Z
# Copyright 2021 Alibaba Group Holding Limited. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
31.454259
79
0.726407
# Copyright 2021 Alibaba Group Holding Limited. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
2,788
0
449
e109bc196fb1f2d1fb3f57f50d8c167eee60e087
1,334
py
Python
cielo/models.py
CharlesTenorio/strive_api
27650f36df56d9ea3299bafa9e077f58ce68368c
[ "MIT" ]
null
null
null
cielo/models.py
CharlesTenorio/strive_api
27650f36df56d9ea3299bafa9e077f58ce68368c
[ "MIT" ]
7
2019-08-22T23:45:07.000Z
2021-06-09T18:17:44.000Z
cielo/models.py
CharlesTenorio/strive_api
27650f36df56d9ea3299bafa9e077f58ce68368c
[ "MIT" ]
null
null
null
from django.db import models BANDEIRA_CHOICES = ( ('Visa', 'Visa'), ('Master', 'Master'), ('Hipercard', 'Hipercard'), ('Hiper', 'Hiper'), ('American Express', 'American Express'), ('Elo', 'Elo'), ('Diners Club', 'Diners Club'), ('American Express', 'Ameri...
40.424242
89
0.663418
from django.db import models BANDEIRA_CHOICES = ( ('Visa', 'Visa'), ('Master', 'Master'), ('Hipercard', 'Hipercard'), ('Hiper', 'Hiper'), ('American Express', 'American Express'), ('Elo', 'Elo'), ('Diners Club', 'Diners Club'), ('American Express', 'Ameri...
0
885
23