hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f72cc8541c4c9a534a37b3d44f316d2620756960
973
py
Python
nengo/copter.py
simondlevy/gym-copter
7236769b7586b92026d4b47f12363258c84d9508
[ "MIT" ]
14
2019-11-03T05:17:46.000Z
2022-02-26T05:37:32.000Z
nengo/copter.py
simondlevy/gym-copter
7236769b7586b92026d4b47f12363258c84d9508
[ "MIT" ]
77
2020-05-17T01:56:29.000Z
2021-06-19T02:46:52.000Z
nengo/copter.py
simondlevy/gym-copter
7236769b7586b92026d4b47f12363258c84d9508
[ "MIT" ]
6
2020-01-01T07:22:15.000Z
2021-05-11T17:45:33.000Z
''' Quadcopter class for Nengo adaptive controller Copyright (C) 2021 Xuan Choo, Simon D. Levy MIT License ''' import nengo import gym import numpy as np from adaptive import run class Copter: def __init__(self, seed=None): self.env = gym.make('gym_copter:Hover1D-v0') self.reset(seed) d...
16.775862
63
0.572456
import nengo import gym import numpy as np from adaptive import run class Copter: def __init__(self, seed=None): self.env = gym.make('gym_copter:Hover1D-v0') self.reset(seed) def reset(self, seed): self.state = self.env.reset() def step(self, u): u = np.clip(u, 0, 1...
true
true
f72cc9142cb85a864de5beb77fe66a359cf63d16
18,754
py
Python
tools/sr_mapping/bfast_wrapper.py
ramezrawas/galaxy-1
c03748dd49c060a68d07bce56eae33e0ba154414
[ "CC-BY-3.0" ]
null
null
null
tools/sr_mapping/bfast_wrapper.py
ramezrawas/galaxy-1
c03748dd49c060a68d07bce56eae33e0ba154414
[ "CC-BY-3.0" ]
7
2016-12-07T22:19:37.000Z
2019-01-30T15:04:26.000Z
tools/sr_mapping/bfast_wrapper.py
ramezrawas/galaxy-1
c03748dd49c060a68d07bce56eae33e0ba154414
[ "CC-BY-3.0" ]
null
null
null
#!/usr/bin/env python """ Runs BFAST on single-end or paired-end data. TODO: more documentation TODO: - auto-detect gzip or bz2 - split options (?) - queue lengths (?) - assumes reference always has been indexed - main and secondary indexes - scoring matrix file ? - read group file ? usage...
53.430199
254
0.571878
import optparse import os import shutil import subprocess import sys import tempfile def stop_err( msg ): sys.stderr.write( '%s\n' % msg ) sys.exit() def __main__(): parser = optparse.OptionParser() parser.add_option( '-r', '--ref', dest='ref', help='The reference genome to index and use' ) par...
true
true
f72cc9fd6006f3d37d591e4575e98e027bf672c1
11,546
py
Python
markovify/text.py
iconesalut/markovify
e82077e2733b7613a6a153194ab1b288a9170e4e
[ "MIT" ]
null
null
null
markovify/text.py
iconesalut/markovify
e82077e2733b7613a6a153194ab1b288a9170e4e
[ "MIT" ]
null
null
null
markovify/text.py
iconesalut/markovify
e82077e2733b7613a6a153194ab1b288a9170e4e
[ "MIT" ]
null
null
null
import re import json import random from .splitters import split_into_sentences from .chain import Chain, BEGIN, END from unidecode import unidecode DEFAULT_MAX_OVERLAP_RATIO = 0.7 DEFAULT_MAX_OVERLAP_TOTAL = 15 DEFAULT_TRIES = 10 class ParamError(Exception): pass class Text(object): reject_pat = re.compile...
39.406143
177
0.620908
import re import json import random from .splitters import split_into_sentences from .chain import Chain, BEGIN, END from unidecode import unidecode DEFAULT_MAX_OVERLAP_RATIO = 0.7 DEFAULT_MAX_OVERLAP_TOTAL = 15 DEFAULT_TRIES = 10 class ParamError(Exception): pass class Text(object): reject_pat = re.compile...
true
true
f72ccad3cb20f24ab3326c7cf1774f63675af32d
2,175
py
Python
django_remote_submission/signals.py
YeemBoi/django-remote-submission
665daa0701b7da5ac653115712d0c0f0aae041c6
[ "ISC" ]
null
null
null
django_remote_submission/signals.py
YeemBoi/django-remote-submission
665daa0701b7da5ac653115712d0c0f0aae041c6
[ "ISC" ]
null
null
null
django_remote_submission/signals.py
YeemBoi/django-remote-submission
665daa0701b7da5ac653115712d0c0f0aae041c6
[ "ISC" ]
null
null
null
"""Attach signals to this app's models.""" # -*- coding: utf-8 -*- import json import logging import channels.layers from asgiref.sync import async_to_sync from django.db.models.signals import post_save from django.dispatch import receiver from .models import Job, Log logger = logging.getLogger(__name__) # pylint...
24.715909
76
0.643218
import json import logging import channels.layers from asgiref.sync import async_to_sync from django.db.models.signals import post_save from django.dispatch import receiver from .models import Job, Log logger = logging.getLogger(__name__) def send_message(event): message = event['text'] channel_layer = ...
true
true
f72ccbbf32e6e2e0c7f9b522c887b0a968d79192
15,631
py
Python
guild/external/setuptools/tests/test_wheel.py
msarahan/guildai
99bdd09683291dbc206b6dde1b327d47401d29eb
[ "Apache-2.0" ]
63
2016-11-01T13:06:46.000Z
2018-08-21T08:38:36.000Z
guild/external/setuptools/tests/test_wheel.py
msarahan/guildai
99bdd09683291dbc206b6dde1b327d47401d29eb
[ "Apache-2.0" ]
28
2016-11-02T01:41:23.000Z
2018-10-19T22:57:06.000Z
guild/external/setuptools/tests/test_wheel.py
msarahan/guildai
99bdd09683291dbc206b6dde1b327d47401d29eb
[ "Apache-2.0" ]
8
2017-01-15T14:58:43.000Z
2018-07-27T11:51:39.000Z
# -*- coding: utf-8 -*- """wheel tests """ from distutils.sysconfig import get_config_var from distutils.util import get_platform import contextlib import glob import inspect import os import shutil import subprocess import sys import zipfile import pytest from pkg_resources import Distribution, PathMetadata, PY_MA...
26.674061
78
0.448852
from distutils.sysconfig import get_config_var from distutils.util import get_platform import contextlib import glob import inspect import os import shutil import subprocess import sys import zipfile import pytest from pkg_resources import Distribution, PathMetadata, PY_MAJOR from setuptools.extern.packaging.utils ...
true
true
f72cccf7222dd5cd1076530b8dcc103fb3bb156d
246
py
Python
board/amebaz_dev/ucube.py
jinlongliu/AliOS-Things
ce051172a775f987183e7aca88bb6f3b809ea7b0
[ "Apache-2.0" ]
4
2019-03-12T11:04:48.000Z
2019-10-22T06:06:53.000Z
board/amebaz_dev/ucube.py
IamBaoMouMou/AliOS-Things
195a9160b871b3d78de6f8cf6c2ab09a71977527
[ "Apache-2.0" ]
3
2018-12-17T13:06:46.000Z
2018-12-28T01:40:59.000Z
board/amebaz_dev/ucube.py
IamBaoMouMou/AliOS-Things
195a9160b871b3d78de6f8cf6c2ab09a71977527
[ "Apache-2.0" ]
2
2018-01-23T07:54:08.000Z
2018-01-23T11:38:59.000Z
linux_only_targets="linuxapp helloworld helloworld_nocli linkkitapp alinkapp networkapp tls uDataapp hdlcapp.hdlcserver wifihalapp coapapp nano linkkit_gateway blink linkkit_sched meshapp acapp netmgrapp mqttapp wifimonitor vflashdemo athostapp"
123
245
0.894309
linux_only_targets="linuxapp helloworld helloworld_nocli linkkitapp alinkapp networkapp tls uDataapp hdlcapp.hdlcserver wifihalapp coapapp nano linkkit_gateway blink linkkit_sched meshapp acapp netmgrapp mqttapp wifimonitor vflashdemo athostapp"
true
true
f72ccd62512051e1b39bfbd0414538acd7914a7b
1,403
py
Python
Python/textrank/textrank.py
chasingegg/Data_Science
a499866ff92aa1107057b20563564bdd89fc370f
[ "MIT" ]
1
2021-04-03T14:21:14.000Z
2021-04-03T14:21:14.000Z
Python/textrank/textrank.py
chasingegg/Data_Science
a499866ff92aa1107057b20563564bdd89fc370f
[ "MIT" ]
null
null
null
Python/textrank/textrank.py
chasingegg/Data_Science
a499866ff92aa1107057b20563564bdd89fc370f
[ "MIT" ]
null
null
null
#!/usr/src/env python # -*- coding: utf-8 -*- # TextRank 博客 http://xiaosheng.me/2017/04/08/article49/ # 从PageRank转变而来,可以用来做关键字的提取。TextRank的计算公式其实跟PageRank可以认为是一样的 # 只不过就是要考虑权重的因素(算PageRank的时候就是均摊权值) # 在TextRank构建的图中,节点是句子,权值就是两个句子的相似程度 # 提取关键字的时候,单词作为图的节点,把权值都设成1,此时其实退化成PageRank # 把文本拆分成单词,将这一些单词设定一个简单的滑动窗口,每个窗口内的任意两...
36.921053
107
0.667142
import sys import pandas as pd import jieba.analyse def textrank(data, topK): idList, titleList, abstractList = data['id'], data['title'], data['abstract'] ids, title, keys = [], [], [] for i in range(len(idList)): text = '%s。%s' % (titleList[i], abstractList[i]) jieba.analyse.set_stop_w...
true
true
f72ccf21d93a0540ee9ca7edb99c6b9d48f98ad0
4,043
py
Python
StandardDataSets/collada/library_geometries/geometry/mesh/vertices/input/position_texcoord_color_normal/position_texcoord_color_normal.py
KhronosGroup/COLLADA-CTS
61f2a560cbb2a06ee62da8025241f6b08d06bfd9
[ "MIT" ]
20
2015-03-19T08:02:57.000Z
2020-10-16T15:16:11.000Z
StandardDataSets/collada/library_geometries/geometry/mesh/vertices/input/position_texcoord_color_normal/position_texcoord_color_normal.py
Acidburn0zzz/COLLADA-CTS
39a36188cf8710bbc003df43ed70b965eb4386bd
[ "MIT" ]
4
2017-04-19T18:42:05.000Z
2017-06-17T03:03:28.000Z
StandardDataSets/collada/library_geometries/geometry/mesh/vertices/input/position_texcoord_color_normal/position_texcoord_color_normal.py
Acidburn0zzz/COLLADA-CTS
39a36188cf8710bbc003df43ed70b965eb4386bd
[ "MIT" ]
10
2015-03-26T02:52:24.000Z
2022-02-24T08:43:48.000Z
# Copyright (C) 2007 - 2009 Khronos Group # Copyright (c) 2012 The Khronos Group Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and /or associated documentation files (the "Materials "), to deal in the Materials without restriction, including without limitation the...
51.833333
466
0.73955
from StandardDataSets.scripts import JudgeAssistant tagLst = [] attrName = '' attrVal = '' dataToCheck = '' class SimpleJudgingObject: def __init__(self, _tagLst, _attrName, _attrVal, _data): self.tagList = _tagLst self.attrName = _attrName self.attrVal = _attrVal self.dataToCh...
true
true
f72ccf7bbd22c8e0b01ca0371dd14f7cf18a0601
2,792
py
Python
tests/unit/utils.py
canonical/hotsos
1960e80a3f7529045c44798b0d3ac27d75036562
[ "Apache-2.0" ]
6
2021-10-01T19:46:14.000Z
2022-03-31T17:05:08.000Z
tests/unit/utils.py
canonical/hotsos
1960e80a3f7529045c44798b0d3ac27d75036562
[ "Apache-2.0" ]
111
2021-10-01T18:18:17.000Z
2022-03-29T12:23:20.000Z
tests/unit/utils.py
canonical/hotsos
1960e80a3f7529045c44798b0d3ac27d75036562
[ "Apache-2.0" ]
10
2021-09-29T14:47:54.000Z
2022-03-18T14:52:16.000Z
import os import shutil import tempfile import unittest # disable for stestr otherwise output is much too verbose from hotsos.core.log import log, logging, setup_logging from hotsos.core.config import setup_config # Must be set prior to other imports TESTS_DIR = os.environ["TESTS_DIR"] DEFAULT_FAKE_ROOT = 'fake_data...
34.469136
79
0.655802
import os import shutil import tempfile import unittest from hotsos.core.log import log, logging, setup_logging from hotsos.core.config import setup_config TESTS_DIR = os.environ["TESTS_DIR"] DEFAULT_FAKE_ROOT = 'fake_data_root/openstack' setup_config(DATA_ROOT=os.path.join(TESTS_DIR, DEFAULT_FAKE_ROOT)) def is_de...
true
true
f72cd1215468a583aa37950b7930fb4d28106380
1,428
py
Python
dm_control/mujoco/wrapper/mjbindings/__init__.py
mhauskn/dm_control
b7944e0ed4392924f40a3e5c65b1a93c027b9718
[ "Apache-2.0" ]
2
2021-06-21T05:19:01.000Z
2021-07-02T14:51:16.000Z
dm_control/mujoco/wrapper/mjbindings/__init__.py
akssri/dm_control
1a0914f8df414685f1b336838e39e36fd378e0b9
[ "Apache-2.0" ]
2
2021-10-05T16:03:39.000Z
2022-03-12T01:03:17.000Z
dm_control/mujoco/wrapper/mjbindings/__init__.py
akssri/dm_control
1a0914f8df414685f1b336838e39e36fd378e0b9
[ "Apache-2.0" ]
2
2019-12-10T21:38:03.000Z
2020-12-22T08:42:45.000Z
# Copyright 2017 The dm_control Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
40.8
78
0.736695
from absl import logging from dm_control.mujoco.wrapper.mjbindings import constants from dm_control.mujoco.wrapper.mjbindings import enums from dm_control.mujoco.wrapper.mjbindings import sizes from dm_control.mujoco.wrapper.mjbindings import types from dm_control.mujoco.wrapper.mjbindings import wrappers try: f...
true
true
f72cd2c662bd6709a900fab6f8b72a7287014147
16,047
py
Python
natlas-server/app/admin/routes.py
rosswsnider/natlas
71482c14213eb6b5e9e18365cde5875ed5441523
[ "Apache-2.0" ]
null
null
null
natlas-server/app/admin/routes.py
rosswsnider/natlas
71482c14213eb6b5e9e18365cde5875ed5441523
[ "Apache-2.0" ]
null
null
null
natlas-server/app/admin/routes.py
rosswsnider/natlas
71482c14213eb6b5e9e18365cde5875ed5441523
[ "Apache-2.0" ]
null
null
null
from flask import render_template, redirect, url_for, current_app, flash, Response, abort, request from flask_login import current_user from app import db from app.admin import bp from app.elastic import Elastic from app.admin.forms import * from app.models import User, ScopeItem, ConfigItem, NatlasServices, AgentConfi...
36.141892
197
0.737334
from flask import render_template, redirect, url_for, current_app, flash, Response, abort, request from flask_login import current_user from app import db from app.admin import bp from app.elastic import Elastic from app.admin.forms import * from app.models import User, ScopeItem, ConfigItem, NatlasServices, AgentConfi...
true
true
f72cd336a36193490a287d751208899587977749
3,822
py
Python
CAIL2020/cocr/torchocr/datasets/icdar15/ICDAR15CropSave.py
ShenDezhou/CAIL
c4cfa98ab4ecedbce34a7a5a186830486047540c
[ "Apache-2.0" ]
71
2020-07-16T01:49:27.000Z
2022-03-27T16:55:00.000Z
CAIL2020/cocr/torchocr/datasets/icdar15/ICDAR15CropSave.py
ShenDezhou/CAIL
c4cfa98ab4ecedbce34a7a5a186830486047540c
[ "Apache-2.0" ]
11
2020-09-18T14:26:25.000Z
2022-02-09T23:49:33.000Z
CAIL2020/cocr/torchocr/datasets/icdar15/ICDAR15CropSave.py
ShenDezhou/CAIL
c4cfa98ab4ecedbce34a7a5a186830486047540c
[ "Apache-2.0" ]
16
2020-07-15T07:24:30.000Z
2022-03-19T05:41:11.000Z
''' @Author: Jeffery Sheng (Zhenfei Sheng) @Time: 2020/5/21 18:34 @File: ICDAR15CropSave.py ''' import os import cv2 from glob import glob from tqdm import tqdm class icdar2015CropSave: def __init__(self, img_dir :str, gt_dir :str, save_data_dir :str, train_val_split_ratio: float or None=0.1...
45.5
107
0.570905
import os import cv2 from glob import glob from tqdm import tqdm class icdar2015CropSave: def __init__(self, img_dir :str, gt_dir :str, save_data_dir :str, train_val_split_ratio: float or None=0.1): self.save_id = 1 self.img_dir = os.path.abspath(img_dir) self.gt_dir = os...
true
true
f72cd357fb91883d347cb40323f2b77a59d3007f
1,228
py
Python
couchcrdt/counter.py
drsm79/couch-crdt
1717a8b03a488793984d7209f6da78c395b3477f
[ "Apache-2.0" ]
null
null
null
couchcrdt/counter.py
drsm79/couch-crdt
1717a8b03a488793984d7209f6da78c395b3477f
[ "Apache-2.0" ]
null
null
null
couchcrdt/counter.py
drsm79/couch-crdt
1717a8b03a488793984d7209f6da78c395b3477f
[ "Apache-2.0" ]
null
null
null
from crdt import CRDT class DistributedCounter(CRDT): def add(self, number): return self + number def remove(self, number): return self - number def inc(self): """ Increase the counters value by one """ return self + 1 def dec(self): """ ...
23.169811
68
0.545603
from crdt import CRDT class DistributedCounter(CRDT): def add(self, number): return self + number def remove(self, number): return self - number def inc(self): return self + 1 def dec(self): return self - 1 def __abs__(self): if self.state is None: ...
true
true
f72cd35995de0da138e9526f9b56429d06c45c97
359,560
py
Python
nova/virt/libvirt/driver_back.py
xuweiliang/Codelibrary
54e45b2daa205132c05b0ff5a2c3db7fca2853a7
[ "Apache-2.0" ]
null
null
null
nova/virt/libvirt/driver_back.py
xuweiliang/Codelibrary
54e45b2daa205132c05b0ff5a2c3db7fca2853a7
[ "Apache-2.0" ]
null
null
null
nova/virt/libvirt/driver_back.py
xuweiliang/Codelibrary
54e45b2daa205132c05b0ff5a2c3db7fca2853a7
[ "Apache-2.0" ]
null
null
null
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright (c) 2010 Citrix Systems, Inc. # Copyright (c) 2011 Piston Cloud Computing, Inc # Copyright (c) 2012 University Of Minho # (c) Copyright 2013 Hewlett-Pa...
44.665839
105
0.575309
import string import collections from collections import deque import contextlib import errno import functools import glob import itertools import mmap import operator import os import shutil import tempfile import time import uuid import eventlet from eventlet import greenthread from eventlet import tpool from lxml ...
true
true
f72cd4093b6c2735e85a9e0cc06731f3fd380a07
12,960
py
Python
elastalert/alerts.py
talyian/elastalert
8ff39d485c0babd098ad659b53ce0f8ad456c6c3
[ "Apache-2.0" ]
null
null
null
elastalert/alerts.py
talyian/elastalert
8ff39d485c0babd098ad659b53ce0f8ad456c6c3
[ "Apache-2.0" ]
1
2021-06-02T04:32:03.000Z
2021-06-02T04:32:03.000Z
elastalert/alerts.py
talyian/elastalert
8ff39d485c0babd098ad659b53ce0f8ad456c6c3
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import datetime import json import logging import subprocess from email.mime.text import MIMEText from smtplib import SMTP from smtplib import SMTPException from socket import error from jira.client import JIRA from jira.exceptions import JIRAError from staticconf.loader import yaml_loader from...
37.028571
121
0.599691
import datetime import json import logging import subprocess from email.mime.text import MIMEText from smtplib import SMTP from smtplib import SMTPException from socket import error from jira.client import JIRA from jira.exceptions import JIRAError from staticconf.loader import yaml_loader from util import EAException...
true
true
f72cd428667980c9fdb4e230f0d8a948590c845d
1,070
py
Python
kubernetes/test/test_v1beta1_rolling_update_daemon_set.py
TomasTomecek/kubernetes-python
c37c074303a13c72662b9201ccc023fb0ca45755
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1beta1_rolling_update_daemon_set.py
TomasTomecek/kubernetes-python
c37c074303a13c72662b9201ccc023fb0ca45755
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1beta1_rolling_update_daemon_set.py
TomasTomecek/kubernetes-python
c37c074303a13c72662b9201ccc023fb0ca45755
[ "Apache-2.0" ]
1
2020-05-09T07:16:55.000Z
2020-05-09T07:16:55.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.12.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys i...
23.777778
107
0.738318
from __future__ import absolute_import import os import sys import unittest import kubernetes.client from kubernetes.client.rest import ApiException from kubernetes.client.models.v1beta1_rolling_update_daemon_set import V1beta1RollingUpdateDaemonSet class TestV1beta1RollingUpdateDaemonSet(unittest.TestCase): ...
true
true
f72cd49b263b57b7fcb9084dfd4139d1f60dc573
22,741
py
Python
django/contrib/contenttypes/fields.py
tomviner/django
87fed9444033533ad7105c4b1e4ffc5d7854a2c6
[ "BSD-3-Clause" ]
null
null
null
django/contrib/contenttypes/fields.py
tomviner/django
87fed9444033533ad7105c4b1e4ffc5d7854a2c6
[ "BSD-3-Clause" ]
null
null
null
django/contrib/contenttypes/fields.py
tomviner/django
87fed9444033533ad7105c4b1e4ffc5d7854a2c6
[ "BSD-3-Clause" ]
1
2022-03-26T09:05:09.000Z
2022-03-26T09:05:09.000Z
from __future__ import unicode_literals from collections import defaultdict from django.contrib.contenttypes.models import ContentType from django.core import checks from django.core.exceptions import FieldDoesNotExist, ObjectDoesNotExist from django.db import DEFAULT_DB_ALIAS, connection, models, router, transaction...
38.873504
116
0.592146
from __future__ import unicode_literals from collections import defaultdict from django.contrib.contenttypes.models import ContentType from django.core import checks from django.core.exceptions import FieldDoesNotExist, ObjectDoesNotExist from django.db import DEFAULT_DB_ALIAS, connection, models, router, transaction...
true
true
f72cd646013ea6a170a5f979dcbd68b1bc930df2
8,783
py
Python
nintendo/nnas.py
elsorino/DiscordAndU
70e57bbd55daa2b0e24cff0831867daff05822f8
[ "MIT" ]
1
2021-04-26T19:23:56.000Z
2021-04-26T19:23:56.000Z
nintendo/nnas.py
elsorino/DiscordAndU
70e57bbd55daa2b0e24cff0831867daff05822f8
[ "MIT" ]
null
null
null
nintendo/nnas.py
elsorino/DiscordAndU
70e57bbd55daa2b0e24cff0831867daff05822f8
[ "MIT" ]
null
null
null
from nintendo.common.http import HTTPClient, HTTPRequest from nintendo.common import xml, ssl, util import pkg_resources import collections import hashlib import struct import base64 import urllib.parse import logging logger = logging.getLogger(__name__) CERT = pkg_resources.resource_filename("nintendo", "files/ce...
31.822464
109
0.710919
from nintendo.common.http import HTTPClient, HTTPRequest from nintendo.common import xml, ssl, util import pkg_resources import collections import hashlib import struct import base64 import urllib.parse import logging logger = logging.getLogger(__name__) CERT = pkg_resources.resource_filename("nintendo", "files/ce...
true
true
f72cd64df372a6dea962a0662deef14976f5aa45
507
py
Python
accounts/urls.py
JhoLee/django-lecture_manager
d74ab1d48c954583ffd509346d7cb30b9214f1dc
[ "MIT" ]
null
null
null
accounts/urls.py
JhoLee/django-lecture_manager
d74ab1d48c954583ffd509346d7cb30b9214f1dc
[ "MIT" ]
7
2020-06-05T20:02:50.000Z
2021-09-22T18:05:02.000Z
accounts/urls.py
JhoLee/django-lecture_manager
d74ab1d48c954583ffd509346d7cb30b9214f1dc
[ "MIT" ]
null
null
null
from django.contrib.auth import views as auth_views from django.urls import path from . import views app_name = 'accounts' urlpatterns = [ path('signup/', views.signup, name='signup'), path('login/', views.signin, name='login'), path('logout/', views.signout, name='logout'), path('profile/', views.vi...
31.6875
76
0.704142
from django.contrib.auth import views as auth_views from django.urls import path from . import views app_name = 'accounts' urlpatterns = [ path('signup/', views.signup, name='signup'), path('login/', views.signin, name='login'), path('logout/', views.signout, name='logout'), path('profile/', views.vi...
true
true
f72cd66faafd23457f38cf7a6f13260a3caed7b6
2,894
py
Python
deps/turtlebot/follow_line_tc_pkg/scripts/follow_line_step_basicimage.py
CARMinesDouai/2021-robot_guide
226e3279a710c34d6f7b31e4cba4f047ae8aabee
[ "MIT" ]
null
null
null
deps/turtlebot/follow_line_tc_pkg/scripts/follow_line_step_basicimage.py
CARMinesDouai/2021-robot_guide
226e3279a710c34d6f7b31e4cba4f047ae8aabee
[ "MIT" ]
null
null
null
deps/turtlebot/follow_line_tc_pkg/scripts/follow_line_step_basicimage.py
CARMinesDouai/2021-robot_guide
226e3279a710c34d6f7b31e4cba4f047ae8aabee
[ "MIT" ]
1
2020-12-15T10:17:24.000Z
2020-12-15T10:17:24.000Z
#!/usr/bin/env python import rospy import cv2 from cv_bridge import CvBridge, CvBridgeError from geometry_msgs.msg import Twist from sensor_msgs.msg import Image class LineFollower(object): def __init__(self): self.bridge_object = CvBridge() self.cmd_vel_pub = rospy.Publisher('/cmd_vel', Twi...
31.456522
95
0.62716
import rospy import cv2 from cv_bridge import CvBridge, CvBridgeError from geometry_msgs.msg import Twist from sensor_msgs.msg import Image class LineFollower(object): def __init__(self): self.bridge_object = CvBridge() self.cmd_vel_pub = rospy.Publisher('/cmd_vel', Twist, queue_size=10) ...
true
true
f72cd747e6808eabbbc492f7c29daeb23eb42ad6
1,816
py
Python
core/urls.py
saksham1991999/upscbasicfunda
b17e288081cb4ca9dd79d198cd0b22136c0794bb
[ "MIT" ]
null
null
null
core/urls.py
saksham1991999/upscbasicfunda
b17e288081cb4ca9dd79d198cd0b22136c0794bb
[ "MIT" ]
7
2021-04-08T21:17:18.000Z
2022-01-13T03:39:23.000Z
core/urls.py
saksham1991999/upscbasicfunda
b17e288081cb4ca9dd79d198cd0b22136c0794bb
[ "MIT" ]
null
null
null
from rest_framework.routers import DefaultRouter from . import views from django.urls import path, re_path app_name = 'core' urlpatterns = [ path("search/", views.SearchSubscriptionsView.as_view()), path("general-notification/",views.Notification.as_view()), path("personal-notification/",views.PersonalNotificatio...
42.232558
102
0.786344
from rest_framework.routers import DefaultRouter from . import views from django.urls import path, re_path app_name = 'core' urlpatterns = [ path("search/", views.SearchSubscriptionsView.as_view()), path("general-notification/",views.Notification.as_view()), path("personal-notification/",views.PersonalNotificatio...
true
true
f72cd77e800a0e0719a55ec6af8ef51dcd7cbf46
3,591
py
Python
src/classes/item.py
kevin3/cwl-ica
cf706ea42993d563f364c0847ee4b882f8fe067c
[ "MIT" ]
8
2021-12-08T05:33:58.000Z
2022-03-07T00:40:48.000Z
src/classes/item.py
kevin3/cwl-ica
cf706ea42993d563f364c0847ee4b882f8fe067c
[ "MIT" ]
34
2021-08-11T03:59:33.000Z
2022-03-10T05:39:26.000Z
src/classes/item.py
kevin3/cwl-ica
cf706ea42993d563f364c0847ee4b882f8fe067c
[ "MIT" ]
1
2022-01-08T07:34:55.000Z
2022-01-08T07:34:55.000Z
#!/usr/bin/env python3 """ Item is a terrible name. I whole-heartedly acknowledge this and apologise for any future maintainer. In this context item represents an element under 'workflow' in workflow.yaml, 'tool' in tool.yaml and so on. An item itself does not contain much information. Just a name, a path (this wil...
32.645455
113
0.624617
from utils.logging import get_logger from ruamel.yaml.comments import CommentedMap as OrderedDict from pathlib import Path from classes.item_version import ItemVersion from utils.errors import ItemCreationError, ItemDirectoryNotFoundError logger = get_logger() class Item: def __init__(self, name, path, root_d...
true
true
f72cd844ec376f6444b3a3f87163523a385a0c9f
23,894
py
Python
lib/FamaProfiling/FamaProfilingServer.py
aekazakov/FamaProfiling
d9db15ea217e3be2aab65c356564a6d345b4f410
[ "MIT" ]
null
null
null
lib/FamaProfiling/FamaProfilingServer.py
aekazakov/FamaProfiling
d9db15ea217e3be2aab65c356564a6d345b4f410
[ "MIT" ]
null
null
null
lib/FamaProfiling/FamaProfilingServer.py
aekazakov/FamaProfiling
d9db15ea217e3be2aab65c356564a6d345b4f410
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime import json import os import random as _random import sys import traceback from getopt import getopt, GetoptError from multiprocessing import Process from os import environ from wsgiref.simple_server import make_server import requests as _requests from json...
37.044961
151
0.545451
import datetime import json import os import random as _random import sys import traceback from getopt import getopt, GetoptError from multiprocessing import Process from os import environ from wsgiref.simple_server import make_server import requests as _requests from jsonrpcbase import JSONRPCService, InvalidParamsEr...
true
true
f72cd9912a6e17b5b29517176042c7b23c21a2e0
557
py
Python
DiseaseIdentifier/DiseaseClassify/migrations/0001_initial.py
Rosan93/Disease-Identifier
6bf311c833ecaa3769ebf09c6d752a9ec7ebfdb4
[ "Apache-2.0" ]
null
null
null
DiseaseIdentifier/DiseaseClassify/migrations/0001_initial.py
Rosan93/Disease-Identifier
6bf311c833ecaa3769ebf09c6d752a9ec7ebfdb4
[ "Apache-2.0" ]
18
2020-01-28T22:44:38.000Z
2021-06-10T18:55:20.000Z
DiseaseIdentifier/DiseaseClassify/migrations/0001_initial.py
RoshanGurungSr/Disease-Identifier
6bf311c833ecaa3769ebf09c6d752a9ec7ebfdb4
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.2.1 on 2019-05-15 08:29 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='UploadImage', fields=[ ('id', models.AutoFi...
24.217391
114
0.574506
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='UploadImage', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, seriali...
true
true
f72cdab5d2b024368267933b507634792f303004
472
py
Python
venv/Scripts/easy_install-3.8-script.py
rushermonza/CoronavirusWebScraper
4c7d31dbb51ae7d791c620673ca6f36d1ef43e3e
[ "MIT" ]
1
2020-04-04T04:55:20.000Z
2020-04-04T04:55:20.000Z
venv/Scripts/easy_install-3.8-script.py
AntoData/CoronavirusWebScraper
4c7d31dbb51ae7d791c620673ca6f36d1ef43e3e
[ "MIT" ]
null
null
null
venv/Scripts/easy_install-3.8-script.py
AntoData/CoronavirusWebScraper
4c7d31dbb51ae7d791c620673ca6f36d1ef43e3e
[ "MIT" ]
null
null
null
#!C:\Users\ingov\PycharmProjects\CoronavirusWebScraper\venv\Scripts\python.exe # EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==40.8.0','console_scripts','easy_install-3.8' __requires__ = 'setuptools==40.8.0' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r...
36.307692
87
0.70339
__requires__ = 'setuptools==40.8.0' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) sys.exit( load_entry_point('setuptools==40.8.0', 'console_scripts', 'easy_install-3.8')() )
true
true
f72cdb329eab3ceed1d52538e15d5d30dc8b84c0
9,798
py
Python
sphinx-doc/conf.py
kmoskovtsev/HOOMD-Blue-fork
99560563a5ba9e082b513764bae51a84f48fdc70
[ "BSD-3-Clause" ]
null
null
null
sphinx-doc/conf.py
kmoskovtsev/HOOMD-Blue-fork
99560563a5ba9e082b513764bae51a84f48fdc70
[ "BSD-3-Clause" ]
null
null
null
sphinx-doc/conf.py
kmoskovtsev/HOOMD-Blue-fork
99560563a5ba9e082b513764bae51a84f48fdc70
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # HOOMD-blue documentation build configuration file, created by # sphinx-quickstart on Sun Mar 13 13:14:54 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this #...
32.66
95
0.716881
import sys import os sys.path.insert(0, os.path.abspath('..')) extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'sphinx.ext.napoleon', 'sphinx.ext.intersphinx', 'sphinx.ext.mathjax' ] intersphinx_mapping = {'python': ('https://docs.python.org/3', None)} autodoc_docstring_signatur...
true
true
f72cdbc3ff47642e64c41dd8ddf1126531344739
1,481
py
Python
trac/upgrades/db45.py
NetSpida/trac
6ad75b926591e114ba504f6a72a38fd305d77fb1
[ "BSD-3-Clause" ]
null
null
null
trac/upgrades/db45.py
NetSpida/trac
6ad75b926591e114ba504f6a72a38fd305d77fb1
[ "BSD-3-Clause" ]
null
null
null
trac/upgrades/db45.py
NetSpida/trac
6ad75b926591e114ba504f6a72a38fd305d77fb1
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2017 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.com/license.html. # # This software consists of vo...
33.659091
72
0.665766
import re from trac.upgrades import backup_config_file def do_upgrade(env, version, cursor): config = env.config section = 'notification' re_template_var = re.compile(r'\$([\w.]+)') def update_template(name): old_value = config.get(section, name) if old_value: if re_tem...
true
true
f72cdbf3665a2f5be56dde69f5e801552be52144
4,726
py
Python
Code/PostProcessing/Cloud.py
ChimieleCode/OpenSees_Script
58dcd187e5eda1bf92f8f2c4fc83b74d9108372d
[ "MIT" ]
null
null
null
Code/PostProcessing/Cloud.py
ChimieleCode/OpenSees_Script
58dcd187e5eda1bf92f8f2c4fc83b74d9108372d
[ "MIT" ]
null
null
null
Code/PostProcessing/Cloud.py
ChimieleCode/OpenSees_Script
58dcd187e5eda1bf92f8f2c4fc83b74d9108372d
[ "MIT" ]
null
null
null
import csv import math from ModelOptions import compute_local_fragility from PostProcessing.SectionGaps import global_DCR_DS1, global_DCR_DS2, global_DCR_DST, demand_capacity_ratio_DS1_matrix, demand_capacity_ratio_DS2_matrix, demand_capacity_ratio_DST_matrix from AnalysisDefinition.TimeHistory import spectral_re...
45.883495
1,734
0.566018
import csv import math from ModelOptions import compute_local_fragility from PostProcessing.SectionGaps import global_DCR_DS1, global_DCR_DS2, global_DCR_DST, demand_capacity_ratio_DS1_matrix, demand_capacity_ratio_DS2_matrix, demand_capacity_ratio_DST_matrix from AnalysisDefinition.TimeHistory import spectral_re...
true
true
f72cdcf0abad5566c247daf49ce163498192f41a
727
py
Python
stats/data.py
1in1/Python-Baseball
4c76d65330ff7eb88c87057be02bbddb50dd325b
[ "MIT" ]
null
null
null
stats/data.py
1in1/Python-Baseball
4c76d65330ff7eb88c87057be02bbddb50dd325b
[ "MIT" ]
null
null
null
stats/data.py
1in1/Python-Baseball
4c76d65330ff7eb88c87057be02bbddb50dd325b
[ "MIT" ]
null
null
null
import os import glob import pandas as pd game_files = glob.glob(os.path.join(os.getcwd(), 'games', '*.EVE')) game_files.sort() game_frames = [] for game_file in game_files: game_frame = pd.read_csv(game_file, names=['type','multi2','multi3','multi4','multi5','multi6','event']) game_frames.append(game_frame) ...
30.291667
108
0.678129
import os import glob import pandas as pd game_files = glob.glob(os.path.join(os.getcwd(), 'games', '*.EVE')) game_files.sort() game_frames = [] for game_file in game_files: game_frame = pd.read_csv(game_file, names=['type','multi2','multi3','multi4','multi5','multi6','event']) game_frames.append(game_frame) ...
true
true
f72cdd30f4d4087803dd4184985189860ea51326
2,545
py
Python
examples/other_examples/PyFstat_example_twoF_cumulative.py
RobertRosca/PyFstat
1c9568bb3dc87c3d33aeb41b3f572e9990665372
[ "MIT" ]
16
2020-01-28T08:40:02.000Z
2022-03-02T05:26:50.000Z
examples/other_examples/PyFstat_example_twoF_cumulative.py
RobertRosca/PyFstat
1c9568bb3dc87c3d33aeb41b3f572e9990665372
[ "MIT" ]
294
2020-02-04T17:15:26.000Z
2022-03-30T13:53:48.000Z
examples/other_examples/PyFstat_example_twoF_cumulative.py
RobertRosca/PyFstat
1c9568bb3dc87c3d33aeb41b3f572e9990665372
[ "MIT" ]
10
2020-02-04T16:57:55.000Z
2022-02-03T00:12:25.000Z
""" Cumulative coherent 2F ====================== Compute the cumulative coherent F-statistic of a signal candidate. """ import os import numpy as np import pyfstat from pyfstat.helper_functions import get_predict_fstat_parameters_from_dict label = "PyFstat_example_twoF_cumulative" outdir = os.path.join("PyFstat_e...
25.45
85
0.633792
import os import numpy as np import pyfstat from pyfstat.helper_functions import get_predict_fstat_parameters_from_dict label = "PyFstat_example_twoF_cumulative" outdir = os.path.join("PyFstat_example_data", label) gw_data = { "sqrtSX": 1e-23, "tstart": 1000000000, "duration": 100 * 86400, "detecto...
true
true
f72cdd942be71ea6f27d319f22d0edf089185019
69,689
py
Python
src/transformers/models/unispeech/modeling_unispeech.py
bugface/transformers
ba286fe7d51db12ad663effac83bed8199dd7141
[ "Apache-2.0" ]
2
2022-01-12T13:10:05.000Z
2022-01-12T13:10:28.000Z
src/transformers/models/unispeech/modeling_unispeech.py
bugface/transformers
ba286fe7d51db12ad663effac83bed8199dd7141
[ "Apache-2.0" ]
2
2022-03-08T04:58:59.000Z
2022-03-19T03:45:14.000Z
src/transformers/models/unispeech/modeling_unispeech.py
bugface/transformers
ba286fe7d51db12ad663effac83bed8199dd7141
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2021 The Fairseq Authors and the HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/...
43.967823
164
0.676606
import math import warnings from dataclasses import dataclass from typing import Optional, Tuple, Union import numpy as np import torch import torch.utils.checkpoint from torch import nn from torch.nn import CrossEntropyLoss from ...activations import ACT2FN from ...deepspeed import is_deepspeed_zero3_enabled from ....
true
true
f72cde285309d6d399c8446c716859a2af197049
294
py
Python
product/serializers.py
RKatana/inventory-app-django
a31614237daa5a2d62e30e51b9e573968ef3f0c0
[ "Apache-2.0" ]
null
null
null
product/serializers.py
RKatana/inventory-app-django
a31614237daa5a2d62e30e51b9e573968ef3f0c0
[ "Apache-2.0" ]
null
null
null
product/serializers.py
RKatana/inventory-app-django
a31614237daa5a2d62e30e51b9e573968ef3f0c0
[ "Apache-2.0" ]
null
null
null
from rest_framework import serializers from product.models import Product class ProductSerializer(serializers.ModelSerializer): class Meta: model = Product fields = '__all__' class ProductListSerializer(serializers.ModelSerializer): class Meta: model = Product fields = ('store',)
21
57
0.785714
from rest_framework import serializers from product.models import Product class ProductSerializer(serializers.ModelSerializer): class Meta: model = Product fields = '__all__' class ProductListSerializer(serializers.ModelSerializer): class Meta: model = Product fields = ('store',)
true
true
f72cde9e2a18d5047df425b607f0e92be3a3846e
1,685
py
Python
example/app/odnoklassniki.py
NorthIsUp/django-social-auth
9afedc8ea777b32611d43c1c367babe2e3b18a90
[ "BSD-2-Clause", "BSD-3-Clause" ]
863
2015-01-01T00:42:07.000Z
2022-03-30T02:47:18.000Z
example/app/odnoklassniki.py
JohnieLee/django-social-auth
de36265a4799c435751d9af42ddf6fe7e7a90e0a
[ "BSD-2-Clause", "BSD-3-Clause" ]
101
2015-01-08T00:28:16.000Z
2022-03-07T03:11:19.000Z
example/app/odnoklassniki.py
JohnieLee/django-social-auth
de36265a4799c435751d9af42ddf6fe7e7a90e0a
[ "BSD-2-Clause", "BSD-3-Clause" ]
256
2015-01-02T16:55:36.000Z
2022-03-04T11:10:47.000Z
# -*- coding:utf-8 -*- from django.conf import settings from django.contrib.auth import BACKEND_SESSION_KEY, logout from django.contrib.auth.models import AnonymousUser from django.http import HttpResponse from django.shortcuts import redirect from django.views.generic.base import TemplateView from social_auth.views im...
42.125
132
0.706231
from django.conf import settings from django.contrib.auth import BACKEND_SESSION_KEY, logout from django.contrib.auth.models import AnonymousUser from django.http import HttpResponse from django.shortcuts import redirect from django.views.generic.base import TemplateView from social_auth.views import complete SANDBOX_...
true
true
f72cdf8621755d98f90f575e4d4b84f0878e736f
973
py
Python
setup.py
tjsego/simservice
1ca1df4c6644f22217645575719cfa72f5b9f895
[ "MIT" ]
1
2021-08-08T03:15:47.000Z
2021-08-08T03:15:47.000Z
setup.py
tjsego/simservice
1ca1df4c6644f22217645575719cfa72f5b9f895
[ "MIT" ]
null
null
null
setup.py
tjsego/simservice
1ca1df4c6644f22217645575719cfa72f5b9f895
[ "MIT" ]
null
null
null
import os from setuptools import setup __version__ = open(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'VERSION.txt')).readline().strip() setup( name='simservice', version=__version__, description='A library for building simulation services in Python', url='https://github.com/tjsego/simser...
29.484848
110
0.626927
import os from setuptools import setup __version__ = open(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'VERSION.txt')).readline().strip() setup( name='simservice', version=__version__, description='A library for building simulation services in Python', url='https://github.com/tjsego/simser...
true
true
f72cdfc48dda33940d0a57929d4878e17ec7d72c
1,102
py
Python
exercicios-com-listas/exercicio12.py
diegolinkk/exercicios-python-brasil
3bf7bdf0e98cdd06c115eedae4fa01e0c25fdba5
[ "MIT" ]
null
null
null
exercicios-com-listas/exercicio12.py
diegolinkk/exercicios-python-brasil
3bf7bdf0e98cdd06c115eedae4fa01e0c25fdba5
[ "MIT" ]
null
null
null
exercicios-com-listas/exercicio12.py
diegolinkk/exercicios-python-brasil
3bf7bdf0e98cdd06c115eedae4fa01e0c25fdba5
[ "MIT" ]
null
null
null
#Foram anotadas as idades e infos de 30 alunos. Faça um Programa que determine quantos alunos com mais de 13 anos # possuem altura inferior à média de altura desses alunos. from random import random,randint alunos = [] for _ in range(30): altura = 0 #zera porque senão altura não entra no laço novamente ida...
25.627907
114
0.686025
from random import random,randint alunos = [] for _ in range(30): altura = 0 idade = randint(1,90) while altura < 1.40: altura = random() * 2 aluno = [] aluno.append(round(altura,2)) aluno.append(idade) alunos.append(aluno) media_alturas = 0 for altura,idade in alunos...
true
true
f72ce0eb629e9199e4a7dbe67896f97abd42dbec
4,636
py
Python
python/src/di_bq.py
cedadev/ceda-di
5d7e21f28ead02d226c19f2831bc261897300b0f
[ "BSD-3-Clause-Clear" ]
5
2015-04-17T08:52:34.000Z
2020-07-02T13:32:41.000Z
python/src/di_bq.py
cedadev/ceda-di
5d7e21f28ead02d226c19f2831bc261897300b0f
[ "BSD-3-Clause-Clear" ]
14
2015-01-07T10:30:34.000Z
2020-08-13T11:04:00.000Z
python/src/di_bq.py
cedadev/ceda-di
5d7e21f28ead02d226c19f2831bc261897300b0f
[ "BSD-3-Clause-Clear" ]
2
2016-01-27T11:31:34.000Z
2017-05-18T13:37:18.000Z
#!/usr/bin/env python """ `di_bq.py` is a wrapper around the standard ceda-di tools to help parallelise the processing of files using a batch queue. This tool has two main functions: * Generate lists of files to be processed in individual jobs by the queue * Dispatch archive processing jobs to the batch queue ...
30.906667
82
0.596204
import json import os from docopt import docopt from ceda_di import __version__ from ceda_di.extract import Extract import ceda_di.util.cmd as cmd def dump_to_json(output_directory, seq, file_list): out_name = "{seq}.json".format(seq=seq) out_path = os.path.join(output_directory, out_name) with open(...
true
true
f72ce0efe3d0f872e2ed83a0a3cbfa7d5c6e9f5e
9,361
py
Python
layers/box_utils.py
sashuIya/ssd.pytorch
fe7d8722414fef4cce32f67422c896ef0c45d6bc
[ "MIT" ]
1
2019-04-03T16:48:43.000Z
2019-04-03T16:48:43.000Z
layers/box_utils.py
sashuIya/ssd.pytorch
fe7d8722414fef4cce32f67422c896ef0c45d6bc
[ "MIT" ]
null
null
null
layers/box_utils.py
sashuIya/ssd.pytorch
fe7d8722414fef4cce32f67422c896ef0c45d6bc
[ "MIT" ]
null
null
null
import torch def point_form(boxes): """ Convert prior_boxes to (xmin, ymin, xmax, ymax) representation for comparison to point form ground truth data. Args: boxes: (tensor) center-size default boxes from priorbox layers. Return: boxes: (tensor) Converted xmin, ymin, xmax, ymax form of ...
39.167364
80
0.609443
import torch def point_form(boxes): return torch.cat((boxes[:, :2] - boxes[:, 2:]/2, boxes[:, :2] + boxes[:, 2:]/2), 1) def center_size(boxes): return torch.cat((boxes[:, 2:] + boxes[:, :2])/2, boxes[:, 2:] - boxes[:, :2], 1) def intersect(box_a, box_b): ...
true
true
f72ce180f1675a5345ae733b6da480edb5ada453
1,749
py
Python
test_package/conanfile.py
Twon/units
7f64e55d044c8a8d9a5c6d4e4f55167409910749
[ "MIT" ]
null
null
null
test_package/conanfile.py
Twon/units
7f64e55d044c8a8d9a5c6d4e4f55167409910749
[ "MIT" ]
null
null
null
test_package/conanfile.py
Twon/units
7f64e55d044c8a8d9a5c6d4e4f55167409910749
[ "MIT" ]
null
null
null
# The MIT License (MIT) # # Copyright (c) 2018 Mateusz Pusz # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modi...
39.75
80
0.732419
from conans import ConanFile, tools, RunEnvironment from conan.tools.cmake import CMakeToolchain, CMake, CMakeDeps import os class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" def generate(self): tc = CMakeToolchain(self, generator=os.getenv("CONAN_CMAKE_GENERATO...
true
true
f72ce1a65a7b1d2ab102ec79f285ac7ea3eedaeb
49,449
py
Python
coremltools/converters/mil/frontend/torch/test/test_torch_ops.py
freedomtan/coremltools
5ee9b537b81c44c140a2fa7571e547dfaa24e1ea
[ "BSD-3-Clause" ]
1
2020-12-23T15:42:01.000Z
2020-12-23T15:42:01.000Z
coremltools/converters/mil/frontend/torch/test/test_torch_ops.py
freedomtan/coremltools
5ee9b537b81c44c140a2fa7571e547dfaa24e1ea
[ "BSD-3-Clause" ]
null
null
null
coremltools/converters/mil/frontend/torch/test/test_torch_ops.py
freedomtan/coremltools
5ee9b537b81c44c140a2fa7571e547dfaa24e1ea
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import sys from coremltools.models.utils import _python_version from coremltools.models.utils import...
33.076254
145
0.563105
import sys from coremltools.models.utils import _python_version from coremltools.models.utils import _macos_version from coremltools.converters.mil import testing_reqs from coremltools.converters.mil.testing_reqs import * from .testing_utils import * from coremltools import TensorType, ImageType, RangeDim backends =...
true
true
f72ce252a89798bc51b81ba3b3a05a173b92e02c
8,096
py
Python
Natural Language Processing with Attention Models/Week 4 - Chatbot/w4_unittest.py
meet-seth/Coursera-Deep-Learning
6fbf9d406468c825ffa1ff2e177dbfd43084bace
[ "MIT" ]
362
2020-10-08T07:34:25.000Z
2022-03-30T05:11:30.000Z
NLP/Learn_by_deeplearning.ai/Course 4 - Attention Models /Labs/Week 4/w4_unittest.py
abcd1758323829/skills
195fad43e99de5efe6491817ad2b79e12665cc2a
[ "MIT" ]
7
2020-07-07T16:10:23.000Z
2021-06-04T08:17:55.000Z
NLP/Learn_by_deeplearning.ai/Course 4 - Attention Models /Labs/Week 4/w4_unittest.py
abcd1758323829/skills
195fad43e99de5efe6491817ad2b79e12665cc2a
[ "MIT" ]
238
2020-10-08T12:01:31.000Z
2022-03-25T08:10:42.000Z
import numpy as np import trax #from trax import layers as tl #from trax.fastmath import numpy as fastnp #from trax.supervised import training # UNIT TEST for UNQ_C1 def test_get_conversation(target): data = {'file1.json': {'log':[{'text': 'hi'}, {'text': 'hello'}, ...
31.874016
580
0.561018
import numpy as np import trax def test_get_conversation(target): data = {'file1.json': {'log':[{'text': 'hi'}, {'text': 'hello'}, {'text': 'nice'}]}, 'file2.json':{'log':[{'text': 'a b'}, {'text': ''...
true
true
f72ce29ddb1dc2f405d1811a6553b8fcc76db122
7,445
py
Python
many_requests/many_requests_.py
0xflotus/many_requests
dab3963eff471669f7b372cf488a2d9623270fab
[ "MIT" ]
null
null
null
many_requests/many_requests_.py
0xflotus/many_requests
dab3963eff471669f7b372cf488a2d9623270fab
[ "MIT" ]
null
null
null
many_requests/many_requests_.py
0xflotus/many_requests
dab3963eff471669f7b372cf488a2d9623270fab
[ "MIT" ]
null
null
null
import logging from json import JSONDecodeError from typing import List, Optional, Dict, Union import asks import trio from asks.errors import BadHttpResponse from asks.response_objects import Response from h11 import RemoteProtocolError from .easy_async import EasyAsync, delayed, zip_kw from .common import BadRespo...
41.361111
127
0.595567
import logging from json import JSONDecodeError from typing import List, Optional, Dict, Union import asks import trio from asks.errors import BadHttpResponse from asks.response_objects import Response from h11 import RemoteProtocolError from .easy_async import EasyAsync, delayed, zip_kw from .common import BadRespo...
true
true
f72ce2a2454d1eafcfe45c1437983329f74f1dde
1,804
py
Python
src/robot/parsing/restsupport.py
phil-davis/robotframework
4d4ce686cbe01e293bb86ea6ff34330e8c45fc43
[ "ECL-2.0", "Apache-2.0" ]
2
2019-09-21T17:13:24.000Z
2019-09-24T19:13:25.000Z
src/robot/parsing/restsupport.py
phil-davis/robotframework
4d4ce686cbe01e293bb86ea6ff34330e8c45fc43
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/robot/parsing/restsupport.py
phil-davis/robotframework
4d4ce686cbe01e293bb86ea6ff34330e8c45fc43
[ "ECL-2.0", "Apache-2.0" ]
1
2019-12-30T14:05:02.000Z
2019-12-30T14:05:02.000Z
# Copyright 2008-2015 Nokia Networks # Copyright 2016- Robot Framework Foundation # # 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 ...
32.214286
75
0.720621
from robot.errors import DataError try: from docutils.core import publish_doctree from docutils.parsers.rst.directives import register_directive from docutils.parsers.rst.directives.body import CodeBlock except ImportError: raise DataError("Using reStructuredText test data requires having " ...
true
true
f72ce2fc8328c2744c2230cbb122e8c573eb15fd
3,512
py
Python
app/app/settings.py
mlobina/recipe-app-API
0ded3c37a84c109c469d1dd7db015e8d73d3e9f6
[ "MIT" ]
null
null
null
app/app/settings.py
mlobina/recipe-app-API
0ded3c37a84c109c469d1dd7db015e8d73d3e9f6
[ "MIT" ]
null
null
null
app/app/settings.py
mlobina/recipe-app-API
0ded3c37a84c109c469d1dd7db015e8d73d3e9f6
[ "MIT" ]
1
2021-08-25T06:29:11.000Z
2021-08-25T06:29:11.000Z
""" Django settings for app project. Generated by 'django-admin startproject' using Django 3.2.6. For more information on this file, see https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settings/ """ from pathlib imp...
25.266187
91
0.691059
from pathlib import Path import os BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = 'django-insecure-sumebxzlqerp)6^8g!b%n-)r03)4pxwioril1^4igma-3_iw=c' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django....
true
true
f72ce338215fc493ab34b010dba156b5b7042cc3
948
py
Python
barbican/model/migration/alembic_migrations/versions/4ecde3a3a72a_add_cas_column_to_project_quotas_table.py
mail2nsrajesh/barbican
d16d932b77486e9b2f8c6d30e628a6e66517b1a6
[ "Apache-2.0" ]
1
2020-03-01T05:01:57.000Z
2020-03-01T05:01:57.000Z
barbican/model/migration/alembic_migrations/versions/4ecde3a3a72a_add_cas_column_to_project_quotas_table.py
kkutysllb/barbican
7b14d983e0dce6dcffe9781b05c52335b8203fc7
[ "Apache-2.0" ]
5
2019-08-14T06:46:03.000Z
2021-12-13T20:01:25.000Z
barbican/model/migration/alembic_migrations/versions/4ecde3a3a72a_add_cas_column_to_project_quotas_table.py
kkutysllb/barbican
7b14d983e0dce6dcffe9781b05c52335b8203fc7
[ "Apache-2.0" ]
2
2020-03-15T01:24:15.000Z
2020-07-22T20:34:26.000Z
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under...
27.882353
75
0.741561
revision = '4ecde3a3a72a' down_revision = '10220ccbe7fa' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column( 'project_quotas', sa.Column('cas', sa.Integer(), nullable=True))
true
true
f72ce5c56cac97953d6d62c376de59376e33bee5
1,625
py
Python
ParameterFiles/params_bootes_3as_ext.py
dunkenj/eazy-pype
9cb8ac765d659ace36c00293a5809fc4a066e1ec
[ "MIT" ]
1
2019-07-25T10:55:18.000Z
2019-07-25T10:55:18.000Z
ParameterFiles/params_bootes_3as_ext.py
dunkenj/eazy-pype
9cb8ac765d659ace36c00293a5809fc4a066e1ec
[ "MIT" ]
null
null
null
ParameterFiles/params_bootes_3as_ext.py
dunkenj/eazy-pype
9cb8ac765d659ace36c00293a5809fc4a066e1ec
[ "MIT" ]
1
2018-12-18T16:31:41.000Z
2018-12-18T16:31:41.000Z
""" Main inputs: (Change for all fields) """ eazypath = '/data2/ken/photoz/eazy-photoz/src/eazy' working_folder = '/data2/ken/photoz/bootes_3as_ext' photometry_catalog = 'Bootes_merged_Icorr_2014a_all_ap3_mags.zs.fits.mod' photometry_format = 'fits' filter_file = 'filter.bootes_mbrown_2014a.res' translate_file = 'bro...
18.895349
94
0.687385
eazypath = '/data2/ken/photoz/eazy-photoz/src/eazy' working_folder = '/data2/ken/photoz/bootes_3as_ext' photometry_catalog = 'Bootes_merged_Icorr_2014a_all_ap3_mags.zs.fits.mod' photometry_format = 'fits' filter_file = 'filter.bootes_mbrown_2014a.res' translate_file = 'brown.zphot.2014.translate' zspec_col = 'z_spec'...
true
true
f72ce61d9bb99f838eedbbc565639f110f2dfc86
14,763
py
Python
tf_agents/bandits/agents/neural_linucb_agent_test.py
PeterDomanski/agents
63c1c76f16f2068a637b26282c34a8825583e73e
[ "Apache-2.0" ]
1
2021-07-16T04:44:19.000Z
2021-07-16T04:44:19.000Z
tf_agents/bandits/agents/neural_linucb_agent_test.py
PeterDomanski/agents
63c1c76f16f2068a637b26282c34a8825583e73e
[ "Apache-2.0" ]
null
null
null
tf_agents/bandits/agents/neural_linucb_agent_test.py
PeterDomanski/agents
63c1c76f16f2068a637b26282c34a8825583e73e
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2018 The TF-Agents Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
40.446575
110
0.721398
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os from absl.testing import parameterized import numpy as np import tensorflow as tf import tensorflow_probability as tfp from tf_agents.bandits.agents import neural_linucb_agent from tf_agents.bandit...
true
true
f72ce6309a00519d759cb64bf82d33c3718dba6a
2,373
py
Python
src/fhir_types/FHIR_AdverseEvent_SuspectEntity.py
anthem-ai/fhir-types
42348655fb3a9b3f131b911d6bc0782da8c14ce4
[ "Apache-2.0" ]
2
2022-02-03T00:51:30.000Z
2022-02-03T18:42:43.000Z
src/fhir_types/FHIR_AdverseEvent_SuspectEntity.py
anthem-ai/fhir-types
42348655fb3a9b3f131b911d6bc0782da8c14ce4
[ "Apache-2.0" ]
null
null
null
src/fhir_types/FHIR_AdverseEvent_SuspectEntity.py
anthem-ai/fhir-types
42348655fb3a9b3f131b911d6bc0782da8c14ce4
[ "Apache-2.0" ]
null
null
null
from typing import Any, List, Literal, TypedDict from .FHIR_AdverseEvent_Causality import FHIR_AdverseEvent_Causality from .FHIR_Reference import FHIR_Reference from .FHIR_string import FHIR_string # Actual or potential/avoided event causing unintended physical injury resulting from or contributed to by medical care...
98.875
836
0.785925
from typing import Any, List, Literal, TypedDict from .FHIR_AdverseEvent_Causality import FHIR_AdverseEvent_Causality from .FHIR_Reference import FHIR_Reference from .FHIR_string import FHIR_string FHIR_AdverseEvent_SuspectEntity = TypedDict( "FHIR_AdverseEvent_SuspectEntity", { "id": FHIR_str...
true
true
f72ce673fa0c764781f68e1466651c550042bccc
13,709
py
Python
src/attributecode/transform.py
oneforthidiot/aboutcode-toolkit
666cc8857aadaeb4e07c540c817c831b0f3234e2
[ "Apache-2.0" ]
1
2021-01-02T08:16:55.000Z
2021-01-02T08:16:55.000Z
src/attributecode/transform.py
oneforthidiot/aboutcode-toolkit
666cc8857aadaeb4e07c540c817c831b0f3234e2
[ "Apache-2.0" ]
null
null
null
src/attributecode/transform.py
oneforthidiot/aboutcode-toolkit
666cc8857aadaeb4e07c540c817c831b0f3234e2
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf8 -*- # ============================================================================ # Copyright (c) 2013-2020 nexB Inc. http://www.nexb.com/ - All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
34.358396
87
0.665183
from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals from collections import Counter from collections import OrderedDict import io import json import attr from attributecode import CRITICAL from attributecode import Error from attributecode import sane...
true
true
f72ce7712b5c7dee583c54beb8325116fc9f9df8
1,742
py
Python
util.py
marcelkotze007/mk007---ML-Python-library
307e51762fc821588206440daa2c18a6128f4aec
[ "MIT" ]
null
null
null
util.py
marcelkotze007/mk007---ML-Python-library
307e51762fc821588206440daa2c18a6128f4aec
[ "MIT" ]
null
null
null
util.py
marcelkotze007/mk007---ML-Python-library
307e51762fc821588206440daa2c18a6128f4aec
[ "MIT" ]
null
null
null
# https://deeplearningcourses.com/c/data-science-supervised-machine-learning-in-python # https://www.udemy.com/data-science-supervised-machine-learning-in-python from __future__ import print_function, division from builtins import range, input # Note: you may need to update your version of future # sudo pip install -U ...
32.259259
86
0.596441
from __future__ import print_function, division from builtins import range, input import numpy as np import pandas as pd def get_data(limit=None): print("Reading in and transforming data...") df = pd.read_csv('train.csv') data = df.values np.random.shuffle(data) X = data[:, 1:] print(X[4000])...
true
true
f72ce7ae5cf820ccf1451c8e5cde1d89a16c1e52
3,007
py
Python
pbj/electrostatics/pb_formulation/formulations/direct_external.py
bem4solvation/pbj
4fa9c111596359192539787ae241a79d4316b15b
[ "MIT" ]
null
null
null
pbj/electrostatics/pb_formulation/formulations/direct_external.py
bem4solvation/pbj
4fa9c111596359192539787ae241a79d4316b15b
[ "MIT" ]
1
2022-02-18T17:34:37.000Z
2022-02-18T17:34:37.000Z
pbj/electrostatics/pb_formulation/formulations/direct_external.py
bem4solvation/pbj
4fa9c111596359192539787ae241a79d4316b15b
[ "MIT" ]
null
null
null
import numpy as np import bempp.api import os from bempp.api.operators.boundary import sparse, laplace, modified_helmholtz from .common import calculate_potential_one_surface invert_potential = True def verify_parameters(self): return True def lhs(self): dirichl_space = self.dirichl_space neumann_space...
30.373737
88
0.638178
import numpy as np import bempp.api import os from bempp.api.operators.boundary import sparse, laplace, modified_helmholtz from .common import calculate_potential_one_surface invert_potential = True def verify_parameters(self): return True def lhs(self): dirichl_space = self.dirichl_space neumann_space...
true
true
f72ce81173cc5c6016efe5504b76f86ecabf1edf
245
py
Python
python/merge.py
mannyrivera2010/rdf4j-learning
ef5bc6aeac0c16265605f4e7b577255fb48f96f7
[ "Apache-2.0" ]
null
null
null
python/merge.py
mannyrivera2010/rdf4j-learning
ef5bc6aeac0c16265605f4e7b577255fb48f96f7
[ "Apache-2.0" ]
null
null
null
python/merge.py
mannyrivera2010/rdf4j-learning
ef5bc6aeac0c16265605f4e7b577255fb48f96f7
[ "Apache-2.0" ]
null
null
null
import glob file_list = glob.glob("data/*.csv") for file_name in file_list: with open(file_name, 'r') as open_file: for inner_line in open_file: if "gender" not in inner_line: print(inner_line.strip())
22.272727
43
0.62449
import glob file_list = glob.glob("data/*.csv") for file_name in file_list: with open(file_name, 'r') as open_file: for inner_line in open_file: if "gender" not in inner_line: print(inner_line.strip())
true
true
f72ce8530a8392dc1dd22292d6d0dcfb86f65a5a
2,885
py
Python
pyramid_request_log/request_log.py
MoiTux/pyramid-request-log
31852bbf09e4f416f93c7720ecd9eca8cfe32d38
[ "MIT" ]
1
2017-08-07T10:22:16.000Z
2017-08-07T10:22:16.000Z
pyramid_request_log/request_log.py
MoiTux/pyramid-request-log
31852bbf09e4f416f93c7720ecd9eca8cfe32d38
[ "MIT" ]
null
null
null
pyramid_request_log/request_log.py
MoiTux/pyramid-request-log
31852bbf09e4f416f93c7720ecd9eca8cfe32d38
[ "MIT" ]
null
null
null
import logging import sys import time from pyramid.events import NewResponse, NewRequest from pyramid.events import subscriber if sys.version_info[0] < 3: str = basestring log = logging.getLogger(__name__) unlog_pattern = None unlog_route = None authenticated_id = '' @subscriber(NewRequest) def log_request(e...
27.47619
79
0.597574
import logging import sys import time from pyramid.events import NewResponse, NewRequest from pyramid.events import subscriber if sys.version_info[0] < 3: str = basestring log = logging.getLogger(__name__) unlog_pattern = None unlog_route = None authenticated_id = '' @subscriber(NewRequest) def log_request(e...
true
true
f72cea9211379eec544b1b493a257f6c5b6255c7
1,066
py
Python
api/utils/data_utils.py
wtomin/Multitask-Emotion-Recognition-with-Incomplete-Labels
e6df7ffc9b0318fdce405e40993c79785b47c785
[ "MIT" ]
74
2020-03-08T15:29:00.000Z
2022-03-05T14:57:33.000Z
api/utils/data_utils.py
wtomin/Multitask-Emotion-Recognition-with-Incomplete-Labels
e6df7ffc9b0318fdce405e40993c79785b47c785
[ "MIT" ]
19
2020-03-06T08:56:51.000Z
2022-03-27T05:07:35.000Z
api/utils/data_utils.py
wtomin/Multitask-Emotion-Recognition-with-Incomplete-Labels
e6df7ffc9b0318fdce405e40993c79785b47c785
[ "MIT" ]
23
2020-03-20T08:19:55.000Z
2022-03-16T17:40:09.000Z
from PIL import Image import numbers class RandomCrop(object): def __init__(self, size, v): if isinstance(size, numbers.Number): self.size = (int(size), int(size)) else: self.size = size self.v = v def __call__(self, img): w, h = img.size th, tw =...
31.352941
115
0.545028
from PIL import Image import numbers class RandomCrop(object): def __init__(self, size, v): if isinstance(size, numbers.Number): self.size = (int(size), int(size)) else: self.size = size self.v = v def __call__(self, img): w, h = img.size th, tw =...
true
true
f72ceaaf5ad093604d4d028c26cd964e13cd6018
9,644
py
Python
tests/test_authority.py
scottp-dpaw/azure-activedirectory-library-for-python
3305d666c064e62f8c15526fb82b5cba02a11b80
[ "MIT" ]
2
2018-03-05T07:54:23.000Z
2018-07-10T14:53:32.000Z
tests/test_authority.py
scottp-dpaw/azure-activedirectory-library-for-python
3305d666c064e62f8c15526fb82b5cba02a11b80
[ "MIT" ]
null
null
null
tests/test_authority.py
scottp-dpaw/azure-activedirectory-library-for-python
3305d666c064e62f8c15526fb82b5cba02a11b80
[ "MIT" ]
1
2020-10-26T20:07:07.000Z
2020-10-26T20:07:07.000Z
#------------------------------------------------------------------------------ # # Copyright (c) Microsoft Corporation. # All rights reserved. # # This code is licensed under the MIT License. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentatio...
42.672566
138
0.687578
import sys import requests import httpretty import six try: import unittest2 as unittest except ImportError: import unittest try: from unittest import mock except ImportError: import mock import adal from adal.authority import Authority from adal import log from adal.authentication_context import Au...
true
true
f72ceae57491507ca3020763b8de106a6f696481
486
py
Python
DjangoAPI/MyApi/migrations/0001_initial.py
sni710/Django_api
a40d049586d9396c3b1bea4cd82177c573b24c17
[ "Apache-2.0" ]
2
2020-08-27T11:26:35.000Z
2021-03-20T16:27:20.000Z
DjangoAPI/MyApi/migrations/0001_initial.py
ankit98040/Django-ML-Project
3e50f51e56aa34bb8a7ae31f4955a10e57176ea7
[ "Apache-2.0" ]
null
null
null
DjangoAPI/MyApi/migrations/0001_initial.py
ankit98040/Django-ML-Project
3e50f51e56aa34bb8a7ae31f4955a10e57176ea7
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.0.6 on 2020-08-26 04:50 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='MyFile', fields=[ ('id', models.AutoField(a...
22.090909
114
0.569959
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='MyFile', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=Fa...
true
true
f72ceb176086bf9c83e429c918a55d39155ac895
3,556
py
Python
spyder/plugins/tours/container.py
fumitoh/spyder
12294fec88a2f61c756538ac38bd748d8e7b3f82
[ "MIT" ]
1
2021-07-08T01:27:25.000Z
2021-07-08T01:27:25.000Z
spyder/plugins/tours/container.py
fumitoh/spyder
12294fec88a2f61c756538ac38bd748d8e7b3f82
[ "MIT" ]
null
null
null
spyder/plugins/tours/container.py
fumitoh/spyder
12294fec88a2f61c756538ac38bd748d8e7b3f82
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2009- Spyder Project Contributors # # Distributed under the terms of the MIT License # (see spyder/__init__.py for details) # --------------------------------------------------------------------...
30.135593
80
0.53009
from collections import OrderedDict from spyder.api.exceptions import SpyderAPIError from spyder.api.translations import get_translation from spyder.api.widgets.main_container import PluginMainContainer from spyder.plugins.tours.tours import TourIdentifiers from spyder.plugins.tours.widgets import AnimatedTo...
true
true
f72ceb2273d8e23fd38d9723f4f39d414670b675
375
py
Python
Python/Swap Case.py
BiswajitDeb/My_all_programs
4717cfc0b3b1aeda75f8eec0b7ff643e8556d262
[ "Unlicense" ]
null
null
null
Python/Swap Case.py
BiswajitDeb/My_all_programs
4717cfc0b3b1aeda75f8eec0b7ff643e8556d262
[ "Unlicense" ]
null
null
null
Python/Swap Case.py
BiswajitDeb/My_all_programs
4717cfc0b3b1aeda75f8eec0b7ff643e8556d262
[ "Unlicense" ]
null
null
null
def swap_case(s): k = [] l = list(s) for i in l: j = "" if i.islower(): j = i.upper() elif i.isupper(): j = i.lower() else: k.append(i) k.append(j) final = ''.join(k) return final if __name__ == '__main__': ...
16.304348
26
0.416
def swap_case(s): k = [] l = list(s) for i in l: j = "" if i.islower(): j = i.upper() elif i.isupper(): j = i.lower() else: k.append(i) k.append(j) final = ''.join(k) return final if __name__ == '__main__': ...
true
true
f72ced6147cf08a6b779747e4e46d56e84081e4e
1,139
py
Python
plenum/test/view_change/test_start_view_change_ts_set.py
andkononykhin/indy-plenum-copy
46c48feaf75e5578c9dceb76d4b6d09f7e63add5
[ "Apache-2.0" ]
1
2019-03-19T23:44:56.000Z
2019-03-19T23:44:56.000Z
plenum/test/view_change/test_start_view_change_ts_set.py
andkononykhin/indy-plenum-copy
46c48feaf75e5578c9dceb76d4b6d09f7e63add5
[ "Apache-2.0" ]
null
null
null
plenum/test/view_change/test_start_view_change_ts_set.py
andkononykhin/indy-plenum-copy
46c48feaf75e5578c9dceb76d4b6d09f7e63add5
[ "Apache-2.0" ]
2
2017-12-13T21:14:54.000Z
2021-06-06T15:48:03.000Z
from contextlib import ExitStack import pytest from plenum.test.helper import create_new_test_node @pytest.fixture(scope="module") def create_node_and_not_start(testNodeClass, node_config_helper_class, tconf, tdir, ...
33.5
74
0.515364
from contextlib import ExitStack import pytest from plenum.test.helper import create_new_test_node @pytest.fixture(scope="module") def create_node_and_not_start(testNodeClass, node_config_helper_class, tconf, tdir, ...
true
true
f72ced80e9d31b06e29ceff3d3a4092de61f6141
8,950
py
Python
test/test_cognon_extended.py
pauh/neuron
c08f7033f954373617d7a58eb1e5b88f91ac1a27
[ "Apache-2.0" ]
3
2018-08-25T22:03:37.000Z
2019-04-15T10:59:14.000Z
test/test_cognon_extended.py
pauh/neuron
c08f7033f954373617d7a58eb1e5b88f91ac1a27
[ "Apache-2.0" ]
null
null
null
test/test_cognon_extended.py
pauh/neuron
c08f7033f954373617d7a58eb1e5b88f91ac1a27
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 Pau Haro Negre # based on C++ code by Carl Staelin Copyright 2009-2011 # # See the NOTICE file distributed with this work for additional information # regarding copyright ownership. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with...
30.13468
75
0.562682
from cognon_extended import Neuron from cognon_extended import Synapse from cognon_extended import Word from cognon_extended import WordSet from nose.tools import assert_false from nose.tools import assert_greater_equal from nose.tools import assert_in from nose.tools import assert_is_none from nose.tools import asse...
true
true
f72ced891d0ab304ac2986df0441a610cd13e4c7
896
py
Python
2020/day25/day25.py
ChrisCh7/advent-of-code
d6f1dda4a67aae18ac1e15b9eccb3e6e94d705c1
[ "Unlicense" ]
3
2020-12-03T23:20:27.000Z
2020-12-03T23:20:53.000Z
2020/day25/day25.py
ChrisCh7/advent-of-code
d6f1dda4a67aae18ac1e15b9eccb3e6e94d705c1
[ "Unlicense" ]
null
null
null
2020/day25/day25.py
ChrisCh7/advent-of-code
d6f1dda4a67aae18ac1e15b9eccb3e6e94d705c1
[ "Unlicense" ]
null
null
null
def main(): with open('in.txt') as file: card_pubkey, door_pubkey = map(lambda n: int(n), file.read().splitlines()) print('card public key:', card_pubkey) print('door public key:', door_pubkey) print('card loop size:', card_loop_size := get_loop_size(card_pubkey)) print('door loop size:', ...
24.888889
82
0.65067
def main(): with open('in.txt') as file: card_pubkey, door_pubkey = map(lambda n: int(n), file.read().splitlines()) print('card public key:', card_pubkey) print('door public key:', door_pubkey) print('card loop size:', card_loop_size := get_loop_size(card_pubkey)) print('door loop size:', ...
true
true
f72cedd7827c3a103f775708f54a774487557133
4,338
py
Python
doom/test.py
luxinglong/ViZDoom-SL
fbc54c401b1ca320e9e804f2c97fdedc5d0c534d
[ "MIT" ]
null
null
null
doom/test.py
luxinglong/ViZDoom-SL
fbc54c401b1ca320e9e804f2c97fdedc5d0c534d
[ "MIT" ]
null
null
null
doom/test.py
luxinglong/ViZDoom-SL
fbc54c401b1ca320e9e804f2c97fdedc5d0c534d
[ "MIT" ]
null
null
null
import sys import argparse import numpy as np from actions import ActionBuilder from game import Game # use_continuous speed action_combinations crouch freelook FALSY_STRINGS = {'off', 'false', '0'} TRUTHY_STRINGS = {'on', 'true', '1'} def bool_flag(string): """ Parse boolean arguments from th...
37.396552
78
0.605579
import sys import argparse import numpy as np from actions import ActionBuilder from game import Game FALSY_STRINGS = {'off', 'false', '0'} TRUTHY_STRINGS = {'on', 'true', '1'} def bool_flag(string): if string.lower() in FALSY_STRINGS: return False elif string.lower() in TRUTHY_STRINGS...
true
true
f72cef269ff93973871d0381495aa221dec684e9
576
py
Python
processdata/migrations/0001_initial.py
shinysong/covid19-dashboard
c4c536e3781caecb7f1cfcfdb27c1324fe493eb2
[ "MIT" ]
null
null
null
processdata/migrations/0001_initial.py
shinysong/covid19-dashboard
c4c536e3781caecb7f1cfcfdb27c1324fe493eb2
[ "MIT" ]
null
null
null
processdata/migrations/0001_initial.py
shinysong/covid19-dashboard
c4c536e3781caecb7f1cfcfdb27c1324fe493eb2
[ "MIT" ]
null
null
null
# Generated by Django 3.0.7 on 2022-03-29 07:12 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='test_api', fields=[ ('id', models.AutoField...
24
114
0.548611
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='test_api', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=...
true
true
f72cefc08416d058c79ffed4f4ba0c15d2eb9ff0
17,944
py
Python
homeassistant/components/climate/wink.py
jamescurtin/home-assistant
6a9968ccb9b0082f5629e50955549d432aba7d90
[ "Apache-2.0" ]
2
2020-02-20T18:47:55.000Z
2021-11-09T11:33:28.000Z
homeassistant/components/climate/wink.py
moose51789/home-assistant
63c9d59d5455850fd4b37c2475fe6f10effb5245
[ "Apache-2.0" ]
1
2021-02-08T20:56:06.000Z
2021-02-08T20:56:06.000Z
homeassistant/components/climate/wink.py
moose51789/home-assistant
63c9d59d5455850fd4b37c2475fe6f10effb5245
[ "Apache-2.0" ]
1
2019-09-15T04:45:12.000Z
2019-09-15T04:45:12.000Z
""" Support for Wink thermostats, Air Conditioners, and Water Heaters. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/climate.wink/ """ import logging import asyncio from homeassistant.components.wink import WinkDevice, DOMAIN from homeassistant.compone...
33.729323
77
0.615805
import logging import asyncio from homeassistant.components.wink import WinkDevice, DOMAIN from homeassistant.components.climate import ( STATE_AUTO, STATE_COOL, STATE_HEAT, ClimateDevice, ATTR_TARGET_TEMP_HIGH, ATTR_TARGET_TEMP_LOW, ATTR_TEMPERATURE, STATE_FAN_ONLY, ATTR_CURRENT_HUMIDITY, STATE_ECO, S...
true
true
f72ceff1b9b1d547913aa773c1b821be3ae401f9
55
py
Python
contest/abc120/A.py
mola1129/atcoder
1d3b18cb92d0ba18c41172f49bfcd0dd8d29f9db
[ "MIT" ]
null
null
null
contest/abc120/A.py
mola1129/atcoder
1d3b18cb92d0ba18c41172f49bfcd0dd8d29f9db
[ "MIT" ]
null
null
null
contest/abc120/A.py
mola1129/atcoder
1d3b18cb92d0ba18c41172f49bfcd0dd8d29f9db
[ "MIT" ]
null
null
null
A,B,C = map(int, input().split()) print(min(B//A,C))
18.333333
34
0.545455
A,B,C = map(int, input().split()) print(min(B//A,C))
true
true
f72cf037943e51b4783520ebbf6f67e18bf38ba4
3,648
py
Python
src/Calibration.py
Mohamed-Abdulaty/UDACITY-CarND-P2-Advanced-Lane-Lines
e5d5fdff45c523a4f17635897b9de4b2e50d273d
[ "MIT" ]
null
null
null
src/Calibration.py
Mohamed-Abdulaty/UDACITY-CarND-P2-Advanced-Lane-Lines
e5d5fdff45c523a4f17635897b9de4b2e50d273d
[ "MIT" ]
null
null
null
src/Calibration.py
Mohamed-Abdulaty/UDACITY-CarND-P2-Advanced-Lane-Lines
e5d5fdff45c523a4f17635897b9de4b2e50d273d
[ "MIT" ]
null
null
null
import os import cv2 import numpy as np class Calibration: def __init__( self, source_images_directory, destination_image_sub_directory, chessboard_shape, logger ): self.source_images_directory = source_images_directory self.destination_image_sub_...
41.931034
110
0.621436
import os import cv2 import numpy as np class Calibration: def __init__( self, source_images_directory, destination_image_sub_directory, chessboard_shape, logger ): self.source_images_directory = source_images_directory self.destination_image_sub_...
true
true
f72cf0613aadf94eb6e2c98f6e1c046325378d82
1,979
py
Python
dove/utils/bed.py
barslmn/dove
df6344286633422219c0e93e15d4327f9d082041
[ "MIT" ]
null
null
null
dove/utils/bed.py
barslmn/dove
df6344286633422219c0e93e15d4327f9d082041
[ "MIT" ]
null
null
null
dove/utils/bed.py
barslmn/dove
df6344286633422219c0e93e15d4327f9d082041
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- __author__ = 'bars' from io import StringIO import pandas as pd from collections import defaultdict class Bed: """description""" def __init__(self, bed_file, mode='file'): self.bed_file = bed_file self.mode = mode def get_header(self): lines_to_skip = 0 ...
29.984848
54
0.471956
__author__ = 'bars' from io import StringIO import pandas as pd from collections import defaultdict class Bed: def __init__(self, bed_file, mode='file'): self.bed_file = bed_file self.mode = mode def get_header(self): lines_to_skip = 0 header = defaultdict(list) if s...
true
true
f72cf0c8eddcbcd99e6cd753b8ca73ce4cc13dcd
10,400
py
Python
nnutils/dibr_kaolin.py
junzhezhang/cmr
f0b2ded813535493f124852ce64b26efa761a35c
[ "MIT" ]
null
null
null
nnutils/dibr_kaolin.py
junzhezhang/cmr
f0b2ded813535493f124852ce64b26efa761a35c
[ "MIT" ]
null
null
null
nnutils/dibr_kaolin.py
junzhezhang/cmr
f0b2ded813535493f124852ce64b26efa761a35c
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import scipy.misc import tqdm import cv2 import torch from nnutils import geom_utils # from kaolin.graphics.dib_renderer.rasterizer import linear_rasterizer # from kaolin.graphics.dib_ren...
38.80597
151
0.559038
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import scipy.misc import tqdm import cv2 import torch from nnutils import geom_utils from kaolin.graphics.dib_renderer.renderer.texrender import TexRender from kaolin.graphics.dib_rendere...
true
true
f72cf0ce56facdb68d763f793fbd3901d57d4555
4,872
py
Python
sensors/jira_sensor.py
viveksyngh/stackstorm-jira
d08bc9b78bb5a5cce1c6e84c1f947f1ba3088d26
[ "Apache-2.0" ]
null
null
null
sensors/jira_sensor.py
viveksyngh/stackstorm-jira
d08bc9b78bb5a5cce1c6e84c1f947f1ba3088d26
[ "Apache-2.0" ]
null
null
null
sensors/jira_sensor.py
viveksyngh/stackstorm-jira
d08bc9b78bb5a5cce1c6e84c1f947f1ba3088d26
[ "Apache-2.0" ]
1
2020-01-22T16:35:49.000Z
2020-01-22T16:35:49.000Z
# See ./requirements.txt for requirements. import os from jira.client import JIRA from st2reactor.sensor.base import PollingSensor class JIRASensor(PollingSensor): ''' Sensor will monitor for any new projects created in JIRA and emit trigger instance when one is created. ''' def __init__(self, ...
37.767442
84
0.610016
import os from jira.client import JIRA from st2reactor.sensor.base import PollingSensor class JIRASensor(PollingSensor): def __init__(self, sensor_service, config=None, poll_interval=5): super(JIRASensor, self).__init__(sensor_service=sensor_service, config=conf...
true
true
f72cf166961a193b694eac3676ad404f15972d73
6,202
py
Python
__init__.py
kriswans/logBlizzard
56ac597b4a499fa331742d441cb42c8c99360e0e
[ "MIT" ]
null
null
null
__init__.py
kriswans/logBlizzard
56ac597b4a499fa331742d441cb42c8c99360e0e
[ "MIT" ]
null
null
null
__init__.py
kriswans/logBlizzard
56ac597b4a499fa331742d441cb42c8c99360e0e
[ "MIT" ]
null
null
null
""" Author: Kris Swanson, kriswans@cisco.com Tested with Python 3.6.1 on WIN10 """ import socket import struct import time import sys import multiprocessing import datetime import glob import json from crypto import Crypto as cryp from syslog import syslog from nodemanager import NodeManager as nm from localsearch i...
27.442478
241
0.565946
import socket import struct import time import sys import multiprocessing import datetime import glob import json from crypto import Crypto as cryp from syslog import syslog from nodemanager import NodeManager as nm from localsearch import SearchLocal as sl def logMonitor_Rx(password,params): print("Starting R...
true
true
f72cf1840ab9da367881e535c5609e8a88e5c71b
1,349
py
Python
actor/skills/grass_cutter.py
tamamiyasita/Roguelike-Tutorial-2020
db4d4e5369010567bc39bdd404c4f3a7998670fd
[ "MIT" ]
null
null
null
actor/skills/grass_cutter.py
tamamiyasita/Roguelike-Tutorial-2020
db4d4e5369010567bc39bdd404c4f3a7998670fd
[ "MIT" ]
null
null
null
actor/skills/grass_cutter.py
tamamiyasita/Roguelike-Tutorial-2020
db4d4e5369010567bc39bdd404c4f3a7998670fd
[ "MIT" ]
null
null
null
from constants import * from data import IMAGE_ID from random import randint from actor.skills.base_skill import BaseSkill from util import dice class GrassCutter(BaseSkill): def __init__(self, x=0, y=0, name="grass_cutter"): super().__init__( name=name, image=IMAGE_ID[name], ...
24.089286
104
0.575982
from constants import * from data import IMAGE_ID from random import randint from actor.skills.base_skill import BaseSkill from util import dice class GrassCutter(BaseSkill): def __init__(self, x=0, y=0, name="grass_cutter"): super().__init__( name=name, image=IMAGE_ID[name], ...
true
true
f72cf2ba17b0645159849d98585fab8cba690efd
3,280
py
Python
enroll_certificates.py
marcelojcn/psd2-tpp-enroller
86a03287e74a38f1ebb0d46886c2fc0ec0345ff2
[ "MIT" ]
2
2021-03-23T05:07:53.000Z
2021-07-04T20:42:20.000Z
enroll_certificates.py
marcelojcn/psd2-tpp-enroller
86a03287e74a38f1ebb0d46886c2fc0ec0345ff2
[ "MIT" ]
null
null
null
enroll_certificates.py
marcelojcn/psd2-tpp-enroller
86a03287e74a38f1ebb0d46886c2fc0ec0345ff2
[ "MIT" ]
1
2021-03-22T05:45:38.000Z
2021-03-22T05:45:38.000Z
import argparse from src.openbanking_tpp_proxy.proxy import Proxy if __name__ == '__main__': parser = argparse.ArgumentParser(description="Process parametes for certificate enrollment") parser.add_argument('--api_url', type=str, required=True, help='API url needed for certificate inte...
46.857143
96
0.559451
import argparse from src.openbanking_tpp_proxy.proxy import Proxy if __name__ == '__main__': parser = argparse.ArgumentParser(description="Process parametes for certificate enrollment") parser.add_argument('--api_url', type=str, required=True, help='API url needed for certificate inte...
true
true
f72cf2bd30e710234b5f0ce409d6c011a60b05e1
827
py
Python
tests/test_service.py
GameServerGurus/Nitrado-SDK
d72536be5def0b51a7ac89ccf62e35095f4ea705
[ "MIT" ]
1
2022-02-01T18:12:00.000Z
2022-02-01T18:12:00.000Z
tests/test_service.py
GameServerGurus/Nitrado-SDK
d72536be5def0b51a7ac89ccf62e35095f4ea705
[ "MIT" ]
1
2022-01-31T21:04:53.000Z
2022-02-01T02:16:52.000Z
tests/test_service.py
GameServerGurus/Nitrado-SDK
d72536be5def0b51a7ac89ccf62e35095f4ea705
[ "MIT" ]
null
null
null
import os from nitrado import Service, initialize_client def set_client(): url = "https://api.nitrado.net/" key = os.getenv('NITRADO_KEY') initialize_client(key, url) def test_services(): set_client() services = Service.all() assert len(services) > 0 def test_logs(): set_client() s...
17.229167
46
0.636034
import os from nitrado import Service, initialize_client def set_client(): url = "https://api.nitrado.net/" key = os.getenv('NITRADO_KEY') initialize_client(key, url) def test_services(): set_client() services = Service.all() assert len(services) > 0 def test_logs(): set_client() s...
true
true
f72cf30f4db51c6f09ee40560b05c6f53cdebd84
5,436
py
Python
sdk/python/pulumi_aws/ec2/vpn_connection_route.py
mdop-wh/pulumi-aws
05bb32e9d694dde1c3b76d440fd2cd0344d23376
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/ec2/vpn_connection_route.py
mdop-wh/pulumi-aws
05bb32e9d694dde1c3b76d440fd2cd0344d23376
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/ec2/vpn_connection_route.py
mdop-wh/pulumi-aws
05bb32e9d694dde1c3b76d440fd2cd0344d23376
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Dict, List, Mapping, Optional, Tuple, Union from .. import ...
42.46875
134
0.653054
import warnings import pulumi import pulumi.runtime from typing import Any, Dict, List, Mapping, Optional, Tuple, Union from .. import _utilities, _tables __all__ = ['VpnConnectionRoute'] class VpnConnectionRoute(pulumi.CustomResource): def __init__(__self__, resource_name: str, ...
true
true
f72cf3e78bbce35be30e75fc278005c291dd24d7
3,977
py
Python
src/beanmachine/ppl/inference/proposer/nmc/single_site_half_space_nmc_proposer.py
horizon-blue/beanmachine-1
b13e4e3e28ffb860947eb8046863b0cabb581222
[ "MIT" ]
1
2021-12-22T13:19:14.000Z
2021-12-22T13:19:14.000Z
src/beanmachine/ppl/inference/proposer/nmc/single_site_half_space_nmc_proposer.py
horizon-blue/beanmachine-1
b13e4e3e28ffb860947eb8046863b0cabb581222
[ "MIT" ]
null
null
null
src/beanmachine/ppl/inference/proposer/nmc/single_site_half_space_nmc_proposer.py
horizon-blue/beanmachine-1
b13e4e3e28ffb860947eb8046863b0cabb581222
[ "MIT" ]
null
null
null
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import logging from typing import Tuple import torch import torch.distributions as dist from beanmachine.ppl.inference.proposer.single_site...
38.61165
104
0.670355
import logging from typing import Tuple import torch import torch.distributions as dist from beanmachine.ppl.inference.proposer.single_site_ancestral_proposer import ( SingleSiteAncestralProposer, ) from beanmachine.ppl.legacy.inference.proposer.newtonian_monte_carlo_utils import ( is_valid, hessian_of_lo...
true
true
f72cf4a833b1d28314f79d0d0b59dfce9cb476dc
627
py
Python
setup.py
peterpaohuang/depablo-box
edf21fa7f2bcd7009136a2e14b802d004b12b406
[ "MIT" ]
1
2019-08-06T15:45:34.000Z
2019-08-06T15:45:34.000Z
setup.py
peterpaohuang/depablo-box
edf21fa7f2bcd7009136a2e14b802d004b12b406
[ "MIT" ]
null
null
null
setup.py
peterpaohuang/depablo-box
edf21fa7f2bcd7009136a2e14b802d004b12b406
[ "MIT" ]
null
null
null
import subprocess print("Installing required packages...") subprocess.check_output(['conda','install','--yes','--file','requirements.txt']) print("Installed requirements") print("Installing openbabel...") subprocess.check_output(['conda','install','--yes','-c','openbabel', 'openbabel']) print("Installed openbabel") pri...
48.230769
86
0.728868
import subprocess print("Installing required packages...") subprocess.check_output(['conda','install','--yes','--file','requirements.txt']) print("Installed requirements") print("Installing openbabel...") subprocess.check_output(['conda','install','--yes','-c','openbabel', 'openbabel']) print("Installed openbabel") pri...
true
true
f72cf697921980b575ca1e6593cdff20ac9b8c90
2,031
py
Python
v3/htmlexample_module.py
ambadhan/OnlinePythonTutor
857bab941fbde20f1f020b05b7723094ddead62a
[ "MIT" ]
17
2021-12-09T11:31:44.000Z
2021-12-29T03:07:14.000Z
v3/htmlexample_module.py
heysachin/OnlinePythonTutor
0dcdacc7ff5be504dd6a47236ebc69dc0069f991
[ "MIT" ]
22
2017-09-17T03:59:16.000Z
2017-11-14T17:33:57.000Z
v3/htmlexample_module.py
heysachin/OnlinePythonTutor
0dcdacc7ff5be504dd6a47236ebc69dc0069f991
[ "MIT" ]
12
2021-12-09T11:31:46.000Z
2022-01-07T03:14:46.000Z
# Example module for Online Python Tutor # Philip Guo # 2013-08-03 # To get the Online Python Tutor backend to import this custom module, # add its filename ('htmlexample_module') to the CUSTOM_MODULE_IMPORTS # tuple in pg_logger.py # To see an example of this module at work, write the following code in # http://pyth...
28.208333
96
0.613983
class ColorTable: def __init__(self, num_rows, num_columns): self.num_rows = num_rows self.num_columns = num_columns self.table = [] for i in range(self.num_rows): new_lst = ['' for e in range(self.num_columns)] self.table.append(new_lst) ...
true
true
f72cf6de2f57109ea400d2d7cfa8931507537fd0
3,018
py
Python
examples/epd_2in13_test.py
philipempl/ResearchyPi
74cf9cc78ace39d1d843b2b64fe39704aaafe778
[ "MIT" ]
null
null
null
examples/epd_2in13_test.py
philipempl/ResearchyPi
74cf9cc78ace39d1d843b2b64fe39704aaafe778
[ "MIT" ]
null
null
null
examples/epd_2in13_test.py
philipempl/ResearchyPi
74cf9cc78ace39d1d843b2b64fe39704aaafe778
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding:utf-8 -*- import sys import os picdir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'pic') libdir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'lib') if os.path.exists(libdir): sys.path.append(libdir) import logging from ...
32.106383
90
0.611995
import sys import os picdir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'pic') libdir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'lib') if os.path.exists(libdir): sys.path.append(libdir) import logging from waveshare_epd import epd2in13 import time...
true
true
f72cf7000c24d4d32e896071d41604079d19da89
3,666
py
Python
mpsci/distributions/binomial.py
WarrenWeckesser/mpsci
675f0f3b76700529558a3bae2a1b2ca09552233b
[ "BSD-2-Clause" ]
7
2019-03-27T17:25:41.000Z
2022-03-31T03:55:29.000Z
mpsci/distributions/binomial.py
WarrenWeckesser/mpsci
675f0f3b76700529558a3bae2a1b2ca09552233b
[ "BSD-2-Clause" ]
2
2019-05-09T16:09:45.000Z
2021-01-04T03:55:09.000Z
mpsci/distributions/binomial.py
WarrenWeckesser/mpsci
675f0f3b76700529558a3bae2a1b2ca09552233b
[ "BSD-2-Clause" ]
null
null
null
""" Binomial distribution --------------------- """ import mpmath from ..fun import logbinomial __all__ = ['pmf', 'logpmf', 'cdf', 'sf', 'mean', 'var'] def _validate_np(n, p): if p < 0 or p > 1: raise ValueError('p must be in the range [0, 1]') if n < 0: raise ValueError('n must be a nonne...
30.297521
78
0.563011
import mpmath from ..fun import logbinomial __all__ = ['pmf', 'logpmf', 'cdf', 'sf', 'mean', 'var'] def _validate_np(n, p): if p < 0 or p > 1: raise ValueError('p must be in the range [0, 1]') if n < 0: raise ValueError('n must be a nonnegative integer.') return def pmf(k, n, p): ...
true
true
f72cf726678d2cd74a55d44450a33b0c8d9c834f
792
py
Python
pytezos/rpc/errors.py
arvidj/pytezos
a8545d9408f086eba91b4af7e12c488672144ff6
[ "MIT" ]
1
2020-08-11T02:31:24.000Z
2020-08-11T02:31:24.000Z
pytezos/rpc/errors.py
arvidj/pytezos
a8545d9408f086eba91b4af7e12c488672144ff6
[ "MIT" ]
null
null
null
pytezos/rpc/errors.py
arvidj/pytezos
a8545d9408f086eba91b4af7e12c488672144ff6
[ "MIT" ]
1
2022-03-20T19:01:00.000Z
2022-03-20T19:01:00.000Z
from pytezos.rpc.node import RpcError class MichelsonBadContractParameter(RpcError, error_id='michelson_v1.bad_contract_parameter'): """ Either no parameter was supplied to a contract with a non-unit parameter type, a non-unit parameter was passed to an account, or a parameter was supplied of the wrong type ...
28.285714
118
0.736111
from pytezos.rpc.node import RpcError class MichelsonBadContractParameter(RpcError, error_id='michelson_v1.bad_contract_parameter'): class MichelsonBadReturn(RpcError, error_id='michelson_v1.bad_return'): class MichelsonRuntimeError(RpcError, error_id='michelson_v1'): class TezArithmeticError(RpcError, error_id...
true
true
f72cf8174f5a2872015dadbef99938a1a8e72272
1,116
py
Python
thingsboard_gateway/storage/event_storage_reader_pointer.py
xinge-ok/thingsboard-gateway
6dab6030a6becf0ce9d34bc95a3a1f1e0838cb14
[ "Apache-2.0" ]
1
2020-02-24T09:08:35.000Z
2020-02-24T09:08:35.000Z
thingsboard_gateway/storage/event_storage_reader_pointer.py
xinge-ok/thingsboard-gateway
6dab6030a6becf0ce9d34bc95a3a1f1e0838cb14
[ "Apache-2.0" ]
null
null
null
thingsboard_gateway/storage/event_storage_reader_pointer.py
xinge-ok/thingsboard-gateway
6dab6030a6becf0ce9d34bc95a3a1f1e0838cb14
[ "Apache-2.0" ]
null
null
null
# Copyright 2019. ThingsBoard # # 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...
28.615385
78
0.662186
class EventStorageReaderPointer: def __init__(self, file, line): self.file = file self.line = line def __eq__(self, other): return self.file == other.file and self.line == other.line def __hash__(self): return hash((self.file, self.line)) def get_file(self): ...
true
true
f72cf8cdaafe9d7009fc1fbe038716d9fe13a281
81,150
py
Python
pandas/tests/frame/test_analytics.py
dhimmel/pandas
776fed3ab63d74ddef6e5af1a702b10c2a30bbb6
[ "BSD-3-Clause" ]
1
2018-08-01T05:39:55.000Z
2018-08-01T05:39:55.000Z
pandas/tests/frame/test_analytics.py
dhimmel/pandas
776fed3ab63d74ddef6e5af1a702b10c2a30bbb6
[ "BSD-3-Clause" ]
null
null
null
pandas/tests/frame/test_analytics.py
dhimmel/pandas
776fed3ab63d74ddef6e5af1a702b10c2a30bbb6
[ "BSD-3-Clause" ]
1
2019-05-26T12:57:52.000Z
2019-05-26T12:57:52.000Z
# -*- coding: utf-8 -*- from __future__ import print_function import warnings from datetime import timedelta import operator import pytest from string import ascii_lowercase from numpy import nan from numpy.random import randn import numpy as np from pandas.compat import lrange, PY35 from pandas import (compat, isn...
37.656613
79
0.509698
from __future__ import print_function import warnings from datetime import timedelta import operator import pytest from string import ascii_lowercase from numpy import nan from numpy.random import randn import numpy as np from pandas.compat import lrange, PY35 from pandas import (compat, isna, notna, DataFrame, Ser...
true
true
f72cf916fbd8ea467321863ca89fb57083e4ec13
36,218
py
Python
pydca/meanfield_dca/meanfield_dca.py
MehariBZ/pydca
034e0707a13e6e43da1343630047d47caeca896e
[ "MIT" ]
1
2021-03-28T01:57:38.000Z
2021-03-28T01:57:38.000Z
pydca/meanfield_dca/meanfield_dca.py
MehariBZ/pydca
034e0707a13e6e43da1343630047d47caeca896e
[ "MIT" ]
null
null
null
pydca/meanfield_dca/meanfield_dca.py
MehariBZ/pydca
034e0707a13e6e43da1343630047d47caeca896e
[ "MIT" ]
null
null
null
from __future__ import absolute_import, division from . import msa_numerics from pydca.fasta_reader import fasta_reader import logging import numpy as np """This module implements Direc Coupling Analysis (DCA) of residue coevolution for protein and RNA sequences using the mean-field algorithm. The final coevolution sc...
36.881874
120
0.585344
from __future__ import absolute_import, division from . import msa_numerics from pydca.fasta_reader import fasta_reader import logging import numpy as np logger = logging.getLogger(__name__) class MeanFieldDCAException(Exception): class MeanFieldDCA: def __init__(self, msa_file_name, biomolecule, pseudocount=No...
true
true
f72cf9518bb05b881c788963248acf6812065892
2,110
py
Python
pyDist/MultiKeyData.py
alekLukanen/pyDist
ffb2c3feb20afba078fec7381c8785eb1e2b0543
[ "MIT" ]
5
2017-12-24T08:11:16.000Z
2019-02-07T22:13:26.000Z
pyDist/MultiKeyData.py
alekLukanen/pyDist
ffb2c3feb20afba078fec7381c8785eb1e2b0543
[ "MIT" ]
1
2021-06-01T23:17:31.000Z
2021-06-01T23:17:31.000Z
pyDist/MultiKeyData.py
alekLukanen/pyDist
ffb2c3feb20afba078fec7381c8785eb1e2b0543
[ "MIT" ]
null
null
null
class MultiKeyData(object): def __init__(self): self._keys = {} self._values = {} self._links = {} self._index = 0 def __add_item(self, key, value): if key not in self._keys: self._keys[key] = self._index self._values[self._index] = value ...
24.534884
75
0.505687
class MultiKeyData(object): def __init__(self): self._keys = {} self._values = {} self._links = {} self._index = 0 def __add_item(self, key, value): if key not in self._keys: self._keys[key] = self._index self._values[self._index] = value ...
true
true
f72cf995acdc249a52c5780d6bbc9e63253eff06
18,720
py
Python
awesometkinter/utils.py
python-gui-application/AwesomeTkinter
73f638ac432bafbbd4296588a3d20f27f8570577
[ "MIT" ]
61
2020-09-16T14:22:08.000Z
2022-03-18T07:38:15.000Z
awesometkinter/utils.py
python-gui-application/AwesomeTkinter
73f638ac432bafbbd4296588a3d20f27f8570577
[ "MIT" ]
10
2020-09-15T10:52:24.000Z
2021-12-24T00:57:22.000Z
awesometkinter/utils.py
python-gui-application/AwesomeTkinter
73f638ac432bafbbd4296588a3d20f27f8570577
[ "MIT" ]
6
2020-11-17T06:33:01.000Z
2021-11-05T08:04:29.000Z
import base64 import math import platform import tkinter as tk from tkinter import ttk import PIL from PIL import Image, ImageTk, ImageColor, ImageDraw, ImageFilter import hashlib import io def identify_operating_system(): """identify current operating system Returns: (str): 'Windows', 'Linux', or 'D...
30.291262
119
0.595459
import base64 import math import platform import tkinter as tk from tkinter import ttk import PIL from PIL import Image, ImageTk, ImageColor, ImageDraw, ImageFilter import hashlib import io def identify_operating_system(): return platform.system() def calc_md5(binary_data): return hashlib.md5(binary_data)....
true
true
f72cfc43e5ce6dc5144f575469244b87366239db
16,996
py
Python
arguments.py
wakafengfan/CPM-1-Finetune
b2c30bd94df31bcd6ee75ba90c347113563d4075
[ "MIT" ]
60
2020-12-14T01:51:49.000Z
2021-06-14T05:54:45.000Z
arguments.py
wakafengfan/CPM-1-Finetune
b2c30bd94df31bcd6ee75ba90c347113563d4075
[ "MIT" ]
29
2020-12-16T13:04:52.000Z
2021-06-10T12:29:11.000Z
arguments.py
wakafengfan/CPM-1-Finetune
b2c30bd94df31bcd6ee75ba90c347113563d4075
[ "MIT" ]
11
2020-12-24T07:17:39.000Z
2021-06-11T07:37:22.000Z
# coding=utf-8 # Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
49.695906
89
0.600435
import argparse import os import torch import deepspeed def add_model_config_args(parser): group = parser.add_argument_group('model', 'model configuration') group.add_argument('--pretrained-bert', action='store_true', help='use a pretrained bert-large-uncased model instead' ...
true
true
f72cfd482c15f282554b38514a3e096adee885e0
22,294
py
Python
configs/video_detect.py
me714/Dwin_Transformer
825a63869c46db4ef83ccc31d479bbd971ffd47c
[ "Apache-2.0" ]
null
null
null
configs/video_detect.py
me714/Dwin_Transformer
825a63869c46db4ef83ccc31d479bbd971ffd47c
[ "Apache-2.0" ]
null
null
null
configs/video_detect.py
me714/Dwin_Transformer
825a63869c46db4ef83ccc31d479bbd971ffd47c
[ "Apache-2.0" ]
1
2022-03-15T06:21:57.000Z
2022-03-15T06:21:57.000Z
import argparse import math import os import shutil import time import numpy as np from pathlib import Path from ensemble_boxes import * import copy import cv2 import torch import torch.backends.cudnn as cudnn from numpy import random import matplotlib.pyplot as plt from itertools import combinations import random fro...
44.322068
157
0.540056
import argparse import math import os import shutil import time import numpy as np from pathlib import Path from ensemble_boxes import * import copy import cv2 import torch import torch.backends.cudnn as cudnn from numpy import random import matplotlib.pyplot as plt from itertools import combinations import random fro...
true
true
f72cfd7e4073d6621ae92411769b73ecd011c187
3,768
py
Python
api/vk_methods.py
greenjew/deeploma
499de7ad844546acf0760aa00096d66216fd3ee9
[ "MIT" ]
null
null
null
api/vk_methods.py
greenjew/deeploma
499de7ad844546acf0760aa00096d66216fd3ee9
[ "MIT" ]
null
null
null
api/vk_methods.py
greenjew/deeploma
499de7ad844546acf0760aa00096d66216fd3ee9
[ "MIT" ]
1
2020-07-08T16:26:18.000Z
2020-07-08T16:26:18.000Z
import requests as r import pandas as pd import time from datetime import datetime import re TOKEN_VK = '23acc95023acc95023acc9504023c092a1223ac23acc9507ef4dc240205bcafea27244d' # vk service token version = 5.101 def get_members(group_id): try_count = 0 while try_count < 2: try: respon...
35.885714
114
0.522293
import requests as r import pandas as pd import time from datetime import datetime import re TOKEN_VK = '23acc95023acc95023acc9504023c092a1223ac23acc9507ef4dc240205bcafea27244d' version = 5.101 def get_members(group_id): try_count = 0 while try_count < 2: try: response = r.get('https:/...
true
true
f72cfe472a8204ac2f26dd570050027f127c9500
956
py
Python
examples/OGLE-BLG-ECL-234840/plot_v8.py
NewCPM/MCPM
9fb9b7725ccc4452701be47d103ab61f81b4595b
[ "MIT" ]
2
2018-04-10T22:35:11.000Z
2018-05-16T21:00:40.000Z
examples/OGLE-BLG-ECL-234840/plot_v8.py
CPM-project/MCPM
9fb9b7725ccc4452701be47d103ab61f81b4595b
[ "MIT" ]
null
null
null
examples/OGLE-BLG-ECL-234840/plot_v8.py
CPM-project/MCPM
9fb9b7725ccc4452701be47d103ab61f81b4595b
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt from matplotlib import gridspec import numpy as np in_data = "run_6/run_6_e2_phot_prf_limit.dat" in_model = "run_6/run_6_e2_phot.res" out_file = "run_6/plot_eb234840_v8.png" kwargs = {'color': 'red', 'marker': '.', 'ls': 'none'} x_lim = [7500., 7528.] y_lim = [-4000., 500.] kwargs_1 ...
23.9
69
0.676778
import matplotlib.pyplot as plt from matplotlib import gridspec import numpy as np in_data = "run_6/run_6_e2_phot_prf_limit.dat" in_model = "run_6/run_6_e2_phot.res" out_file = "run_6/plot_eb234840_v8.png" kwargs = {'color': 'red', 'marker': '.', 'ls': 'none'} x_lim = [7500., 7528.] y_lim = [-4000., 500.] kwargs_1 ...
true
true
f72cfecb9a75e28d76c6235057fe3ad2011e3f3f
4,092
py
Python
code/txburstML.py
astrophys/Python_Debugging_Examples
510b4b6966166dddc14eda3f6813700386d2324f
[ "MIT" ]
null
null
null
code/txburstML.py
astrophys/Python_Debugging_Examples
510b4b6966166dddc14eda3f6813700386d2324f
[ "MIT" ]
null
null
null
code/txburstML.py
astrophys/Python_Debugging_Examples
510b4b6966166dddc14eda3f6813700386d2324f
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import argparse import pandas as pd import numpy as np import warnings warnings.filterwarnings('ignore') from joblib import delayed,Parallel import os def whichKeep(est_params): kon = np.array(est_params)[:,0] koff = np.array(est_params)[:,1] ksyn = np.array(est_params)[:,2] which_ko...
35.582609
137
0.631232
import argparse import pandas as pd import numpy as np import warnings warnings.filterwarnings('ignore') from joblib import delayed,Parallel import os def whichKeep(est_params): kon = np.array(est_params)[:,0] koff = np.array(est_params)[:,1] ksyn = np.array(est_params)[:,2] which_kon = ~(kon < 2*1e-3)...
true
true
f72cffe0eeccd3aa5694823b8d218f07ea6e87a0
1,413
py
Python
AI hack/Codes and Samples/image_process.py
AdarshSrivatsa98/AIhackathon
147f6f2ada2ebf1ba6e87df3c3d1d6ee964ac7ee
[ "BSD-3-Clause" ]
1
2021-03-29T04:27:27.000Z
2021-03-29T04:27:27.000Z
codes and samples/image_process.py
SrivatsaAdarsh/Obstacle-Detection-using-CNN
008940faffb8a9977b8dcc7a21dda4f328f0a81f
[ "MIT" ]
null
null
null
codes and samples/image_process.py
SrivatsaAdarsh/Obstacle-Detection-using-CNN
008940faffb8a9977b8dcc7a21dda4f328f0a81f
[ "MIT" ]
null
null
null
import time import cv2 import sys import os,os.path path = sys.argv[1] data_path=sys.argv[2] fpsLimit = 0.8 index = 0 currentFrame=0 intframe =0 startTime = time.time() # Playing video from file: cap = cv2.VideoCapture(str(path)) try: if not os.path.exists('data_path'): os.makedi...
25.690909
64
0.521585
import time import cv2 import sys import os,os.path path = sys.argv[1] data_path=sys.argv[2] fpsLimit = 0.8 index = 0 currentFrame=0 intframe =0 startTime = time.time() cap = cv2.VideoCapture(str(path)) try: if not os.path.exists('data_path'): os.makedirs('data_path') except OSEr...
true
true
f72cffe6fb7e02f2604f6918e08414a09ad9a4c2
2,529
py
Python
recommendations_system/ffm/ffm.py
mmikolajczak/recommendation_system_hetrec2011_movielens
3ae13e62605ffbf5517bc2079e086a400de48748
[ "MIT" ]
4
2019-12-04T08:42:21.000Z
2020-06-07T07:22:08.000Z
recommendations_system/ffm/ffm.py
mmikolajczak/recommendation_system_hetrec2011_movielens
3ae13e62605ffbf5517bc2079e086a400de48748
[ "MIT" ]
null
null
null
recommendations_system/ffm/ffm.py
mmikolajczak/recommendation_system_hetrec2011_movielens
3ae13e62605ffbf5517bc2079e086a400de48748
[ "MIT" ]
null
null
null
import subprocess import warnings import os.path as osp import os import numpy as np # Note: libffm doesn't handle relative paths very well, hence abspath used. class FFM: def __init__(self, train_binary_path, predict_binary_path, model_path=None): self.train_binary_path = osp.abspath(train_binary_path) ...
41.459016
118
0.644128
import subprocess import warnings import os.path as osp import os import numpy as np class FFM: def __init__(self, train_binary_path, predict_binary_path, model_path=None): self.train_binary_path = osp.abspath(train_binary_path) self.predict_binary_path = osp.abspath(predict_binary_path) ...
true
true
f72d0142e44b378e8893afaa8b5bbafa3e81c8da
2,259
py
Python
src/EmailAlert/fancymail.py
JyotiSunkara/Energy-Monitoring-And-Control
efba4ac611e7054b78492ccf5e758a81621c8d6d
[ "MIT" ]
1
2020-06-27T03:25:11.000Z
2020-06-27T03:25:11.000Z
src/EmailAlert/fancymail.py
JyotiSunkara/Energy-Monitoring-And-Control
efba4ac611e7054b78492ccf5e758a81621c8d6d
[ "MIT" ]
null
null
null
src/EmailAlert/fancymail.py
JyotiSunkara/Energy-Monitoring-And-Control
efba4ac611e7054b78492ccf5e758a81621c8d6d
[ "MIT" ]
null
null
null
from smtplib import SMTP from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart from jinja2 import Environment, FileSystemLoader import os from_email = 'krbdashboard@outlook.com' password = 'ArushiSinghal' env = Environment( loader=FileSystemLoader('./templates/')) def get_contacts(...
25.670455
71
0.555556
from smtplib import SMTP from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart from jinja2 import Environment, FileSystemLoader import os from_email = 'krbdashboard@outlook.com' password = 'ArushiSinghal' env = Environment( loader=FileSystemLoader('./templates/')) def get_contacts(...
true
true
f72d017e70b5e4176196a0457bdf724775bda1b5
5,587
py
Python
sdk/python/pulumi_azure_nextgen/apimanagement/latest/get_api_release.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/apimanagement/latest/get_api_release.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/apimanagement/latest/get_api_release.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __a...
36.279221
190
0.65026
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __all__ = [ 'GetApiReleaseResult', 'AwaitableGetApiReleaseResult', 'get_api_release', ] warnings.warn("""The 'latest' version is deprecated. Please migrate to...
true
true
f72d018e06b47ce1c3e6edeff90355eca52ef202
15,137
py
Python
apps/resume/views.py
ozet-team/ozet-server
4772d37339634adee6ace65a5e2380df4bd22bbb
[ "MIT" ]
null
null
null
apps/resume/views.py
ozet-team/ozet-server
4772d37339634adee6ace65a5e2380df4bd22bbb
[ "MIT" ]
4
2021-11-27T14:15:55.000Z
2021-12-10T12:59:44.000Z
apps/resume/views.py
ozet-team/ozet-server
4772d37339634adee6ace65a5e2380df4bd22bbb
[ "MIT" ]
null
null
null
from django.utils.functional import cached_property from drf_spectacular.types import OpenApiTypes from drf_spectacular.utils import extend_schema, OpenApiExample, OpenApiParameter from rest_framework.exceptions import NotFound from rest_framework.generics import ( ListCreateAPIView, RetrieveUpdateAPIView, ...
37.375309
117
0.658321
from django.utils.functional import cached_property from drf_spectacular.types import OpenApiTypes from drf_spectacular.utils import extend_schema, OpenApiExample, OpenApiParameter from rest_framework.exceptions import NotFound from rest_framework.generics import ( ListCreateAPIView, RetrieveUpdateAPIView, ...
true
true
f72d027eb1356111f2daf107008ee00d025ad541
2,954
py
Python
find_deathdomains.py
caspase-like-homolog-identifier/c14_witcher
e2c481607b85fed749daec0e9b3b29b65d6b448f
[ "MIT" ]
null
null
null
find_deathdomains.py
caspase-like-homolog-identifier/c14_witcher
e2c481607b85fed749daec0e9b3b29b65d6b448f
[ "MIT" ]
null
null
null
find_deathdomains.py
caspase-like-homolog-identifier/c14_witcher
e2c481607b85fed749daec0e9b3b29b65d6b448f
[ "MIT" ]
null
null
null
#!/usr/bin/env python from run_hmmer import RunHmmer from Bio import SearchIO import pandas as pd import collections import random import tempfile import argparse import pprint import glob import sys class FindDeathDomains(RunHmmer): def __init__(self, seqfile, dd_hmm_path, *hmmersearch_args): """ Sub...
31.094737
133
0.58497
from run_hmmer import RunHmmer from Bio import SearchIO import pandas as pd import collections import random import tempfile import argparse import pprint import glob import sys class FindDeathDomains(RunHmmer): def __init__(self, seqfile, dd_hmm_path, *hmmersearch_args): self.dd_hmm_paths ...
true
true
f72d032ec7455ded65fafe668268d74e9cbda5cc
2,306
py
Python
models.py
phpwizz/SimpelApi
c2a5f28fff752fb84e99568a3e0dab5c37e03c94
[ "MIT" ]
1
2018-07-14T08:43:25.000Z
2018-07-14T08:43:25.000Z
models.py
phpwizz/SimpelApi
c2a5f28fff752fb84e99568a3e0dab5c37e03c94
[ "MIT" ]
null
null
null
models.py
phpwizz/SimpelApi
c2a5f28fff752fb84e99568a3e0dab5c37e03c94
[ "MIT" ]
null
null
null
import os import sys from sqlalchemy import Column, ForeignKey, Integer, String from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship from sqlalchemy import create_engine from passlib.apps import custom_app_context as pwd_context import random, string from itsdangerous import(T...
26.813953
103
0.641804
import os import sys from sqlalchemy import Column, ForeignKey, Integer, String from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship from sqlalchemy import create_engine from passlib.apps import custom_app_context as pwd_context import random, string from itsdangerous import(T...
true
true
f72d04129209f13907fb9ece50d3696c445c1bc3
11,522
py
Python
gammapy/catalog/tests/test_hess.py
watsonjj/gammapy
8d2498c8f63f73d1fbe4ba81ab02d9e72552df67
[ "BSD-3-Clause" ]
null
null
null
gammapy/catalog/tests/test_hess.py
watsonjj/gammapy
8d2498c8f63f73d1fbe4ba81ab02d9e72552df67
[ "BSD-3-Clause" ]
null
null
null
gammapy/catalog/tests/test_hess.py
watsonjj/gammapy
8d2498c8f63f73d1fbe4ba81ab02d9e72552df67
[ "BSD-3-Clause" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst from collections import Counter import pytest import numpy as np from numpy.testing import assert_allclose from astropy import units as u from astropy.coordinates import SkyCoord, Angle from astropy.table import Table from ...utils.testing import assert_qu...
37.167742
87
0.661083
from collections import Counter import pytest import numpy as np from numpy.testing import assert_allclose from astropy import units as u from astropy.coordinates import SkyCoord, Angle from astropy.table import Table from ...utils.testing import assert_quantity_allclose from ...utils.testing import requires_data, requ...
true
true
f72d04c38d826a7bc9753a2f6f269707d60b54c5
2,335
py
Python
nmmo/entity/player.py
jsuarez5341/neural-mmo
0828982e8a30641986fdd947ab82f34c008fafde
[ "MIT" ]
230
2019-07-03T06:52:29.000Z
2021-12-10T18:47:37.000Z
nmmo/entity/player.py
jsuarez5341/neural-mmo
0828982e8a30641986fdd947ab82f34c008fafde
[ "MIT" ]
16
2019-10-11T16:51:27.000Z
2021-12-06T14:32:31.000Z
nmmo/entity/player.py
jsuarez5341/neural-mmo
0828982e8a30641986fdd947ab82f34c008fafde
[ "MIT" ]
40
2019-08-02T19:36:38.000Z
2021-12-02T09:59:08.000Z
import numpy as np from pdb import set_trace as T import nmmo from nmmo.systems import ai, equipment from nmmo.lib import material from nmmo.systems.skill import Skills from nmmo.systems.achievement import Diary from nmmo.entity import entity class Player(entity.Entity): def __init__(self, realm, pos, agent, colo...
26.83908
71
0.651392
import numpy as np from pdb import set_trace as T import nmmo from nmmo.systems import ai, equipment from nmmo.lib import material from nmmo.systems.skill import Skills from nmmo.systems.achievement import Diary from nmmo.entity import entity class Player(entity.Entity): def __init__(self, realm, pos, agent, colo...
true
true
f72d0563aa56e9c5a65d9965f487213c64d35e84
3,423
py
Python
newchain_keys/main.py
newtonproject/newchain-keys.py
d8a053d78787dfc4403b57e60d54d0472d59787c
[ "MIT" ]
null
null
null
newchain_keys/main.py
newtonproject/newchain-keys.py
d8a053d78787dfc4403b57e60d54d0472d59787c
[ "MIT" ]
null
null
null
newchain_keys/main.py
newtonproject/newchain-keys.py
d8a053d78787dfc4403b57e60d54d0472d59787c
[ "MIT" ]
null
null
null
from typing import (Any, Union, Type) # noqa: F401 from newchain_keys.datatypes import ( LazyBackend, PublicKey, PrivateKey, Signature, ) from newchain_keys.exceptions import ( ValidationError, ) from newchain_keys.validation import ( validate_message_hash, ) # These must be aliased due to a...
36.414894
95
0.643003
from typing import (Any, Union, Type) from newchain_keys.datatypes import ( LazyBackend, PublicKey, PrivateKey, Signature, ) from newchain_keys.exceptions import ( ValidationError, ) from newchain_keys.validation import ( validate_message_hash, ) _PublicKey = PublicKey _PrivateKey = PrivateK...
true
true
f72d059384ed8eef053b45a327b0c27c29814ac1
11,111
py
Python
opentelemetry-sdk/tests/metrics/test_metrics.py
3tilley/opentelemetry-python
4ed4fd08db67de69369f87862e43562c2e43fed5
[ "Apache-2.0" ]
null
null
null
opentelemetry-sdk/tests/metrics/test_metrics.py
3tilley/opentelemetry-python
4ed4fd08db67de69369f87862e43562c2e43fed5
[ "Apache-2.0" ]
null
null
null
opentelemetry-sdk/tests/metrics/test_metrics.py
3tilley/opentelemetry-python
4ed4fd08db67de69369f87862e43562c2e43fed5
[ "Apache-2.0" ]
null
null
null
# Copyright The OpenTelemetry Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
34.187692
97
0.671587
from logging import WARNING from unittest import TestCase from unittest.mock import MagicMock, Mock, patch from opentelemetry._metrics import NoOpMeter from opentelemetry.sdk._metrics import Meter, MeterProvider from opentelemetry.sdk._metrics.instrument import ( Counter, Histogram, ObservableCounter, ...
true
true