max_stars_repo_path
stringlengths
4
286
max_stars_repo_name
stringlengths
5
119
max_stars_count
int64
0
191k
id
stringlengths
1
7
content
stringlengths
6
1.03M
content_cleaned
stringlengths
6
1.03M
language
stringclasses
111 values
language_score
float64
0.03
1
comments
stringlengths
0
556k
edu_score
float64
0.32
5.03
edu_int_score
int64
0
5
schedules/serializers.py
sevenstar77/coin_dev
0
6629251
from rest_framework.serializers import ModelSerializer, CharField from .models import Emailschedule, Schedulemaster class ScheduleSerializer(ModelSerializer): class Meta: model = Schedulemaster #fields = '__all__' fields = ('name', 'email', 'is_email_receive', 'schedule_type', 'currency',...
from rest_framework.serializers import ModelSerializer, CharField from .models import Emailschedule, Schedulemaster class ScheduleSerializer(ModelSerializer): class Meta: model = Schedulemaster #fields = '__all__' fields = ('name', 'email', 'is_email_receive', 'schedule_type', 'currency',...
en
0.397099
#fields = '__all__' # def validate_mail_currency_schedule_type(self, value): # pass
2.158508
2
luggage/run.py
moshez/luggage
0
6629252
<reponame>moshez/luggage import os import shutil import sys from ncolony import ctllib def calcCommandline(): """return a command-line prefix that will run me :rettype: list of strings """ argv0 = sys.argv[0] if not argv0.endswith('__main__.py'): return [argv0] prefix = os.path.dirnam...
import os import shutil import sys from ncolony import ctllib def calcCommandline(): """return a command-line prefix that will run me :rettype: list of strings """ argv0 = sys.argv[0] if not argv0.endswith('__main__.py'): return [argv0] prefix = os.path.dirname(argv0) path = map(o...
en
0.588093
return a command-line prefix that will run me :rettype: list of strings create an NColony configuration :param dirname: directory in which to create the configuration :type dirname: string :rettype: ncolony.ctllib.Places
2.76292
3
lino/modlib/extjs/elems.py
khchine5/lino
1
6629253
<filename>lino/modlib/extjs/elems.py<gh_stars>1-10 raise Exception("20180212 moved to lino.core.elems")
<filename>lino/modlib/extjs/elems.py<gh_stars>1-10 raise Exception("20180212 moved to lino.core.elems")
none
1
1.256195
1
scGNNsp_space/gae/utils.py
CyanStarNight/single_cell_spatial_image
5
6629254
<gh_stars>1-10 import pickle as pkl import networkx as nx import numpy as np import scipy.sparse as sp import torch from sklearn.metrics import roc_auc_score, average_precision_score def sample_mask(idx, l): """Create mask.""" mask = np.zeros(l) mask[idx] = 1 return np.array(mask, dtype=np.bool) de...
import pickle as pkl import networkx as nx import numpy as np import scipy.sparse as sp import torch from sklearn.metrics import roc_auc_score, average_precision_score def sample_mask(idx, l): """Create mask.""" mask = np.zeros(l) mask[idx] = 1 return np.array(mask, dtype=np.bool) def load_data(dat...
en
0.584828
Create mask. # load the data: x, tx, allx, graph fix Pickle incompatibility of numpy arrays between Python 2 and 3 https://stackoverflow.com/questions/11305790/pickle-incompatibility-of-numpy-arrays-between-python-2-and-3 # objects.append( # pkl.load(open("data/ind.{}.{}".format(dataset, names[i]), 'rb'))) ...
2.30485
2
cwbrowser/cw_connection.py
neurospin/rql_download
0
6629255
<filename>cwbrowser/cw_connection.py ########################################################################## # NSAp - Copyright (C) CEA, 2013 - 2018 # 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_C...
<filename>cwbrowser/cw_connection.py ########################################################################## # NSAp - Copyright (C) CEA, 2013 - 2018 # 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_C...
en
0.603077
########################################################################## # NSAp - Copyright (C) CEA, 2013 - 2018 # 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 # for details. ###...
2.671197
3
cloudroast/objectstorage/smoke/account_smoke.py
RULCSoft/cloudroast
0
6629256
""" Copyright 2013 Rackspace Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dist...
""" Copyright 2013 Rackspace Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dist...
en
0.852152
Copyright 2013 Rackspace Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distribu...
1.710023
2
xt/algorithm/impala/default_config.py
ZZHsunsky/xingtian
1
6629257
<gh_stars>1-10 """ Static Variable in impala """ GAMMA = 0.99 BATCH_SIZE = 512
""" Static Variable in impala """ GAMMA = 0.99 BATCH_SIZE = 512
en
0.821299
Static Variable in impala
0.691563
1
recommenders/knn_collaborative_user.py
edervishaj/spotify-recsys-challenge
3
6629258
<reponame>edervishaj/spotify-recsys-challenge<gh_stars>1-10 import time from recommenders.recommender import Recommender from recommenders.similarity.similarity import * class Knn_collabrative_user(Recommender): def __init__(self): super() def compute_model(self, top_k=50, sm_type="cosine", shrink=0, ...
import time from recommenders.recommender import Recommender from recommenders.similarity.similarity import * class Knn_collabrative_user(Recommender): def __init__(self): super() def compute_model(self, top_k=50, sm_type="cosine", shrink=0, alpha=0, beta=0, threshold=0, verbose=False, binary=True): ...
en
0.475626
:param matrix: sparse matrix, urm for knn item, p3alpha, p3beta, urm.T for knn user :param top_k: int, element to take for each row after model computation problem :param sm_type: string, similarity to use (use constant in this class to specify) :param shrink: float, shrink term for the similari...
2.484563
2
setup.py
chr6192/n-beats
0
6629259
import os from setuptools import setup BASE_VERSION = '1.2.0' # update regardless whether you update keras or pytorch or both. FRAMEWORK = os.getenv('FRAMEWORK', 'keras') # keras, pytorch. # common packages. INSTALL_REQUIRES = [ 'numpy==1.16.2', 'pandas>=0.25.3', 'matplotlib>=3.0' ] if FRAMEWORK == 'k...
import os from setuptools import setup BASE_VERSION = '1.2.0' # update regardless whether you update keras or pytorch or both. FRAMEWORK = os.getenv('FRAMEWORK', 'keras') # keras, pytorch. # common packages. INSTALL_REQUIRES = [ 'numpy==1.16.2', 'pandas>=0.25.3', 'matplotlib>=3.0' ] if FRAMEWORK == 'k...
en
0.319613
# update regardless whether you update keras or pytorch or both. # keras, pytorch. # common packages.
1.638289
2
config.py
aws-the-right-way/stock-of-the-day
0
6629260
import os class Config(object): STOCK_SYMBOL_SERVICE_HOST=os.environ.get('STOCK_SYMBOL_SERVICE_SERVICE_SERVICE_HOST') STOCK_SYMBOL_SERVICE_PORT=os.environ.get('STOCK_SYMBOL_SERVICE_SERVICE_SERVICE_PORT') LOGO_RESIZER_SERVICE_HOST = os.environ.get('LOGO_RESIZER_SERVICE_SERVICE_SERVICE_HOST') LOGO_RESI...
import os class Config(object): STOCK_SYMBOL_SERVICE_HOST=os.environ.get('STOCK_SYMBOL_SERVICE_SERVICE_SERVICE_HOST') STOCK_SYMBOL_SERVICE_PORT=os.environ.get('STOCK_SYMBOL_SERVICE_SERVICE_SERVICE_PORT') LOGO_RESIZER_SERVICE_HOST = os.environ.get('LOGO_RESIZER_SERVICE_SERVICE_SERVICE_HOST') LOGO_RESI...
none
1
2.041439
2
examples/plot_observed_catalogs/plot_observed_multiple.py
hematthi/SysSim_Plotting
0
6629261
# To import required modules: import numpy as np import time import os import sys import matplotlib import matplotlib.cm as cm #for color maps import matplotlib.pyplot as plt from matplotlib.gridspec import GridSpec #for specifying plot attributes from matplotlib import ticker #for setting contour plots to log scale im...
# To import required modules: import numpy as np import time import os import sys import matplotlib import matplotlib.cm as cm #for color maps import matplotlib.pyplot as plt from matplotlib.gridspec import GridSpec #for specifying plot attributes from matplotlib import ticker #for setting contour plots to log scale im...
en
0.493732
# To import required modules: #for color maps #for specifying plot attributes #for setting contour plots to log scale #for numerical integration #for factorial function #error function, used in computing CDF of normal distribution #for interpolation functions #corner.py package for corner plots #matplotlib.rc('text', u...
1.859798
2
azure-mgmt-monitor/azure/mgmt/monitor/models/log_metric_trigger_py3.py
NMijat1024/azure-sdk-for-python
1
6629262
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
en
0.552372
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
1.694742
2
ucscsdk/mometa/compute/ComputeResourceSetManager.py
parag-may4/ucscsdk
9
6629263
"""This module contains the general information for ComputeResourceSetManager ManagedObject.""" from ...ucscmo import ManagedObject from ...ucsccoremeta import UcscVersion, MoPropertyMeta, MoMeta from ...ucscmeta import VersionMeta class ComputeResourceSetManagerConsts(): POLLING_STATE_COMPLETE = "complete" ...
"""This module contains the general information for ComputeResourceSetManager ManagedObject.""" from ...ucscmo import ManagedObject from ...ucsccoremeta import UcscVersion, MoPropertyMeta, MoMeta from ...ucscmeta import VersionMeta class ComputeResourceSetManagerConsts(): POLLING_STATE_COMPLETE = "complete" ...
en
0.621918
This module contains the general information for ComputeResourceSetManager ManagedObject. This is ComputeResourceSetManager class. ((deleteAll|ignore|deleteNonPresent),){0,2}(deleteAll|ignore|deleteNonPresent){0,1} ((removed|created|modified|deleted),){0,3}(removed|created|modified|deleted){0,1}
2.029954
2
app/backend/wells/tests/test_stack.py
bcgov/gwells
37
6629264
<reponame>bcgov/gwells """ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writi...
""" Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distri...
en
0.937873
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed un...
1.834569
2
pypbm.py
baloo1379/io-convolultion
0
6629265
import tokenize as t import numpy as np class PyPBM: formats = ['P1', 'P2', 'P3'] white = [0, 4, 60] NAME = 1 NUMBER = 2 COMMENT = 60 def __init__(self, path, n): self.file_name = path self.id = n self.type = None self.width = 0 self.height = 0 ...
import tokenize as t import numpy as np class PyPBM: formats = ['P1', 'P2', 'P3'] white = [0, 4, 60] NAME = 1 NUMBER = 2 COMMENT = 60 def __init__(self, path, n): self.file_name = path self.id = n self.type = None self.width = 0 self.height = 0 ...
en
0.542759
# Format # Width # Height # Max value of pixel (if present) # Pixels array # row += " "
2.83736
3
techmeme/__init__.py
bmintz/technical-meme-helper
6
6629266
<filename>techmeme/__init__.py #!/usr/bin/env python3 # encoding: utf-8 # # © 2017 <NAME> # https://bmintz.mit-license.org/@2017 # """ techmeme: class that turns videos into dank technical may-mays """ from .technicalmeme import TechnicalMeme
<filename>techmeme/__init__.py #!/usr/bin/env python3 # encoding: utf-8 # # © 2017 <NAME> # https://bmintz.mit-license.org/@2017 # """ techmeme: class that turns videos into dank technical may-mays """ from .technicalmeme import TechnicalMeme
en
0.622092
#!/usr/bin/env python3 # encoding: utf-8 # # © 2017 <NAME> # https://bmintz.mit-license.org/@2017 # techmeme: class that turns videos into dank technical may-mays
1.512421
2
photofiler.py
aparkerlue/photo-filer
0
6629267
# -*- coding: utf-8 -*- import argparse import os import sys import shutil from collections import defaultdict from datetime import datetime from PIL import Image from geopy.geocoders import Nominatim from get_lat_lon_exif_pil import get_exif_data, get_lat_lon def get_location(exif_data): lat_lon = get_lat_lon(...
# -*- coding: utf-8 -*- import argparse import os import sys import shutil from collections import defaultdict from datetime import datetime from PIL import Image from geopy.geocoders import Nominatim from get_lat_lon_exif_pil import get_exif_data, get_lat_lon def get_location(exif_data): lat_lon = get_lat_lon(...
en
0.935692
# -*- coding: utf-8 -*- Image file to organize. If directory, only children are read # Include just the direct children of the directory. Including # all of the descendants could result in name collisions. # # Providing multiple directories could also lead to name # collisions, but we want to allow at least one directo...
2.700194
3
tile_generator/bosh.py
yfhsu/tile-generator
0
6629268
#!/usr/bin/env python # tile-generator # # Copyright (c) 2015-Present Pivotal Software, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org...
#!/usr/bin/env python # tile-generator # # Copyright (c) 2015-Present Pivotal Software, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org...
en
0.805249
#!/usr/bin/env python # tile-generator # # Copyright (c) 2015-Present Pivotal Software, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/...
2.065131
2
webots_ros2_driver/webots_ros2_driver/webots_launcher.py
TaoYibo1866/webots_ros2
0
6629269
#!/usr/bin/env python # Copyright 1996-2021 Cyberbotics Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
#!/usr/bin/env python # Copyright 1996-2021 Cyberbotics Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
en
0.798369
#!/usr/bin/env python # Copyright 1996-2021 Cyberbotics Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
2.499748
2
bin/extract-admin-password.py
DimensionDataResearch/ddcloud-docker-swarm
0
6629270
#!/usr/bin/env python2 from __future__ import unicode_literals, print_function import os import re root = os.path.normpath( os.path.dirname(os.path.abspath(__file__)) + "/.." ) terraform_script_file = os.path.join(root, "terraform/ddcloud-docker-swarm.tf") terraform_script = open(terraform_script_file, mode='r'...
#!/usr/bin/env python2 from __future__ import unicode_literals, print_function import os import re root = os.path.normpath( os.path.dirname(os.path.abspath(__file__)) + "/.." ) terraform_script_file = os.path.join(root, "terraform/ddcloud-docker-swarm.tf") terraform_script = open(terraform_script_file, mode='r'...
ru
0.196695
#!/usr/bin/env python2
2.356435
2
src/articles/services/core/service.py
robzzy/articles-service
0
6629271
# -*- coding: utf-8 -*- import json from nameko_tracer import Tracer from nameko.events import EventDispatcher from nameko_sqlalchemy import DatabaseSession from nameko.rpc import rpc from nameko.web.handlers import http from articles.models import DeclarativeBase from articles.services.core.authors import AuthorMix...
# -*- coding: utf-8 -*- import json from nameko_tracer import Tracer from nameko.events import EventDispatcher from nameko_sqlalchemy import DatabaseSession from nameko.rpc import rpc from nameko.web.handlers import http from articles.models import DeclarativeBase from articles.services.core.authors import AuthorMix...
en
0.769321
# -*- coding: utf-8 -*-
2.069993
2
tuples-and-sets/1_count_same_values.py
Minkov/python-advanced-2020-01
5
6629272
<gh_stars>1-10 def solve(values): occurances = {} for value in values: if value not in occurances: occurances[value] = 0 occurances[value] += 1 for number, count in occurances.items(): print(f'{number} - {count} times') values_strings = input().split(' ') values = [fl...
def solve(values): occurances = {} for value in values: if value not in occurances: occurances[value] = 0 occurances[value] += 1 for number, count in occurances.items(): print(f'{number} - {count} times') values_strings = input().split(' ') values = [float(x) for x in...
none
1
3.452361
3
utils.py
mateuszbuda/duke-dbt-detection
10
6629273
import numpy as np from PIL import Image, ImageDraw, ImageFont from skimage.transform import rescale from dataset import TomoDetectionDataset def log_images(x, y_true, y_pred): images = [] y_true_np = y_true.detach().cpu().numpy() y_pred_np = y_pred.detach().cpu().numpy() x_np = x.detach().cpu().nump...
import numpy as np from PIL import Image, ImageDraw, ImageFont from skimage.transform import rescale from dataset import TomoDetectionDataset def log_images(x, y_true, y_pred): images = [] y_true_np = y_true.detach().cpu().numpy() y_pred_np = y_pred.detach().cpu().numpy() x_np = x.detach().cpu().nump...
none
1
2.563923
3
Plugins/UnrealEnginePython/Binaries/Win64/Lib/site-packages/tensorflow/python/autograph/utils/py_func.py
JustinACoder/H22-GR3-UnrealAI
6
6629274
<gh_stars>1-10 # Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
en
0.711019
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
2.434228
2
mmaction/models/tenons/spatial_temporal_modules/__init__.py
arpanmangal/coinaction
1
6629275
from .simple_spatial_module import SimpleSpatialModule from .simple_spatial_temporal_module import SimpleSpatialTemporalModule __all__ = [ 'SimpleSpatialModule', 'SimpleSpatialTemporalModule' ]
from .simple_spatial_module import SimpleSpatialModule from .simple_spatial_temporal_module import SimpleSpatialTemporalModule __all__ = [ 'SimpleSpatialModule', 'SimpleSpatialTemporalModule' ]
none
1
1.057032
1
graph_embedding/dmon/train_dgi_batched.py
pedersor/google-research
0
6629276
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
en
0.790846
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
1.741108
2
django_project/tests/test_forms.py
jsolly/blogthedata
1
6629277
from .base import SetUp from blog.forms import PostForm from users.forms import UserRegisterForm, UserUpdateForm, ProfileUpdateForm class TestForms(SetUp): def test_post_form_valid_data(self): form = PostForm( data={ "title": "My Second Post", "slug": "second-po...
from .base import SetUp from blog.forms import PostForm from users.forms import UserRegisterForm, UserUpdateForm, ProfileUpdateForm class TestForms(SetUp): def test_post_form_valid_data(self): form = PostForm( data={ "title": "My Second Post", "slug": "second-po...
en
0.727937
# "metaimg" : "" # "metaimg"_mimetype : "" # date_posted : "" # "likes" # "views" # Users Forms # Might want to add image validation
2.55995
3
examples/plotting/lat_lon_lines.py
mridullpandey/sunpy
0
6629278
""" ================================================= Drawing heliographic longitude and latitude lines ================================================= How to draw your own (Stonyhurst) longitude and latitude lines """ import numpy as np import astropy.units as u import matplotlib.pyplot as plt from astropy.coordin...
""" ================================================= Drawing heliographic longitude and latitude lines ================================================= How to draw your own (Stonyhurst) longitude and latitude lines """ import numpy as np import astropy.units as u import matplotlib.pyplot as plt from astropy.coordin...
en
0.330892
================================================= Drawing heliographic longitude and latitude lines ================================================= How to draw your own (Stonyhurst) longitude and latitude lines ############################################################################### # The purpose of this exam...
3.377384
3
inheritance_exercise/zoo/project/reptile.py
Veselin-Stoilov/software-university-OOP
0
6629279
from inheritance_exercise.zoo.project.animal import Animal class Reptile(Animal): pass
from inheritance_exercise.zoo.project.animal import Animal class Reptile(Animal): pass
none
1
1.384794
1
src/utils/testfilemanager.py
webappetizers/webappetizers
0
6629280
import filemanager elevations = [111,2,13] # Save to file try: manager = filemanager.Manager('elevations', '.csv',elevations,'a') manager.write() except Exception as e: print(e)
import filemanager elevations = [111,2,13] # Save to file try: manager = filemanager.Manager('elevations', '.csv',elevations,'a') manager.write() except Exception as e: print(e)
en
0.945986
# Save to file
2.372135
2
Heap/1046. Last Stone Weight.py
xli1110/LC
2
6629281
import heapq class Solution: def lastStoneWeight(self, stones: List[int]) -> int: if not stones: raise Exception("Empty Array") h = [-x for x in stones] heapq.heapify(h) while len(h) > 1: x = -heapq.heappop(h) y = -heapq.heappop(h) ...
import heapq class Solution: def lastStoneWeight(self, stones: List[int]) -> int: if not stones: raise Exception("Empty Array") h = [-x for x in stones] heapq.heapify(h) while len(h) > 1: x = -heapq.heappop(h) y = -heapq.heappop(h) ...
none
1
3.129853
3
code/libamrfile/meshplot.py
cemacrr/bisicles_gia
0
6629282
from amrfile import io as amrio import numpy as np import matplotlib.pyplot as plt import matplotlib.colors as col import matplotlib.patches as pat plt.figure(figsize=(4,6)) plt.subplot(111,aspect='equal') hmin = 0.0 hmax = 3000.0 amrio.freeAll() amrID = amrio.load("plot.amundsen.2d.hdf5") time = amrio.queryTime(am...
from amrfile import io as amrio import numpy as np import matplotlib.pyplot as plt import matplotlib.colors as col import matplotlib.patches as pat plt.figure(figsize=(4,6)) plt.subplot(111,aspect='equal') hmin = 0.0 hmax = 3000.0 amrio.freeAll() amrID = amrio.load("plot.amundsen.2d.hdf5") time = amrio.queryTime(am...
none
1
1.889389
2
fs_image/compiler/items/make_subvol.py
singhaditya28/fs_image
0
6629283
<gh_stars>0 #!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. ''' Exactly one item must exist in this phase. If none is specified by the `.bzl` code, then `dep_graph.py...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. ''' Exactly one item must exist in this phase. If none is specified by the `.bzl` code, then `dep_graph.py` injects a ...
en
0.898363
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. Exactly one item must exist in this phase. If none is specified by the `.bzl` code, then `dep_graph.py` injects a `File...
2.139314
2
standard training/utils.py
wangaxe/DEAT
1
6629284
<filename>standard training/utils.py # Adopted from https://github.com/P2333/Bag-of-Tricks-for-AT import torch import torch.nn.functional as F from torchvision import datasets, transforms from torch.utils.data.sampler import SubsetRandomSampler import numpy as np cifar10_mean = (0.4914, 0.4822, 0.4465) cifar10...
<filename>standard training/utils.py # Adopted from https://github.com/P2333/Bag-of-Tricks-for-AT import torch import torch.nn.functional as F from torchvision import datasets, transforms from torch.utils.data.sampler import SubsetRandomSampler import numpy as np cifar10_mean = (0.4914, 0.4822, 0.4465) cifar10...
en
0.436539
# Adopted from https://github.com/P2333/Bag-of-Tricks-for-AT # mu = torch.tensor(cifar10_mean).view(3,1,1).cuda() # std = torch.tensor(cifar10_std).view(3,1,1).cuda()
2.243087
2
sort_list_of_dict.py
zabuchan/sort_recipe
0
6629285
<filename>sort_list_of_dict.py import json from operator import itemgetter filename = "room_price.json" with open(filename, 'r') as fin: offices = json.load(fin) room_list = offices['office'] rooms_by_price = sorted(room_list, key=itemgetter('price')) rooms_by_room_number = sorted(room_list, key=itemgetter('room-nu...
<filename>sort_list_of_dict.py import json from operator import itemgetter filename = "room_price.json" with open(filename, 'r') as fin: offices = json.load(fin) room_list = offices['office'] rooms_by_price = sorted(room_list, key=itemgetter('price')) rooms_by_room_number = sorted(room_list, key=itemgetter('room-nu...
none
1
3.728563
4
Version 2/test_file.py
jesus-333/CSP
6
6629286
# -*- coding: utf-8 -*- """ Contain the implementation of the FBCSP algorithm. Developed for the train part of dataset IV-1-a of BCI competition. @author: <NAME> (Jesus) @organization: University of Padua (Italy) """ #%% from CSP_support_function import cleanWorkspaec # cleanWorkspaec() #%% from CSP_support_function...
# -*- coding: utf-8 -*- """ Contain the implementation of the FBCSP algorithm. Developed for the train part of dataset IV-1-a of BCI competition. @author: <NAME> (Jesus) @organization: University of Padua (Italy) """ #%% from CSP_support_function import cleanWorkspaec # cleanWorkspaec() #%% from CSP_support_function...
en
0.60606
# -*- coding: utf-8 -*- Contain the implementation of the FBCSP algorithm. Developed for the train part of dataset IV-1-a of BCI competition. @author: <NAME> (Jesus) @organization: University of Padua (Italy) #%% # cleanWorkspaec() #%% # x1 = np.linspace(1, sx_0.shape[0], sx_0.shape[0]) # x2 = x1 + 0.35 # # Mean throu...
2.534722
3
pynetdicom/tests/test_ae.py
Jesse-Back/pynetdicom
274
6629287
<gh_stars>100-1000 """Tests for the ae module.""" import logging import os import signal import threading import time import pytest from pydicom import read_file from pydicom.dataset import Dataset from pydicom.uid import UID, ImplicitVRLittleEndian from pynetdicom import ( AE, evt, debug_logger, build_context,...
"""Tests for the ae module.""" import logging import os import signal import threading import time import pytest from pydicom import read_file from pydicom.dataset import Dataset from pydicom.uid import UID, ImplicitVRLittleEndian from pynetdicom import ( AE, evt, debug_logger, build_context, DEFAULT_TRANSF...
en
0.612743
Tests for the ae module. # debug_logger() Test binding events to the blocking AssociationServer. Tests for AE.make_server() Run prior to each test Clear any active threads Test warning if using bytes to set an AE title. Tests for AE.start_server() Run prior to each test Clear any active threads Test the `ae_title` keyw...
2.109421
2
source/soca/cluster_web_ui/app.py
SystemFabricWorks/scale-out-computing-on-aws
0
6629288
import logging.config from flask import Flask, redirect, jsonify from flask_restful import Api from flask_session import Session from flask_sqlalchemy import SQLAlchemy from api.v1.scheduler.pbspro.job import Job from api.v1.scheduler.pbspro.jobs import Jobs from api.v1.scheduler.pbspro.queue import Queue from api.v1.s...
import logging.config from flask import Flask, redirect, jsonify from flask_restful import Api from flask_session import Session from flask_sqlalchemy import SQLAlchemy from api.v1.scheduler.pbspro.job import Job from api.v1.scheduler.pbspro.jobs import Jobs from api.v1.scheduler.pbspro.queue import Queue from api.v1.s...
en
0.773254
# Register routes # Add API # LDAP # Users # System # Scheduler # Register views # Custom Jinja2 filters # This make sure folders with long name on /my_files are displayed correctly # Manage logger # Scheduled tasks
1.509777
2
src/aceinna/framework/utils/resource.py
lihaiyong827/python-openimu
41
6629289
import os import sys import pkgutil from ... import PACKAGE_NAME def is_in_bundle(): return hasattr(sys, 'frozen') and getattr(sys, 'frozen') and hasattr(sys, '_MEIPASS') def is_dev_mode(): return hasattr(sys, '__dev__') and getattr(sys, '__dev__') def get_executor_path(): if is_in_bundle(): p...
import os import sys import pkgutil from ... import PACKAGE_NAME def is_in_bundle(): return hasattr(sys, 'frozen') and getattr(sys, 'frozen') and hasattr(sys, '_MEIPASS') def is_dev_mode(): return hasattr(sys, '__dev__') and getattr(sys, '__dev__') def get_executor_path(): if is_in_bundle(): p...
en
0.436953
# if start from main.py
2.103004
2
bot/cogs/defcon.py
crazygmr101/bot
1
6629290
<filename>bot/cogs/defcon.py from __future__ import annotations import logging from collections import namedtuple from datetime import datetime, timedelta from enum import Enum from discord import Colour, Embed, Member from discord.ext.commands import Cog, Context, group from bot.bot import Bot from bot.cogs.moderat...
<filename>bot/cogs/defcon.py from __future__ import annotations import logging from collections import namedtuple from datetime import datetime, timedelta from enum import Enum from discord import Colour, Embed, Member from discord.ext.commands import Cog, Context, group from bot.bot import Bot from bot.cogs.moderat...
en
0.904042
Hi, {user} - Thanks for your interest in our server! Due to a current (or detected) cyberattack on our community, we've limited access to the server for new accounts. Since your account is relatively new, we're unable to provide access to the server at this time. Even so, thanks for joining! We're very excited at the...
2.334432
2
examples/phononic/coef_conf_elastic.py
olivierverdier/sfepy
1
6629291
from sfepy.fem.periodic import * import sfepy.homogenization.coefs_base as cb from sfepy.homogenization.utils import define_box_regions def expand_regions( eqs, expand ): out = {} for key, val in eqs.iteritems(): out[key] = val % expand return out expr_elastic = """dw_lin_elastic.3.%s( matrix.D, P...
from sfepy.fem.periodic import * import sfepy.homogenization.coefs_base as cb from sfepy.homogenization.utils import define_box_regions def expand_regions( eqs, expand ): out = {} for key, val in eqs.iteritems(): out[key] = val % expand return out expr_elastic = """dw_lin_elastic.3.%s( matrix.D, P...
en
0.547982
dw_lin_elastic.3.%s( matrix.D, Pi1, Pi2 ) dw_lin_elastic.3.%s( matrix.D, v1, u1 ) + dw_lin_elastic.3.%s( matrix.D, v1, Pi ) = 0 Uses materials, fe of master file, merges regions. ## # Periodic boundary conditions. # Direct solver.
1.99717
2
herders/migrations/0010_auto_20191214_1751.py
Itori/swarfarm
66
6629292
# Generated by Django 2.2.9.dev20191214052109 on 2019-12-15 01:51 import django.contrib.postgres.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('herders', '0009_auto_20191114_1159'), ] operations = [ migrations.AddField( ...
# Generated by Django 2.2.9.dev20191214052109 on 2019-12-15 01:51 import django.contrib.postgres.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('herders', '0009_auto_20191114_1159'), ] operations = [ migrations.AddField( ...
en
0.811128
# Generated by Django 2.2.9.dev20191214052109 on 2019-12-15 01:51
1.679203
2
tests/test_lists.py
eladrich/pyrallis
22
6629293
from dataclasses import dataclass, field from typing import * import pytest from .testutils import * def test_list_one_element(simple_attribute): some_type, passed_value, expected_value = simple_attribute @dataclass class Container(TestSetup): a: List[some_type] = field(default_factory=list) ...
from dataclasses import dataclass, field from typing import * import pytest from .testutils import * def test_list_one_element(simple_attribute): some_type, passed_value, expected_value = simple_attribute @dataclass class Container(TestSetup): a: List[some_type] = field(default_factory=list) ...
en
0.52286
# type: ignore some docstring for attribute 'a'
2.72615
3
samples/modules/tensorflow/magic_wand/train/data_prepare_test.py
lviala-zaack/zephyr
6,224
6629294
<filename>samples/modules/tensorflow/magic_wand/train/data_prepare_test.py<gh_stars>1000+ # Lint as: python3 # Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obta...
<filename>samples/modules/tensorflow/magic_wand/train/data_prepare_test.py<gh_stars>1000+ # Lint as: python3 # Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obta...
en
0.735468
# Lint as: python3 # Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
2.239187
2
examples/rules/PropertiesTagsIncluded.py
amabowilli/cfn-python-lint
1
6629295
""" Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to ...
""" Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to ...
en
0.777292
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, c...
1.935151
2
modules/core/dataloader.py
CGL-Deeplearning/FRIDAY
6
6629296
<reponame>CGL-Deeplearning/FRIDAY import os import numpy as np import pandas as pd from torch.utils.data import Dataset import h5py import torch import pickle class SequenceDataset(Dataset): """ Arguments: A CSV file path """ def __init__(self, csv_path, transform=None): data_frame = ...
import os import numpy as np import pandas as pd from torch.utils.data import Dataset import h5py import torch import pickle class SequenceDataset(Dataset): """ Arguments: A CSV file path """ def __init__(self, csv_path, transform=None): data_frame = pd.read_csv(csv_path, header=None,...
en
0.645642
Arguments: A CSV file path # assert data_frame[0].apply(lambda x: os.path.isfile(x.split(' ')[0])).all(), \ # "Some images referenced in the CSV file were not found" # load the image # load the labels # type fix and convert to tensor
2.733417
3
hashsha1.py
fbl4kd43m0n/Python
2
6629297
<filename>hashsha1.py import hashlib BLOCKSIZE = 65536 hasher = hashlib.sha1() with open('anotherfile.txt', 'rb') as afile: buf = afile.read(BLOCKSIZE) while len(buf) > 0: hasher.update(buf) buf = afile.read(BLOCKSIZE) print(hasher.hexdigest())
<filename>hashsha1.py import hashlib BLOCKSIZE = 65536 hasher = hashlib.sha1() with open('anotherfile.txt', 'rb') as afile: buf = afile.read(BLOCKSIZE) while len(buf) > 0: hasher.update(buf) buf = afile.read(BLOCKSIZE) print(hasher.hexdigest())
none
1
3.045454
3
container-with-most-water/container-with-most-water.py
QQuinn03/LeetHub
0
6629298
class Solution: def maxArea(self, height: List[int]) -> int: res = 0 left = 0 right = len(height)-1 while left<right: left_contain = height[left] right_contain = height[right] if left_contain<right_contain: res = max(res,(r...
class Solution: def maxArea(self, height: List[int]) -> int: res = 0 left = 0 right = len(height)-1 while left<right: left_contain = height[left] right_contain = height[right] if left_contain<right_contain: res = max(res,(r...
none
1
3.081709
3
twitter_scrooge/twitter_scrooge.bzl
adam-singer/rules_scala
0
6629299
load("@bazel_skylib//lib:dicts.bzl", "dicts") load( "//scala:scala_cross_version.bzl", _default_maven_server_urls = "default_maven_server_urls", ) load( "//scala/private:common.bzl", "write_manifest_file", ) load( "//scala/private:dependency.bzl", "legacy_unclear_dependency_info_for_protobuf_scr...
load("@bazel_skylib//lib:dicts.bzl", "dicts") load( "//scala:scala_cross_version.bzl", _default_maven_server_urls = "default_maven_server_urls", ) load( "//scala/private:common.bzl", "write_manifest_file", ) load( "//scala/private:dependency.bzl", "legacy_unclear_dependency_info_for_protobuf_scr...
en
0.883026
# These target labels need maven_servers to compute sensible defaults. # Therefore we leave them None here. # Mustache is needed to generate java from thrift, and is passed further down. # scrooge-generator needs these runtime_deps to generate java from thrift. # This is a shim needed to import `@javax.annotation.Gener...
1.677275
2
contrib/agdc_workshop_exercises/pqa-finished.py
jeremyh/agdc
34
6629300
<filename>contrib/agdc_workshop_exercises/pqa-finished.py<gh_stars>10-100 ''' Created on 21/02/2013 @author: u76345 ''' import os import sys import logging import re import numpy from datetime import datetime, time from osgeo import gdal from agdc.stacker import Stacker from EOtools.utils import log_multiline # Set ...
<filename>contrib/agdc_workshop_exercises/pqa-finished.py<gh_stars>10-100 ''' Created on 21/02/2013 @author: u76345 ''' import os import sys import logging import re import numpy from datetime import datetime, time from osgeo import gdal from agdc.stacker import Stacker from EOtools.utils import log_multiline # Set ...
en
0.849941
Created on 21/02/2013 @author: u76345 # Set top level standard output # Default logging level for all modules # Creates derived datasets by getting masking all NBAR datasets in a stack with PQA data Subclass of Stacker Used to implement specific functionality to create stacks of derived datasets. # Figure out our ...
2.100486
2
tensorflow_data_validation/utils/display_util.py
tensorflow/data-validation
621
6629301
# Copyright 2018 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 agreed to in writing, ...
# Copyright 2018 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 agreed to in writing, ...
en
0.673873
# Copyright 2018 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 agreed to in writing, ...
1.973415
2
setup.py
gitdachong/lasttester
0
6629302
#coding:utf-8 from setuptools import setup, find_packages from lasttester import __author__,__version__,__contact__ import sys import os if sys.argv[-1] == 'publish': os.system('python setup.py sdist bdist_wheel') os.system('twine upload dist/*') sys.exit() with open("README.md", "r") as fh: long_d...
#coding:utf-8 from setuptools import setup, find_packages from lasttester import __author__,__version__,__contact__ import sys import os if sys.argv[-1] == 'publish': os.system('python setup.py sdist bdist_wheel') os.system('twine upload dist/*') sys.exit() with open("README.md", "r") as fh: long_d...
en
0.795494
#coding:utf-8
1.403904
1
apis/_track.py
JohnRipper/tinybot-rtc
1
6629303
import time class Track: def __init__(self, video_id='', video_time=0, video_title='', image='', owner=None, video_type='youTube'): self.id = video_id self.time = video_time self.title = video_title self.image = image self.owner = owner self.type = video_type ...
import time class Track: def __init__(self, video_id='', video_time=0, video_title='', image='', owner=None, video_type='youTube'): self.id = video_id self.time = video_time self.title = video_title self.image = image self.owner = owner self.type = video_type ...
none
1
2.660649
3
openclsim/plot/__init__.py
thijsreedijk/OpenCLSim
0
6629304
<filename>openclsim/plot/__init__.py<gh_stars>0 """Directory for the simulation plots.""" from .log_dataframe import get_log_dataframe from .step_chart import get_step_chart from .vessel_planning import vessel_planning __all__ = ["vessel_planning", "get_log_dataframe", "get_step_chart"]
<filename>openclsim/plot/__init__.py<gh_stars>0 """Directory for the simulation plots.""" from .log_dataframe import get_log_dataframe from .step_chart import get_step_chart from .vessel_planning import vessel_planning __all__ = ["vessel_planning", "get_log_dataframe", "get_step_chart"]
en
0.818233
Directory for the simulation plots.
1.276103
1
dlutils/models/gans/wasserstein_div/models.py
justusschock/dl-utils
13
6629305
from functools import reduce from operator import mul import torch class Generator(torch.nn.Module): """ A simple generative network """ def __init__(self, img_shape, latent_dim): """ Parameters ---------- img_shape : tuple the shape of the images to gene...
from functools import reduce from operator import mul import torch class Generator(torch.nn.Module): """ A simple generative network """ def __init__(self, img_shape, latent_dim): """ Parameters ---------- img_shape : tuple the shape of the images to gene...
en
0.64112
A simple generative network Parameters ---------- img_shape : tuple the shape of the images to generate (including channels, excluding batch dimension) latent_dim : int size of the latent noise dimension Feeds a batch of noise vectors through the network to ge...
2.925046
3
data/studio21_generated/introductory/2466/starter_code.py
vijaykumawat256/Prompt-Summarization
0
6629306
class Solution: def diagonalSum(self, mat: List[List[int]]) -> int:
class Solution: def diagonalSum(self, mat: List[List[int]]) -> int:
none
1
2.049908
2
qitensor/arrayformatter.py
dstahlke/qitensor
6
6629307
<filename>qitensor/arrayformatter.py """ This module handles formatting of arrays. Everything in here is for internal use only, except for the :func:`set_qitensor_printoptions` and :func:`get_qitensor_printoptions` functions. """ import numpy as np from qitensor import have_sage from qitensor.exceptions import Hilbe...
<filename>qitensor/arrayformatter.py """ This module handles formatting of arrays. Everything in here is for internal use only, except for the :func:`set_qitensor_printoptions` and :func:`get_qitensor_printoptions` functions. """ import numpy as np from qitensor import have_sage from qitensor.exceptions import Hilbe...
en
0.182097
This module handles formatting of arrays. Everything in here is for internal use only, except for the :func:`set_qitensor_printoptions` and :func:`get_qitensor_printoptions` functions. This module handles formatting of arrays. Methods of this class are called by methods of HilbertArray, and shouldn't ...
2.390714
2
tests/tune/concepts/space/test_parameters.py
fugue-project/tune
14
6629308
<reponame>fugue-project/tune import json import numpy as np import pandas as pd from pytest import raises from scipy import stats from triad import to_uuid from tune._utils import assert_close from tune.concepts.space import ( Choice, Grid, NormalRand, NormalRandInt, Rand, RandInt, Transiti...
import json import numpy as np import pandas as pd from pytest import raises from scipy import stats from triad import to_uuid from tune._utils import assert_close from tune.concepts.space import ( Choice, Grid, NormalRand, NormalRandInt, Rand, RandInt, TransitionChoice, TuningParameter...
en
0.654357
# for log, low>=1.0 # for log, low>=1.0 # extract and fill by dicts # same express in template # special objects # func # to_template # uuid # simple value
2.186809
2
thelma/repositories/rdb/mappers/tag.py
fogathmann/TheLMA
1
6629309
<reponame>fogathmann/TheLMA<gh_stars>1-10 """ This file is part of the TheLMA (THe Laboratory Management Application) project. See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information. Tag mapper. """ from sqlalchemy.orm import column_property from sqlalchemy.orm import relationship from sqlalchemy....
""" This file is part of the TheLMA (THe Laboratory Management Application) project. See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information. Tag mapper. """ from sqlalchemy.orm import column_property from sqlalchemy.orm import relationship from sqlalchemy.orm.deprecated_interfaces import MapperExt...
en
0.73786
This file is part of the TheLMA (THe Laboratory Management Application) project. See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information. Tag mapper. # FIXME: the mapper extension mechanism is deprecated. Mapper extension to take care of inserting/updating the non-mapped `tag_domain`, `tag_pred...
1.936533
2
tests/ddo/ddo_event_sample_v4.py
oceanprotocol/provider-py
1
6629310
# # Copyright 2021 Ocean Protocol Foundation # SPDX-License-Identifier: Apache-2.0 # ddo_event_sample_v4 = { "@context": ["https://w3id.org/did/v1"], "id": "did:op:ffa5037987b74fbab600d7515605146bb7babcb929c94c60ba93ac5ceda56775", "created": "2000-10-31T01:30:00.000-05:00", "updated": "2000-10-31T01:30:...
# # Copyright 2021 Ocean Protocol Foundation # SPDX-License-Identifier: Apache-2.0 # ddo_event_sample_v4 = { "@context": ["https://w3id.org/did/v1"], "id": "did:op:ffa5037987b74fbab600d7515605146bb7babcb929c94c60ba93ac5ceda56775", "created": "2000-10-31T01:30:00.000-05:00", "updated": "2000-10-31T01:30:...
en
0.268318
# # Copyright 2021 Ocean Protocol Foundation # SPDX-License-Identifier: Apache-2.0 #
1.322538
1
src/models/predict_model.py
data-modeler/rnn-surv
7
6629311
""" Predict RNN-SURV model """ import os import numpy as np import pandas as pd import json from os.path import dirname as up from tensorflow.keras.models import model_from_json from src.models.rnnsurv import get_data, DataGenerator, create_model def predict_rnnsurv(modelname, modelpath, datapath, outpath=None):...
""" Predict RNN-SURV model """ import os import numpy as np import pandas as pd import json from os.path import dirname as up from tensorflow.keras.models import model_from_json from src.models.rnnsurv import get_data, DataGenerator, create_model def predict_rnnsurv(modelname, modelpath, datapath, outpath=None):...
en
0.825279
Predict RNN-SURV model Predicts and outputs risks and probabilities over time for each new observation.
2.740906
3
engine/core/org_singleton.py
torrotitans/torro_community
1
6629312
#!/usr/bin/python # -*- coding: UTF-8 -* from db.org.db_org_mgr import org_mgr __all__ = {"orgSingleton"} class orgSingleton(): def add_new_org_setting(self, org): """ :return: """ return org_mgr.add_new_org_setting(org) def get_org_info(self): return org_mgr.get_...
#!/usr/bin/python # -*- coding: UTF-8 -* from db.org.db_org_mgr import org_mgr __all__ = {"orgSingleton"} class orgSingleton(): def add_new_org_setting(self, org): """ :return: """ return org_mgr.add_new_org_setting(org) def get_org_info(self): return org_mgr.get_...
en
0.168529
#!/usr/bin/python # -*- coding: UTF-8 -* :return:
2.38471
2
test/test_vfxt_template_deploy.py
anhowe/Avere
0
6629313
<filename>test/test_vfxt_template_deploy.py #!/usr/bin/python3 # Copyright (C) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See LICENSE-CODE in the project root for license information. """ Driver for testing Azure ARM template-based deployment of the Avere vFXT. """ # standard import...
<filename>test/test_vfxt_template_deploy.py #!/usr/bin/python3 # Copyright (C) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See LICENSE-CODE in the project root for license information. """ Driver for testing Azure ARM template-based deployment of the Avere vFXT. """ # standard import...
en
0.550379
#!/usr/bin/python3 # Copyright (C) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See LICENSE-CODE in the project root for license information. Driver for testing Azure ARM template-based deployment of the Avere vFXT. # standard imports # from requirements.txt # local libraries # TODO: mo...
2.023232
2
quandl_fund_xlsx/fundamentals.py
robren/quandl_fund_xlsx
1
6629314
"""This module provides functions to calculate fundamental ratios for a stock potfolio. The results are saved in an excel workbook with one sheet per stock as well as a summary sheet :copyright: (c) 2021 by <NAME> :license: Apache 2, see LICENCE for more details """ import collections import logging import numpy as ...
"""This module provides functions to calculate fundamental ratios for a stock potfolio. The results are saved in an excel workbook with one sheet per stock as well as a summary sheet :copyright: (c) 2021 by <NAME> :license: Apache 2, see LICENCE for more details """ import collections import logging import numpy as ...
en
0.836913
This module provides functions to calculate fundamental ratios for a stock potfolio. The results are saved in an excel workbook with one sheet per stock as well as a summary sheet :copyright: (c) 2021 by <NAME> :license: Apache 2, see LICENCE for more details # Added this one line below to get logging from the reque...
2.740186
3
code/evaluate_annotation.py
JonaBenja/lad-assignment1
0
6629315
<reponame>JonaBenja/lad-assignment1<gh_stars>0 import pandas as pd import glob import os.path from itertools import combinations from sklearn.metrics import cohen_kappa_score, confusion_matrix nl_terms = ["activist", "politici", "klimaat"] it_terms = ["attivist", "politici", "climatico"] categories = ["pos", "neg", "n...
import pandas as pd import glob import os.path from itertools import combinations from sklearn.metrics import cohen_kappa_score, confusion_matrix nl_terms = ["activist", "politici", "klimaat"] it_terms = ["attivist", "politici", "climatico"] categories = ["pos", "neg", "neu"] for term in nl_terms: print(term) ...
en
0.734695
# Read in the data # Read in annotations #print(confusions) # Read in the data # Read in annotations
2.63855
3
getLessons.py
Hammania689/ttmik_webscrapper
0
6629316
<reponame>Hammania689/ttmik_webscrapper<gh_stars>0 import sys import requests import urllib3 from bs4 import BeautifulSoup from pathlib import Path def download_all_lessons(): """ :return: All lesson for all 9 levels of TTMIK :) """ # Start level index # Set path to where files will be downloaded ...
import sys import requests import urllib3 from bs4 import BeautifulSoup from pathlib import Path def download_all_lessons(): """ :return: All lesson for all 9 levels of TTMIK :) """ # Start level index # Set path to where files will be downloaded to # Set Download url parent link level = 1...
en
0.505842
:return: All lesson for all 9 levels of TTMIK :) # Start level index # Set path to where files will be downloaded to # Set Download url parent link # TODO : Change download root link back to curriculm page # download_root = "http://talktomeinkorean.com/curriculum/" # # downloaded_root_page = requests.get(download_root)...
3.387711
3
scripts/equals.py
anto2318/ramdapy
0
6629317
<gh_stars>0 def equals(a, b=0): return a == b if __name__ == '__main__': print(equals(3,3))
def equals(a, b=0): return a == b if __name__ == '__main__': print(equals(3,3))
none
1
3.004136
3
deltasherlock/common/fingerprinting.py
deltasherlock/utility-package
0
6629318
<reponame>deltasherlock/utility-package<filename>deltasherlock/common/fingerprinting.py # DeltaSherlock. See README.md for usage. See LICENSE for MIT/X11 license info. # pylint: disable=W0201,W1401,R0903 """ DeltaSherlock fingerprinting module. Contains methods for generating a filesystem fingerprint based on a changes...
# DeltaSherlock. See README.md for usage. See LICENSE for MIT/X11 license info. # pylint: disable=W0201,W1401,R0903 """ DeltaSherlock fingerprinting module. Contains methods for generating a filesystem fingerprint based on a changeset """ from math import sqrt from enum import Enum, unique from gensim.models import Wor...
en
0.752497
# DeltaSherlock. See README.md for usage. See LICENSE for MIT/X11 license info. # pylint: disable=W0201,W1401,R0903 DeltaSherlock fingerprinting module. Contains methods for generating a filesystem fingerprint based on a changeset An enumerated type containing representations of each fingerprinting method. Notice h...
2.515005
3
manga_py/providers/shakai_ru.py
tgaugry/manga-py
0
6629319
<reponame>tgaugry/manga-py<filename>manga_py/providers/shakai_ru.py from manga_py.provider import Provider from .helpers.std import Std class ShakaiRu(Provider, Std): _api_url = 'http://shakai.ru/take/api-manga/request/shakai' def get_chapter_index(self) -> str: idx = self.chapter.get('data-first') ...
from manga_py.provider import Provider from .helpers.std import Std class ShakaiRu(Provider, Std): _api_url = 'http://shakai.ru/take/api-manga/request/shakai' def get_chapter_index(self) -> str: idx = self.chapter.get('data-first') return idx.replace('_', '-') def get_content(self): ...
es
0.290124
# FIXME HOME # todo meta
2.686996
3
setup.py
coetaur0/LEAN
2
6629320
<reponame>coetaur0/LEAN from setuptools import setup setup(name='LEAN', version='0.0.1', url='https://github.com/coetaur0/ESIM', license='Apache 2', author='<NAME>', author_email='<EMAIL>', description='Implementation of the LEAN model for NLI with PyTorch', packages=[ ...
from setuptools import setup setup(name='LEAN', version='0.0.1', url='https://github.com/coetaur0/ESIM', license='Apache 2', author='<NAME>', author_email='<EMAIL>', description='Implementation of the LEAN model for NLI with PyTorch', packages=[ 'lean' ], ...
none
1
1.175131
1
Python3/636.py
rakhi2001/ecom7
854
6629321
__________________________________________________________________________________________________ sample 72 ms submission class Solution: def exclusiveTime(self, n: 'int', logs: 'List[str]') -> 'List[int]': res = [0] * n stack = [] for log in logs: idx, start, time ...
__________________________________________________________________________________________________ sample 72 ms submission class Solution: def exclusiveTime(self, n: 'int', logs: 'List[str]') -> 'List[int]': res = [0] * n stack = [] for log in logs: idx, start, time ...
en
0.904456
# task and total time accumulated so far and whether it is cut off # start # if cut off, last time is closing, which takes up 1, so subtract it
2.921459
3
grizli_aws/check_prep_results.py
grizli-project/grizli-aws
0
6629322
<gh_stars>0 """ Check drizzled images from prep and log checks to a file """ def run_check(check_root='GrizliPrep', query='./j*/Prep/*phot.fits'): import glob import os import time qfiles = glob.glob(query) try: checked = [line.strip() for line in open(check_root+'Passed.log'...
""" Check drizzled images from prep and log checks to a file """ def run_check(check_root='GrizliPrep', query='./j*/Prep/*phot.fits'): import glob import os import time qfiles = glob.glob(query) try: checked = [line.strip() for line in open(check_root+'Passed.log').readlines(...
en
0.596861
Check drizzled images from prep and log checks to a file #root=os.path.basename(file)[:14] #[:14]
2.373952
2
testbench/plot_benchmark.py
clemenshage/grslra
0
6629323
<reponame>clemenshage/grslra<filename>testbench/plot_benchmark.py import numpy as np from matplotlib import pyplot as plt data = np.load('lpnorm_benchmark.npz') algos = data["algos"] msizes = data["msizes"] res = data["res"] for i in range(len(algos)): plt.loglog(np.square(msizes), res[i, :], linewidth=2.5, line...
import numpy as np from matplotlib import pyplot as plt data = np.load('lpnorm_benchmark.npz') algos = data["algos"] msizes = data["msizes"] res = data["res"] for i in range(len(algos)): plt.loglog(np.square(msizes), res[i, :], linewidth=2.5, linestyle="-", label=algos[i].__name__.replace('_', ' ')) plt.legend(...
none
1
3.13175
3
dcgan/utils.py
euirim/clone-wars-gan
0
6629324
import torch import torchvision.transforms as transforms import torchvision.datasets as dset # Directory containing the data. root = "../data/full" def get_dataloader(params): """ Loads the dataset and applies proproccesing steps to it. Returns a PyTorch DataLoader. """ # Data proprecessing. ...
import torch import torchvision.transforms as transforms import torchvision.datasets as dset # Directory containing the data. root = "../data/full" def get_dataloader(params): """ Loads the dataset and applies proproccesing steps to it. Returns a PyTorch DataLoader. """ # Data proprecessing. ...
en
0.545218
# Directory containing the data. Loads the dataset and applies proproccesing steps to it. Returns a PyTorch DataLoader. # Data proprecessing. # Create the dataset. # Create the dataloader.
2.861716
3
src/spinnaker_ros_lsm/venv/lib/python2.7/site-packages/pacman/model/placements/placements.py
Roboy/LSM_SpiNNaker_MyoArm
2
6629325
<filename>src/spinnaker_ros_lsm/venv/lib/python2.7/site-packages/pacman/model/placements/placements.py from pacman.exceptions import (PacmanSubvertexAlreadyPlacedError, PacmanSubvertexNotPlacedError, PacmanProcessorAlreadyOccupiedError, ...
<filename>src/spinnaker_ros_lsm/venv/lib/python2.7/site-packages/pacman/model/placements/placements.py from pacman.exceptions import (PacmanSubvertexAlreadyPlacedError, PacmanSubvertexNotPlacedError, PacmanProcessorAlreadyOccupiedError, ...
en
0.702503
Represents a list of placements :param placements: The initial list of placements :type placements: iterable of\ :py:class:`pacman.model.placements.placement.Placement` :raise PacmanSubvertexAlreadyPlacedError: If there is any subvertex with more than one placement. ...
2.796817
3
userhandling/migrations/0017_auto_20191229_2002.py
cknaut/cinemaple
1
6629326
<reponame>cknaut/cinemaple # Generated by Django 2.2.8 on 2019-12-30 01:02 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('userhandling', '0016_auto_20191126_2101'), ] operations = [ migrations.RenameField( model_name='movie', ...
# Generated by Django 2.2.8 on 2019-12-30 01:02 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('userhandling', '0016_auto_20191126_2101'), ] operations = [ migrations.RenameField( model_name='movie', old_name='tmdbID', ...
en
0.867003
# Generated by Django 2.2.8 on 2019-12-30 01:02
1.770158
2
tests/__init__.py
billionai/RFI
2
6629327
"""Core functionality testing module."""
"""Core functionality testing module."""
en
0.2966
Core functionality testing module.
0.880316
1
tp/tp02/ex5.py
UPB-FILS/sde
5
6629328
girlsList = [] girlsList.append('Ana') girlsList.append('Diana') girlsList.append('Alexandra') girlsList.append('Ana') # a girlsList.sort() print (girlsList) # b auxList = [] for name in girlsList: if name not in auxList: auxList.append(name) for name in auxList: print (name + " " + str(girlsList.cou...
girlsList = [] girlsList.append('Ana') girlsList.append('Diana') girlsList.append('Alexandra') girlsList.append('Ana') # a girlsList.sort() print (girlsList) # b auxList = [] for name in girlsList: if name not in auxList: auxList.append(name) for name in auxList: print (name + " " + str(girlsList.cou...
it
0.401875
# a # b # c # d # e
3.833473
4
cos.py
dydx-git/Calcy
0
6629329
import math def Cos(param1,param2, param3): try: if param1==None or param2 != '': if param3 == False: param1=math.cos(float(param2)) else: param1=math.cos(math.radians(float(param2))) else: if param3 == False: ...
import math def Cos(param1,param2, param3): try: if param1==None or param2 != '': if param3 == False: param1=math.cos(float(param2)) else: param1=math.cos(math.radians(float(param2))) else: if param3 == False: ...
none
1
3.496783
3
src/intersection/intersection.py
0xF4D3C0D3/ray-tracer-challenge-with-python
0
6629330
<reponame>0xF4D3C0D3/ray-tracer-challenge-with-python<gh_stars>0 import numpy as np class Intersection(np.ndarray): def __new__(cls, ts, mask, obj): self = ts.T.view(cls) self.mask = mask.squeeze() self.obj = obj return self def __eq__(self, other): return np.allclose(...
import numpy as np class Intersection(np.ndarray): def __new__(cls, ts, mask, obj): self = ts.T.view(cls) self.mask = mask.squeeze() self.obj = obj return self def __eq__(self, other): return np.allclose(self, other) @property def count(self): return s...
none
1
2.824681
3
src/query/APIQuery.py
nekumelon/SonOfAnton
0
6629331
<gh_stars>0 """ APIQuery should start by checking if a cached completion exists. If it doesn't- prompt the API for a completion, cache it and use it. """ import openai, os, json, re, IO.io as io from encoder.encoder import get_encoder MAX_TOKENS = 2048; with open('config.json') as configFile: config = json.loads...
""" APIQuery should start by checking if a cached completion exists. If it doesn't- prompt the API for a completion, cache it and use it. """ import openai, os, json, re, IO.io as io from encoder.encoder import get_encoder MAX_TOKENS = 2048; with open('config.json') as configFile: config = json.loads(configFile....
en
0.85387
APIQuery should start by checking if a cached completion exists. If it doesn't- prompt the API for a completion, cache it and use it. # https://www.tutorialspoint.com/How-to-clamp-floating-numbers-in-Pythons # Get the text of a completion and prepare it # Get the text from the first (Best) completion choice # Remove th...
2.859187
3
aio_request/response_classifier.py
anna-money/aio-request
6
6629332
import abc import enum from typing import Dict, Optional from .base import Header, Response class ResponseVerdict(enum.Enum): ACCEPT = 1 REJECT = 2 class ResponseClassifier(abc.ABC): __slots__ = () @abc.abstractmethod def classify(self, response: Response) -> ResponseVerdict: ... cla...
import abc import enum from typing import Dict, Optional from .base import Header, Response class ResponseVerdict(enum.Enum): ACCEPT = 1 REJECT = 2 class ResponseClassifier(abc.ABC): __slots__ = () @abc.abstractmethod def classify(self, response: Response) -> ResponseVerdict: ... cla...
none
1
3.043765
3
pip_services3_data/IGetter.py
pip-services-python/pip-services-data-python
0
6629333
# -*- coding: utf-8 -*- """ pip_services3_data.IGetter ~~~~~~~~~~~~~~~~~~~~~~~~~ Interface for data getters. :copyright: Conceptual Vision Consulting LLC 2018-2019, see AUTHORS for more details. :license: MIT, see LICENSE for more details. """ from typing import Any, Optional, TypeVar fro...
# -*- coding: utf-8 -*- """ pip_services3_data.IGetter ~~~~~~~~~~~~~~~~~~~~~~~~~ Interface for data getters. :copyright: Conceptual Vision Consulting LLC 2018-2019, see AUTHORS for more details. :license: MIT, see LICENSE for more details. """ from typing import Any, Optional, TypeVar fro...
en
0.749155
# -*- coding: utf-8 -*- pip_services3_data.IGetter ~~~~~~~~~~~~~~~~~~~~~~~~~ Interface for data getters. :copyright: Conceptual Vision Consulting LLC 2018-2019, see AUTHORS for more details. :license: MIT, see LICENSE for more details. # Declare type variable Interface for data processing comp...
2.413539
2
libp2p/routing/interfaces.py
swedneck/py-libp2p
0
6629334
from abc import ABC, abstractmethod from typing import Iterable from libp2p.peer.id import ID from libp2p.peer.peerinfo import PeerInfo class IContentRouting(ABC): @abstractmethod def provide(self, cid: bytes, announce: bool = True) -> None: """ Provide adds the given cid to the content routi...
from abc import ABC, abstractmethod from typing import Iterable from libp2p.peer.id import ID from libp2p.peer.peerinfo import PeerInfo class IContentRouting(ABC): @abstractmethod def provide(self, cid: bytes, announce: bool = True) -> None: """ Provide adds the given cid to the content routi...
en
0.883183
Provide adds the given cid to the content routing system. If announce is True, it also announces it, otherwise it is just kept in the local accounting of which objects are being provided. Search for peers who are able to provide a given key returns an iterator of peer.PeerInfo Find specific Peer...
3.149146
3
7/TKnapsack.py
pipSu/Algorithm_Assignment
0
6629335
def __main(): weight = [4, 2, 5,] bulk = [1, 2, 3,] value = [5, 2, 6,] cw = 5 cb = 4 n = len(weight) m = [ [[0,0] for j in range(max(cw,cb))] for i in range(n) ] print(m) tk(weight,bulk,value,m, n,cw,cb) def tk(w,b,v,m, n,cw,cb,): for i in range(n-1,-1,-...
def __main(): weight = [4, 2, 5,] bulk = [1, 2, 3,] value = [5, 2, 6,] cw = 5 cb = 4 n = len(weight) m = [ [[0,0] for j in range(max(cw,cb))] for i in range(n) ] print(m) tk(weight,bulk,value,m, n,cw,cb) def tk(w,b,v,m, n,cw,cb,): for i in range(n-1,-1,-...
zh
0.16912
#for j in range(maxe, max(cb, cw)+1):
2.830388
3
project2_jarvis_ai.py
shrihari272/Artificial_Intelligence
1
6629336
<reponame>shrihari272/Artificial_Intelligence<gh_stars>1-10 import pyttsx3 import time import webbrowser import random import speech_recognition as sr import wikipedia import socket import datetime import wolframalpha import os import sys import python_weather import asyncio from clint.textui import progre...
import pyttsx3 import time import webbrowser import random import speech_recognition as sr import wikipedia import socket import datetime import wolframalpha import os import sys import python_weather import asyncio from clint.textui import progress import requests import shutil import subprocess en...
de
0.243835
####################".center(columns)) ####################".center(columns))
2.702618
3
rpython/rlib/rstruct/test/test_runpack.py
jptomo/pypy-lang-scheme
34
6629337
from rpython.rtyper.test.tool import BaseRtypingTest from rpython.rlib.rstruct.runpack import runpack from rpython.rlib.rarithmetic import LONG_BIT import struct class TestRStruct(BaseRtypingTest): def test_unpack(self): pad = '\x00' * (LONG_BIT//8-1) # 3 or 7 null bytes def fn(): re...
from rpython.rtyper.test.tool import BaseRtypingTest from rpython.rlib.rstruct.runpack import runpack from rpython.rlib.rarithmetic import LONG_BIT import struct class TestRStruct(BaseRtypingTest): def test_unpack(self): pad = '\x00' * (LONG_BIT//8-1) # 3 or 7 null bytes def fn(): re...
en
0.301816
# 3 or 7 null bytes
2.500109
3
archive/run_results_parser.py
sungchun12/airflow-dbt-cloud
9
6629338
"""Utilities to parse the results of the run_results.json""" import json class dbt_command_run_results_parser: def __init__(self, status_set, dbt_command_override, run_downstream_nodes): self.status_set = status_set # ex: {'warn', 'error', 'fail'} self.dbt_command_override = dbt_command_override ...
"""Utilities to parse the results of the run_results.json""" import json class dbt_command_run_results_parser: def __init__(self, status_set, dbt_command_override, run_downstream_nodes): self.status_set = status_set # ex: {'warn', 'error', 'fail'} self.dbt_command_override = dbt_command_override ...
en
0.367851
Utilities to parse the results of the run_results.json # ex: {'warn', 'error', 'fail'}
2.90047
3
workloads/bench1/src/stats.py
pacslab/conc-value-perf-modelling
0
6629339
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import print_function import json import time import os import socket import sys import uuid import subprocess try: import urllib2 from urllib2 import urlopen except BaseException: from urllib.request import urlopen import decimal # Set it to yo...
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import print_function import json import time import os import socket import sys import uuid import subprocess try: import urllib2 from urllib2 import urlopen except BaseException: from urllib.request import urlopen import decimal # Set it to yo...
en
0.584185
#!/usr/bin/python # -*- coding: utf-8 -*- # Set it to your own servers Convert a float number to string Get and format the content of /proc/meminfo Get and format the content of /proc/vmstat Get and format the content of /proc/diskstats Get and format the content of /proc/cpuinfo Get CPU version information # return [a...
2.581217
3
members/forms.py
Freerk42/makerspaceleiden-crm
0
6629340
from django import forms from django.contrib.auth.forms import UserCreationForm from .models import Tag, clean_tag_string, AuditRecord from django.forms import ModelForm from members.models import User from mailinglists.models import Mailinglist, Subscription from unknowntags.models import Unknowntag import re class...
from django import forms from django.contrib.auth.forms import UserCreationForm from .models import Tag, clean_tag_string, AuditRecord from django.forms import ModelForm from members.models import User from mailinglists.models import Mailinglist, Subscription from unknowntags.models import Unknowntag import re class...
none
1
2.141053
2
Day 07 - The Treachery of Whales/part1-solution.py
CapOfCave/adventofcode-2021
0
6629341
<gh_stars>0 def calc_score(crabs, i): return sum([abs(c - i) for c in crabs]) with open('./input.txt') as input: crabs = [int(s) for s in input.readline().split(',')] best_score = max(crabs) * len(crabs) for test in range(max(crabs)): new_score = calc_score(crabs, test) if (new_score...
def calc_score(crabs, i): return sum([abs(c - i) for c in crabs]) with open('./input.txt') as input: crabs = [int(s) for s in input.readline().split(',')] best_score = max(crabs) * len(crabs) for test in range(max(crabs)): new_score = calc_score(crabs, test) if (new_score < best_score...
en
0.893625
# it only gets worse from here # 355592
3.575686
4
plugins/filetime_from_git/git_wrapper.py
likev/gauravssnl.github.io
5
6629342
<filename>plugins/filetime_from_git/git_wrapper.py # -*- coding: utf-8 -*- """ Wrap python git interface for compatibility with older/newer version """ try: from itertools import zip_longest except ImportError: from six.moves import zip_longest import logging import os from time import mktime from datetime impo...
<filename>plugins/filetime_from_git/git_wrapper.py # -*- coding: utf-8 -*- """ Wrap python git interface for compatibility with older/newer version """ try: from itertools import zip_longest except ImportError: from six.moves import zip_longest import logging import os from time import mktime from datetime impo...
en
0.873738
# -*- coding: utf-8 -*- Wrap python git interface for compatibility with older/newer version Collect data into fixed-length chunks or blocks # grouper('ABCDEFG', 3, 'x') --> ABC DEF Gxx Wrap git module to provide a more stable interface across versions :param path: Path to check :returns: True if path is manage...
2.217548
2
cmdix/command/cat.py
jaraco/pycoreutils
18
6629343
import sys import itertools from .. import lib def parseargs(p): """ Add arguments and `func` to `p`. :param p: ArgumentParser :return: ArgumentParser """ p.set_defaults(func=func) p.description = "Concatenate FILE(s), or standard input, " + "to standard output." p.epilog = ( ...
import sys import itertools from .. import lib def parseargs(p): """ Add arguments and `func` to `p`. :param p: ArgumentParser :return: ArgumentParser """ p.set_defaults(func=func) p.description = "Concatenate FILE(s), or standard input, " + "to standard output." p.epilog = ( ...
es
0.08582
Add arguments and `func` to `p`. :param p: ArgumentParser :return: ArgumentParser
3.273536
3
python/oneibl/tests/test_one_tutorial.py
GaelleChapuis/ibllib
0
6629344
import oneibl.examples.tutorial_script print(oneibl.examples.tutorial_script)
import oneibl.examples.tutorial_script print(oneibl.examples.tutorial_script)
none
1
1.103005
1
packs/trello/sensors/list_actions_sensor.py
userlocalhost2000/st2contrib
164
6629345
<reponame>userlocalhost2000/st2contrib<gh_stars>100-1000 import dateutil.parser from trello import TrelloClient from st2reactor.sensor.base import PollingSensor class TrelloListSensor(PollingSensor): """ Sensor which monitors Trello list for a new actions (events). For reference see Trello API Docs: ...
import dateutil.parser from trello import TrelloClient from st2reactor.sensor.base import PollingSensor class TrelloListSensor(PollingSensor): """ Sensor which monitors Trello list for a new actions (events). For reference see Trello API Docs: https://trello.com/docs/api/list/index.html#get-1-lists-i...
en
0.68544
Sensor which monitors Trello list for a new actions (events). For reference see Trello API Docs: https://trello.com/docs/api/list/index.html#get-1-lists-idlist-actions Set defaults and validate YAML config metadata. Run the sensor initialization / setup code (if any). Iterate through all Trello lists from sens...
2.914999
3
client.py
mjsir911/py-piemessage
0
6629346
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import uuid import socket import time __appname__ = "pymessage" __author__ = "<NAME>, <NAME>" __copyright__ = "" __credits__ = "<NAME>, <NAME>" __license__ = "new BSD 3-Clause" __version__ = "0.0.3" __maintainers__ = "<NAME>, <NAME>" __email__ ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import uuid import socket import time __appname__ = "pymessage" __author__ = "<NAME>, <NAME>" __copyright__ = "" __credits__ = "<NAME>, <NAME>" __license__ = "new BSD 3-Clause" __version__ = "0.0.3" __maintainers__ = "<NAME>, <NAME>" __email__ ...
en
0.510271
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # ik this is such BAD CODE # contents = "latest guid +5: {}".format(lguid + '5') # low byte count for whatever reason #print('mes rec: {}'.format(msg))
2.301695
2
aries_cloudagent/commands/tests/test_start.py
VersesGitHub/aries-cloudagent-python
1
6629347
import sys from asynctest import TestCase as AsyncTestCase from asynctest import mock as async_mock from ...config.error import ArgsParseError from .. import start as test_module class TestStart(AsyncTestCase): def test_bad_args(self): with self.assertRaises(ArgsParseError): test_module.exec...
import sys from asynctest import TestCase as AsyncTestCase from asynctest import mock as async_mock from ...config.error import ArgsParseError from .. import start as test_module class TestStart(AsyncTestCase): def test_bad_args(self): with self.assertRaises(ArgsParseError): test_module.exec...
en
0.676316
# exec partial # exec partial
2.314826
2
userbot/modules/animasi2.py
Yansaii/Bdrl-Ubot
0
6629348
<reponame>Yansaii/Bdrl-Ubot from time import sleep from userbot import CMD_HELP from userbot.events import register @register(outgoing=True, pattern='^.sadboy(?: |$)(.*)') async def typewriter(typew): typew.pattern_match.group(1) sleep(2) await typew.edit("`Pertama-tama kamu cantik`") sleep(2) awa...
from time import sleep from userbot import CMD_HELP from userbot.events import register @register(outgoing=True, pattern='^.sadboy(?: |$)(.*)') async def typewriter(typew): typew.pattern_match.group(1) sleep(2) await typew.edit("`Pertama-tama kamu cantik`") sleep(2) await typew.edit("`Kedua kamu m...
en
0.892644
# Create by myself @localheart # Create by myself @localheart # Create by myself @localheart
2.457355
2
adv/berserker.py
pfleg/dl
0
6629349
from core.advbase import * from slot.a import * from slot.d import * def module(): return Berserker class Berserker(Adv): a3 = ('lo',0.3) conf = {} conf['slots.a'] = The_Shining_Overlord()+Primal_Crisis() conf['slots.poison.a'] = The_Shining_Overlord()+Primal_Crisis() conf['acl'] = """ ...
from core.advbase import * from slot.a import * from slot.d import * def module(): return Berserker class Berserker(Adv): a3 = ('lo',0.3) conf = {} conf['slots.a'] = The_Shining_Overlord()+Primal_Crisis() conf['slots.poison.a'] = The_Shining_Overlord()+Primal_Crisis() conf['acl'] = """ ...
en
0.392334
`dragon.act('c3 s end'),fsc `s3, not self.s3_buff and fsc `s4 `s1,fsc `fs, x=3
2.000803
2
lab_5/25.py
Mmalikov1337/python_labs
0
6629350
a = int(input('Enter number: ')) n = int(input('Enter degree: ')) a1 = a for k in range (n - 1): a *= a1 print (a)
a = int(input('Enter number: ')) n = int(input('Enter degree: ')) a1 = a for k in range (n - 1): a *= a1 print (a)
none
1
3.942759
4