hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c33c148de72f2a2ca14577dee55ad5de602841d
2,997
py
Python
python/2016/day10.py
SylvainDe/aoc
b8a4609327831685ef94c9960350ff7bb5ace1a5
[ "MIT" ]
null
null
null
python/2016/day10.py
SylvainDe/aoc
b8a4609327831685ef94c9960350ff7bb5ace1a5
[ "MIT" ]
null
null
null
python/2016/day10.py
SylvainDe/aoc
b8a4609327831685ef94c9960350ff7bb5ace1a5
[ "MIT" ]
null
null
null
# vi: set shiftwidth=4 tabstop=4 expandtab: import datetime import re import collections def get_instructions_from_file(file_path="../../resources/year2016_day10_input.txt"): with open(file_path) as f: return [l.strip() for l in f] value_goes_re = r"value (\d+) goes to bot (\d+)" bot_gives_re = r"bot (\...
30.896907
85
0.573907
import datetime import re import collections def get_instructions_from_file(file_path="../../resources/year2016_day10_input.txt"): with open(file_path) as f: return [l.strip() for l in f] value_goes_re = r"value (\d+) goes to bot (\d+)" bot_gives_re = r"bot (\d+) gives low to ([a-z]+) (\d+) and high to...
true
true
1c33c267b7a90b6b1ed9a5308764bf8d3ab08bcf
8,280
py
Python
androguard/session.py
hakimkt/androguard
c16453c70f11df96e4ab3530c212aafe5e1e9e41
[ "Apache-2.0" ]
2
2018-01-28T22:51:12.000Z
2021-02-26T12:02:55.000Z
androguard/session.py
eighthave/androguard
a4f6e7f192f0f21a2f9e063f467775c7b5e36190
[ "Apache-2.0" ]
null
null
null
androguard/session.py
eighthave/androguard
a4f6e7f192f0f21a2f9e063f467775c7b5e36190
[ "Apache-2.0" ]
null
null
null
import hashlib from androguard.core.analysis.analysis import * from androguard.core.bytecodes.dvm import * from androguard.decompiler.decompiler import * from androguard.core import androconf import pickle import logging log = logging.getLogger("androguard.session") def Save(session, filename): """ save yo...
30.666667
97
0.592633
import hashlib from androguard.core.analysis.analysis import * from androguard.core.bytecodes.dvm import * from androguard.decompiler.decompiler import * from androguard.core import androconf import pickle import logging log = logging.getLogger("androguard.session") def Save(session, filename): with open(filen...
true
true
1c33c385b705023e11290137cee26f62b0f93a76
7,695
py
Python
r2d7/slackdroid.py
danrs/r2-d7
d1f7a839f0bcb490954477c592245b5107b8a6aa
[ "MIT" ]
null
null
null
r2d7/slackdroid.py
danrs/r2-d7
d1f7a839f0bcb490954477c592245b5107b8a6aa
[ "MIT" ]
null
null
null
r2d7/slackdroid.py
danrs/r2-d7
d1f7a839f0bcb490954477c592245b5107b8a6aa
[ "MIT" ]
null
null
null
import html import logging import re from urllib.parse import quote from r2d7.core import DroidCore logger = logging.getLogger(__name__) class SlackDroid(DroidCore): def __init__(self): super().__init__() self.load_data() def load_data(self): super().load_data() # Referenc...
42.988827
199
0.555036
import html import logging import re from urllib.parse import quote from r2d7.core import DroidCore logger = logging.getLogger(__name__) class SlackDroid(DroidCore): def __init__(self): super().__init__() self.load_data() def load_data(self): super().load_data() s...
true
true
1c33c3d60a687988f1a25b8804876c5ef86fc7a7
740
py
Python
BuildSimHubAPI/measures/wall_rvalue.py
ruijis/buildsimhub_python_api
67a88a421a5970b9134a97faf3d52a5a8a6c6258
[ "MIT" ]
19
2018-02-27T22:58:04.000Z
2022-02-21T15:03:59.000Z
BuildSimHubAPI/measures/wall_rvalue.py
ruijis/buildsimhub_python_api
67a88a421a5970b9134a97faf3d52a5a8a6c6258
[ "MIT" ]
11
2018-02-15T16:47:53.000Z
2018-12-19T18:33:20.000Z
BuildSimHubAPI/measures/wall_rvalue.py
ruijis/buildsimhub_python_api
67a88a421a5970b9134a97faf3d52a5a8a6c6258
[ "MIT" ]
11
2018-01-26T02:12:38.000Z
2019-09-29T12:05:31.000Z
from .model_action import ModelAction class WallRValue(ModelAction): # this shows the ip to si conversion rate # if unit is 'ip', then multiply this rate. # for window it is the U-value # convert U-value IP to SI CONVERSION_RATE = 5.678 def __init__(self, unit="si"): ModelAction.__ini...
27.407407
81
0.639189
from .model_action import ModelAction class WallRValue(ModelAction): CONVERSION_RATE = 5.678 def __init__(self, unit="si"): ModelAction.__init__(self, 'wall_rvalue', unit) self._measure_name = 'Wall_R' self._lower_limit = 0 self._measure_help = ''' ...
true
true
1c33c41b5744af5492119fefdab088d76a166432
1,592
py
Python
prereise/gather/demanddata/eia/tests/test_get_eia_data.py
keforres/PreREISE
fcc111fdccc0626d3d34f1749a14035e47991043
[ "MIT" ]
15
2021-03-02T11:54:27.000Z
2022-02-16T13:01:40.000Z
prereise/gather/demanddata/eia/tests/test_get_eia_data.py
keforres/PreREISE
fcc111fdccc0626d3d34f1749a14035e47991043
[ "MIT" ]
90
2021-01-25T19:02:14.000Z
2022-03-31T20:27:28.000Z
prereise/gather/demanddata/eia/tests/test_get_eia_data.py
keforres/PreREISE
fcc111fdccc0626d3d34f1749a14035e47991043
[ "MIT" ]
15
2021-02-08T23:28:21.000Z
2022-01-24T21:59:14.000Z
import getpass import os from datetime import datetime import pandas as pd import pytest from prereise.gather.demanddata.eia import get_eia_data @pytest.mark.skip(reason="Need API key") def test_eia_download(): """Check data frame assembled from data download by API call from EIA. Test checks that the corre...
28.945455
79
0.667714
import getpass import os from datetime import datetime import pandas as pd import pytest from prereise.gather.demanddata.eia import get_eia_data @pytest.mark.skip(reason="Need API key") def test_eia_download(): print( "A API key is required for the API download. The key " "can be obtained by a u...
true
true
1c33c59268836c60403eb41bb948186d544dbbd4
21,742
py
Python
RUNTIME/DNN/python/from_boris/b_dnn.py
subramon/qlu
2fb8a2b3636dd11e2dfeae2a6477bd130316da47
[ "MIT" ]
null
null
null
RUNTIME/DNN/python/from_boris/b_dnn.py
subramon/qlu
2fb8a2b3636dd11e2dfeae2a6477bd130316da47
[ "MIT" ]
7
2020-07-29T16:48:25.000Z
2020-09-26T23:47:22.000Z
RUNTIME/DNN/python/from_boris/b_dnn.py
subramon/qlu
2fb8a2b3636dd11e2dfeae2a6477bd130316da47
[ "MIT" ]
1
2015-05-14T22:34:13.000Z
2015-05-14T22:34:13.000Z
import h5py import numpy as np import pandas as pd from PIL import Image from sklearn.datasets import make_blobs from sklearn.metrics import log_loss from sklearn.preprocessing import MinMaxScaler # ---------------------------------------------------------------------- # Preprocess data # ---------------------------...
33.76087
157
0.554641
import h5py import numpy as np import pandas as pd from PIL import Image from sklearn.datasets import make_blobs from sklearn.metrics import log_loss from sklearn.preprocessing import MinMaxScaler def get_data(debug=False): train_dataset = h5py.File('./data/train_cat_vs_noncat.h5', 'r') train_x_orig = np...
true
true
1c33c6174cf391981bca1a303fe544f975041755
401
py
Python
Protinx_blog/Protinx_blog/wsgi.py
Protinx/Protinx_blog
9f787d483cadfb40821e5374b773f789130c9b5c
[ "MIT" ]
null
null
null
Protinx_blog/Protinx_blog/wsgi.py
Protinx/Protinx_blog
9f787d483cadfb40821e5374b773f789130c9b5c
[ "MIT" ]
null
null
null
Protinx_blog/Protinx_blog/wsgi.py
Protinx/Protinx_blog
9f787d483cadfb40821e5374b773f789130c9b5c
[ "MIT" ]
null
null
null
""" WSGI config for Protinx_blog project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_...
23.588235
78
0.790524
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Protinx_blog.settings') application = get_wsgi_application()
true
true
1c33c885d55663f1bbd4cc1fe9b47c5602907c1b
4,484
py
Python
deep3dmap/datasets/pipelines/test_time_aug.py
achao2013/DeepRecon
1c9b0480710212e1fe86ab75dcf0b30bd9f654e7
[ "Apache-2.0" ]
30
2022-02-05T18:35:27.000Z
2022-02-09T09:14:41.000Z
deep3dmap/datasets/pipelines/test_time_aug.py
achao2013/DeepRecon
1c9b0480710212e1fe86ab75dcf0b30bd9f654e7
[ "Apache-2.0" ]
null
null
null
deep3dmap/datasets/pipelines/test_time_aug.py
achao2013/DeepRecon
1c9b0480710212e1fe86ab75dcf0b30bd9f654e7
[ "Apache-2.0" ]
null
null
null
# Copyright (c) OpenMMLab. All rights reserved. import warnings import deep3dmap from ..builder import PIPELINES from .compose import Compose @PIPELINES.register_module() class MultiScaleFlipAug: """Test-time augmentation with multiple scales and flipping. An example configuration is as followed: .. c...
36.754098
78
0.575825
import warnings import deep3dmap from ..builder import PIPELINES from .compose import Compose @PIPELINES.register_module() class MultiScaleFlipAug: def __init__(self, transforms, img_scale=None, scale_factor=None, flip=False, ...
true
true
1c33c92a315cac5c4c613c2a292461ba58e8cd31
894
py
Python
Python/88 Merge Sorted Array.py
comicxmz001/LeetCode
6878fe4cad7daf7067014029d7aae303ad4c1182
[ "MIT" ]
2
2016-07-03T06:18:37.000Z
2016-07-03T06:22:55.000Z
Python/88 Merge Sorted Array.py
comicxmz001/LeetCode
6878fe4cad7daf7067014029d7aae303ad4c1182
[ "MIT" ]
null
null
null
Python/88 Merge Sorted Array.py
comicxmz001/LeetCode
6878fe4cad7daf7067014029d7aae303ad4c1182
[ "MIT" ]
null
null
null
class Solution(object): def merge(self, nums1, m, nums2, n): """ :type nums1: List[int] :type m: int :type nums2: List[int] :type n: int :rtype: void Do not return anything, modify nums1 in-place instead. """ if m == 0 and not n==0: nums1[:n] ...
22.35
75
0.455257
class Solution(object): def merge(self, nums1, m, nums2, n): """ :type nums1: List[int] :type m: int :type nums2: List[int] :type n: int :rtype: void Do not return anything, modify nums1 in-place instead. """ if m == 0 and not n==0: nums1[:n] ...
false
true
1c33c9ee2203a2b57aac43d54040102017079a16
15,467
py
Python
google/ads/google_ads/v1/proto/common/criterion_category_availability_pb2.py
jiulongw/google-ads-python
6f5256eb1eeb5a9a95c8cdb9b97988d3a676282e
[ "Apache-2.0" ]
1
2019-11-30T23:42:39.000Z
2019-11-30T23:42:39.000Z
google/ads/google_ads/v1/proto/common/criterion_category_availability_pb2.py
jiulongw/google-ads-python
6f5256eb1eeb5a9a95c8cdb9b97988d3a676282e
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v1/proto/common/criterion_category_availability_pb2.py
jiulongw/google-ads-python
6f5256eb1eeb5a9a95c8cdb9b97988d3a676282e
[ "Apache-2.0" ]
1
2020-03-13T00:14:31.000Z
2020-03-13T00:14:31.000Z
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/googleads_v1/proto/common/criterion_category_availability.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google...
59.488462
2,138
0.814444
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db ...
true
true
1c33ca6b07df9401deb2a7acc1624f8489ef1b94
11,911
py
Python
dark/html.py
TaliVeith/dark-matter
1548a6e6fbfceb7c8b13556bbf4f7ce7d1ac18a0
[ "MIT" ]
10
2016-03-09T09:43:14.000Z
2021-04-03T21:46:12.000Z
dark/html.py
TaliVeith/dark-matter
1548a6e6fbfceb7c8b13556bbf4f7ce7d1ac18a0
[ "MIT" ]
332
2015-01-07T12:37:30.000Z
2022-01-20T15:48:11.000Z
dark/html.py
TaliVeith/dark-matter
1548a6e6fbfceb7c8b13556bbf4f7ce7d1ac18a0
[ "MIT" ]
4
2016-03-08T14:56:39.000Z
2021-01-27T08:11:27.000Z
from __future__ import print_function from IPython.display import HTML from six.moves.urllib.parse import quote from dark.fastq import FastqReads def NCBISequenceLinkURL(title, field=None, delim='|'): """ Given a sequence title, like "acc|GENBANK|AY516849.1|GENBANK|42768646 Homo sapiens", return...
34.725948
78
0.589455
from __future__ import print_function from IPython.display import HTML from six.moves.urllib.parse import quote from dark.fastq import FastqReads def NCBISequenceLinkURL(title, field=None, delim='|'): if field is None: ref = title else: try: ref = title.split(delim)[field] ...
true
true
1c33ca7586d1155bc27847a4ecd9f840470dc365
4,305
py
Python
api-ref/source/conf.py
soda-research/mistral
550a3de9c2defc7ce26336cb705d9c8d87bbaddd
[ "Apache-2.0" ]
3
2015-08-28T04:57:56.000Z
2017-03-27T10:59:56.000Z
api-ref/source/conf.py
soda-research/mistral
550a3de9c2defc7ce26336cb705d9c8d87bbaddd
[ "Apache-2.0" ]
21
2015-04-14T22:41:53.000Z
2019-02-20T09:30:10.000Z
api-ref/source/conf.py
soda-research/mistral
550a3de9c2defc7ce26336cb705d9c8d87bbaddd
[ "Apache-2.0" ]
12
2015-08-14T02:27:37.000Z
2020-12-31T10:09:21.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
32.862595
79
0.700116
import os import subprocess import sys on_rtd = os.environ.get('READTHEDOCS', None) == 'True' sys.path.insert(0, os.path.abspath('../../')) sys.path.insert(0, os.path.abspath('../')) sys.path.insert(0, os.path.abspath('./')) extensions = [ 'sphinx.ext.autodoc', 'sphinxcontrib.autohttp.fla...
true
true
1c33cae5baaef18f55e1952e5b130f74b97e1f8f
510
py
Python
home/migrations/0073_auto_20201203_2319.py
SCCapstone/C-2319
4ab2b5b5511209dc4d7f9c25b6a4f70843287b77
[ "bzip2-1.0.6" ]
null
null
null
home/migrations/0073_auto_20201203_2319.py
SCCapstone/C-2319
4ab2b5b5511209dc4d7f9c25b6a4f70843287b77
[ "bzip2-1.0.6" ]
null
null
null
home/migrations/0073_auto_20201203_2319.py
SCCapstone/C-2319
4ab2b5b5511209dc4d7f9c25b6a4f70843287b77
[ "bzip2-1.0.6" ]
null
null
null
# Generated by Django 3.0 on 2020-12-04 04:19 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('home', '0072_auto_20201203_2306'), ] operations = [ migrations.AlterField( model_name='item', name='condition', ...
26.842105
178
0.582353
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('home', '0072_auto_20201203_2306'), ] operations = [ migrations.AlterField( model_name='item', name='condition', field=models.IntegerField(choices=[(3, ...
true
true
1c33cafc1861c18e47a486e41801a7c693148de0
5,399
py
Python
arguments.py
zegerk/gym-micropolis
554bf41e9c4001140cdba90c5bbb3cc6bacf4c65
[ "MIT" ]
3
2020-07-13T08:44:36.000Z
2022-03-18T01:17:59.000Z
arguments.py
zegerk/gym-micropolis
554bf41e9c4001140cdba90c5bbb3cc6bacf4c65
[ "MIT" ]
null
null
null
arguments.py
zegerk/gym-micropolis
554bf41e9c4001140cdba90c5bbb3cc6bacf4c65
[ "MIT" ]
null
null
null
import argparse import torch def get_args(): parser = argparse.ArgumentParser(description='RL') parser.add_argument('--algo', default='a2c', help='algorithm to use: a2c | ppo | acktr') parser.add_argument('--lr', type=float, default=7e-4, help='learning rat...
53.99
89
0.588072
import argparse import torch def get_args(): parser = argparse.ArgumentParser(description='RL') parser.add_argument('--algo', default='a2c', help='algorithm to use: a2c | ppo | acktr') parser.add_argument('--lr', type=float, default=7e-4, help='learning rat...
true
true
1c33ccb5f496d7886eed6af7173903ed1970063c
4,641
py
Python
test/functional/wallet_importprunedfunds.py
pexacoin/core
0c6ad31264dde2cbe612d35202e7005a9dae0e1a
[ "MIT" ]
11
2019-07-08T01:45:34.000Z
2020-04-24T22:17:43.000Z
test/functional/wallet_importprunedfunds.py
pexacoin/core
0c6ad31264dde2cbe612d35202e7005a9dae0e1a
[ "MIT" ]
1
2019-10-19T14:52:31.000Z
2019-10-19T14:52:31.000Z
test/functional/wallet_importprunedfunds.py
pexacoin/core
0c6ad31264dde2cbe612d35202e7005a9dae0e1a
[ "MIT" ]
4
2019-07-08T01:45:51.000Z
2021-12-17T18:20:26.000Z
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Copyright (c) 2017-2018 The Pexa Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the importprunedfunds and removeprunedfunds RPC...
40.008621
117
0.660203
from test_framework.test_framework import PexaTestFramework from test_framework.util import * class ImportPrunedFundsTest(PexaTestFramework): def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 2 def run_test(self): self.log.info("Mining blocks...") s...
true
true
1c33cd7567a86a3efce192828b9c73c1ad9e3605
1,008
py
Python
src/kid/core/kglobals.py
KidKaboom/Kid-Maya-2022
0daec301a63438d681cc4c3a5df6d4efdc70daef
[ "MIT" ]
null
null
null
src/kid/core/kglobals.py
KidKaboom/Kid-Maya-2022
0daec301a63438d681cc4c3a5df6d4efdc70daef
[ "MIT" ]
null
null
null
src/kid/core/kglobals.py
KidKaboom/Kid-Maya-2022
0daec301a63438d681cc4c3a5df6d4efdc70daef
[ "MIT" ]
null
null
null
# :coding: utf-8 # Python Modules import os import sys # Platforms PLATFORM = sys.platform WINDOWS = "win32" OSX = "darwin" LINUX = "linux" # Paths GLOBALS_PATH = os.path.abspath(__file__) SCRIPTS_PATH = os.path.dirname(os.path.dirname(os.path.dirname(GLOBALS_PATH))) PROJECT_PATH = os.path.dirname(SCRIPTS_PATH) PLU...
24.585366
78
0.738095
import os import sys PLATFORM = sys.platform WINDOWS = "win32" OSX = "darwin" LINUX = "linux" GLOBALS_PATH = os.path.abspath(__file__) SCRIPTS_PATH = os.path.dirname(os.path.dirname(os.path.dirname(GLOBALS_PATH))) PROJECT_PATH = os.path.dirname(SCRIPTS_PATH) PLUGINS_PATH = os.path.join(PROJECT_PATH, "plug-ins")...
true
true
1c33ce100945493873a1dec3a0ea0ac4d0857ad4
919
py
Python
TestingBisection.py
abecker99/Interpolation
0527e6296c98b1c7f6cf512e614090f61754705d
[ "MIT" ]
null
null
null
TestingBisection.py
abecker99/Interpolation
0527e6296c98b1c7f6cf512e614090f61754705d
[ "MIT" ]
null
null
null
TestingBisection.py
abecker99/Interpolation
0527e6296c98b1c7f6cf512e614090f61754705d
[ "MIT" ]
null
null
null
import numpy as np def find_sign_change(f, step, a, b): x = a pairs = [] while (x + step < b): if (f(x + step)/f(x) < 0): pairs.append([x, x+step]) x += step return pairs def bisect(f, pairs, tolerance): zeros = [] for pair in pairs: midpoint = (pair[1] - p...
24.837838
54
0.517954
import numpy as np def find_sign_change(f, step, a, b): x = a pairs = [] while (x + step < b): if (f(x + step)/f(x) < 0): pairs.append([x, x+step]) x += step return pairs def bisect(f, pairs, tolerance): zeros = [] for pair in pairs: midpoint = (pair[1] - p...
true
true
1c33ce82e6d42b041f4b9a88731db0d99ab1c3ab
141
py
Python
setup.py
hepteract/nova
cf0e866aa5c0f59a3528de9d71671c567219c2ee
[ "MIT" ]
null
null
null
setup.py
hepteract/nova
cf0e866aa5c0f59a3528de9d71671c567219c2ee
[ "MIT" ]
null
null
null
setup.py
hepteract/nova
cf0e866aa5c0f59a3528de9d71671c567219c2ee
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages setup( name = "nova", version = "0.1", packages = find_packages() )
17.625
43
0.574468
from setuptools import setup, find_packages setup( name = "nova", version = "0.1", packages = find_packages() )
true
true
1c33cebd405dc8f841b48127497e7256268141ab
1,196
py
Python
tests/io/test_unique_path.py
safurrier/data_science_utils
842b025ea3197e8a9946401257b2fa22ef1bf82d
[ "MIT" ]
null
null
null
tests/io/test_unique_path.py
safurrier/data_science_utils
842b025ea3197e8a9946401257b2fa22ef1bf82d
[ "MIT" ]
null
null
null
tests/io/test_unique_path.py
safurrier/data_science_utils
842b025ea3197e8a9946401257b2fa22ef1bf82d
[ "MIT" ]
1
2020-03-30T20:59:04.000Z
2020-03-30T20:59:04.000Z
# %% import os import shutil import pytest import pathlib from data_science_toolbox.io.unique_path import unique_path UNIQUE_FPATH_TEST_CASES = [ ('test_file_{:02d}.txt', 'tests/io/unique_path_files', ['test_file_00.txt', 'test_file_01.txt', ], 'tests/io/unique_path_files/test_file_02.t...
28.47619
89
0.683946
import os import shutil import pytest import pathlib from data_science_toolbox.io.unique_path import unique_path UNIQUE_FPATH_TEST_CASES = [ ('test_file_{:02d}.txt', 'tests/io/unique_path_files', ['test_file_00.txt', 'test_file_01.txt', ], 'tests/io/unique_path_files/test_file_02.txt' ...
true
true
1c33cf617a1e7101deeca5ccbf7535fbaef869c7
288
py
Python
st_marys/items.py
nbanion/blah
cf14d33d6f6222f4ba8e7582f11150a887508fa2
[ "MIT" ]
null
null
null
st_marys/items.py
nbanion/blah
cf14d33d6f6222f4ba8e7582f11150a887508fa2
[ "MIT" ]
8
2019-10-12T16:38:21.000Z
2019-10-21T03:20:56.000Z
st_marys/items.py
nbanion/blah
cf14d33d6f6222f4ba8e7582f11150a887508fa2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # https://docs.scrapy.org/en/latest/topics/items.html import scrapy class StMarysItem(scrapy.Item): # define the fields for your item here like: # name = scrapy.Field() pass
19.2
53
0.6875
import scrapy class StMarysItem(scrapy.Item): pass
true
true
1c33d09dea733d064f0ffa7d8da13c4cbc5f6edc
7,728
py
Python
marvel_world/migrations/0001_initial.py
xiaoranppp/si664-final
f5545c04452fd674ddf1d078444e79ea58385e7e
[ "MIT" ]
null
null
null
marvel_world/migrations/0001_initial.py
xiaoranppp/si664-final
f5545c04452fd674ddf1d078444e79ea58385e7e
[ "MIT" ]
1
2018-11-25T21:07:37.000Z
2018-11-25T21:07:37.000Z
marvel_world/migrations/0001_initial.py
xiaoranppp/si664-final
f5545c04452fd674ddf1d078444e79ea58385e7e
[ "MIT" ]
1
2018-12-21T12:06:03.000Z
2018-12-21T12:06:03.000Z
# Generated by Django 2.1.4 on 2018-12-12 07:53 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Alignment', fields=[ ('alignment_id', model...
39.835052
92
0.501682
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Alignment', fields=[ ('alignment_id', models.AutoField(primary_key=True, serialize=False))...
true
true
1c33d0bcbacab25b971eb2d29ba8270852714c1e
1,720
py
Python
data/get_zillow_nbr.py
Derikulous/zillow_hackathon
43098e7dcdeec86dc8bc0a0dd27a6366db1be34e
[ "MIT" ]
null
null
null
data/get_zillow_nbr.py
Derikulous/zillow_hackathon
43098e7dcdeec86dc8bc0a0dd27a6366db1be34e
[ "MIT" ]
null
null
null
data/get_zillow_nbr.py
Derikulous/zillow_hackathon
43098e7dcdeec86dc8bc0a0dd27a6366db1be34e
[ "MIT" ]
null
null
null
# DOC: # http://www.zillow.com/howto/api/GetDemographics.htm # # EXAMPLES: # http://www.zillow.com/webservice/GetDemographics.htm?zws-id=X1-ZWz1e1hgxwby17_81d4x&state=WA&city=Seattle&neighborhood=Ballard # http://www.zillow.com/webservice/GetDemographics.htm?zws-id=X1-ZWz1e1hgxwby17_81d4x&state=CA&city=SF&neighborhood=...
30.714286
136
0.66686
import sys import requests from xml.etree import ElementTree as ET API_KEY = 'zws-id=X1-ZWz1e1hgxwby17_81d4x' API_URL = 'http://www.zillow.com/webservice/GetDemographics.htm?%(api_key)s&state=%(state)s&city=%(city)s&neighborhood=%(neighborhood)s' STATE = 'CA' CITY = 'SF' NEIGHBORHOOD_FN = 'gold/sf_nbr_names....
false
true
1c33d1014073d8dbc778a801936790dfc8937be3
3,629
py
Python
google/ads/googleads/v7/services/services/location_view_service/transports/base.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
285
2018-10-05T16:47:58.000Z
2022-03-31T00:58:39.000Z
google/ads/googleads/v7/services/services/location_view_service/transports/base.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
425
2018-09-10T13:32:41.000Z
2022-03-31T14:50:05.000Z
google/ads/googleads/v7/services/services/location_view_service/transports/base.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
369
2018-11-28T07:01:00.000Z
2022-03-28T09:53:22.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
35.930693
78
0.675117
import abc import typing import pkg_resources from google import auth from google.api_core import gapic_v1 from google.api_core import retry as retries from google.auth import credentials from google.ads.googleads.v7.resources.types import location_view from google.ads.googleads.v7.services.types...
true
true
1c33d19db4bdd04b747c13b4d844b0ad5ee8ff8b
66,357
py
Python
python/paddle/tensor/manipulation.py
wangxinxin08/Paddle
b9ab838baa3d9cecddc4c2463a7e35038e70ba42
[ "Apache-2.0" ]
2
2021-05-16T08:33:38.000Z
2022-03-14T05:14:14.000Z
python/paddle/tensor/manipulation.py
BMBH/Paddle
1b0c5ef264b52a9d75f971216618ebbbbc7e5931
[ "Apache-2.0" ]
null
null
null
python/paddle/tensor/manipulation.py
BMBH/Paddle
1b0c5ef264b52a9d75f971216618ebbbbc7e5931
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
37.939966
457
0.559308
from __future__ import print_function from ..fluid.layers import core from ..fluid.layer_helper import LayerHelper from ..fluid.framework import Variable, OpProtoHolder, in_dygraph_mode, convert_np_dtype_to_dtype_, device_guard, dygraph_only from ..fluid.data_feeder import convert_dtype, check_variable_a...
true
true
1c33d1ce2fb504c123f1b408377e7bc13f05c419
3,353
py
Python
infra/bots/bot.py
workerVA/skcms
069b8f699b5941f33295f5415e6d23bdf68a5e32
[ "BSD-3-Clause" ]
null
null
null
infra/bots/bot.py
workerVA/skcms
069b8f699b5941f33295f5415e6d23bdf68a5e32
[ "BSD-3-Clause" ]
null
null
null
infra/bots/bot.py
workerVA/skcms
069b8f699b5941f33295f5415e6d23bdf68a5e32
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python2.7 import os import subprocess import sys ninja = sys.argv[1] def call(cmd): subprocess.check_call(cmd, shell=True) def append(path, line): with open(path, 'a') as f: print >>f, line print "Hello from {platform} in {cwd}!".format(platform=sys.platform, ...
36.053763
110
0.655532
import os import subprocess import sys ninja = sys.argv[1] def call(cmd): subprocess.check_call(cmd, shell=True) def append(path, line): with open(path, 'a') as f: print >>f, line print "Hello from {platform} in {cwd}!".format(platform=sys.platform, cwd=os.ge...
false
true
1c33d271d23f367d670aae3f8ea6cabf2bb8701c
563
py
Python
setup.py
fuenfundachtzig/pylhe
07c994d68cef3c4b66792e7668d82a4f274bcb68
[ "Apache-2.0" ]
null
null
null
setup.py
fuenfundachtzig/pylhe
07c994d68cef3c4b66792e7668d82a4f274bcb68
[ "Apache-2.0" ]
null
null
null
setup.py
fuenfundachtzig/pylhe
07c994d68cef3c4b66792e7668d82a4f274bcb68
[ "Apache-2.0" ]
null
null
null
from setuptools import setup extras_require = { "test": ["pytest", "pytest-cov>=2.5.1", "scikit-hep-testdata>=0.3.1", "pydocstyle"], } extras_require["lint"] = sorted(set(["flake8", "black;python_version>='3.6'"])) extras_require["develop"] = sorted( set( extras_require["test"] + ["pre-commit",...
29.631579
88
0.651865
from setuptools import setup extras_require = { "test": ["pytest", "pytest-cov>=2.5.1", "scikit-hep-testdata>=0.3.1", "pydocstyle"], } extras_require["lint"] = sorted(set(["flake8", "black;python_version>='3.6'"])) extras_require["develop"] = sorted( set( extras_require["test"] + ["pre-commit",...
true
true
1c33d2d7e094f4b960afcfacb1453b9b54853b6e
1,508
py
Python
TwitterStreamer.py
CS-UCR/final-project-hulk
0af9ad94083b8e6ff1635428465ddba478ee0eb7
[ "MIT" ]
null
null
null
TwitterStreamer.py
CS-UCR/final-project-hulk
0af9ad94083b8e6ff1635428465ddba478ee0eb7
[ "MIT" ]
null
null
null
TwitterStreamer.py
CS-UCR/final-project-hulk
0af9ad94083b8e6ff1635428465ddba478ee0eb7
[ "MIT" ]
null
null
null
from tweepy import Stream from tweepy import OAuthHandler from tweepy.streaming import StreamListener ckey = #Enter Consumer Key here csecret = #Enter Consumer Secret Key here atoken = #Enter Access Token here asecret = #Enter Access Token Secret here class streamerSetUp(): def streamTweets(self, json_file, keywo...
35.904762
131
0.683687
from tweepy import Stream from tweepy import OAuthHandler from tweepy.streaming import StreamListener ckey = csecret = atoken = asecret = class streamerSetUp(): def streamTweets(self, json_file, keywords): listener = TwitterListener(json_file) auth = OAuthHandler(ckey, csecret) auth.se...
false
true
1c33d2f27cdf6e35e3ed2d176f1d978caa28ecf1
1,474
py
Python
dfc_pkg/commands/nginx_server/install_nginx.py
drc288/dfc
91a64a3adb1ac83fcc26d3978264fe7837fb588c
[ "MIT" ]
1
2020-08-24T17:50:32.000Z
2020-08-24T17:50:32.000Z
dfc_pkg/commands/nginx_server/install_nginx.py
drc288/dfc
91a64a3adb1ac83fcc26d3978264fe7837fb588c
[ "MIT" ]
7
2020-03-06T15:52:30.000Z
2020-03-13T00:02:13.000Z
dfc_pkg/commands/nginx_server/install_nginx.py
drc288/dfc
91a64a3adb1ac83fcc26d3978264fe7837fb588c
[ "MIT" ]
null
null
null
#!/usr/bin/python3 from colored import stylize, fg, attr import paramiko import socket import typer def install_nginx(server): """ This function install NGINX server :param ip: Ip address :param user: User to connect :param server: the connection :return: void """ try: # Updati...
39.837838
87
0.632293
from colored import stylize, fg, attr import paramiko import socket import typer def install_nginx(server): try: typer.echo(stylize("The server is being updated", fg("blue"))) server.run('sudo sed -i "s/^mesg n$/tty -s && mesg n/g" /root/.profile') server.run("sudo apt-get instal...
true
true
1c33d31a67558bb09a580f78c0ed07b8cc869caf
7,267
py
Python
nova/cells/utils.py
nelsnelson/nova
826fe1cc6af2df291d5aaafdc5d498d626475d19
[ "Apache-2.0" ]
null
null
null
nova/cells/utils.py
nelsnelson/nova
826fe1cc6af2df291d5aaafdc5d498d626475d19
[ "Apache-2.0" ]
null
null
null
nova/cells/utils.py
nelsnelson/nova
826fe1cc6af2df291d5aaafdc5d498d626475d19
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2012 Rackspace Hosting # 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 req...
33.182648
79
0.662447
import random import sys from oslo_config import cfg import six from nova import objects from nova.objects import base as obj_base PATH_CELL_SEP = '!' # an instance save. There are no illegal chars in a cell name so using the # meaningful PATH_CELL_SEP in an invalid way will need to suffice. BLOC...
true
true
1c33d3e19a8e38b624c75bc8d646ae8fb563783d
154
py
Python
hdx_exports/mailer.py
hotosm/hot-exports-two
d60530445e89b2a46bd55ea3b7c2e72409b0f493
[ "BSD-3-Clause" ]
95
2017-09-29T13:20:38.000Z
2022-03-14T06:43:47.000Z
hdx_exports/mailer.py
hotosm/hot-exports-two
d60530445e89b2a46bd55ea3b7c2e72409b0f493
[ "BSD-3-Clause" ]
229
2015-07-29T08:50:27.000Z
2017-09-21T18:05:56.000Z
hdx_exports/mailer.py
hotosm/hot-exports-two
d60530445e89b2a46bd55ea3b7c2e72409b0f493
[ "BSD-3-Clause" ]
30
2017-10-06T23:53:48.000Z
2022-03-10T06:17:07.000Z
# send to a predefined email address like a Google Group # on each successful scheduled export run. # Or report failures. class Mailer(object): pass
22
56
0.753247
class Mailer(object): pass
true
true
1c33d3f65fdbd4a7fed5e6155008227e4c2bc59c
896
py
Python
TestAgentMaps.py
jdong-sw/rbe-swarm-intelligence
7c9cae040f80c7f7f41c81b2d379d214dd0b2f30
[ "MIT" ]
null
null
null
TestAgentMaps.py
jdong-sw/rbe-swarm-intelligence
7c9cae040f80c7f7f41c81b2d379d214dd0b2f30
[ "MIT" ]
null
null
null
TestAgentMaps.py
jdong-sw/rbe-swarm-intelligence
7c9cae040f80c7f7f41c81b2d379d214dd0b2f30
[ "MIT" ]
null
null
null
from swarm_mapping.world import World import cv2 import numpy as np # Display size display_width = 800 display_height = 800 world = World(100, 100, 50, space_fill=0.4, hazard_fill=0.2, fast=False, sensor_range=3, marker_size=3) step = 0 world.step() while True: frame = world.render() ...
33.185185
96
0.677455
from swarm_mapping.world import World import cv2 import numpy as np display_width = 800 display_height = 800 world = World(100, 100, 50, space_fill=0.4, hazard_fill=0.2, fast=False, sensor_range=3, marker_size=3) step = 0 world.step() while True: frame = world.render() frame = cv2....
true
true
1c33d405658498b7efd16c4ea00bc0852497d415
10,303
py
Python
test/units/modules/network/f5/test_bigip_monitor_tcp_half_open.py
Container-Projects/ansible-provider-docs
100b695b0b0c4d8d08af362069557ffc735d0d7e
[ "PSF-2.0", "BSD-2-Clause", "MIT" ]
37
2017-08-15T15:02:43.000Z
2021-07-23T03:44:31.000Z
test/units/modules/network/f5/test_bigip_monitor_tcp_half_open.py
Container-Projects/ansible-provider-docs
100b695b0b0c4d8d08af362069557ffc735d0d7e
[ "PSF-2.0", "BSD-2-Clause", "MIT" ]
12
2018-01-10T05:25:25.000Z
2021-11-28T06:55:48.000Z
test/units/modules/network/f5/test_bigip_monitor_tcp_half_open.py
Container-Projects/ansible-provider-docs
100b695b0b0c4d8d08af362069557ffc735d0d7e
[ "PSF-2.0", "BSD-2-Clause", "MIT" ]
49
2017-08-15T09:52:13.000Z
2022-03-21T17:11:54.000Z
# -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import json import sys import pytest from nose.plugins.skip imp...
31.897833
91
0.623217
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import json import sys import pytest from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") from ansible.compat.tests import unittest fro...
true
true
1c33d43871b7029797fb7d3e58483a66e5a4d9b0
15,446
py
Python
haproxy.py
Pigueiras/collectd-haproxy
c00cf052834b11b742830a1d96865a09877ee14c
[ "MIT" ]
null
null
null
haproxy.py
Pigueiras/collectd-haproxy
c00cf052834b11b742830a1d96865a09877ee14c
[ "MIT" ]
null
null
null
haproxy.py
Pigueiras/collectd-haproxy
c00cf052834b11b742830a1d96865a09877ee14c
[ "MIT" ]
null
null
null
# haproxy-collectd-plugin - haproxy.py # # Author: Michael Leinartas # Description: This is a collectd plugin which runs under the Python plugin to # collect metrics from haproxy. # Plugin structure and logging func taken from # https://github.com/phrawzty/rabbitmq-collectd-plugin # # Modified by "Warren Turkal" <wt@si...
35.345538
120
0.614981
import cStringIO as StringIO import socket import csv import pprint import collectd PLUGIN_NAME = 'haproxy' RECV_SIZE = 1024 DEFAULT_METRICS = { 'ConnRate': ('connection_rate', 'gauge'), 'CumReq': ('requests', 'derive'), 'Idle_pct': ('idle_pct', 'gauge'), 'scur': ('session_current', 'gauge'...
true
true
1c33d6777841b1659189493027fd375b3ea627d8
2,601
py
Python
alipay/aop/api/domain/AlipayMarketingShowwindowContentSyncModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/domain/AlipayMarketingShowwindowContentSyncModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/domain/AlipayMarketingShowwindowContentSyncModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.IotDeviceInfo import IotDeviceInfo class AlipayMarketingShowwindowContentSyncModel(object): def __init__(self): self._device_info_list = None self._event_tag ...
31.337349
84
0.594002
import json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.IotDeviceInfo import IotDeviceInfo class AlipayMarketingShowwindowContentSyncModel(object): def __init__(self): self._device_info_list = None self._event_tag = None self._source = None @pro...
true
true
1c33d6f521723588d60178a1a57730551916112c
6,475
py
Python
pyod/test/test_xgbod.py
BillyGareth/pyod
4ad1ab8cd88382fe15c237e8db8ad8e3a9302eaf
[ "BSD-2-Clause" ]
2
2017-10-07T21:41:48.000Z
2017-10-08T02:51:12.000Z
pyod/test/test_xgbod.py
BillyGareth/pyod
4ad1ab8cd88382fe15c237e8db8ad8e3a9302eaf
[ "BSD-2-Clause" ]
4
2021-11-01T18:40:00.000Z
2022-03-05T19:26:48.000Z
pyod/test/test_xgbod.py
Pandinosaurus/pyod
7aeefcf65ceb0196434b7adb4fd706bfb404e4e2
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import division from __future__ import print_function import os import sys from os import path import unittest # noinspection PyProtectedMember from numpy.testing import assert_allclose from numpy.testing import assert_array_less from numpy.testing import assert_equal from num...
37.645349
81
0.638456
from __future__ import division from __future__ import print_function import os import sys from os import path import unittest from numpy.testing import assert_allclose from numpy.testing import assert_array_less from numpy.testing import assert_equal from numpy.testing import assert_raises from sklearn.metrics i...
true
true
1c33d7614c66eed168c8402bfab6770a52275af7
295
py
Python
zapcli/exceptions.py
kiwi-bop/zap-cli
55d3341622074f65af287fe07d43196a55c515f1
[ "MIT" ]
196
2015-06-22T06:23:28.000Z
2022-03-23T08:54:10.000Z
zapcli/exceptions.py
kiwi-bop/zap-cli
55d3341622074f65af287fe07d43196a55c515f1
[ "MIT" ]
89
2015-12-02T17:07:57.000Z
2022-02-03T10:20:50.000Z
zapcli/exceptions.py
kiwi-bop/zap-cli
55d3341622074f65af287fe07d43196a55c515f1
[ "MIT" ]
65
2015-12-14T16:27:59.000Z
2022-02-21T22:59:52.000Z
""" Custom exception classes for the ZAP CLI. .. moduleauthor:: Daniel Grunwell (grunny) """ class ZAPError(Exception): """ Generic exception for ZAP CLI. """ def __init__(self, message, extra=None): super(ZAPError, self).__init__(message) self.extra = extra
18.4375
47
0.644068
class ZAPError(Exception): def __init__(self, message, extra=None): super(ZAPError, self).__init__(message) self.extra = extra
true
true
1c33d78e37721057e2d7e4ee643542dccc9ac883
24,294
py
Python
lib/googlecloudsdk/third_party/apis/redis/v1/redis_v1_client.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
2
2019-11-10T09:17:07.000Z
2019-12-18T13:44:08.000Z
lib/googlecloudsdk/third_party/apis/redis/v1/redis_v1_client.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/third_party/apis/redis/v1/redis_v1_client.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
1
2020-07-25T01:40:19.000Z
2020-07-25T01:40:19.000Z
"""Generated client library for redis version v1.""" # NOTE: This file is autogenerated and should not be edited by hand. from __future__ import absolute_import from apitools.base.py import base_api from googlecloudsdk.third_party.apis.redis.v1 import redis_v1_messages as messages class RedisV1(base_api.BaseApiClie...
44.576147
615
0.705359
from __future__ import absolute_import from apitools.base.py import base_api from googlecloudsdk.third_party.apis.redis.v1 import redis_v1_messages as messages class RedisV1(base_api.BaseApiClient): MESSAGES_MODULE = messages BASE_URL = 'https://redis.googleapis.com/' MTLS_BASE_URL = 'https://redis.mtls.goo...
true
true
1c33d8356bf4ee30d7d701511d609385cbbbe06c
11,309
py
Python
tzlink/datasets/share_clef/subsets.py
lfurrer/tzlink
0fd09a4c48d73cbd51e8f1628628812a74f209a7
[ "BSD-3-Clause" ]
4
2019-11-08T10:59:08.000Z
2020-03-22T21:47:50.000Z
tzlink/datasets/share_clef/subsets.py
lfurrer/tzlink
0fd09a4c48d73cbd51e8f1628628812a74f209a7
[ "BSD-3-Clause" ]
null
null
null
tzlink/datasets/share_clef/subsets.py
lfurrer/tzlink
0fd09a4c48d73cbd51e8f1628628812a74f209a7
[ "BSD-3-Clause" ]
1
2018-11-08T15:32:12.000Z
2018-11-08T15:32:12.000Z
#!/usr/bin/env python3 # coding: utf8 # Author: Lenz Furrer, 2018 ''' Filename listings for train/dev/test and different folds. ''' import itertools as it def docs(subset): ''' Get document IDs for the given subset. ''' subdir = 'test' if subset == 'test' else 'train' return subdir, _docs(sub...
26.609412
69
0.855867
import itertools as it def docs(subset): subdir = 'test' if subset == 'test' else 'train' return subdir, _docs(subset) def _docs(subset): if subset == 'test': return _test if subset == 'dev': return _dev0 if subset == 'train': exclude = set(_dev0) ...
true
true
1c33d8788746e8e2a77ab79b938d957add5907e2
1,555
py
Python
src/doc/en/installation/conf.py
hsm207/sage
020bd59ec28717bfab9af44d2231c53da1ff99f1
[ "BSL-1.0" ]
1,742
2015-01-04T07:06:13.000Z
2022-03-30T11:32:52.000Z
src/doc/en/installation/conf.py
hsm207/sage
020bd59ec28717bfab9af44d2231c53da1ff99f1
[ "BSL-1.0" ]
66
2015-03-19T19:17:24.000Z
2022-03-16T11:59:30.000Z
src/doc/en/installation/conf.py
hsm207/sage
020bd59ec28717bfab9af44d2231c53da1ff99f1
[ "BSL-1.0" ]
495
2015-01-10T10:23:18.000Z
2022-03-24T22:06:11.000Z
# Sage Installation Guide documentation build configuration file, created by # sphinx-quickstart on Fri Aug 22 15:04:04 2008. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickleable (modul...
37.926829
82
0.758842
# that aren't pickleable (module imports are okay, they're removed automatically). # # All configuration values have a default; values that are commented out # serve to show the default. from sage.docs.conf import release from sage.docs.conf import * # NOQA # Add any paths that contain custom static files (suc...
true
true
1c33da1e2a9e8bdfae24b5cf596e950332e1ca46
1,702
py
Python
interactionviz/cli/viewer/__main__.py
rosshemsley/interactionviz
032eef47667e0748f14cd27f675cbff1a0a1bf37
[ "Apache-2.0" ]
3
2020-09-25T16:13:25.000Z
2021-08-02T01:55:31.000Z
interactionviz/cli/viewer/__main__.py
rosshemsley/interactionviz
032eef47667e0748f14cd27f675cbff1a0a1bf37
[ "Apache-2.0" ]
null
null
null
interactionviz/cli/viewer/__main__.py
rosshemsley/interactionviz
032eef47667e0748f14cd27f675cbff1a0a1bf37
[ "Apache-2.0" ]
null
null
null
import os import pathlib import click from interactionviz.maps import load_map_xml from interactionviz.viewers import ArcadeViewer, WebViewer from interactionviz.tracks import Tracks, load_tracks_files @click.command() @click.option( "--root-dir", required=True, type=click.Path(exists=True, dir_okay=True...
28.847458
82
0.70329
import os import pathlib import click from interactionviz.maps import load_map_xml from interactionviz.viewers import ArcadeViewer, WebViewer from interactionviz.tracks import Tracks, load_tracks_files @click.command() @click.option( "--root-dir", required=True, type=click.Path(exists=True, dir_okay=True...
true
true
1c33da2275a63031e8cbd04fb6ca5bcda2e1d791
33,432
py
Python
pyzoo/zoo/tfpark/tf_optimizer.py
Asjidkalam/analytics-zoo
0afa8437abc3e5cf5289d2cfde68b237a45f9d0d
[ "Apache-2.0" ]
null
null
null
pyzoo/zoo/tfpark/tf_optimizer.py
Asjidkalam/analytics-zoo
0afa8437abc3e5cf5289d2cfde68b237a45f9d0d
[ "Apache-2.0" ]
1
2021-01-20T15:41:01.000Z
2021-01-20T15:41:01.000Z
pyzoo/zoo/tfpark/tf_optimizer.py
Asjidkalam/analytics-zoo
0afa8437abc3e5cf5289d2cfde68b237a45f9d0d
[ "Apache-2.0" ]
1
2020-12-21T11:48:49.000Z
2020-12-21T11:48:49.000Z
# # Copyright 2018 Analytics Zoo 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...
43.53125
100
0.604451
import json import logging import os import sys import tempfile from bigdl.nn.criterion import Criterion from bigdl.nn.layer import Layer from bigdl.optim.optimizer import MaxEpoch, EveryEpoch from bigdl.util.common import to_list, JavaValue from zoo.common.utils import callZooFunc from zoo.pipeline.a...
true
true
1c33da407ad99283d1a971061d91d579fea47eb8
1,831
py
Python
src/101_createIndex.py
hp-db/dev
de0924f791534f554120c6eb74f0409b5b3dc39a
[ "Apache-2.0" ]
null
null
null
src/101_createIndex.py
hp-db/dev
de0924f791534f554120c6eb74f0409b5b3dc39a
[ "Apache-2.0" ]
null
null
null
src/101_createIndex.py
hp-db/dev
de0924f791534f554120c6eb74f0409b5b3dc39a
[ "Apache-2.0" ]
null
null
null
import pandas as pd from rdflib import URIRef, BNode, Literal, Graph from rdflib.namespace import RDF, RDFS, FOAF, XSD from rdflib import Namespace import numpy as np import math import sys import argparse import json import urllib.parse path = "../static/data/curation_old.json" json_open = open(path, 'r') df = json....
24.413333
154
0.602403
import pandas as pd from rdflib import URIRef, BNode, Literal, Graph from rdflib.namespace import RDF, RDFS, FOAF, XSD from rdflib import Namespace import numpy as np import math import sys import argparse import json import urllib.parse path = "../static/data/curation_old.json" json_open = open(path, 'r') df = json....
true
true
1c33dae046d778c2acefa8efab3c4ae7565e1bc3
348
py
Python
spark_work.py
nszceta/spark-python-celery-demo
c5b03be4bb96699f8e41aa8a42fecd4c25c76331
[ "MIT" ]
8
2016-01-19T15:59:36.000Z
2018-04-25T09:00:57.000Z
spark_work.py
nszceta/spark-python-celery-demo
c5b03be4bb96699f8e41aa8a42fecd4c25c76331
[ "MIT" ]
null
null
null
spark_work.py
nszceta/spark-python-celery-demo
c5b03be4bb96699f8e41aa8a42fecd4c25c76331
[ "MIT" ]
null
null
null
import sys from pyspark import SparkContext import json print('spark got python path -> ' + str(sys.executable)) logfile = sys.argv[1] sc = SparkContext() logdata = sc.textFile(logfile).cache() a_count = logdata.filter(lambda s: 'a' in s).count() b_count = logdata.filter(lambda s: 'b' in s).count() print(json.dumps({'a...
31.636364
56
0.70977
import sys from pyspark import SparkContext import json print('spark got python path -> ' + str(sys.executable)) logfile = sys.argv[1] sc = SparkContext() logdata = sc.textFile(logfile).cache() a_count = logdata.filter(lambda s: 'a' in s).count() b_count = logdata.filter(lambda s: 'b' in s).count() print(json.dumps({'a...
true
true
1c33dcbe1bba058258275b69fcc8e6ef20067d3a
18,583
py
Python
pypowervm/tests/test_util.py
stephenfin/pypowervm
68f2b586b4f17489f379534ab52fc56a524b6da5
[ "Apache-2.0" ]
24
2015-12-02T19:49:45.000Z
2021-11-17T11:43:51.000Z
pypowervm/tests/test_util.py
stephenfin/pypowervm
68f2b586b4f17489f379534ab52fc56a524b6da5
[ "Apache-2.0" ]
18
2017-03-01T05:54:25.000Z
2022-03-14T17:32:47.000Z
pypowervm/tests/test_util.py
stephenfin/pypowervm
68f2b586b4f17489f379534ab52fc56a524b6da5
[ "Apache-2.0" ]
17
2016-02-10T22:53:04.000Z
2021-11-10T09:47:10.000Z
# Copyright 2014, 2016 IBM Corp. # # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
46.111663
79
0.617715
import mock import six import unittest from pypowervm import const from pypowervm import util if six.PY2: import __builtin__ as builtins elif six.PY3: import builtins dummyuuid1 = "abcdef01-2345-2345-2345-67890abcdef0" dummyuuid2 = "67890abc-5432-5432-5432-def0abcdef01" class TestUtil(unit...
true
true
1c33dcfd0c06b3215bcbfd696803bb148de2d0f7
1,780
py
Python
src/logChunk/allRunn.py
saledouble/gitcproc
009d614fa1a56dc75acb0277ecc98ea27e91750b
[ "BSD-3-Clause" ]
null
null
null
src/logChunk/allRunn.py
saledouble/gitcproc
009d614fa1a56dc75acb0277ecc98ea27e91750b
[ "BSD-3-Clause" ]
3
2020-11-12T14:42:22.000Z
2021-01-13T22:30:23.000Z
src/logChunk/allRunn.py
saledouble/gitcproc
009d614fa1a56dc75acb0277ecc98ea27e91750b
[ "BSD-3-Clause" ]
2
2020-11-11T22:27:28.000Z
2021-01-13T21:07:14.000Z
#get the path of directory in which project directories are there. Assume dirsPath #rootdir ='C:\Users\Yagnik\PycharmProjects\Top_Project' import os import sys import ghProc from logChunk import logChunk #print os.listdir(rootdir) # for subdir, dirs, files in os.walk(rootdir): # print dirs def main(): prin...
30.689655
197
0.723034
import os import sys import ghProc from logChunk import logChunk def main(): print("Utility to BULK process github logs") if len(sys.argv) < 2: print("!!! Usage: python allRun.py top_project directory") sys.exit() if not os.path.isdir("../Results"): os.mkdir("../Results") fPtrCha...
true
true
1c33dd43e5aac4729f3611201fbd0862be806dae
625
py
Python
answer.py
ZYSzys/Answer-Assistant
efff7d2949d12f27b7d99cfa0e35f32757cbc8ad
[ "MIT" ]
2
2018-04-17T09:42:41.000Z
2018-04-17T09:57:35.000Z
answer.py
ZYSzys/Answer-Assistant
efff7d2949d12f27b7d99cfa0e35f32757cbc8ad
[ "MIT" ]
null
null
null
answer.py
ZYSzys/Answer-Assistant
efff7d2949d12f27b7d99cfa0e35f32757cbc8ad
[ "MIT" ]
null
null
null
#-*- coding: utf-8 -*- import wda import webbrowser import urllib.parse from PIL import Image from configparser import ConfigParser from ocr import ocr_img def search(question): webbrowser.open('https://baidu.com/s?wd='+urllib.parse.quote(question)) if __name__ == '__main__': c = wda.Client() config = ConfigPa...
16.891892
72
0.688
import wda import webbrowser import urllib.parse from PIL import Image from configparser import ConfigParser from ocr import ocr_img def search(question): webbrowser.open('https://baidu.com/s?wd='+urllib.parse.quote(question)) if __name__ == '__main__': c = wda.Client() config = ConfigParser() config.read('....
true
true
1c33ddbb2adf6a132487ca1c86cebd1d85abf5e7
16,094
py
Python
crabmeyerpy/ssc.py
tunbehaun273/crabmeyerpy
d36fe3ed9b8591bb92bd9915996dd21d79fc4dad
[ "BSD-3-Clause" ]
null
null
null
crabmeyerpy/ssc.py
tunbehaun273/crabmeyerpy
d36fe3ed9b8591bb92bd9915996dd21d79fc4dad
[ "BSD-3-Clause" ]
null
null
null
crabmeyerpy/ssc.py
tunbehaun273/crabmeyerpy
d36fe3ed9b8591bb92bd9915996dd21d79fc4dad
[ "BSD-3-Clause" ]
2
2021-06-24T10:53:48.000Z
2021-11-03T13:25:15.000Z
import yaml from scipy.special import kv # Bessel function from scipy.integrate import simps from scipy.interpolate import interp1d # imports to speed up integrations: from numpy import meshgrid, linspace, ones, zeros from numpy import log, exp, pi, sqrt, power, tan # import functions for photon fields from .photonf...
32.64503
118
0.555859
import yaml from scipy.special import kv from scipy.integrate import simps from scipy.interpolate import interp1d from numpy import meshgrid, linspace, ones, zeros from numpy import log, exp, pi, sqrt, power, tan from .photonfields import * from astropy import units as u from astropy import constants as c from as...
true
true
1c33ddc36f8de434473a62f0e05259e807d0838e
743
py
Python
bodyhands/utils/extend_utils_boxes.py
cvlab-stonybrook/BodyHands
dcfe470f6fd31a048d4d17d4ae9a2a524538b380
[ "MIT" ]
1
2022-03-06T08:18:33.000Z
2022-03-06T08:18:33.000Z
bodyhands/utils/extend_utils_boxes.py
cvlab-stonybrook/BodyHands
dcfe470f6fd31a048d4d17d4ae9a2a524538b380
[ "MIT" ]
null
null
null
bodyhands/utils/extend_utils_boxes.py
cvlab-stonybrook/BodyHands
dcfe470f6fd31a048d4d17d4ae9a2a524538b380
[ "MIT" ]
null
null
null
import torch from detectron2.structures import Boxes def pairwise_intersection(boxes1: Boxes, boxes2: Boxes) -> torch.Tensor: boxes1, boxes2 = boxes1.tensor, boxes2.tensor width_height = torch.min(boxes1[:, None, 2:], boxes2[:, 2:]) - torch.max( boxes1[:, None, :2], boxes2[:, :2] ) # [N,M,2] ...
30.958333
88
0.648721
import torch from detectron2.structures import Boxes def pairwise_intersection(boxes1: Boxes, boxes2: Boxes) -> torch.Tensor: boxes1, boxes2 = boxes1.tensor, boxes2.tensor width_height = torch.min(boxes1[:, None, 2:], boxes2[:, 2:]) - torch.max( boxes1[:, None, :2], boxes2[:, :2] ) width_he...
true
true
1c33ddd6685c5cb98b0629eb5a2a360c0975d34b
12,044
py
Python
pyscf/lo/orth.py
maxscheurer/pyscf
162c37942289c0aec70e70ba1ea98ade3ec34da5
[ "Apache-2.0" ]
null
null
null
pyscf/lo/orth.py
maxscheurer/pyscf
162c37942289c0aec70e70ba1ea98ade3ec34da5
[ "Apache-2.0" ]
null
null
null
pyscf/lo/orth.py
maxscheurer/pyscf
162c37942289c0aec70e70ba1ea98ade3ec34da5
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2014-2020 The PySCF Developers. 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 # # U...
36.607903
103
0.583112
from functools import reduce import numpy import scipy.linalg from pyscf.lib import param from pyscf.lib import logger from pyscf import gto from pyscf import __config__ REF_BASIS = getattr(__config__, 'lo_orth_pre_orth_ao_method', 'ANO') ORTH_METHOD = getattr(__config__, 'lo_orth_orth_ao_method', 'm...
true
true
1c33de508aa72facefdf67a50a6c86af3d232f08
17,427
py
Python
ttlock2mqtt/src/ttlock_adapter.py
tonyldo/tonyldo-hassio-addons
3005df8cd58d178bc0452d944d3498820eeacee9
[ "Apache-2.0" ]
6
2020-07-30T08:50:20.000Z
2022-03-01T02:56:53.000Z
ttlock2mqtt/src/ttlock_adapter.py
tonyldo/tonyldo-hassio-addons
3005df8cd58d178bc0452d944d3498820eeacee9
[ "Apache-2.0" ]
10
2020-07-28T17:28:52.000Z
2022-01-10T20:28:16.000Z
ttlock2mqtt/src/ttlock_adapter.py
tonyldo/tonyldo-hassio-addons
3005df8cd58d178bc0452d944d3498820eeacee9
[ "Apache-2.0" ]
9
2020-07-28T17:19:42.000Z
2021-12-18T05:18:56.000Z
import paho.mqtt.client as mqtt import time import threading import concurrent.futures import getopt import sys import logging from ttlockwrapper import TTLock, TTlockAPIError, constants class TTLock2MQTTClient(mqtt.Client): def __init__(self, ttlock, broker, port, broker_user, broker_pass, keepalive): su...
43.5675
321
0.643369
import paho.mqtt.client as mqtt import time import threading import concurrent.futures import getopt import sys import logging from ttlockwrapper import TTLock, TTlockAPIError, constants class TTLock2MQTTClient(mqtt.Client): def __init__(self, ttlock, broker, port, broker_user, broker_pass, keepalive): su...
true
true
1c33e0a5b5b73fab447359be446c4ac32de31484
15,297
py
Python
src/m2_more_sequences.py
kellyzc/16-SequencesAndMutation
92a73f059c85f677ffe497ccef29f613f7172eea
[ "MIT" ]
null
null
null
src/m2_more_sequences.py
kellyzc/16-SequencesAndMutation
92a73f059c85f677ffe497ccef29f613f7172eea
[ "MIT" ]
null
null
null
src/m2_more_sequences.py
kellyzc/16-SequencesAndMutation
92a73f059c85f677ffe497ccef29f613f7172eea
[ "MIT" ]
null
null
null
""" This module lets you practice various patterns for ITERATING through SEQUENCES, including selections from: -- Beginning to end -- Other ranges (e.g., backwards and every-3rd-item) -- The COUNT/SUM/etc pattern -- The FIND pattern (via LINEAR SEARCH) -- The MAX/MIN pattern -- Looking two places in the seq...
37.218978
77
0.541217
def main(): run_test_shortest_string() run_test_index_of_largest_number() run_test_number_of_stutters() run_test_is_palindrome() run_test_count_same() def run_test_shortest_string(): print() print('--------------------------------------------------') print('Testing the shortes...
true
true
1c33e1cecd6c05dc0a9806ea1b1352fc1333bd65
1,620
py
Python
test/vpp_bond_interface.py
quantonium/vpp
57612ebcf3b5414c6a2f6153a3338803ac94d759
[ "Apache-2.0" ]
null
null
null
test/vpp_bond_interface.py
quantonium/vpp
57612ebcf3b5414c6a2f6153a3338803ac94d759
[ "Apache-2.0" ]
null
null
null
test/vpp_bond_interface.py
quantonium/vpp
57612ebcf3b5414c6a2f6153a3338803ac94d759
[ "Apache-2.0" ]
null
null
null
from vpp_object import VppObject from vpp_interface import VppInterface class VppBondInterface(VppInterface): """VPP bond interface.""" def __init__(self, test, mode, lb=0, use_custom_mac=0, mac_address=''): """ Create VPP Bond interface """ self._test = test self.mo...
33.061224
59
0.52037
from vpp_object import VppObject from vpp_interface import VppInterface class VppBondInterface(VppInterface): def __init__(self, test, mode, lb=0, use_custom_mac=0, mac_address=''): self._test = test self.mode = mode self.lb = lb self.use_custom_mac = use_custom_...
true
true
1c33e23b40cc904d68669a94274e02ca7608984f
6,240
py
Python
dvc/repo/reproduce.py
sahilbhosale63/dvc
999c9e188801f971b75f51ca84f5bad533cb462c
[ "Apache-2.0" ]
null
null
null
dvc/repo/reproduce.py
sahilbhosale63/dvc
999c9e188801f971b75f51ca84f5bad533cb462c
[ "Apache-2.0" ]
null
null
null
dvc/repo/reproduce.py
sahilbhosale63/dvc
999c9e188801f971b75f51ca84f5bad533cb462c
[ "Apache-2.0" ]
null
null
null
import logging from dvc.exceptions import InvalidArgumentError, ReproductionError from dvc.repo.scm_context import scm_context from . import locked from .graph import get_pipeline, get_pipelines logger = logging.getLogger(__name__) def _reproduce_stage(stage, **kwargs): if stage.frozen and not stage.is_import:...
33.191489
79
0.55609
import logging from dvc.exceptions import InvalidArgumentError, ReproductionError from dvc.repo.scm_context import scm_context from . import locked from .graph import get_pipeline, get_pipelines logger = logging.getLogger(__name__) def _reproduce_stage(stage, **kwargs): if stage.frozen and not stage.is_import:...
true
true
1c33e23fa22cebfd129075adb7e71157f71612ea
344
py
Python
runtests.py
gasman/wagtailmodelchooser
1aef9c0f3589d9ad81fe04dadeacc90a27e315d8
[ "BSD-2-Clause" ]
49
2019-03-01T15:50:32.000Z
2022-03-01T10:47:57.000Z
runtests.py
gasman/wagtailmodelchooser
1aef9c0f3589d9ad81fe04dadeacc90a27e315d8
[ "BSD-2-Clause" ]
15
2019-08-08T11:47:27.000Z
2022-02-15T06:18:48.000Z
runtests.py
gasman/wagtailmodelchooser
1aef9c0f3589d9ad81fe04dadeacc90a27e315d8
[ "BSD-2-Clause" ]
18
2019-03-11T19:30:49.000Z
2022-03-02T13:07:13.000Z
#!/usr/bin/env python import os import sys def run(): from django.core.management import execute_from_command_line os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings' os.environ.setdefault('DATABASE_NAME', ':memory:') execute_from_command_line([sys.argv[0], 'test'] + sys.argv[1:]) if __name__ =...
21.5
67
0.700581
import os import sys def run(): from django.core.management import execute_from_command_line os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings' os.environ.setdefault('DATABASE_NAME', ':memory:') execute_from_command_line([sys.argv[0], 'test'] + sys.argv[1:]) if __name__ == '__main__': run...
true
true
1c33e355dcc8c83d9ee4fe92e664f027b881475a
578
py
Python
pluto/finance/commission/models.py
chalant/pluto
e7bfd35a2c1fc0e0753bd2f840b0a4385b5124fc
[ "Apache-2.0" ]
null
null
null
pluto/finance/commission/models.py
chalant/pluto
e7bfd35a2c1fc0e0753bd2f840b0a4385b5124fc
[ "Apache-2.0" ]
null
null
null
pluto/finance/commission/models.py
chalant/pluto
e7bfd35a2c1fc0e0753bd2f840b0a4385b5124fc
[ "Apache-2.0" ]
null
null
null
class CommissionModels(object): def __init__(self, commissions_setup): self._models = commissions_setup def get_commission_model(self, asset_type, exchange): return self._models[asset_type][exchange] def __repr__(self): return repr(self._models) def __str__(self): retu...
27.52381
63
0.704152
class CommissionModels(object): def __init__(self, commissions_setup): self._models = commissions_setup def get_commission_model(self, asset_type, exchange): return self._models[asset_type][exchange] def __repr__(self): return repr(self._models) def __str__(self): retu...
true
true
1c33e372b310eff0d626ed6cbbbea55bcce490bb
6,035
py
Python
grr/client/grr_response_client/client_stats.py
dekoder/grr
27ba38dc0f5ad4f3e0cdbfb146a0a789e3b0d27b
[ "Apache-2.0" ]
3
2018-09-30T01:31:29.000Z
2019-04-22T11:44:54.000Z
grr/client/grr_response_client/client_stats.py
tomchop/grr
27ba38dc0f5ad4f3e0cdbfb146a0a789e3b0d27b
[ "Apache-2.0" ]
1
2022-03-02T09:58:05.000Z
2022-03-02T09:58:05.000Z
grr/client/grr_response_client/client_stats.py
tomchop/grr
27ba38dc0f5ad4f3e0cdbfb146a0a789e3b0d27b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """CPU/IO stats collector.""" from __future__ import unicode_literals import threading import time import psutil from grr_response_client.client_actions import admin from grr_response_core.lib import rdfvalue from grr_response_core.lib import stats from grr_response_core.lib.rdfvalues import cl...
34.289773
80
0.72792
from __future__ import unicode_literals import threading import time import psutil from grr_response_client.client_actions import admin from grr_response_core.lib import rdfvalue from grr_response_core.lib import stats from grr_response_core.lib.rdfvalues import client_action as rdf_client_action from grr_response_...
true
true
1c33e3bca8133ca52ee4a9c179c8779b0c8dd328
2,087
py
Python
examples/ExGroup.py
janjusti/dcma
4403b176f33967d446275ee35422ec31236ce7a6
[ "MIT" ]
null
null
null
examples/ExGroup.py
janjusti/dcma
4403b176f33967d446275ee35422ec31236ce7a6
[ "MIT" ]
null
null
null
examples/ExGroup.py
janjusti/dcma
4403b176f33967d446275ee35422ec31236ce7a6
[ "MIT" ]
null
null
null
from Bio import Entrez, AlignIO, SeqIO from Bio.Align import AlignInfo from Bio.SeqRecord import SeqRecord from Bio.Align.Applications import MuscleCommandline import dcma.core as solver import time def generate_fasta_from_ids(id_list, fasta_output): Entrez.email = 'example@example.com' f = open(fasta_output, ...
35.982759
87
0.698131
from Bio import Entrez, AlignIO, SeqIO from Bio.Align import AlignInfo from Bio.SeqRecord import SeqRecord from Bio.Align.Applications import MuscleCommandline import dcma.core as solver import time def generate_fasta_from_ids(id_list, fasta_output): Entrez.email = 'example@example.com' f = open(fasta_output, ...
true
true
1c33e502e953fb501cea4f12595b4840aca73557
1,156
py
Python
.modules/.recon-ng/modules/recon/hosts-domains/migrate_hosts.py
termux-one/EasY_HaCk
0a8d09ca4b126b027b6842e02fa0c29d8250e090
[ "Apache-2.0" ]
1,103
2018-04-20T14:08:11.000Z
2022-03-29T06:22:43.000Z
.modules/.recon-ng/modules/recon/hosts-domains/migrate_hosts.py
sshourya948/EasY_HaCk
0a8d09ca4b126b027b6842e02fa0c29d8250e090
[ "Apache-2.0" ]
29
2019-04-03T14:52:38.000Z
2022-03-24T12:33:05.000Z
.modules/.recon-ng/modules/recon/hosts-domains/migrate_hosts.py
sshourya948/EasY_HaCk
0a8d09ca4b126b027b6842e02fa0c29d8250e090
[ "Apache-2.0" ]
161
2018-04-20T15:57:12.000Z
2022-03-15T19:16:16.000Z
from recon.core.module import BaseModule import os import re class Module(BaseModule): meta = { 'name': 'Hosts to Domains Data Migrator', 'author': 'Tim Tomes (@LaNMaSteR53)', 'description': 'Adds a new domain for all the hostnames stored in the \'hosts\' table.', 'comments': ( ...
42.814815
202
0.622837
from recon.core.module import BaseModule import os import re class Module(BaseModule): meta = { 'name': 'Hosts to Domains Data Migrator', 'author': 'Tim Tomes (@LaNMaSteR53)', 'description': 'Adds a new domain for all the hostnames stored in the \'hosts\' table.', 'comments': ( ...
true
true
1c33e56e472ec7115c80b8127bbef8760db518c3
5,466
py
Python
codes/singintex.py
Hadrien-Montanelli/singintpy
1706afe42d0cc6e0f3c53759d489f7209e50ef29
[ "MIT" ]
null
null
null
codes/singintex.py
Hadrien-Montanelli/singintpy
1706afe42d0cc6e0f3c53759d489f7209e50ef29
[ "MIT" ]
null
null
null
codes/singintex.py
Hadrien-Montanelli/singintpy
1706afe42d0cc6e0f3c53759d489f7209e50ef29
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Jun 28 19:24:38 2021 Copyright 2021 by Hadrien Montanelli. """ def singintex(u0, v0, dz0): """ # Outputs the exact value (computed in Mathematica) of the singular and # near-singular integrals used in the numerical experiments of [1, Sec. 4]...
43.728
80
0.526528
def singintex(u0, v0, dz0): if (u0 == .2) and (v0 == .4) and (dz0 == 0): Iex = 3.240017458404107 if (u0 == .2) and (v0 == .4) and (dz0 == 1e-4): Iex = 3.239493851850319 if (u0 == .2) and (v0 == .4) and (dz0 == 1e-3): Iex = 3.234785969247374 if (u0 == .2) and (v0 == .4) ...
true
true
1c33e63b7914a838eed8ad9be6312285010e66b4
3,013
py
Python
src/dsgrn_net_gen/makejobs.py
breecummins/dsgrn_net_gen
bcd77b71ad3e311d2906f0af986559d2c54ffe6d
[ "MIT" ]
1
2020-03-31T18:44:06.000Z
2020-03-31T18:44:06.000Z
src/dsgrn_net_gen/makejobs.py
breecummins/dsgrn_net_gen
bcd77b71ad3e311d2906f0af986559d2c54ffe6d
[ "MIT" ]
null
null
null
src/dsgrn_net_gen/makejobs.py
breecummins/dsgrn_net_gen
bcd77b71ad3e311d2906f0af986559d2c54ffe6d
[ "MIT" ]
null
null
null
import dsgrn_net_gen.networksearch as networksearch import dsgrn_net_gen.fileparsers as fileparsers import subprocess, os, json, shutil, ast, sys, time class Job(): def __init__(self,paramfile): self.paramfile = paramfile self.params = json.load(open(paramfile)) # use datetime as unique i...
41.847222
122
0.615002
import dsgrn_net_gen.networksearch as networksearch import dsgrn_net_gen.fileparsers as fileparsers import subprocess, os, json, shutil, ast, sys, time class Job(): def __init__(self,paramfile): self.paramfile = paramfile self.params = json.load(open(paramfile)) if "datetime" not...
true
true
1c33e67d7a8d75efca51a7f3cd2d594c96a6efdf
1,279
py
Python
quad_garl/garl.py
kanishkaganguly/QuadGARL
2e995861cab98d9623dd36155cb472dcb4e21cd0
[ "MIT" ]
1
2019-02-08T06:17:34.000Z
2019-02-08T06:17:34.000Z
quad_garl/garl.py
kanishkaganguly/QuadGARL
2e995861cab98d9623dd36155cb472dcb4e21cd0
[ "MIT" ]
null
null
null
quad_garl/garl.py
kanishkaganguly/QuadGARL
2e995861cab98d9623dd36155cb472dcb4e21cd0
[ "MIT" ]
null
null
null
from typing import List from quad_garl import quad_utils from quad_garl.garl_utils import GARLUtils from quad_garl.genetic_algorithm import GeneticAlgorithm from quad_garl.quad_simulator import Quadcopter from quad_garl.reinforcement_learning import ReinforcementLearning def main(): # Variables chromosome_si...
26.645833
96
0.677873
from typing import List from quad_garl import quad_utils from quad_garl.garl_utils import GARLUtils from quad_garl.genetic_algorithm import GeneticAlgorithm from quad_garl.quad_simulator import Quadcopter from quad_garl.reinforcement_learning import ReinforcementLearning def main(): chromosome_size = 10 ...
true
true
1c33e6e12dcd7bb838f2c7f2077f8cc747f84551
13,234
py
Python
tests/plugins/db2_test.py
flyingbarron/detect-secrets
5f9887179794ce037d97c1b343623eb5937ce800
[ "Apache-2.0" ]
null
null
null
tests/plugins/db2_test.py
flyingbarron/detect-secrets
5f9887179794ce037d97c1b343623eb5937ce800
[ "Apache-2.0" ]
null
null
null
tests/plugins/db2_test.py
flyingbarron/detect-secrets
5f9887179794ce037d97c1b343623eb5937ce800
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import import textwrap import pytest from mock import MagicMock from mock import patch from detect_secrets.core.constants import VerifiedResult from detect_secrets.core.potential_secret import PotentialSecret from detect_secrets.plugins.db2 import Db2Detector from detect_secrets.plugi...
37.070028
95
0.584328
from __future__ import absolute_import import textwrap import pytest from mock import MagicMock from mock import patch from detect_secrets.core.constants import VerifiedResult from detect_secrets.core.potential_secret import PotentialSecret from detect_secrets.plugins.db2 import Db2Detector from detect_secrets.plugi...
true
true
1c33e6f6a138884a527d0ffde240901b01d5617b
6,981
py
Python
tests/app/api_v0/test_revisions.py
xwu64/server
d358db21db4a8faf33a3681fc499aeea07e9784b
[ "BSD-3-Clause" ]
null
null
null
tests/app/api_v0/test_revisions.py
xwu64/server
d358db21db4a8faf33a3681fc499aeea07e9784b
[ "BSD-3-Clause" ]
null
null
null
tests/app/api_v0/test_revisions.py
xwu64/server
d358db21db4a8faf33a3681fc499aeea07e9784b
[ "BSD-3-Clause" ]
null
null
null
# TODO: split E2E test to unit test import pytest from starlette.testclient import TestClient from tests.fixtures.mock_service import MockUserService __all__ = ["test_person_revisions_basic", "test_person_revisions_offset", "test_person_revisions_offset_limit", "test_character_revisi...
29.0875
88
0.664661
import pytest from starlette.testclient import TestClient from tests.fixtures.mock_service import MockUserService __all__ = ["test_person_revisions_basic", "test_person_revisions_offset", "test_person_revisions_offset_limit", "test_character_revisions_basic", "test_charac...
true
true
1c33e80294a94d85a9edbb95747f6f5c2e32304a
1,387
py
Python
python/ecs/fargate-load-balanced-service/app.py
samtwil/aws-cdk-examples
a0ca373be2bd4e82f888f903fdb7c57d36d5537f
[ "Apache-2.0" ]
null
null
null
python/ecs/fargate-load-balanced-service/app.py
samtwil/aws-cdk-examples
a0ca373be2bd4e82f888f903fdb7c57d36d5537f
[ "Apache-2.0" ]
null
null
null
python/ecs/fargate-load-balanced-service/app.py
samtwil/aws-cdk-examples
a0ca373be2bd4e82f888f903fdb7c57d36d5537f
[ "Apache-2.0" ]
null
null
null
from aws_cdk import ( aws_autoscaling as autoscaling, aws_ec2 as ec2, aws_ecs as ecs, aws_ecs_patterns as ecs_patterns, App, CfnOutput, Stack ) from constructs import Construct class BonjourFargate(Stack): def __init__(self, scope: Construct, id: str, **kwargs) -> None: super().__init...
27.74
82
0.617159
from aws_cdk import ( aws_autoscaling as autoscaling, aws_ec2 as ec2, aws_ecs as ecs, aws_ecs_patterns as ecs_patterns, App, CfnOutput, Stack ) from constructs import Construct class BonjourFargate(Stack): def __init__(self, scope: Construct, id: str, **kwargs) -> None: super().__init...
true
true
1c33eb22ed93e91c820b6bf40b6fff5c184acf47
1,225
py
Python
tests/core/extraction/test_mapping_analyzer.py
ymoch/preacher
ae68170d14c72791884e91b20054bd13a79b52d0
[ "MIT" ]
3
2019-08-01T03:14:49.000Z
2020-01-31T08:55:22.000Z
tests/core/extraction/test_mapping_analyzer.py
ymoch/preacher
ae68170d14c72791884e91b20054bd13a79b52d0
[ "MIT" ]
353
2019-04-14T14:53:28.000Z
2022-03-11T03:26:08.000Z
tests/core/extraction/test_mapping_analyzer.py
ymoch/preacher
ae68170d14c72791884e91b20054bd13a79b52d0
[ "MIT" ]
1
2020-08-01T06:23:08.000Z
2020-08-01T06:23:08.000Z
from dataclasses import dataclass from datetime import datetime, timezone from typing import Mapping from unittest.mock import sentinel from lxml.etree import _Element as Element from pytest import raises from preacher.core.extraction.analysis import MappingAnalyzer from preacher.core.extraction.error import Extracti...
26.06383
78
0.713469
from dataclasses import dataclass from datetime import datetime, timezone from typing import Mapping from unittest.mock import sentinel from lxml.etree import _Element as Element from pytest import raises from preacher.core.extraction.analysis import MappingAnalyzer from preacher.core.extraction.error import Extracti...
true
true
1c33ebd38ae22627863e394b94ce67736dfeaaf2
927
py
Python
users/migrations/0011_auto_20210412_1908.py
msking18/minor
17cffab95b5dc1705a131a1ef66ff7f47837de64
[ "MIT" ]
3
2021-03-22T10:39:18.000Z
2021-04-30T10:29:37.000Z
users/migrations/0011_auto_20210412_1908.py
msking18/minor
17cffab95b5dc1705a131a1ef66ff7f47837de64
[ "MIT" ]
1
2021-04-16T06:54:10.000Z
2021-04-16T06:54:10.000Z
users/migrations/0011_auto_20210412_1908.py
msking18/minor
17cffab95b5dc1705a131a1ef66ff7f47837de64
[ "MIT" ]
3
2021-03-11T10:02:37.000Z
2021-04-23T07:34:10.000Z
# Generated by Django 3.1.6 on 2021-04-12 13:38 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0010_remove_profile_date_of_birth'), ] operations = [ migrations.AddField( model_name='profile', name='bran...
27.264706
72
0.567422
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0010_remove_profile_date_of_birth'), ] operations = [ migrations.AddField( model_name='profile', name='branch', field=models.CharField(default...
true
true
1c33ee1592f2be0a3d6959054ddbc20841c3550a
2,584
py
Python
base.py
sosterbind/hexaRanger
a0b888061af4858c78962ed8c0154531f00e8455
[ "MIT" ]
null
null
null
base.py
sosterbind/hexaRanger
a0b888061af4858c78962ed8c0154531f00e8455
[ "MIT" ]
null
null
null
base.py
sosterbind/hexaRanger
a0b888061af4858c78962ed8c0154531f00e8455
[ "MIT" ]
null
null
null
from typing import ( Optional, List, Tuple, Dict, ) from abc import ( ABC, abstractmethod, ) class StoreClient(ABC): __slots__ = () @classmethod @abstractmethod def query_range_count( cls, start_key: Optional[str] = None, stop_key: Optional[str] = None,...
23.279279
72
0.629257
from typing import ( Optional, List, Tuple, Dict, ) from abc import ( ABC, abstractmethod, ) class StoreClient(ABC): __slots__ = () @classmethod @abstractmethod def query_range_count( cls, start_key: Optional[str] = None, stop_key: Optional[str] = None,...
true
true
1c33ef9ee86a9ecba33247c529a8b2b9daa28e69
532
py
Python
Mundo1/des33.py
julimoraislima/Python-CursoEmVideo
d21b0485d2f5767039d819cf743255dfd0f27b18
[ "MIT" ]
2
2021-01-05T12:31:00.000Z
2021-03-20T00:31:18.000Z
Mundo1/des33.py
julimoraislima/Python-CursoEmVideo
d21b0485d2f5767039d819cf743255dfd0f27b18
[ "MIT" ]
null
null
null
Mundo1/des33.py
julimoraislima/Python-CursoEmVideo
d21b0485d2f5767039d819cf743255dfd0f27b18
[ "MIT" ]
1
2020-12-28T22:56:10.000Z
2020-12-28T22:56:10.000Z
#desafio 33: Maior e Menor. Programa lê 3 valores, e retorna o maior e o menor valor. #1-maneira simplificada usando uma lista[]. primeiro = int(input('Digite o primeiro valor inteiro: ')) segundo = int(input('Digite o segundo valor inteiro: ')) terceiro = int(input('Digite o terceiro valor inteiro: ')) numeros = [pri...
38
85
0.708647
primeiro = int(input('Digite o primeiro valor inteiro: ')) segundo = int(input('Digite o segundo valor inteiro: ')) terceiro = int(input('Digite o terceiro valor inteiro: ')) numeros = [primeiro, segundo, terceiro] print('-+-'*20) print(f'O \33[31mmaior\33[m valor digitado foi \33[31m{max(numeros)}\33[m') print(f'O ...
true
true
1c33f01fc1c0b21826cb0fe8d7917484a3137ed5
560
py
Python
scripts/mv_rednet.py
albert-yue/objectnav
95ce9bc2c1d953887275e8d9809a506aeb5682fb
[ "MIT", "Unlicense" ]
15
2021-04-12T04:36:14.000Z
2022-03-20T04:16:36.000Z
scripts/mv_rednet.py
albert-yue/objectnav
95ce9bc2c1d953887275e8d9809a506aeb5682fb
[ "MIT", "Unlicense" ]
4
2021-07-12T18:14:08.000Z
2021-11-11T13:44:34.000Z
scripts/mv_rednet.py
albert-yue/objectnav
95ce9bc2c1d953887275e8d9809a506aeb5682fb
[ "MIT", "Unlicense" ]
10
2021-06-23T23:14:16.000Z
2022-03-20T07:47:32.000Z
#%% # Move files around for rednet from pathlib import Path from shutil import move detailed_paths = Path('/srv/flash1/jye72/share/objectnav_detailed') eval_paths = Path('/srv/flash1/jye72/share/objectnav_eval') KEY = 'gt_False.pth' NEW_KEY = 'gt_False_21.pth' for var_path in eval_paths.glob("*"): # for var_path in d...
28
67
0.633929
from pathlib import Path from shutil import move detailed_paths = Path('/srv/flash1/jye72/share/objectnav_detailed') eval_paths = Path('/srv/flash1/jye72/share/objectnav_eval') KEY = 'gt_False.pth' NEW_KEY = 'gt_False_21.pth' for var_path in eval_paths.glob("*"): for ckpt in var_path.glob("*"): for val...
true
true
1c33f09cfd5449e71f3c16d72f5d6bf8a34449c9
3,500
py
Python
client.py
murilopereirame/ChatUDP
979a8ed5927bb0a431314cad2e36505bbbb256c2
[ "MIT" ]
null
null
null
client.py
murilopereirame/ChatUDP
979a8ed5927bb0a431314cad2e36505bbbb256c2
[ "MIT" ]
null
null
null
client.py
murilopereirame/ChatUDP
979a8ed5927bb0a431314cad2e36505bbbb256c2
[ "MIT" ]
null
null
null
import socket import threading import random import json import sys from RSA import RSA class Client: SERVER_UDP_IP_ADDRESS = "127.0.0.1" SERVER_UDP_PORT_NO = 6789 user = "" room = "geral" clientSock = None def __init__(self, ip): self.SERVER_UDP_IP_ADDRESS = ip self.room = 'l...
34.653465
92
0.532286
import socket import threading import random import json import sys from RSA import RSA class Client: SERVER_UDP_IP_ADDRESS = "127.0.0.1" SERVER_UDP_PORT_NO = 6789 user = "" room = "geral" clientSock = None def __init__(self, ip): self.SERVER_UDP_IP_ADDRESS = ip self.room = 'l...
true
true
1c33f0e69444ade9a5b966e522f9e8149c28c794
1,608
py
Python
fastreid/layers/rfconv/function.py
SZLSP/reid2020NAIC
d0eaee768e0be606417a27ce5ea2b3071b5a9bc2
[ "Apache-2.0" ]
2
2021-05-12T13:36:46.000Z
2021-08-15T10:35:08.000Z
fastreid/layers/rfconv/function.py
SZLSP/reid2020NAIC
d0eaee768e0be606417a27ce5ea2b3071b5a9bc2
[ "Apache-2.0" ]
1
2021-12-28T12:49:49.000Z
2021-12-28T12:49:49.000Z
fastreid/layers/rfconv/function.py
SZLSP/reid2020NAIC
d0eaee768e0be606417a27ce5ea2b3071b5a9bc2
[ "Apache-2.0" ]
null
null
null
##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ## Created by: Hang Zhang ## Email: zhanghang0704@gmail.com ## Copyright (c) 2020 ## ## LICENSE file in the root directory of this source tree ##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ """Rectify function""" f...
32.816327
87
0.55597
(d - 1) for k, d in zip(kernel_size, dilation)] ctx.kernel_size = kernel_size ctx.stride = stride ctx.padding = padding ctx.dilation = dilation ctx.average = average if x.is_cuda: lib.gpu.conv_rectify(y, x, kernel_size, stride, padding, dilation, average) ...
true
true
1c33f10cfc5099f1a9b12d2e015bf0dafde36b97
9,559
py
Python
tensorflow/python/ops/control_flow_grad.py
KosingZhu/tensorflow
7ac2521a4e609ddef0f0ea3ffc2e76102da934d7
[ "Apache-2.0" ]
9
2021-11-06T11:09:48.000Z
2021-12-12T04:52:29.000Z
tensorflow/python/ops/control_flow_grad.py
KosingZhu/tensorflow
7ac2521a4e609ddef0f0ea3ffc2e76102da934d7
[ "Apache-2.0" ]
2
2021-10-06T23:12:04.000Z
2021-10-06T23:12:04.000Z
tensorflow/python/ops/control_flow_grad.py
KosingZhu/tensorflow
7ac2521a4e609ddef0f0ea3ffc2e76102da934d7
[ "Apache-2.0" ]
1
2021-11-11T04:43:09.000Z
2021-11-11T04:43:09.000Z
# Copyright 2015 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...
38.857724
80
0.715661
from six.moves import xrange from tensorflow.python.framework import dtypes from tensorflow.python.framework import indexed_slices from tensorflow.python.framework import ops from tensorflow.python.framework import sparse_tensor from tensorflow.python.ops import control_flow_ops from tensorflow.python...
true
true
1c33f139de8a7e5d3fbf8f0aabab26f6e70cf9c7
65
py
Python
tests/__init__.py
cthoyt/apicuron-client
f4988dd12437042492e678ac42a4685b147548d2
[ "MIT" ]
null
null
null
tests/__init__.py
cthoyt/apicuron-client
f4988dd12437042492e678ac42a4685b147548d2
[ "MIT" ]
null
null
null
tests/__init__.py
cthoyt/apicuron-client
f4988dd12437042492e678ac42a4685b147548d2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Tests for :mod:`apicuron_client`."""
16.25
39
0.553846
true
true
1c33f16bdb846f54fa02f21adc9a90fcc4a1a6cd
8,472
py
Python
cgi-bin/cvtFile.py
sugar-activities/4430-activity
3d6b804347778ea1eba91611dd782e483860f30e
[ "MIT" ]
null
null
null
cgi-bin/cvtFile.py
sugar-activities/4430-activity
3d6b804347778ea1eba91611dd782e483860f30e
[ "MIT" ]
null
null
null
cgi-bin/cvtFile.py
sugar-activities/4430-activity
3d6b804347778ea1eba91611dd782e483860f30e
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding:utf-8 -*- """ This version acts as cgi script, applying selected conversions to a file supplied in the form get form parameters make soup apply conversions make txt return """ import os, sys import logging from BeautifulSoup import BeautifulSoup, Tag, NavigableString, Comment from path i...
32.45977
109
0.502007
""" This version acts as cgi script, applying selected conversions to a file supplied in the form get form parameters make soup apply conversions make txt return """ import os, sys import logging from BeautifulSoup import BeautifulSoup, Tag, NavigableString, Comment from path import path import subprocess from PIL i...
false
true
1c33f25ddcc7a95fb0d01c4542249e11bbb23454
326
py
Python
Backend/Trackerapp/migrations/0012_remove_customuser_is_verified.py
OscarMugendi/Project-Tracker
f805e706332bb387d9e0f1ed537e91d1360bf2b1
[ "MIT" ]
null
null
null
Backend/Trackerapp/migrations/0012_remove_customuser_is_verified.py
OscarMugendi/Project-Tracker
f805e706332bb387d9e0f1ed537e91d1360bf2b1
[ "MIT" ]
null
null
null
Backend/Trackerapp/migrations/0012_remove_customuser_is_verified.py
OscarMugendi/Project-Tracker
f805e706332bb387d9e0f1ed537e91d1360bf2b1
[ "MIT" ]
null
null
null
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('Trackerapp', '0011_merge_0008_auto_20211017_2325_0010_auto_20211019_1133'), ] operations = [ migrations.RemoveField( model_name='customuser', name='is_verified', ), ...
20.375
85
0.634969
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('Trackerapp', '0011_merge_0008_auto_20211017_2325_0010_auto_20211019_1133'), ] operations = [ migrations.RemoveField( model_name='customuser', name='is_verified', ), ...
true
true
1c33f2c02c78023d8b92c3824c4be9f5fc7bcb0d
681
py
Python
_scripts/docker_compose_run_bash.py
gerold-penz/got-your-back
614559e411e22b25512932833d429cf831b51c4f
[ "ECL-2.0", "Apache-2.0" ]
1
2020-05-08T08:12:49.000Z
2020-05-08T08:12:49.000Z
_scripts/docker_compose_run_bash.py
gerold-penz/got-your-back
614559e411e22b25512932833d429cf831b51c4f
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
_scripts/docker_compose_run_bash.py
gerold-penz/got-your-back
614559e411e22b25512932833d429cf831b51c4f
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # coding: utf-8 import os import sys import subprocess THISDIR = os.path.dirname(os.path.realpath(__file__)) DOCKERDIR = os.path.abspath(os.path.join(THISDIR, "..", "docker")) def main(): print("Docker-Compose RUN\n") try: returncode = subprocess.call( ["docker-co...
20.636364
76
0.578561
import os import sys import subprocess THISDIR = os.path.dirname(os.path.realpath(__file__)) DOCKERDIR = os.path.abspath(os.path.join(THISDIR, "..", "docker")) def main(): print("Docker-Compose RUN\n") try: returncode = subprocess.call( ["docker-compose", "run", "--rm", "got-your-back...
true
true
1c33f38502390e02bec734428384c40a1477ab00
19,941
py
Python
source/_UIAHandler.py
asaranprasad/nvda
e9609694acbfb06398eb6552067a0dcd532d67af
[ "bzip2-1.0.6" ]
1
2018-11-16T10:15:59.000Z
2018-11-16T10:15:59.000Z
source/_UIAHandler.py
asaranprasad/nvda
e9609694acbfb06398eb6552067a0dcd532d67af
[ "bzip2-1.0.6" ]
null
null
null
source/_UIAHandler.py
asaranprasad/nvda
e9609694acbfb06398eb6552067a0dcd532d67af
[ "bzip2-1.0.6" ]
null
null
null
#_UIAHandler.py #A part of NonVisual Desktop Access (NVDA) #Copyright (C) 2011-2018 NV Access Limited, Joseph Lee, Babbage B.V. #This file is covered by the GNU General Public License. #See the file COPYING for more details. from ctypes import * from ctypes.wintypes import * import comtypes.client from comtyp...
46.159722
284
0.7967
from ctypes import * from ctypes.wintypes import * import comtypes.client from comtypes.automation import VT_EMPTY from comtypes import * import weakref import threading import time import config import api import appModuleHandler import queueHandler import controlTypes import NVDAHelper import win...
true
true
1c33f4adf603c76e12800fda43481ab5d8f5e142
26,319
py
Python
ier_model/run_et.py
diegoolano/biomedical_interpretable_entity_representations
3c35f02ee8dd7ee0f2a23b0014e4b112beab6461
[ "MIT" ]
2
2021-09-24T08:54:33.000Z
2021-11-15T05:15:52.000Z
ier_model/run_et.py
diegoolano/biomedical_interpretable_entity_representations
3c35f02ee8dd7ee0f2a23b0014e4b112beab6461
[ "MIT" ]
null
null
null
ier_model/run_et.py
diegoolano/biomedical_interpretable_entity_representations
3c35f02ee8dd7ee0f2a23b0014e4b112beab6461
[ "MIT" ]
2
2021-07-05T20:19:01.000Z
2021-08-01T01:01:41.000Z
#!/usr/bin/env python3 import argparse import gc import json import numpy as np import pickle import random import time import torch import torch.nn as nn from tqdm import tqdm from transformers import AdamW, get_linear_schedule_with_warmup import transformer_constant import transformer_data_utils from transformer_dat...
38.365889
196
0.682587
import argparse import gc import json import numpy as np import pickle import random import time import torch import torch.nn as nn from tqdm import tqdm from transformers import AdamW, get_linear_schedule_with_warmup import transformer_constant import transformer_data_utils from transformer_data_utils import to_torc...
true
true
1c33f502aebb10efa0fd15dc2ab7e98b4c9b9f82
8,050
py
Python
support/closure-library/closure/bin/build/closurebuilder.py
joe-greenawalt/skulpt
1db078e2f6d453403287233254b012bf31960ef4
[ "MIT" ]
2
2021-01-10T16:19:38.000Z
2021-06-14T22:09:59.000Z
support/closure-library/closure/bin/build/closurebuilder.py
csev/skulpt
9aa25b7dbf29f23ee8d3140d01a6f4353d12e66f
[ "MIT" ]
null
null
null
support/closure-library/closure/bin/build/closurebuilder.py
csev/skulpt
9aa25b7dbf29f23ee8d3140d01a6f4353d12e66f
[ "MIT" ]
1
2015-06-28T18:58:22.000Z
2015-06-28T18:58:22.000Z
#!/usr/bin/env python # # Copyright 2009 The Closure Library Authors. All Rights Reserved. """Utility for Closure Library dependency calculation. ClosureBuilder scans source files to build dependency info. From the dependencies, the script can produce a deps.js file, a manifest in dependency order, a concatenated s...
32.723577
79
0.623602
import logging import optparse import os import sys import depstree import jscompiler import source import treescan def _GetOptionsParser(): parser = optparse.OptionParser(__doc__) parser.add_option('-i', '--input', dest='inputs', action='appe...
true
true
1c33f61ef94624e19a7f0a90cef13310a305cb70
9,181
py
Python
src/nsvqa/nn/interpreter/batch_base_interpreter.py
drewhayward/DFOL-VQA
8c7d403bac560588ab3ac45774a3e4f71fbe9c90
[ "MIT" ]
23
2020-08-17T16:18:33.000Z
2022-03-09T11:47:37.000Z
src/nsvqa/nn/interpreter/batch_base_interpreter.py
drewhayward/DFOL-VQA
8c7d403bac560588ab3ac45774a3e4f71fbe9c90
[ "MIT" ]
1
2021-06-11T15:51:24.000Z
2021-06-11T15:51:24.000Z
src/nsvqa/nn/interpreter/batch_base_interpreter.py
drewhayward/DFOL-VQA
8c7d403bac560588ab3ac45774a3e4f71fbe9c90
[ "MIT" ]
7
2020-11-09T07:25:27.000Z
2022-01-13T04:25:09.000Z
# Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE.md file # in the project root for full license information. import torch import torch.nn as nn import os from operator import itemgetter from nsvqa.nn.interpreter import util from nsvqa.nn.interpreter.batch_base_types import...
49.896739
216
0.615401
import torch import torch.nn as nn import os from operator import itemgetter from nsvqa.nn.interpreter import util from nsvqa.nn.interpreter.batch_base_types import BatchWorld, BatchVariableSet, BatchAttentionState from nsvqa.nn.interpreter.data_parallel import gather_results class BatchInterpreterBase(nn.Module)...
true
true
1c33f62a8d3491e291306562ed3c4d021d62575a
36,400
py
Python
tests/test_transforms.py
weecology/albumentations
cc8fbb6e2fcc4f6a4c87a29b6b0784391b0e2db4
[ "MIT" ]
1
2021-05-22T09:19:31.000Z
2021-05-22T09:19:31.000Z
tests/test_transforms.py
weecology/albumentations
cc8fbb6e2fcc4f6a4c87a29b6b0784391b0e2db4
[ "MIT" ]
null
null
null
tests/test_transforms.py
weecology/albumentations
cc8fbb6e2fcc4f6a4c87a29b6b0784391b0e2db4
[ "MIT" ]
null
null
null
from functools import partial import cv2 import numpy as np import pytest import random import albumentations as A import albumentations.augmentations.functional as F import albumentations.augmentations.geometric.functional as FGeometric from torchvision.transforms import ColorJitter from PIL import Image def set_...
36.291127
119
0.607088
from functools import partial import cv2 import numpy as np import pytest import random import albumentations as A import albumentations.augmentations.functional as F import albumentations.augmentations.geometric.functional as FGeometric from torchvision.transforms import ColorJitter from PIL import Image def set_...
true
true
1c33f7ec4d42c8baa799ae0b07df4c8afb649cf3
12,196
py
Python
ml-agents-envs/mlagents/envs/brain.py
alexcercos/ML-Agents
c096c36b0348e3673b687499e17891cd35168939
[ "Apache-2.0" ]
1
2019-12-29T13:40:16.000Z
2019-12-29T13:40:16.000Z
ml-agents-envs/mlagents/envs/brain.py
alexcercos/ML-Agents
c096c36b0348e3673b687499e17891cd35168939
[ "Apache-2.0" ]
null
null
null
ml-agents-envs/mlagents/envs/brain.py
alexcercos/ML-Agents
c096c36b0348e3673b687499e17891cd35168939
[ "Apache-2.0" ]
2
2020-08-16T14:18:16.000Z
2022-03-18T12:22:54.000Z
import logging import numpy as np import io from mlagents.envs.communicator_objects.agent_info_pb2 import AgentInfoProto from mlagents.envs.communicator_objects.brain_parameters_pb2 import BrainParametersProto from mlagents.envs.timers import hierarchical_timer, timed from typing import Dict, List, NamedTuple, Optiona...
38.594937
110
0.616678
import logging import numpy as np import io from mlagents.envs.communicator_objects.agent_info_pb2 import AgentInfoProto from mlagents.envs.communicator_objects.brain_parameters_pb2 import BrainParametersProto from mlagents.envs.timers import hierarchical_timer, timed from typing import Dict, List, NamedTuple, Optiona...
true
true
1c33f8afcd2c14d682697633b0b5b0150094b3ef
956
py
Python
olympicvaxinfo/olympicvaxinfo/urls.py
mueslimak3r/olympicvax
279bb5eda99d34b20477c613471c1ddcbd9dc968
[ "MIT" ]
null
null
null
olympicvaxinfo/olympicvaxinfo/urls.py
mueslimak3r/olympicvax
279bb5eda99d34b20477c613471c1ddcbd9dc968
[ "MIT" ]
null
null
null
olympicvaxinfo/olympicvaxinfo/urls.py
mueslimak3r/olympicvax
279bb5eda99d34b20477c613471c1ddcbd9dc968
[ "MIT" ]
null
null
null
"""olympicvaxinfo URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Clas...
38.24
77
0.703975
from django.contrib import admin from django.urls import path from . import views urlpatterns = [ path('admin/', admin.site.urls), path("", views.blog_index, name="blog_index"), path("<int:pk>/", views.blog_detail, name="blog_detail"), path("<category>/", views.blog_category, name="blog_category"), ]
true
true
1c33f9078d1d81292a0bc042bd045df08b0b6362
12,732
py
Python
models/faster_rcnn.py
hvkwak/simple-faster-rcnn-pytorch
3ea84a789c91ea8d403637026b4a5add19e5343a
[ "MIT" ]
null
null
null
models/faster_rcnn.py
hvkwak/simple-faster-rcnn-pytorch
3ea84a789c91ea8d403637026b4a5add19e5343a
[ "MIT" ]
null
null
null
models/faster_rcnn.py
hvkwak/simple-faster-rcnn-pytorch
3ea84a789c91ea8d403637026b4a5add19e5343a
[ "MIT" ]
null
null
null
import os import sys import torch import torchvision import numpy as np from torch import nn from torch.nn import functional as F # from models.utils.nms import non_maximum_suppression from models.utils.bbox_tools import loc2bbox from utils.array_tool import tonumpy, totensor from data.dataset import preprocess from ut...
39.175385
130
0.592366
import os import sys import torch import torchvision import numpy as np from torch import nn from torch.nn import functional as F from models.utils.bbox_tools import loc2bbox from utils.array_tool import tonumpy, totensor from data.dataset import preprocess from utils.util import read_image from utils.config import op...
true
true
1c33f9ae72ee75467eb64f9ff3a3a2bc0a89a5fb
905
py
Python
interlecture/interauth/migrations/0001_initial.py
afriestad/interlecture
56d3d086ed6d0fd0de599120d12f88d6d1da2271
[ "MIT" ]
null
null
null
interlecture/interauth/migrations/0001_initial.py
afriestad/interlecture
56d3d086ed6d0fd0de599120d12f88d6d1da2271
[ "MIT" ]
null
null
null
interlecture/interauth/migrations/0001_initial.py
afriestad/interlecture
56d3d086ed6d0fd0de599120d12f88d6d1da2271
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-04-25 18:48 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migratio...
31.206897
145
0.649724
from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operation...
true
true
1c33f9b24d3204ce768b252cf5589524fd7c303b
1,562
py
Python
configs/detection/_base_/models/slowonly_r50_nl.py
Naoki-Wake/mmaction2
a2032605db82509744a18d993c94a06feb1efd15
[ "Apache-2.0" ]
null
null
null
configs/detection/_base_/models/slowonly_r50_nl.py
Naoki-Wake/mmaction2
a2032605db82509744a18d993c94a06feb1efd15
[ "Apache-2.0" ]
null
null
null
configs/detection/_base_/models/slowonly_r50_nl.py
Naoki-Wake/mmaction2
a2032605db82509744a18d993c94a06feb1efd15
[ "Apache-2.0" ]
null
null
null
# model setting model = dict( type='FastRCNN', backbone=dict( type='ResNet3dSlowOnly', depth=50, pretrained=None, pretrained2d=False, lateral=False, num_stages=4, conv1_kernel=(1, 7, 7), conv1_stride_t=1, pool1_stride_t=1, spatial_s...
30.627451
75
0.508963
model = dict( type='FastRCNN', backbone=dict( type='ResNet3dSlowOnly', depth=50, pretrained=None, pretrained2d=False, lateral=False, num_stages=4, conv1_kernel=(1, 7, 7), conv1_stride_t=1, pool1_stride_t=1, spatial_strides=(1, 2, 2...
true
true
1c33f9b3da0355f5366dab67a8602e113eeb6c9c
863
py
Python
belleflopt/migrations/0030_auto_20200228_2058.py
ucd-cws/eflows_optimization
2eb9f13a042ab81541488358ad0724555a5d57fc
[ "MIT" ]
2
2020-04-19T04:05:51.000Z
2021-04-19T02:47:40.000Z
belleflopt/migrations/0030_auto_20200228_2058.py
ucd-cws/eflows_optimization
2eb9f13a042ab81541488358ad0724555a5d57fc
[ "MIT" ]
7
2019-08-31T05:57:30.000Z
2019-11-27T23:58:13.000Z
belleflopt/migrations/0030_auto_20200228_2058.py
ucd-cws/eflows_optimization
2eb9f13a042ab81541488358ad0724555a5d57fc
[ "MIT" ]
null
null
null
# Generated by Django 2.2.4 on 2020-02-29 04:58 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('belleflopt', '0029_modelrun_description'), ] operations = [ migrations.AddField( model_name='mo...
28.766667
135
0.618772
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('belleflopt', '0029_modelrun_description'), ] operations = [ migrations.AddField( model_name='modelrun', name='water_year', ...
true
true
1c33f9c7f6d84650c468e676ac804f8fae83c447
1,200
py
Python
explorebg/questions/models.py
bvoytash/Quiz-Application
279a029b8e40513642bf002387f813d680a74ed7
[ "MIT" ]
null
null
null
explorebg/questions/models.py
bvoytash/Quiz-Application
279a029b8e40513642bf002387f813d680a74ed7
[ "MIT" ]
null
null
null
explorebg/questions/models.py
bvoytash/Quiz-Application
279a029b8e40513642bf002387f813d680a74ed7
[ "MIT" ]
null
null
null
import random from django.contrib.auth import get_user_model from django.db import models UserModel = get_user_model() class Question(models.Model): text = models.CharField(max_length=500) user = models.ForeignKey( UserModel, on_delete=models.CASCADE, ) def get_answer_quiz(self): ...
23.076923
93
0.678333
import random from django.contrib.auth import get_user_model from django.db import models UserModel = get_user_model() class Question(models.Model): text = models.CharField(max_length=500) user = models.ForeignKey( UserModel, on_delete=models.CASCADE, ) def get_answer_quiz(self): ...
true
true
1c33f9e9244a342d5f565b8b316868b728c73720
74
py
Python
ast-transformations-core/src/test/resources/org/jetbrains/research/ml/ast/transformations/commentsRemoval/data/out_6.py
JetBrains-Research/ast-transformations
0ab408af3275b520cc87a473f418c4b4dfcb0284
[ "MIT" ]
8
2021-01-19T21:15:54.000Z
2022-02-23T19:16:25.000Z
ast-transformations-core/src/test/resources/org/jetbrains/research/ml/ast/transformations/commentsRemoval/data/out_6.py
JetBrains-Research/ast-transformations
0ab408af3275b520cc87a473f418c4b4dfcb0284
[ "MIT" ]
4
2020-11-17T14:28:25.000Z
2022-02-24T07:54:28.000Z
ast-transformations-core/src/test/resources/org/jetbrains/research/ml/ast/transformations/commentsRemoval/data/out_6.py
nbirillo/ast-transformations
717706765a2da29087a0de768fc851698886dd65
[ "MIT" ]
1
2022-02-23T19:16:30.000Z
2022-02-23T19:16:30.000Z
def main(): b = 5 b = 510 def foo(): pass a = 5
8.222222
14
0.337838
def main(): b = 5 b = 510 def foo(): pass a = 5
true
true
1c33f9f8be2a7dfe451fcc83bd92fdf584bcdc77
14,611
py
Python
static/paddlex/tools/x2seg.py
cheneyveron/PaddleX
86f73fc6a66b12c638f642524bfd1cf730e26c4b
[ "Apache-2.0" ]
3,655
2020-03-28T09:19:50.000Z
2022-03-31T13:28:39.000Z
static/paddlex/tools/x2seg.py
cheneyveron/PaddleX
86f73fc6a66b12c638f642524bfd1cf730e26c4b
[ "Apache-2.0" ]
829
2020-03-28T04:03:18.000Z
2022-03-31T14:34:30.000Z
static/paddlex/tools/x2seg.py
cheneyveron/PaddleX
86f73fc6a66b12c638f642524bfd1cf730e26c4b
[ "Apache-2.0" ]
738
2020-03-28T03:56:46.000Z
2022-03-31T13:11:03.000Z
#!/usr/bin/env python # coding: utf-8 # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LI...
42.228324
88
0.524263
import cv2 import uuid import json import os import os.path as osp import shutil import numpy as np import PIL.Image from .base import MyEncoder, is_pic, get_encoding import math class X2Seg(object): def __init__(self): self.labels2ids = {'_background_': 0} def shapes_to_label(self, i...
true
true
1c33fa15ddbf9c5dfc357e4226f51b2734c6f579
738
py
Python
nodes/List/GetTaskRenderListIndex.py
atticus-lv/RenderNode
8a4797a2186b76fedebc5d634cff298e69089474
[ "Apache-2.0" ]
17
2021-11-21T09:26:55.000Z
2022-03-09T06:56:01.000Z
nodes/List/GetTaskRenderListIndex.py
atticus-lv/RenderNode
8a4797a2186b76fedebc5d634cff298e69089474
[ "Apache-2.0" ]
1
2021-12-05T13:02:48.000Z
2021-12-06T08:02:34.000Z
nodes/List/GetTaskRenderListIndex.py
atticus-lv/RenderNode
8a4797a2186b76fedebc5d634cff298e69089474
[ "Apache-2.0" ]
4
2021-11-23T14:49:34.000Z
2021-12-30T15:04:58.000Z
import bpy from bpy.props import * from ...nodes.BASE.node_base import RenderNodeBase class RenderNodeGetListIndex(RenderNodeBase): """A simple input node""" bl_idname = 'RenderNodeGetListIndex' bl_label = 'Get List Index' def init(self, context): self.create_output('RenderNodeSocketInt', "i...
26.357143
81
0.730352
import bpy from bpy.props import * from ...nodes.BASE.node_base import RenderNodeBase class RenderNodeGetListIndex(RenderNodeBase): bl_idname = 'RenderNodeGetListIndex' bl_label = 'Get List Index' def init(self, context): self.create_output('RenderNodeSocketInt', "index", 'Index') def proce...
true
true
1c33fa1cca0ea17ed709ee6bbe64293dc43fa107
10,437
py
Python
das_decennial/programs/schema/attributes/hhtype.py
p-b-j/uscb-das-container-public
7f7ba44055da15d13b191180249e656e1bd398c6
[ "MIT" ]
1
2021-11-13T01:35:31.000Z
2021-11-13T01:35:31.000Z
das_decennial/programs/schema/attributes/hhtype.py
p-b-j/uscb-das-container-public
7f7ba44055da15d13b191180249e656e1bd398c6
[ "MIT" ]
1
2021-10-30T00:48:45.000Z
2021-11-01T23:33:46.000Z
das_decennial/programs/schema/attributes/hhtype.py
p-b-j/uscb-das-container-public
7f7ba44055da15d13b191180249e656e1bd398c6
[ "MIT" ]
null
null
null
from programs.schema.attributes.abstractattribute import AbstractAttribute from constants import CC class HHTypeAttr(AbstractAttribute): @staticmethod def getName(): return CC.ATTR_HHTYPE @staticmethod def getLevels(): return { 'Married opposite-sex with own children unde...
35.379661
107
0.562326
from programs.schema.attributes.abstractattribute import AbstractAttribute from constants import CC class HHTypeAttr(AbstractAttribute): @staticmethod def getName(): return CC.ATTR_HHTYPE @staticmethod def getLevels(): return { 'Married opposite-sex with own children unde...
true
true
1c33fbacc173c5443bc0886f17a8de69e63f17c2
196
py
Python
example/myapp/models.py
shamanu4/django-fine-uploader
8b53fdbaa27f749bf103b77d168fdd5e02def4e5
[ "MIT" ]
null
null
null
example/myapp/models.py
shamanu4/django-fine-uploader
8b53fdbaa27f749bf103b77d168fdd5e02def4e5
[ "MIT" ]
null
null
null
example/myapp/models.py
shamanu4/django-fine-uploader
8b53fdbaa27f749bf103b77d168fdd5e02def4e5
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from django.db import models class FineFile(models.Model): fine_file = models.FileField() def __str__(self): return self.fine_file.name
17.818182
39
0.739796
from __future__ import unicode_literals from django.db import models class FineFile(models.Model): fine_file = models.FileField() def __str__(self): return self.fine_file.name
true
true
1c33fc85f24467f19a7d8f96bb4425aba7affc44
24,545
py
Python
src/garage/torch/modules/gaussian_mlp_module.py
waldow90/garage
1ea04b8b90d2da0d7da10e8604a144018b61b81c
[ "MIT" ]
1
2020-02-19T00:01:29.000Z
2020-02-19T00:01:29.000Z
src/garage/torch/modules/gaussian_mlp_module.py
Ashutosh-Adhikari/garage
482a26a07d46091f878c41b582f1478588e397ff
[ "MIT" ]
null
null
null
src/garage/torch/modules/gaussian_mlp_module.py
Ashutosh-Adhikari/garage
482a26a07d46091f878c41b582f1478588e397ff
[ "MIT" ]
1
2020-02-13T12:05:35.000Z
2020-02-13T12:05:35.000Z
"""GaussianMLPModule.""" import abc import torch from torch import nn from torch.distributions import Normal from torch.distributions.independent import Independent from garage.torch.modules.mlp_module import MLPModule from garage.torch.modules.multi_headed_mlp_module import MultiHeadedMLPModule class GaussianMLPBa...
45.369686
79
0.612508
import abc import torch from torch import nn from torch.distributions import Normal from torch.distributions.independent import Independent from garage.torch.modules.mlp_module import MLPModule from garage.torch.modules.multi_headed_mlp_module import MultiHeadedMLPModule class GaussianMLPBaseModule(nn.Module): ...
true
true
1c33fcc9c8a2484f4594c3812636622d2fa80cda
4,296
py
Python
lm_eval/tasks/pile.py
ucinlp/lm-evaluation-harness
52bb90e2a161dc7c5d93478406c4cfe489caf2b2
[ "MIT" ]
null
null
null
lm_eval/tasks/pile.py
ucinlp/lm-evaluation-harness
52bb90e2a161dc7c5d93478406c4cfe489caf2b2
[ "MIT" ]
null
null
null
lm_eval/tasks/pile.py
ucinlp/lm-evaluation-harness
52bb90e2a161dc7c5d93478406c4cfe489caf2b2
[ "MIT" ]
null
null
null
""" The Pile: An 800GB Dataset of Diverse Text for Language Modeling https://arxiv.org/pdf/2101.00027.pdf The Pile is a 825 GiB diverse, open source language modelling data set that consists of 22 smaller, high-quality datasets combined together. To score well on Pile BPB (bits per byte), a model must be able to under...
27.896104
221
0.744646
import os import lm_dataformat import abc import numpy as np from lm_eval.base import rf, PerplexityTask from ..metrics import mean, matthews_corrcoef, f1_score from ..utils import general_detokenize from best_download import download_file _CITATION = """ @article{pile, title={The {P}ile: An 800GB Dataset of Diver...
true
true
1c33fd7758a8b0634c999edfd18b304199a911dc
75,657
py
Python
sdk/python/pulumi_azure_native/compute/v20200930/outputs.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_native/compute/v20200930/outputs.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_native/compute/v20200930/outputs.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
38.95829
335
0.657718
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs from ._enums import * __all__ = [ 'CreationDataResponse', 'DataDiskImageEncryptionResponse', 'DisallowedResponse', 'DiskSkuRespons...
true
true
1c33fdb7cffa7a94b8db97932f625aeac2f2911b
4,987
py
Python
helper_nodes/display_poses.py
apl-ocean-engineering/visual_odom
6e88c8d5a098585f7b12e4934f47494414824b4d
[ "MIT" ]
1
2020-11-22T20:09:53.000Z
2020-11-22T20:09:53.000Z
helper_nodes/display_poses.py
apl-ocean-engineering/stereo_visual_odom
6e88c8d5a098585f7b12e4934f47494414824b4d
[ "MIT" ]
null
null
null
helper_nodes/display_poses.py
apl-ocean-engineering/stereo_visual_odom
6e88c8d5a098585f7b12e4934f47494414824b4d
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import copy import numpy as np import argparse def get_eucld_error(x1, x2, y1, y2, z1, z2): error = [] for i in range(len(x1)): p1 = np.array([x1[i], y1[i], z1[i]]) p2 = np.array([x2[i], y2[i], z2[i]]) error.append(float(np.sum(np.subtract(p1, p2)))) ...
28.175141
76
0.548626
import matplotlib.pyplot as plt import copy import numpy as np import argparse def get_eucld_error(x1, x2, y1, y2, z1, z2): error = [] for i in range(len(x1)): p1 = np.array([x1[i], y1[i], z1[i]]) p2 = np.array([x2[i], y2[i], z2[i]]) error.append(float(np.sum(np.subtract(p1, p2)))) ...
true
true
1c33fdc9d99aa7d333404785340880afd23b60d3
3,678
py
Python
models/plain_lstm.py
TalkToTheGAN/RelaxTextGAN
6d0846392c8a1267eaa103dd70492cb80024079e
[ "Apache-2.0" ]
3
2019-05-30T03:40:38.000Z
2021-04-12T06:50:41.000Z
models/plain_lstm.py
TalkToTheGAN/RelaxTextGAN
6d0846392c8a1267eaa103dd70492cb80024079e
[ "Apache-2.0" ]
1
2020-06-15T12:27:56.000Z
2020-06-15T12:27:56.000Z
models/plain_lstm.py
TalkToTheGAN/RelaxTextGAN
6d0846392c8a1267eaa103dd70492cb80024079e
[ "Apache-2.0" ]
null
null
null
import os import random import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable class PlainLSTM(nn.Module): """PlainLSTM """ def __init__(self, vocab_size, emb_dim, hidden_dim, use_cuda=False): super(PlainLSTM, self).__init__() ...
32.263158
104
0.54894
import os import random import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable class PlainLSTM(nn.Module): def __init__(self, vocab_size, emb_dim, hidden_dim, use_cuda=False): super(PlainLSTM, self).__init__() self.vocab_size = voc...
true
true
1c33fe2b2b38a27cad60e2b1413c587bdf493fa1
317
py
Python
venv/Lib/site-packages/nipype/interfaces/minc/testdata.py
richung99/digitizePlots
6b408c820660a415a289726e3223e8f558d3e18b
[ "MIT" ]
585
2015-01-12T16:06:47.000Z
2022-03-26T14:51:08.000Z
nipype/interfaces/minc/testdata.py
tamires-consulting/nipype
b7879d75a63b6500b2e7d2c3eba5aa7670339274
[ "Apache-2.0" ]
2,329
2015-01-01T09:56:41.000Z
2022-03-30T14:24:49.000Z
nipype/interfaces/minc/testdata.py
tamires-consulting/nipype
b7879d75a63b6500b2e7d2c3eba5aa7670339274
[ "Apache-2.0" ]
487
2015-01-20T01:04:52.000Z
2022-03-21T21:22:47.000Z
# -*- coding: utf-8 -*- import os from ...testing import example_data minc2Dfile = example_data("minc_test_2D_00.mnc") minc3Dfile = example_data("minc_test_3D_00.mnc") nlp_config = example_data("minc_nlp.conf") def nonempty_minc_data(i, shape="2D"): return example_data("minc_test_%s_%.2d.mnc" % (shape, i))
22.642857
61
0.728707
import os from ...testing import example_data minc2Dfile = example_data("minc_test_2D_00.mnc") minc3Dfile = example_data("minc_test_3D_00.mnc") nlp_config = example_data("minc_nlp.conf") def nonempty_minc_data(i, shape="2D"): return example_data("minc_test_%s_%.2d.mnc" % (shape, i))
true
true
1c33fe6b373149f67b58af2338d67477648d458f
6,134
py
Python
server_normal_Flask_beautiful/routes/routes_user.py
KiwiShow/PythonWeb
a489bc2ab16f06f7cc4524bab6b45b2653bfb1bd
[ "MIT" ]
7
2018-02-24T13:41:21.000Z
2022-02-06T04:59:13.000Z
server_normal_Flask_beautiful/routes/routes_user.py
KiwiShow/PythonWeb
a489bc2ab16f06f7cc4524bab6b45b2653bfb1bd
[ "MIT" ]
6
2018-02-25T11:50:42.000Z
2021-12-13T19:55:13.000Z
server_normal_Flask_beautiful/routes/routes_user.py
KiwiShow/PythonWeb
a489bc2ab16f06f7cc4524bab6b45b2653bfb1bd
[ "MIT" ]
1
2018-03-01T02:43:15.000Z
2018-03-01T02:43:15.000Z
from utils import log from config import gg, image_file_dir from routes import ( current_user, login_required, ) from flask import ( request, Blueprint, render_template, redirect, url_for, session, make_response, send_from_directory, abort, flash, ) from models.user imp...
27.141593
152
0.662048
from utils import log from config import gg, image_file_dir from routes import ( current_user, login_required, ) from flask import ( request, Blueprint, render_template, redirect, url_for, session, make_response, send_from_directory, abort, flash, ) from models.user imp...
true
true