hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
021b97b59482ecb9c5b11ef7533aaffaea40bebd
1,447
py
Python
flask_app/blog/db.py
jg1141/ctoa
99830a73bdf4e2c0ad5c69d8beb57d939164f02b
[ "MIT" ]
1
2020-02-13T09:34:41.000Z
2020-02-13T09:34:41.000Z
flask_app/blog/db.py
jg1141/ctoa
99830a73bdf4e2c0ad5c69d8beb57d939164f02b
[ "MIT" ]
3
2021-02-08T20:35:29.000Z
2021-04-30T20:56:06.000Z
flask_app/blog/db.py
jg1141/ctoa
99830a73bdf4e2c0ad5c69d8beb57d939164f02b
[ "MIT" ]
null
null
null
"""Database tools and helpers.""" from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() def init_app(app): """Initialize the Flask app for database usage.""" db.init_app(app) app.cli.add_command(init_db_command)
27.301887
69
0.68763
"""Database tools and helpers.""" from datetime import datetime from click import command, echo from flask_sqlalchemy import SQLAlchemy from flask.cli import with_appcontext db = SQLAlchemy() class Post(db.Model): """A blog post.""" id = db.Column(db.Integer, primary_key=True) author_id = db.Column(d...
0
131
0
909
0
0
0
34
137
715ad5abbc1e26198e6bd1dec8e45909f13aa00f
4,465
py
Python
setup/make_package.py
kellydosocorro/brython
c3f508f73699383e2a8ea320d338276aecda0a3e
[ "BSD-3-Clause" ]
null
null
null
setup/make_package.py
kellydosocorro/brython
c3f508f73699383e2a8ea320d338276aecda0a3e
[ "BSD-3-Clause" ]
null
null
null
setup/make_package.py
kellydosocorro/brython
c3f508f73699383e2a8ea320d338276aecda0a3e
[ "BSD-3-Clause" ]
null
null
null
import os if __name__ == "__main__": import sys package_name = sys.argv[1] if len(sys.argv) > 1 else "" src_dir = sys.argv[2] if len(sys.argv) > 2 else os.getcwd() make(package_name, src_dir)
33.320896
77
0.541993
import json import os import re import time import ast import python_minifier class Visitor(ast.NodeVisitor): """Used to list all the modules imported by a script.""" def __init__(self, lib_path, package): self.imports = set() self.lib_path = lib_path self.package = package def v...
0
0
0
1,175
0
2,965
0
-42
157
653f86ff8fe4e8b2e8d87ceadfaa40ef6dd2b701
1,104
py
Python
pygowave_server/templatetags/analytics.py
google-code-export/pygowave-server
66b8148a0709af40b43dd2a9a9cb9c575fad58ba
[ "Apache-2.0" ]
1
2019-04-15T13:50:28.000Z
2019-04-15T13:50:28.000Z
pygowave_server/templatetags/analytics.py
pombreda/pygowave-server
66b8148a0709af40b43dd2a9a9cb9c575fad58ba
[ "Apache-2.0" ]
null
null
null
pygowave_server/templatetags/analytics.py
pombreda/pygowave-server
66b8148a0709af40b43dd2a9a9cb9c575fad58ba
[ "Apache-2.0" ]
1
2021-06-03T22:51:18.000Z
2021-06-03T22:51:18.000Z
# # PyGoWave Server - The Python Google Wave Server # Copyright 2009 Patrick Schneider <patrick.p2k.schneider@gmail.com> # # 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.ap...
32.470588
97
0.737319
# # PyGoWave Server - The Python Google Wave Server # Copyright 2009 Patrick Schneider <patrick.p2k.schneider@gmail.com> # # 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.ap...
0
319
0
0
0
0
0
11
45
717832f06052b385b06ed70a496d6b56b151a0d3
1,292
py
Python
blender/arm/logicnode/value_vector_math.py
Bugsbane/armory
fc2635e673a2d7fb9cc38b979a812de043e719c6
[ "Zlib" ]
1
2020-09-24T11:03:16.000Z
2020-09-24T11:03:16.000Z
blender/arm/logicnode/value_vector_math.py
kirumon/armory
4df19ef970ba76d6f99d0b07b44048e2e148e4ff
[ "Zlib" ]
null
null
null
blender/arm/logicnode/value_vector_math.py
kirumon/armory
4df19ef970ba76d6f99d0b07b44048e2e148e4ff
[ "Zlib" ]
null
null
null
add_node(VectorMathNode, category='Value')
36.914286
69
0.572755
import bpy from bpy.props import * from bpy.types import Node, NodeSocket from arm.logicnode.arm_nodes import * class VectorMathNode(Node, ArmLogicTreeNode): '''Vector math node''' bl_idname = 'LNVectorMathNode' bl_label = 'Vector Math' bl_icon = 'CURVE_PATH' property0: EnumProperty( items ...
0
0
0
1,113
0
0
0
24
111
de2998bd03b1a433e777cdfbcfc970f2caf72c4a
9,997
py
Python
run_app.py
mariusvileiniskisibm/optimal-patient-allocation-vis
8305544b7500b433e3131be95939dc07f0958592
[ "Apache-2.0" ]
null
null
null
run_app.py
mariusvileiniskisibm/optimal-patient-allocation-vis
8305544b7500b433e3131be95939dc07f0958592
[ "Apache-2.0" ]
null
null
null
run_app.py
mariusvileiniskisibm/optimal-patient-allocation-vis
8305544b7500b433e3131be95939dc07f0958592
[ "Apache-2.0" ]
null
null
null
from flask import Flask import os province_map = ProvinceMap("province_id_mapping.csv") app = Flask(__name__, static_url_path='') db_name = 'mydb' client = None db = None # If you want to connect to your COS to obtain results for visualisation, uncomment the lines below and fill in the necessary cre...
41.654167
179
0.673802
from flask import Flask, render_template, request, jsonify, url_for import atexit import os import json import folium from botocore.client import Config import ibm_boto3 import pandas as pd import ast from collections import namedtuple import numpy as np class ProvinceMap: def __init__(self, province_mapping): ...
0
1,991
0
411
0
6,284
0
23
474
2d025f194ebc68eeccef29e3737d973227c8237c
5,179
py
Python
zero-shot-images/resnet101_feature_extractor.py
e96031413/tfvaegan
4d0512c6ce98155b9e8ba37fbcf90d43cd5bbe90
[ "MIT" ]
null
null
null
zero-shot-images/resnet101_feature_extractor.py
e96031413/tfvaegan
4d0512c6ce98155b9e8ba37fbcf90d43cd5bbe90
[ "MIT" ]
1
2021-07-28T06:27:39.000Z
2021-07-28T15:46:31.000Z
zero-shot-images/resnet101_feature_extractor.py
e96031413/tfvaegan
4d0512c6ce98155b9e8ba37fbcf90d43cd5bbe90
[ "MIT" ]
1
2022-01-26T17:51:25.000Z
2022-01-26T17:51:25.000Z
import torch import torchvision import torchvision.models as models import json import pandas as pd import numpy as np import torch.nn as nn import scipy.io as io import os from PIL import Image from tqdm import tqdm # data_dir = "./test" data_dir = "../XXison/datasets_for_ma/" dataset_info = json.load(open("../XXiso...
36.730496
179
0.665766
import torch import torchvision import torchvision.models as models import json import pandas as pd import numpy as np import torch.nn as nn import scipy.io as io from torch.utils.data import Dataset from torch.utils import data import os from PIL import Image from tqdm import tqdm import h5py # data_dir = "./test" da...
912
0
0
0
0
1,396
0
12
158
f983dda48550c5ce5f7dc1d7c6afcd29d938cabe
115
py
Python
hello_emoji_world/__init__.py
kishaningithub/hello-world-py
f8ed04bc2d7cbc5c29db832a708081a65c1120f2
[ "MIT" ]
null
null
null
hello_emoji_world/__init__.py
kishaningithub/hello-world-py
f8ed04bc2d7cbc5c29db832a708081a65c1120f2
[ "MIT" ]
null
null
null
hello_emoji_world/__init__.py
kishaningithub/hello-world-py
f8ed04bc2d7cbc5c29db832a708081a65c1120f2
[ "MIT" ]
null
null
null
import fire if __name__ == '__main__': fire.Fire(hello)
11.5
29
0.6
import fire def hello(name="🌍"): return "Hello %s!" % name if __name__ == '__main__': fire.Fire(hello)
4
0
0
0
0
28
0
0
23
b82b3de0f54d707a985a6bb0a68e91bdd909ef2b
251
py
Python
src/web/modules/admin/controllers/public/controllers/default.py
unkyulee/elastic-cms
3ccf4476c3523d4fefc0d8d9dee0196815b81489
[ "MIT" ]
2
2017-04-30T07:29:23.000Z
2017-04-30T07:36:27.000Z
src/web/modules/admin/controllers/public/controllers/default.py
unkyulee/elastic-cms
3ccf4476c3523d4fefc0d8d9dee0196815b81489
[ "MIT" ]
null
null
null
src/web/modules/admin/controllers/public/controllers/default.py
unkyulee/elastic-cms
3ccf4476c3523d4fefc0d8d9dee0196815b81489
[ "MIT" ]
null
null
null
import lib.es as es
25.1
78
0.661355
from flask import render_template import lib.es as es def get(p): # proxy list option = 'size=10000' p['public_list'] = es.list(p['host'], 'core_proxy', 'public', '*', option) return render_template("admin/public/default.html", p=p)
0
0
0
0
0
174
0
12
45
1ee90208721acc6a28667456b00b747eba010c8f
4,349
py
Python
test/unit/test_filters_ibip.py
xu-kai-xu/porespy
9df231bfd4010e3a13efc66585474e148cd08d6c
[ "MIT" ]
null
null
null
test/unit/test_filters_ibip.py
xu-kai-xu/porespy
9df231bfd4010e3a13efc66585474e148cd08d6c
[ "MIT" ]
null
null
null
test/unit/test_filters_ibip.py
xu-kai-xu/porespy
9df231bfd4010e3a13efc66585474e148cd08d6c
[ "MIT" ]
null
null
null
import porespy as ps ps.settings.tqdm['disable'] = True if __name__ == '__main__': t = IBIPTest() self = t t.setup_class() for item in t.__dir__(): if item.startswith('test'): print('running test: '+item) t.__getattribute__(item)()
35.357724
77
0.564728
import numpy as np import porespy as ps import scipy.ndimage as spim from skimage.morphology import square from edt import edt ps.settings.tqdm['disable'] = True class IBIPTest(): def setup_class(self): np.random.seed(0) self.im = ps.generators.lattice_spheres(shape=[101, 101], ...
0
0
0
3,937
0
0
0
18
111
8a61f86ff543155532d4dfc430ba0363c08f7af7
6,136
py
Python
src/blueshed/model_helpers/crud_mixin.py
blueshed/blueshed-py
61be378d8e24e60775cc2b8a6f17c6e959098fa2
[ "MIT" ]
null
null
null
src/blueshed/model_helpers/crud_mixin.py
blueshed/blueshed-py
61be378d8e24e60775cc2b8a6f17c6e959098fa2
[ "MIT" ]
null
null
null
src/blueshed/model_helpers/crud_mixin.py
blueshed/blueshed-py
61be378d8e24e60775cc2b8a6f17c6e959098fa2
[ "MIT" ]
null
null
null
''' Crub Mixin has been superceded by fetch_and_carry mixin Created on 2 Jul 2014 @author: peterb '''
36.52381
101
0.45339
''' Crub Mixin has been superceded by fetch_and_carry mixin Created on 2 Jul 2014 @author: peterb ''' from blueshed.model_helpers import base from collections import OrderedDict from decimal import Decimal from sqlalchemy.inspection import inspect import logging class Crud(object): def __init__(self, mode...
0
0
0
5,847
0
0
0
51
133
6da072227fcf1898af91623265df59261d79f341
3,308
py
Python
pylsp_rope/text.py
python-rope/pylsp-rope
431415560779881b57048dc563802705f7556bca
[ "MIT" ]
16
2021-10-03T07:18:20.000Z
2022-03-28T00:11:53.000Z
pylsp_rope/text.py
python-rope/pylsp-rope
431415560779881b57048dc563802705f7556bca
[ "MIT" ]
7
2021-10-03T06:37:42.000Z
2021-11-02T17:13:27.000Z
pylsp_rope/text.py
python-rope/pylsp-rope
431415560779881b57048dc563802705f7556bca
[ "MIT" ]
null
null
null
from typing import Tuple, Union, Optional from pylsp_rope import typing from pylsp_rope.typing import LineNumber, CharNumber, Literal START_OF_LINE: Literal["^"] = "^" END_OF_LINE: Literal["$"] = "$" AutoLineNumber = Union[LineNumber, int] AutoCharNumber = Union[CharNumber, int] _CharNumberOrMarker = Union[AutoC...
23.295775
101
0.614571
from typing import Tuple, Union, overload, Optional from pylsp_rope import typing from pylsp_rope.typing import LineNumber, CharNumber, Literal START_OF_LINE: Literal["^"] = "^" END_OF_LINE: Literal["$"] = "$" AutoLineNumber = Union[LineNumber, int] AutoCharNumber = Union[CharNumber, int] _CharNumberOrMarker = U...
0
471
0
0
0
0
0
10
92
0e56d2978c1f590cf72a3a5a1a0bd95329adc281
3,887
py
Python
tests/2.functional/test_platform.py
Morioki/LookingGlass.API
7fd308efc808ce23e5edf3c4a98d3faac15ecedf
[ "MIT" ]
null
null
null
tests/2.functional/test_platform.py
Morioki/LookingGlass.API
7fd308efc808ce23e5edf3c4a98d3faac15ecedf
[ "MIT" ]
null
null
null
tests/2.functional/test_platform.py
Morioki/LookingGlass.API
7fd308efc808ce23e5edf3c4a98d3faac15ecedf
[ "MIT" ]
null
null
null
from api.helpers import random_string_generator name = random_string_generator(20)
54.746479
199
0.702856
from api.helpers import random_string_generator from tests.conftest import ValueStorage name = random_string_generator(20) def test_platform_all(client): json = {"query":"query getPlatforms{\n platforms {\n id\n }\n}","operationName":"getPlatforms"} response = client.post('/graphql', headers=ValueStorag...
0
0
0
0
0
3,555
0
18
229
7aa2df3d9f18a005c290b2d3b6da5c75d60ad28a
3,267
py
Python
utils3d/pointcloud/utils.py
Steve-Tod/utils3d
513be2d59e410c3159a9db011802f875aacdc20a
[ "MIT" ]
3
2022-01-12T23:13:27.000Z
2022-01-13T21:56:40.000Z
utils3d/pointcloud/utils.py
Steve-Tod/utils3d
513be2d59e410c3159a9db011802f875aacdc20a
[ "MIT" ]
null
null
null
utils3d/pointcloud/utils.py
Steve-Tod/utils3d
513be2d59e410c3159a9db011802f875aacdc20a
[ "MIT" ]
null
null
null
""" @author Zhenyu Jiang @email stevetod98@gmail.com @date 2022-01-12 @desc Point cloud utilities """ import numpy as np import open3d as o3d def assert_array_shape(xyz, shapes=((-1, 3),)): """check array shape Args: xyz (np.ndarray): array shape (tuple of tuple of ints, optional): possi...
29.972477
116
0.617998
""" @author Zhenyu Jiang @email stevetod98@gmail.com @date 2022-01-12 @desc Point cloud utilities """ import numpy as np import open3d as o3d def assert_array_shape(xyz, shapes=((-1, 3),)): """check array shape Args: xyz (np.ndarray): array shape (tuple of tuple of ints, optional): possi...
0
0
0
0
0
0
0
0
0
1291fa49f6348c7e975dd0aac497cccf33218238
49,852
py
Python
NightlyTests/tensorflow/test_compress_example_tf.py
quic-bharathr/aimet
363308217dca3fc52644bdda31e69e356397adaf
[ "BSD-3-Clause" ]
3
2021-08-23T13:00:54.000Z
2021-11-17T10:52:36.000Z
NightlyTests/tensorflow/test_compress_example_tf.py
4ant00ra/aimet
c6ffd3c31c290fe0913b50831d58534f6df61d76
[ "BSD-3-Clause" ]
null
null
null
NightlyTests/tensorflow/test_compress_example_tf.py
4ant00ra/aimet
c6ffd3c31c290fe0913b50831d58534f6df61d76
[ "BSD-3-Clause" ]
null
null
null
# /usr/bin/env python3.5 # -*- mode: python -*- # ============================================================================= # @@-COPYRIGHT-START-@@ # # Copyright (c) 2019-2020, Qualcomm Innovation Center, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modifica...
48.353055
128
0.591711
# /usr/bin/env python3.5 # -*- mode: python -*- # ============================================================================= # @@-COPYRIGHT-START-@@ # # Copyright (c) 2019-2020, Qualcomm Innovation Center, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modifica...
0
0
0
43,347
0
0
0
266
471
128e0df37d5574d7d4179056642c0ad57356ffc7
3,674
py
Python
src/process.py
lbanawa/photo_filters
a9729d96929770599ddca2715026b69d8837168f
[ "MIT" ]
null
null
null
src/process.py
lbanawa/photo_filters
a9729d96929770599ddca2715026b69d8837168f
[ "MIT" ]
7
2020-03-02T01:48:58.000Z
2022-01-13T02:21:10.000Z
src/process.py
lbanawa/photo_filters
a9729d96929770599ddca2715026b69d8837168f
[ "MIT" ]
null
null
null
import logging from glob import glob import cv2 def read_files(folder_path): """ Read image files in a specified input folder. Arguments: folder_path{str} -- path to the folder holding the original images to be read Returns: arrays{list} -- list of images converted to numpy arrays ...
38.270833
123
0.679369
import logging from src.filters import * from glob import glob import cv2 def read_files(folder_path): """ Read image files in a specified input folder. Arguments: folder_path{str} -- path to the folder holding the original images to be read Returns: arrays{list} -- list of images conv...
0
0
0
0
0
0
0
4
22
16326594ab8e6cd365a5c3ef8c378bdb42a338f3
3,517
py
Python
my2h_transform/create_ir.py
kmzbrnoI/my2h_transform
de73d1a463a4b86512e105d709e544a829db8d17
[ "MIT" ]
null
null
null
my2h_transform/create_ir.py
kmzbrnoI/my2h_transform
de73d1a463a4b86512e105d709e544a829db8d17
[ "MIT" ]
1
2020-03-06T10:57:13.000Z
2020-03-08T16:56:43.000Z
my2h_transform/create_ir.py
kmzbrnoI/my2h_transform
de73d1a463a4b86512e105d709e544a829db8d17
[ "MIT" ]
null
null
null
CONTROL_AREA_IDS = { 1: 1000, # Skuhrov 2: 2000, # Odbocka Skuhrov 3: 4000, # Lesna 4: 5000, # Skaly 5: 3000, # Hrad 6: 10000, # Ivancice 7: 9000, # Metro 8: 8000, # Podhradi 9: 6000, # Brizky 10: 11000, # Namest 11: 20000, # Depo }
34.480392
95
0.587148
from typing import Optional from storage import IR, BLK, Control_Area, Track_Section, Railway CONTROL_AREA_IDS = { 1: 1000, # Skuhrov 2: 2000, # Odbocka Skuhrov 3: 4000, # Lesna 4: 5000, # Skaly 5: 3000, # Hrad 6: 10000, # Ivancice 7: 9000, # Metro 8: 8000, # Pod...
0
0
0
0
0
3,020
0
50
137
1fd0ed49d0de84565e08109dbe29fb4713f76980
5,187
py
Python
python/src/find_trs.py
maverbiest/SP_CRC_Pathway_TRs
9c48da8f2ef67c7a9b8fd0ed46ffadd116ee5450
[ "MIT" ]
null
null
null
python/src/find_trs.py
maverbiest/SP_CRC_Pathway_TRs
9c48da8f2ef67c7a9b8fd0ed46ffadd116ee5450
[ "MIT" ]
null
null
null
python/src/find_trs.py
maverbiest/SP_CRC_Pathway_TRs
9c48da8f2ef67c7a9b8fd0ed46ffadd116ee5450
[ "MIT" ]
1
2021-03-24T09:26:11.000Z
2021-03-24T09:26:11.000Z
#!/usr/bin/env python import os __all__ = [ "TRFinder", ] if __name__ == "__main__": args = parser() finder = TRFinder(fasta_file=args.fasta, output_dir=args.outdir) for record in finder.sequences: repeat_list = finder.detect_in_sequence(record) if not repeat_list: conti...
41.166667
124
0.616156
#!/usr/bin/env python import os import argparse from Bio import SeqIO from tral.sequence import sequence from tral.hmm import hmm __all__ = [ "TRFinder", ] class TRFinder(object): def __init__(self, fasta_file, output_dir, score="phylo_gap01"): if not fasta_file.endswith(".fasta"): rais...
0
0
0
3,296
0
310
0
10
136
1cf1f0d84420de99f91ddad1c72a32c259027e29
1,093
py
Python
setup.py
alfonsodg/scrapy-fake-useragent
ba70bb6ad073c7456599207ba4b1621938b1590f
[ "BSD-3-Clause" ]
null
null
null
setup.py
alfonsodg/scrapy-fake-useragent
ba70bb6ad073c7456599207ba4b1621938b1590f
[ "BSD-3-Clause" ]
null
null
null
setup.py
alfonsodg/scrapy-fake-useragent
ba70bb6ad073c7456599207ba4b1621938b1590f
[ "BSD-3-Clause" ]
null
null
null
from setuptools import setup setup( name='scrapy-fake-useragent', version='1.2.5', description='Use a random User-Agent provided by fake-useragent for every request', long_description=open('README.rst').read(), keywords='scrapy proxy user-agent web-scraping', license='New BSD License', auth...
39.035714
119
0.664227
from setuptools import setup setup( name='scrapy-fake-useragent', version='1.2.5', description='Use a random User-Agent provided by fake-useragent for every request', long_description=open('README.rst').read(), keywords='scrapy proxy user-agent web-scraping', license='New BSD License', auth...
0
0
0
0
0
0
0
0
0
60e6ac11d364fe4b8d61df195e0d350c8bcc5baf
4,307
py
Python
aggregationtools/plt_calculator.py
alexandria-julius/plttools
0feb298e5f0d52c73b926bd127f32339bda4a62e
[ "MIT" ]
null
null
null
aggregationtools/plt_calculator.py
alexandria-julius/plttools
0feb298e5f0d52c73b926bd127f32339bda4a62e
[ "MIT" ]
null
null
null
aggregationtools/plt_calculator.py
alexandria-julius/plttools
0feb298e5f0d52c73b926bd127f32339bda4a62e
[ "MIT" ]
2
2021-11-15T14:20:52.000Z
2022-01-07T06:27:48.000Z
""" PLT Calculator PLT calculator functions. """ import pandas as pd from aggregationtools import ep_curve, PLT def calculate_oep_curve(plt, number_of_simulations): """ This function calculates the OEP of a given PLT over a set number of simulations Parameters ---------- plt : pandas dataframe contai...
33.913386
99
0.68052
""" PLT Calculator PLT calculator functions. """ import pandas as pd import numpy as np from aggregationtools import ep_curve, PLT def calculate_oep_curve(plt, number_of_simulations): """ This function calculates the OEP of a given PLT over a set number of simulations Parameters ---------- plt : pand...
0
0
0
0
0
580
0
-3
68
d77a9435e14e5c753502dcfcf288ce489b27fd71
866
py
Python
test.py
hec44/SCAN-reproduction
a08c06bfdc236fbad7a2dde6406f50063d37f272
[ "Apache-2.0" ]
null
null
null
test.py
hec44/SCAN-reproduction
a08c06bfdc236fbad7a2dde6406f50063d37f272
[ "Apache-2.0" ]
null
null
null
test.py
hec44/SCAN-reproduction
a08c06bfdc236fbad7a2dde6406f50063d37f272
[ "Apache-2.0" ]
null
null
null
#test.py import os cwd = os.getcwd()
22.789474
61
0.676674
#test.py import os import torch from tqdm import tqdm import pdb from sklearn.metrics import accuracy_score cwd = os.getcwd() def test(model, test_iter,eos_index): model.eval() y_true=[] y_pred=[] with torch.no_grad(): for _, batch in tqdm(enumerate(test_iter)): src = batch.src trg = batch.trg ou...
0
0
0
0
0
715
0
1
111
ad7cd1795f52e54967b02573af53f0059f4821f6
368
py
Python
feed/migrations/0008_auto_20210309_0107.py
notabela-org/project-1-photoshare-GarlandQ
cd50d16beebfc5b68d6efc0c773ae03ef9c79993
[ "Apache-2.0" ]
2
2021-04-13T04:16:26.000Z
2021-06-18T03:58:20.000Z
feed/migrations/0008_auto_20210309_0107.py
notabela-org/project-1-photoshare-GarlandQ
cd50d16beebfc5b68d6efc0c773ae03ef9c79993
[ "Apache-2.0" ]
null
null
null
feed/migrations/0008_auto_20210309_0107.py
notabela-org/project-1-photoshare-GarlandQ
cd50d16beebfc5b68d6efc0c773ae03ef9c79993
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.1.6 on 2021-03-09 06:07
19.368421
47
0.589674
# Generated by Django 3.1.6 on 2021-03-09 06:07 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('feed', '0007_auto_20210309_0016'), ] operations = [ migrations.RenameField( model_name='comments', old_name='userComment', ...
0
0
0
262
0
0
0
11
46
da81777a2bb920e6b2fc03468c1c0b91ecf57298
265
py
Python
Chapter09/dataservice/views/swagger.py
surinkim/Python-Microservices-Development
6195c0f0190af2d1274e1e4a7fce35699a4231e0
[ "MIT" ]
208
2017-07-27T03:25:55.000Z
2022-03-31T06:33:20.000Z
Chapter09/dataservice/views/swagger.py
mohamedndiaye/Python-Microservices-Development
ba3d3e845b2345765c9873f742e15ae9e6e49e27
[ "MIT" ]
3
2018-11-29T13:48:06.000Z
2021-08-23T00:57:13.000Z
Chapter09/dataservice/views/swagger.py
mohamedndiaye/Python-Microservices-Development
ba3d3e845b2345765c9873f742e15ae9e6e49e27
[ "MIT" ]
110
2017-07-27T03:11:54.000Z
2021-12-30T01:49:51.000Z
import os from flakon import SwaggerBlueprint HERE = os.path.dirname(__file__) YML = os.path.join(HERE, '..', 'static', 'api.yaml') api = SwaggerBlueprint('API', __name__, swagger_spec=YML)
20.384615
57
0.70566
import os from flakon import SwaggerBlueprint HERE = os.path.dirname(__file__) YML = os.path.join(HERE, '..', 'static', 'api.yaml') api = SwaggerBlueprint('API', __name__, swagger_spec=YML) @api.operation('getUserIds') def get_user_ids(): return {'one': 2}
0
49
0
0
0
0
0
0
23
fbee2df6f0d129c6ff243bead8dd575ce4c0619f
2,897
py
Python
experiences/test.py
renoc/django-experience
5cd6bcb85e8375186e068779d4e7a3207e01d57e
[ "0BSD" ]
null
null
null
experiences/test.py
renoc/django-experience
5cd6bcb85e8375186e068779d4e7a3207e01d57e
[ "0BSD" ]
null
null
null
experiences/test.py
renoc/django-experience
5cd6bcb85e8375186e068779d4e7a3207e01d57e
[ "0BSD" ]
null
null
null
#Add to settings file #TESTING = 'test' in sys.argv #if TESTING: # INSTALLED_APPS += ['experiences.exptests',]
33.298851
80
0.691405
from django.core.exceptions import MultipleObjectsReturned from django.test import TestCase from model_mommy import mommy import mox from .models import Experience, Rating, Review, SubjectiveMixin from .exptests.models import Reviewed_Item #Add to settings file #TESTING = 'test' in sys.argv #if TESTING: # INSTALLED...
0
0
0
2,446
0
0
0
108
225
1aacdc1f6866ff3becc25912681daa3fbcf07903
327
py
Python
config.py
aravindc/offermgmt
caf19c928e5f60bb27e6d9e8c61f5134b840ff0d
[ "Apache-2.0" ]
null
null
null
config.py
aravindc/offermgmt
caf19c928e5f60bb27e6d9e8c61f5134b840ff0d
[ "Apache-2.0" ]
7
2018-09-03T16:49:40.000Z
2018-09-21T09:59:37.000Z
config.py
aravindc/offermgmt
caf19c928e5f60bb27e6d9e8c61f5134b840ff0d
[ "Apache-2.0" ]
null
null
null
import os basedir = os.path.abspath(os.path.dirname(__file__))
25.153846
65
0.70948
import os import secrets basedir = os.path.abspath(os.path.dirname(__file__)) class Config(object): SECRET_KEY = secrets.token_hex(16) SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \ 'sqlite:///' + os.path.join(basedir, 'offer.db') SQLALCHEMY_TRACK_MODIFICATIONS = False SEED_DB ...
0
0
0
224
0
0
0
-7
45
32c080540398fa2583b1b4c909570fbea7b3f833
3,776
py
Python
examples/arkane/networks/CH2NH2/input.py
tza0035/RMG-Py
38c49f7107d1b19e4a534408a1040ddd313b8596
[ "MIT" ]
250
2015-06-06T23:32:00.000Z
2022-03-22T16:45:16.000Z
examples/arkane/networks/CH2NH2/input.py
tza0035/RMG-Py
38c49f7107d1b19e4a534408a1040ddd313b8596
[ "MIT" ]
1,781
2015-05-26T23:52:00.000Z
2022-03-31T19:07:54.000Z
examples/arkane/networks/CH2NH2/input.py
tza0035/RMG-Py
38c49f7107d1b19e4a534408a1040ddd313b8596
[ "MIT" ]
161
2015-06-02T14:28:59.000Z
2022-03-02T19:37:14.000Z
#!/usr/bin/env python3 # encoding: utf-8 title = 'CH2NH2 PES' description = """ Calculations done using ARC at the following levels of theory: opt: wb97xd/6-311++g(d,p) freq: wb97xd/6-311++g(d,p) sp: ccsd(t)-f12/cc-pvqz-f12 1D rotor scans: wb97xd/6-311++g(d,p) """ modelChemistry = "CCSD(T)-F12/cc-pvqz-f12...
38.141414
459
0.63321
#!/usr/bin/env python3 # encoding: utf-8 title = 'CH2NH2 PES' description = """ Calculations done using ARC at the following levels of theory: opt: wb97xd/6-311++g(d,p) freq: wb97xd/6-311++g(d,p) sp: ccsd(t)-f12/cc-pvqz-f12 1D rotor scans: wb97xd/6-311++g(d,p) """ modelChemistry = "CCSD(T)-F12/cc-pvqz-f12...
0
0
0
0
0
0
0
0
0
e0921958fa0b5a000b7535b37c682d6b616f75e8
6,358
py
Python
netlayers.py
DFrankTech/csc321
712c6de9dd575d5b721ac0508c1a7eafed152954
[ "MIT" ]
null
null
null
netlayers.py
DFrankTech/csc321
712c6de9dd575d5b721ac0508c1a7eafed152954
[ "MIT" ]
null
null
null
netlayers.py
DFrankTech/csc321
712c6de9dd575d5b721ac0508c1a7eafed152954
[ "MIT" ]
null
null
null
import re import platform import toolz.curried as _ import larc log = larc.logging.new_log(__name__) ip_re = r'\d+\.\d+\.\d+\.\d+' float_re = r'[+-]?(?:[0-9]*[.])?[0-9]+' getoutput = larc.shell.getoutput(echo=False) win_mac_conv = mac_conv('-') macos_mac_conv = mac_conv(':') # ----------------------...
28.9
78
0.486316
import re import platform import requests import toolz.curried as _ import larc import larc.common as __ log = larc.logging.new_log(__name__) ip_re = r'\d+\.\d+\.\d+\.\d+' float_re = r'[+-]?(?:[0-9]*[.])?[0-9]+' getoutput = larc.shell.getoutput(echo=False) def lookup_mac(mac): return _.pipe( ...
0
542
0
0
0
2,577
0
-3
323
25bacea2848ea6604a3aa1e4763e116caa3ac7a6
567
py
Python
ressl.py
jezdez/ressl
513e03bfe06fc7e38e0246998d69b9ff802d77d4
[ "BSD-3-Clause" ]
null
null
null
ressl.py
jezdez/ressl
513e03bfe06fc7e38e0246998d69b9ff802d77d4
[ "BSD-3-Clause" ]
null
null
null
ressl.py
jezdez/ressl
513e03bfe06fc7e38e0246998d69b9ff802d77d4
[ "BSD-3-Clause" ]
null
null
null
import os from importd import d __version__ = '0.2.1' d( DEBUG='RESSL_DEBUG' in os.environ, INSTALLED_APPS=['djangosecure'], MIDDLEWARE_CLASSES=['djangosecure.middleware.SecurityMiddleware'], SECURE_SSL_REDIRECT=True, SECURE_PROXY_SSL_HEADER=( os.environ.get('RESSL_PROXY_PROTOCOL', 'HTTP_X...
21.807692
76
0.664903
import os from importd import d __version__ = '0.2.1' d( DEBUG='RESSL_DEBUG' in os.environ, INSTALLED_APPS=['djangosecure'], MIDDLEWARE_CLASSES=['djangosecure.middleware.SecurityMiddleware'], SECURE_SSL_REDIRECT=True, SECURE_PROXY_SSL_HEADER=( os.environ.get('RESSL_PROXY_PROTOCOL', 'HTTP_X...
0
0
0
0
0
0
0
0
0
79365befca43db00903defee7747f4b53010c43d
1,447
py
Python
tests/logging_setup.py
ranking-agent/simple-kp
956c7d87228b75ea344dfc23475a02ba8bf07e4a
[ "MIT" ]
null
null
null
tests/logging_setup.py
ranking-agent/simple-kp
956c7d87228b75ea344dfc23475a02ba8bf07e4a
[ "MIT" ]
11
2021-07-28T20:43:01.000Z
2022-01-27T00:10:49.000Z
tests/logging_setup.py
ranking-agent/simple-kp
956c7d87228b75ea344dfc23475a02ba8bf07e4a
[ "MIT" ]
1
2021-01-15T18:45:01.000Z
2021-01-15T18:45:01.000Z
"""Logging setup.""" import logging def setup_logger(): """Set up Strider logger.""" logger = logging.getLogger("binder") logger.setLevel(logging.DEBUG) handler = logging.StreamHandler() handler.setLevel(logging.DEBUG) handler.setFormatter(ColoredFormatter()) logger.addHandler(handler)
33.651163
59
0.648238
"""Logging setup.""" import logging class ColoredFormatter(logging.Formatter): """Colored formatter.""" prefix = "[%(asctime)s: %(levelname)s/%(name)s]:" default = f"{prefix} %(message)s" error_fmt = f"\x1b[31m{prefix}\x1b[0m %(message)s" warning_fmt = f"\x1b[33m{prefix}\x1b[0m %(message)s" i...
0
0
0
1,106
0
0
0
0
23
6f696815f75c629bee5fa5efeabfc821330d60c7
48,343
py
Python
test-runner/adapters/rest/generated/e2erestapi/aio/operations_async/_device_operations_async.py
brycewang-microsoft/iot-sdks-e2e-fx
211c9c2615a82076bda02a27152d67366755edbf
[ "MIT" ]
null
null
null
test-runner/adapters/rest/generated/e2erestapi/aio/operations_async/_device_operations_async.py
brycewang-microsoft/iot-sdks-e2e-fx
211c9c2615a82076bda02a27152d67366755edbf
[ "MIT" ]
null
null
null
test-runner/adapters/rest/generated/e2erestapi/aio/operations_async/_device_operations_async.py
brycewang-microsoft/iot-sdks-e2e-fx
211c9c2615a82076bda02a27152d67366755edbf
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- from ...
41.891681
149
0.666777
# coding=utf-8 # -------------------------------------------------------------------------- # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- from ...
0
0
44,824
3,061
0
0
0
51
68
bee184275645efceae5bb1b600be7100b11c82b9
2,810
py
Python
arithmetic4py/src/pca/pca.py
gwdgithubnom/monkey-clever
05290c33f7f2cf1de752e68f99464b92c02a9faf
[ "MIT" ]
null
null
null
arithmetic4py/src/pca/pca.py
gwdgithubnom/monkey-clever
05290c33f7f2cf1de752e68f99464b92c02a9faf
[ "MIT" ]
null
null
null
arithmetic4py/src/pca/pca.py
gwdgithubnom/monkey-clever
05290c33f7f2cf1de752e68f99464b92c02a9faf
[ "MIT" ]
1
2021-04-14T00:45:38.000Z
2021-04-14T00:45:38.000Z
# -*- coding: utf-8 -*- """ Created on Sun Feb 28 10:04:26 2016 PCA source code @author: liudiwei """ #,numpy #,numpy #,numpy """ - XMatnumpy - kk - finalData - reconData """ # #http://www.cnblogs.com/jerrylead/archive/2011/04/18/2020209.html #data.txt if __name__ == "__main__": ...
26.018519
78
0.604982
# -*- coding: utf-8 -*- """ Created on Sun Feb 28 10:04:26 2016 PCA source code @author: liudiwei """ import numpy as np import pandas as pd import matplotlib.pyplot as plt #计算均值,要求输入数据为numpy的矩阵格式,行表示样本数,列表示特征 def meanX(dataX): return np.mean(dataX,axis=0)#axis=0表示按照列来求均值,如果输入list,则axis=1 #计算方差,传入的是一个numpy的...
810
0
0
0
0
1,903
0
5
246
4e7b3df9f6efef28f2c5c30d26d583837f52e510
736
py
Python
ch02/random_sort.py
laszlokiraly/LearningAlgorithms
032a3cc409546619cf41220821d081cde54bbcce
[ "MIT" ]
74
2021-05-06T22:03:18.000Z
2022-03-25T04:37:51.000Z
ch02/random_sort.py
laszlokiraly/LearningAlgorithms
032a3cc409546619cf41220821d081cde54bbcce
[ "MIT" ]
null
null
null
ch02/random_sort.py
laszlokiraly/LearningAlgorithms
032a3cc409546619cf41220821d081cde54bbcce
[ "MIT" ]
19
2021-07-16T11:42:00.000Z
2022-03-22T00:25:49.000Z
"""Unusually poor sorting algorithms that work (eventually).""" from random import shuffle from itertools import permutations from algs.sorting import check_sorted def random_sort(A): """ Randomly shuffle A until it is sorted. This can take arbitrarily long and may never actually produce the sorted ans...
29.44
63
0.669837
"""Unusually poor sorting algorithms that work (eventually).""" from random import shuffle from itertools import permutations from algs.sorting import check_sorted def random_sort(A): """ Randomly shuffle A until it is sorted. This can take arbitrarily long and may never actually produce the sorted ans...
0
0
0
0
0
0
0
0
0
cd06d4fb3bad80f7073d4033a8b265e99ccb5db7
12,815
py
Python
agent.py
Tbarkin121/CubeBot
02a96f5d71a27c9a8b1b6a6433f46d2ee7d8cc09
[ "MIT" ]
null
null
null
agent.py
Tbarkin121/CubeBot
02a96f5d71a27c9a8b1b6a6433f46d2ee7d8cc09
[ "MIT" ]
null
null
null
agent.py
Tbarkin121/CubeBot
02a96f5d71a27c9a8b1b6a6433f46d2ee7d8cc09
[ "MIT" ]
null
null
null
""" File holds self contained TRPO agent. """
40.942492
80
0.576824
""" File holds self contained TRPO agent. """ import torch import gym from numpy.random import choice from copy import deepcopy from torch.nn.utils.convert_parameters import parameters_to_vector from torch.nn.utils.convert_parameters import vector_to_parameters class TRPOAgent: """Continuous TRPO agent.""" d...
0
0
0
12,530
0
0
0
84
155
0c3731a5929b3654cab95e479a340a8a74f99486
299
py
Python
demo_beginner_asyncio/resources.py
vivekvashist/demo-beginner-concurrency
1fb926e39671db1f44514fd500bc646060dbc23c
[ "MIT" ]
20
2022-02-22T17:17:28.000Z
2022-03-30T07:54:01.000Z
demo_beginner_asyncio/resources.py
vivekvashist/demo-beginner-concurrency
1fb926e39671db1f44514fd500bc646060dbc23c
[ "MIT" ]
null
null
null
demo_beginner_asyncio/resources.py
vivekvashist/demo-beginner-concurrency
1fb926e39671db1f44514fd500bc646060dbc23c
[ "MIT" ]
9
2022-02-22T17:09:23.000Z
2022-03-24T17:49:00.000Z
#!/usr/bin/env python import multiprocessing import resource max_cpu_cores = multiprocessing.cpu_count() print(f"Max CPU cores for multiprocessing: {max_cpu_cores}") max_open_files = resource.getrlimit(resource.RLIMIT_NOFILE)[0] print(f"Max Open Files/Sockets for asyncio IO: {max_open_files:,}")
29.9
67
0.799331
#!/usr/bin/env python import multiprocessing import resource max_cpu_cores = multiprocessing.cpu_count() print(f"Max CPU cores for multiprocessing: {max_cpu_cores}") max_open_files = resource.getrlimit(resource.RLIMIT_NOFILE)[0] print(f"Max Open Files/Sockets for asyncio IO: {max_open_files:,}")
0
0
0
0
0
0
0
0
0
1295fcc2c5a3a41c602c154b493a117422193770
2,808
py
Python
filter_plugins/uwsgi_yaml.py
nuwang/ansible-galaxy
b9575d756d42fcd3d8266238c0c9d2a055424341
[ "AFL-1.1" ]
44
2015-01-29T20:52:14.000Z
2022-03-26T02:18:03.000Z
filter_plugins/uwsgi_yaml.py
almahmoud/ansible-galaxy
d9ccc5af79744ba10270ad824b81175ccb367d0b
[ "AFL-1.1" ]
110
2015-01-29T18:19:06.000Z
2022-02-16T09:22:20.000Z
filter_plugins/uwsgi_yaml.py
almahmoud/ansible-galaxy
d9ccc5af79744ba10270ad824b81175ccb367d0b
[ "AFL-1.1" ]
88
2015-01-29T20:52:16.000Z
2022-03-26T02:18:05.000Z
from __future__ import absolute_import
36.947368
117
0.605413
from __future__ import absolute_import import yaml from ansible.errors import AnsibleError from ansible.module_utils.six import string_types from ansible.plugins.filter.core import to_nice_yaml def _strip_quotes(item): # uWSGI internal parser treats everything as a string and doesn't understand quoting k, v...
0
0
0
100
1,582
810
0
67
205
9f96f257054372b3cb55dd638c65e3abf346218b
226
py
Python
bot.py
kcc343/sylph_bot
c68c503894d2cb7d409917e035ab7027c0aa8fed
[ "MIT" ]
null
null
null
bot.py
kcc343/sylph_bot
c68c503894d2cb7d409917e035ab7027c0aa8fed
[ "MIT" ]
3
2019-01-13T23:54:13.000Z
2019-06-15T18:16:24.000Z
bot.py
kcc343/sylph_bot
c68c503894d2cb7d409917e035ab7027c0aa8fed
[ "MIT" ]
null
null
null
from discord.ext import commands from bot_key import bot_key client = commands.Bot(command_prefix = '.') client.run(bot_key)
20.545455
43
0.752212
import discord from discord.ext import commands from bot_key import bot_key client = commands.Bot(command_prefix = '.') @client.event async def on_ready(): # Ready state for bot print("Bot is ready") client.run(bot_key)
0
62
0
0
0
0
0
-7
45
809e6e90b1c77fbb5f246ba000eb1e97ae1114f3
6,410
py
Python
RainbowFileReaders/RSEMaterialDefinition.py
RainbowRedux/RainbowSixFileConverters
1f755f781ee85af068ba7bcc73d4960998363794
[ "MIT" ]
6
2020-03-28T14:32:25.000Z
2022-02-03T00:41:24.000Z
RainbowFileReaders/RSEMaterialDefinition.py
RainbowRedux/RainbowSixFileConverters
1f755f781ee85af068ba7bcc73d4960998363794
[ "MIT" ]
46
2020-03-20T06:27:30.000Z
2022-03-11T23:36:12.000Z
RainbowFileReaders/RSEMaterialDefinition.py
RainbowRedux/RainbowSixFileConverters
1f755f781ee85af068ba7bcc73d4960998363794
[ "MIT" ]
4
2020-02-09T01:55:44.000Z
2020-07-22T12:52:43.000Z
"""Provides classes that will read and parse Material definitions and related information in RSE game formats.""" import logging log = logging.getLogger(__name__)
46.449275
157
0.709204
"""Provides classes that will read and parse Material definitions and related information in RSE game formats.""" import logging from typing import List from RainbowFileReaders.R6Constants import RSEGameVersions, RSEMaterialFormatConstants from RainbowFileReaders.MathHelpers import normalize_color, unnormalize_color ...
0
0
0
5,799
0
0
0
288
158
b25e80d15af321dd494a748fc8a9dc3bd67ec6f4
2,081
py
Python
setup.py
IoTtalk/EduTalk
76f4e7bb5984a2b530fe4be5ce5a4ae305c229f7
[ "MIT" ]
null
null
null
setup.py
IoTtalk/EduTalk
76f4e7bb5984a2b530fe4be5ce5a4ae305c229f7
[ "MIT" ]
1
2021-11-24T09:23:24.000Z
2021-11-24T13:47:10.000Z
setup.py
IoTtalk/EduTalk
76f4e7bb5984a2b530fe4be5ce5a4ae305c229f7
[ "MIT" ]
null
null
null
import os from setuptools import find_packages, setup import edutalk BASE_DIR = os.path.dirname(__file__) REQUIRES, DEP_LINKS = get_dep_links() setup( name='edutalk', version=edutalk.version, author='The EduTalk Team', author_email='edutalk@pcs.cs.nctu.edu.tw', url='https://gitlab.com/IoT...
25.691358
77
0.647285
import os import sys from setuptools import find_packages, setup from setuptools.command.test import test as TestCommand import edutalk BASE_DIR = os.path.dirname(__file__) class PyTest(TestCommand): user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")] def initialize_options(self): ...
0
0
0
503
0
490
0
23
159
35610bdfa0364024dbb4a321480c73f9901b8ecf
4,871
py
Python
models/train_classifier.py
ajplummer/disaster-response-pipeline-ds
4681fde3a5cc28707beee2fc430de1c51312bc52
[ "RSA-MD" ]
null
null
null
models/train_classifier.py
ajplummer/disaster-response-pipeline-ds
4681fde3a5cc28707beee2fc430de1c51312bc52
[ "RSA-MD" ]
null
null
null
models/train_classifier.py
ajplummer/disaster-response-pipeline-ds
4681fde3a5cc28707beee2fc430de1c51312bc52
[ "RSA-MD" ]
null
null
null
# download necessary NLTK data import nltk nltk.download(['punkt', 'wordnet']) # import libraries import pandas as pd import pickle from sqlalchemy import create_engine from nltk.tokenize import word_tokenize from nltk.stem import WordNetLemmatizer from sklearn.pipeline import Pipeline from sklearn.metrics import cl...
27.365169
103
0.686512
import sys # download necessary NLTK data import nltk nltk.download(['punkt', 'wordnet']) # import libraries import numpy as np import pandas as pd import pickle from sqlalchemy import create_engine from nltk.tokenize import word_tokenize from nltk.stem import WordNetLemmatizer from sklearn.pipeline import Pipeline,...
0
0
0
0
0
1,013
0
51
89
0a3b399f19585f5efe944ee233d2a4796481c191
7,601
py
Python
tests/test_gpio.py
notro/pico-usb-io-board
4254e599ee6d3ae4b7be9b6ee0407ee69de23dcf
[ "CC0-1.0" ]
2
2021-12-01T10:39:06.000Z
2021-12-08T10:46:14.000Z
tests/test_gpio.py
notro/pico-usb-io-board
4254e599ee6d3ae4b7be9b6ee0407ee69de23dcf
[ "CC0-1.0" ]
null
null
null
tests/test_gpio.py
notro/pico-usb-io-board
4254e599ee6d3ae4b7be9b6ee0407ee69de23dcf
[ "CC0-1.0" ]
3
2021-12-01T10:39:08.000Z
2022-03-05T05:37:20.000Z
# SPDX-License-Identifier: CC0-1.0 # # Written in 2021 by Noralf Trnnes <noralf@tronnes.org> # # To the extent possible under law, the author(s) have dedicated all copyright and related and # neighboring rights to this software to the public domain worldwide. This software is # distributed without any warranty. # # You...
31.670833
114
0.646494
# SPDX-License-Identifier: CC0-1.0 # # Written in 2021 by Noralf Trønnes <noralf@tronnes.org> # # To the extent possible under law, the author(s) have dedicated all copyright and related and # neighboring rights to this software to the public domain worldwide. This software is # distributed without any warranty. # # Yo...
2
2,277
0
0
0
3,455
0
-39
545
6b1efe7c733cfac21b40f42bc92680eb32d497db
1,550
py
Python
discovery-provider/src/api/v1/models/activities.py
atticwip/audius-protocol
9758e849fae01508fa1d27675741228b11533e6e
[ "Apache-2.0" ]
429
2019-08-14T01:34:07.000Z
2022-03-30T06:31:38.000Z
discovery-provider/src/api/v1/models/activities.py
SNOmad1/audius-protocol
3d5fc2bf688265eb529060f1f3234ef2b95ed231
[ "Apache-2.0" ]
998
2019-08-14T01:52:37.000Z
2022-03-31T23:17:22.000Z
discovery-provider/src/api/v1/models/activities.py
SNOmad1/audius-protocol
3d5fc2bf688265eb529060f1f3234ef2b95ed231
[ "Apache-2.0" ]
73
2019-10-04T04:24:16.000Z
2022-03-24T16:27:30.000Z
from flask_restx import fields from .common import ns activity_model = ns.model( "activity", { "timestamp": fields.String(allow_null=True), "item_type": ItemType, "item": ActivityItem, }, ) activity_model_full = ns.model( "activity_full", { "timestamp": fields.S...
27.192982
72
0.624516
from flask_restx import fields from flask_restx.fields import MarshallingError from flask_restx.marshalling import marshal from .common import ns from .tracks import track, track_full from .playlists import playlist_model, full_playlist_model class ItemType(fields.Raw): def format(self, value): if value =...
0
0
0
874
0
0
0
101
157
01a00f09dacc196c99c29da6caf70a242a9b5d01
7,775
py
Python
src/goodboy/types/dates.py
andryunin/goodboy
66ba803630e149d00bcb9c40a0aa0586c97ef48a
[ "MIT" ]
null
null
null
src/goodboy/types/dates.py
andryunin/goodboy
66ba803630e149d00bcb9c40a0aa0586c97ef48a
[ "MIT" ]
null
null
null
src/goodboy/types/dates.py
andryunin/goodboy
66ba803630e149d00bcb9c40a0aa0586c97ef48a
[ "MIT" ]
null
null
null
from __future__ import annotations from typing import TypeVar D = TypeVar("D")
34.555556
122
0.621865
from __future__ import annotations from abc import abstractmethod from datetime import date, datetime from typing import Any, Generic, Optional, TypeVar, Union from goodboy.errors import Error from goodboy.messages import DEFAULT_MESSAGES, MessageCollectionType, type_name from goodboy.schema import Rule, SchemaWithUt...
0
134
0
7,227
0
0
0
150
181
563ab9212390e5ddd0241559fda8957226c9728e
1,745
py
Python
unit_tests/test_socket.py
singleswitch/ticker
1e793316f2a3252d80339a69672ad81df550875d
[ "MIT" ]
null
null
null
unit_tests/test_socket.py
singleswitch/ticker
1e793316f2a3252d80339a69672ad81df550875d
[ "MIT" ]
1
2018-11-06T09:30:23.000Z
2018-11-06T09:30:23.000Z
unit_tests/test_socket.py
singleswitch/ticker
1e793316f2a3252d80339a69672ad81df550875d
[ "MIT" ]
1
2019-01-23T14:46:11.000Z
2019-01-23T14:46:11.000Z
from sys import exit, argv from PyQt4 import QtGui global port port = 20320 if __name__ == "__main__": app = QtGui.QApplication(argv) receiver = Receiver() sender = Sender() sender.show() exit( app.exec_())
33.557692
106
0.640688
from sys import stdin, exit, argv import os from PyQt4 import QtCore, QtGui, QtNetwork global port port = 20320 class Receiver(): def __init__(self): self.socket = QtNetwork.QUdpSocket() is_socket = self.socket.bind(QtNetwork.QHostAddress(0), port) print "is_socket = ", is_socket ...
0
0
0
1,407
0
0
0
14
77
a34ee6b05dc27bf0882cac3fc7aafd0d6ac5ae36
6,834
py
Python
mezzanine/forms/models.py
agepoly/mezzanine
59d891483d2b58184cac6714068e843e22a0716d
[ "BSD-2-Clause" ]
null
null
null
mezzanine/forms/models.py
agepoly/mezzanine
59d891483d2b58184cac6714068e843e22a0716d
[ "BSD-2-Clause" ]
1
2015-10-01T18:22:53.000Z
2021-03-06T12:13:31.000Z
mezzanine/forms/models.py
agepoly/mezzanine
59d891483d2b58184cac6714068e843e22a0716d
[ "BSD-2-Clause" ]
null
null
null
from __future__ import unicode_literals
37.966667
212
0.656277
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext, ugettext_lazy as _ from mezzanine.conf import settings from mezzanine.core.fields import RichTextField from mezzanine.core.models import Ord...
0
2,114
0
4,164
0
0
0
194
316
2ef860de031922afa92a32922e32d3794bc07150
46,928
py
Python
llama_sinfoni_tools.py
ttshimiz/llama-sinfoni-tools
99bbafe4b2d28e477bf6743759d1059193af6d80
[ "BSD-3-Clause" ]
null
null
null
llama_sinfoni_tools.py
ttshimiz/llama-sinfoni-tools
99bbafe4b2d28e477bf6743759d1059193af6d80
[ "BSD-3-Clause" ]
null
null
null
llama_sinfoni_tools.py
ttshimiz/llama-sinfoni-tools
99bbafe4b2d28e477bf6743759d1059193af6d80
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri Nov 18 15:56:56 2016 @author: ttshimiz """ import numpy as np import pandas as pd import astropy.units as u import astropy.constants as c import astropy.io.fits as fits import astropy.modeling as apy_mod import astropy.convolution as apy_conv import astropy.coordinates as ap...
36.321981
140
0.614495
# -*- coding: utf-8 -*- """ Created on Fri Nov 18 15:56:56 2016 @author: ttshimiz """ import numpy as np import pandas as pd import astropy.units as u import astropy.constants as c import astropy.io.fits as fits import astropy.modeling as apy_mod import astropy.convolution as apy_conv import astropy.coordinates as ap...
0
0
0
0
0
4,204
0
0
115
5a18bffea0b27de4e77bb7050530946eedb68645
19,607
py
Python
core/polyaxon/tracking/run.py
gregmbi/polyaxon
8f24089fa9cb5df28fc7b70aec27d6d23ee81e8d
[ "Apache-2.0" ]
null
null
null
core/polyaxon/tracking/run.py
gregmbi/polyaxon
8f24089fa9cb5df28fc7b70aec27d6d23ee81e8d
[ "Apache-2.0" ]
null
null
null
core/polyaxon/tracking/run.py
gregmbi/polyaxon
8f24089fa9cb5df28fc7b70aec27d6d23ee81e8d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Copyright 2018-2020 Polyaxon, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
30.588144
88
0.609527
#!/usr/bin/python # # Copyright 2018-2020 Polyaxon, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
0
17,083
0
0
0
0
0
594
1,325
e442759c2b1615aca0b1bdced3b2bf658dd16bd5
1,445
py
Python
src/probflow/utils/io.py
chiragnagpal/probflow
1ba0619cd4f482a015cd25633d2f113d5d0f3476
[ "MIT" ]
134
2019-02-18T09:45:35.000Z
2022-03-26T22:17:34.000Z
src/probflow/utils/io.py
chiragnagpal/probflow
1ba0619cd4f482a015cd25633d2f113d5d0f3476
[ "MIT" ]
44
2019-04-18T17:41:33.000Z
2021-09-14T00:40:55.000Z
src/probflow/utils/io.py
chiragnagpal/probflow
1ba0619cd4f482a015cd25633d2f113d5d0f3476
[ "MIT" ]
18
2019-10-17T05:45:16.000Z
2022-03-03T11:58:02.000Z
"""Functions for saving and loading ProbFlow objects""" import base64 import cloudpickle __all__ = [ "dumps", "loads", "dump", "load", ] def dumps(obj): """Serialize a probflow object to a json-safe string. Note ---- This removes the compiled ``_train_fn`` attribute of a |Model| w...
26.272727
76
0.66436
"""Functions for saving and loading ProbFlow objects""" import base64 import cloudpickle __all__ = [ "dumps", "loads", "dump", "load", ] def dumps(obj): """Serialize a probflow object to a json-safe string. Note ---- This removes the compiled ``_train_fn`` attribute of a |Model| w...
0
0
0
0
0
0
0
0
0
874d269bf7e0130de4a0365dbc3ad240b763b380
852
py
Python
server/server.py
ueFAUrensics/UEberForensIcs
dea858856a24d50c1b49ecec1ced7b290a1fa138
[ "MIT" ]
2
2021-03-31T14:15:56.000Z
2021-08-07T16:45:49.000Z
server/server.py
ueFAUrensics/UEberForensIcs
dea858856a24d50c1b49ecec1ced7b290a1fa138
[ "MIT" ]
null
null
null
server/server.py
ueFAUrensics/UEberForensIcs
dea858856a24d50c1b49ecec1ced7b290a1fa138
[ "MIT" ]
2
2021-06-18T19:06:18.000Z
2021-11-01T01:30:40.000Z
#!/usr/bin/env python3 import socket HOST = '' # Use default address PORT = 42424 # Port to listen on (non-privileged ports are > 1023) Number = -1 with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: s.bind((HOST, PORT)) s.listen() print ("Starting server") while True: try...
27.483871
98
0.481221
#!/usr/bin/env python3 import socket HOST = '' # Use default address PORT = 42424 # Port to listen on (non-privileged ports are > 1023) Number = -1 with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: s.bind((HOST, PORT)) s.listen() print ("Starting server") while True: try...
0
0
0
0
0
0
0
0
0
aa77ab63e8a287091c3db103114858eab4a5639e
205
py
Python
HackerRank/Python/Easy/E0051.py
Mohammed-Shoaib/HackerRank-Problems
ccfb9fc2f0d8dff454439d75ce519cf83bad7c3b
[ "MIT" ]
54
2019-05-13T12:13:09.000Z
2022-02-27T02:59:00.000Z
HackerRank/Python/Easy/E0051.py
Mohammed-Shoaib/HackerRank-Problems
ccfb9fc2f0d8dff454439d75ce519cf83bad7c3b
[ "MIT" ]
2
2020-10-02T07:16:43.000Z
2020-10-19T04:36:19.000Z
HackerRank/Python/Easy/E0051.py
Mohammed-Shoaib/HackerRank-Problems
ccfb9fc2f0d8dff454439d75ce519cf83bad7c3b
[ "MIT" ]
20
2020-05-26T09:48:13.000Z
2022-03-18T15:18:27.000Z
# Problem Statement: https://www.hackerrank.com/challenges/zipped/problem N, X = map(int, input().split()) l = [map(float, input().split()) for _ in range(X)] for scores in zip(*l): print(sum(scores)/X)
29.285714
73
0.678049
# Problem Statement: https://www.hackerrank.com/challenges/zipped/problem N, X = map(int, input().split()) l = [map(float, input().split()) for _ in range(X)] for scores in zip(*l): print(sum(scores)/X)
0
0
0
0
0
0
0
0
0
ce548549d0ad32119b17f09d6b452e7d328dd7b3
9,055
py
Python
versioner.py
AnickaBurova/versioner
5a9e9c24ea11b652d99bcf4a81b0e6491de9608f
[ "MIT" ]
null
null
null
versioner.py
AnickaBurova/versioner
5a9e9c24ea11b652d99bcf4a81b0e6491de9608f
[ "MIT" ]
5
2017-07-05T07:49:21.000Z
2017-07-13T23:42:59.000Z
versioner.py
AnickaBurova/versioner
5a9e9c24ea11b652d99bcf4a81b0e6491de9608f
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: versioner.py # Author: Anicka Burova <anicka.burova@gmail.com> # Date: 13.07.2017 # Last Modified Date: 03.08.2017 # Last Modified By: Anicka Burova <anicka.burova@gmail.com> # # versioner.py # Copyright (c) 2017 Anicka Burova <anicka.burova@gmail.com> # # Permissio...
34.693487
123
0.573274
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: versioner.py # Author: Anicka Burova <anicka.burova@gmail.com> # Date: 13.07.2017 # Last Modified Date: 03.08.2017 # Last Modified By: Anicka Burova <anicka.burova@gmail.com> # # versioner.py # Copyright (c) 2017 Anicka Burova <anicka.burova@gmail.com> # # Permissio...
0
746
0
133
0
464
0
0
46
2d30cb551d48e32d9079e07943a7e87ad323c6aa
385
py
Python
Problems/12_howSum_tabulation.py
v4n5h4j/dynamic-programming-python
4b4240277d7e918de43735ec53d7b4c0deab265f
[ "MIT" ]
null
null
null
Problems/12_howSum_tabulation.py
v4n5h4j/dynamic-programming-python
4b4240277d7e918de43735ec53d7b4c0deab265f
[ "MIT" ]
null
null
null
Problems/12_howSum_tabulation.py
v4n5h4j/dynamic-programming-python
4b4240277d7e918de43735ec53d7b4c0deab265f
[ "MIT" ]
null
null
null
print(howSum(7, [2,3])) print(howSum(7, [5,3,4,7])) print(howSum(7, [2,4])) print(howSum(8, [2,3,5])) print(howSum(300, [7,14]))
21.388889
43
0.6
def howSum(targetSum, numbers): tab = [None for _ in range(targetSum + 1)] tab[0] = [] for i in range(targetSum+1): if tab[i] is not None: for num in numbers: if (i+num <= targetSum): tab[i+num] = [*tab[i], num] return tab[targetSum] print(howSum(7, [2,3])) print(howSum(7, [5,3,4,7])) print(howSu...
0
0
0
0
0
234
0
0
22
1808174a80cc032c79106d7d0ec79cdea836c22f
8,763
py
Python
workspace_usage/get_workspace_usage.py
siddharthaturbot/tdk
0a1435618e20a8d0217de7992b12a811fd5cce00
[ "Apache-2.0" ]
null
null
null
workspace_usage/get_workspace_usage.py
siddharthaturbot/tdk
0a1435618e20a8d0217de7992b12a811fd5cce00
[ "Apache-2.0" ]
null
null
null
workspace_usage/get_workspace_usage.py
siddharthaturbot/tdk
0a1435618e20a8d0217de7992b12a811fd5cce00
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python if __name__ == '__main__': get_workspace_usage()
44.035176
257
0.622504
#!/usr/bin/env python import click import configparser import json import requests from datetime import datetime, timedelta from dateutil import parser def get_date_range(start_date, end_date): date_range = [] parsed_start_date = parser.parse(start_date) parsed_end_date = parser.parse(end_date) delta =...
0
8,167
0
0
0
344
0
-2
178
da956463f2d6eef7a7d8ea1dbb8f8ce666d6cc01
6,069
py
Python
PotesGarrafas.py
lucasrocini/DigitalImageProcessing-PythonOpenCV
e6e377260a665d37d7df6d73160e6d1bcad1a31a
[ "MIT" ]
null
null
null
PotesGarrafas.py
lucasrocini/DigitalImageProcessing-PythonOpenCV
e6e377260a665d37d7df6d73160e6d1bcad1a31a
[ "MIT" ]
null
null
null
PotesGarrafas.py
lucasrocini/DigitalImageProcessing-PythonOpenCV
e6e377260a665d37d7df6d73160e6d1bcad1a31a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sat Oct 31 16:24:19 2020 @author: lucas Rocini """ #modelo sequencial from keras.models import Sequential #camada de convoluo, pooling, flatten e rede neural densa from keras.layers import Conv2D, MaxPooling2D, Flatten, Dense, Dropout #normalizao das caractersticas e ...
34.095506
107
0.563849
# -*- coding: utf-8 -*- """ Created on Sat Oct 31 16:24:19 2020 @author: lucas Rocini """ #modelo sequencial from keras.models import Sequential #camada de convolução, pooling, flatten e rede neural densa from keras.layers import Conv2D, MaxPooling2D, Flatten, Dense, Dropout #normalização das característic...
92
0
0
0
0
0
0
0
0
6aae8a566e0952a0a7f7b9edce7b0fda147148c4
8,264
py
Python
third_party/libSBML-5.9.0-Source/src/bindings/python/test/sbml/TestKineticLaw.py
0u812/roadrunner
f464c2649e388fa1f5a015592b0b29b65cc84b4b
[ "Apache-2.0" ]
5
2015-04-16T14:27:38.000Z
2021-11-30T14:54:39.000Z
third_party/libSBML-5.9.0-Source/src/bindings/python/test/sbml/TestKineticLaw.py
0u812/roadrunner
f464c2649e388fa1f5a015592b0b29b65cc84b4b
[ "Apache-2.0" ]
95
2015-03-06T12:14:06.000Z
2015-03-20T11:15:54.000Z
third_party/libSBML-5.9.0-Source/src/bindings/python/test/sbml/TestKineticLaw.py
0u812/roadrunner
f464c2649e388fa1f5a015592b0b29b65cc84b4b
[ "Apache-2.0" ]
7
2016-05-29T08:12:59.000Z
2019-05-02T13:39:25.000Z
# # @file TestKineticLaw.py # @brief SBML KineticLaw unit tests # # @author Akiya Jouraku (Python conversion) # @author Ben Bornstein # # ====== WARNING ===== WARNING ===== WARNING ===== WARNING ===== WARNING ====== # # DO NOT EDIT THIS FILE. # # This file was generated automatically by converting the file loc...
35.62069
79
0.640731
# # @file TestKineticLaw.py # @brief SBML KineticLaw unit tests # # @author Akiya Jouraku (Python conversion) # @author Ben Bornstein # # ====== WARNING ===== WARNING ===== WARNING ===== WARNING ===== WARNING ====== # # DO NOT EDIT THIS FILE. # # This file was generated automatically by converting the file loc...
0
0
0
6,565
0
90
0
-7
70
a74739626820e9e0386ba9e615a37a664579893a
6,876
py
Python
ararpy/plateau.py
NMGRL/ararpy
ebc79b6510c4c2de753d9502c6ac75be149c7703
[ "Apache-2.0" ]
null
null
null
ararpy/plateau.py
NMGRL/ararpy
ebc79b6510c4c2de753d9502c6ac75be149c7703
[ "Apache-2.0" ]
null
null
null
ararpy/plateau.py
NMGRL/ararpy
ebc79b6510c4c2de753d9502c6ac75be149c7703
[ "Apache-2.0" ]
null
null
null
# =============================================================================== # Copyright 2014 Jake Ross # # 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...
30.026201
105
0.53345
# =============================================================================== # Copyright 2014 Jake Ross # # 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...
0
0
0
3,825
0
193
0
46
46
3cce260c5e6f7ec8d34585bfce070acaab0be897
7,251
py
Python
stanCode_Projects/my_photoshop/blur.py
yschang306/sc-projects
a57cc5dd0fce80b286820324997234a0391f23c4
[ "MIT" ]
null
null
null
stanCode_Projects/my_photoshop/blur.py
yschang306/sc-projects
a57cc5dd0fce80b286820324997234a0391f23c4
[ "MIT" ]
null
null
null
stanCode_Projects/my_photoshop/blur.py
yschang306/sc-projects
a57cc5dd0fce80b286820324997234a0391f23c4
[ "MIT" ]
null
null
null
""" File: blur.py ------------------------------- This file shows the original image(smiley-face.png) first, and then its blurred image. The blur algorithm uses the average RGB values of a pixel's nearest neighbors. """ from simpleimage import SimpleImage def blur(img): """ This function will blur the origin...
54.11194
120
0.515239
""" File: blur.py ------------------------------- This file shows the original image(smiley-face.png) first, and then its blurred image. The blur algorithm uses the average RGB values of a pixel's nearest neighbors. """ from simpleimage import SimpleImage def blur(img): """ This function will blur the origin...
0
0
0
0
0
0
0
0
0
53fe2429449873fa43e9a5c1a4621e40c925e770
1,813
py
Python
geometry/sampling.py
MandyMY/stereo-magnification
c18fa484484597dfa653f317459a503d9bf8d933
[ "Apache-2.0" ]
null
null
null
geometry/sampling.py
MandyMY/stereo-magnification
c18fa484484597dfa653f317459a503d9bf8d933
[ "Apache-2.0" ]
null
null
null
geometry/sampling.py
MandyMY/stereo-magnification
c18fa484484597dfa653f317459a503d9bf8d933
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
34.207547
79
0.730833
#!/usr/bin/python # # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
0
0
0
0
0
0
0
0
5148a8244614a1455895edec94730198d16bf8ca
2,998
py
Python
train.py
recep-yildirim/Fake-Shakespearean-Text-Generator
923bd17fa6c4d659e49187bc65e21ca45b73b128
[ "MIT" ]
1
2022-02-01T20:23:28.000Z
2022-02-01T20:23:28.000Z
train.py
recep-yildirim/Fake-Shakespearean-Text-Generator
923bd17fa6c4d659e49187bc65e21ca45b73b128
[ "MIT" ]
null
null
null
train.py
recep-yildirim/Fake-Shakespearean-Text-Generator
923bd17fa6c4d659e49187bc65e21ca45b73b128
[ "MIT" ]
null
null
null
import os import tensorflow as tf import numpy as np import joblib file_url = "https://raw.githubusercontent.com/karpathy/char-rnn/master/data/tinyshakespeare/input.txt" file_name = os.path.join(os.getcwd(), "shakespeare.txt") tf.keras.utils.get_file(file_name, file_url) with open(file_name, 'r') as file: tex...
41.638889
134
0.758172
import os import tensorflow as tf import numpy as np import joblib file_url = "https://raw.githubusercontent.com/karpathy/char-rnn/master/data/tinyshakespeare/input.txt" file_name = os.path.join(os.getcwd(), "shakespeare.txt") tf.keras.utils.get_file(file_name, file_url) with open(file_name, 'r') as file: tex...
0
0
0
112
0
0
0
0
22
167332d70487761e2a3b03767936d74dad7c2ea7
183
py
Python
meido_mall/meido_mall/apps/oauth/urls.py
zhangbin9597/py22_django
6b3ee1f4ade6b16d55496d8d695acfe5981ddd18
[ "MIT" ]
null
null
null
meido_mall/meido_mall/apps/oauth/urls.py
zhangbin9597/py22_django
6b3ee1f4ade6b16d55496d8d695acfe5981ddd18
[ "MIT" ]
null
null
null
meido_mall/meido_mall/apps/oauth/urls.py
zhangbin9597/py22_django
6b3ee1f4ade6b16d55496d8d695acfe5981ddd18
[ "MIT" ]
null
null
null
from django.conf.urls import url from . import views urlpatterns = [ url(r'^qq/login/$',views.QQurlView.as_view()), url(r'^oauth_callback$',views.QQopenidView.as_view()), ]
20.333333
58
0.693989
from django.conf.urls import url from . import views urlpatterns = [ url(r'^qq/login/$',views.QQurlView.as_view()), url(r'^oauth_callback$',views.QQopenidView.as_view()), ]
0
0
0
0
0
0
0
0
0
cdbf4a52a002acd0c5e5a694ba64365493120e97
1,221
py
Python
src/extra/pymongodb.py
Vladimir855/pyshella-toolkit
4c4cdcc106ee4e302085c879394cfecd9dfa1890
[ "MIT" ]
30
2019-07-26T11:42:39.000Z
2022-02-22T01:46:56.000Z
src/extra/pymongodb.py
Vladimir855/pyshella-toolkit
4c4cdcc106ee4e302085c879394cfecd9dfa1890
[ "MIT" ]
1
2021-01-01T11:53:40.000Z
2021-02-18T21:30:44.000Z
src/extra/pymongodb.py
baby636/pyshella-toolkit
4c4cdcc106ee4e302085c879394cfecd9dfa1890
[ "MIT" ]
13
2019-10-19T22:46:49.000Z
2022-03-24T03:57:22.000Z
# -*- coding: utf-8 -*-
33.916667
118
0.636364
# -*- coding: utf-8 -*- from pymongo import MongoClient, errors class PyMongoDB(object): def __init__(self, db_name: str, uri: str): try: cxn = MongoClient(uri) except errors.AutoReconnect: raise RuntimeError() self._db = cxn[db_name] def find_one(self, data: ...
0
0
0
1,133
0
0
0
18
45
6d6a8bdfb0529fd528f7c0b2821c9804f79c6a8f
3,541
py
Python
tests/test_FileOs.py
raboley/categorize-images
bd6fd3ab11efa5b1a9957f86113f9601e4f8f8a0
[ "MIT" ]
null
null
null
tests/test_FileOs.py
raboley/categorize-images
bd6fd3ab11efa5b1a9957f86113f9601e4f8f8a0
[ "MIT" ]
null
null
null
tests/test_FileOs.py
raboley/categorize-images
bd6fd3ab11efa5b1a9957f86113f9601e4f8f8a0
[ "MIT" ]
null
null
null
from context import categorize import unittest FileOs = categorize.FileOs if __name__ == "__main__": unittest.main()
37.670213
90
0.676363
from context import categorize import unittest from testfixtures import tempdir, compare, TempDirectory import os import json FileOs = categorize.FileOs class test_FileOs(unittest.TestCase): """ Ensure file object can get set and output paths to files """ def setUp(self): self.d = TempDirector...
0
0
0
3,317
0
0
0
13
89
74fc1e0f95ad776ae2b5d3b56edfeda578af068f
4,571
py
Python
curl_command/bin/curl-command.py
bmacher/splunk-curl-command
a3280a71050c1282347e3b6e0b2d9346c0ccdb72
[ "Apache-2.0" ]
1
2019-10-23T18:23:24.000Z
2019-10-23T18:23:24.000Z
curl_command/bin/curl-command.py
bmacher/splunk-curl-command
a3280a71050c1282347e3b6e0b2d9346c0ccdb72
[ "Apache-2.0" ]
5
2018-11-20T17:29:43.000Z
2019-11-30T00:40:13.000Z
curl_command/bin/curl-command.py
bmacher/splunk-curl-command
a3280a71050c1282347e3b6e0b2d9346c0ccdb72
[ "Apache-2.0" ]
5
2019-08-14T12:02:26.000Z
2021-05-13T06:48:22.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Splunk specific dependencies import sys from splunklib.searchcommands import dispatch # Command specific dependencies # TODO's # - paramMap auf payload umstellen -> aber backward compatible # - Error handling auf raise XY umstellen # - https://www.tutorialspoint.com/...
28.391304
127
0.628965
#!/usr/bin/env python # -*- coding: utf-8 -*- # Splunk specific dependencies import sys, os from splunklib.searchcommands import dispatch, GeneratingCommand, Configuration, Option, validators, splunklib_logger as logger # Command specific dependencies import requests from requests.auth import HTTPDigestAuth import js...
0
3,920
0
0
0
0
0
89
89
3abc0536b0743545605586a353cb9f121476043e
1,264
py
Python
cms/views/records_view.py
siruku6/life_recorder
1cda45144a2cef832e8b1ffb44894810cc096164
[ "MIT" ]
1
2021-05-08T10:04:20.000Z
2021-05-08T10:04:20.000Z
cms/views/records_view.py
siruku6/life_recorder
1cda45144a2cef832e8b1ffb44894810cc096164
[ "MIT" ]
34
2021-02-23T09:00:24.000Z
2021-11-28T02:02:15.000Z
cms/views/records_view.py
siruku6/life_recorder
1cda45144a2cef832e8b1ffb44894810cc096164
[ "MIT" ]
2
2021-05-03T10:16:48.000Z
2021-05-08T10:04:23.000Z
import datetime from django.db.models import QuerySet from django.shortcuts import render, get_object_or_404, redirect from cms.models import Record from cms.forms import RecordForm def life_logs(request): """""" today: datetime = datetime.date.today() if not Record.objects.filter(date=today).exists(): ...
28.088889
93
0.671677
import datetime from django.db.models import QuerySet from django.shortcuts import render, get_object_or_404, redirect from cms.models import Record from cms.forms import RecordForm def life_logs(request): """活動日一覧""" today: datetime = datetime.date.today() if not Record.objects.filter(date=today).exist...
72
0
0
0
0
0
0
0
0
c443d2d2f2cdfc59f3f6e0144da49c2f53896815
612
py
Python
Module2/Python_Data_Analysis_code/Chapter 1/src1/configure_pd.py
vijaysharmapc/Python-End-to-end-Data-Analysis
a00f2d5d1547993e000b2551ec6a1360240885ba
[ "MIT" ]
119
2016-08-24T20:12:01.000Z
2022-03-23T03:59:30.000Z
Module2/Python_Data_Analysis_code/Chapter 1/src1/configure_pd.py
vijaysharmapc/Python-End-to-end-Data-Analysis
a00f2d5d1547993e000b2551ec6a1360240885ba
[ "MIT" ]
3
2016-10-18T03:49:11.000Z
2020-11-03T12:41:29.000Z
Module2/Python_Data_Analysis_code/Chapter 1/src1/configure_pd.py
vijaysharmapc/Python-End-to-end-Data-Analysis
a00f2d5d1547993e000b2551ec6a1360240885ba
[ "MIT" ]
110
2016-08-19T01:57:35.000Z
2022-02-18T17:02:17.000Z
from dautil import options import pandas as pd import numpy as np from dautil import log_api printer = log_api.Printer() print(pd.describe_option('precision')) print(pd.describe_option('max_rows')) printer.print('Initial precision', pd.get_option('precision')) printer.print('Initial max_rows', pd.get_option('max_rows...
26.608696
62
0.764706
from dautil import options import pandas as pd import numpy as np from dautil import log_api printer = log_api.Printer() print(pd.describe_option('precision')) print(pd.describe_option('max_rows')) printer.print('Initial precision', pd.get_option('precision')) printer.print('Initial max_rows', pd.get_option('max_rows...
0
0
0
0
0
0
0
0
0
17c2fa8343c4c72842f53be5fd52fdf854f4a8c6
7,342
py
Python
docker-images/taigav2/taiga-back/taiga/projects/history/api.py
mattcongy/itshop
6be025a9eaa7fe7f495b5777d1f0e5a3184121c9
[ "MIT" ]
1
2017-05-29T19:01:06.000Z
2017-05-29T19:01:06.000Z
docker-images/taigav2/taiga-back/taiga/projects/history/api.py
mattcongy/itshop
6be025a9eaa7fe7f495b5777d1f0e5a3184121c9
[ "MIT" ]
null
null
null
docker-images/taigav2/taiga-back/taiga/projects/history/api.py
mattcongy/itshop
6be025a9eaa7fe7f495b5777d1f0e5a3184121c9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2016 Jess Espino <jespinog@gmail.com> # Copyright (C) 2014-2016 David Barragn <bameda@dbarragan.com> # Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net> # This program is free software: you can red...
37.845361
112
0.706483
# -*- coding: utf-8 -*- # Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net> # This program is free software: you can r...
4
3,868
0
1,995
0
0
0
179
361
cb8e4be69a0326297bde7f36b3aacbe1333ae548
996
py
Python
scripts/eu4/colony_graph.py
SaucyPigeon/pyradox
a500a5628f57e056fa019ba1e114118abe6dc205
[ "MIT" ]
null
null
null
scripts/eu4/colony_graph.py
SaucyPigeon/pyradox
a500a5628f57e056fa019ba1e114118abe6dc205
[ "MIT" ]
null
null
null
scripts/eu4/colony_graph.py
SaucyPigeon/pyradox
a500a5628f57e056fa019ba1e114118abe6dc205
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import numpy x_min = 40.0 x_step = 20.0 x_max = 300.0 # pop per year at start starting_pop_per_year = numpy.linspace(x_min, x_max, 1001) xticks = numpy.arange(0.0, x_max + x_step * 0.5, x_step) starting_pop_per_month = starting_pop_per_year / 12.0 required_time = numpy.z...
26.918919
95
0.698795
import matplotlib as mpl import matplotlib.pyplot as plt import numpy x_min = 40.0 x_step = 20.0 x_max = 300.0 # pop per year at start starting_pop_per_year = numpy.linspace(x_min, x_max, 1001) xticks = numpy.arange(0.0, x_max + x_step * 0.5, x_step) starting_pop_per_month = starting_pop_per_year / 12....
0
0
0
0
0
0
0
3
23
825e604f1361008af892242d1ccb78c3992502bb
664
py
Python
lists/tests.py
edrmonteiro/TDDWithDjango
3fe138d722fee4d9bf9a9af8188c621aab312144
[ "MIT" ]
null
null
null
lists/tests.py
edrmonteiro/TDDWithDjango
3fe138d722fee4d9bf9a9af8188c621aab312144
[ "MIT" ]
null
null
null
lists/tests.py
edrmonteiro/TDDWithDjango
3fe138d722fee4d9bf9a9af8188c621aab312144
[ "MIT" ]
null
null
null
# Create your tests here.
41.5
79
0.671687
from django.test import TestCase # Create your tests here. class HomePageTest(TestCase): def test_uses_home_template(self): response = self.client.get('/') self.assertTrue(response.content.decode().startswith('<html>')) self.assertIn ('<title>To-Do Lists</title>', response.content.decode()...
0
0
0
582
0
0
0
11
45
a9ec18627332b8ad5dff4d70f29def133b1a16f1
689
py
Python
robot_sim/end_effectors/gripper/robotiq85/meshes/convert.py
takuya-ki/wrs
f6e1009b94332504042fbde9b39323410394ecde
[ "MIT" ]
23
2021-04-02T09:02:04.000Z
2022-03-22T05:31:03.000Z
robot_sim/end_effectors/gripper/robotiq85/meshes/convert.py
takuya-ki/wrs
f6e1009b94332504042fbde9b39323410394ecde
[ "MIT" ]
35
2021-04-12T09:41:05.000Z
2022-03-26T13:32:46.000Z
robot_sim/end_effectors/gripper/robotiq85/meshes/convert.py
takuya-ki/wrs
f6e1009b94332504042fbde9b39323410394ecde
[ "MIT" ]
16
2021-03-30T11:55:45.000Z
2022-03-30T07:10:59.000Z
import modeling.mesh_tools as mt if __name__ == '__main__': ''' author: weiwei date: 20201207osaka ''' # mt.convert_to_stl("robotiq_arg2f_85_base_link.stl", "robotiq_arg2f_85_base_link_cvt.stl", rotmat=rm.rotmat_from_axangle([0,1,0], -math.pi/2)) # mt.convert_to_stl("robotiq_arg2f_85_inner_knuc...
49.214286
147
0.77939
import math import numpy as np import basis.robot_math as rm import modeling.mesh_tools as mt if __name__ == '__main__': ''' author: weiwei date: 20201207osaka ''' # mt.convert_to_stl("robotiq_arg2f_85_base_link.stl", "robotiq_arg2f_85_base_link_cvt.stl", rotmat=rm.rotmat_from_axangle([0,1,0], -mat...
0
0
0
0
0
0
0
-5
66
a589ee7e106eb0ea0fbfea11b56660818407fda8
187
py
Python
x_rebirth_station_calculator/station_data/wares/newtonian_v_crushers.py
Phipsz/XRebirthStationCalculator
ac31c2f5816be34a7df2d7c4eb4bd5e01f7ff835
[ "MIT" ]
1
2016-04-17T11:00:22.000Z
2016-04-17T11:00:22.000Z
x_rebirth_station_calculator/station_data/wares/newtonian_v_crushers.py
Phipsz/XRebirthStationCalculator
ac31c2f5816be34a7df2d7c4eb4bd5e01f7ff835
[ "MIT" ]
null
null
null
x_rebirth_station_calculator/station_data/wares/newtonian_v_crushers.py
Phipsz/XRebirthStationCalculator
ac31c2f5816be34a7df2d7c4eb4bd5e01f7ff835
[ "MIT" ]
null
null
null
from x_rebirth_station_calculator.station_data.station_base import Ware names = {'L044': 'Newtonian V Crushers', 'L049': 'Neutronenbrecher V'} NewtonianVCrushers = Ware(names)
26.714286
71
0.754011
from x_rebirth_station_calculator.station_data.station_base import Ware names = {'L044': 'Newtonian V Crushers', 'L049': 'Neutronenbrecher V'} NewtonianVCrushers = Ware(names)
0
0
0
0
0
0
0
0
0
b1e4a428742d2775741270df10d7fbcc8d31eef2
721
py
Python
frontend/src/analytics/models.py
ANRGUSC/I3-core
f4da02a5b475f400d41afd453bfbed6cd53ba087
[ "BSD-3-Clause" ]
11
2020-01-30T22:26:19.000Z
2022-02-18T19:47:27.000Z
frontend/src/analytics/models.py
ANRGUSC/I3-core
f4da02a5b475f400d41afd453bfbed6cd53ba087
[ "BSD-3-Clause" ]
11
2020-02-13T19:16:40.000Z
2022-03-12T00:08:46.000Z
frontend/src/analytics/models.py
ANRGUSC/I3-core
f4da02a5b475f400d41afd453bfbed6cd53ba087
[ "BSD-3-Clause" ]
4
2020-02-26T22:34:29.000Z
2021-09-04T07:39:48.000Z
# Create your models here.
26.703704
103
0.650485
from django.conf import settings from django.db import models # Create your models here. from tags.models import Tag class TagViewManager(models.Manager): def add_count(self, user, tag): obj, created = self.model.objects.get_or_create(user=user, ta...
0
0
0
554
0
0
0
24
113
f346d7777e68c5501254365abe6c8735ab770357
1,002
gyp
Python
binding.gyp
parro-it/screen-info
a6b4e7edb7555bdef6e1a0f334f738f3878f570a
[ "MIT" ]
33
2016-12-19T01:27:12.000Z
2020-10-20T13:20:58.000Z
binding.gyp
parro-it/screen-info
a6b4e7edb7555bdef6e1a0f334f738f3878f570a
[ "MIT" ]
5
2017-08-15T09:35:52.000Z
2020-10-02T13:10:02.000Z
binding.gyp
parro-it/screen-info
a6b4e7edb7555bdef6e1a0f334f738f3878f570a
[ "MIT" ]
3
2017-01-29T13:44:52.000Z
2018-05-25T20:19:39.000Z
{ 'targets': [{ "includes": [ "auto.gypi" ], 'conditions': [ ['OS == "mac"', { 'sources': [ 'src/macos-screen.mm', 'src/screen.cc' ], 'include_dirs': [ 'System/Library/Frameworks/ApplicationServices.framework/Headers', ], 'link_settings': { 'libraries': [ '-framew...
15.415385
71
0.447106
{ 'targets': [{ "includes": [ "auto.gypi" ], 'conditions': [ ['OS == "mac"', { 'sources': [ 'src/macos-screen.mm', 'src/screen.cc' ], 'include_dirs': [ 'System/Library/Frameworks/ApplicationServices.framework/Headers', ], 'link_settings': { 'libraries': [ '-framew...
0
0
0
0
0
0
0
0
0
97660a5de35e5567a8ba3d1528c72c0bdbde5979
87
py
Python
api/wsgi.py
libamen/libamen
bcf5c07ec6af25c0e5bd5703075638b46965412d
[ "Apache-2.0" ]
null
null
null
api/wsgi.py
libamen/libamen
bcf5c07ec6af25c0e5bd5703075638b46965412d
[ "Apache-2.0" ]
null
null
null
api/wsgi.py
libamen/libamen
bcf5c07ec6af25c0e5bd5703075638b46965412d
[ "Apache-2.0" ]
null
null
null
from api import create_app from config import Config application = create_app(Config)
17.4
32
0.827586
from api import create_app from config import Config application = create_app(Config)
0
0
0
0
0
0
0
0
0
334d2fbd1016449fcda889a0e9b2a19eb4b5ddd4
2,680
py
Python
muni_portal/tests/api/test_service_page.py
desafinadude/muni-portal-backend
9ffc447194b8f29619585cd919f67d62062457a3
[ "MIT" ]
1
2021-01-18T13:01:04.000Z
2021-01-18T13:01:04.000Z
muni_portal/tests/api/test_service_page.py
desafinadude/muni-portal-backend
9ffc447194b8f29619585cd919f67d62062457a3
[ "MIT" ]
42
2020-08-29T08:55:53.000Z
2021-04-14T16:41:29.000Z
muni_portal/tests/api/test_service_page.py
desafinadude/muni-portal-backend
9ffc447194b8f29619585cd919f67d62062457a3
[ "MIT" ]
2
2020-10-28T16:34:41.000Z
2022-02-07T10:29:31.000Z
OFFICE_HOURS_TEST_TEXT = "<div>Office hours text</div>"
33.5
77
0.65
from django.test import Client, TestCase from django.urls import reverse from rest_framework import status from wagtail.core.models import Site from wagtail.images.models import Image from wagtail.images.tests.utils import get_test_image_file from muni_portal.core.models import ( ServicePage, AdministratorPage, Se...
0
837
0
1,425
0
0
0
182
178
ba05dd4d72b3e203261c7dfa63be17269eddf6f8
4,317
py
Python
Tesi/2_indicatorsModelling/2_optionPriceSpread/optionPriceSpread.py
LucaCamerani/EcoFin-library
ad8d628e0d447d1b5e8d3b16610d382e7df086e1
[ "BSD-4-Clause" ]
9
2020-09-13T11:53:19.000Z
2022-03-31T16:30:56.000Z
Tesi/2_indicatorsModelling/2_optionPriceSpread/optionPriceSpread.py
LucaCamerani/EcoFin-library
ad8d628e0d447d1b5e8d3b16610d382e7df086e1
[ "BSD-4-Clause" ]
null
null
null
Tesi/2_indicatorsModelling/2_optionPriceSpread/optionPriceSpread.py
LucaCamerani/EcoFin-library
ad8d628e0d447d1b5e8d3b16610d382e7df086e1
[ "BSD-4-Clause" ]
2
2021-03-05T13:45:46.000Z
2021-07-19T20:38:27.000Z
""" 2_optionPriceSpread.py Created by Luca Camerani at 31/08/2020, University of Milano-Bicocca. (l.camerani@campus.unimib.it) All rights reserved. This file is part of the EcoFin-Library (https://github.com/LucaCamerani/EcoFin-Library), and is released under the "BSD Open Source License". """ import os import matp...
42.323529
108
0.660644
""" 2_optionPriceSpread.py Created by Luca Camerani at 31/08/2020, University of Milano-Bicocca. (l.camerani@campus.unimib.it) All rights reserved. This file is part of the EcoFin-Library (https://github.com/LucaCamerani/EcoFin-Library), and is released under the "BSD Open Source License". """ import os import matp...
0
0
0
0
0
0
0
0
0
20d597704afe9a4e59e15415903e685f149f4408
2,637
py
Python
workspace/animations.py
peytondmurray/mugrid
43ee50eac57ee0b826dba52f685b5bb715620777
[ "MIT" ]
1
2021-12-14T10:05:52.000Z
2021-12-14T10:05:52.000Z
workspace/animations.py
peytondmurray/mugrid
43ee50eac57ee0b826dba52f685b5bb715620777
[ "MIT" ]
null
null
null
workspace/animations.py
peytondmurray/mugrid
43ee50eac57ee0b826dba52f685b5bb715620777
[ "MIT" ]
1
2020-11-04T12:15:32.000Z
2020-11-04T12:15:32.000Z
import matplotlib.animation as animation if __name__ == '__main__': generate_animation(0, 'jacobi_zeros.mp4') print('1') generate_animation(1, 'jacobi_lowfreq.mp4') print('2') generate_animation(10, 'jacobi_highfreq.mp4') print('Done!') # Need to call `ffmpeg -i <input filename> -filte...
32.158537
92
0.566932
import numpy as np import scipy.constants as sc import matplotlib.pyplot as plt import matplotlib.animation as animation import visual_solvers import linoplib def gaussian(x, offset, amp, std): return offset+amp*np.exp((-(x-x[x.shape[0]//2])**2)/(2*std**2)) def generate_f(_f, dx): f = _f*dx f[1] -= f[0]...
0
0
0
0
0
2,022
0
8
179
6190fcfd8be56444988f1921dbbdd4980f6d70a6
19,902
py
Python
api/migrations/0001_initial.py
feiwencaho/sharezone
0a72cef8d9c1b6fa8e007c2df55d32fbdb43fa23
[ "Apache-2.0" ]
null
null
null
api/migrations/0001_initial.py
feiwencaho/sharezone
0a72cef8d9c1b6fa8e007c2df55d32fbdb43fa23
[ "Apache-2.0" ]
6
2021-03-18T21:23:50.000Z
2022-03-11T23:32:30.000Z
api/migrations/0001_initial.py
hifeiwenchao/sharezone
0a72cef8d9c1b6fa8e007c2df55d32fbdb43fa23
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.1.1 on 2018-10-11 09:50 import django.contrib.auth.models import django.contrib.auth.validators import django.db.models.deletion
67.464407
329
0.612099
# Generated by Django 2.1.1 on 2018-10-11 09:50 import common.utils from django.conf import settings import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): ...
1,116
0
0
19,229
0
0
0
35
112
e3f75d018abbd8d3da848c3cdfee8850f1a20d9a
769
py
Python
app/utils.py
esgario/GFPGAN
0272e014531dfcd47db12febac60644b978d656e
[ "BSD-3-Clause" ]
null
null
null
app/utils.py
esgario/GFPGAN
0272e014531dfcd47db12febac60644b978d656e
[ "BSD-3-Clause" ]
null
null
null
app/utils.py
esgario/GFPGAN
0272e014531dfcd47db12febac60644b978d656e
[ "BSD-3-Clause" ]
null
null
null
import cv2 import base64 def get_base64_image(image): """ Convert image to base 64. """ try: _, image_buffer = cv2.imencode(".jpg", image) image_str = base64.b64encode(image_buffer).decode("utf-8") return "data:image/jpeg;base64, {0}".format(image_str) except BaseException:...
24.806452
110
0.573472
import cv2 import base64 def get_base64_image(image): """ Convert image to base 64. """ try: _, image_buffer = cv2.imencode(".jpg", image) image_str = base64.b64encode(image_buffer).decode("utf-8") return "data:image/jpeg;base64, {0}".format(image_str) except BaseException:...
0
0
0
0
0
405
0
0
23
e7fd2b05313f017a4e4e3cfcee72fb8936cd4020
336
py
Python
#3 - Operadores Aritmeticos/#Aula07 - Desafio 008 - CONVERSOR DE MEDIDAS.py
yagoandradelima/cursoemvideo-mundo1-python
96ebfdee1df5a0b5a6e4a11189749dbf274a6384
[ "MIT" ]
null
null
null
#3 - Operadores Aritmeticos/#Aula07 - Desafio 008 - CONVERSOR DE MEDIDAS.py
yagoandradelima/cursoemvideo-mundo1-python
96ebfdee1df5a0b5a6e4a11189749dbf274a6384
[ "MIT" ]
null
null
null
#3 - Operadores Aritmeticos/#Aula07 - Desafio 008 - CONVERSOR DE MEDIDAS.py
yagoandradelima/cursoemvideo-mundo1-python
96ebfdee1df5a0b5a6e4a11189749dbf274a6384
[ "MIT" ]
null
null
null
#Aula 07 - Desafio 008 print('=='*31) print('=='*10, 'CONVERSOR DE MEDIDAS', '=='*10) print('=='*31) num = float(input('Digite o valor da medida em metros: ')) mm = num*1000 cm = num*100 print('=='*31) print(f'A medida em METROS digitada foi: {num:.3f}m') print(f'Equivalente a {cm:<6.3f}cm e {mm:<6.4f}mm') print('=='*...
25.846154
58
0.619048
#Aula 07 - Desafio 008 print('=='*31) print('=='*10, 'CONVERSOR DE MEDIDAS', '=='*10) print('=='*31) num = float(input('Digite o valor da medida em metros: ')) mm = num*1000 cm = num*100 print('=='*31) print(f'A medida em METROS digitada foi: {num:.3f}m') print(f'Equivalente a {cm:<6.3f}cm e {mm:<6.4f}mm') print('=='*...
0
0
0
0
0
0
0
0
0
14c3be5034944f09f5cd571fd1a538e28432fdc5
24,343
py
Python
aspi.py
coderdojo-futurix/aspi
f2bbd8190e9ff600952992ffeedfaf758ec9eeea
[ "MIT" ]
null
null
null
aspi.py
coderdojo-futurix/aspi
f2bbd8190e9ff600952992ffeedfaf758ec9eeea
[ "MIT" ]
null
null
null
aspi.py
coderdojo-futurix/aspi
f2bbd8190e9ff600952992ffeedfaf758ec9eeea
[ "MIT" ]
null
null
null
#################################################################################### # # Released under MIT License # # Copyright (c) 2019 CoderDojo Futurix <coderdojo@futurix.pt> # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (th...
36.224702
148
0.644004
#################################################################################### # # Released under MIT License # # Copyright (c) 2019 CoderDojo Futurix <coderdojo@futurix.pt> # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (th...
7
0
0
19,657
0
0
0
1
500
7dd5963c94e2bf0575e419f42d63c6744383c6a3
1,817
py
Python
Scripts/Bots/Telegram-bot/telegram_bot.py
fuzzmz/Python_and_the_Web
b47aa86161d1fe6dc364df822168a6e0ffef455d
[ "MIT" ]
3
2020-10-13T17:41:33.000Z
2021-06-02T15:01:58.000Z
Scripts/Bots/Telegram-bot/telegram_bot.py
fuzzmz/Python_and_the_Web
b47aa86161d1fe6dc364df822168a6e0ffef455d
[ "MIT" ]
null
null
null
Scripts/Bots/Telegram-bot/telegram_bot.py
fuzzmz/Python_and_the_Web
b47aa86161d1fe6dc364df822168a6e0ffef455d
[ "MIT" ]
1
2021-07-28T07:53:46.000Z
2021-07-28T07:53:46.000Z
from configparser import ConfigParser configur = ConfigParser() configur.read('config.ini') # Enter the API token in 'token'. # Enter the API ID and API Hash from # the telegram app created. api_id = configur.get('app_config', 'api_id') api_hash = configur.get('app_config', 'api_hash') token = configur.get('bot_a...
26.333333
65
0.719318
from configparser import ConfigParser from telethon.sync import TelegramClient from telethon.tl.types import InputPeerUser configur = ConfigParser() configur.read('config.ini') # Enter the API token in 'token'. # Enter the API ID and API Hash from # the telegram app created. api_id = configur.get('app_config', 'a...
0
0
0
0
0
967
0
41
136
6a32c258a78f5c0b60815d75015a1ea5039fdf7d
7,384
py
Python
healthcheck/settings/base.py
praekeltfoundation/healthcheck
3f8b3722ea41c2d81c706e0f9a3473ba2cb2f2ba
[ "BSD-3-Clause" ]
null
null
null
healthcheck/settings/base.py
praekeltfoundation/healthcheck
3f8b3722ea41c2d81c706e0f9a3473ba2cb2f2ba
[ "BSD-3-Clause" ]
23
2020-07-16T15:40:35.000Z
2021-12-13T13:59:30.000Z
healthcheck/settings/base.py
praekeltfoundation/healthcheck
3f8b3722ea41c2d81c706e0f9a3473ba2cb2f2ba
[ "BSD-3-Clause" ]
1
2021-02-24T04:58:40.000Z
2021-02-24T04:58:40.000Z
from celery.schedules import crontab import os import environ env = environ.Env() # Build paths inside the project like this: os.path.join(BASE_DIR, ...) root = environ.Path(__file__) - 3 BASE_DIR = root() SECRET_KEY = "replaceme" DEBUG = True DATABASES = {"default": env.db(default="sqlite:///")} ALLOWED_HOSTS = ...
31.288136
81
0.722914
from celery.schedules import crontab import os import environ env = environ.Env() # Build paths inside the project like this: os.path.join(BASE_DIR, ...) root = environ.Path(__file__) - 3 BASE_DIR = root() SECRET_KEY = "replaceme" DEBUG = True DATABASES = {"default": env.db(default="sqlite:///")} ALLOWED_HOSTS = ...
0
0
0
0
0
0
0
0
0
25ce1617ac4d516eb2c512516c3b6375df723d26
644
py
Python
src/070.climbing-stairs.py
hippieZhou/The-Way-Of-LeetCode
c63d777e01413726b6214c616c20c61f8e5b330b
[ "MIT" ]
null
null
null
src/070.climbing-stairs.py
hippieZhou/The-Way-Of-LeetCode
c63d777e01413726b6214c616c20c61f8e5b330b
[ "MIT" ]
null
null
null
src/070.climbing-stairs.py
hippieZhou/The-Way-Of-LeetCode
c63d777e01413726b6214c616c20c61f8e5b330b
[ "MIT" ]
null
null
null
# https://leetcode.com/problems/climbing-stairs/ print(Solution().climbStairs(1)) print(Solution().climbStairs(2)) print(Solution().climbStairs(3)) print(Solution().climbStairs(4)) print(Solution().climbStairs(5))
23.851852
51
0.529503
# https://leetcode.com/problems/climbing-stairs/ class Solution: # def climbStairs(self, n: int) -> int: # array = [1, 2] # for i in range(2, n+1): # array.append(array[i-1] + array[i-2]) # return array[n-1] def climbStairs(self, n: int) -> int: if n <= 2: ...
0
0
0
404
0
0
0
0
23
300566427d497ba34bc037fcd008339881ab3b8f
747
py
Python
main.py
RCReddyN/apod
bb465836e4fa282f73484067ee2b5ae8743214d0
[ "MIT" ]
null
null
null
main.py
RCReddyN/apod
bb465836e4fa282f73484067ee2b5ae8743214d0
[ "MIT" ]
null
null
null
main.py
RCReddyN/apod
bb465836e4fa282f73484067ee2b5ae8743214d0
[ "MIT" ]
null
null
null
import requests from dotenv import load_dotenv load_dotenv() instance = Apod(input()) img_data = instance.get_image() img_url = img_data["url"] page = requests.get(img_url) with open('./img/apod.jpg', 'wb') as f: f.write(page.content)
24.096774
70
0.663989
import os import json import requests from datetime import date from dotenv import load_dotenv from PIL import Image import PIL load_dotenv() class Apod: def __init__(self, date=str(date.today())): self.token = os.environ.get('nasa_token') self.date = date def get_url(self): return 'h...
0
0
0
403
0
0
0
-29
133
076f0e3f8dd93cf732d75583bae02e21ed072978
2,890
py
Python
openpeerpower/components/light/intent.py
pcaston/Open-Peer-Power
81805d455c548e0f86b0f7fedc793b588b2afdfd
[ "Apache-2.0" ]
null
null
null
openpeerpower/components/light/intent.py
pcaston/Open-Peer-Power
81805d455c548e0f86b0f7fedc793b588b2afdfd
[ "Apache-2.0" ]
null
null
null
openpeerpower/components/light/intent.py
pcaston/Open-Peer-Power
81805d455c548e0f86b0f7fedc793b588b2afdfd
[ "Apache-2.0" ]
1
2019-04-24T14:10:08.000Z
2019-04-24T14:10:08.000Z
"""Intents for the light integration.""" INTENT_SET = "OppLightSet"
34.404762
87
0.630796
"""Intents for the light integration.""" import voluptuous as vol from openpeerpower.const import ATTR_ENTITY_ID from openpeerpower.core import OpenPeerPower from openpeerpower.helpers import intent import openpeerpower.helpers.config_validation as cv import openpeerpower.util.color as color_util from . import ( ...
0
0
2,049
326
0
0
0
242
202
caef1d2432f84df2285e86130598cd2b2e4e7265
1,826
py
Python
List.py
hejeffery/Python-Basic-Demo
48a8b246dbdee33ab7f8dba9002f1367dd749b76
[ "MIT" ]
1
2017-02-27T09:24:03.000Z
2017-02-27T09:24:03.000Z
List.py
hejeffery/Python-Basic-Demo
48a8b246dbdee33ab7f8dba9002f1367dd749b76
[ "MIT" ]
null
null
null
List.py
hejeffery/Python-Basic-Demo
48a8b246dbdee33ab7f8dba9002f1367dd749b76
[ "MIT" ]
null
null
null
# coding=utf-8 # list list1 = [1, 2, 3, 4, 5] # 3 print list1[2] list2 = [1, 2, 3, [4, 5]] # 1 print list2[-1] # list3 = [1, 2, 3, 4, 5] # , # 1~1,21 print list3[1 : : 2] # , # 1~3,-1 print list3[-1 : -4 : -1] # ,+ list4 = [1, 2] list5 = [3, 4] print list4 + list5 # extend, list6 = [1, 2, 3, 4, 5] list7 = [6, ...
17.901961
74
0.652245
# coding=utf-8 # list,有序的 list1 = [1, 2, 3, 4, 5] # 获取列表中的第3个元素 print list1[2] list2 = [1, 2, 3, [4, 5]] # 获取列表中的最后1个元素 print list2[-1] # 切片 list3 = [1, 2, 3, 4, 5] # 正向,从左至右 # 打印列表中的第1个元素~最后1个元素,步长为2。默认的步长是1 print list3[1 : : 2] # 反向,从右至左 # 打印列表中的最后1个元素~倒数第3个元素,步长必须是-1 print list3[-1 : -4 : -1] # 列表的相加,使用+会新生成一...
1,179
0
0
0
0
0
0
0
0
d30319030384a48b1d647b5c14beb6ba705dfe04
828
py
Python
var/waf/platformcustom.py
dbacchet/foundation
59c1d7258657344d32d9a8599b7b70c5e2e83ea9
[ "MIT" ]
null
null
null
var/waf/platformcustom.py
dbacchet/foundation
59c1d7258657344d32d9a8599b7b70c5e2e83ea9
[ "MIT" ]
null
null
null
var/waf/platformcustom.py
dbacchet/foundation
59c1d7258657344d32d9a8599b7b70c5e2e83ea9
[ "MIT" ]
null
null
null
# platform specific customizations # 2013-03-28, Davide Bacchet (davide.bacchet@gmail.com) import sys # associate .m files to C compiler def customize_environment(env): """customize the build evironment""" if sys.platform=='darwin': set_clang_compiler(env) elif sys.platform=='win32': ...
22.378378
99
0.681159
# platform specific customizations # 2013-03-28, Davide Bacchet (davide.bacchet@gmail.com) import sys # associate .m files to C compiler from waflib import TaskGen @TaskGen.extension('.m') def m_hook(self, node): """Alias .m files to be compiled the same as .c files, the compiler will do the right thing.""" ...
0
175
0
0
0
164
0
5
90
7d5f9f0ee9327b31776e2211915d5a7a4f33b577
65
py
Python
froide/accesstoken/__init__.py
manonthemat/froide
698c49935eaf2e922f3c9f6a46af0fd545ccbbbb
[ "MIT" ]
null
null
null
froide/accesstoken/__init__.py
manonthemat/froide
698c49935eaf2e922f3c9f6a46af0fd545ccbbbb
[ "MIT" ]
null
null
null
froide/accesstoken/__init__.py
manonthemat/froide
698c49935eaf2e922f3c9f6a46af0fd545ccbbbb
[ "MIT" ]
null
null
null
default_app_config = 'froide.accesstoken.apps.AccessTokenConfig'
32.5
64
0.861538
default_app_config = 'froide.accesstoken.apps.AccessTokenConfig'
0
0
0
0
0
0
0
0
0
bd5f860da8b63768e454724a300fa5869e2e0a0f
7,221
py
Python
DQM/L1TMonitorClient/python/L1EmulatorQualityTests_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
DQM/L1TMonitorClient/python/L1EmulatorQualityTests_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
DQM/L1TMonitorClient/python/L1EmulatorQualityTests_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms # # default configuration valid for online DQM # # configuration for online DQM # perform tests on endLumi # perform tests on endRun # # configuration for offline DQM # perform tests on endRun only # # for both online and offline # get the quality tests from an XML ...
42.727811
119
0.73854
import FWCore.ParameterSet.Config as cms # # default configuration valid for online DQM # # configuration for online DQM # perform tests on endLumi # perform tests on endRun # # configuration for offline DQM # perform tests on endRun only # # for both online and offline # get the quality tests from an XML ...
0
0
0
0
0
0
0
1,176
550
420c8c5b11dad49d747dc549aa27f29ca2955421
18,007
py
Python
PythonScripts/snakemake_wrapper.py
DresdenConceptGenomeCenter/SnakePipe
f866b52e50f8137fd1b1cb32adae376bd9dc93bd
[ "MIT" ]
null
null
null
PythonScripts/snakemake_wrapper.py
DresdenConceptGenomeCenter/SnakePipe
f866b52e50f8137fd1b1cb32adae376bd9dc93bd
[ "MIT" ]
null
null
null
PythonScripts/snakemake_wrapper.py
DresdenConceptGenomeCenter/SnakePipe
f866b52e50f8137fd1b1cb32adae376bd9dc93bd
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 ''' The MIT License (MIT) Copyright (c) <2018> <DresdenConceptGenomeCenter> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitatio...
45.587342
263
0.633531
#!/usr/bin/env python3 ''' The MIT License (MIT) Copyright (c) <2018> <DresdenConceptGenomeCenter> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitatio...
0
0
0
15,902
0
0
0
161
315
e6125bd37ce3b531765b4dbc4269a03eadab6cae
14,646
py
Python
geo/gis/cartography.py
Tamlyn78/geo
dd63372acdd1fe8b744c05eca5ad23836e6a1604
[ "MIT" ]
null
null
null
geo/gis/cartography.py
Tamlyn78/geo
dd63372acdd1fe8b744c05eca5ad23836e6a1604
[ "MIT" ]
null
null
null
geo/gis/cartography.py
Tamlyn78/geo
dd63372acdd1fe8b744c05eca5ad23836e6a1604
[ "MIT" ]
null
null
null
from cartopy import crs import matplotlib.patches as mpatches def epsg_to_proj(epsg): """Return a cartopy projection from an EPSG code. Attributes: epsg <int>: An EPSG code. """ proj = crs.epsg(epsg) return(proj) #class MapOld: # """This was written to ...
32.546667
220
0.557285
from cartopy import crs import matplotlib.pyplot as plt from . import vector from mpl_toolkits.axes_grid1 import make_axes_locatable import matplotlib.patches as mpatches def epsg_to_proj(epsg): """Return a cartopy projection from an EPSG code. Attributes: epsg <int>: An EPSG code. ...
0
0
0
8,924
0
234
0
88
419
dedf3bb19c913b864da4b2e685483656b2885c3f
4,419
py
Python
askapp/migrations/0001_initial.py
alexpirine/askapp
98686ca8112ccd6a3f55b0546603d5d2ec603fba
[ "Apache-2.0" ]
2
2020-05-01T10:25:18.000Z
2020-09-24T10:08:20.000Z
askapp/migrations/0001_initial.py
alexpirine/askapp
98686ca8112ccd6a3f55b0546603d5d2ec603fba
[ "Apache-2.0" ]
91
2017-01-04T05:13:45.000Z
2021-09-22T17:38:49.000Z
askapp/migrations/0001_initial.py
alexpirine/askapp
98686ca8112ccd6a3f55b0546603d5d2ec603fba
[ "Apache-2.0" ]
2
2017-07-03T13:51:41.000Z
2020-12-15T20:31:32.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals
46.03125
157
0.565286
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.Create...
0
0
0
4,256
0
0
0
30
68
ab314f7cecd0454938393e104632a07f8a70daa8
10,147
py
Python
instrumentation/metrics.py
WarriorOfWire/circuitpython-utilities
a5e0e51a9ab443508343b8d2df32230e496d4079
[ "MIT" ]
2
2021-02-28T04:35:41.000Z
2021-12-03T02:54:43.000Z
instrumentation/metrics.py
WarriorOfWire/circuitpython-utilities
a5e0e51a9ab443508343b8d2df32230e496d4079
[ "MIT" ]
null
null
null
instrumentation/metrics.py
WarriorOfWire/circuitpython-utilities
a5e0e51a9ab443508343b8d2df32230e496d4079
[ "MIT" ]
null
null
null
import time # # Enable metrics by setting builtins.metrics_enabled = True before importing metrics the first time. # # import builtins # builtins.metrics_enabled = True # import metrics # # You can add @timer to all methods you want to time; when you start up with metrics disabled, the # function you decorate is unal...
36.5
149
0.527939
import time # # Enable metrics by setting builtins.metrics_enabled = True before importing metrics the first time. # # import builtins # builtins.metrics_enabled = True # import metrics # # You can add @timer to all methods you want to time; when you start up with metrics disabled, the # function you decorate is unal...
0
0
107
5,191
0
508
0
0
222
b3887aa76de9fa763a9251d4fdcb30c598c48c0f
582
py
Python
auth/urls.py
pawangeek/PollsChain
6059796c671d3250f2cd8bb36171bf54013d176e
[ "MIT" ]
null
null
null
auth/urls.py
pawangeek/PollsChain
6059796c671d3250f2cd8bb36171bf54013d176e
[ "MIT" ]
null
null
null
auth/urls.py
pawangeek/PollsChain
6059796c671d3250f2cd8bb36171bf54013d176e
[ "MIT" ]
null
null
null
from django.conf.urls import url from . import views app_name = 'auth' urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^loginVoter/$', views.loginVoter, name='loginVoter'), url(r'^validateVoter/$', views.validateVoter, name='validateVoter'), url(r'^logout/$', views.logout, name='logout'),...
36.375
72
0.666667
from django.conf.urls import url from . import views app_name = 'auth' urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^loginVoter/$', views.loginVoter, name='loginVoter'), url(r'^validateVoter/$', views.validateVoter, name='validateVoter'), url(r'^logout/$', views.logout, name='logout'),...
0
0
0
0
0
0
0
0
0
aaf22f110793a97d54a027dabc7eac63b4ac372c
6,031
py
Python
node/network_util.py
martindale/OpenBazaar
620012832d614992d1097f66c75b24c1fa6648e5
[ "MIT" ]
null
null
null
node/network_util.py
martindale/OpenBazaar
620012832d614992d1097f66c75b24c1fa6648e5
[ "MIT" ]
null
null
null
node/network_util.py
martindale/OpenBazaar
620012832d614992d1097f66c75b24c1fa6648e5
[ "MIT" ]
null
null
null
import sys from urlparse import urlparse import re import logging import IPy import requests import rfc3986 import stun # List taken from natvpn project and tested manually. # NOTE: This needs periodic updating. _STUN_SERVERS = ( 'stun.l.google.com', 'stun1.l.google.com', 'stun2.l.google.com', 'stun3....
27.665138
88
0.640192
import sys from urlparse import urlparse import re import logging import IPy import requests import rfc3986 import stun # List taken from natvpn project and tested manually. # NOTE: This needs periodic updating. _STUN_SERVERS = ( 'stun.l.google.com', 'stun1.l.google.com', 'stun2.l.google.com', 'stun3....
0
0
0
1,564
0
1,769
0
0
230
2ddd551b1b0167e1b502e08bd590a5559dc23728
277
py
Python
readux/books/context_processors.py
jpkarlsberg/readux
50a895dcf7d64b753a07808e9be218cab3682850
[ "Apache-2.0" ]
null
null
null
readux/books/context_processors.py
jpkarlsberg/readux
50a895dcf7d64b753a07808e9be218cab3682850
[ "Apache-2.0" ]
null
null
null
readux/books/context_processors.py
jpkarlsberg/readux
50a895dcf7d64b753a07808e9be218cab3682850
[ "Apache-2.0" ]
null
null
null
from readux.books.forms import BookSearch def book_search(request): '''Template context processor: add book search form (:class:`~readux.books.forms.BookSearch`) to context so it can be used on any page.''' return { 'search_form': BookSearch() }
25.181818
69
0.67509
from readux.books.forms import BookSearch def book_search(request): '''Template context processor: add book search form (:class:`~readux.books.forms.BookSearch`) to context so it can be used on any page.''' return { 'search_form': BookSearch() }
0
0
0
0
0
0
0
0
0
897e1da319853f4209ced1f5bd3345ee5b09b535
766
py
Python
demo/dcgan_train.py
Ahanmr/mxnet-img2img
cef5a8585b71fdc58b95a3136fd6b60316020dc1
[ "MIT" ]
null
null
null
demo/dcgan_train.py
Ahanmr/mxnet-img2img
cef5a8585b71fdc58b95a3136fd6b60316020dc1
[ "MIT" ]
null
null
null
demo/dcgan_train.py
Ahanmr/mxnet-img2img
cef5a8585b71fdc58b95a3136fd6b60316020dc1
[ "MIT" ]
null
null
null
LOAD_EXISTING_MODEL = False if __name__ == '__main__': main()
20.702703
78
0.729765
import os import sys import mxnet as mx import logging LOAD_EXISTING_MODEL = False def patch_path(path): return os.path.join(os.path.dirname(__file__), path) def main(): sys.path.append(patch_path('..')) output_dir_path = patch_path('models') logging.basicConfig(level=logging.DEBUG) from mx...
0
0
0
0
0
593
0
-33
134
62303fd2ae7a1b5ac0ba00ae3fdcfe451be756c6
2,302
py
Python
zokyo/utils/CustomExceptions.py
toyotaconnected-India/zokyo
6086ce7c014dd76b28756596ada3559eacc06d44
[ "Apache-2.0" ]
null
null
null
zokyo/utils/CustomExceptions.py
toyotaconnected-India/zokyo
6086ce7c014dd76b28756596ada3559eacc06d44
[ "Apache-2.0" ]
null
null
null
zokyo/utils/CustomExceptions.py
toyotaconnected-India/zokyo
6086ce7c014dd76b28756596ada3559eacc06d44
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Contributors : [srinivas.v@toyotaconnected.co.in,srivathsan.govindarajan@toyotaconnected.co.in, # harshavardhan.thirupathi@toyotaconnected.co.in, # ashok.ramadass@toyotaconnected.com ]
29.512821
97
0.646829
# -*- coding: utf-8 -*- # Contributors : [srinivas.v@toyotaconnected.co.in,srivathsan.govindarajan@toyotaconnected.co.in, # harshavardhan.thirupathi@toyotaconnected.co.in, # ashok.ramadass@toyotaconnected.com ] class CoefficientNotinRangeError(Exception): """ Class to throw exception when a coefficient is ...
0
0
0
1,972
0
0
0
0
115
b764a0afe56c30334cedf0b99372cb55ab844de8
4,417
py
Python
stablogen/Post.py
iguessthislldo/stablogen
8474aa2847d3d9f859e38857421e13f321249e29
[ "MIT" ]
null
null
null
stablogen/Post.py
iguessthislldo/stablogen
8474aa2847d3d9f859e38857421e13f321249e29
[ "MIT" ]
null
null
null
stablogen/Post.py
iguessthislldo/stablogen
8474aa2847d3d9f859e38857421e13f321249e29
[ "MIT" ]
null
null
null
# Python Standard Library from collections import OrderedDict # 3rd Party Libraries import arrow, yaml # Local # Uses OrderedDict to keep order the data in the order below yaml.add_representer(OrderedDict, lambda self, data: self.represent_mapping('tag:yaml.org,2002:map', data.items()) ) post_yaml_tags = ('title...
28.869281
76
0.576183
# Python Standard Library from collections import OrderedDict import itertools # 3rd Party Libraries import arrow, yaml # Local from stablogen.config import * from stablogen.util import make_url, find_files # Uses OrderedDict to keep order the data in the order below yaml.add_representer(OrderedDict, lambda self, da...
0
1,458
0
2,139
0
0
0
30
111
8b008a22f55b8ad64af3da5506bb2cbb529ca058
3,642
py
Python
src/voiceassistant/interfaces/http/api_app.py
vadimtitov/voice-assistant
9ed6a799f44d5a546eb712195e3e84e6ff10d2fa
[ "Apache-2.0" ]
1
2021-12-19T14:59:31.000Z
2021-12-19T14:59:31.000Z
src/voiceassistant/interfaces/http/api_app.py
vadimtitov/voice-assistant
9ed6a799f44d5a546eb712195e3e84e6ff10d2fa
[ "Apache-2.0" ]
3
2021-09-16T20:47:58.000Z
2021-12-19T02:45:59.000Z
src/voiceassistant/interfaces/http/api_app.py
vadimtitov/voice-assistant
9ed6a799f44d5a546eb712195e3e84e6ff10d2fa
[ "Apache-2.0" ]
null
null
null
"""API app factory.""" from __future__ import annotations from typing import TYPE_CHECKING from flask import Flask if TYPE_CHECKING: from voiceassistant.core import VoiceAssistant def api_factory(vass: VoiceAssistant, app: Flask) -> Flask: """Get REST API app.""" name = "api" return...
30.099174
97
0.574135
"""API app factory.""" from __future__ import annotations import random import traceback from typing import TYPE_CHECKING from flask import Flask, Response, jsonify, request from voiceassistant.config import Config from voiceassistant.exceptions import ConfigValidationError, SkillError from voiceassista...
0
2,816
0
0
0
0
0
124
376
13ebc196cfd105727a350d856126cda2489ce860
1,399
py
Python
c21.py
tonyb486/cryptopals
d16229a2bf3a954b33173d6943d5204fc8d1e145
[ "MIT" ]
1
2018-01-16T01:42:05.000Z
2018-01-16T01:42:05.000Z
c21.py
tonyb486/cryptopals
d16229a2bf3a954b33173d6943d5204fc8d1e145
[ "MIT" ]
null
null
null
c21.py
tonyb486/cryptopals
d16229a2bf3a954b33173d6943d5204fc8d1e145
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Psuedocode from wikipedia (old version; removed): # https://en.wikipedia.org/w/index.php?title=Mersenne_Twister&oldid=209555438 if __name__ == '__main__': mt_rand = MT19937(123456) data = [mt_rand.extractNumber() for i in range(1000)] expected = [int(i.strip()) for i in open("...
27.431373
93
0.533238
#!/usr/bin/env python3 # Psuedocode from wikipedia (old version; removed): # https://en.wikipedia.org/w/index.php?title=Mersenne_Twister&oldid=209555438 class MT19937: def _uint32(self, i): return i&0xffffffff def __init__(self, seed): self.index = 0 self.MT = [0]*624 ...
0
0
0
994
0
0
0
0
24
e7602bc5e5e6a2cd45c7c64003f792d0725410c7
467
py
Python
messengerext/home/migrations/0005_auto_20160524_1835.py
groupsome/groupsome
4edcf30d66ff458c4df37d3198ef187219a768d7
[ "MIT" ]
6
2016-10-07T13:43:17.000Z
2017-10-07T22:34:44.000Z
messengerext/home/migrations/0005_auto_20160524_1835.py
groupsome/groupsome
4edcf30d66ff458c4df37d3198ef187219a768d7
[ "MIT" ]
null
null
null
messengerext/home/migrations/0005_auto_20160524_1835.py
groupsome/groupsome
4edcf30d66ff458c4df37d3198ef187219a768d7
[ "MIT" ]
1
2020-07-15T04:29:31.000Z
2020-07-15T04:29:31.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-05-24 18:35 from __future__ import unicode_literals
20.304348
45
0.593148
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-05-24 18:35 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('home', '0004_auto_20160523_1612'), ] operations = [ migrations.RemoveField( ...
0
0
0
299
0
0
0
11
46