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
gridfs/grid_file.py
naomielst/mongo-python-driver
2
5500
# Copyright 2009-present MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
# Copyright 2009-present MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
en
0.761501
# Copyright 2009-present MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
2.188689
2
forte/processors/tests/stanfordnlp_processor_test.py
tcl326/forte
0
5501
"""This module tests Stanford NLP processors.""" import os import unittest from texar.torch import HParams from forte.pipeline import Pipeline from forte.data.readers import StringReader from forte.processors.stanfordnlp_processor import StandfordNLPProcessor from ft.onto.base_ontology import Token, Sentence class ...
"""This module tests Stanford NLP processors.""" import os import unittest from texar.torch import HParams from forte.pipeline import Pipeline from forte.data.readers import StringReader from forte.processors.stanfordnlp_processor import StandfordNLPProcessor from ft.onto.base_ontology import Token, Sentence class ...
en
0.663758
This module tests Stanford NLP processors. # Language code for the language to build the Pipeline # TODO
2.656154
3
src/serve_files.py
eventh/m3u8looper
0
5502
#! /usr/bin/env python3 # -*- coding: utf-8 -*- """ Serve current folder files in a HTTP webserver. """ import socketserver from threading import Thread from http.server import SimpleHTTPRequestHandler PORT = 8000 def start_http_server(port=PORT): httpd = socketserver.TCPServer(("", port), SimpleHTTPRequestHand...
#! /usr/bin/env python3 # -*- coding: utf-8 -*- """ Serve current folder files in a HTTP webserver. """ import socketserver from threading import Thread from http.server import SimpleHTTPRequestHandler PORT = 8000 def start_http_server(port=PORT): httpd = socketserver.TCPServer(("", port), SimpleHTTPRequestHand...
en
0.464868
#! /usr/bin/env python3 # -*- coding: utf-8 -*- Serve current folder files in a HTTP webserver.
2.892054
3
pypy/module/__builtin__/test/test_compile.py
yxzoro/pypy
0
5503
# coding: utf-8 class AppTestCompile: def test_simple(self): import sys co = compile('1+2', '?', 'eval') assert eval(co) == 3 co = compile(memoryview(b'1+2'), '?', 'eval') assert eval(co) == 3 exc = raises(ValueError, compile, chr(0), '?', 'eval') assert str(...
# coding: utf-8 class AppTestCompile: def test_simple(self): import sys co = compile('1+2', '?', 'eval') assert eval(co) == 3 co = compile(memoryview(b'1+2'), '?', 'eval') assert eval(co) == 3 exc = raises(ValueError, compile, chr(0), '?', 'eval') assert str(...
en
0.67973
# coding: utf-8 # -*- coding: utf-8 -*-\n', 'dummy', 'exec') # -*- coding: iso-8859-15 -*-\n', 'dummy', 'exec') # -*- coding: fake -*-\n', 'dummy', 'exec') # raise exception when node type doesn't match with compile mode def fn(): pass # works Clone of the part of the original test that was failing. def f(): ""...
2.683593
3
tickers_graphing_module.py
huangbrandon432/Investing-Trading-Tool
0
5504
import yfinance as yf import matplotlib.pyplot as plt import plotly.express as px import plotly.graph_objects as go from plotly.subplots import make_subplots import pandas as pd from IPython.display import Markdown import numpy as np from datetime import date, timedelta def plot_and_get_info(ticker, start = None, en...
import yfinance as yf import matplotlib.pyplot as plt import plotly.express as px import plotly.graph_objects as go from plotly.subplots import make_subplots import pandas as pd from IPython.display import Markdown import numpy as np from datetime import date, timedelta def plot_and_get_info(ticker, start = None, en...
en
0.628668
# time series normalization # y will be a column in a dataframe
2.633487
3
flexbe_navigation_states/src/flexbe_navigation_states/navigation_sm.py
amsks/generic_flexbe_states
0
5505
<gh_stars>0 #!/usr/bin/env python # -*- coding: utf-8 -*- ########################################################### # WARNING: Generated code! # # ************************** # # Manual changes may get lost if file is generated again. # # Only code inside the...
#!/usr/bin/env python # -*- coding: utf-8 -*- ########################################################### # WARNING: Generated code! # # ************************** # # Manual changes may get lost if file is generated again. # # Only code inside the [MANUAL] ta...
en
0.577121
#!/usr/bin/env python # -*- coding: utf-8 -*- ########################################################### # WARNING: Generated code! # # ************************** # # Manual changes may get lost if file is generated again. # # Only code inside the [MANUAL] ta...
2.042342
2
text2cc/xml_assessment.py
dlehman83/text2cc
1
5506
# -*- coding: utf-8 -*- # # Copyright (c) 2021, <NAME> # Copyright (c) 2020, <NAME> # All rights reserved. # # Licensed under the BSD 3-Clause License: # http://opensource.org/licenses/BSD-3-Clause # from .quiz import Quiz, Question, GroupStart, GroupEnd, TextRegion BEFORE_ITEMS = '''\ <?xml version="1.0" encoding=...
# -*- coding: utf-8 -*- # # Copyright (c) 2021, <NAME> # Copyright (c) 2020, <NAME> # All rights reserved. # # Licensed under the BSD 3-Clause License: # http://opensource.org/licenses/BSD-3-Clause # from .quiz import Quiz, Question, GroupStart, GroupEnd, TextRegion BEFORE_ITEMS = '''\ <?xml version="1.0" encoding=...
en
0.27206
# -*- coding: utf-8 -*- # # Copyright (c) 2021, <NAME> # Copyright (c) 2020, <NAME> # All rights reserved. # # Licensed under the BSD 3-Clause License: # http://opensource.org/licenses/BSD-3-Clause # \ <?xml version="1.0" encoding="UTF-8"?> <questestinterop xmlns="http://www.imsglobal.org/xsd/ims_qtiasiv1p2" xmlns:xsi=...
1.783179
2
tests/test_aggregate_stats_design.py
bids-standard/bids-statsmodels-design-synthesizer
0
5507
#!/usr/bin/env python """Tests for `bids_statsmodels_design_synthesizer` package.""" import pytest import subprocess as sp from pathlib import Path SYNTHESIZER = "aggregate_stats_design.py" from bids_statsmodels_design_synthesizer import aggregate_stats_design as synth_mod # from bids_statsmodels_design_synthesizer...
#!/usr/bin/env python """Tests for `bids_statsmodels_design_synthesizer` package.""" import pytest import subprocess as sp from pathlib import Path SYNTHESIZER = "aggregate_stats_design.py" from bids_statsmodels_design_synthesizer import aggregate_stats_design as synth_mod # from bids_statsmodels_design_synthesizer...
en
0.687868
#!/usr/bin/env python Tests for `bids_statsmodels_design_synthesizer` package. # from bids_statsmodels_design_synthesizer import Path(SYNTHESIZER).stem as synth_mod We roughly want to implement the equivalent of the following: from bids.analysis import Analysis from bids.layout import BIDSLayout layout = B...
2.325724
2
skynet-agent/plugins/plugin_api.py
skynetera/skynet
3
5508
#!/usr/bin/env python # coding: utf-8 __author__ = 'whoami' """ @version: 1.0 @author: whoami @license: Apache Licence 2.0 @contact: <EMAIL> @site: http://www.itweet.cn @software: PyCharm Community Edition @file: plugin_api.py @time: 2015-11-28 下午1:52 """ from linux import cpu,disk,iostats,loadavg,memory,netstats,swa...
#!/usr/bin/env python # coding: utf-8 __author__ = 'whoami' """ @version: 1.0 @author: whoami @license: Apache Licence 2.0 @contact: <EMAIL> @site: http://www.itweet.cn @software: PyCharm Community Edition @file: plugin_api.py @time: 2015-11-28 下午1:52 """ from linux import cpu,disk,iostats,loadavg,memory,netstats,swa...
en
0.292447
#!/usr/bin/env python # coding: utf-8 @version: 1.0 @author: whoami @license: Apache Licence 2.0 @contact: <EMAIL> @site: http://www.itweet.cn @software: PyCharm Community Edition @file: plugin_api.py @time: 2015-11-28 下午1:52
1.782889
2
code/figure_warp.py
jwcarr/drift
2
5509
import numpy as np import eyekit import algorithms import core data = eyekit.io.load(core.FIXATIONS / 'sample.json') passages = eyekit.io.load(core.DATA / 'passages.json') original_sequence = data['trial_5']['fixations'] fixation_XY = np.array([fixation.xy for fixation in original_sequence], dtype=int) word_XY = np....
import numpy as np import eyekit import algorithms import core data = eyekit.io.load(core.FIXATIONS / 'sample.json') passages = eyekit.io.load(core.DATA / 'passages.json') original_sequence = data['trial_5']['fixations'] fixation_XY = np.array([fixation.xy for fixation in original_sequence], dtype=int) word_XY = np....
ur
0.068912
# fig.save(core.FIGS / 'fig02_single_column.eps', width=83)
2.129573
2
storm/Nimbus.py
krux/python-storm
0
5510
<reponame>krux/python-storm<filename>storm/Nimbus.py<gh_stars>0 # # Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # from thrift.Thrift import TType, TMessageType, TException, TApplicationException from ttypes import * from thrift.T...
# # Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # from thrift.Thrift import TType, TMessageType, TException, TApplicationException from ttypes import * from thrift.Thrift import TProcessor from thrift.transport import TTransport ...
en
0.270779
# # Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # Parameters: - name - uploadedJarLocation - jsonConf - topology Parameters: - name - uploadedJarLocation - jsonConf - topology - options...
1.836418
2
gemucator/__init__.py
philipwfowler/genucator
0
5511
#! /usr/bin/env python from .core import gemucator
#! /usr/bin/env python from .core import gemucator
ru
0.148623
#! /usr/bin/env python
1.017104
1
client/checkout/schema/types.py
daniel-waruo/e-commerse-api
6
5512
<gh_stars>1-10 import graphene from graphene_django import DjangoObjectType from graphene_django.converter import convert_django_field from pyuploadcare.dj.models import ImageField
import graphene from graphene_django import DjangoObjectType from graphene_django.converter import convert_django_field from pyuploadcare.dj.models import ImageField
none
1
1.217955
1
pangenome_fluidity.py
PlantDr430/CSU_scripts
1
5513
#!/usr/bin/python3 ''' This script follows formulas put forth in Kislyuk et al. (2011) to calculate genome fluidity of a pangenome dataset. Variance and standard error are estimated as total variance containing both the variance due to subsampling all possible combinations (without replacement) of N genomes from th...
#!/usr/bin/python3 ''' This script follows formulas put forth in Kislyuk et al. (2011) to calculate genome fluidity of a pangenome dataset. Variance and standard error are estimated as total variance containing both the variance due to subsampling all possible combinations (without replacement) of N genomes from th...
en
0.873301
#!/usr/bin/python3 This script follows formulas put forth in Kislyuk et al. (2011) to calculate genome fluidity of a pangenome dataset. Variance and standard error are estimated as total variance containing both the variance due to subsampling all possible combinations (without replacement) of N genomes from the tot...
2.673637
3
osvolbackup/backup.py
CCSGroupInternational/osvolbackup
1
5514
# # This module provides the Instance class that encapsulate some complex server instances related operations # from __future__ import print_function from json import loads from neutronclient.v2_0 import client as neutron_client from novaclient import client as nova_client from cinderclient import client as cinder_cli...
# # This module provides the Instance class that encapsulate some complex server instances related operations # from __future__ import print_function from json import loads from neutronclient.v2_0 import client as neutron_client from novaclient import client as nova_client from cinderclient import client as cinder_cli...
en
0.843313
# # This module provides the Instance class that encapsulate some complex server instances related operations # # Load metadata from the backup description field # Get volumes associated with the selected backup # flavor = self.nova.flavors.find(name=self.selected_metadata['flavor']) # Restore the volumes # We need to ...
2.243745
2
gammapy/estimators/profile.py
JohannesBuchner/gammapy
1
5515
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Tools to create profiles (i.e. 1D "slices" from 2D images).""" import numpy as np import scipy.ndimage from astropy import units as u from astropy.convolution import Box1DKernel, Gaussian1DKernel from astropy.coordinates import Angle from astropy.table ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Tools to create profiles (i.e. 1D "slices" from 2D images).""" import numpy as np import scipy.ndimage from astropy import units as u from astropy.convolution import Box1DKernel, Gaussian1DKernel from astropy.coordinates import Angle from astropy.table ...
en
0.483086
# Licensed under a 3-clause BSD style license - see LICENSE.rst Tools to create profiles (i.e. 1D "slices" from 2D images). # TODO: implement measuring profile along arbitrary directions # TODO: think better about error handling. e.g. MC based methods Estimate profile from image. Parameters ---------- x_ed...
2.570046
3
ABC/abc001-abc050/abc007/b.py
KATO-Hiro/AtCoder
2
5516
<reponame>KATO-Hiro/AtCoder # -*- coding: utf-8 -*- def main(): a = input() # See: # https://www.slideshare.net/chokudai/abc007 if a == 'a': print('-1') else: print('a') if __name__ == '__main__': main()
# -*- coding: utf-8 -*- def main(): a = input() # See: # https://www.slideshare.net/chokudai/abc007 if a == 'a': print('-1') else: print('a') if __name__ == '__main__': main()
en
0.722296
# -*- coding: utf-8 -*- # See: # https://www.slideshare.net/chokudai/abc007
3.663014
4
env/lib/python3.8/site-packages/versatileimagefield/mixins.py
crimergio/linux_test
1
5517
"""versatileimagefield Field mixins.""" import os import re from .datastructures import FilterLibrary from .registry import autodiscover, versatileimagefield_registry from .settings import ( cache, VERSATILEIMAGEFIELD_CREATE_ON_DEMAND, VERSATILEIMAGEFIELD_SIZED_DIRNAME, VERSATILEIMAGEFIELD_FILTERED_DIR...
"""versatileimagefield Field mixins.""" import os import re from .datastructures import FilterLibrary from .registry import autodiscover, versatileimagefield_registry from .settings import ( cache, VERSATILEIMAGEFIELD_CREATE_ON_DEMAND, VERSATILEIMAGEFIELD_SIZED_DIRNAME, VERSATILEIMAGEFIELD_FILTERED_DIR...
en
0.791646
versatileimagefield Field mixins. A mix-in that provides the filtering/sizing API. Construct PPOI and create_on_demand. # Setting initial ppoi Return the appropriate URL. URL is constructed based on these field conditions: * If empty (not `self.name`) and a placeholder is defined, the ...
1.991294
2
differential_privacy/run_federated.py
HanGuo97/federated
330
5518
# 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 or agreed to in writing...
# 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 or agreed to in writing...
en
0.812398
# 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 or agreed to in writing...
1.793076
2
waymo_kitti_converter/tools/visual_point_cloud.py
anhvth/Pseudo_Lidar_V2
0
5519
import open3d as o3d import numpy as np pc_load_pathname = '/home/caizhongang/github/waymo_kitti_converter/007283-000.bin' pc = np.fromfile(pc_load_pathname, dtype=np.float32).reshape(-1, 3) pcd = o3d.geometry.PointCloud() pcd.points = o3d.utility.Vector3dVector(pc) axis = o3d.geometry.TriangleMesh.create_coordinat...
import open3d as o3d import numpy as np pc_load_pathname = '/home/caizhongang/github/waymo_kitti_converter/007283-000.bin' pc = np.fromfile(pc_load_pathname, dtype=np.float32).reshape(-1, 3) pcd = o3d.geometry.PointCloud() pcd.points = o3d.utility.Vector3dVector(pc) axis = o3d.geometry.TriangleMesh.create_coordinat...
none
1
2.147376
2
designate-8.0.0/designate/tests/test_api/test_v2/test_limits.py
scottwedge/OpenStack-Stein
145
5520
<reponame>scottwedge/OpenStack-Stein # Copyright 2013 Hewlett-Packard Development Company, L.P. # # Author: <NAME> <<EMAIL>> # # 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://ww...
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # Author: <NAME> <<EMAIL>> # # 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 # #...
en
0.83039
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # Author: <NAME> <<EMAIL>> # # 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 # #...
2.195318
2
pythonAnimations/pyOpenGLChess/engineDirectory/oglc-env/lib/python2.7/site-packages/OpenGLContext/scenegraph/nodepath.py
alexus37/AugmentedRealityChess
1
5521
"""node-path implementation for OpenGLContext """ from vrml.vrml97 import nodepath, nodetypes from vrml.cache import CACHE from OpenGLContext import quaternion from OpenGL.GL import glMultMatrixf class _NodePath( object ): """OpenGLContext-specific node-path class At the moment this only adds a single method,...
"""node-path implementation for OpenGLContext """ from vrml.vrml97 import nodepath, nodetypes from vrml.cache import CACHE from OpenGLContext import quaternion from OpenGL.GL import glMultMatrixf class _NodePath( object ): """OpenGLContext-specific node-path class At the moment this only adds a single method,...
en
0.793417
node-path implementation for OpenGLContext OpenGLContext-specific node-path class At the moment this only adds a single method, transform() which traverses the path, calling transform() for each Transforming node which has a transform method. For each Transforming node, do OpenGL transform Doe...
2.642832
3
part01_basic/for_while_loop.py
ApprenticeOne/python_learn
0
5522
import random from math import sqrt sum = 0 for x in range(101): sum += x print(sum) ''' range(101) 0-100 一共101个数 range(1,101) 1-100 range(1,101,2) 1-100间的奇数 步长为2 range(100,0,-2) 100-0间的偶数 步长为-2 ''' sum = 0 for x in range(100, 0, -2): sum += x print(sum) # while # 0-100间的随机数 answer = random.randint(0, 1...
import random from math import sqrt sum = 0 for x in range(101): sum += x print(sum) ''' range(101) 0-100 一共101个数 range(1,101) 1-100 range(1,101,2) 1-100间的奇数 步长为2 range(100,0,-2) 100-0间的偶数 步长为-2 ''' sum = 0 for x in range(100, 0, -2): sum += x print(sum) # while # 0-100间的随机数 answer = random.randint(0, 1...
zh
0.950109
range(101) 0-100 一共101个数 range(1,101) 1-100 range(1,101,2) 1-100间的奇数 步长为2 range(100,0,-2) 100-0间的偶数 步长为-2 # while # 0-100间的随机数 # 输入一个正整数判断是不是素数 # 为什么要放一个end 如果这个数有一个小于sqrt的因数 # 就一定会有一个大于sqrt的因数与之对应
3.780115
4
src/toil/batchSystems/htcondor.py
ElementGenomicsInc/toil
2
5523
<filename>src/toil/batchSystems/htcondor.py # Copyright (C) 2018, HTCondor Team, Computer Sciences Department, # University of Wisconsin-Madison, WI. # # 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 Lic...
<filename>src/toil/batchSystems/htcondor.py # Copyright (C) 2018, HTCondor Team, Computer Sciences Department, # University of Wisconsin-Madison, WI. # # 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 Lic...
en
0.838937
# Copyright (C) 2018, HTCondor Team, Computer Sciences Department, # University of Wisconsin-Madison, WI. # # 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/license...
2.138064
2
paddlespeech/t2s/modules/tacotron2/decoder.py
alanlv/PaddleSpeech
0
5524
<gh_stars>0 # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
en
0.620875
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
2.111737
2
pyblazing/__init__.py
Mattlk13/pyBlazing
0
5525
from .api import run_query_get_token from .api import convert_to_dask from .api import run_query_get_results from .api import run_query_get_concat_results from .api import register_file_system from .api import deregister_file_system from .api import FileSystemType, DriverType, EncryptionType from .api import SchemaFro...
from .api import run_query_get_token from .api import convert_to_dask from .api import run_query_get_results from .api import run_query_get_concat_results from .api import register_file_system from .api import deregister_file_system from .api import FileSystemType, DriverType, EncryptionType from .api import SchemaFro...
none
1
1.293394
1
bootstrap/p1.5.0/src/common/const.py
apurwaj2/df-on-k8s
0
5526
class Constants(object): LOGGER_CONF = "common/mapr_conf/logger.yml" USERNAME = "mapr" GROUPNAME = "mapr" USERID = 5000 GROUPID = 5000 ADMIN_USERNAME = "custadmin" ADMIN_GROUPNAME = "custadmin" ADMIN_USERID = 7000 ADMIN_GROUPID = 7000 ADMIN_PASS = "<PASSWORD>" MYSQL_USER = "...
class Constants(object): LOGGER_CONF = "common/mapr_conf/logger.yml" USERNAME = "mapr" GROUPNAME = "mapr" USERID = 5000 GROUPID = 5000 ADMIN_USERNAME = "custadmin" ADMIN_GROUPNAME = "custadmin" ADMIN_USERID = 7000 ADMIN_GROUPID = 7000 ADMIN_PASS = "<PASSWORD>" MYSQL_USER = "...
en
0.469193
#registry.hub.docker.com/maprtech # OPEN SSL # http://www.openssl.org/docs/apps/openssl.html#PASS_PHRASE_ARGUMENTS prompt = no distinguished_name = req_distinguished_name req_extensions = v3_req [ req_distinguished_name ] C = US ST = CO L = Fort Collins O ...
1.923632
2
dataset/scan2cad/s2c_collect_pgroup.py
jeonghyunkeem/PointGroup
0
5527
<gh_stars>0 # <NAME>, UVR KAIST @<EMAIL> import os, sys import json import h5py import numpy as np import quaternion import torch from torch.utils.data import Dataset BASE_DIR_1 = os.path.dirname(os.path.abspath(__file__)) # scan2cad BASE_DIR = os.path.dirname(BASE_DIR_1) # dataset ROOT_DIR = os.path.dirname(BASE_DI...
# <NAME>, UVR KAIST @<EMAIL> import os, sys import json import h5py import numpy as np import quaternion import torch from torch.utils.data import Dataset BASE_DIR_1 = os.path.dirname(os.path.abspath(__file__)) # scan2cad BASE_DIR = os.path.dirname(BASE_DIR_1) # dataset ROOT_DIR = os.path.dirname(BASE_DIR) # Poin...
en
0.481189
# <NAME>, UVR KAIST @<EMAIL> # scan2cad # dataset # PointGroup # /root/ # /root/Dataset # wall, floor # Thresholds # functions ============================================================================================== # 3x3 # 6 # ======================================================================================...
1.816752
2
nappy/msd2diff.py
ryokbys/nap
27
5528
#!/usr/bin/env python """ Compute diffusion coefficient from MSD data. Time interval, DT, is obtained from in.pmd in the same directory. Usage: msd2diff.py [options] MSD_FILE Options: -h, --help Show this message and exit. -o, --offset OFFSET Offset of given data. [default: 0] --plot Plot ...
#!/usr/bin/env python """ Compute diffusion coefficient from MSD data. Time interval, DT, is obtained from in.pmd in the same directory. Usage: msd2diff.py [options] MSD_FILE Options: -h, --help Show this message and exit. -o, --offset OFFSET Offset of given data. [default: 0] --plot Plot ...
en
0.615138
#!/usr/bin/env python Compute diffusion coefficient from MSD data. Time interval, DT, is obtained from in.pmd in the same directory. Usage: msd2diff.py [options] MSD_FILE Options: -h, --help Show this message and exit. -o, --offset OFFSET Offset of given data. [default: 0] --plot Plot a fi...
2.611673
3
5/part2.py
jcsesznegi/advent-of-code-2017
1
5529
<filename>5/part2.py<gh_stars>1-10 import os f = open(os.path.join(os.path.dirname(__file__), '../input/5/part2.txt'), 'r') class InstructionSet: def __init__(self, instructions): self.instructions = instructions self.currentIndex = 0 self.numberSteps = 0 def _changeOffsetValue(self...
<filename>5/part2.py<gh_stars>1-10 import os f = open(os.path.join(os.path.dirname(__file__), '../input/5/part2.txt'), 'r') class InstructionSet: def __init__(self, instructions): self.instructions = instructions self.currentIndex = 0 self.numberSteps = 0 def _changeOffsetValue(self...
none
1
3.325126
3
features/steps/basic_account_add_bdd.py
MhmdRyhn/behavior_test
0
5530
<reponame>MhmdRyhn/behavior_test import behave @behave.when('I add $1200 to my account') def add_usd_1200(context): context.account.add_cash(amount=1200) @behave.then('It becomes $3200 in my account') def check_for_increase_to_usd_1880(context): assert context.account.current_cash == 3200
import behave @behave.when('I add $1200 to my account') def add_usd_1200(context): context.account.add_cash(amount=1200) @behave.then('It becomes $3200 in my account') def check_for_increase_to_usd_1880(context): assert context.account.current_cash == 3200
none
1
2.639404
3
tests/test_sync_module.py
naveengh6/blinkpy
272
5531
<reponame>naveengh6/blinkpy """Tests camera and system functions.""" import unittest from unittest import mock from blinkpy.blinkpy import Blink from blinkpy.helpers.util import BlinkURLHandler from blinkpy.sync_module import BlinkSyncModule, BlinkOwl from blinkpy.camera import BlinkCamera, BlinkCameraMini @mock.pat...
"""Tests camera and system functions.""" import unittest from unittest import mock from blinkpy.blinkpy import Blink from blinkpy.helpers.util import BlinkURLHandler from blinkpy.sync_module import BlinkSyncModule, BlinkOwl from blinkpy.camera import BlinkCamera, BlinkCameraMini @mock.patch("blinkpy.auth.Auth.query"...
en
0.728664
Tests camera and system functions. Test BlinkSyncModule functions in blinkpy. Set up Blink module. Clean up after test. Check that we mark module unavaiable on bad status. Check that we mark module unavaiable if bad arm status. Test get events function. Test handling of failed get events function. Test get camera info ...
2.705516
3
dymos/examples/min_time_climb/aero/aero.py
naylor-b/dymos
0
5532
from __future__ import absolute_import import numpy as np from openmdao.api import Group from .dynamic_pressure_comp import DynamicPressureComp from .lift_drag_force_comp import LiftDragForceComp from .cd0_comp import CD0Comp from .kappa_comp import KappaComp from .cla_comp import CLaComp from .cl_comp import CLComp...
from __future__ import absolute_import import numpy as np from openmdao.api import Group from .dynamic_pressure_comp import DynamicPressureComp from .lift_drag_force_comp import LiftDragForceComp from .cd0_comp import CD0Comp from .kappa_comp import KappaComp from .cla_comp import CLaComp from .cl_comp import CLComp...
en
0.617527
The purpose of the AeroGroup is to compute the aerodynamic forces on the aircraft in the body frame. Parameters ---------- v : float air-relative velocity (m/s) sos : float local speed of sound (m/s) rho : float atmospheric density (kg/m**3) alpha : float ang...
2.309237
2
stats.py
jakeb1996/SBS
0
5533
import matplotlib.pyplot as plt import argparse, csv, numpy, time, os, re def main(resultsFile, toolName): filesToCalc = [] toolNames = [] if os.path.isfile(resultsFile): # the user must have defined an exact file to plot filesToCalc.append(resultsFile) toolNames.appen...
import matplotlib.pyplot as plt import argparse, csv, numpy, time, os, re def main(resultsFile, toolName): filesToCalc = [] toolNames = [] if os.path.isfile(resultsFile): # the user must have defined an exact file to plot filesToCalc.append(resultsFile) toolNames.appen...
en
0.864057
# the user must have defined an exact file to plot # check if there are multiple files matching the criteria # start plotting # the aggregate functions to perform on each set. each is a function name. # user-defined functions at bottom of file # measurement configurations must appear in the order of the associated CSV ...
2.854517
3
callback_handlers.py
andrey18106/vocabulary_bot
0
5534
<filename>callback_handlers.py # -*- coding: utf-8 -*- # ===== Default imports ===== import asyncio import logging # ===== External libs imports ===== from aiogram import Bot, Dispatcher, types from aiogram.dispatcher import FSMContext # ===== Local imports ===== from analytics import BotAnalytics from db_manager...
<filename>callback_handlers.py # -*- coding: utf-8 -*- # ===== Default imports ===== import asyncio import logging # ===== External libs imports ===== from aiogram import Bot, Dispatcher, types from aiogram.dispatcher import FSMContext # ===== Local imports ===== from analytics import BotAnalytics from db_manager...
en
0.602266
# -*- coding: utf-8 -*- # ===== Default imports ===== # ===== External libs imports ===== # ===== Local imports ===== Class for Vocabulary Bot callback handlers # CALLBACK HANDLER FOR USER LANGUAGE SETTINGS Handle selecting preferred interface language Handle HELP page question buttons Handle HELP page question back bu...
2.090711
2
1-Python-Programming-Basics (Sep 2020)/Course-Exercises-and-Exams/06_Nested-Loops/02.Exercise-06-Special-Numbers.py
karolinanikolova/SoftUni-Software-Engineering
0
5535
# 6. Специални числа # Да се напише програма, която чете едно цяло число N, въведено от потребителя, и генерира всички възможни "специални" # числа от 1111 до 9999. За да бъде “специално” едно число, то трябва да отговаря на следното условие: # • N да се дели на всяка една от неговите цифри без остатък. # Пример: при N...
# 6. Специални числа # Да се напише програма, която чете едно цяло число N, въведено от потребителя, и генерира всички възможни "специални" # числа от 1111 до 9999. За да бъде “специално” едно число, то трябва да отговаря на следното условие: # • N да се дели на всяка една от неговите цифри без остатък. # Пример: при N...
bg
0.974664
# 6. Специални числа # Да се напише програма, която чете едно цяло число N, въведено от потребителя, и генерира всички възможни "специални" # числа от 1111 до 9999. За да бъде “специално” едно число, то трябва да отговаря на следното условие: # • N да се дели на всяка една от неговите цифри без остатък. # Пример: при N...
3.947559
4
skopt/tests/test_transformers.py
sqbl/scikit-optimize
0
5536
import pytest import numbers import numpy as np from numpy.testing import assert_raises from numpy.testing import assert_array_equal from numpy.testing import assert_equal from numpy.testing import assert_raises_regex from skopt.space import LogN, Normalize @pytest.mark.fast_test def test_logn2_integer(): transf...
import pytest import numbers import numpy as np from numpy.testing import assert_raises from numpy.testing import assert_array_equal from numpy.testing import assert_equal from numpy.testing import assert_raises_regex from skopt.space import LogN, Normalize @pytest.mark.fast_test def test_logn2_integer(): transf...
none
1
2.394147
2
tokenization_numerical.py
dspoka/mnm
1
5537
<gh_stars>1-10 # coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org...
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICEN...
en
0.769118
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICEN...
1.73112
2
dipole/splitting_dipole.py
wheelerMT/spin-1_BEC
0
5538
<gh_stars>0 import numpy as np import multiprocessing as mp import pyfftw from numpy import pi, exp, sqrt, sin, cos, conj, arctan, tanh, tan from numpy import heaviside as heav from include import helper import h5py # ---------Spatial and potential parameters-------------- Mx = My = 64 Nx = Ny = 128 # Number of grid...
import numpy as np import multiprocessing as mp import pyfftw from numpy import pi, exp, sqrt, sin, cos, conj, arctan, tanh, tan from numpy import heaviside as heav from include import helper import h5py # ---------Spatial and potential parameters-------------- Mx = My = 64 Nx = Ny = 128 # Number of grid pts dx = dy...
en
0.597655
# ---------Spatial and potential parameters-------------- # Number of grid pts # Grid spacing # K-space spacing # Box length # Spatial meshgrid # K-space meshgrid # Initialising FFTs # Framework for wavefunction data # Controlled variables # Doubly periodic box # Effective 3-component BEC # Array index # --------------...
2.011273
2
src/main/resources/scripts/crumbDiag.py
cam-laf/vectorcast-execution-plugin
4
5539
from __future__ import print_function import requests import sys import os verbose=True try: username=os.environ['USERNAME'] password=<PASSWORD>['PASSWORD'] except: print("Crumb Diaganostic requires USERNAME/PASSWORD to be set as environment variables") sys.exit(-1) jenkins_url=os.environ['JENKINS_URL'...
from __future__ import print_function import requests import sys import os verbose=True try: username=os.environ['USERNAME'] password=<PASSWORD>['PASSWORD'] except: print("Crumb Diaganostic requires USERNAME/PASSWORD to be set as environment variables") sys.exit(-1) jenkins_url=os.environ['JENKINS_URL'...
none
1
2.505333
3
URI/1-Beginner/1099.py
vicenteneto/online-judge-solutions
0
5540
# -*- coding: utf-8 -*- for i in range(int(raw_input())): x, y = [int(x) for x in raw_input().split()] if x > y: x, y = y, x x += 1 if x % 2 == 0 else 2 print sum([j for j in range(x, y, 2)])
# -*- coding: utf-8 -*- for i in range(int(raw_input())): x, y = [int(x) for x in raw_input().split()] if x > y: x, y = y, x x += 1 if x % 2 == 0 else 2 print sum([j for j in range(x, y, 2)])
en
0.769321
# -*- coding: utf-8 -*-
3.446696
3
mock_file.py
MahirGulzar/fpointnet-tiny
0
5541
import tensorflow as tf FLIPPING_TENSOR = tf.constant([1.0, -1.0, 1.0]) @tf.function def sample_data(points, labels, num_point): if tf.random.uniform(shape=()) >= 0.5: return points * FLIPPING_TENSOR, labels return points, labels mock_data = tf.constant([ [1., 2., 3.], [4., 5., 6.], [7....
import tensorflow as tf FLIPPING_TENSOR = tf.constant([1.0, -1.0, 1.0]) @tf.function def sample_data(points, labels, num_point): if tf.random.uniform(shape=()) >= 0.5: return points * FLIPPING_TENSOR, labels return points, labels mock_data = tf.constant([ [1., 2., 3.], [4., 5., 6.], [7....
none
1
2.711859
3
myapp.py
dataholiks/flask_heroku_scheduler
7
5542
from flask import Flask app = Flask(__name__) @app.route('/') def index(): return 'This is the app index page.'
from flask import Flask app = Flask(__name__) @app.route('/') def index(): return 'This is the app index page.'
none
1
2.259531
2
day_ok/schedule/migrations/0027_auto_20210216_1337.py
bostud/day_ok
0
5543
# Generated by Django 3.1.6 on 2021-02-16 11:37 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('schedule', '0026_event'), ] operations = [ migrations.AlterField( model_name='group', name='students', f...
# Generated by Django 3.1.6 on 2021-02-16 11:37 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('schedule', '0026_event'), ] operations = [ migrations.AlterField( model_name='group', name='students', f...
en
0.793551
# Generated by Django 3.1.6 on 2021-02-16 11:37
1.511453
2
Blog.py
OliverChao/PyWhoAmI
0
5544
<gh_stars>0 import aiohttp import asyncio import time import time import argparse import glob import os import shutil import random import re import requests import sys from concurrent import futures import pdfkit import time from retrying import retry from pygments import highlight from pygments.l...
import aiohttp import asyncio import time import time import argparse import glob import os import shutil import random import re import requests import sys from concurrent import futures import pdfkit import time from retrying import retry from pygments import highlight from pygments.lexers import...
en
0.266629
# Handling Unicode: http://stackoverflow.com/a/6633040/305414 # 'Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0', 先不检验。。测试多个域名。。 # def _is_article(link): # return re.search('article/details/\d+', link) # # question_links = [link for link in links if _is_article(link)] # # https://blog.csdn.net/u0...
2.037264
2
corehq/apps/app_manager/tests/test_xml_parsing.py
dslowikowski/commcare-hq
1
5545
from django.test import SimpleTestCase as TestCase from corehq.apps.app_manager.models import _parse_xml import os class XMLParsingTest(TestCase): def testUnicodeError(self): """Tests a bug found in Unicode processing of a form""" file_path = os.path.join(os.path.dirname(__file__), "data", "un...
from django.test import SimpleTestCase as TestCase from corehq.apps.app_manager.models import _parse_xml import os class XMLParsingTest(TestCase): def testUnicodeError(self): """Tests a bug found in Unicode processing of a form""" file_path = os.path.join(os.path.dirname(__file__), "data", "un...
en
0.830696
Tests a bug found in Unicode processing of a form # this should not raise an error
2.757442
3
dynamic_programming/01/01-06.py
fumiyanll23/algo-method
0
5546
# input N, M = map(int, input().split()) Ds = [*map(int, input().split())] # compute dp = [False] * (N+1) for ni in range(N+1): if ni == 0: dp[ni] = True for D in Ds: if ni >= D: dp[ni] = dp[ni] or dp[ni-D] # output print("Yes" if dp[-1] else "No")
# input N, M = map(int, input().split()) Ds = [*map(int, input().split())] # compute dp = [False] * (N+1) for ni in range(N+1): if ni == 0: dp[ni] = True for D in Ds: if ni >= D: dp[ni] = dp[ni] or dp[ni-D] # output print("Yes" if dp[-1] else "No")
en
0.213219
# input # compute # output
2.87844
3
swapsort.py
ArshSood/sorting
0
5547
# sorting n=int(input()) array=list(map(int,input().split())) i=0 count=[] counter=0 while i<len(array): min=i start=i+1 while(start<len(array)): if array[start]<array[min]: min=start start+=1 if i!=min: array[i],array[min]=array[min],array[i] count.append(i) ...
# sorting n=int(input()) array=list(map(int,input().split())) i=0 count=[] counter=0 while i<len(array): min=i start=i+1 while(start<len(array)): if array[start]<array[min]: min=start start+=1 if i!=min: array[i],array[min]=array[min],array[i] count.append(i) ...
none
1
3.303161
3
tests/news_test.py
mucciz/News
0
5548
import unittest from app.models import News # News = news.News class NewsTest(unittest.TestCase): ''' Test Class to test the behaviour of the Movie class ''' def setUp(self): ''' Set up method that will run before every Test ''' self.new_news = News('abc-news','ABC NEWS...
import unittest from app.models import News # News = news.News class NewsTest(unittest.TestCase): ''' Test Class to test the behaviour of the Movie class ''' def setUp(self): ''' Set up method that will run before every Test ''' self.new_news = News('abc-news','ABC NEWS...
en
0.750974
# News = news.News Test Class to test the behaviour of the Movie class Set up method that will run before every Test # if __name__ == '__main__': # unittest.main()
3.752228
4
test/get-gh-comment-info.py
MQasimSarfraz/cilium
1
5549
<gh_stars>1-10 import argparse parser = argparse.ArgumentParser() parser.add_argument('ghcomment', type=str) # this is for test-me-please phrases parser.add_argument('--focus', type=str, default="") parser.add_argument('--version', type=str, default="") parser.add_argument('--retrieve', type=str, default="focus") arg...
import argparse parser = argparse.ArgumentParser() parser.add_argument('ghcomment', type=str) # this is for test-me-please phrases parser.add_argument('--focus', type=str, default="") parser.add_argument('--version', type=str, default="") parser.add_argument('--retrieve', type=str, default="focus") args = parser.pars...
en
0.896591
# this is for test-me-please phrases
2.661202
3
preprocessing/booking.py
madcat1991/clustered_cars
0
5550
<gh_stars>0 """ This script cleans and prepares the data set of bookings for the future usage """ import argparse import logging import sys import pandas as pd from preprocessing.common import canonize_datetime, raw_data_to_df, check_processed_columns, check_data OLD_BREAKPOINT_MATCHER = { 2001: [ (1, 1...
""" This script cleans and prepares the data set of bookings for the future usage """ import argparse import logging import sys import pandas as pd from preprocessing.common import canonize_datetime, raw_data_to_df, check_processed_columns, check_data OLD_BREAKPOINT_MATCHER = { 2001: [ (1, 1, "New Year"...
en
0.853184
This script cleans and prepares the data set of bookings for the future usage # can be taken from property # HH specific # correlates with avg_spend_per_head # no need # is a pair of u'sourcedesc', u'category' # correlates with drivetime
2.607624
3
src/api/wish.py
PKU-GeekGame/gs-backend
7
5551
from sanic import Blueprint, Request, HTTPResponse, response from sanic.models.handler_types import RouteHandler from functools import wraps from inspect import isawaitable from typing import Callable, Dict, Any, Union, Awaitable, List, Optional ACCEPTED_WISH_VERS = ['wish.alpha.v1'] WishHandler = Callable[..., Union...
from sanic import Blueprint, Request, HTTPResponse, response from sanic.models.handler_types import RouteHandler from functools import wraps from inspect import isawaitable from typing import Callable, Dict, Any, Union, Awaitable, List, Optional ACCEPTED_WISH_VERS = ['wish.alpha.v1'] WishHandler = Callable[..., Union...
en
0.780104
# may be overridden by retval # type: ignore
2.08161
2
scripts/venv/lib/python2.7/site-packages/cogent/maths/function_optimisation.py
sauloal/cnidaria
3
5552
#!/usr/bin/env python """Algorthims for function optimisation great_deluge() is a hillclimbing algorithm based on: Gunter Dueck: New Optimization Heuristics, The Great Deluge Algorithm and the Record-to-Record Travel. Journal of Computational Physics, Vol. 104, 1993, pp. 86 - 92 ga_evolve(...
#!/usr/bin/env python """Algorthims for function optimisation great_deluge() is a hillclimbing algorithm based on: Gunter Dueck: New Optimization Heuristics, The Great Deluge Algorithm and the Record-to-Record Travel. Journal of Computational Physics, Vol. 104, 1993, pp. 86 - 92 ga_evolve(...
en
0.824959
#!/usr/bin/env python Algorthims for function optimisation great_deluge() is a hillclimbing algorithm based on: Gunter Dueck: New Optimization Heuristics, The Great Deluge Algorithm and the Record-to-Record Travel. Journal of Computational Physics, Vol. 104, 1993, pp. 86 - 92 ga_evolve() i...
3.131758
3
collect_policies.py
jonathanbglass/parallel_prowler
3
5553
import argparse import boto3 import json import logging import os from progressbar import ProgressBar import sys """ Collects IAM Policies Evaluates policies looking for badness (*.*, Effect:Allow + NotAction) Need to add more tests/use cases """ def get_policies(profile): session = boto3.session.Session(profi...
import argparse import boto3 import json import logging import os from progressbar import ProgressBar import sys """ Collects IAM Policies Evaluates policies looking for badness (*.*, Effect:Allow + NotAction) Need to add more tests/use cases """ def get_policies(profile): session = boto3.session.Session(profi...
en
0.578347
Collects IAM Policies Evaluates policies looking for badness (*.*, Effect:Allow + NotAction) Need to add more tests/use cases # This section looks for bad/dangerous patterns # Pattern 1: Allow *.* # AWSLambdaRole { # 'Version': '2012-10-17', # 'Statement': [ # {'Effect': 'Allow', # 'Action': '*', # 'Resource': ...
2.292305
2
test/molecule-role/molecule/integrations/tests/test_nagios.py
StackVista/stackstate-agent
2
5554
import json import os import re from testinfra.utils.ansible_runner import AnsibleRunner import util testinfra_hosts = AnsibleRunner(os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('agent-integrations') def _get_key_value(tag_list): for key, value in (pair.split(':', 1) for pair in tag_list): yield ke...
import json import os import re from testinfra.utils.ansible_runner import AnsibleRunner import util testinfra_hosts = AnsibleRunner(os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('agent-integrations') def _get_key_value(tag_list): for key, value in (pair.split(':', 1) for pair in tag_list): yield ke...
none
1
2.247092
2
erudition/util.py
papsebestyen/erudition
0
5555
import os import sys from contextlib import contextmanager from invoke import UnexpectedExit def git_commit(c, addstr, msg): try: c.run("git config --get user.email") c.run("git config --get user.name") except UnexpectedExit: c.run('git config --local user.email "<EMAIL>"') c....
import os import sys from contextlib import contextmanager from invoke import UnexpectedExit def git_commit(c, addstr, msg): try: c.run("git config --get user.email") c.run("git config --get user.name") except UnexpectedExit: c.run('git config --local user.email "<EMAIL>"') c....
none
1
2.272344
2
python3/distortion_correct_aksk_demo.py
MeekoI/ais-sdk
0
5556
<filename>python3/distortion_correct_aksk_demo.py # -*- coding:utf-8 -*- from ais_sdk.utils import encode_to_base64 from ais_sdk.utils import decode_to_wave_file from ais_sdk.distortion_correct import distortion_correct_aksk from ais_sdk.utils import init_global_env import json if __name__ == '__main__': # # a...
<filename>python3/distortion_correct_aksk_demo.py # -*- coding:utf-8 -*- from ais_sdk.utils import encode_to_base64 from ais_sdk.utils import decode_to_wave_file from ais_sdk.distortion_correct import distortion_correct_aksk from ais_sdk.utils import init_global_env import json if __name__ == '__main__': # # a...
en
0.727482
# -*- coding:utf-8 -*- # # access moderation distortion correct.post data by ak,sk # #call interface use the url correction is true means do not correction # call interface use the file
2.498356
2
exercise/migrations/0016_auto_20191025_1624.py
Arpit8081/Phishtray_Edited_Version
2
5557
<filename>exercise/migrations/0016_auto_20191025_1624.py # Generated by Django 2.2.6 on 2019-10-25 16:24 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('exercise', '0015_exerciseemailproperties_date_received'), ] ...
<filename>exercise/migrations/0016_auto_20191025_1624.py # Generated by Django 2.2.6 on 2019-10-25 16:24 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('exercise', '0015_exerciseemailproperties_date_received'), ] ...
en
0.796172
# Generated by Django 2.2.6 on 2019-10-25 16:24
1.302595
1
release/stubs.min/Autodesk/Revit/DB/__init___parts/GeomCombinationSet.py
YKato521/ironpython-stubs
0
5558
class GeomCombinationSet(APIObject, IDisposable, IEnumerable): """ A set that contains GeomCombination objects. GeomCombinationSet() """ def Clear(self): """ Clear(self: GeomCombinationSet) Removes every item GeomCombination the set,rendering it empty. """ pass ...
class GeomCombinationSet(APIObject, IDisposable, IEnumerable): """ A set that contains GeomCombination objects. GeomCombinationSet() """ def Clear(self): """ Clear(self: GeomCombinationSet) Removes every item GeomCombination the set,rendering it empty. """ pass ...
en
0.515103
A set that contains GeomCombination objects. GeomCombinationSet() Clear(self: GeomCombinationSet) Removes every item GeomCombination the set,rendering it empty. Contains(self: GeomCombinationSet,item: GeomCombination) -> bool Tests for the existence of an GeomCombination within the set. ...
2.737852
3
rainbow/datasources/cfn_datasource.py
omribahumi/rainbow
35
5559
<reponame>omribahumi/rainbow<filename>rainbow/datasources/cfn_datasource.py from rainbow.cloudformation import Cloudformation from base import DataSourceBase __all__ = ['CfnOutputsDataSource', 'CfnResourcesDataSource', 'CfnParametersDataSource'] class CfnDataSourceBase(DataSourceBase): def __init__(self, data_so...
from rainbow.cloudformation import Cloudformation from base import DataSourceBase __all__ = ['CfnOutputsDataSource', 'CfnResourcesDataSource', 'CfnParametersDataSource'] class CfnDataSourceBase(DataSourceBase): def __init__(self, data_source): super(CfnDataSourceBase, self).__init__(data_source) ...
none
1
2.350693
2
epio_commands/management/commands/epio_flush_redis.py
idan/pypostbin
2
5560
import redis from bundle_config import config from django.core.management.base import NoArgsCommand class Command(NoArgsCommand): help = 'Flushes all keys in redis.' def handle_noargs(self, **options): r = redis.Redis(host=config['redis']['host'], port=int(config['redis']['port']), password=config['r...
import redis from bundle_config import config from django.core.management.base import NoArgsCommand class Command(NoArgsCommand): help = 'Flushes all keys in redis.' def handle_noargs(self, **options): r = redis.Redis(host=config['redis']['host'], port=int(config['redis']['port']), password=config['r...
none
1
2.152731
2
python/flexflow_cffi_build.py
zmxdream/FlexFlow
455
5561
<filename>python/flexflow_cffi_build.py #!/usr/bin/env python # Copyright 2020 Stanford University, Los Alamos National Laboratory # # 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 # # htt...
<filename>python/flexflow_cffi_build.py #!/usr/bin/env python # Copyright 2020 Stanford University, Los Alamos National Laboratory # # 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 # # htt...
en
0.823932
#!/usr/bin/env python # Copyright 2020 Stanford University, Los Alamos National Laboratory # # 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 #...
2.184795
2
gaphor/plugins/xmiexport/__init__.py
tuxcell/gaphor
0
5562
<filename>gaphor/plugins/xmiexport/__init__.py """This plugin extends Gaphor with XMI export functionality.""" import logging from gaphor.abc import ActionProvider, Service from gaphor.core import action, gettext from gaphor.plugins.xmiexport import exportmodel from gaphor.ui.filedialog import FileDialog logger = lo...
<filename>gaphor/plugins/xmiexport/__init__.py """This plugin extends Gaphor with XMI export functionality.""" import logging from gaphor.abc import ActionProvider, Service from gaphor.core import action, gettext from gaphor.plugins.xmiexport import exportmodel from gaphor.ui.filedialog import FileDialog logger = lo...
en
0.836337
This plugin extends Gaphor with XMI export functionality.
2.219248
2
tests/utils.py
btk15049/online-judge-tools
0
5563
<gh_stars>0 import contextlib import os import pathlib import subprocess import sys import tempfile @contextlib.contextmanager def chdir(path): cwd = os.getcwd() try: os.chdir(path) yield finally: os.chdir(cwd) def prepare_files(files): for f in files: path = pathlib....
import contextlib import os import pathlib import subprocess import sys import tempfile @contextlib.contextmanager def chdir(path): cwd = os.getcwd() try: os.chdir(path) yield finally: os.chdir(cwd) def prepare_files(files): for f in files: path = pathlib.Path(f['path...
en
0.807235
# oj_exe should be evaluated out of sandboxes # this is required to run in sandboxes # functools.lru_cache is unusable since Service are unhashable
2.621385
3
git_operation.py
zerzerzerz/Computer-Virus
0
5564
<gh_stars>0 import os commit_string = "选择data的前多少个维度参与训练" not_add = ['results', 'data', 'weights'] for item in os.listdir(): if item in not_add: # print(item) continue else: os.system(f"git add {item}") os.system(f'git commit -m "{commit_string}"') os.system("git push origin main")
import os commit_string = "选择data的前多少个维度参与训练" not_add = ['results', 'data', 'weights'] for item in os.listdir(): if item in not_add: # print(item) continue else: os.system(f"git add {item}") os.system(f'git commit -m "{commit_string}"') os.system("git push origin main")
uk
0.115243
# print(item)
2.552881
3
src/cool_grammar.py
peanut-butter-jellyyy/cool-compiler-2021
0
5565
<gh_stars>0 from src.cmp.pycompiler import Grammar from src.ast_nodes import ( ProgramNode, ClassDeclarationNode, FuncDeclarationNode, AttrDeclarationNode, IfNode, WhileNode, LetNode, CaseNode, IsvoidNode, AssignNode, VarDeclarationNode, CaseItemNode, No...
from src.cmp.pycompiler import Grammar from src.ast_nodes import ( ProgramNode, ClassDeclarationNode, FuncDeclarationNode, AttrDeclarationNode, IfNode, WhileNode, LetNode, CaseNode, IsvoidNode, AssignNode, VarDeclarationNode, CaseItemNode, NotNode, ...
en
0.579194
# grammar # non-terminals # terminals # productions
2.57905
3
userbot/plugins/selfdestruct.py
Aliensuniquebot/CatUserbot
1
5566
<gh_stars>1-10 # For @UniBorg # courtesy <NAME> """Self Destruct Plugin .sd <time in seconds> <text> """ import time from userbot import CMD_HELP from telethon.errors import rpcbaseerrors from userbot.utils import admin_cmd import importlib.util @borg.on(admin_cmd(pattern="sdm", outgoing=True)) async def selfdestr...
# For @UniBorg # courtesy <NAME> """Self Destruct Plugin .sd <time in seconds> <text> """ import time from userbot import CMD_HELP from telethon.errors import rpcbaseerrors from userbot.utils import admin_cmd import importlib.util @borg.on(admin_cmd(pattern="sdm", outgoing=True)) async def selfdestruct(destroy): ...
en
0.454977
# For @UniBorg # courtesy <NAME> Self Destruct Plugin .sd <time in seconds> <text>
2.252911
2
snippets/basic_render_template_class.py
OSAMAMOHAMED1234/python_projects
0
5567
<reponame>OSAMAMOHAMED1234/python_projects import os class Template: template_name = '' context = None def __init__(self, template_name='', context=None, *args, **kwargs): self.template_name = template_name self.context = context def get_template(self): template_path = os.path.join(os.path.join(os...
import os class Template: template_name = '' context = None def __init__(self, template_name='', context=None, *args, **kwargs): self.template_name = template_name self.context = context def get_template(self): template_path = os.path.join(os.path.join(os.path.dirname(os.path.abspath(__file__)), '...
none
1
2.981339
3
level_one/strings.py
jameskzhao/python36
0
5568
<reponame>jameskzhao/python36 #Basics a = "hello" a += " I'm a dog" print(a) print(len(a)) print(a[1:]) #Output: ello I'm a dog print(a[:5]) #Output: hello(index 5 is not included) print(a[2:5])#Output: llo(index 2 is included) print(a[::2])#Step size #string is immutable so you can't assign a[1]= b x = a.upper() pr...
#Basics a = "hello" a += " I'm a dog" print(a) print(len(a)) print(a[1:]) #Output: ello I'm a dog print(a[:5]) #Output: hello(index 5 is not included) print(a[2:5])#Output: llo(index 2 is included) print(a[::2])#Step size #string is immutable so you can't assign a[1]= b x = a.upper() print(x) x = a.capitalize() prin...
en
0.796689
#Basics #Output: ello I'm a dog #Output: hello(index 5 is not included) #Output: llo(index 2 is included) #Step size #string is immutable so you can't assign a[1]= b #splits the string by space #removes any whitespace from beginning or the end #command-line string input
4.166543
4
tests/test_01_accept_time_get_headers.py
glushkovvv/test_2gis
0
5569
<filename>tests/test_01_accept_time_get_headers.py # -*- coding: utf-8 -*- """ test_01_accept_time_get_headers ~~~~~~~~~~~~~~ The 2GIS API Test Check time get headers :author: <NAME> :copyright: Copyright 2019, The2GIS API Test" :license: MIT :version: 1.0.0 :maintainer: <NAME> :email: <EMAIL> :status: Development ""...
<filename>tests/test_01_accept_time_get_headers.py # -*- coding: utf-8 -*- """ test_01_accept_time_get_headers ~~~~~~~~~~~~~~ The 2GIS API Test Check time get headers :author: <NAME> :copyright: Copyright 2019, The2GIS API Test" :license: MIT :version: 1.0.0 :maintainer: <NAME> :email: <EMAIL> :status: Development ""...
ru
0.432079
# -*- coding: utf-8 -*- test_01_accept_time_get_headers ~~~~~~~~~~~~~~ The 2GIS API Test Check time get headers :author: <NAME> :copyright: Copyright 2019, The2GIS API Test" :license: MIT :version: 1.0.0 :maintainer: <NAME> :email: <EMAIL> :status: Development Проверяем время ответов сервера при валидных запросах ...
2.051039
2
transformers/string/strlen_transformer.py
ucds-sg/h2oai
0
5570
<gh_stars>0 """Returns the string length of categorical values""" from h2oaicore.transformer_utils import CustomTransformer import datatable as dt import numpy as np class MyStrLenEncoderTransformer(CustomTransformer): @staticmethod def get_default_properties(): return dict(col_type="any", min_cols=1,...
"""Returns the string length of categorical values""" from h2oaicore.transformer_utils import CustomTransformer import datatable as dt import numpy as np class MyStrLenEncoderTransformer(CustomTransformer): @staticmethod def get_default_properties(): return dict(col_type="any", min_cols=1, max_cols=1,...
en
0.082381
Returns the string length of categorical values
3.043281
3
geometry/eolearn/geometry/__init__.py
eerzin/eo-learn
1
5571
<filename>geometry/eolearn/geometry/__init__.py """ Subpackage containing EOTasks for geometrical transformations """ from .utilities import ErosionTask, VectorToRaster, RasterToVector from .sampling import PointSamplingTask, PointSampler, PointRasterSampler __version__ = '0.4.2'
<filename>geometry/eolearn/geometry/__init__.py """ Subpackage containing EOTasks for geometrical transformations """ from .utilities import ErosionTask, VectorToRaster, RasterToVector from .sampling import PointSamplingTask, PointSampler, PointRasterSampler __version__ = '0.4.2'
en
0.679213
Subpackage containing EOTasks for geometrical transformations
1.211121
1
api/models/users.py
felipebarraza6/startup_comedy
0
5572
<reponame>felipebarraza6/startup_comedy """User Model.""" # Django from django.db import models from django.contrib.auth.models import AbstractUser # Utilities from .utils import ApiModel class User(ApiModel, AbstractUser): email = models.EmailField( 'email', unique = True, ) USERNAME...
"""User Model.""" # Django from django.db import models from django.contrib.auth.models import AbstractUser # Utilities from .utils import ApiModel class User(ApiModel, AbstractUser): email = models.EmailField( 'email', unique = True, ) USERNAME_FIELD = 'email' REQUIRED_FIELDS = [...
en
0.61915
User Model. # Django # Utilities
2.526733
3
tests/test_server.py
m-bo-one/ethereumd-proxy
21
5573
<reponame>m-bo-one/ethereumd-proxy from collections import namedtuple import json from asynctest.mock import patch import pytest from ethereumd.server import RPCServer from ethereumd.proxy import EthereumProxy from aioethereum.errors import BadResponseError from .base import BaseTestRunner Request = namedtuple('Re...
from collections import namedtuple import json from asynctest.mock import patch import pytest from ethereumd.server import RPCServer from ethereumd.proxy import EthereumProxy from aioethereum.errors import BadResponseError from .base import BaseTestRunner Request = namedtuple('Request', ['json']) class TestServe...
none
1
2.145596
2
neorl/rl/baselines/readme.py
evdcush/neorl
20
5574
<filename>neorl/rl/baselines/readme.py # This file is part of NEORL. # Copyright (c) 2021 Exelon Corporation and MIT Nuclear Science and Engineering # NEORL is free software: you can redistribute it and/or modify # it under the terms of the MIT LICENSE # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT ...
<filename>neorl/rl/baselines/readme.py # This file is part of NEORL. # Copyright (c) 2021 Exelon Corporation and MIT Nuclear Science and Engineering # NEORL is free software: you can redistribute it and/or modify # it under the terms of the MIT LICENSE # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT ...
en
0.720016
# This file is part of NEORL. # Copyright (c) 2021 Exelon Corporation and MIT Nuclear Science and Engineering # NEORL is free software: you can redistribute it and/or modify # it under the terms of the MIT LICENSE # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, ...
1.299653
1
Compare.py
sushantPatrikar/WaveCompartor
3
5575
from scipy.io import wavfile import numpy as np import pingouin as pg import pandas as pd _,data = wavfile.read('wav//ed//mp3baked.wav') _,data1 = wavfile.read('wav//ing//ingeating.wav') i= data.shape[0]-1 j = data1.shape[0]-1 index_1 = -1 index_2 = -1 try: data.shape[1] except IndexError: ...
from scipy.io import wavfile import numpy as np import pingouin as pg import pandas as pd _,data = wavfile.read('wav//ed//mp3baked.wav') _,data1 = wavfile.read('wav//ing//ingeating.wav') i= data.shape[0]-1 j = data1.shape[0]-1 index_1 = -1 index_2 = -1 try: data.shape[1] except IndexError: ...
en
0.381581
# print(data.tostring()) # print(data1.tostring()) # data = data[:,:] # data1 = data1[:,:] # data = data.reshape(data.shape[0],1) # data1 = data1.reshape(data1.shape[0],1) # data = data[-10000:,:] # data1 = data1[-10000:,:] # print(data1.shape[1]) # df = pd.DataFrame(data,data1) # print(df.head()) # print(data1.shape) ...
2.427543
2
tests/comments/test_only_block_comment.py
sco1/pylox
2
5576
<reponame>sco1/pylox<filename>tests/comments/test_only_block_comment.py<gh_stars>1-10 from textwrap import dedent import pytest from pylox.lox import Lox TEST_SRC = dedent( """\ /* This is a multiline block comment */ """ ) EXPECTED_STDOUTS: list[str] = [] def test_block_comment_at_eof(capsys:...
from textwrap import dedent import pytest from pylox.lox import Lox TEST_SRC = dedent( """\ /* This is a multiline block comment */ """ ) EXPECTED_STDOUTS: list[str] = [] def test_block_comment_at_eof(capsys: pytest.CaptureFixture) -> None: interpreter = Lox() interpreter.run(TEST_SRC)...
en
0.654426
\ /* This is a multiline block comment */
2.394822
2
mlbase/lazy.py
n-kats/mlbase
0
5577
<reponame>n-kats/mlbase<filename>mlbase/lazy.py<gh_stars>0 from mlbase.utils.misc import lazy tensorflow = lazy("tensorflow") numpy = lazy("numpy") gensim = lazy("gensim")
from mlbase.utils.misc import lazy tensorflow = lazy("tensorflow") numpy = lazy("numpy") gensim = lazy("gensim")
none
1
1.239998
1
setup.py
sturmianseq/observed
33
5578
import re import setuptools README_FILENAME = "README.md" VERSION_FILENAME = "observed.py" VERSION_RE = r"^__version__ = ['\"]([^'\"]*)['\"]" # Get version information with open(VERSION_FILENAME, "r") as version_file: mo = re.search(VERSION_RE, version_file.read(), re.M) if mo: version = mo.group(1) else: ...
import re import setuptools README_FILENAME = "README.md" VERSION_FILENAME = "observed.py" VERSION_RE = r"^__version__ = ['\"]([^'\"]*)['\"]" # Get version information with open(VERSION_FILENAME, "r") as version_file: mo = re.search(VERSION_RE, version_file.read(), re.M) if mo: version = mo.group(1) else: ...
en
0.398071
# Get version information # Get description information
1.882084
2
src/coco.py
catalyst-team/detector
15
5579
import os import json import numpy as np import pickle from typing import Any from pycocotools.coco import COCO from torch.utils.data import Dataset class DetectionMSCOCODataset(Dataset): def __init__(self, annotation_file: str, image_dir: str): self._annotation_file = annotation_file self._imag...
import os import json import numpy as np import pickle from typing import Any from pycocotools.coco import COCO from torch.utils.data import Dataset class DetectionMSCOCODataset(Dataset): def __init__(self, annotation_file: str, image_dir: str): self._annotation_file = annotation_file self._imag...
none
1
2.445791
2
UVa 10105 polynomial coefficients/sample/main.py
tadvi/uva
1
5580
import sys import operator sys.stdin = open('input.txt') fact = [1, 1] for i in range(2, 15): fact.append(fact[-1] * i) while True: try: n, k = map(int, raw_input().split()) coef = map(int, raw_input().split()) except: break print fact[n] / reduce(operator.mul, [fact[c] for c in...
import sys import operator sys.stdin = open('input.txt') fact = [1, 1] for i in range(2, 15): fact.append(fact[-1] * i) while True: try: n, k = map(int, raw_input().split()) coef = map(int, raw_input().split()) except: break print fact[n] / reduce(operator.mul, [fact[c] for c in...
none
1
2.83448
3
pynotes/note/models.py
wallaceleonel/Flash-Cards
2
5581
<gh_stars>1-10 from django.contrib.auth.models import User from django.db import models from django.urls import reverse # Create your models here. class Post(models.Model): title = models.CharField(max_length=255) slug = models.SlugField(max_length=255,unique=True) #meusite.com/blog;introducao-ao-django ...
from django.contrib.auth.models import User from django.db import models from django.urls import reverse # Create your models here. class Post(models.Model): title = models.CharField(max_length=255) slug = models.SlugField(max_length=255,unique=True) #meusite.com/blog;introducao-ao-django author = mo...
en
0.762269
# Create your models here. #meusite.com/blog;introducao-ao-django
2.540906
3
infrastructure-provisioning/src/general/scripts/azure/common_notebook_configure_dataengine.py
DmytroLiaskovskyi/incubator-dlab
0
5582
#!/usr/bin/python # ***************************************************************************** # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The A...
#!/usr/bin/python # ***************************************************************************** # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The A...
en
0.763781
#!/usr/bin/python # ***************************************************************************** # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The AS...
1.551359
2
pyACA/ToolFreq2Bark.py
ruohoruotsi/pyACA
81
5583
<reponame>ruohoruotsi/pyACA<filename>pyACA/ToolFreq2Bark.py<gh_stars>10-100 # -*- coding: utf-8 -*- """ helper function: convert Hz to Bark scale Args: fInHz: The frequency to be converted, can be scalar or vector cModel: The name of the model ('Schroeder' [default], 'Terhardt', 'Zwicker', 'Traunmuller') ...
# -*- coding: utf-8 -*- """ helper function: convert Hz to Bark scale Args: fInHz: The frequency to be converted, can be scalar or vector cModel: The name of the model ('Schroeder' [default], 'Terhardt', 'Zwicker', 'Traunmuller') Returns: Bark values of the input dimension """ import numpy as np imp...
en
0.412909
# -*- coding: utf-8 -*- helper function: convert Hz to Bark scale Args: fInHz: The frequency to be converted, can be scalar or vector cModel: The name of the model ('Schroeder' [default], 'Terhardt', 'Zwicker', 'Traunmuller') Returns: Bark values of the input dimension
3.027681
3
magenta/models/sketch_rnn/rnn.py
laurens-in/magenta
1
5584
<reponame>laurens-in/magenta # Copyright 2019 The Magenta 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 ap...
# Copyright 2019 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
en
0.781863
# Copyright 2019 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
2.368065
2
src/cogent3/cluster/UPGMA.py
u6052029/cogent3
0
5585
# usr/bin/env python """Functions to cluster using UPGMA upgma takes an dictionary of pair tuples mapped to distances as input. UPGMA_cluster takes an array and a list of PhyloNode objects corresponding to the array as input. Can also generate this type of input from a DictArray using inputs_from_dict_array function....
# usr/bin/env python """Functions to cluster using UPGMA upgma takes an dictionary of pair tuples mapped to distances as input. UPGMA_cluster takes an array and a list of PhyloNode objects corresponding to the array as input. Can also generate this type of input from a DictArray using inputs_from_dict_array function....
en
0.873699
# usr/bin/env python Functions to cluster using UPGMA upgma takes an dictionary of pair tuples mapped to distances as input. UPGMA_cluster takes an array and a list of PhyloNode objects corresponding to the array as input. Can also generate this type of input from a DictArray using inputs_from_dict_array function. B...
3.139661
3
src/python/make_store_entry.py
kf7lsu/RegfileCompiler-public
0
5586
#this code will generate the structural verilog for a single entry in the register file #takes in the output file manager, the entry number, the number of bits, the number of reads, and the width of the #tristate buffers on the read outputs #expects the same things as make_store_cell, ensure code is valid there #<NAM...
#this code will generate the structural verilog for a single entry in the register file #takes in the output file manager, the entry number, the number of bits, the number of reads, and the width of the #tristate buffers on the read outputs #expects the same things as make_store_cell, ensure code is valid there #<NAM...
en
0.846601
#this code will generate the structural verilog for a single entry in the register file #takes in the output file manager, the entry number, the number of bits, the number of reads, and the width of the #tristate buffers on the read outputs #expects the same things as make_store_cell, ensure code is valid there #<NAME>...
2.946027
3
module1/api.py
oceandelee/tac
0
5587
"""API for AVB""" import json import sys import requests def actualite_found (): osm = "https://opendata.bruxelles.be/api/datasets/1.0/search/?q=" data = { "nhits":0, "parameters":{ "dataset":"actualites-ville-de-bruxelles", "timezone":"UTC", "q":"actualite", "langu...
"""API for AVB""" import json import sys import requests def actualite_found (): osm = "https://opendata.bruxelles.be/api/datasets/1.0/search/?q=" data = { "nhits":0, "parameters":{ "dataset":"actualites-ville-de-bruxelles", "timezone":"UTC", "q":"actualite", "langu...
en
0.661506
API for AVB #Example of use
3.087988
3
improver/cli/nbhood.py
cpelley/improver
77
5588
<reponame>cpelley/improver #!/usr/bin/env python # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown Copyright 2017-2021 Met Office. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are p...
#!/usr/bin/env python # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown Copyright 2017-2021 Met Office. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the ...
en
0.83129
#!/usr/bin/env python # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown Copyright 2017-2021 Met Office. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the ...
1.505031
2
bonsai/model.py
ipa-mirb/bonsai
0
5589
<gh_stars>0 #Copyright (c) 2017 <NAME> # #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, copy, modify, merge, publish, dist...
#Copyright (c) 2017 <NAME> # #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, copy, modify, merge, publish, distribute, subli...
en
0.810554
#Copyright (c) 2017 <NAME> # #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, copy, modify, merge, publish, distribute, subli...
1.649207
2
api/views/todo_views.py
felipe-menelau/todo-list-web
0
5590
from django.contrib.auth.models import User from rest_framework import viewsets, status from rest_framework.response import Response from rest_framework.permissions import IsAuthenticated, IsAdminUser from api.serializers import TODOListSerializer from api.models import TODOList class TODOListViewSet(viewsets.ModelVi...
from django.contrib.auth.models import User from rest_framework import viewsets, status from rest_framework.response import Response from rest_framework.permissions import IsAuthenticated, IsAdminUser from api.serializers import TODOListSerializer from api.models import TODOList class TODOListViewSet(viewsets.ModelVi...
none
1
2.014909
2
Python/Tests/TestData/ProjectHomeProjects/Subfolder/ProgramB.py
techkey/PTVS
404
5591
# ProgramB.py print('Hello World')
# ProgramB.py print('Hello World')
en
0.197165
# ProgramB.py
1.165347
1
donation/migrations/0043_auto_20180109_0012.py
effective-altruism-australia/donation-portal
1
5592
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion def copy_existing_referrals_into_new_field(apps, schema_editor): Pledge = apps.get_model('donation', 'Pledge') Referral = apps.get_model('donation', 'Referral') reason...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion def copy_existing_referrals_into_new_field(apps, schema_editor): Pledge = apps.get_model('donation', 'Pledge') Referral = apps.get_model('donation', 'Referral') reason...
en
0.802656
# -*- coding: utf-8 -*- # Filter out None and u''
1.86584
2
python/is_even.py
c1m50c/twitter-examples
0
5593
<reponame>c1m50c/twitter-examples<gh_stars>0 def is_even(i: int) -> bool: if i == 1: return False elif i == 2: return True elif i == 3: return False elif i == 4: return True elif i == 5: ... # Never do that! Use one of these instead... is_even = lambda i : i...
def is_even(i: int) -> bool: if i == 1: return False elif i == 2: return True elif i == 3: return False elif i == 4: return True elif i == 5: ... # Never do that! Use one of these instead... is_even = lambda i : i % 2 == 0 is_even = lambda i : not i & 1 is_o...
en
0.835444
# Never do that! Use one of these instead...
3.997414
4
wordpress-brute.py
RandomRobbieBF/wordpress-bf
1
5594
<filename>wordpress-brute.py #!/usr/bin/env python # # Wordpress Bruteforce Tool # # By @random_robbie # # import requests import json import sys import argparse import re import os.path from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureRequestW...
<filename>wordpress-brute.py #!/usr/bin/env python # # Wordpress Bruteforce Tool # # By @random_robbie # # import requests import json import sys import argparse import re import os.path from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureRequestW...
en
0.70402
#!/usr/bin/env python # # Wordpress Bruteforce Tool # # By @random_robbie # # # Grab Wordpress Users via Wordpress JSON api # Grab Wordpress Users via Sitemap # Grab Wordpress Users via RSS Feed # Check we can get to wp-admin login. # Check URL is wordpress # Check if wordfence is installed as this limits the logins to...
2.497549
2
graph_search/week2/assignment_dijkstra_shortest_paths.py
liaoaoyuan97/standford_algorithms_specialization
0
5595
import heapq import time from os import path from math import floor class Heap: def __init__(self): self.size = 0 self.array = [] self.v2index_map = {} def __get_parent_index(self, idx): return int(floor((idx - 1) / 2)) def __get_left_child_index(self, idx): retur...
import heapq import time from os import path from math import floor class Heap: def __init__(self): self.size = 0 self.array = [] self.v2index_map = {} def __get_parent_index(self, idx): return int(floor((idx - 1) / 2)) def __get_left_child_index(self, idx): retur...
en
0.718972
# (dj_score, vertex_id) # added to X # (vertex_id, dj_score) # import pdb;pdb.set_trace() # test case 1, output: {1: 0, 2: 1, 3: 2, 4: 2, 5: 3, 6: 4} # graph = { # 1: [(6, 7), (5, 3), (2, 1), (4, 2), (3, 3)], # 2: [(1, 1), (3, 1), (4, 1), (6, 6)], # 3: [(1, 3), (2, 1), (6, 2)], # 4: [(2, 1), (1, 2), (6,...
3.335881
3
ssod/utils/structure_utils.py
huimlight/SoftTeacher
604
5596
<reponame>huimlight/SoftTeacher<gh_stars>100-1000 import warnings from collections import Counter, Mapping, Sequence from numbers import Number from typing import Dict, List import numpy as np import torch from mmdet.core.mask.structures import BitmapMasks from torch.nn import functional as F _step_counter = Counter(...
import warnings from collections import Counter, Mapping, Sequence from numbers import Number from typing import Dict, List import numpy as np import torch from mmdet.core.mask.structures import BitmapMasks from torch.nn import functional as F _step_counter = Counter() def list_concat(data_list: List[list]): if...
none
1
2.256647
2
tests/tabular_output/test_terminaltables_adapter.py
zzl0/cli_helpers
0
5597
# -*- coding: utf-8 -*- """Test the terminaltables output adapter.""" from __future__ import unicode_literals from textwrap import dedent import pytest from cli_helpers.compat import HAS_PYGMENTS from cli_helpers.tabular_output import terminaltables_adapter if HAS_PYGMENTS: from pygments.style import Style ...
# -*- coding: utf-8 -*- """Test the terminaltables output adapter.""" from __future__ import unicode_literals from textwrap import dedent import pytest from cli_helpers.compat import HAS_PYGMENTS from cli_helpers.tabular_output import terminaltables_adapter if HAS_PYGMENTS: from pygments.style import Style ...
en
0.306482
# -*- coding: utf-8 -*- Test the terminaltables output adapter. Test the terminaltables output adapter. \ +---------+--------+ | letters | number | +---------+--------+ | abc | 1 | | d | 456 | +---------+--------+ Test that *style_output_table()* styles ...
2.55477
3
dev/Tools/build/waf-1.7.13/waflib/extras/fc_xlf.py
jeikabu/lumberyard
1,738
5598
<gh_stars>1000+ #! /usr/bin/env python # encoding: utf-8 # harald at klimachs.de import re from waflib import Utils,Errors from waflib.Tools import fc,fc_config,fc_scan from waflib.Configure import conf from waflib.Tools.compiler_fc import fc_compiler fc_compiler['aix'].insert(0, 'fc_xlf') @conf def find_xlf(conf): ...
#! /usr/bin/env python # encoding: utf-8 # harald at klimachs.de import re from waflib import Utils,Errors from waflib.Tools import fc,fc_config,fc_scan from waflib.Configure import conf from waflib.Tools.compiler_fc import fc_compiler fc_compiler['aix'].insert(0, 'fc_xlf') @conf def find_xlf(conf): """Find the xlf...
en
0.612899
#! /usr/bin/env python # encoding: utf-8 # harald at klimachs.de Find the xlf program (will look in the environment variable 'FC') Get the compiler version
2.010075
2
tutorials/create_table/tests.py
MeGustas-5427/SQL_Tutorials
13
5599
#!/usr/bin/python3 # -*- coding:utf-8 -*- # __author__ = '__MeGustas__' from django.test import TestCase from django.db import connection from tutorials.create_table.models import * # Create your tests here. class TestHealthFile(TestCase): def setUp(self): cursor = connection.cursor() # Popul...
#!/usr/bin/python3 # -*- coding:utf-8 -*- # __author__ = '__MeGustas__' from django.test import TestCase from django.db import connection from tutorials.create_table.models import * # Create your tests here. class TestHealthFile(TestCase): def setUp(self): cursor = connection.cursor() # Popul...
en
0.567003
#!/usr/bin/python3 # -*- coding:utf-8 -*- # __author__ = '__MeGustas__' # Create your tests here. # Populate Customers table # Populate Vendors table # Populate Products table # Populate Orders table # Populate OrderItems table # Clean up run after every test method.
2.42736
2