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
64939646e87c224c58ffcfd8cf705c67c41ee7e3
16,321
py
Python
cornflow-server/cornflow/tests/integration/test_cornflowclient.py
baobabsoluciones/cornflow
bd7cae22107e5fe148704d5f41d4f58f9c410b40
[ "Apache-2.0" ]
1
2022-03-30T16:44:50.000Z
2022-03-30T16:44:50.000Z
cornflow-server/cornflow/tests/integration/test_cornflowclient.py
baobabsoluciones/cornflow
bd7cae22107e5fe148704d5f41d4f58f9c410b40
[ "Apache-2.0" ]
2
2022-03-31T08:42:10.000Z
2022-03-31T12:05:23.000Z
cornflow-server/cornflow/tests/integration/test_cornflowclient.py
baobabsoluciones/cornflow
bd7cae22107e5fe148704d5f41d4f58f9c410b40
[ "Apache-2.0" ]
null
null
null
""" """ # Full imports # Imports from environment # Import internal modules
40.298765
85
0.658477
""" """ # Full imports import json import pulp import logging as log import time # Imports from environment from cornflow_client import CornFlowApiError from cornflow_client.constants import INSTANCE_SCHEMA, SOLUTION_SCHEMA # Import internal modules from cornflow.app import create_app from cornflow.shared.const impo...
0
0
0
15,600
0
71
0
231
335
c99d93e1bf1ed54873350ee1c6e4595ebffd5172
594
py
Python
code/lufangxiao/contrastive_methods/DiResNet_model/__init__.py
xueruoyao/FCN-pytorch
a5019da3943f47fa4f7baed3640cdbfeae2d677e
[ "MIT" ]
1
2021-12-20T07:20:25.000Z
2021-12-20T07:20:25.000Z
code/lufangxiao/contrastive_methods/DiResNet_model/__init__.py
xueruoyao/FCN-pytorch
a5019da3943f47fa4f7baed3640cdbfeae2d677e
[ "MIT" ]
null
null
null
code/lufangxiao/contrastive_methods/DiResNet_model/__init__.py
xueruoyao/FCN-pytorch
a5019da3943f47fa4f7baed3640cdbfeae2d677e
[ "MIT" ]
null
null
null
import torch.nn as nn
42.428571
110
0.80303
from torchvision.models import resnet from .DirectionNet import DirectionNet from .DiResNet import FCN_Ref import torch import torch.nn as nn def build_model(in_channels=3, num_classes=1, pretrained=True): return FCN_Ref(in_channels=in_channels, num_classes=num_classes, pretrained=pretrained) def build_aux_part(i...
0
0
0
0
0
407
0
32
134
32c510321206b11b0e0f4d12dc5852d212e9a734
4,668
py
Python
pysnmp/INTEL-IP-MULTICAST-ROUTER-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/INTEL-IP-MULTICAST-ROUTER-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/INTEL-IP-MULTICAST-ROUTER-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module INTEL-IP-MULTICAST-ROUTER-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/INTEL-IP-MULTICAST-ROUTER-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:43:05 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python ve...
116.7
496
0.76928
# # PySNMP MIB module INTEL-IP-MULTICAST-ROUTER-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/INTEL-IP-MULTICAST-ROUTER-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:43:05 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python ve...
0
0
0
0
0
0
0
0
0
adc2c97cbe4ef08ab5968eeb58293ab3cbed3fc5
1,836
py
Python
python/day04a.py
hurryabit/adventofcode-2021
3f9949895fc5541eb050b427f1432a6c91b6297e
[ "Unlicense" ]
null
null
null
python/day04a.py
hurryabit/adventofcode-2021
3f9949895fc5541eb050b427f1432a6c91b6297e
[ "Unlicense" ]
null
null
null
python/day04a.py
hurryabit/adventofcode-2021
3f9949895fc5541eb050b427f1432a6c91b6297e
[ "Unlicense" ]
null
null
null
import io from typing import Optional EXAMPLE = """7,4,9,5,11,17,23,2,0,14,21,24,10,16,13,6,15,25,12,22,18,20,8,19,3,26,1 22 13 17 11 0 8 2 23 4 24 21 9 14 16 7 6 10 3 18 5 1 12 20 15 19 3 15 0 2 22 9 18 13 17 5 19 8 7 25 23 20 11 10 24 4 14 21 16 12 6 14 21 17 24 4 10 16 15 9 19 18 8 23 26 20...
23.240506
83
0.601307
import io from collections.abc import Iterable from typing import Optional EXAMPLE = """7,4,9,5,11,17,23,2,0,14,21,24,10,16,13,6,15,25,12,22,18,20,8,19,3,26,1 22 13 17 11 0 8 2 23 4 24 21 9 14 16 7 6 10 3 18 5 1 12 20 15 19 3 15 0 2 22 9 18 13 17 5 19 8 7 25 23 20 11 10 24 4 14 21 16 12 6 14 21 1...
0
0
0
0
0
1,204
0
15
137
d8adf4335ffbc8c602a605d3ce3a80a4d9fb7c26
1,854
py
Python
src/main/python/validate_endpoint/source.py
cwilloughby-bw/vra-ipam-racktables
f21654030dd51e4f007fef762c0156a53e568715
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/main/python/validate_endpoint/source.py
cwilloughby-bw/vra-ipam-racktables
f21654030dd51e4f007fef762c0156a53e568715
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/main/python/validate_endpoint/source.py
cwilloughby-bw/vra-ipam-racktables
f21654030dd51e4f007fef762c0156a53e568715
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
""" Copyright (c) 2020 VMware, Inc. This product is licensed to you under the Apache License, Version 2.0 (the "License"). You may not use this product except in compliance with the License. This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomp...
31.423729
100
0.705502
""" Copyright (c) 2020 VMware, Inc. This product is licensed to you under the Apache License, Version 2.0 (the "License"). You may not use this product except in compliance with the License. This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomp...
0
0
0
0
0
1,013
0
39
156
95553f90167c4cf047272b85e24f8a3ed2b62aaa
51
py
Python
SPI/__init__.py
philwil/RPi.GPIO-PineA64
dd22ca81bd979c31e749e017962cfefd4d0e6ac4
[ "MIT" ]
58
2016-04-22T08:13:43.000Z
2021-12-31T05:27:10.000Z
SPI/__init__.py
philwil/RPi.GPIO-PineA64
dd22ca81bd979c31e749e017962cfefd4d0e6ac4
[ "MIT" ]
10
2016-05-11T11:05:30.000Z
2021-08-01T12:02:17.000Z
SPI/__init__.py
philwil/RPi.GPIO-PineA64
dd22ca81bd979c31e749e017962cfefd4d0e6ac4
[ "MIT" ]
21
2016-04-25T05:12:42.000Z
2021-11-14T09:04:11.000Z
""" """ VERSION = '0.6.2'
7.285714
22
0.529412
""" """ from RPi._SPI import * VERSION = '0.6.2'
0
0
0
0
0
0
0
1
23
8ff67be84d9fcd15146add087969fc8f612e50cc
21,656
py
Python
qtoolkit/data_structures/quantum_circuit/quantum_circuit.py
nelimee/qtoolkit
1e99bd7d3a143a327c3bb92595ea88ec12dbdb89
[ "CECILL-B" ]
3
2018-12-30T04:50:44.000Z
2019-12-25T12:26:02.000Z
qtoolkit/data_structures/quantum_circuit/quantum_circuit.py
nelimee/qtoolkit
1e99bd7d3a143a327c3bb92595ea88ec12dbdb89
[ "CECILL-B" ]
null
null
null
qtoolkit/data_structures/quantum_circuit/quantum_circuit.py
nelimee/qtoolkit
1e99bd7d3a143a327c3bb92595ea88ec12dbdb89
[ "CECILL-B" ]
1
2021-08-08T15:59:46.000Z
2021-08-08T15:59:46.000Z
# ====================================================================== # Copyright CERFACS (October 2018) # Contributor: Adrien Suau (adrien.suau@cerfacs.fr) # # This software is governed by the CeCILL-B license under French law and # abiding by the rules of distribution of free software. You can use, # modify an...
40.478505
88
0.626478
# ====================================================================== # Copyright CERFACS (October 2018) # Contributor: Adrien Suau (adrien.suau@cerfacs.fr) # # This software is governed by the CeCILL-B license under French law and # abiding by the rules of distribution of free software. You can use, # modify an...
2
1,776
0
17,570
0
0
0
82
159
343ff326a8f186dde320d062ee1820bd51033851
1,784
py
Python
ImageToCode.py
SL-RU/sfam_generator
eed23f8c6322a5dfe328851c85d24cb20f344613
[ "MIT" ]
10
2017-03-15T16:48:19.000Z
2021-12-07T06:55:18.000Z
ImageToCode.py
SL-RU/sfam_generator
eed23f8c6322a5dfe328851c85d24cb20f344613
[ "MIT" ]
null
null
null
ImageToCode.py
SL-RU/sfam_generator
eed23f8c6322a5dfe328851c85d24cb20f344613
[ "MIT" ]
5
2018-01-19T17:28:32.000Z
2021-12-26T09:01:37.000Z
from PIL import Image import sys #This script converts 1bit image to special byte file and code for using in your projects. png = "pinkie_pie_by_cellularsp-d4j7sj2.gif" #Image file out_f = png[:-4] + ".img" print(out_f) max_ll = 8 im = Image.open(png) if im.width > 255 or im.height > 255: print("Image max width ...
21.756098
243
0.57287
import PIL from PIL import Image, ImageFont, ImageDraw import math, sys #This script converts 1bit image to special byte file and code for using in your projects. png = "pinkie_pie_by_cellularsp-d4j7sj2.gif" #Image file out_f = png[:-4] + ".img" print(out_f) max_ll = 8 im = Image.open(png) if im.width > 255 or im...
0
0
0
0
0
580
0
17
45
5b492c1bb5a26e044019d775af24ca4dc00c554b
688
py
Python
realtoxicityprompts/scripts/helper_dataparallel_merge_generations.py
ml-research/MoRT_NMI
98dc14f42714b1b794d685507c01b593cde5638c
[ "MIT" ]
4
2021-04-04T13:42:34.000Z
2021-11-29T15:38:50.000Z
realtoxicityprompts/scripts/helper_dataparallel_merge_generations.py
ml-research/MoRT_NMI
98dc14f42714b1b794d685507c01b593cde5638c
[ "MIT" ]
null
null
null
realtoxicityprompts/scripts/helper_dataparallel_merge_generations.py
ml-research/MoRT_NMI
98dc14f42714b1b794d685507c01b593cde5638c
[ "MIT" ]
null
null
null
base_dir = './resultsMCM/prompted/gpt2mcm-k50-keepmin5-t00' base_path = base_dir+'/{}-{}/generations.jsonl' outfile = base_dir+'/all/generations.jsonl' batch_size = 4000 filenames = [(i*batch_size, i*batch_size+batch_size) for i in range(25)] print(filenames) cnt = 0 with open(outfile, 'w') as outfile: for i, fna...
31.272727
72
0.614826
base_dir = './resultsMCM/prompted/gpt2mcm-k50-keepmin5-t00' base_path = base_dir+'/{}-{}/generations.jsonl' outfile = base_dir+'/all/generations.jsonl' batch_size = 4000 filenames = [(i*batch_size, i*batch_size+batch_size) for i in range(25)] print(filenames) cnt = 0 with open(outfile, 'w') as outfile: for i, fna...
0
0
0
0
0
0
0
0
0
495408fc1dc0cfbec8a05472b485424bce359f08
1,064
py
Python
dexp/processing/color/cairo_utils.py
haesleinhuepf/dexp
2ea84f3db323724588fac565fae56f0d522bc5ca
[ "BSD-3-Clause" ]
16
2021-04-21T14:09:19.000Z
2022-03-22T02:30:59.000Z
dexp/processing/color/cairo_utils.py
haesleinhuepf/dexp
2ea84f3db323724588fac565fae56f0d522bc5ca
[ "BSD-3-Clause" ]
28
2021-04-15T17:43:08.000Z
2022-03-29T16:08:35.000Z
dexp/processing/color/cairo_utils.py
haesleinhuepf/dexp
2ea84f3db323724588fac565fae56f0d522bc5ca
[ "BSD-3-Clause" ]
3
2022-02-08T17:41:30.000Z
2022-03-18T15:32:27.000Z
import numpy from dexp.utils.backends import Backend def get_array_for_cairo_surface(surface: "ImageSurface"): # noqa: F821 """ Returns an array given a ImageSurface from PyCairo. Parameters ---------- surface : surface Returns ------- RGBA numpy array of shape: (...,4) """ ...
23.644444
90
0.678571
import numpy from dexp.utils.backends import Backend def get_array_for_cairo_surface(surface: "ImageSurface"): # noqa: F821 """ Returns an array given a ImageSurface from PyCairo. Parameters ---------- surface : surface Returns ------- RGBA numpy array of shape: (...,4) """ ...
0
0
0
0
0
0
0
0
0
45c2e6179e1f48ab5b034e304716466d80f630a3
3,979
py
Python
scripts/animateGridData.py
sayanadhikari207/picsp
dc6315a11b4dd3d567f2d51673807e82e5378921
[ "MIT" ]
3
2021-02-22T13:23:08.000Z
2021-05-27T21:08:32.000Z
scripts/animateGridData.py
sayanadhikari207/picsp
dc6315a11b4dd3d567f2d51673807e82e5378921
[ "MIT" ]
8
2021-03-23T15:47:15.000Z
2021-04-05T12:55:54.000Z
scripts/animateGridData.py
sayanadhikari207/picsp
dc6315a11b4dd3d567f2d51673807e82e5378921
[ "MIT" ]
1
2021-02-22T13:36:53.000Z
2021-02-22T13:36:53.000Z
#!/usr/bin/env python3 import numpy as np import h5py import matplotlib as mp import matplotlib.pyplot as plt import matplotlib.animation as animation from mpl_toolkits import mplot3d from mpl_toolkits.axes_grid1 import make_axes_locatable import argparse import os # import plotly.graph_objects as go #========= Config...
32.08871
98
0.620508
#!/usr/bin/env python3 import numpy as np import h5py import matplotlib as mp import matplotlib.pyplot as plt import matplotlib.animation as animation from mpl_toolkits import mplot3d from mpl_toolkits.axes_grid1 import make_axes_locatable import argparse import os # import plotly.graph_objects as go #========= Config...
0
0
0
0
0
764
0
0
26
2a4d363b4d24f4f58e77f8bb01b4f21712e7dc72
2,547
py
Python
aloe/aloe/common/synthetic/dataset.py
deepneuralmachine/google-research
d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231
[ "Apache-2.0" ]
23,901
2018-10-04T19:48:53.000Z
2022-03-31T21:27:42.000Z
aloe/aloe/common/synthetic/dataset.py
deepneuralmachine/google-research
d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231
[ "Apache-2.0" ]
891
2018-11-10T06:16:13.000Z
2022-03-31T10:42:34.000Z
aloe/aloe/common/synthetic/dataset.py
deepneuralmachine/google-research
d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231
[ "Apache-2.0" ]
6,047
2018-10-12T06:31:02.000Z
2022-03-31T13:59:28.000Z
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
35.873239
91
0.619552
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
0
0
0
1,790
0
0
0
36
91
8f619ef687d1f9623aae26c5a9fd22fb12fed77a
4,422
py
Python
ngram.py
PdePinguino/n-grams
73a199fce2eeb3fa75c0df863ca430e5a5f9be0f
[ "MIT" ]
null
null
null
ngram.py
PdePinguino/n-grams
73a199fce2eeb3fa75c0df863ca430e5a5f9be0f
[ "MIT" ]
null
null
null
ngram.py
PdePinguino/n-grams
73a199fce2eeb3fa75c0df863ca430e5a5f9be0f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ This files has the NGram class. """ import pickle from os.path import join if __name__ == '__main__': with open(join('corpus', 'poems.pkl'), 'rb') as handle: poems = pickle.load(handle) unigram = NGram(poems, n=1) #bigram = NGram(poems, n=2) #trigram = NGram(poem...
30.287671
92
0.568521
#!/usr/bin/env python3 """ This files has the NGram class. """ import pickle from os.path import join import numpy as np import re from tqdm import tqdm class NGram(): def __init__(self, poems, n, reduced=False): self.n = n self.poems = poems self.tagged_lines = self.append_tag(self.get_...
0
0
0
3,877
0
0
0
-15
89
fbeaacdbc188f5a72bb2f95b5542a2c449342e0c
19,674
py
Python
scripts/generate_scripts.py
brunocampos01/automated-business-intelligence-at-azure
82b8ab1ea0311166d12216effc15ac5e68c47b61
[ "MIT" ]
6
2020-02-08T03:19:55.000Z
2021-09-06T00:33:16.000Z
scripts/generate_scripts.py
brunocampos01/automated-business-intelligence-at-azure
82b8ab1ea0311166d12216effc15ac5e68c47b61
[ "MIT" ]
null
null
null
scripts/generate_scripts.py
brunocampos01/automated-business-intelligence-at-azure
82b8ab1ea0311166d12216effc15ac5e68c47b61
[ "MIT" ]
2
2020-11-13T15:26:26.000Z
2021-09-15T12:43:19.000Z
""" Generate each script with customs variables by client """ import os import glob import argparse from pathlib import Path # paths path_cloud = str(Path(__file__).absolute().parent.parent) # path: scripts powershell path_ori_runbooks = '/scripts/runbooks/' path_dest_runbooks = '/azure_automatiom_account/runbooks/' ...
51.101299
153
0.563434
""" Generate each script with customs variables by client """ import os import glob import json import argparse from pathlib import Path # paths path_cloud = str(Path(__file__).absolute().parent.parent) # path: scripts powershell path_ori_runbooks = '/scripts/runbooks/' path_dest_runbooks = '/azure_automatiom_account...
0
0
0
0
0
11,540
0
-10
91
fb87826767923a06891871f7e6d5e30765f0233b
1,852
py
Python
ftarc/task/fastqc.py
dceoy/ftarc
d9ce11902a7ce3ad3e47d717f863dcf03ea73ed3
[ "MIT" ]
null
null
null
ftarc/task/fastqc.py
dceoy/ftarc
d9ce11902a7ce3ad3e47d717f863dcf03ea73ed3
[ "MIT" ]
null
null
null
ftarc/task/fastqc.py
dceoy/ftarc
d9ce11902a7ce3ad3e47d717f863dcf03ea73ed3
[ "MIT" ]
null
null
null
#!/usr/bin/env python import luigi if __name__ == '__main__': luigi.run()
30.866667
78
0.563715
#!/usr/bin/env python import re from pathlib import Path import luigi from .core import FtarcTask class CollectFqMetricsWithFastqc(FtarcTask): fq_paths = luigi.ListParameter() dest_dir_path = luigi.Parameter(default='.') fastqc = luigi.Parameter(default='fastqc') n_cpu = luigi.IntParameter(default=...
0
0
0
1,682
0
0
0
-3
91
f067f89023af4ada7a41c3edf295ca19e2dffe30
2,135
py
Python
flask/ajax-setinterval-get-thread-result/main.py
whitmans-max/python-examples
881a8f23f0eebc76816a0078e19951893f0daaaa
[ "MIT" ]
140
2017-02-21T22:49:04.000Z
2022-03-22T17:51:58.000Z
flask/ajax-setinterval-get-thread-result/main.py
whitmans-max/python-examples
881a8f23f0eebc76816a0078e19951893f0daaaa
[ "MIT" ]
5
2017-12-02T19:55:00.000Z
2021-09-22T23:18:39.000Z
flask/ajax-setinterval-get-thread-result/main.py
whitmans-max/python-examples
881a8f23f0eebc76816a0078e19951893f0daaaa
[ "MIT" ]
79
2017-01-25T10:53:33.000Z
2022-03-11T16:13:57.000Z
#!/usr/bin/env python3 # date: 2020.01.17 # https://stackoverflow.com/questions/59780007/ajax-with-flask-for-real-time-esque-updates-of-sensor-data-on-webpage/ from flask import Flask app = Flask(__name__) running = False # to control loop in thread value = 0 app.run(debug=True)
25.416667
117
0.513817
#!/usr/bin/env python3 # date: 2020.01.17 # https://stackoverflow.com/questions/59780007/ajax-with-flask-for-real-time-esque-updates-of-sensor-data-on-webpage/ from flask import Flask, request, render_template_string, jsonify import datetime import time import threading app = Flask(__name__) running = False # to co...
0
1,506
0
0
0
170
0
21
139
173e22545eafe25afdd8caf76400a2e631dc90af
884
py
Python
opportune/tests/test_account_model.py
Mildly-Sketchy/Mildly-Sketchy
d215d5c478bfbdac0056ed0144edfe8c9efa557f
[ "MIT" ]
null
null
null
opportune/tests/test_account_model.py
Mildly-Sketchy/Mildly-Sketchy
d215d5c478bfbdac0056ed0144edfe8c9efa557f
[ "MIT" ]
2
2019-12-26T16:41:26.000Z
2020-01-06T18:52:13.000Z
opportune/tests/test_account_model.py
Mildly-Sketchy/Mildly-Sketchy
d215d5c478bfbdac0056ed0144edfe8c9efa557f
[ "MIT" ]
1
2018-06-13T18:16:45.000Z
2018-06-13T18:16:45.000Z
def test_constructed_account_added_to_database(db_session): """Test adding a complete stock entry.""" from ..models import Account assert len(db_session.query(Account).all()) == 0 account = Account( username='TEST', password='1234', email='some@email.com', ) db_session.a...
29.466667
62
0.668552
def test_constructed_account_added_to_database(db_session): """Test adding a complete stock entry.""" from ..models import Account assert len(db_session.query(Account).all()) == 0 account = Account( username='TEST', password='1234', email='some@email.com', ) db_session.a...
0
0
0
0
0
0
0
0
0
7be240fbdc21ca63847b43f7fdcf1774a5755f88
282
py
Python
zillowdb/packages/pathlib_mate/__init__.py
MacHu-GWU/zillowdb-project
020266257311fa667a3b5fcca15450eb00584aaf
[ "MIT" ]
null
null
null
zillowdb/packages/pathlib_mate/__init__.py
MacHu-GWU/zillowdb-project
020266257311fa667a3b5fcca15450eb00584aaf
[ "MIT" ]
null
null
null
zillowdb/packages/pathlib_mate/__init__.py
MacHu-GWU/zillowdb-project
020266257311fa667a3b5fcca15450eb00584aaf
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ pathlib_mate provide extensive methods, attributes for pathlib. """ __version__ = "0.0.6" __short_description__ = "An extended and more powerful pathlib." __license__ = "MIT" __author__ = "Sanhe Hu"
20.142857
64
0.705674
#!/usr/bin/env python # -*- coding: utf-8 -*- """ pathlib_mate provide extensive methods, attributes for pathlib. """ __version__ = "0.0.6" __short_description__ = "An extended and more powerful pathlib." __license__ = "MIT" __author__ = "Sanhe Hu" from .pathlib import Path
0
0
0
0
0
0
0
4
27
33de6ce4592643dd5c627b7e893f88550ab7fb4f
3,476
py
Python
baseseven.py
FykAikawa/Anchor-based-SR-pytorch
60ec9b49efd23cf59a385268f4d10a98e5a73965
[ "MIT" ]
3
2021-07-18T17:28:44.000Z
2022-02-28T03:08:13.000Z
baseseven.py
FykAikawa/Anchor-based-SR-pytorch
60ec9b49efd23cf59a385268f4d10a98e5a73965
[ "MIT" ]
null
null
null
baseseven.py
FykAikawa/Anchor-based-SR-pytorch
60ec9b49efd23cf59a385268f4d10a98e5a73965
[ "MIT" ]
null
null
null
import torch.nn as nn upsampler = nn.Upsample(scale_factor=4, mode='bilinear')
38.622222
172
0.59954
import numpy as np import torch.nn as nn import torch def rgb_to_ycbcr(image): r: torch.Tensor = image[..., 0, :, :] g: torch.Tensor = image[..., 1, :, :] b: torch.Tensor = image[..., 2, :, :] delta = 0.5 y = 0.299 * r + 0.587 * g + 0.114 * b cb = (b - y) * 0.564 + delta cr = (r - y) * 0.7...
0
0
0
2,663
0
608
0
-12
136
e81ad75e45ab4660c1a2fd705fc8ce5e9c88c56b
199
py
Python
oo/pessoa.py
cef01/pythonbirds
5af5278a784cb76162de756cec213b14cce1e1dd
[ "MIT" ]
null
null
null
oo/pessoa.py
cef01/pythonbirds
5af5278a784cb76162de756cec213b14cce1e1dd
[ "MIT" ]
null
null
null
oo/pessoa.py
cef01/pythonbirds
5af5278a784cb76162de756cec213b14cce1e1dd
[ "MIT" ]
null
null
null
if __name__ == '__main__': p = Pessoa() print(Pessoa.comprimentar(p)) print(id(p)) print(p.comprimentar())
19.9
33
0.60804
class Pessoa: def comprimentar(self): return f'olá {id(self)}' if __name__ == '__main__': p = Pessoa() print(Pessoa.comprimentar(p)) print(id(p)) print(p.comprimentar())
2
0
0
52
0
0
0
0
22
9fc44a3261d2a0f0f9c0aeed1ed8fd908fe8b78e
2,717
py
Python
python/ns/maya/Progress.py
redpawfx/massiveImporter
2772d1ce530041007d00d8ba4274dccdda7b8900
[ "MIT" ]
2
2018-01-30T07:50:48.000Z
2020-03-10T02:10:38.000Z
python/ns/maya/Progress.py
redpawfx/massiveImporter
2772d1ce530041007d00d8ba4274dccdda7b8900
[ "MIT" ]
null
null
null
python/ns/maya/Progress.py
redpawfx/massiveImporter
2772d1ce530041007d00d8ba4274dccdda7b8900
[ "MIT" ]
3
2016-10-25T14:29:34.000Z
2021-08-09T13:37:33.000Z
# The MIT License # # Copyright (c) 2008 James Piechota # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy,...
29.215054
80
0.741627
# The MIT License # # Copyright (c) 2008 James Piechota # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy,...
0
0
0
0
0
1,078
0
19
299
a028741d9b11b9c49111dc54ccac4cee2d3d2068
1,274
py
Python
microWsgi/uwsgiTestApp.py
chrisbrake/PythonSandbox
8cd2ea847676d6a300b55c560f49cd980f760b00
[ "BSD-3-Clause" ]
1
2018-10-19T17:35:01.000Z
2018-10-19T17:35:01.000Z
microWsgi/uwsgiTestApp.py
chrisbrake/PythonSandbox
8cd2ea847676d6a300b55c560f49cd980f760b00
[ "BSD-3-Clause" ]
null
null
null
microWsgi/uwsgiTestApp.py
chrisbrake/PythonSandbox
8cd2ea847676d6a300b55c560f49cd980f760b00
[ "BSD-3-Clause" ]
null
null
null
import json import logging import socket """ Server: uwsgi --module "microWsgi.uwsgiTestApp:assemble()" --http :5050 --stats stats.socket Client: curl -s 'http://localhost:5050?test=potatoes' | python -m 'json.tool' Stats: nc -U stats.socket | python -m 'json.tool' """ logging.basicConfig(level=logging.DEBUG) def...
20.222222
85
0.603611
import json import logging import socket import falcon from . import db """ Server: uwsgi --module "microWsgi.uwsgiTestApp:assemble()" --http :5050 --stats stats.socket Client: curl -s 'http://localhost:5050?test=potatoes' | python -m 'json.tool' Stats: nc -U stats.socket | python -m 'json.tool' """ logging.basicCo...
0
0
0
348
0
75
0
-13
90
aa26db1011e01edbcbb699f248c229f20b132387
365,395
py
Python
modality/pyuml2/uml_mixins.py
bmjjr/modality
700c608b4e8150f1413ba022938ab6a8f1f148c1
[ "MIT" ]
1
2019-01-09T07:09:36.000Z
2019-01-09T07:09:36.000Z
modality/pyuml2/uml_mixins.py
bmjjr/modality
700c608b4e8150f1413ba022938ab6a8f1f148c1
[ "MIT" ]
null
null
null
modality/pyuml2/uml_mixins.py
bmjjr/modality
700c608b4e8150f1413ba022938ab6a8f1f148c1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Mixins to be implemented by user.""" import pyecore.ecore as ecore ...
44.598438
652
0.709646
# -*- coding: utf-8 -*- """Mixins to be implemented by user.""" import pyecore.ecore as ecore from pyecore.ecore import EDerivedCollection from pyecore.valuecontainer import EcoreUtils, BadValueError from pyecore.innerutils import ignored def check(value, etype): if not EcoreUtils.isinstance(value, etype): ...
3
4,074
0
354,099
0
93
0
79
6,667
81d2b8761a000e3c2e1719093c36e29ab070f551
97
py
Python
NaStyAPI/__init__.py
Nimi142/NaStyAPI
573c04b89c6dd40b2a5b8360221a9711fece1234
[ "Apache-2.0" ]
2
2021-04-04T06:36:22.000Z
2021-05-03T16:00:58.000Z
NaStyAPI/__init__.py
Nimi142/NaStyAPI
573c04b89c6dd40b2a5b8360221a9711fece1234
[ "Apache-2.0" ]
null
null
null
NaStyAPI/__init__.py
Nimi142/NaStyAPI
573c04b89c6dd40b2a5b8360221a9711fece1234
[ "Apache-2.0" ]
null
null
null
__all__ = ["Nation", "Region", "Telegrams", "WorldAssembly", "World", "TradingCards", "APICall"]
48.5
96
0.670103
__all__ = ["Nation", "Region", "Telegrams", "WorldAssembly", "World", "TradingCards", "APICall"]
0
0
0
0
0
0
0
0
0
7c29438a9f8848043860516040d82534bc2f57ea
28,673
py
Python
google/ads/googleads/v6/resources/types/campaign.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
null
null
null
google/ads/googleads/v6/resources/types/campaign.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
null
null
null
google/ads/googleads/v6/resources/types/campaign.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
42.104258
151
0.672165
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
0
0
0
25,759
0
0
0
1,575
508
4846371389c6ecd83e61164bd3ccc3ebf91187b3
1,596
py
Python
scripts/gen_large_tests_oc.py
kuenishi/chainer-compiler
942c3b09759d0857ddc7c6bb93b81117d011ff50
[ "MIT" ]
null
null
null
scripts/gen_large_tests_oc.py
kuenishi/chainer-compiler
942c3b09759d0857ddc7c6bb93b81117d011ff50
[ "MIT" ]
null
null
null
scripts/gen_large_tests_oc.py
kuenishi/chainer-compiler
942c3b09759d0857ddc7c6bb93b81117d011ff50
[ "MIT" ]
null
null
null
#!/usr/bin/python3 if __name__ == '__main__': main()
28
71
0.572055
#!/usr/bin/python3 import chainer import numpy as np import onnx_chainer import large_models def create_test(test_name, get_fun, dtype): np.random.seed(314) chainer.config.dtype = dtype model, inputs = get_fun(dtype) output_grad = 'backprop' in test_name test_dir = 'out/%s' % test_name cha...
0
0
0
0
0
1,389
0
-14
159
e4b2fb7d5295c37d01ec3eec6b1e99065efdc814
648
py
Python
setup.py
olavurmortensen/pedgraph
0e7c90bd0e4f63fa718b7af8c5c769f102bbdebc
[ "MIT" ]
null
null
null
setup.py
olavurmortensen/pedgraph
0e7c90bd0e4f63fa718b7af8c5c769f102bbdebc
[ "MIT" ]
null
null
null
setup.py
olavurmortensen/pedgraph
0e7c90bd0e4f63fa718b7af8c5c769f102bbdebc
[ "MIT" ]
null
null
null
import setuptools with open("README.md", "r") as fh: long_description = fh.read() INSTALL_REQUIRES = ['neo4j-driver>=4.1.1', 'tqdm==4.48.2'] setuptools.setup( name="pedgraph", version="0.0.1", author="lavur Mortensen", author_email="olavurmortensen@gmail.com", description=...
29.454545
86
0.697531
import setuptools with open("README.md", "r") as fh: long_description = fh.read() INSTALL_REQUIRES = ['neo4j-driver>=4.1.1', 'tqdm==4.48.2'] setuptools.setup( name="pedgraph", version="0.0.1", author="Ólavur Mortensen", author_email="olavurmortensen@gmail.com", description...
2
0
0
0
0
0
0
0
0
a0bfa04c353c116af29022063768a993ed18a5fc
2,008
py
Python
Q380-v2.py
Linchin/python_leetcode_git
3d08ab04bbdbd2ce268f33c501fbb149662872c7
[ "MIT" ]
null
null
null
Q380-v2.py
Linchin/python_leetcode_git
3d08ab04bbdbd2ce268f33c501fbb149662872c7
[ "MIT" ]
null
null
null
Q380-v2.py
Linchin/python_leetcode_git
3d08ab04bbdbd2ce268f33c501fbb149662872c7
[ "MIT" ]
null
null
null
""" Q380 Insert Delete GetRandom O(1) Medium Array; Hash Table; Design. Design a data structure that supports all following operations in average O(1) time. 1. insert(val): Inserts an item val to the set if not already present. 2. remove(val): Removes an item val from the set if present. 3. getRandom: Returns a rand...
24.790123
117
0.635956
""" Q380 Insert Delete GetRandom O(1) Medium Array; Hash Table; Design. Design a data structure that supports all following operations in average O(1) time. 1. insert(val): Inserts an item val to the set if not already present. 2. remove(val): Removes an item val from the set if present. 3. getRandom: Returns a rand...
0
0
0
1,167
0
0
0
-8
46
8e2c9128f4841ac28d470c168123443131eba11d
385
py
Python
RiskQuantLib/Security/Stock/stock.py
SyuyaMurakami/RiskQuantLib-Doc
2503befc24c2e422e51f8b9f468c8d8439e11c65
[ "MIT" ]
1
2021-12-29T12:18:45.000Z
2021-12-29T12:18:45.000Z
RiskQuantLib/Security/Stock/stock.py
SyuyaMurakami/RiskQuantLib-Doc
2503befc24c2e422e51f8b9f468c8d8439e11c65
[ "MIT" ]
null
null
null
RiskQuantLib/Security/Stock/stock.py
SyuyaMurakami/RiskQuantLib-Doc
2503befc24c2e422e51f8b9f468c8d8439e11c65
[ "MIT" ]
1
2021-12-08T02:14:34.000Z
2021-12-08T02:14:34.000Z
#!/usr/bin/python #coding = utf-8
20.263158
76
0.732468
#!/usr/bin/python #coding = utf-8 from RiskQuantLib.Security.base import base from RiskQuantLib.Set.Security.Stock.stock import setStock class stock(base,setStock): """ stock is one of the five basic classes. """ def __init__(self,codeString,nameString,securityTypeString = 'Stock'): super(stoc...
0
0
0
218
0
0
0
59
68
d508595276fcec1298ee3044f7295cd76a1e39cb
333
py
Python
tests/test_basic.py
sbalnojan/tropo-mods
63ef70b84ff6d3fb2bbaeea94193e06e1fc64f63
[ "Apache-2.0" ]
null
null
null
tests/test_basic.py
sbalnojan/tropo-mods
63ef70b84ff6d3fb2bbaeea94193e06e1fc64f63
[ "Apache-2.0" ]
null
null
null
tests/test_basic.py
sbalnojan/tropo-mods
63ef70b84ff6d3fb2bbaeea94193e06e1fc64f63
[ "Apache-2.0" ]
null
null
null
import tropo_mods.auto_sns as auto_sns from troposphere import Template test_sns_yaml = """\ Resources: SNSTopic1: Properties: TopicName: my_new_topic Type: AWS::SNS::Topic """ t = Template() topic = auto_sns.AutoSNS(t, topic_name="my_new_topic", email="test@me.com") assert test_sns_yaml == topic.pri...
20.8125
75
0.72973
import tropo_mods.auto_sns as auto_sns from troposphere import Template test_sns_yaml = """\ Resources: SNSTopic1: Properties: TopicName: my_new_topic Type: AWS::SNS::Topic """ t = Template() topic = auto_sns.AutoSNS(t, topic_name="my_new_topic", email="test@me.com") assert test_sns_yaml == topic.pri...
0
0
0
0
0
0
0
0
0
2e4a45056766bfcabf520edef026dcde56f9a911
23,761
py
Python
jade2/pymol_jade/PyMolScriptWriter.py
RosettaCommons/jade2
40affc7c4e0f1f6ee07030e72de284e3484946e7
[ "BSD-3-Clause" ]
1
2019-12-23T21:52:23.000Z
2019-12-23T21:52:23.000Z
jade2/pymol_jade/PyMolScriptWriter.py
RosettaCommons/jade2
40affc7c4e0f1f6ee07030e72de284e3484946e7
[ "BSD-3-Clause" ]
null
null
null
jade2/pymol_jade/PyMolScriptWriter.py
RosettaCommons/jade2
40affc7c4e0f1f6ee07030e72de284e3484946e7
[ "BSD-3-Clause" ]
2
2021-11-13T01:34:15.000Z
2021-11-13T01:34:34.000Z
#!/usr/bin/python #Author: Jared Adolf-Bryfogle import sys from collections import defaultdict from jade2.basic.threading.Threader import Threader from jade2.basic.structure import Structure #from jade2.antibody import util as ab_util ############################################################################...
35.623688
162
0.577543
#!/usr/bin/python #Author: Jared Adolf-Bryfogle import sys from collections import defaultdict from jade2.basic.path import * from jade2.basic.threading.Threader import Threader from jade2.basic.structure import Structure from jade2.basic.path import * #from jade2.antibody import util as ab_util class PyMolScriptWr...
0
0
0
11,732
0
0
0
18
68
64daa544c850e2eafe0501beb13ccb026f2670ec
75
py
Python
server/conftest.py
njbrunner/neighbor
eeffc8ff7adb4eaa1889ab058d6cd1fc95b80e1e
[ "MIT" ]
1
2020-04-06T03:31:25.000Z
2020-04-06T03:31:25.000Z
server/conftest.py
njbrunner/covid-19
eeffc8ff7adb4eaa1889ab058d6cd1fc95b80e1e
[ "MIT" ]
16
2020-04-17T00:44:01.000Z
2020-05-01T20:39:31.000Z
server/conftest.py
njbrunner/neighbor
eeffc8ff7adb4eaa1889ab058d6cd1fc95b80e1e
[ "MIT" ]
null
null
null
"""This module alters the testing system path to provide access to app."""
37.5
74
0.746667
"""This module alters the testing system path to provide access to app."""
0
0
0
0
0
0
0
0
0
ab6a6ccefbec9268443801ac748475636e4151cb
7,072
py
Python
sleeplearning/lib/models/granger_amoe.py
a1247418/MT18_LH_human-sleep-classification
c4a40571390aaa14b1cc8a458100e21252fe05d2
[ "MIT" ]
2
2018-11-16T19:39:32.000Z
2018-11-20T03:38:58.000Z
sleeplearning/lib/models/granger_amoe.py
a1247418/MT18_LH_human-sleep-classification
c4a40571390aaa14b1cc8a458100e21252fe05d2
[ "MIT" ]
1
2019-04-03T07:39:48.000Z
2019-04-03T07:39:48.000Z
sleeplearning/lib/models/granger_amoe.py
a1247418/MT18_LH_human-sleep-classification
c4a40571390aaa14b1cc8a458100e21252fe05d2
[ "MIT" ]
1
2019-03-04T15:46:24.000Z
2019-03-04T15:46:24.000Z
import os import sys root_dir = os.path.abspath(os.path.join(os.path.dirname('__file__'), '..')) sys.path.insert(0, root_dir) from pymongo import MongoClient from cfg.config import mongo_url client = MongoClient(mongo_url) db = client.sacred # db.collection_names(include_system_collections=False) files = db.fs.files...
35.898477
102
0.579893
import os import sys import gridfs from sleeplearning.lib.models.single_chan_expert import SingleChanExpert root_dir = os.path.abspath(os.path.join(os.path.dirname('__file__'), '..')) sys.path.insert(0, root_dir) from pymongo import MongoClient from torch import nn from torch.nn.init import xavier_normal_ as xavier_...
0
0
0
5,915
0
521
0
87
225
4ab43ec654b55664f667149827969ecc7a2b583c
1,173
py
Python
big_data/python_tools/big_data_tools/bokeh_tools/ex_graphs/labelset_ex.py
paulhtremblay/big-data
dfa2aa9877300a57e7a9368af59c07fcc5841b4f
[ "MIT" ]
null
null
null
big_data/python_tools/big_data_tools/bokeh_tools/ex_graphs/labelset_ex.py
paulhtremblay/big-data
dfa2aa9877300a57e7a9368af59c07fcc5841b4f
[ "MIT" ]
7
2020-06-05T18:13:25.000Z
2022-03-11T23:19:48.000Z
big_data/python_tools/big_data_tools/bokeh_tools/ex_graphs/labelset_ex.py
paulhtremblay/big-data
dfa2aa9877300a57e7a9368af59c07fcc5841b4f
[ "MIT" ]
1
2020-11-25T18:24:37.000Z
2020-11-25T18:24:37.000Z
from bokeh.plotting import figure, show, output_file from bokeh.models import ColumnDataSource, Range1d, LabelSet, Label output_file("label.html", title="label.py example") source = ColumnDataSource(data=dict(height=[66, 71, 72, 68, 58, 62], weight=[165, 189, 220, 141, 260, 174], ...
41.892857
75
0.602728
from bokeh.plotting import figure, show, output_file from bokeh.models import ColumnDataSource, Range1d, LabelSet, Label output_file("label.html", title="label.py example") source = ColumnDataSource(data=dict(height=[66, 71, 72, 68, 58, 62], weight=[165, 189, 220, 141, 260, 174], ...
0
0
0
0
0
0
0
0
0
189bb5fd75bd6436fff20052f805eddc1d8a7212
4,516
py
Python
backend/size.py
VivianChan1998/Old-shoes
090f97373333a4df21399f5555dadd4c0eca6ea6
[ "MIT" ]
1
2021-01-27T17:53:33.000Z
2021-01-27T17:53:33.000Z
backend/size.py
VivianChan1998/Old-shoes
090f97373333a4df21399f5555dadd4c0eca6ea6
[ "MIT" ]
2
2021-01-28T07:38:49.000Z
2022-01-22T17:25:59.000Z
backend/size.py
VivianChan1998/Old-shoes
090f97373333a4df21399f5555dadd4c0eca6ea6
[ "MIT" ]
1
2020-09-03T02:37:14.000Z
2020-09-03T02:37:14.000Z
import sys # import cv2 # import config_own import logging ########## To-Do ########## ### optimization ### warping ### ### the shot-raw-img is needed to be warpped ### or the coin and shoes will be in inaccurate scales # def img_warping(): # to scale the main_obj size by a NT$10 coin # NT$10 coin's diameter = 26mm...
32.257143
142
0.579717
import os from os.path import basename import sys import json import requests import matplotlib.pyplot as plt from PIL import Image from io import BytesIO # import cv2 import numpy as np # import config_own import logging def shot_cv2(): # set the img storage path img_path = config_own.SHOT_CV2_DIR # cpat...
33
0
0
0
0
3,400
0
-13
244
d64e97cef206d1a3eab0c9ff04a0f95768cec03b
500
py
Python
algorithms/samename-03-1.py
lsm4446/study_python
d05077b319c98007af26c92f69f5d59fe33483d0
[ "BSD-2-Clause" ]
1
2020-02-17T01:25:35.000Z
2020-02-17T01:25:35.000Z
algorithms/samename-03-1.py
lsm4446/study_python
d05077b319c98007af26c92f69f5d59fe33483d0
[ "BSD-2-Clause" ]
2
2021-03-31T19:32:47.000Z
2021-12-13T20:33:30.000Z
algorithms/samename-03-1.py
lsm4446/study_python
d05077b319c98007af26c92f69f5d59fe33483d0
[ "BSD-2-Clause" ]
null
null
null
''' Created on 2018. 4. 26. @author: lsm ''' name = ["", "Tom", "Jerry", "Mike", "", "Tom"] print(find_same_name(name)) name = ["", "Tom", "Jerry", "Mike", "", "Mike"] print(find_same_name(name)) name = ["", "Tom", "Jerry", "Mike", "Mike", "Jerry", "tom"] print(find_same_name(name))
21.73913
62
0.53
''' Created on 2018. 4. 26. @author: lsm ''' def find_same_name(a): n = len(a) result = set() for i in range(0, n-1): for j in range(i+1, n): if a[i] == a[j]: result.add(a[i]) return result name = ["이상면", "Tom", "Jerry", "Mike", "이상면", "Tom"] print(find_same_name(na...
45
0
0
0
0
175
0
0
22
52e4d41b65b85280389783fdde8527c4a6dd8a7c
7,689
py
Python
curriculums.py
EdwardJTL/Edit3D
bbb6364aeb5ea17c12c0c23578268641c066ebca
[ "MIT" ]
null
null
null
curriculums.py
EdwardJTL/Edit3D
bbb6364aeb5ea17c12c0c23578268641c066ebca
[ "MIT" ]
null
null
null
curriculums.py
EdwardJTL/Edit3D
bbb6364aeb5ea17c12c0c23578268641c066ebca
[ "MIT" ]
null
null
null
""" To easily reproduce experiments, and avoid passing several command line arguments, we implemented a curriculum utility. Parameters can be set in a curriculum dictionary. Curriculum Schema: Numerical keys in the curriculum specify an upsample step. When the current step matches the upsample step, the value...
33.723684
125
0.642216
""" To easily reproduce experiments, and avoid passing several command line arguments, we implemented a curriculum utility. Parameters can be set in a curriculum dictionary. Curriculum Schema: Numerical keys in the curriculum specify an upsample step. When the current step matches the upsample step, the value...
0
0
0
0
0
1,616
0
0
92
12bef3917108852eeaabbac5c934d0b48f2924ea
6,488
py
Python
tests/transmitters.py
LeMagnesium/stolas-p2p
f5a48c12b8422c58ba62ed89491bcf2a19441dbf
[ "Unlicense" ]
null
null
null
tests/transmitters.py
LeMagnesium/stolas-p2p
f5a48c12b8422c58ba62ed89491bcf2a19441dbf
[ "Unlicense" ]
null
null
null
tests/transmitters.py
LeMagnesium/stolas-p2p
f5a48c12b8422c58ba62ed89491bcf2a19441dbf
[ "Unlicense" ]
null
null
null
#!/usr/bin/python3 # -*- encoding: utf-8 -*- # from sys import argv import stolas.stolas from stolas.betterui import pprint as print if __name__ == '__main__': if len(argv) == 1: print("Tell me?") pass if argv[1] == "cluster": stolas_cluster() elif argv[1] == "gigacluster": stolas_gigacluster() elif a...
30.603774
146
0.679408
#!/usr/bin/python3 # -*- encoding: utf-8 -*- # from sys import argv import random import os.path import hashlib import time import stolas.stolas import stolas.protocol from stolas.betterui import pprint as print from network import manual_stolas_prompt from common import network_collapse, mean def network_random(po...
7
0
0
0
0
5,698
0
8
339
dfb39c7d8e6a3e2dae7e009e6ab22ce4fe0a79a6
8,436
py
Python
Neural Networks/deepnnScript.py
Muthu2093/Machine-Learning-Applications
bb171ff2bfdcb5af64403ae7f63fe96572d63963
[ "MIT" ]
null
null
null
Neural Networks/deepnnScript.py
Muthu2093/Machine-Learning-Applications
bb171ff2bfdcb5af64403ae7f63fe96572d63963
[ "MIT" ]
null
null
null
Neural Networks/deepnnScript.py
Muthu2093/Machine-Learning-Applications
bb171ff2bfdcb5af64403ae7f63fe96572d63963
[ "MIT" ]
null
null
null
''' Comparing single layer MLP with deep MLP (using TensorFlow) ''' import tensorflow as tf import timeit start = timeit.default_timer() # Create model # Add more hidden layers to create deeper networks # Remember to connect the final hidden layer to the out_layer # Do not change this # Parameters learning_rate = ...
40.951456
135
0.642959
''' Comparing single layer MLP with deep MLP (using TensorFlow) ''' import tensorflow as tf import numpy as np import pickle import timeit start = timeit.default_timer() # Create model # Add more hidden layers to create deeper networks # Remember to connect the final hidden layer to the out_layer def create_multilaye...
0
0
0
0
0
6,505
0
-11
88
bd6b41c6a191fa6db37444744515df734b167e4a
405
py
Python
pytorch_projects/common_pytorch/base_modules/avg_pool_head.py
KGMSFT/integral-human-pose
d3ad4117ed71c580d2ab17987e15f9b2c3318a3b
[ "MIT" ]
472
2018-07-20T04:01:04.000Z
2022-01-20T07:28:06.000Z
pytorch_projects/common_pytorch/base_modules/avg_pool_head.py
KGMSFT/integral-human-pose
d3ad4117ed71c580d2ab17987e15f9b2c3318a3b
[ "MIT" ]
44
2018-09-17T06:39:13.000Z
2021-09-10T06:22:27.000Z
pytorch_projects/common_pytorch/base_modules/avg_pool_head.py
KGMSFT/integral-human-pose
d3ad4117ed71c580d2ab17987e15f9b2c3318a3b
[ "MIT" ]
88
2018-07-22T13:10:16.000Z
2022-03-21T11:21:38.000Z
import torch.nn as nn
31.153846
64
0.624691
import torch.nn as nn class AvgPoolHead(nn.Module): def __init__(self, in_channels, out_channels, fea_map_size): super(AvgPoolHead, self).__init__() self.avgpool = nn.AvgPool2d(fea_map_size, stride=1) self.fc = nn.Linear(in_channels, out_channels) def forward(self, x): x = self...
0
0
0
361
0
0
0
0
23
4a1ceaf38773fa0905170c8e89ab1c5dd2a537ec
1,049
py
Python
lib_collection/sort/quick_3_string.py
caser789/libcollection
eb0a6fc36ce1cb57ed587865bbc1576e81c08924
[ "MIT" ]
null
null
null
lib_collection/sort/quick_3_string.py
caser789/libcollection
eb0a6fc36ce1cb57ed587865bbc1576e81c08924
[ "MIT" ]
null
null
null
lib_collection/sort/quick_3_string.py
caser789/libcollection
eb0a6fc36ce1cb57ed587865bbc1576e81c08924
[ "MIT" ]
null
null
null
if __name__ == '__main__': keys = [ 'she', 'sells', 'seashells', 'by', 'the', 'seashore', 'the', 'shells', 'she', 'sells', 'are', 'surely', 'seashells', ] expected = sorted(keys[:]) assert keys !...
16.919355
49
0.414681
def sort(keys): _sort(keys, 0, len(keys)-1, 0) def _sort(keys, lo, hi, start): if hi <= lo: return lt = lo gt = hi v = get_r(keys[lt], start) i = lt + 1 while i <= gt: c = get_r(keys[i], start) if c < v: keys[lt], keys[i] = keys[i], keys[lt] ...
0
0
0
0
0
604
0
0
68
18817fe28e3e3d36c37cd1aa559511462ada2e60
505
py
Python
src/sdanalysis/dynamics/__init__.py
malramsay64/statdyn-analysis
2cc9ea1c5386b7fc203cb068d29e8d0aa626ee43
[ "MIT" ]
6
2018-03-13T22:43:11.000Z
2021-07-07T17:46:28.000Z
src/sdanalysis/dynamics/__init__.py
malramsay64/statdyn-analysis
2cc9ea1c5386b7fc203cb068d29e8d0aa626ee43
[ "MIT" ]
174
2018-02-06T05:50:12.000Z
2020-08-01T19:32:55.000Z
src/sdanalysis/dynamics/__init__.py
malramsay64/statdyn-analysis
2cc9ea1c5386b7fc203cb068d29e8d0aa626ee43
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright 2019 Malcolm Ramsay <malramsay64@gmail.com> # # Distributed under terms of the MIT license. """Module for reading and processing input files.""" from ._util import TrackedMotion from .dynamics import Dynamics from .relaxations import Las...
21.956522
82
0.724752
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2019 Malcolm Ramsay <malramsay64@gmail.com> # # Distributed under terms of the MIT license. """Module for reading and processing input files.""" from ._util import TrackedMotion from .dynamics import Dynamics from .relaxations import La...
2
0
0
0
0
0
0
0
0
4433baac982fb2d87a67e95a552e5dba24c69fd0
1,000
py
Python
backend/fedmix_backend/datastore.py
FEDMix/fedmix-viewer
3116d7c85aa73016d5657c2c084cddb7fb64e399
[ "Apache-2.0" ]
null
null
null
backend/fedmix_backend/datastore.py
FEDMix/fedmix-viewer
3116d7c85aa73016d5657c2c084cddb7fb64e399
[ "Apache-2.0" ]
3
2020-10-19T09:27:42.000Z
2020-10-23T11:26:52.000Z
backend/fedmix_backend/datastore.py
FEDMix/fedmix-viewer
3116d7c85aa73016d5657c2c084cddb7fb64e399
[ "Apache-2.0" ]
null
null
null
import logging logger = logging.getLogger(__name__)
32.258065
77
0.598
import json import logging import os logger = logging.getLogger(__name__) class Datastore: def __init__(self, path, remote_url): self.path = path self.remote_url = remote_url self.datasets = dict() self.load_datasets() def load_datasets(self): print(f"Loading datasets...
0
0
0
901
0
0
0
-22
67
a25b7aed1e40cc5fb4a9fe65324df3c25be54409
6,669
py
Python
kohokoho.py
Moonlit-Solutions/kohokoho
27f7c0c45cf7662b79f5fd75402cbab2098423d0
[ "Apache-2.0" ]
null
null
null
kohokoho.py
Moonlit-Solutions/kohokoho
27f7c0c45cf7662b79f5fd75402cbab2098423d0
[ "Apache-2.0" ]
22
2021-01-24T06:42:55.000Z
2021-08-09T14:25:06.000Z
kohokoho.py
ayushsubedi/term-obfuscate-dataset
ac07d46a60114fadf084ade4e1dbf7dc0370bf07
[ "Apache-2.0" ]
2
2021-02-01T14:46:34.000Z
2021-02-18T03:40:02.000Z
from faker import Faker fake = Faker('en')
31.757143
78
0.575948
import click import string import random import time import pandas as pd from faker import Faker fake = Faker('en') class anon(object): '''Initialize a df as an anon object. Args: df: pandas dataframe Returns: anon object ''' def __init__(self, df): self.original = df.cop...
0
2,533
0
3,970
0
0
0
-37
156
48d27e7c7f04241eaba6ebba6f4280a5b806a2d3
1,741
py
Python
input_test.py
Forsenlol/Reinforced-training-simulating-the-work-of-neural-synapses
21e70c3eb5fac8984adb78771bf25f1e5aef823a
[ "MIT" ]
null
null
null
input_test.py
Forsenlol/Reinforced-training-simulating-the-work-of-neural-synapses
21e70c3eb5fac8984adb78771bf25f1e5aef823a
[ "MIT" ]
null
null
null
input_test.py
Forsenlol/Reinforced-training-simulating-the-work-of-neural-synapses
21e70c3eb5fac8984adb78771bf25f1e5aef823a
[ "MIT" ]
null
null
null
import gym import numpy as np import operator env = gym.make('MountainCar-v0') possible_actions = env.action_space.n print 'Possible actions are {}'.format(possible_actions) epsilonlearn = EpsilonGreedy() for episode in xrange(epsilonlearn.episodes): observation = env.reset() while True: env.render(...
28.540984
69
0.577254
import gym import numpy as np import operator env = gym.make('MountainCar-v0') possible_actions = env.action_space.n print 'Possible actions are {}'.format(possible_actions) class EpsilonGreedy(): def __init__(self, episodes=1000, epsilon=0.2): self.episodes = episodes self.epsilon = epsilon ...
0
0
0
1,134
0
0
0
0
23
c1732f33ed39b706bb238f90f7327e90eb8aadf9
6,424
py
Python
tests/utils_tests.py
lukegb/ehacktivities
bc04d02eaf36a106b943ce0cb8395e85a780f6fc
[ "MIT" ]
1
2016-04-30T00:19:13.000Z
2016-04-30T00:19:13.000Z
tests/utils_tests.py
lukegb/ehacktivities
bc04d02eaf36a106b943ce0cb8395e85a780f6fc
[ "MIT" ]
null
null
null
tests/utils_tests.py
lukegb/ehacktivities
bc04d02eaf36a106b943ce0cb8395e85a780f6fc
[ "MIT" ]
null
null
null
# vim: set fileencoding=utf-8 from eactivities import utils as utils
31.336585
84
0.452055
# vim: set fileencoding=utf-8 import unittest import decimal from eactivities import utils as utils class TestFormatYear(unittest.TestCase): def test_basic(self): self.assertEqual(utils.format_year(2013), "13-14") self.assertEqual(utils.format_year(2012), "12-13") def test_wraparound(self):...
6
0
0
6,175
0
0
0
-13
183
0ee0a90813c8c9a90a1985052ea498c3076c177b
2,480
py
Python
tests/dataset_mock.py
fufunoyu/mindspore
704e367ada35653e8144eb0528c714f4b0231508
[ "Apache-2.0" ]
null
null
null
tests/dataset_mock.py
fufunoyu/mindspore
704e367ada35653e8144eb0528c714f4b0231508
[ "Apache-2.0" ]
null
null
null
tests/dataset_mock.py
fufunoyu/mindspore
704e367ada35653e8144eb0528c714f4b0231508
[ "Apache-2.0" ]
1
2021-05-10T03:30:36.000Z
2021-05-10T03:30:36.000Z
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
27.252747
78
0.645968
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
0
50
0
1,642
0
0
0
4
68
c78fff6a1b742a2097292cc1762ed16a15045646
2,885
py
Python
onnx/backend/test/case/node/softmax.py
pchandrasekaran1595/onnx
10da6f2e919c8515877e227a41cd44e86ae0bb2d
[ "Apache-2.0" ]
12,820
2017-09-07T07:00:24.000Z
2022-03-31T14:41:57.000Z
onnx/backend/test/case/node/softmax.py
pchandrasekaran1595/onnx
10da6f2e919c8515877e227a41cd44e86ae0bb2d
[ "Apache-2.0" ]
3,213
2017-09-07T17:48:17.000Z
2022-03-31T19:44:57.000Z
onnx/backend/test/case/node/softmax.py
pchandrasekaran1595/onnx
10da6f2e919c8515877e227a41cd44e86ae0bb2d
[ "Apache-2.0" ]
2,922
2017-09-07T07:46:00.000Z
2022-03-31T15:55:24.000Z
# SPDX-License-Identifier: Apache-2.0 from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals
28.284314
65
0.507452
# SPDX-License-Identifier: Apache-2.0 from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np # type: ignore import onnx from ..base import Base from . import expect def softmax(x, axis=-1): # type: (n...
0
2,318
0
-1
0
185
0
-12
205
8caa6e6d97d8417d27e29aa9cf0782bc090cde87
5,604
py
Python
gorilla3d/nn/modules/sparse/unet.py
Gorilla-Lab-SCUT/gorilla-3d
399ed8616781a0fbc462f655c0e80c258c5a5207
[ "MIT" ]
6
2021-08-30T14:52:05.000Z
2022-02-28T19:37:14.000Z
gorilla3d/nn/modules/sparse/unet.py
Gorilla-Lab-SCUT/gorilla-3d
399ed8616781a0fbc462f655c0e80c258c5a5207
[ "MIT" ]
null
null
null
gorilla3d/nn/modules/sparse/unet.py
Gorilla-Lab-SCUT/gorilla-3d
399ed8616781a0fbc462f655c0e80c258c5a5207
[ "MIT" ]
3
2021-12-25T02:17:51.000Z
2022-02-23T21:53:16.000Z
import torch.nn as nn try: except: pass
37.36
77
0.470914
import functools from collections import OrderedDict from typing import Callable, Dict, List, Optional, Union import gorilla import torch import torch.nn as nn try: import spconv from spconv.modules import SparseModule except: pass from .block import ResidualBlock, VGGBlock, AsymResidualBlock class UBl...
0
0
0
5,271
0
0
0
78
209
72cbdd0bcaa996954661c5bd76f6d40be1176bc5
1,602
py
Python
canary/app.py
jrxFive/canary
725b7fc812c06de26056fe6eee9d155abf3e0c47
[ "MIT" ]
null
null
null
canary/app.py
jrxFive/canary
725b7fc812c06de26056fe6eee9d155abf3e0c47
[ "MIT" ]
null
null
null
canary/app.py
jrxFive/canary
725b7fc812c06de26056fe6eee9d155abf3e0c47
[ "MIT" ]
null
null
null
import falcon import skyline import outlier import backend api = falcon.API() # Skyline Resources skyline_MedianAbsoluteDeviation = skyline.MedianAbsoluteDeviation() skyline_Grubbs = skyline.Grubbs() skyline_FirstHourAverage = skyline.FirstHourAverage() skyline_HistogramBins = skyline.HistogramBins() skyline_LeastSqu...
29.127273
71
0.779026
import falcon import skyline import outlier import backend api = falcon.API() # Skyline Resources skyline_MedianAbsoluteDeviation = skyline.MedianAbsoluteDeviation() skyline_Grubbs = skyline.Grubbs() skyline_FirstHourAverage = skyline.FirstHourAverage() skyline_HistogramBins = skyline.HistogramBins() skyline_LeastSqu...
0
0
0
0
0
0
0
0
0
1a09c3a99ab397cf25966358037555ec10ce96b5
1,645
py
Python
dthm4kaiako/events/migrations/0003_auto_20190305_2035.py
taskmaker1/dthm4kaiako
681babc10b3223b5ae7fdf19b98c53d2bef4ea1a
[ "MIT" ]
3
2018-12-10T07:03:02.000Z
2021-04-12T02:18:30.000Z
dthm4kaiako/events/migrations/0003_auto_20190305_2035.py
taskmaker1/dthm4kaiako
681babc10b3223b5ae7fdf19b98c53d2bef4ea1a
[ "MIT" ]
566
2018-09-30T02:54:28.000Z
2022-03-28T01:20:01.000Z
dthm4kaiako/events/migrations/0003_auto_20190305_2035.py
taskmaker1/dthm4kaiako
681babc10b3223b5ae7fdf19b98c53d2bef4ea1a
[ "MIT" ]
3
2019-04-04T19:53:39.000Z
2021-05-16T02:04:46.000Z
# Generated by Django 2.1.5 on 2019-03-05 07:35
42.179487
397
0.594529
# Generated by Django 2.1.5 on 2019-03-05 07:35 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('events', '0002_auto_20190305_0753'), ] operations = [ migrations.AddField( model_name='location', name='city', ...
0
0
0
1,531
0
0
0
19
46
6799a09b7e3c82d3322add9429550909c8f992c3
2,009
py
Python
electricitymap/contrib/config/__init__.py
neilfulwiler/electricitymap-contrib
bcfd819eb24fc0530861e44acdb828f3ef635fe0
[ "MIT" ]
1
2022-02-08T22:52:09.000Z
2022-02-08T22:52:09.000Z
electricitymap/contrib/config/__init__.py
eliagroup/electricitymap-contrib
66e1e5976bf7add639c24b61386b329b15955075
[ "MIT" ]
null
null
null
electricitymap/contrib/config/__init__.py
eliagroup/electricitymap-contrib
66e1e5976bf7add639c24b61386b329b15955075
[ "MIT" ]
null
null
null
import json from pathlib import Path from typing import Dict, List, NewType, Tuple ZoneKey = NewType("ZoneKey", str) Point = NewType("Point", Tuple[float, float]) BoundingBox = NewType("BoundingBox", List[Point]) CONFIG_DIR = Path(__file__).parent.parent.parent.parent.joinpath("config").resolve() # Read JOSN files Z...
40.18
88
0.735192
import json from pathlib import Path from typing import Dict, List, NewType, Tuple ZoneKey = NewType("ZoneKey", str) Point = NewType("Point", Tuple[float, float]) BoundingBox = NewType("BoundingBox", List[Point]) CONFIG_DIR = Path(__file__).parent.parent.parent.parent.joinpath("config").resolve() # Read JOSN files Z...
0
0
0
0
0
282
0
0
23
afafff9e14db07eceecd082a992b541d798cad5f
2,200
py
Python
tests/conftest.py
RussellJQA/test-statsroyale
376d00d2bd998de7c58b07df06f1fe7dc82816d1
[ "MIT" ]
null
null
null
tests/conftest.py
RussellJQA/test-statsroyale
376d00d2bd998de7c58b07df06f1fe7dc82816d1
[ "MIT" ]
null
null
null
tests/conftest.py
RussellJQA/test-statsroyale
376d00d2bd998de7c58b07df06f1fe7dc82816d1
[ "MIT" ]
null
null
null
""" This module contains shared fixtures. """ # pip installed # scope="session" means "Run fixture 1x per session" # (1x before entire test suite) # scope="function" [the default] means "Run fixture 1x for each test case" )"
31.428571
77
0.711818
""" This module contains shared fixtures. """ import json from pathlib import Path # pip installed import pytest # installed with webdriver_manager from selenium import webdriver from webdriver_manager.chrome import ChromeDriverManager from webdriver_manager.firefox import GeckoDriverManager # scope="session" mean...
0
1,693
0
0
0
0
0
64
213
b82068f563050b399255df26391497881d98b3a5
12,152
py
Python
pypureclient/flashblade/FB_2_2/api/rdl_api.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
14
2018-12-07T18:30:27.000Z
2022-02-22T09:12:33.000Z
pypureclient/flashblade/FB_2_2/api/rdl_api.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
28
2019-09-17T21:03:52.000Z
2022-03-29T22:07:35.000Z
pypureclient/flashblade/FB_2_2/api/rdl_api.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
15
2020-06-11T15:50:08.000Z
2022-03-21T09:27:25.000Z
# coding: utf-8 """ FlashBlade REST API A lightweight client for FlashBlade REST API 2.2, developed by Pure Storage, Inc. (http://www.purestorage.com/). OpenAPI spec version: 2.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import # pyth...
37.622291
199
0.632242
# coding: utf-8 """ FlashBlade REST API A lightweight client for FlashBlade REST API 2.2, developed by Pure Storage, Inc. (http://www.purestorage.com/). OpenAPI spec version: 2.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import...
0
0
0
11,690
0
0
0
-11
90
b9c448bf2426d47f5d9150b6f0c8d6cbf069d50b
6,296
py
Python
cwharaj/cwharaj/parser/opensooq_parser.py
trujunzhang/djzhang-targets
c2e327acde9d51f0455e7243f17d93d74b579501
[ "MIT" ]
2
2018-12-03T16:30:55.000Z
2019-04-03T13:29:20.000Z
cwharaj/cwharaj/parser/opensooq_parser.py
trujunzhang/djzhang-targets
c2e327acde9d51f0455e7243f17d93d74b579501
[ "MIT" ]
null
null
null
cwharaj/cwharaj/parser/opensooq_parser.py
trujunzhang/djzhang-targets
c2e327acde9d51f0455e7243f17d93d74b579501
[ "MIT" ]
1
2019-04-03T13:29:25.000Z
2019-04-03T13:29:25.000Z
# coding=utf-8
40.883117
121
0.630083
# coding=utf-8 import logging from cwharaj.items import Ad, CacheItem, City, Member, OpensooqPhone from cwharaj.parser.base_parser import BaseParser from cwharaj.parser.utils.harajs_comments import HarajsComments from cwharaj.parser.utils.harajs_section import HarajsSection from cwharaj.parser.utils.timer_opensooq_com...
24
0
0
5,894
0
0
0
218
156
7a3b01013fde2ee3d3ab666efa9cbbf280de529f
5,695
py
Python
vxt/view/task/factory.py
veeso/voice-xtractor
8382dd889ed665741c3c66b65321cc1d36c6a767
[ "MIT" ]
1
2022-01-11T01:31:36.000Z
2022-01-11T01:31:36.000Z
vxt/view/task/factory.py
veeso/vxt
8382dd889ed665741c3c66b65321cc1d36c6a767
[ "MIT" ]
null
null
null
vxt/view/task/factory.py
veeso/vxt
8382dd889ed665741c3c66b65321cc1d36c6a767
[ "MIT" ]
null
null
null
# VXT # Developed by Christian Visintin # # MIT License # Copyright (c) 2021 Christian Visintin # 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 limitati...
38.47973
87
0.689201
# VXT # Developed by Christian Visintin # # MIT License # Copyright (c) 2021 Christian Visintin # 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 limitati...
0
3,524
0
381
0
0
0
270
354
c0a838d1742e11f233a011458ca579ef6d49d4db
2,243
py
Python
bag8/utils.py
peopledoc/bag8
6bd8a00ac258297b94eac6c71f4efe275c416203
[ "MIT" ]
4
2015-05-27T13:59:00.000Z
2016-12-11T20:34:00.000Z
bag8/utils.py
peopledoc/bag8
6bd8a00ac258297b94eac6c71f4efe275c416203
[ "MIT" ]
64
2015-04-27T08:33:14.000Z
2016-07-15T13:33:11.000Z
bag8/utils.py
peopledoc/bag8
6bd8a00ac258297b94eac6c71f4efe275c416203
[ "MIT" ]
null
null
null
from __future__ import absolute_import, division, print_function import re from functools import partial from subprocess import Popen from subprocess import PIPE RE_WORD = re.compile('\W') call = partial(Popen, stdout=PIPE, stderr=PIPE)
20.962617
66
0.631743
from __future__ import absolute_import, division, print_function import os import re import socket import sys from itertools import count from functools import partial from subprocess import Popen from subprocess import PIPE from time import sleep import click from distutils.spawn import find_executable from comp...
0
0
0
0
0
1,573
0
57
365
400708af3eb122277da5836ea70cf914223ea9b3
1,387
py
Python
src/c3_price/main.py
KlimaDAO/discord-bots
96fefab99e27abccd0b2d5c9d3812f8ad60e94d6
[ "MIT" ]
2
2022-01-24T19:58:44.000Z
2022-03-07T20:16:52.000Z
src/c3_price/main.py
KlimaDAO/discord-bots
96fefab99e27abccd0b2d5c9d3812f8ad60e94d6
[ "MIT" ]
8
2021-11-29T19:38:01.000Z
2022-03-29T19:19:39.000Z
src/c3_price/main.py
KlimaDAO/discord-bots
96fefab99e27abccd0b2d5c9d3812f8ad60e94d6
[ "MIT" ]
12
2021-10-06T20:23:08.000Z
2022-03-31T23:51:03.000Z
import os from ..utils import get_discord_client, get_eth_web3, get_polygon_web3, load_abi BOT_TOKEN = os.environ["DISCORD_BOT_TOKEN"] # Initialized Discord client client = get_discord_client() # Initialize web3 web3 = get_polygon_web3() web3_eth = get_eth_web3() # Load ABI c3_abi = load_abi('erc20_token.json') ...
26.169811
78
0.674838
import os from discord.ext import tasks from ..constants import C3_ADDRESS, FRAX_DECIMALS, \ C3_DECIMALS, FRAX_C3_POOL from ..contract_info import token_supply, uni_v2_pool_price from ..utils import get_discord_client, get_eth_web3, \ get_polygon_web3, load_abi, \ ...
0
686
0
0
0
0
0
244
114
1d1b2e85d0c1358607cd2dd62f5bab1dffbce3a4
191
py
Python
setup.py
kempei/hx711py
1256669450f757e46c859c8b21b40e278f31fef3
[ "Apache-2.0" ]
1
2022-03-24T13:50:48.000Z
2022-03-24T13:50:48.000Z
setup.py
kempei/hx711py-jetsonnano
1256669450f757e46c859c8b21b40e278f31fef3
[ "Apache-2.0" ]
null
null
null
setup.py
kempei/hx711py-jetsonnano
1256669450f757e46c859c8b21b40e278f31fef3
[ "Apache-2.0" ]
null
null
null
from setuptools import setup setup( name='hx711', version='0.1', description='HX711 Python Library for Jetson Nano', py_modules=['hx711'], install_requires=['logzero'] )
19.1
55
0.670157
from setuptools import setup setup( name='hx711', version='0.1', description='HX711 Python Library for Jetson Nano', py_modules=['hx711'], install_requires=['logzero'] )
0
0
0
0
0
0
0
0
0
2b8e9a78122675bae02f4d3f6416c2c2d0b63adb
168
py
Python
snippets/delete_from_multi_tables.py
hit9/skylark
5b7a14e401196e025117b095a7c5e68e551e547a
[ "BSD-2-Clause", "MIT" ]
114
2015-01-06T06:12:30.000Z
2021-08-25T06:17:05.000Z
snippets/delete_from_multi_tables.py
keng-king/skylark
5b7a14e401196e025117b095a7c5e68e551e547a
[ "BSD-2-Clause", "MIT" ]
10
2015-03-23T17:05:13.000Z
2017-03-24T11:50:18.000Z
snippets/delete_from_multi_tables.py
keng-king/skylark
5b7a14e401196e025117b095a7c5e68e551e547a
[ "BSD-2-Clause", "MIT" ]
59
2015-01-21T14:56:23.000Z
2021-09-05T01:24:37.000Z
from models import User, Post # delete user from post, user where post.user_id = user.id query = (Post & User).delete(User) # mysql supports; sqlite3 dosenot support
33.6
77
0.744048
from models import User, Post # delete user from post, user where post.user_id = user.id query = (Post & User).delete(User) # mysql supports; sqlite3 dosenot support
0
0
0
0
0
0
0
0
0
b0e41ddb7c1863a92a19e81a28f9239f50f770ff
868
py
Python
Semproject/Courseoutline/choices.py
sllash2000/CourseOutline
d44a2a7d49695d988f8ffa6eb5407011029ece25
[ "MIT" ]
null
null
null
Semproject/Courseoutline/choices.py
sllash2000/CourseOutline
d44a2a7d49695d988f8ffa6eb5407011029ece25
[ "MIT" ]
null
null
null
Semproject/Courseoutline/choices.py
sllash2000/CourseOutline
d44a2a7d49695d988f8ffa6eb5407011029ece25
[ "MIT" ]
null
null
null
FacultyNameChoices = [ ('FAH','Arts And Humanities'),('FBA','Business Admin'), ('FEd','Education'),('FRS','Religous Studies'),('FOS','Science'), ('FIT','Information Technology'),('FON','Nursing')] CourseCategory = [ ('Core Course','Core Course'),('General Education Course','General Education Course'), ...
39.454545
103
0.615207
FacultyNameChoices = [ ('FAH','Arts And Humanities'),('FBA','Business Admin'), ('FEd','Education'),('FRS','Religous Studies'),('FOS','Science'), ('FIT','Information Technology'),('FON','Nursing')] CourseCategory = [ ('Core Course','Core Course'),('General Education Course','General Education Course'), ...
0
0
0
0
0
0
0
0
0
960ae6c2cee95810d30359e79da59c8a97171c61
894
py
Python
diagnose.py
youngdon95/start_over
48352c42752f6dd24c82250f57c5ee1434352688
[ "MIT" ]
null
null
null
diagnose.py
youngdon95/start_over
48352c42752f6dd24c82250f57c5ee1434352688
[ "MIT" ]
null
null
null
diagnose.py
youngdon95/start_over
48352c42752f6dd24c82250f57c5ee1434352688
[ "MIT" ]
null
null
null
import xlrd from datetime import date import random workbook = xlrd.open_workbook('diagnose.xlsx') worksheet = workbook.sheet_by_name('Sheet1') file = open("diagnoseInsert.txt","w") empNum = 2 for x in range(0, 30884): year = random.choice(range(1990, 2018)) month = random.choice(range(1, 13)) day =...
26.294118
130
0.619687
import xlrd from datetime import date from datetime import datetime import random workbook = xlrd.open_workbook('diagnose.xlsx') worksheet = workbook.sheet_by_name('Sheet1') file = open("diagnoseInsert.txt","w") empNum = 2 for x in range(0, 30884): year = random.choice(range(1990, 2018)) month = random....
0
0
0
0
0
0
0
8
22
60a92fc32f9436c820e1f78c7327d9e09aea64ef
881
py
Python
day9/student_sqlcloud.py
dikshaa1702/ml
c35f279b8fa7544517ca713c2c1e55f08270d4c3
[ "Apache-2.0" ]
1
2019-06-13T13:52:09.000Z
2019-06-13T13:52:09.000Z
day9/student_sqlcloud.py
dikshaa1702/ml
c35f279b8fa7544517ca713c2c1e55f08270d4c3
[ "Apache-2.0" ]
null
null
null
day9/student_sqlcloud.py
dikshaa1702/ml
c35f279b8fa7544517ca713c2c1e55f08270d4c3
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu May 16 11:50:16 2019 @author: DiPu """ import mysql.connector con=mysql.connector.connect(user="diksha",password='diksha1702', host='db4free.net',database='diksha') c=con.cursor() c.execute("""CREATE TABLE student( name text, age i...
29.366667
65
0.624291
# -*- coding: utf-8 -*- """ Created on Thu May 16 11:50:16 2019 @author: DiPu """ import mysql.connector con=mysql.connector.connect(user="diksha",password='diksha1702', host='db4free.net',database='diksha') c=con.cursor() c.execute("""CREATE TABLE student( name text, age i...
0
0
0
0
0
0
0
0
0
7e88360483551114fdce570e13880bcbf47a3724
5,775
py
Python
Optic/WrapperBl2Seq.py
CGATOxford/Optic
2df92e953b5139ff4e5c383cb4383e6367cd47f1
[ "MIT" ]
null
null
null
Optic/WrapperBl2Seq.py
CGATOxford/Optic
2df92e953b5139ff4e5c383cb4383e6367cd47f1
[ "MIT" ]
null
null
null
Optic/WrapperBl2Seq.py
CGATOxford/Optic
2df92e953b5139ff4e5c383cb4383e6367cd47f1
[ "MIT" ]
1
2020-03-31T22:55:50.000Z
2020-03-31T22:55:50.000Z
########################################################################## # # MRC FGU Computational Genomics Group # # $Id$ # # Copyright (C) 2009 Andreas Heger # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by ...
29.020101
110
0.571602
########################################################################## # # MRC FGU Computational Genomics Group # # $Id$ # # Copyright (C) 2009 Andreas Heger # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by ...
0
0
0
2,592
0
0
0
-30
134
13088a8ac517f64c48d773cb8a5a92fb091eb78b
1,728
py
Python
src/prefect/cli/__init__.py
jamestwebber/prefect
410c4ac37d2595ab61007742883687f5e284821d
[ "Apache-2.0" ]
null
null
null
src/prefect/cli/__init__.py
jamestwebber/prefect
410c4ac37d2595ab61007742883687f5e284821d
[ "Apache-2.0" ]
null
null
null
src/prefect/cli/__init__.py
jamestwebber/prefect
410c4ac37d2595ab61007742883687f5e284821d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python
25.791045
80
0.696759
#!/usr/bin/env python import click import json import logging import os import requests import sys import prefect @click.group() def cli(): """ The Prefect CLI """ pass @cli.command() def make_user_config(): """ Generates a user configuration file """ user_config_path = prefect.con...
0
1,516
0
0
0
0
0
-62
247
159bef3318bfb6c684b7d77703c8e85be28688b9
411
py
Python
year2019/python/day1/day1.py
3schwartz/AdventOfCode
32f259c4e20c3c4834718411f1053b6a11f71c86
[ "MIT" ]
null
null
null
year2019/python/day1/day1.py
3schwartz/AdventOfCode
32f259c4e20c3c4834718411f1053b6a11f71c86
[ "MIT" ]
null
null
null
year2019/python/day1/day1.py
3schwartz/AdventOfCode
32f259c4e20c3c4834718411f1053b6a11f71c86
[ "MIT" ]
null
null
null
from day1_func import get_fuel lines = open('../../data/day1_data.txt').read().strip().split('\n') fuels = [get_fuel(int(line)) for line in lines] print(f'Part 1: {sum(fuels)}') total_sum = 0 for line in lines: last_value = int(line) while True: last_value = get_fuel(last_value) if last_val...
19.571429
67
0.620438
from day1_func import get_fuel lines = open('../../data/day1_data.txt').read().strip().split('\n') fuels = [get_fuel(int(line)) for line in lines] print(f'Part 1: {sum(fuels)}') total_sum = 0 for line in lines: last_value = int(line) while True: last_value = get_fuel(last_value) if last_val...
0
0
0
0
0
0
0
0
0
f1d40cad2f2fbe51cb27d3a15929184262878d47
518
py
Python
postgis_helpers/__init__.py
aaronfraint/postgis-helpers
99f4f9ae50c1197fe6d2d0fe42884c06d2c3589c
[ "MIT" ]
1
2021-02-25T21:52:24.000Z
2021-02-25T21:52:24.000Z
postgis_helpers/__init__.py
aaronfraint/postgis-helpers
99f4f9ae50c1197fe6d2d0fe42884c06d2c3589c
[ "MIT" ]
null
null
null
postgis_helpers/__init__.py
aaronfraint/postgis-helpers
99f4f9ae50c1197fe6d2d0fe42884c06d2c3589c
[ "MIT" ]
1
2021-02-26T00:33:29.000Z
2021-02-26T00:33:29.000Z
__VERSION__ = "0.2.2" # _console.print(":globe_showing_americas:", justify="left") # _console.print(":globe_showing_europe-africa:", justify="center") # _console.print(":globe_showing_asia-australia:", justify="right") # _console.print(f"-> postGIS-helpers version {__VERSION__}\n\n")
37
78
0.797297
from .PgSQL import PostgreSQL from .config_helpers import make_config_file, read_config_file, configurations from .geopandas_helpers import spatialize_point_dataframe from .raw_data import DataSource from .console import _console __VERSION__ = "0.2.2" # _console.print(":globe_showing_americas:", justify="left") # _c...
0
0
0
0
0
0
0
120
111
35abc541d0d7ce086f795d6703dfd297577c9cb7
424
py
Python
client/delivery/urls.py
daniel-waruo/e-commerse-api
6b080039398fb4099a34335317d649dd67783f63
[ "Apache-2.0" ]
6
2019-11-21T10:09:49.000Z
2021-06-19T09:52:59.000Z
client/delivery/urls.py
daniel-waruo/e-commerse-api
6b080039398fb4099a34335317d649dd67783f63
[ "Apache-2.0" ]
null
null
null
client/delivery/urls.py
daniel-waruo/e-commerse-api
6b080039398fb4099a34335317d649dd67783f63
[ "Apache-2.0" ]
null
null
null
from django.urls import path from .views import CreateDeliveryInfo, DeliveryInfoApi, ListDeliveryInfo app_name = 'delivery' urlpatterns = [ path('delivery-information/add', CreateDeliveryInfo.as_view(), name='add_delivery_info'), path('delivery-information/<int:pk>', DeliveryInfoApi.as_view(), name='delivery...
35.333333
93
0.768868
from django.urls import path from .views import CreateDeliveryInfo, DeliveryInfoApi, ListDeliveryInfo app_name = 'delivery' urlpatterns = [ path('delivery-information/add', CreateDeliveryInfo.as_view(), name='add_delivery_info'), path('delivery-information/<int:pk>', DeliveryInfoApi.as_view(), name='delivery...
0
0
0
0
0
0
0
0
0
976b5d264ccc2ded21f52e33be4c2ab378f4c30d
2,709
py
Python
python/day11/day11.py
secworks/advent_of_code_2020
b90e4e1d27c1e4b597a08cac8ff13e63686769f2
[ "BSD-2-Clause" ]
null
null
null
python/day11/day11.py
secworks/advent_of_code_2020
b90e4e1d27c1e4b597a08cac8ff13e63686769f2
[ "BSD-2-Clause" ]
null
null
null
python/day11/day11.py
secworks/advent_of_code_2020
b90e4e1d27c1e4b597a08cac8ff13e63686769f2
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #======================================================================= # # day11.py # ------- # Solutions to Advent of Code 2020, day 11. # https://adventofcode.com/2020/day/11 # #======================================================================= import sys #----...
27.927835
72
0.298265
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #======================================================================= # # day11.py # ------- # Solutions to Advent of Code 2020, day 11. # https://adventofcode.com/2020/day/11 # #======================================================================= import sys #----...
0
0
0
0
0
908
0
0
132
7eb7e67de869f3bb153180f2431ce5d9de6c4ecb
389
py
Python
tests/edgestats_test.py
devjack/edgestats
d668cfdc4a6962c0f02a76916fc58d43605d46b2
[ "MIT" ]
null
null
null
tests/edgestats_test.py
devjack/edgestats
d668cfdc4a6962c0f02a76916fc58d43605d46b2
[ "MIT" ]
null
null
null
tests/edgestats_test.py
devjack/edgestats
d668cfdc4a6962c0f02a76916fc58d43605d46b2
[ "MIT" ]
null
null
null
import unittest if __name__ == '__main__': unittest.main()
27.785714
69
0.699229
import unittest import gzip from edgestats import EdgeStats class EdgestatsTest(unittest.TestCase): def test_can_parse_log_file(self): with gzip.open('tests/data/simple_unzip_test.gz', 'rb') as f: file_content = f.read() expected = b"Simple gzipped string\n" self.assertEqual(exp...
0
0
0
258
0
0
0
0
67
73dd5e51df3dee9bc1040211fdb75399402c8941
15,096
py
Python
sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/models/_service_fabric_managed_clusters_management_client_enums.py
dubiety/azure-sdk-for-python
62ffa839f5d753594cf0fe63668f454a9d87a346
[ "MIT" ]
1
2022-02-01T18:50:12.000Z
2022-02-01T18:50:12.000Z
sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/models/_service_fabric_managed_clusters_management_client_enums.py
ellhe-blaster/azure-sdk-for-python
82193ba5e81cc5e5e5a5239bba58abe62e86f469
[ "MIT" ]
null
null
null
sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/azure/mgmt/servicefabricmanagedclusters/models/_service_fabric_managed_clusters_management_client_enums.py
ellhe-blaster/azure-sdk-for-python
82193ba5e81cc5e5e5a5239bba58abe62e86f469
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
42.285714
102
0.72602
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
0
0
0
13,837
0
0
0
34
757
0f8896b2d56b1d6c742f1e75296d6e1c654c2549
10,751
py
Python
solarforecastarbiter/io/reference_observations/srml.py
wholmgren/solarforecastarbiter-core
e692c7e142f24c0253e4288a6ac760e10ba41dbd
[ "Apache-2.0", "MIT" ]
null
null
null
solarforecastarbiter/io/reference_observations/srml.py
wholmgren/solarforecastarbiter-core
e692c7e142f24c0253e4288a6ac760e10ba41dbd
[ "Apache-2.0", "MIT" ]
null
null
null
solarforecastarbiter/io/reference_observations/srml.py
wholmgren/solarforecastarbiter-core
e692c7e142f24c0253e4288a6ac760e10ba41dbd
[ "Apache-2.0", "MIT" ]
null
null
null
import logging import json from urllib import error from pkg_resources import resource_filename, Requirement import pandas as pd from pvlib import iotools from requests.exceptions import HTTPError from solarforecastarbiter.datamodel import Observation, SolarPowerPlant from solarforecastarbiter.io.reference_observat...
36.692833
80
0.646172
import logging import json from urllib import error from pkg_resources import resource_filename, Requirement import pandas as pd from pvlib import iotools from requests.exceptions import HTTPError from solarforecastarbiter.datamodel import Observation, SolarPowerPlant from solarforecastarbiter.io.reference_observat...
0
0
0
0
0
0
0
5
0
23ff69637f82addae0325c842c00f5a222080a6a
2,369
py
Python
tests/test_estimators.py
astrojose9/fulmar
62a79fb9b7ab01e5b7b3acadaca8e4f0db0e0e2f
[ "MIT" ]
null
null
null
tests/test_estimators.py
astrojose9/fulmar
62a79fb9b7ab01e5b7b3acadaca8e4f0db0e0e2f
[ "MIT" ]
null
null
null
tests/test_estimators.py
astrojose9/fulmar
62a79fb9b7ab01e5b7b3acadaca8e4f0db0e0e2f
[ "MIT" ]
null
null
null
# sys.path.insert(0, os.path.abspath('/home/jrodrigues/Documents/PhD/fulmar')) from fulmar.estimators import (estimate_planet_mass, estimate_semi_amplitude) from fulmar.utils import (FulmarWarning) import astropy.units as u import numpy.testing as npt from astropy.units import UnitConversionError import pytest def...
36.446154
82
0.699451
import os import sys # sys.path.insert(0, os.path.abspath('/home/jrodrigues/Documents/PhD/fulmar')) from fulmar.estimators import ( estimate_planet_mass, estimate_semi_amplitude ) from fulmar.utils import ( FulmarWarning ) import astropy.units as u import numpy as np import numpy.testing as npt from astro...
0
0
0
0
0
0
0
-10
66
745adf17e78917104f0f56ad44e17b5a7a1b9a7e
25,642
py
Python
rwb/images/__init__.py
boakley/robotframework-workbench
92f15845d6fa4baedd4f3c4346fb8ff5cf9149a6
[ "Apache-2.0" ]
11
2015-03-09T01:53:21.000Z
2021-03-29T08:33:05.000Z
rwb/images/__init__.py
boakley/robotframework-workbench
92f15845d6fa4baedd4f3c4346fb8ff5cf9149a6
[ "Apache-2.0" ]
1
2016-08-24T06:20:11.000Z
2016-08-24T06:20:11.000Z
rwb/images/__init__.py
boakley/robotframework-workbench
92f15845d6fa4baedd4f3c4346fb8ff5cf9149a6
[ "Apache-2.0" ]
5
2016-03-03T15:27:09.000Z
2019-03-26T13:05:32.000Z
''' This data was automatically generated by script img2data.py. These images are part of the FAMFAMFAM silk icons set which is provided under a creative commons license. For more information see http://www.famfamfam.com/lab/icons/silk/ ''' data = { 'cancel': ''' R0lGODlhEAAQAPcAAAAAAAAAMwAAZgA...
61.198091
73
0.77338
''' This data was automatically generated by script img2data.py. These images are part of the FAMFAMFAM silk icons set which is provided under a creative commons license. For more information see http://www.famfamfam.com/lab/icons/silk/ ''' data = { 'cancel': ''' R0lGODlhEAAQAPcAAAAAAAAAMwAAZgA...
0
0
0
0
0
0
0
0
0
28a6cd67583aaea23b8d40e9061ec596cdb2ce3c
34,063
py
Python
chapisha/create/create.py
whythawk/chapisha
ddaa028a48d10ff5396e18d1c0ae01fd56c9f465
[ "BSD-3-Clause" ]
2
2021-05-29T12:56:05.000Z
2021-10-31T04:56:32.000Z
chapisha/create/create.py
whythawk/chapisha
ddaa028a48d10ff5396e18d1c0ae01fd56c9f465
[ "BSD-3-Clause" ]
1
2021-01-29T13:12:28.000Z
2021-01-30T16:14:04.000Z
chapisha/create/create.py
whythawk/chapisha
ddaa028a48d10ff5396e18d1c0ae01fd56c9f465
[ "BSD-3-Clause" ]
null
null
null
""" .. module:: create :synopsis: Import a Word `docx` document, define its metadata, cover and rights, and publish it as an EPUB3. .. moduleauthor:: Gavin Chait <github.com/turukawa> CreateWork ========== Publish a standards compliant EPUB3 creative work from a source Microsoft Word `docx` document, and define it...
46.661644
551
0.648622
""" .. module:: create :synopsis: Import a Word `docx` document, define its metadata, cover and rights, and publish it as an EPUB3. .. moduleauthor:: Gavin Chait <github.com/turukawa> CreateWork ========== Publish a standards compliant EPUB3 creative work from a source Microsoft Word `docx` document, and define it...
0
0
0
19,679
0
0
0
131
333
f014873bcb18c5403755ad32e29f145b9b136a1d
3,167
py
Python
test/test_tarrecords.py
NVlabs/dlinputs
fbce290b7b8c5f3b00e9197c55a13b0a5a0f7953
[ "BSD-3-Clause" ]
38
2017-10-18T05:44:25.000Z
2021-06-20T02:14:13.000Z
test/test_tarrecords.py
NVlabs/dlinputs
fbce290b7b8c5f3b00e9197c55a13b0a5a0f7953
[ "BSD-3-Clause" ]
1
2017-12-07T20:14:18.000Z
2018-05-07T01:00:34.000Z
test/test_tarrecords.py
NVlabs/dlinputs
fbce290b7b8c5f3b00e9197c55a13b0a5a0f7953
[ "BSD-3-Clause" ]
10
2018-01-07T15:19:17.000Z
2020-12-01T20:42:37.000Z
from __future__ import unicode_literals from imp import reload from dlinputs import tarrecords reload(tarrecords) # get_ipython().system(u'tar -ztvf testdata/imagenet-000000.tgz | sed 7q') # get_ipython().system(u'tar xvf testdata/imagenet-000000.tgz 10.png') # get_ipython().system(u'file 10.png')
31.989899
79
0.641932
from __future__ import unicode_literals import glob import pdb from builtins import range from imp import reload from io import open import numpy as np from dlinputs import tarrecords reload(tarrecords) def test_tardata(): stream = open("testdata/imagenet-000000.tgz", mode='rb') data = tarrecords.tardata(s...
0
0
0
0
0
2,631
0
-21
250
6a64971723ab828855f7055bd04df9ded8f9d292
54,054
py
Python
tests/unit/fake_data_root/vault/var/lib/juju/agents/unit-vault-hacluster-0/charm/hooks/utils.py
KellenRenshaw/hotsos
e3fc51ab7f8af606a5846a3486a7fda23d761583
[ "Apache-2.0" ]
17
2016-07-07T23:39:17.000Z
2020-05-06T14:03:54.000Z
tests/unit/fake_data_root/vault/var/lib/juju/agents/unit-vault-hacluster-0/charm/hooks/utils.py
KellenRenshaw/hotsos
e3fc51ab7f8af606a5846a3486a7fda23d761583
[ "Apache-2.0" ]
111
2021-10-01T18:18:17.000Z
2022-03-29T12:23:20.000Z
tests/unit/fake_data_root/vault/var/lib/juju/agents/unit-vault-hacluster-0/charm/hooks/utils.py
KellenRenshaw/hotsos
e3fc51ab7f8af606a5846a3486a7fda23d761583
[ "Apache-2.0" ]
20
2016-11-03T04:04:09.000Z
2021-01-04T20:40:43.000Z
#!/usr/bin/python # # Copyright 2016 Canonical Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
33.161963
79
0.643024
#!/usr/bin/python # # Copyright 2016 Canonical Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
0
270
0
799
0
11,160
0
229
803
dc846139a64da96893d81c6eddfca55ea20f7f1e
70,433
py
Python
autots/evaluator/auto_model.py
nsankar/AutoTS
b4167e1506e1ccb41a85dad1be481a646d808583
[ "MIT" ]
null
null
null
autots/evaluator/auto_model.py
nsankar/AutoTS
b4167e1506e1ccb41a85dad1be481a646d808583
[ "MIT" ]
null
null
null
autots/evaluator/auto_model.py
nsankar/AutoTS
b4167e1506e1ccb41a85dad1be481a646d808583
[ "MIT" ]
null
null
null
"""Mid-level helper functions for AutoTS.""" import numpy as np import pandas as pd import datetime import json from hashlib import md5 from autots.evaluator.metrics import PredictionEval from autots.tools.transform import RandomTransform def seasonal_int(include_one: bool = False): """Generate a random integer o...
37.907966
181
0.582397
"""Mid-level helper functions for AutoTS.""" import numpy as np import pandas as pd import datetime import json from hashlib import md5 from autots.evaluator.metrics import PredictionEval from autots.tools.transform import RandomTransform def seasonal_int(include_one: bool = False): """Generate a random integer o...
0
0
0
6,864
0
647
0
0
92
b6fd8e198c7dfa420a6d4c45a470a2d144bb9ee4
1,025
py
Python
aoc2020/day12/day12_part2.py
GetPastTheMonkey/advent-of-code
db80be6d87baba4d5315cc69276905c55762da86
[ "MIT" ]
1
2019-09-15T16:37:24.000Z
2019-09-15T16:37:24.000Z
aoc2020/day12/day12_part2.py
GetPastTheMonkey/advent-of-code
db80be6d87baba4d5315cc69276905c55762da86
[ "MIT" ]
null
null
null
aoc2020/day12/day12_part2.py
GetPastTheMonkey/advent-of-code
db80be6d87baba4d5315cc69276905c55762da86
[ "MIT" ]
null
null
null
from utils import get_input_lines pos_x = 0 pos_y = 0 waypoint_x = 10 waypoint_y = 1 for line in get_input_lines(__file__): action = line[0] n = int(line[1:]) # Handle actions if action == "N": waypoint_y += n elif action == "S": waypoint_y -= n elif action == "E": wa...
25
68
0.537561
from utils import get_input_lines pos_x = 0 pos_y = 0 waypoint_x = 10 waypoint_y = 1 for line in get_input_lines(__file__): action = line[0] n = int(line[1:]) # Handle actions if action == "N": waypoint_y += n elif action == "S": waypoint_y -= n elif action == "E": wa...
0
0
0
0
0
0
0
0
0
2326b0fce7d21d579893e74d3e91c5354e98cf2f
282
py
Python
src/year2019/day13a.py
lancelote/advent_of_code
06dda6ca034bc1e86addee7798bb9b2a34ff565b
[ "Unlicense" ]
10
2017-12-11T17:54:52.000Z
2021-12-09T20:16:30.000Z
src/year2019/day13a.py
lancelote/advent_of_code
06dda6ca034bc1e86addee7798bb9b2a34ff565b
[ "Unlicense" ]
260
2015-12-09T11:03:03.000Z
2021-12-12T14:32:23.000Z
src/year2019/day13a.py
lancelote/advent_of_code
06dda6ca034bc1e86addee7798bb9b2a34ff565b
[ "Unlicense" ]
null
null
null
"""2019 - Day 13 Part 1: Care Package.""" from src.year2019.intcode import Computer def solve(task: str) -> int: """Count the number of blocks.""" computer = Computer() computer.load_program(task) computer.execute() return list(computer.stdout)[2::3].count(2)
25.636364
47
0.666667
"""2019 - Day 13 Part 1: Care Package.""" from src.year2019.intcode import Computer def solve(task: str) -> int: """Count the number of blocks.""" computer = Computer() computer.load_program(task) computer.execute() return list(computer.stdout)[2::3].count(2)
0
0
0
0
0
0
0
0
0
6af6580ccb03ce18151efe09dbeb559263c69624
1,816
py
Python
examples/fontforge-old/demoAddToMenu.py
simoncozens/pysilfont
bb8a9fc58a83e074bbcc466ba058841845b9107e
[ "MIT" ]
41
2015-05-21T21:12:26.000Z
2022-02-17T17:23:14.000Z
examples/fontforge-old/demoAddToMenu.py
simoncozens/pysilfont
bb8a9fc58a83e074bbcc466ba058841845b9107e
[ "MIT" ]
63
2015-05-15T10:25:55.000Z
2021-02-23T04:51:17.000Z
examples/fontforge-old/demoAddToMenu.py
simoncozens/pysilfont
bb8a9fc58a83e074bbcc466ba058841845b9107e
[ "MIT" ]
12
2015-06-12T11:52:08.000Z
2020-09-23T10:40:59.000Z
#!/usr/bin/env python 'FontForge: Demo script to add menu items to FF tools menu' __url__ = 'http://github.com/silnrsi/pysilfont' __copyright__ = 'Copyright (c) 2014 SIL International (http://www.sil.org)' __license__ = 'Released under the MIT License (http://opensource.org/licenses/MIT)' __author__ = 'David Raymond' ...
46.564103
102
0.785793
#!/usr/bin/env python 'FontForge: Demo script to add menu items to FF tools menu' __url__ = 'http://github.com/silnrsi/pysilfont' __copyright__ = 'Copyright (c) 2014 SIL International (http://www.sil.org)' __license__ = 'Released under the MIT License (http://opensource.org/licenses/MIT)' __author__ = 'David Raymond' ...
0
0
0
0
0
94
0
0
23
46615d419dda76960016bd1ad4896644e6b356d7
29,475
py
Python
tensor2struct/utils/tree_kernels.py
chenyangh/tensor2struct-public
d3257cba6d76d3c658a58a78f687d986bdc755cf
[ "MIT" ]
69
2021-04-14T06:35:07.000Z
2022-03-31T18:35:05.000Z
tensor2struct/utils/tree_kernels.py
chenyangh/tensor2struct-public
d3257cba6d76d3c658a58a78f687d986bdc755cf
[ "MIT" ]
11
2021-04-16T11:16:04.000Z
2022-03-22T21:21:29.000Z
tensor2struct/utils/tree_kernels.py
chenyangh/tensor2struct-public
d3257cba6d76d3c658a58a78f687d986bdc755cf
[ "MIT" ]
18
2021-04-14T07:19:56.000Z
2022-03-23T19:26:18.000Z
####
41.927454
145
0.397116
import math from copy import deepcopy from tensor2struct.utils import tree class Kernel: # Common routines for kernel functions def kernel(self, a, b): # compute the tree kernel on the trees a and b if not isinstance(a, tree.Tree): print("ERROR: first parameter has to be a Tree Ob...
0
0
0
29,200
0
0
0
9
251
162b83394afde2c91cf06578b6a90603be379765
469
py
Python
Question_nlp/answers/onehot.py
skn047/DeepLearningMugenKnock
73d2b903816b380d56020c8336041883bc0d131c
[ "MIT" ]
10
2021-12-17T06:07:25.000Z
2022-03-25T13:50:05.000Z
Question_nlp/answers/onehot.py
skn047/DeepLearningMugenKnock
73d2b903816b380d56020c8336041883bc0d131c
[ "MIT" ]
null
null
null
Question_nlp/answers/onehot.py
skn047/DeepLearningMugenKnock
73d2b903816b380d56020c8336041883bc0d131c
[ "MIT" ]
2
2022-03-15T02:42:09.000Z
2022-03-30T23:19:55.000Z
_chars = "" chars = [c for c in _chars] print(data_load())
23.45
106
0.556503
_chars = "あいうおえかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわをんがぎぐげござじずぜぞだぢづでどばびぶべぼぱぴぷぺぽぁぃぅぇぉゃゅょっー1234567890!?、。" chars = [c for c in _chars] def data_load(): fname = 'sandwitchman.txt' xs = [] with open(fname, 'r') as f: for l in f.readlines(): l = l.strip() for c in l: ...
285
0
0
0
0
291
0
0
23
12774b82ae587f55749e4d546d6743b03cdf3463
590
py
Python
problems/593.Valid_Square/li.py
subramp-prep/leetcode
d125201d9021ab9b1eea5e5393c2db4edd84e740
[ "Unlicense" ]
null
null
null
problems/593.Valid_Square/li.py
subramp-prep/leetcode
d125201d9021ab9b1eea5e5393c2db4edd84e740
[ "Unlicense" ]
null
null
null
problems/593.Valid_Square/li.py
subramp-prep/leetcode
d125201d9021ab9b1eea5e5393c2db4edd84e740
[ "Unlicense" ]
null
null
null
# coding=utf-8 # Author: Jianghan LI # Question: 593.Valid_Square # Date: 2017-05-22
26.818182
137
0.477966
# coding=utf-8 # Author: Jianghan LI # Question: 593.Valid_Square # Date: 2017-05-22 class Solution(object): def validSquare(self, p1, p2, p3, p4): """ :type p1: List[int] :type p2: List[int] :type p3: List[int] :type p4: List[int] :rtype: bool """ ...
0
0
0
481
0
0
0
0
23
f1f4c0e148288296136b5caf6748c31645cc02a9
769
py
Python
Tuples and Sets - Exercise/07. Battle of Names.py
B3WD/python_advanced
477b2eac41f1ec5a172d612afda1096a9d7fb2f5
[ "MIT" ]
1
2020-10-28T07:52:17.000Z
2020-10-28T07:52:17.000Z
Tuples and Sets - Exercise/07. Battle of Names.py
B3WD/python_advanced_softuni
477b2eac41f1ec5a172d612afda1096a9d7fb2f5
[ "MIT" ]
null
null
null
Tuples and Sets - Exercise/07. Battle of Names.py
B3WD/python_advanced_softuni
477b2eac41f1ec5a172d612afda1096a9d7fb2f5
[ "MIT" ]
null
null
null
lines_count = int(input()) lines = [input() for _ in range(lines_count)] solve(lines)
27.464286
62
0.587776
def solve(liens): results_odd = set() results_even = set() for i, name in enumerate(lines): ascii_sum = 0 for char in name: ascii_sum += ord(char) result = int(ascii_sum / (i + 1)) if result % 2 != 0: results_odd.add(result) else: r...
0
0
0
0
0
658
0
0
22
bc177fd76c0ff5e5ec9943fd6750ff2dfe5cb200
3,707
py
Python
sdk/python/touca/_printer.py
trytouca/trytouca
eae38a96407d1ecac543c5a5fb05cbbe632ddfca
[ "Apache-2.0" ]
6
2022-03-19T02:57:11.000Z
2022-03-31T16:34:34.000Z
sdk/python/touca/_printer.py
trytouca/trytouca
eae38a96407d1ecac543c5a5fb05cbbe632ddfca
[ "Apache-2.0" ]
null
null
null
sdk/python/touca/_printer.py
trytouca/trytouca
eae38a96407d1ecac543c5a5fb05cbbe632ddfca
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Touca, Inc. Subject to Apache-2.0 License. from colorama import init init()
34.971698
88
0.534394
# Copyright 2021 Touca, Inc. Subject to Apache-2.0 License. import math from pathlib import Path from colorama import Style, Fore, Back, init init() class Printer: def print_warning(fmt: str, *args, **kwargs): print(f"{Fore.YELLOW}{fmt.format(*args, **kwargs)}{Fore.RESET}") def print_error(fmt: str...
3
0
0
3,531
0
0
0
12
68
55dadc90c2f9fdbe258867ab069d2c73b2196055
394
py
Python
siphon/__init__.py
DanielWatkins/siphon
4c6740c2f8030ec1a23cafd8b8b9713dcd382cb2
[ "BSD-3-Clause" ]
1
2019-05-31T14:02:08.000Z
2019-05-31T14:02:08.000Z
siphon/__init__.py
DanielWatkins/siphon
4c6740c2f8030ec1a23cafd8b8b9713dcd382cb2
[ "BSD-3-Clause" ]
147
2021-03-06T01:01:13.000Z
2022-03-30T22:18:18.000Z
siphon/__init__.py
DanielWatkins/siphon
4c6740c2f8030ec1a23cafd8b8b9713dcd382cb2
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2013-2015 Siphon Contributors. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Tools for accessing atmospheric and oceanic science data on remote servers.""" # Version import needs to come first so everyone else can pull on import from ._version imp...
39.4
81
0.786802
# Copyright (c) 2013-2015 Siphon Contributors. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Tools for accessing atmospheric and oceanic science data on remote servers.""" # Version import needs to come first so everyone else can pull on import from ._version imp...
0
0
0
0
0
0
0
0
0
d33d5c69746ae0b6fef212b68e6a477d56434fb5
88
py
Python
Python/B2025.py
Epoch1017/LintCode-Shared-Solutions
d1559ef96917c4255e1ce2cf25ef17edec596ac3
[ "CC0-1.0" ]
null
null
null
Python/B2025.py
Epoch1017/LintCode-Shared-Solutions
d1559ef96917c4255e1ce2cf25ef17edec596ac3
[ "CC0-1.0" ]
null
null
null
Python/B2025.py
Epoch1017/LintCode-Shared-Solutions
d1559ef96917c4255e1ce2cf25ef17edec596ac3
[ "CC0-1.0" ]
null
null
null
# B2025- print(" *") print(" ***") print("*****") print(" ***") print(" *")
14.666667
15
0.409091
# B2025-输出字符菱形 print(" *") print(" ***") print("*****") print(" ***") print(" *")
18
0
0
0
0
0
0
0
0
6adbb154ad2791f017881d82ab4f304608aa3b72
21,792
py
Python
rave/filesystem.py
rave-engine/rave
0eeb956363f4d7eda92350775d7d386550361273
[ "BSD-2-Clause" ]
5
2015-03-18T01:19:56.000Z
2020-10-23T12:44:47.000Z
rave/filesystem.py
rave-engine/rave
0eeb956363f4d7eda92350775d7d386550361273
[ "BSD-2-Clause" ]
null
null
null
rave/filesystem.py
rave-engine/rave
0eeb956363f4d7eda92350775d7d386550361273
[ "BSD-2-Clause" ]
null
null
null
# rave's virtual file system. import re import rave.common import rave.log _log = rave.log.get(__name__) # Canonical path separator. PATH_SEPARATOR = '/' # Root. ROOT = '/' # Unnormalized path pattern. BAD_PATH_PATTERN = re.compile(r'(?:{0}{{2,}}|(?:{0}|^)\.+(?:{0}|$))'.format(PATH_SEPARATOR)) # Various standard mo...
36.686869
149
0.62321
# rave's virtual file system. import os import io import re import threading import collections import rave.common import rave.log _log = rave.log.get(__name__) # Canonical path separator. PATH_SEPARATOR = '/' # Root. ROOT = '/' # Unnormalized path pattern. BAD_PATH_PATTERN = re.compile(r'(?:{0}{{2,}}|(?:{0}|^)\.+(...
0
0
0
19,766
0
861
0
-32
748
dbf0337be9f2b428ff1ae5f70ee820bc2aaa584f
802
py
Python
geogebra_applet/views.py
Stasianna/geogebra-project
33ddf30ec8b001f86fb35d336b8d53bcdf69231b
[ "MIT" ]
null
null
null
geogebra_applet/views.py
Stasianna/geogebra-project
33ddf30ec8b001f86fb35d336b8d53bcdf69231b
[ "MIT" ]
null
null
null
geogebra_applet/views.py
Stasianna/geogebra-project
33ddf30ec8b001f86fb35d336b8d53bcdf69231b
[ "MIT" ]
null
null
null
#from django.http import HttpResponse #from django.http import response_redirect
32.08
70
0.77182
#from django.http import HttpResponse #from django.http import response_redirect from django.shortcuts import render_to_response from django.views.generic import DetailView, CreateView, TemplateView from geogebra_applet.models import GeogebraApplet class GeogebraAppletDetailView(DetailView): model = GeogebraAppl...
0
0
0
308
0
173
0
102
136
637cd14234add4d98a4167907d1629a8dc3593e3
6,036
py
Python
test/test_diff_tar.py
gmertes/conda-mirror
34b206e19d8c858676ce2b707da15165578e6f79
[ "BSD-3-Clause" ]
6
2020-10-09T15:55:57.000Z
2021-07-29T11:08:10.000Z
test/test_diff_tar.py
gmertes/conda-mirror
34b206e19d8c858676ce2b707da15165578e6f79
[ "BSD-3-Clause" ]
34
2020-09-05T05:08:16.000Z
2022-03-09T15:13:55.000Z
test/test_diff_tar.py
gmertes/conda-mirror
34b206e19d8c858676ce2b707da15165578e6f79
[ "BSD-3-Clause" ]
7
2020-09-07T09:45:59.000Z
2022-01-20T20:16:38.000Z
EMPTY_MD5 = "d41d8cd98f00b204e9800998ecf8427e"
29.588235
88
0.680583
import os import sys import json import shutil import tempfile from os.path import isfile, join import pathlib import pytest import conda_mirror.diff_tar as dt EMPTY_MD5 = "d41d8cd98f00b204e9800998ecf8427e" @pytest.fixture def tmpdir(): tmpdir = tempfile.mkdtemp() dt.mirror_dir = join(tmpdir, "repo") ...
0
244
0
0
0
5,077
0
-38
683
926b3d6413e556587b0edd606bb4824c907485dd
417
py
Python
app/core/migrations/0005_item_slug.py
Andika7/microservice-django
7c25635d7fe371a62f14d2e3b6685678354a0568
[ "MIT" ]
null
null
null
app/core/migrations/0005_item_slug.py
Andika7/microservice-django
7c25635d7fe371a62f14d2e3b6685678354a0568
[ "MIT" ]
null
null
null
app/core/migrations/0005_item_slug.py
Andika7/microservice-django
7c25635d7fe371a62f14d2e3b6685678354a0568
[ "MIT" ]
null
null
null
# Generated by Django 3.0.2 on 2020-02-05 10:54
20.85
54
0.58753
# Generated by Django 3.0.2 on 2020-02-05 10:54 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0004_auto_20200205_1029'), ] operations = [ migrations.AddField( model_name='item', name='slug', ...
0
0
0
303
0
0
0
19
46
be8b6d00d6603fd9d2bfbc19d2ac5292cd519ac9
1,268
py
Python
src/views/CmdView/deactivate.py
mehsoy/jaws
b79723c1fc549741494ebf5d948e94a44e971f2a
[ "MIT" ]
1
2019-06-17T17:01:17.000Z
2019-06-17T17:01:17.000Z
src/views/CmdView/deactivate.py
mehsoy/jaws
b79723c1fc549741494ebf5d948e94a44e971f2a
[ "MIT" ]
7
2021-02-08T20:46:15.000Z
2021-09-08T02:12:59.000Z
src/views/CmdView/deactivate.py
mehsoy/jaws
b79723c1fc549741494ebf5d948e94a44e971f2a
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*-
30.190476
77
0.576498
#!/usr/bin/python # -*- coding: utf-8 -*- import os from views.CmdView.tokenify import Tokenify from views.CmdView.command import Command class Deactivate(Command): def __init__(self, object, obj, id=None): super(Deactivate, self).__init__(obj) self.id = id self.object = object def e...
0
0
0
1,105
0
0
0
30
90
277cfc2eaf7d209975206be666ec892e87746c43
4,457
py
Python
datasets/utils.py
xdr940/cc
a98fe9b6c33c332a4c399f968032a90989c55672
[ "MIT" ]
null
null
null
datasets/utils.py
xdr940/cc
a98fe9b6c33c332a4c399f968032a90989c55672
[ "MIT" ]
1
2019-08-16T07:09:22.000Z
2019-09-04T04:59:51.000Z
datasets/utils.py
xdr940/cc
a98fe9b6c33c332a4c399f968032a90989c55672
[ "MIT" ]
1
2020-01-13T04:51:22.000Z
2020-01-13T04:51:22.000Z
# # #gt
30.319728
118
0.572582
import numpy as np from scipy.misc import imread import torch import random def load_depth(path,format='png'): if format=='npy': tgt_depth = np.expand_dims(np.load(path), axis=0) elif format=='png': tgt_depth =np.expand_dims( imread(path), axis=0) return torch.from_numpy(tgt_depth).float()...
252
0
0
0
0
4,171
0
-12
200
6377ca21c65dacd8a4f10dd4484517d8cf1d99aa
6,665
py
Python
modules/datastructures/TrainData_deepCSV.py
dntaylor/DeepJet
249610b3b80543c8c84f5ba795bbb07c097f8150
[ "Apache-2.0" ]
1
2018-02-16T13:13:09.000Z
2018-02-16T13:13:09.000Z
modules/datastructures/TrainData_deepCSV.py
dntaylor/DeepJet
249610b3b80543c8c84f5ba795bbb07c097f8150
[ "Apache-2.0" ]
null
null
null
modules/datastructures/TrainData_deepCSV.py
dntaylor/DeepJet
249610b3b80543c8c84f5ba795bbb07c097f8150
[ "Apache-2.0" ]
5
2017-11-03T15:51:27.000Z
2019-05-29T14:45:23.000Z
''' Created on 21 Feb 2017 @author: jkiesele '''
35.452128
103
0.580045
''' Created on 21 Feb 2017 @author: jkiesele ''' from TrainDataDeepJet import TrainData_Flavour, TrainData_simpleTruth, TrainData_fullTruth, fileTimeOut import numpy as np class TrainData_deepCSV(TrainData_Flavour, TrainData_simpleTruth): ''' same as TrainData_deepCSV but with 4 truth labels: B BB C UDSG ...
0
0
0
6,401
0
0
0
79
113
589972506c18ceae6aaf9215a98021b547e17043
603
py
Python
src/clover/demo.py
gregjhansell97/leprechaun
d31e8d1a4b0a91aee2902602224c924b0b89fa06
[ "MIT" ]
null
null
null
src/clover/demo.py
gregjhansell97/leprechaun
d31e8d1a4b0a91aee2902602224c924b0b89fa06
[ "MIT" ]
null
null
null
src/clover/demo.py
gregjhansell97/leprechaun
d31e8d1a4b0a91aee2902602224c924b0b89fa06
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from clover.gui import CloverApp # may want to consider bounding speed app = CloverApp(title="leo-demo")
20.793103
55
0.633499
#!/usr/bin/env python # -*- coding: utf-8 -*- from clover.gui import CloverApp, Clock # may want to consider bounding speed app = CloverApp(title="leo-demo") def tick(time_interval): if app.world.gold is None or app.world.leo is None: return try: gold_x, gold_y = app.world.gold.loc ...
0
0
0
0
0
393
0
7
46
7c1efb98e5fd682a9bcfc00cec5517743f22f8a6
1,197
py
Python
flatiron-notebook/test/test_languages.py
IllumiDesk/flatiron-stacks
51ec24fefc35ccca0a1667ae20438db26a901d22
[ "MIT" ]
null
null
null
flatiron-notebook/test/test_languages.py
IllumiDesk/flatiron-stacks
51ec24fefc35ccca0a1667ae20438db26a901d22
[ "MIT" ]
2
2021-08-02T02:53:14.000Z
2021-11-05T18:08:18.000Z
flatiron-notebook/test/test_languages.py
IllumiDesk/flatiron-stacks
51ec24fefc35ccca0a1667ae20438db26a901d22
[ "MIT" ]
1
2020-10-21T16:08:46.000Z
2020-10-21T16:08:46.000Z
import docker from docker.errors import ContainerError import logging import pytest LOGGER = logging.getLogger(__name__) PYTHON_VERSION='3.9.5' NOTEBOOK_IMAGE_TAG=f'python-{PYTHON_VERSION}' def test_invalid_cmd(): """Ensure that an invalid command returns a docker.errors.ContainerError """ with pyte...
29.925
113
0.70259
import docker from docker.errors import ContainerError import logging import pytest LOGGER = logging.getLogger(__name__) PYTHON_VERSION='3.9.5' NOTEBOOK_IMAGE_TAG=f'python-{PYTHON_VERSION}' @pytest.mark.parametrize( 'language,version_output', [ ('python', ['Python', '3.9.5\n']), ], ) def test...
0
662
0
0
0
0
0
0
23
39b66c96fbaf8cecf65a0efb079529756c9fb5ba
5,846
py
Python
bot.py
rivermont/orka
4719c3b758d85f9b340698b9b637af196a50cec2
[ "MIT" ]
1
2017-10-08T17:18:44.000Z
2017-10-08T17:18:44.000Z
bot.py
rivermont/orka
4719c3b758d85f9b340698b9b637af196a50cec2
[ "MIT" ]
null
null
null
bot.py
rivermont/orka
4719c3b758d85f9b340698b9b637af196a50cec2
[ "MIT" ]
null
null
null
""" Orka Discord Bot Copyright (c) 2017 William Bennett """ ########### # IMPORTS # ########### from os import path, makedirs ################### # OTHER FUNCTIONS # ################### def add_msg(channel, text, mode='a+'): """ Appends a message to the end of a file. """ with open('channels/{0}.tx...
34.591716
128
0.561923
""" Orka Discord Bot Copyright (c) 2017 William Bennett """ ########### # IMPORTS # ########### import discord import random import markovify from os import path, makedirs from scripts import * ################### # OTHER FUNCTIONS # ################### def add_msg(channel, text, mode='a+'): """ Appends ...
0
0
4,865
6
0
153
0
-20
217
5dfc4ead3ddd6b27d4c94803fa33ddb4e209c9c4
20,054
py
Python
composer/callbacks/checkpoint_saver.py
hanlint/composer
83d96b7efde533cbc2fff7dd7e0769da2b177807
[ "Apache-2.0" ]
null
null
null
composer/callbacks/checkpoint_saver.py
hanlint/composer
83d96b7efde533cbc2fff7dd7e0769da2b177807
[ "Apache-2.0" ]
null
null
null
composer/callbacks/checkpoint_saver.py
hanlint/composer
83d96b7efde533cbc2fff7dd7e0769da2b177807
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 MosaicML. All Rights Reserved. """Callback to save checkpoints during training.""" from __future__ import annotations import logging from typing import Callable, Union from composer.core import Event, State from composer.core.time import Time, TimeUnit log = logging.getLogger(__name__) __all__ = ...
49.761787
154
0.621472
# Copyright 2021 MosaicML. All Rights Reserved. """Callback to save checkpoints during training.""" from __future__ import annotations import logging import os import pathlib import textwrap from typing import Callable, List, Optional, Tuple, Union from composer.core import Event, State from composer.core.callback ...
0
0
0
16,816
0
956
0
345
226
9df712a61c104af137c3836ef28840763dfb0311
5,919
py
Python
wrapperNYU.py
Z7Gao/InverseRenderingOfIndoorScene
f245d20dcbe05b1de766c2e53af79fd489f58d74
[ "MIT" ]
171
2020-06-28T04:03:23.000Z
2022-03-30T08:50:20.000Z
wrapperNYU.py
Z7Gao/InverseRenderingOfIndoorScene
f245d20dcbe05b1de766c2e53af79fd489f58d74
[ "MIT" ]
9
2020-08-20T08:56:38.000Z
2022-01-19T19:53:51.000Z
wrapperNYU.py
Z7Gao/InverseRenderingOfIndoorScene
f245d20dcbe05b1de766c2e53af79fd489f58d74
[ "MIT" ]
19
2020-06-23T11:49:03.000Z
2022-01-22T01:49:26.000Z
# Return triplet of predictions, ground-truth and error
48.516393
167
0.66937
import torch from torch.autograd import Variable import numpy as np import torch.nn.functional as F import models # Return triplet of predictions, ground-truth and error def wrapperNYU(dataBatch, opt, encoder, albedoDecoder, normalDecoder, roughDecoder, depthDecoder ): # Load data from cpu to gpu normal_c...
0
0
0
0
0
5,724
0
4
134