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
f7f771b3debc80fb259fdf618bfb257bb5537f0e
6,112
py
Python
tests/app/organisation/test_invite_rest.py
tlwr/notifications-api
88a6b7729edb9be41ce3e7c027f1452b7b6d00d2
[ "MIT" ]
1
2021-02-26T18:31:50.000Z
2021-02-26T18:31:50.000Z
tests/app/organisation/test_invite_rest.py
tlwr/notifications-api
88a6b7729edb9be41ce3e7c027f1452b7b6d00d2
[ "MIT" ]
null
null
null
tests/app/organisation/test_invite_rest.py
tlwr/notifications-api
88a6b7729edb9be41ce3e7c027f1452b7b6d00d2
[ "MIT" ]
null
null
null
import pytest from app.models import Notification, INVITE_PENDING from tests.app.db import create_invited_org_user @pytest.mark.parametrize('platform_admin, expected_invited_by', ( (True, 'The GOV.UK Notify team'), (False, 'Test User') )) @pytest.mark.parametrize('extra_args, expected_start_of_invite_url', ...
34.145251
114
0.724967
import pytest from app.models import Notification, INVITE_PENDING from tests.app.db import create_invited_org_user @pytest.mark.parametrize('platform_admin, expected_invited_by', ( (True, 'The GOV.UK Notify team'), (False, 'Test User') )) @pytest.mark.parametrize('extra_args, expected_start_of_invite_url', ...
true
true
f7f7730ed654766fc8591a43262a3e314e7b1197
6,013
py
Python
language-modeling-master/src/nnlm-mc-drop.py
evazhang612/honygenerator
cafcf1736faba978ecaed624b949ebc1498477ee
[ "MIT" ]
1
2019-03-14T16:34:35.000Z
2019-03-14T16:34:35.000Z
language-modeling-master/src/nnlm-mc-drop.py
evazhang612/honygenerator
cafcf1736faba978ecaed624b949ebc1498477ee
[ "MIT" ]
2
2019-02-12T01:17:16.000Z
2019-02-12T01:17:20.000Z
language-modeling-master/src/nnlm-mc-drop.py
evazhang612/honygenerator
cafcf1736faba978ecaed624b949ebc1498477ee
[ "MIT" ]
null
null
null
import torchtext, random, torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import numpy as np from tqdm import tqdm global use_cuda use_cuda = torch.cuda.is_available() device = 0 if use_cuda else -1 TEXT = torchtext.data.Field() train, val, test = torchtext.datasets.L...
37.58125
156
0.612839
import torchtext, random, torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import numpy as np from tqdm import tqdm global use_cuda use_cuda = torch.cuda.is_available() device = 0 if use_cuda else -1 TEXT = torchtext.data.Field() train, val, test = torchtext.datasets.L...
true
true
f7f774d6bed93d46f1b693b9d34fe372069428f2
6,077
py
Python
exp2/exp2c.py
Haunter17/MIR_SU17
0eaefb8cab78ca896c1ed0074892c296110eb161
[ "MIT" ]
null
null
null
exp2/exp2c.py
Haunter17/MIR_SU17
0eaefb8cab78ca896c1ed0074892c296110eb161
[ "MIT" ]
5
2017-05-22T20:32:07.000Z
2017-06-02T21:06:23.000Z
exp2/exp2c.py
Haunter17/MIR_SU17
0eaefb8cab78ca896c1ed0074892c296110eb161
[ "MIT" ]
null
null
null
import numpy as np import tensorflow as tf import h5py import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt # Functions for initializing neural nets parameters def init_weight_variable(shape): initial = tf.truncated_normal(shape, stddev=0.1, dtype=tf.float32) return tf.Variable(initia...
34.333333
166
0.700675
import numpy as np import tensorflow as tf import h5py import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt def init_weight_variable(shape): initial = tf.truncated_normal(shape, stddev=0.1, dtype=tf.float32) return tf.Variable(initial) def init_bias_variable(shape): initial = tf.c...
true
true
f7f775b27adaf1cc72af5063a7e020c1711073c4
3,568
py
Python
web-server/check-server.py
valgarn/fraud-detection-framework
52ce63a41af42de541354f32a3fb4bae773f2f86
[ "Apache-2.0" ]
null
null
null
web-server/check-server.py
valgarn/fraud-detection-framework
52ce63a41af42de541354f32a3fb4bae773f2f86
[ "Apache-2.0" ]
null
null
null
web-server/check-server.py
valgarn/fraud-detection-framework
52ce63a41af42de541354f32a3fb4bae773f2f86
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 The Fraud Detection Framework Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
39.644444
161
0.54204
import os import sys import threading import time import json import logging logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) import pg import constants sys.path.append(constants.FDF_PYD_PATH) os.environ["PATH"] += ";" + constants.FDF_PYD_PATH import fdf ...
true
true
f7f776ca8bdbe9b7bcd89a66ae42b9de6fc38491
10,706
py
Python
testrunner.py
wradlib/wradlib-old
55b1687adafd4d0d8c301d6c6e52914df5844748
[ "MIT" ]
null
null
null
testrunner.py
wradlib/wradlib-old
55b1687adafd4d0d8c301d6c6e52914df5844748
[ "MIT" ]
null
null
null
testrunner.py
wradlib/wradlib-old
55b1687adafd4d0d8c301d6c6e52914df5844748
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: UTF-8 -*- # Copyright (c) 2017, wradlib developers. # Distributed under the MIT License. See LICENSE.txt for more info. import sys import os import io import getopt import unittest import doctest import inspect from multiprocessing import Process, Queue import nbformat from nbconver...
29.905028
79
0.558752
import sys import os import io import getopt import unittest import doctest import inspect from multiprocessing import Process, Queue import nbformat from nbconvert.preprocessors import ExecutePreprocessor from nbconvert.preprocessors.execute import CellExecutionError import coverage VERBOSE = 2 def create_exam...
true
true
f7f77732429e2d576a7ce999b4f86a8fe4d1d29c
2,457
py
Python
utils.py
michellesima/transformers
327b32277d882e13b104dd8502a83a8668ea84e9
[ "Apache-2.0" ]
1
2020-04-16T18:31:04.000Z
2020-04-16T18:31:04.000Z
utils.py
michellesima/transformers
327b32277d882e13b104dd8502a83a8668ea84e9
[ "Apache-2.0" ]
null
null
null
utils.py
michellesima/transformers
327b32277d882e13b104dd8502a83a8668ea84e9
[ "Apache-2.0" ]
null
null
null
import pandas as pd from nltk.stem import WordNetLemmatizer from transformers import * def repeatN(list, n): ori = list for _ in range(n): list = list.append(ori, ignore_index=True) return list def agen_verbs(): ''' for word in each category, get its infinitive form if it's in...
29.25
81
0.600326
import pandas as pd from nltk.stem import WordNetLemmatizer from transformers import * def repeatN(list, n): ori = list for _ in range(n): list = list.append(ori, ignore_index=True) return list def agen_verbs(): df = pd.read_csv('~/resources/lexica/CONNOTATION/agency_verb.csv') ...
true
true
f7f7778c7ed11670ebf154abc1c2b4ab8604eef1
140
py
Python
tests/test_curlies_in_attrs_2.py
gvanrossum/pyxl3
e6588c12caee49c43faf6aa260f04d7e971f6aa8
[ "Apache-2.0" ]
150
2016-01-26T13:25:58.000Z
2022-03-11T14:31:45.000Z
tests/test_curlies_in_attrs_2.py
gvanrossum/pyxl3
e6588c12caee49c43faf6aa260f04d7e971f6aa8
[ "Apache-2.0" ]
7
2016-02-07T20:08:55.000Z
2019-07-09T03:35:49.000Z
tests/test_curlies_in_attrs_2.py
gvanrossum/pyxl3
e6588c12caee49c43faf6aa260f04d7e971f6aa8
[ "Apache-2.0" ]
19
2016-01-27T15:48:48.000Z
2020-11-06T07:31:12.000Z
# coding: pyxl from pyxl import html def test(): assert str(<frag><img src="barbaz{'foo'}" /></frag>) == """<img src="barbazfoo" />"""
23.333333
89
0.585714
from pyxl import html def test(): assert str(<frag><img src="barbaz{'foo'}" /></frag>) == """<img src="barbazfoo" />"""
false
true
f7f777cd6a9aa7ea00c135dad164c778f1d722f3
5,695
py
Python
debian/elevator/usr/lib/python2.7/dist-packages/elevator/utils/daemon.py
oleiade/Elevator
85fd72d8eb8b524140b8aefef216e00972dcecaa
[ "MIT" ]
10
2015-04-08T09:46:24.000Z
2021-08-01T08:42:39.000Z
debian/elevator/usr/lib/python2.7/dist-packages/elevator/utils/daemon.py
oleiade/Elevator
85fd72d8eb8b524140b8aefef216e00972dcecaa
[ "MIT" ]
null
null
null
debian/elevator/usr/lib/python2.7/dist-packages/elevator/utils/daemon.py
oleiade/Elevator
85fd72d8eb8b524140b8aefef216e00972dcecaa
[ "MIT" ]
4
2015-04-29T07:22:31.000Z
2018-04-19T02:29:10.000Z
""" *** Modified generic daemon class *** Author: http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/ www.boxedice.com License: http://creativecommons.org/licenses/by-sa/3.0/ Changes: 23rd Jan 2009 (David Mytton <david@boxedice.com>) ...
29.973684
124
0.53029
""" *** Modified generic daemon class *** Author: http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/ www.boxedice.com License: http://creativecommons.org/licenses/by-sa/3.0/ Changes: 23rd Jan 2009 (David Mytton <david@boxedice.com>) ...
false
true
f7f778a98d1c15226615010916f46f9bd5a23a69
378
py
Python
data/migrations/0002_auto_20190819_0731.py
bernardobgam/edtech_experiment
88a64b925b6692261649418260a0bdf7b4a5a9d1
[ "MIT" ]
null
null
null
data/migrations/0002_auto_20190819_0731.py
bernardobgam/edtech_experiment
88a64b925b6692261649418260a0bdf7b4a5a9d1
[ "MIT" ]
8
2020-06-05T23:56:56.000Z
2022-03-12T00:02:52.000Z
data/migrations/0002_auto_20190819_0731.py
bernardobgam/edtech_experiment
88a64b925b6692261649418260a0bdf7b4a5a9d1
[ "MIT" ]
null
null
null
# Generated by Django 2.1.1 on 2019-08-18 21:31 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('data', '0001_initial'), ] operations = [ migrations.AlterField( model_name='quizdata', name='seconds_taken', ...
19.894737
47
0.589947
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('data', '0001_initial'), ] operations = [ migrations.AlterField( model_name='quizdata', name='seconds_taken', field=models.FloatField(null=True), ...
true
true
f7f778c5f1399d369a962531326c4d2119ff39a2
900
py
Python
corehq/apps/accounting/migrations/0025_auto_20180508_1952.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
471
2015-01-10T02:55:01.000Z
2022-03-29T18:07:18.000Z
corehq/apps/accounting/migrations/0025_auto_20180508_1952.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
14,354
2015-01-01T07:38:23.000Z
2022-03-31T20:55:14.000Z
corehq/apps/accounting/migrations/0025_auto_20180508_1952.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
175
2015-01-06T07:16:47.000Z
2022-03-29T13:27:01.000Z
# Generated by Django 1.11.13 on 2018-05-08 19:52 import django.contrib.postgres.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounting', '0024_unique__transaction_id'), ] operations = [ migrations.AddField( model...
33.333333
105
0.576667
import django.contrib.postgres.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounting', '0024_unique__transaction_id'), ] operations = [ migrations.AddField( model_name='billingrecord', name='emailed_...
true
true
f7f778e2dc5aa3f8e7c5c488f4ecf23263dc9652
13,625
py
Python
run_2.py
gormlabenz/People-Counting-in-Real-Time
d9bdfc1d428e249aa1d86b355a2aa67b5199ae2a
[ "MIT" ]
null
null
null
run_2.py
gormlabenz/People-Counting-in-Real-Time
d9bdfc1d428e249aa1d86b355a2aa67b5199ae2a
[ "MIT" ]
null
null
null
run_2.py
gormlabenz/People-Counting-in-Real-Time
d9bdfc1d428e249aa1d86b355a2aa67b5199ae2a
[ "MIT" ]
null
null
null
import argparse import csv import datetime import logging import time from itertools import zip_longest import cv2 import dlib import imutils import numpy as np import schedule from imutils.video import FPS, VideoStream from PIL import Image from mylib import config, epd4in2, thread from mylib.centroidtracker import ...
39.152299
111
0.551633
import argparse import csv import datetime import logging import time from itertools import zip_longest import cv2 import dlib import imutils import numpy as np import schedule from imutils.video import FPS, VideoStream from PIL import Image from mylib import config, epd4in2, thread from mylib.centroidtracker import ...
true
true
f7f77937db9d241920ff84ea180aef7fdbb14361
30,354
py
Python
fairseq/sequence_generator.py
yingwaner/C-MNMT
3a87f75302efc859139af72483f480a1cac86f25
[ "MIT" ]
null
null
null
fairseq/sequence_generator.py
yingwaner/C-MNMT
3a87f75302efc859139af72483f480a1cac86f25
[ "MIT" ]
null
null
null
fairseq/sequence_generator.py
yingwaner/C-MNMT
3a87f75302efc859139af72483f480a1cac86f25
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import math import torch from fairseq import search, utils from fairseq.data import data_utils from fairseq.models import FairseqIncremental...
42.393855
118
0.580187
import math import torch from fairseq import search, utils from fairseq.data import data_utils from fairseq.models import FairseqIncrementalDecoder class SequenceGenerator(object): def __init__( self, tgt_dict, beam_size=1, max_len_a=0, max_len_b=200, min_len...
true
true
f7f7794cc06448e6a39672f0c079219c7d63c3ed
220
py
Python
Speeking/app.py
luizpavanello/python_courses
274daa7ba70a7e2d06b3edbeda1161ce08526665
[ "MIT" ]
null
null
null
Speeking/app.py
luizpavanello/python_courses
274daa7ba70a7e2d06b3edbeda1161ce08526665
[ "MIT" ]
null
null
null
Speeking/app.py
luizpavanello/python_courses
274daa7ba70a7e2d06b3edbeda1161ce08526665
[ "MIT" ]
null
null
null
import gtts from playsound import playsound with open('frase.txt', 'r') as arquivo: for linha in arquivo: frase = gtts.gTTS(linha,lang='pt-br') frase.save('frase.mp3') playsound('frase.mp3')
24.444444
45
0.640909
import gtts from playsound import playsound with open('frase.txt', 'r') as arquivo: for linha in arquivo: frase = gtts.gTTS(linha,lang='pt-br') frase.save('frase.mp3') playsound('frase.mp3')
true
true
f7f77a5c4df1ebd0c6a7032915e41ced71637ee7
2,410
py
Python
HSFL_LNN/middlewares.py
SundownEffect/HSFL_LatestNewsNotification
fe15b96b0e97df3d3acc022677efda06ae7e5fee
[ "MIT" ]
1
2020-07-22T11:23:23.000Z
2020-07-22T11:23:23.000Z
HSFL_LNN/middlewares.py
OtterWhisperer/HSFL_LatestNewsNotification
fe15b96b0e97df3d3acc022677efda06ae7e5fee
[ "MIT" ]
5
2020-06-18T12:10:12.000Z
2020-06-18T15:38:17.000Z
HSFL_LNN/middlewares.py
SundownEffect/HSFL_LatestNewsNotification
fe15b96b0e97df3d3acc022677efda06ae7e5fee
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Define here the models for your spider middleware # # See documentation in: # http://doc.scrapy.org/en/latest/topics/spider-middleware.html from scrapy import signals # NTLM Auth #from scrapy.http import Response #import requests ...
33.472222
78
0.648133
from scrapy import signals class HSFL_LNN_SpiderMiddleware(object): @classmethod def from_crawler(cls, crawler): s = cls() crawler.signals.connect(s.spider_opened, signal=signals.spider_opened) return s def process_spider_input(response, spider...
true
true
f7f77a61dfed88f3787d0d945c6a76bd2e8fa3fe
4,392
py
Python
create_training_joblib.py
sct-pipeline/contrast-agnostic-softseg-spinalcord
4d3429f311c2c4787c63c290acf3cafa0a4e15bf
[ "MIT" ]
null
null
null
create_training_joblib.py
sct-pipeline/contrast-agnostic-softseg-spinalcord
4d3429f311c2c4787c63c290acf3cafa0a4e15bf
[ "MIT" ]
13
2021-01-24T23:03:42.000Z
2021-11-12T15:58:32.000Z
create_training_joblib.py
sct-pipeline/contrast-agnostic-softseg-spinalcord
4d3429f311c2c4787c63c290acf3cafa0a4e15bf
[ "MIT" ]
2
2021-05-21T21:04:00.000Z
2022-03-02T18:55:56.000Z
import pandas as pd import joblib import numpy as np import argparse import os # Inputs: # --sct_train_file: Pickle file that was holds the a list of the dataset used for training. # Can be downloaded at: https://github.com/sct-data/deepseg_sc_models # train_valid_test column: 1 fo...
43.485149
121
0.68602
import pandas as pd import joblib import numpy as np import argparse import os def create_new_joblib(dataset_sct_file, input_bids_folders, outputFolder): d.read_table(os.path.join(input_bids_folders[0], 'participants.tsv'), encoding="ISO-8859-1") df_merged = df_merged.astype(str) ...
true
true
f7f77ac97cc3d5b692c304afcef650d3c48ec431
31,800
py
Python
pygments/lexers/matlab.py
mariushegele/pygments
bc4168d3ce89ae56b50c53d76e7ed50793873698
[ "BSD-2-Clause" ]
null
null
null
pygments/lexers/matlab.py
mariushegele/pygments
bc4168d3ce89ae56b50c53d76e7ed50793873698
[ "BSD-2-Clause" ]
1
2019-03-08T20:01:19.000Z
2019-03-08T20:01:19.000Z
pygments/lexers/matlab.py
mariushegele/pygments
bc4168d3ce89ae56b50c53d76e7ed50793873698
[ "BSD-2-Clause" ]
1
2019-03-08T19:44:02.000Z
2019-03-08T19:44:02.000Z
# -*- coding: utf-8 -*- """ pygments.lexers.matlab ~~~~~~~~~~~~~~~~~~~~~~ Lexers for Matlab and related languages. :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import Lexer, RegexLexer, bygroups, word...
44.351464
140
0.508994
import re from pygments.lexer import Lexer, RegexLexer, bygroups, words, do_insertions from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ Number, Punctuation, Generic, Whitespace from pygments.lexers import _scilab_builtins __all__ = ['MatlabLexer', 'MatlabSessionLexer', 'OctaveLexer'...
true
true
f7f77ae55ab8be22237200accfcee46e0087aff2
1,041
py
Python
inbm/integration-reloaded/scripts/create_signature.py
ahameedx/intel-inb-manageability
aca445fa4cef0b608e6e88e74476547e10c06073
[ "Apache-2.0" ]
5
2021-12-13T21:19:31.000Z
2022-01-18T18:29:43.000Z
inbm/integration-reloaded/scripts/create_signature.py
ahameedx/intel-inb-manageability
aca445fa4cef0b608e6e88e74476547e10c06073
[ "Apache-2.0" ]
45
2021-12-30T17:21:09.000Z
2022-03-29T22:47:32.000Z
inbm/integration-reloaded/scripts/create_signature.py
ahameedx/intel-inb-manageability
aca445fa4cef0b608e6e88e74476547e10c06073
[ "Apache-2.0" ]
4
2022-01-26T17:42:54.000Z
2022-03-30T04:48:04.000Z
import hashlib import sys from binascii import hexlify from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import padding from cryptography.hazmat.primitives.serialization import load_pem_private_key file_name = pack...
35.896552
152
0.756004
import hashlib import sys from binascii import hexlify from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import padding from cryptography.hazmat.primitives.serialization import load_pem_private_key file_name = pack...
true
true
f7f77b997c2074d396407ce6a7f24cdb9a3fd2d3
5,070
py
Python
torchvision/datasets/oxford_iiit_pet.py
yoshitomo-matsubara/vision
03d11338f3faf94a0749549912593ddb8b70be17
[ "BSD-3-Clause" ]
null
null
null
torchvision/datasets/oxford_iiit_pet.py
yoshitomo-matsubara/vision
03d11338f3faf94a0749549912593ddb8b70be17
[ "BSD-3-Clause" ]
null
null
null
torchvision/datasets/oxford_iiit_pet.py
yoshitomo-matsubara/vision
03d11338f3faf94a0749549912593ddb8b70be17
[ "BSD-3-Clause" ]
null
null
null
import os import os.path import pathlib from typing import Any, Callable, Optional, Union, Tuple from typing import Sequence from PIL import Image from .utils import download_and_extract_archive, verify_str_arg from .vision import VisionDataset class OxfordIIITPet(VisionDataset): """`Oxford-IIIT Pet Dataset <...
39.92126
120
0.623866
import os import os.path import pathlib from typing import Any, Callable, Optional, Union, Tuple from typing import Sequence from PIL import Image from .utils import download_and_extract_archive, verify_str_arg from .vision import VisionDataset class OxfordIIITPet(VisionDataset): _RESOURCES = ( ("https...
true
true
f7f77baecb04936cf10d98ef3ad04894d39dc1e4
559
py
Python
nz_django/day8/djang_drf_demo/front/migrations/0002_game.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
null
null
null
nz_django/day8/djang_drf_demo/front/migrations/0002_game.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
27
2020-02-12T07:55:58.000Z
2022-03-12T00:19:09.000Z
nz_django/day8/djang_drf_demo/front/migrations/0002_game.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
2
2020-02-18T01:54:55.000Z
2020-02-21T11:36:28.000Z
# Generated by Django 2.0 on 2020-02-28 07:49 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('front', '0001_initial'), ] operations = [ migrations.CreateModel( name='Game', fields=[ ('id', models....
25.409091
114
0.563506
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('front', '0001_initial'), ] operations = [ migrations.CreateModel( name='Game', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True...
true
true
f7f77c392c9ec80b57c867128fb0176dd812752e
21,690
py
Python
setup.py
JanSchulz/pandas
6e8ce685eb5a4bd0b39665a3a0d7ddd627ea8ed0
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
setup.py
JanSchulz/pandas
6e8ce685eb5a4bd0b39665a3a0d7ddd627ea8ed0
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
setup.py
JanSchulz/pandas
6e8ce685eb5a4bd0b39665a3a0d7ddd627ea8ed0
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python """ Parts of this file were taken from the pyzmq project (https://github.com/zeromq/pyzmq) which have been permitted for use under the BSD license. Parts are from lxml (https://github.com/lxml/lxml) """ import os import sys import shutil import warnings import re # may need to work around setup...
34.983871
97
0.570447
import os import sys import shutil import warnings import re try: import Cython sys.path.insert(0, os.path.join(os.path.dirname(__file__), "fake_pyrex")) except ImportError: pass try: import pkg_resources try: pkg_resources.require("setuptools>=0.6c5") except pkg_resources.Version...
true
true
f7f77eb039de355d8757c0ebf27520ca8ce894b5
1,611
py
Python
npactflask/bin/cleanup.py
NProfileAnalysisComputationalTool/npact
d4495f5cba2a936f2be2f2c821edd5429d1a58da
[ "BSD-3-Clause" ]
2
2015-09-18T02:01:19.000Z
2021-09-03T18:40:59.000Z
npactflask/bin/cleanup.py
NProfileAnalysisComputationalTool/npact
d4495f5cba2a936f2be2f2c821edd5429d1a58da
[ "BSD-3-Clause" ]
null
null
null
npactflask/bin/cleanup.py
NProfileAnalysisComputationalTool/npact
d4495f5cba2a936f2be2f2c821edd5429d1a58da
[ "BSD-3-Clause" ]
1
2015-09-25T18:58:21.000Z
2015-09-25T18:58:21.000Z
#!/usr/bin/env python """This script scans for apparently unused files in the upload path and deletes them. 'unused files' are considered to be ones for which the atime is older than 14 days (see ATIME_DEFAULT) """ import logging import sys from optparse import OptionParser logger = logging.getLogger('cleanup') if...
29.833333
79
0.633147
import logging import sys from optparse import OptionParser logger = logging.getLogger('cleanup') if __name__ == '__main__': from npactflask import app, cleanup parser = OptionParser("""usage: %prog [options] This script scans for apparently unused files in the upload path. 'unused files' are co...
true
true
f7f77eff8efdfdd454b5bb13512b1a20955a8f7c
2,082
py
Python
detools/data_format/__init__.py
advmach/detools
2b7b98bb8e5eb1232d15cb1731fe72f8954a2d09
[ "BSD-2-Clause" ]
119
2019-02-23T07:48:11.000Z
2022-03-23T20:45:51.000Z
detools/data_format/__init__.py
advmach/detools
2b7b98bb8e5eb1232d15cb1731fe72f8954a2d09
[ "BSD-2-Clause" ]
6
2020-01-27T11:15:32.000Z
2021-09-15T17:58:34.000Z
detools/data_format/__init__.py
advmach/detools
2b7b98bb8e5eb1232d15cb1731fe72f8954a2d09
[ "BSD-2-Clause" ]
10
2019-04-23T17:28:48.000Z
2022-02-14T05:35:31.000Z
from collections import defaultdict from operator import itemgetter from elftools.elf.elffile import ELFFile from elftools.elf.sections import SymbolTableSection from ..errors import Error from ..common import DATA_FORMAT_AARCH64 from ..common import DATA_FORMAT_ARM_CORTEX_M4 from ..common import DATA_FORMAT_XTENSA_L...
33.047619
73
0.741114
from collections import defaultdict from operator import itemgetter from elftools.elf.elffile import ELFFile from elftools.elf.sections import SymbolTableSection from ..errors import Error from ..common import DATA_FORMAT_AARCH64 from ..common import DATA_FORMAT_ARM_CORTEX_M4 from ..common import DATA_FORMAT_XTENSA_L...
true
true
f7f77f25311a643b4b4da1c44a6a6e0278c8e1e2
26,661
py
Python
diskord/iterators.py
Hype3808/diskord
46162537152866d28eb85cd4bc3b69d5213adf5a
[ "MIT" ]
30
2021-09-16T10:14:06.000Z
2022-02-28T07:25:48.000Z
diskord/iterators.py
Hype3808/diskord
46162537152866d28eb85cd4bc3b69d5213adf5a
[ "MIT" ]
25
2021-10-01T10:45:34.000Z
2022-02-11T01:21:26.000Z
diskord/iterators.py
Hype3808/diskord
46162537152866d28eb85cd4bc3b69d5213adf5a
[ "MIT" ]
14
2021-10-02T17:16:53.000Z
2022-02-19T17:28:46.000Z
""" The MIT License (MIT) Copyright (c) 2015-present Rapptz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merg...
33.243142
97
0.598252
from __future__ import annotations import asyncio import datetime from typing import ( Awaitable, TYPE_CHECKING, TypeVar, Optional, Any, Callable, Union, List, AsyncIterator, ) from .errors import NoMoreItems from .utils import snowflake_time, time_snowflake, maybe_coroutine from ...
true
true
f7f77fca299a63711a2471a1af8ccb1d590016c5
774
py
Python
estimator/migrations/0003_auto_20200405_0028.py
barrezuetai/CostEstimator
991f797e7e35f63e4e207cfbc134999a83d19682
[ "MIT" ]
null
null
null
estimator/migrations/0003_auto_20200405_0028.py
barrezuetai/CostEstimator
991f797e7e35f63e4e207cfbc134999a83d19682
[ "MIT" ]
7
2020-02-20T03:57:11.000Z
2021-09-22T18:38:44.000Z
estimator/migrations/0003_auto_20200405_0028.py
barrezuetai/CostEstimator
991f797e7e35f63e4e207cfbc134999a83d19682
[ "MIT" ]
null
null
null
# Generated by Django 3.0.5 on 2020-04-05 00:28 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('estimator', '0002_auto_20200404_2207'), ] operations = [ migrations.AlterField( model_name='hospital', name='additio...
26.689655
61
0.594315
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('estimator', '0002_auto_20200404_2207'), ] operations = [ migrations.AlterField( model_name='hospital', name='additions_to_revenue', field=models.Intege...
true
true
f7f77fefbd8764a8d4b4d545241c85e4537d35fb
5,648
py
Python
CybORG/CybORG/Agents/ComplexAgents/utilities/data_structures/Action_Balanced_Replay_Buffer.py
rafvasq/cage-challenge-1
95affdfa38afc1124f1a1a09c92fbc0ed5b96318
[ "MIT" ]
4,461
2019-01-13T02:06:25.000Z
2022-03-31T11:50:11.000Z
CybORG/CybORG/Agents/ComplexAgents/utilities/data_structures/Action_Balanced_Replay_Buffer.py
rafvasq/cage-challenge-1
95affdfa38afc1124f1a1a09c92fbc0ed5b96318
[ "MIT" ]
66
2019-01-17T10:36:21.000Z
2022-02-22T21:29:30.000Z
CybORG/CybORG/Agents/ComplexAgents/utilities/data_structures/Action_Balanced_Replay_Buffer.py
rafvasq/cage-challenge-1
95affdfa38afc1124f1a1a09c92fbc0ed5b96318
[ "MIT" ]
1,051
2019-01-13T17:30:49.000Z
2022-03-31T03:33:00.000Z
import random from collections import namedtuple, deque import torch import numpy as np from .Replay_Buffer import Replay_Buffer class Action_Balanced_Replay_Buffer(Replay_Buffer): """Replay buffer that provides sample of experiences that have an equal number of each action being conducted""" def __init__(self...
53.790476
143
0.688385
import random from collections import namedtuple, deque import torch import numpy as np from .Replay_Buffer import Replay_Buffer class Action_Balanced_Replay_Buffer(Replay_Buffer): def __init__(self, buffer_size, batch_size, seed, num_actions): self.num_actions = num_actions self.buffer_size_per_me...
true
true
f7f780de9ba006adef1c95f0551abc73ee5602b5
1,604
py
Python
qwerty.py
telegrambotdev/Polyglot
b6f6a89905dd63ed26b4bc9f08f5a63402278089
[ "MIT" ]
null
null
null
qwerty.py
telegrambotdev/Polyglot
b6f6a89905dd63ed26b4bc9f08f5a63402278089
[ "MIT" ]
null
null
null
qwerty.py
telegrambotdev/Polyglot
b6f6a89905dd63ed26b4bc9f08f5a63402278089
[ "MIT" ]
null
null
null
import traceback import logger import utils from googletrans import LANGUAGES def qwerty_main(message): text = utils.textparser(message) if text is None: logger.write_log("none", message) return logger.write_log(text, message) arg1, arg2 = utils.extract_arg(message....
36.454545
111
0.607855
import traceback import logger import utils from googletrans import LANGUAGES def qwerty_main(message): text = utils.textparser(message) if text is None: logger.write_log("none", message) return logger.write_log(text, message) arg1, arg2 = utils.extract_arg(message....
true
true
f7f7815ad2f6e822348a8f017669ba8ff3728d0d
558
py
Python
authentik/outposts/migrations/0012_service_connection_non_unique.py
BeryJu/passbook
350f0d836580f4411524614f361a76c4f27b8a2d
[ "MIT" ]
15
2020-01-05T09:09:57.000Z
2020-11-28T05:27:39.000Z
authentik/outposts/migrations/0012_service_connection_non_unique.py
BeryJu/passbook
350f0d836580f4411524614f361a76c4f27b8a2d
[ "MIT" ]
302
2020-01-21T08:03:59.000Z
2020-12-04T05:04:57.000Z
authentik/outposts/migrations/0012_service_connection_non_unique.py
BeryJu/passbook
350f0d836580f4411524614f361a76c4f27b8a2d
[ "MIT" ]
3
2020-03-04T08:21:59.000Z
2020-08-01T20:37:18.000Z
# Generated by Django 3.1.3 on 2020-11-18 21:54 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("authentik_outposts", "0011_docker_tls_auth"), ] operations = [ migrations.AlterField( model_name="outpostserviceconnection", ...
25.363636
112
0.607527
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("authentik_outposts", "0011_docker_tls_auth"), ] operations = [ migrations.AlterField( model_name="outpostserviceconnection", name="local", field=models...
true
true
f7f781e0fa83526164ac63731be48eae1641c691
4,781
py
Python
2015/23_OpeningtheTuringLock/computer.py
deanearlwright/AdventOfCode
ca4cf6315c0efa38bd7748fb6f4bc99e7934871d
[ "MIT" ]
1
2021-01-03T23:09:28.000Z
2021-01-03T23:09:28.000Z
2015/23_OpeningtheTuringLock/computer.py
deanearlwright/AdventOfCode
ca4cf6315c0efa38bd7748fb6f4bc99e7934871d
[ "MIT" ]
6
2020-12-26T21:02:42.000Z
2020-12-26T21:02:52.000Z
2015/23_OpeningtheTuringLock/computer.py
deanearlwright/AdventOfCode
ca4cf6315c0efa38bd7748fb6f4bc99e7934871d
[ "MIT" ]
null
null
null
# ====================================================================== # Opening the Turing Lock # Advent of Code 2015 Day 23 -- Eric Wastl -- https://adventofcode.com # # Python implementation by Dr. Dean Earl Wright III # ====================================================================== # ==================...
33.907801
75
0.389877
class Computer(object): def __init__(self, text=None, part2=False): self.part2 = part2 self.text = text if text is None: self.text = [] self.regs = {'a': 0, 'b': 0} self.addr = 0 self.reset() def reset(self): ...
true
true
f7f78231b4fd20e5c68f6262aee5a33dd6c98947
890
py
Python
venv/Lib/site-packages/dataframe/search_tree/__init__.py
kavanAdeshara/Expense_Tracker
b3e4810e858a7786e05cda6b91ba674b73b87981
[ "Apache-2.0" ]
null
null
null
venv/Lib/site-packages/dataframe/search_tree/__init__.py
kavanAdeshara/Expense_Tracker
b3e4810e858a7786e05cda6b91ba674b73b87981
[ "Apache-2.0" ]
null
null
null
venv/Lib/site-packages/dataframe/search_tree/__init__.py
kavanAdeshara/Expense_Tracker
b3e4810e858a7786e05cda6b91ba674b73b87981
[ "Apache-2.0" ]
null
null
null
# dataframe: a data-frame implementation using method piping # # Copyright (C) 2016 Simon Dirmeier # # This file is part of dataframe. # # dataframe is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either versi...
34.230769
70
0.760674
from dataframe.search_tree.search_tree import SearchTree
true
true
f7f783392fa2525b2ab11f4e1569c9831f3ac7d7
131,895
py
Python
sympy/core/tests/test_args.py
dsavransky/sympy
c05c2755fec78ff19af89a4599f76edb2ee104af
[ "BSD-3-Clause" ]
null
null
null
sympy/core/tests/test_args.py
dsavransky/sympy
c05c2755fec78ff19af89a4599f76edb2ee104af
[ "BSD-3-Clause" ]
null
null
null
sympy/core/tests/test_args.py
dsavransky/sympy
c05c2755fec78ff19af89a4599f76edb2ee104af
[ "BSD-3-Clause" ]
null
null
null
"""Test whether all elements of cls.args are instances of Basic. """ # NOTE: keep tests sorted by (module, class name) key. If a class can't # be instantiated, add it here anyway with @SKIP("abstract class) (see # e.g. Function). import os import re import warnings import io from sympy import (Basic, S, symbols, sqr...
31.652268
135
0.777854
# be instantiated, add it here anyway with @SKIP("abstract class) (see # e.g. Function). import os import re import warnings import io from sympy import (Basic, S, symbols, sqrt, sin, oo, Interval, exp, Lambda, pi, Eq, log) from sympy.core.compatibility import range from sympy.utilities.pytest i...
true
true
f7f783469204d3a428dabfa5cbc74d95812a09b0
693
py
Python
organify/groups/migrations/0003_auto_20201205_2108.py
xmedinavei/organify
2b819f058e8f169cdad5324218d54009d2b937d0
[ "MIT" ]
null
null
null
organify/groups/migrations/0003_auto_20201205_2108.py
xmedinavei/organify
2b819f058e8f169cdad5324218d54009d2b937d0
[ "MIT" ]
null
null
null
organify/groups/migrations/0003_auto_20201205_2108.py
xmedinavei/organify
2b819f058e8f169cdad5324218d54009d2b937d0
[ "MIT" ]
null
null
null
# Generated by Django 3.1.4 on 2020-12-05 21:08 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('groups', '0002_auto_20201204_2134'), ] operations = [ migrations.AlterModelOptions( name='group', options={'get_late...
25.666667
88
0.558442
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('groups', '0002_auto_20201204_2134'), ] operations = [ migrations.AlterModelOptions( name='group', options={'get_latest_by': 'created', 'ordering': ['-created', '-m...
true
true
f7f784fb516e288d01b70a339fb5a0e0052c4534
4,472
py
Python
stock_chart_canvas.py
bshafi/StockMomentum
c2949ebe2fc1b5b370bece1e4d16c057fd7dc5bc
[ "MIT" ]
null
null
null
stock_chart_canvas.py
bshafi/StockMomentum
c2949ebe2fc1b5b370bece1e4d16c057fd7dc5bc
[ "MIT" ]
null
null
null
stock_chart_canvas.py
bshafi/StockMomentum
c2949ebe2fc1b5b370bece1e4d16c057fd7dc5bc
[ "MIT" ]
null
null
null
from typing import Iterable, Tuple from ipycanvas import Canvas from datetime import date, datetime, time, timedelta, timezone from ipycanvas.canvas import hold_canvas from ipycanvas import Canvas from threading import Event, Thread from traitlets.traitlets import Enum def draw_ticker(ticker, canvas): pass class...
36.357724
138
0.624329
from typing import Iterable, Tuple from ipycanvas import Canvas from datetime import date, datetime, time, timedelta, timezone from ipycanvas.canvas import hold_canvas from ipycanvas import Canvas from threading import Event, Thread from traitlets.traitlets import Enum def draw_ticker(ticker, canvas): pass class...
true
true
f7f78527ed44325d149a804e958808ecb83708a2
2,556
py
Python
src/pykeen/trackers/tensorboard.py
SmartDataAnalytics/PyKEEN
f9925a0039dba193a4b55b5489449641491c3d55
[ "MIT" ]
88
2018-10-14T16:28:38.000Z
2020-06-22T08:03:15.000Z
src/pykeen/trackers/tensorboard.py
SmartDataAnalytics/PyKEEN
f9925a0039dba193a4b55b5489449641491c3d55
[ "MIT" ]
42
2018-10-10T18:05:56.000Z
2020-06-09T09:19:27.000Z
src/pykeen/trackers/tensorboard.py
SmartDataAnalytics/PyKEEN
f9925a0039dba193a4b55b5489449641491c3d55
[ "MIT" ]
19
2019-02-15T17:36:46.000Z
2020-03-28T11:03:41.000Z
# -*- coding: utf-8 -*- """An adapter for TensorBoard.""" import pathlib import time from typing import TYPE_CHECKING, Any, Mapping, Optional, Union from .base import ResultTracker from ..constants import PYKEEN_LOGS from ..utils import flatten_dictionary, normalize_path if TYPE_CHECKING: import torch.utils.ten...
34.540541
119
0.666667
import pathlib import time from typing import TYPE_CHECKING, Any, Mapping, Optional, Union from .base import ResultTracker from ..constants import PYKEEN_LOGS from ..utils import flatten_dictionary, normalize_path if TYPE_CHECKING: import torch.utils.tensorboard __all__ = [ "TensorBoardResultTracker", ] ...
true
true
f7f785346161c516f75e02a225a5fee47833fd32
810
py
Python
setup.py
lklet123/Proxy-List-Scrapper
77908ac940481d0d8ed1b28d2e37e3de736e6019
[ "MIT" ]
58
2020-05-18T20:00:50.000Z
2022-03-19T02:56:11.000Z
setup.py
lklet123/Proxy-List-Scrapper
77908ac940481d0d8ed1b28d2e37e3de736e6019
[ "MIT" ]
6
2020-05-29T12:15:39.000Z
2021-05-01T06:42:28.000Z
setup.py
lklet123/Proxy-List-Scrapper
77908ac940481d0d8ed1b28d2e37e3de736e6019
[ "MIT" ]
17
2020-12-17T16:42:59.000Z
2022-02-03T08:12:24.000Z
# read the contents of your README file from os import path from setuptools import find_packages, setup this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, 'README.md')) as f: long_description = f.read() setup( name='Proxy-List-Scrapper', version='0.2.2', package...
28.928571
108
0.718519
from os import path from setuptools import find_packages, setup this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, 'README.md')) as f: long_description = f.read() setup( name='Proxy-List-Scrapper', version='0.2.2', packages=find_packages(), url='https://pyp...
true
true
f7f785401670b6d4904b14f90060b6de0349974a
1,779
py
Python
python/tests/episode_time_test.py
xuyanbo03/lab
cf2f5250e1a00ecce37b3480df28c3a5dcd08b57
[ "CC-BY-4.0" ]
7,407
2016-12-06T08:40:58.000Z
2022-03-31T12:19:09.000Z
python/tests/episode_time_test.py
xuyanbo03/lab
cf2f5250e1a00ecce37b3480df28c3a5dcd08b57
[ "CC-BY-4.0" ]
227
2016-12-06T22:05:33.000Z
2022-03-29T09:47:06.000Z
python/tests/episode_time_test.py
xuyanbo03/lab
cf2f5250e1a00ecce37b3480df28c3a5dcd08b57
[ "CC-BY-4.0" ]
1,594
2016-12-06T08:44:13.000Z
2022-03-31T12:19:12.000Z
# Copyright 2017-2018 Google Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in t...
28.693548
73
0.700956
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import unittest import numpy as np import six import deepmind_lab class EpisodeTimeTest(unittest.TestCase): def run_at_frame_rate(self, fps): env = deepmind_lab.Lab( ...
true
true
f7f7861e1ef8153ef0d0a064cf966dedb719477f
7,340
py
Python
docs/conf.py
EmilyYLMa/cim2busbranch
a5a388c0eb3f126a24f2b0c8234cc8cc36dedefd
[ "BSD-2-Clause" ]
1
2020-03-06T08:09:06.000Z
2020-03-06T08:09:06.000Z
docs/conf.py
EmilyYLMa/cim2busbranch
a5a388c0eb3f126a24f2b0c8234cc8cc36dedefd
[ "BSD-2-Clause" ]
null
null
null
docs/conf.py
EmilyYLMa/cim2busbranch
a5a388c0eb3f126a24f2b0c8234cc8cc36dedefd
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # Cim2BusBranch documentation build configuration file, created by # sphinx-quickstart on Tue Aug 23 11:31:37 2011. # # This file is execfile()d with the current directory set to its containing # dir. # # Note that not all possible configuration values are present in this # autogenerated file....
31.913043
79
0.721935
import os import sys sys.path.insert(0, os.path.abspath('..')) import cim2busbranch extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', ] templates_path = ['_templates'] source_suffix = '.txt' master_doc = 'index' project = u'Cim2BusBranc...
true
true
f7f7863259a2876e6809fd2aa4200f996043b598
3,477
py
Python
parsers.py
trimitri/freqle
67f48a0f4a4ab181902796339e7d0ad7a40399c0
[ "Apache-2.0" ]
1
2019-12-05T09:27:20.000Z
2019-12-05T09:27:20.000Z
parsers.py
trimitri/freqle
67f48a0f4a4ab181902796339e7d0ad7a40399c0
[ "Apache-2.0" ]
null
null
null
parsers.py
trimitri/freqle
67f48a0f4a4ab181902796339e7d0ad7a40399c0
[ "Apache-2.0" ]
null
null
null
"""Parse output from various sources into `FreqSeries` objects.""" from typing import List import pandas as pd from .freq_series import FreqSeries def fokus2_txt(file_name: str, session: str = None, drop_lines: List[int] = None) -> FreqSeries: """Parse frequency measurement done by the FOKUS2 Dual...
43.4625
83
0.637043
from typing import List import pandas as pd from .freq_series import FreqSeries def fokus2_txt(file_name: str, session: str = None, drop_lines: List[int] = None) -> FreqSeries: data = pd.read_table(file_name, squeeze=True, index_col=0, usecols=[0, 1]) if drop_lines is not None: data.dr...
true
true
f7f78778ecf8bfb23c7ad8a6d0ed31a85fa31bae
12,741
py
Python
pyscf/dh/grad/udfdh.py
hebrewsnabla/dh
222e3d4d8d4d04cd63074327ebb5fb39ea4441b7
[ "Apache-2.0" ]
1
2022-02-05T08:58:13.000Z
2022-02-05T08:58:13.000Z
pyscf/dh/grad/udfdh.py
hebrewsnabla/dh
222e3d4d8d4d04cd63074327ebb5fb39ea4441b7
[ "Apache-2.0" ]
null
null
null
pyscf/dh/grad/udfdh.py
hebrewsnabla/dh
222e3d4d8d4d04cd63074327ebb5fb39ea4441b7
[ "Apache-2.0" ]
null
null
null
from __future__ import annotations # dh import try: from dh.udfdh import UDFDH from dh.dhutil import calc_batch_size, gen_batch, gen_shl_batch, tot_size, timing from dh.grad.rdfdh import get_H_1_ao, get_S_1_ao, generator_L_1 from dh.grad.rdfdh import Gradients as RGradients except ImportError: from ...
44.239583
129
0.567695
from __future__ import annotations try: from dh.udfdh import UDFDH from dh.dhutil import calc_batch_size, gen_batch, gen_shl_batch, tot_size, timing from dh.grad.rdfdh import get_H_1_ao, get_S_1_ao, generator_L_1 from dh.grad.rdfdh import Gradients as RGradients except ImportError: from pyscf.dh.ud...
true
true
f7f787a0f781bee78bafa0751b991899877c3def
8,686
py
Python
ifind/search/engines/neutrinogeoaddress.py
padre-lab-eu/extended_simiir
aa9d54784dcfb4c629687317622eae8ba6d59a79
[ "MIT" ]
2
2018-03-20T01:14:50.000Z
2021-05-15T12:05:32.000Z
ifind/search/engines/neutrinogeoaddress.py
padre-lab-eu/extended_simiir
aa9d54784dcfb4c629687317622eae8ba6d59a79
[ "MIT" ]
null
null
null
ifind/search/engines/neutrinogeoaddress.py
padre-lab-eu/extended_simiir
aa9d54784dcfb4c629687317622eae8ba6d59a79
[ "MIT" ]
3
2015-02-04T13:36:26.000Z
2015-03-17T08:22:27.000Z
__author__ = 'smck' import json import requests from ifind.search.engine import Engine from ifind.search.response import Response from ifind.search.exceptions import EngineAPIKeyException, QueryParamException, EngineConnectionException from ifind.utils.encoding import encode_symbols from string import maketrans API_E...
35.453061
119
0.608796
__author__ = 'smck' import json import requests from ifind.search.engine import Engine from ifind.search.response import Response from ifind.search.exceptions import EngineAPIKeyException, QueryParamException, EngineConnectionException from ifind.utils.encoding import encode_symbols from string import maketrans API_E...
true
true
f7f7888acbc7a5533e674b98d3440ddaf9da16b8
1,913
py
Python
src/graph/graph.py
JadielTeofilo/General-Algorithms
dfcf86c6ecd727573079f8971187c47bdb7a37bb
[ "MIT" ]
null
null
null
src/graph/graph.py
JadielTeofilo/General-Algorithms
dfcf86c6ecd727573079f8971187c47bdb7a37bb
[ "MIT" ]
null
null
null
src/graph/graph.py
JadielTeofilo/General-Algorithms
dfcf86c6ecd727573079f8971187c47bdb7a37bb
[ "MIT" ]
null
null
null
##### Graph implementation list of adjacencies ##### import dataclasses from typing import List, Any, Optional @dataclasses.dataclass class GraphNode: value: int edges: List['GraphNode'] = dataclasses.field(default_factory=list) class Graph: def __init__(self) -> None: self.vertices: List[Graph...
28.984848
70
0.627287
init__(self) -> None: self.vertices: List[GraphNode] = [] def add_edge(self, from_value: int, to_value: int) -> None: from_node: GraphNode = self._create_node(from_value) to_node: GraphNode = self._create_node(to_value) for vertex in from_node.edges: if vertex == to_node...
true
true
f7f78b74a0319c892b9aa731bcb780058e07e9c8
1,960
py
Python
tests/test_power_plugs.py
ictes/MerossIot
9c5d47431211e0eda0cd271b284060d303fdb7d1
[ "MIT" ]
null
null
null
tests/test_power_plugs.py
ictes/MerossIot
9c5d47431211e0eda0cd271b284060d303fdb7d1
[ "MIT" ]
null
null
null
tests/test_power_plugs.py
ictes/MerossIot
9c5d47431211e0eda0cd271b284060d303fdb7d1
[ "MIT" ]
null
null
null
from meross_iot.api import MerossHttpClient from meross_iot.supported_devices.power_plugs import Mss310 import os import unittest import time EMAIL = os.environ.get('MEROSS_EMAIL') PASSWORD = os.environ.get('MEROSS_PASSWORD') class TestHttpMethods(unittest.TestCase): def setUp(self): self.client = Meros...
27.605634
70
0.667857
from meross_iot.api import MerossHttpClient from meross_iot.supported_devices.power_plugs import Mss310 import os import unittest import time EMAIL = os.environ.get('MEROSS_EMAIL') PASSWORD = os.environ.get('MEROSS_PASSWORD') class TestHttpMethods(unittest.TestCase): def setUp(self): self.client = Meros...
true
true
f7f78b825baa8c64428cec6b9755f2759f25115e
3,885
py
Python
python/PyAlembic/Tests/testInstance.py
zsnake1209/alembic
6245d10e007d75ea7802a22c3e1899706b84698f
[ "BSL-1.0" ]
921
2015-01-03T11:04:38.000Z
2022-03-29T06:38:34.000Z
python/PyAlembic/Tests/testInstance.py
zsnake1209/alembic
6245d10e007d75ea7802a22c3e1899706b84698f
[ "BSL-1.0" ]
264
2015-01-05T17:15:45.000Z
2022-03-28T20:14:51.000Z
python/PyAlembic/Tests/testInstance.py
zsnake1209/alembic
6245d10e007d75ea7802a22c3e1899706b84698f
[ "BSL-1.0" ]
276
2015-01-12T01:34:20.000Z
2022-03-08T09:19:42.000Z
#-****************************************************************************** # # Copyright (c) 2012 - 2013 # Sony Pictures Imageworks Inc. and # Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. # # All rights reserved. # # Redistribution and use in source and binary forms, with or with...
37.355769
87
0.638095
import unittest from imath import * from alembic.Abc import * class InstanceTest(unittest.TestCase): def testInstanceExport(self): oarch = OArchive('instance.abc') a = OObject(oar...
true
true
f7f78b9c614d19290ec5d46a32573aeaf6a92a28
6,157
py
Python
saleor/shipping/migrations/0005_auto_20180805_1754.py
gruzdevasch/lastversionofbs
17bbaccd683ea274b6ba56cdd39ccd4d664b1586
[ "BSD-3-Clause" ]
null
null
null
saleor/shipping/migrations/0005_auto_20180805_1754.py
gruzdevasch/lastversionofbs
17bbaccd683ea274b6ba56cdd39ccd4d664b1586
[ "BSD-3-Clause" ]
3
2020-03-24T16:21:02.000Z
2021-02-02T21:57:49.000Z
saleor/shipping/migrations/0005_auto_20180805_1754.py
gruzdevasch/lastversionofbs
17bbaccd683ea274b6ba56cdd39ccd4d664b1586
[ "BSD-3-Clause" ]
null
null
null
# Generated by Django 2.0.3 on 2018-08-05 10:54 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('shipping', '0004_auto_20180731_1425'), ] operations = [ migrations.AlterField( model_name='shippingmethodcountry', n...
324.052632
5,799
0.540198
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('shipping', '0004_auto_20180731_1425'), ] operations = [ migrations.AlterField( model_name='shippingmethodcountry', name='country_code', field=models.Ch...
true
true
f7f78ba101a1e8b992c8b3b1ab16ba8ed335e848
4,508
py
Python
MarketAgents/VAVAgent/vav/agent.py
rkini-pnnl/volttron-GS
60055438446a060176381468757ad0ec339f2371
[ "BSD-3-Clause" ]
8
2016-11-03T05:00:58.000Z
2020-10-18T14:49:36.000Z
MarketAgents/VAVAgent/vav/agent.py
kevinatkinson-pnnl/volttron-GS
479c614a6f7cd779fcc208e8e35d27d0961a16f8
[ "BSD-3-Clause" ]
29
2016-06-15T17:45:48.000Z
2020-08-01T02:41:32.000Z
MarketAgents/VAVAgent/vav/agent.py
kevinatkinson-pnnl/volttron-GS
479c614a6f7cd779fcc208e8e35d27d0961a16f8
[ "BSD-3-Clause" ]
39
2016-06-08T01:57:49.000Z
2020-05-27T14:33:44.000Z
# -*- coding: utf-8 -*- {{{ # vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et: # Copyright (c) 2019, Battelle Memorial Institute # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistri...
38.862069
82
0.748891
import sys import logging from datetime import timedelta as td from volttron.platform.agent import utils from volttron.pnnl.transactive_base.transactive.transactive import TransactiveBase _log = logging.getLogger(__name__) utils.setup_logging() __version__ ...
true
true
f7f78d05656c8b79bb02964ba50c6492c4115000
15,509
py
Python
dciqueue/test_queue.py
redhat-cip/dci-pipeline
384909c6ffcb4c44977fb34a5c106df4eecf9e35
[ "Apache-2.0" ]
null
null
null
dciqueue/test_queue.py
redhat-cip/dci-pipeline
384909c6ffcb4c44977fb34a5c106df4eecf9e35
[ "Apache-2.0" ]
null
null
null
dciqueue/test_queue.py
redhat-cip/dci-pipeline
384909c6ffcb4c44977fb34a5c106df4eecf9e35
[ "Apache-2.0" ]
2
2021-09-20T10:48:55.000Z
2022-02-28T19:47:55.000Z
# -*- coding: utf-8 -*- # # Copyright (C) 2020-2021 Red Hat, 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 applicab...
37.643204
88
0.523631
import json import os import shutil import tempfile import time import unittest from dciqueue import lib from dciqueue import main from dciqueue import run_cmd class TestQueue(unittest.TestCase): def setUp(self): self.queue_dir = tempfile.mkdtemp() os.environ["DCI_QUEUE_DIR"] = sel...
true
true
f7f78d7eab191ff6a62accff1b243ef9c1aa2ac6
1,315
py
Python
setup.py
eddwhite/KiKit
e538fcfe40f857697fccb0d7693f1dbb058bf226
[ "MIT" ]
null
null
null
setup.py
eddwhite/KiKit
e538fcfe40f857697fccb0d7693f1dbb058bf226
[ "MIT" ]
null
null
null
setup.py
eddwhite/KiKit
e538fcfe40f857697fccb0d7693f1dbb058bf226
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import setuptools import versioneer with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="KiKit", python_requires='>=3.7', version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), author="Jan Mrázek", author_email="e...
24.351852
50
0.58327
import setuptools import versioneer with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="KiKit", python_requires='>=3.7', version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), author="Jan Mrázek", author_email="email@honzamrazek.cz", ...
true
true
f7f78d9b50f7e17926d9be2d895307cca5ded3c0
605
py
Python
setup.py
deepak1792/python-jenkinsfile-testing
1198f7d02921792c3c254e0141007c65e3ef4772
[ "BSD-3-Clause" ]
30
2017-10-09T09:13:37.000Z
2021-09-23T04:16:21.000Z
setup.py
deepak1792/python-jenkinsfile-testing
1198f7d02921792c3c254e0141007c65e3ef4772
[ "BSD-3-Clause" ]
1
2018-02-24T16:43:13.000Z
2018-02-24T16:43:13.000Z
setup.py
deepak1792/python-jenkinsfile-testing
1198f7d02921792c3c254e0141007c65e3ef4772
[ "BSD-3-Clause" ]
39
2018-02-24T16:43:50.000Z
2021-11-23T13:39:44.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Setup file for scaffold_test. This file was generated with PyScaffold 2.5.7, a tool that easily puts up a scaffold for your new Python project. Learn more under: http://pyscaffold.readthedocs.org/ """ import sys from setuptools import setup def setup...
25.208333
73
0.679339
import sys from setuptools import setup def setup_package(): needs_sphinx = {'build_sphinx', 'upload_docs'}.intersection(sys.argv) sphinx = ['sphinx'] if needs_sphinx else [] setup(setup_requires=['six', 'pyscaffold>=2.5a0,<2.6a0'] + sphinx, use_pyscaffold=True) if __name__ == "__main__": ...
true
true
f7f78e222aecca4acd8c7043faea0214b9ecb37f
1,284
py
Python
patches/sitecustomize.py
toshihikoyanase/docker-python
02f8400ee7390e514c03aa313b6a509db72cab23
[ "Apache-2.0" ]
38
2020-07-13T08:46:39.000Z
2021-02-08T01:38:44.000Z
patches/sitecustomize.py
toshihikoyanase/docker-python
02f8400ee7390e514c03aa313b6a509db72cab23
[ "Apache-2.0" ]
null
null
null
patches/sitecustomize.py
toshihikoyanase/docker-python
02f8400ee7390e514c03aa313b6a509db72cab23
[ "Apache-2.0" ]
20
2020-07-14T03:38:50.000Z
2021-01-08T06:24:17.000Z
import os kaggle_proxy_token = os.getenv("KAGGLE_DATA_PROXY_TOKEN") bq_user_jwt = os.getenv("KAGGLE_BQ_USER_JWT") if kaggle_proxy_token or bq_user_jwt: from google.auth import credentials from google.cloud import bigquery from google.cloud.bigquery._http import Connection # TODO: Update this to the cor...
44.275862
89
0.722741
import os kaggle_proxy_token = os.getenv("KAGGLE_DATA_PROXY_TOKEN") bq_user_jwt = os.getenv("KAGGLE_BQ_USER_JWT") if kaggle_proxy_token or bq_user_jwt: from google.auth import credentials from google.cloud import bigquery from google.cloud.bigquery._http import Connection from kaggle_gcp impo...
true
true
f7f78e9f081df49d789b9e90857ff2903b9b41a6
3,820
py
Python
rotkehlchen/accounting/structures.py
MichaelHettmer/rotki
a4b2dbf4bcbe409a86fa144932c26305b1c449f3
[ "BSD-3-Clause" ]
null
null
null
rotkehlchen/accounting/structures.py
MichaelHettmer/rotki
a4b2dbf4bcbe409a86fa144932c26305b1c449f3
[ "BSD-3-Clause" ]
3
2021-01-28T21:30:46.000Z
2022-03-25T19:17:00.000Z
rotkehlchen/accounting/structures.py
MichaelHettmer/rotki
a4b2dbf4bcbe409a86fa144932c26305b1c449f3
[ "BSD-3-Clause" ]
null
null
null
from dataclasses import dataclass from enum import Enum from typing import Any, Dict from rotkehlchen.assets.asset import Asset from rotkehlchen.constants.misc import ZERO from rotkehlchen.errors import InputError from rotkehlchen.fval import FVal from rotkehlchen.typing import Timestamp class DefiEventType(Enum): ...
35.700935
98
0.666754
from dataclasses import dataclass from enum import Enum from typing import Any, Dict from rotkehlchen.assets.asset import Asset from rotkehlchen.constants.misc import ZERO from rotkehlchen.errors import InputError from rotkehlchen.fval import FVal from rotkehlchen.typing import Timestamp class DefiEventType(Enum): ...
true
true
f7f78ee21707bcc69686776c462840457f6eaf68
6,307
py
Python
prepare_vocab.py
frankxu2004/tacred-relation-cotrain
005dd0cf27d6a68fcf3cbef736de3fe9759ce6b4
[ "Apache-2.0" ]
null
null
null
prepare_vocab.py
frankxu2004/tacred-relation-cotrain
005dd0cf27d6a68fcf3cbef736de3fe9759ce6b4
[ "Apache-2.0" ]
null
null
null
prepare_vocab.py
frankxu2004/tacred-relation-cotrain
005dd0cf27d6a68fcf3cbef736de3fe9759ce6b4
[ "Apache-2.0" ]
null
null
null
""" Prepare vocabulary and initial word vectors. """ import json import msgpack import pickle import argparse import numpy as np from collections import Counter from utils import vocab, constant, helper def parse_args(): parser = argparse.ArgumentParser(description='Prepare vocab for relation extraction.') p...
36.883041
102
0.654352
import json import msgpack import pickle import argparse import numpy as np from collections import Counter from utils import vocab, constant, helper def parse_args(): parser = argparse.ArgumentParser(description='Prepare vocab for relation extraction.') parser.add_argument('data_dir', help='TACRED directory...
true
true
f7f78fcfcf856c5765cbe994b8dd7e978c64aaa8
229,936
py
Python
test/draw_test.py
Sowmyasree101/pygame
264c74a288fa36d8a90c9e2115bd8610cd6b3fd4
[ "Python-2.0", "OLDAP-2.3" ]
1
2021-04-26T09:21:12.000Z
2021-04-26T09:21:12.000Z
test/draw_test.py
Sowmyasree101/pygame
264c74a288fa36d8a90c9e2115bd8610cd6b3fd4
[ "Python-2.0", "OLDAP-2.3" ]
null
null
null
test/draw_test.py
Sowmyasree101/pygame
264c74a288fa36d8a90c9e2115bd8610cd6b3fd4
[ "Python-2.0", "OLDAP-2.3" ]
null
null
null
import math import unittest import sys import pygame from pygame import draw from pygame import draw_py from pygame.locals import SRCALPHA from pygame.tests import test_utils from pygame.math import Vector2 PY3 = sys.version_info >= (3, 0, 0) RED = BG_RED = pygame.Color("red") GREEN = FG_GREEN = pygame.Color("green"...
36.119384
135
0.533909
import math import unittest import sys import pygame from pygame import draw from pygame import draw_py from pygame.locals import SRCALPHA from pygame.tests import test_utils from pygame.math import Vector2 PY3 = sys.version_info >= (3, 0, 0) RED = BG_RED = pygame.Color("red") GREEN = FG_GREEN = pygame.Color("green"...
true
true
f7f79031ff1713a9ec2f8cf11878d55021dd086e
529
py
Python
airbyte-integrations/connectors/destination-rabbitmq/setup.py
OTRI-Unipd/OTRI-airbyte
50eeeb773f75246e86c6e167b0cd7d2dda6efe0d
[ "MIT" ]
2
2022-03-02T13:46:05.000Z
2022-03-05T12:31:28.000Z
airbyte-integrations/connectors/destination-rabbitmq/setup.py
OTRI-Unipd/OTRI-airbyte
50eeeb773f75246e86c6e167b0cd7d2dda6efe0d
[ "MIT" ]
29
2021-10-07T17:20:29.000Z
2021-12-27T13:07:09.000Z
airbyte-integrations/connectors/destination-rabbitmq/setup.py
OTRI-Unipd/OTRI-airbyte
50eeeb773f75246e86c6e167b0cd7d2dda6efe0d
[ "MIT" ]
1
2021-07-30T07:24:51.000Z
2021-07-30T07:24:51.000Z
# # Copyright (c) 2021 Airbyte, Inc., all rights reserved. # from setuptools import find_packages, setup MAIN_REQUIREMENTS = ["airbyte-cdk", "pika>=1.1.0"] TEST_REQUIREMENTS = ["pytest~=6.1"] setup( name="destination_rabbitmq", description="Destination implementation for Rabbitmq.", author="Airbyte", ...
22.041667
59
0.68242
from setuptools import find_packages, setup MAIN_REQUIREMENTS = ["airbyte-cdk", "pika>=1.1.0"] TEST_REQUIREMENTS = ["pytest~=6.1"] setup( name="destination_rabbitmq", description="Destination implementation for Rabbitmq.", author="Airbyte", author_email="contact@airbyte.io", packages=find_pa...
true
true
f7f790696d0085954c6d4fff8df0c30a792955e7
1,125
py
Python
app/dependencies.py
code-lab-org/ise-design
fbc9683e4bdeacf6a0f16cfb81d79ace0c337b28
[ "Apache-2.0" ]
null
null
null
app/dependencies.py
code-lab-org/ise-design
fbc9683e4bdeacf6a0f16cfb81d79ace0c337b28
[ "Apache-2.0" ]
null
null
null
app/dependencies.py
code-lab-org/ise-design
fbc9683e4bdeacf6a0f16cfb81d79ace0c337b28
[ "Apache-2.0" ]
null
null
null
from fastapi_users import FastAPIUsers, models from fastapi_users.authentication import CookieAuthentication, JWTAuthentication from fastapi_users.db import SQLAlchemyUserDatabase import os from .schemas.user import User, UserCreate, UserUpdate, UserDB from .models.user import UserTable from .database import Base, dat...
28.125
80
0.797333
from fastapi_users import FastAPIUsers, models from fastapi_users.authentication import CookieAuthentication, JWTAuthentication from fastapi_users.db import SQLAlchemyUserDatabase import os from .schemas.user import User, UserCreate, UserUpdate, UserDB from .models.user import UserTable from .database import Base, dat...
true
true
f7f79214fb071183d57d7139d78e6859228b97d6
4,670
py
Python
isi_sdk_8_2_2/isi_sdk_8_2_2/models/mapping_users_rules_parameters_default_unix_user.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
24
2018-06-22T14:13:23.000Z
2022-03-23T01:21:26.000Z
isi_sdk_8_2_2/isi_sdk_8_2_2/models/mapping_users_rules_parameters_default_unix_user.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
46
2018-04-30T13:28:22.000Z
2022-03-21T21:11:07.000Z
isi_sdk_8_2_2/isi_sdk_8_2_2/models/mapping_users_rules_parameters_default_unix_user.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
29
2018-06-19T00:14:04.000Z
2022-02-08T17:51:19.000Z
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 9 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from isi_sdk_8_2_2.models.mapping...
31.133333
117
0.596788
import pprint import re import six from isi_sdk_8_2_2.models.mapping_users_rules_rule_user2 import MappingUsersRulesRuleUser2 class MappingUsersRulesParametersDefaultUnixUser(object): swagger_types = { 'domain': 'str', 'user': 'str' } attribute_map = { 'domain': 'domain...
true
true
f7f7924b903f852c89d8d58411f80c5f432551fe
1,586
py
Python
Introduccion_Python/04_depuracion_codigo/probar-decirhora.py
iarielduarte/Python
871cdaf287a583baad7c88e274e09821396d0bbb
[ "CNRI-Python" ]
null
null
null
Introduccion_Python/04_depuracion_codigo/probar-decirhora.py
iarielduarte/Python
871cdaf287a583baad7c88e274e09821396d0bbb
[ "CNRI-Python" ]
null
null
null
Introduccion_Python/04_depuracion_codigo/probar-decirhora.py
iarielduarte/Python
871cdaf287a583baad7c88e274e09821396d0bbb
[ "CNRI-Python" ]
null
null
null
import decirhora import unittest class ProbarDecirHora(unittest.TestCase): def setUp(self): self.nums = list(range(11)) def test_numbers(self): # Asegurar la conversion de numeros a letras correctamente letras = ( 'cero', 'uno', 'dos', 'tres', 'cuatro', 'cinco', ...
33.744681
79
0.496217
import decirhora import unittest class ProbarDecirHora(unittest.TestCase): def setUp(self): self.nums = list(range(11)) def test_numbers(self): letras = ( 'cero', 'uno', 'dos', 'tres', 'cuatro', 'cinco', 'seis', 'siete', 'ocho', 'nueve', 'diez' ) ...
true
true
f7f79307c928929ed3e9c521f83cd421138f9414
3,619
py
Python
jupiter_orm/jupiter_orm/Model.py
dianbaer/fast
362bd0ca9f6039ea70cd665438dd8731e4c144a5
[ "MIT" ]
226
2017-10-26T12:05:26.000Z
2021-12-06T15:14:54.000Z
jupiter_orm/jupiter_orm/Model.py
dianbaer/fast
362bd0ca9f6039ea70cd665438dd8731e4c144a5
[ "MIT" ]
null
null
null
jupiter_orm/jupiter_orm/Model.py
dianbaer/fast
362bd0ca9f6039ea70cd665438dd8731e4c144a5
[ "MIT" ]
73
2017-10-27T12:38:59.000Z
2019-12-23T07:29:48.000Z
import logging from jupiter_orm.DBPool import DBPoolC from jupiter_orm.ModelMetaclass import ModelMetaclassC class ModelC(dict, metaclass=ModelMetaclassC): def __init__(self, **kwargs): super(ModelC, self).__init__(**kwargs) def __getattr__(self, item): try: return se...
35.480392
111
0.555402
import logging from jupiter_orm.DBPool import DBPoolC from jupiter_orm.ModelMetaclass import ModelMetaclassC class ModelC(dict, metaclass=ModelMetaclassC): def __init__(self, **kwargs): super(ModelC, self).__init__(**kwargs) def __getattr__(self, item): try: return se...
true
true
f7f79323ede6ce8c2a8ec9c8a11b8ec920697cf0
1,312
py
Python
care/apps/accounts/migrations/0004_auto_20200524_1231.py
chetanyakan/care-platform
52cd390b711bda4d8081f9cb4aed198c3ccc4195
[ "MIT" ]
null
null
null
care/apps/accounts/migrations/0004_auto_20200524_1231.py
chetanyakan/care-platform
52cd390b711bda4d8081f9cb4aed198c3ccc4195
[ "MIT" ]
null
null
null
care/apps/accounts/migrations/0004_auto_20200524_1231.py
chetanyakan/care-platform
52cd390b711bda4d8081f9cb4aed198c3ccc4195
[ "MIT" ]
2
2020-05-21T07:18:49.000Z
2020-11-03T12:18:43.000Z
# Generated by Django 2.2.11 on 2020-05-24 07:01 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("accounts", "0003_care_platform"), ] operations = [ migrations.RemoveField(model_name="district", name="active",), migrations.RemoveField(mo...
45.241379
75
0.689024
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("accounts", "0003_care_platform"), ] operations = [ migrations.RemoveField(model_name="district", name="active",), migrations.RemoveField(model_name="district", name="created_at",), ...
true
true
f7f793eb14e4b7946837fec10525cfbe9ea6a5a7
6,691
py
Python
scripts/control.py
Jash-Shah/Eklavya---Drone
ca8c88fafb50e3da29690faa016ba43657e67b82
[ "MIT", "Unlicense" ]
7
2021-09-17T06:48:00.000Z
2022-02-14T01:11:49.000Z
scripts/control.py
toshan-luktuke/Eklavya---Drone
ca8c88fafb50e3da29690faa016ba43657e67b82
[ "MIT", "Unlicense" ]
1
2021-09-11T10:51:06.000Z
2021-12-22T10:27:33.000Z
scripts/control.py
toshan-luktuke/Eklavya---Drone
ca8c88fafb50e3da29690faa016ba43657e67b82
[ "MIT", "Unlicense" ]
1
2021-12-16T18:04:28.000Z
2021-12-16T18:04:28.000Z
#! /usr/bin/env python3 import rospy import time from pid import * import message_filters from vitarana_drone.msg import prop_speed from vitarana_drone.msg import edrone_cmd from rospy.topics import Publisher from sensor_msgs.msg import NavSatFix from sensor_msgs.msg import Imu from geometry_msgs.msg import Vector3Stam...
28.351695
132
0.705724
import rospy import time from pid import * import message_filters from vitarana_drone.msg import prop_speed from vitarana_drone.msg import edrone_cmd from rospy.topics import Publisher from sensor_msgs.msg import NavSatFix from sensor_msgs.msg import Imu from geometry_msgs.msg import Vector3Stamped from geometry_msgs....
true
true
f7f7943f5c87469aaa98dd304f9ff981f8f970df
3,389
py
Python
tests/unit/test_command.py
osomdev/pyshrimp
72f4425074a2f09a5f5630ca969472f4f5dcc85e
[ "MIT" ]
6
2021-11-28T12:12:02.000Z
2021-12-16T19:44:46.000Z
tests/unit/test_command.py
osomdev/pyshrimp
72f4425074a2f09a5f5630ca969472f4f5dcc85e
[ "MIT" ]
null
null
null
tests/unit/test_command.py
osomdev/pyshrimp
72f4425074a2f09a5f5630ca969472f4f5dcc85e
[ "MIT" ]
null
null
null
from unittest import TestCase from pyshrimp.utils.command import shell_cmd, cmd, SkipConfig, Command, CommandArgProcessor from pyshrimp.utils.subprocess_utils import ProcessExecutionException class _TextWrapper: def __init__(self, text): self._text = text def __str__(self) -> str: return se...
36.836957
113
0.669814
from unittest import TestCase from pyshrimp.utils.command import shell_cmd, cmd, SkipConfig, Command, CommandArgProcessor from pyshrimp.utils.subprocess_utils import ProcessExecutionException class _TextWrapper: def __init__(self, text): self._text = text def __str__(self) -> str: return se...
true
true
f7f7944fd4154534861cb83c1cb4a890f7956c43
619
py
Python
plato/processors/feature_gaussian.py
cuiboyuan/plato
260b785cbbf8588c92331d6343211ff72321f90e
[ "Apache-2.0" ]
135
2021-04-14T09:06:08.000Z
2022-03-31T03:38:42.000Z
plato/processors/feature_gaussian.py
cuiboyuan/plato
260b785cbbf8588c92331d6343211ff72321f90e
[ "Apache-2.0" ]
39
2021-05-16T00:34:08.000Z
2022-03-10T22:03:57.000Z
plato/processors/feature_gaussian.py
cuiboyuan/plato
260b785cbbf8588c92331d6343211ff72321f90e
[ "Apache-2.0" ]
41
2021-04-14T10:40:07.000Z
2022-03-28T10:24:20.000Z
""" Implements a Processor for applying local differential privacy using gaussian mechanism. """ import math from plato.processors import feature_additive_noise class Processor(feature_additive_noise.Processor): """ Implements a Processor for applying local differential privacy using gaussian mechanism. ...
29.47619
92
0.646204
import math from plato.processors import feature_additive_noise class Processor(feature_additive_noise.Processor): def __init__(self, epsilon=None, delta=None, sensitivity=None, **kwargs) -> None: scale = 2 * math.log(1.25 / delta) * se...
true
true
f7f79470c24ffbe45e82a1ee990919c2decadb29
488
py
Python
ai-trading-system/setup.py
yash5OG/RecommenderForDHim
841d981ec97626ddbe718cf0a044f92ee139fccc
[ "MIT" ]
null
null
null
ai-trading-system/setup.py
yash5OG/RecommenderForDHim
841d981ec97626ddbe718cf0a044f92ee139fccc
[ "MIT" ]
null
null
null
ai-trading-system/setup.py
yash5OG/RecommenderForDHim
841d981ec97626ddbe718cf0a044f92ee139fccc
[ "MIT" ]
1
2021-08-13T23:06:46.000Z
2021-08-13T23:06:46.000Z
# This will be executed everytime we make a pip install # The find_packages is very important since it's used to # make all our packages visible to each other inside the project from setuptools import setup, find_packages setup( name='Winteam Bridge', version='1.0.0', description='Brosnan\'s winteam bridge...
28.705882
64
0.713115
# make all our packages visible to each other inside the project from setuptools import setup, find_packages setup( name='Winteam Bridge', version='1.0.0', description='Brosnan\'s winteam bridge', packages=find_packages(exclude=['*tests']), include_package_data=True, setup_requires=[ ...
true
true
f7f79542b3c56bb705d3874a2ed09b5ead59f3e2
1,685
py
Python
bugtests/test386jar/test386called.py
nelmiux/CS347-Data_Management
1e9d87097b5a373f9312b0d6b413198e495fd6c0
[ "CNRI-Jython" ]
4
2021-05-16T07:59:00.000Z
2022-02-17T20:17:14.000Z
bugtests/test386jar/test386called.py
nelmiux/CS347-Data_Management
1e9d87097b5a373f9312b0d6b413198e495fd6c0
[ "CNRI-Jython" ]
1
2016-04-28T00:35:37.000Z
2016-04-28T00:38:18.000Z
bugtests/test386jar/test386called.py
nelmiux/CS347-Data_Management
1e9d87097b5a373f9312b0d6b413198e495fd6c0
[ "CNRI-Jython" ]
2
2022-01-18T23:31:08.000Z
2022-02-18T12:43:37.000Z
# make sure we are in 'standalone' mode, without package scan import sys skipName = "python.cachedir.skip" if not sys.registry.containsKey(skipName): raise AssertionError, skipName + " is missing" if not "true" == sys.registry.getProperty(skipName): raise AssertionError, skipName + " is not true" # import a non-bu...
33.7
90
0.779228
import sys skipName = "python.cachedir.skip" if not sys.registry.containsKey(skipName): raise AssertionError, skipName + " is missing" if not "true" == sys.registry.getProperty(skipName): raise AssertionError, skipName + " is not true" import getopt import java.lang from java.math import Big...
false
true
f7f795f0802af9453a29b14f27eac8665d4b853d
1,431
py
Python
tools_http.py
colderleo/pytools
861409cfffd6c801f1c480045033930b34e1c889
[ "MIT" ]
1
2020-04-21T01:42:44.000Z
2020-04-21T01:42:44.000Z
tools_http.py
colderleo/leo-pytools
861409cfffd6c801f1c480045033930b34e1c889
[ "MIT" ]
null
null
null
tools_http.py
colderleo/leo-pytools
861409cfffd6c801f1c480045033930b34e1c889
[ "MIT" ]
null
null
null
def code_response(code=1, msg='', data:dict={}): from django.http.response import JsonResponse ret = { 'rescode': code, 'resmsg': msg, } ret.update(data) return JsonResponse(ret) def generate_jwt_token(openid:str='undefined_wx_openid', encode_to_str=True): import jwt # pip in...
28.058824
121
0.632425
def code_response(code=1, msg='', data:dict={}): from django.http.response import JsonResponse ret = { 'rescode': code, 'resmsg': msg, } ret.update(data) return JsonResponse(ret) def generate_jwt_token(openid:str='undefined_wx_openid', encode_to_str=True): import jwt fro...
true
true
f7f795f4dde16c2dabc8a625d9d8b0be6ab64e67
150
py
Python
flasgger_validation/__main__.py
robertlagrant/flasgger_validation
413a0c897725990ee1f60ae091f50593c9eca7d2
[ "MIT" ]
null
null
null
flasgger_validation/__main__.py
robertlagrant/flasgger_validation
413a0c897725990ee1f60ae091f50593c9eca7d2
[ "MIT" ]
null
null
null
flasgger_validation/__main__.py
robertlagrant/flasgger_validation
413a0c897725990ee1f60ae091f50593c9eca7d2
[ "MIT" ]
null
null
null
from waitress import serve from .app import create_app if __name__ == '__main__': app = create_app() serve(app, host='0.0.0.0', port=5000)
16.666667
41
0.673333
from waitress import serve from .app import create_app if __name__ == '__main__': app = create_app() serve(app, host='0.0.0.0', port=5000)
true
true
f7f797daa504a244274423c9fa9de2402c75bb83
22,298
py
Python
tdc/utils.py
hengwei-chan/TDC
83b9dd1bf75a56e0dac2e61e0cd8fb21208785fa
[ "MIT" ]
1
2021-07-23T01:43:26.000Z
2021-07-23T01:43:26.000Z
tdc/utils.py
dengzhou5068/TDC
d19bd63c46c8f283c19764c3c9970de66f9a5d29
[ "MIT" ]
null
null
null
tdc/utils.py
dengzhou5068/TDC
d19bd63c46c8f283c19764c3c9970de66f9a5d29
[ "MIT" ]
null
null
null
import requests from zipfile import ZipFile import os, sys import numpy as np import pandas as pd from pandas.errors import EmptyDataError import json import warnings warnings.filterwarnings("ignore") import subprocess import pickle from fuzzywuzzy import fuzz from tqdm import tqdm from .metadata import name2type, nam...
33.083086
166
0.681989
import requests from zipfile import ZipFile import os, sys import numpy as np import pandas as pd from pandas.errors import EmptyDataError import json import warnings warnings.filterwarnings("ignore") import subprocess import pickle from fuzzywuzzy import fuzz from tqdm import tqdm from .metadata import name2type, nam...
true
true
f7f7980bfe545a5add10a60ef3d0423dc009e1e5
2,021
py
Python
leetcode/roman_to_integer.py
dmitrvk/solutions
3831e8f8ca1e71ff158873593c7f7643341d3344
[ "MIT" ]
null
null
null
leetcode/roman_to_integer.py
dmitrvk/solutions
3831e8f8ca1e71ff158873593c7f7643341d3344
[ "MIT" ]
null
null
null
leetcode/roman_to_integer.py
dmitrvk/solutions
3831e8f8ca1e71ff158873593c7f7643341d3344
[ "MIT" ]
null
null
null
import collections class Solution: ROMAN = collections.OrderedDict(( (1000, 'M'), (900, 'CM'), (500, 'D'), (400, 'CD'), (100, 'C'), (90, 'XC'), (50, 'L'), (40, 'XL'), (10, 'X'), (9, 'IX'), (5, 'V'), (4, 'IV'), ...
30.164179
55
0.557645
import collections class Solution: ROMAN = collections.OrderedDict(( (1000, 'M'), (900, 'CM'), (500, 'D'), (400, 'CD'), (100, 'C'), (90, 'XC'), (50, 'L'), (40, 'XL'), (10, 'X'), (9, 'IX'), (5, 'V'), (4, 'IV'), ...
true
true
f7f7989095ae300b2b9f3d29a6694dcc51a4760b
2,073
py
Python
gryphon/wizard/settings_states/add_remote_registry.py
vittorfp/labskit_cli
28e109b4a9f36a03d499eb953e04a4fb787632fe
[ "MIT" ]
null
null
null
gryphon/wizard/settings_states/add_remote_registry.py
vittorfp/labskit_cli
28e109b4a9f36a03d499eb953e04a4fb787632fe
[ "MIT" ]
1
2022-03-08T14:54:26.000Z
2022-03-08T15:02:52.000Z
gryphon/wizard/settings_states/add_remote_registry.py
vittorfp/labskit_cli
28e109b4a9f36a03d499eb953e04a4fb787632fe
[ "MIT" ]
null
null
null
import logging from ..functions import erase_lines from ..questions import SettingsQuestions from ...fsm import State, Transition from ...constants import NO from ...constants import (YES, SUCCESS) from ...core.settings import SettingsManager logger = logging.getLogger('gryphon') def back_to_previous(history, **kwa...
30.485294
110
0.718765
import logging from ..functions import erase_lines from ..questions import SettingsQuestions from ...fsm import State, Transition from ...constants import NO from ...constants import (YES, SUCCESS) from ...core.settings import SettingsManager logger = logging.getLogger('gryphon') def back_to_previous(history, **kwa...
true
true
f7f7995a3815e724ade1aa3347110ab4861d1a7c
3,079
py
Python
strainer/widgets/reference.py
jmbreuer/strainer
cf8d5fbb0782ca9d9148107c28cdcd66ac2d6927
[ "Unlicense" ]
2
2020-04-10T22:20:14.000Z
2020-05-14T21:35:12.000Z
strainer/widgets/reference.py
jmbreuer/strainer
cf8d5fbb0782ca9d9148107c28cdcd66ac2d6927
[ "Unlicense" ]
31
2020-05-21T14:03:53.000Z
2022-03-11T12:04:50.000Z
strainer/widgets/reference.py
jmbreuer/strainer
cf8d5fbb0782ca9d9148107c28cdcd66ac2d6927
[ "Unlicense" ]
1
2022-03-09T18:19:55.000Z
2022-03-09T18:19:55.000Z
from PyQt5.QtCore import QSize, QUrl from PyQt5.QtWebEngineWidgets import QWebEngineView, QWebEnginePage from PyQt5.QtWidgets import QApplication from ..actions import HomePage, PreviousPage, NextPage, ReloadPage, CopyUrl, FindInPage from ..controls import NavigateMenu from ..types import FindDirection, FindOptions, F...
34.988636
105
0.658006
from PyQt5.QtCore import QSize, QUrl from PyQt5.QtWebEngineWidgets import QWebEngineView, QWebEnginePage from PyQt5.QtWidgets import QApplication from ..actions import HomePage, PreviousPage, NextPage, ReloadPage, CopyUrl, FindInPage from ..controls import NavigateMenu from ..types import FindDirection, FindOptions, F...
true
true
f7f799eddfd72728b35bf7cd86a67b77514fdff5
12,804
py
Python
tests/test_resources.py
JulianLiederer/restless
660e77234d3336bae80e727351df44ade1dd67d4
[ "BSD-3-Clause" ]
1
2019-02-19T07:26:59.000Z
2019-02-19T07:26:59.000Z
tests/test_resources.py
JulianLiederer/restless
660e77234d3336bae80e727351df44ade1dd67d4
[ "BSD-3-Clause" ]
null
null
null
tests/test_resources.py
JulianLiederer/restless
660e77234d3336bae80e727351df44ade1dd67d4
[ "BSD-3-Clause" ]
null
null
null
import six import unittest from restless.exceptions import HttpError, NotFound, MethodNotImplemented from restless.preparers import Preparer, FieldsPreparer from restless.resources import Resource from restless.utils import json from .fakes import FakeHttpRequest, FakeHttpResponse class GenericResource(Resource): ...
34.983607
102
0.586848
import six import unittest from restless.exceptions import HttpError, NotFound, MethodNotImplemented from restless.preparers import Preparer, FieldsPreparer from restless.resources import Resource from restless.utils import json from .fakes import FakeHttpRequest, FakeHttpResponse class GenericResource(Resource): ...
true
true
f7f79a0e840973ca5e08241da89a77b61d9e27ea
8,322
py
Python
validator/sawtooth_validator/consensus/poet0/poet_transaction_block.py
jrineck/sawtooth-core
e3eb79f32c97a25993c87eda7f77a02fd2086c7c
[ "Apache-2.0" ]
null
null
null
validator/sawtooth_validator/consensus/poet0/poet_transaction_block.py
jrineck/sawtooth-core
e3eb79f32c97a25993c87eda7f77a02fd2086c7c
[ "Apache-2.0" ]
null
null
null
validator/sawtooth_validator/consensus/poet0/poet_transaction_block.py
jrineck/sawtooth-core
e3eb79f32c97a25993c87eda7f77a02fd2086c7c
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
35.564103
80
0.633261
import logging import hashlib from threading import RLock from journal import transaction_block from journal.messages import transaction_block_message from sawtooth_validator.consensus.poet0.wait_certificate \ import WaitCertificate, WaitTimer from gossip.common import NullIdentifier LOGGER = logg...
true
true
f7f79a3d84b224a60560d7b6f7878e89af50729e
815
py
Python
yatube/yatube/urls.py
AlexeyTikhonchuk/yatube_project
1e05f9ceffeaebcea2b690e02844d15b89d80a8f
[ "MIT" ]
null
null
null
yatube/yatube/urls.py
AlexeyTikhonchuk/yatube_project
1e05f9ceffeaebcea2b690e02844d15b89d80a8f
[ "MIT" ]
null
null
null
yatube/yatube/urls.py
AlexeyTikhonchuk/yatube_project
1e05f9ceffeaebcea2b690e02844d15b89d80a8f
[ "MIT" ]
null
null
null
"""yatube URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based ...
32.6
77
0.700613
from django.contrib import admin from django.urls import include, path urlpatterns = [ path('', include('posts.urls', namespace='posts')), path('admin/', admin.site.urls), ]
true
true
f7f79b07899dc658f29ebe55eb4b6ce81224488c
13,780
py
Python
client-py/src/client_example.py
SailVR/incubator-iotdb
f158fe1c96575ba7737b0d1e69c2c075735b8b58
[ "Apache-2.0" ]
2
2020-06-01T13:58:51.000Z
2020-12-23T08:16:53.000Z
client-py/src/client_example.py
SailVR/incubator-iotdb
f158fe1c96575ba7737b0d1e69c2c075735b8b58
[ "Apache-2.0" ]
null
null
null
client-py/src/client_example.py
SailVR/incubator-iotdb
f158fe1c96575ba7737b0d1e69c2c075735b8b58
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
39.597701
110
0.567054
import sys import struct sys.path.append("../../service-rpc/target/generated-sources-python") from thrift.protocol import TBinaryProtocol, TCompactProtocol from thrift.transport import TSocket, TTransport from iotdb.rpc.TSIService import Client, TSCreateTimeseriesReq, TSInsertRecordReq, \ ...
true
true
f7f79b5f7aadea4a945b5bb452ec9cb961364a6e
9,532
py
Python
leo/plugins/datenodes.py
gchiu/leo-editor
9de55692d724fe8f12d0809540956327d131dbc5
[ "MIT" ]
null
null
null
leo/plugins/datenodes.py
gchiu/leo-editor
9de55692d724fe8f12d0809540956327d131dbc5
[ "MIT" ]
null
null
null
leo/plugins/datenodes.py
gchiu/leo-editor
9de55692d724fe8f12d0809540956327d131dbc5
[ "MIT" ]
null
null
null
#@+leo-ver=5-thin #@+node:ekr.20060807103814.1: * @file datenodes.py #@+<< docstring >> #@+node:bobjack.20080615065747.4: ** << docstring >> """ Allows users to insert headlines containing dates. 'Date nodes' are nodes that have dates in their headlines. They may be added to the outline one at a time, a month's-worth ...
35.700375
117
0.644985
__version__ = "0.7" import leo.core.leoGlobals as g import calendar import codecs import datetime def init(): g.registerHandler("after-create-leo-frame", on_create) g.plugin_signon(__name__) return True class DateNodes(object): default_setting...
true
true
f7f79bd302825ef9b8335c829fc0ae2fe1e601b9
10,807
py
Python
detectron2/utils/events.py
newUtkarsh/detectron2
e1c055abff34513f347a767f43bfe60e275b136c
[ "Apache-2.0" ]
221
2019-11-04T02:43:51.000Z
2022-03-23T09:16:41.000Z
detectron2/utils/events.py
newUtkarsh/detectron2
e1c055abff34513f347a767f43bfe60e275b136c
[ "Apache-2.0" ]
56
2021-03-18T12:02:28.000Z
2022-03-24T15:12:57.000Z
detectron2/utils/events.py
newUtkarsh/detectron2
e1c055abff34513f347a767f43bfe60e275b136c
[ "Apache-2.0" ]
65
2019-11-06T06:23:04.000Z
2021-11-29T15:32:55.000Z
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import datetime import json import logging import os from collections import defaultdict from contextlib import contextmanager import torch from fvcore.common.file_io import PathManager from fvcore.common.history_buffer import HistoryBuffer _CURREN...
31.973373
97
0.593689
import datetime import json import logging import os from collections import defaultdict from contextlib import contextmanager import torch from fvcore.common.file_io import PathManager from fvcore.common.history_buffer import HistoryBuffer _CURRENT_STORAGE_STACK = [] def get_event_storage(): assert len( ...
true
true
f7f79be385a11dd622266b06537df6b536a385e7
14,634
py
Python
model/pytorch/dffml_model_pytorch/pytorch_base.py
SGeetansh/dffml
04647bdcadef2f7e7b59cdd8ac1e89f17ef1095b
[ "MIT" ]
1
2019-03-11T17:24:17.000Z
2019-03-11T17:24:17.000Z
model/pytorch/dffml_model_pytorch/pytorch_base.py
SGeetansh/dffml
04647bdcadef2f7e7b59cdd8ac1e89f17ef1095b
[ "MIT" ]
24
2020-05-20T23:29:57.000Z
2021-04-14T04:18:21.000Z
model/pytorch/dffml_model_pytorch/pytorch_base.py
SGeetansh/dffml
04647bdcadef2f7e7b59cdd8ac1e89f17ef1095b
[ "MIT" ]
1
2020-05-06T19:07:02.000Z
2020-05-06T19:07:02.000Z
import os import pathlib from typing import Any, Tuple, AsyncIterator, List, Type, Dict import copy import time import torch import torch.optim as optim from torch.optim import lr_scheduler import numpy as np from dffml.record import Record from dffml.model.accuracy import Accuracy from dffml.base import config, fie...
35.605839
93
0.549747
import os import pathlib from typing import Any, Tuple, AsyncIterator, List, Type, Dict import copy import time import torch import torch.optim as optim from torch.optim import lr_scheduler import numpy as np from dffml.record import Record from dffml.model.accuracy import Accuracy from dffml.base import config, fie...
true
true
f7f79c6d2bf9bc408cdf7d41a9398a5b9215ea41
382
py
Python
uniborg/__init__.py
Deepumad77/CartoonBot
eff24f40043e41feadc70a63fa655353c1783ee0
[ "Apache-2.0" ]
2
2019-10-23T12:30:32.000Z
2019-10-23T20:33:26.000Z
uniborg/__init__.py
Deepumad77/CartoonBot
eff24f40043e41feadc70a63fa655353c1783ee0
[ "Apache-2.0" ]
null
null
null
uniborg/__init__.py
Deepumad77/CartoonBot
eff24f40043e41feadc70a63fa655353c1783ee0
[ "Apache-2.0" ]
12
2019-10-25T18:48:16.000Z
2020-04-26T11:31:21.000Z
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from .uniborg import * from sample_config import Config # add modules to this list MODULE = [] # add syntax to this dic...
27.285714
69
0.730366
from .uniborg import * from sample_config import Config MODULE = [] SYNTAX = {} BUILD = "USER-43x01"
true
true
f7f79d6672610da6c279ab9bb7489aafbe904bfb
760
py
Python
Tools/collect_entropy.py
ElielGez/Malicious_URL_zdm_new_features_lee_eliel
04935b5b1b280906d684be36977151d89a09b4c6
[ "MIT" ]
null
null
null
Tools/collect_entropy.py
ElielGez/Malicious_URL_zdm_new_features_lee_eliel
04935b5b1b280906d684be36977151d89a09b4c6
[ "MIT" ]
null
null
null
Tools/collect_entropy.py
ElielGez/Malicious_URL_zdm_new_features_lee_eliel
04935b5b1b280906d684be36977151d89a09b4c6
[ "MIT" ]
null
null
null
import pandas as pd from collections import defaultdict from urllib.parse import urlparse import math df = pd.read_csv('Final_newData_withFeatures.csv') urls = df['0'] entropies = [] for index, url in enumerate(urls): domain="" if url[:4] == 'http': domain = urlparse(url).netloc else: ...
22.352941
50
0.614474
import pandas as pd from collections import defaultdict from urllib.parse import urlparse import math df = pd.read_csv('Final_newData_withFeatures.csv') urls = df['0'] entropies = [] for index, url in enumerate(urls): domain="" if url[:4] == 'http': domain = urlparse(url).netloc else: ...
true
true
f7f79e6a898811403fa0a855310783e6325c6aa8
43,283
py
Python
alpha_pipe/analyzer/utils.py
gayhub-wpp/alpha_pipe_oldversion
877047442ae939df3f15611d48ea2df1476a940c
[ "MIT" ]
null
null
null
alpha_pipe/analyzer/utils.py
gayhub-wpp/alpha_pipe_oldversion
877047442ae939df3f15611d48ea2df1476a940c
[ "MIT" ]
null
null
null
alpha_pipe/analyzer/utils.py
gayhub-wpp/alpha_pipe_oldversion
877047442ae939df3f15611d48ea2df1476a940c
[ "MIT" ]
1
2021-11-10T22:28:20.000Z
2021-11-10T22:28:20.000Z
from numpy import sqrt, mean from collections import Iterable from functools import wraps import six import pandas as pd import numpy as np import re import warnings from IPython.display import display from pandas.tseries.offsets import CustomBusinessDay, Day, BusinessDay from scipy.stats import mode class NonMatchi...
39.383985
85
0.575676
from numpy import sqrt, mean from collections import Iterable from functools import wraps import six import pandas as pd import numpy as np import re import warnings from IPython.display import display from pandas.tseries.offsets import CustomBusinessDay, Day, BusinessDay from scipy.stats import mode class NonMatchi...
true
true
f7f79e9cc8edc20a07d9051c0fa5faebcbee7370
1,091
py
Python
tests/test_data_factory.py
ExesiosPB/libm
09c2638d895a4ba69e0d7f4f0e353f27d4b7911f
[ "MIT" ]
null
null
null
tests/test_data_factory.py
ExesiosPB/libm
09c2638d895a4ba69e0d7f4f0e353f27d4b7911f
[ "MIT" ]
null
null
null
tests/test_data_factory.py
ExesiosPB/libm
09c2638d895a4ba69e0d7f4f0e353f27d4b7911f
[ "MIT" ]
null
null
null
import unittest import pandas as pd from scripts import FilePaths from scripts import data_factory as factory class TestDataFactory(unittest.TestCase): def setUp(self): self.__df = pd.read_pickle(FilePaths.us_patents_random_100_pickle_name) self.__df = self.__df.reset_index() def test_read...
31.171429
79
0.688359
import unittest import pandas as pd from scripts import FilePaths from scripts import data_factory as factory class TestDataFactory(unittest.TestCase): def setUp(self): self.__df = pd.read_pickle(FilePaths.us_patents_random_100_pickle_name) self.__df = self.__df.reset_index() def test_read...
true
true
f7f79f95cbd38e510a8f764251792ea664f48379
12,719
py
Python
cubedash/summary/_model.py
andrewdhicks/datacube-explorer
e372da5b697e57113deb239edc52411f5ddad551
[ "Apache-2.0" ]
null
null
null
cubedash/summary/_model.py
andrewdhicks/datacube-explorer
e372da5b697e57113deb239edc52411f5ddad551
[ "Apache-2.0" ]
null
null
null
cubedash/summary/_model.py
andrewdhicks/datacube-explorer
e372da5b697e57113deb239edc52411f5ddad551
[ "Apache-2.0" ]
null
null
null
import warnings from collections import Counter from dataclasses import dataclass from datetime import datetime, date from typing import Iterable, Optional, Set, Tuple, Union, List import shapely import shapely.ops import structlog from shapely.geometry import MultiPolygon from shapely.geometry.base import BaseGeometr...
34.375676
101
0.610425
import warnings from collections import Counter from dataclasses import dataclass from datetime import datetime, date from typing import Iterable, Optional, Set, Tuple, Union, List import shapely import shapely.ops import structlog from shapely.geometry import MultiPolygon from shapely.geometry.base import BaseGeometr...
true
true
f7f7a0b5415aa14c33a4a2155512edd84fb8bdb7
2,802
py
Python
chat_app/chat_server/server_client.py
obin1000/chatapp-computer-networks
5d8380ac594683f873e10362a4f6351731147912
[ "MIT" ]
null
null
null
chat_app/chat_server/server_client.py
obin1000/chatapp-computer-networks
5d8380ac594683f873e10362a4f6351731147912
[ "MIT" ]
null
null
null
chat_app/chat_server/server_client.py
obin1000/chatapp-computer-networks
5d8380ac594683f873e10362a4f6351731147912
[ "MIT" ]
null
null
null
import threading from time import sleep import protocol class ServerClient: CLIENT_POLL_INTERVAL = 0.1 RECEIVE_SIZE = 1024 def __init__(self, client_connection, address=None, username=None): print('Created user from {} name: {}'.format(address, username)) self.client_connection = client_c...
26.942308
90
0.584226
import threading from time import sleep import protocol class ServerClient: CLIENT_POLL_INTERVAL = 0.1 RECEIVE_SIZE = 1024 def __init__(self, client_connection, address=None, username=None): print('Created user from {} name: {}'.format(address, username)) self.client_connection = client_c...
true
true
f7f7a1abfcbbaf7f0908158ea48ceb031c503902
947
py
Python
access_spotify.py
x-meienberg/smartspot
af49d55f32c6135bab22c012c8889ae54a7da665
[ "MIT" ]
1
2020-12-28T20:28:58.000Z
2020-12-28T20:28:58.000Z
access_spotify.py
x-meienberg/smartspot
af49d55f32c6135bab22c012c8889ae54a7da665
[ "MIT" ]
null
null
null
access_spotify.py
x-meienberg/smartspot
af49d55f32c6135bab22c012c8889ae54a7da665
[ "MIT" ]
null
null
null
import json import requests import config CLIENT_ID = config.client_id CLIENT_Secret = config.client_secret AUTH_URL = 'https://accounts.spotify.com/api/token' auth_response = requests.post(AUTH_URL, { 'grant_type': 'client_credentials', 'client_id': CLIENT_ID, 'client_secret': CLIENT_Secret, }) #conv...
18.568627
76
0.721225
import json import requests import config CLIENT_ID = config.client_id CLIENT_Secret = config.client_secret AUTH_URL = 'https://accounts.spotify.com/api/token' auth_response = requests.post(AUTH_URL, { 'grant_type': 'client_credentials', 'client_id': CLIENT_ID, 'client_secret': CLIENT_Secret, }) auth...
true
true
f7f7a2733eceb3fa4f3b81a247461b24cd349fd5
7,988
py
Python
modules/dashboard/course_settings.py
esacosta/u-mooc
8d9a1427c988121e12dd6e2f7c8835f0e561c507
[ "Apache-2.0" ]
1
2015-10-06T14:01:44.000Z
2015-10-06T14:01:44.000Z
modules/dashboard/course_settings.py
esacosta/u-mooc
8d9a1427c988121e12dd6e2f7c8835f0e561c507
[ "Apache-2.0" ]
null
null
null
modules/dashboard/course_settings.py
esacosta/u-mooc
8d9a1427c988121e12dd6e2f7c8835f0e561c507
[ "Apache-2.0" ]
null
null
null
# Copyright 2012 Google 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 applicable law or ...
34.882096
80
0.660491
__author__ = 'Abhinav Khandelwal (abhinavk@google.com)' from controllers.utils import ApplicationHandler from controllers.utils import BaseRESTHandler from controllers.utils import XsrfTokenManager from models import courses from models import roles from models import transforms from models import vfs f...
true
true
f7f7a2eacb247a6c8327c5cd6f0688dd6e99dd59
871
py
Python
leetcode/1587-parallel-courses-ii.py
Magic07/online-judge-solutions
02a289dd7eb52d7eafabc97bd1a043213b65f70a
[ "MIT" ]
null
null
null
leetcode/1587-parallel-courses-ii.py
Magic07/online-judge-solutions
02a289dd7eb52d7eafabc97bd1a043213b65f70a
[ "MIT" ]
null
null
null
leetcode/1587-parallel-courses-ii.py
Magic07/online-judge-solutions
02a289dd7eb52d7eafabc97bd1a043213b65f70a
[ "MIT" ]
null
null
null
class Solution: def minNumberOfSemesters(self, n: int, dependencies: List[List[int]], k: int) -> int: deps=[0]*(n) for x,y in dependencies: deps[y-1]+=1<<(x-1) finished=[sys.maxsize]*(1<<(n)) # finished[i] is the semester when i is took. finished[0]=0 ...
39.590909
110
0.495982
class Solution: def minNumberOfSemesters(self, n: int, dependencies: List[List[int]], k: int) -> int: deps=[0]*(n) for x,y in dependencies: deps[y-1]+=1<<(x-1) finished=[sys.maxsize]*(1<<(n)) finished[0]=0 for i in range(1<<n): canTa...
true
true
f7f7a301377778c0d5e9a9630668a85ad4e79b4d
534
py
Python
src/app.py
joscelino/Preparacao_Ambiente_Python
00421de0b998df0bc351b9107c6e2dda4a2a4256
[ "MIT" ]
null
null
null
src/app.py
joscelino/Preparacao_Ambiente_Python
00421de0b998df0bc351b9107c6e2dda4a2a4256
[ "MIT" ]
null
null
null
src/app.py
joscelino/Preparacao_Ambiente_Python
00421de0b998df0bc351b9107c6e2dda4a2a4256
[ "MIT" ]
null
null
null
from functools import lru_cache from typing import Union @lru_cache def soma( valor_1: Union[str, int, float], valor_2: Union[str, int, float] ) -> Union[str, int, float]: """Sum two values. :param - valor_1: first value - valor_2: second value :return - Sum of valor_1 and valor_2 only ...
23.217391
68
0.700375
from functools import lru_cache from typing import Union @lru_cache def soma( valor_1: Union[str, int, float], valor_2: Union[str, int, float] ) -> Union[str, int, float]: soma_dois_valores = valor_1 + valor_2 return soma_dois_valores SOMA_DOIS_NUMEROS = soma(1, 2.0524899927999035) SOMA_DUAS_STRINGS = s...
true
true
f7f7a36f4fe281b308c2322de6e9cae91ef74558
4,188
py
Python
scrapers/city24_scraper.py
Zims/scraping-flask-sample
083a4cf142d26bd40c807b718dcbabae2efd3cb2
[ "MIT" ]
null
null
null
scrapers/city24_scraper.py
Zims/scraping-flask-sample
083a4cf142d26bd40c807b718dcbabae2efd3cb2
[ "MIT" ]
null
null
null
scrapers/city24_scraper.py
Zims/scraping-flask-sample
083a4cf142d26bd40c807b718dcbabae2efd3cb2
[ "MIT" ]
null
null
null
from bs4 import BeautifulSoup import requests import pandas as pd import time from datetime import datetime, timezone, timedelta import pytz tz=pytz.timezone("Europe/Riga") time_now = datetime.now(tz) format = "%Y-%m-%d-%T" time_now = time_now.strftime(format) time_now = time_now def refresh_time_24(): tz=pytz.ti...
31.253731
141
0.546323
from bs4 import BeautifulSoup import requests import pandas as pd import time from datetime import datetime, timezone, timedelta import pytz tz=pytz.timezone("Europe/Riga") time_now = datetime.now(tz) format = "%Y-%m-%d-%T" time_now = time_now.strftime(format) time_now = time_now def refresh_time_24(): tz=pytz.ti...
true
true
f7f7a5047a23fc341997bb30139e2e4812285af7
2,050
py
Python
tests/validator20/validate_spec_url_test.py
stevesimmons/swagger_spec_validator
219dd57fb4480d789b3ad381f69c1e9e03f926b7
[ "Apache-2.0" ]
100
2015-01-22T17:37:32.000Z
2021-11-08T10:29:56.000Z
tests/validator20/validate_spec_url_test.py
stevesimmons/swagger_spec_validator
219dd57fb4480d789b3ad381f69c1e9e03f926b7
[ "Apache-2.0" ]
144
2015-01-21T21:03:14.000Z
2022-01-05T11:51:28.000Z
tests/validator20/validate_spec_url_test.py
stevesimmons/swagger_spec_validator
219dd57fb4480d789b3ad381f69c1e9e03f926b7
[ "Apache-2.0" ]
81
2015-01-15T21:47:35.000Z
2021-09-30T08:55:08.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import json import os import mock import pytest from swagger_spec_validator.common import get_uri_from_file_path from swagger_spec_validator.com...
34.166667
116
0.76878
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import json import os import mock import pytest from swagger_spec_validator.common import get_uri_from_file_path from swagger_spec_validator.common import SwaggerValid...
true
true
f7f7a7265f767b1ad1ebccf9838920c4239004cf
1,067
py
Python
backend/utils/test_data.py
HarishGuragol/Hack-eye-need-a-break
b116a80665692ab09f3fd54a9ae5bd5f2ba45b39
[ "MIT" ]
null
null
null
backend/utils/test_data.py
HarishGuragol/Hack-eye-need-a-break
b116a80665692ab09f3fd54a9ae5bd5f2ba45b39
[ "MIT" ]
null
null
null
backend/utils/test_data.py
HarishGuragol/Hack-eye-need-a-break
b116a80665692ab09f3fd54a9ae5bd5f2ba45b39
[ "MIT" ]
null
null
null
import random import time from backend.session import create_session from backend.utils.utils import create_new_user, add_eye_data, get_sensitivity_by_user_id, set_sensitivity, \ create_new_sensitivity from db.models import User def add_test_data(): test_user = { "first_name": "test_first_name", ...
30.485714
109
0.632615
import random import time from backend.session import create_session from backend.utils.utils import create_new_user, add_eye_data, get_sensitivity_by_user_id, set_sensitivity, \ create_new_sensitivity from db.models import User def add_test_data(): test_user = { "first_name": "test_first_name", ...
true
true
f7f7a7529d5591095ecdb29fc0db665d836f67b4
17,817
py
Python
tensorflow_/tensorflowcv/models/mnasnet.py
raijinspecial/imgclsmob
c5d3ab207a6304f1343e4394f0467bdc7403a72a
[ "MIT" ]
null
null
null
tensorflow_/tensorflowcv/models/mnasnet.py
raijinspecial/imgclsmob
c5d3ab207a6304f1343e4394f0467bdc7403a72a
[ "MIT" ]
null
null
null
tensorflow_/tensorflowcv/models/mnasnet.py
raijinspecial/imgclsmob
c5d3ab207a6304f1343e4394f0467bdc7403a72a
[ "MIT" ]
null
null
null
""" MnasNet, implemented in TensorFlow. Original paper: 'MnasNet: Platform-Aware Neural Architecture Search for Mobile,' https://arxiv.org/abs/1807.11626. """ __all__ = ['MnasNet', 'mnasnet'] import os import tensorflow as tf from .common import conv2d, batchnorm, is_channels_first, flatten def conv_block(x...
30.096284
118
0.583488
__all__ = ['MnasNet', 'mnasnet'] import os import tensorflow as tf from .common import conv2d, batchnorm, is_channels_first, flatten def conv_block(x, in_channels, out_channels, kernel_size, strides, padding, groups, ...
true
true
f7f7a76c33fcb73ee049e769903859264f14581a
4,019
py
Python
person_detector.py
JTZ18/auto-tinder
c1d0795a402fa6c10d625d3b283597eb6b25c06b
[ "MIT" ]
1
2022-01-19T16:27:49.000Z
2022-01-19T16:27:49.000Z
person_detector.py
JTZ18/auto-tinder
c1d0795a402fa6c10d625d3b283597eb6b25c06b
[ "MIT" ]
8
2020-09-25T21:38:04.000Z
2022-03-12T00:14:36.000Z
person_detector.py
JTZ18/auto-tinder
c1d0795a402fa6c10d625d3b283597eb6b25c06b
[ "MIT" ]
null
null
null
import numpy as np import tensorflow as tf from object_detection.utils import ops as utils_ops from PIL import Image PERSON_CLASS = 1 SCORE_THRESHOLD = 0.5 def run_inference_for_single_image(image, sess): ops = tf.compat.v1.get_default_graph().get_operations() all_tensor_names = {output.name for op in ops f...
42.755319
116
0.690719
import numpy as np import tensorflow as tf from object_detection.utils import ops as utils_ops from PIL import Image PERSON_CLASS = 1 SCORE_THRESHOLD = 0.5 def run_inference_for_single_image(image, sess): ops = tf.compat.v1.get_default_graph().get_operations() all_tensor_names = {output.name for op in ops f...
true
true
f7f7a79db784675cf5ffbb21327bc3d4b5263a8d
3,375
py
Python
admin_kit/fields.py
mouryavenkat/django-admin-kit
d8a95967768c425021a3c864453a1f526f72f659
[ "MIT" ]
null
null
null
admin_kit/fields.py
mouryavenkat/django-admin-kit
d8a95967768c425021a3c864453a1f526f72f659
[ "MIT" ]
null
null
null
admin_kit/fields.py
mouryavenkat/django-admin-kit
d8a95967768c425021a3c864453a1f526f72f659
[ "MIT" ]
null
null
null
""" Admin Kit Fields module """ import json from django import forms from .widgets import SelectWidget, SelectMultipleWidget __all__ = ['BaseField', 'MultiSelectField', 'SelectField'] class BaseField(forms.Field): """ The Base Field for form fields """ def __init__(self, kit_config=None, ajax_...
30.405405
75
0.614519
import json from django import forms from .widgets import SelectWidget, SelectMultipleWidget __all__ = ['BaseField', 'MultiSelectField', 'SelectField'] class BaseField(forms.Field): def __init__(self, kit_config=None, ajax_source=None, ajax_target=None, ajax_subscribe=None, default_value=None, ...
true
true
f7f7a7f87818cb6fde7688392f6d9e35e32414b9
1,246
py
Python
mayan/apps/tags/migrations/0002_tag_selection.py
sophiawa/Mayan-EDMS
42f20576d0c690b645a60bf53c5169cda4264231
[ "Apache-2.0" ]
null
null
null
mayan/apps/tags/migrations/0002_tag_selection.py
sophiawa/Mayan-EDMS
42f20576d0c690b645a60bf53c5169cda4264231
[ "Apache-2.0" ]
10
2021-03-19T23:48:12.000Z
2022-03-12T00:41:49.000Z
mayan/apps/tags/migrations/0002_tag_selection.py
sophiawa/Mayan-EDMS
42f20576d0c690b645a60bf53c5169cda4264231
[ "Apache-2.0" ]
1
2020-12-17T02:35:09.000Z
2020-12-17T02:35:09.000Z
from django.db import migrations import colorful.fields COLOR_BLUE = 'blu' COLOR_CORAL = 'crl' COLOR_CYAN = 'cya' COLOR_GREENYELLOW = 'gry' COLOR_KHAKI = 'kki' COLOR_LIGHTGREY = 'lig' COLOR_MAGENTA = 'mag' COLOR_ORANGE = 'org' COLOR_RED = 'red' COLOR_YELLOW = 'yel' RGB_VALUES = { COLOR_BLUE: '#0000ff', COLO...
23.509434
72
0.655698
from django.db import migrations import colorful.fields COLOR_BLUE = 'blu' COLOR_CORAL = 'crl' COLOR_CYAN = 'cya' COLOR_GREENYELLOW = 'gry' COLOR_KHAKI = 'kki' COLOR_LIGHTGREY = 'lig' COLOR_MAGENTA = 'mag' COLOR_ORANGE = 'org' COLOR_RED = 'red' COLOR_YELLOW = 'yel' RGB_VALUES = { COLOR_BLUE: '#0000ff', COLO...
true
true
f7f7a9a700223d6ac211496fd0831a78e185f259
21,098
py
Python
main.py
Milenium-Cr/txt-casino
2fd2072bb91a10f0589686de56d09dce1ba3d27a
[ "MIT" ]
1
2020-09-08T15:45:39.000Z
2020-09-08T15:45:39.000Z
main.py
Milenium-Cr/txt-casino
2fd2072bb91a10f0589686de56d09dce1ba3d27a
[ "MIT" ]
null
null
null
main.py
Milenium-Cr/txt-casino
2fd2072bb91a10f0589686de56d09dce1ba3d27a
[ "MIT" ]
3
2020-08-28T15:06:40.000Z
2021-04-24T14:33:29.000Z
import pickle import os.path from random import randint, choice """ * Хранилище в файле * В настройки "автосохранение" * Статус банка и хранилища в файле """ lvlupcost = [25, 30, 35, 40] statesfile = "playerinfo.data" checkfile = os.path.exists(f'{statesfile}') if checkfile: with open(statesfile, 'rb') as f: ...
36.250859
163
0.45227
import pickle import os.path from random import randint, choice """ * Хранилище в файле * В настройки "автосохранение" * Статус банка и хранилища в файле """ lvlupcost = [25, 30, 35, 40] statesfile = "playerinfo.data" checkfile = os.path.exists(f'{statesfile}') if checkfile: with open(statesfile, 'rb') as f: ...
false
true
f7f7aa0f1bc1ebfeadf551d5ef1d5c3352afdd11
26,515
py
Python
kartothek/core/common_metadata.py
jorisvandenbossche/kartothek
18b11e7b060bb778668ffc4e2f468910120e6385
[ "MIT" ]
2
2019-05-29T09:45:20.000Z
2019-06-24T19:06:46.000Z
kartothek/core/common_metadata.py
jorisvandenbossche/kartothek
18b11e7b060bb778668ffc4e2f468910120e6385
[ "MIT" ]
18
2019-11-15T15:33:53.000Z
2022-03-04T02:08:18.000Z
kartothek/core/common_metadata.py
jorisvandenbossche/kartothek
18b11e7b060bb778668ffc4e2f468910120e6385
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import difflib import logging import pprint from copy import copy, deepcopy from functools import reduce from typing import Set, Union import pandas as pd import pyarrow as pa import pyarrow.parquet as pq import simplejson from simplekv import KeyValueStore from kartothek.core import naming ...
34.660131
119
0.640053
import difflib import logging import pprint from copy import copy, deepcopy from functools import reduce from typing import Set, Union import pandas as pd import pyarrow as pa import pyarrow.parquet as pq import simplejson from simplekv import KeyValueStore from kartothek.core import naming from kartothek.core._co...
true
true
f7f7aa16dacecd157f0228746943b4649aac647b
578
py
Python
graphgallery/nn/layers/pytorch/conv/__init__.py
dongzizhu/GraphGallery
c65eab42daeb52de5019609fe7b368e30863b4ae
[ "MIT" ]
1
2020-07-29T08:00:32.000Z
2020-07-29T08:00:32.000Z
graphgallery/nn/layers/pytorch/conv/__init__.py
dongzizhu/GraphGallery
c65eab42daeb52de5019609fe7b368e30863b4ae
[ "MIT" ]
null
null
null
graphgallery/nn/layers/pytorch/conv/__init__.py
dongzizhu/GraphGallery
c65eab42daeb52de5019609fe7b368e30863b4ae
[ "MIT" ]
null
null
null
from .gcn import GCNConv from .gat import GATConv, SparseGATConv from .sgc import SGConv from .trainable_sgc import TrainableSGConv from .median import MedianConv, TrimmedConv from .dagnn import DAGNNConv from .tagcn import TAGConv from .appnp import APPNProp, PPNProp from .graphsage import SAGEAggregator from...
34
62
0.813149
from .gcn import GCNConv from .gat import GATConv, SparseGATConv from .sgc import SGConv from .trainable_sgc import TrainableSGConv from .median import MedianConv, TrimmedConv from .dagnn import DAGNNConv from .tagcn import TAGConv from .appnp import APPNProp, PPNProp from .graphsage import SAGEAggregator from...
true
true
f7f7aad936027802f617d577d9b3de2bc65ea57d
2,434
py
Python
benchmark/net/facenet_predictor.py
kknet/imalookalike
fe5ec3cb786b0e13e5260705f1c4251bfa028a04
[ "Apache-2.0" ]
null
null
null
benchmark/net/facenet_predictor.py
kknet/imalookalike
fe5ec3cb786b0e13e5260705f1c4251bfa028a04
[ "Apache-2.0" ]
6
2020-01-28T22:43:09.000Z
2022-02-10T00:15:35.000Z
benchmark/net/facenet_predictor.py
slawiko/imalookalike
ca0917bbc24b74d560ebe5b83dd882a6683abddf
[ "Apache-2.0" ]
1
2019-10-29T02:38:49.000Z
2019-10-29T02:38:49.000Z
import tensorflow as tf import benchmark.net.facenet.facenet as facenet from benchmark.net.facenet import detect_face import cv2 import numpy as np # some constants kept as default from facenet minsize = 20 threshold = [0.6, 0.7, 0.7] factor = 0.709 margin = 44 input_image_size = 160 sess = None images_placeholder =...
31.205128
106
0.668858
import tensorflow as tf import benchmark.net.facenet.facenet as facenet from benchmark.net.facenet import detect_face import cv2 import numpy as np minsize = 20 threshold = [0.6, 0.7, 0.7] factor = 0.709 margin = 44 input_image_size = 160 sess = None images_placeholder = None embeddings = None phase_train_placehold...
true
true
f7f7acc9c0d6d80919d440cfbd03025d7bc7fb0d
259
py
Python
fython/test/importpec_py/py_star_import_test.py
nicolasessisbreton/fython
988f5a94cee8b16b0000501a22239195c73424a1
[ "Apache-2.0" ]
41
2016-01-21T05:14:45.000Z
2021-11-24T20:37:21.000Z
fython/test/importpec_py/py_star_import_test.py
nicolasessisbreton/fython
988f5a94cee8b16b0000501a22239195c73424a1
[ "Apache-2.0" ]
5
2016-01-21T05:36:37.000Z
2016-08-22T19:26:51.000Z
fython/test/importpec_py/py_star_import_test.py
nicolasessisbreton/fython
988f5a94cee8b16b0000501a22239195c73424a1
[ "Apache-2.0" ]
3
2016-01-23T04:03:44.000Z
2016-08-21T15:58:38.000Z
s=""" .a.py x = 10 .b.fy import .a(*) int x = |x| print 'in b {:x}' """ from fython.test import * shell('rm -rf a/ a.* b.*') writer(s) w = load('.b', force=1, release=1, verbose=0, run_main=0) # print(open(w.module.url.fortran_path, 'r').read())
11.26087
57
0.552124
s=""" .a.py x = 10 .b.fy import .a(*) int x = |x| print 'in b {:x}' """ from fython.test import * shell('rm -rf a/ a.* b.*') writer(s) w = load('.b', force=1, release=1, verbose=0, run_main=0)
true
true
f7f7ad241e054510143a9aaabf60dcfad76851d3
2,052
py
Python
restler/engine/core/fuzzer.py
Ayudjj/mvp
a0ba706a2156e31cf6053b639b57aa1b9acad442
[ "MIT" ]
1
2021-01-21T07:36:34.000Z
2021-01-21T07:36:34.000Z
restler/engine/core/fuzzer.py
Ayudjj/mvp
a0ba706a2156e31cf6053b639b57aa1b9acad442
[ "MIT" ]
1
2021-03-30T02:53:04.000Z
2021-03-30T22:39:03.000Z
restler/engine/core/fuzzer.py
Ayudjj/mvp
a0ba706a2156e31cf6053b639b57aa1b9acad442
[ "MIT" ]
1
2021-01-21T07:36:37.000Z
2021-01-21T07:36:37.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import threading import engine.core.driver as driver import utils.logger as logger from engine.core.fuzzing_monitor import Monitor from engine.core.requests import GrammarRequestCollection from engine.errors import InvalidDictionaryException c...
31.090909
76
0.659357
import threading import engine.core.driver as driver import utils.logger as logger from engine.core.fuzzing_monitor import Monitor from engine.core.requests import GrammarRequestCollection from engine.errors import InvalidDictionaryException class FuzzingThread(threading.Thread): def __init__(self, fuzzing_re...
true
true
f7f7ad72a31fa302e6d2ff757b829493b6194f5e
3,204
py
Python
bin/ExtractSimulatedChimericRead4Retrain.py
XiDsLab/scFusion
0398a12272683b84c712903eb1453ab058e6862f
[ "MIT" ]
7
2021-08-21T05:54:12.000Z
2022-03-14T07:24:08.000Z
bin/ExtractSimulatedChimericRead4Retrain.py
XiDsLab/scFusion
0398a12272683b84c712903eb1453ab058e6862f
[ "MIT" ]
3
2021-05-29T11:12:38.000Z
2021-09-22T06:25:22.000Z
bin/ExtractSimulatedChimericRead4Retrain.py
ZijieJin/scFusion
13beb881fd5cce096cfbd5ed436c28ccb43a57c9
[ "MIT" ]
4
2020-12-28T04:22:52.000Z
2021-05-30T05:17:01.000Z
from __future__ import print_function from __future__ import division import sys import random import os import pysam # ***** readme ***** # This code extracts chimeric read from sam file for training, with pos and direction # The input is *.sam def ReverseComplement(str): return str[::-1].replace('A', 't').repla...
32.04
105
0.504057
from __future__ import print_function from __future__ import division import sys import random import os import pysam def ReverseComplement(str): return str[::-1].replace('A', 't').replace('T', 'a').replace('G', 'c').replace('C', 'g').upper() chimericfile = open(sys.argv[1]) mappingpath = sys.argv[2] linenum...
true
true
f7f7ade5bf71d9623eeea934d95a5ee6ab2a8ac6
71
py
Python
quick_start/my_text_classifier/predictors/__init__.py
ramild/allennlp-guide
4cff916e7bc4629184bc70594e213ef56e14ec70
[ "MIT" ]
71
2020-06-06T03:12:44.000Z
2022-03-12T20:21:48.000Z
quick_start/my_text_classifier/predictors/__init__.py
ramild/allennlp-guide
4cff916e7bc4629184bc70594e213ef56e14ec70
[ "MIT" ]
50
2020-06-18T14:19:15.000Z
2022-03-28T07:04:16.000Z
quick_start/my_text_classifier/predictors/__init__.py
ramild/allennlp-guide
4cff916e7bc4629184bc70594e213ef56e14ec70
[ "MIT" ]
37
2020-06-05T19:08:44.000Z
2022-03-17T08:23:41.000Z
from .sentence_classifier_predictor import SentenceClassifierPredictor
35.5
70
0.929577
from .sentence_classifier_predictor import SentenceClassifierPredictor
true
true