hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f723771491b01e370b7732388f7bebf64ae3b41f
793
py
Python
HellowWorldO0.py
RobertMillward/pythonlearn
8406fb5d03b48bfacdb286de551a291ce58fb0cc
[ "MIT" ]
null
null
null
HellowWorldO0.py
RobertMillward/pythonlearn
8406fb5d03b48bfacdb286de551a291ce58fb0cc
[ "MIT" ]
null
null
null
HellowWorldO0.py
RobertMillward/pythonlearn
8406fb5d03b48bfacdb286de551a291ce58fb0cc
[ "MIT" ]
null
null
null
""" HelloWorldO0.py Copyright (c) 2020 by Robert Russell Millward. All rights reserved. """ from tkinter import * class GenResearch(Frame): def sayHi(self): print("hi Bob"); def createWidgits(self): self.QUIT = Button(self); self.QUIT["text"] = "Quit"; self.QUIT["fg"] = "red"...
20.333333
67
0.581337
from tkinter import * class GenResearch(Frame): def sayHi(self): print("hi Bob"); def createWidgits(self): self.QUIT = Button(self); self.QUIT["text"] = "Quit"; self.QUIT["fg"] = "red"; self.QUIT["command"] = self.quit; self.QUIT.pack({"side": "left"}); ...
true
true
f72377c45b0d0f5af5cd0bddd9687f941ba094d9
4,862
py
Python
train.py
MaxCodeXTC/symmetrynet
f42810be95ecaa85a32a836213cb8d0687184574
[ "MIT" ]
1
2020-06-21T07:59:02.000Z
2020-06-21T07:59:02.000Z
train.py
MaxCodeXTC/symmetrynet
f42810be95ecaa85a32a836213cb8d0687184574
[ "MIT" ]
null
null
null
train.py
MaxCodeXTC/symmetrynet
f42810be95ecaa85a32a836213cb8d0687184574
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """Training and Evaluate the Neural Network Usage: train.py [options] <yaml-config> train.py (-h | --help ) Arguments: yaml-config Path to the yaml hyper-parameter file Options: -h --help Show this screen. -d --devices <devices> ...
29.113772
86
0.629988
import datetime import glob import os import os.path as osp import platform import pprint import random import shlex import shutil import signal import subprocess import sys import threading import numpy as np import torch import yaml from docopt import docopt import sym from sym.config import CI, CM, CO, C, load_c...
true
true
f72378220e9039ed041d978348918d27193da39e
15,363
py
Python
host-client/host.py
maxtheaxe/zoom-education-suite
e2939916df574eccb5c4107d6623fe4e84044661
[ "Apache-2.0" ]
null
null
null
host-client/host.py
maxtheaxe/zoom-education-suite
e2939916df574eccb5c4107d6623fe4e84044661
[ "Apache-2.0" ]
1
2020-09-23T04:52:31.000Z
2020-09-23T04:52:31.000Z
host-client/host.py
maxtheaxe/zoom-education-suite
e2939916df574eccb5c4107d6623fe4e84044661
[ "Apache-2.0" ]
1
2020-12-22T08:25:25.000Z
2020-12-22T08:25:25.000Z
# Zoom Host Client - Zoom Education Suite - HooHacks2020 - maxtheaxe from selenium import webdriver from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.common.action_chains import Act...
48.617089
137
0.757795
from selenium import webdriver from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.common.keys import Keys import sy...
true
true
f72379fae5f3003967b64fa675df2b543eea99bb
1,334
py
Python
beginner/01_led_one_blink.py
manfre-lorson/raspberrypi
5581ad0c670ce765d8035e1bdb7e82c9b613a061
[ "Apache-2.0" ]
null
null
null
beginner/01_led_one_blink.py
manfre-lorson/raspberrypi
5581ad0c670ce765d8035e1bdb7e82c9b613a061
[ "Apache-2.0" ]
null
null
null
beginner/01_led_one_blink.py
manfre-lorson/raspberrypi
5581ad0c670ce765d8035e1bdb7e82c9b613a061
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 """ Created on Wed Mar 25 16:26:10 2020 @author: manfre-lorson @work: ansteuern einer diode 10 mal blinken """ ########################################################################## ########################################################################## """ def schaltplan(): ''' sh...
22.610169
74
0.437781
true
true
f7237b065e7ba4230639c9afd16ab70cabf6e7be
942
py
Python
tests/test_entropy.py
williamscales/pytopocomplexity
f739b7695066f5da40a9610d21579983a12e76ad
[ "Apache-2.0" ]
null
null
null
tests/test_entropy.py
williamscales/pytopocomplexity
f739b7695066f5da40a9610d21579983a12e76ad
[ "Apache-2.0" ]
null
null
null
tests/test_entropy.py
williamscales/pytopocomplexity
f739b7695066f5da40a9610d21579983a12e76ad
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for `pytopocomplexity.entropy`""" from __future__ import (absolute_import, division, print_function, unicode_literals) from future.builtins import (ascii, bytes, chr, dict, filter, hex, input, int, map, next, o...
36.230769
78
0.654989
from __future__ import (absolute_import, division, print_function, unicode_literals) from future.builtins import (ascii, bytes, chr, dict, filter, hex, input, int, map, next, oct, open, pow, range, round, str, super, zip) import numpy...
true
true
f7237b4f0638bf5245e8c7fd5d3e680e53b43e49
1,163
py
Python
course_catalog/migrations/0005_course_last_modified.py
mitodl/open-discussions
ab6e9fac70b8a1222a84e78ba778a7a065c20541
[ "BSD-3-Clause" ]
12
2017-09-27T21:23:27.000Z
2020-12-25T04:31:30.000Z
course_catalog/migrations/0005_course_last_modified.py
mitodl/open-discussions
ab6e9fac70b8a1222a84e78ba778a7a065c20541
[ "BSD-3-Clause" ]
3,293
2017-06-30T18:16:01.000Z
2022-03-31T18:01:34.000Z
course_catalog/migrations/0005_course_last_modified.py
mitodl/open-discussions
ab6e9fac70b8a1222a84e78ba778a7a065c20541
[ "BSD-3-Clause" ]
1
2020-04-13T12:19:57.000Z
2020-04-13T12:19:57.000Z
# Generated by Django 2.0.8 on 2019-01-11 00:05 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("course_catalog", "0004_make_short_description_nullable_20190110_2018") ] operations = [ migrations.AddField( model_name="course"...
29.075
88
0.568358
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("course_catalog", "0004_make_short_description_nullable_20190110_2018") ] operations = [ migrations.AddField( model_name="course", name="last_modified", ...
true
true
f7237b7e3bfc0ef4f29563b378b6e0e0f7ae24c4
421
py
Python
python/benchmark/utils/powerset.py
jkomyno/lattice-submodular-maximization
e03c8bcc5fcf5bf79a6ae81f145757cf3fdff7cb
[ "MIT" ]
1
2021-11-16T18:16:42.000Z
2021-11-16T18:16:42.000Z
python/benchmark/utils/powerset.py
jkomyno/lattice-submodular-maximization
e03c8bcc5fcf5bf79a6ae81f145757cf3fdff7cb
[ "MIT" ]
null
null
null
python/benchmark/utils/powerset.py
jkomyno/lattice-submodular-maximization
e03c8bcc5fcf5bf79a6ae81f145757cf3fdff7cb
[ "MIT" ]
null
null
null
import numpy as np import itertools from nptyping import NDArray from typing import Iterator from ..objective import Objective def powerset(f: Objective) -> Iterator[NDArray[int]]: """ Inumerate b^n possible vectors in the integer lattice. :param f: integer-lattice submodular function objective """ ...
28.066667
61
0.698337
import numpy as np import itertools from nptyping import NDArray from typing import Iterator from ..objective import Objective def powerset(f: Objective) -> Iterator[NDArray[int]]: return map(lambda t: np.array([*t]), itertools.product(range(f.b + 1), repeat=f.n))
true
true
f7237c54fd1c0013c860e853edef75dfbd133a53
7,668
py
Python
examples/basic_tutorials/tutorial_cifar10_placeholder.py
JingqingZ/tensorlayer2
289a0402bd64f6a423aa574f10ac8ad8efcb7b66
[ "Apache-2.0" ]
null
null
null
examples/basic_tutorials/tutorial_cifar10_placeholder.py
JingqingZ/tensorlayer2
289a0402bd64f6a423aa574f10ac8ad8efcb7b66
[ "Apache-2.0" ]
null
null
null
examples/basic_tutorials/tutorial_cifar10_placeholder.py
JingqingZ/tensorlayer2
289a0402bd64f6a423aa574f10ac8ad8efcb7b66
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/python # -*- coding: utf-8 -*- import time import numpy as np import tensorflow as tf import tensorlayer as tl from tensorlayer.layers import * tf.logging.set_verbosity(tf.logging.DEBUG) tl.logging.set_verbosity(tl.logging.DEBUG) sess = tf.InteractiveSession() X_train, y_train, X_test, y_test = tl.fil...
45.372781
119
0.638237
import time import numpy as np import tensorflow as tf import tensorlayer as tl from tensorlayer.layers import * tf.logging.set_verbosity(tf.logging.DEBUG) tl.logging.set_verbosity(tl.logging.DEBUG) sess = tf.InteractiveSession() X_train, y_train, X_test, y_test = tl.files.load_cifar10_dataset(shape=(-1, 32, 32...
true
true
f7237d73459ad926cb28691c03a0070109cbaebf
2,391
py
Python
censys/transforms/search_https_body_hash_to_ip.py
netsec/censys-maltego
f2a1b20565df3174eda1e35cfe23077291b753c6
[ "Apache-2.0" ]
1
2019-08-07T09:57:09.000Z
2019-08-07T09:57:09.000Z
censys/transforms/search_https_body_hash_to_ip.py
netsec/censys-maltego
f2a1b20565df3174eda1e35cfe23077291b753c6
[ "Apache-2.0" ]
null
null
null
censys/transforms/search_https_body_hash_to_ip.py
netsec/censys-maltego
f2a1b20565df3174eda1e35cfe23077291b753c6
[ "Apache-2.0" ]
1
2019-08-07T09:57:10.000Z
2019-08-07T09:57:10.000Z
import argparse import json import logging import os from censys_maltego import Censys from maltego_trx.transform import DiscoverableTransform log_file_path = os.path.dirname(os.path.realpath(__file__)) log_file_name = 'censys_maltego_transform.log' logging.basicConfig(filename=os.path.join(log_file_path, log_file_n...
31.88
137
0.686742
import argparse import json import logging import os from censys_maltego import Censys from maltego_trx.transform import DiscoverableTransform log_file_path = os.path.dirname(os.path.realpath(__file__)) log_file_name = 'censys_maltego_transform.log' logging.basicConfig(filename=os.path.join(log_file_path, log_file_n...
true
true
f7237e2b4bf76760511938d4522cfebdec21948a
798
py
Python
bin/gen/generate_css_for_a_board_with_hexcodes.py
luanlv/anabim2
be66567e953aee4a58cab75dddc4325ace2ef96e
[ "MIT" ]
null
null
null
bin/gen/generate_css_for_a_board_with_hexcodes.py
luanlv/anabim2
be66567e953aee4a58cab75dddc4325ace2ef96e
[ "MIT" ]
1
2016-10-02T23:56:17.000Z
2016-10-02T23:56:17.000Z
bin/gen/generate_css_for_a_board_with_hexcodes.py
luanlv/anabim2
be66567e953aee4a58cab75dddc4325ace2ef96e
[ "MIT" ]
null
null
null
#! /usr/bin/python2 #config themes = { 'grey': ['#fff', '#c4c4c4'], 'green': ['#ffffdd', '#86a666'], 'blue': ['#dee3e6', '#8ca2ad'], 'brown': ['#f0d9b5', '#b58863'] } blackPattern = 'body.{name} #GameBoard td.blackSquare, body.{name} #GameBoard td.highlightBlackSquare, body.{name} div.lcs.black, #top div.lcs....
42
212
0.674185
themes = { 'grey': ['#fff', '#c4c4c4'], 'green': ['#ffffdd', '#86a666'], 'blue': ['#dee3e6', '#8ca2ad'], 'brown': ['#f0d9b5', '#b58863'] } blackPattern = 'body.{name} #GameBoard td.blackSquare, body.{name} #GameBoard td.highlightBlackSquare, body.{name} div.lcs.black, #top div.lcs.black.{name} { background:...
false
true
f7237e57eaff82db467a825946465ee33ed0585d
805
py
Python
ManifestEditor/Util.py
CodyGit/ManifestEditor
c06dfaa8a60b955cb1833c852da8866c24b0b1fa
[ "MIT" ]
21
2020-06-12T02:24:59.000Z
2022-02-03T06:34:36.000Z
ManifestEditor/Util.py
CodyGit/ManifestEditor
c06dfaa8a60b955cb1833c852da8866c24b0b1fa
[ "MIT" ]
7
2020-08-18T02:05:10.000Z
2021-07-19T09:53:38.000Z
ManifestEditor/Util.py
CodyGit/ManifestEditor
c06dfaa8a60b955cb1833c852da8866c24b0b1fa
[ "MIT" ]
13
2020-06-24T02:09:17.000Z
2022-03-10T02:22:07.000Z
#!/usr/bin/python3 #coding=utf-8 #author: cody def create_reader(byte_arr, offset): f = offset b_arr = byte_arr def read(count): nonlocal f nonlocal b_arr b = b_arr[f:f + count] f = f + count return b return read def bytes_to_int(b): return int.from_bytes(b,...
23.676471
63
0.627329
def create_reader(byte_arr, offset): f = offset b_arr = byte_arr def read(count): nonlocal f nonlocal b_arr b = b_arr[f:f + count] f = f + count return b return read def bytes_to_int(b): return int.from_bytes(b, byteorder='little',signed=True) def int_to...
true
true
f7237fdb4b85456c4780c1536a64e9885a19dbc2
17,280
py
Python
tests/test_finance.py
hotchilianalytics/zipline-broker
fb475cf89ec8886db4ee6420bd9aca70c1821eab
[ "Apache-2.0" ]
9
2020-10-31T20:23:24.000Z
2022-03-29T02:59:45.000Z
tests/test_finance.py
hotchilianalytics/zipline-broker
fb475cf89ec8886db4ee6420bd9aca70c1821eab
[ "Apache-2.0" ]
null
null
null
tests/test_finance.py
hotchilianalytics/zipline-broker
fb475cf89ec8886db4ee6420bd9aca70c1821eab
[ "Apache-2.0" ]
1
2021-02-05T07:06:36.000Z
2021-02-05T07:06:36.000Z
# # Copyright 2013 Quantopian, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
37.647059
79
0.572396
from datetime import datetime, timedelta import os from nose.tools import timed from nose.tools import nottest import numpy as np import pandas as pd import pytz from six import iteritems from six.moves import range from testfixtures import TempDirectory from zipline.finance.blotter.simulation_blotter...
true
true
f72380691d56192882fe83950359d2235067b832
4,991
py
Python
Tests/attribution_calculation/ShapleyExcess/iterate_drug.py
anonymous29387491/iclr2022
60c5727f8519e64610b632d074510587fb7ff692
[ "MIT" ]
null
null
null
Tests/attribution_calculation/ShapleyExcess/iterate_drug.py
anonymous29387491/iclr2022
60c5727f8519e64610b632d074510587fb7ff692
[ "MIT" ]
null
null
null
Tests/attribution_calculation/ShapleyExcess/iterate_drug.py
anonymous29387491/iclr2022
60c5727f8519e64610b632d074510587fb7ff692
[ "MIT" ]
null
null
null
from torchvision import datasets, transforms import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import DataLoader from argparse import ArgumentParser from tqdm import tqdm import time import numpy as np ########### # file imports / path issues import os import sys ...
30.432927
112
0.61671
from torchvision import datasets, transforms import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import DataLoader from argparse import ArgumentParser from tqdm import tqdm import time import numpy as np os.path.abspath(__file__)).parents[3] os.chdir(path) sys.path.a...
true
true
f72380ca6e9cedea194a5c13ba71ca069254a476
1,189
py
Python
coursedashboards/migrations/0014_auto_20200911_2040.py
uw-it-aca/course-dashboards
0f195f7233fc8e24e9ca0d2624ca288869e133ba
[ "Apache-2.0" ]
1
2018-04-05T19:00:27.000Z
2018-04-05T19:00:27.000Z
coursedashboards/migrations/0014_auto_20200911_2040.py
uw-it-aca/course-dashboards
0f195f7233fc8e24e9ca0d2624ca288869e133ba
[ "Apache-2.0" ]
188
2017-08-31T23:38:23.000Z
2022-03-29T18:06:00.000Z
coursedashboards/migrations/0014_auto_20200911_2040.py
uw-it-aca/course-dashboards
0f195f7233fc8e24e9ca0d2624ca288869e133ba
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.1.15 on 2020-09-11 20:40 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('coursedashboards', '0013_auto_20190108_2238'), ] operations = [ migrations.CreateModel( name='CourseGradeAverage', ...
33.027778
147
0.557611
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('coursedashboards', '0013_auto_20190108_2238'), ] operations = [ migrations.CreateModel( name='CourseGradeAverage', fields=[ ('id', models.AutoField...
true
true
f72380da1dd16cb6803819798678cc304b8a688a
247
py
Python
utils/download.py
yagajj/Tensorflow-video-Recognition-HTML-interface
b4980f31f92b97d2669135f55a15fc4c91e1824e
[ "MIT" ]
67
2018-02-21T06:12:53.000Z
2022-01-18T10:21:58.000Z
utils/download.py
yagajj/Tensorflow-video-Recognition-HTML-interface
b4980f31f92b97d2669135f55a15fc4c91e1824e
[ "MIT" ]
6
2018-03-05T00:51:10.000Z
2021-07-02T08:43:15.000Z
utils/download.py
yagajj/Tensorflow-video-Recognition-HTML-interface
b4980f31f92b97d2669135f55a15fc4c91e1824e
[ "MIT" ]
22
2018-03-13T08:39:12.000Z
2021-12-25T08:52:42.000Z
from google_drive_downloader import GoogleDriveDownloader as gdd gdd.download_file_from_google_drive(file_id='16Gi1oZr3mEGMEUCsOQ3whFfDlv8IAyzG', dest_path='./', unzip=True)
41.166667
80
0.611336
from google_drive_downloader import GoogleDriveDownloader as gdd gdd.download_file_from_google_drive(file_id='16Gi1oZr3mEGMEUCsOQ3whFfDlv8IAyzG', dest_path='./', unzip=True)
true
true
f72380f565cdc8bef9d0b26561d67e2968bf236a
119
py
Python
shiyanlou_cs596-1805f3c438/design2.py
tongxindao/shiyanlou
1d002ea342deb69066c287db9935f77f49f0a09e
[ "Apache-2.0" ]
null
null
null
shiyanlou_cs596-1805f3c438/design2.py
tongxindao/shiyanlou
1d002ea342deb69066c287db9935f77f49f0a09e
[ "Apache-2.0" ]
null
null
null
shiyanlou_cs596-1805f3c438/design2.py
tongxindao/shiyanlou
1d002ea342deb69066c287db9935f77f49f0a09e
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/env python3 n = int(input("Enter the number of rows: ")) i = 1 while i <= n: print("*" * i) i += 1
17
44
0.521008
n = int(input("Enter the number of rows: ")) i = 1 while i <= n: print("*" * i) i += 1
true
true
f7238161eaf068d3b5854017d9c4ea5711b90f31
11,244
py
Python
r2r_src_update/train.py
zhangyuejoslin/Recurrent-VLN-BERT
f9bc81c297d6ad04b6b846b4d702a8f7bb4544ab
[ "MIT" ]
null
null
null
r2r_src_update/train.py
zhangyuejoslin/Recurrent-VLN-BERT
f9bc81c297d6ad04b6b846b4d702a8f7bb4544ab
[ "MIT" ]
null
null
null
r2r_src_update/train.py
zhangyuejoslin/Recurrent-VLN-BERT
f9bc81c297d6ad04b6b846b4d702a8f7bb4544ab
[ "MIT" ]
null
null
null
import torch import os import time import json import random import numpy as np from collections import defaultdict from utils import read_vocab, write_vocab, build_vocab, padding_idx, timeSince, read_img_features, print_progress, roi_img_features import utils from env import R2RBatch from agent import Seq2SeqAgent f...
38.639175
146
0.609747
import torch import os import time import json import random import numpy as np from collections import defaultdict from utils import read_vocab, write_vocab, build_vocab, padding_idx, timeSince, read_img_features, print_progress, roi_img_features import utils from env import R2RBatch from agent import Seq2SeqAgent f...
true
true
f72382a7360a9fea109a9136b65d1c2e4416f908
2,176
py
Python
setup.py
berndca/xmodels
8265522229a1ce482a2866cdbd1938293a74bb67
[ "BSD-3-Clause" ]
1
2016-05-05T08:33:41.000Z
2016-05-05T08:33:41.000Z
setup.py
berndca/xmodels
8265522229a1ce482a2866cdbd1938293a74bb67
[ "BSD-3-Clause" ]
1
2016-03-29T20:16:41.000Z
2016-03-29T20:16:41.000Z
setup.py
berndca/xmodels
8265522229a1ce482a2866cdbd1938293a74bb67
[ "BSD-3-Clause" ]
null
null
null
from setuptools import setup from setuptools.command.test import test as TestCommand import os import sys import io import re rel_file = lambda *args: os.path.join(os.path.dirname(os.path.abspath(__file__)), *args) def read(*filenames, **kwargs): encoding = kwargs.get('encoding', 'utf-8') sep = kwargs.get('s...
27.544304
88
0.642463
from setuptools import setup from setuptools.command.test import test as TestCommand import os import sys import io import re rel_file = lambda *args: os.path.join(os.path.dirname(os.path.abspath(__file__)), *args) def read(*filenames, **kwargs): encoding = kwargs.get('encoding', 'utf-8') sep = kwargs.get('s...
true
true
f723832938a425b075fb1d945232b872b512f67a
119,909
py
Python
tests/components/alexa/test_smart_home.py
GeorgeSG/homeassistant-core
d4615fd432f0c3c66eb0cf682c3da9a4accd7e6c
[ "Apache-2.0" ]
1
2020-03-29T00:56:35.000Z
2020-03-29T00:56:35.000Z
tests/components/alexa/test_smart_home.py
GeorgeSG/homeassistant-core
d4615fd432f0c3c66eb0cf682c3da9a4accd7e6c
[ "Apache-2.0" ]
null
null
null
tests/components/alexa/test_smart_home.py
GeorgeSG/homeassistant-core
d4615fd432f0c3c66eb0cf682c3da9a4accd7e6c
[ "Apache-2.0" ]
null
null
null
"""Test for smart home alexa support.""" import pytest from homeassistant.components.alexa import messages, smart_home from homeassistant.components.media_player.const import ( SUPPORT_NEXT_TRACK, SUPPORT_PAUSE, SUPPORT_PLAY, SUPPORT_PLAY_MEDIA, SUPPORT_PREVIOUS_TRACK, SUPPORT_SEEK, SUPPORT...
32.39033
106
0.62891
import pytest from homeassistant.components.alexa import messages, smart_home from homeassistant.components.media_player.const import ( SUPPORT_NEXT_TRACK, SUPPORT_PAUSE, SUPPORT_PLAY, SUPPORT_PLAY_MEDIA, SUPPORT_PREVIOUS_TRACK, SUPPORT_SEEK, SUPPORT_SELECT_SOUND_MODE, SUPPORT_SELECT_SO...
true
true
f7238338295de431651ec0169448982206e86681
81
py
Python
tests/periodicities/Week/Cycle_Week_25_W_60.py
shaido987/pyaf
b9afd089557bed6b90b246d3712c481ae26a1957
[ "BSD-3-Clause" ]
377
2016-10-13T20:52:44.000Z
2022-03-29T18:04:14.000Z
tests/periodicities/Week/Cycle_Week_25_W_60.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
160
2016-10-13T16:11:53.000Z
2022-03-28T04:21:34.000Z
tests/periodicities/Week/Cycle_Week_25_W_60.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
63
2017-03-09T14:51:18.000Z
2022-03-27T20:52:57.000Z
import tests.periodicities.period_test as per per.buildModel((60 , 'W' , 25));
16.2
45
0.716049
import tests.periodicities.period_test as per per.buildModel((60 , 'W' , 25));
true
true
f72383e343f175fae08802e8401da5dec36ca055
8,628
py
Python
GeneratorInterface/Core/test/Pythia8ConcurrentGeneratorFilter_WZ_TuneCP5_13TeV-pythia8_cfg.py
AndrissP/cmssw
b03578d2a2573923af5db50d0508baf3bd6a208e
[ "Apache-2.0" ]
null
null
null
GeneratorInterface/Core/test/Pythia8ConcurrentGeneratorFilter_WZ_TuneCP5_13TeV-pythia8_cfg.py
AndrissP/cmssw
b03578d2a2573923af5db50d0508baf3bd6a208e
[ "Apache-2.0" ]
null
null
null
GeneratorInterface/Core/test/Pythia8ConcurrentGeneratorFilter_WZ_TuneCP5_13TeV-pythia8_cfg.py
AndrissP/cmssw
b03578d2a2573923af5db50d0508baf3bd6a208e
[ "Apache-2.0" ]
null
null
null
# Auto generated configuration file # using: # Revision: 1.19 # Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v # with command line options: Configuration/GenProduction/python/BTV-RunIISummer20UL17GEN-00002-fragment.py --python_filename BTV-RunIISummer20UL17GEN-00002_1_cfg.py --e...
51.357143
1,451
0.74803
import FWCore.ParameterSet.Config as cms from Configuration.Eras.Era_Run2_2017_cff import Run2_2017 process = cms.Process('GEN',Run2_2017) process.load('Configuration.StandardSequences.Services_cff') process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi') process.load('FWCore.MessageService.MessageLogger_cfi')...
true
true
f723840200cf6e8ca14e042f3945330caf70bbb8
265
py
Python
test/test_lcs.py
currentsapi/dragnet
7ad5ff25b1e5596c5ed1c5090f1aad7205804ea1
[ "MIT" ]
40
2021-01-05T09:40:35.000Z
2022-03-22T12:18:12.000Z
test/test_lcs.py
currentsapi/dragnet
7ad5ff25b1e5596c5ed1c5090f1aad7205804ea1
[ "MIT" ]
3
2022-01-18T22:53:45.000Z
2022-03-13T16:17:00.000Z
test/test_lcs.py
currentsapi/dragnet
7ad5ff25b1e5596c5ed1c5090f1aad7205804ea1
[ "MIT" ]
10
2021-03-08T16:10:43.000Z
2022-03-22T12:17:54.000Z
from extractnet.lcs import check_inclusion def test_check_inclusion(): inc = check_inclusion( ["some", "words", "here", "the", "football"], ["he", "said", "words", "kick", "the", "football"]) assert inc == [False, True, False, True, True]
29.444444
59
0.603774
from extractnet.lcs import check_inclusion def test_check_inclusion(): inc = check_inclusion( ["some", "words", "here", "the", "football"], ["he", "said", "words", "kick", "the", "football"]) assert inc == [False, True, False, True, True]
true
true
f723849aef25a63a26e2db80a574c1ce7e44a552
18,576
py
Python
neo/Network/syncmanager.py
volekerb/neo-python
5bdded2c339219355cf1d31ae58653b0f94c6e51
[ "MIT" ]
387
2017-07-17T18:25:54.000Z
2021-11-18T06:19:47.000Z
neo/Network/syncmanager.py
volekerb/neo-python
5bdded2c339219355cf1d31ae58653b0f94c6e51
[ "MIT" ]
967
2017-08-19T15:48:03.000Z
2021-06-01T21:42:39.000Z
neo/Network/syncmanager.py
volekerb/neo-python
5bdded2c339219355cf1d31ae58653b0f94c6e51
[ "MIT" ]
286
2017-07-17T03:44:36.000Z
2021-11-18T06:19:32.000Z
import asyncio import traceback from datetime import datetime from neo.Network.core.header import Header from typing import TYPE_CHECKING, List from neo.Network.flightinfo import FlightInfo from neo.Network.requestinfo import RequestInfo from neo.Network.payloads.inventory import InventoryType from neo.Network.common i...
41.18847
156
0.643411
import asyncio import traceback from datetime import datetime from neo.Network.core.header import Header from typing import TYPE_CHECKING, List from neo.Network.flightinfo import FlightInfo from neo.Network.requestinfo import RequestInfo from neo.Network.payloads.inventory import InventoryType from neo.Network.common i...
true
true
f723864acb53fed407c35dcf3a1fd70e71ad72f3
6,431
py
Python
taln2016/icsisumm-primary-sys34_v1/nltk/nltk-0.9.2/nltk_contrib/classifier/commandline.py
hectormartinez/rougexstem
32da9eab253cb88fc1882e59026e8b5b40900a25
[ "Apache-2.0" ]
null
null
null
taln2016/icsisumm-primary-sys34_v1/nltk/nltk-0.9.2/nltk_contrib/classifier/commandline.py
hectormartinez/rougexstem
32da9eab253cb88fc1882e59026e8b5b40900a25
[ "Apache-2.0" ]
null
null
null
taln2016/icsisumm-primary-sys34_v1/nltk/nltk-0.9.2/nltk_contrib/classifier/commandline.py
hectormartinez/rougexstem
32da9eab253cb88fc1882e59026e8b5b40900a25
[ "Apache-2.0" ]
null
null
null
# Natural Language Toolkit CommandLine # understands the command line interaction # Author: Sumukh Ghodke <sumukh dot ghodke at gmail dot com> # # URL: <http://nltk.sf.net> # This software is distributed under GPL, for license information see LICENSE.TXT from optparse import OptionParser from nltk_contrib.classifie...
43.161074
133
0.628985
from optparse import OptionParser from nltk_contrib.classifier.exceptions import filenotfounderror as fnf, invaliddataerror as inv from nltk_contrib.classifier import format import time D_help = "Used to specify the data format. " \ + "Options: C45 for C4.5 format. ...
false
true
f7238671141edde716244b94339cf5f49fe0ddb8
3,020
py
Python
dynamic-ingest/python/di-example-source-file-upload.py
AdiCheo/dynamic-ingest-code-samples
e36fd847744099da29c6aa214a58d4c4ba4600cc
[ "MIT" ]
4
2017-01-16T08:12:48.000Z
2020-07-29T07:50:25.000Z
dynamic-ingest/python/di-example-source-file-upload.py
AdiCheo/dynamic-ingest-code-samples
e36fd847744099da29c6aa214a58d4c4ba4600cc
[ "MIT" ]
2
2016-10-04T11:54:09.000Z
2021-01-21T00:17:20.000Z
dynamic-ingest/python/di-example-source-file-upload.py
AdiCheo/dynamic-ingest-code-samples
e36fd847744099da29c6aa214a58d4c4ba4600cc
[ "MIT" ]
10
2016-10-04T10:49:06.000Z
2019-11-28T23:18:56.000Z
#!/usr/bin/env python import sys import requests import json import argparse pub_id = "***ACCOUNT ID HERE****" client_id = "***CLIENT ID HERE****" client_secret = "***CLIENT SECRET HERE****" source_filename = "*** LOCAL VIDEO FILE HERE***" access_token_url = "https://oauth.brightcove.com/v3/access_token" profiles_bas...
49.508197
181
0.740397
import sys import requests import json import argparse pub_id = "***ACCOUNT ID HERE****" client_id = "***CLIENT ID HERE****" client_secret = "***CLIENT SECRET HERE****" source_filename = "*** LOCAL VIDEO FILE HERE***" access_token_url = "https://oauth.brightcove.com/v3/access_token" profiles_base_url = "http://inges...
false
true
f72386a8a5199feebb6ae6ddf5ad300495566d00
7,304
py
Python
src/genie/libs/parser/iosxe/tests/ShowIpRoute/cli/equal/golden_output92_expected.py
miwamoto0203/genieparser
d0595046f0f804aa4143c13e20a738b41a3a8c25
[ "Apache-2.0" ]
null
null
null
src/genie/libs/parser/iosxe/tests/ShowIpRoute/cli/equal/golden_output92_expected.py
miwamoto0203/genieparser
d0595046f0f804aa4143c13e20a738b41a3a8c25
[ "Apache-2.0" ]
null
null
null
src/genie/libs/parser/iosxe/tests/ShowIpRoute/cli/equal/golden_output92_expected.py
miwamoto0203/genieparser
d0595046f0f804aa4143c13e20a738b41a3a8c25
[ "Apache-2.0" ]
null
null
null
expected_output = { "vrf": { "VRF1": { "address_family": { "ipv4": { "routes": { "10.0.0.0/24": { "route": "10.0.0.0/24", "active": True, "route_prefere...
45.36646
89
0.214951
expected_output = { "vrf": { "VRF1": { "address_family": { "ipv4": { "routes": { "10.0.0.0/24": { "route": "10.0.0.0/24", "active": True, "route_prefere...
true
true
f72386b405bdb028c4ce4c2d9c8dba4a5bba70db
8,755
py
Python
vyper/utils.py
milancermak/vyper
f1c65b7fecc2dadb3ea761aed1b668227a44730a
[ "Apache-2.0" ]
1
2020-06-28T11:48:41.000Z
2020-06-28T11:48:41.000Z
vyper/utils.py
milancermak/vyper
f1c65b7fecc2dadb3ea761aed1b668227a44730a
[ "Apache-2.0" ]
1
2020-11-28T11:54:29.000Z
2020-11-28T11:54:29.000Z
vyper/utils.py
milancermak/vyper
f1c65b7fecc2dadb3ea761aed1b668227a44730a
[ "Apache-2.0" ]
null
null
null
import binascii import functools from typing import Dict, List, Union from vyper.exceptions import InvalidLiteral try: from Crypto.Hash import keccak # type: ignore keccak256 = lambda x: keccak.new(digest_bits=256, data=x).digest() # noqa: E731 except ImportError: import sha3 as _sha3 keccak256 = ...
29.577703
92
0.647744
import binascii import functools from typing import Dict, List, Union from vyper.exceptions import InvalidLiteral try: from Crypto.Hash import keccak keccak256 = lambda x: keccak.new(digest_bits=256, data=x).digest() except ImportError: import sha3 as _sha3 keccak256 = lambda x: _sha3.sha3_256(x...
true
true
f72387c2dd643350d80025eeec9fc77fd14f40aa
6,859
py
Python
lib/src/klio/transforms/core.py
gaybro8777/klio
e14055fba73f275ebbe7b3b64cc43beaa4ac2f69
[ "Apache-2.0" ]
null
null
null
lib/src/klio/transforms/core.py
gaybro8777/klio
e14055fba73f275ebbe7b3b64cc43beaa4ac2f69
[ "Apache-2.0" ]
null
null
null
lib/src/klio/transforms/core.py
gaybro8777/klio
e14055fba73f275ebbe7b3b64cc43beaa4ac2f69
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Spotify AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
35.53886
78
0.648637
import __main__ import glob import logging import os import threading import yaml from klio_core import config from klio_core.proto import klio_pb2 from klio.metrics import client as metrics_client from klio.metrics import logger as metrics_logger from klio.metrics import stackdriver class RunConfig...
true
true
f723892226135464b2c3c112e24e1665bfad3147
289
py
Python
learn-to-code-with-python/08-Control-Flow/the-bool-function-truthiness-and-falsiness.py
MaciejZurek/python_practicing
0a426f2aed151573e1f8678e0239ff596d92bbde
[ "MIT" ]
null
null
null
learn-to-code-with-python/08-Control-Flow/the-bool-function-truthiness-and-falsiness.py
MaciejZurek/python_practicing
0a426f2aed151573e1f8678e0239ff596d92bbde
[ "MIT" ]
null
null
null
learn-to-code-with-python/08-Control-Flow/the-bool-function-truthiness-and-falsiness.py
MaciejZurek/python_practicing
0a426f2aed151573e1f8678e0239ff596d92bbde
[ "MIT" ]
null
null
null
if 10 > 3: print("Hello") if 3: print("Yes, it's 3") if 0: print("This won't execute") if -1: print("Will it print?") if "hello": print("interesting") if "": print("This will not print either") if " ": print("aaa") print(bool(1)) # rzutowanie na boolean
12.565217
39
0.564014
if 10 > 3: print("Hello") if 3: print("Yes, it's 3") if 0: print("This won't execute") if -1: print("Will it print?") if "hello": print("interesting") if "": print("This will not print either") if " ": print("aaa") print(bool(1))
true
true
f7238a0d2a2db0352b919fd8d9f2ced545ef73c3
8,990
py
Python
src/eipcmd.py
CloudVelox/simple-cloud-shell
48548b4c24d99a8fe3866f552e1b4e5be2924a62
[ "Apache-2.0" ]
null
null
null
src/eipcmd.py
CloudVelox/simple-cloud-shell
48548b4c24d99a8fe3866f552e1b4e5be2924a62
[ "Apache-2.0" ]
null
null
null
src/eipcmd.py
CloudVelox/simple-cloud-shell
48548b4c24d99a8fe3866f552e1b4e5be2924a62
[ "Apache-2.0" ]
null
null
null
# # Copyright 2014-2016 CloudVelox Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
38.583691
79
0.568187
"""This module contains the implementation of the 'eip' command """ import getopt import common from common import CommandError from common import DisplayOptions from common import CommandOutput from common import ResourceSelector from common import optional class EIPCommand(common.BaseCommand): ...
false
true
f7238a6d4e5cd8d4b14e0a203fa2488a811e8cca
1,702
py
Python
fcntest.py
alexjercan/unsupervised-segmentation
172273fef52df3771d8de7c167fb0910f4079733
[ "MIT" ]
1
2022-01-13T11:56:59.000Z
2022-01-13T11:56:59.000Z
fcntest.py
alexjercan/unsupervised-segmentation
172273fef52df3771d8de7c167fb0910f4079733
[ "MIT" ]
null
null
null
fcntest.py
alexjercan/unsupervised-segmentation
172273fef52df3771d8de7c167fb0910f4079733
[ "MIT" ]
null
null
null
from metrics import MetricFunctionNYUv2, print_single_error from model import SupervisedLossFunction from torch.utils.data import DataLoader from torchvision import transforms from nyuv2 import NYUv2 from tqdm import tqdm from general import generate_layers, load_checkpoint, tensors_to_device import torch from torchvis...
35.458333
134
0.754994
from metrics import MetricFunctionNYUv2, print_single_error from model import SupervisedLossFunction from torch.utils.data import DataLoader from torchvision import transforms from nyuv2 import NYUv2 from tqdm import tqdm from general import generate_layers, load_checkpoint, tensors_to_device import torch from torchvis...
true
true
f7238b5b5c564f9712d0f7d3d3703ab811f151d6
2,964
py
Python
ndflow/util.py
dccastro/NDFlow
1e46cf00e78068d3c78281b42aa8aaed310e53c9
[ "MIT" ]
6
2018-10-18T23:51:33.000Z
2021-03-12T16:44:51.000Z
ndflow/util.py
dccastro/NDFlow
1e46cf00e78068d3c78281b42aa8aaed310e53c9
[ "MIT" ]
1
2018-11-05T01:52:40.000Z
2018-11-07T11:34:47.000Z
ndflow/util.py
dccastro/NDFlow
1e46cf00e78068d3c78281b42aa8aaed310e53c9
[ "MIT" ]
1
2019-03-04T13:35:20.000Z
2019-03-04T13:35:20.000Z
import os import numpy as np import ndflow from ndflow.models.mixture import MixtureModel def list_images(imgs_dir): import SimpleITK as sitk for filename in os.listdir(imgs_dir): path = os.path.join(imgs_dir, filename) reader = sitk.ImageFileReader() reader.SetFileName(path) ...
31.2
97
0.6417
import os import numpy as np import ndflow from ndflow.models.mixture import MixtureModel def list_images(imgs_dir): import SimpleITK as sitk for filename in os.listdir(imgs_dir): path = os.path.join(imgs_dir, filename) reader = sitk.ImageFileReader() reader.SetFileName(path) ...
true
true
f7238b7c15908087282d882259e37dedefe55ab5
506
py
Python
python/token_generator/token_generator.py
trypolis464/random_scripts
9832e2b793e49de0bd40c975faaea216eb1903e9
[ "MIT" ]
null
null
null
python/token_generator/token_generator.py
trypolis464/random_scripts
9832e2b793e49de0bd40c975faaea216eb1903e9
[ "MIT" ]
null
null
null
python/token_generator/token_generator.py
trypolis464/random_scripts
9832e2b793e49de0bd40c975faaea216eb1903e9
[ "MIT" ]
null
null
null
# token_generator. Generate random strings. # # Copyright (C) 2021, Ty Gillespie. All rights reserved. # MIT License. import random def generate(length = 8): """Generates a token of the given length. The default is 8.""" # Feel free to change this based on what you need your tokens to contain. SYMBOLS = "...
31.625
78
0.70751
import random def generate(length = 8): SYMBOLS = "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890" final = "" for i in range(length): final += SYMBOLS[random.randint(0, len(SYMBOLS) - 1)] return final
true
true
f7238c0e0ff13537a51277894506e248909f7d8c
1,610
py
Python
azure/mgmt/compute/v2015_06_15/models/api_error.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
1
2022-01-25T22:52:58.000Z
2022-01-25T22:52:58.000Z
azure/mgmt/compute/v2015_06_15/models/api_error.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
azure/mgmt/compute/v2015_06_15/models/api_error.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "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 ...
35
92
0.589441
from msrest.serialization import Model class ApiError(Model): _attribute_map = { 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, 'innererror': {'key': 'innererror', 'type': 'InnerError'}, 'code': {'key': 'code', 'type': 'str'}, 'target': {'key': 'target', 'type...
true
true
f7238c591b376df4ffed31b3f8cd6d3068f4258a
338
py
Python
z.Box of stuffs/0.Completed projects/Stock updater/Execution/send_sms.py
monacotime/dump_dump_dump
51d6b4f58fe25416911a3bf545d326046fb6a475
[ "MIT" ]
null
null
null
z.Box of stuffs/0.Completed projects/Stock updater/Execution/send_sms.py
monacotime/dump_dump_dump
51d6b4f58fe25416911a3bf545d326046fb6a475
[ "MIT" ]
null
null
null
z.Box of stuffs/0.Completed projects/Stock updater/Execution/send_sms.py
monacotime/dump_dump_dump
51d6b4f58fe25416911a3bf545d326046fb6a475
[ "MIT" ]
null
null
null
from twilio.rest import Client from credentials import account_sid, auth_token, my_cell, my_twilio # Find these values at https://twilio.com/user/account client = Client(account_sid, auth_token) my_msg = "Hi this is kabir" message = client.messages.create(to=my_cell, from_=my_twilio, ...
30.727273
67
0.704142
from twilio.rest import Client from credentials import account_sid, auth_token, my_cell, my_twilio client = Client(account_sid, auth_token) my_msg = "Hi this is kabir" message = client.messages.create(to=my_cell, from_=my_twilio, body=my_msg)
true
true
f7238f02f65543d61ec937f28f164450253dfca2
25,530
py
Python
mmseg/models/backbones/resnet.py
AIVIS-inc/mmsegmentation
7d305d76f1ac7c96606d3ae7cf59d37a816d28e0
[ "Apache-2.0" ]
12
2021-08-31T17:20:18.000Z
2022-03-10T20:58:59.000Z
mmseg/models/backbones/resnet.py
Junjun2016/LiteHRNet
e2b13de52e970215be566067cab7bd880010f062
[ "Apache-2.0" ]
null
null
null
mmseg/models/backbones/resnet.py
Junjun2016/LiteHRNet
e2b13de52e970215be566067cab7bd880010f062
[ "Apache-2.0" ]
1
2021-09-12T03:14:22.000Z
2021-09-12T03:14:22.000Z
import warnings import torch.nn as nn import torch.utils.checkpoint as cp from mmcv.cnn import build_conv_layer, build_norm_layer, build_plugin_layer from mmcv.runner import BaseModule from mmcv.utils.parrots_wrapper import _BatchNorm from ..builder import BACKBONES from ..utils import ResLayer class BasicBlock(Bas...
35.856742
79
0.549667
import warnings import torch.nn as nn import torch.utils.checkpoint as cp from mmcv.cnn import build_conv_layer, build_norm_layer, build_plugin_layer from mmcv.runner import BaseModule from mmcv.utils.parrots_wrapper import _BatchNorm from ..builder import BACKBONES from ..utils import ResLayer class BasicBlock(Bas...
true
true
f7238fad942b72cb7559f5c7ae76a3f775968a13
5,437
py
Python
test/scenarios/synapse/output/ext_default_folder/src/synapse/azext_synapse/vendored_sdks/synapse/aio/operations/_sql_pool_connection_policies_operations.py
kairu-ms/autorest.az
c3370f3d4d394e580615d8d97df05515533b035e
[ "MIT" ]
null
null
null
test/scenarios/synapse/output/ext_default_folder/src/synapse/azext_synapse/vendored_sdks/synapse/aio/operations/_sql_pool_connection_policies_operations.py
kairu-ms/autorest.az
c3370f3d4d394e580615d8d97df05515533b035e
[ "MIT" ]
null
null
null
test/scenarios/synapse/output/ext_default_folder/src/synapse/azext_synapse/vendored_sdks/synapse/aio/operations/_sql_pool_connection_policies_operations.py
kairu-ms/autorest.az
c3370f3d4d394e580615d8d97df05515533b035e
[ "MIT" ]
1
2021-03-21T03:59:29.000Z
2021-03-21T03:59:29.000Z
# 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 ...
49.427273
232
0.693397
from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport impo...
true
true
f72390583047884be266f3b829926a84f2d4d161
3,839
py
Python
problems/codejam/2020/3/pen-testing/judge.py
brunodccarvalho/competitive
4177c439174fbe749293b9da3445ce7303bd23c2
[ "MIT" ]
7
2020-10-15T22:37:10.000Z
2022-02-26T17:23:49.000Z
problems/codejam/2020/3/pen-testing/judge.py
brunodccarvalho/competitive
4177c439174fbe749293b9da3445ce7303bd23c2
[ "MIT" ]
null
null
null
problems/codejam/2020/3/pen-testing/judge.py
brunodccarvalho/competitive
4177c439174fbe749293b9da3445ce7303bd23c2
[ "MIT" ]
null
null
null
# Usage: `python testing_tool.py test_number`, where the argument test_number # is either 0 (first test set), 1 (second test set) or 2 (third test set). # This can also be run as `python3 testing_tool.py test_number`. from __future__ import print_function import sys import collections import itertools import random i...
22.582353
78
0.6559
from __future__ import print_function import sys import collections import itertools import random import math try: input = raw_input except NameError: pass NUM_CASES = [20000, 20000, 100000] N = 15 NEED_CORRECT = [10900, 12000, 63600] class Error(Exception): pass class WrongAnswer(Exception): pass ...
true
true
f72390dddd0d84854ce46859f4d24a972e0b715b
314
py
Python
bids/__init__.py
oesteban/pybids
800d15053952991c9cd4a00cf0039288d489ca12
[ "MIT" ]
null
null
null
bids/__init__.py
oesteban/pybids
800d15053952991c9cd4a00cf0039288d489ca12
[ "MIT" ]
null
null
null
bids/__init__.py
oesteban/pybids
800d15053952991c9cd4a00cf0039288d489ca12
[ "MIT" ]
null
null
null
from __future__ import absolute_import, division, print_function from .version import __version__ # noqa from .due import due, Doi __all__ = ["grabbids"] due.cite(Doi("10.1038/sdata.2016.44"), description="Brain Imaging Data Structure", tags=["reference-implementation"], path='bids')
31.4
64
0.703822
from __future__ import absolute_import, division, print_function from .version import __version__ from .due import due, Doi __all__ = ["grabbids"] due.cite(Doi("10.1038/sdata.2016.44"), description="Brain Imaging Data Structure", tags=["reference-implementation"], path='bids')
true
true
f72391302bc4de9c0cd1e5d8296951d9aa50d450
328
py
Python
tkinter/minimal - class version/main-python2.py
whitmans-max/python-examples
881a8f23f0eebc76816a0078e19951893f0daaaa
[ "MIT" ]
140
2017-02-21T22:49:04.000Z
2022-03-22T17:51:58.000Z
tkinter/minimal - class version/main-python2.py
whitmans-max/python-examples
881a8f23f0eebc76816a0078e19951893f0daaaa
[ "MIT" ]
5
2017-12-02T19:55:00.000Z
2021-09-22T23:18:39.000Z
tkinter/minimal - class version/main-python2.py
whitmans-max/python-examples
881a8f23f0eebc76816a0078e19951893f0daaaa
[ "MIT" ]
79
2017-01-25T10:53:33.000Z
2022-03-11T16:13:57.000Z
#!/usr/bin/env python import Tkinter as tk # Python 2 class App(tk.Tk): def __init__(self): tk.Tk.__init__(self) # Python 2 self.title('Main Window') self.geometry('300x300') # def run(self): # self.mainloop() #app = App() #app.run() #App().run() App().mainl...
13.666667
39
0.542683
import Tkinter as tk class App(tk.Tk): def __init__(self): tk.Tk.__init__(self) self.title('Main Window') self.geometry('300x300') App().mainloop()
true
true
f723917fb9c06445abc12f3ce329c4540d202994
24,250
py
Python
okl4_kernel/okl4_2.1.1-patch.9/tools/magpie-parsers/src/magpieparsers/cplusplus/astgen.py
CyberQueenMara/baseband-research
e1605537e10c37e161fff1a3416b908c9894f204
[ "MIT" ]
77
2018-12-31T22:12:09.000Z
2021-12-31T22:56:13.000Z
okl4_kernel/okl4_2.1.1-patch.9/tools/magpie-parsers/src/magpieparsers/cplusplus/astgen.py
CyberQueenMara/baseband-research
e1605537e10c37e161fff1a3416b908c9894f204
[ "MIT" ]
null
null
null
okl4_kernel/okl4_2.1.1-patch.9/tools/magpie-parsers/src/magpieparsers/cplusplus/astgen.py
CyberQueenMara/baseband-research
e1605537e10c37e161fff1a3416b908c9894f204
[ "MIT" ]
24
2019-01-20T15:51:52.000Z
2021-12-25T18:29:13.000Z
""" Transform the parse tree produced by parser.py to a higher-level tree using recursive descent. """ from magpieparsers.parser_common import * from magpieparsers.types.evaluator import evaluate from magpieparsers.types.infogripper import * from magpieparsers.cplusplus.normalise import normalise_type_list from astexp...
31.53446
137
0.712619
""" Transform the parse tree produced by parser.py to a higher-level tree using recursive descent. """ from magpieparsers.parser_common import * from magpieparsers.types.evaluator import evaluate from magpieparsers.types.infogripper import * from magpieparsers.cplusplus.normalise import normalise_type_list from astexp...
false
true
f723919f35f433f2ae01be4bddf4076f7c54d945
135
py
Python
tmdb/schema/tv_season.py
leandcesar/tmdb-python
a6933d4f8807b07d8f09d0cf9d45555b5a8212f7
[ "MIT" ]
null
null
null
tmdb/schema/tv_season.py
leandcesar/tmdb-python
a6933d4f8807b07d8f09d0cf9d45555b5a8212f7
[ "MIT" ]
1
2022-03-08T15:08:34.000Z
2022-03-08T15:08:34.000Z
tmdb/schema/tv_season.py
leandcesar/tmdb-python
a6933d4f8807b07d8f09d0cf9d45555b5a8212f7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from dataclasses import dataclass from typing import Optional @dataclass class Season: id: Optional[int]
15
33
0.718519
from dataclasses import dataclass from typing import Optional @dataclass class Season: id: Optional[int]
true
true
f72391e581e5477cb6c44e276c56fea7cf53fa01
479
py
Python
alipay/aop/api/response/AlipayFundJointaccountOperationApproveResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/response/AlipayFundJointaccountOperationApproveResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/response/AlipayFundJointaccountOperationApproveResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse class AlipayFundJointaccountOperationApproveResponse(AlipayResponse): def __init__(self): super(AlipayFundJointaccountOperationApproveResponse, self).__init__() def parse_res...
29.9375
119
0.797495
import json from alipay.aop.api.response.AlipayResponse import AlipayResponse class AlipayFundJointaccountOperationApproveResponse(AlipayResponse): def __init__(self): super(AlipayFundJointaccountOperationApproveResponse, self).__init__() def parse_response_content(self, response_content): ...
true
true
f7239210712c9f581702e80a31637eac0d0a7c86
19,536
py
Python
resources/usr/local/lib/python2.7/dist-packages/sklearn/cluster/bicluster/spectral.py
edawson/parliament2
2632aa3484ef64c9539c4885026b705b737f6d1e
[ "Apache-2.0" ]
null
null
null
resources/usr/local/lib/python2.7/dist-packages/sklearn/cluster/bicluster/spectral.py
edawson/parliament2
2632aa3484ef64c9539c4885026b705b737f6d1e
[ "Apache-2.0" ]
null
null
null
resources/usr/local/lib/python2.7/dist-packages/sklearn/cluster/bicluster/spectral.py
edawson/parliament2
2632aa3484ef64c9539c4885026b705b737f6d1e
[ "Apache-2.0" ]
1
2020-05-28T23:01:44.000Z
2020-05-28T23:01:44.000Z
"""Implements spectral biclustering algorithms. Authors : Kemal Eren License: BSD 3 clause """ from abc import ABCMeta, abstractmethod import numpy as np from scipy.sparse import dia_matrix from scipy.sparse import issparse from sklearn.base import BaseEstimator, BiclusterMixin from sklearn.externals import six fr...
39.466667
78
0.589373
from abc import ABCMeta, abstractmethod import numpy as np from scipy.sparse import dia_matrix from scipy.sparse import issparse from sklearn.base import BaseEstimator, BiclusterMixin from sklearn.externals import six from sklearn.utils.arpack import svds from sklearn.utils.arpack import eigsh from sklearn.cluster i...
true
true
f723921ec1c066a63898e9c7ce22f1cda00adbe2
636
py
Python
backoffice/core/migrations/0014_auto_20171121_1804.py
ParticipaPY/civic-crowdanalytics
b27aefb54a747d3155cc79f87faeb6361eb0503b
[ "MIT" ]
8
2017-11-02T17:00:18.000Z
2022-02-28T22:41:37.000Z
backoffice/core/migrations/0014_auto_20171121_1804.py
ParticipaPY/civic-crowdanalytics
b27aefb54a747d3155cc79f87faeb6361eb0503b
[ "MIT" ]
84
2017-09-04T20:28:58.000Z
2022-03-02T02:06:10.000Z
backoffice/core/migrations/0014_auto_20171121_1804.py
olivernash/collective-analytics
f494cd08841023cb667fa7dcd144b609d46a5f7b
[ "MIT" ]
1
2017-09-19T01:35:45.000Z
2017-09-19T01:35:45.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-11-21 21:04 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0013_auto_20171106_1017'), ] operations = [ migrations.AlterField( ...
24.461538
63
0.600629
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0013_auto_20171106_1017'), ] operations = [ migrations.AlterField( model_name='project', name='description', ...
true
true
f72392b30432110c4ab3003a03ed07f9f652aa23
2,820
py
Python
grouping.py
Noble-Lab/2021_asur_scaffolding
ceef5c8b897b83e9f80be35fb32f00377584798f
[ "MIT" ]
null
null
null
grouping.py
Noble-Lab/2021_asur_scaffolding
ceef5c8b897b83e9f80be35fb32f00377584798f
[ "MIT" ]
null
null
null
grouping.py
Noble-Lab/2021_asur_scaffolding
ceef5c8b897b83e9f80be35fb32f00377584798f
[ "MIT" ]
null
null
null
''' Since scaffolds are not directly stored and instead are assocaited with each contig, we must extract the total length of scaffolds in each assembly, as well as the length of any intersections. Then, we get the maximum weighted jaccard index for each reference scaffold, which is defined as the...
37.105263
81
0.654965
def count(first, second): first_contigs, first_positions = first second_contigs, second_positions = second intersection_scaffolds = {} first_scaffolds = {} second_scaffolds = {} for contig in first_contigs: contig_length = first_contigs[contig]['length'] first_scaffol...
true
true
f723939aa52182d56d21add558a5456b312bcdab
4,520
py
Python
ding/utils/time_helper.py
sailxjx/DI-engine
c6763f8e2ba885a2a02f611195a1b5f8b50bff00
[ "Apache-2.0" ]
464
2021-07-08T07:26:33.000Z
2022-03-31T12:35:16.000Z
ding/utils/time_helper.py
sailxjx/DI-engine
c6763f8e2ba885a2a02f611195a1b5f8b50bff00
[ "Apache-2.0" ]
177
2021-07-09T08:22:55.000Z
2022-03-31T07:35:22.000Z
ding/utils/time_helper.py
sailxjx/DI-engine
c6763f8e2ba885a2a02f611195a1b5f8b50bff00
[ "Apache-2.0" ]
92
2021-07-08T12:16:37.000Z
2022-03-31T09:24:41.000Z
import signal import time from typing import Any, Callable import torch from easydict import EasyDict from .time_helper_base import TimeWrapper from .time_helper_cuda import get_cuda_time_wrapper def build_time_helper(cfg: EasyDict = None, wrapper_type: str = None) -> Callable[[], 'TimeWrapper']: r""" Overvi...
26.432749
102
0.580973
import signal import time from typing import Any, Callable import torch from easydict import EasyDict from .time_helper_base import TimeWrapper from .time_helper_cuda import get_cuda_time_wrapper def build_time_helper(cfg: EasyDict = None, wrapper_type: str = None) -> Callable[[], 'TimeWrapper']: if wrapper...
true
true
f72393ae4620073561466c7e75f9bbe9747f2532
979
py
Python
connectingPipelines/coins_ld.py
Shivakoreddi/CryptoDataApplication
ad620231a0614ed6f4f587dfcfb83249d1d16689
[ "Apache-2.0" ]
8
2021-10-29T19:59:09.000Z
2022-02-04T05:48:23.000Z
connectingPipelines/coins_ld.py
Shivakoreddi/CryptoDataApplication
ad620231a0614ed6f4f587dfcfb83249d1d16689
[ "Apache-2.0" ]
null
null
null
connectingPipelines/coins_ld.py
Shivakoreddi/CryptoDataApplication
ad620231a0614ed6f4f587dfcfb83249d1d16689
[ "Apache-2.0" ]
null
null
null
from apiWrapper import coinAPI from sqlalchemy import create_engine from sqlalchemy import Table,Column,Integer,String,MetaData,ForeignKey import sqlite3 from sqlite3 import Error import pandas as pd import os def main(): path = "/CryptoDataApplication/" for filename in os.listdir(path): if filename.s...
27.971429
163
0.652707
from apiWrapper import coinAPI from sqlalchemy import create_engine from sqlalchemy import Table,Column,Integer,String,MetaData,ForeignKey import sqlite3 from sqlite3 import Error import pandas as pd import os def main(): path = "/CryptoDataApplication/" for filename in os.listdir(path): if filename.s...
true
true
f72394108b2b48963e86a1dfb5530319995e885c
4,375
py
Python
tests/test_graph.py
Nikolay-Lysenko/gpn
a59f43e90536f85f8b0051c5ce6d0497081a5a8f
[ "MIT" ]
null
null
null
tests/test_graph.py
Nikolay-Lysenko/gpn
a59f43e90536f85f8b0051c5ce6d0497081a5a8f
[ "MIT" ]
null
null
null
tests/test_graph.py
Nikolay-Lysenko/gpn
a59f43e90536f85f8b0051c5ce6d0497081a5a8f
[ "MIT" ]
null
null
null
""" Test `graph.py` module. Author: Nikolay Lysenko """ from typing import List, Tuple import pytest import tensorflow as tf import numpy as np from gpn.graph import sample_multiple_fragments @pytest.mark.parametrize( "images, corners, fragment_size, frame_size, n_channels, expected", [ ( ...
29.965753
71
0.275429
from typing import List, Tuple import pytest import tensorflow as tf import numpy as np from gpn.graph import sample_multiple_fragments @pytest.mark.parametrize( "images, corners, fragment_size, frame_size, n_channels, expected", [ ( np.array([ [ ...
true
true
f723946834788c8fb399fa68eec9db13a1571953
2,318
py
Python
cloud_virtual_machine/pipeline_stack.py
FarrOut/CloudVirtualMachine
cabd2ce877c6f1e04603439061120e1b6f6c2302
[ "MIT" ]
2
2021-12-01T13:48:36.000Z
2022-03-14T14:48:10.000Z
cloud_virtual_machine/pipeline_stack.py
FarrOut/CloudVirtualMachine
cabd2ce877c6f1e04603439061120e1b6f6c2302
[ "MIT" ]
null
null
null
cloud_virtual_machine/pipeline_stack.py
FarrOut/CloudVirtualMachine
cabd2ce877c6f1e04603439061120e1b6f6c2302
[ "MIT" ]
null
null
null
import logging import boto3 import json import aws_cdk as cdk from aws_cdk import aws_secretsmanager from aws_cdk.pipelines import CodePipeline, CodePipelineSource, ShellStep from constructs import Construct secretsmanager = boto3.client('secretsmanager') # from pipeline_stage import WorkshopPipelineStage class P...
42.145455
143
0.526747
import logging import boto3 import json import aws_cdk as cdk from aws_cdk import aws_secretsmanager from aws_cdk.pipelines import CodePipeline, CodePipelineSource, ShellStep from constructs import Construct secretsmanager = boto3.client('secretsmanager') class PipelineStack(cdk.Stack): def __init__(self, s...
true
true
f72397747880bd55bc2f3c6bce3f931203e40b4c
733
py
Python
451.Sort_Characters_By_Frequency/sol2.py
nhanitvn/leetcode
1c2ffe45cd71740b37aed7e502ffb0dcc16b5d14
[ "MIT" ]
null
null
null
451.Sort_Characters_By_Frequency/sol2.py
nhanitvn/leetcode
1c2ffe45cd71740b37aed7e502ffb0dcc16b5d14
[ "MIT" ]
null
null
null
451.Sort_Characters_By_Frequency/sol2.py
nhanitvn/leetcode
1c2ffe45cd71740b37aed7e502ffb0dcc16b5d14
[ "MIT" ]
null
null
null
class Solution(object): def frequencySort(self, s): """ :type s: str :rtype: str """ # Firstly, we count frequencies freq = {} freq_to_chars = {} result = [] for c in s: if c in freq: freq[c] += 1 else: ...
26.178571
69
0.416098
class Solution(object): def frequencySort(self, s): freq = {} freq_to_chars = {} result = [] for c in s: if c in freq: freq[c] += 1 else: freq[c] = 1 for c, f in freq.iteritems(): if f in fr...
true
true
f723987e351d46545a5ae560000c99831224a613
405
wsgi
Python
wildcard/wsgi/django.wsgi
kickstandproject/wildcard
0ef2a15d8ac6b1d37db964d0baa7e40f9f771bc9
[ "Apache-2.0" ]
2
2015-03-04T18:55:24.000Z
2021-04-20T23:27:19.000Z
wildcard/wsgi/django.wsgi
kickstandproject/wildcard
0ef2a15d8ac6b1d37db964d0baa7e40f9f771bc9
[ "Apache-2.0" ]
null
null
null
wildcard/wsgi/django.wsgi
kickstandproject/wildcard
0ef2a15d8ac6b1d37db964d0baa7e40f9f771bc9
[ "Apache-2.0" ]
null
null
null
import logging import os import sys import django.core.handlers.wsgi from django.conf import settings # Add this file path to sys.path in order to import settings sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), '../..')) os.environ['DJANGO_SETTINGS_MODULE'] = 'wildcard.settings' sys.stdout...
25.3125
86
0.767901
import logging import os import sys import django.core.handlers.wsgi from django.conf import settings sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), '../..')) os.environ['DJANGO_SETTINGS_MODULE'] = 'wildcard.settings' sys.stdout = sys.stderr DEBUG = False application = django.core.hand...
true
true
f7239887d03b6c0821d9bceb7d409c9903769595
11,028
py
Python
CSSCrypt.py
csmets/CSSCrypt
4444b9921ae82e89a9ad7955fe46f0ae887ca527
[ "MIT" ]
null
null
null
CSSCrypt.py
csmets/CSSCrypt
4444b9921ae82e89a9ad7955fe46f0ae887ca527
[ "MIT" ]
null
null
null
CSSCrypt.py
csmets/CSSCrypt
4444b9921ae82e89a9ad7955fe46f0ae887ca527
[ "MIT" ]
null
null
null
""" Clyde's Simple Shuffler Encryption @Desc This encryption algorthym is design for users to use their own keys to build a unique encrypted output. It called shuffler as it uses the inputed key to shuffle each character in the message, thus making it harder to crack. I highly advise you to not use this for p...
29.805405
81
0.554044
import re from pathlib import Path class encryption: __encodingValues = [] __pad = '' __bitSize = 0 def __init__ (self): encodingFilePath = 'key/encoding.txt' encodingFile = Path(encodingFilePath) ...
true
true
f72399689430fbb3dfe5ca368c2a9924216b6725
583
py
Python
demo_sklearn/model/model_test.py
caserwin/daily-learning-python
01fea4c5d4e86cbea2dbef8817146f018b5f1479
[ "Apache-2.0" ]
1
2019-05-04T07:27:18.000Z
2019-05-04T07:27:18.000Z
demo_sklearn/model/model_test.py
caserwin/daily-learning-python
01fea4c5d4e86cbea2dbef8817146f018b5f1479
[ "Apache-2.0" ]
null
null
null
demo_sklearn/model/model_test.py
caserwin/daily-learning-python
01fea4c5d4e86cbea2dbef8817146f018b5f1479
[ "Apache-2.0" ]
1
2018-09-20T01:49:36.000Z
2018-09-20T01:49:36.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019/5/19 下午2:08 # @Author : Erwin from common.pickle_helper import read_model import numpy as np # noinspection PyUnresolvedReferences from sklearn.neighbors import LocalOutlierFactor # noinspection PyUnresolvedReferences from sklearn.ensemble import IsolationFo...
32.388889
60
0.768439
from common.pickle_helper import read_model import numpy as np from sklearn.neighbors import LocalOutlierFactor from sklearn.ensemble import IsolationForest lof_model = read_model("./sklearn_LOF_demo1.pkl") if_model = read_model("./sklearn_IsolationForest_demo1.pkl") user_define = np.array([(2, 3), (5, 6), (2....
true
true
f72399c6f0ec17f8022360ea22ce941c355f64c2
743
py
Python
test/system/array/MOUNT_ARRAY_ALD_MOUNTED_ERROR.py
mjlee34/poseidonos
8eff75c5ba7af8090d3ff4ac51d7507b37571f9b
[ "BSD-3-Clause" ]
null
null
null
test/system/array/MOUNT_ARRAY_ALD_MOUNTED_ERROR.py
mjlee34/poseidonos
8eff75c5ba7af8090d3ff4ac51d7507b37571f9b
[ "BSD-3-Clause" ]
null
null
null
test/system/array/MOUNT_ARRAY_ALD_MOUNTED_ERROR.py
mjlee34/poseidonos
8eff75c5ba7af8090d3ff4ac51d7507b37571f9b
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 import subprocess import os import sys sys.path.append("../lib/") import json_parser import ibofos import cli import test_result import MOUNT_ARRAY_BASIC_1 def clear_result(): if os.path.exists( __file__ + ".result"): os.remove( __file__ + ".result") def set_result(detail): cod...
23.21875
74
0.679677
import subprocess import os import sys sys.path.append("../lib/") import json_parser import ibofos import cli import test_result import MOUNT_ARRAY_BASIC_1 def clear_result(): if os.path.exists( __file__ + ".result"): os.remove( __file__ + ".result") def set_result(detail): code = json_parser.get_re...
true
true
f7239a420b531e63ad6053c6b89a4028d5423d78
7,223
py
Python
qa/rpc-tests/nulldummy.py
modong/qtum
e2d7f5e7b588443ac10ac31f7af18527e54abcb5
[ "MIT" ]
2
2017-07-31T14:18:36.000Z
2021-07-19T21:35:56.000Z
qa/rpc-tests/nulldummy.py
yelongbao/qtum
e2d7f5e7b588443ac10ac31f7af18527e54abcb5
[ "MIT" ]
null
null
null
qa/rpc-tests/nulldummy.py
yelongbao/qtum
e2d7f5e7b588443ac10ac31f7af18527e54abcb5
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * from test_fra...
44.312883
149
0.674789
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * from test_framework.mininode import CTransaction, NetworkThread from test_framework.blocktools import create_coinbase, create_block, add_witness_commitment from test_framework.script import CScript from io import Bytes...
true
true
f7239b262b4d67fbcefe1216bd596169d62d9df8
8,687
py
Python
Lib/site-packages/streamlit/proto/Slider_pb2.py
AbdelrahmanG/google_nl_api
3252c1b6a24a5d763543efd15a799e97653a6cf3
[ "0BSD" ]
null
null
null
Lib/site-packages/streamlit/proto/Slider_pb2.py
AbdelrahmanG/google_nl_api
3252c1b6a24a5d763543efd15a799e97653a6cf3
[ "0BSD" ]
null
null
null
Lib/site-packages/streamlit/proto/Slider_pb2.py
AbdelrahmanG/google_nl_api
3252c1b6a24a5d763543efd15a799e97653a6cf3
[ "0BSD" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: streamlit/proto/Slider.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_databa...
43.873737
757
0.738114
from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _symbol_database.Default() DESCRIPTOR = _descriptor.FileDescriptor( name='stre...
true
true
f7239b97cd52c2880b48477424c60dd1c9d743a8
1,879
py
Python
2018/stig-runner/oscap-out.py
mbobbitt3/HPCCEA
da2f62a73cca24b30be4a27d199db14785d1f574
[ "MIT" ]
10
2019-08-12T23:00:20.000Z
2021-08-06T17:06:48.000Z
2018/stig-runner/oscap-out.py
mbobbitt3/HPCCEA
da2f62a73cca24b30be4a27d199db14785d1f574
[ "MIT" ]
5
2020-06-18T23:51:58.000Z
2021-07-28T17:50:34.000Z
2018/stig-runner/oscap-out.py
mbobbitt3/HPCCEA
da2f62a73cca24b30be4a27d199db14785d1f574
[ "MIT" ]
21
2019-06-10T21:03:03.000Z
2021-08-06T17:57:25.000Z
# script which runs the oscap command for RHEL7 # prints out one line to stdout of pass/fail/other counter # sends fail ID's to fail.txt and syslog # written by Alicja Gornicka import subprocess import sys import socket import syslog import string # runs oscap command for rhel7 test = subprocess.Popen(['/usr/bin/osca...
34.796296
325
0.671634
# written by Alicja Gornicka import subprocess import sys import socket import syslog import string # runs oscap command for rhel7 test = subprocess.Popen(['/usr/bin/oscap', 'xccdf', 'eval', '--fetch-remote-resources', '--profile', 'xccdf_org.ssgproject.content_profile_stig-rhel7-disa', '--results', 'results.xml',...
true
true
f7239bc98f0d21d39813daaf13a82d78d14ec803
1,081
py
Python
cootbx/hydrogens_button.py
dperl-sol/cctbx_project
b9e390221a2bc4fd00b9122e97c3b79c632c6664
[ "BSD-3-Clause-LBNL" ]
155
2016-11-23T12:52:16.000Z
2022-03-31T15:35:44.000Z
cootbx/hydrogens_button.py
dperl-sol/cctbx_project
b9e390221a2bc4fd00b9122e97c3b79c632c6664
[ "BSD-3-Clause-LBNL" ]
590
2016-12-10T11:31:18.000Z
2022-03-30T23:10:09.000Z
cootbx/hydrogens_button.py
dperl-sol/cctbx_project
b9e390221a2bc4fd00b9122e97c3b79c632c6664
[ "BSD-3-Clause-LBNL" ]
115
2016-11-15T08:17:28.000Z
2022-02-09T15:30:14.000Z
from __future__ import absolute_import, division, print_function class hydrogen_toggle(object): def __init__(self, separator=False): import coot # import dependency import coot_python import gtk toolbar = coot_python.main_toolbar() assert (toolbar is not None) if (separator): toolbar.in...
32.757576
64
0.716004
from __future__ import absolute_import, division, print_function class hydrogen_toggle(object): def __init__(self, separator=False): import coot import coot_python import gtk toolbar = coot_python.main_toolbar() assert (toolbar is not None) if (separator): toolbar.insert(gtk.SeparatorT...
true
true
f7239c1d08d1ef8a263efa287a2dac09fce8ae67
8,980
py
Python
src/utils/rst_lib.py
Akanni96/feng-hirst-rst-parser
973dba0156a099ba4f1ad2dc3e18ea72530c64e0
[ "BSD-2-Clause" ]
1
2021-08-19T14:01:09.000Z
2021-08-19T14:01:09.000Z
src/utils/rst_lib.py
Akanni96/feng-hirst-rst-parser
973dba0156a099ba4f1ad2dc3e18ea72530c64e0
[ "BSD-2-Clause" ]
null
null
null
src/utils/rst_lib.py
Akanni96/feng-hirst-rst-parser
973dba0156a099ba4f1ad2dc3e18ea72530c64e0
[ "BSD-2-Clause" ]
null
null
null
''' Created on 2014-01-17 @author: Vanessa Wei Feng ''' import os import fnmatch import re from operator import itemgetter from trees.parse_tree import ParseTree from nltk.tree import Tree #from nltk.draw.tree import * try: from utils.RST_Classes import * import utils.treebank_parser except Exception as e: ...
29.833887
143
0.558909
import os import fnmatch import re from operator import itemgetter from trees.parse_tree import ParseTree from nltk.tree import Tree try: from utils.RST_Classes import * import utils.treebank_parser except Exception as e: from RST_Classes import * import treebank_parser def locate(pattern, root=o...
true
true
f7239ca588b56176a6289edb12b10d6c7e38bfe1
1,252
py
Python
mmseg/datasets/pipelines/__init__.py
yunchu/mmsegmentation
404f3e0e8859991931b6a39a583de412348e98f0
[ "Apache-2.0" ]
null
null
null
mmseg/datasets/pipelines/__init__.py
yunchu/mmsegmentation
404f3e0e8859991931b6a39a583de412348e98f0
[ "Apache-2.0" ]
null
null
null
mmseg/datasets/pipelines/__init__.py
yunchu/mmsegmentation
404f3e0e8859991931b6a39a583de412348e98f0
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020-2021 The MMSegmentation Authors # SPDX-License-Identifier: Apache-2.0 # # Copyright (C) 2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 # from .compose import Compose, ProbCompose, MaskCompose from .formating import (Collect, ImageToTensor, ToDataContainer, ToTensor, ...
26.083333
77
0.641374
from .compose import Compose, ProbCompose, MaskCompose from .formating import (Collect, ImageToTensor, ToDataContainer, ToTensor, Transpose, to_tensor) from .loading import LoadAnnotations, LoadImageFromFile from .test_time_aug import MultiScaleFlipAug from .transforms import (CLAHE, Adju...
true
true
f7239ccf001f7f9fac5e2fc4cea6dff558efd55c
53,051
py
Python
qa/rpc-tests/p2p-fullblocktest.py
rhodium-tech/rhypton
04d5db1e20054e427d5f22fb9280634393fb3cd1
[ "MIT" ]
null
null
null
qa/rpc-tests/p2p-fullblocktest.py
rhodium-tech/rhypton
04d5db1e20054e427d5f22fb9280634393fb3cd1
[ "MIT" ]
null
null
null
qa/rpc-tests/p2p-fullblocktest.py
rhodium-tech/rhypton
04d5db1e20054e427d5f22fb9280634393fb3cd1
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test block processing. This reimplements tests from the bitcoinj/FullBlockTestGenerator used by the pu...
40.902853
131
0.544495
from test_framework.test_framework import ComparisonTestFramework from test_framework.util import * from test_framework.comptool import TestManager, TestInstance, RejectResult from test_framework.blocktools import * from test_framework.key import CECKey from test_framework.script import * import struct class Prev...
true
true
f7239d89f1cae0a248d550f1657075e1707e6633
7,727
py
Python
apps/asg5/common.py
zesenzip/py4web
f7fc80a64544c2f1e477e7f2f951a5efcffa053b
[ "BSD-3-Clause" ]
null
null
null
apps/asg5/common.py
zesenzip/py4web
f7fc80a64544c2f1e477e7f2f951a5efcffa053b
[ "BSD-3-Clause" ]
null
null
null
apps/asg5/common.py
zesenzip/py4web
f7fc80a64544c2f1e477e7f2f951a5efcffa053b
[ "BSD-3-Clause" ]
null
null
null
""" This file defines cache, session, and translator T object for the app These are fixtures that every app needs so probably you will not be editing this file """ import copy import os import sys import logging from py4web import Session, Cache, Translator, Flash, DAL, Field, action from py4web.utils.mailer import Mai...
35.939535
91
0.596609
import copy import os import sys import logging from py4web import Session, Cache, Translator, Flash, DAL, Field, action from py4web.utils.mailer import Mailer from py4web.utils.auth import Auth from py4web.utils.downloader import downloader from py4web.utils.tags import Tags from py4web.utils.factories import ActionFa...
true
true
f7239dcfb39f7f414e578d22472fa4ac35901f2e
1,159
py
Python
examples/create_scripts/extensions/e-analysis.py
bendichter/api-python
52e97e7642021913ae6505ab63b7cc77d2622d76
[ "BSD-3-Clause" ]
32
2015-08-21T14:14:44.000Z
2017-08-31T09:33:14.000Z
examples/create_scripts/extensions/e-analysis.py
bendichter/api-python
52e97e7642021913ae6505ab63b7cc77d2622d76
[ "BSD-3-Clause" ]
24
2015-11-18T11:17:04.000Z
2019-12-31T19:44:18.000Z
examples/create_scripts/extensions/e-analysis.py
bendichter/api-python
52e97e7642021913ae6505ab63b7cc77d2622d76
[ "BSD-3-Clause" ]
18
2015-10-07T03:04:41.000Z
2022-03-11T18:52:20.000Z
{"fs": {"aibs_ct_an": { "info": { "name": "AIBS cell types - analysis", "version": "0.9.2", "date": "May 6, 2016", "author": "Jeff Teeters, based on Allen Institute cell types DB HDF5 file", "contact": "jteeters@berkeley.edu", "description": "NWB extension for AIBS cell types data base NWB fi...
30.5
104
0.486626
{"fs": {"aibs_ct_an": { "info": { "name": "AIBS cell types - analysis", "version": "0.9.2", "date": "May 6, 2016", "author": "Jeff Teeters, based on Allen Institute cell types DB HDF5 file", "contact": "jteeters@berkeley.edu", "description": "NWB extension for AIBS cell types data base NWB fi...
true
true
f7239ec42a9b70cf3d4d5ff6a47e08b820d7b968
112
py
Python
examples/robodk/constants.py
StrayRobots/stray
ea775a3c8ec52f32305fe30417bc3152eb9b532b
[ "MIT" ]
1
2022-02-09T12:19:53.000Z
2022-02-09T12:19:53.000Z
examples/robodk/constants.py
StrayRobots/stray
ea775a3c8ec52f32305fe30417bc3152eb9b532b
[ "MIT" ]
null
null
null
examples/robodk/constants.py
StrayRobots/stray
ea775a3c8ec52f32305fe30417bc3152eb9b532b
[ "MIT" ]
null
null
null
FAR_LENGTH = 2**32 IMAGE_WIDTH = 640 IMAGE_HEIGHT = 480 FIELD_OF_VIEW = 50.0 # in degrees BELT_VELOCITY = 0.1
14
33
0.732143
FAR_LENGTH = 2**32 IMAGE_WIDTH = 640 IMAGE_HEIGHT = 480 FIELD_OF_VIEW = 50.0 BELT_VELOCITY = 0.1
true
true
f7239ffecd0ed16acaef9fc9d087691c79827057
4,446
py
Python
lambdata/helper_functions.py
doffing81/lambdata-AshleyBrooks213
9c5d4b5f49094e1b2d43f51e7e42ece2e98e3bb6
[ "MIT" ]
null
null
null
lambdata/helper_functions.py
doffing81/lambdata-AshleyBrooks213
9c5d4b5f49094e1b2d43f51e7e42ece2e98e3bb6
[ "MIT" ]
null
null
null
lambdata/helper_functions.py
doffing81/lambdata-AshleyBrooks213
9c5d4b5f49094e1b2d43f51e7e42ece2e98e3bb6
[ "MIT" ]
null
null
null
"""A collection of Data Science helper functions""" import pandas as pd import numpy as np import random def df_cleaner(df): """Clean a df of nulls""" return df.dropna() """Check to make sure that code works""" print("df_cleaner is working!") def null_count(df): """Check a dataframe for nulls and r...
25.118644
93
0.591543
import pandas as pd import numpy as np import random def df_cleaner(df): return df.dropna() print("df_cleaner is working!") def null_count(df): return df.isnull().sum().sum() print("null_count is working!") def train_test_split(df, frac): frac = round(len(df)*frac) train = df[:frac] tes...
true
true
f723a002c1e478fefd21d40fee2f0c102b845ca3
1,387
py
Python
nipype/interfaces/mrtrix/tests/test_auto_Erode.py
vferat/nipype
536c57da150d157dcb5c121af43aaeab71cdbd5f
[ "Apache-2.0" ]
null
null
null
nipype/interfaces/mrtrix/tests/test_auto_Erode.py
vferat/nipype
536c57da150d157dcb5c121af43aaeab71cdbd5f
[ "Apache-2.0" ]
2
2018-04-17T19:18:16.000Z
2020-03-04T22:05:02.000Z
nipype/interfaces/mrtrix/tests/test_auto_Erode.py
oesteban/nipype
c14f24eba1da08711bbb894e049ee858ed740096
[ "Apache-2.0" ]
null
null
null
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from __future__ import unicode_literals from ..preprocess import Erode def test_Erode_inputs(): input_map = dict( args=dict(argstr='%s', ), debug=dict( argstr='-debug', position=1, ), dilate=dict( ...
27.196078
67
0.533526
from __future__ import unicode_literals from ..preprocess import Erode def test_Erode_inputs(): input_map = dict( args=dict(argstr='%s', ), debug=dict( argstr='-debug', position=1, ), dilate=dict( argstr='-dilate', position=1, ...
true
true
f723a0333b9741dda97ec33e33286546932e175e
15,499
py
Python
src/opt/optimizer_robot.py
tianjuxue/AmorFEA
5ddf6c1c9d4489e74a207d5d63ca00af57911ab0
[ "MIT" ]
8
2020-07-20T04:12:18.000Z
2022-03-05T18:45:22.000Z
src/opt/optimizer_robot.py
tianjuxue/AmorFEA
5ddf6c1c9d4489e74a207d5d63ca00af57911ab0
[ "MIT" ]
2
2020-11-16T12:46:56.000Z
2020-12-28T02:52:18.000Z
src/opt/optimizer_robot.py
tianjuxue/AmorFEA
5ddf6c1c9d4489e74a207d5d63ca00af57911ab0
[ "MIT" ]
1
2021-03-11T16:07:29.000Z
2021-03-11T16:07:29.000Z
import numpy as np import torch import scipy.optimize as opt import time from .optimizer import Optimizer from ..ml.trainer_robot import TrainerRobot from ..ml.models import RobotNetwork, RobotSolver from .. import arguments from ..graph.visualization import scalar_field_paraview class OptimizerRobot(Optimizer): ...
37.346988
102
0.570295
import numpy as np import torch import scipy.optimize as opt import time from .optimizer import Optimizer from ..ml.trainer_robot import TrainerRobot from ..ml.models import RobotNetwork, RobotSolver from .. import arguments from ..graph.visualization import scalar_field_paraview class OptimizerRobot(Optimizer): ...
true
true
f723a076d2741f0be112d64860b4aba73727bf6a
1,659
py
Python
misc/jp2_kakadu_pillow.py
kebe/myloris
e426687d8461e8cc11f93f20b8cba610c8bacdec
[ "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
misc/jp2_kakadu_pillow.py
kebe/myloris
e426687d8461e8cc11f93f20b8cba610c8bacdec
[ "BSD-2-Clause", "BSD-3-Clause" ]
1
2019-08-04T10:50:35.000Z
2019-08-04T16:37:36.000Z
misc/jp2_kakadu_pillow.py
kebe/myloris
e426687d8461e8cc11f93f20b8cba610c8bacdec
[ "BSD-2-Clause", "BSD-3-Clause" ]
1
2019-08-04T03:19:31.000Z
2019-08-04T03:19:31.000Z
# This the basic flow for getting from a JP2 to a jpg w/ kdu_expand and Pillow # Useful for debugging the scenario independent of the server. from PIL import Image from PIL.ImageFile import Parser from os import makedirs, path, unlink import subprocess import sys KDU_EXPAND='/usr/local/bin/kdu_expand' LIB_KDU='/usr/l...
29.105263
95
0.698614
from PIL import Image from PIL.ImageFile import Parser from os import makedirs, path, unlink import subprocess import sys KDU_EXPAND='/usr/local/bin/kdu_expand' LIB_KDU='/usr/local/lib/libkdu_v72R.so' TMP='/tmp' INPUT_JP2='/home/jstroop/workspace/loris/tests/img/corrupt.jp2' OUT_JPG='/tmp/test.jpg' REDUCE=0 ' % (T...
false
true
f723a08e1f91cd45f928370e3124e0153ba343e1
7,408
py
Python
examples/rough_translated1/osgpoints.py
JaneliaSciComp/osgpyplusplus
a5ae3f69c7e9101a32d8cc95fe680dab292f75ac
[ "BSD-3-Clause" ]
17
2015-06-01T12:19:46.000Z
2022-02-12T02:37:48.000Z
examples/rough_translated1/osgpoints.py
cmbruns/osgpyplusplus
f8bfca2cf841e15f6ddb41c958f3ad0d0b9e4b75
[ "BSD-3-Clause" ]
7
2015-07-04T14:36:49.000Z
2015-07-23T18:09:49.000Z
examples/rough_translated1/osgpoints.py
cmbruns/osgpyplusplus
f8bfca2cf841e15f6ddb41c958f3ad0d0b9e4b75
[ "BSD-3-Clause" ]
7
2015-11-28T17:00:31.000Z
2020-01-08T07:00:59.000Z
#!/bin/env python # Automatically translated python version of # OpenSceneGraph example program "osgpoints" # !!! This program will need manual tuning before it will work. !!! import sys from osgpypp import osg from osgpypp import osgDB from osgpypp import osgUtil from osgpypp import osgViewer # Translated from f...
33.071429
155
0.637419
import sys from osgpypp import osg from osgpypp import osgDB from osgpypp import osgUtil from osgpypp import osgViewer class KeyboardEventHandler (osgGA.GUIEventHandler) : KeyboardEventHandler(osg.StateSet* stateset): _stateset(stateset) _poi...
false
true
f723a1646810b50d3ff12250f9cc268b8132cf39
44,316
py
Python
active_learning.py
alfrunesiq/SemanticSegmentationActiveLearning
3f953a22c8fd95828c9bd4c5ce52a53e991391e4
[ "MIT" ]
9
2019-06-14T07:29:28.000Z
2021-03-27T09:45:56.000Z
active_learning.py
alfrunesiq/SemanticSegmentationActiveLearning
3f953a22c8fd95828c9bd4c5ce52a53e991391e4
[ "MIT" ]
2
2020-08-10T10:18:21.000Z
2021-03-18T20:30:04.000Z
active_learning.py
alfrunesiq/SemanticSegmentationActiveLearning
3f953a22c8fd95828c9bd4c5ce52a53e991391e4
[ "MIT" ]
1
2020-03-07T08:37:12.000Z
2020-03-07T08:37:12.000Z
# Python standard libraries import argparse import glob import json import logging import logging.config import os import sys # Non-standard includes import numpy as np import tensorflow as tf # Maybe import tqdm show_progress = False try: import tqdm show_progress = True except ImportError: pass try: ...
44.763636
95
0.516224
import argparse import glob import json import logging import logging.config import os import sys import numpy as np import tensorflow as tf show_progress = False try: import tqdm show_progress = True except ImportError: pass try: import tkinter tkinter.Tk().withdraw() except ImportError: i...
true
true
f723a27ec3fd499b54564cfa6d995e4d8b617737
3,533
py
Python
fullwavepy/config/logging.py
kmch/FullwavePy
3c704b9b6ae2c6c585adb61e57991caf30ab240e
[ "MIT" ]
2
2020-12-24T01:02:16.000Z
2021-02-17T10:00:58.000Z
fullwavepy/config/logging.py
kmch/FullwavePy
3c704b9b6ae2c6c585adb61e57991caf30ab240e
[ "MIT" ]
null
null
null
fullwavepy/config/logging.py
kmch/FullwavePy
3c704b9b6ae2c6c585adb61e57991caf30ab240e
[ "MIT" ]
null
null
null
""" This is a configuration file for logs from FullwavePy modules. The engine is the 'logging' module which is a part of the Python's standard library. Additionally, the 'autologging' module is used as a very convienient wrapper. It allows to define a function's logger (it contains both the module's and function's ...
36.42268
82
0.546278
from sys import stdout, stderr from logging import StreamHandler, Formatter, getLogger,\ NOTSET, DEBUG, INFO, WARNING, ERROR, CRITICAL from autologging import TRACE def log_lvl(lvl): logger = getLogger() logger.setLevel(lvl) def lll(lvl): log_lvl(lvl) class LevelFilter(object): def __init__(self, leve...
true
true
f723a2b3b507d5aa59428dd4f44057f7bbe3f655
3,368
py
Python
youtube_dl/extractor/philharmoniedeparis.py
MOODesign/Youtube-videos-Download
730c0d12a06f349907481570f1f2890251f7a181
[ "Unlicense" ]
7
2017-06-29T07:00:17.000Z
2020-10-20T03:55:04.000Z
youtube_dl/extractor/philharmoniedeparis.py
MOODesign/Youtube-videos-Download
730c0d12a06f349907481570f1f2890251f7a181
[ "Unlicense" ]
1
2019-01-24T09:33:42.000Z
2019-01-24T09:33:42.000Z
youtube_dl/extractor/philharmoniedeparis.py
MOODesign/Youtube-videos-Download
730c0d12a06f349907481570f1f2890251f7a181
[ "Unlicense" ]
2
2019-01-07T19:00:54.000Z
2021-02-18T15:51:53.000Z
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import compat_str from ..utils import ( try_get, urljoin, ) class PhilharmonieDeParisIE(InfoExtractor): IE_DESC = 'Philharmonie de Paris' _VALID_URL = r'''(?x) https?:// ...
33.346535
99
0.509798
from __future__ import unicode_literals from .common import InfoExtractor from ..compat import compat_str from ..utils import ( try_get, urljoin, ) class PhilharmonieDeParisIE(InfoExtractor): IE_DESC = 'Philharmonie de Paris' _VALID_URL = r'''(?x) https?:// ...
true
true
f723a2b48a33d76ae84708a264e274a605dbf1d0
247
py
Python
ichor/profiles/serializers.py
AjithRamachandran/Ichor
7e1ba9215792e3a7a1c07e07f1117d3d429127ee
[ "MIT" ]
null
null
null
ichor/profiles/serializers.py
AjithRamachandran/Ichor
7e1ba9215792e3a7a1c07e07f1117d3d429127ee
[ "MIT" ]
null
null
null
ichor/profiles/serializers.py
AjithRamachandran/Ichor
7e1ba9215792e3a7a1c07e07f1117d3d429127ee
[ "MIT" ]
null
null
null
from rest_framework.serializers import ModelSerializer from profiles.models import Profile class ProfileSerializer(ModelSerializer): """ Serializer for Profile. """ class Meta: model = Profile exclude = ('user',)
20.583333
54
0.688259
from rest_framework.serializers import ModelSerializer from profiles.models import Profile class ProfileSerializer(ModelSerializer): class Meta: model = Profile exclude = ('user',)
true
true
f723a367cba647286e35c63cc2eba00db244a58c
1,323
py
Python
tests/modisco/test_modisco_file.py
mlweilert/bpnet
dcc9e8d805f9de774ae9dcc62c20504915be614f
[ "MIT" ]
93
2019-08-15T19:49:19.000Z
2022-03-04T08:23:44.000Z
tests/modisco/test_modisco_file.py
mlweilert/bpnet
dcc9e8d805f9de774ae9dcc62c20504915be614f
[ "MIT" ]
29
2019-08-15T15:44:44.000Z
2022-03-28T06:56:07.000Z
tests/modisco/test_modisco_file.py
mlweilert/bpnet
dcc9e8d805f9de774ae9dcc62c20504915be614f
[ "MIT" ]
24
2019-08-29T18:54:36.000Z
2022-03-23T21:04:46.000Z
"""Test ModiscoFile """ import pandas as pd from bpnet.modisco.files import ModiscoFile, ModiscoFileGroup from bpnet.modisco.core import Pattern, Seqlet def test_modisco_file(mf, contrib_file): # contrib_file required for `mf.get_ranges()` assert len(mf.patterns()) > 0 p = mf.get_pattern("metacluster_0/p...
29.4
86
0.70446
import pandas as pd from bpnet.modisco.files import ModiscoFile, ModiscoFileGroup from bpnet.modisco.core import Pattern, Seqlet def test_modisco_file(mf, contrib_file): assert len(mf.patterns()) > 0 p = mf.get_pattern("metacluster_0/pattern_0") assert isinstance(p, Pattern) assert len(mf.patte...
true
true
f723a3dd143e7cc78b748e8d9c65d4d8b984a35a
371
py
Python
tweet/migrations/0002_alter_tweet_date.py
cannibalcheeseburger/Tweet-Sentiment-Analysis
c53faa5d200ed62be8b127731bf54c4e6575db06
[ "MIT" ]
null
null
null
tweet/migrations/0002_alter_tweet_date.py
cannibalcheeseburger/Tweet-Sentiment-Analysis
c53faa5d200ed62be8b127731bf54c4e6575db06
[ "MIT" ]
null
null
null
tweet/migrations/0002_alter_tweet_date.py
cannibalcheeseburger/Tweet-Sentiment-Analysis
c53faa5d200ed62be8b127731bf54c4e6575db06
[ "MIT" ]
null
null
null
# Generated by Django 3.2.9 on 2021-11-02 04:43 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tweet', '0001_initial'), ] operations = [ migrations.AlterField( model_name='tweet', name='date', field=...
19.526316
51
0.58221
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tweet', '0001_initial'), ] operations = [ migrations.AlterField( model_name='tweet', name='date', field=models.CharField(max_length=100), ), ...
true
true
f723a3ffd6fafcd5ace0293aaf403490962ca8c7
2,941
py
Python
app/models.py
MosesOpiyo/PitchBook
39b763881b6c5a85c3e4f4d3ecf1ca18c5658f30
[ "Unlicense" ]
null
null
null
app/models.py
MosesOpiyo/PitchBook
39b763881b6c5a85c3e4f4d3ecf1ca18c5658f30
[ "Unlicense" ]
null
null
null
app/models.py
MosesOpiyo/PitchBook
39b763881b6c5a85c3e4f4d3ecf1ca18c5658f30
[ "Unlicense" ]
null
null
null
from sqlalchemy.orm import backref from werkzeug.security import generate_password_hash,check_password_hash from flask_login import UserMixin,current_user from app import db from . import login_manager @login_manager.user_loader def load_user(id): return User.query.get(id) class Pitch(db.Model): __tablename...
28.553398
79
0.6712
from sqlalchemy.orm import backref from werkzeug.security import generate_password_hash,check_password_hash from flask_login import UserMixin,current_user from app import db from . import login_manager @login_manager.user_loader def load_user(id): return User.query.get(id) class Pitch(db.Model): __tablename...
true
true
f723a519380fc18f05ede2c6042c2a5cae6b4fa6
54,000
py
Python
src/spaceone/inventory/model/applicationgateway/data.py
jean1042/plugin-azure-cloud-services
3a75a516c9a4d1e8a4962988934ead3fd40e8494
[ "Apache-2.0" ]
1
2020-12-08T11:59:54.000Z
2020-12-08T11:59:54.000Z
src/spaceone/inventory/model/applicationgateway/data.py
jean1042/plugin-azure-cloud-services
3a75a516c9a4d1e8a4962988934ead3fd40e8494
[ "Apache-2.0" ]
4
2021-01-26T10:43:37.000Z
2021-12-17T10:13:33.000Z
src/spaceone/inventory/model/applicationgateway/data.py
jean1042/plugin-azure-cloud-services
3a75a516c9a4d1e8a4962988934ead3fd40e8494
[ "Apache-2.0" ]
2
2021-01-13T03:24:05.000Z
2021-01-19T07:25:45.000Z
from schematics import Model from schematics.types import ModelType, ListType, StringType, IntType, BooleanType, NumberType, DateTimeType, \ TimestampType, UTCDateTimeType, TimedeltaType, FloatType class Tags(Model): key = StringType(serialize_when_none=False) value = StringType(serialize_when_none=False)...
54.600607
165
0.797481
from schematics import Model from schematics.types import ModelType, ListType, StringType, IntType, BooleanType, NumberType, DateTimeType, \ TimestampType, UTCDateTimeType, TimedeltaType, FloatType class Tags(Model): key = StringType(serialize_when_none=False) value = StringType(serialize_when_none=False)...
true
true
f723a6b4dc78a8fb71d104e18b609238433e4759
1,443
py
Python
b4sh/__main__.py
Sanix-Darker/b4sh
cef74d10729212bd5cb5d9cc881f75262fdca678
[ "MIT" ]
1
2020-12-08T22:25:41.000Z
2020-12-08T22:25:41.000Z
b4sh/__main__.py
Sanix-Darker/b4sh
cef74d10729212bd5cb5d9cc881f75262fdca678
[ "MIT" ]
null
null
null
b4sh/__main__.py
Sanix-Darker/b4sh
cef74d10729212bd5cb5d9cc881f75262fdca678
[ "MIT" ]
1
2020-12-08T21:17:21.000Z
2020-12-08T21:17:21.000Z
from b4sh import * from sys import argv from b4sh.utils.create import create_b4sh if __name__ == "__main__": if len(argv) > 1: print("[x] Starting b4sh...") if "-ls" in argv[1] or "--list" in argv[1]: list_all() elif '-c' in argv[1] or '--create' in argv[1]: creat...
37.973684
99
0.467775
from b4sh import * from sys import argv from b4sh.utils.create import create_b4sh if __name__ == "__main__": if len(argv) > 1: print("[x] Starting b4sh...") if "-ls" in argv[1] or "--list" in argv[1]: list_all() elif '-c' in argv[1] or '--create' in argv[1]: creat...
true
true
f723a6b5428de4c2c015ce5d4ab3106bd2ac7104
765
py
Python
faker/providers/phone_number/es_MX/__init__.py
tristanHdez18/faker
14cb25712e6efcb7bf8d9f30f404a7304722af6d
[ "MIT" ]
1
2022-02-16T23:14:19.000Z
2022-02-16T23:14:19.000Z
faker/providers/phone_number/es_MX/__init__.py
tristanHdez18/faker
14cb25712e6efcb7bf8d9f30f404a7304722af6d
[ "MIT" ]
33
2020-12-09T16:49:15.000Z
2022-01-04T22:03:10.000Z
faker/providers/phone_number/es_MX/__init__.py
tristanHdez18/faker
14cb25712e6efcb7bf8d9f30f404a7304722af6d
[ "MIT" ]
3
2022-02-07T18:18:54.000Z
2022-03-11T22:09:01.000Z
from .. import Provider as PhoneNumberProvider class Provider(PhoneNumberProvider): formats = ( "+##(#)##########", "+##(#)##########", "0##########", "0##########", "###-###-####", "(###)###-####", "1-###-###-####", "###.###.####", "###-###-...
24.677419
46
0.126797
from .. import Provider as PhoneNumberProvider class Provider(PhoneNumberProvider): formats = ( "+##(#)##########", "+##(#)##########", "0##########", "0##########", "###-###-####", "(###)###-####", "1-###-###-####", "###.###.####", "###-###-...
true
true
f723a71c101ccfdacdafab959223007df2b7e9ea
10,707
py
Python
executor/cli.py
eyJhb/python-executor
ce71441199613d94441ff31d26f8fd5d48210c6e
[ "MIT" ]
null
null
null
executor/cli.py
eyJhb/python-executor
ce71441199613d94441ff31d26f8fd5d48210c6e
[ "MIT" ]
null
null
null
executor/cli.py
eyJhb/python-executor
ce71441199613d94441ff31d26f8fd5d48210c6e
[ "MIT" ]
null
null
null
# Command line interface for the executor package. # # Author: Peter Odding <peter@peterodding.com> # Last Change: October 7, 2018 # URL: https://executor.readthedocs.io # # TODO Expose a clean way to interrupt the fudge factor of other processes. # TODO Properly document command timeout / lock-timeout / TERM-timeout /...
38.934545
93
0.653124
# TODO Find ways to improve the coverage of this module! (multiprocessing?) # Standard library modules. import getopt import logging import os import random import sys import tempfile import time # External dependencies. import coloredlogs from fasteners.process_lock import InterProcessLock from humanfriend...
true
true
f723a7e316f05dd510c09ac774ab6103a90f49f4
6,252
py
Python
libs/yowsup/yowsup/yowsup/common/http/warequest.py
akshitpradhan/TomHack
837226e7b38de1140c19bc2d478eeb9e379ed1fd
[ "MIT" ]
null
null
null
libs/yowsup/yowsup/yowsup/common/http/warequest.py
akshitpradhan/TomHack
837226e7b38de1140c19bc2d478eeb9e379ed1fd
[ "MIT" ]
null
null
null
libs/yowsup/yowsup/yowsup/common/http/warequest.py
akshitpradhan/TomHack
837226e7b38de1140c19bc2d478eeb9e379ed1fd
[ "MIT" ]
null
null
null
import urllib,sys, os, logging import hashlib from .waresponseparser import ResponseParser from yowsup.env import YowsupEnv from .httpproxy import HttpProxy if sys.version_info < (3, 0): import httplib from urllib import urlencode if sys.version_info >= (2, 7, 9): #see https://github.com/tgalal/yo...
29.490566
105
0.59453
import urllib,sys, os, logging import hashlib from .waresponseparser import ResponseParser from yowsup.env import YowsupEnv from .httpproxy import HttpProxy if sys.version_info < (3, 0): import httplib from urllib import urlencode if sys.version_info >= (2, 7, 9): import ssl ssl._...
true
true
f723a8b910c26396af2b76ef90aa5780ae4ad126
13,646
py
Python
utils/sparse_molecular_dataset.py
naveenarun/MolGAN
c304707144ec9a4870390011aa73cdc7078a0e9d
[ "MIT" ]
1
2022-01-08T13:47:02.000Z
2022-01-08T13:47:02.000Z
utils/sparse_molecular_dataset.py
shiyu-wangbyte/MolGAN
c304707144ec9a4870390011aa73cdc7078a0e9d
[ "MIT" ]
null
null
null
utils/sparse_molecular_dataset.py
shiyu-wangbyte/MolGAN
c304707144ec9a4870390011aa73cdc7078a0e9d
[ "MIT" ]
null
null
null
import pickle import numpy as np from rdkit import Chem if __name__ == '__main__': from progress_bar import ProgressBar else: from utils.progress_bar import ProgressBar from datetime import datetime class SparseMolecularDataset(): def load(self, filename, subset=1): with open(filename, 'rb') ...
41.10241
117
0.590136
import pickle import numpy as np from rdkit import Chem if __name__ == '__main__': from progress_bar import ProgressBar else: from utils.progress_bar import ProgressBar from datetime import datetime class SparseMolecularDataset(): def load(self, filename, subset=1): with open(filename, 'rb') ...
true
true
f723a8c66e2d3e4cfcb597ee5e6413d95dd99dce
4,557
py
Python
scvi/dataset/csv.py
YufengChenK/scVI-1
bf26369b0a2edd1bb16c3d90524d1e5cf0138bbb
[ "MIT" ]
1
2019-06-04T07:56:26.000Z
2019-06-04T07:56:26.000Z
scvi/dataset/csv.py
davek44/scVI
c05237c384c59f1fd783ee1f45e75d108bcabf4e
[ "MIT" ]
null
null
null
scvi/dataset/csv.py
davek44/scVI
c05237c384c59f1fd783ee1f45e75d108bcabf4e
[ "MIT" ]
null
null
null
from .dataset import GeneExpressionDataset import pandas as pd import numpy as np import os class CsvDataset(GeneExpressionDataset): r""" Loads a `.csv` file. Args: :filename: Name of the `.csv` file. :save_path: Save path of the dataset. Default: ``'data/'``. :url: Url of the remote ...
45.57
117
0.631117
from .dataset import GeneExpressionDataset import pandas as pd import numpy as np import os class CsvDataset(GeneExpressionDataset): def __init__(self, filename, save_path='data/', url=None, new_n_genes=600, subset_genes=None, compression=None, sep=',', gene_by_cell=True, labels_file=None, ...
true
true
f723a8d72374f0697752634c01e9ae24d90b88d0
4,463
py
Python
tests/test_trigger.py
Lujeni/mongoop
787222437d7de126c019cc546525cac65209ff9c
[ "BSD-3-Clause" ]
41
2015-07-23T12:47:15.000Z
2020-09-16T00:13:25.000Z
tests/test_trigger.py
yutiansut/mongoop
787222437d7de126c019cc546525cac65209ff9c
[ "BSD-3-Clause" ]
10
2015-12-28T10:30:49.000Z
2016-06-06T18:32:50.000Z
tests/test_trigger.py
yutiansut/mongoop
787222437d7de126c019cc546525cac65209ff9c
[ "BSD-3-Clause" ]
3
2015-10-18T16:30:35.000Z
2017-08-28T07:31:16.000Z
# -*- coding: utf-8 -*- import sys import pytest @pytest.fixture def base_mongoop_arguments(): return { 'mongodb_host': 'localhost', 'mongodb_port': 27017, } @pytest.fixture def base_mongoop_trigger_arguments(): return { 'name': 'pytest', 'params': {'threshold': 10}, ...
33.810606
74
0.765629
import sys import pytest @pytest.fixture def base_mongoop_arguments(): return { 'mongodb_host': 'localhost', 'mongodb_port': 27017, } @pytest.fixture def base_mongoop_trigger_arguments(): return { 'name': 'pytest', 'params': {'threshold': 10}, 'category': 'op' ...
true
true
f723aafd7aa89cd123249c2670712ff1e3b4e9cb
715
py
Python
transformer/hooks/noam_hook.py
chainer/models
33fd51dfef2ae50fd615bfa28a3d7e62e0b56c22
[ "MIT" ]
112
2018-04-18T07:13:03.000Z
2022-03-11T03:36:34.000Z
transformer/hooks/noam_hook.py
167rgc911/models
33fd51dfef2ae50fd615bfa28a3d7e62e0b56c22
[ "MIT" ]
16
2018-05-11T11:41:08.000Z
2021-04-24T03:50:54.000Z
transformer/hooks/noam_hook.py
167rgc911/models
33fd51dfef2ae50fd615bfa28a3d7e62e0b56c22
[ "MIT" ]
45
2018-04-18T07:13:06.000Z
2021-12-22T03:46:18.000Z
class NoamOptimizer: """ This Hook implements the optimization strategy presented in the "Attention is all you need" paper Section 5.3. """ timing = "pre" name = "NoamOptimizerHook" call_for_each_param = False def __init__(self, num_warmup_steps, factor, model_size): ...
29.791667
108
0.651748
class NoamOptimizer: timing = "pre" name = "NoamOptimizerHook" call_for_each_param = False def __init__(self, num_warmup_steps, factor, model_size): self.num_warmup_steps = num_warmup_steps self.factor = factor self.model_size = model_size self.iteration = 0 def ...
true
true
f723ab2cc5b45559d0f1053cc8e4fccc4be4e6b1
820
py
Python
texar/modules/policies/policy_nets_test.py
Holmeswww/Text_Infilling
f63cd24bee5c62d7dedd8fb35c4e52aee20c39f3
[ "Apache-2.0" ]
25
2019-01-03T09:15:20.000Z
2022-02-12T04:20:59.000Z
texar/modules/policies/policy_nets_test.py
Holmeswww/Text_Infilling
f63cd24bee5c62d7dedd8fb35c4e52aee20c39f3
[ "Apache-2.0" ]
4
2019-03-28T11:02:20.000Z
2022-02-15T04:57:33.000Z
texar/modules/policies/policy_nets_test.py
Holmeswww/Text_Infilling
f63cd24bee5c62d7dedd8fb35c4e52aee20c39f3
[ "Apache-2.0" ]
9
2019-01-03T02:20:37.000Z
2022-02-12T04:20:50.000Z
# """ Tests policy nets. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import tensorflow as tf from texar.modules.policies.policy_nets import CategoricalPolicyNet class CategoricalPolicyNetTest(tf.test.TestCas...
25.625
76
0.709756
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import tensorflow as tf from texar.modules.policies.policy_nets import CategoricalPolicyNet class CategoricalPolicyNetTest(tf.test.TestCase): def test_categorica...
true
true
f723ab8786fc51f0667051874a0f83750245a60c
20,572
py
Python
sources/image_colorization/datasets/quantized_colors/utils.py
tramtran2/prlab_image_colorization
3ec7f3ad60d6235c5bb232713f1b3ec5f06f4d67
[ "Apache-2.0" ]
null
null
null
sources/image_colorization/datasets/quantized_colors/utils.py
tramtran2/prlab_image_colorization
3ec7f3ad60d6235c5bb232713f1b3ec5f06f4d67
[ "Apache-2.0" ]
null
null
null
sources/image_colorization/datasets/quantized_colors/utils.py
tramtran2/prlab_image_colorization
3ec7f3ad60d6235c5bb232713f1b3ec5f06f4d67
[ "Apache-2.0" ]
null
null
null
""" Functions: def read_image(img_path, is_resize = True, width = 224, height = 224, interpolation = cv2.INTER_AREA) def cielab_color_space() def view_db_info(db_root, db_files, db_name) def compute_prior_prob(image_files, width, height, do_plot, pts_in_hull_path, prior_prob_path) def comp...
37.540146
148
0.593768
from __future__ import absolute_import, division, print_function import click, os, pandas as pd, glob, tqdm, cv2, numpy as np, sys import matplotlib.gridspec as gridspec import matplotlib.pylab as plt from matplotlib.colors import LogNorm import time from skimage import color from console_progressbar import ProgressB...
true
true
f723ac9e30e75faf4cd6dde9b90036c5374a00df
10,566
py
Python
mars/tensor/linalg/cholesky.py
HarshCasper/mars
4c12c968414d666c7a10f497bc22de90376b1932
[ "Apache-2.0" ]
2
2019-03-29T04:11:10.000Z
2020-07-08T10:19:54.000Z
mars/tensor/linalg/cholesky.py
HarshCasper/mars
4c12c968414d666c7a10f497bc22de90376b1932
[ "Apache-2.0" ]
null
null
null
mars/tensor/linalg/cholesky.py
HarshCasper/mars
4c12c968414d666c7a10f497bc22de90376b1932
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 1999-2020 Alibaba Group Holding 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-...
38.421818
111
0.565777
import numpy as np from numpy.linalg import LinAlgError from ...serialize import KeyField, BoolField from ... import opcodes as OperandDef from ...utils import check_chunks_unknown_shape from ...tiles import TilesError from ..operands import TensorHasInput, TensorOperand, TensorOperandMixin from ..data...
true
true
f723adcd52513b64e1355d73342ebd48142ef31e
6,813
py
Python
artificial_bias_experiments/noisy_prop_scores/sar_two_subject_groups/experiment_running/run_dataset.py
ML-KULeuven/KBC-as-PU-Learning
a00f606bd40ca06af0a5627e65a4582859976918
[ "Apache-2.0" ]
4
2021-12-14T16:13:47.000Z
2022-01-21T13:14:14.000Z
artificial_bias_experiments/noisy_prop_scores/sar_two_subject_groups/experiment_running/run_dataset.py
ML-KULeuven/KBC-as-PU-Learning
a00f606bd40ca06af0a5627e65a4582859976918
[ "Apache-2.0" ]
null
null
null
artificial_bias_experiments/noisy_prop_scores/sar_two_subject_groups/experiment_running/run_dataset.py
ML-KULeuven/KBC-as-PU-Learning
a00f606bd40ca06af0a5627e65a4582859976918
[ "Apache-2.0" ]
null
null
null
import os from typing import List, Tuple, Dict, Optional, Any from dask.delayed import Delayed, delayed from distributed import Client from artificial_bias_experiments.evaluation.sar_group_finding_relation_overlap import \ get_target_relation_to_filter_relation_list_map_and_create_if_non_existent from dask_utils....
43.394904
127
0.691032
import os from typing import List, Tuple, Dict, Optional, Any from dask.delayed import Delayed, delayed from distributed import Client from artificial_bias_experiments.evaluation.sar_group_finding_relation_overlap import \ get_target_relation_to_filter_relation_list_map_and_create_if_non_existent from dask_utils....
true
true
f723aeb2aeac1a32beb23fffa80507823230fb32
366
py
Python
jp.atcoder/abc068/arc079_a/8266792.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-09T03:06:25.000Z
2022-02-09T03:06:25.000Z
jp.atcoder/abc068/arc079_a/8266792.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-05T22:53:18.000Z
2022-02-09T01:29:30.000Z
jp.atcoder/abc068/arc079_a/8266792.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
null
null
null
import sys from collections import deque l = deque(sys.stdin.readlines()) n, m = (int(x) for x in l[0].split()) l.popleft() from_1, to_n = set(), set() for a, b in deque((int(x) for x in l[i].split()) for i in range(m)): if a == 1: from_1.add(b) elif b == n: to_n.add(a) print("P...
22.875
69
0.571038
import sys from collections import deque l = deque(sys.stdin.readlines()) n, m = (int(x) for x in l[0].split()) l.popleft() from_1, to_n = set(), set() for a, b in deque((int(x) for x in l[i].split()) for i in range(m)): if a == 1: from_1.add(b) elif b == n: to_n.add(a) print("P...
true
true
f723af36ad4e0a686b6bf06f93aabd8e0e1d70aa
640
py
Python
setup.py
bradfordleak/Units
585f30c60cd0958d61ebd465bb1328a459e078b2
[ "BSD-3-Clause" ]
null
null
null
setup.py
bradfordleak/Units
585f30c60cd0958d61ebd465bb1328a459e078b2
[ "BSD-3-Clause" ]
null
null
null
setup.py
bradfordleak/Units
585f30c60cd0958d61ebd465bb1328a459e078b2
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from setuptools import setup, find_packages github_url = ("https://guthub.com/bradfordleak/Units/bradfordleak/" "Units") try: with open('README.md') as f: readme = f.read() except: readme = "Please see the README.md file at {}.".format(github_url) setup( na...
24.615385
70
0.654688
from setuptools import setup, find_packages github_url = ("https://guthub.com/bradfordleak/Units/bradfordleak/" "Units") try: with open('README.md') as f: readme = f.read() except: readme = "Please see the README.md file at {}.".format(github_url) setup( name='units', version...
false
true
f723afcdd58b39429c1e28d0944d4253ee87ed6f
5,475
py
Python
objectdetection/user_interface.py
JunlinLi30/ObjectDetectionApplication
1dbd6760f54e143c5f3476fd29cb4c5646b6f3c6
[ "MIT" ]
null
null
null
objectdetection/user_interface.py
JunlinLi30/ObjectDetectionApplication
1dbd6760f54e143c5f3476fd29cb4c5646b6f3c6
[ "MIT" ]
null
null
null
objectdetection/user_interface.py
JunlinLi30/ObjectDetectionApplication
1dbd6760f54e143c5f3476fd29cb4c5646b6f3c6
[ "MIT" ]
null
null
null
import submodule.appfunction as af import tkinter.filedialog from tkinter import * import tkinter as tk import numpy as np import PIL.ImageTk import PIL.Image from PIL import * import cv2 import os class ObjectDetection_ui(tk.Tk): def __init__(self): self.window = tk.Tk() self.window.title("Objec...
40.555556
121
0.661735
import submodule.appfunction as af import tkinter.filedialog from tkinter import * import tkinter as tk import numpy as np import PIL.ImageTk import PIL.Image from PIL import * import cv2 import os class ObjectDetection_ui(tk.Tk): def __init__(self): self.window = tk.Tk() self.window.title("Objec...
true
true
f723afd8001413518d42ccf2a8cf98aeaed860c8
256
py
Python
checkov/common/version_manager.py
kylelaker/checkov
6eada26030a87f397a6bf1831827b3dc6c5dad2d
[ "Apache-2.0" ]
4,013
2019-12-09T13:16:54.000Z
2022-03-31T14:31:01.000Z
checkov/common/version_manager.py
kylelaker/checkov
6eada26030a87f397a6bf1831827b3dc6c5dad2d
[ "Apache-2.0" ]
1,258
2019-12-17T09:55:51.000Z
2022-03-31T19:17:17.000Z
checkov/common/version_manager.py
kylelaker/checkov
6eada26030a87f397a6bf1831827b3dc6c5dad2d
[ "Apache-2.0" ]
638
2019-12-19T08:57:38.000Z
2022-03-30T21:38:37.000Z
from update_checker import UpdateChecker def check_for_update(package, version): try: checker = UpdateChecker() result = checker.check(package, version) return result.available_version except: # nosec return None
23.272727
48
0.683594
from update_checker import UpdateChecker def check_for_update(package, version): try: checker = UpdateChecker() result = checker.check(package, version) return result.available_version except: return None
true
true
f723b0f4485a13205bef9f26c46a1ba70d2ed257
46,585
py
Python
electrum/util.py
mi6gan/electrum
7a6ec23b6ecfe48e28e16d2a9cd1bb255ead75c8
[ "MIT" ]
null
null
null
electrum/util.py
mi6gan/electrum
7a6ec23b6ecfe48e28e16d2a9cd1bb255ead75c8
[ "MIT" ]
null
null
null
electrum/util.py
mi6gan/electrum
7a6ec23b6ecfe48e28e16d2a9cd1bb255ead75c8
[ "MIT" ]
null
null
null
# Electrum - lightweight Bitcoin client # Copyright (C) 2011 Thomas Voegtlin # # 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 t...
32.26108
119
0.618504
import binascii import os, sys, re, json from collections import defaultdict, OrderedDict from typing import (NamedTuple, Union, TYPE_CHECKING, Tuple, Optional, Callable, Any, Sequence, Dict, Generic, TypeVar, List, Iterable) from datetime import datetime import decimal from de...
true
true
f723b19e6f28b0a672a93781a73545812f9126e2
7,613
py
Python
python/tensorflow/lib/ner/embeddings_resolver.py
hatrungduc/spark-nlp
b38260543524507e34cbcb7fa2006923091634ad
[ "Apache-2.0" ]
2,731
2017-09-25T08:26:31.000Z
2022-03-30T10:57:32.000Z
python/tensorflow/lib/ner/embeddings_resolver.py
hatrungduc/spark-nlp
b38260543524507e34cbcb7fa2006923091634ad
[ "Apache-2.0" ]
957
2017-10-03T20:47:51.000Z
2022-03-31T14:58:52.000Z
python/tensorflow/lib/ner/embeddings_resolver.py
hatrungduc/spark-nlp
b38260543524507e34cbcb7fa2006923091634ad
[ "Apache-2.0" ]
600
2017-10-08T11:35:58.000Z
2022-03-31T11:19:50.000Z
import shutil import numpy as np import plyvel import os.path import sys sys.path.append('../') from bert.modeling import * from bert.tokenization import * import json import os.path import numpy as np class TokenEmbeddings: def __init__(self, piece, is_word_start, vector): self.piece = piece self...
35.574766
111
0.590569
import shutil import numpy as np import plyvel import os.path import sys sys.path.append('../') from bert.modeling import * from bert.tokenization import * import json import os.path import numpy as np class TokenEmbeddings: def __init__(self, piece, is_word_start, vector): self.piece = piece self...
true
true
f723b1ca60f09e7b6c6efbcd402f29ce0f674af3
560
py
Python
bdm/__init__.py
algorithmic-dynamics-lab/pybdm
a46cd2129dae8322047bb7dc2f9aad982c9b8687
[ "MIT" ]
1
2019-05-10T10:04:23.000Z
2019-05-10T10:04:23.000Z
bdm/__init__.py
algorithmic-dynamics-lab/pybdm
a46cd2129dae8322047bb7dc2f9aad982c9b8687
[ "MIT" ]
null
null
null
bdm/__init__.py
algorithmic-dynamics-lab/pybdm
a46cd2129dae8322047bb7dc2f9aad982c9b8687
[ "MIT" ]
1
2019-05-10T10:04:25.000Z
2019-05-10T10:04:25.000Z
"""Approximation of algorithmic complexity by Block Decomposition Method. This package provides the :py:class:`bdm.BDM` class for computing approximated algorithmic complexity of arbitrary binary 1D and 2D arrays based on the *Block Decomposition Method* (**BDM**). The method is descibed `in this paper <https://www.md...
37.333333
78
0.783929
from .base import BDMIgnore, BDMRecursive from .algorithms import PerturbationExperiment BDM = BDMIgnore __author__ = 'AlgoDyn Development Team' __email__ = 'stalaga@protonmail.com' __version__ = '0.0.0'
true
true
f723b2b061d2c4c4046b6ac43e2de915d6e58e51
91,533
py
Python
pygsti/algorithms/germselection.py
colibri-coruscans/pyGSTi
da54f4abf668a28476030528f81afa46a1fbba33
[ "Apache-2.0" ]
null
null
null
pygsti/algorithms/germselection.py
colibri-coruscans/pyGSTi
da54f4abf668a28476030528f81afa46a1fbba33
[ "Apache-2.0" ]
null
null
null
pygsti/algorithms/germselection.py
colibri-coruscans/pyGSTi
da54f4abf668a28476030528f81afa46a1fbba33
[ "Apache-2.0" ]
null
null
null
""" Functions for selecting a complete set of germs for a GST analysis. """ #*************************************************************************************************** # Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS). # Under the terms of Contract DE-NA0003525 with NTES...
42.064798
114
0.631641
import warnings as _warnings import numpy as _np import numpy.linalg as _nla from pygsti.algorithms import grasp as _grasp from pygsti.algorithms import scoring as _scoring from pygsti import circuits as _circuits from pygsti import baseobjs as _baseobjs from pygsti.tools import mpitools as _mpit FLOATSIZE ...
true
true
f723b33ce8bf99ada316a7b4f05f6f288349975d
97
py
Python
web/handlers/__init__.py
jessiepullaro414/Toastifai
d2ad89fc4c4de3881eeaa3fa011cdedaeb37d58f
[ "MIT" ]
3
2016-10-16T02:43:53.000Z
2018-10-10T22:52:41.000Z
web/handlers/__init__.py
jessiepullaro414/Toastifai
d2ad89fc4c4de3881eeaa3fa011cdedaeb37d58f
[ "MIT" ]
null
null
null
web/handlers/__init__.py
jessiepullaro414/Toastifai
d2ad89fc4c4de3881eeaa3fa011cdedaeb37d58f
[ "MIT" ]
null
null
null
import os __all__ = [mod.split(".")[0] for mod in os.listdir("handlers") if mod != "__init__.py"]
48.5
87
0.659794
import os __all__ = [mod.split(".")[0] for mod in os.listdir("handlers") if mod != "__init__.py"]
true
true
f723b351b9c87bf7e64adf7c1a163e6a763dc043
60,986
py
Python
homeassistant/helpers/script.py
mtarjoianu/core
44e9146463ac505eb3d1c0651ad126cb25c28a54
[ "Apache-2.0" ]
null
null
null
homeassistant/helpers/script.py
mtarjoianu/core
44e9146463ac505eb3d1c0651ad126cb25c28a54
[ "Apache-2.0" ]
null
null
null
homeassistant/helpers/script.py
mtarjoianu/core
44e9146463ac505eb3d1c0651ad126cb25c28a54
[ "Apache-2.0" ]
null
null
null
"""Helpers to execute scripts.""" from __future__ import annotations import asyncio from collections.abc import Callable, Sequence from contextlib import asynccontextmanager, suppress from contextvars import ContextVar from copy import copy from datetime import datetime, timedelta from functools import partial import ...
36.150563
88
0.610812
from __future__ import annotations import asyncio from collections.abc import Callable, Sequence from contextlib import asynccontextmanager, suppress from contextvars import ContextVar from copy import copy from datetime import datetime, timedelta from functools import partial import itertools import logging from type...
true
true