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
f725b47e46e1f08db69cea2aabe9aacaac375090
1,044
py
Python
scripts/create_playlist.py
Spotify-Open-Recommendation-Engine/spotify-open-recommendation-engine
9417d8d45f662f3ca6337d599b4a91d932df2fed
[ "MIT" ]
1
2021-12-10T08:08:20.000Z
2021-12-10T08:08:20.000Z
scripts/create_playlist.py
Spotify-Open-Recommendation-Engine/spotify-open-recommendation-engine
9417d8d45f662f3ca6337d599b4a91d932df2fed
[ "MIT" ]
3
2021-11-07T00:40:49.000Z
2021-11-30T03:29:17.000Z
scripts/create_playlist.py
Spotify-Open-Recommendation-Engine/spotify-open-recommendation-engine
9417d8d45f662f3ca6337d599b4a91d932df2fed
[ "MIT" ]
1
2021-12-10T08:08:14.000Z
2021-12-10T08:08:14.000Z
""" create_playlist.py creates a playlist in user librabry and returns the playlist id parameters: auth, list of tracks to add """ import spotipy from spotipy.oauth2 import SpotifyOAuth from .spotifyoauth import get_token from ..common import session def create_playlist(name, songs): #get token session[...
30.705882
138
0.694444
import spotipy from spotipy.oauth2 import SpotifyOAuth from .spotifyoauth import get_token from ..common import session def create_playlist(name, songs): session['token_info'], authorized = get_token() if authorized: sp = spotipy.Spotify(auth=session.get('token_info').get('access_token')...
true
true
f725b4e6f7ed90c7f9aa29ca91d0ae4c5bd280a2
183
py
Python
tests/configs/config_for_test.py
akamaus/picograd
fe3a377806d3abd389a59d48981123c569c0e545
[ "MIT" ]
null
null
null
tests/configs/config_for_test.py
akamaus/picograd
fe3a377806d3abd389a59d48981123c569c0e545
[ "MIT" ]
null
null
null
tests/configs/config_for_test.py
akamaus/picograd
fe3a377806d3abd389a59d48981123c569c0e545
[ "MIT" ]
null
null
null
from picograd.configs.base import BaseConfig class Config(BaseConfig): def __init__(self, **kwargs): self.a = 2 self.b = None super().__init__(**kwargs)
20.333333
44
0.628415
from picograd.configs.base import BaseConfig class Config(BaseConfig): def __init__(self, **kwargs): self.a = 2 self.b = None super().__init__(**kwargs)
true
true
f725b4f6bffa7492d249043f68f18a216407ef16
1,145
py
Python
scripts-master/python/MCSingleFile.py
HanLabBU/Trace-conditioning-hippocampus
960e4b4d92e42697649b9b9a684ecf9c4cbb79f6
[ "Apache-2.0" ]
null
null
null
scripts-master/python/MCSingleFile.py
HanLabBU/Trace-conditioning-hippocampus
960e4b4d92e42697649b9b9a684ecf9c4cbb79f6
[ "Apache-2.0" ]
null
null
null
scripts-master/python/MCSingleFile.py
HanLabBU/Trace-conditioning-hippocampus
960e4b4d92e42697649b9b9a684ecf9c4cbb79f6
[ "Apache-2.0" ]
null
null
null
''' Script to motion correct a single multipage .tif stack using the Python Tif Motion Correction (ptmc) package Requires ptmc, PIL and their dependencies ''' from ptmc import io from ptmc import processing as pro from PIL import Image import numpy as np if __name__ == "__main__": #Full Processing without I/O ta...
38.166667
108
0.70131
from ptmc import io from ptmc import processing as pro from PIL import Image import numpy as np if __name__ == "__main__": imgstack, fileparts = io.loadImageStack() medstack = pro.doMedianFilter(imgstack, med_fsize=3) homomorphstack = pro.doHomomorphicFilter(medstack, sigmaVal=7) homosh...
true
true
f725b57fcbeafb739b268af3654544d0b94e7b35
980
py
Python
prj/api/views.py
rendrom/django-dynamit
4280da60212ffd9ad6a8cb96a7eba0890a98fee5
[ "MIT" ]
3
2015-01-20T18:43:16.000Z
2015-12-09T06:46:55.000Z
prj/api/views.py
rendrom/django-dynamit
4280da60212ffd9ad6a8cb96a7eba0890a98fee5
[ "MIT" ]
null
null
null
prj/api/views.py
rendrom/django-dynamit
4280da60212ffd9ad6a8cb96a7eba0890a98fee5
[ "MIT" ]
null
null
null
from prj.api import serializers, permissions, authenticators from rest_framework.views import APIView from django.contrib.auth.models import User from rest_framework.response import Response from rest_framework import viewsets from django.contrib.auth import login, logout from rest_framework.permissions import AllowAny...
32.666667
71
0.743878
from prj.api import serializers, permissions, authenticators from rest_framework.views import APIView from django.contrib.auth.models import User from rest_framework.response import Response from rest_framework import viewsets from django.contrib.auth import login, logout from rest_framework.permissions import AllowAny...
true
true
f725b5d9ea2e0f39b32bd5e6e8f910abfce3039b
7,348
py
Python
tensorflow_datasets/structured/htru2.py
jedlimlx/datasets
dffdc800d3d1f5c39f311f35de3530487153d335
[ "Apache-2.0" ]
null
null
null
tensorflow_datasets/structured/htru2.py
jedlimlx/datasets
dffdc800d3d1f5c39f311f35de3530487153d335
[ "Apache-2.0" ]
null
null
null
tensorflow_datasets/structured/htru2.py
jedlimlx/datasets
dffdc800d3d1f5c39f311f35de3530487153d335
[ "Apache-2.0" ]
null
null
null
"""Dataset for Predicting a Pulsar Star""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow_datasets.public_api as tfds import tensorflow as tf import os _CITATION = """\ @article{10.1093/mnras/stw656, author = {Lyon, R. J. and Stappe...
56.523077
1,490
0.69951
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow_datasets.public_api as tfds import tensorflow as tf import os _CITATION = """\ @article{10.1093/mnras/stw656, author = {Lyon, R. J. and Stappers, B. W. and Cooper, S. and Brooke, J. M. ...
true
true
f725b98098001c143ac1f1d06ba793a9900a5629
4,010
py
Python
test/mitmproxy/io/test_protobuf.py
asfaltboy/mitmproxy
f245d247674b0d7c7cca327cd2be5a0bcf01b27d
[ "MIT" ]
7
2020-11-29T11:42:44.000Z
2022-03-28T15:31:38.000Z
test/mitmproxy/io/test_protobuf.py
asfaltboy/mitmproxy
f245d247674b0d7c7cca327cd2be5a0bcf01b27d
[ "MIT" ]
7
2020-06-16T06:35:02.000Z
2022-03-15T20:15:53.000Z
test/mitmproxy/io/test_protobuf.py
asfaltboy/mitmproxy
f245d247674b0d7c7cca327cd2be5a0bcf01b27d
[ "MIT" ]
1
2021-08-31T05:02:59.000Z
2021-08-31T05:02:59.000Z
import pytest from mitmproxy import certs from mitmproxy import http from mitmproxy import exceptions from mitmproxy.test import tflow, tutils from mitmproxy.io import protobuf class TestProtobuf: def test_roundtrip_client(self): c = tflow.tclient_conn() del c.reply c.rfile = None ...
33.140496
85
0.638903
import pytest from mitmproxy import certs from mitmproxy import http from mitmproxy import exceptions from mitmproxy.test import tflow, tutils from mitmproxy.io import protobuf class TestProtobuf: def test_roundtrip_client(self): c = tflow.tclient_conn() del c.reply c.rfile = None ...
true
true
f725baf4c670c00b71a89f3aa043b3ec06944a52
530
py
Python
AI DIET PLANNER Microservice/website/migrations/0011_auto_20201208_0103.py
ricksaha2000/MedBay-V1
ee8ead4c3583066c778dc76ed0749feb70f412c8
[ "MIT" ]
null
null
null
AI DIET PLANNER Microservice/website/migrations/0011_auto_20201208_0103.py
ricksaha2000/MedBay-V1
ee8ead4c3583066c778dc76ed0749feb70f412c8
[ "MIT" ]
null
null
null
AI DIET PLANNER Microservice/website/migrations/0011_auto_20201208_0103.py
ricksaha2000/MedBay-V1
ee8ead4c3583066c778dc76ed0749feb70f412c8
[ "MIT" ]
null
null
null
# Generated by Django 3.1.3 on 2020-12-07 19:33 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('website', '0010_auto_20201120_2052'), ] operations = [ migrations.AlterField( model_name='profile', name='image', ...
27.894737
194
0.615094
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('website', '0010_auto_20201120_2052'), ] operations = [ migrations.AlterField( model_name='profile', name='image', field=models.ImageField(default='C:\\...
true
true
f725bb2c710b888e594d6f958fc334d74efebf61
10,916
py
Python
lib/ContigFilter_mlee/ContigFilter_mleeImpl.py
mollee55/ContigFilter
fa57051bab1c4c4d2341ecdcef9bb14955ed0a1d
[ "MIT" ]
null
null
null
lib/ContigFilter_mlee/ContigFilter_mleeImpl.py
mollee55/ContigFilter
fa57051bab1c4c4d2341ecdcef9bb14955ed0a1d
[ "MIT" ]
null
null
null
lib/ContigFilter_mlee/ContigFilter_mleeImpl.py
mollee55/ContigFilter
fa57051bab1c4c4d2341ecdcef9bb14955ed0a1d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- #BEGIN_HEADER # The header block is where all import statments should live import logging import os from pprint import pformat from Bio import SeqIO from installed_clients.AssemblyUtilClient import AssemblyUtil from installed_clients.KBaseReportClient import KBaseReport #END_HEADER class Con...
43.49004
109
0.620282
import logging import os from pprint import pformat from Bio import SeqIO from installed_clients.AssemblyUtilClient import AssemblyUtil from installed_clients.KBaseReportClient import KBaseReport class ContigFilter_mlee: idation is still important. logging.info('Validating parameters.') if ...
true
true
f725bb3c0b460966653fe516ad1697e8a427a136
481
py
Python
shiSock-0.3.0/test/test_one_unsecure/t2.py
AnanyaRamanA/shiSock
51efb0eba17eb106b9480598d278536ddd7732c3
[ "MIT" ]
null
null
null
shiSock-0.3.0/test/test_one_unsecure/t2.py
AnanyaRamanA/shiSock
51efb0eba17eb106b9480598d278536ddd7732c3
[ "MIT" ]
null
null
null
shiSock-0.3.0/test/test_one_unsecure/t2.py
AnanyaRamanA/shiSock
51efb0eba17eb106b9480598d278536ddd7732c3
[ "MIT" ]
1
2021-10-31T13:47:42.000Z
2021-10-31T13:47:42.000Z
from PySock import client def abc(data,con): print(f"Message from {data['sender_name']} : {data['data']}") con.SEND("test","Hurrah! it's working.") def client_msg(data): print(f"Message from : {data['sender_name']} => {data['data']}") c = client(client_name = "swat", debug = True) c.CLIENT("localhost",88...
30.0625
68
0.64657
from PySock import client def abc(data,con): print(f"Message from {data['sender_name']} : {data['data']}") con.SEND("test","Hurrah! it's working.") def client_msg(data): print(f"Message from : {data['sender_name']} => {data['data']}") c = client(client_name = "swat", debug = True) c.CLIENT("localhost",88...
true
true
f725bb9042591218ea998eef0a3d5cf5dc021084
19,126
py
Python
ultracart/models/order_format.py
UltraCart/rest_api_v2_sdk_python
d734ea13fabc7a57872ff68bac06861edb8fd882
[ "Apache-2.0" ]
1
2018-03-15T16:56:23.000Z
2018-03-15T16:56:23.000Z
ultracart/models/order_format.py
UltraCart/rest_api_v2_sdk_python
d734ea13fabc7a57872ff68bac06861edb8fd882
[ "Apache-2.0" ]
null
null
null
ultracart/models/order_format.py
UltraCart/rest_api_v2_sdk_python
d734ea13fabc7a57872ff68bac06861edb8fd882
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ UltraCart Rest API V2 UltraCart REST API Version 2 # noqa: E501 OpenAPI spec version: 2.0.0 Contact: support@ultracart.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class OrderFormat(object): ...
35.158088
466
0.664645
import pprint import re import six class OrderFormat(object): swagger_types = { 'context': 'str', 'dont_link_email_to_search': 'bool', 'email_as_link': 'bool', 'filter_distribution_center_oid': 'int', 'filter_to_items_in_contact_oid': 'int', 'format': 'str',...
true
true
f725bbab055480c19d9e0e8d0883d64f3353823b
666
py
Python
circle_and_dock.py
skullydazed/PyRoombaAdapter
88824e91b0f0cec008b16cfaa5a62a6546f1226e
[ "MIT" ]
null
null
null
circle_and_dock.py
skullydazed/PyRoombaAdapter
88824e91b0f0cec008b16cfaa5a62a6546f1226e
[ "MIT" ]
null
null
null
circle_and_dock.py
skullydazed/PyRoombaAdapter
88824e91b0f0cec008b16cfaa5a62a6546f1226e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ Pull forward a few cm, spin around, dock. """ from math import radians from time import sleep from pyroombaadapter import PyRoombaAdapter PORT = "/dev/ttyUSB0" adapter = PyRoombaAdapter(PORT) adapter.change_mode_to_safe() # Warn people we're coming adapter.send_song_cmd(0, 9, ...
19.028571
59
0.660661
from math import radians from time import sleep from pyroombaadapter import PyRoombaAdapter PORT = "/dev/ttyUSB0" adapter = PyRoombaAdapter(PORT) adapter.change_mode_to_safe() adapter.send_song_cmd(0, 9, [69, 69, 69, 65, 72, 69, 65, 72, 69], [40, 40, 40, 30, 10, 40, 30, ...
true
true
f725bde4462ccc899cd0ce48915de444be82f7e8
21,890
py
Python
source/graph_3D_surface.py
yux1991/PyRHEED
b39ad03651c92e3649069919ae48b1e5158cd3dd
[ "MIT" ]
14
2019-01-08T14:32:31.000Z
2021-11-17T21:07:10.000Z
source/graph_3D_surface.py
yux1991/PyRHEED
b39ad03651c92e3649069919ae48b1e5158cd3dd
[ "MIT" ]
2
2019-05-14T08:56:36.000Z
2020-12-22T16:44:30.000Z
source/graph_3D_surface.py
yux1991/PyRHEED
b39ad03651c92e3649069919ae48b1e5158cd3dd
[ "MIT" ]
4
2019-03-12T20:03:54.000Z
2022-03-08T14:24:46.000Z
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as NavigationToolbar from PyQt5 import QtCore, QtGui, QtWidgets, QtDataVisualization import math import matplotlib.pyplot as plt import numpy as np import os import pandas...
49.301802
142
0.685381
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as NavigationToolbar from PyQt5 import QtCore, QtGui, QtWidgets, QtDataVisualization import math import matplotlib.pyplot as plt import numpy as np import os import pandas...
true
true
f725bee9770f6b2e7f8623f5101b820360ca8b9e
3,329
py
Python
src/build_workflow/build_recorder.py
Rishikesh1159/opensearch-build
9f402afe9c945c9b715a69e94cbf0137bfbcd8b7
[ "Apache-2.0" ]
null
null
null
src/build_workflow/build_recorder.py
Rishikesh1159/opensearch-build
9f402afe9c945c9b715a69e94cbf0137bfbcd8b7
[ "Apache-2.0" ]
null
null
null
src/build_workflow/build_recorder.py
Rishikesh1159/opensearch-build
9f402afe9c945c9b715a69e94cbf0137bfbcd8b7
[ "Apache-2.0" ]
null
null
null
# SPDX-License-Identifier: Apache-2.0 # # The OpenSearch Contributors require contributions made to # this file be licensed under the Apache-2.0 license or a # compatible open source license. import logging import os import shutil from build_workflow.build_artifact_checks import BuildArtifactChecks from manifests.bui...
36.184783
112
0.620907
import logging import os import shutil from build_workflow.build_artifact_checks import BuildArtifactChecks from manifests.build_manifest import BuildManifest class BuildRecorder: def __init__(self, target): self.build_manifest = self.BuildManifestBuilder(target) self.target = target ...
true
true
f725bf9e067d8091eae026f29cdbe029061aaa52
492
py
Python
leetcode/_27.py
simonzhang0428/LeetCode
7daee7572d8235a34071aa831452ed5d0e93d947
[ "Apache-2.0" ]
2
2021-07-09T23:22:25.000Z
2021-07-27T23:15:52.000Z
leetcode/_27.py
simonzhang0428/LeetCode
7daee7572d8235a34071aa831452ed5d0e93d947
[ "Apache-2.0" ]
null
null
null
leetcode/_27.py
simonzhang0428/LeetCode
7daee7572d8235a34071aa831452ed5d0e93d947
[ "Apache-2.0" ]
null
null
null
""" idx 0 1 2 3 val = 3 -> ret 2, [2, 2] elm 2 2 2 3 i idx i: all elements to the left hand side of i (including) are the result to return j: current index to scan whole input array res = 0 """ class Solution: def removeElement(self, nums: List[int], val: int)...
25.894737
79
0.481707
class Solution: def removeElement(self, nums: List[int], val: int) -> int: idx = 0 for i in range(len(nums)): if nums[i] != val: nums[idx] = nums[i] idx += 1 return idx
true
true
f725c0b724d8f884150602fbe330761c2b73e84f
576
py
Python
quiz/migrations/0013_tester.py
Rakesh10021997/UBF_backend
354942bb708f669211674f5a327ac8eafe1584df
[ "MIT" ]
null
null
null
quiz/migrations/0013_tester.py
Rakesh10021997/UBF_backend
354942bb708f669211674f5a327ac8eafe1584df
[ "MIT" ]
null
null
null
quiz/migrations/0013_tester.py
Rakesh10021997/UBF_backend
354942bb708f669211674f5a327ac8eafe1584df
[ "MIT" ]
null
null
null
# Generated by Django 2.2 on 2020-10-07 13:04 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('quiz', '0012_quiz_answerkey'), ] operations = [ migrations.CreateModel( name='Tester', fields=[ ('id',...
26.181818
114
0.578125
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('quiz', '0012_quiz_answerkey'), ] operations = [ migrations.CreateModel( name='Tester', fields=[ ('id', models.AutoField(auto_created=True, primary_...
true
true
f725c116b568bd7ea26a4fe0e7a8944cb0a5794f
252
py
Python
Assignment 2/13.Dictionary.py
poojavaibhavsahu/Pooja_Python
58122bfa8586883145042b11fe1cc013c803ab4f
[ "bzip2-1.0.6" ]
null
null
null
Assignment 2/13.Dictionary.py
poojavaibhavsahu/Pooja_Python
58122bfa8586883145042b11fe1cc013c803ab4f
[ "bzip2-1.0.6" ]
null
null
null
Assignment 2/13.Dictionary.py
poojavaibhavsahu/Pooja_Python
58122bfa8586883145042b11fe1cc013c803ab4f
[ "bzip2-1.0.6" ]
null
null
null
size=int(input("enter size=")) dict1={} for i in range(1,size+1): subjects = input("enter subjects=") marks = int(input("enter marks=")) dict1[subjects]=marks print(dict1) for subjects,marks in dict1.items(): print(subjects,"=",marks)
25.2
39
0.65873
size=int(input("enter size=")) dict1={} for i in range(1,size+1): subjects = input("enter subjects=") marks = int(input("enter marks=")) dict1[subjects]=marks print(dict1) for subjects,marks in dict1.items(): print(subjects,"=",marks)
true
true
f725c1908ba5d833377d25ff6bb9702e9e24329f
2,983
py
Python
python/tvm/runtime/object.py
jheo4/incubator-tvm
c4c61cb766608fb2f0fd8c9facc480a43afed3f5
[ "Apache-2.0" ]
4
2018-01-09T07:35:33.000Z
2021-04-20T05:52:50.000Z
python/tvm/runtime/object.py
jheo4/incubator-tvm
c4c61cb766608fb2f0fd8c9facc480a43afed3f5
[ "Apache-2.0" ]
1
2020-04-17T10:53:14.000Z
2020-04-17T10:53:14.000Z
python/tvm/runtime/object.py
jheo4/incubator-tvm
c4c61cb766608fb2f0fd8c9facc480a43afed3f5
[ "Apache-2.0" ]
3
2020-12-10T23:21:18.000Z
2020-12-11T01:04:50.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
33.144444
89
0.686222
import ctypes from tvm._ffi.base import _FFI_MODE, _RUNTIME_ONLY, check_call, _LIB, c_str from . import _ffi_api, _ffi_node_api try: if _FFI_MODE == "ctypes": raise ImportError() from tvm._ffi._cy3.core import _set_class_object, _set_class_object_generic from tvm._ffi._cy3.co...
true
true
f725c257cf9a811b1104a4abcf2cefc06d1747df
1,212
py
Python
app/views/schemas.py
KaiserBloo/memegen
ee757e916aa37176a6562021cee9bb0ce0bdad0d
[ "MIT" ]
null
null
null
app/views/schemas.py
KaiserBloo/memegen
ee757e916aa37176a6562021cee9bb0ce0bdad0d
[ "MIT" ]
null
null
null
app/views/schemas.py
KaiserBloo/memegen
ee757e916aa37176a6562021cee9bb0ce0bdad0d
[ "MIT" ]
null
null
null
from dataclasses import dataclass from datetime import datetime @dataclass class AuthResponse: email: str image_access: bool search_access: bool created: datetime modified: datetime @dataclass class FontResponse: filename: str id: str alias: str _self: str @dataclass class Meme...
13.318681
33
0.664191
from dataclasses import dataclass from datetime import datetime @dataclass class AuthResponse: email: str image_access: bool search_access: bool created: datetime modified: datetime @dataclass class FontResponse: filename: str id: str alias: str _self: str @dataclass class Meme...
true
true
f725c299e78ae93819633c99b0ca91ef4159c618
159
py
Python
reviewboard/changedescs/evolutions/__init__.py
clach04/reviewboard
994e5cbcb7709bf2de851d5ecd261d64a4091f26
[ "MIT" ]
1
2015-09-11T15:50:17.000Z
2015-09-11T15:50:17.000Z
reviewboard/changedescs/evolutions/__init__.py
clach04/reviewboard
994e5cbcb7709bf2de851d5ecd261d64a4091f26
[ "MIT" ]
null
null
null
reviewboard/changedescs/evolutions/__init__.py
clach04/reviewboard
994e5cbcb7709bf2de851d5ecd261d64a4091f26
[ "MIT" ]
null
null
null
from django.conf import settings SEQUENCE = [] if settings.DATABASES['default']['ENGINE'].endswith('mysql'): SEQUENCE.append('fields_changed_longtext')
19.875
61
0.742138
from django.conf import settings SEQUENCE = [] if settings.DATABASES['default']['ENGINE'].endswith('mysql'): SEQUENCE.append('fields_changed_longtext')
true
true
f725c3671a76f70791f2bc04f5876fb34af22787
2,075
py
Python
examples/market_radio.py
mnovikov1/cryptology-ws-client-python
2ff019637854d5f92c1151065c939bc85df17cda
[ "MIT" ]
null
null
null
examples/market_radio.py
mnovikov1/cryptology-ws-client-python
2ff019637854d5f92c1151065c939bc85df17cda
[ "MIT" ]
null
null
null
examples/market_radio.py
mnovikov1/cryptology-ws-client-python
2ff019637854d5f92c1151065c939bc85df17cda
[ "MIT" ]
4
2019-04-29T10:12:00.000Z
2019-11-18T10:00:43.000Z
import asyncio import cryptology import logging import os from aiohttp import WSServerHandshakeError from datetime import datetime from decimal import Decimal from pathlib import Path from typing import Optional SERVER = os.getenv('SERVER', 'wss://marketdata.cryptology.com') NAME = Path(__file__).stem logging.basicC...
34.583333
108
0.654458
import asyncio import cryptology import logging import os from aiohttp import WSServerHandshakeError from datetime import datetime from decimal import Decimal from pathlib import Path from typing import Optional SERVER = os.getenv('SERVER', 'wss://marketdata.cryptology.com') NAME = Path(__file__).stem logging.basicC...
true
true
f725c3bd2b571aa08f3545969b2bc56209e7455d
93
py
Python
pyshiki/__init__.py
vadyur/PyShiki
e6a678056d46b15969af64895911ae0a2df4df69
[ "MIT" ]
null
null
null
pyshiki/__init__.py
vadyur/PyShiki
e6a678056d46b15969af64895911ae0a2df4df69
[ "MIT" ]
null
null
null
pyshiki/__init__.py
vadyur/PyShiki
e6a678056d46b15969af64895911ae0a2df4df69
[ "MIT" ]
1
2021-04-12T18:48:38.000Z
2021-04-12T18:48:38.000Z
#!/usr/bin/env python3 #-*- coding: UTF-8 -*- from .shikimoriapi import * __all__ = ['Api']
15.5
27
0.623656
from .shikimoriapi import * __all__ = ['Api']
true
true
f725c440dafb3649fab82e15f86d026ee595aa5b
2,771
py
Python
src/formattedcode/format_json.py
chetanya-shrimali/scancode-toolkit
a1a22fb225cbeb211bd6f92272a46f1351f57d6b
[ "Apache-2.0", "CC0-1.0" ]
null
null
null
src/formattedcode/format_json.py
chetanya-shrimali/scancode-toolkit
a1a22fb225cbeb211bd6f92272a46f1351f57d6b
[ "Apache-2.0", "CC0-1.0" ]
null
null
null
src/formattedcode/format_json.py
chetanya-shrimali/scancode-toolkit
a1a22fb225cbeb211bd6f92272a46f1351f57d6b
[ "Apache-2.0", "CC0-1.0" ]
null
null
null
# # Copyright (c) 2017 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. # ScanCode is a trademark of nexB Inc. # # You may not use...
39.028169
114
0.74161
from __future__ import absolute_import from __future__ import unicode_literals from collections import OrderedDict import simplejson from plugincode.output import scan_output_writer @scan_output_writer def write_json_compact(files_count, version, notice, scanned_files, options, output_file...
true
true
f725c4a8a7481af6a704ce6b7c4c8af37084a931
7,084
py
Python
clrnet/models/necks/fpn.py
Turoad/CLRNet
51e082db12973943bddefd76fd0d431fcb3350ff
[ "Apache-2.0" ]
18
2022-03-16T07:29:19.000Z
2022-03-31T07:05:37.000Z
clrnet/models/necks/fpn.py
Turoad/CLRNet
51e082db12973943bddefd76fd0d431fcb3350ff
[ "Apache-2.0" ]
1
2022-03-16T11:47:13.000Z
2022-03-17T10:15:25.000Z
clrnet/models/necks/fpn.py
Turoad/CLRNet
51e082db12973943bddefd76fd0d431fcb3350ff
[ "Apache-2.0" ]
1
2022-03-25T14:49:58.000Z
2022-03-25T14:49:58.000Z
import warnings import torch import torch.nn as nn import torch.nn.functional as F from mmcv.cnn import ConvModule from ..registry import NECKS @NECKS.register_module class FPN(nn.Module): def __init__(self, in_channels, out_channels, num_outs, ...
42.166667
79
0.511011
import warnings import torch import torch.nn as nn import torch.nn.functional as F from mmcv.cnn import ConvModule from ..registry import NECKS @NECKS.register_module class FPN(nn.Module): def __init__(self, in_channels, out_channels, num_outs, ...
true
true
f725c51873bca756304f94c52f620a6f9fb9ab38
44,255
py
Python
pdb2sql/StructureSimilarity.py
DarioMarzella/pdb2sql
64d5d4f27fb67a0ff41221bcd27667237048bb3f
[ "Apache-2.0" ]
null
null
null
pdb2sql/StructureSimilarity.py
DarioMarzella/pdb2sql
64d5d4f27fb67a0ff41221bcd27667237048bb3f
[ "Apache-2.0" ]
null
null
null
pdb2sql/StructureSimilarity.py
DarioMarzella/pdb2sql
64d5d4f27fb67a0ff41221bcd27667237048bb3f
[ "Apache-2.0" ]
null
null
null
import warnings import numpy as np from .pdb2sqlcore import pdb2sql from .interface import interface from .superpose import get_trans_vect, get_rotation_matrix, superpose_selection from . import transform import os import pickle class StructureSimilarity(object): def __init__(self, decoy, ref, verbose=False, en...
34.709804
135
0.538199
import warnings import numpy as np from .pdb2sqlcore import pdb2sql from .interface import interface from .superpose import get_trans_vect, get_rotation_matrix, superpose_selection from . import transform import os import pickle class StructureSimilarity(object): def __init__(self, decoy, ref, verbose=False, en...
true
true
f725c56e6e6be2a0459699cdaa700720c868b2bf
1,319
py
Python
yad_uploader/loggers.py
RuzzyRullezz/yad_uploader
9a37e3b5f50365d6e105519043b71a6014ebef4f
[ "MIT" ]
null
null
null
yad_uploader/loggers.py
RuzzyRullezz/yad_uploader
9a37e3b5f50365d6e105519043b71a6014ebef4f
[ "MIT" ]
null
null
null
yad_uploader/loggers.py
RuzzyRullezz/yad_uploader
9a37e3b5f50365d6e105519043b71a6014ebef4f
[ "MIT" ]
null
null
null
import sys import logging import socket from typing import List import telegram_log.handler from yad_uploader.arguments import Arguments def configure_logger(logger: logging.Logger, tg_token: str, tg_chat_ids: List[str]): logger.setLevel(logging.DEBUG) host_name = socket.gethostname() log_format = '%(as...
32.170732
112
0.751327
import sys import logging import socket from typing import List import telegram_log.handler from yad_uploader.arguments import Arguments def configure_logger(logger: logging.Logger, tg_token: str, tg_chat_ids: List[str]): logger.setLevel(logging.DEBUG) host_name = socket.gethostname() log_format = '%(as...
true
true
f725c5e76c999a9a4e9b18abb24d8c6a364d2b89
33
py
Python
9-days-of-code/day-5/03 Spaces.py
jaredliw/mcc-python-solutions
f54b1d2a044788b2adc1eb19a490422eb92ffe77
[ "MIT" ]
2
2021-04-09T04:03:39.000Z
2021-04-09T04:18:28.000Z
9-days-of-code/day-5/03 Spaces.py
jaredliw/mcc-python-solutions
f54b1d2a044788b2adc1eb19a490422eb92ffe77
[ "MIT" ]
null
null
null
9-days-of-code/day-5/03 Spaces.py
jaredliw/mcc-python-solutions
f54b1d2a044788b2adc1eb19a490422eb92ffe77
[ "MIT" ]
null
null
null
print("second = hour * 60 * 60")
16.5
32
0.575758
print("second = hour * 60 * 60")
true
true
f725c62d71cda0c7e9a85c8d2794317378633651
2,261
py
Python
tests/test_uploads.py
Irdroid/httpie
ca36f1de04310de644857ebbea9c94984971ab7c
[ "BSD-3-Clause" ]
2
2015-06-27T05:40:27.000Z
2015-06-27T11:55:23.000Z
tests/test_uploads.py
915546302/httpie
ca36f1de04310de644857ebbea9c94984971ab7c
[ "BSD-3-Clause" ]
null
null
null
tests/test_uploads.py
915546302/httpie
ca36f1de04310de644857ebbea9c94984971ab7c
[ "BSD-3-Clause" ]
null
null
null
import os import pytest from httpie.input import ParseError from utils import TestEnvironment, http, HTTP_OK from fixtures import FILE_PATH_ARG, FILE_PATH, FILE_CONTENT class TestMultipartFormDataFileUpload: def test_non_existent_file_raises_parse_error(self, httpbin): with pytest.raises(ParseError): ...
35.888889
79
0.621849
import os import pytest from httpie.input import ParseError from utils import TestEnvironment, http, HTTP_OK from fixtures import FILE_PATH_ARG, FILE_PATH, FILE_CONTENT class TestMultipartFormDataFileUpload: def test_non_existent_file_raises_parse_error(self, httpbin): with pytest.raises(ParseError): ...
true
true
f725c69d3932aaf715b9909a1b07cb3239f9f34f
62
py
Python
datasets/__init__.py
revsic/tf-speech-dataset
93a3ce2574616a3a52d2ac99af9826af680dda8f
[ "MIT" ]
1
2021-07-10T14:21:23.000Z
2021-07-10T14:21:23.000Z
datasets/__init__.py
revsic/tf-speech-dataset
93a3ce2574616a3a52d2ac99af9826af680dda8f
[ "MIT" ]
null
null
null
datasets/__init__.py
revsic/tf-speech-dataset
93a3ce2574616a3a52d2ac99af9826af680dda8f
[ "MIT" ]
null
null
null
from .ljspeech import LJSpeech from .reader import DataReader
20.666667
30
0.83871
from .ljspeech import LJSpeech from .reader import DataReader
true
true
f725c72c140425c7fa0f49c67ec4ca25c4dee0ad
816
py
Python
cli/polyaxon/proxies/schemas/robots.py
polyaxon/cli
3543c0220a8a7c06fc9573cd2a740f8ae4930641
[ "Apache-2.0" ]
null
null
null
cli/polyaxon/proxies/schemas/robots.py
polyaxon/cli
3543c0220a8a7c06fc9573cd2a740f8ae4930641
[ "Apache-2.0" ]
1
2022-01-24T11:26:47.000Z
2022-03-18T23:17:58.000Z
cli/polyaxon/proxies/schemas/robots.py
polyaxon/cli
3543c0220a8a7c06fc9573cd2a740f8ae4930641
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Copyright 2018-2022 Polyaxon, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
29.142857
74
0.741422
from polyaxon.proxies.schemas.base import get_config OPTIONS = """ location = /robots.txt {{ rewrite ^ /static/robots.txt; }} """ def get_robots_config(): return get_config(options=OPTIONS, indent=0)
true
true
f725c8ca4f1ea80a992f2dcedcd958469830ff26
4,170
py
Python
azure-mgmt-servicebus/azure/mgmt/servicebus/operations/premium_messaging_regions_operations.py
jmalobicky/azure-sdk-for-python
61234a3d83f8fb481d1dd2386e54e888864878fd
[ "MIT" ]
1
2018-07-23T08:59:24.000Z
2018-07-23T08:59:24.000Z
azure-mgmt-servicebus/azure/mgmt/servicebus/operations/premium_messaging_regions_operations.py
jmalobicky/azure-sdk-for-python
61234a3d83f8fb481d1dd2386e54e888864878fd
[ "MIT" ]
null
null
null
azure-mgmt-servicebus/azure/mgmt/servicebus/operations/premium_messaging_regions_operations.py
jmalobicky/azure-sdk-for-python
61234a3d83f8fb481d1dd2386e54e888864878fd
[ "MIT" ]
1
2018-08-28T14:36:47.000Z
2018-08-28T14:36:47.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
40.882353
144
0.642446
import uuid from msrest.pipeline import ClientRawResponse from .. import models class PremiumMessagingRegionsOperations(object): models = models def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deseria...
true
true
f725c9059a48acf58bb83c5eced787cdd333b41d
16,484
py
Python
python_modules/dagster-graphql/dagster_graphql_tests/graphql/snapshots/snap_test_environment_schema.py
Andrew-Crosby/dagster
e646625a687dc656bdd855d88b868de957b37b62
[ "Apache-2.0" ]
1
2021-07-03T09:05:58.000Z
2021-07-03T09:05:58.000Z
python_modules/dagster-graphql/dagster_graphql_tests/graphql/snapshots/snap_test_environment_schema.py
Andrew-Crosby/dagster
e646625a687dc656bdd855d88b868de957b37b62
[ "Apache-2.0" ]
null
null
null
python_modules/dagster-graphql/dagster_graphql_tests/graphql/snapshots/snap_test_environment_schema.py
Andrew-Crosby/dagster
e646625a687dc656bdd855d88b868de957b37b62
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # snapshottest: v1 - https://goo.gl/zC4yUc from __future__ import unicode_literals from snapshottest import Snapshot snapshots = Snapshot() snapshots['TestEnvironmentSchema.test_basic_invalid_config_on_run_config_schema[non_launchable_in_memory_instance_lazy_repository] 1'] = { 'runConfig...
54.582781
788
0.521354
from __future__ import unicode_literals from snapshottest import Snapshot snapshots = Snapshot() snapshots['TestEnvironmentSchema.test_basic_invalid_config_on_run_config_schema[non_launchable_in_memory_instance_lazy_repository] 1'] = { 'runConfigSchemaOrError': { 'isRunConfigValid': { '__ty...
true
true
f725c97888414ba89b8b7dc7e429ef5d79ac764f
2,335
py
Python
lib/safe_python.py
AjaxVM/hiths-pyweek6
6661ddb8b7c75b0788ce41a411838bc28d59d284
[ "Unlicense" ]
null
null
null
lib/safe_python.py
AjaxVM/hiths-pyweek6
6661ddb8b7c75b0788ce41a411838bc28d59d284
[ "Unlicense" ]
null
null
null
lib/safe_python.py
AjaxVM/hiths-pyweek6
6661ddb8b7c75b0788ce41a411838bc28d59d284
[ "Unlicense" ]
null
null
null
def test_safe(filename, acceptable_functions=[]): """tests all the function calls in a file against a set of acceptable ones. this function also does not allow importing of other modules. returns True, [] if there are only acceptable function calls, returns False and a list of bad function ...
31.133333
94
0.443683
def test_safe(filename, acceptable_functions=[]): text = open(filename, "rU").read() text.replace("\r", "\n") while "#" in text: text = text[0:text.index("#")] +\ text[text.index("\n", text.index("#"))::] for i in text.split(): if i == "import" or\ i...
true
true
f725c9a230b27d2955d04d1ff0959892b346bcb4
13,044
py
Python
insights/parsers/tests/test_sctp.py
pombredanne/insights-core
63d6510ce8b7b96c94fbd568369420ecf38cf2ae
[ "Apache-2.0" ]
121
2017-05-30T20:23:25.000Z
2022-03-23T12:52:15.000Z
insights/parsers/tests/test_sctp.py
ahitacat/insights-core
0ba58dbe5edceef0bd4a74c1caf6b826381ccda5
[ "Apache-2.0" ]
1,977
2017-05-26T14:36:03.000Z
2022-03-31T10:38:53.000Z
insights/parsers/tests/test_sctp.py
ahitacat/insights-core
0ba58dbe5edceef0bd4a74c1caf6b826381ccda5
[ "Apache-2.0" ]
244
2017-05-30T20:22:57.000Z
2022-03-26T10:09:39.000Z
import doctest import pytest from insights.parsers import ParseException, SkipException from insights.parsers import sctp from insights.parsers.sctp import SCTPEps from insights.parsers.sctp import SCTPAsc, SCTPAsc7 from insights.parsers.sctp import SCTPSnmp from insights.tests import context_wrap SCTP_EPS_DETAILS = ...
63.320388
613
0.627492
import doctest import pytest from insights.parsers import ParseException, SkipException from insights.parsers import sctp from insights.parsers.sctp import SCTPEps from insights.parsers.sctp import SCTPAsc, SCTPAsc7 from insights.parsers.sctp import SCTPSnmp from insights.tests import context_wrap SCTP_EPS_DETAILS = ...
true
true
f725cb42004704deff0df6e504fa3bb2b08c1cc3
3,786
py
Python
tfx/components/schema_gen/executor_test.py
romiosarkar6991/tfx-romio
0703c1dd037c676e1d438c2e5ce831decfc9eed9
[ "Apache-2.0" ]
1
2019-10-10T06:06:12.000Z
2019-10-10T06:06:12.000Z
tfx/components/schema_gen/executor_test.py
romiosarkar6991/tfx-romio
0703c1dd037c676e1d438c2e5ce831decfc9eed9
[ "Apache-2.0" ]
null
null
null
tfx/components/schema_gen/executor_test.py
romiosarkar6991/tfx-romio
0703c1dd037c676e1d438c2e5ce831decfc9eed9
[ "Apache-2.0" ]
1
2019-10-06T03:39:58.000Z
2019-10-06T03:39:58.000Z
# Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
37.485149
80
0.726889
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import tensorflow as tf from tfx.components.schema_gen import executor from tfx.types import standard_artifacts from tfx.utils import io_utils class ExecutorTest(tf.test.TestCase): ...
true
true
f725cc0039395be7b59dace596d9541c0d6016db
4,406
py
Python
python_for_web/public/Lib/site-packages/jinja2/meta.py
ServerCetin/hello_python3
7cf0807e09c819c690f28ee30758f22355c79115
[ "MIT" ]
null
null
null
python_for_web/public/Lib/site-packages/jinja2/meta.py
ServerCetin/hello_python3
7cf0807e09c819c690f28ee30758f22355c79115
[ "MIT" ]
null
null
null
python_for_web/public/Lib/site-packages/jinja2/meta.py
ServerCetin/hello_python3
7cf0807e09c819c690f28ee30758f22355c79115
[ "MIT" ]
null
null
null
"""Functions that expose information about templates that might be interesting for introspection. """ import typing as t from . import nodes from .compiler import CodeGenerator from .compiler import Frame if t.TYPE_CHECKING: from .environment import Environment class TrackingCodeGenerator(CodeGenerator): ""...
39.339286
82
0.648207
import typing as t from . import nodes from .compiler import CodeGenerator from .compiler import Frame if t.TYPE_CHECKING: from .environment import Environment class TrackingCodeGenerator(CodeGenerator): def __init__(self, environment: "Environment") -> None: super().__init__(environment, "<introsp...
true
true
f725cc62788a18a8035e2f36032fa0d43ceb3487
45,696
py
Python
python/ccxt/coinbasepro.py
springrider/ccxt
39570694e5cfc9a315a0f05b2d06cf8b1d550c24
[ "MIT" ]
1
2021-03-31T18:35:43.000Z
2021-03-31T18:35:43.000Z
python/ccxt/coinbasepro.py
springrider/ccxt
39570694e5cfc9a315a0f05b2d06cf8b1d550c24
[ "MIT" ]
null
null
null
python/ccxt/coinbasepro.py
springrider/ccxt
39570694e5cfc9a315a0f05b2d06cf8b1d550c24
[ "MIT" ]
2
2021-05-08T04:01:00.000Z
2022-03-24T04:46:21.000Z
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange # ----------------------------------------------------------------------------- try: basestri...
40.474756
187
0.494573
ge import Exchange try: basestring except NameError: basestring = str import hashlib from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import PermissionDenied from ccxt.base.errors import ArgumentsRequired from ccxt.base.errors import Ins...
true
true
f725cc9a4bba65ddba8bae99ff1a3dc410b16b3a
558
py
Python
test/functional/test_framework/validaterawtransaction.py
hackverket/bitcoin-abc-bitcore
cc70c0a66b640a1ac59024bac9a314256ed386b2
[ "MIT" ]
5
2019-07-29T04:12:38.000Z
2020-07-26T12:02:30.000Z
test/functional/test_framework/validaterawtransaction.py
hackverket/bitcoin-abc-bitcore
cc70c0a66b640a1ac59024bac9a314256ed386b2
[ "MIT" ]
5
2019-03-04T13:26:23.000Z
2019-11-15T16:44:19.000Z
test/functional/test_framework/validaterawtransaction.py
hackverket/bitcoin-abc-bitcore
cc70c0a66b640a1ac59024bac9a314256ed386b2
[ "MIT" ]
4
2019-03-22T04:18:50.000Z
2019-10-30T20:37:36.000Z
from test_framework.messages import ToHex from test_framework.util import assert_equal def check_validaterawtx(node, tx, has_valid_inputs = True, is_minable = True, enough_fee = True, num_errors = 0): res = node.validaterawtransaction(ToHex(tx)) if enough_fee: assert(res["txfee"] >= re...
29.368421
63
0.689964
from test_framework.messages import ToHex from test_framework.util import assert_equal def check_validaterawtx(node, tx, has_valid_inputs = True, is_minable = True, enough_fee = True, num_errors = 0): res = node.validaterawtransaction(ToHex(tx)) if enough_fee: assert(res["txfee"] >= re...
true
true
f725ccb31e4440e6e4c660392d8237cb3fafb886
341
py
Python
src/box.py
Flantropy/my_pygame_template
ab30f3ac5c11866c0bb7c32dff177d6fb47a6753
[ "MIT" ]
null
null
null
src/box.py
Flantropy/my_pygame_template
ab30f3ac5c11866c0bb7c32dff177d6fb47a6753
[ "MIT" ]
null
null
null
src/box.py
Flantropy/my_pygame_template
ab30f3ac5c11866c0bb7c32dff177d6fb47a6753
[ "MIT" ]
null
null
null
from pygame import Surface from pygame.sprite import Sprite class Box(Sprite): def __init__(self, color, x=0, y=0): super().__init__() self.image = Surface((50, 50)) self.rect = self.image.get_rect() self.rect.x = x self.rect.y = y self.color = color self.im...
24.357143
41
0.595308
from pygame import Surface from pygame.sprite import Sprite class Box(Sprite): def __init__(self, color, x=0, y=0): super().__init__() self.image = Surface((50, 50)) self.rect = self.image.get_rect() self.rect.x = x self.rect.y = y self.color = color self.im...
true
true
f725cd04c52b8ddabf80aed6a0fab88870068c97
507
py
Python
lamdba_caller.py
Diontsoumas/book-discount-tracker
19f54a65b388e3d01516b16c6bdbd407bed24327
[ "MIT" ]
1
2019-04-04T20:48:59.000Z
2019-04-04T20:48:59.000Z
lamdba_caller.py
Diontsoumas/book-discount-tracker
19f54a65b388e3d01516b16c6bdbd407bed24327
[ "MIT" ]
null
null
null
lamdba_caller.py
Diontsoumas/book-discount-tracker
19f54a65b388e3d01516b16c6bdbd407bed24327
[ "MIT" ]
null
null
null
import boto3 import json s3 = boto3.resource('s3') def lambda_handler(event, context): bucket = s3.Bucket("diotsoumas-book-tracker-config-files") sns_client = boto3.client('sns') arn = "arn:aws:sns:eu-west-1:169367514751:Lamdba-caller" for obj in bucket.objects.filter(): message = {"s3_key":...
28.166667
65
0.635108
import boto3 import json s3 = boto3.resource('s3') def lambda_handler(event, context): bucket = s3.Bucket("diotsoumas-book-tracker-config-files") sns_client = boto3.client('sns') arn = "arn:aws:sns:eu-west-1:169367514751:Lamdba-caller" for obj in bucket.objects.filter(): message = {"s3_key":...
true
true
f725ce2222bf3ae065c946c1c55958e57ddb15fb
405
py
Python
sra_django_api/sra_django_api/wsgi.py
tflati/ncbi-search
2f31c57ffb95c2c874b65c03c58edd96eb822dfb
[ "MIT" ]
null
null
null
sra_django_api/sra_django_api/wsgi.py
tflati/ncbi-search
2f31c57ffb95c2c874b65c03c58edd96eb822dfb
[ "MIT" ]
null
null
null
sra_django_api/sra_django_api/wsgi.py
tflati/ncbi-search
2f31c57ffb95c2c874b65c03c58edd96eb822dfb
[ "MIT" ]
null
null
null
""" WSGI config for sra_django_api project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANG...
23.823529
78
0.792593
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sra_django_api.settings") application = get_wsgi_application()
true
true
f725cea5e00aa2c09ec45c55521fcde13e1cb507
427
py
Python
healthcareai/__init__.py
vijayphugat/Practice
7d8560d62a5d6bfa9488526da318973295a25255
[ "MIT" ]
null
null
null
healthcareai/__init__.py
vijayphugat/Practice
7d8560d62a5d6bfa9488526da318973295a25255
[ "MIT" ]
null
null
null
healthcareai/__init__.py
vijayphugat/Practice
7d8560d62a5d6bfa9488526da318973295a25255
[ "MIT" ]
null
null
null
from .advanced_supvervised_model_trainer import AdvancedSupervisedModelTrainer from .supervised_model_trainer import SupervisedModelTrainer from .datasets import load_diabetes from .common.csv_loader import load_csv from .common.file_io_utilities import load_saved_model __all__ = [ 'AdvancedSupervisedModelT...
30.5
79
0.796253
from .advanced_supvervised_model_trainer import AdvancedSupervisedModelTrainer from .supervised_model_trainer import SupervisedModelTrainer from .datasets import load_diabetes from .common.csv_loader import load_csv from .common.file_io_utilities import load_saved_model __all__ = [ 'AdvancedSupervisedModelT...
true
true
f725d0c8c26e20e7b4d0e58db66301a09c122ff9
1,670
py
Python
models/model_facebook.py
xyla-io/almacen
7b7f235dc7939777f971f1b5eadd5621e980c15e
[ "MIT" ]
2
2020-10-15T22:12:17.000Z
2020-10-26T07:17:17.000Z
models/model_facebook.py
xyla-io/almacen
7b7f235dc7939777f971f1b5eadd5621e980c15e
[ "MIT" ]
null
null
null
models/model_facebook.py
xyla-io/almacen
7b7f235dc7939777f971f1b5eadd5621e980c15e
[ "MIT" ]
null
null
null
import sqlalchemy as alchemy from . import base from typing import Optional class FacebookReportTableModel(base.ReportTableModel): @property def date_column_name(self) -> str: return 'date_start' class FacebookCampaignReportTableModel(FacebookReportTableModel): @property def table_name(self) -> str: ...
30.363636
69
0.749102
import sqlalchemy as alchemy from . import base from typing import Optional class FacebookReportTableModel(base.ReportTableModel): @property def date_column_name(self) -> str: return 'date_start' class FacebookCampaignReportTableModel(FacebookReportTableModel): @property def table_name(self) -> str: ...
true
true
f725d10ada02b65b1f2ceb1eb17fac036e84be42
766
py
Python
auto_auto_archive.py
fairhopeweb/auto-archiver
67e41b80ceec38b81bd43345a2024a726e1983f0
[ "MIT" ]
45
2021-02-27T21:52:58.000Z
2022-03-30T20:13:03.000Z
auto_auto_archive.py
fairhopeweb/auto-archiver
67e41b80ceec38b81bd43345a2024a726e1983f0
[ "MIT" ]
18
2021-02-10T15:04:30.000Z
2022-03-30T09:15:05.000Z
auto_auto_archive.py
fairhopeweb/auto-archiver
67e41b80ceec38b81bd43345a2024a726e1983f0
[ "MIT" ]
15
2021-06-12T16:37:46.000Z
2022-03-29T11:36:03.000Z
import gspread import subprocess import argparse import auto_archive import datetime def main(): parser = argparse.ArgumentParser( description="Automatically use youtube-dl to download media from a Google Sheet") parser.add_argument("--sheet", action="store", dest="sheet") args = parser.parse_args...
23.9375
89
0.685379
import gspread import subprocess import argparse import auto_archive import datetime def main(): parser = argparse.ArgumentParser( description="Automatically use youtube-dl to download media from a Google Sheet") parser.add_argument("--sheet", action="store", dest="sheet") args = parser.parse_args...
true
true
f725d1cbbda0c0bbbabb83ea57b921c1c1a3b239
64,981
py
Python
scripts/category.py
framawiki/pywikibot
9835260ef5f38ac83d3ce214c7d1abd594bea934
[ "MIT" ]
null
null
null
scripts/category.py
framawiki/pywikibot
9835260ef5f38ac83d3ce214c7d1abd594bea934
[ "MIT" ]
null
null
null
scripts/category.py
framawiki/pywikibot
9835260ef5f38ac83d3ce214c7d1abd594bea934
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- """ Script to manage categories. Syntax: python pwb.py category action [-option] where action can be one of these * add - mass-add a category to a list of pages. * remove - remove category tag from all pages in a category. * move - move all pag...
41.815315
79
0.559256
import codecs import math import os import pickle import re from operator import methodcaller from typing import Optional, Set import pywikibot from pywikibot import config, pagegenerators from pywikibot import i18n, textlib from pywikibot.bot import ( suggest_help, IntegerOption, StandardOption, Con...
true
true
f725d27cbdff7297840854931171bd38aad72f40
2,668
py
Python
src/reactive/aodh_handlers.py
javacruft/charm-aodh
bd4d63d7baf1c1af542854ea1acfd936be01e27f
[ "Apache-2.0" ]
1
2016-06-21T16:33:22.000Z
2016-06-21T16:33:22.000Z
src/reactive/aodh_handlers.py
javacruft/charm-aodh
bd4d63d7baf1c1af542854ea1acfd936be01e27f
[ "Apache-2.0" ]
null
null
null
src/reactive/aodh_handlers.py
javacruft/charm-aodh
bd4d63d7baf1c1af542854ea1acfd936be01e27f
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 Canonical Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
26.156863
79
0.733883
import charms.reactive as reactive import charmhelpers.core.hookenv as hookenv # aodh import charm.openstack.aodh as aodh # Minimal inferfaces required for operation MINIMAL_INTERFACES = [ 'shared-db.available', 'identity-service.available', 'amqp.available', ] # use a synthetic state to...
true
true
f725d3b3f04ef12cb9eabb16862afc6710c21899
9,828
py
Python
userbot/modules/filemanager.py
akihiro69/akihirouserbot
e07da853e0938e40c29366d20ae7e917c215ceb6
[ "curl" ]
2
2022-03-04T12:25:41.000Z
2022-03-09T10:06:55.000Z
userbot/modules/filemanager.py
akihiro69/AkihiroProject
649ac4f8b786a36df25aa3085333940fe7825188
[ "curl" ]
null
null
null
userbot/modules/filemanager.py
akihiro69/AkihiroProject
649ac4f8b786a36df25aa3085333940fe7825188
[ "curl" ]
null
null
null
# Credits to Userge for Remove and Rename import io import os import os.path import re import shutil import time from datetime import datetime from os.path import basename, dirname, exists, isdir, isfile, join, relpath from shutil import rmtree from tarfile import TarFile, is_tarfile from zipfile import ZI...
37.655172
88
0.50987
import io import os import os.path import re import shutil import time from datetime import datetime from os.path import basename, dirname, exists, isdir, isfile, join, relpath from shutil import rmtree from tarfile import TarFile, is_tarfile from zipfile import ZIP_DEFLATED, BadZipFile, ZipFile, is_zipfil...
true
true
f725d482affcb8a458620913281844682449d4b0
463
py
Python
virtual/lib/python3.6/site-packages/pylint/test/functional/disable_wrong_import_order.py
drewheathens/The-Moringa-Tribune
98ee4d63c9df6f1f7497fc6876960a822d914500
[ "MIT" ]
69
2019-02-18T12:07:35.000Z
2022-03-12T10:38:32.000Z
virtual/lib/python3.6/site-packages/pylint/test/functional/disable_wrong_import_order.py
drewheathens/The-Moringa-Tribune
98ee4d63c9df6f1f7497fc6876960a822d914500
[ "MIT" ]
32
2018-05-01T05:24:43.000Z
2022-03-11T23:20:39.000Z
virtual/lib/python3.6/site-packages/pylint/test/functional/disable_wrong_import_order.py
drewheathens/The-Moringa-Tribune
98ee4d63c9df6f1f7497fc6876960a822d914500
[ "MIT" ]
28
2019-03-22T01:07:13.000Z
2022-02-21T16:38:27.000Z
"""Checks that disabling 'wrong-import-order' on an import prevents subsequent imports from being considered out-of-order in respect to it but does not prevent it from being considered for 'ungrouped-imports'.""" # pylint: disable=unused-import,import-error,no-name-in-module from first_party.foo import bar # pylint: d...
38.583333
80
0.803456
from first_party.foo import bar import logging import os.path import sys from astroid import are_exclusive import first_party
true
true
f725d527eca9f1244b658df525134e4894d1750c
26,199
py
Python
discord/iterators.py
squaresmile/discord.py
44d5bafa3d44a0b4de6407727d8d313a55a77662
[ "MIT" ]
11,948
2015-08-25T00:07:50.000Z
2022-03-31T23:30:54.000Z
discord/iterators.py
squaresmile/discord.py
44d5bafa3d44a0b4de6407727d8d313a55a77662
[ "MIT" ]
6,163
2015-09-03T07:43:30.000Z
2022-03-31T16:56:47.000Z
discord/iterators.py
squaresmile/discord.py
44d5bafa3d44a0b4de6407727d8d313a55a77662
[ "MIT" ]
6,761
2015-08-25T18:44:12.000Z
2022-03-31T16:45:38.000Z
""" The MIT License (MIT) Copyright (c) 2015-present Rapptz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merg...
34.746684
118
0.608802
from __future__ import annotations import asyncio import datetime from typing import Awaitable, TYPE_CHECKING, TypeVar, Optional, Any, Callable, Union, List, AsyncIterator from .errors import NoMoreItems from .utils import snowflake_time, time_snowflake, maybe_coroutine from .object import Object from .audit_logs im...
true
true
f725d592ba2435c4281618ab5b9e73df3f162b9f
4,779
py
Python
tests/test_moments.py
nextBillyonair/DPM
840ffaafe15c208b200b74094ffa8fe493b4c975
[ "MIT" ]
1
2021-07-20T14:02:55.000Z
2021-07-20T14:02:55.000Z
tests/test_moments.py
nextBillyonair/DPM
840ffaafe15c208b200b74094ffa8fe493b4c975
[ "MIT" ]
null
null
null
tests/test_moments.py
nextBillyonair/DPM
840ffaafe15c208b200b74094ffa8fe493b4c975
[ "MIT" ]
null
null
null
import pytest from dpm.distributions import * import dpm.utils as utils import torch def test_arcsine(): model = Arcsine() assert model.expectation == 0.5 assert model.median == 0.5 assert model.variance == 0.125 assert model.skewness == 0. assert model.kurtosis == -1.5 model = Arcsine(-1...
27.624277
96
0.628793
import pytest from dpm.distributions import * import dpm.utils as utils import torch def test_arcsine(): model = Arcsine() assert model.expectation == 0.5 assert model.median == 0.5 assert model.variance == 0.125 assert model.skewness == 0. assert model.kurtosis == -1.5 model = Arcsine(-1...
true
true
f725d77804443400285175fcae23883c61714c8f
2,450
py
Python
app.py
pythonpad/brython-runner-stdin-hanger
8ee3b13fba3ff2eabbaf39835b6aa9bd7692589d
[ "MIT" ]
1
2020-11-16T09:21:31.000Z
2020-11-16T09:21:31.000Z
app.py
pythonpad/brython-runner-stdin-hanger
8ee3b13fba3ff2eabbaf39835b6aa9bd7692589d
[ "MIT" ]
null
null
null
app.py
pythonpad/brython-runner-stdin-hanger
8ee3b13fba3ff2eabbaf39835b6aa9bd7692589d
[ "MIT" ]
null
null
null
import asyncio import sys import random import string from aiohttp import web def get_random_string(k=16): return ''.join(random.choices(string.ascii_lowercase + string.digits, k=k)) class Handler: def __init__(self): self.store = {} self.headers = {'Access-Control-Allow-Origin': '*'} as...
31.012658
79
0.579184
import asyncio import sys import random import string from aiohttp import web def get_random_string(k=16): return ''.join(random.choices(string.ascii_lowercase + string.digits, k=k)) class Handler: def __init__(self): self.store = {} self.headers = {'Access-Control-Allow-Origin': '*'} as...
true
true
f725d78e5277a65d26773130068149604e4a2536
15,850
py
Python
gs_quant/test/timeseries/test_datetime.py
skyquant2/gs-quant
b7e648fa7912b13ad1fd503b643389e34587aa1e
[ "Apache-2.0" ]
1
2021-06-28T06:43:42.000Z
2021-06-28T06:43:42.000Z
gs_quant/test/timeseries/test_datetime.py
skyquant2/gs-quant
b7e648fa7912b13ad1fd503b643389e34587aa1e
[ "Apache-2.0" ]
null
null
null
gs_quant/test/timeseries/test_datetime.py
skyquant2/gs-quant
b7e648fa7912b13ad1fd503b643389e34587aa1e
[ "Apache-2.0" ]
null
null
null
""" Copyright 2018 Goldman Sachs. 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 di...
34.835165
115
0.617603
import pytest from pandas.testing import assert_series_equal from gs_quant.timeseries.datetime import * def test_align(): dates1 = [ date(2019, 1, 1), date(2019, 1, 2), date(2019, 1, 3), date(2019, 1, 4), date(2019, 1, 5), ] dates2 = [ date(2019, 1, 2), ...
true
true
f725d794e1c2ea3a0dadaac39e0ba98d95db8820
11,101
py
Python
components/mpas-seaice/testing_and_setup/forcing/create_ocean_forcing.py
Fa-Li/E3SM
a91995093ec6fc0dd6e50114f3c70b5fb64de0f0
[ "zlib-acknowledgement", "FTL", "RSA-MD" ]
235
2018-04-23T16:30:06.000Z
2022-03-21T17:53:12.000Z
components/mpas-seaice/testing_and_setup/forcing/create_ocean_forcing.py
Fa-Li/E3SM
a91995093ec6fc0dd6e50114f3c70b5fb64de0f0
[ "zlib-acknowledgement", "FTL", "RSA-MD" ]
2,372
2018-04-20T18:12:34.000Z
2022-03-31T23:43:17.000Z
components/mpas-seaice/testing_and_setup/forcing/create_ocean_forcing.py
Fa-Li/E3SM
a91995093ec6fc0dd6e50114f3c70b5fb64de0f0
[ "zlib-acknowledgement", "FTL", "RSA-MD" ]
254
2018-04-20T20:43:32.000Z
2022-03-30T20:13:38.000Z
from __future__ import print_function from netCDF4 import Dataset import netCDF4 import numpy as np import os import sys import ConfigParser import math from scipy.interpolate import griddata from create_forcing import create_scrip_grid_file, get_mpas_grid_info, create_scrip_file_MPAS, write_scrip_in_file, create_outpu...
30.836111
155
0.602198
from __future__ import print_function from netCDF4 import Dataset import netCDF4 import numpy as np import os import sys import ConfigParser import math from scipy.interpolate import griddata from create_forcing import create_scrip_grid_file, get_mpas_grid_info, create_scrip_file_MPAS, write_scrip_in_file, create_outpu...
true
true
f725d7bce110226cd80cad4c972a9de2caa719fe
1,365
py
Python
hammerd/hammertests/hammertests_control_tp.py
emersion/chromiumos-platform2
ba71ad06f7ba52e922c647a8915ff852b2d4ebbd
[ "BSD-3-Clause" ]
5
2019-01-19T15:38:48.000Z
2021-10-06T03:59:46.000Z
hammerd/hammertests/hammertests_control_tp.py
emersion/chromiumos-platform2
ba71ad06f7ba52e922c647a8915ff852b2d4ebbd
[ "BSD-3-Clause" ]
null
null
null
hammerd/hammertests/hammertests_control_tp.py
emersion/chromiumos-platform2
ba71ad06f7ba52e922c647a8915ff852b2d4ebbd
[ "BSD-3-Clause" ]
1
2019-02-15T23:05:30.000Z
2019-02-15T23:05:30.000Z
#!/usr/bin/env python2 # Copyright 2018 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. '''Control file for the following tests rb_protection.py ''' from __future__ import print_function import os import shutil im...
29.673913
73
0.519414
from __future__ import print_function import os import shutil import sys def main(argv): if len(argv) > 0: sys.exit('Test takes no args!') iterations = 1 output_to_stdout = ' 2>&1 | tee ' python_prefix = 'python ' test_list = ['transfer_touchpad_works'] for test in test_list: logs_dir = 'l...
true
true
f725d8d28b3442d977bd49f6e51ed9adcdb15b84
698
py
Python
GMX_TEST/DIP/DIFF.py
leelasd/OPLS-AAM_for_Gromacs
50ff268525e9177e46175fdb122276c0045f1dab
[ "MIT" ]
6
2017-10-14T10:10:51.000Z
2020-12-11T15:19:39.000Z
GMX_TEST/DIP/DIFF.py
leelasd/OPLS-AAM_for_Gromacs
50ff268525e9177e46175fdb122276c0045f1dab
[ "MIT" ]
1
2019-06-18T20:37:23.000Z
2019-06-18T20:37:23.000Z
GMX_TEST/DIP/DIFF.py
leelasd/OPLS-AAM_for_Gromacs
50ff268525e9177e46175fdb122276c0045f1dab
[ "MIT" ]
3
2020-07-10T10:41:58.000Z
2021-11-14T19:30:05.000Z
import os from collections import OrderedDict import sys fil = open('energy.xvg').readlines() GMX_dat = [float(f)/4.184 for f in fil[-1].split()[1:-1]] nfil = open('LOG_NAMD').readlines() for line in nfil: if 'ENERGY: 200' in line: NAMD_DAT = [float(f) for f in line.split()[2:12]] print(NAMD_DAT) p...
36.736842
61
0.661891
import os from collections import OrderedDict import sys fil = open('energy.xvg').readlines() GMX_dat = [float(f)/4.184 for f in fil[-1].split()[1:-1]] nfil = open('LOG_NAMD').readlines() for line in nfil: if 'ENERGY: 200' in line: NAMD_DAT = [float(f) for f in line.split()[2:12]] print(NAMD_DAT) p...
true
true
f725d93f74485f2e2384998211087edd14cd10b4
1,223
py
Python
comment/serializers.py
vahidtwo/simpleSocialSite
40d971f04b7127811b7e277ddb3068fb451e9574
[ "MIT" ]
1
2020-05-16T16:14:51.000Z
2020-05-16T16:14:51.000Z
comment/serializers.py
vahidtwo/simpleSocialSite
40d971f04b7127811b7e277ddb3068fb451e9574
[ "MIT" ]
5
2021-03-18T23:21:18.000Z
2022-01-13T02:10:19.000Z
comment/serializers.py
vahidtwo/simpleSocialSite
40d971f04b7127811b7e277ddb3068fb451e9574
[ "MIT" ]
null
null
null
from django.db.models import Sum from rest_framework import serializers from like.models import Like from .models import Comment from accounts.serializers import UserSerializer class CommentSerializer(serializers.ModelSerializer): owner = UserSerializer(read_only=True) like = serializers.SerializerMethodField() d...
31.358974
100
0.739166
from django.db.models import Sum from rest_framework import serializers from like.models import Like from .models import Comment from accounts.serializers import UserSerializer class CommentSerializer(serializers.ModelSerializer): owner = UserSerializer(read_only=True) like = serializers.SerializerMethodField() d...
true
true
f725d9770174732322b6fe8380b521e22d1f1a54
5,699
py
Python
qa/rpc-tests/test_framework/socks5.py
kileer/monix
86525601d5915f380976c9d2e686ad7f66db991f
[ "MIT" ]
174
2018-01-16T13:26:52.000Z
2022-02-16T15:12:10.000Z
qa/rpc-tests/test_framework/socks5.py
kileer/monix
86525601d5915f380976c9d2e686ad7f66db991f
[ "MIT" ]
32
2018-01-25T03:42:01.000Z
2020-07-31T17:37:52.000Z
qa/rpc-tests/test_framework/socks5.py
kileer/monix
86525601d5915f380976c9d2e686ad7f66db991f
[ "MIT" ]
78
2017-05-26T15:23:40.000Z
2021-07-07T10:47:37.000Z
# Copyright (c) 2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Dummy Socks5 server for testing. ''' from __future__ import print_function, division, unicode_literals import socket, threading, Q...
35.397516
125
0.572732
from __future__ import print_function, division, unicode_literals import socket, threading, Queue import traceback, sys AddressType: IPV4 = 0x01 DOMAINNAME = 0x03 IPV6 = 0x04 ) while n > 0: d = s.recv(n) if not d: raise IOError('Unexpected end of stream') rv.ext...
true
true
f725d9b75a08ba36d8046190c73a204e849ad713
6,589
py
Python
clpipe/fmri_preprocess.py
keithcallenberg/clpipe
da1120bdcf820ba922c0a72792024007b232428c
[ "MIT" ]
10
2019-02-06T19:32:49.000Z
2022-02-01T20:41:05.000Z
clpipe/fmri_preprocess.py
keithcallenberg/clpipe
da1120bdcf820ba922c0a72792024007b232428c
[ "MIT" ]
96
2019-02-06T17:10:59.000Z
2022-03-30T19:08:49.000Z
clpipe/fmri_preprocess.py
keithcallenberg/clpipe
da1120bdcf820ba922c0a72792024007b232428c
[ "MIT" ]
6
2020-06-26T18:51:59.000Z
2021-09-16T06:55:04.000Z
import os import click import sys import logging from .batch_manager import BatchManager, Job from .config_json_parser import ClpipeConfigParser from .error_handler import exception_handler @click.command() @click.argument('subjects', nargs=-1, required=False, default=None) @click.option('-config_file', type=click.Pa...
59.9
184
0.682805
import os import click import sys import logging from .batch_manager import BatchManager, Job from .config_json_parser import ClpipeConfigParser from .error_handler import exception_handler @click.command() @click.argument('subjects', nargs=-1, required=False, default=None) @click.option('-config_file', type=click.Pa...
true
true
f725db44f7c222d549edd398c8d51bd4cea4c003
2,788
py
Python
db/tpl.py
iamaguoke/qiandao
a60b99ceb7c22a6dcec14621c00a4c1a7c02e940
[ "MIT" ]
40
2021-07-29T18:31:28.000Z
2022-03-28T12:56:11.000Z
db/tpl.py
iamaguoke/qiandao
a60b99ceb7c22a6dcec14621c00a4c1a7c02e940
[ "MIT" ]
35
2021-08-20T03:47:54.000Z
2022-02-26T12:36:11.000Z
db/tpl.py
iamaguoke/qiandao
a60b99ceb7c22a6dcec14621c00a4c1a7c02e940
[ "MIT" ]
12
2021-08-01T12:55:51.000Z
2022-03-19T11:11:48.000Z
#!/usr/bin/env python # -*- encoding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Binux<i@binux.me> # http://binux.me # Created on 2014-08-07 22:27:07 import time import config from .basedb import BaseDB class TPLDB(BaseDB): ''' tpl db id, userid, siteurl, sitename, banne...
36.207792
137
0.571019
import time import config from .basedb import BaseDB class TPLDB(BaseDB): __tablename__ = 'tpl' def __init__(self, host=config.mysql.host, port=config.mysql.port, database=config.mysql.database, user=config.mysql.user, passwd=config.mysql.passwd, auth_plugin=config.mysql.auth_plugin): ...
true
true
f725db70338fae233d3d7b81bce2649a1d1b3d56
1,745
py
Python
airflow/providers/google/cloud/example_dags/example_local_to_gcs.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
15,947
2019-01-05T13:51:02.000Z
2022-03-31T23:33:16.000Z
airflow/providers/google/cloud/example_dags/example_local_to_gcs.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
14,603
2019-01-05T09:43:19.000Z
2022-03-31T23:11:59.000Z
airflow/providers/google/cloud/example_dags/example_local_to_gcs.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
8,429
2019-01-05T19:45:47.000Z
2022-03-31T22:13:01.000Z
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
38.777778
99
0.773066
import os from airflow import models from airflow.providers.google.cloud.transfers.local_to_gcs import LocalFilesystemToGCSOperator from airflow.utils import dates BUCKET_NAME = os.environ.get('GCP_GCS_BUCKET', 'example-bucket-name') PATH_TO_UPLOAD_FILE = os.environ.get('GCP_GCS_PATH_TO_UPLOAD_FILE...
true
true
f725dc18c0de850fd97c348c18d72de36f535c2c
972
py
Python
main.py
minkowski0125/multilayer-gcn-simulation
15a4cd29d819246549148e3a32c99f3b8589f3b4
[ "MIT" ]
null
null
null
main.py
minkowski0125/multilayer-gcn-simulation
15a4cd29d819246549148e3a32c99f3b8589f3b4
[ "MIT" ]
null
null
null
main.py
minkowski0125/multilayer-gcn-simulation
15a4cd29d819246549148e3a32c99f3b8589f3b4
[ "MIT" ]
null
null
null
import json from utils import * from config import args from train import train from torch.utils.tensorboard import SummaryWriter if __name__ == '__main__': set_seed(args.seed) series = [] if args.dataset == 'pubmed': graphs, features, adjs, labels = load_pubmed_data({ 'deg_num': args....
30.375
182
0.609053
import json from utils import * from config import args from train import train from torch.utils.tensorboard import SummaryWriter if __name__ == '__main__': set_seed(args.seed) series = [] if args.dataset == 'pubmed': graphs, features, adjs, labels = load_pubmed_data({ 'deg_num': args....
true
true
f725dc7d2c733d4a8ac8fe71d0f7b4f4d8da1077
292
py
Python
camping_server2/bot/slackbot.py
solyourock/crawling_project
068525f299eb180d46f1537ee2a02648bbec61ec
[ "MIT" ]
null
null
null
camping_server2/bot/slackbot.py
solyourock/crawling_project
068525f299eb180d46f1537ee2a02648bbec61ec
[ "MIT" ]
null
null
null
camping_server2/bot/slackbot.py
solyourock/crawling_project
068525f299eb180d46f1537ee2a02648bbec61ec
[ "MIT" ]
null
null
null
import requests, json import camping_server2.config as config class IncomingWebhook: def send_msg(err_msg): payload = {"channel": "dss17", "username": "bot", "text": err_msg} response = requests.post(config.Config.WEBHOOK_URL, json.dumps(payload)) print(response)
36.5
80
0.69863
import requests, json import camping_server2.config as config class IncomingWebhook: def send_msg(err_msg): payload = {"channel": "dss17", "username": "bot", "text": err_msg} response = requests.post(config.Config.WEBHOOK_URL, json.dumps(payload)) print(response)
true
true
f725dcd14f6c8b71ba1fb843294a5688b1583471
26,344
py
Python
python/pyvw.py
alinabi/vowpal_wabbit
518513e2023676f060f045ddb751fc1a5e0b7eb2
[ "BSD-3-Clause" ]
1
2021-07-06T20:02:44.000Z
2021-07-06T20:02:44.000Z
python/pyvw.py
alinabi/vowpal_wabbit
518513e2023676f060f045ddb751fc1a5e0b7eb2
[ "BSD-3-Clause" ]
null
null
null
python/pyvw.py
alinabi/vowpal_wabbit
518513e2023676f060f045ddb751fc1a5e0b7eb2
[ "BSD-3-Clause" ]
null
null
null
import sys import pylibvw class SearchTask(): def __init__(self, vw, sch, num_actions): self.vw = vw self.sch = sch self.blank_line = self.vw.example("") self.blank_line.finish() self.bogus_example = self.vw.example("1 | x") def __del__(self): self.bogus_example...
43.186885
238
0.602984
import sys import pylibvw class SearchTask(): def __init__(self, vw, sch, num_actions): self.vw = vw self.sch = sch self.blank_line = self.vw.example("") self.blank_line.finish() self.bogus_example = self.vw.example("1 | x") def __del__(self): self.bogus_example...
true
true
f725dd2723a8f6af9c7f472d8dd8cc02232f81ab
5,239
py
Python
src/backend/tests/models/test_record_summarizer.py
Ark20/recordexpungPDX
2b76b3f5284e8ce572942cc58c9a4577442036fe
[ "MIT" ]
null
null
null
src/backend/tests/models/test_record_summarizer.py
Ark20/recordexpungPDX
2b76b3f5284e8ce572942cc58c9a4577442036fe
[ "MIT" ]
null
null
null
src/backend/tests/models/test_record_summarizer.py
Ark20/recordexpungPDX
2b76b3f5284e8ce572942cc58c9a4577442036fe
[ "MIT" ]
null
null
null
from expungeservice.models.disposition import DispositionCreator from expungeservice.record_merger import RecordMerger from expungeservice.record_summarizer import RecordSummarizer from expungeservice.expunger import Expunger from expungeservice.models.record import Record from tests.factories.case_factory import CaseF...
34.24183
118
0.564993
from expungeservice.models.disposition import DispositionCreator from expungeservice.record_merger import RecordMerger from expungeservice.record_summarizer import RecordSummarizer from expungeservice.expunger import Expunger from expungeservice.models.record import Record from tests.factories.case_factory import CaseF...
true
true
f725dd3b8236c64cc62c4c8f8e6178ceb94eea3c
32
py
Python
packages/w3af/w3af/plugins/tests/output/test_console.py
ZooAtmosphereGroup/HelloPackages
0ccffd33bf927b13d28c8f715ed35004c33465d9
[ "Apache-2.0" ]
3
2019-04-09T22:59:33.000Z
2019-06-14T09:23:24.000Z
tools/w3af/w3af/plugins/tests/output/test_console.py
sravani-m/Web-Application-Security-Framework
d9f71538f5cba6fe1d8eabcb26c557565472f6a6
[ "MIT" ]
null
null
null
tools/w3af/w3af/plugins/tests/output/test_console.py
sravani-m/Web-Application-Security-Framework
d9f71538f5cba6fe1d8eabcb26c557565472f6a6
[ "MIT" ]
null
null
null
""" @see: test_consoleui.py """
8
23
0.59375
true
true
f725dd3e3ae97ac6d8f564d676e5f24bde3c982a
486
py
Python
FileStorage/sf_file/urls.py
Thiefxt/FileStorage
db2882b2ea861f4412cb453edef6439501b13705
[ "MIT" ]
1
2020-07-15T10:02:40.000Z
2020-07-15T10:02:40.000Z
FileStorage/sf_file/urls.py
Thiefxt/FileStorage
db2882b2ea861f4412cb453edef6439501b13705
[ "MIT" ]
null
null
null
FileStorage/sf_file/urls.py
Thiefxt/FileStorage
db2882b2ea861f4412cb453edef6439501b13705
[ "MIT" ]
null
null
null
""" @Author : xiaotao @Email : 18773993654@163.com @Lost modifid : 2020/4/24 10:06 @Filename : urls.py @Description : @Software : PyCharm """ from django.urls import path from sf_file.views import file_management urlpatterns = [ path("test", file_management.Test.as_view()), ...
25.578947
114
0.520576
from django.urls import path from sf_file.views import file_management urlpatterns = [ path("test", file_management.Test.as_view()), path("upload", file_management.FileUpload.as_view()), ]
true
true
f725ddb7c782aa8c33226416d2d64b83c212aa9f
13,370
py
Python
cime/scripts/lib/CIME/XML/machines.py
cjvogl/E3SM
d8990bc2efda76b6f9096f989eed46bd3ab87463
[ "FTL", "zlib-acknowledgement", "RSA-MD" ]
1
2019-12-11T16:41:13.000Z
2019-12-11T16:41:13.000Z
cime/scripts/lib/CIME/XML/machines.py
cjvogl/E3SM
d8990bc2efda76b6f9096f989eed46bd3ab87463
[ "FTL", "zlib-acknowledgement", "RSA-MD" ]
null
null
null
cime/scripts/lib/CIME/XML/machines.py
cjvogl/E3SM
d8990bc2efda76b6f9096f989eed46bd3ab87463
[ "FTL", "zlib-acknowledgement", "RSA-MD" ]
null
null
null
""" Interface to the config_machines.xml file. This class inherits from GenericXML.py """ from CIME.XML.standard_module_setup import * from CIME.XML.generic_xml import GenericXML from CIME.XML.files import Files from CIME.utils import convert_to_unknown_type, get_cime_config import socket logger = logging.getLogger(...
37.55618
140
0.608153
from CIME.XML.standard_module_setup import * from CIME.XML.generic_xml import GenericXML from CIME.XML.files import Files from CIME.utils import convert_to_unknown_type, get_cime_config import socket logger = logging.getLogger(__name__) class Machines(GenericXML): def __init__(self, infile=None, files=None, mac...
true
true
f725df17ca09efe9699ffac94afdaac33246a3bd
2,794
py
Python
test/functional/rpc_invalidateblock.py
1185/starwels
48800688ae90318ac6ed74796dde42ac283484e9
[ "MIT" ]
null
null
null
test/functional/rpc_invalidateblock.py
1185/starwels
48800688ae90318ac6ed74796dde42ac283484e9
[ "MIT" ]
null
null
null
test/functional/rpc_invalidateblock.py
1185/starwels
48800688ae90318ac6ed74796dde42ac283484e9
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2019 The Starwels developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the invalidateblock RPC.""" from test_framework.test_framework import StarwelsTestFramework from test...
42.984615
100
0.659628
from test_framework.test_framework import StarwelsTestFramework from test_framework.util import * class InvalidateTest(StarwelsTestFramework): def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 3 def setup_network(self): self.setup_nodes() def run_test(...
true
true
f725dff5cb4fe0332ca1c2febb521e5f7662dff2
41,343
py
Python
xdl/third_party/seastar/configure.py
Ru-Xiang/x-deeplearning
04cc0497150920c64b06bb8c314ef89977a3427a
[ "Apache-2.0" ]
4,071
2018-12-13T04:17:38.000Z
2022-03-30T03:29:35.000Z
xdl/third_party/seastar/configure.py
laozhuang727/x-deeplearning
781545783a4e2bbbda48fc64318fb2c6d8bbb3cc
[ "Apache-2.0" ]
359
2018-12-21T01:14:57.000Z
2022-02-15T07:18:02.000Z
xdl/third_party/seastar/configure.py
laozhuang727/x-deeplearning
781545783a4e2bbbda48fc64318fb2c6d8bbb3cc
[ "Apache-2.0" ]
1,054
2018-12-20T09:57:42.000Z
2022-03-29T07:16:53.000Z
#!/usr/bin/env python3 # # This file is open source software, licensed to you under the terms # of the Apache License, Version 2.0 (the "License"). See the NOTICE file # distributed with this work for additional information regarding copyright # ownership. You may not use this file except in compliance with the Licen...
44.028754
411
0.596619
import os, os.path, textwrap, argparse, sys, shlex, subprocess, tempfile, re configure_args = str.join(' ', [shlex.quote(x) for x in sys.argv[1:]]) tempfile.tempdir = "./build/tmp" srcdir = os.getcwd() def get_flags(): with open('/proc/cpuinfo') as f: for line in f: if line...
true
true
f725e0913b22178375a220d288839fa6706545f3
520
py
Python
backend/utils/management/commands/generate_dummy_skills.py
NumanIbnMazid/numanibnmazid.com
905e3afab285316d88bafa30dc080dfbb0611731
[ "MIT" ]
1
2022-01-28T18:20:19.000Z
2022-01-28T18:20:19.000Z
backend/utils/management/commands/generate_dummy_skills.py
NumanIbnMazid/numanibnmazid.com
905e3afab285316d88bafa30dc080dfbb0611731
[ "MIT" ]
null
null
null
backend/utils/management/commands/generate_dummy_skills.py
NumanIbnMazid/numanibnmazid.com
905e3afab285316d88bafa30dc080dfbb0611731
[ "MIT" ]
null
null
null
from portfolios.factories.skill_factory import create_skills_with_factory from django.db import transaction from django.core.management.base import BaseCommand class Command(BaseCommand): help = "Generates dummy data" def _generate_dummy_data(self): # Create dummy data create_skills_with_fact...
26
73
0.698077
from portfolios.factories.skill_factory import create_skills_with_factory from django.db import transaction from django.core.management.base import BaseCommand class Command(BaseCommand): help = "Generates dummy data" def _generate_dummy_data(self): create_skills_with_factory( nu...
true
true
f725e110043f228bbfec7d077af9fa005de2f6e4
3,844
py
Python
api/applications/views/documents.py
django-doctor/lite-api
1ba278ba22ebcbb977dd7c31dd3701151cd036bf
[ "MIT" ]
null
null
null
api/applications/views/documents.py
django-doctor/lite-api
1ba278ba22ebcbb977dd7c31dd3701151cd036bf
[ "MIT" ]
null
null
null
api/applications/views/documents.py
django-doctor/lite-api
1ba278ba22ebcbb977dd7c31dd3701151cd036bf
[ "MIT" ]
null
null
null
from django.db import transaction from django.http import JsonResponse from rest_framework import status from rest_framework.views import APIView from api.applications.libraries.document_helpers import ( upload_application_document, delete_application_document, get_application_document, upload_goods_ty...
34.630631
120
0.751821
from django.db import transaction from django.http import JsonResponse from rest_framework import status from rest_framework.views import APIView from api.applications.libraries.document_helpers import ( upload_application_document, delete_application_document, get_application_document, upload_goods_ty...
true
true
f725e3b94ce4f481a86a65896844cc39a93fc830
14,044
py
Python
Blender_CamGen/update.py
Arne-Petersen/Plenoptic-Simulation
7ca4923eacef16f0282daa511680fb28735eecfa
[ "MIT" ]
28
2018-05-04T13:08:32.000Z
2022-03-10T10:42:17.000Z
Blender_CamGen/update.py
Arne-Petersen/Plenoptic-Simulation
7ca4923eacef16f0282daa511680fb28735eecfa
[ "MIT" ]
14
2020-01-14T10:04:38.000Z
2021-11-10T05:27:29.000Z
Blender_CamGen/update.py
Arne-Petersen/Plenoptic-Simulation
7ca4923eacef16f0282daa511680fb28735eecfa
[ "MIT" ]
10
2018-09-13T05:50:30.000Z
2021-05-18T10:19:58.000Z
import bpy import math import mathutils from os import listdir from os.path import isfile, join from . raytracer import sensor_position_for_distance from . import calc from . import create from . import data # ------------------------------------------------------------------------ # Helper functions # ---------...
48.09589
180
0.641698
import bpy import math import mathutils from os import listdir from os.path import isfile, join from . raytracer import sensor_position_for_distance from . import calc from . import create from . import data def find_items(self, context): if (not data.objective_list_created): lensfile...
true
true
f725e3d6c35a6ace2f3a7fec8105649f2c8fe230
928
py
Python
setup.py
datopian/ckanext-datajson
808b211ba50e681e3b146c76443c456262836d0f
[ "CC0-1.0" ]
7
2019-11-18T12:00:04.000Z
2020-04-23T16:50:05.000Z
setup.py
datopian/ckanext-datajson
808b211ba50e681e3b146c76443c456262836d0f
[ "CC0-1.0" ]
3
2019-12-19T17:24:14.000Z
2019-12-30T16:37:41.000Z
setup.py
datopian/ckanext-datajson
808b211ba50e681e3b146c76443c456262836d0f
[ "CC0-1.0" ]
2
2020-01-10T07:00:08.000Z
2020-01-11T17:17:51.000Z
from setuptools import setup, find_packages import sys, os version = '0.5.1' setup( name='ckanext-datajson', version=version, description="CKAN extension to generate /data.json", long_description="""\ """, classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers keywords='', a...
28.121212
90
0.755388
from setuptools import setup, find_packages import sys, os version = '0.5.1' setup( name='ckanext-datajson', version=version, description="CKAN extension to generate /data.json", long_description="""\ """, classifiers=[], keywords='', author='U.S. Department of Health & Human Services', author_email='', ur...
true
true
f725e4f38e778a0e50ae9528f3771e4a2929df2b
839
py
Python
examples/set_sample_name.py
Molmed/genologics
23d80bf67f6f376d218643f470e4f59c35301503
[ "MIT" ]
null
null
null
examples/set_sample_name.py
Molmed/genologics
23d80bf67f6f376d218643f470e4f59c35301503
[ "MIT" ]
2
2021-03-29T07:45:41.000Z
2021-04-07T11:07:13.000Z
examples/set_sample_name.py
Molmed/genologics
23d80bf67f6f376d218643f470e4f59c35301503
[ "MIT" ]
1
2017-12-01T09:47:48.000Z
2017-12-01T09:47:48.000Z
"""Python interface to GenoLogics LIMS via its REST API. Example usage: Set the name and a UDF of a sample. Per Kraulis, Science for Life Laboratory, Stockholm, Sweden. """ from genologics.lims import * # Login parameters for connecting to a LIMS instance. from genologics.config import BASEURI, USERNAME, PASSWORD...
26.21875
77
0.740167
from genologics.lims import * from genologics.config import BASEURI, USERNAME, PASSWORD lims = Lims(BASEURI, USERNAME, PASSWORD) lims.check_version() sample = Sample(lims, id='JGR58A21') print(sample, sample.name) sample.name = 'Joels extra-proper sample-20' sample.udf['Emmas field 2'] = 5 for key, value in l...
true
true
f725e59d66a1d6603562790280eee92932029c00
1,337
py
Python
data_preprocessing_scripts/preprocess.py
SatyaSiddharthDash/headlinegen
ec11cb4b4dd4e6dce553c787cf31670a83f1c650
[ "MIT" ]
null
null
null
data_preprocessing_scripts/preprocess.py
SatyaSiddharthDash/headlinegen
ec11cb4b4dd4e6dce553c787cf31670a83f1c650
[ "MIT" ]
null
null
null
data_preprocessing_scripts/preprocess.py
SatyaSiddharthDash/headlinegen
ec11cb4b4dd4e6dce553c787cf31670a83f1c650
[ "MIT" ]
null
null
null
import pandas as pd from sklearn.model_selection import train_test_split random_state = 100 data = pd.read_csv("~/headlinegen/data/nytime_front_page.csv") data['title'] = data['title'].apply(lambda x: ' '.join(x.split(' ')[:-5])) lens = data["content"].apply(lambda x: len(x.split(" "))).nlargest(10) print( f'm...
38.2
98
0.562453
import pandas as pd from sklearn.model_selection import train_test_split random_state = 100 data = pd.read_csv("~/headlinegen/data/nytime_front_page.csv") data['title'] = data['title'].apply(lambda x: ' '.join(x.split(' ')[:-5])) lens = data["content"].apply(lambda x: len(x.split(" "))).nlargest(10) print( f'm...
true
true
f725e5b14deab24e3329989fdf04feb3afb579fb
6,848
py
Python
tests/test_pg_connect.py
ktechboston/db_utils
b6e7787be832a79fc21ec63aa0860a50871cc227
[ "MIT" ]
1
2019-07-20T01:43:02.000Z
2019-07-20T01:43:02.000Z
tests/test_pg_connect.py
ktechboston/db_utils
b6e7787be832a79fc21ec63aa0860a50871cc227
[ "MIT" ]
5
2019-07-15T14:21:28.000Z
2019-07-24T20:09:25.000Z
tests/test_pg_connect.py
ktechboston/db_utils
b6e7787be832a79fc21ec63aa0860a50871cc227
[ "MIT" ]
1
2019-06-24T02:29:55.000Z
2019-06-24T02:29:55.000Z
import unittest import sys import os import csv import psycopg2 from pprint import pprint sys.path.insert(0, '..') from db_utils.pg_connect import pg_connect config_file = 'databases.conf' db = pg_connect('postgres', config_file) table = 'test_table' class test_pg_connect(unittest.TestCase): def setUp(self): ...
28.297521
120
0.580169
import unittest import sys import os import csv import psycopg2 from pprint import pprint sys.path.insert(0, '..') from db_utils.pg_connect import pg_connect config_file = 'databases.conf' db = pg_connect('postgres', config_file) table = 'test_table' class test_pg_connect(unittest.TestCase): def setUp(self): ...
true
true
f725e6c764dab91197ce2e121ea19b4508af987d
8,933
py
Python
stlearn/tools/microenv/cci/base_grouping.py
duypham2108/stLearn
91b6bae91b29aba8b4f055bf92da13f1558ddbe8
[ "BSD-3-Clause" ]
null
null
null
stlearn/tools/microenv/cci/base_grouping.py
duypham2108/stLearn
91b6bae91b29aba8b4f055bf92da13f1558ddbe8
[ "BSD-3-Clause" ]
null
null
null
stlearn/tools/microenv/cci/base_grouping.py
duypham2108/stLearn
91b6bae91b29aba8b4f055bf92da13f1558ddbe8
[ "BSD-3-Clause" ]
1
2019-12-12T12:46:55.000Z
2019-12-12T12:46:55.000Z
""" Performs LR analysis by grouping LR pairs which having hotspots across similar tissues. """ from stlearn.pl import het_plot from sklearn.cluster import DBSCAN, AgglomerativeClustering from anndata import AnnData from tqdm import tqdm import numpy as np import pandas as pd import matplotlib.pyplot as plt import...
33.085185
175
0.614799
from stlearn.pl import het_plot from sklearn.cluster import DBSCAN, AgglomerativeClustering from anndata import AnnData from tqdm import tqdm import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sb def get_hotspots( adata: AnnData, lr_scores: np.ndarray, lrs: np.array,...
true
true
f725e6deed60db8da5ead0d23368ad990e104030
5,821
py
Python
tf_agents/bandits/agents/utils_test.py
MarkDaoust/agents
00ddf75a8a35a26a03a9323b78d95c06211b5b3f
[ "Apache-2.0" ]
null
null
null
tf_agents/bandits/agents/utils_test.py
MarkDaoust/agents
00ddf75a8a35a26a03a9323b78d95c06211b5b3f
[ "Apache-2.0" ]
null
null
null
tf_agents/bandits/agents/utils_test.py
MarkDaoust/agents
00ddf75a8a35a26a03a9323b78d95c06211b5b3f
[ "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...
38.045752
79
0.695585
from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl.testing import parameterized import numpy as np import tensorflow as tf import tensorflow_probability as tfp from tf_agents.bandits.agents import utils from tf_agents.specs import t...
true
true
f725e6fdee776868b7306032eb1649135fbb2a82
1,471
py
Python
migrations/versions/5bc9e9b6c3ff_unify_local_and_remote_int8.py
apaniukov/workbench
2f2653ecfd0143d2d53e33ad84379f13443fdfaa
[ "Apache-2.0" ]
23
2022-03-17T12:24:09.000Z
2022-03-31T09:13:30.000Z
migrations/versions/5bc9e9b6c3ff_unify_local_and_remote_int8.py
apaniukov/workbench
2f2653ecfd0143d2d53e33ad84379f13443fdfaa
[ "Apache-2.0" ]
18
2022-03-21T08:17:44.000Z
2022-03-30T12:42:30.000Z
migrations/versions/5bc9e9b6c3ff_unify_local_and_remote_int8.py
apaniukov/workbench
2f2653ecfd0143d2d53e33ad84379f13443fdfaa
[ "Apache-2.0" ]
16
2022-03-17T12:24:14.000Z
2022-03-31T12:15:12.000Z
"""Unify local and remote int8 Revision ID: 5bc9e9b6c3ff Revises: 7f3c818591e1 Create Date: 2021-03-29 15:28:58.945918 """ """ OpenVINO DL Workbench Migration: Unify local and remote int8 Copyright (c) 2021 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this ...
28.843137
73
0.734194
from alembic import op import sqlalchemy as sa revision = '5bc9e9b6c3ff' down_revision = '7f3c818591e1' branch_labels = None depends_on = None def upgrade(): sa.PrimaryKeyConstraint('job_id') )
true
true
f725e78ae37c1db3941ba4ddd91efca669d47928
1,424
py
Python
backend/users/models.py
crowdbotics-apps/flightlevel36zero-31803
6c81d2e9394440810c1a5561752a452619388c10
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/users/models.py
crowdbotics-apps/flightlevel36zero-31803
6c81d2e9394440810c1a5561752a452619388c10
[ "FTL", "AML", "RSA-MD" ]
38
2021-09-11T01:00:31.000Z
2021-12-05T17:43:03.000Z
backend/users/models.py
crowdbotics-apps/natures-cornucopia-30308
847053dad41bda7122bc15710e0e9e2bf89d6882
[ "FTL", "AML", "RSA-MD" ]
null
null
null
from django.conf import settings from django.contrib.auth.models import AbstractUser from django.db import models from django.urls import reverse from django.utils.translation import ugettext_lazy as _ class User(AbstractUser): # WARNING! """ Some officially supported features of Crowdbotics Dashboard dep...
27.921569
85
0.665028
from django.conf import settings from django.contrib.auth.models import AbstractUser from django.db import models from django.urls import reverse from django.utils.translation import ugettext_lazy as _ class User(AbstractUser): name = models.CharField( null=True, blank=True, max_lengt...
true
true
f725e948ab21699d629dd278dd83cd81a9a7c910
3,205
py
Python
hddcoin/types/weight_proof.py
JakubSido/hddcoin-blockchain
7b9da03edee3512295c0f142c07c4759512ccbca
[ "Apache-2.0" ]
37
2021-07-08T23:42:01.000Z
2022-03-26T21:30:10.000Z
hddcoin/types/weight_proof.py
JakubSido/hddcoin-blockchain
7b9da03edee3512295c0f142c07c4759512ccbca
[ "Apache-2.0" ]
13
2021-07-11T15:12:01.000Z
2022-03-15T08:36:18.000Z
hddcoin/types/weight_proof.py
JakubSido/hddcoin-blockchain
7b9da03edee3512295c0f142c07c4759512ccbca
[ "Apache-2.0" ]
19
2021-07-10T14:09:07.000Z
2022-03-14T11:17:05.000Z
from dataclasses import dataclass from typing import List, Optional from hddcoin.types.blockchain_format.proof_of_space import ProofOfSpace from hddcoin.types.blockchain_format.reward_chain_block import RewardChainBlock from hddcoin.types.blockchain_format.sized_bytes import bytes32 from hddcoin.types.blockchain_forma...
31.116505
95
0.737285
from dataclasses import dataclass from typing import List, Optional from hddcoin.types.blockchain_format.proof_of_space import ProofOfSpace from hddcoin.types.blockchain_format.reward_chain_block import RewardChainBlock from hddcoin.types.blockchain_format.sized_bytes import bytes32 from hddcoin.types.blockchain_forma...
true
true
f725e98002e1d4f074db4ac84131dc56e48d490e
395
py
Python
WalletSystem/walletApp/helpers.py
BakrFrag/Wallet-System
cc4a1114bc0811ef198ae5bc5689cb8696270e91
[ "MIT" ]
null
null
null
WalletSystem/walletApp/helpers.py
BakrFrag/Wallet-System
cc4a1114bc0811ef198ae5bc5689cb8696270e91
[ "MIT" ]
null
null
null
WalletSystem/walletApp/helpers.py
BakrFrag/Wallet-System
cc4a1114bc0811ef198ae5bc5689cb8696270e91
[ "MIT" ]
null
null
null
from .models import Wallet; from django.core.exceptions import ObjectDoesNotExist def getWallet(phone_number): """ helper function check if wallet with phone number exists or not """ try: walletobj=Wallet.objects.get(phone=phone_number); return {"exists":True,"wallet":walletobj} exce...
35.909091
67
0.701266
from .models import Wallet; from django.core.exceptions import ObjectDoesNotExist def getWallet(phone_number): try: walletobj=Wallet.objects.get(phone=phone_number); return {"exists":True,"wallet":walletobj} except Wallet.DoesNotExist as E: return {"exists":False,"wallet":None};
true
true
f725e992c7f42887faa027f5696991c0ea53be19
1,092
py
Python
inv/models/modelmapping.py
xUndero/noc
9fb34627721149fcf7064860bd63887e38849131
[ "BSD-3-Clause" ]
1
2019-09-20T09:36:48.000Z
2019-09-20T09:36:48.000Z
inv/models/modelmapping.py
ewwwcha/noc
aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb
[ "BSD-3-Clause" ]
null
null
null
inv/models/modelmapping.py
ewwwcha/noc
aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # --------------------------------------------------------------------- # ModelMapping model # --------------------------------------------------------------------- # Copyright (C) 2007-2019 The NOC Project # See LICENSE for details # -------------------------------------------------------------...
33.090909
91
0.591575
from mongoengine.document import Document from mongoengine.fields import StringField, BooleanField from noc.inv.models.objectmodel import ObjectModel from noc.core.mongo.fields import PlainReferenceField class ModelMapping(Document): meta = {"collection": "noc.modelmappings", "strict": False, "auto_cre...
true
true
f725e9ad0a9d9b3dd8993d5832c9cd8a2351f823
78,589
py
Python
sdk/python/pulumi_azure_native/synapse/v20190601preview/_inputs.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/synapse/v20190601preview/_inputs.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/synapse/v20190601preview/_inputs.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
# 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, overload from ... import _utilities fro...
39.099005
247
0.663935
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from ._enums import * __all__ = [ 'AutoPausePropertiesArgs', 'AutoScalePropertiesArgs', 'CmdkeySetupArgs', 'ComponentSetupArgs', 'CustomerManagedKe...
true
true
f725e9edf7e34a8ae2a8f7d0c50a703b007c2913
26,732
py
Python
EZclim/user_entry.py
msc-acse/acse-9-independent-research-project-AdannaAkwats
3a46de2e95b35ef095d2376e7237fad14e058b3e
[ "MIT" ]
null
null
null
EZclim/user_entry.py
msc-acse/acse-9-independent-research-project-AdannaAkwats
3a46de2e95b35ef095d2376e7237fad14e058b3e
[ "MIT" ]
null
null
null
EZclim/user_entry.py
msc-acse/acse-9-independent-research-project-AdannaAkwats
3a46de2e95b35ef095d2376e7237fad14e058b3e
[ "MIT" ]
5
2019-06-21T16:14:28.000Z
2021-01-22T07:53:54.000Z
""" Created by Adanna Akwataghibe (Github: AdannaAkwats) """ import argparse from calendar import monthrange from Extract import * from Analysis import * from WriteOutput import * from plots import * from utils import check_valid_order, check_analysis, check_variables_covary, print_end_statement from calculate_indices ...
46.734266
189
0.567111
import argparse from calendar import monthrange from Extract import * from Analysis import * from WriteOutput import * from plots import * from utils import check_valid_order, check_analysis, check_variables_covary, print_end_statement from calculate_indices import * from file_entry import file_entry from ProgressBar i...
true
true
f725eaa93df16bb582f142e4fc6adc97b25e4daf
15,232
py
Python
neutron/services/segments/db.py
knodir/neutron
ac4e28478ac8a8a0c9f5c5785f6a6bcf532c66b8
[ "Apache-2.0" ]
null
null
null
neutron/services/segments/db.py
knodir/neutron
ac4e28478ac8a8a0c9f5c5785f6a6bcf532c66b8
[ "Apache-2.0" ]
5
2019-08-14T06:46:03.000Z
2021-12-13T20:01:25.000Z
neutron/services/segments/db.py
knodir/neutron
ac4e28478ac8a8a0c9f5c5785f6a6bcf532c66b8
[ "Apache-2.0" ]
2
2020-03-15T01:24:15.000Z
2020-07-22T20:34:26.000Z
# Copyright 2016 Hewlett Packard Enterprise Development, LP # # 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/LICENS...
42.311111
79
0.66787
from neutron_lib.callbacks import events from neutron_lib.callbacks import registry from neutron_lib.callbacks import resources from neutron_lib import constants from neutron_lib.db import api as db_api from neutron_lib.db import resource_extend from neutron_lib.db import utils as db_utils from neutron_...
true
true
f725eaff0d679e4b23a48f9e1c42ebd9f7f1365b
8,673
py
Python
cairis/test/test_GoalAPI.py
RAIJ95/https-github.com-failys-cairis
86601347ea016f4a3f90b6942093d63e91de5f74
[ "Apache-2.0" ]
null
null
null
cairis/test/test_GoalAPI.py
RAIJ95/https-github.com-failys-cairis
86601347ea016f4a3f90b6942093d63e91de5f74
[ "Apache-2.0" ]
null
null
null
cairis/test/test_GoalAPI.py
RAIJ95/https-github.com-failys-cairis
86601347ea016f4a3f90b6942093d63e91de5f74
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may...
38.71875
152
0.684769
import logging from urllib import quote import jsonpickle from cairis.core.Goal import Goal from cairis.core.GoalEnvironmentProperties import GoalEnvironmentProperties from cairis.test.CairisDaemonTestCase import CairisDaemonTestCase import os from cairis.mio.ModelImport import importModelFile __auth...
true
true
f725eb967997a72b04e8458957fc69f1e97cbee0
24,951
py
Python
osf/models/registrations.py
mattclark/osf.io
7a362ceb6af3393d3d0423aafef336ee13277303
[ "Apache-2.0" ]
null
null
null
osf/models/registrations.py
mattclark/osf.io
7a362ceb6af3393d3d0423aafef336ee13277303
[ "Apache-2.0" ]
null
null
null
osf/models/registrations.py
mattclark/osf.io
7a362ceb6af3393d3d0423aafef336ee13277303
[ "Apache-2.0" ]
null
null
null
import logging import datetime import urlparse from django.core.exceptions import ValidationError from django.db import models from django.utils import timezone from framework.auth import Auth from framework.exceptions import PermissionsError from osf.utils.fields import NonNaiveDateTimeField from osf.exceptions impo...
37.633484
164
0.624945
import logging import datetime import urlparse from django.core.exceptions import ValidationError from django.db import models from django.utils import timezone from framework.auth import Auth from framework.exceptions import PermissionsError from osf.utils.fields import NonNaiveDateTimeField from osf.exceptions impo...
true
true
f725ebb2af351289e10da0b9ff19a8676765fe30
2,020
py
Python
dask/dataframe/tests/test_hashing.py
abhinavralhan/dask
e840ba38eadfa93c3b9959347f0a43c1279a94ab
[ "BSD-3-Clause" ]
2
2018-12-29T13:47:40.000Z
2018-12-29T13:47:49.000Z
dask/dataframe/tests/test_hashing.py
abhinavralhan/dask
e840ba38eadfa93c3b9959347f0a43c1279a94ab
[ "BSD-3-Clause" ]
2
2019-03-19T22:19:04.000Z
2019-03-26T19:04:00.000Z
dask/dataframe/tests/test_hashing.py
abhinavralhan/dask
e840ba38eadfa93c3b9959347f0a43c1279a94ab
[ "BSD-3-Clause" ]
1
2021-03-28T04:50:43.000Z
2021-03-28T04:50:43.000Z
import numpy as np import pandas as pd import pandas.util.testing as tm import pytest from dask.dataframe.hashing import hash_pandas_object from dask.dataframe.utils import assert_eq @pytest.mark.parametrize('obj', [ pd.Series([1, 2, 3]), pd.Series([1.0, 1.5, 3.2]), pd.Series([1.0, 1.5, 3.2], index=[1.5...
34.827586
79
0.637129
import numpy as np import pandas as pd import pandas.util.testing as tm import pytest from dask.dataframe.hashing import hash_pandas_object from dask.dataframe.utils import assert_eq @pytest.mark.parametrize('obj', [ pd.Series([1, 2, 3]), pd.Series([1.0, 1.5, 3.2]), pd.Series([1.0, 1.5, 3.2], index=[1.5...
true
true
f725ebe4a0002cf0ad0cfd933670021232062f21
2,166
py
Python
dataset_processing.py
alechfho/dog_breed
2e2f7083c859fdb250f5ba920246b9d2f8168b4d
[ "Apache-2.0" ]
null
null
null
dataset_processing.py
alechfho/dog_breed
2e2f7083c859fdb250f5ba920246b9d2f8168b4d
[ "Apache-2.0" ]
null
null
null
dataset_processing.py
alechfho/dog_breed
2e2f7083c859fdb250f5ba920246b9d2f8168b4d
[ "Apache-2.0" ]
null
null
null
import numpy as np import pandas as pd def partition_images(df_labels, identifier_label=None, label_postfix='postfix', target_dir='./', filter_identity=[], dev_portion=0.20, encoding_strategy='vgg19_4096'): if np.size(filter_identity) == 0: filter_identity = df_labels[identifier_label...
47.086957
120
0.72807
import numpy as np import pandas as pd def partition_images(df_labels, identifier_label=None, label_postfix='postfix', target_dir='./', filter_identity=[], dev_portion=0.20, encoding_strategy='vgg19_4096'): if np.size(filter_identity) == 0: filter_identity = df_labels[identifier_label...
true
true
f725ec3baf077b8402ef54fa4ab3be9010a6ff8a
6,686
py
Python
ical_fusion.py
octogene/icalfusion
3c00762d7d9353ed65109deef001cb7ba94051d1
[ "MIT" ]
null
null
null
ical_fusion.py
octogene/icalfusion
3c00762d7d9353ed65109deef001cb7ba94051d1
[ "MIT" ]
null
null
null
ical_fusion.py
octogene/icalfusion
3c00762d7d9353ed65109deef001cb7ba94051d1
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2017 Bogdan Cordier # # Distributed under terms of the MIT license. import datetime from icalendar import Calendar from pytz import timezone from dateutil.parser import parse from tkinter import Tk, filedialog, Listbox, Button, Entry, Str...
36.939227
78
0.551152
import datetime from icalendar import Calendar from pytz import timezone from dateutil.parser import parse from tkinter import Tk, filedialog, Listbox, Button, Entry, StringVar, \ LabelFrame, BooleanVar, Frame, ttk, END, Checkbutton, messagebox local_timezone = timezone('Europe/Paris') ical_fields = ('SUMM...
true
true
f725ecc93cfb05f785f6599c6384eea2e2c02e46
7,910
py
Python
utilbox/string_utils/string_utils.py
jensonjose/utilbox
f47ac1c97fdd3f7caf8ea1c6b693ea115076f0e8
[ "MIT" ]
1
2017-07-08T17:59:09.000Z
2017-07-08T17:59:09.000Z
utilbox/string_utils/string_utils.py
jensonjose/utilbox
f47ac1c97fdd3f7caf8ea1c6b693ea115076f0e8
[ "MIT" ]
1
2017-08-12T13:51:37.000Z
2017-08-12T13:51:37.000Z
utilbox/string_utils/string_utils.py
jensonjose/utilbox
f47ac1c97fdd3f7caf8ea1c6b693ea115076f0e8
[ "MIT" ]
1
2018-10-27T06:13:22.000Z
2018-10-27T06:13:22.000Z
""" Utility module to manipulate strings. """ import re import types __author__ = "Jenson Jose" __email__ = "jensonjose@live.in" __status__ = "Alpha" class StringUtils: """ Utility class containing methods for manipulation of strings. """ def __init__(self): pass @staticmethod def ...
27.465278
110
0.594817
import re import types __author__ = "Jenson Jose" __email__ = "jensonjose@live.in" __status__ = "Alpha" class StringUtils: def __init__(self): pass @staticmethod def is_blank(string): if string.strip(): return False return True @staticmethod def join_list...
true
true
f725eecf105d6cb129a87a1af62fe37c37cb459b
2,613
py
Python
heppyplot/plot_helpers.py
ebothmann/heppyplot
dab969879391f70a91c34f71482a9691b9c80141
[ "MIT" ]
null
null
null
heppyplot/plot_helpers.py
ebothmann/heppyplot
dab969879391f70a91c34f71482a9691b9c80141
[ "MIT" ]
null
null
null
heppyplot/plot_helpers.py
ebothmann/heppyplot
dab969879391f70a91c34f71482a9691b9c80141
[ "MIT" ]
null
null
null
import math import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import matplotlib.transforms as mtransforms from mpl_toolkits.axes_grid.anchored_artists import AnchoredText def setup_axes(diff=False): fig = plt.figure() axes = [] if diff: gs = gridspec.GridSpec(2, 1, height_rati...
37.328571
95
0.643705
import math import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import matplotlib.transforms as mtransforms from mpl_toolkits.axes_grid.anchored_artists import AnchoredText def setup_axes(diff=False): fig = plt.figure() axes = [] if diff: gs = gridspec.GridSpec(2, 1, height_rati...
true
true
f725efcbce1ccf39d91c665102551ed46f4594c4
187
py
Python
Introduction_to_python/Module 2 Code Files/greater_than_exercise.py
leogithubid/data-analysis-using-python
531e4fb3a05393c94979b5c571cda0f107cb5030
[ "MIT" ]
null
null
null
Introduction_to_python/Module 2 Code Files/greater_than_exercise.py
leogithubid/data-analysis-using-python
531e4fb3a05393c94979b5c571cda0f107cb5030
[ "MIT" ]
null
null
null
Introduction_to_python/Module 2 Code Files/greater_than_exercise.py
leogithubid/data-analysis-using-python
531e4fb3a05393c94979b5c571cda0f107cb5030
[ "MIT" ]
null
null
null
def greater_than(x, y): if x > y: return True else: return False a = 2 b = 3 result = greater_than(a, b) print("{} is greater than {}: {}".format(a, b, result))
15.583333
55
0.545455
def greater_than(x, y): if x > y: return True else: return False a = 2 b = 3 result = greater_than(a, b) print("{} is greater than {}: {}".format(a, b, result))
true
true
f725f033c68129465884ebe3416f353fef5cfe99
1,048
py
Python
habitat/food/models/tag.py
matrach/habitatOS
1ae2a3caf6f279cf6d6d20bcd81f24d50f61d7d3
[ "MIT" ]
1
2021-02-01T19:04:39.000Z
2021-02-01T19:04:39.000Z
habitat/food/models/tag.py
matrach/habitatOS
1ae2a3caf6f279cf6d6d20bcd81f24d50f61d7d3
[ "MIT" ]
null
null
null
habitat/food/models/tag.py
matrach/habitatOS
1ae2a3caf6f279cf6d6d20bcd81f24d50f61d7d3
[ "MIT" ]
null
null
null
from django.contrib import admin from django.db import models from django.utils.text import slugify from django.utils.translation import ugettext_lazy as _ class Tag(models.Model): TYPE_CHOICES = [ ('product', _('Product')), ('plan', _('Plan')), ('meal', _('Meal')), ] name = model...
29.942857
107
0.623092
from django.contrib import admin from django.db import models from django.utils.text import slugify from django.utils.translation import ugettext_lazy as _ class Tag(models.Model): TYPE_CHOICES = [ ('product', _('Product')), ('plan', _('Plan')), ('meal', _('Meal')), ] name = model...
true
true
f725f048c2db89cfc4013eb72273fee66ea06245
835
py
Python
examples/beginner/limits_examples.py
msgoff/sympy
1e7daef7514902f5e89718fa957b7b36c6669a10
[ "BSD-3-Clause" ]
null
null
null
examples/beginner/limits_examples.py
msgoff/sympy
1e7daef7514902f5e89718fa957b7b36c6669a10
[ "BSD-3-Clause" ]
null
null
null
examples/beginner/limits_examples.py
msgoff/sympy
1e7daef7514902f5e89718fa957b7b36c6669a10
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python """Limits Example Demonstrates limits. """ from sympy import exp, log, Symbol, Rational, sin, limit, sqrt, oo def sqrt3(x): return x ** Rational(1, 3) def show(computed, correct): print("computed:", computed, "correct:", correct) def main(): x = Symbol("x") show(limit(sqr...
20.365854
70
0.534132
from sympy import exp, log, Symbol, Rational, sin, limit, sqrt, oo def sqrt3(x): return x ** Rational(1, 3) def show(computed, correct): print("computed:", computed, "correct:", correct) def main(): x = Symbol("x") show(limit(sqrt(x ** 2 - 5 * x + 6) - x, x, oo), -Rational(5) / 2) show(li...
true
true
f725f160fe888789fd6fe5f15c095f239fd5e3ba
4,182
py
Python
tests/service_test.py
drmobile/pubsub-broker
e5bfface5be95b667a124ac3e47b6683ee25888c
[ "Apache-2.0" ]
1
2020-11-13T16:04:04.000Z
2020-11-13T16:04:04.000Z
tests/service_test.py
drmobile/pubsub-broker
e5bfface5be95b667a124ac3e47b6683ee25888c
[ "Apache-2.0" ]
3
2018-07-20T09:38:56.000Z
2018-12-25T06:18:29.000Z
tests/service_test.py
drmobile/pubsub-broker
e5bfface5be95b667a124ac3e47b6683ee25888c
[ "Apache-2.0" ]
3
2018-04-10T10:37:27.000Z
2018-12-25T06:05:19.000Z
# coding=utf-8 # import time import copy import pytest import logging import unittest import threading import concurrent.futures from multiprocessing import Manager from soocii_pubsub_lib import pubsub_client, sub_service # ========== Initial Logger ========== logging.basicConfig( level=logging.DEBUG, format=...
38.018182
146
0.662602
import time import copy import pytest import logging import unittest import threading import concurrent.futures from multiprocessing import Manager from soocii_pubsub_lib import pubsub_client, sub_service logging.basicConfig( level=logging.DEBUG, format='[%(asctime)-15s][%(thread)d][%(levelname)-5s][%(file...
true
true
f725f1c930f026fc5ad6709114adb3ed8d9d5763
23,200
py
Python
examples/tensorflow/text-classification/run_text_classification.py
SeanNaren/transformers
8d43c71a1ca3ad322cc45008eb66a5611f1e017e
[ "Apache-2.0" ]
1
2021-04-10T07:59:12.000Z
2021-04-10T07:59:12.000Z
examples/tensorflow/text-classification/run_text_classification.py
SeanNaren/transformers
8d43c71a1ca3ad322cc45008eb66a5611f1e017e
[ "Apache-2.0" ]
null
null
null
examples/tensorflow/text-classification/run_text_classification.py
SeanNaren/transformers
8d43c71a1ca3ad322cc45008eb66a5611f1e017e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # coding=utf-8 # Copyright 2021 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/LI...
43.122677
121
0.671078
import logging import os import random import sys from dataclasses import dataclass, field from math import ceil from pathlib import Path from typing import Optional import numpy as np from datasets import load_dataset from transformers import ( AutoConfig, AutoTokenizer, HfArgumentParser...
true
true
f725f1eac8da74b8562cac6b78cc781c40c19706
4,237
py
Python
szkriptek/tag_postproc.py
vadno/korkor_pilot
8805f3a6a1145420f112d4c1ce95538c698d41ef
[ "CC-BY-4.0" ]
2
2020-09-30T19:25:10.000Z
2021-11-03T20:23:31.000Z
szkriptek/tag_postproc.py
vadno/korkor_pilot
8805f3a6a1145420f112d4c1ce95538c698d41ef
[ "CC-BY-4.0" ]
null
null
null
szkriptek/tag_postproc.py
vadno/korkor_pilot
8805f3a6a1145420f112d4c1ce95538c698d41ef
[ "CC-BY-4.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # author: Vadász Noémi # created: 2019/03/28 # feldolgozza a google spreadsheetsben annotált, előtte emtsv-vel elemzett korpuszfájlt # bemenet # csv (google spreadsheetsből importált) # token, összes elemzés, tő, részletes címke, tag, helyes, javított tő, tokenizálás, ja...
26.987261
111
0.509559
import csv import sys def read_file(): empty_line = dict() empty_line['string'] = '' lines = list() newtoken = dict() reader = csv.reader(sys.stdin) next(reader) for line in reader: if line[0] or line[7] == 'token beszúr': ...
true
true
f725f2459a905256eb3220d58ce2d66c8bceeae6
66,037
py
Python
zerver/lib/events.py
nipunn1313/zulip
35f9ed6ebe28c7d66e8a62b2c235f19ad0f44a0b
[ "Apache-2.0" ]
1
2021-06-25T18:10:20.000Z
2021-06-25T18:10:20.000Z
zerver/lib/events.py
nipunn1313/zulip
35f9ed6ebe28c7d66e8a62b2c235f19ad0f44a0b
[ "Apache-2.0" ]
10
2021-11-15T17:53:29.000Z
2022-02-27T13:51:47.000Z
zerver/lib/events.py
nipunn1313/zulip
35f9ed6ebe28c7d66e8a62b2c235f19ad0f44a0b
[ "Apache-2.0" ]
1
2021-11-30T08:00:26.000Z
2021-11-30T08:00:26.000Z
# See https://zulip.readthedocs.io/en/latest/subsystems/events-system.html for # high-level documentation on how this system works. import copy import time from typing import Any, Callable, Collection, Dict, Iterable, Optional, Sequence, Set from django.conf import settings from django.utils.translation import gettext...
45.292867
100
0.616124
import copy import time from typing import Any, Callable, Collection, Dict, Iterable, Optional, Sequence, Set from django.conf import settings from django.utils.translation import gettext as _ from version import API_FEATURE_LEVEL, ZULIP_MERGE_BASE, ZULIP_VERSION from zerver.lib.actions import ( default_stream_...
true
true
f725f33a4ea17ac202a72b0756189315bf8f2eb2
191
py
Python
text2speech.py
sumit169-hub/text-to-speech
589dd36f95abf216676c0ac12a522f2deb70a4db
[ "BSL-1.0" ]
null
null
null
text2speech.py
sumit169-hub/text-to-speech
589dd36f95abf216676c0ac12a522f2deb70a4db
[ "BSL-1.0" ]
null
null
null
text2speech.py
sumit169-hub/text-to-speech
589dd36f95abf216676c0ac12a522f2deb70a4db
[ "BSL-1.0" ]
null
null
null
from gtts import gTTS from playsound import playsound audio="speech.mp3" language='en' sp=gTTS(text=input('ENTER YOUR TEXT: \n') ,lang=language, slow=False) sp.save(audio) playsound(audio)
21.222222
69
0.759162
from gtts import gTTS from playsound import playsound audio="speech.mp3" language='en' sp=gTTS(text=input('ENTER YOUR TEXT: \n') ,lang=language, slow=False) sp.save(audio) playsound(audio)
true
true