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
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
08f7e461287386006cebeae34b521613d0980b9a
638
gyp
Python
ui/ios/ui_ios_tests.gyp
tmpsantos/chromium
802d4aeeb33af25c01ee5994037bbf14086d4ac0
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
ui/ios/ui_ios_tests.gyp
tmpsantos/chromium
802d4aeeb33af25c01ee5994037bbf14086d4ac0
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
ui/ios/ui_ios_tests.gyp
tmpsantos/chromium
802d4aeeb33af25c01ee5994037bbf14086d4ac0
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'variables': { 'chromium_code': 1, }, 'targets': [ { 'target_name': 'ui_ios_unittests', 'type': '<(gtest_target_type)', 'de...
25.52
72
0.567398
{ 'variables': { 'chromium_code': 1, }, 'targets': [ { 'target_name': 'ui_ios_unittests', 'type': '<(gtest_target_type)', 'dependencies': [ '../../base/base.gyp:base', '../../base/base.gyp:run_all_unittests', '../../base/base.gyp:test_support_base', '../....
true
true
08f7e5c81d9d45e124c227191d2b1eb2aefa7bd6
969
py
Python
honorary-degrees-gender-breakdown/gender.py
dailypenn/data
f946385724dceffb7771eefd6267a1cdec3a5ffc
[ "CC-BY-4.0", "MIT" ]
2
2019-05-11T04:28:51.000Z
2020-07-17T03:30:07.000Z
honorary-degrees-gender-breakdown/gender.py
dailypenn/crime-data
35ddd3be4924fac00b851bd629c80712062806b5
[ "CC-BY-4.0", "MIT" ]
null
null
null
honorary-degrees-gender-breakdown/gender.py
dailypenn/crime-data
35ddd3be4924fac00b851bd629c80712062806b5
[ "CC-BY-4.0", "MIT" ]
null
null
null
import csv, sys import gender_guesser.detector as gender d = gender.Detector() from genderizer.genderizer import Genderizer as g # argument handling if len(sys.argv) is not 2: sys.exit('Please enter a school name! (Options: Penn, Brown, or Harvard)') school = sys.argv[1].lower() if school != 'penn' and school !=...
35.888889
129
0.651187
import csv, sys import gender_guesser.detector as gender d = gender.Detector() from genderizer.genderizer import Genderizer as g if len(sys.argv) is not 2: sys.exit('Please enter a school name! (Options: Penn, Brown, or Harvard)') school = sys.argv[1].lower() if school != 'penn' and school != 'harvard' and schoo...
true
true
08f7e765ce1b236d15bea0f299c55398eb2f16d3
166
py
Python
tasks/R2R-pano/models/__init__.py
gregschuit/regretful-agent
c39d22f90512cd3c7798e7e09f9f031b85939648
[ "MIT" ]
122
2019-03-06T01:41:32.000Z
2022-03-18T14:59:00.000Z
tasks/R2R-pano/models/__init__.py
gregschuit/regretful-agent
c39d22f90512cd3c7798e7e09f9f031b85939648
[ "MIT" ]
15
2019-03-09T01:38:53.000Z
2021-09-23T21:27:31.000Z
tasks/R2R-pano/models/__init__.py
gregschuit/regretful-agent
c39d22f90512cd3c7798e7e09f9f031b85939648
[ "MIT" ]
29
2019-03-06T01:49:14.000Z
2021-12-12T18:51:58.000Z
from models.encoder import EncoderRNN from models.modules import PositionalEncoding from models.policy_model import Regretful, SelfMonitoring, SpeakerFollowerBaseline
55.333333
82
0.891566
from models.encoder import EncoderRNN from models.modules import PositionalEncoding from models.policy_model import Regretful, SelfMonitoring, SpeakerFollowerBaseline
true
true
08f7e87d6150dd8eee3bf9bcbcf619a6e81121b4
6,744
py
Python
readthedocs/rtd_tests/tests/test_project_symlinks.py
ank-forked/readthedocs.org
e4110e8db5d25b7e6c699dd2df1a580b04ee8d16
[ "MIT" ]
1
2021-04-27T05:55:34.000Z
2021-04-27T05:55:34.000Z
readthedocs/rtd_tests/tests/test_project_symlinks.py
ank-forked/readthedocs.org
e4110e8db5d25b7e6c699dd2df1a580b04ee8d16
[ "MIT" ]
4
2021-02-08T21:06:49.000Z
2021-12-13T20:51:17.000Z
readthedocs/rtd_tests/tests/test_project_symlinks.py
ank-forked/readthedocs.org
e4110e8db5d25b7e6c699dd2df1a580b04ee8d16
[ "MIT" ]
3
2016-08-04T12:53:13.000Z
2016-11-02T14:17:55.000Z
import os from functools import wraps import unittest from mock import patch from django.conf import settings from django.test import TestCase from django_dynamic_fixture import get from readthedocs.builds.models import Version from readthedocs.projects.models import Project, Domain from readthedocs.projects.symlinks...
35.494737
99
0.6207
import os from functools import wraps import unittest from mock import patch from django.conf import settings from django.test import TestCase from django_dynamic_fixture import get from readthedocs.builds.models import Version from readthedocs.projects.models import Project, Domain from readthedocs.projects.symlinks...
true
true
08f7e954ac68beac779610fd6a02dd9cb8dac29c
707
py
Python
setup.py
oskar-j/plwordnet-reader
7cc677d23708f841db9b5587866b7ce89fe859ec
[ "MIT" ]
2
2018-06-04T10:35:58.000Z
2018-09-21T20:56:00.000Z
setup.py
oskar-j/plwordnet-reader
7cc677d23708f841db9b5587866b7ce89fe859ec
[ "MIT" ]
2
2018-06-04T10:40:57.000Z
2018-06-04T10:42:12.000Z
setup.py
oskar-j/plwordnet-reader
7cc677d23708f841db9b5587866b7ce89fe859ec
[ "MIT" ]
1
2020-10-10T17:32:25.000Z
2020-10-10T17:32:25.000Z
import setuptools from plwordnet.version import Version setuptools.setup(name='plwordnet', version=Version('0.1.0').number, description='Library for reading information from Polish wordnet', long_description=open('README.md').read().strip(), author='...
39.277778
83
0.548798
import setuptools from plwordnet.version import Version setuptools.setup(name='plwordnet', version=Version('0.1.0').number, description='Library for reading information from Polish wordnet', long_description=open('README.md').read().strip(), author='...
true
true
08f7ea2e29ed3423c2f7a9ce4cfee1062476097b
5,013
py
Python
seqtools/annotation.py
NeilHumps/SequenceTools
d854f4c023b5dfc2feec4525ac97e8800bd56e9d
[ "Apache-2.0" ]
null
null
null
seqtools/annotation.py
NeilHumps/SequenceTools
d854f4c023b5dfc2feec4525ac97e8800bd56e9d
[ "Apache-2.0" ]
null
null
null
seqtools/annotation.py
NeilHumps/SequenceTools
d854f4c023b5dfc2feec4525ac97e8800bd56e9d
[ "Apache-2.0" ]
null
null
null
from Bio import SeqIO from Bio.SeqFeature import SeqFeature, FeatureLocation from collections import OrderedDict from seqtools.general import rc, load_csv from seqtools.retrieve_entrez_uniprot import get_domain_details_from_protein def get_sequence_from_genbank(gb_filename, cds=False): """ Return whole sequen...
32.551948
99
0.581688
from Bio import SeqIO from Bio.SeqFeature import SeqFeature, FeatureLocation from collections import OrderedDict from seqtools.general import rc, load_csv from seqtools.retrieve_entrez_uniprot import get_domain_details_from_protein def get_sequence_from_genbank(gb_filename, cds=False): gb_parsed = SeqIO.read(gb_f...
true
true
08f7ea7f9c41731d2217f66c560bd00663ec78af
6,898
py
Python
src/pycdlib/inode.py
AHCoder/galaxy-integration-ps2
2d57a094e4447a2016074a42dd4d7b425985a48a
[ "MIT" ]
45
2019-07-25T01:52:48.000Z
2021-12-20T06:36:11.000Z
src/pycdlib/inode.py
AHCoder/galaxy-integration-ps2
2d57a094e4447a2016074a42dd4d7b425985a48a
[ "MIT" ]
26
2019-07-31T00:50:44.000Z
2021-09-16T17:37:23.000Z
src/pycdlib/inode.py
AHCoder/galaxy-integration-ps2
2d57a094e4447a2016074a42dd4d7b425985a48a
[ "MIT" ]
9
2019-08-15T01:16:13.000Z
2021-03-27T23:59:40.000Z
# Copyright (C) 2018-2019 Chris Lalancette <clalancette@gmail.com> # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; # version 2.1 of the License. # This library is distributed in the ho...
32.233645
128
0.636851
from __future__ import absolute_import from pycdlib import pycdlibexception if False: from typing import BinaryIO, List, Optional, Tuple, Union from pycdlib import dr from pycdlib import eltorito from pycdlib import udf class Inode(object): __slots__ = ('_initialized', 'new_extent_...
true
true
08f7ea810bc7101732fe5453aec14c8e8102c1bc
6,599
py
Python
emgapianns/management/commands/import_assembly.py
EBI-Metagenomics/emgapi
5c7c89bffa5025eb9314ea8fd254bfa0b44b1282
[ "Apache-2.0" ]
6
2018-11-20T10:38:56.000Z
2022-03-08T19:39:11.000Z
emgapianns/management/commands/import_assembly.py
EBI-Metagenomics/emgapi
5c7c89bffa5025eb9314ea8fd254bfa0b44b1282
[ "Apache-2.0" ]
33
2017-10-19T14:07:31.000Z
2022-03-28T16:02:50.000Z
emgapianns/management/commands/import_assembly.py
EBI-Metagenomics/emgapi
5c7c89bffa5025eb9314ea8fd254bfa0b44b1282
[ "Apache-2.0" ]
2
2017-10-18T19:34:46.000Z
2019-06-14T22:08:51.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2019 EMBL - European Bioinformatics Institute # # 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/LICEN...
42.301282
112
0.674042
import logging from django.core.management import BaseCommand, call_command from emgapianns.management.lib import utils from emgapianns.management.lib.utils import sanitise_fields, is_run_accession from ena_portal_api import ena_handler from emgapi import models as emg_models from emgena import models as ena_models ...
true
true
08f7eb2bce2b8c66108e07bba219aec8beb6d29f
431
py
Python
CTFR-Penyelesaian/000/Program/Simple Java Encryption/Simpel Java Encryption.py
dimasma0305/PicoCTF-Penyelesaian
69c315b269412c766d91bc909b75c8bbfebdc12c
[ "MIT" ]
1
2022-01-01T14:37:49.000Z
2022-01-01T14:37:49.000Z
CTFR-Penyelesaian/000/Program/Simple Java Encryption/Simpel Java Encryption.py
dimasma0305/PicoCTF-Penyelesaian
69c315b269412c766d91bc909b75c8bbfebdc12c
[ "MIT" ]
null
null
null
CTFR-Penyelesaian/000/Program/Simple Java Encryption/Simpel Java Encryption.py
dimasma0305/PicoCTF-Penyelesaian
69c315b269412c766d91bc909b75c8bbfebdc12c
[ "MIT" ]
1
2021-12-30T07:48:32.000Z
2021-12-30T07:48:32.000Z
''' String flag = "CSDOwe.o,V3maoukn*(e_0q\\c+*]76?|"; String encrypt = ""; for(int i = 0; i < flag.length(); i++) { if ((i % 10) == 0) { break; } if ((i & 2) == 0) { break; } encrypt += new Character((char)((int)flag.charAt(i) - (i % 10))).toString(); if ((i * 5) == 0) { break; } } ''' flag="CSDOwe.o,V3ma...
28.733333
109
0.529002
flag="CSDOwe.o,V3maoukn*(e_0q\\c+*]76?|" encrypt="" for i in range(len(flag)): encrypt+=chr(ord(flag[i])+i%10) print(encrypt)
true
true
08f7ec4e37672d9ecd292ecaa696ae5fbd5ffd8a
2,952
py
Python
utils/dataLoader.py
makennedy626/Destiny2AutoTagger
07167536f1aa6a184c6c42585fd68a87b420a755
[ "MIT" ]
null
null
null
utils/dataLoader.py
makennedy626/Destiny2AutoTagger
07167536f1aa6a184c6c42585fd68a87b420a755
[ "MIT" ]
null
null
null
utils/dataLoader.py
makennedy626/Destiny2AutoTagger
07167536f1aa6a184c6c42585fd68a87b420a755
[ "MIT" ]
null
null
null
import os import pandas as pd from pathlib import Path # def loadData(filepath, header='infer'): # """Performs pandas.read_csv(filepath, header) and returns the dataframe. # """ # return pd.read_csv(filepath, header=header) def makeCatalog(project_path): """Downloads the files from online and store th...
75.692308
225
0.781843
import os import pandas as pd from pathlib import Path # """ def makeCatalog(project_path): catalog = {} from utils.downloadData import downloadFilesFromURL downloadFilesFromURL('https://docs.google.com/spreadsheets/d/1YWX2NCw8joV0T15ivF7Hu98iMC1Za4lzMWpwJiMx6q8/export?format=csv&id=1YWX2NCw8joV0T1...
true
true
08f7ed64a1234bf48e083633f051763419939f11
1,257
py
Python
logadempirical/neural_log/attention.py
LogIntelligence/LogADEmpirical
48458aee65c1c84466b04dd4092fae79a7f341fd
[ "MIT" ]
11
2022-02-06T23:54:42.000Z
2022-03-30T06:41:39.000Z
logadempirical/neural_log/attention.py
LogIntelligence/LogADEmpirical
48458aee65c1c84466b04dd4092fae79a7f341fd
[ "MIT" ]
1
2022-02-13T23:24:56.000Z
2022-02-14T03:57:50.000Z
logadempirical/neural_log/attention.py
LogIntelligence/LogADEmpirical
48458aee65c1c84466b04dd4092fae79a7f341fd
[ "MIT" ]
5
2022-02-16T12:58:59.000Z
2022-03-21T04:59:40.000Z
from torch import Tensor import torch.nn.functional as F import torch from torch import nn def scaled_dot_product_attention(query: Tensor, key: Tensor, value: Tensor) -> Tensor: temp = query.bmm(key.transpose(1, 2)) scale = query.size(-1) ** 0.5 softmax = F.softmax(temp / scale, dim=-1) return softmax...
33.972973
86
0.645187
from torch import Tensor import torch.nn.functional as F import torch from torch import nn def scaled_dot_product_attention(query: Tensor, key: Tensor, value: Tensor) -> Tensor: temp = query.bmm(key.transpose(1, 2)) scale = query.size(-1) ** 0.5 softmax = F.softmax(temp / scale, dim=-1) return softmax...
true
true
08f7ee6b48bf94cfad7173554694c16a631c467d
2,178
py
Python
meraki_sdk/models/saturday_model.py
meraki/meraki-python-sdk
9894089eb013318243ae48869cc5130eb37f80c0
[ "MIT" ]
37
2019-04-24T14:01:33.000Z
2022-01-28T01:37:21.000Z
meraki_sdk/models/saturday_model.py
ankita66666666/meraki-python-sdk
9894089eb013318243ae48869cc5130eb37f80c0
[ "MIT" ]
10
2019-07-09T16:35:11.000Z
2021-12-07T03:47:53.000Z
meraki_sdk/models/saturday_model.py
ankita66666666/meraki-python-sdk
9894089eb013318243ae48869cc5130eb37f80c0
[ "MIT" ]
17
2019-04-30T23:53:21.000Z
2022-02-07T22:57:44.000Z
# -*- coding: utf-8 -*- """ meraki_sdk This file was automatically generated for meraki by APIMATIC v2.0 ( https://apimatic.io ). """ class SaturdayModel(object): """Implementation of the 'Saturday' model. The schedule object for Saturday. Attributes: active (bool): Wh...
28.657895
95
0.551882
class SaturdayModel(object): _names = { "active":'active', "mfrom":'from', "to":'to' } def __init__(self, active=None, mfrom=None, to=None): self.active = active self.mfrom = mfrom...
true
true
08f7efe1148ac9106e38defb2e3f7c13ceb8ba69
427
py
Python
tests/test_git_profile.py
kenware/git-profile
171f7d14fe61e37f7ebe5fab040be0a63b0ae3a8
[ "MIT" ]
null
null
null
tests/test_git_profile.py
kenware/git-profile
171f7d14fe61e37f7ebe5fab040be0a63b0ae3a8
[ "MIT" ]
1
2021-06-02T00:26:41.000Z
2021-06-02T00:26:41.000Z
tests/test_git_profile.py
kenware/git-profile
171f7d14fe61e37f7ebe5fab040be0a63b0ae3a8
[ "MIT" ]
null
null
null
import json def test_git_profile(client, mock_test, mock_test2, mock_test3): """Start with a blank database.""" print(client) response = client.get('/git-profile/pygame') print(response.data) assert b'total_repo' in response.data assert b'total_forked_repo' in response.data data = json.loa...
32.846154
88
0.716628
import json def test_git_profile(client, mock_test, mock_test2, mock_test3): print(client) response = client.get('/git-profile/pygame') print(response.data) assert b'total_repo' in response.data assert b'total_forked_repo' in response.data data = json.loads(response.data) assert data['tota...
true
true
08f7f01eace9a99680044c13cf239f1d898a486c
469
py
Python
kaznet/apps/main/serializers/client.py
onaio/kaznet-web
53da428d5e62e40c5d38d84c3f3ee06071dd779b
[ "Apache-2.0" ]
1
2019-10-03T12:18:15.000Z
2019-10-03T12:18:15.000Z
kaznet/apps/main/serializers/client.py
onaio/kaznet-web
53da428d5e62e40c5d38d84c3f3ee06071dd779b
[ "Apache-2.0" ]
63
2018-10-31T12:57:36.000Z
2020-04-27T20:18:22.000Z
kaznet/apps/main/serializers/client.py
onaio/kaznet-web
53da428d5e62e40c5d38d84c3f3ee06071dd779b
[ "Apache-2.0" ]
3
2019-08-05T09:10:03.000Z
2020-01-05T21:24:49.000Z
""" Client Serializer Module """ from rest_framework_json_api import serializers from kaznet.apps.main.models import Client # pylint: disable=too-many-ancestors class ClientSerializer(serializers.ModelSerializer): """ Client Serializer class """ # pylint: disable=too-few-public-methods class Me...
19.541667
54
0.656716
from rest_framework_json_api import serializers from kaznet.apps.main.models import Client class ClientSerializer(serializers.ModelSerializer): class Meta: fields = ['name', 'id', 'created', 'modified'] model = Client
true
true
08f7f091898623a94fff6a5a9064bf42e362c094
209
py
Python
week06/lecture/examples/25_phonebook.py
uldash/CS50x
c3ee0f42ad514b57a13c3ffbb96238b3ca3730e1
[ "MIT" ]
null
null
null
week06/lecture/examples/25_phonebook.py
uldash/CS50x
c3ee0f42ad514b57a13c3ffbb96238b3ca3730e1
[ "MIT" ]
null
null
null
week06/lecture/examples/25_phonebook.py
uldash/CS50x
c3ee0f42ad514b57a13c3ffbb96238b3ca3730e1
[ "MIT" ]
null
null
null
import csv from cs50 import get_string file = open("phonebook.csv", "a") name = get_string("Name: ") number = get_string("Number: ") writer = csv.writer(file) writer.writerow([name, number]) file.close()
14.928571
33
0.698565
import csv from cs50 import get_string file = open("phonebook.csv", "a") name = get_string("Name: ") number = get_string("Number: ") writer = csv.writer(file) writer.writerow([name, number]) file.close()
true
true
08f7f0dcb160496f02897fe3ed6cfa8140364827
6,055
py
Python
autobasedoc/autoplot.py
pachecotiago/autobasedoc
14e70a454559435d8a8b8b4fde475c1ba6f94db7
[ "BSD-3-Clause" ]
null
null
null
autobasedoc/autoplot.py
pachecotiago/autobasedoc
14e70a454559435d8a8b8b4fde475c1ba6f94db7
[ "BSD-3-Clause" ]
null
null
null
autobasedoc/autoplot.py
pachecotiago/autobasedoc
14e70a454559435d8a8b8b4fde475c1ba6f94db7
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Wed Sep 16 11:11:12 2015 @author: johannes """ from __future__ import print_function from __future__ import unicode_literals import os import sys from io import BytesIO from functools import wraps from cycler import cycler import matplotlib try: matplot...
29.251208
99
0.557721
from __future__ import print_function from __future__ import unicode_literals import os import sys from io import BytesIO from functools import wraps from cycler import cycler import matplotlib try: matplotlib.use('Agg', force=True) except: print("check your matplotlib aggregator settings") ...
true
true
08f7f1393528ca12bea2d71c22f4ad813e406691
1,625
py
Python
multi_atm.py
SA-alkshali/forumworkshop
f94959380faefd34444a01609e14a5ac6e9f287f
[ "MIT" ]
null
null
null
multi_atm.py
SA-alkshali/forumworkshop
f94959380faefd34444a01609e14a5ac6e9f287f
[ "MIT" ]
null
null
null
multi_atm.py
SA-alkshali/forumworkshop
f94959380faefd34444a01609e14a5ac6e9f287f
[ "MIT" ]
null
null
null
class ATM: def __init__(self, balance, bank_name): self.withdrawls_list = [] self.balance = balance self.bank_name = bank_name def withdraw(self, request): print "Welcome to " + self.bank_name print "Current balance " + str(self.balance) if request > self.balance: print "Can't give all this money !!"...
22.260274
46
0.621538
class ATM: def __init__(self, balance, bank_name): self.withdrawls_list = [] self.balance = balance self.bank_name = bank_name def withdraw(self, request): print "Welcome to " + self.bank_name print "Current balance " + str(self.balance) if request > self.balance: print "Can't give all this money !!"...
false
true
08f7f2660519c0d7b24ae688b047b1f99cecac17
447
py
Python
project_euler/library/number_theory/crt.py
cryvate/project-euler
6ed13880d7916c34554559f5f71662a863735eda
[ "MIT" ]
null
null
null
project_euler/library/number_theory/crt.py
cryvate/project-euler
6ed13880d7916c34554559f5f71662a863735eda
[ "MIT" ]
9
2017-02-20T23:41:40.000Z
2017-04-16T15:36:54.000Z
project_euler/library/number_theory/crt.py
cryvate/project-euler
6ed13880d7916c34554559f5f71662a863735eda
[ "MIT" ]
null
null
null
from .bezout import bezout from .gcd import gcd def crt(a: int, m: int, b: int, n: int) -> int: common = gcd(m, n) quotient, remainder = divmod(b - a, common) if remainder != 0: raise ValueError(f'Trying to solve system that is inconsistent, ' f'gcd = {common} but a - b ...
26.294118
73
0.550336
from .bezout import bezout from .gcd import gcd def crt(a: int, m: int, b: int, n: int) -> int: common = gcd(m, n) quotient, remainder = divmod(b - a, common) if remainder != 0: raise ValueError(f'Trying to solve system that is inconsistent, ' f'gcd = {common} but a - b ...
true
true
08f7f266c4bf97b66117b66db60ff8412c98cb96
1,415
py
Python
ckan/migration/versions/058_add_follower_tables.py
florianm/ckan
1cfd98d591ac70b4eb81048bcd227b6c1354b1bf
[ "Apache-2.0" ]
12
2015-08-28T16:59:07.000Z
2020-03-08T01:39:30.000Z
ckan/migration/versions/058_add_follower_tables.py
florianm/ckan
1cfd98d591ac70b4eb81048bcd227b6c1354b1bf
[ "Apache-2.0" ]
13
2019-05-02T21:01:28.000Z
2020-10-20T23:34:48.000Z
ckan/migration/versions/058_add_follower_tables.py
florianm/ckan
1cfd98d591ac70b4eb81048bcd227b6c1354b1bf
[ "Apache-2.0" ]
10
2015-05-08T04:33:20.000Z
2020-03-03T15:17:58.000Z
from sqlalchemy import * from migrate import * def upgrade(migrate_engine): metadata = MetaData() metadata.bind = migrate_engine migrate_engine.execute(''' CREATE TABLE user_following_dataset ( follower_id text NOT NULL, object_id text NOT NULL, datetime timestamp without time zone NOT NULL ); ...
37.236842
143
0.801413
from sqlalchemy import * from migrate import * def upgrade(migrate_engine): metadata = MetaData() metadata.bind = migrate_engine migrate_engine.execute(''' CREATE TABLE user_following_dataset ( follower_id text NOT NULL, object_id text NOT NULL, datetime timestamp without time zone NOT NULL ); ...
true
true
08f7f27630a67c569736950862026fe9304f729e
2,074
py
Python
src/racecar-controllers/deep_learning/scripts/pLidar.py
burakekincioglu/Autonomous-Car-with-ROS
83d8d497819ffe30851ffc4d453e01c28783d7c7
[ "Unlicense" ]
1
2021-08-09T09:30:09.000Z
2021-08-09T09:30:09.000Z
src/racecar-controllers/deep_learning/scripts/pLidar.py
burakekincioglu/Autonomous-Car-with-ROS
83d8d497819ffe30851ffc4d453e01c28783d7c7
[ "Unlicense" ]
null
null
null
src/racecar-controllers/deep_learning/scripts/pLidar.py
burakekincioglu/Autonomous-Car-with-ROS
83d8d497819ffe30851ffc4d453e01c28783d7c7
[ "Unlicense" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- import numpy as np import std_msgs.msg import time import rospy import message_types as mt from message_types import message_types from message_types import active_behavior from sensor_msgs.msg import LaserScan from deep_learning.msg import Burak from ackermann_msgs.msg import ...
22.543478
97
0.693346
import numpy as np import std_msgs.msg import time import rospy import message_types as mt from message_types import message_types from message_types import active_behavior from sensor_msgs.msg import LaserScan from deep_learning.msg import Burak from ackermann_msgs.msg import AckermannDriveStamped from message_types i...
false
true
08f7f2a447052a5c5cf373a718acceb588cbbf93
3,062
py
Python
src/module_06/code_03.py
abelatnvidia/IntroTF
35216d1c149e2cfbf4a3374a2871d8119e585870
[ "Apache-2.0" ]
null
null
null
src/module_06/code_03.py
abelatnvidia/IntroTF
35216d1c149e2cfbf4a3374a2871d8119e585870
[ "Apache-2.0" ]
null
null
null
src/module_06/code_03.py
abelatnvidia/IntroTF
35216d1c149e2cfbf4a3374a2871d8119e585870
[ "Apache-2.0" ]
null
null
null
import os, glob, tensorflow as tf # create a file pattern to pick up csv files in pwd file_pattern = os.path.join(os.getcwd(),'*.csv') # get list of csv files in the current directory csv_files = glob.glob(file_pattern) # create a queue of files file_queue = tf.train.string_input_producer(csv_files) # init Reader t...
39.25641
100
0.719138
import os, glob, tensorflow as tf file_pattern = os.path.join(os.getcwd(),'*.csv') csv_files = glob.glob(file_pattern) file_queue = tf.train.string_input_producer(csv_files) reader = tf.TextLineReader(skip_header_lines=1) key, get_record_op = reader.read(file_queue) column_descriptors = [[0.0],[0.0],[0.0],[0.0],[...
true
true
08f7f32298a1481af6c836b7af8def45f7956c94
6,768
py
Python
dac/gail.py
shaun95/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
1
2022-03-13T21:48:52.000Z
2022-03-13T21:48:52.000Z
dac/gail.py
shaun95/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
null
null
null
dac/gail.py
shaun95/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
1
2022-03-30T07:20:29.000Z
2022-03-30T07:20:29.000Z
# coding=utf-8 # Copyright 2022 The Google Research 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 applicab...
35.621053
115
0.701684
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow.compat.v1 as tf from tensorflow.contrib import summary as contrib_summary from tensorflow.contrib.eager.python import tfe as contrib_eager_python_tfe from tensorflow.contr...
true
true
08f7f3aeec25e0c896799b1b949ded67c0fff9df
507
py
Python
resource_manager/leases/migrations/0002_resource_type.py
jsaunders/resource_manager
29d106bec49f74c4b2d9ecd8cab1b788eb1477e0
[ "MIT" ]
null
null
null
resource_manager/leases/migrations/0002_resource_type.py
jsaunders/resource_manager
29d106bec49f74c4b2d9ecd8cab1b788eb1477e0
[ "MIT" ]
null
null
null
resource_manager/leases/migrations/0002_resource_type.py
jsaunders/resource_manager
29d106bec49f74c4b2d9ecd8cab1b788eb1477e0
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9.9 on 2016-09-17 02:53 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('leases', '0001_initial'), ] operations = [ migrations.AddField( ...
24.142857
121
0.60355
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('leases', '0001_initial'), ] operations = [ migrations.AddField( model_name='resource', name='type', field=models...
true
true
08f7f4e5034f9213745a6b0432743799e03c92e7
773
py
Python
nipype/interfaces/afni/__init__.py
hanke/nipype
71fb90a1fd55e7c6a42e0315ba6e603d8301b6ab
[ "BSD-3-Clause" ]
null
null
null
nipype/interfaces/afni/__init__.py
hanke/nipype
71fb90a1fd55e7c6a42e0315ba6e603d8301b6ab
[ "BSD-3-Clause" ]
null
null
null
nipype/interfaces/afni/__init__.py
hanke/nipype
71fb90a1fd55e7c6a42e0315ba6e603d8301b6ab
[ "BSD-3-Clause" ]
null
null
null
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """The afni module provides classes for interfacing with the `AFNI <http://www.fmrib.ox.ac.uk/afni/index.html>`_ command line tools. This was written to work with AFNI version 4.1.4. Top-level namespace f...
48.3125
79
0.645537
from .base import Info from .preprocess import (To3D, Refit, Resample, TStat, Automask, Volreg, Merge, ZCutUp, Calc, TShift, Warp, Detrend, Despike, Copy, Fourier, Allineate, Maskave, SkullStrip, TCat, Fim, TCorrelate, BrickStat, ROIStats, Auto...
true
true
08f7f57189ed850e06495821c00572e6b0e12297
12,854
py
Python
userbot/modules/upload_download.py
Ncode2014/Re-Bot
9a5dca36e2c1f5dc6c90a82897cf9bbc229f7a08
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/upload_download.py
Ncode2014/Re-Bot
9a5dca36e2c1f5dc6c90a82897cf9bbc229f7a08
[ "Naumen", "Condor-1.1", "MS-PL" ]
1
2021-08-20T04:41:51.000Z
2021-08-20T04:44:38.000Z
userbot/modules/upload_download.py
Ncode2014/Re-Bot
9a5dca36e2c1f5dc6c90a82897cf9bbc229f7a08
[ "Naumen", "Condor-1.1", "MS-PL" ]
3
2021-09-09T22:32:07.000Z
2022-03-07T05:42:56.000Z
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.c (the "License"); # you may not use this file except in compliance with the License. # # The entire source code is OSSRPL except # 'download, uploadir, uploadas, upload' which is MPL # License: MPL and OSSR...
41.598706
92
0.508713
import asyncio import math import os import time from datetime import datetime from urllib.parse import unquote_plus from hachoir.metadata import extractMetadata from hachoir.parser import createParser from natsort import os_sorted from pySmartDL import SmartDL from telethon.tl.types import DocumentAttributeAudio, Do...
true
true
08f7f660868c3498911b1070ac6d27f9f85b5798
454
py
Python
paywok/celery.py
CarboTeam/Paywok
d6f037835439ffb48eec02c37c61fcf38ec84c6b
[ "MIT" ]
null
null
null
paywok/celery.py
CarboTeam/Paywok
d6f037835439ffb48eec02c37c61fcf38ec84c6b
[ "MIT" ]
null
null
null
paywok/celery.py
CarboTeam/Paywok
d6f037835439ffb48eec02c37c61fcf38ec84c6b
[ "MIT" ]
1
2022-03-25T05:03:23.000Z
2022-03-25T05:03:23.000Z
from __future__ import absolute_import, unicode_literals from celery import Celery from datetime import datetime, timedelta import os os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'paywok.settings') app = Celery('paywok') app.config_from_object('django.conf:settings', namespace='CELERY') app.conf.timezone = 'E...
19.73913
66
0.773128
from __future__ import absolute_import, unicode_literals from celery import Celery from datetime import datetime, timedelta import os os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'paywok.settings') app = Celery('paywok') app.config_from_object('django.conf:settings', namespace='CELERY') app.conf.timezone = 'E...
true
true
08f7fb3e78bf3e942bb530201cbb2e9eed5994d7
3,789
py
Python
src/Pybind11Wraps/SolidMaterial/iSALEROCKStrength.py
jmikeowen/Spheral
3e1082a7aefd6b328bd3ae24ca1a477108cfc3c4
[ "BSD-Source-Code", "BSD-3-Clause-LBNL", "FSFAP" ]
22
2018-07-31T21:38:22.000Z
2020-06-29T08:58:33.000Z
src/Pybind11Wraps/SolidMaterial/iSALEROCKStrength.py
jmikeowen/Spheral
3e1082a7aefd6b328bd3ae24ca1a477108cfc3c4
[ "BSD-Source-Code", "BSD-3-Clause-LBNL", "FSFAP" ]
41
2020-09-28T23:14:27.000Z
2022-03-28T17:01:33.000Z
src/Pybind11Wraps/SolidMaterial/iSALEROCKStrength.py
jmikeowen/Spheral
3e1082a7aefd6b328bd3ae24ca1a477108cfc3c4
[ "BSD-Source-Code", "BSD-3-Clause-LBNL", "FSFAP" ]
7
2019-12-01T07:00:06.000Z
2020-09-15T21:12:39.000Z
#------------------------------------------------------------------------------- # iSALEROCKStrength #------------------------------------------------------------------------------- from PYB11Generator import * from StrengthModel import * from StrengthModelAbstractMethods import * @PYB11template("Dimension") @PYB11mod...
49.207792
110
0.543415
from PYB11Generator import * from StrengthModel import * from StrengthModelAbstractMethods import * @PYB11template("Dimension") @PYB11module("SpheralSolidMaterial") class iSALEROCKStrength(StrengthModel): PYB11typedefs = """ using Scalar = typename %(Dimension)s::Scalar; using SymTensor = typename %(Dimen...
true
true
08f7fccc359e00251d9384d6a78189b7d76bcaaa
2,698
py
Python
aquacrop_fd/templates/parser.py
DHI-GRAS/aquacrop-fd
db484df2b91c6c5703429ac3dbc8f59456a602fe
[ "MIT" ]
null
null
null
aquacrop_fd/templates/parser.py
DHI-GRAS/aquacrop-fd
db484df2b91c6c5703429ac3dbc8f59456a602fe
[ "MIT" ]
null
null
null
aquacrop_fd/templates/parser.py
DHI-GRAS/aquacrop-fd
db484df2b91c6c5703429ac3dbc8f59456a602fe
[ "MIT" ]
null
null
null
import re from pathlib import Path def _split_line(line): ww = re.split(':', line, maxsplit=1) if len(ww) == 2: return [s.strip() for s in ww] else: return None, None def _format_value(value): if isinstance(value, str): return value elif isinstance(value, float): ...
24.981481
77
0.565604
import re from pathlib import Path def _split_line(line): ww = re.split(':', line, maxsplit=1) if len(ww) == 2: return [s.strip() for s in ww] else: return None, None def _format_value(value): if isinstance(value, str): return value elif isinstance(value, float): ...
true
true
08f7fd0734a1daf5312f2b2800b904dd0284b9bd
20,751
py
Python
salt/utils/templates.py
ipmb/salt
699912ef9cde28040378aa53d6c7a12d8af756b1
[ "Apache-2.0" ]
null
null
null
salt/utils/templates.py
ipmb/salt
699912ef9cde28040378aa53d6c7a12d8af756b1
[ "Apache-2.0" ]
null
null
null
salt/utils/templates.py
ipmb/salt
699912ef9cde28040378aa53d6c7a12d8af756b1
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Template render systems ''' from __future__ import absolute_import, print_function, unicode_literals # Import Python libs import codecs import os import logging import tempfile import traceback import sys # Import 3rd-party libs import jinja2 import jinja2.ext from salt.ext import six if...
33.415459
147
0.60585
from __future__ import absolute_import, print_function, unicode_literals import codecs import os import logging import tempfile import traceback import sys import jinja2 import jinja2.ext from salt.ext import six if sys.version_info[:2] >= (3, 5): import importlib.machinery import importlib.util USE_I...
true
true
08f7fd54597bf0e0aa389c231c6ac014ecfbb9cf
3,063
py
Python
tethys_compute/models/condor/condor_workflow.py
msouff/tethys
45795d1e6561d5db8fddd838f4d1ae1d91dbb837
[ "BSD-2-Clause" ]
null
null
null
tethys_compute/models/condor/condor_workflow.py
msouff/tethys
45795d1e6561d5db8fddd838f4d1ae1d91dbb837
[ "BSD-2-Clause" ]
1
2018-09-20T21:27:14.000Z
2018-09-20T21:27:14.000Z
tethys_compute/models/condor/condor_workflow.py
msouff/tethys
45795d1e6561d5db8fddd838f4d1ae1d91dbb837
[ "BSD-2-Clause" ]
null
null
null
""" ******************************************************************************** * Name: condor_workflow * Author: nswain * Created On: September 12, 2018 * Copyright: (c) Aquaveo 2018 ******************************************************************************** """ import shutil import logging from django.db.m...
32.242105
98
0.614757
import shutil import logging from django.db.models.signals import pre_save, pre_delete from django.dispatch import receiver from tethys_compute.models.condor.condor_base import CondorBase from tethys_compute.models.condor.condor_py_workflow import CondorPyWorkflow from tethys_compute.models.condor.condor_workflow_nod...
true
true
08f7fdd12ab41aa57ae0566a5d7611dbbf3e5333
13,722
py
Python
killableprocess/winprocess.py
tomschenkjr/SublimeREPL
8cfe65d66ce632f97699ca51f2743ed7e3c8df86
[ "BSD-2-Clause" ]
2
2016-02-15T03:13:21.000Z
2019-08-01T19:19:36.000Z
killableprocess/winprocess.py
tomschenkjr/SublimeREPL
8cfe65d66ce632f97699ca51f2743ed7e3c8df86
[ "BSD-2-Clause" ]
null
null
null
killableprocess/winprocess.py
tomschenkjr/SublimeREPL
8cfe65d66ce632f97699ca51f2743ed7e3c8df86
[ "BSD-2-Clause" ]
null
null
null
# A module to expose various thread/process/job related structures and # methods from kernel32 # # The MIT License # # Copyright (c) 2003-2004 by Peter Astrand <astrand@lysator.liu.se> # # Additions and modifications written by Benjamin Smedberg # <benjamin@smedbergs.us> are Copyright (c) 2006 by the Mozilla Foundation...
35.921466
122
0.603192
from ctypes import c_void_p, POINTER, sizeof, Structure, windll, WinError, WINFUNCTYPE from ctypes.wintypes import BOOL, BYTE, DWORD, HANDLE, LPCWSTR, LPWSTR, UINT, WORD from qijo import QueryInformationJobObject LPVOID = c_void_p LPBYTE = POINTER(BYTE) LPDWORD = POINTER(DWORD) LPBOOL = POINTER(BOOL) def ErrCheckBoo...
false
true
08f801ed1d52d4e62c6da6d6eb221d7113ffd1ab
23
py
Python
Harvest_Actor-Critic/source/networks/__init__.py
jbr-ai-labs/BAROCCO
799341cd76be88745086289583fc95ff9a2bc72e
[ "Apache-2.0" ]
3
2021-04-14T17:01:49.000Z
2021-07-09T11:24:25.000Z
Harvest_Actor-Critic/source/networks/__init__.py
jbr-ai-labs/BAROCCO
799341cd76be88745086289583fc95ff9a2bc72e
[ "Apache-2.0" ]
null
null
null
Harvest_Actor-Critic/source/networks/__init__.py
jbr-ai-labs/BAROCCO
799341cd76be88745086289583fc95ff9a2bc72e
[ "Apache-2.0" ]
2
2021-09-15T09:36:49.000Z
2021-10-18T08:49:01.000Z
from .coma import COMA
11.5
22
0.782609
from .coma import COMA
true
true
08f80221d40ce0611f3cc8c4b4897684d1945a36
101,986
py
Python
napalm/junos/junos.py
DanSheps/napalm
0f008cbefed0efdc4ef92bae6725d3ceb1343624
[ "Apache-2.0" ]
null
null
null
napalm/junos/junos.py
DanSheps/napalm
0f008cbefed0efdc4ef92bae6725d3ceb1343624
[ "Apache-2.0" ]
null
null
null
napalm/junos/junos.py
DanSheps/napalm
0f008cbefed0efdc4ef92bae6725d3ceb1343624
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2015 Spotify AB. All rights reserved. # # The contents of this file are 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/LICE...
40.680495
100
0.535662
import re import json import logging import collections from copy import deepcopy from collections import OrderedDict, defaultdict from lxml.builder import E from lxml import etree from jnpr.junos import Device from jnpr.junos.utils.config import Config from jnpr.junos.exception import RpcError from jnpr.junos.exce...
true
true
08f802b141c523a07418c780403eb0198b35bca6
269
py
Python
tests/artificial/transf_None/trend_MovingAverage/cycle_5/ar_12/test_artificial_32_None_MovingAverage_5_12_100.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
tests/artificial/transf_None/trend_MovingAverage/cycle_5/ar_12/test_artificial_32_None_MovingAverage_5_12_100.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
1
2019-11-30T23:39:38.000Z
2019-12-01T04:34:35.000Z
tests/artificial/transf_None/trend_MovingAverage/cycle_5/ar_12/test_artificial_32_None_MovingAverage_5_12_100.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
import pyaf.Bench.TS_datasets as tsds import pyaf.tests.artificial.process_artificial_dataset as art art.process_dataset(N = 32 , FREQ = 'D', seed = 0, trendtype = "MovingAverage", cycle_length = 5, transform = "None", sigma = 0.0, exog_count = 100, ar_order = 12);
38.428571
164
0.732342
import pyaf.Bench.TS_datasets as tsds import pyaf.tests.artificial.process_artificial_dataset as art art.process_dataset(N = 32 , FREQ = 'D', seed = 0, trendtype = "MovingAverage", cycle_length = 5, transform = "None", sigma = 0.0, exog_count = 100, ar_order = 12);
true
true
08f80374c21d30c1d276d16ead81716b018f212d
475
py
Python
mapr/ojai/document/MutationOp.py
mapr/maprdb-python-client
ea7b7f1fb6c212e76bd799867e272eafd345f2e2
[ "Apache-2.0" ]
3
2020-04-01T12:01:50.000Z
2022-03-23T01:18:36.000Z
mapr/ojai/document/MutationOp.py
mapr/maprdb-python-client
ea7b7f1fb6c212e76bd799867e272eafd345f2e2
[ "Apache-2.0" ]
7
2019-02-10T19:31:09.000Z
2022-02-08T17:04:17.000Z
mapr/ojai/document/MutationOp.py
mapr/maprdb-python-client
ea7b7f1fb6c212e76bd799867e272eafd345f2e2
[ "Apache-2.0" ]
3
2020-05-27T09:52:32.000Z
2021-09-07T14:16:43.000Z
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from builtins import * from aenum import Enum class MutationOp(Enum): NONE = 0 SET_OR_REPL...
23.75
39
0.736842
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from builtins import * from aenum import Enum class MutationOp(Enum): NONE = 0 SET_OR_REPL...
true
true
08f804d7b93db8666bbb14f45d4b6eb6a757c4fb
4,225
py
Python
scripts/loading/protein_domain/proteindomainannotation.py
dougli1sqrd/SGDBackend-Nex2
2ecb2436db142cf08c6f2dbab6b115a394116632
[ "MIT" ]
5
2015-11-24T23:09:46.000Z
2019-11-06T17:48:13.000Z
scripts/loading/protein_domain/proteindomainannotation.py
dougli1sqrd/SGDBackend-Nex2
2ecb2436db142cf08c6f2dbab6b115a394116632
[ "MIT" ]
188
2017-08-28T22:39:03.000Z
2022-03-02T14:53:46.000Z
scripts/loading/protein_domain/proteindomainannotation.py
dougli1sqrd/SGDBackend-Nex2
2ecb2436db142cf08c6f2dbab6b115a394116632
[ "MIT" ]
7
2018-05-13T01:58:07.000Z
2021-06-25T19:08:33.000Z
import os import sys from src.models import Source, Proteindomain, Locusdbentity, Taxonomy, \ Proteindomainannotation from scripts.loading.database_session import get_session __author__ = 'sweng66' domain_file = 'scripts/loading/protein_domain/data/orf_trans_all.fasta_full.tvs...
33.531746
212
0.622485
import os import sys from src.models import Source, Proteindomain, Locusdbentity, Taxonomy, \ Proteindomainannotation from scripts.loading.database_session import get_session __author__ = 'sweng66' domain_file = 'scripts/loading/protein_domain/data/orf_trans_all.fasta_full.tvs...
true
true
08f80570b8aee93bf1cbc19a21c6e77aa69b8277
1,214
py
Python
lsm9ds1_rjg/gpio_interrupt.py
Richard-Gemmell/lsm9ds1-python
1b4a6792c0cd092ea782f43cb6c6bed9c0e7d8b8
[ "MIT" ]
6
2019-08-01T23:04:50.000Z
2021-08-07T18:03:24.000Z
lsm9ds1_rjg/gpio_interrupt.py
Richard-Gemmell/lsm9ds1-python
1b4a6792c0cd092ea782f43cb6c6bed9c0e7d8b8
[ "MIT" ]
1
2019-06-05T15:07:22.000Z
2019-06-09T06:09:09.000Z
lsm9ds1_rjg/gpio_interrupt.py
Richard-Gemmell/lsm9ds1-python
1b4a6792c0cd092ea782f43cb6c6bed9c0e7d8b8
[ "MIT" ]
3
2019-08-01T23:04:57.000Z
2020-01-18T17:50:58.000Z
import time from RPi import GPIO from .abstract_interrupt import Interrupt class GPIOInterrupt(Interrupt): def __init__(self, gpio_pin: int): self.gpio_pin = gpio_pin GPIO.setmode(GPIO.BCM) GPIO.setup(self.gpio_pin, GPIO.IN) def close(self): """This method must...
35.705882
87
0.628501
import time from RPi import GPIO from .abstract_interrupt import Interrupt class GPIOInterrupt(Interrupt): def __init__(self, gpio_pin: int): self.gpio_pin = gpio_pin GPIO.setmode(GPIO.BCM) GPIO.setup(self.gpio_pin, GPIO.IN) def close(self): GPIO.cleanup(self.g...
true
true
08f80591e2c55cf08b5a453bf5fe9d83cc3af435
7,674
py
Python
util/import_unicode.py
dingjingmaster/graceful-grub
7e57edc3cbd61774bbb57119c1893c77cb547d6a
[ "MIT" ]
null
null
null
util/import_unicode.py
dingjingmaster/graceful-grub
7e57edc3cbd61774bbb57119c1893c77cb547d6a
[ "MIT" ]
null
null
null
util/import_unicode.py
dingjingmaster/graceful-grub
7e57edc3cbd61774bbb57119c1893c77cb547d6a
[ "MIT" ]
null
null
null
#* #* GRUB -- GRand Unified Bootloader #* Copyright (C) 2010 Free Software Foundation, Inc. #* #* GRUB is free software: you can redistribute it and/or modify #* it under the terms of the GNU General Public License as published by #* the Free Software Foundation, either version 3 of the License, or #* (at your...
39.556701
268
0.545609
import re import sys if len (sys.argv) < 3: print ("Usage: %s SOURCE DESTINATION" % sys.argv[0]) exit (0) infile = open (sys.argv[3], "r") joining = {} for line in infile: line = re.sub ("#.*$", "", line) line = line.replace ("\n", "") line = line.replace (" ", "") if len (line) == 0 or line[0...
true
true
08f805cd2dc38d1ec4617bb9d82f68b3352a0bd1
397
py
Python
geotrek/core/migrations/0015_topology_geom_need_update.py
pierreloicq/Geotrek-admin
00cd29f29843f2cc25e5a3c7372fcccf14956887
[ "BSD-2-Clause" ]
50
2016-10-19T23:01:21.000Z
2022-03-28T08:28:34.000Z
geotrek/core/migrations/0015_topology_geom_need_update.py
pierreloicq/Geotrek-admin
00cd29f29843f2cc25e5a3c7372fcccf14956887
[ "BSD-2-Clause" ]
1,422
2016-10-27T10:39:40.000Z
2022-03-31T13:37:10.000Z
geotrek/core/migrations/0015_topology_geom_need_update.py
pierreloicq/Geotrek-admin
00cd29f29843f2cc25e5a3c7372fcccf14956887
[ "BSD-2-Clause" ]
46
2016-10-27T10:59:10.000Z
2022-03-22T15:55:56.000Z
# Generated by Django 2.0.13 on 2020-04-05 11:55 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0014_auto_20200228_1755'), ] operations = [ migrations.AddField( model_name='topology', name='geom_need_upd...
20.894737
53
0.609572
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0014_auto_20200228_1755'), ] operations = [ migrations.AddField( model_name='topology', name='geom_need_update', field=models.BooleanField(defau...
true
true
08f8064b51c677e24783ad42777b755a8148cbba
740
py
Python
macropodus/segment/__init__.py
leileixiao/Macropodus
9de38c06d332bd26e704fd4afd8f44678de7f44f
[ "MIT" ]
1
2020-05-24T09:42:07.000Z
2020-05-24T09:42:07.000Z
macropodus/segment/__init__.py
Pull-Qutter/Macropodus
eafe3c00e1e4286ee672ccfada54122e9f86b534
[ "MIT" ]
null
null
null
macropodus/segment/__init__.py
Pull-Qutter/Macropodus
eafe3c00e1e4286ee672ccfada54122e9f86b534
[ "MIT" ]
1
2020-09-02T04:11:38.000Z
2020-09-02T04:11:38.000Z
# !/usr/bin/python # -*- coding: utf-8 -*- # @time : 2019/11/18 22:00 # @author : Mo # @function: segment of sent from macropodus.segment.seg_statistics.seg_statistics import SegStatistics from macropodus.segment.word_discovery.word_discovery import WordDiscovery # 机械分词 use_cache = True # 使用缓存 segs = SegStatisti...
23.870968
74
0.786486
from macropodus.segment.seg_statistics.seg_statistics import SegStatistics from macropodus.segment.word_discovery.word_discovery import WordDiscovery use_cache = True segs = SegStatistics(use_cache) cut_bidirectional = segs.cut_bidirectional cut_forward = segs.cut_forward cut_reverse = segs.cut_reverse cut_search = ...
true
true
08f806d95da013c6c4acf9cb893fa224f66e262f
541
py
Python
app/routes/earnings.py
jcruz/earnings-calendar
2b917d72af1943e0cc3fdb30950bd8546c300cc7
[ "MIT" ]
null
null
null
app/routes/earnings.py
jcruz/earnings-calendar
2b917d72af1943e0cc3fdb30950bd8546c300cc7
[ "MIT" ]
null
null
null
app/routes/earnings.py
jcruz/earnings-calendar
2b917d72af1943e0cc3fdb30950bd8546c300cc7
[ "MIT" ]
null
null
null
from flask import Blueprint from flask import jsonify from flask import Response from marshmallow import fields from webargs.flaskparser import use_kwargs from app.services import optionslam blueprint = Blueprint('earnings', __name__) @blueprint.route('/api/earnings/<stock_symbol>', methods=['GET']) @use_kwargs({ ...
28.473684
88
0.781885
from flask import Blueprint from flask import jsonify from flask import Response from marshmallow import fields from webargs.flaskparser import use_kwargs from app.services import optionslam blueprint = Blueprint('earnings', __name__) @blueprint.route('/api/earnings/<stock_symbol>', methods=['GET']) @use_kwargs({ ...
true
true
08f8070d8cd6e349cc925b6afc3f07fa8a98b21b
1,861
py
Python
paper/historycode/Code/info_data.py
andurilhuang/Movie_Income_Prediction
5c705fe60295a175e9dc54191df422fc49ceccd6
[ "MIT" ]
1
2017-11-02T06:06:39.000Z
2017-11-02T06:06:39.000Z
paper/historycode/FindWrong/info_data.py
andurilhuang/Movie_Income_Prediction
5c705fe60295a175e9dc54191df422fc49ceccd6
[ "MIT" ]
null
null
null
paper/historycode/FindWrong/info_data.py
andurilhuang/Movie_Income_Prediction
5c705fe60295a175e9dc54191df422fc49ceccd6
[ "MIT" ]
4
2017-11-01T19:24:31.000Z
2018-09-13T00:05:41.000Z
def info_data(): import os import requests import json import pandas as pd from datetime import datetime OMDB_KEY = "4c427520" #get imdb_id_list from csv profit_df = pd.read_csv('revenue.csv') # print profit_df.head() imdb_id_list = profit_df['imdb_id'] #loop through imd...
37.979592
77
0.473939
def info_data(): import os import requests import json import pandas as pd from datetime import datetime OMDB_KEY = "4c427520" profit_df = pd.read_csv('revenue.csv') imdb_id_list = profit_df['imdb_id'] dict_list = [] for imdb_id in imdb_id_list: query = '...
true
true
08f807e9e5407b754f622b8fbcf3d4189105a6f4
10,767
py
Python
examples-master/python_examples/md_nvt_lj_le.py
JungHoonJung/2021MD
29bfae7a750217d50654e4973a2be6fb0d968bdf
[ "MIT" ]
186
2017-04-30T18:11:12.000Z
2022-03-31T18:35:09.000Z
examples-master/python_examples/md_nvt_lj_le.py
JungHoonJung/2021MD
29bfae7a750217d50654e4973a2be6fb0d968bdf
[ "MIT" ]
17
2017-02-09T11:08:49.000Z
2022-01-29T14:40:09.000Z
examples-master/python_examples/md_nvt_lj_le.py
JungHoonJung/2021MD
29bfae7a750217d50654e4973a2be6fb0d968bdf
[ "MIT" ]
92
2017-09-13T05:20:40.000Z
2022-03-19T16:17:02.000Z
#!/usr/bin/env python3 # md_nvt_lj_le.py #------------------------------------------------------------------------------------------------# # This software was written in 2016/17 # # by Michael P. Allen <m.p.allen@warwick.ac.uk>/<m.p.allen@bristol.ac.uk> ...
43.240964
98
0.579641
def calc_variables ( ): import numpy as np import math from averages_module import msd, VariableType vol = box**3 rho = n / vol kin = 0.5*np.sum(v**2) fsq = np.sum ( f**2 ) tmp = 2.0 * kin / (3*n-3) kyx ...
true
true
08f808bda9ceb0e6fb0f9993ce0c7782b8ebd436
2,796
py
Python
tests/utilities/test_dtype_device_mixin.py
scarecrow1123/pytorch-lightning
66aa5270daf92813f3b1717513d1915ac6637fb4
[ "Apache-2.0" ]
1
2021-04-09T08:32:21.000Z
2021-04-09T08:32:21.000Z
tests/utilities/test_dtype_device_mixin.py
tullie/pytorch-lightning
b39f4798a6859d2237b48b29b39a2390164612c1
[ "Apache-2.0" ]
null
null
null
tests/utilities/test_dtype_device_mixin.py
tullie/pytorch-lightning
b39f4798a6859d2237b48b29b39a2390164612c1
[ "Apache-2.0" ]
null
null
null
import pytest import torch import torch.nn as nn from pytorch_lightning import Trainer, Callback from pytorch_lightning.utilities.device_dtype_mixin import DeviceDtypeModuleMixin from tests.base import EvalModelTemplate class SubSubModule(DeviceDtypeModuleMixin): pass class SubModule(nn.Module): def __ini...
31.066667
103
0.70422
import pytest import torch import torch.nn as nn from pytorch_lightning import Trainer, Callback from pytorch_lightning.utilities.device_dtype_mixin import DeviceDtypeModuleMixin from tests.base import EvalModelTemplate class SubSubModule(DeviceDtypeModuleMixin): pass class SubModule(nn.Module): def __ini...
true
true
08f809f739eec4a3b8d5b57b85f0d031f1c25932
716
py
Python
pyhap/characteristics/category.py
condemil/pyhap
d1f6e739f670566a18db5adf8b52afbb476862b4
[ "MIT" ]
18
2017-09-28T18:55:09.000Z
2022-02-25T13:09:09.000Z
pyhap/characteristics/category.py
condemil/pyhap
d1f6e739f670566a18db5adf8b52afbb476862b4
[ "MIT" ]
2
2018-06-24T11:16:41.000Z
2020-11-23T20:41:41.000Z
pyhap/characteristics/category.py
condemil/pyhap
d1f6e739f670566a18db5adf8b52afbb476862b4
[ "MIT" ]
6
2018-09-09T06:42:15.000Z
2022-01-06T07:17:25.000Z
# Autogenerated, do not edit. All changes will be undone. from typing import ( List, Type, ) from uuid import UUID from pyhap.characteristic import ( Characteristic, CharacteristicPermission, ) class Category(Characteristic): @property def characteristic_uuid(self) -> UUID: return UU...
21.058824
60
0.667598
from typing import ( List, Type, ) from uuid import UUID from pyhap.characteristic import ( Characteristic, CharacteristicPermission, ) class Category(Characteristic): @property def characteristic_uuid(self) -> UUID: return UUID('000000A3-0000-1000-8000-0026BB765291') @property ...
true
true
08f80aebaa8f946fc6643dd76b1590139c721f0a
730
py
Python
tech_project/lib/python2.7/site-packages/pylint/test/functional/deprecated_methods_py2.py
priyamshah112/Project-Descripton-Blog
8e01016c6be79776c4f5ca75563fa3daa839e39e
[ "MIT" ]
null
null
null
tech_project/lib/python2.7/site-packages/pylint/test/functional/deprecated_methods_py2.py
priyamshah112/Project-Descripton-Blog
8e01016c6be79776c4f5ca75563fa3daa839e39e
[ "MIT" ]
9
2019-12-04T23:15:54.000Z
2022-02-10T11:05:43.000Z
tech_project/lib/python2.7/site-packages/pylint/test/functional/deprecated_methods_py2.py
priyamshah112/Project-Descripton-Blog
8e01016c6be79776c4f5ca75563fa3daa839e39e
[ "MIT" ]
1
2019-12-16T03:48:08.000Z
2019-12-16T03:48:08.000Z
""" Functional test for deprecated methods in Python 2 """ # pylint: disable=no-member,missing-docstring import os import xml.etree.ElementTree import unittest os.popen2('') # [deprecated-method] os.popen3('') # [deprecated-method] os.popen4('') # [deprecated-method] xml.etree.ElementTree.Element('elem').g...
34.761905
77
0.665753
import os import xml.etree.ElementTree import unittest os.popen2('') os.popen3('') os.popen4('') xml.etree.ElementTree.Element('elem').getchildren() class Tests(unittest.TestCase): def test_foo(self): self.assertEquals(2 + 2, 4) self.assertNotEquals(2 + 2, 4) self.asser...
true
true
08f80bbda8e1faf6fb923b1aea7c4aa817063358
5,904
py
Python
asposewordscloud/models/list_levels.py
rizwanniazigroupdocs/aspose-words-cloud-python
b943384a1e3c0710cc84df74119e6edf7356037e
[ "MIT" ]
null
null
null
asposewordscloud/models/list_levels.py
rizwanniazigroupdocs/aspose-words-cloud-python
b943384a1e3c0710cc84df74119e6edf7356037e
[ "MIT" ]
null
null
null
asposewordscloud/models/list_levels.py
rizwanniazigroupdocs/aspose-words-cloud-python
b943384a1e3c0710cc84df74119e6edf7356037e
[ "MIT" ]
null
null
null
# coding: utf-8 # ----------------------------------------------------------------------------------- # <copyright company="Aspose" file="list_levels.py"> # Copyright (c) 2020 Aspose.Words for Cloud # </copyright> # <summary> # Permission is hereby granted, free of charge, to any person obtaining a copy # of this ...
33.545455
85
0.571308
import pprint import re import six import json class ListLevels(object): swagger_types = { 'link': 'WordsApiLink', 'list_level': 'list[ListLevel]' } attribute_map = { 'link': 'Link', 'list_level': 'ListLevel' } def __init__(self, link=None, list_level=None): ...
true
true
08f80d13eeaa049a82070ac673a09265f6cc8e84
2,539
py
Python
pic_download.py
deethereal/Road_Segmentation
edb3a37c54482a09726ac0f3c8eee5db5c1e5c39
[ "MIT" ]
2
2021-09-05T18:30:00.000Z
2022-02-19T23:16:23.000Z
pic_download.py
deethereal/Road_Segmentation
edb3a37c54482a09726ac0f3c8eee5db5c1e5c39
[ "MIT" ]
null
null
null
pic_download.py
deethereal/Road_Segmentation
edb3a37c54482a09726ac0f3c8eee5db5c1e5c39
[ "MIT" ]
null
null
null
import re import argparse from PIL import Image from io import BytesIO from bs4 import BeautifulSoup from skimage import io as skio from urllib.request import urlopen import os def html_url_parser(url, save_dir, show=False, wait=False): """ HTML parser to download images from URL. Params:\n `url` - I...
32.139241
105
0.590784
import re import argparse from PIL import Image from io import BytesIO from bs4 import BeautifulSoup from skimage import io as skio from urllib.request import urlopen import os def html_url_parser(url, save_dir, show=False, wait=False): website = urlopen(url) html = website.read() soup = BeautifulSoup(...
true
true
08f80de6dac280e85ea1b1c1e055efc727ab8c94
14,850
py
Python
samples/shapes/shapes.py
jbutle55/Mask_RCNN
0a584309fa1198216a8d95787c93dace73da35e1
[ "MIT" ]
null
null
null
samples/shapes/shapes.py
jbutle55/Mask_RCNN
0a584309fa1198216a8d95787c93dace73da35e1
[ "MIT" ]
null
null
null
samples/shapes/shapes.py
jbutle55/Mask_RCNN
0a584309fa1198216a8d95787c93dace73da35e1
[ "MIT" ]
null
null
null
""" Mask R-CNN Configurations and data loading code for the synthetic Shapes dataset. This is a duplicate of the code in the noteobook train_shapes.ipynb for easy import into other notebooks, such as inspect_model.ipynb. Copyright (c) 2017 Matterport, Inc. Licensed under the MIT License (see LICENSE for details) Writt...
36.940299
119
0.595488
import os import sys import math import random import numpy as np import cv2 import matplotlib.pyplot as plt ROOT_DIR = os.path.abspath("../../") print(ROOT_DIR) MODEL_DIR = os.path.join(ROOT_DIR, "logs") COCO_MODEL_PATH = os.path.join(ROOT_DIR, "mask_rcnn_coco.h5") sys.path.append(ROOT_DIR) from mrcnn.config imp...
true
true
08f80e4420c841d03b850d7cae8b518e7d5e9960
503
py
Python
tests/test_cli.py
schnitzelbub/bocadillo
ecfe23710853817dd025aa67b176d6e9a8263c91
[ "MIT" ]
null
null
null
tests/test_cli.py
schnitzelbub/bocadillo
ecfe23710853817dd025aa67b176d6e9a8263c91
[ "MIT" ]
null
null
null
tests/test_cli.py
schnitzelbub/bocadillo
ecfe23710853817dd025aa67b176d6e9a8263c91
[ "MIT" ]
null
null
null
from subprocess import call import pytest from bocadillo import __version__ from bocadillo.cli import create_cli @pytest.mark.parametrize("command", [["boca"], ["python", "-m", "bocadillo"]]) def test_invoke_boca(command): assert call(command) == 0 @pytest.mark.parametrize("flag", ["-v", "-V", "--version", "v...
23.952381
78
0.697813
from subprocess import call import pytest from bocadillo import __version__ from bocadillo.cli import create_cli @pytest.mark.parametrize("command", [["boca"], ["python", "-m", "bocadillo"]]) def test_invoke_boca(command): assert call(command) == 0 @pytest.mark.parametrize("flag", ["-v", "-V", "--version", "v...
true
true
08f80f6b91d49fbe0b630efd8a25e1ee48d3ac7a
4,904
py
Python
cornac/models/online_ibpr/recom_online_ibpr.py
GuoJingyao/cornac
e7529990ec1dfa586c4af3de98e4b3e00a786578
[ "Apache-2.0" ]
null
null
null
cornac/models/online_ibpr/recom_online_ibpr.py
GuoJingyao/cornac
e7529990ec1dfa586c4af3de98e4b3e00a786578
[ "Apache-2.0" ]
null
null
null
cornac/models/online_ibpr/recom_online_ibpr.py
GuoJingyao/cornac
e7529990ec1dfa586c4af3de98e4b3e00a786578
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ @author: Dung D. Le (Andrew) <ddle.2015@smu.edu.sg> """ from .online_ibpr import * from ..recommender import Recommender from ...exception import ScoreException class OnlineIBPR(Recommender): """Online Indexable Bayesian Personalized Ranking. Parameters ---------- k: int,...
36.87218
125
0.628467
from .online_ibpr import * from ..recommender import Recommender from ...exception import ScoreException class OnlineIBPR(Recommender): def __init__(self, k=20, max_iter=100, learning_rate=0.05, lamda=0.001, batch_size=100, name="online_ibpr", trainable=True, verbose=False, ini...
true
true
08f80feb0c18ba7cc06dad20a4cbfe6bad32f88e
11,986
py
Python
fastai2/data/transforms.py
lucasavila00/fastai2
bfde2187db3430c8e2fe497596481a0fedc9ff24
[ "Apache-2.0" ]
null
null
null
fastai2/data/transforms.py
lucasavila00/fastai2
bfde2187db3430c8e2fe497596481a0fedc9ff24
[ "Apache-2.0" ]
1
2020-02-26T13:54:52.000Z
2020-02-26T13:54:52.000Z
fastai2/data/transforms.py
lucasavila00/fastai2
bfde2187db3430c8e2fe497596481a0fedc9ff24
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/05_data.transforms.ipynb (unless otherwise specified). __all__ = ['get_files', 'FileGetter', 'image_extensions', 'get_image_files', 'ImageGetter', 'get_text_files', 'RandomSplitter', 'IndexSplitter', 'GrandparentSplitter', 'FuncSplitter', 'MaskSplitter', 'File...
40.630508
139
0.665026
__all__ = ['get_files', 'FileGetter', 'image_extensions', 'get_image_files', 'ImageGetter', 'get_text_files', 'RandomSplitter', 'IndexSplitter', 'GrandparentSplitter', 'FuncSplitter', 'MaskSplitter', 'FileSplitter', 'ColSplitter', 'parent_label', 'RegexLabeller', 'ColReader', 'CategoryMap', 'Cate...
true
true
08f80ff980a6aeb56e88bbd383fb32cfb63f3b98
2,055
py
Python
insight-logger.py
vicenteg/wemomon
32957f2ae7e53403ef7c7638e29366af000c5889
[ "MIT" ]
null
null
null
insight-logger.py
vicenteg/wemomon
32957f2ae7e53403ef7c7638e29366af000c5889
[ "MIT" ]
null
null
null
insight-logger.py
vicenteg/wemomon
32957f2ae7e53403ef7c7638e29366af000c5889
[ "MIT" ]
null
null
null
#!/usr/bin/env python import argparse import sys import json import time import os from ouimeaux.environment import Environment from ouimeaux.utils import matcher from ouimeaux.signals import receiver, statechange, devicefound def write_to_file(name, insight_params, path): data = insight_params data['lastcha...
30.220588
96
0.623358
import argparse import sys import json import time import os from ouimeaux.environment import Environment from ouimeaux.utils import matcher from ouimeaux.signals import receiver, statechange, devicefound def write_to_file(name, insight_params, path): data = insight_params data['lastchange'] = int(data['last...
true
true
08f812142189333edff24806e1a844f917b747bf
364
py
Python
tweet_analysis.py
pandeydivesh15/Twitter-Analysis
acdc89b5ce442035a5488c661608865b62da090f
[ "MIT", "Unlicense" ]
null
null
null
tweet_analysis.py
pandeydivesh15/Twitter-Analysis
acdc89b5ce442035a5488c661608865b62da090f
[ "MIT", "Unlicense" ]
null
null
null
tweet_analysis.py
pandeydivesh15/Twitter-Analysis
acdc89b5ce442035a5488c661608865b62da090f
[ "MIT", "Unlicense" ]
null
null
null
#Imports import json import pandas as pd import matplotlib.pyplot as plt #We load json data and store all tweets in a list. tweets_data_path = './data/twitter_API_data.txt' tweets_data = [] tweets_file = open(tweets_data_path, "r") for line in tweets_file: try: tweet = json.loads(line) tweets_dat...
22.75
51
0.706044
import json import pandas as pd import matplotlib.pyplot as plt tweets_data_path = './data/twitter_API_data.txt' tweets_data = [] tweets_file = open(tweets_data_path, "r") for line in tweets_file: try: tweet = json.loads(line) tweets_data.append(tweet) except: continue
true
true
08f813cd1baa3f04ba0b72ab5fcb8eb1a8c260e0
5,459
py
Python
sl_crazyflie_controller/src/mocap_teleop_controller.py
smARTLab-liv/sl_crazyflie
92a056478d780bec74ec812f37402a1358c83946
[ "MIT", "Unlicense" ]
null
null
null
sl_crazyflie_controller/src/mocap_teleop_controller.py
smARTLab-liv/sl_crazyflie
92a056478d780bec74ec812f37402a1358c83946
[ "MIT", "Unlicense" ]
1
2016-12-12T12:37:17.000Z
2016-12-19T12:03:11.000Z
sl_crazyflie_controller/src/mocap_teleop_controller.py
smARTLab-liv/sl_crazyflie
92a056478d780bec74ec812f37402a1358c83946
[ "MIT", "Unlicense" ]
null
null
null
#!/usr/bin/env python __author__ = 'broecker' import rospy from sensor_msgs.msg import Joy from geometry_msgs.msg import Twist from std_srvs.srv import Empty from sl_crazyflie_srvs.srv import ChangeTargetPose, ChangeTargetPoseRequest, StartWanding import math RATE = 50 TIME_OUT = 0.5 CONTROLLER_RP_THRESH = 0.2 UP = 12...
34.99359
160
0.632717
__author__ = 'broecker' import rospy from sensor_msgs.msg import Joy from geometry_msgs.msg import Twist from std_srvs.srv import Empty from sl_crazyflie_srvs.srv import ChangeTargetPose, ChangeTargetPoseRequest, StartWanding import math RATE = 50 TIME_OUT = 0.5 CONTROLLER_RP_THRESH = 0.2 UP = 12 DOWN = 14 FORWARD = 4...
true
true
08f814c0aeea640437d5f0abe91326b79d03a278
8,741
py
Python
main.py
juansjimenez/ARTravel-API
b5f48a38d27e48b92a236660d889fc7eb55ccfb1
[ "MIT" ]
null
null
null
main.py
juansjimenez/ARTravel-API
b5f48a38d27e48b92a236660d889fc7eb55ccfb1
[ "MIT" ]
null
null
null
main.py
juansjimenez/ARTravel-API
b5f48a38d27e48b92a236660d889fc7eb55ccfb1
[ "MIT" ]
null
null
null
from flask import Flask, render_template, request, abort, json from pymongo import MongoClient from werkzeug.exceptions import BadRequest import pymongo import os USER_KEYS = ['name', 'age', 'description'] MESSAGE_KEYS = ['message', 'sender', 'receptant', 'lat', 'long', 'date'] SEARCH_KEYS = ["desired", "required", ...
37.195745
193
0.581169
from flask import Flask, render_template, request, abort, json from pymongo import MongoClient from werkzeug.exceptions import BadRequest import pymongo import os USER_KEYS = ['name', 'age', 'description'] MESSAGE_KEYS = ['message', 'sender', 'receptant', 'lat', 'long', 'date'] SEARCH_KEYS = ["desired", "required", ...
true
true
08f814f006f121031d3517bd3317456fcfee20c6
808
py
Python
examples/float.py
tlambert03/PyQRangeSlider
8267bdb2d9e096af95dde2759ab27b615ff515b2
[ "BSD-3-Clause" ]
22
2021-04-25T19:45:13.000Z
2022-03-24T12:02:42.000Z
examples/float.py
tlambert03/PyQRangeSlider
8267bdb2d9e096af95dde2759ab27b615ff515b2
[ "BSD-3-Clause" ]
13
2021-05-02T14:46:56.000Z
2021-06-28T12:51:48.000Z
examples/float.py
tlambert03/PyQRangeSlider
8267bdb2d9e096af95dde2759ab27b615ff515b2
[ "BSD-3-Clause" ]
5
2021-06-04T08:12:02.000Z
2022-01-30T17:31:05.000Z
from qtrangeslider import QDoubleRangeSlider, QDoubleSlider, QRangeSlider from qtrangeslider.qtcompat.QtCore import Qt from qtrangeslider.qtcompat.QtWidgets import QApplication, QVBoxLayout, QWidget app = QApplication([]) w = QWidget() sld1 = QDoubleSlider(Qt.Horizontal) sld2 = QDoubleRangeSlider(Qt.Horizontal) rs =...
28.857143
79
0.773515
from qtrangeslider import QDoubleRangeSlider, QDoubleSlider, QRangeSlider from qtrangeslider.qtcompat.QtCore import Qt from qtrangeslider.qtcompat.QtWidgets import QApplication, QVBoxLayout, QWidget app = QApplication([]) w = QWidget() sld1 = QDoubleSlider(Qt.Horizontal) sld2 = QDoubleRangeSlider(Qt.Horizontal) rs =...
true
true
08f8153172d7b2e77fd91eecb71eee278f9d4fca
1,124
py
Python
carla_birdeye_view/actors.py
deepsense-ai/carla_birdeye_view
f666b0f5c11e9a3eb29ea2f9465d6b5526ab1ae0
[ "MIT" ]
59
2020-04-30T08:06:14.000Z
2022-03-21T02:16:44.000Z
carla_birdeye_view/actors.py
deepsense-ai/carla_birdeye_view
f666b0f5c11e9a3eb29ea2f9465d6b5526ab1ae0
[ "MIT" ]
10
2020-09-20T10:19:19.000Z
2021-11-16T08:10:06.000Z
carla_birdeye_view/actors.py
deepsense-ai/carla_birdeye_view
f666b0f5c11e9a3eb29ea2f9465d6b5526ab1ae0
[ "MIT" ]
14
2020-07-28T15:14:25.000Z
2022-01-20T09:47:13.000Z
import carla from typing import NamedTuple, List is_vehicle = lambda actor: "vehicle" in actor.type_id is_pedestrian = lambda actor: "walker" in actor.type_id is_traffic_light = lambda actor: "traffic_light" in actor.type_id class SegregatedActors(NamedTuple): vehicles: List[carla.Actor] pedestrians: List[ca...
30.378378
69
0.699288
import carla from typing import NamedTuple, List is_vehicle = lambda actor: "vehicle" in actor.type_id is_pedestrian = lambda actor: "walker" in actor.type_id is_traffic_light = lambda actor: "traffic_light" in actor.type_id class SegregatedActors(NamedTuple): vehicles: List[carla.Actor] pedestrians: List[ca...
true
true
08f8157139db0af74067e431d5c5de693137c43f
4,704
py
Python
venv/Lib/site-packages/github/tests/GitReleaseAsset.py
adamlkl/GithubDataVisualisation
94dbdb3411fd41e325b03f17e171509fb64c8696
[ "MIT" ]
2
2018-10-04T06:12:38.000Z
2021-08-02T16:39:12.000Z
venv/Lib/site-packages/github/tests/GitReleaseAsset.py
adamlkl/GithubDataVisualisation
94dbdb3411fd41e325b03f17e171509fb64c8696
[ "MIT" ]
null
null
null
venv/Lib/site-packages/github/tests/GitReleaseAsset.py
adamlkl/GithubDataVisualisation
94dbdb3411fd41e325b03f17e171509fb64c8696
[ "MIT" ]
1
2021-11-05T22:16:58.000Z
2021-11-05T22:16:58.000Z
# -*- coding: utf-8 -*- ############################ Copyrights and license ############################ # # # Copyright 2017 Chris McBride <thehighlander@users.noreply.github.com> # # Copyright 2017 Simon <spam@esemi.ru> ...
50.042553
144
0.547619
import datetime from . import Framework from pprint import pprint class ReleaseAsset(Framework.TestCase): def setUp(self): Framework.TestCase.setUp(self) def testAttributes(self): release = self.g.get_user().get_repo("PyGithub").get_releases()[0] self.assertEqual(release.id,...
true
true
08f815a401907710d7bac15dcb326c4b5441d283
4,532
py
Python
src/fab_cards/utils/import_cards.py
dcollinsn/django-fab-cards
8829acfec5084b3635cc26bac934920bafd302d0
[ "MIT" ]
null
null
null
src/fab_cards/utils/import_cards.py
dcollinsn/django-fab-cards
8829acfec5084b3635cc26bac934920bafd302d0
[ "MIT" ]
null
null
null
src/fab_cards/utils/import_cards.py
dcollinsn/django-fab-cards
8829acfec5084b3635cc26bac934920bafd302d0
[ "MIT" ]
null
null
null
import io import json import re import zipfile from contextlib import closing import requests from django.db import transaction from fab_cards.models import Card, Printing, Set API_URL = "https://fabdb.net/api/cards" def fetch_data(): card_data = [] page = 1 while True: r = requests.get(API_URL...
32.371429
98
0.589365
import io import json import re import zipfile from contextlib import closing import requests from django.db import transaction from fab_cards.models import Card, Printing, Set API_URL = "https://fabdb.net/api/cards" def fetch_data(): card_data = [] page = 1 while True: r = requests.get(API_URL...
true
true
08f816058052bfd08180a9e7274d1d8453e25d89
16,810
py
Python
vininfo/dicts/wmi.py
dsandshr/vininfo
fec8d3731ba61060a488de2641b5353fa11da33e
[ "BSD-3-Clause" ]
null
null
null
vininfo/dicts/wmi.py
dsandshr/vininfo
fec8d3731ba61060a488de2641b5353fa11da33e
[ "BSD-3-Clause" ]
null
null
null
vininfo/dicts/wmi.py
dsandshr/vininfo
fec8d3731ba61060a488de2641b5353fa11da33e
[ "BSD-3-Clause" ]
null
null
null
from ..brands import Lada, Nissan, Opel, Renault # NOTE: # if you want to extend this mapping with new WMIs, please use # vininfo.utils.merge_wmi() function and replace the entire WMI with # the result of this function. This comment must stay intact. WMI = { '000': 'Maserati', '04W': 'Buick', '0VF': 'Ford'...
24.152299
68
0.483165
from ..brands import Lada, Nissan, Opel, Renault WMI = { '000': 'Maserati', '04W': 'Buick', '0VF': 'Ford', '112': 'Volkswagen', '115': 'Mercedes-Benz', '117': 'Volkswagen', '119': 'Replica/Kit Makes', '123': 'Mercedes-Benz', '124': 'Chevrolet', '137': 'AM', '178': 'Jaguar', ...
true
true
08f81645da3d1edab78bff887ffeab4a6d169450
12,548
py
Python
ion/agents/platform/util/network.py
ooici/coi-services
43246f46a82e597345507afd7dfc7373cb346afa
[ "BSD-2-Clause" ]
3
2016-09-20T09:50:06.000Z
2018-08-10T01:41:38.000Z
ion/agents/platform/util/network.py
ooici/coi-services
43246f46a82e597345507afd7dfc7373cb346afa
[ "BSD-2-Clause" ]
null
null
null
ion/agents/platform/util/network.py
ooici/coi-services
43246f46a82e597345507afd7dfc7373cb346afa
[ "BSD-2-Clause" ]
2
2016-03-16T22:25:49.000Z
2016-11-26T14:54:21.000Z
#!/usr/bin/env python """ @package ion.agents.platform.util.network @file ion/agents/platform/util/network.py @author Carlos Rueda @brief Supporting elements for convenient representation of a platform network """ __author__ = 'Carlos Rueda' class BaseNode(object): """ A convenient base class for the ...
30.754902
91
0.606152
__author__ = 'Carlos Rueda' class BaseNode(object): def __init__(self): pass def diff(self, other): raise NotImplementedError() class AttrNode(BaseNode): def __init__(self, attr_id, defn): BaseNode.__init__(self) self._attr_id = attr_id defn['attr_id'] = self....
true
true
08f8166964cf6ec834438786a21a106c03329684
82,725
py
Python
test/test_jit_fuser_te.py
PaliC/pytorch
d1a5612a3ea501b83a80b9ecfd6b4dd5eb125181
[ "Intel" ]
null
null
null
test/test_jit_fuser_te.py
PaliC/pytorch
d1a5612a3ea501b83a80b9ecfd6b4dd5eb125181
[ "Intel" ]
null
null
null
test/test_jit_fuser_te.py
PaliC/pytorch
d1a5612a3ea501b83a80b9ecfd6b4dd5eb125181
[ "Intel" ]
null
null
null
import operator import unittest import contextlib import math import torch import torch.nn.functional as F from torch.testing import FileCheck from typing import List # these needs to be set before `common_utils` # infers `GRAPH_EXECUTOR`. # this file **requires** these settings # and setting them after `GRAPH_EXECUTO...
38.10456
115
0.542871
import operator import unittest import contextlib import math import torch import torch.nn.functional as F from torch.testing import FileCheck from typing import List torch._C._jit_set_profiling_executor(True) torch._C._jit_set_profiling_mode(True) from torch.testing._internal.common_utils import run_tests, Profiling...
true
true
08f816dcd46c2d836e1ec2857dcfbe4a247fedd6
5,027
py
Python
xp_models/XP_RL/AnyLogic-Python/python_v2/RL_SIM.py
ILABUTK/handson-ml
dd42ed2cae1d3c1e44dffba3a324c21154f13c01
[ "Apache-2.0" ]
null
null
null
xp_models/XP_RL/AnyLogic-Python/python_v2/RL_SIM.py
ILABUTK/handson-ml
dd42ed2cae1d3c1e44dffba3a324c21154f13c01
[ "Apache-2.0" ]
null
null
null
xp_models/XP_RL/AnyLogic-Python/python_v2/RL_SIM.py
ILABUTK/handson-ml
dd42ed2cae1d3c1e44dffba3a324c21154f13c01
[ "Apache-2.0" ]
1
2020-03-12T14:52:31.000Z
2020-03-12T14:52:31.000Z
""" Reinforcement learning. """ # import import re import json import logging import subprocess import numpy as np class RL_Sim_Env: """ Reinforcement learning class, using ANYLOGIC to simulate; - java_cmd: java command to run the model; - no transition function; """ def __init__( se...
29.057803
73
0.463497
import re import json import logging import subprocess import numpy as np class RL_Sim_Env: def __init__( self, name, states, actions, java_cmd, discount_factor ): self.name = name self.states = states self.actions = actions self.java_cmd = java_cmd self.disco...
true
true
08f81732e5f0f76762809c4b8eeca8737b13bcf4
1,257
py
Python
views/windows/about_window.py
RamonWill/portfolio-management-project
ac8ce313f8d62f09810fc1da19d6b252f193871b
[ "MIT" ]
14
2020-01-01T04:59:06.000Z
2022-02-08T06:48:21.000Z
views/windows/about_window.py
linhvien/portfolio-management-project
ac8ce313f8d62f09810fc1da19d6b252f193871b
[ "MIT" ]
null
null
null
views/windows/about_window.py
linhvien/portfolio-management-project
ac8ce313f8d62f09810fc1da19d6b252f193871b
[ "MIT" ]
8
2020-10-15T06:52:37.000Z
2021-10-04T06:44:36.000Z
import tkinter as tk from .basewindow import BaseWindow class AboutWindow(BaseWindow): def __init__(self): super().__init__() self.geometry("500x500") self.resizable(0, 0) self.title("About") bio = """PRMSystem is a portfolio management project created by\n Ramon ...
40.548387
82
0.672235
import tkinter as tk from .basewindow import BaseWindow class AboutWindow(BaseWindow): def __init__(self): super().__init__() self.geometry("500x500") self.resizable(0, 0) self.title("About") bio = """PRMSystem is a portfolio management project created by\n Ramon ...
true
true
08f81783c46f78187043f92ae461440a81fd139e
12,973
py
Python
Utility/Torch/Sparse/Parameter.py
smithblack-0/Utility
875ab69fffad1412174d9d0a1de70edc1fd64152
[ "MIT" ]
null
null
null
Utility/Torch/Sparse/Parameter.py
smithblack-0/Utility
875ab69fffad1412174d9d0a1de70edc1fd64152
[ "MIT" ]
null
null
null
Utility/Torch/Sparse/Parameter.py
smithblack-0/Utility
875ab69fffad1412174d9d0a1de70edc1fd64152
[ "MIT" ]
null
null
null
import collections import math import uuid import torch import torch_sparse import warnings from torch import nn from typing import Union, Optional, Callable, Sequence class SparseParameter(nn.Module): """ A class to build a torch-sparse compatible pseudodynamic parameter manager. One may request a r...
41.184127
111
0.612965
import collections import math import uuid import torch import torch_sparse import warnings from torch import nn from typing import Union, Optional, Callable, Sequence class SparseParameter(nn.Module): """ A class to build a torch-sparse compatible pseudodynamic parameter manager. One may request a r...
false
true
08f81892bd4566b87aa7860ca25875264fe071c4
40,050
py
Python
config/custom_components/mitemp_bt/sensor.py
Poeschl/home-assistant-config
380640bc46b14542866fbf8bbdc4218b2d58b55c
[ "MIT" ]
7
2020-05-29T11:54:36.000Z
2021-11-20T06:24:31.000Z
config/custom_components/mitemp_bt/sensor.py
Poeschl/home-assistant-config
380640bc46b14542866fbf8bbdc4218b2d58b55c
[ "MIT" ]
null
null
null
config/custom_components/mitemp_bt/sensor.py
Poeschl/home-assistant-config
380640bc46b14542866fbf8bbdc4218b2d58b55c
[ "MIT" ]
1
2022-02-17T03:13:52.000Z
2022-02-17T03:13:52.000Z
"""Xiaomi passive BLE monitor integration.""" import asyncio from datetime import timedelta import logging import statistics as sts import struct from threading import Thread from time import sleep import aioblescan as aiobs from Cryptodome.Cipher import AES import voluptuous as vol from homeassistant.const import ( ...
35.822898
94
0.550836
import asyncio from datetime import timedelta import logging import statistics as sts import struct from threading import Thread from time import sleep import aioblescan as aiobs from Cryptodome.Cipher import AES import voluptuous as vol from homeassistant.const import ( CONF_DEVICES, CONF_DISCOVERY, CONF...
true
true
08f81a4f490a5d71e7fb239603f423d8457cf413
8,933
py
Python
contrib/linearize/linearize-data.py
AltcoinNelis/dreamcoin
c2d664dcc411a3fccf072ea85ea03507fd570f45
[ "MIT" ]
null
null
null
contrib/linearize/linearize-data.py
AltcoinNelis/dreamcoin
c2d664dcc411a3fccf072ea85ea03507fd570f45
[ "MIT" ]
null
null
null
contrib/linearize/linearize-data.py
AltcoinNelis/dreamcoin
c2d664dcc411a3fccf072ea85ea03507fd570f45
[ "MIT" ]
null
null
null
#!/usr/bin/python # # linearize-data.py: Construct a linear, no-fork version of the chain. # # Copyright (c) 2013-2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from __future__ import print_func...
29.19281
108
0.689578
from __future__ import print_function, division import json import struct import re import os import os.path import base64 import httplib import sys import hashlib import dreamcoin_hash import datetime import time from collections import namedtuple settings = {} def uint32(x): return x & 0xffffffffL def byterevers...
false
true
08f81a5bdc85aeda380bf9e4ea368089c8fece99
922
py
Python
routes/base.py
kolybasov/ankor
0b1aac9d00adf55906293c46c6c2101a5b3f2da7
[ "MIT" ]
null
null
null
routes/base.py
kolybasov/ankor
0b1aac9d00adf55906293c46c6c2101a5b3f2da7
[ "MIT" ]
null
null
null
routes/base.py
kolybasov/ankor
0b1aac9d00adf55906293c46c6c2101a5b3f2da7
[ "MIT" ]
null
null
null
from flask import request from abc import ABC class BaseRoute(ABC): def __init__(self, env): self.env = env def call(self, *args, **kwargs): handler = self.__handler__(request.method) if type(handler) is dict: method = 'index' if len(kwargs) == 0 else 'show' h...
29.741935
61
0.529284
from flask import request from abc import ABC class BaseRoute(ABC): def __init__(self, env): self.env = env def call(self, *args, **kwargs): handler = self.__handler__(request.method) if type(handler) is dict: method = 'index' if len(kwargs) == 0 else 'show' h...
true
true
08f81a9834a6ed1b3f5941e7d875ebdd583c2ade
711
py
Python
tests/test_exceptions.py
smok-serwis/coolamqp
d57ada0d478bd1ca94743ae341f6819ba85ea253
[ "MIT" ]
4
2018-06-20T13:59:35.000Z
2021-08-31T12:03:59.000Z
tests/test_exceptions.py
piotrmaslanka/coolamqp
d57ada0d478bd1ca94743ae341f6819ba85ea253
[ "MIT" ]
33
2016-06-03T11:41:09.000Z
2020-07-09T17:48:28.000Z
tests/test_exceptions.py
smok-serwis/coolamqp
d57ada0d478bd1ca94743ae341f6819ba85ea253
[ "MIT" ]
null
null
null
# coding=UTF-8 from __future__ import print_function, absolute_import, division import unittest from coolamqp.exceptions import AMQPError class TestExcs(unittest.TestCase): def test_exist(self): e = AMQPError(100, u'wtf', 0, 0) self.assertTrue(u'100' in str(e)) self.assertTrue(u'wtf' in...
28.44
67
0.639944
from __future__ import print_function, absolute_import, division import unittest from coolamqp.exceptions import AMQPError class TestExcs(unittest.TestCase): def test_exist(self): e = AMQPError(100, u'wtf', 0, 0) self.assertTrue(u'100' in str(e)) self.assertTrue(u'wtf' in str(e)) ...
true
true
08f81aabad131c7bfe34f745dbf31b1500f75da6
9,696
py
Python
tests/unit/test_cli.py
movermeyer/openphoto-python
209a1da27c8d8c88dbcf4ea6c6f57031ea1bc44b
[ "Apache-2.0" ]
3
2015-02-11T10:48:28.000Z
2015-11-05T18:50:53.000Z
tests/unit/test_cli.py
movermeyer/openphoto-python
209a1da27c8d8c88dbcf4ea6c6f57031ea1bc44b
[ "Apache-2.0" ]
null
null
null
tests/unit/test_cli.py
movermeyer/openphoto-python
209a1da27c8d8c88dbcf4ea6c6f57031ea1bc44b
[ "Apache-2.0" ]
5
2015-02-09T22:01:30.000Z
2018-03-04T21:53:28.000Z
from __future__ import unicode_literals import os import sys import shutil import mock try: import StringIO as io # Python2 except ImportError: import io # Python3 try: import unittest2 as unittest # Python2.6 except ImportError: import unittest import trovebox from trovebox.main import main class Tes...
44.888889
81
0.652434
from __future__ import unicode_literals import os import sys import shutil import mock try: import StringIO as io except ImportError: import io try: import unittest2 as unittest except ImportError: import unittest import trovebox from trovebox.main import main class TestException(Exception): pass ...
true
true
08f81ae6e50b31a73d8cf0f4d7b3728bf86c8493
3,894
py
Python
cli/maticetl/mappers/block_mapper.py
mathewdgardner/matic-etl
36630507808be23f3570a7a2f333dc21ca09b2f9
[ "MIT" ]
null
null
null
cli/maticetl/mappers/block_mapper.py
mathewdgardner/matic-etl
36630507808be23f3570a7a2f333dc21ca09b2f9
[ "MIT" ]
null
null
null
cli/maticetl/mappers/block_mapper.py
mathewdgardner/matic-etl
36630507808be23f3570a7a2f333dc21ca09b2f9
[ "MIT" ]
null
null
null
# MIT License # # Copyright (c) 2018 Evgeny Medvedev, evge.medvedev@gmail.com # # 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 # ...
43.752809
101
0.679764
from maticetl.domain.block import EthBlock from maticetl.mappers.transaction_mapper import EthTransactionMapper from maticetl.utils import hex_to_dec, to_normalized_address class EthBlockMapper(object): def __init__(self, transaction_mapper=None): if transaction_mapper is None: self.transact...
true
true
08f81b68ac398058e9e71b500b6c5a41f57e8ecc
601
py
Python
Lintcode/Ladder_28_S/1_Easy/957. Radar Detection.py
ctc316/algorithm-python
ac4580d55e05e93e407c6156c9bb801808027d60
[ "MIT" ]
null
null
null
Lintcode/Ladder_28_S/1_Easy/957. Radar Detection.py
ctc316/algorithm-python
ac4580d55e05e93e407c6156c9bb801808027d60
[ "MIT" ]
null
null
null
Lintcode/Ladder_28_S/1_Easy/957. Radar Detection.py
ctc316/algorithm-python
ac4580d55e05e93e407c6156c9bb801808027d60
[ "MIT" ]
null
null
null
""" Definition for a point. class Point: def __init__(self, a=0, b=0): self.x = a self.y = b """ class Solution: """ @param coordinates: The radars' coordinate @param radius: Detection radius of radars @return: The car was detected or not """ def radarDetection...
26.130435
94
0.544093
class Solution: def radarDetection(self, coordinates, radius): if len(coordinates) == 0: return "NO" for i in range(len(coordinates)): if abs(coordinates[i].y) <= radius[i] and abs(coordinates[i].y - 1) <= radius[i]: return "YES" return "N...
true
true
08f81c767e6be367b636da595ccee6937060273a
16,454
py
Python
dark/mutations.py
UdoGi/dark-matter
3d49e89fa5e81f83144119f6216c5774176d203b
[ "MIT" ]
null
null
null
dark/mutations.py
UdoGi/dark-matter
3d49e89fa5e81f83144119f6216c5774176d203b
[ "MIT" ]
null
null
null
dark/mutations.py
UdoGi/dark-matter
3d49e89fa5e81f83144119f6216c5774176d203b
[ "MIT" ]
null
null
null
import os from collections import defaultdict import numpy as np try: import matplotlib if not os.environ.get('DISPLAY'): # Use non-interactive Agg backend matplotlib.use('Agg') import matplotlib.pyplot as plt except ImportError: import platform if platform.python_implementation() =...
36.564444
79
0.545825
import os from collections import defaultdict import numpy as np try: import matplotlib if not os.environ.get('DISPLAY'): matplotlib.use('Agg') import matplotlib.pyplot as plt except ImportError: import platform if platform.python_implementation() == 'PyPy': # class ...
true
true
08f81c8945f9718f36a3eadae3c726bed52895a1
1,006
py
Python
setup.py
dokterbob/django-admin-sortable
4e5e4af8b157cc323acbb69491f1b08b9f3e62bf
[ "MS-PL", "Naumen", "Condor-1.1", "Apache-1.1" ]
null
null
null
setup.py
dokterbob/django-admin-sortable
4e5e4af8b157cc323acbb69491f1b08b9f3e62bf
[ "MS-PL", "Naumen", "Condor-1.1", "Apache-1.1" ]
null
null
null
setup.py
dokterbob/django-admin-sortable
4e5e4af8b157cc323acbb69491f1b08b9f3e62bf
[ "MS-PL", "Naumen", "Condor-1.1", "Apache-1.1" ]
null
null
null
from setuptools import setup, find_packages try: README = open('README').read() except: README = None setup( name='django-admin-sortable', version=__import__('adminsortable').__version__, description='Drag and drop sorting for models and inline models in Django admin', long_descript...
34.689655
86
0.593439
from setuptools import setup, find_packages try: README = open('README').read() except: README = None setup( name='django-admin-sortable', version=__import__('adminsortable').__version__, description='Drag and drop sorting for models and inline models in Django admin', long_descript...
true
true
08f81cc5a33f3e6dde8821b279b04d39ddc61b83
1,316
py
Python
Test_Python_code/final_code/Indonesia/Test_Indo_Epidermic.py
pdeesawat/PSIT58_test_01
631946eacd82503e0697680f06290a4fe10f17f2
[ "Apache-2.0" ]
null
null
null
Test_Python_code/final_code/Indonesia/Test_Indo_Epidermic.py
pdeesawat/PSIT58_test_01
631946eacd82503e0697680f06290a4fe10f17f2
[ "Apache-2.0" ]
null
null
null
Test_Python_code/final_code/Indonesia/Test_Indo_Epidermic.py
pdeesawat/PSIT58_test_01
631946eacd82503e0697680f06290a4fe10f17f2
[ "Apache-2.0" ]
null
null
null
data = open('Real_Final_database_02.csv') alldata = data.readlines() listdata = [] for i in alldata: listdata.append(i.strip().split(',')) #Seperate each list to display in graph year = [] affect = [] damage = [] death =[] for j in listdata: if j[0] == 'Indonesia'and j[2] == 'Epidemic': year.append(int...
21.225806
50
0.582067
data = open('Real_Final_database_02.csv') alldata = data.readlines() listdata = [] for i in alldata: listdata.append(i.strip().split(',')) year = [] affect = [] damage = [] death =[] for j in listdata: if j[0] == 'Indonesia'and j[2] == 'Epidemic': year.append(int(j[1])) affect.append(int(j[3]))...
true
true
08f81d6bbdf195f8d7270e95978a177d763df09a
21,806
py
Python
unpythonic/syntax/tests/test_letdo.py
Technologicat/unpythonic
7d99d50c5d1c3151fb822491167a7008024d97a5
[ "BSD-2-Clause" ]
55
2018-07-26T15:52:22.000Z
2022-01-28T00:53:59.000Z
unpythonic/syntax/tests/test_letdo.py
Technologicat/unpythonic
7d99d50c5d1c3151fb822491167a7008024d97a5
[ "BSD-2-Clause" ]
85
2019-07-24T11:02:45.000Z
2022-01-31T22:00:23.000Z
unpythonic/syntax/tests/test_letdo.py
Technologicat/unpythonic
7d99d50c5d1c3151fb822491167a7008024d97a5
[ "BSD-2-Clause" ]
2
2020-09-04T21:39:19.000Z
2022-01-12T03:41:50.000Z
# -*- coding: utf-8 -*- """Let constructs; do (imperative code in expression position).""" # TODO: Update the @dlet, @dletseq, @dletrec, @blet, @bletseq, @bletrec examples # TODO: to pass macro arguments using brackets once we bump to minimum Python 3.9. from ...syntax import macros, test, test_raises # noqa: F401 f...
38.869875
123
0.47409
from ...syntax import macros, test, test_raises from ...test.fixtures import session, testset from ...syntax import (macros, let, letseq, letrec, where, dlet, dletseq, dletrec, blet, bletseq, bletrec, do, do0, local, delete) from ...seq import b...
true
true
08f81fa68ded42e198d6bfc6ab7a62a3759b2a38
704
py
Python
wavefront_sdk/__init__.py
keep94/wavefront-sdk-python
caa4e137a61757cfad6813dc5ebe2ca5f776f27f
[ "ECL-2.0", "Apache-2.0" ]
3
2019-04-11T15:37:23.000Z
2021-02-04T20:30:02.000Z
wavefront_sdk/__init__.py
keep94/wavefront-sdk-python
caa4e137a61757cfad6813dc5ebe2ca5f776f27f
[ "ECL-2.0", "Apache-2.0" ]
32
2018-12-07T22:42:01.000Z
2022-03-17T18:31:34.000Z
wavefront_sdk/__init__.py
keep94/wavefront-sdk-python
caa4e137a61757cfad6813dc5ebe2ca5f776f27f
[ "ECL-2.0", "Apache-2.0" ]
17
2018-12-17T22:16:08.000Z
2022-03-10T08:01:48.000Z
"""Wavefront Python SDK. This library provides support for sending metrics, histograms and opentracing spans to Wavefront via proxy or direct ingestion. @author Hao Song (songhao@vmware.com) """ import pkg_resources from .client_factory import WavefrontClientFactory from .direct import WavefrontDirectClient from .p...
24.275862
77
0.768466
import pkg_resources from .client_factory import WavefrontClientFactory from .direct import WavefrontDirectClient from .proxy import WavefrontProxyClient __all__ = ['WavefrontDirectClient', 'WavefrontProxyClient', 'WavefrontClientFactory'] __version__ = None try: __version__ = pkg_resour...
true
true
08f81fc404deef542bdb5554abb44eef3a9f206e
105,858
py
Python
ansys_corba/omniORB/COS/CosTrading_idl.py
pyansys/ansys_corba
91e4e66a48143c827f56cf1113145bb48d5f4d6a
[ "MIT" ]
6
2021-04-26T09:25:48.000Z
2022-03-26T05:09:38.000Z
ansys_corba/omniORB/COS/CosTrading_idl.py
pyansys/ansys_corba
91e4e66a48143c827f56cf1113145bb48d5f4d6a
[ "MIT" ]
3
2022-03-14T08:17:21.000Z
2022-03-17T20:07:23.000Z
ansys_corba/omniORB/COS/CosTrading_idl.py
pyansys/pymapdl-corba
91e4e66a48143c827f56cf1113145bb48d5f4d6a
[ "MIT" ]
1
2020-11-11T11:10:19.000Z
2020-11-11T11:10:19.000Z
# Python stubs generated by omniidl from /tmp/corba/omni/share/idl/omniORB/COS/CosTrading.idl # DO NOT EDIT THIS FILE! import omniORB, _omnipy from omniORB import CORBA, PortableServer _0_CORBA = CORBA _omnipy.checkVersion(4,2, __file__, 1) try: property except NameError: def property(*args): return...
58.84269
1,515
0.805286
import omniORB, _omnipy from omniORB import CORBA, PortableServer _0_CORBA = CORBA _omnipy.checkVersion(4,2, __file__, 1) try: property except NameError: def property(*args): return None __name__ = "CosTrading" _0_CosTrading = omniORB.openModule("CosTrading", r"/tmp/corba/omni/share/idl/omniORB/CO...
true
true
08f8202ac6479e2e9b0f0893438b1bcbe7a9ec4b
45
py
Python
tests/config.py
hbdmapi/huobi_sdk_Python
a4ee876f947011fb5d66da32853cb3a21d852a4b
[ "MIT" ]
1
2022-03-13T16:55:34.000Z
2022-03-13T16:55:34.000Z
tests/config.py
hbdmapi/huobi_sdk_Python
a4ee876f947011fb5d66da32853cb3a21d852a4b
[ "MIT" ]
null
null
null
tests/config.py
hbdmapi/huobi_sdk_Python
a4ee876f947011fb5d66da32853cb3a21d852a4b
[ "MIT" ]
null
null
null
ACCESS_KEY = "x-x-x-x" SECRET_KEY = "x-x-x-x"
22.5
22
0.622222
ACCESS_KEY = "x-x-x-x" SECRET_KEY = "x-x-x-x"
true
true
08f8250d6ee5b6eca19eff5bdc17feed0b493243
512
py
Python
001146StepikPyBegin/Stepik001146PyBeginсh07p08st05TASK01_20210122.py
SafonovMikhail/python_000577
739f764e80f1ca354386f00b8e9db1df8c96531d
[ "Apache-2.0" ]
null
null
null
001146StepikPyBegin/Stepik001146PyBeginсh07p08st05TASK01_20210122.py
SafonovMikhail/python_000577
739f764e80f1ca354386f00b8e9db1df8c96531d
[ "Apache-2.0" ]
null
null
null
001146StepikPyBegin/Stepik001146PyBeginсh07p08st05TASK01_20210122.py
SafonovMikhail/python_000577
739f764e80f1ca354386f00b8e9db1df8c96531d
[ "Apache-2.0" ]
null
null
null
''' Дано натуральное число (n<=9). Напишите программу, которая печатает таблицу размером n×3 состоящую из данного числа (числа отделены одним пробелом). Формат входных данных На вход программе подается одно натуральное число. Формат выходных данных Программа должна вывести таблицу размером n×3 состоящую из данного чи...
24.380952
84
0.699219
num = int(input()) for i in range(num): j = 0 while j < 3: print(f'{num} ', end='') j += 1 print()
true
true
08f825646e1d1ef0b62e6018f093b3692876fa32
323
py
Python
timely_beliefs/tests/test_utils.py
SeitaBV/timely-beliefs
145ae53449393d27c140645fe4c289f4624cc77b
[ "MIT" ]
12
2018-12-20T21:42:21.000Z
2022-01-06T18:31:53.000Z
timely_beliefs/tests/test_utils.py
SeitaBV/timely-beliefs
145ae53449393d27c140645fe4c289f4624cc77b
[ "MIT" ]
51
2019-03-26T12:28:17.000Z
2022-01-21T22:50:13.000Z
timely_beliefs/tests/test_utils.py
SeitaBV/timely-beliefs
145ae53449393d27c140645fe4c289f4624cc77b
[ "MIT" ]
5
2019-06-03T14:38:07.000Z
2019-10-28T21:10:35.000Z
from timely_beliefs.utils import remove_class_init_kwargs def test_remove_used_kwargs(): class MyCls: def __init__(self, a, b): pass kwargs = dict(a=1, b=2, c=3, d=4, self=5) remaining_kwargs = remove_class_init_kwargs(MyCls, kwargs) assert remaining_kwargs == dict(c=3, d=4, self=...
26.916667
62
0.678019
from timely_beliefs.utils import remove_class_init_kwargs def test_remove_used_kwargs(): class MyCls: def __init__(self, a, b): pass kwargs = dict(a=1, b=2, c=3, d=4, self=5) remaining_kwargs = remove_class_init_kwargs(MyCls, kwargs) assert remaining_kwargs == dict(c=3, d=4, self=...
true
true
08f825ccdef610da65e640ea1d8e34e62e77e9fe
1,150
py
Python
tests/test_all.py
space-physics/transcar
a9305bd29723beb45004a8882627fa518d8a1bb6
[ "Apache-2.0" ]
3
2019-06-13T11:32:22.000Z
2020-12-02T10:31:46.000Z
tests/test_all.py
scivision/transcar
a9305bd29723beb45004a8882627fa518d8a1bb6
[ "Apache-2.0" ]
null
null
null
tests/test_all.py
scivision/transcar
a9305bd29723beb45004a8882627fa518d8a1bb6
[ "Apache-2.0" ]
1
2019-07-08T19:03:24.000Z
2019-07-08T19:03:24.000Z
#!/usr/bin/env python import pandas from pathlib import Path import pytest from pytest import approx import transcar.base as transcar import transcarread as tr root = Path(__file__).parents[1] beam = "beam947.2" refdir = root / "tests" / beam kinfn = "dir.output/emissions.dat" def test_run_transcar(tmp_path): o...
28.75
120
0.672174
import pandas from pathlib import Path import pytest from pytest import approx import transcar.base as transcar import transcarread as tr root = Path(__file__).parents[1] beam = "beam947.2" refdir = root / "tests" / beam kinfn = "dir.output/emissions.dat" def test_run_transcar(tmp_path): odir = tmp_path pa...
true
true
08f8268c7c47fde7ad9e2c2d5519e24206251987
165
py
Python
agazeta/core/forms.py
Scoppio/a-gazeta-de-geringontzan
7166f8f453d578cc3b249c5305d12fc36e95d38a
[ "MIT" ]
null
null
null
agazeta/core/forms.py
Scoppio/a-gazeta-de-geringontzan
7166f8f453d578cc3b249c5305d12fc36e95d38a
[ "MIT" ]
null
null
null
agazeta/core/forms.py
Scoppio/a-gazeta-de-geringontzan
7166f8f453d578cc3b249c5305d12fc36e95d38a
[ "MIT" ]
null
null
null
from django import forms from .models import apikeys class ApiForm(forms.ModelForm): class Meta: model = apikeys exclude = ('id', 'validToken')
20.625
38
0.666667
from django import forms from .models import apikeys class ApiForm(forms.ModelForm): class Meta: model = apikeys exclude = ('id', 'validToken')
true
true
08f826fa73f477d407319c9232b3a5185db5cb20
6,512
py
Python
sdk/python/pulumi_azure_native/security/get_alerts_suppression_rule.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/security/get_alerts_suppression_rule.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/security/get_alerts_suppression_rule.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "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 from .. import _utilities, _tables from ...
35.78022
195
0.656327
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilities, _tables from . import outputs __all__ = [ 'GetAlertsSuppressionRuleResult', 'AwaitableGetAlertsSuppressionRuleResult', 'get_alerts_suppression_rule', ] @pulumi.output_...
true
true
08f8287a4177a3a7d14917c827af4c2b19520857
2,794
py
Python
utils.py
AkarExcel/backtesting_binance
21693566008b7030b7e775d89a13193740924b3b
[ "MIT" ]
null
null
null
utils.py
AkarExcel/backtesting_binance
21693566008b7030b7e775d89a13193740924b3b
[ "MIT" ]
null
null
null
utils.py
AkarExcel/backtesting_binance
21693566008b7030b7e775d89a13193740924b3b
[ "MIT" ]
null
null
null
import datetime from ctypes import * import pandas as pd TF_EQUIV = {"1m": "1Min", "5m": "5Min", "15m": "15Min", "30m": "30Min", "1h": "1H", "4h": "4H", "12h": "12H", "1d": "D"} STRAT_PARAMS = { "obv": { "ma_period": {"name": "MA Period", "type": int, "min": 2, "max": 200}, }, "ichimoku": { ...
39.352113
120
0.599857
import datetime from ctypes import * import pandas as pd TF_EQUIV = {"1m": "1Min", "5m": "5Min", "15m": "15Min", "30m": "30Min", "1h": "1H", "4h": "4H", "12h": "12H", "1d": "D"} STRAT_PARAMS = { "obv": { "ma_period": {"name": "MA Period", "type": int, "min": 2, "max": 200}, }, "ichimoku": { ...
true
true
08f828cd73ec4ad382bb460402d0d41032bb5cec
19,435
py
Python
policy/SummaryUtils.py
helloric/pydial3
34988f4592c4e28388b2818de8768d841696efbb
[ "Apache-2.0" ]
null
null
null
policy/SummaryUtils.py
helloric/pydial3
34988f4592c4e28388b2818de8768d841696efbb
[ "Apache-2.0" ]
null
null
null
policy/SummaryUtils.py
helloric/pydial3
34988f4592c4e28388b2818de8768d841696efbb
[ "Apache-2.0" ]
null
null
null
############################################################################### # PyDial: Multi-domain Statistical Spoken Dialogue System Software ############################################################################### # # Copyright 2015 - 2019 # Cambridge University Engineering Department Dialogue Systems Grou...
38.107843
119
0.659223
__author__ = "cued_dialogue_systems_group" import copy from scipy.stats import entropy from ontology import Ontology from utils import ContextLogger, Settings logger = ContextLogger.getLogger('') global_summary_features = ['GLOBAL_BYCONSTRAINTS', 'GLOBAL_BYALTERNATIVES', ...
true
true
08f8295495467d298e954bdd92c4e40c6edff2ad
22,818
py
Python
veff.py
alimanfoo/veff
0ce760f0cee5f353703dde27184cb7ff5f7e1378
[ "MIT" ]
null
null
null
veff.py
alimanfoo/veff
0ce760f0cee5f353703dde27184cb7ff5f7e1378
[ "MIT" ]
null
null
null
veff.py
alimanfoo/veff
0ce760f0cee5f353703dde27184cb7ff5f7e1378
[ "MIT" ]
null
null
null
from __future__ import division, print_function import collections import operator import petl as etl import petlx.bio import pyfasta from Bio.Seq import Seq class Genome(object): def __init__(self, fasta_path, gff3_path, seqid=None): """ An an...
34.056716
80
0.545622
from __future__ import division, print_function import collections import operator import petl as etl import petlx.bio import pyfasta from Bio.Seq import Seq class Genome(object): def __init__(self, fasta_path, gff3_path, seqid=None): self._fa...
true
true
08f82956e5a3797388119bf5153e31ebc0293d9c
1,240
py
Python
module1-python-modules-packages-and-environments/lambdata-JoshuaPMallory/lambdata_joshuapmallory/__init__.py
JoshuaPMallory/DS-Unit-3-Sprint-1-Software-Engineering
0736656f45258b72d1f155f06483e3bf4007acff
[ "MIT" ]
null
null
null
module1-python-modules-packages-and-environments/lambdata-JoshuaPMallory/lambdata_joshuapmallory/__init__.py
JoshuaPMallory/DS-Unit-3-Sprint-1-Software-Engineering
0736656f45258b72d1f155f06483e3bf4007acff
[ "MIT" ]
null
null
null
module1-python-modules-packages-and-environments/lambdata-JoshuaPMallory/lambdata_joshuapmallory/__init__.py
JoshuaPMallory/DS-Unit-3-Sprint-1-Software-Engineering
0736656f45258b72d1f155f06483e3bf4007acff
[ "MIT" ]
null
null
null
""" Docstring How to set up a python package - A pipenvironment, so import pipenv, run pipenv in the directory you intend to use it. - Any LICENSE file you need. - Create a setup file with these minimum things: - import setuptools - required packages - setuptools.setup(everything that's needed here) - A f...
23.396226
159
0.712903
import lambdata_joshuapmallory.plotting_functions import lambdata_joshuapmallory.utility_functions class thing: def __init__(self): variable = 1 def some_function(self, x): print(x)
true
true
08f82ad18773dbfb1d1cc4108d97c884457d365b
212
py
Python
examples/some_activity/tests.py
klausfmh/pypeman
4eabfc537fb9b995480d65f8233f767fe99efcc1
[ "Apache-2.0" ]
6
2016-04-19T15:26:11.000Z
2021-03-16T18:06:53.000Z
examples/some_activity/tests.py
mhcomm/pypeman
6583fae28bcb47e3b8091c39a91854ae36172cbd
[ "Apache-2.0" ]
68
2016-05-12T16:10:11.000Z
2022-03-02T01:30:36.000Z
examples/some_activity/tests.py
klausfmh/pypeman
4eabfc537fb9b995480d65f8233f767fe99efcc1
[ "Apache-2.0" ]
9
2015-12-23T08:23:03.000Z
2021-09-03T09:22:51.000Z
from pypeman.test import PypeTestCase # from pypeman.message import Message class MyChanTest(PypeTestCase): def test1_great_channel(self): """ Test example """ self.get_channel("periodic")
21.2
37
0.712264
from pypeman.test import PypeTestCase class MyChanTest(PypeTestCase): def test1_great_channel(self): self.get_channel("periodic")
true
true
08f82ad33d5ba246a511b9eaf1ec1562f197f0d1
18,793
py
Python
tools/pythonpkg/tests/fast/arrow/test_filter_pushdown.py
lokax/duckdb
c2581dfebccaebae9468c924c2c722fcf0306944
[ "MIT" ]
1
2022-01-06T17:44:07.000Z
2022-01-06T17:44:07.000Z
tools/pythonpkg/tests/fast/arrow/test_filter_pushdown.py
lokax/duckdb
c2581dfebccaebae9468c924c2c722fcf0306944
[ "MIT" ]
2
2022-02-16T08:36:03.000Z
2022-03-08T17:13:33.000Z
tools/pythonpkg/tests/fast/arrow/test_filter_pushdown.py
lokax/duckdb
c2581dfebccaebae9468c924c2c722fcf0306944
[ "MIT" ]
null
null
null
import duckdb import os import pytest import tempfile try: import pyarrow as pa import pyarrow.parquet as pq import pyarrow.dataset as ds import numpy as np import pandas as pd import re can_run = True except: can_run = False ## DuckDB connection used in this test duckdb_conn = duckdb.c...
51.346995
288
0.632097
import duckdb import os import pytest import tempfile try: import pyarrow as pa import pyarrow.parquet as pq import pyarrow.dataset as ds import numpy as np import pandas as pd import re can_run = True except: can_run = False duckdb_conn = duckdb.connect() def numeric_operators(data_ty...
true
true
08f82ce35358552eb60578bc61e10c6c2eab5375
311
py
Python
broker/eblocbroker/does_requester_exist.py
ebloc/eBlocBroker
52d507835a0fe3c930df2e2c816724d26a3484a7
[ "MIT" ]
7
2018-02-10T22:57:28.000Z
2020-11-20T14:46:18.000Z
broker/eblocbroker/does_requester_exist.py
ebloc/eBlocBroker
52d507835a0fe3c930df2e2c816724d26a3484a7
[ "MIT" ]
5
2020-10-30T18:43:27.000Z
2021-02-04T12:39:30.000Z
broker/eblocbroker/does_requester_exist.py
ebloc/eBlocBroker
52d507835a0fe3c930df2e2c816724d26a3484a7
[ "MIT" ]
5
2017-07-06T14:14:13.000Z
2019-02-22T14:40:16.000Z
#!/usr/bin/env python3 import sys if __name__ == "__main__": from broker.eblocbroker.Contract import Contract if len(sys.argv) == 2: requester = str(sys.argv[1]) else: requester = "0x57b60037B82154eC7149142c606bA024fBb0f991" print(Contract().does_requester_exist(requester))
22.214286
64
0.694534
import sys if __name__ == "__main__": from broker.eblocbroker.Contract import Contract if len(sys.argv) == 2: requester = str(sys.argv[1]) else: requester = "0x57b60037B82154eC7149142c606bA024fBb0f991" print(Contract().does_requester_exist(requester))
true
true
08f82d3418cc7522ea7f11746b92a82487532bd0
7,825
py
Python
robin_stocks/authentication.py
shobnaren/robin_stocks
7f15bd3b73da3c01fe164316b259cc03ffab9ea0
[ "MIT" ]
2
2020-03-29T07:12:33.000Z
2021-01-16T17:27:10.000Z
robin_stocks/authentication.py
shobnaren/robin_stocks
7f15bd3b73da3c01fe164316b259cc03ffab9ea0
[ "MIT" ]
null
null
null
robin_stocks/authentication.py
shobnaren/robin_stocks
7f15bd3b73da3c01fe164316b259cc03ffab9ea0
[ "MIT" ]
null
null
null
"""Contains all functions for the purpose of logging in and out to Robinhood.""" import os import pickle import random import robin_stocks.helper as helper import robin_stocks.urls as urls def generate_device_token(): """This function will generate a token used when loggin on. :returns: A string representin...
42.759563
133
0.631054
import os import pickle import random import robin_stocks.helper as helper import robin_stocks.urls as urls def generate_device_token(): rands = [] for i in range(0, 16): r = random.random() rand = 4294967296.0 * r rands.append((int(rand) >> ((3 & i) << 3)) & 255) hexa = [] f...
true
true
08f82d845869f2457f50c676052d61c7112b78dd
263
py
Python
src/appendix/doctestexample.py
rgalanakis/practicalmayapython
c71250213317338e99a8d4a38342f30d4b3053a8
[ "MIT" ]
56
2015-01-02T21:18:55.000Z
2021-07-21T02:40:44.000Z
src/appendix/doctestexample.py
rgalanakis/practicalmayapython
c71250213317338e99a8d4a38342f30d4b3053a8
[ "MIT" ]
1
2020-04-03T20:37:26.000Z
2020-04-03T20:37:26.000Z
src/appendix/doctestexample.py
rgalanakis/practicalmayapython
c71250213317338e99a8d4a38342f30d4b3053a8
[ "MIT" ]
23
2015-02-03T10:48:05.000Z
2021-04-05T23:49:08.000Z
def adder(a, b): """ Return a added to b. >>> adder(1, 3) 3 >>> adder('a', 'b') 'ab' >>> adder(1, 'b') Traceback (most recent call last): TypeError: unsupported operand type(s) for +: 'int' and 'str' """ return a + b
17.533333
65
0.486692
def adder(a, b): return a + b
true
true
08f82e1071c94f9f2add6f21a929054b5480c32c
3,565
py
Python
testing/test_details.py
cjolowicz/pluggy
2d01777a6f092cd90bceb7f58b3c128253bda008
[ "MIT" ]
1
2021-05-08T10:53:03.000Z
2021-05-08T10:53:03.000Z
testing/test_details.py
cjolowicz/pluggy
2d01777a6f092cd90bceb7f58b3c128253bda008
[ "MIT" ]
null
null
null
testing/test_details.py
cjolowicz/pluggy
2d01777a6f092cd90bceb7f58b3c128253bda008
[ "MIT" ]
null
null
null
import warnings import pytest from pluggy import PluginManager, HookimplMarker, HookspecMarker hookspec = HookspecMarker("example") hookimpl = HookimplMarker("example") def test_parse_hookimpl_override(): class MyPluginManager(PluginManager): def parse_hookimpl_opts(self, module_or_class, name): ...
26.213235
81
0.644881
import warnings import pytest from pluggy import PluginManager, HookimplMarker, HookspecMarker hookspec = HookspecMarker("example") hookimpl = HookimplMarker("example") def test_parse_hookimpl_override(): class MyPluginManager(PluginManager): def parse_hookimpl_opts(self, module_or_class, name): ...
true
true
08f82e468fd5cd4d2c710eb4afcd50b7ce4662e1
22,723
py
Python
tools/codegen/core/gen_static_metadata.py
jayonlau/grpc
88a2e165868af40dba4cffbe0e63e7f7d579a161
[ "BSD-3-Clause" ]
1
2018-04-08T10:56:31.000Z
2018-04-08T10:56:31.000Z
tools/codegen/core/gen_static_metadata.py
jayonlau/grpc
88a2e165868af40dba4cffbe0e63e7f7d579a161
[ "BSD-3-Clause" ]
1
2021-06-19T03:15:36.000Z
2021-06-19T03:15:36.000Z
tools/codegen/core/gen_static_metadata.py
jayonlau/grpc
88a2e165868af40dba4cffbe0e63e7f7d579a161
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # Copyright 2015 gRPC 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...
31.914326
212
0.622189
import collections import hashlib import itertools import os import re import subprocess import sys import perfection CONFIG = [ 'grpc-internal-encoding-request', ':path', 'grpc-encoding', 'grpc-accept-encoding', ':authority', 'grpc-timeout', '', '/grpc.lb.v1.LoadBalancer/Ba...
true
true
08f82efc946ddfaab5b97859da0ddda4464f2441
986
py
Python
kubernetes/test/test_v1alpha1_volume_error.py
anemerovsky-essextec/python
6e40b9169b27c3f1f9422c0f6dd1cd9caef8d57c
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1alpha1_volume_error.py
anemerovsky-essextec/python
6e40b9169b27c3f1f9422c0f6dd1cd9caef8d57c
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1alpha1_volume_error.py
anemerovsky-essextec/python
6e40b9169b27c3f1f9422c0f6dd1cd9caef8d57c
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.12.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys i...
21.911111
105
0.716024
from __future__ import absolute_import import os import sys import unittest import kubernetes.client from kubernetes.client.rest import ApiException from kubernetes.client.models.v1alpha1_volume_error import V1alpha1VolumeError class TestV1alpha1VolumeError(unittest.TestCase): def setUp(self): pass ...
true
true
08f82f5117e88c775975770c6ca103e4c9212b7d
11,699
py
Python
engines/livecoding.py
codingjerk/deadbot
cd65fe3c552262b5479d12108369a88bd5173fc6
[ "MIT" ]
5
2016-09-12T08:14:37.000Z
2016-10-19T11:39:02.000Z
engines/livecoding.py
codingjerk/deadbot
cd65fe3c552262b5479d12108369a88bd5173fc6
[ "MIT" ]
null
null
null
engines/livecoding.py
codingjerk/deadbot
cd65fe3c552262b5479d12108369a88bd5173fc6
[ "MIT" ]
1
2016-09-15T13:52:35.000Z
2016-09-15T13:52:35.000Z
# Livecoding.tv engine from engines import base import events import websocket import ssl from lxml import etree from xml.sax import saxutils class Engine(base.Engine): def __init__(self, config): self.MAX_MESSAGE_SIZE = 600 self.setup_key(config) super().__init__(config) def setup_key(self, config): if ...
44.652672
336
0.693735
from engines import base import events import websocket import ssl from lxml import etree from xml.sax import saxutils class Engine(base.Engine): def __init__(self, config): self.MAX_MESSAGE_SIZE = 600 self.setup_key(config) super().__init__(config) def setup_key(self, config): if 'bot-key' in config: re...
true
true
08f830210abd29bad7c5ccc22e4784cd41060fd2
947
py
Python
setup.py
hmallen/coinmarketcap_tracker
9b81b2f568050d98546e7419aa62803591e20a8e
[ "MIT" ]
null
null
null
setup.py
hmallen/coinmarketcap_tracker
9b81b2f568050d98546e7419aa62803591e20a8e
[ "MIT" ]
null
null
null
setup.py
hmallen/coinmarketcap_tracker
9b81b2f568050d98546e7419aa62803591e20a8e
[ "MIT" ]
null
null
null
from setuptools import setup with open('README.md', 'r') as fh: long_description = fh.read() setup( name='coinmarketcap_tracker', version='0.1dev21', author='Hunter M. Allen', author_email='allenhm@gmail.com', license='MIT', #packages=find_packages(), packages=['coinmarketcap_tracker']...
33.821429
115
0.669483
from setuptools import setup with open('README.md', 'r') as fh: long_description = fh.read() setup( name='coinmarketcap_tracker', version='0.1dev21', author='Hunter M. Allen', author_email='allenhm@gmail.com', license='MIT', packages=['coinmarketcap_tracker'], install_requires=...
true
true
08f8305f0d768c7bdebd2b4af0298f909a25ebdd
3,627
py
Python
tests/test_util/test_union_dict.py
tla256/cogent3
58533d11852d0cafbc0cfc6ae26429a6c0b2cb75
[ "BSD-3-Clause" ]
null
null
null
tests/test_util/test_union_dict.py
tla256/cogent3
58533d11852d0cafbc0cfc6ae26429a6c0b2cb75
[ "BSD-3-Clause" ]
null
null
null
tests/test_util/test_union_dict.py
tla256/cogent3
58533d11852d0cafbc0cfc6ae26429a6c0b2cb75
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python """Unit tests for union_dict. """ from cogent3.util.union_dict import UnionDict from cogent3.util.unit_test import TestCase, main __author__ = "Thomas La" __copyright__ = "Copyright 2007-2019, The Cogent Project" __credits__ = ["Gavin Huttley", "Thomas La"] __license__ = "BSD-3" __version__ = "...
34.542857
83
0.568514
from cogent3.util.union_dict import UnionDict from cogent3.util.unit_test import TestCase, main __author__ = "Thomas La" __copyright__ = "Copyright 2007-2019, The Cogent Project" __credits__ = ["Gavin Huttley", "Thomas La"] __license__ = "BSD-3" __version__ = "2019.12.6a" __maintainer__ = "Gavin Huttley" __email__ =...
true
true