hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
fc75cbaf0d7ddbeb46c63108a566a2e9b09f4dba
3,781
py
Python
src/models/predictor.py
pgniewko/solubility
cc3edbf97f474151aa8e1cf3994b2c13a00ae461
[ "BSD-3-Clause" ]
10
2019-10-06T02:24:29.000Z
2022-03-25T15:32:34.000Z
src/models/predictor.py
shekfeh/solubility
cc3edbf97f474151aa8e1cf3994b2c13a00ae461
[ "BSD-3-Clause" ]
1
2019-12-11T23:39:28.000Z
2019-12-11T23:39:28.000Z
src/models/predictor.py
shekfeh/solubility
cc3edbf97f474151aa8e1cf3994b2c13a00ae461
[ "BSD-3-Clause" ]
4
2021-02-24T05:04:55.000Z
2022-03-25T15:32:35.000Z
import logging from abc import ABC, abstractmethod import numpy as np from sklearn.metrics import mean_squared_error from sklearn.metrics import mean_absolute_error from sklearn.model_selection import KFold from scipy.stats import pearsonr import matplotlib.pyplot as plt class Predictor(ABC): """ TODO: "...
34.372727
88
0.600106
import logging from abc import ABC, abstractmethod import numpy as np from sklearn.metrics import mean_squared_error from sklearn.metrics import mean_absolute_error from sklearn.model_selection import KFold from scipy.stats import pearsonr import matplotlib.pyplot as plt class Predictor(ABC): """ TODO: "...
3,202
0
214
401baae6945a8dbb1239753759d3f6342dfaab25
5,894
py
Python
addons/openacademy/tests/test_openacademy.py
radchapoom1009/openacademy
7516da7697906a405d0d67a9bf8373860d1518d4
[ "MIT" ]
null
null
null
addons/openacademy/tests/test_openacademy.py
radchapoom1009/openacademy
7516da7697906a405d0d67a9bf8373860d1518d4
[ "MIT" ]
null
null
null
addons/openacademy/tests/test_openacademy.py
radchapoom1009/openacademy
7516da7697906a405d0d67a9bf8373860d1518d4
[ "MIT" ]
null
null
null
import pytest from odoo import exceptions from pytest_tr_odoo.fixtures import env from pytest_tr_odoo import utils @pytest.fixture @pytest.fixture @pytest.fixture @pytest.fixture ''' openacademy.openacademy ''' @pytest.mark.parametrize('test_input,expected', [ ({'first_name': 'Kyle', 'last_name': 'Bogan'...
33.68
78
0.60112
import pytest from odoo import exceptions from pytest_tr_odoo.fixtures import env from pytest_tr_odoo import utils @pytest.fixture def openacademy_model(env): return env['openacademy.openacademy'] @pytest.fixture def session_model(env): return env['openacademy.session'] @pytest.fixture def session(session...
2,017
0
242
6ad9628195a450b435a1a3d6b4dd609311782467
1,132
py
Python
applications/migrations/0005_tshirtorder.py
hoohacks/HackX
9d05268b4b075211048a8c727037e7807d476376
[ "MIT" ]
5
2019-09-05T05:18:39.000Z
2021-12-29T08:47:27.000Z
applications/migrations/0005_tshirtorder.py
hoohacks/HackX
9d05268b4b075211048a8c727037e7807d476376
[ "MIT" ]
18
2019-10-30T05:04:27.000Z
2022-02-10T11:18:01.000Z
applications/migrations/0005_tshirtorder.py
hoohacks/HackX
9d05268b4b075211048a8c727037e7807d476376
[ "MIT" ]
4
2019-11-09T02:52:53.000Z
2020-05-04T08:04:32.000Z
# Generated by Django 2.2.8 on 2020-04-13 03:44 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
37.733333
156
0.607774
# Generated by Django 2.2.8 on 2020-04-13 03:44 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('users', '0014_ticket_slack_ts'), ('applications', '0004_application_mlh_consent'), ...
0
952
23
c88568a63008aa9674f9b8dc544cb2e6da6606af
122
py
Python
old/fundamentus/__init__.py
mv/fundamentus-api
3d12be9613b8310afb48771a22d5b494e1817e28
[ "MIT" ]
12
2021-01-20T12:02:05.000Z
2022-03-24T14:22:48.000Z
old/fundamentus/__init__.py
mv/fundamentus
43d345dc3c461101e6899fb0b6e28e7615286a9f
[ "MIT" ]
62
2021-01-16T21:44:44.000Z
2022-03-18T08:10:24.000Z
old/fundamentus/__init__.py
mv/fundamentus
43d345dc3c461101e6899fb0b6e28e7615286a9f
[ "MIT" ]
6
2021-04-29T19:45:31.000Z
2022-03-16T14:27:52.000Z
__all__ = ['get_fundamentus','print_csv'] from fundamentus import get_fundamentus from fundamentus import print_csv
15.25
41
0.795082
__all__ = ['get_fundamentus','print_csv'] from fundamentus import get_fundamentus from fundamentus import print_csv
0
0
0
9168cc8b8ae166eb1d9652010df1d2ff5b5e78ad
4,308
py
Python
cibyl/sources/zuul/api.py
amolkahat/cibyl
586c3c0a6b21a8f1b71db0c5b29e7d60f9cf0def
[ "Apache-2.0" ]
null
null
null
cibyl/sources/zuul/api.py
amolkahat/cibyl
586c3c0a6b21a8f1b71db0c5b29e7d60f9cf0def
[ "Apache-2.0" ]
null
null
null
cibyl/sources/zuul/api.py
amolkahat/cibyl
586c3c0a6b21a8f1b71db0c5b29e7d60f9cf0def
[ "Apache-2.0" ]
null
null
null
""" # Copyright 2022 Red Hat # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
29.108108
79
0.627205
""" # Copyright 2022 Red Hat # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
0
0
0
7c2fea003b45be32d55da3d4eb17d104b5ac3b18
3,264
py
Python
main.py
alexander-g/Root-Detector
cc7af00d204a294ed967bbaab55c03e6a9a15bcc
[ "MIT" ]
1
2022-02-17T16:18:00.000Z
2022-02-17T16:18:00.000Z
main.py
ExPlEcoGreifswald/Root-Detector
cc7af00d204a294ed967bbaab55c03e6a9a15bcc
[ "MIT" ]
null
null
null
main.py
ExPlEcoGreifswald/Root-Detector
cc7af00d204a294ed967bbaab55c03e6a9a15bcc
[ "MIT" ]
null
null
null
import webbrowser, os, tempfile, io, sys, time import glob, shutil import warnings warnings.simplefilter('ignore') import flask from flask import Flask, escape, request import processing #need to import all the packages here in the main file because of dill-ed ipython model import tensorflow as tf import...
30.792453
97
0.672794
import webbrowser, os, tempfile, io, sys, time import glob, shutil import warnings warnings.simplefilter('ignore') import flask from flask import Flask, escape, request import processing #need to import all the packages here in the main file because of dill-ed ipython model import tensorflow as tf import...
1,213
0
184
c3c4e160f8c3532ab54b6f59cad341eff94860f9
33,385
py
Python
vilya/models/project.py
ochukai/code
4865a7e5ee6b42f26fd29c350a2e50d7636a6462
[ "BSD-3-Clause" ]
null
null
null
vilya/models/project.py
ochukai/code
4865a7e5ee6b42f26fd29c350a2e50d7636a6462
[ "BSD-3-Clause" ]
null
null
null
vilya/models/project.py
ochukai/code
4865a7e5ee6b42f26fd29c350a2e50d7636a6462
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import import os import shutil import logging import re from datetime import datetime from vilya.config import DOMAIN, DEVELOP_MODE from vilya.libs import gyt from vilya.libs.permdir import get_repo_root from vilya.libs.text import format_md_or_rst from vilya.lib...
34.170931
79
0.587479
# -*- coding: utf-8 -*- from __future__ import absolute_import import os import shutil import logging import re from datetime import datetime from vilya.config import DOMAIN, DEVELOP_MODE from vilya.libs import gyt from vilya.libs.permdir import get_repo_root from vilya.libs.text import format_md_or_rst from vilya.lib...
26,776
4,950
23
fc26a6143130ea089dd5fa566469d93b221e0392
1,410
py
Python
release/scripts/addons_contrib/data_overrides/__init__.py
noorbeast/BlenderSource
65ebecc5108388965678b04b43463b85f6c69c1d
[ "Naumen", "Condor-1.1", "MS-PL" ]
3
2019-09-16T10:29:19.000Z
2022-02-11T14:43:18.000Z
engine/2.80/scripts/addons_contrib/data_overrides/__init__.py
byteinc/Phasor
f7d23a489c2b4bcc3c1961ac955926484ff8b8d9
[ "Unlicense" ]
null
null
null
engine/2.80/scripts/addons_contrib/data_overrides/__init__.py
byteinc/Phasor
f7d23a489c2b4bcc3c1961ac955926484ff8b8d9
[ "Unlicense" ]
null
null
null
### BEGIN GPL LICENSE BLOCK ##### # # 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...
30
79
0.685106
### BEGIN GPL LICENSE BLOCK ##### # # 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...
78
0
46
c2a74c3d75b83ae19c04de00181ae230c6ab67e9
7,725
py
Python
lab2/zad4.py
vedrankolka/DU
531cf53b030bd9ef750bfcaea697535042249fe3
[ "Apache-2.0" ]
null
null
null
lab2/zad4.py
vedrankolka/DU
531cf53b030bd9ef750bfcaea697535042249fe3
[ "Apache-2.0" ]
null
null
null
lab2/zad4.py
vedrankolka/DU
531cf53b030bd9ef750bfcaea697535042249fe3
[ "Apache-2.0" ]
null
null
null
import torch from torch.utils import data import numpy as np import matplotlib.pyplot as plt import os import pickle from pathlib import Path import argparse import convolutional_model as cm import skimage as ski import math DATA_DIR = default_data_dir = Path(__file__).parent / 'data' / 'cifar-10-batches-py' im...
34.486607
115
0.659029
import torch from torch.utils import data import numpy as np import matplotlib.pyplot as plt import os import pickle from pathlib import Path import argparse import convolutional_model as cm import skimage as ski import math def shuffle_data(data_x, data_y): indices = np.arange(data_x.shape[0]) np.random.shuffle(...
4,154
0
138
d004abc9f0360b5abe7791995600ba3e14457e3f
670
py
Python
schoolport/app_core/migrations/0007_tb_param_fees.py
yotink522/schoolport
c6cfd0230ca05fb44f77c2f27c7e200828547bd5
[ "MIT" ]
null
null
null
schoolport/app_core/migrations/0007_tb_param_fees.py
yotink522/schoolport
c6cfd0230ca05fb44f77c2f27c7e200828547bd5
[ "MIT" ]
null
null
null
schoolport/app_core/migrations/0007_tb_param_fees.py
yotink522/schoolport
c6cfd0230ca05fb44f77c2f27c7e200828547bd5
[ "MIT" ]
null
null
null
# Generated by Django 3.1.7 on 2021-05-07 11:20 from django.db import migrations, models
29.130435
114
0.589552
# Generated by Django 3.1.7 on 2021-05-07 11:20 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app_core', '0006_tb_param_items_price_unit'), ] operations = [ migrations.CreateModel( name='TB_Param_Fees', fields=...
0
556
23
75bb9561ab5c5fa328176c32ed78531d0f721459
535
py
Python
stackEx1.py
JaeGyu/PythonEx_1
e67053db6ca7431c3dd66351c190c53229e3f141
[ "MIT" ]
null
null
null
stackEx1.py
JaeGyu/PythonEx_1
e67053db6ca7431c3dd66351c190c53229e3f141
[ "MIT" ]
null
null
null
stackEx1.py
JaeGyu/PythonEx_1
e67053db6ca7431c3dd66351c190c53229e3f141
[ "MIT" ]
null
null
null
if __name__ == "__main__": s = Stack() s.push(1) s.push(2) print(s.top()) s.push(5) print(s.size()) print(s.toString()) s.pop() print(s.toString()) print(s.size())
16.71875
31
0.527103
class Stack(): def __init__(self): self.store = [] def push(self, num): self.store.append(num) def pop(self): return self.store.pop() def size(self): return len(self.store) def toString(self): return self.store def top(self): return self....
149
-7
188
5c8fb708a31f92aa30ed34d57058f849faa1abff
488
py
Python
S4/S4 Decompiler/Old Libraries/xdis/opcodes/opcode_23.py
NeonOcean/Environment
ca658cf66e8fd6866c22a4a0136d415705b36d26
[ "CC-BY-4.0" ]
1
2021-05-20T19:33:37.000Z
2021-05-20T19:33:37.000Z
S4/S4 Decompiler/Old Libraries/xdis/opcodes/opcode_23.py
NeonOcean/Environment
ca658cf66e8fd6866c22a4a0136d415705b36d26
[ "CC-BY-4.0" ]
null
null
null
S4/S4 Decompiler/Old Libraries/xdis/opcodes/opcode_23.py
NeonOcean/Environment
ca658cf66e8fd6866c22a4a0136d415705b36d26
[ "CC-BY-4.0" ]
null
null
null
# (C) Copyright 2017, 2019 by Rocky Bernstein """ CPython 2.3 bytecode opcodes This is a like Python 2.3's opcode.py with some classification of stack usage. """ import xdis.opcodes.opcode_2x as opcode_2x from xdis.opcodes.base import ( finalize_opcodes, format_extended_arg, init_opdata, update_pj2, )...
18.074074
62
0.741803
# (C) Copyright 2017, 2019 by Rocky Bernstein """ CPython 2.3 bytecode opcodes This is a like Python 2.3's opcode.py with some classification of stack usage. """ import xdis.opcodes.opcode_2x as opcode_2x from xdis.opcodes.base import ( finalize_opcodes, format_extended_arg, init_opdata, update_pj2, )...
0
0
0
7c5ff8d87f9e2145f480d8635186467fbfdbd46e
1,614
py
Python
main/dal.py
ifdog/ego
cee685c75e55fdc1e76ae9cb9fec86fa93c959fe
[ "BSD-2-Clause" ]
null
null
null
main/dal.py
ifdog/ego
cee685c75e55fdc1e76ae9cb9fec86fa93c959fe
[ "BSD-2-Clause" ]
null
null
null
main/dal.py
ifdog/ego
cee685c75e55fdc1e76ae9cb9fec86fa93c959fe
[ "BSD-2-Clause" ]
null
null
null
from datetime import datetime, timezone from main import models,statics
25.21875
80
0.693928
from datetime import datetime, timezone from main import models,statics def note_get(key: str): records = models.Note.objects.filter(key__exact=key) if records.count() > 0: return records[0] else: return None def note_add(key: str,markdown :str,draft:str): _note = models.Note(key=ke...
1,326
0
207
022100c5e98ea3d365d83de2b43fbb825efddb21
309
py
Python
write_a_function.py
athena15/hackerrank
4ddb6f0c80369c125c5c2016fad6f790c37027e5
[ "MIT" ]
null
null
null
write_a_function.py
athena15/hackerrank
4ddb6f0c80369c125c5c2016fad6f790c37027e5
[ "MIT" ]
null
null
null
write_a_function.py
athena15/hackerrank
4ddb6f0c80369c125c5c2016fad6f790c37027e5
[ "MIT" ]
null
null
null
# HackerRank "Write a function" Leap Year challenge # https://www.hackerrank.com/challenges/write-a-function/problem is_leap(1990)
16.263158
64
0.669903
# HackerRank "Write a function" Leap Year challenge # https://www.hackerrank.com/challenges/write-a-function/problem def is_leap(year): leap = False if year % 4 == 0: if year % 400 == 0: return True elif year % 100 == 0: return False else: return True else: return False is_leap(1990)
152
0
23
c12bdbbecf9f179a4230f51b1650c5787bf123f9
2,609
py
Python
base/utils.py
muzzley/manager-sdk-python
479a0108b9a3b691c96090b2594bf6e733fe221a
[ "MIT" ]
1
2018-10-29T09:39:42.000Z
2018-10-29T09:39:42.000Z
base/utils.py
habitio/manager-sdk-python
479a0108b9a3b691c96090b2594bf6e733fe221a
[ "MIT" ]
null
null
null
base/utils.py
habitio/manager-sdk-python
479a0108b9a3b691c96090b2594bf6e733fe221a
[ "MIT" ]
null
null
null
import json import threading import time from functools import wraps from uuid import UUID from typing import AnyStr def format_response(resp): """ Returns a str formatted response :param resp: Requests response :return: response text as a string, formatted as a json if valid """ try: ...
25.831683
90
0.620544
import json import threading import time from functools import wraps from uuid import UUID from typing import AnyStr def format_response(resp): """ Returns a str formatted response :param resp: Requests response :return: response text as a string, formatted as a json if valid """ try: ...
1,015
0
123
efd02f13492a4df018a2eb15c0a965653b246934
548
py
Python
Tree/104. Maximum depth of Binary tree.py
Rage-ops/Leetcode-Solutions
48d4ecbb92a0bb7a7bb74a1445b593a67357ac02
[ "MIT" ]
1
2020-11-23T13:52:11.000Z
2020-11-23T13:52:11.000Z
Tree/104. Maximum depth of Binary tree.py
harsha-sam/Leetcode-Solutions
48d4ecbb92a0bb7a7bb74a1445b593a67357ac02
[ "MIT" ]
null
null
null
Tree/104. Maximum depth of Binary tree.py
harsha-sam/Leetcode-Solutions
48d4ecbb92a0bb7a7bb74a1445b593a67357ac02
[ "MIT" ]
null
null
null
# Easy # https://leetcode.com/problems/maximum-depth-of-binary-tree/ # Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right # Time Complexity : O(N) # Space Complexity : O(N)
27.4
73
0.609489
# Easy # https://leetcode.com/problems/maximum-depth-of-binary-tree/ # Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right # Time Complexity : O(N) # Space Complexity : O(N) class ...
162
-6
79
b7469384c9ed2a9c147a60f81162ab3cf47aa62e
1,300
py
Python
makeMKV/model/enum/item_attribute_id.py
coolman565/blu_two
5c7626145b3644570be99ff0267f88bd61b9806c
[ "MIT" ]
null
null
null
makeMKV/model/enum/item_attribute_id.py
coolman565/blu_two
5c7626145b3644570be99ff0267f88bd61b9806c
[ "MIT" ]
1
2021-06-01T21:57:23.000Z
2021-06-01T21:57:23.000Z
makeMKV/model/enum/item_attribute_id.py
coolman565/blu_two
5c7626145b3644570be99ff0267f88bd61b9806c
[ "MIT" ]
null
null
null
from enum import Enum class ItemAttributeId(Enum): """ Derived from makemkvgui/inc/lgpl/apdefs.h """ Unknown = 0 Type = 1 Name = 2 LangCode = 3 LangName = 4 CodecId = 5 CodecShort = 6 CodecLong = 7 ChapterCount = 8 Duration = 9 DiskSize = 10 DiskSizeBytes = ...
22.033898
45
0.656923
from enum import Enum class ItemAttributeId(Enum): """ Derived from makemkvgui/inc/lgpl/apdefs.h """ Unknown = 0 Type = 1 Name = 2 LangCode = 3 LangName = 4 CodecId = 5 CodecShort = 6 CodecLong = 7 ChapterCount = 8 Duration = 9 DiskSize = 10 DiskSizeBytes = ...
0
0
0
673222d869417d5b734e3bde5eaffe06ab13ba5d
5,156
py
Python
sportsipy/fb/fb_utils.py
roclark/sports-reference-scraper
fffb7c8170454720622089cf794ebcb106245e4d
[ "MIT" ]
null
null
null
sportsipy/fb/fb_utils.py
roclark/sports-reference-scraper
fffb7c8170454720622089cf794ebcb106245e4d
[ "MIT" ]
null
null
null
sportsipy/fb/fb_utils.py
roclark/sports-reference-scraper
fffb7c8170454720622089cf794ebcb106245e4d
[ "MIT" ]
null
null
null
from difflib import get_close_matches from .squad_ids import SQUAD_IDS def _parse_squad_name(team_id): """ Parse and clean the team's name. To try and match requested team names with the master squad ID list, passed names should be parsed to remove the common 'FC' and 'CF' tags, as well as force ...
40.28125
79
0.683088
from difflib import get_close_matches from .squad_ids import SQUAD_IDS def _parse_squad_name(team_id): """ Parse and clean the team's name. To try and match requested team names with the master squad ID list, passed names should be parsed to remove the common 'FC' and 'CF' tags, as well as force ...
0
0
0
f36e476ffd668a1e530e1173c209b99e50531202
3,621
py
Python
test/web_runner.py
hhucn/webvulnscan
efb812fd5483157528f37794acecafa35ed0d878
[ "MIT" ]
40
2015-01-15T14:52:51.000Z
2022-03-25T08:52:48.000Z
test/web_runner.py
RaviRaaja/webvulnscan
efb812fd5483157528f37794acecafa35ed0d878
[ "MIT" ]
1
2016-07-21T09:51:15.000Z
2016-10-02T17:45:37.000Z
test/web_runner.py
RaviRaaja/webvulnscan
efb812fd5483157528f37794acecafa35ed0d878
[ "MIT" ]
22
2015-01-23T04:21:21.000Z
2021-08-22T03:36:21.000Z
#!/usr/bin/env python3 from __future__ import unicode_literals import cgi import io import os import socket import unittest import sys try: from http.server import BaseHTTPRequestHandler, HTTPServer except ImportError: from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer try: from urllib.parse i...
28.289063
78
0.567799
#!/usr/bin/env python3 from __future__ import unicode_literals import cgi import io import os import socket import unittest import sys try: from http.server import BaseHTTPRequestHandler, HTTPServer except ImportError: from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer try: from urllib.parse i...
2,826
26
176
888016f43395b30f5bb42509b2cf824b817a2f5c
2,203
py
Python
extract-airbnb-properties.py
townofchapelhill/hospitality-python
f6b0712a7ba0e9fd0164a55f271f163ebce41b6b
[ "WTFPL" ]
1
2022-03-18T14:00:14.000Z
2022-03-18T14:00:14.000Z
extract-airbnb-properties.py
townofchapelhill/hospitality-python
f6b0712a7ba0e9fd0164a55f271f163ebce41b6b
[ "WTFPL" ]
null
null
null
extract-airbnb-properties.py
townofchapelhill/hospitality-python
f6b0712a7ba0e9fd0164a55f271f163ebce41b6b
[ "WTFPL" ]
null
null
null
import airbnb import airbnb_secrets import csv items=1 output_filename="airbnb_chapelhill.csv" # Set CSV Header & line format csv_header = ['City','Latitude','Longitude','Type','Bathrooms','Bedrooms','Public Address','Localized City','Source'] api = airbnb.Api() # api = airbnb.Api(airbnb_secrets.login, airbnb_secrets...
43.196078
123
0.67635
import airbnb import airbnb_secrets import csv items=1 output_filename="airbnb_chapelhill.csv" # Set CSV Header & line format csv_header = ['City','Latitude','Longitude','Type','Bathrooms','Bedrooms','Public Address','Localized City','Source'] api = airbnb.Api() # api = airbnb.Api(airbnb_secrets.login, airbnb_secrets...
0
0
0
042888c821315f9ac9268da7b68e21e264d574b7
452
py
Python
Narcissistic Number/is_narcissistic_number.py
rayvantsahni/Let-us-Math
571ee70452feae0b15f37d46de658b0c0251bd3d
[ "MIT" ]
2
2020-08-06T07:09:38.000Z
2020-09-12T02:32:23.000Z
Narcissistic Number/is_narcissistic_number.py
rayvantsahni/Math-is-Fun
571ee70452feae0b15f37d46de658b0c0251bd3d
[ "MIT" ]
null
null
null
Narcissistic Number/is_narcissistic_number.py
rayvantsahni/Math-is-Fun
571ee70452feae0b15f37d46de658b0c0251bd3d
[ "MIT" ]
1
2021-08-30T14:17:28.000Z
2021-08-30T14:17:28.000Z
if __name__ == "__main__": n = int(input("Enter number: ")) print("Is a Narcissistic Number" if is_narcissistic_number(n) else "Is NOT a Narcissistic Number")
22.6
102
0.64823
def is_narcissistic_number(n): original_number = n number_of_digits = get_number_of_digits(n) sum = 0 while n != 0: sum += (n % 10) ** number_of_digits n //= 10 return original_number == sum def get_number_of_digits(n): return len(str(n)) if __name__ == "__main__": n = ...
237
0
45
0758861400523877891511807ac1ca1e6d3c171c
962
py
Python
dataset.py
dddzg/MoCo
94125b06235032cf74768709bac36e3ffbeb3f7c
[ "MIT" ]
41
2019-12-04T09:56:22.000Z
2022-02-10T13:07:37.000Z
dataset.py
dddzg/MoCo
94125b06235032cf74768709bac36e3ffbeb3f7c
[ "MIT" ]
5
2020-03-17T06:53:33.000Z
2021-01-16T20:15:14.000Z
dataset.py
dddzg/MoCo
94125b06235032cf74768709bac36e3ffbeb3f7c
[ "MIT" ]
6
2019-12-21T06:50:58.000Z
2021-12-04T20:48:16.000Z
from PIL import Image # import torchvision.models as models # # print(type(models.__dict__['resnet18']))
29.151515
68
0.602911
from PIL import Image def custom_dataset(base_dataset): # name: str = base_dataset.__class__.__name__ # print(name) class CustomDataSet(base_dataset): def __init__(self, *args, **kwargs): super(CustomDataSet, self).__init__(*args, **kwargs) def __getitem__(self, index): ...
832
0
23
f6688c453ab5e94f6089e06c70117a6382a4358e
436
py
Python
colossus/apps/templates/migrations/0002_auto_20200423_1850.py
gcallah/colossus
ee5319091cd19c96987825258a57e6d6f9d8fc51
[ "MIT" ]
3
2020-03-30T14:21:44.000Z
2020-11-23T06:51:55.000Z
colossus/apps/templates/migrations/0002_auto_20200423_1850.py
gcallah/colossus
ee5319091cd19c96987825258a57e6d6f9d8fc51
[ "MIT" ]
null
null
null
colossus/apps/templates/migrations/0002_auto_20200423_1850.py
gcallah/colossus
ee5319091cd19c96987825258a57e6d6f9d8fc51
[ "MIT" ]
2
2019-10-25T20:50:20.000Z
2019-11-05T02:40:23.000Z
# Generated by Django 2.1.5 on 2020-04-23 22:50 from django.db import migrations import tinymce.models
21.8
87
0.623853
# Generated by Django 2.1.5 on 2020-04-23 22:50 from django.db import migrations import tinymce.models class Migration(migrations.Migration): dependencies = [ ('templates', '0001_initial'), ] operations = [ migrations.AlterField( model_name='emailtemplate', name=...
0
308
23
c092d69cc0b597d29e2bed17b7fa24641102e301
1,183
py
Python
api/compliance/enums.py
django-doctor/lite-api
1ba278ba22ebcbb977dd7c31dd3701151cd036bf
[ "MIT" ]
3
2019-05-15T09:30:39.000Z
2020-04-22T16:14:23.000Z
api/compliance/enums.py
django-doctor/lite-api
1ba278ba22ebcbb977dd7c31dd3701151cd036bf
[ "MIT" ]
85
2019-04-24T10:39:35.000Z
2022-03-21T14:52:12.000Z
api/compliance/enums.py
django-doctor/lite-api
1ba278ba22ebcbb977dd7c31dd3701151cd036bf
[ "MIT" ]
1
2021-01-17T11:12:19.000Z
2021-01-17T11:12:19.000Z
# SIEL type compliance cases require a specific control code prefixes. currently: (0 to 9)D, (0 to 9)E, ML21, ML22. COMPLIANCE_CASE_ACCEPTABLE_GOOD_CONTROL_CODES = "(^[0-9][DE].*$)|(^ML21.*$)|(^ML22.*$)"
26.886364
115
0.598478
# SIEL type compliance cases require a specific control code prefixes. currently: (0 to 9)D, (0 to 9)E, ML21, ML22. COMPLIANCE_CASE_ACCEPTABLE_GOOD_CONTROL_CODES = "(^[0-9][DE].*$)|(^ML21.*$)|(^ML22.*$)" class ComplianceVisitTypes: FIRST_CONTACT = "first_contact" FIRST_VISIT = "first_visit" ROUTINE_VISIT ...
222
709
46
643f6b318ee0f9a13486c41eea32974757ea7055
488
py
Python
config/jupyter_notebook_config.py
brunocampos01/home-sweet-home
f22533569b9ab913c8d047f0f4989c3682dd2326
[ "MIT" ]
3
2020-06-05T15:49:39.000Z
2020-10-26T19:46:12.000Z
config/jupyter_notebook_config.py
brunocampos01/personal_configuration
115846bedaf82a6de9bb9f6c160a2b84781a4668
[ "MIT" ]
null
null
null
config/jupyter_notebook_config.py
brunocampos01/personal_configuration
115846bedaf82a6de9bb9f6c160a2b84781a4668
[ "MIT" ]
1
2019-12-25T19:46:48.000Z
2019-12-25T19:46:48.000Z
from jupyter_core.paths import jupyter_data_dir import subprocess import os import stat c = get_config() c.NotebookApp.ip = '0.0.0.0' # The port the notebook server will listen on c.NotebookApp.port = 8888 # Whether to open in a browser after starting c.NotebookApp.open_browser = False # Set the Access-Control-All...
24.4
55
0.797131
from jupyter_core.paths import jupyter_data_dir import subprocess import os import stat c = get_config() c.NotebookApp.ip = '0.0.0.0' # The port the notebook server will listen on c.NotebookApp.port = 8888 # Whether to open in a browser after starting c.NotebookApp.open_browser = False # Set the Access-Control-All...
0
0
0
76db0e40ddd0cd5196bd57fa00b4d28ed0336bc0
5,569
py
Python
weblog/models.py
demigods5505/w3blog
6e28c91c79d5ffd58d7ad244c1976508af9372c8
[ "BSD-3-Clause" ]
7
2018-07-25T21:41:37.000Z
2019-03-04T15:47:02.000Z
weblog/models.py
demigods5505/w3blog
6e28c91c79d5ffd58d7ad244c1976508af9372c8
[ "BSD-3-Clause" ]
6
2018-10-11T08:32:32.000Z
2019-04-05T12:36:46.000Z
weblog/models.py
demigods5505/w3blog
6e28c91c79d5ffd58d7ad244c1976508af9372c8
[ "BSD-3-Clause" ]
4
2019-01-04T19:18:36.000Z
2020-09-30T19:46:19.000Z
from django.conf import settings from django.db import models from django.forms import ModelForm, Textarea from django.shortcuts import reverse from django.utils.translation import pgettext_lazy, ugettext_lazy as _ from django.utils import timezone
40.355072
95
0.663135
from django.conf import settings from django.db import models from django.forms import ModelForm, Textarea from django.shortcuts import reverse from django.utils.translation import pgettext_lazy, ugettext_lazy as _ from django.utils import timezone class Category(models.Model): name = models.CharField(max_length=...
662
4,514
138
f8cebbbb7f8f94295106aa3f7279ac6bef1b5ece
558
py
Python
apps/admin/serializers/menu_serializer.py
thebesteric/bright
4cd8173e7e53115395fcf25bd4db72990fdb6b3f
[ "MIT" ]
null
null
null
apps/admin/serializers/menu_serializer.py
thebesteric/bright
4cd8173e7e53115395fcf25bd4db72990fdb6b3f
[ "MIT" ]
null
null
null
apps/admin/serializers/menu_serializer.py
thebesteric/bright
4cd8173e7e53115395fcf25bd4db72990fdb6b3f
[ "MIT" ]
null
null
null
""" 菜单序列化 @project: bright @file: .py @ide: PyCharm @auth: Eric Joe @email: whatisjava@hotmail.com @build: 2019-09-16 10:12 @info: """ from apps.admin.api.common import serializers from apps.admin.models import Menu class MenuSerializer(serializers.ModelSerializer): """ 菜单 """ class MenuTreeSerializer(...
15.942857
54
0.646953
""" 菜单序列化 @project: bright @file: .py @ide: PyCharm @auth: Eric Joe @email: whatisjava@hotmail.com @build: 2019-09-16 10:12 @info: """ from apps.admin.api.common import serializers from apps.admin.models import Menu class MenuSerializer(serializers.ModelSerializer): """ 菜单 """ class Meta: mo...
0
76
54
395c442ab8a1ecd4b1923873a2d8b649baab6ee0
4,669
py
Python
tests/test_summary.py
cnschema/cdata
893e2e1e27b61c8551c8b5f5f9bf05ec61490e23
[ "Apache-2.0" ]
16
2017-06-20T07:59:27.000Z
2020-12-26T10:47:31.000Z
tests/test_summary.py
cnschema/cdata
893e2e1e27b61c8551c8b5f5f9bf05ec61490e23
[ "Apache-2.0" ]
3
2017-07-12T07:15:42.000Z
2017-08-17T00:38:32.000Z
tests/test_summary.py
cnschema/cdata
893e2e1e27b61c8551c8b5f5f9bf05ec61490e23
[ "Apache-2.0" ]
9
2017-06-23T11:04:36.000Z
2019-09-17T09:30:44.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Path hack import os import sys sys.path.insert(0, os.path.abspath('..')) from cdata.summary import * # noqa try: import unittest2 as unittest except ImportError: import unittest if __name__ == '__main__': unittest.main()
39.567797
548
0.611694
#!/usr/bin/env python # -*- coding: utf-8 -*- # Path hack import os import sys sys.path.insert(0, os.path.abspath('..')) from cdata.summary import * # noqa try: import unittest2 as unittest except ImportError: import unittest class SummaryTestCase(unittest.TestCase): def setUp(self): pass ...
6,238
20
103
29aa7f44b2cf1fea1e5b88977bb02bbc80803903
3,495
py
Python
main.py
jmonsalverodilla/heroku_deploy_iris
133d609f6fc553763027ed533485a5dfd7f7791e
[ "MIT" ]
null
null
null
main.py
jmonsalverodilla/heroku_deploy_iris
133d609f6fc553763027ed533485a5dfd7f7791e
[ "MIT" ]
null
null
null
main.py
jmonsalverodilla/heroku_deploy_iris
133d609f6fc553763027ed533485a5dfd7f7791e
[ "MIT" ]
null
null
null
#imports import pandas as pd import joblib from flask import Flask, render_template, session,Markup, redirect, url_for from flask_bootstrap import Bootstrap import os #Production server #from waitress import serve #Form validator from flask_wtf import FlaskForm from wtforms import FloatField, SubmitField ...
37.580645
146
0.640343
#imports import pandas as pd import joblib from flask import Flask, render_template, session,Markup, redirect, url_for from flask_bootstrap import Bootstrap import os #Production server #from waitress import serve #Form validator from flask_wtf import FlaskForm from wtforms import FloatField, SubmitField ...
1,153
912
94
c08c0d3462978b99bc09178299bce17ee7f56f79
978
py
Python
7.functions/challenge1_rouillonh.py
rouillonh/ChallengePython
7e7d9b69f60394fd1f00a6a4aa32f97de95b1b92
[ "MIT" ]
null
null
null
7.functions/challenge1_rouillonh.py
rouillonh/ChallengePython
7e7d9b69f60394fd1f00a6a4aa32f97de95b1b92
[ "MIT" ]
null
null
null
7.functions/challenge1_rouillonh.py
rouillonh/ChallengePython
7e7d9b69f60394fd1f00a6a4aa32f97de95b1b92
[ "MIT" ]
null
null
null
import random print("\tWelcome to the Python Dice App") flag = True while flag: a = dice_sides() b = dice_number() c = roll_dice(b,a) sum_dice(c) flag = roll_again()
25.076923
70
0.580777
import random def dice_sides(): lados = int(input("How many sides would you like on your dice: ")) return lados def dice_number(): rol = int(input("How many dice would you like to roll: ")) return rol def roll_dice(a,b): dados = [] print("You rolled ",a," ",b ," sided dice.") for i in range(...
680
0
110
304fddc7a883fd0b9750d92b36e2eae733ea7c41
749
py
Python
gas-dispersion/gas-dispersion-v3.py
j-rheinheimer/Problems-in-Computational-Physics
3bf8d618a1837fd39524dce23f2d60ede1d1971f
[ "MIT" ]
null
null
null
gas-dispersion/gas-dispersion-v3.py
j-rheinheimer/Problems-in-Computational-Physics
3bf8d618a1837fd39524dce23f2d60ede1d1971f
[ "MIT" ]
null
null
null
gas-dispersion/gas-dispersion-v3.py
j-rheinheimer/Problems-in-Computational-Physics
3bf8d618a1837fd39524dce23f2d60ede1d1971f
[ "MIT" ]
null
null
null
from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt constant = (3/2)*1.38*10**(-23) particles_number = [0 for x in range(4)] temperature = [0 for x in range(4)] # X = rows, Y = columns energy = ([[0 for y in range(4)] for x in range(4)]) for x in range(1, 4): # row particles_number[x] = x ...
24.966667
69
0.672897
from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt constant = (3/2)*1.38*10**(-23) particles_number = [0 for x in range(4)] temperature = [0 for x in range(4)] # X = rows, Y = columns energy = ([[0 for y in range(4)] for x in range(4)]) for x in range(1, 4): # row particles_number[x] = x ...
0
0
0
6fa2c0f1f5245c6c17d6203b1c06c94d8000d974
25,138
py
Python
components/scream/cime_config/eamxx_buildnml_impl.py
ambrad/scream
52da60f65e870b8a3994bdbf4a6022fdcac7cab5
[ "BSD-3-Clause" ]
null
null
null
components/scream/cime_config/eamxx_buildnml_impl.py
ambrad/scream
52da60f65e870b8a3994bdbf4a6022fdcac7cab5
[ "BSD-3-Clause" ]
null
null
null
components/scream/cime_config/eamxx_buildnml_impl.py
ambrad/scream
52da60f65e870b8a3994bdbf4a6022fdcac7cab5
[ "BSD-3-Clause" ]
null
null
null
import os, sys, copy, re import xml.etree.ElementTree as ET _CIMEROOT = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..","..","..","cime") sys.path.append(_CIMEROOT) from CIME.utils import expect ############################################################################### class MockCase(object): ####...
35.256662
122
0.499244
import os, sys, copy, re import xml.etree.ElementTree as ET _CIMEROOT = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..","..","..","cime") sys.path.append(_CIMEROOT) from CIME.utils import expect ############################################################################### class MockCase(object): ####...
158
25
81
47eb24a0f9d8fd0e4cedeb0986656185548adaf7
1,894
py
Python
src/TODO/dataset.py
michalnand/dynamical_system
df0ad82089672693de03e32a97018e0fd87cbd33
[ "MIT" ]
null
null
null
src/TODO/dataset.py
michalnand/dynamical_system
df0ad82089672693de03e32a97018e0fd87cbd33
[ "MIT" ]
null
null
null
src/TODO/dataset.py
michalnand/dynamical_system
df0ad82089672693de03e32a97018e0fd87cbd33
[ "MIT" ]
null
null
null
import torch import numpy
25.594595
95
0.63622
import torch import numpy class Create: def __init__(self, dynamical_system, items_count = 10000, batch_size = 32, device = "cpu"): self.items_count = items_count self.seq_length = 256 self.batch_size = batch_size self.order = 4 self.dynamical_system = dynamical_...
1,653
-8
215
aa54c0a25d7f459b2d365d906fe7dc4e48fd1630
4,054
py
Python
bagofconcepts/boc.py
hank110/Bag-of-Concepts
28e772296bfe4b0a71859cf2aba1d68252948fb9
[ "MIT" ]
null
null
null
bagofconcepts/boc.py
hank110/Bag-of-Concepts
28e772296bfe4b0a71859cf2aba1d68252948fb9
[ "MIT" ]
null
null
null
bagofconcepts/boc.py
hank110/Bag-of-Concepts
28e772296bfe4b0a71859cf2aba1d68252948fb9
[ "MIT" ]
null
null
null
import logging from collections import Counter, defaultdict import math import sys import numpy as np from scipy.sparse import csr_matrix import scipy.sparse from sklearn.utils.extmath import safe_sparse_dot from gensim.models import Word2Vec, KeyedVectors from spherecluster import SphericalKMeans
36.196429
98
0.688949
import logging from collections import Counter, defaultdict import math import sys import numpy as np from scipy.sparse import csr_matrix import scipy.sparse from sklearn.utils.extmath import safe_sparse_dot from gensim.models import Word2Vec, KeyedVectors from spherecluster import SphericalKMeans class BOCModel(): ...
3,492
-4
265
9e7330c45553e9e1428db4adff74c500854c66f0
827
py
Python
SmartContactManager/smart_contact_manager.py
alexcamargos/Learning_Python_Programming
f1cce9f85a672468b6ed1eb98dea9f7c09443722
[ "MIT" ]
2
2021-06-04T23:39:14.000Z
2021-09-15T05:36:35.000Z
SmartContactManager/smart_contact_manager.py
alexcamargos/Learning_Python_Programming
f1cce9f85a672468b6ed1eb98dea9f7c09443722
[ "MIT" ]
null
null
null
SmartContactManager/smart_contact_manager.py
alexcamargos/Learning_Python_Programming
f1cce9f85a672468b6ed1eb98dea9f7c09443722
[ "MIT" ]
null
null
null
# #!/usr/bin/env python # encoding: utf-8 # # -------------------------------------------------------------------------------------------------------------------- # Name: smart_contact_manager.py # Version: 0.0.1 # Summary: Smart Contact Manager a contact book GUI application with Python, SQLite, and PyQt. # # A...
33.08
119
0.516324
# #!/usr/bin/env python # encoding: utf-8 # # -------------------------------------------------------------------------------------------------------------------- # Name: smart_contact_manager.py # Version: 0.0.1 # Summary: Smart Contact Manager a contact book GUI application with Python, SQLite, and PyQt. # # A...
0
0
0
dfb0d107bb3528b5f2998439c3afbd1da82d7fdb
2,245
py
Python
statsmodels/distributions/tests/test_copula.py
NolanMP/statsmodels
ca6b652188be2422061052f7e61dd7bf2da03d52
[ "BSD-3-Clause" ]
1
2022-02-24T16:54:07.000Z
2022-02-24T16:54:07.000Z
statsmodels/distributions/tests/test_copula.py
NolanMP/statsmodels
ca6b652188be2422061052f7e61dd7bf2da03d52
[ "BSD-3-Clause" ]
null
null
null
statsmodels/distributions/tests/test_copula.py
NolanMP/statsmodels
ca6b652188be2422061052f7e61dd7bf2da03d52
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu Jan 14 23:32:57 2021 Author: Josef Perktold License: BSD-3 """ # import numpy as np from numpy.testing import assert_allclose import pytest import statsmodels.sandbox.distributions.copula as cop ev_list = [ [cop.transform_bilogistic, 0.5, 0.9, (0.25, 0.05), 0.5], ...
35.078125
79
0.644989
# -*- coding: utf-8 -*- """ Created on Thu Jan 14 23:32:57 2021 Author: Josef Perktold License: BSD-3 """ # import numpy as np from numpy.testing import assert_allclose import pytest import statsmodels.sandbox.distributions.copula as cop ev_list = [ [cop.transform_bilogistic, 0.5, 0.9, (0.25, 0.05), 0.5], ...
525
0
44
ecc4eaaf4acc188cc72769b415a9ee39b2baf9a7
1,643
py
Python
pyrfm/linear_model/loss.py
neonnnnn/pyrfm
e88fe8cb7bf3062616d33826e955e828fc6d8ba6
[ "BSD-2-Clause" ]
7
2020-05-31T01:47:27.000Z
2021-12-26T03:45:14.000Z
pyrfm/linear_model/loss.py
neonnnnn/pyrfm
e88fe8cb7bf3062616d33826e955e828fc6d8ba6
[ "BSD-2-Clause" ]
2
2019-12-01T01:18:38.000Z
2020-08-27T12:07:26.000Z
pyrfm/linear_model/loss.py
neonnnnn/pyrfm
e88fe8cb7bf3062616d33826e955e828fc6d8ba6
[ "BSD-2-Clause" ]
3
2021-03-17T13:46:56.000Z
2022-03-18T21:43:45.000Z
import numpy as np class Squared(LossFunction): """Squared loss: L(p, y) = 0.5 * (y - p)²""" class Logistic(LossFunction): """Logistic loss: L(p, y) = log(1 + exp(-yp))""" class SquaredHinge(LossFunction): """Squared hinge loss: L(p, y) = max(1 - yp, 0)²""" class Hinge(LossFunction): """hinge ...
19.795181
73
0.456482
import numpy as np def sigmoid(pred): return np.exp(np.minimum(0, pred)) / (1.+np.exp(-np.abs(pred))) class LossFunction: def loss(self, p, y): raise NotImplementedError() def dloss(self, p, y): raise NotImplementedError() class Squared(LossFunction): """Squared loss: L(p, y) = 0....
869
-2
422
985e9dc0da5724f8e441e6fb601bdda77d7cb788
1,661
py
Python
test/test_decorators_fromtype.py
dan-win/fairways_py
771623c6f9ec40e8016b5cebb7951613d01e31f7
[ "Apache-2.0" ]
null
null
null
test/test_decorators_fromtype.py
dan-win/fairways_py
771623c6f9ec40e8016b5cebb7951613d01e31f7
[ "Apache-2.0" ]
null
null
null
test/test_decorators_fromtype.py
dan-win/fairways_py
771623c6f9ec40e8016b5cebb7951613d01e31f7
[ "Apache-2.0" ]
null
null
null
import unittest import json import os
27.683333
119
0.582781
import unittest import json import os def setUpModule(): pass def tearDownModule(): pass class FromTypeTestCase(unittest.TestCase): @classmethod def setUpClass(cls): # from fairways.api import core, triggers from fairways.decorators import fromtype cls.fromtype = fromtype ...
1,459
91
69
dfc0b83160ee292356e7e19855d85e59ddfa121b
11,235
py
Python
P2/sde_solvers.py
Ocete/mcd-pe-continuo
ec8c6e39453e3089786396252ea4dc83ad4825c1
[ "MIT" ]
null
null
null
P2/sde_solvers.py
Ocete/mcd-pe-continuo
ec8c6e39453e3089786396252ea4dc83ad4825c1
[ "MIT" ]
null
null
null
P2/sde_solvers.py
Ocete/mcd-pe-continuo
ec8c6e39453e3089786396252ea4dc83ad4825c1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sun Sep 27 17:29:26 2020 @author: Alberto Suárez """ # Load packages import numpy as np import sys import matplotlib.pyplot as plt from numpy.core.shape_base import _accumulate def generate_regular_grid(t0, delta_t, N): """Generates a regular grid of times. Parameters ...
33.239645
96
0.608367
# -*- coding: utf-8 -*- """ Created on Sun Sep 27 17:29:26 2020 @author: Alberto Suárez """ # Load packages import numpy as np import sys import matplotlib.pyplot as plt from numpy.core.shape_base import _accumulate def generate_regular_grid(t0, delta_t, N): """Generates a regular grid of times. Parameters ...
0
0
0
11acd7128accc76ea793f88fdc32b2cdbf2df5af
239
py
Python
tudo/ex026.py
Ramon-Erik/Exercicios-Python
158a7f1846dd3d486aa0517fa337d46d73aab649
[ "MIT" ]
1
2021-07-08T00:35:57.000Z
2021-07-08T00:35:57.000Z
tudo/ex026.py
Ramon-Erik/Exercicios-Python
158a7f1846dd3d486aa0517fa337d46d73aab649
[ "MIT" ]
null
null
null
tudo/ex026.py
Ramon-Erik/Exercicios-Python
158a7f1846dd3d486aa0517fa337d46d73aab649
[ "MIT" ]
null
null
null
nome = str(input('>>Seu nome completo:\n')).strip() print('>>No seu nome há ', nome.upper().count('A'), 'letra(s) A.') print('>>Aparece na posição ', nome.upper().find('A')+1) print('>>A última aparição é na ', nome.upper().rfind('A') + 1)
59.75
66
0.610879
nome = str(input('>>Seu nome completo:\n')).strip() print('>>No seu nome há ', nome.upper().count('A'), 'letra(s) A.') print('>>Aparece na posição ', nome.upper().find('A')+1) print('>>A última aparição é na ', nome.upper().rfind('A') + 1)
0
0
0
d89154d9d48506bf0641a0e03e468bd570763d0c
639
py
Python
mapper/mid_level/encoder.py
umerhasan17/deep-robust-robotnav
765e586dc897b26286af8f13d6ecdf212e78bccf
[ "Apache-2.0" ]
null
null
null
mapper/mid_level/encoder.py
umerhasan17/deep-robust-robotnav
765e586dc897b26286af8f13d6ecdf212e78bccf
[ "Apache-2.0" ]
null
null
null
mapper/mid_level/encoder.py
umerhasan17/deep-robust-robotnav
765e586dc897b26286af8f13d6ecdf212e78bccf
[ "Apache-2.0" ]
null
null
null
import visualpriors import torch from config.config import device def mid_level_representations(input_image_tensor, representation_names): """ :param input_image_tensor: (batch_size, 3, 256, 256) :param representation_names: list :return: concatted image tensor to pass into FCN (batch_size, 8*len(re...
37.588235
110
0.733959
import visualpriors import torch from config.config import device def mid_level_representations(input_image_tensor, representation_names): """ :param input_image_tensor: (batch_size, 3, 256, 256) :param representation_names: list :return: concatted image tensor to pass into FCN (batch_size, 8*len(re...
0
0
0
09fb8e8aa27e2b40173fc4065e41b574b8f437f2
1,334
py
Python
pmutt/tests/statmech/test_pmutt_statmech_nucl.py
wittregr/pMuTT
1678fd3d3a10d8ef5389c02970a7ebaa92fc7344
[ "MIT" ]
28
2018-10-29T17:44:30.000Z
2022-03-23T14:20:16.000Z
pmutt/tests/statmech/test_pmutt_statmech_nucl.py
wittregr/pMuTT
1678fd3d3a10d8ef5389c02970a7ebaa92fc7344
[ "MIT" ]
101
2018-10-18T19:49:30.000Z
2022-01-19T10:59:57.000Z
pmutt/tests/statmech/test_pmutt_statmech_nucl.py
wittregr/pMuTT
1678fd3d3a10d8ef5389c02970a7ebaa92fc7344
[ "MIT" ]
16
2018-12-15T17:01:21.000Z
2022-01-03T17:42:23.000Z
# -*- coding: utf-8 -*- """ pmutt.test_pmutt_model_statmech_nucl Tests for pmutt module """ import unittest from pmutt.statmech import nucl if __name__ == '__main__': unittest.main()
25.653846
69
0.649925
# -*- coding: utf-8 -*- """ pmutt.test_pmutt_model_statmech_nucl Tests for pmutt module """ import unittest from pmutt.statmech import nucl class TestEmptyNucl(unittest.TestCase): def setUp(self): unittest.TestCase.setUp(self) self.nuclear = nucl.EmptyNucl() self.nuclear_dict = { ...
807
18
319
dffaaaba64307dc711352793913b40a2616734eb
5,049
py
Python
python_examples/control_mapping_framework/utils.py
kirank0220/api-examples
9d6c51eeb2d4e38d95b0b7d88fd30fe96ef28d20
[ "MIT" ]
1
2021-12-20T16:49:00.000Z
2021-12-20T16:49:00.000Z
python_examples/control_mapping_framework/utils.py
kirank0220/api-examples
9d6c51eeb2d4e38d95b0b7d88fd30fe96ef28d20
[ "MIT" ]
2
2020-11-20T04:51:16.000Z
2021-06-16T17:02:35.000Z
python_examples/control_mapping_framework/utils.py
kirank0220/api-examples
9d6c51eeb2d4e38d95b0b7d88fd30fe96ef28d20
[ "MIT" ]
1
2020-11-20T04:46:17.000Z
2020-11-20T04:46:17.000Z
######################################################################### # _________ ___. ______________________ ___ # \_ ___ \___.__.\_ |__ ___________ / _____/\______ \ \/ / # / \ \< | | | __ \_/ __ \_ __ \/ \ ___ | _/\ / # \ \___\___ | | \_\...
35.556338
114
0.520895
######################################################################### # _________ ___. ______________________ ___ # \_ ___ \___.__.\_ |__ ___________ / _____/\______ \ \/ / # / \ \< | | | __ \_/ __ \_ __ \/ \ ___ | _/\ / # \ \___\___ | | \_\...
4,072
0
92
12b82684a12db7b841b1d175e77609b1454d82f8
8,378
py
Python
delphi/translators/for2py/measure-coverage.py
mikiec84/delphi
2e517f21e76e334c7dfb14325d25879ddf26d10d
[ "Apache-2.0" ]
25
2018-03-03T11:57:57.000Z
2022-01-16T21:19:54.000Z
delphi/translators/for2py/measure-coverage.py
mikiec84/delphi
2e517f21e76e334c7dfb14325d25879ddf26d10d
[ "Apache-2.0" ]
385
2018-02-21T16:52:06.000Z
2022-02-17T07:44:56.000Z
delphi/translators/for2py/measure-coverage.py
mikiec84/delphi
2e517f21e76e334c7dfb14325d25879ddf26d10d
[ "Apache-2.0" ]
19
2018-03-20T01:08:11.000Z
2021-09-29T01:04:49.000Z
#!/usr/bin/env python3.7 """ This file contains code to carry out a simple estimate of the amount of Fortran code 'handled' by for2py. COMMAND-LINE INVOCATION: python3.7 measure-coverage.py <directory with Fortran code files> ADDING HANDLED LANGUAGE CONSTRUCTS: As the set of language featur...
29.814947
94
0.579852
#!/usr/bin/env python3.7 """ This file contains code to carry out a simple estimate of the amount of Fortran code 'handled' by for2py. COMMAND-LINE INVOCATION: python3.7 measure-coverage.py <directory with Fortran code files> ADDING HANDLED LANGUAGE CONSTRUCTS: As the set of language featur...
3,580
0
207
d8cb68e98db0238e855e2e1a16f15193c330cfd2
821
py
Python
repos/system_upgrade/el7toel8/libraries/config/tests/test_getenvvars.py
panovotn/leapp-repository
e80bdbf65393e68bc2e91b43b46fdd9b9b787878
[ "Apache-2.0" ]
null
null
null
repos/system_upgrade/el7toel8/libraries/config/tests/test_getenvvars.py
panovotn/leapp-repository
e80bdbf65393e68bc2e91b43b46fdd9b9b787878
[ "Apache-2.0" ]
null
null
null
repos/system_upgrade/el7toel8/libraries/config/tests/test_getenvvars.py
panovotn/leapp-repository
e80bdbf65393e68bc2e91b43b46fdd9b9b787878
[ "Apache-2.0" ]
null
null
null
from collections import namedtuple from leapp.libraries.common.config import get_env, get_all_envs from leapp.libraries.stdlib import api from leapp.models import EnvVar
31.576923
77
0.74056
from collections import namedtuple from leapp.libraries.common.config import get_env, get_all_envs from leapp.libraries.stdlib import api from leapp.models import EnvVar class CurrentActorMocked(object): env_vars = [EnvVar(name='LEAPP_DEVEL_SKIP_WIP', value='0'), EnvVar(name='LEAPP_DEVEL_SKIP_DIP...
296
282
69
9c124f5233a7bd69a4c61ad530b4d9b53345808c
1,222
py
Python
examples/save_data_to_file_example.py
eugtsa/led_wabbit
04c56b438518d65a385788fa9a118adbe74a1771
[ "Apache-2.0" ]
null
null
null
examples/save_data_to_file_example.py
eugtsa/led_wabbit
04c56b438518d65a385788fa9a118adbe74a1771
[ "Apache-2.0" ]
null
null
null
examples/save_data_to_file_example.py
eugtsa/led_wabbit
04c56b438518d65a385788fa9a118adbe74a1771
[ "Apache-2.0" ]
null
null
null
from sklearn.model_selection import train_test_split from sklearn.utils import shuffle from itertools import chain import numpy as np from led_wabbit.models import LogisticRegressionBinary if __name__ == '__main__': X1 = [[0, 1, 1] for i in range(40)] X2 = [[0, 2, 0] for i in range(40)] X3 = [[1, 0, 1] fo...
33.027027
101
0.587561
from sklearn.model_selection import train_test_split from sklearn.utils import shuffle from itertools import chain import numpy as np from led_wabbit.models import LogisticRegressionBinary if __name__ == '__main__': X1 = [[0, 1, 1] for i in range(40)] X2 = [[0, 2, 0] for i in range(40)] X3 = [[1, 0, 1] fo...
0
0
0
22fbc1339414b2f40f360e4ea79f9e4a128ac3f5
1,382
py
Python
tests/bugs/issue_58/issue_58_1_categorical_exogenous.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
377
2016-10-13T20:52:44.000Z
2022-03-29T18:04:14.000Z
tests/bugs/issue_58/issue_58_1_categorical_exogenous.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
160
2016-10-13T16:11:53.000Z
2022-03-28T04:21:34.000Z
tests/bugs/issue_58/issue_58_1_categorical_exogenous.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
63
2017-03-09T14:51:18.000Z
2022-03-27T20:52:57.000Z
import pandas as pd import numpy as np import pyaf.ForecastEngine as autof import pyaf.Bench.TS_datasets as tsds b1 = tsds.load_ozone_exogenous_categorical() df = b1.mPastData print(b1.mExogenousDataFrame.Exog2.cat.categories) print(b1.mExogenousDataFrame.Exog3.cat.categories) print(b1.mExogenousDataFrame.Exog4.cat....
28.791667
83
0.7822
import pandas as pd import numpy as np import pyaf.ForecastEngine as autof import pyaf.Bench.TS_datasets as tsds b1 = tsds.load_ozone_exogenous_categorical() df = b1.mPastData print(b1.mExogenousDataFrame.Exog2.cat.categories) print(b1.mExogenousDataFrame.Exog3.cat.categories) print(b1.mExogenousDataFrame.Exog4.cat....
0
0
0
2004b70e249cdbb83d33599179518dd3cc5c4574
7,164
py
Python
urbanterror.py
zephrax/sopel-module-urbanterror
4bc38fffc3f2128f35fe5864cabfc83302e1e498
[ "MIT" ]
null
null
null
urbanterror.py
zephrax/sopel-module-urbanterror
4bc38fffc3f2128f35fe5864cabfc83302e1e498
[ "MIT" ]
null
null
null
urbanterror.py
zephrax/sopel-module-urbanterror
4bc38fffc3f2128f35fe5864cabfc83302e1e498
[ "MIT" ]
null
null
null
# coding=utf-8 """UrbanTerror server info""" # Author: zephrax http://kernelpanic.com.ar from __future__ import unicode_literals, absolute_import, print_function, division from sopel import web from sopel.module import commands from sopel.logger import get_logger from sopel.config.types import StaticSection, Validated...
29.004049
120
0.561697
# coding=utf-8 """UrbanTerror server info""" # Author: zephrax http://kernelpanic.com.ar from __future__ import unicode_literals, absolute_import, print_function, division from sopel import web from sopel.module import commands from sopel.logger import get_logger from sopel.config.types import StaticSection, Validated...
501
0
100
3f642ae81cbb6c2d0f605ddea6efce124c74a74f
3,477
py
Python
fpga_template_low_level.py
KilometersG/Python-API-for-VeriStand-FPGA
2607bae5582aa2872d31c05bc0135ed1d7dd9e34
[ "BSD-2-Clause" ]
2
2018-07-24T18:14:14.000Z
2019-08-26T06:29:36.000Z
fpga_template_low_level.py
KilometersG/Python-API-for-VeriStand-FPGA
2607bae5582aa2872d31c05bc0135ed1d7dd9e34
[ "BSD-2-Clause" ]
8
2018-07-24T18:11:32.000Z
2018-11-13T16:24:45.000Z
fpga_template_low_level.py
KilometersG/Python-API-for-VeriStand-FPGA
2607bae5582aa2872d31c05bc0135ed1d7dd9e34
[ "BSD-2-Clause" ]
null
null
null
import fpga_config from nifpga import Session import ntpath configpath = input('Please enter the full filepath of your .fpgaconfig file: ') vsfpga = fpga_config.VeriStandFPGA(configpath) folder = ntpath.split(configpath) read_count = vsfpga.read_packets + 1 write_count = vsfpga.write_packets + 1 read_packets = {} writ...
41.891566
119
0.681047
import fpga_config from nifpga import Session import ntpath configpath = input('Please enter the full filepath of your .fpgaconfig file: ') vsfpga = fpga_config.VeriStandFPGA(configpath) folder = ntpath.split(configpath) read_count = vsfpga.read_packets + 1 write_count = vsfpga.write_packets + 1 read_packets = {} writ...
0
0
0
a7241d0c0ee6c2db2de1ddde13add40050d749a8
29,611
py
Python
intel_pytorch_extension_py/launch.py
CaoE/intel-extension-for-pytorch
2a31cef7592207a7d08e346542218b5a79df8df9
[ "Apache-2.0" ]
null
null
null
intel_pytorch_extension_py/launch.py
CaoE/intel-extension-for-pytorch
2a31cef7592207a7d08e346542218b5a79df8df9
[ "Apache-2.0" ]
1
2021-03-30T04:54:24.000Z
2021-03-30T04:54:24.000Z
intel_pytorch_extension_py/launch.py
CaoE/intel-extension-for-pytorch
2a31cef7592207a7d08e346542218b5a79df8df9
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import, division, print_function, unicode_literals import sys import platform import subprocess import os from os.path import expanduser import re import glob import numpy as np from argparse import ArgumentParser, REMAINDER from argparse import RawTextHelpFormatter import logging import...
45.485407
141
0.624667
from __future__ import absolute_import, division, print_function, unicode_literals import sys import platform import subprocess import os from os.path import expanduser import re import glob import numpy as np from argparse import ArgumentParser, REMAINDER from argparse import RawTextHelpFormatter import logging import...
10,841
-5
454
e134eca658f6b3c6715f2461726f071c23915ead
773
py
Python
dashboard/admin.py
avisionx/fms-portal-iiitd
1b78112dc0fb92ab8c53512fd76d14f5ea06b587
[ "MIT" ]
null
null
null
dashboard/admin.py
avisionx/fms-portal-iiitd
1b78112dc0fb92ab8c53512fd76d14f5ea06b587
[ "MIT" ]
1
2021-05-29T06:13:21.000Z
2021-05-29T06:13:21.000Z
dashboard/admin.py
avisionx/fms-portal-iiitd
1b78112dc0fb92ab8c53512fd76d14f5ea06b587
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Complaint, Notification admin.site.register(Notification, NotifAdmin) admin.site.register(Complaint, ComplaintAdmin)
20.342105
72
0.61837
from django.contrib import admin from .models import Complaint, Notification class ComplaintAdmin(admin.ModelAdmin): model = Complaint verbose_name_plural = 'Complaints' list_display = ( 'complaint_id', 'customer', 'category', 'location', 'created_at', 'act...
0
552
46
bc79a36f95b9dc54c12111e334dd778a4db2e572
3,820
py
Python
tests/test_operations.py
Jeremiah-England/Shapely
769b203f2b7cbeeb0a694c21440b4025a563f807
[ "BSD-3-Clause" ]
2,382
2015-01-04T03:16:59.000Z
2021-12-10T15:48:56.000Z
tests/test_operations.py
Jeremiah-England/Shapely
769b203f2b7cbeeb0a694c21440b4025a563f807
[ "BSD-3-Clause" ]
1,009
2015-01-03T23:44:02.000Z
2021-12-10T16:02:42.000Z
tests/test_operations.py
Jeremiah-England/Shapely
769b203f2b7cbeeb0a694c21440b4025a563f807
[ "BSD-3-Clause" ]
467
2015-01-19T23:18:33.000Z
2021-12-09T18:31:28.000Z
from . import unittest import pytest from shapely.geometry import Point, LineString, Polygon, MultiPoint, \ GeometryCollection from shapely.wkt import loads from shapely.geos import TopologicalError
36.380952
120
0.607853
from . import unittest import pytest from shapely.geometry import Point, LineString, Polygon, MultiPoint, \ GeometryCollection from shapely.wkt import loads from shapely.geos import TopologicalError class OperationsTestCase(unittest.TestCase): def test_operations(self): point ...
3,411
23
158
4477e3642a343862afd32bfdb254fdd48f6d7b21
1,641
py
Python
binaries/setup.py
meryacine/shaka-streamer
7b7e90143f531c52d96c162cc7393862db0830b7
[ "Apache-2.0" ]
154
2019-08-29T16:53:24.000Z
2022-02-25T00:29:56.000Z
binaries/setup.py
meryacine/shaka-streamer
7b7e90143f531c52d96c162cc7393862db0830b7
[ "Apache-2.0" ]
101
2019-08-30T17:34:51.000Z
2022-03-02T18:46:22.000Z
binaries/setup.py
meryacine/shaka-streamer
7b7e90143f531c52d96c162cc7393862db0830b7
[ "Apache-2.0" ]
56
2019-09-08T17:47:22.000Z
2022-02-23T17:35:11.000Z
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
36.466667
88
0.728215
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
0
0
0
bab48fc4bbab67505fa893b469125721ab5426d4
9,047
py
Python
tests/preprocess/task.py
jarokaz/nvidia-merlin-on-vertex
f40fe997108395a310b9a9ec4d97110967d725ac
[ "Apache-2.0" ]
1
2021-11-16T13:11:38.000Z
2021-11-16T13:11:38.000Z
tests/preprocess/task.py
jarokaz/nvidia-merlin-on-vertex
f40fe997108395a310b9a9ec4d97110967d725ac
[ "Apache-2.0" ]
null
null
null
tests/preprocess/task.py
jarokaz/nvidia-merlin-on-vertex
f40fe997108395a310b9a9ec4d97110967d725ac
[ "Apache-2.0" ]
1
2021-11-16T13:11:41.000Z
2021-11-16T13:11:41.000Z
import argparse import logging import os import sys import time from dask.distributed import Client from dask_cuda import LocalCUDACluster import fsspec import nvtabular as nvt from nvtabular.io.shuffle import Shuffle from nvtabular.ops import Categorify from nvtabular.ops import Clip from nvtabular.ops import FillMis...
25.922636
80
0.623522
import argparse import logging import os import sys import time from dask.distributed import Client from dask_cuda import LocalCUDACluster import fsspec import nvtabular as nvt from nvtabular.io.shuffle import Shuffle from nvtabular.ops import Categorify from nvtabular.ops import Clip from nvtabular.ops import FillMis...
1,796
0
66
737f31f4d982127703765a37410e7fd674578fdd
20,144
py
Python
pipopipette.py
itskatt/pipopipette
a39ecc1997f1a64a5539c4642b1197e9f719ba1c
[ "MIT" ]
null
null
null
pipopipette.py
itskatt/pipopipette
a39ecc1997f1a64a5539c4642b1197e9f719ba1c
[ "MIT" ]
null
null
null
pipopipette.py
itskatt/pipopipette
a39ecc1997f1a64a5539c4642b1197e9f719ba1c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri Mar 19 10:23:29 2021 @author: caldwell © """ import pygame as pg from random import choice # from pprint import pprint ## --- Paramètres de jeu ------------------------------ # si on joue contre l'IA (True) ou JvJ (False) MODE_IA = True # la taille de la grille de jeu (lar...
33.022951
99
0.548203
# -*- coding: utf-8 -*- """ Created on Fri Mar 19 10:23:29 2021 @author: caldwell © """ import pygame as pg from random import choice # from pprint import pprint ## --- Paramètres de jeu ------------------------------ # si on joue contre l'IA (True) ou JvJ (False) MODE_IA = True # la taille de la grille de jeu (lar...
1,532
0
52
18bdb26f9ceaedbf555e6c644de7130ee2b447ae
1,800
py
Python
examples/tilechain_coals.py
pauljones0/lifxlan
292cdbbe3515da4b40cf348d91b7a1480832fff9
[ "MIT" ]
464
2015-07-08T11:44:12.000Z
2022-03-22T04:18:19.000Z
examples/tilechain_coals.py
pauljones0/lifxlan
292cdbbe3515da4b40cf348d91b7a1480832fff9
[ "MIT" ]
147
2015-07-08T15:33:32.000Z
2022-02-14T17:46:38.000Z
examples/tilechain_coals.py
pauljones0/lifxlan
292cdbbe3515da4b40cf348d91b7a1480832fff9
[ "MIT" ]
134
2015-09-25T12:20:26.000Z
2022-03-23T08:33:11.000Z
from lifxlan import * from random import randint, betavariate from time import sleep if __name__=="__main__": main()
36.734694
133
0.582222
from lifxlan import * from random import randint, betavariate from time import sleep def main(): lan = LifxLAN() tilechain_lights = lan.get_tilechain_lights() if len(tilechain_lights) != 0: t = lan.get_tilechain_lights()[0] #grab the first tilechain print("Selected TileChain light: {}".form...
1,632
0
46
5177877a677eab63ecd6710fa86ccb89f8ec69d7
23,158
py
Python
webroot/cgi-bin/gameslist.py
elocemearg/atropine
894010bcc89d4e6962cf3fc15ef526068c38898d
[ "CC-BY-4.0" ]
null
null
null
webroot/cgi-bin/gameslist.py
elocemearg/atropine
894010bcc89d4e6962cf3fc15ef526068c38898d
[ "CC-BY-4.0" ]
null
null
null
webroot/cgi-bin/gameslist.py
elocemearg/atropine
894010bcc89d4e6962cf3fc15ef526068c38898d
[ "CC-BY-4.0" ]
null
null
null
#!/usr/bin/python3 import sys; import cgicommon; import urllib.request, urllib.parse, urllib.error; import cgi; import cgitb; import os; import re; import random; CONFLICT_STRATEGY_FORCE = 0 CONFLICT_STRATEGY_DO_NOT_EMBLANKIFY = 1 CONFLICT_STRATEGY_ONLY_FILL_BLANKS = 2 CONFLICT_STRATEGY_DISCARD = 3 cgitb.enable(); ...
47.748454
310
0.60912
#!/usr/bin/python3 import sys; import cgicommon; import urllib.request, urllib.parse, urllib.error; import cgi; import cgitb; import os; import re; import random; CONFLICT_STRATEGY_FORCE = 0 CONFLICT_STRATEGY_DO_NOT_EMBLANKIFY = 1 CONFLICT_STRATEGY_ONLY_FILL_BLANKS = 2 CONFLICT_STRATEGY_DISCARD = 3 def int_or_none(s...
10,371
0
115
c68efaf3e88073a6ef86b995eddf8209d73c8cc2
5,329
py
Python
syzoj_tools/__init__.py
syzoj/syzoj-tools
ade6a4e05422894881b242e517933843fab71756
[ "MIT" ]
34
2018-11-04T16:11:11.000Z
2022-01-26T15:09:39.000Z
syzoj_tools/__init__.py
syzoj/syzoj-tools
ade6a4e05422894881b242e517933843fab71756
[ "MIT" ]
6
2018-11-04T15:58:29.000Z
2019-07-03T06:58:48.000Z
syzoj_tools/__init__.py
syzoj/syzoj-tools
ade6a4e05422894881b242e517933843fab71756
[ "MIT" ]
6
2018-12-01T05:45:31.000Z
2020-01-08T08:06:44.000Z
#!/usr/bin/python3 import argparse import logging from .problem import Problem from .contest import Contest
41.310078
160
0.682867
#!/usr/bin/python3 import argparse import logging from .problem import Problem from .contest import Contest def main(): parser = argparse.ArgumentParser(prog="syzoj") subparser = parser.add_subparsers(dest="subcommands") parser.add_argument("--path", dest="path", default=".") parser.add_argument('-v', ...
5,002
0
219
beb60eaaf0df87866ceb9d7435941b848c78cc78
512
py
Python
.archive/projectlib/common/number/functional.py
abhmul/projects-repo
6d3a8110ce69219e769e0e56d14fbe394f6389c6
[ "MIT" ]
null
null
null
.archive/projectlib/common/number/functional.py
abhmul/projects-repo
6d3a8110ce69219e769e0e56d14fbe394f6389c6
[ "MIT" ]
null
null
null
.archive/projectlib/common/number/functional.py
abhmul/projects-repo
6d3a8110ce69219e769e0e56d14fbe394f6389c6
[ "MIT" ]
null
null
null
import math import itertools from collections import defaultdict flatten_iter = itertools.chain.from_iterable # https://stackoverflow.com/a/6909532/5538273
20.48
92
0.673828
import math import itertools from collections import defaultdict flatten_iter = itertools.chain.from_iterable # https://stackoverflow.com/a/6909532/5538273 def factors(n): return set(flatten_iter((i, n//i) for i in range(1, int(math.sqrt(n)+1)) if n % i == 0)) def binary(x, padding=0): return format(x, f"0...
260
0
91
d82f7ebd4c8e0f662bc9dace46a30fecf0fddce5
1,616
py
Python
ex_03_session_object.py
albertgreinoecker/python-flask-examples
86cd4dd214241910c20fcd21550aaea2fd9eb0b5
[ "Apache-2.0" ]
null
null
null
ex_03_session_object.py
albertgreinoecker/python-flask-examples
86cd4dd214241910c20fcd21550aaea2fd9eb0b5
[ "Apache-2.0" ]
null
null
null
ex_03_session_object.py
albertgreinoecker/python-flask-examples
86cd4dd214241910c20fcd21550aaea2fd9eb0b5
[ "Apache-2.0" ]
null
null
null
from flask import Flask, render_template, session, jsonify from flask_session import Session # new style ''' Möchte man z.B.: Objekte in der Session speichern, gibt es bei der normalen Verwendung ein Problem, weil Flask die Session Info als JSON-String (verschlüsselt!) in einem Cookie speichert. Es gäbe die Möglich...
36.727273
155
0.689356
from flask import Flask, render_template, session, jsonify from flask_session import Session # new style ''' Möchte man z.B.: Objekte in der Session speichern, gibt es bei der normalen Verwendung ein Problem, weil Flask die Session Info als JSON-String (verschlüsselt!) in einem Cookie speichert. Es gäbe die Möglich...
638
-6
71
281a66a4818f868ede0abdbd047f61165264375d
8,172
py
Python
cvxpy_tinoco/constraints.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
cvxpy_tinoco/constraints.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
cvxpy_tinoco/constraints.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
#***********************************************************************# # Copyright (C) 2010-2012 Tomas Tinoco De Rubira # # # # This file is part of CVXPY # # ...
33.768595
78
0.488253
#***********************************************************************# # Copyright (C) 2010-2012 Tomas Tinoco De Rubira # # # # This file is part of CVXPY # # ...
1,781
2,212
44
ae705d599832a8e29581cd28be7198a946fe8002
5,141
py
Python
TestCaseCodes/Saadat/OLDVersion/RecomendWeb.py
Dieuzu/SDGP-Nullpoint-G22
1080e1c77dddb59057de1ea9bccd97ec987ae202
[ "MIT" ]
null
null
null
TestCaseCodes/Saadat/OLDVersion/RecomendWeb.py
Dieuzu/SDGP-Nullpoint-G22
1080e1c77dddb59057de1ea9bccd97ec987ae202
[ "MIT" ]
null
null
null
TestCaseCodes/Saadat/OLDVersion/RecomendWeb.py
Dieuzu/SDGP-Nullpoint-G22
1080e1c77dddb59057de1ea9bccd97ec987ae202
[ "MIT" ]
null
null
null
# write-html.py import webbrowser if __name__ == "__main__": main()
51.41
229
0.541723
# write-html.py import webbrowser def main(): f = open('4_RefferenceResultGen\TestFolder\TaskResults.html','a') r = open('4_RefferenceResultGen\TestFolder\Refined_Links.txt','r') P1 = """<!DOCTYPE html> <html style="font-size: 16px;"> <head> <meta ...
5,036
0
23
2ee5c04d969e04b06006dc6d3b010e073f165efb
1,366
py
Python
test/test_classes/test_graph.py
MHenderson1988/PyLineofsight
169a693320fd39ded4c76fd96b4613de2d0de85c
[ "MIT" ]
4
2021-07-05T09:19:42.000Z
2022-01-22T01:51:02.000Z
test/test_classes/test_graph.py
MHenderson1988/PyLineofsight
169a693320fd39ded4c76fd96b4613de2d0de85c
[ "MIT" ]
3
2020-06-20T10:47:44.000Z
2022-01-11T19:50:27.000Z
test/test_classes/test_graph.py
MHenderson1988/PyLineofsight
169a693320fd39ded4c76fd96b4613de2d0de85c
[ "MIT" ]
2
2020-06-20T10:23:36.000Z
2022-01-11T16:14:30.000Z
from unittest import TestCase from main.classes.arc_solver import ArcSolver from main.classes.decimal_location import DecimalLocation from main.classes.graph import Graph
35.025641
87
0.662518
from unittest import TestCase from main.classes.arc_solver import ArcSolver from main.classes.decimal_location import DecimalLocation from main.classes.graph import Graph class TestGraph(TestCase): def setUp(self) -> None: self.test_data = [10, 20, 30] self.test_data2 = [900, 2000, 1000] ...
1,058
5
130
48846ea3e6c8c54699820da1a89594fc5a229ad0
6,852
py
Python
third_party/tlslite/tlslite/integration/clienthelper.py
Acidburn0zzz/chromium-1
4c08f442d2588a2c7cfaa117a55bd87d2ac32f9a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
third_party/tlslite/tlslite/integration/clienthelper.py
Acidburn0zzz/chromium-1
4c08f442d2588a2c7cfaa117a55bd87d2ac32f9a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
third_party/tlslite/tlslite/integration/clienthelper.py
Acidburn0zzz/chromium-1
4c08f442d2588a2c7cfaa117a55bd87d2ac32f9a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
""" A helper class for using TLS Lite with stdlib clients (httplib, xmlrpclib, imaplib, poplib). """ from tlslite.checker import Checker class ClientHelper: """This is a helper class used to integrate TLS Lite with various TLS clients (e.g. poplib, smtplib, httplib, etc.)""" def __init__(self, ...
41.780488
76
0.619527
""" A helper class for using TLS Lite with stdlib clients (httplib, xmlrpclib, imaplib, poplib). """ from tlslite.checker import Checker class ClientHelper: """This is a helper class used to integrate TLS Lite with various TLS clients (e.g. poplib, smtplib, httplib, etc.)""" def __init__(self, ...
1,094
0
27
619206d534a8f617a96a868f06a8e7f359b490b1
7,838
py
Python
src/gym-snake/gym_snake/envs/snake_adversarial_env.py
jdubkim/Self-play-on-Multi-Sankes-Environment
8e72c66110a007d6bf0ca2ff68fc0a845f3b3a42
[ "MIT" ]
5
2018-07-02T12:42:00.000Z
2018-11-22T12:56:21.000Z
src/gym-snake/gym_snake/envs/snake_adversarial_env.py
jdubkim/dlcampjeju2018
8e72c66110a007d6bf0ca2ff68fc0a845f3b3a42
[ "MIT" ]
null
null
null
src/gym-snake/gym_snake/envs/snake_adversarial_env.py
jdubkim/dlcampjeju2018
8e72c66110a007d6bf0ca2ff68fc0a845f3b3a42
[ "MIT" ]
null
null
null
import math import gym from gym import spaces from gym.utils import seeding import numpy as np from gym.envs.classic_control import rendering from config import Config
28.194245
118
0.495917
import math import gym from gym import spaces from gym.utils import seeding import numpy as np from gym.envs.classic_control import rendering from config import Config class SnakeAdversarial(gym.Env): def __init__(self): self.dim = 10 # 10 X 10 environment self.action_space = spaces.Discrete(5) ...
7,232
11
427
8e9db4c6e20bbfa8232bbeefe8a9e0178b83da57
161
py
Python
050_Soma_dos_pares.py
fabioeomedeiros/Python-Base
ef9c1c66b3221f71d1c8dcaf4c2f86503712e9f1
[ "MIT" ]
null
null
null
050_Soma_dos_pares.py
fabioeomedeiros/Python-Base
ef9c1c66b3221f71d1c8dcaf4c2f86503712e9f1
[ "MIT" ]
null
null
null
050_Soma_dos_pares.py
fabioeomedeiros/Python-Base
ef9c1c66b3221f71d1c8dcaf4c2f86503712e9f1
[ "MIT" ]
null
null
null
#050_Soma_dos_pares.py soma = 0 for c in range(1, 6): num = int(input(f"{c}º Número: ")) if (num % 2 == 0): soma += num print (f"Soma = {soma}")
20.125
38
0.534161
#050_Soma_dos_pares.py soma = 0 for c in range(1, 6): num = int(input(f"{c}º Número: ")) if (num % 2 == 0): soma += num print (f"Soma = {soma}")
0
0
0
01fa47b5572e9be6d9fb493eb70734e1c33edeab
22,313
py
Python
libs/csvfile.py
hokaze123/ChartViewer
f9ee0ca5c23ad36dfe780fa573eed1d43c93f11b
[ "MIT" ]
3
2020-09-13T10:51:58.000Z
2021-06-09T10:07:01.000Z
libs/csvfile.py
Lihao2017-11-15/ChartViewer
7295ee462ab4a25d585210bad4568f8685b0ee61
[ "MIT" ]
null
null
null
libs/csvfile.py
Lihao2017-11-15/ChartViewer
7295ee462ab4a25d585210bad4568f8685b0ee61
[ "MIT" ]
1
2020-09-13T10:48:09.000Z
2020-09-13T10:48:09.000Z
import re import math from .datetime_string import to_seconds, to_timedelta import logging import os logger = logging.getLogger()
36.942053
120
0.558105
import re import math from .datetime_string import to_seconds, to_timedelta import logging import os logger = logging.getLogger() class CSVFile: indexes = {} columns = [] headers_dict = {} file_name = '' @staticmethod def read_rows_from_file(source_file_name): rows = [] try: ...
20,597
1,513
69
e73b49f0245f75c58acf2aaf368e26b875525419
527
py
Python
tests/test_receipe.py
MrLeeh/beerpy
1bbec29a39b01a9d8e54c475de29c768dfd27597
[ "MIT" ]
null
null
null
tests/test_receipe.py
MrLeeh/beerpy
1bbec29a39b01a9d8e54c475de29c768dfd27597
[ "MIT" ]
null
null
null
tests/test_receipe.py
MrLeeh/beerpy
1bbec29a39b01a9d8e54c475de29c768dfd27597
[ "MIT" ]
null
null
null
import pytest from beerpy.receipe import hop_quantity, malt_composition, PILSENER_MALT, \ MUNICH_MALT from beerpy.units.gravity import Gravity
26.35
75
0.650854
import pytest from beerpy.receipe import hop_quantity, malt_composition, PILSENER_MALT, \ MUNICH_MALT from beerpy.units.gravity import Gravity def test_malt_composition(): res = malt_composition( 22, Gravity(14), [(PILSENER_MALT, 0.8), (MUNICH_MALT, 0.2)] ) assert res[0] == 5.44 assert re...
332
0
46
fa62c70a7a9c4ffda7faccbae1d471d4594d9dce
22,791
py
Python
tools/visual_utils/visualize_utils.py
ElectronicElephant/OpenPCDet-PX-fork
7f5f792c38d1052c550e34bd7acc085bc4bebc4f
[ "Apache-2.0" ]
1
2021-07-12T07:07:40.000Z
2021-07-12T07:07:40.000Z
tools/visual_utils/visualize_utils.py
ElectronicElephant/OpenPCDet-PX-fork
7f5f792c38d1052c550e34bd7acc085bc4bebc4f
[ "Apache-2.0" ]
null
null
null
tools/visual_utils/visualize_utils.py
ElectronicElephant/OpenPCDet-PX-fork
7f5f792c38d1052c550e34bd7acc085bc4bebc4f
[ "Apache-2.0" ]
1
2021-06-30T08:54:25.000Z
2021-06-30T08:54:25.000Z
import mayavi.mlab as mlab import numpy as np import torch import cv2 import matplotlib.pyplot as plt box_colormap = [ [1, 1, 1], [0, 1, 0], [0, 1, 1], [1, 1, 0], ] label_dict = {0:"background", 1:"Car", 2:"Ped", 3:"Cycler", 4:"Truck"} color_dict = {"0":[255, 255, 255], "1":[255, 255, 0], "2":[51, 153,...
43.66092
184
0.555263
import mayavi.mlab as mlab import numpy as np import torch import cv2 import matplotlib.pyplot as plt box_colormap = [ [1, 1, 1], [0, 1, 0], [0, 1, 1], [1, 1, 0], ] label_dict = {0:"background", 1:"Car", 2:"Ped", 3:"Cycler", 4:"Truck"} color_dict = {"0":[255, 255, 255], "1":[255, 255, 0], "2":[51, 153,...
10,167
0
230
4e5009b784d23c0d5ce31e9da785788590332b6f
422
py
Python
resourceUtils.py
hanhet/hanhet-co2
bdeba2388a2179962d14b17121969aea3e4b65f0
[ "Apache-2.0" ]
null
null
null
resourceUtils.py
hanhet/hanhet-co2
bdeba2388a2179962d14b17121969aea3e4b65f0
[ "Apache-2.0" ]
null
null
null
resourceUtils.py
hanhet/hanhet-co2
bdeba2388a2179962d14b17121969aea3e4b65f0
[ "Apache-2.0" ]
null
null
null
import os import time import psutil import sys import atexit
16.88
33
0.718009
import os import time import psutil import sys import atexit def get_cpu_time(): return psutil.cpu_times().idle def get_total_memory(): mem = psutil.virtual_memory() return mem.total def get_free_memory(): mem = psutil.virtual_memory() return mem.free def get_total_disk(): disk = psutil.disk_usage('/...
242
0
119
2bc44aa34b4bc1b094fb35d6ffe1882200ba961b
68
py
Python
lombscargle/__init__.py
jakevdp/nfftls
01aebd51189a6ed96e44c58cd55b74b8691cbe77
[ "BSD-3-Clause" ]
2
2017-07-29T13:11:34.000Z
2019-11-12T01:41:42.000Z
lombscargle/__init__.py
jakevdp/nfftls
01aebd51189a6ed96e44c58cd55b74b8691cbe77
[ "BSD-3-Clause" ]
null
null
null
lombscargle/__init__.py
jakevdp/nfftls
01aebd51189a6ed96e44c58cd55b74b8691cbe77
[ "BSD-3-Clause" ]
null
null
null
"""Fast Lomb-Scargle Periodograms""" from .core import LombScargle
17
36
0.764706
"""Fast Lomb-Scargle Periodograms""" from .core import LombScargle
0
0
0
22b110f5e6e266f87ccb45082c2eba1d4494b357
724
py
Python
scormxblock/views.py
eol-uchile/edx_xblock_scorm
af72761ad08d5570e85d35d3ed7908618e707dac
[ "Apache-2.0" ]
null
null
null
scormxblock/views.py
eol-uchile/edx_xblock_scorm
af72761ad08d5570e85d35d3ed7908618e707dac
[ "Apache-2.0" ]
null
null
null
scormxblock/views.py
eol-uchile/edx_xblock_scorm
af72761ad08d5570e85d35d3ed7908618e707dac
[ "Apache-2.0" ]
1
2022-01-13T19:22:17.000Z
2022-01-13T19:22:17.000Z
import os.path import mimetypes from django.http import HttpResponse from .utils import get_scorm_storage import logging logger = logging.getLogger(__name__) def proxy_scorm_media(request, block_id, file, sha1=None): """ Render the media objects by proxy, as the files must be in the same domain as the ...
23.354839
62
0.667127
import os.path import mimetypes from django.http import HttpResponse from .utils import get_scorm_storage import logging logger = logging.getLogger(__name__) def proxy_scorm_media(request, block_id, file, sha1=None): """ Render the media objects by proxy, as the files must be in the same domain as the ...
0
0
0
46a92d70b54fe3bf5b3629c2905e334570a0b744
2,367
py
Python
data_quality_problem_set2_area.py
mugofjoe/dand-data-wrangling
c415219cc8178a59494599f2f84a3692bdc7d87f
[ "MIT" ]
null
null
null
data_quality_problem_set2_area.py
mugofjoe/dand-data-wrangling
c415219cc8178a59494599f2f84a3692bdc7d87f
[ "MIT" ]
null
null
null
data_quality_problem_set2_area.py
mugofjoe/dand-data-wrangling
c415219cc8178a59494599f2f84a3692bdc7d87f
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ TOPIC: Decide what to do with a field that has multiple items in it. In this problem set you work with cities infobox data, audit it, come up with a cleaning idea and then clean it up. Since in the previous quiz you made a decision on which value to keep for t...
28.178571
80
0.613012
#!/usr/bin/env python # -*- coding: utf-8 -*- """ TOPIC: Decide what to do with a field that has multiple items in it. In this problem set you work with cities infobox data, audit it, come up with a cleaning idea and then clean it up. Since in the previous quiz you made a decision on which value to keep for t...
1,415
0
75
6028501e1702c0232cceb1c713386a86d37a048d
754
py
Python
constrainmol/examples/parmed_box/example_parmed_box.py
rsdefever/constrainmol
0baa4c25abf2d01ad4c3078a541b4fd943514121
[ "BSD-3-Clause" ]
7
2020-12-15T05:08:36.000Z
2022-01-03T02:20:25.000Z
constrainmol/examples/parmed_box/example_parmed_box.py
rsdefever/constrainmol
0baa4c25abf2d01ad4c3078a541b4fd943514121
[ "BSD-3-Clause" ]
5
2020-11-06T21:17:51.000Z
2020-11-18T22:44:18.000Z
constrainmol/examples/parmed_box/example_parmed_box.py
rsdefever/constrainmol
0baa4c25abf2d01ad4c3078a541b4fd943514121
[ "BSD-3-Clause" ]
1
2020-12-15T05:08:44.000Z
2020-12-15T05:08:44.000Z
import parmed import numpy as np from constrainmol import ConstrainedMolecule # Load from gro/topology system = parmed.load_file("system.top", xyz="system.gro") system.save("unconstrained.pdb", overwrite=True) constrained_coordinates = np.zeros(system.coordinates.shape) unique_res = system.split() for (res, resids)...
30.16
79
0.753316
import parmed import numpy as np from constrainmol import ConstrainedMolecule # Load from gro/topology system = parmed.load_file("system.top", xyz="system.gro") system.save("unconstrained.pdb", overwrite=True) constrained_coordinates = np.zeros(system.coordinates.shape) unique_res = system.split() for (res, resids)...
0
0
0
8e6067ab50fa68db3a45a2d3b5be05697b3dac59
700
py
Python
edzapp/items.py
jamesadney/edzapp-scraper
03c55a6db342dc75a1299d9ea450dfb4b460392f
[ "BSD-3-Clause" ]
1
2015-11-26T13:54:59.000Z
2015-11-26T13:54:59.000Z
edzapp/items.py
jamesadney/edzapp-scraper
03c55a6db342dc75a1299d9ea450dfb4b460392f
[ "BSD-3-Clause" ]
null
null
null
edzapp/items.py
jamesadney/edzapp-scraper
03c55a6db342dc75a1299d9ea450dfb4b460392f
[ "BSD-3-Clause" ]
null
null
null
from datetime import datetime from scrapy.contrib.loader import ItemLoader from scrapy.contrib.loader.processor import Join, MapCompose, Identity from scrapy.contrib_exp.djangoitem import DjangoItem from django_edzapp.jobs.models import Job
24.137931
70
0.747143
from datetime import datetime from scrapy.contrib.loader import ItemLoader from scrapy.contrib.loader.processor import Join, MapCompose, Identity from scrapy.contrib_exp.djangoitem import DjangoItem from django_edzapp.jobs.models import Job def to_datetime(string): try: datetime_object = datetime.strptim...
180
206
69
f04216eba5a676ae04e6688a7532804acc165343
88
py
Python
comments/tests/__init__.py
RichardHirtle/c4all
a09c4b098cf1a58ed5e3ab6116a749a17ec035e0
[ "MIT" ]
4
2016-09-03T12:43:13.000Z
2020-04-22T14:49:28.000Z
comments/tests/__init__.py
RichardHirtle/c4all
a09c4b098cf1a58ed5e3ab6116a749a17ec035e0
[ "MIT" ]
1
2019-09-25T12:49:01.000Z
2020-08-04T11:33:09.000Z
comments/tests/__init__.py
RichardHirtle/c4all
a09c4b098cf1a58ed5e3ab6116a749a17ec035e0
[ "MIT" ]
3
2015-03-17T13:38:42.000Z
2016-05-06T15:06:31.000Z
from comment import * from thread import * from site import * from custom_user import *
17.6
25
0.772727
from comment import * from thread import * from site import * from custom_user import *
0
0
0
1dbcfb56385522b7d409b3f30b741f3688d38d67
3,392
py
Python
regexlib/python_re_test_file/regexlib_1091.py
yetingli/ReDoS-Benchmarks
f5b5094d835649e957bf3fec6b8bd4f6efdb35fc
[ "MIT" ]
1
2022-01-24T14:43:23.000Z
2022-01-24T14:43:23.000Z
regexlib/python_re_test_file/regexlib_1091.py
yetingli/ReDoS-Benchmarks
f5b5094d835649e957bf3fec6b8bd4f6efdb35fc
[ "MIT" ]
null
null
null
regexlib/python_re_test_file/regexlib_1091.py
yetingli/ReDoS-Benchmarks
f5b5094d835649e957bf3fec6b8bd4f6efdb35fc
[ "MIT" ]
null
null
null
# 1091 # (?:(?:w{3}\.)(?:[a-zA-Z0-9/;\?&=:\-_\$\+!\*'\(\|\\~\[\]#%\.])+[\.com|\.edu|\.gov|\.int|\.mil|\.net|\.org|\.biz|\.info|\.name|\.pro|\.aero|\.coop|\.museum|\.cat|\.jobs|\.travel|\.arpa|\.mobi|\.ac|\.ad|\.ae|\.af|\.ag|\.ai|\.al|\.am|\.an|\.ao|\.aq|\.ar|\.as|\.at|\.au|\.aw|\.az|\.ax|\.ba|\.bb|\.bd|\.be|\.bf|\.bg|\...
178.526316
1,495
0.420106
# 1091 # (?:(?:w{3}\.)(?:[a-zA-Z0-9/;\?&=:\-_\$\+!\*'\(\|\\~\[\]#%\.])+[\.com|\.edu|\.gov|\.int|\.mil|\.net|\.org|\.biz|\.info|\.name|\.pro|\.aero|\.coop|\.museum|\.cat|\.jobs|\.travel|\.arpa|\.mobi|\.ac|\.ad|\.ae|\.af|\.ag|\.ai|\.al|\.am|\.an|\.ao|\.aq|\.ar|\.as|\.at|\.au|\.aw|\.az|\.ax|\.ba|\.bb|\.bd|\.be|\.bf|\.bg|\...
0
0
0
4475be2c905f13e27a18554229e89144691feca4
1,294
py
Python
met/scripts/met-merger.py
DoggySmooth/MET
91e6e5a9ecd66d60059abbcaf9389c6780ba7ce7
[ "MIT" ]
null
null
null
met/scripts/met-merger.py
DoggySmooth/MET
91e6e5a9ecd66d60059abbcaf9389c6780ba7ce7
[ "MIT" ]
3
2021-03-31T18:53:02.000Z
2021-12-13T19:49:33.000Z
met/scripts/met-merger.py
DoggySmooth/MET
91e6e5a9ecd66d60059abbcaf9389c6780ba7ce7
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ This module merge to xml files into one. First it checks if its sha's are the same to avoid merging of different projects an finally merge it into one called merged.xml. """ import sys import argparse from lxml import etree import met.xmlMerger as merger USAGE = './met-merger firstXml.xml s...
26.408163
169
0.692427
#!/usr/bin/env python3 """ This module merge to xml files into one. First it checks if its sha's are the same to avoid merging of different projects an finally merge it into one called merged.xml. """ import sys import argparse from lxml import etree import met.xmlMerger as merger USAGE = './met-merger firstXml.xml s...
647
0
23
d9ffa1e8e2159ccdee3a14fac64ce819ff327cc8
2,291
py
Python
app/db_config.py
queenfiona/SendITc3
7bb2ed5165e07ec307bbd4f5abe2e53073f05f9c
[ "MIT" ]
null
null
null
app/db_config.py
queenfiona/SendITc3
7bb2ed5165e07ec307bbd4f5abe2e53073f05f9c
[ "MIT" ]
13
2020-02-12T01:22:14.000Z
2022-03-11T23:34:38.000Z
app/db_config.py
queenfiona/SendITc3
7bb2ed5165e07ec307bbd4f5abe2e53073f05f9c
[ "MIT" ]
1
2018-11-23T02:35:32.000Z
2018-11-23T02:35:32.000Z
"""Docstring for db_config file.""" import psycopg2 import os from instance.config import app_config # from boto.s3.connection import S3Connection # s3 = S3Connection(os.environ['S3_KEY'], os.environ['S3_SECRET']) env = os.getenv("FLASK_ENV") if not env: url = app_config["production"].DATABASE_URL else: url ...
30.546667
82
0.709297
"""Docstring for db_config file.""" import psycopg2 import os from instance.config import app_config # from boto.s3.connection import S3Connection # s3 = S3Connection(os.environ['S3_KEY'], os.environ['S3_SECRET']) env = os.getenv("FLASK_ENV") if not env: url = app_config["production"].DATABASE_URL else: url ...
0
0
0
880d5fbb50cdf9cfc0405f5b88ac61839cc441ce
3,222
py
Python
code/gaze_ocr.py
wolfmanstout/knausj_talon
4763a45f6f17b925a5e37061c0ccaab2c1c487ec
[ "MIT" ]
null
null
null
code/gaze_ocr.py
wolfmanstout/knausj_talon
4763a45f6f17b925a5e37061c0ccaab2c1c487ec
[ "MIT" ]
null
null
null
code/gaze_ocr.py
wolfmanstout/knausj_talon
4763a45f6f17b925a5e37061c0ccaab2c1c487ec
[ "MIT" ]
null
null
null
from typing import Union from talon import Context, Module, actions, app from talon.grammar import Phrase import gaze_ocr import screen_ocr # dependency of gaze-ocr from gaze_ocr import _talon_wrappers as talon_wrappers mod = Module() setting_ocr_logging_dir = mod.setting( "ocr_logging_dir", type=str, ...
39.777778
86
0.678771
from typing import Union from talon import Context, Module, actions, app from talon.grammar import Phrase import gaze_ocr import screen_ocr # dependency of gaze-ocr from gaze_ocr import _talon_wrappers as talon_wrappers mod = Module() setting_ocr_logging_dir = mod.setting( "ocr_logging_dir", type=str, ...
508
1,904
45
f6b623f822f4a01b98088658428c858da8bb5f1d
3,159
py
Python
booksite/views.py
mark-graciov/bookit
dfe471efe0a1fb1e3688fdebd79a14f8113acd42
[ "Apache-2.0" ]
null
null
null
booksite/views.py
mark-graciov/bookit
dfe471efe0a1fb1e3688fdebd79a14f8113acd42
[ "Apache-2.0" ]
null
null
null
booksite/views.py
mark-graciov/bookit
dfe471efe0a1fb1e3688fdebd79a14f8113acd42
[ "Apache-2.0" ]
null
null
null
import ast import os import string from wsgiref.util import FileWrapper from django.conf import settings from django.contrib.staticfiles import finders from django.http import HttpResponse from django.shortcuts import render, redirect from django.utils.crypto import random from .docx import read_docx_tags, replace_doc...
31.277228
108
0.675847
import ast import os import string from wsgiref.util import FileWrapper from django.conf import settings from django.contrib.staticfiles import finders from django.http import HttpResponse from django.shortcuts import render, redirect from django.utils.crypto import random from .docx import read_docx_tags, replace_doc...
2,601
0
161
6ed97324166b2fdbbae89b96cecf9a98cd36aeb0
471
py
Python
Students/chase/extra3.py
MikelShifrin/Python1
0096a327023a28e0c639042ae01268b07e61943e
[ "MIT" ]
3
2019-07-02T13:46:23.000Z
2019-08-19T14:41:25.000Z
Students/chase/extra3.py
MikelShifrin/Python1
0096a327023a28e0c639042ae01268b07e61943e
[ "MIT" ]
null
null
null
Students/chase/extra3.py
MikelShifrin/Python1
0096a327023a28e0c639042ae01268b07e61943e
[ "MIT" ]
null
null
null
main()
33.642857
74
0.675159
def main(): number_of_item=float(input("how many number of item do you want buy")) if(number_of_item<10): print(number_of_item*99) elif(number_of_item>=10 and number_of_item<=19): print(number_of_item*99*0.9) elif(number_of_item>=20 and number_of_item<=49): print(number_of_item*9...
442
0
22
31cb143e2377343eee8f33cd17f412399d49b638
10,226
py
Python
ocs_ci/deployment/disconnected.py
kesavanvt/ocs-ci
f120044486631f49133c9f3a137842673d765a1c
[ "MIT" ]
null
null
null
ocs_ci/deployment/disconnected.py
kesavanvt/ocs-ci
f120044486631f49133c9f3a137842673d765a1c
[ "MIT" ]
null
null
null
ocs_ci/deployment/disconnected.py
kesavanvt/ocs-ci
f120044486631f49133c9f3a137842673d765a1c
[ "MIT" ]
null
null
null
""" This module contains functionality required for disconnected installation. """ import logging import os import tempfile import yaml from ocs_ci.framework import config from ocs_ci.helpers.disconnected import get_opm_tool from ocs_ci.ocs import constants from ocs_ci.ocs.exceptions import NotFoundError from ocs_ci...
37.457875
107
0.663896
""" This module contains functionality required for disconnected installation. """ import logging import os import tempfile import yaml from ocs_ci.framework import config from ocs_ci.helpers.disconnected import get_opm_tool from ocs_ci.ocs import constants from ocs_ci.ocs.exceptions import NotFoundError from ocs_ci...
0
0
0
c14ef67b64dac63462b415ccd6897ee14da0a882
622
py
Python
test/test_helpers.py
virrim/rivalcfg
1215ca2061feddd7b85599e6b986705982138edd
[ "WTFPL" ]
2
2019-06-28T15:13:59.000Z
2020-06-05T19:00:39.000Z
test/test_helpers.py
virrim/rivalcfg
1215ca2061feddd7b85599e6b986705982138edd
[ "WTFPL" ]
1
2020-05-09T06:12:34.000Z
2020-07-31T23:58:55.000Z
test/test_helpers.py
virrim/rivalcfg
1215ca2061feddd7b85599e6b986705982138edd
[ "WTFPL" ]
null
null
null
import pytest import rivalcfg.helpers
34.555556
98
0.742765
import pytest import rivalcfg.helpers class TestIntToLittleEndianBytearray(object): def test_small_number_16bit(self): assert rivalcfg.helpers.uint_to_little_endian_bytearray(0x0001, 2) == [0x01, 0x00] # noqa def test_bigger_number_16bit(self): assert rivalcfg.helpers.uint_to_little_endian...
454
24
104
0455f230ec9eb1646bbd8b355eef81e8a026f547
5,969
py
Python
tests/test_adapters.py
bernt-matthias/cutadapt
9ba5b705ba0e6cc5e32d4ce3810788b05b16a306
[ "MIT" ]
null
null
null
tests/test_adapters.py
bernt-matthias/cutadapt
9ba5b705ba0e6cc5e32d4ce3810788b05b16a306
[ "MIT" ]
null
null
null
tests/test_adapters.py
bernt-matthias/cutadapt
9ba5b705ba0e6cc5e32d4ce3810788b05b16a306
[ "MIT" ]
null
null
null
import pytest from dnaio import Sequence from cutadapt.adapters import Adapter, Match, Where, LinkedAdapter def test_issue_265(): """Crash when accessing the matches property of non-anchored linked adapters""" s = Sequence('name', 'AAAATTTT') front_adapter = Adapter('GGG', where=Where.FRONT) b...
33.346369
107
0.640978
import pytest from dnaio import Sequence from cutadapt.adapters import Adapter, Match, Where, LinkedAdapter def test_issue_52(): adapter = Adapter( sequence='GAACTCCAGTCACNNNNN', where=Where.BACK, remove='suffix', max_error_rate=0.12, min_overlap=5, read_wildcards=...
5,206
0
183
77524bcd98a60ce23ba96fe03b7a6453cc256460
6,815
py
Python
pooch/hashes.py
rabernat/pooch
bc32d4eecec115e1fdf9bd4e306df5a6c22661fd
[ "BSD-3-Clause" ]
214
2018-07-21T19:21:45.000Z
2022-03-25T01:46:41.000Z
pooch/hashes.py
rabernat/pooch
bc32d4eecec115e1fdf9bd4e306df5a6c22661fd
[ "BSD-3-Clause" ]
194
2018-07-20T23:09:05.000Z
2022-03-14T14:50:29.000Z
pooch/hashes.py
rabernat/pooch
bc32d4eecec115e1fdf9bd4e306df5a6c22661fd
[ "BSD-3-Clause" ]
48
2018-07-23T21:20:55.000Z
2022-03-25T01:46:46.000Z
# Copyright (c) 2018 The Pooch Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause # # This code is part of the Fatiando a Terra project (https://www.fatiando.org) # """ Calculating and checking file hashes. """ import hashlib import functools from pathlib impo...
30.288889
84
0.639765
# Copyright (c) 2018 The Pooch Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause # # This code is part of the Fatiando a Terra project (https://www.fatiando.org) # """ Calculating and checking file hashes. """ import hashlib import functools from pathlib impo...
0
0
0
cf14ac456dd19a8963fff0edfb3d66062abdab74
3,703
py
Python
classphoto/tests/test_model.py
p2pu/mechanical-mooc
b57ce2e3a61f4fc5fe4b1c485b2a69429933ebcc
[ "MIT" ]
12
2015-01-12T17:26:32.000Z
2020-02-19T19:13:18.000Z
classphoto/tests/test_model.py
p2pu/mechanical-mooc
b57ce2e3a61f4fc5fe4b1c485b2a69429933ebcc
[ "MIT" ]
7
2015-01-22T13:09:47.000Z
2021-08-22T02:43:06.000Z
classphoto/tests/test_model.py
p2pu/mechanical-mooc
b57ce2e3a61f4fc5fe4b1c485b2a69429933ebcc
[ "MIT" ]
8
2015-10-27T22:34:01.000Z
2020-04-10T23:15:49.000Z
from django.test import TestCase from mock import patch from classphoto import models as classphoto_api from classphoto import db from classphoto import emails from signup import models as signup_api @patch('signup.models.sequence_model.get_current_sequence_number', lambda: 1)
33.663636
77
0.623819
from django.test import TestCase from mock import patch from classphoto import models as classphoto_api from classphoto import db from classphoto import emails from signup import models as signup_api @patch('signup.models.sequence_model.get_current_sequence_number', lambda: 1) class SimpleTest(TestCase): def s...
3,169
6
238
79b5eb78dad043dccbf2b484e3afb8079f17cc47
15,153
py
Python
crowdsourcing/util/multibox/model.py
sbranson/online_crowdsourcing
d1f7c814bb60aae9cf5e76e0b299713246f98ce3
[ "MIT" ]
4
2019-08-14T21:14:18.000Z
2021-11-04T09:32:37.000Z
crowdsourcing/util/multibox/model.py
sbranson/online_crowdsourcing
d1f7c814bb60aae9cf5e76e0b299713246f98ce3
[ "MIT" ]
null
null
null
crowdsourcing/util/multibox/model.py
sbranson/online_crowdsourcing
d1f7c814bb60aae9cf5e76e0b299713246f98ce3
[ "MIT" ]
1
2019-11-09T08:20:27.000Z
2019-11-09T08:20:27.000Z
import tensorflow as tf slim = tf.contrib.slim def block35(net, scale=1.0, activation_fn=tf.nn.relu, scope=None, reuse=None): """Builds the 35x35 resnet block.""" with tf.variable_scope(scope, 'Block35', [net], reuse=reuse): with tf.variable_scope('Branch_0'): tower_conv = slim.conv2d(net, 32, 1, scope...
44.831361
178
0.613806
import tensorflow as tf slim = tf.contrib.slim def block35(net, scale=1.0, activation_fn=tf.nn.relu, scope=None, reuse=None): """Builds the 35x35 resnet block.""" with tf.variable_scope(scope, 'Block35', [net], reuse=reuse): with tf.variable_scope('Branch_0'): tower_conv = slim.conv2d(net, 32, 1, scope...
6,190
0
46
2caf5ed64f41a475eb0f6f365fe1d8e6d8d66bac
747
py
Python
train/minimalistic_train.py
imagelint/focusfinder
834b4e2dd873739ba7dbe8389fdfeeaa12c03c87
[ "MIT" ]
null
null
null
train/minimalistic_train.py
imagelint/focusfinder
834b4e2dd873739ba7dbe8389fdfeeaa12c03c87
[ "MIT" ]
null
null
null
train/minimalistic_train.py
imagelint/focusfinder
834b4e2dd873739ba7dbe8389fdfeeaa12c03c87
[ "MIT" ]
null
null
null
from fastai.vision.all import * import re df = pd.read_csv(Path('download/labels/train_labels.csv'), names=['name','x_p','y_p'], header=0) imgs = DataBlock(blocks=(ImageBlock, PointBlock), get_items=get_image_files, get_y=get_focus_point, splitter=RandomSplitter(valid_pct=0.2, seed=42), batch_tfms=[*aug_transforms(siz...
62.25
258
0.726908
from fastai.vision.all import * import re def get_focus_point(path_name): dfb = next(iter(df[df['name']==path_name.name].index), ('no match for '+path_name.name)) return tensor([float(df['x_p'][dfb]), float(df['y_p'][dfb])]) df = pd.read_csv(Path('download/labels/train_labels.csv'), names=['name','x_p','y_p']...
169
0
23
5ad5b0dce0aebfcc0decf69ea1433b9412ccc9bb
5,230
py
Python
scripts/create_fluseverity_figs/Supp_zOR_epiduration_state.py
eclee25/flu-SDI-exploratory-age
2f5a4d97b84d2116e179e85fe334edf4556aa946
[ "MIT" ]
3
2018-03-29T23:02:43.000Z
2020-08-10T12:01:50.000Z
scripts/create_fluseverity_figs/Supp_zOR_epiduration_state.py
eclee25/flu-SDI-exploratory-age
2f5a4d97b84d2116e179e85fe334edf4556aa946
[ "MIT" ]
null
null
null
scripts/create_fluseverity_figs/Supp_zOR_epiduration_state.py
eclee25/flu-SDI-exploratory-age
2f5a4d97b84d2116e179e85fe334edf4556aa946
[ "MIT" ]
null
null
null
#!/usr/bin/python ############################################## ###Python template ###Author: Elizabeth Lee ###Date: 8/1/14 ###Function: scatter plot zOR metrics vs. epidemic duration at state level, using the state peak retrospective classification ## one plot per season per classification period vs. epidemic durati...
43.583333
214
0.736329
#!/usr/bin/python ############################################## ###Python template ###Author: Elizabeth Lee ###Date: 8/1/14 ###Function: scatter plot zOR metrics vs. epidemic duration at state level, using the state peak retrospective classification ## one plot per season per classification period vs. epidemic durati...
0
0
0
686738f8c5cb3f4321168859c030d4ecc830fda5
988
py
Python
scripts/filter_actions.py
heyjoakim/munaiah-analyser
d76056cecd3b7f4a6cd72d7fd526cea18aa671d6
[ "MIT" ]
1
2022-01-03T17:47:20.000Z
2022-01-03T17:47:20.000Z
scripts/filter_actions.py
heyjoakim/munaiah-analyser
d76056cecd3b7f4a6cd72d7fd526cea18aa671d6
[ "MIT" ]
null
null
null
scripts/filter_actions.py
heyjoakim/munaiah-analyser
d76056cecd3b7f4a6cd72d7fd526cea18aa671d6
[ "MIT" ]
1
2021-12-22T13:59:34.000Z
2021-12-22T13:59:34.000Z
import pandas as pd from subprocess import call # Generate raw data file # call("./get_actions.sh") // Add this if you dont have the out raw data TODO: Replace this with the go script # Do we add a count for each category a action has or ??? all_actions = open("data/actions_out/actions_raw.txt", "r") no_ver_actions =...
27.444444
110
0.711538
import pandas as pd from subprocess import call # Generate raw data file # call("./get_actions.sh") // Add this if you dont have the out raw data TODO: Replace this with the go script # Do we add a count for each category a action has or ??? all_actions = open("data/actions_out/actions_raw.txt", "r") no_ver_actions =...
0
0
0
7609dac71fe6ef641efd49318b3e76b0364b2b33
4,936
py
Python
utils/sigproc/dsp.py
cyx669521/Conv-TasNet-PyTorch
64188ffa48971218fdd68b66906970f215d7eca2
[ "MIT" ]
39
2019-04-03T03:25:40.000Z
2021-11-12T01:05:07.000Z
utils/sigproc/dsp.py
cyx669521/Conv-TasNet-PyTorch
64188ffa48971218fdd68b66906970f215d7eca2
[ "MIT" ]
5
2019-11-23T14:16:39.000Z
2021-08-30T05:33:59.000Z
utils/sigproc/dsp.py
wangkenpu/Conv-TasNet-PyTorch
64188ffa48971218fdd68b66906970f215d7eca2
[ "MIT" ]
10
2019-04-03T08:17:42.000Z
2021-12-14T01:23:51.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2018 ASLP@NPU Ke Wang from __future__ import absolute_import from __future__ import division from __future__ import print_function import math import os import sys import librosa import numpy as np import soundfile as sf from scipy.io import wavfile MA...
30.469136
71
0.632496
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2018 ASLP@NPU Ke Wang from __future__ import absolute_import from __future__ import division from __future__ import print_function import math import os import sys import librosa import numpy as np import soundfile as sf from scipy.io import wavfile MA...
295
0
69
cd064f19699be74497beed14a6f016f0c582cc7d
874
py
Python
recipes/Python/576431_export_variable_win32_like/recipe-576431.py
tdiprima/code
61a74f5f93da087d27c70b2efe779ac6bd2a3b4f
[ "MIT" ]
2,023
2017-07-29T09:34:46.000Z
2022-03-24T08:00:45.000Z
recipes/Python/576431_export_variable_win32_like/recipe-576431.py
unhacker/code
73b09edc1b9850c557a79296655f140ce5e853db
[ "MIT" ]
32
2017-09-02T17:20:08.000Z
2022-02-11T17:49:37.000Z
recipes/Python/576431_export_variable_win32_like/recipe-576431.py
unhacker/code
73b09edc1b9850c557a79296655f140ce5e853db
[ "MIT" ]
780
2017-07-28T19:23:28.000Z
2022-03-25T20:39:41.000Z
""" vim: set enc=utf-8 Author : winterTTr Mail : winterTTr@gmail.com Desc : Tools for Operation on Win32 Environment variables Module : win32export.py """ import win32gui import win32con import win32api
26.484848
158
0.713959
""" vim: set enc=utf-8 Author : winterTTr Mail : winterTTr@gmail.com Desc : Tools for Operation on Win32 Environment variables Module : win32export.py """ import win32gui import win32con import win32api def export ( name , value , update_system = True ): try : modifyVariableInRegister( name , val...
592
0
69
3debe193f06ad7a3963adeec17ffcb14130e01d6
201
py
Python
execpeewee/__init__.py
supplayer/exec_peewee
095b94d0a82e2f9d13e983d5cb6d22a09710b7c7
[ "MIT" ]
null
null
null
execpeewee/__init__.py
supplayer/exec_peewee
095b94d0a82e2f9d13e983d5cb6d22a09710b7c7
[ "MIT" ]
null
null
null
execpeewee/__init__.py
supplayer/exec_peewee
095b94d0a82e2f9d13e983d5cb6d22a09710b7c7
[ "MIT" ]
null
null
null
from execpeewee.builder import PeeweeModel from execpeewee.handler import ExecPeewee from execpeewee.mapping import PeeweeFields __all__ = [ 'PeeweeModel', 'ExecPeewee', 'PeeweeFields' ]
18.272727
43
0.766169
from execpeewee.builder import PeeweeModel from execpeewee.handler import ExecPeewee from execpeewee.mapping import PeeweeFields __all__ = [ 'PeeweeModel', 'ExecPeewee', 'PeeweeFields' ]
0
0
0
b8d2ac159ea46c08c77cc17cbe99d12772509c45
181
py
Python
tests/bytecode/mp-tests/fun4.py
LabAixBidouille/micropython
11aa6ba456287d6c80598a7ebbebd2887ce8f5a2
[ "MIT" ]
303
2015-07-11T17:12:55.000Z
2018-01-08T03:02:37.000Z
tests/bytecode/mp-tests/fun4.py
LabAixBidouille/micropython
11aa6ba456287d6c80598a7ebbebd2887ce8f5a2
[ "MIT" ]
13
2016-05-12T16:51:22.000Z
2018-01-10T22:33:25.000Z
tests/bytecode/mp-tests/fun4.py
LabAixBidouille/micropython
11aa6ba456287d6c80598a7ebbebd2887ce8f5a2
[ "MIT" ]
26
2018-01-18T09:15:33.000Z
2022-02-07T13:09:14.000Z
f = lambda a, b, *c, d: None # default arg #f = lambda a, b=1, *c, d: None # default arg for lambda not implemented
30.166667
72
0.574586
def f(a, b=1, *c, d): pass #print(a,b,c,d) # bug in uPy! f = lambda a, b, *c, d: None # default arg #f = lambda a, b=1, *c, d: None # default arg for lambda not implemented
43
0
22
7651b47a04e65ce5e0188647bc79ee8630ac895a
633
py
Python
fsdviz/stocking/migrations/0017_stocking_colorfields.py
AdamCottrill/fsdivz
98dd1f35a08dba26424e2951a40715e01399478c
[ "MIT" ]
null
null
null
fsdviz/stocking/migrations/0017_stocking_colorfields.py
AdamCottrill/fsdivz
98dd1f35a08dba26424e2951a40715e01399478c
[ "MIT" ]
6
2020-02-12T00:03:40.000Z
2020-11-30T01:20:56.000Z
fsdviz/stocking/migrations/0017_stocking_colorfields.py
AdamCottrill/fsdviz
98dd1f35a08dba26424e2951a40715e01399478c
[ "MIT" ]
null
null
null
# Generated by Django 2.2.24 on 2021-09-13 15:58 import colorfield.fields from django.db import migrations
25.32
81
0.612954
# Generated by Django 2.2.24 on 2021-09-13 15:58 import colorfield.fields from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("stocking", "0016_stocking_event_fk_defaults"), ] operations = [ migrations.AddField( model_name="lifestage", ...
0
501
23
be5f2b2b8a5a39a22461e8da453417d2919fbfd7
4,675
py
Python
app/forms.py
hazzillrodriguez/travel-pass
2508bf3bdbaed409022eb4748e3efcc78dee0ebd
[ "MIT" ]
null
null
null
app/forms.py
hazzillrodriguez/travel-pass
2508bf3bdbaed409022eb4748e3efcc78dee0ebd
[ "MIT" ]
null
null
null
app/forms.py
hazzillrodriguez/travel-pass
2508bf3bdbaed409022eb4748e3efcc78dee0ebd
[ "MIT" ]
null
null
null
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, SelectField, BooleanField, SubmitField from wtforms.fields.html5 import DateField from flask_wtf.file import FileField, FileAllowed, FileRequired from wtforms.validators import DataRequired, ValidationError, EqualTo, Email, Length from app....
36.24031
108
0.695829
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, SelectField, BooleanField, SubmitField from wtforms.fields.html5 import DateField from flask_wtf.file import FileField, FileAllowed, FileRequired from wtforms.validators import DataRequired, ValidationError, EqualTo, Email, Length from app....
160
4,108
69
6268a654cc967f8b117fefbd98f4b6bf0ecac528
2,277
py
Python
source/ccit2021.py
simon242/CampusCyberInspectionTool2021
5f585afa2ad9473082e690df8e7ca44dbac943ca
[ "MIT" ]
null
null
null
source/ccit2021.py
simon242/CampusCyberInspectionTool2021
5f585afa2ad9473082e690df8e7ca44dbac943ca
[ "MIT" ]
null
null
null
source/ccit2021.py
simon242/CampusCyberInspectionTool2021
5f585afa2ad9473082e690df8e7ca44dbac943ca
[ "MIT" ]
null
null
null
import argparse import os import webbrowser from Option import Option from functions.Clock import Clock from functions.shut import shut from functions.Ipconfig import Showip from functions.CryptoSystem import * from functions.Nslookup import Nslookup from functions.PortScanner import Scanport if __name__ == "__main__...
30.36
127
0.59552
import argparse import os import webbrowser from Option import Option from functions.Clock import Clock from functions.shut import shut from functions.Ipconfig import Showip from functions.CryptoSystem import * from functions.Nslookup import Nslookup from functions.PortScanner import Scanport def main(): # 準備參數解析 ...
2,110
0
23
7aab91c67e5a0b014d8044e8f2712e2c85d03816
1,598
py
Python
soft_delete_history/templatetags/soft_delete_extras.py
ThiloSavary/django-soft-delete-history
d511d3b3a13ddb56691d807c919fe312b5e2f3cf
[ "MIT" ]
null
null
null
soft_delete_history/templatetags/soft_delete_extras.py
ThiloSavary/django-soft-delete-history
d511d3b3a13ddb56691d807c919fe312b5e2f3cf
[ "MIT" ]
null
null
null
soft_delete_history/templatetags/soft_delete_extras.py
ThiloSavary/django-soft-delete-history
d511d3b3a13ddb56691d807c919fe312b5e2f3cf
[ "MIT" ]
null
null
null
from django import template from django.contrib.auth import get_permission_codename from django.utils.translation import gettext_lazy as _ from django.utils.safestring import mark_safe register = template.Library() @register.simple_tag(takes_context=True)
51.548387
133
0.702753
from django import template from django.contrib.auth import get_permission_codename from django.utils.translation import gettext_lazy as _ from django.utils.safestring import mark_safe register = template.Library() @register.simple_tag(takes_context=True) def admin_soft_delete_bar(context, *args, **kwargs): # Cou...
1,318
0
22
c963e25a39c48d1cf87711a245bad7fb912e676d
49
py
Python
discoin/config.py
Discoin/discoin.py
4a3459dfaab6695fe88d05290465a1b7842b3606
[ "MIT" ]
2
2020-07-26T11:29:47.000Z
2021-09-08T22:38:35.000Z
discoin/config.py
Discoin/discoin.py
4a3459dfaab6695fe88d05290465a1b7842b3606
[ "MIT" ]
8
2020-02-11T14:23:38.000Z
2021-04-16T21:38:15.000Z
discoin/config.py
Discoin/discoin.py
4a3459dfaab6695fe88d05290465a1b7842b3606
[ "MIT" ]
null
null
null
DOMAIN = "https://discoin.zws.im" VERSION = "4.0"
24.5
33
0.653061
DOMAIN = "https://discoin.zws.im" VERSION = "4.0"
0
0
0