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
f70bea4fa1a8a385185194767936953325c64e31
5,772
py
Python
node_modules/clarifai/scripts/app_and_key_for_tests.py
seycileli/facerecognitionapp-api
c0c4b2bdb57cd73c9b58178438f033777f72bd5b
[ "MIT" ]
346
2016-05-26T20:02:41.000Z
2022-03-24T20:43:31.000Z
node_modules/clarifai/scripts/app_and_key_for_tests.py
seycileli/facerecognitionapp-api
c0c4b2bdb57cd73c9b58178438f033777f72bd5b
[ "MIT" ]
76
2015-10-25T13:03:47.000Z
2022-02-19T09:36:10.000Z
node_modules/clarifai/scripts/app_and_key_for_tests.py
seycileli/facerecognitionapp-api
c0c4b2bdb57cd73c9b58178438f033777f72bd5b
[ "MIT" ]
136
2015-09-04T13:48:27.000Z
2021-06-12T16:48:36.000Z
import json import os import sys try: from urllib.parse import urlparse, urlencode from urllib.request import urlopen, Request, build_opener, HTTPHandler from urllib.error import HTTPError except ImportError: from urlparse import urlparse from urllib import urlencode from urllib2 import urlopen...
31.889503
112
0.595461
import json import os import sys try: from urllib.parse import urlparse, urlencode from urllib.request import urlopen, Request, build_opener, HTTPHandler from urllib.error import HTTPError except ImportError: from urlparse import urlparse from urllib import urlencode from urllib2 import urlopen...
true
true
f70beb1fa4370b3f14474cd5e4594b48d60c8bf8
7,308
py
Python
test/calibration/experiments/test_drag.py
QuantumHardware/qiskit-experiments
c09cf35bb922419354955abe8d536a97a9ea286b
[ "Apache-2.0" ]
null
null
null
test/calibration/experiments/test_drag.py
QuantumHardware/qiskit-experiments
c09cf35bb922419354955abe8d536a97a9ea286b
[ "Apache-2.0" ]
null
null
null
test/calibration/experiments/test_drag.py
QuantumHardware/qiskit-experiments
c09cf35bb922419354955abe8d536a97a9ea286b
[ "Apache-2.0" ]
null
null
null
# This code is part of Qiskit. # # (C) Copyright IBM 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
37.096447
96
0.676382
from test.base import QiskitExperimentsTestCase import unittest import numpy as np from qiskit.circuit import Parameter from qiskit.exceptions import QiskitError from qiskit.pulse import DriveChannel, Drag import qiskit.pulse as pulse from qiskit.qobj.utils import MeasLevel from qiskit import transpile from qiskit_...
true
true
f70beb38a18f8aaf4b1f040a4d2c358773707a65
1,278
py
Python
sa/profiles/ZTE/ZXDSL531/get_dot11_associations.py
xUndero/noc
9fb34627721149fcf7064860bd63887e38849131
[ "BSD-3-Clause" ]
1
2019-09-20T09:36:48.000Z
2019-09-20T09:36:48.000Z
sa/profiles/ZTE/ZXDSL531/get_dot11_associations.py
ewwwcha/noc
aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb
[ "BSD-3-Clause" ]
null
null
null
sa/profiles/ZTE/ZXDSL531/get_dot11_associations.py
ewwwcha/noc
aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # --------------------------------------------------------------------- # ZTE.ZXDSL531.get_dot11_associations # --------------------------------------------------------------------- # Copyright (C) 2007-2019 The NOC Project # See LICENSE for details # --------------------------------------------...
31.95
86
0.514085
import re from noc.core.script.base import BaseScript from noc.sa.interfaces.igetdot11associations import IGetDot11Associations from noc.core.text import strip_html_tags rx_mac = re.compile( "(?P<mac>[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2})" ) class Script(BaseScript): name ...
true
true
f70bebf637a63567b98981f041f242cabd79d5e8
563
py
Python
apps/bulk/migrations/0007_auto_20150302_1935.py
Sult/daf
a4da9e8c96f70577e2490c05e82bdf7d0de1a563
[ "MIT" ]
null
null
null
apps/bulk/migrations/0007_auto_20150302_1935.py
Sult/daf
a4da9e8c96f70577e2490c05e82bdf7d0de1a563
[ "MIT" ]
null
null
null
apps/bulk/migrations/0007_auto_20150302_1935.py
Sult/daf
a4da9e8c96f70577e2490c05e82bdf7d0de1a563
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('bulk', '0006_auto_20150302_1750'), ] operations = [ migrations.AlterFi...
24.478261
108
0.64476
from __future__ import unicode_literals from django.db import models, migrations import datetime from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('bulk', '0006_auto_20150302_1750'), ] operations = [ migrations.AlterField( model_n...
true
true
f70bec598956cee8807a514f594b2be632fc271b
6,033
py
Python
pydotorg/settings/base.py
caputomarcos/pythondotorg
da96fee61bb5c92b7060bccb6ed467fe00136dd7
[ "Apache-2.0" ]
null
null
null
pydotorg/settings/base.py
caputomarcos/pythondotorg
da96fee61bb5c92b7060bccb6ed467fe00136dd7
[ "Apache-2.0" ]
null
null
null
pydotorg/settings/base.py
caputomarcos/pythondotorg
da96fee61bb5c92b7060bccb6ed467fe00136dd7
[ "Apache-2.0" ]
null
null
null
import os import dj_database_url ### Basic config BASE = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')) DEBUG = TEMPLATE_DEBUG = True SITE_ID = 1 SECRET_KEY = 'its-a-secret-to-everybody' # Until Sentry works on Py3, do errors the old-fashioned way. ADMINS = [] # General project information # T...
24.326613
79
0.697331
import os import dj_database_url BASE = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')) DEBUG = TEMPLATE_DEBUG = True SITE_ID = 1 SECRET_KEY = 'its-a-secret-to-everybody' ADMINS = [] SITE_VARIABLES = { 'site_name': 'Python.org', 'site_descript': 'The official home of the Python Programm...
true
true
f70beccc8167dc8794e9af202f98dc483d904d5e
464
py
Python
ecom/api/migrations/0001_initial.py
Lisgevan/FULL_STACK_DEVELOMENT_DJANGO_REACT
9e87db526a4126a6e3cbac9dd2b88b8ea88a2318
[ "MIT" ]
null
null
null
ecom/api/migrations/0001_initial.py
Lisgevan/FULL_STACK_DEVELOMENT_DJANGO_REACT
9e87db526a4126a6e3cbac9dd2b88b8ea88a2318
[ "MIT" ]
null
null
null
ecom/api/migrations/0001_initial.py
Lisgevan/FULL_STACK_DEVELOMENT_DJANGO_REACT
9e87db526a4126a6e3cbac9dd2b88b8ea88a2318
[ "MIT" ]
null
null
null
from django.db import migrations from api.user.models import CustomUser class Migration(migrations.Migration): def seed_data(apps, schema_editor): user = CustomUser( name = 'admin', email = 'admin@admin.dev', is_staff = True, is_superuser = True, phone = "9876554321", gender =...
22.095238
38
0.640086
from django.db import migrations from api.user.models import CustomUser class Migration(migrations.Migration): def seed_data(apps, schema_editor): user = CustomUser( name = 'admin', email = 'admin@admin.dev', is_staff = True, is_superuser = True, phone = "9876554321", gender =...
true
true
f70bed112c601c3087cd5a890d8455f8167600dd
13,335
py
Python
tests/test_type.py
thyneb19/lux
07a282d6a5f60c05942d866fa6f33636c3428abc
[ "Apache-2.0" ]
null
null
null
tests/test_type.py
thyneb19/lux
07a282d6a5f60c05942d866fa6f33636c3428abc
[ "Apache-2.0" ]
null
null
null
tests/test_type.py
thyneb19/lux
07a282d6a5f60c05942d866fa6f33636c3428abc
[ "Apache-2.0" ]
null
null
null
# Copyright 2019-2020 The Lux Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
34.546632
128
0.580427
from .context import lux import pytest import random import pandas as pd import warnings def test_check_cars(): lux.config.set_SQL_connection("") df = pd.read_csv("lux/data/car.csv") df.maintain_metadata() assert df.data_type["Name"] == "nominal" assert df.data_type["MilesPerGal"] == "quantitativ...
true
true
f70bed892a69b0a979a1236c72b4e27848a2e38e
4,455
py
Python
others/median_two_sorted.py
sumitsk/leetcode
bb3527b08ca794dea2c9d071efc24b4276bd1c05
[ "MIT" ]
null
null
null
others/median_two_sorted.py
sumitsk/leetcode
bb3527b08ca794dea2c9d071efc24b4276bd1c05
[ "MIT" ]
null
null
null
others/median_two_sorted.py
sumitsk/leetcode
bb3527b08ca794dea2c9d071efc24b4276bd1c05
[ "MIT" ]
null
null
null
# INCOMPLETE / UNSUCCESSFUL # find median of two sorted arrays import ipdb class Solution(object): def findMedianSortedArrays(self, nums1, nums2): """ :type nums1: List[int] :type nums2: List[int] :rtype: float """ n1 = len(nums1) n2 = len(nums2) # s...
33.246269
94
0.464198
import ipdb class Solution(object): def findMedianSortedArrays(self, nums1, nums2): n1 = len(nums1) n2 = len(nums2) if n1==0: return self.median_sorted_array(nums2) if n2==0: return self.median_sorted_array(nums1) N = n1 + n2 l1, r1 ...
true
true
f70bee32aa74ac635fab5ef016db1d5deccb1d1a
594
py
Python
webscraper/__main__.py
neerajhp/neighboorhoodgems-webscraper
714e34d808225c9d7fac2da8fbfca64ab62a2534
[ "MIT" ]
null
null
null
webscraper/__main__.py
neerajhp/neighboorhoodgems-webscraper
714e34d808225c9d7fac2da8fbfca64ab62a2534
[ "MIT" ]
null
null
null
webscraper/__main__.py
neerajhp/neighboorhoodgems-webscraper
714e34d808225c9d7fac2da8fbfca64ab62a2534
[ "MIT" ]
null
null
null
import siteScripts.timeout.scraper as timeoutScraper import logging from webscraper.models.landmark import Landmark from webscraper.services.csv import saveLandmarksCSV def main(): # File to save landmarks f = "landmarks.csv" # Scrapers timeOutLandmarks = timeoutScraper.scrape() # Save Data ...
22
61
0.700337
import siteScripts.timeout.scraper as timeoutScraper import logging from webscraper.models.landmark import Landmark from webscraper.services.csv import saveLandmarksCSV def main(): f = "landmarks.csv" timeOutLandmarks = timeoutScraper.scrape() saveLandmarksCSV(timeOutLandmarks, f) if __n...
true
true
f70beebd89d334569db63ed5fc6d13fbd127389a
9,667
py
Python
src/sv-pipeline/pre_SVCalling_and_QC/raw_vcf_qc/calc_num_svs_pick_outlier.py
leipzig/gatk-sv
96566cbbaf0f8f9c8452517b38eea1e5dd6ed33a
[ "BSD-3-Clause" ]
76
2020-06-18T21:31:43.000Z
2022-03-02T18:42:58.000Z
src/sv-pipeline/pre_SVCalling_and_QC/raw_vcf_qc/calc_num_svs_pick_outlier.py
iamh2o/gatk-sv
bf3704bd1d705339577530e267cd4d1b2f77a17f
[ "BSD-3-Clause" ]
195
2020-06-22T15:12:28.000Z
2022-03-28T18:06:46.000Z
src/sv-pipeline/pre_SVCalling_and_QC/raw_vcf_qc/calc_num_svs_pick_outlier.py
iamh2o/gatk-sv
bf3704bd1d705339577530e267cd4d1b2f77a17f
[ "BSD-3-Clause" ]
39
2020-07-03T06:47:18.000Z
2022-03-03T03:47:25.000Z
#!/usr/bin/env python import sys from typing import Sequence, Set import argparse import numpy import pandas _zero_svs_are_outliers = True _outlier_std_threshold = 5.0 _column_order = ["CHROM", "SVTYPE", "Mean", "Median", "STD", "Outlier_Sample", "Outlier_Number", "Outlier_Cate"] def read_statfile...
42.774336
120
0.663701
import sys from typing import Sequence, Set import argparse import numpy import pandas _zero_svs_are_outliers = True _outlier_std_threshold = 5.0 _column_order = ["CHROM", "SVTYPE", "Mean", "Median", "STD", "Outlier_Sample", "Outlier_Number", "Outlier_Cate"] def read_statfile(statfile: str) -> pan...
true
true
f70bef908070d3279c1f2b01765777a4e765f230
1,997
py
Python
model-optimizer/mo/front/caffe/extractors/inner_product_test.py
shinh/dldt
693ab4e79a428e0801f17f4511b129a3fa8f4a62
[ "Apache-2.0" ]
1
2021-02-20T21:48:36.000Z
2021-02-20T21:48:36.000Z
model-optimizer/mo/front/caffe/extractors/inner_product_test.py
erinpark33/dldt
edd86d090592f7779f4dbb2681546e1f4e81284f
[ "Apache-2.0" ]
null
null
null
model-optimizer/mo/front/caffe/extractors/inner_product_test.py
erinpark33/dldt
edd86d090592f7779f4dbb2681546e1f4e81284f
[ "Apache-2.0" ]
1
2018-12-14T07:52:51.000Z
2018-12-14T07:52:51.000Z
""" Copyright (c) 2018-2019 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to i...
32.209677
75
0.608413
import unittest import numpy as np from mo.front.caffe.extractors.inner_product import inner_product_ext from mo.front.common.partial_infer.inner_product import caffe_inner_product from mo.utils.unittest.extractors import FakeMultiParam, FakeModelLayer class FakeProtoLayer: def __init__(self, val): sel...
true
true
f70befa47bcbbb2f37b411233346de8ecbc85bc3
57
py
Python
Tester/concurrentDL.py
garff/pyTorrent
fe8ff606ea0c146517e44ee6d475ebee58996d03
[ "MIT" ]
null
null
null
Tester/concurrentDL.py
garff/pyTorrent
fe8ff606ea0c146517e44ee6d475ebee58996d03
[ "MIT" ]
null
null
null
Tester/concurrentDL.py
garff/pyTorrent
fe8ff606ea0c146517e44ee6d475ebee58996d03
[ "MIT" ]
null
null
null
import urllib import concurrent.futures import threading
19
25
0.877193
import urllib import concurrent.futures import threading
true
true
f70bf15027e783d8f8206b2b5debcae15150d1b6
25,199
py
Python
pysteps/io/exporters.py
savelov/nowcast
9c1168b1ba642f15bc4ffb000bdbca6db27c29b1
[ "BSD-3-Clause" ]
6
2019-01-06T07:42:55.000Z
2021-02-03T13:59:50.000Z
pysteps/io/exporters.py
savelov/nowcast
9c1168b1ba642f15bc4ffb000bdbca6db27c29b1
[ "BSD-3-Clause" ]
5
2018-12-23T15:10:27.000Z
2021-01-06T15:03:03.000Z
pysteps/io/exporters.py
savelov/nowcast
9c1168b1ba642f15bc4ffb000bdbca6db27c29b1
[ "BSD-3-Clause" ]
2
2019-08-06T14:16:43.000Z
2019-08-13T00:36:31.000Z
""" pysteps.io.exporter =================== Methods for exporting forecasts of 2d precipitation fields into various file formats. Each exporter method in this module has its own initialization function that implements the following interface:: initialize_forecast_exporter_xxx(filename, startdate, timestep, ...
39.55887
118
0.5703
from datetime import datetime import numpy as np import os from pysteps.exceptions import MissingOptionalDependency try: import netCDF4 netcdf4_imported = True except ImportError: netcdf4_imported = False try: import pyproj pyproj_imported = True except ImportError: pyproj_imported = False d...
true
true
f70bf420f2d3ab317f714627b80d6cfd01d77b6b
3,345
py
Python
update_sheetinRange.py
akifislam/CodeforcesAutoTracker
d147f6b6639d74a029208bb6e1407aec89212f27
[ "Apache-2.0" ]
null
null
null
update_sheetinRange.py
akifislam/CodeforcesAutoTracker
d147f6b6639d74a029208bb6e1407aec89212f27
[ "Apache-2.0" ]
null
null
null
update_sheetinRange.py
akifislam/CodeforcesAutoTracker
d147f6b6639d74a029208bb6e1407aec89212f27
[ "Apache-2.0" ]
1
2022-02-15T20:21:47.000Z
2022-02-15T20:21:47.000Z
from bs4 import BeautifulSoup import requests import test import gspread from oauth2client.service_account import ServiceAccountCredentials import datetime def update_inRange(): print("Today's Date : ",datetime.date.today()) today = datetime.date.today() - datetime.timedelta(1) yesterday_month = today.st...
32.163462
111
0.681614
from bs4 import BeautifulSoup import requests import test import gspread from oauth2client.service_account import ServiceAccountCredentials import datetime def update_inRange(): print("Today's Date : ",datetime.date.today()) today = datetime.date.today() - datetime.timedelta(1) yesterday_month = today.st...
true
true
f70bf444aeed4ac27e527b05648fdf6fe9dd813e
302
py
Python
Linkedin/linkedin-become-a-programmer-foundations/1.programming-foundations-fundamentals-3/challenge_1.py
mohammedelzanaty/myRoad2BeFullStack
eea3a5edb6c6a999136b04fdaea6ce0c81137a58
[ "MIT" ]
2
2021-04-21T12:05:01.000Z
2022-01-19T09:58:38.000Z
Linkedin/linkedin-become-a-programmer-foundations/1.programming-foundations-fundamentals-3/challenge_1.py
mohammedelzanaty/myRoad2BeFullStack
eea3a5edb6c6a999136b04fdaea6ce0c81137a58
[ "MIT" ]
34
2019-12-26T11:21:42.000Z
2022-02-27T19:55:10.000Z
Linkedin/linkedin-become-a-programmer-foundations/1.programming-foundations-fundamentals-3/challenge_1.py
mohammedelzanaty/myRoad2BeFullStack
eea3a5edb6c6a999136b04fdaea6ce0c81137a58
[ "MIT" ]
2
2021-08-15T07:59:36.000Z
2022-01-16T06:17:32.000Z
print("Challenge 1:") # A message for user message = "This is goind to be tricky ;" Message = "Very tricky!" print(message) # show the message on the screen # Perform mathematical operations result = 2**3 print("2**3 =", result) result = 5 - 3 print("5 - 3 =", result) print("Challenge complete!")
18.875
47
0.678808
print("Challenge 1:") message = "This is goind to be tricky ;" Message = "Very tricky!" print(message) result = 2**3 print("2**3 =", result) result = 5 - 3 print("5 - 3 =", result) print("Challenge complete!")
true
true
f70bf45fbcab8216b7333ea95959f5208d7eb563
2,726
py
Python
blogs/models.py
6ba/bbgo
dfa9b55b8d40c53940105333c2e03a3c6abddb88
[ "MIT" ]
22
2017-07-13T04:07:03.000Z
2021-06-10T05:39:29.000Z
blogs/models.py
genonfire/bbgo
5f374f0b620f4dc3e106de5969f26f4585044605
[ "MIT" ]
7
2017-08-25T06:33:45.000Z
2019-10-14T05:49:32.000Z
blogs/models.py
6ba/bbgo
dfa9b55b8d40c53940105333c2e03a3c6abddb88
[ "MIT" ]
9
2017-12-31T02:45:58.000Z
2021-01-22T03:09:02.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.db import models from django.urls import reverse_lazy from django.utils.translation import ugettext as _ class Blog(models.Model): """Blog of blogs""" BLOG_STATUS = { ('1normal', _('status_pu...
34.075
77
0.662509
from __future__ import unicode_literals from django.conf import settings from django.db import models from django.urls import reverse_lazy from django.utils.translation import ugettext as _ class Blog(models.Model): BLOG_STATUS = { ('1normal', _('status_published')), ('2temp', _('status_draft'))...
true
true
f70bf471cf08b34e3769f50e1b418e61f0ca8aa4
2,823
py
Python
python3/koans/about_string_manipulation.py
OriginalTsynn/python_koans
f35ced3ebbf2c9c19f56183b2997beeb18aae9a9
[ "MIT" ]
null
null
null
python3/koans/about_string_manipulation.py
OriginalTsynn/python_koans
f35ced3ebbf2c9c19f56183b2997beeb18aae9a9
[ "MIT" ]
null
null
null
python3/koans/about_string_manipulation.py
OriginalTsynn/python_koans
f35ced3ebbf2c9c19f56183b2997beeb18aae9a9
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * class AboutStringManipulation(Koan): def test_use_format_to_interpolate_variables(self): value1 = 'one' value2 = 2 string = "The values are {0} and {1}".format(value1, value2) self.assertEqual("The values are...
37.144737
81
0.636557
from runner.koan import * class AboutStringManipulation(Koan): def test_use_format_to_interpolate_variables(self): value1 = 'one' value2 = 2 string = "The values are {0} and {1}".format(value1, value2) self.assertEqual("The values are one and 2", string) def test_formatted_v...
true
true
f70bf669380d96903bd4e90137b76c926924b501
15,957
py
Python
build/android/pylib/chrome_test_server_spawner.py
GnorTech/chromium
e1c7731d5bd099ca5544fcf8eda3867d4ce5bab5
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2018-03-10T13:08:49.000Z
2018-03-10T13:08:49.000Z
build/android/pylib/chrome_test_server_spawner.py
GnorTech/chromium
e1c7731d5bd099ca5544fcf8eda3867d4ce5bab5
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
build/android/pylib/chrome_test_server_spawner.py
GnorTech/chromium
e1c7731d5bd099ca5544fcf8eda3867d4ce5bab5
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2020-11-04T07:19:31.000Z
2020-11-04T07:19:31.000Z
# Copyright 2013 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. """A "Test Server Spawner" that handles killing/stopping per-test test servers. It's used to accept requests from the device to spawn and kill instances of ...
39.01467
80
0.682522
import BaseHTTPServer import json import logging import os import select import struct import subprocess import threading import time import urlparse import constants from forwarder import Forwarder import ports os.environ['PYTHONPATH'] = os.environ.get('PYTHONPATH', '') + (':%s:%s:%s:%s:%s' % (os.path.join(co...
true
true
f70bf6ee38f2719e916cda8cb70d9a8dda8c9666
8,303
py
Python
whoville/cloudbreak/models/reinstall_request_v2.py
mikchaos/whoville
6eabaea4b74ac0b632c03db8252590131c6ce63b
[ "Apache-2.0" ]
null
null
null
whoville/cloudbreak/models/reinstall_request_v2.py
mikchaos/whoville
6eabaea4b74ac0b632c03db8252590131c6ce63b
[ "Apache-2.0" ]
null
null
null
whoville/cloudbreak/models/reinstall_request_v2.py
mikchaos/whoville
6eabaea4b74ac0b632c03db8252590131c6ce63b
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Cloudbreak API Cloudbreak is a powerful left surf that breaks over a coral reef, a mile off southwest the island of Tavarua, Fiji. Cloudbreak is a cloud agnostic Hadoop as a Service API. Abstracts the provisioning and ease management and monitoring of on-demand clusters. SequenceIQ's Cloud...
34.168724
984
0.648802
from pprint import pformat from six import iteritems import re class ReinstallRequestV2(object): swagger_types = { 'instance_groups': 'list[InstanceGroupsV2]', 'ambari_stack_details': 'AmbariStackDetails', 'blueprint_name': 'str', 'kerberos_password': 'str', 'kerberos_...
true
true
f70bf6f1dc5f4faa2e79e0059d5d2beeba7eb784
41,081
py
Python
venv/Lib/site-packages/matplotlib/backends/backend_qt5.py
StewSchrieff/riddlerHoopGame
3d63f494aa803c7571ace83f87a40ce5d6b0dfc1
[ "MIT" ]
69
2020-03-31T06:40:17.000Z
2022-02-25T11:48:18.000Z
venv/Lib/site-packages/matplotlib/backends/backend_qt5.py
StewSchrieff/riddlerHoopGame
3d63f494aa803c7571ace83f87a40ce5d6b0dfc1
[ "MIT" ]
6
2018-08-28T12:33:14.000Z
2019-05-07T20:32:42.000Z
venv/Lib/site-packages/matplotlib/backends/backend_qt5.py
StewSchrieff/riddlerHoopGame
3d63f494aa803c7571ace83f87a40ce5d6b0dfc1
[ "MIT" ]
28
2020-04-15T15:24:17.000Z
2021-12-26T04:05:02.000Z
from __future__ import (absolute_import, division, print_function, unicode_literals) import six import functools import os import re import signal import sys from six import unichr import traceback import matplotlib from matplotlib._pylab_helpers import Gcf from matplotlib.backend_bases impor...
36.712243
79
0.601495
from __future__ import (absolute_import, division, print_function, unicode_literals) import six import functools import os import re import signal import sys from six import unichr import traceback import matplotlib from matplotlib._pylab_helpers import Gcf from matplotlib.backend_bases impor...
true
true
f70bf89b51c9499b4cc42a25db5b53866df60828
262
py
Python
src/baseClients.py
tokarzmaciej/testing-simple-app-online-shop
446d063585f50b96a57bf6e7c23d2042df9eecc0
[ "MIT" ]
null
null
null
src/baseClients.py
tokarzmaciej/testing-simple-app-online-shop
446d063585f50b96a57bf6e7c23d2042df9eecc0
[ "MIT" ]
null
null
null
src/baseClients.py
tokarzmaciej/testing-simple-app-online-shop
446d063585f50b96a57bf6e7c23d2042df9eecc0
[ "MIT" ]
null
null
null
class ClientStorage: def getAllClients(self): pass def postClient(self, name, surname, email): pass def delClient(self, id_client): pass def patchClient(self, id_client, new_name, new_surname, new_email): pass
18.714286
71
0.637405
class ClientStorage: def getAllClients(self): pass def postClient(self, name, surname, email): pass def delClient(self, id_client): pass def patchClient(self, id_client, new_name, new_surname, new_email): pass
true
true
f70bf8bff2b888f43bbda54839a20ead612a3997
453
py
Python
PythonChallenge/Ex06/06_02.py
YorkFish/git_study
6e023244daaa22e12b24e632e76a13e5066f2947
[ "MIT" ]
null
null
null
PythonChallenge/Ex06/06_02.py
YorkFish/git_study
6e023244daaa22e12b24e632e76a13e5066f2947
[ "MIT" ]
null
null
null
PythonChallenge/Ex06/06_02.py
YorkFish/git_study
6e023244daaa22e12b24e632e76a13e5066f2947
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # coding:utf-8 from zipfile import ZipFile comments = [] filename = "90052" channel = ZipFile("channel.zip", 'r') while filename.isdigit(): filename += ".txt" f = channel.open(filename, 'r') line = f.readline() f.close() t = channel.getinfo(filename).comment comments.app...
25.166667
61
0.637969
from zipfile import ZipFile comments = [] filename = "90052" channel = ZipFile("channel.zip", 'r') while filename.isdigit(): filename += ".txt" f = channel.open(filename, 'r') line = f.readline() f.close() t = channel.getinfo(filename).comment comments.append(str(t, encoding="utf-8")) fil...
true
true
f70bf8e6fb1f119b8653e64d00e8152613bdc1fe
208
py
Python
pythran/tests/cases/fibo_seq.py
davidbrochart/pythran
24b6c8650fe99791a4091cbdc2c24686e86aa67c
[ "BSD-3-Clause" ]
1,647
2015-01-13T01:45:38.000Z
2022-03-28T01:23:41.000Z
pythran/tests/cases/fibo_seq.py
davidbrochart/pythran
24b6c8650fe99791a4091cbdc2c24686e86aa67c
[ "BSD-3-Clause" ]
1,116
2015-01-01T09:52:05.000Z
2022-03-18T21:06:40.000Z
pythran/tests/cases/fibo_seq.py
davidbrochart/pythran
24b6c8650fe99791a4091cbdc2c24686e86aa67c
[ "BSD-3-Clause" ]
180
2015-02-12T02:47:28.000Z
2022-03-14T10:28:18.000Z
""" Nom recursive version of fibo. """ # pythran export fibo(int) # runas fibo(7) def fibo(n): """ fibonaccie compuation. """ a, b = 1, 1 for _ in range(n): a, b = a + b, a return a
17.333333
38
0.533654
def fibo(n): a, b = 1, 1 for _ in range(n): a, b = a + b, a return a
true
true
f70bf9092d547f667f305a39ab84d812eb782f20
5,060
py
Python
common/blockchain_util.py
vinthedark/snet-marketplace-service
66ed9d093b00f09d3e28ef4d86c4e4c125037d06
[ "MIT" ]
null
null
null
common/blockchain_util.py
vinthedark/snet-marketplace-service
66ed9d093b00f09d3e28ef4d86c4e4c125037d06
[ "MIT" ]
null
null
null
common/blockchain_util.py
vinthedark/snet-marketplace-service
66ed9d093b00f09d3e28ef4d86c4e4c125037d06
[ "MIT" ]
null
null
null
import json import uuid from enum import Enum import web3 from eth_account.messages import defunct_hash_message from web3 import Web3 from common.logger import get_logger logger = get_logger(__name__) class ContractType(Enum): REGISTRY = "REGISTRY" MPE = "MPE" RFAI = "RFAI" class BlockChainUtil(objec...
42.166667
119
0.701186
import json import uuid from enum import Enum import web3 from eth_account.messages import defunct_hash_message from web3 import Web3 from common.logger import get_logger logger = get_logger(__name__) class ContractType(Enum): REGISTRY = "REGISTRY" MPE = "MPE" RFAI = "RFAI" class BlockChainUtil(objec...
true
true
f70bfa4b74f327eaff6e74deeff7234d2edf2d5a
4,717
py
Python
quantum/common/config.py
cuiwow/quantum
ce11b62046a0501e9fcd8442524d3c151d315dfb
[ "Apache-2.0" ]
1
2019-04-11T10:27:47.000Z
2019-04-11T10:27:47.000Z
quantum/common/config.py
cuiwow/quantum
ce11b62046a0501e9fcd8442524d3c151d315dfb
[ "Apache-2.0" ]
null
null
null
quantum/common/config.py
cuiwow/quantum
ce11b62046a0501e9fcd8442524d3c151d315dfb
[ "Apache-2.0" ]
null
null
null
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Nicira Networks, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apac...
36.007634
78
0.665889
import os from paste import deploy from quantum.api.v2 import attributes from quantum.common import utils from quantum.openstack.common import cfg from quantum.openstack.common import log as logging from quantum.openstack.common import rpc from quantum.version import version_info as quantum_version LOG = logging...
true
true
f70bfbfd82da3d2f03a5deda6f9ab6cf8be40de4
529
py
Python
Code_Socke/test.py
Jugendhackt/Maladidea
dfee3f2ee6006c0d2bcb4117d62afb1404f4bdee
[ "MIT" ]
null
null
null
Code_Socke/test.py
Jugendhackt/Maladidea
dfee3f2ee6006c0d2bcb4117d62afb1404f4bdee
[ "MIT" ]
null
null
null
Code_Socke/test.py
Jugendhackt/Maladidea
dfee3f2ee6006c0d2bcb4117d62afb1404f4bdee
[ "MIT" ]
null
null
null
import RPi.GPIO as G import time as t G.setmode(G.BCM) G.setup(19, G.OUT) G.setup(26, G.IN)# pull_up_down=G.PUD_UP) G.setup(21, G.OUT) G.setup(20, G.IN, pull_up_down=G.PUD_UP) print("setup done") G.output(21, True) print("output on") while True: input_sensor = G.input(26) if input_sensor == False: pri...
20.346154
41
0.621928
import RPi.GPIO as G import time as t G.setmode(G.BCM) G.setup(19, G.OUT) G.setup(26, G.IN)G.setup(21, G.OUT) G.setup(20, G.IN, pull_up_down=G.PUD_UP) print("setup done") G.output(21, True) print("output on") while True: input_sensor = G.input(26) if input_sensor == False: print("sensor triggered") ...
true
true
f70bfcff5507413149e7bbff65a7ae2fd88753fc
12,293
py
Python
postfinancecheckout/api/bank_account_service_api.py
pfpayments/python-sdk
b8ef159ea3c843a8d0361d1e0b122a9958adbcb4
[ "Apache-2.0" ]
1
2022-03-08T12:51:53.000Z
2022-03-08T12:51:53.000Z
postfinancecheckout/api/bank_account_service_api.py
pfpayments/python-sdk
b8ef159ea3c843a8d0361d1e0b122a9958adbcb4
[ "Apache-2.0" ]
null
null
null
postfinancecheckout/api/bank_account_service_api.py
pfpayments/python-sdk
b8ef159ea3c843a8d0361d1e0b122a9958adbcb4
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 from __future__ import absolute_import import six from postfinancecheckout.api_client import ApiClient class BankAccountServiceApi: def __init__(self, configuration): self.api_client = ApiClient(configuration=configuration) def count(self, space_id, **kwargs): """Count ...
36.58631
119
0.602619
from __future__ import absolute_import import six from postfinancecheckout.api_client import ApiClient class BankAccountServiceApi: def __init__(self, configuration): self.api_client = ApiClient(configuration=configuration) def count(self, space_id, **kwargs): kwargs['_return_http_data_onl...
true
true
f70bfd48b4dffc44103f3819522ad40aac7dc5c2
759
py
Python
assignments/a2/containerWithMostWater.py
jcdiv47/geekbang-algorithms
38dae85aeadb684b2c44945bd07a32cdede4ad5a
[ "MIT" ]
null
null
null
assignments/a2/containerWithMostWater.py
jcdiv47/geekbang-algorithms
38dae85aeadb684b2c44945bd07a32cdede4ad5a
[ "MIT" ]
null
null
null
assignments/a2/containerWithMostWater.py
jcdiv47/geekbang-algorithms
38dae85aeadb684b2c44945bd07a32cdede4ad5a
[ "MIT" ]
null
null
null
import unittest """ Leetcode(https://leetcode.com/problems/container-with-most-water/solution/) """ def maxArea(height): ans = 0 left, right = 0, len(height) - 1 while left < right: ans = max(ans, min(height[left], height[right]) * (right - left)) if height[left] < height[right]: ...
21.083333
75
0.56917
import unittest def maxArea(height): ans = 0 left, right = 0, len(height) - 1 while left < right: ans = max(ans, min(height[left], height[right]) * (right - left)) if height[left] < height[right]: left += 1 else: right -= 1 return ans class MyTestCase...
true
true
f70bfec06d09bcd09179f6c36f86fd581e0bfd1d
1,357
py
Python
test/test_flake8.py
Theosakamg/colcon-powershell
86657800695097ec4d5f1cd0035d15fd5cde2eb0
[ "Apache-2.0" ]
null
null
null
test/test_flake8.py
Theosakamg/colcon-powershell
86657800695097ec4d5f1cd0035d15fd5cde2eb0
[ "Apache-2.0" ]
null
null
null
test/test_flake8.py
Theosakamg/colcon-powershell
86657800695097ec4d5f1cd0035d15fd5cde2eb0
[ "Apache-2.0" ]
null
null
null
# Copyright 2016-2018 Dirk Thomas # Licensed under the Apache License, Version 2.0 import logging from pathlib import Path import sys from flake8 import LOG from flake8.api.legacy import get_style_guide # avoid debug and info messages from flake8 internals LOG.setLevel(logging.WARN) def test_flake8(): style_g...
28.270833
72
0.66986
import logging from pathlib import Path import sys from flake8 import LOG from flake8.api.legacy import get_style_guide LOG.setLevel(logging.WARN) def test_flake8(): style_guide = get_style_guide( ignore=['D100', 'D104'], show_source=True, ) style_guide_tests = get_style_guide( ...
true
true
f70bffe4d8ea3902244e43a68f75def149a1c37f
1,705
py
Python
lib/sim/tests/test_onebit_counter.py
pp-mo/bbc
33c20ab511a88a9e7236e82477fae3256d41e38a
[ "BSD-3-Clause" ]
2
2020-10-01T09:05:01.000Z
2021-05-30T17:34:46.000Z
lib/sim/tests/test_onebit_counter.py
pp-mo/bbc
33c20ab511a88a9e7236e82477fae3256d41e38a
[ "BSD-3-Clause" ]
null
null
null
lib/sim/tests/test_onebit_counter.py
pp-mo/bbc
33c20ab511a88a9e7236e82477fae3256d41e38a
[ "BSD-3-Clause" ]
null
null
null
from sim.signal import Signal, SIG_UNDEF from sim.sequencer import DEFAULT_SEQUENCER as SEQ from sim.tests import okeq, okin, setsig, fails from sim.device.arith import CounterOnebit counter = CounterOnebit( 'c1b', t_toggle_0_to_1=3., t_toggle_1_to_0=3., t_out_2_carry=1., t_clear_2_carry=2.,...
20.792683
62
0.695015
from sim.signal import Signal, SIG_UNDEF from sim.sequencer import DEFAULT_SEQUENCER as SEQ from sim.tests import okeq, okin, setsig, fails from sim.device.arith import CounterOnebit counter = CounterOnebit( 'c1b', t_toggle_0_to_1=3., t_toggle_1_to_0=3., t_out_2_carry=1., t_clear_2_carry=2.,...
true
true
f70c000a0c4e53e9d06b04f1b3f2fd647d0cb43f
1,483
py
Python
vm/objects/complex_object.py
a-vorontsov/6ccs3prj
366ae0e6332b6811bbe415bd5cf60d4dcfc4a70a
[ "MIT" ]
3
2020-12-17T20:56:57.000Z
2021-02-19T16:31:08.000Z
vm/objects/complex_object.py
a-vorontsov/6ccs3prj
366ae0e6332b6811bbe415bd5cf60d4dcfc4a70a
[ "MIT" ]
null
null
null
vm/objects/complex_object.py
a-vorontsov/6ccs3prj
366ae0e6332b6811bbe415bd5cf60d4dcfc4a70a
[ "MIT" ]
1
2021-04-19T17:00:56.000Z
2021-04-19T17:00:56.000Z
from primitive_object import PrimitiveObject from null import Null from rpython.rlib.debug import make_sure_not_resized class ComplexObject(PrimitiveObject): __slots__ = ("fields", "size") _immutable_fields_ = ("fields", "size") def __init__(self, initial_size): self.size = initial_size s...
29.66
82
0.607552
from primitive_object import PrimitiveObject from null import Null from rpython.rlib.debug import make_sure_not_resized class ComplexObject(PrimitiveObject): __slots__ = ("fields", "size") _immutable_fields_ = ("fields", "size") def __init__(self, initial_size): self.size = initial_size s...
false
true
f70c01b6d44231ba57c5bf3a9a4f685924e7a5d2
5,927
py
Python
server.py
project-anuvaad/OpenNMT-py
267d097b9e90d59709fe1c26ea8b8e2c43c755c9
[ "MIT" ]
null
null
null
server.py
project-anuvaad/OpenNMT-py
267d097b9e90d59709fe1c26ea8b8e2c43c755c9
[ "MIT" ]
29
2019-07-18T10:21:57.000Z
2019-10-24T11:41:59.000Z
server.py
project-anuvaad/OpenNMT-py
267d097b9e90d59709fe1c26ea8b8e2c43c755c9
[ "MIT" ]
null
null
null
#!/usr/bin/env python from __future__ import unicode_literals import configargparse import sys from config.config import statusCode,benchmark_types, language_supported, file_location import config.bleu_results as bleu_results import tools.sp_enc_dec as sp import ancillary_functions_anuvaad.ancillary_functions as ancill...
35.704819
130
0.672516
from __future__ import unicode_literals import configargparse import sys from config.config import statusCode,benchmark_types, language_supported, file_location import config.bleu_results as bleu_results import tools.sp_enc_dec as sp import ancillary_functions_anuvaad.ancillary_functions as ancillary_functions import a...
true
true
f70c02307b230273bb150b0e7528be384ec81c1c
284
py
Python
CellState.py
WilliamPJSmith/CM4-A
bf2a0f2a49ea7e77454bacba25e6cbb2f282572f
[ "Unlicense" ]
null
null
null
CellState.py
WilliamPJSmith/CM4-A
bf2a0f2a49ea7e77454bacba25e6cbb2f282572f
[ "Unlicense" ]
null
null
null
CellState.py
WilliamPJSmith/CM4-A
bf2a0f2a49ea7e77454bacba25e6cbb2f282572f
[ "Unlicense" ]
null
null
null
class CellState: # Don't show these attributes in gui (not used any more?) excludeAttr = ['divideFlag'] excludeAttr = ['deathFlag'] def __init__(self, cid): self.id = cid self.growthRate = 1.0 self.color = [0.5,0.5,0.5] self.divideFlag = False self.deathFlag = False
20.285714
58
0.676056
class CellState: excludeAttr = ['divideFlag'] excludeAttr = ['deathFlag'] def __init__(self, cid): self.id = cid self.growthRate = 1.0 self.color = [0.5,0.5,0.5] self.divideFlag = False self.deathFlag = False
true
true
f70c02e67d29d64736ba5ecb710a7508719ba359
1,184
py
Python
pyside/lesson_08_main.py
LueyEscargot/pyGuiTest
c072fe29a7c94dc60ec54344a5d4a91253d25f3f
[ "MIT" ]
null
null
null
pyside/lesson_08_main.py
LueyEscargot/pyGuiTest
c072fe29a7c94dc60ec54344a5d4a91253d25f3f
[ "MIT" ]
null
null
null
pyside/lesson_08_main.py
LueyEscargot/pyGuiTest
c072fe29a7c94dc60ec54344a5d4a91253d25f3f
[ "MIT" ]
null
null
null
import sys import argparse import pandas as pd from PySide2.QtCore import QDateTime, QTimeZone from PySide2.QtWidgets import QApplication from lesson_08_main_window import MainWindow from lesson_08_mainWidget import Widget def transform_date(utc, timezone=None): utc_fmt = "yyyy-MM-ddTHH:mm:ss.zzzZ" new_date...
23.68
67
0.69848
import sys import argparse import pandas as pd from PySide2.QtCore import QDateTime, QTimeZone from PySide2.QtWidgets import QApplication from lesson_08_main_window import MainWindow from lesson_08_mainWidget import Widget def transform_date(utc, timezone=None): utc_fmt = "yyyy-MM-ddTHH:mm:ss.zzzZ" new_date...
true
true
f70c042f92fd9bc243b435404e81962654d0d10f
5,051
py
Python
mars/tensor/fft/ifftn.py
wjsi/mars
a69fb19edfe748d4393b90ff2c4941a76c084596
[ "Apache-2.0" ]
2,413
2018-12-06T09:37:11.000Z
2022-03-30T15:47:39.000Z
mars/tensor/fft/ifftn.py
wjsi/mars
a69fb19edfe748d4393b90ff2c4941a76c084596
[ "Apache-2.0" ]
1,335
2018-12-07T03:06:18.000Z
2022-03-31T11:45:57.000Z
mars/tensor/fft/ifftn.py
wjsi/mars
a69fb19edfe748d4393b90ff2c4941a76c084596
[ "Apache-2.0" ]
329
2018-12-07T03:12:41.000Z
2022-03-29T21:49:57.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 1999-2021 Alibaba Group Holding Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
39.460938
80
0.659077
import numpy as np from ... import opcodes as OperandDef from ..datasource import tensor as astensor from .core import TensorComplexFFTNMixin, validate_fftn, TensorStandardFFTN class TensorIFFTN(TensorStandardFFTN, TensorComplexFFTNMixin): _op_type_ = OperandDef.IFFTN def __init__(self, shape=None, axes=No...
true
true
f70c0476b617936a3fedaa107dd5a21cbd494991
4,387
py
Python
research/cv/Neighbor2Neighbor/src/dataset.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
null
null
null
research/cv/Neighbor2Neighbor/src/dataset.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
null
null
null
research/cv/Neighbor2Neighbor/src/dataset.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
2
2019-09-01T06:17:04.000Z
2019-10-04T08:39:45.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
40.62037
99
0.605197
import os import glob import numpy as np import PIL.Image as Image import mindspore.dataset as ds import mindspore.dataset.vision.c_transforms as CV class DataLoader_Imagenet_val: def __init__(self, data_dir, patch=256, noise_style="gauss25", batch_size=4): super(DataLoader_Imagenet_val, self).__init__() ...
true
true
f70c04e3484409a9478edc1a27fe0c1fc78a80c3
402
py
Python
app/route/route_sales.py
LifeLaboratory/skb_sudo_su
92f29cc8e7fbd30624ee0d8634d61b8ecbcace35
[ "MIT" ]
null
null
null
app/route/route_sales.py
LifeLaboratory/skb_sudo_su
92f29cc8e7fbd30624ee0d8634d61b8ecbcace35
[ "MIT" ]
null
null
null
app/route/route_sales.py
LifeLaboratory/skb_sudo_su
92f29cc8e7fbd30624ee0d8634d61b8ecbcace35
[ "MIT" ]
null
null
null
# coding=utf-8 from app.api.base import base_name as names from app.api.src.sales import * from app.api.base.base_router import BaseRouter class Sales(BaseRouter): def __init__(self): super().__init__() self.args = [names.LOGIN, names.PASSWORD] def get(self, id_user): args = { ...
21.157895
49
0.636816
from app.api.base import base_name as names from app.api.src.sales import * from app.api.base.base_router import BaseRouter class Sales(BaseRouter): def __init__(self): super().__init__() self.args = [names.LOGIN, names.PASSWORD] def get(self, id_user): args = { names.ID_...
true
true
f70c0525ea06688b28847ae0a8658955c449019c
15,211
py
Python
salt/states/cloud.py
ContinuumIO/salt
91c0955cfc24b13f07f4917d3d44a9fd9636347a
[ "Apache-2.0" ]
2
2017-09-17T21:10:35.000Z
2019-08-26T03:00:12.000Z
salt/states/cloud.py
ContinuumIO/salt
91c0955cfc24b13f07f4917d3d44a9fd9636347a
[ "Apache-2.0" ]
null
null
null
salt/states/cloud.py
ContinuumIO/salt
91c0955cfc24b13f07f4917d3d44a9fd9636347a
[ "Apache-2.0" ]
3
2021-02-23T08:12:48.000Z
2021-02-23T08:13:13.000Z
# -*- coding: utf-8 -*- ''' Using states instead of maps to deploy clouds ============================================= .. versionadded:: 2014.1.0 (Hydrogen) Use this minion to spin up a cloud instance: .. code-block:: yaml my-ec2-instance: cloud.profile: my-ec2-config ''' import pprint from salt...
32.023158
79
0.571297
import pprint from salt._compat import string_types import salt.utils.cloud as suc def __virtual__(): return 'cloud.profile' in __salt__ def _check_name(name): ret = {'name': name, 'changes': {}, 'result': None, 'comment': ''} if suc.check_name(name, 'a-zA-Z0-9._-'): ...
true
true
f70c053909ddae1905ec212d4343b142ebfb2639
1,945
py
Python
make_test_batches.py
zygmuntz/kaggle-cifar
16936af9cf621d668c50491291e042a7849a1ac3
[ "BSD-2-Clause" ]
26
2015-01-12T18:00:50.000Z
2020-12-19T23:49:16.000Z
make_test_batches.py
zygmuntz/kaggle-cifar
16936af9cf621d668c50491291e042a7849a1ac3
[ "BSD-2-Clause" ]
null
null
null
make_test_batches.py
zygmuntz/kaggle-cifar
16936af9cf621d668c50491291e042a7849a1ac3
[ "BSD-2-Clause" ]
26
2015-01-10T22:35:01.000Z
2020-01-15T08:56:53.000Z
'make cuda-convnet batches from images in the input dir; start numbering batches from 7' import os import sys import numpy as np import cPickle as pickle from natsort import natsorted from PIL import Image from PIL import ImageOps def process( image ): image = np.array( image ) # 32 x 32 x 3 image = np.ro...
24.012346
88
0.666838
'make cuda-convnet batches from images in the input dir; start numbering batches from 7' import os import sys import numpy as np import cPickle as pickle from natsort import natsorted from PIL import Image from PIL import ImageOps def process( image ): image = np.array( image ) image = np.rollaxis( image,...
false
true
f70c054e7f9c75daf40ce7a574ccf0b3546d13eb
3,655
py
Python
iotronic_lightningrod/modules/utils.py
Zakaria-Ben/iotronic-lightning-rod
4a3eff68bd1db2d57beee0e8c51fbb14fcc0877a
[ "Apache-2.0" ]
null
null
null
iotronic_lightningrod/modules/utils.py
Zakaria-Ben/iotronic-lightning-rod
4a3eff68bd1db2d57beee0e8c51fbb14fcc0877a
[ "Apache-2.0" ]
null
null
null
iotronic_lightningrod/modules/utils.py
Zakaria-Ben/iotronic-lightning-rod
4a3eff68bd1db2d57beee0e8c51fbb14fcc0877a
[ "Apache-2.0" ]
1
2018-05-18T13:01:03.000Z
2018-05-18T13:01:03.000Z
# Copyright 2017 MDSLAB - University of Messina # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
28.554688
78
0.661012
__author__ = "Nicola Peditto <npeditto@unime.it" import asyncio import inspect import pkg_resources from six import moves from stevedore import extension import sys from iotronic_lightningrod.config import entry_points_name from iotronic_lightningrod.lightningrod import SESSION from iotronic_lightningrod.modules imp...
true
true
f70c0553ea487881fbca1e06b6c31bb278cd4251
4,069
py
Python
Project/EnhancedDeepPath/scripts/sl_policy.py
iust-projects/Data-Mining-IUST
88f7a5541278f1fe907ca9b70c990a27f60900b2
[ "Apache-2.0" ]
null
null
null
Project/EnhancedDeepPath/scripts/sl_policy.py
iust-projects/Data-Mining-IUST
88f7a5541278f1fe907ca9b70c990a27f60900b2
[ "Apache-2.0" ]
2
2020-07-10T17:58:07.000Z
2020-12-22T09:02:39.000Z
Project/EnhancedDeepPath/scripts/sl_policy.py
iust-projects/Data-Mining-IUST
88f7a5541278f1fe907ca9b70c990a27f60900b2
[ "Apache-2.0" ]
null
null
null
from __future__ import division from __future__ import print_function import tensorflow as tf import numpy as np from itertools import count import sys from networks import policy_nn from utils import * from env import Env from BFS.KB import KB from BFS.BFS import BFS import time relation = sys.argv[1] # episodes = ...
30.593985
152
0.717375
from __future__ import division from __future__ import print_function import tensorflow as tf import numpy as np from itertools import count import sys from networks import policy_nn from utils import * from env import Env from BFS.KB import KB from BFS.BFS import BFS import time relation = sys.argv[1] graphpath = d...
true
true
f70c06fd558229c1a63658ce7eb7a0987e13c526
415
py
Python
students/K33422/Iskhakova_Emina/labs/lab3/admin.py
emina13/ITMO_ICT_WebDevelopment_2021-2022
498a6138e352e7e0ca40d1eb301bc29416158f51
[ "MIT" ]
null
null
null
students/K33422/Iskhakova_Emina/labs/lab3/admin.py
emina13/ITMO_ICT_WebDevelopment_2021-2022
498a6138e352e7e0ca40d1eb301bc29416158f51
[ "MIT" ]
null
null
null
students/K33422/Iskhakova_Emina/labs/lab3/admin.py
emina13/ITMO_ICT_WebDevelopment_2021-2022
498a6138e352e7e0ca40d1eb301bc29416158f51
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import * admin.site.register(Client) admin.site.register(ServicesPL) admin.site.register(MaterialsPL) admin.site.register(Request) admin.site.register(ChosenServices) admin.site.register(ChosenMaterials) admin.site.register(WorkGroup) admin.site.register(Executor...
27.666667
37
0.804819
from django.contrib import admin from .models import * admin.site.register(Client) admin.site.register(ServicesPL) admin.site.register(MaterialsPL) admin.site.register(Request) admin.site.register(ChosenServices) admin.site.register(ChosenMaterials) admin.site.register(WorkGroup) admin.site.register(Executor...
true
true
f70c0739ded8c4ed003bf1865ab7f1e637ca68d0
1,378
py
Python
pytorch-frontend/caffe2/python/operator_test/glu_op_test.py
AndreasKaratzas/stonne
2915fcc46cc94196303d81abbd1d79a56d6dd4a9
[ "MIT" ]
40
2021-06-01T07:37:59.000Z
2022-03-25T01:42:09.000Z
pytorch-frontend/caffe2/python/operator_test/glu_op_test.py
AndreasKaratzas/stonne
2915fcc46cc94196303d81abbd1d79a56d6dd4a9
[ "MIT" ]
14
2021-06-01T11:52:46.000Z
2022-03-25T02:13:08.000Z
pytorch-frontend/caffe2/python/operator_test/glu_op_test.py
AndreasKaratzas/stonne
2915fcc46cc94196303d81abbd1d79a56d6dd4a9
[ "MIT" ]
7
2021-07-20T19:34:26.000Z
2022-03-13T21:07:36.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from caffe2.python import core import caffe2.python.hypothesis_test_util as hu import caffe2.python.serialized_test.serialized_test_util as serial from hypothesis import ...
29.956522
88
0.681422
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from caffe2.python import core import caffe2.python.hypothesis_test_util as hu import caffe2.python.serialized_test.serialized_test_util as serial from hypothesis import ...
true
true
f70c0778ee5161e0f03bfa2ccc6556de70698af0
432
py
Python
BeautifulSoup/Assignment5JSON.py
DipenduChanda/PythonCodes
7e0e9d419e97a38d222e72deaad0324d6007d950
[ "MIT" ]
null
null
null
BeautifulSoup/Assignment5JSON.py
DipenduChanda/PythonCodes
7e0e9d419e97a38d222e72deaad0324d6007d950
[ "MIT" ]
null
null
null
BeautifulSoup/Assignment5JSON.py
DipenduChanda/PythonCodes
7e0e9d419e97a38d222e72deaad0324d6007d950
[ "MIT" ]
null
null
null
import urllib import json summ = 0 count = 0 address = 'http://python-data.dr-chuck.net/comments_319811.json' #raw_input('Enter location: ') uh = urllib.urlopen(address) data = uh.read() #print data tree = json.loads(data) #print json.dumps(tree, indent= 4) for item in tree['comments']: count = count +1 #pri...
19.636364
64
0.68287
import urllib import json summ = 0 count = 0 address = 'http://python-data.dr-chuck.net/comments_319811.json' uh = urllib.urlopen(address) data = uh.read() tree = json.loads(data) for item in tree['comments']: count = count +1 summ = summ + int(item['count']) print summ print count
false
true
f70c079999af8cc5d3c6169652b547016bc9d133
20,765
py
Python
diofant/tests/matrices/test_sparse.py
rajkk1/diofant
6b361334569e4ec2e8c7d30dc324387a4ad417c2
[ "BSD-3-Clause" ]
null
null
null
diofant/tests/matrices/test_sparse.py
rajkk1/diofant
6b361334569e4ec2e8c7d30dc324387a4ad417c2
[ "BSD-3-Clause" ]
null
null
null
diofant/tests/matrices/test_sparse.py
rajkk1/diofant
6b361334569e4ec2e8c7d30dc324387a4ad417c2
[ "BSD-3-Clause" ]
null
null
null
import pytest from diofant import (I, Matrix, MutableDenseMatrix, MutableSparseMatrix, PurePoly, Rational, ShapeError, SparseMatrix, eye, ones, zeros) from diofant.abc import x, y, z __all__ = () def test_sparse_matrix(): def sparse_eye(n): return SparseMatrix....
32.547022
138
0.420997
import pytest from diofant import (I, Matrix, MutableDenseMatrix, MutableSparseMatrix, PurePoly, Rational, ShapeError, SparseMatrix, eye, ones, zeros) from diofant.abc import x, y, z __all__ = () def test_sparse_matrix(): def sparse_eye(n): return SparseMatrix....
true
true
f70c087df6136cae52ef50e6b06ba60de3007853
1,505
py
Python
tests/test_resourcerelease.py
asears/moviepy
6ab3efba36cf7fc5d3245f0ee0dc9244cb141c9e
[ "MIT" ]
1
2020-12-20T20:38:52.000Z
2020-12-20T20:38:52.000Z
tests/test_resourcerelease.py
asears/moviepy
6ab3efba36cf7fc5d3245f0ee0dc9244cb141c9e
[ "MIT" ]
1
2022-03-12T01:04:31.000Z
2022-03-12T01:04:31.000Z
tests/test_resourcerelease.py
asears/moviepy
6ab3efba36cf7fc5d3245f0ee0dc9244cb141c9e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Tool tests meant to be run with pytest. Testing whether issue #596 has been repaired. Note: Platform dependent test. Will only fail on Windows > NT. """ import time from os import remove from os.path import join from moviepy.video.compositing.CompositeVideoClip impo...
28.396226
79
0.662458
import time from os import remove from os.path import join from moviepy.video.compositing.CompositeVideoClip import clips_array from moviepy.video.io.VideoFileClip import VideoFileClip from moviepy.video.VideoClip import ColorClip from tests.test_helper import TMP_DIR def test_release_of_file_via_close(): ...
true
true
f70c0a607295a9f836d9c828a3c177e182d6a1d4
416
py
Python
report_builder/migrations/0007_auto_20190214_1405.py
nazmizorlu/django-report-builder
0b37cd0c94af15531e487554c774a01dad3b5500
[ "BSD-3-Clause" ]
560
2015-01-05T07:14:50.000Z
2022-03-11T13:27:42.000Z
report_builder/migrations/0007_auto_20190214_1405.py
nazmizorlu/django-report-builder
0b37cd0c94af15531e487554c774a01dad3b5500
[ "BSD-3-Clause" ]
189
2015-01-15T16:55:55.000Z
2020-10-29T07:36:51.000Z
report_builder/migrations/0007_auto_20190214_1405.py
nazmizorlu/django-report-builder
0b37cd0c94af15531e487554c774a01dad3b5500
[ "BSD-3-Clause" ]
235
2015-01-10T16:56:17.000Z
2022-03-29T15:57:03.000Z
# Generated by Django 2.1 on 2019-02-14 14:05 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('report_builder', '0006_auto_20180413_0747'), ] operations = [ migrations.AlterField( model_name='filterfield', name='f...
21.894737
64
0.622596
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('report_builder', '0006_auto_20180413_0747'), ] operations = [ migrations.AlterField( model_name='filterfield', name='filter_value', field=models.CharFie...
true
true
f70c0b2de377270eaba5653ab6d25d86078e095d
1,810
py
Python
Bot tiles.py
Santiagorich/Piano-tiles-bot
bc71c331c4350bfc1949840674ba48a957617686
[ "MIT" ]
null
null
null
Bot tiles.py
Santiagorich/Piano-tiles-bot
bc71c331c4350bfc1949840674ba48a957617686
[ "MIT" ]
null
null
null
Bot tiles.py
Santiagorich/Piano-tiles-bot
bc71c331c4350bfc1949840674ba48a957617686
[ "MIT" ]
null
null
null
from pyautogui import * import pyautogui import time import keyboard import random import win32api, win32con px = 0 py = 0 class Tile(): def __init__(self,px,py): self.x = px self.y = py def click(x,y): win32api.SetCursorPos((x,y)) win32api.mouse_event(win32con.MOUSE...
27.424242
74
0.545856
from pyautogui import * import pyautogui import time import keyboard import random import win32api, win32con px = 0 py = 0 class Tile(): def __init__(self,px,py): self.x = px self.y = py def click(x,y): win32api.SetCursorPos((x,y)) win32api.mouse_event(win32con.MOUSE...
true
true
f70c0cda81ea85e278d39235993b2c823742b388
937
py
Python
isi_sdk_9_0_0/test/test_cluster_node_hardware.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
24
2018-06-22T14:13:23.000Z
2022-03-23T01:21:26.000Z
isi_sdk_9_0_0/test/test_cluster_node_hardware.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
46
2018-04-30T13:28:22.000Z
2022-03-21T21:11:07.000Z
isi_sdk_9_0_0/test/test_cluster_node_hardware.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
29
2018-06-19T00:14:04.000Z
2022-02-08T17:51:19.000Z
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 10 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import isi_sdk_9_0_0 from ...
22.853659
96
0.716115
from __future__ import absolute_import import unittest import isi_sdk_9_0_0 from isi_sdk_9_0_0.models.cluster_node_hardware import ClusterNodeHardware from isi_sdk_9_0_0.rest import ApiException class TestClusterNodeHardware(unittest.TestCase): def setUp(self): pass def tearDown(self): ...
true
true
f70c0dcdfb66f70f05cade13558581da90e8fcba
2,032
py
Python
test/functional/rpc_help.py
VeriBlock/b
1c2dccb1f87251b72049b75cc4db630c4da1b5c9
[ "MIT" ]
4
2020-05-14T11:49:20.000Z
2022-01-19T19:54:54.000Z
test/functional/rpc_help.py
VeriBlock/b
1c2dccb1f87251b72049b75cc4db630c4da1b5c9
[ "MIT" ]
125
2020-01-16T11:02:04.000Z
2022-03-24T12:27:13.000Z
test/functional/rpc_help.py
VeriBlock/b
1c2dccb1f87251b72049b75cc4db630c4da1b5c9
[ "MIT" ]
9
2020-04-06T14:31:16.000Z
2021-09-30T07:50:29.000Z
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Copyright (c) 2019-2021 Xenios SEZC # https://www.veriblock.org # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test RPC help output.""" from test_framew...
33.311475
123
0.652067
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import assert_equal, assert_raises_rpc_error import os class HelpRpcTest(BitcoinTestFramework): def set_test_params(self): self.num_nodes = 1 self.supports_cli = False def run_test(self): self.te...
true
true
f70c0e3404bc51df606439e4d7d3727526d29eb8
8,667
py
Python
astropy/table/serialize.py
jbkalmbach/astropy
88ae8c615533efd1e60de4aded204943f66f881c
[ "BSD-3-Clause" ]
1
2022-03-02T17:07:20.000Z
2022-03-02T17:07:20.000Z
astropy/table/serialize.py
jbkalmbach/astropy
88ae8c615533efd1e60de4aded204943f66f881c
[ "BSD-3-Clause" ]
1
2017-09-22T21:10:10.000Z
2017-09-22T21:10:10.000Z
astropy/table/serialize.py
jbkalmbach/astropy
88ae8c615533efd1e60de4aded204943f66f881c
[ "BSD-3-Clause" ]
1
2019-10-09T21:30:57.000Z
2019-10-09T21:30:57.000Z
from importlib import import_module import re from copy import deepcopy from ..utils.data_info import MixinInfo from .column import Column from .table import Table, QTable, has_info_class from ..units.quantity import QuantityInfo __construct_mixin_classes = ('astropy.time.core.Time', 'as...
39.756881
84
0.62063
from importlib import import_module import re from copy import deepcopy from ..utils.data_info import MixinInfo from .column import Column from .table import Table, QTable, has_info_class from ..units.quantity import QuantityInfo __construct_mixin_classes = ('astropy.time.core.Time', 'as...
true
true
f70c0f56841d3e49809f2c21b43b9bac19f6cda2
389
py
Python
social_network/urls.py
zareisajad/social-network-django
991c8075a9fb51b7fbdb17704325ebc4c9d2e0fa
[ "MIT" ]
null
null
null
social_network/urls.py
zareisajad/social-network-django
991c8075a9fb51b7fbdb17704325ebc4c9d2e0fa
[ "MIT" ]
null
null
null
social_network/urls.py
zareisajad/social-network-django
991c8075a9fb51b7fbdb17704325ebc4c9d2e0fa
[ "MIT" ]
null
null
null
from django.contrib import admin from django.urls import path, include from django.conf import settings from django.conf.urls.static import static urlpatterns = [ path('admin/', admin.site.urls), path('', include('posts.urls')), path('accounts/', include('accounts.urls')), ] if settings.DEBUG: urlpatt...
29.923077
80
0.737789
from django.contrib import admin from django.urls import path, include from django.conf import settings from django.conf.urls.static import static urlpatterns = [ path('admin/', admin.site.urls), path('', include('posts.urls')), path('accounts/', include('accounts.urls')), ] if settings.DEBUG: urlpatt...
true
true
f70c0f57d7596b54aedf93375dc3a812baaafc4a
1,126
py
Python
semseg_vaihingen/tests/test_unit_model.py
SilkeDH/semseg_vaihingen
0a8bed71836fa892b8a13b7d2c5109dbcae3c549
[ "MIT" ]
3
2020-02-03T16:55:50.000Z
2020-12-12T15:29:49.000Z
semseg_vaihingen/tests/test_unit_model.py
SilkeDH/semseg_vaihingen
0a8bed71836fa892b8a13b7d2c5109dbcae3c549
[ "MIT" ]
8
2020-03-24T17:39:59.000Z
2022-02-10T00:20:46.000Z
semseg_vaihingen/tests/test_unit_model.py
SilkeDH/semseg_vaihingen
0a8bed71836fa892b8a13b7d2c5109dbcae3c549
[ "MIT" ]
1
2020-02-27T09:48:53.000Z
2020-02-27T09:48:53.000Z
# -*- coding: utf-8 -*- # # Copyright (c) 2017 - 2019 Karlsruhe Institute of Technology - Steinbuch Centre for Computing # This code is distributed under the MIT License # Please, see the LICENSE file # """ Created on Sat Aug 10 08:47:51 2019 @author: vykozlov """ import unittest import semseg_vaihingen.models.deepaas...
29.631579
112
0.637655
import unittest import semseg_vaihingen.models.deepaas_api as deepaas_api class TestModelMethods(unittest.TestCase): def setUp(self): self.meta = deepaas_api.get_metadata() def test_model_metadata_type(self): self.assertTrue(type(self.meta) is dict) def test_model_me...
true
true
f70c10807ab4db35e019d3e3323ba978f7699588
47,600
py
Python
cvxpy/problems/problem.py
adshieh/cvxpy
73b696b71dbb2ceb66a805798c922461e33afc6b
[ "ECL-2.0", "Apache-2.0" ]
2
2021-12-21T03:11:12.000Z
2022-03-02T16:56:24.000Z
cvxpy/problems/problem.py
adshieh/cvxpy
73b696b71dbb2ceb66a805798c922461e33afc6b
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
cvxpy/problems/problem.py
adshieh/cvxpy
73b696b71dbb2ceb66a805798c922461e33afc6b
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
""" Copyright 2013 Steven Diamond, 2017 Akshay Agrawal Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to...
39.209226
100
0.597017
from cvxpy import settings as s from cvxpy import error from cvxpy.problems.objective import Minimize, Maximize from cvxpy.reductions.chain import Chain from cvxpy.reductions.dgp2dcp.dgp2dcp import Dgp2Dcp from cvxpy.reductions.dqcp2dcp import dqcp2dcp from cvxpy.reductions.eval_params import EvalParams from cvxpy.red...
true
true
f70c10ef1da6e4113a7dda715729c1f83bb1a8dc
2,545
py
Python
models/pointnet2_part_seg_msg.py
Danielznn16/RoboticHand-in-KG
27e4eee97ea4ecab40fbd13b24a97e1f94c10258
[ "MIT" ]
null
null
null
models/pointnet2_part_seg_msg.py
Danielznn16/RoboticHand-in-KG
27e4eee97ea4ecab40fbd13b24a97e1f94c10258
[ "MIT" ]
null
null
null
models/pointnet2_part_seg_msg.py
Danielznn16/RoboticHand-in-KG
27e4eee97ea4ecab40fbd13b24a97e1f94c10258
[ "MIT" ]
null
null
null
import torch.nn as nn import torch import torch.nn.functional as F from models.pointnet_util import PointNetSetAbstractionMsg,PointNetSetAbstraction,PointNetFeaturePropagation class get_model(nn.Module): def __init__(self, num_classes, normal_channel=False): super(get_model, self).__init__() if no...
42.416667
149
0.6389
import torch.nn as nn import torch import torch.nn.functional as F from models.pointnet_util import PointNetSetAbstractionMsg,PointNetSetAbstraction,PointNetFeaturePropagation class get_model(nn.Module): def __init__(self, num_classes, normal_channel=False): super(get_model, self).__init__() if no...
true
true
f70c11f8a0c4042151a2c3e044c4f39fda3b2054
15,915
py
Python
training/training_loop.py
NeillWhite/stylegan2-ada
86c6988e60f3350efac7e827337106a72c119085
[ "BSD-Source-Code" ]
1,632
2020-10-08T04:40:10.000Z
2022-03-30T08:00:00.000Z
training/training_loop.py
NeillWhite/stylegan2-ada
86c6988e60f3350efac7e827337106a72c119085
[ "BSD-Source-Code" ]
104
2020-10-08T21:20:41.000Z
2022-01-21T08:12:31.000Z
training/training_loop.py
NeillWhite/stylegan2-ada
86c6988e60f3350efac7e827337106a72c119085
[ "BSD-Source-Code" ]
383
2020-10-08T05:14:22.000Z
2022-03-30T04:26:34.000Z
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # NVIDIA CORPORATION and its licensors retain all intellectual property # and proprietary rights in and to this software, related documentation # and any modifications thereto. Any use, reproduction, disclosure or # distribution of this software and re...
48.669725
172
0.615646
 """Main training loop.""" import os import pickle import time import PIL.Image import numpy as np import tensorflow as tf import dnnlib import dnnlib.tflib as tflib from dnnlib.tflib.autosummary import autosummary from training import dataset def setup_snapshot_image_grid(training_set): gw = np.clip(7680 // t...
false
true
f70c11f8a5b4f0874903f8ba8e3d38d1b62f1537
12,511
py
Python
shared/common.py
jonnyCodev/cloudmapper
10fd533e318f0a18f58929f1759e32005347254e
[ "BSD-3-Clause" ]
null
null
null
shared/common.py
jonnyCodev/cloudmapper
10fd533e318f0a18f58929f1759e32005347254e
[ "BSD-3-Clause" ]
null
null
null
shared/common.py
jonnyCodev/cloudmapper
10fd533e318f0a18f58929f1759e32005347254e
[ "BSD-3-Clause" ]
1
2021-12-23T12:42:14.000Z
2021-12-23T12:42:14.000Z
from __future__ import print_function import argparse import json import datetime import pyjq import yaml import sys from netaddr import IPNetwork from shared.nodes import Account, Region from shared.query import query_aws, get_parameter_file class Severity: # For logging DEBUG = 0 INFO = 1 WARN = 2 ...
31.044665
157
0.587963
from __future__ import print_function import argparse import json import datetime import pyjq import yaml import sys from netaddr import IPNetwork from shared.nodes import Account, Region from shared.query import query_aws, get_parameter_file class Severity: DEBUG = 0 INFO = 1 WARN = 2 ERROR = 3 ...
true
true
f70c12422eb0a206a6ae24931fdebf565cdd6ef1
23,290
py
Python
ArtificialIntelligence/AIPacman/searchAgents.py
spacemanidol/RPICS
c9b61277b557a8ebbf135536923cf9aa49805285
[ "MIT" ]
null
null
null
ArtificialIntelligence/AIPacman/searchAgents.py
spacemanidol/RPICS
c9b61277b557a8ebbf135536923cf9aa49805285
[ "MIT" ]
null
null
null
ArtificialIntelligence/AIPacman/searchAgents.py
spacemanidol/RPICS
c9b61277b557a8ebbf135536923cf9aa49805285
[ "MIT" ]
1
2020-05-08T10:04:57.000Z
2020-05-08T10:04:57.000Z
# searchAgents.py # --------------- # Licensing Information: Please do not distribute or publish solutions to this # project. You are free to use and extend these projects for educational # purposes. The Pacman AI projects were developed at UC Berkeley, primarily by # John DeNero (denero@cs.berkeley.edu) and Dan Klein ...
36.851266
101
0.671876
""" This file contains all of the agents that can be selected to control Pacman. To select an agent, use the '-p' option when running pacman.py. Arguments can be passed to your agent using '-a'. For example, to load a SearchAgent that uses depth first search (dfs), run the following command: > python pacman.py -p...
false
true
f70c127f5f194424081088d7da6167ddefd1d0fc
3,957
py
Python
monitorrent/plugins/clients/transmission.py
mortifactor/monitorrent
2388ec5b82af5d078fa7e37930d3b66b4a797954
[ "WTFPL" ]
465
2015-08-31T09:16:41.000Z
2022-03-12T10:33:04.000Z
monitorrent/plugins/clients/transmission.py
mortifactor/monitorrent
2388ec5b82af5d078fa7e37930d3b66b4a797954
[ "WTFPL" ]
340
2015-07-18T17:31:54.000Z
2022-03-30T15:16:25.000Z
monitorrent/plugins/clients/transmission.py
mortifactor/monitorrent
2388ec5b82af5d078fa7e37930d3b66b4a797954
[ "WTFPL" ]
87
2015-07-18T10:52:24.000Z
2022-03-27T09:52:35.000Z
import six import transmissionrpc from pytz import reference, utc from sqlalchemy import Column, Integer, String from monitorrent.db import Base, DBSession from monitorrent.plugin_managers import register_plugin import base64 class TransmissionCredentials(Base): __tablename__ = "transmission_credentials" id ...
32.434426
106
0.573414
import six import transmissionrpc from pytz import reference, utc from sqlalchemy import Column, Integer, String from monitorrent.db import Base, DBSession from monitorrent.plugin_managers import register_plugin import base64 class TransmissionCredentials(Base): __tablename__ = "transmission_credentials" id ...
true
true
f70c12954517a7ab92741620556d0e5dde45046e
3,476
py
Python
examples/generate_notices_report_for_project_version.py
AvneetKhaira/hub-rest-api-python
d9fac065d8cae72aded87f7326477b03f52f45f8
[ "Apache-2.0" ]
null
null
null
examples/generate_notices_report_for_project_version.py
AvneetKhaira/hub-rest-api-python
d9fac065d8cae72aded87f7326477b03f52f45f8
[ "Apache-2.0" ]
null
null
null
examples/generate_notices_report_for_project_version.py
AvneetKhaira/hub-rest-api-python
d9fac065d8cae72aded87f7326477b03f52f45f8
[ "Apache-2.0" ]
null
null
null
''' Created on Dec 19, 2018 @author: gsnyder Generate notices report for a given project-version ''' from blackduck.HubRestApi import HubInstance import argparse import json import logging import sys import time import zipfile parser = argparse.ArgumentParser("A program to generate the notices file for a given pro...
39.05618
206
0.750575
from blackduck.HubRestApi import HubInstance import argparse import json import logging import sys import time import zipfile parser = argparse.ArgumentParser("A program to generate the notices file for a given project-version") parser.add_argument("project_name") parser.add_argument("version_name") parser.add_arg...
true
true
f70c13aa147eaeb39388692f9ff8fa426bc19476
1,735
py
Python
napari_assistant/_gui/_button_grid.py
Cryaaa/napari-assistant
efdde41368885ccc6cc0e40c4eba236e3883215c
[ "BSD-3-Clause" ]
null
null
null
napari_assistant/_gui/_button_grid.py
Cryaaa/napari-assistant
efdde41368885ccc6cc0e40c4eba236e3883215c
[ "BSD-3-Clause" ]
8
2022-03-07T20:38:01.000Z
2022-03-20T14:50:52.000Z
napari_assistant/_gui/_button_grid.py
Cryaaa/napari-assistant
efdde41368885ccc6cc0e40c4eba236e3883215c
[ "BSD-3-Clause" ]
null
null
null
from qtpy.QtCore import QSize from qtpy.QtGui import QIcon from qtpy.QtWidgets import QListWidget, QListWidgetItem from pathlib import Path ICON_ROOT = Path(__file__).parent / "icons" STYLES = r""" QListWidget{ min-width: 294; background: none; font-size: 8pt; color: #eee; } ...
27.983871
79
0.605764
from qtpy.QtCore import QSize from qtpy.QtGui import QIcon from qtpy.QtWidgets import QListWidget, QListWidgetItem from pathlib import Path ICON_ROOT = Path(__file__).parent / "icons" STYLES = r""" QListWidget{ min-width: 294; background: none; font-size: 8pt; color: #eee; } ...
true
true
f70c144e6451a175f12753b62c7803ebe9b46b98
3,156
py
Python
day14/day14.py
elp2/advent_of_code_2019
af3ce232fb6597dbc80e96bdfd5a6248f07aa3c6
[ "Apache-2.0" ]
1
2021-12-02T15:19:36.000Z
2021-12-02T15:19:36.000Z
day14/day14.py
elp2/advent_of_code_2019
af3ce232fb6597dbc80e96bdfd5a6248f07aa3c6
[ "Apache-2.0" ]
null
null
null
day14/day14.py
elp2/advent_of_code_2019
af3ce232fb6597dbc80e96bdfd5a6248f07aa3c6
[ "Apache-2.0" ]
null
null
null
from collections import defaultdict from copy import copy from math import ceil, floor def parse_item(item): [num, name] = item.strip().split(' ') return {} def filter_zeroes(d): ret = defaultdict(lambda: 0) for k, v in d.items(): if v != 0: ret[k] = v return ret output_to_for...
28.178571
75
0.585234
from collections import defaultdict from copy import copy from math import ceil, floor def parse_item(item): [num, name] = item.strip().split(' ') return {} def filter_zeroes(d): ret = defaultdict(lambda: 0) for k, v in d.items(): if v != 0: ret[k] = v return ret output_to_for...
true
true
f70c15bf0053d4434cfa71056c4b147777a06236
547
py
Python
ufdl-image-segmentation-app/src/ufdl/image_segmentation_app/migrations/0006_job_templates.py
waikato-ufdl/ufdl-backend
776fc906c61eba6c2f2e6324758e7b8a323e30d7
[ "Apache-2.0" ]
null
null
null
ufdl-image-segmentation-app/src/ufdl/image_segmentation_app/migrations/0006_job_templates.py
waikato-ufdl/ufdl-backend
776fc906c61eba6c2f2e6324758e7b8a323e30d7
[ "Apache-2.0" ]
85
2020-07-24T00:04:28.000Z
2022-02-10T10:35:15.000Z
ufdl-image-segmentation-app/src/ufdl/image_segmentation_app/migrations/0006_job_templates.py
waikato-ufdl/ufdl-backend
776fc906c61eba6c2f2e6324758e7b8a323e30d7
[ "Apache-2.0" ]
null
null
null
from django.db import migrations from ufdl.core_app.migrations import DataMigration from ufdl.core_app.migrations.job_templates import get_python_job_template_migration from .job_templates import iterate_job_templates class Migration(migrations.Migration): """ Migration inserting the pre-trained model prese...
27.35
84
0.764168
from django.db import migrations from ufdl.core_app.migrations import DataMigration from ufdl.core_app.migrations.job_templates import get_python_job_template_migration from .job_templates import iterate_job_templates class Migration(migrations.Migration): dependencies = [ ('ufdl-image-segmentation', '0...
true
true
f70c15fdf850b63bd6c15c2688bbc3eb9b82f421
13,299
py
Python
qucumber/nn_states/density_matrix.py
ZvonimirBandic/QuCumber
81f0291951e89346fd8ab5c35cc90341fd8acf35
[ "Apache-2.0", "BSD-3-Clause" ]
163
2018-07-18T15:00:57.000Z
2022-03-31T09:05:06.000Z
qucumber/nn_states/density_matrix.py
ZvonimirBandic/QuCumber
81f0291951e89346fd8ab5c35cc90341fd8acf35
[ "Apache-2.0", "BSD-3-Clause" ]
101
2018-07-17T17:36:06.000Z
2021-10-19T01:40:10.000Z
qucumber/nn_states/density_matrix.py
ZvonimirBandic/QuCumber
81f0291951e89346fd8ab5c35cc90341fd8acf35
[ "Apache-2.0", "BSD-3-Clause" ]
32
2018-08-18T21:56:02.000Z
2022-03-12T22:04:16.000Z
# Copyright 2019 PIQuIL - All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed ...
34.542857
105
0.585608
import warnings import torch from torch.nn import functional as F from qucumber import _warn_on_missing_gpu from qucumber.utils import cplx, unitaries from qucumber.rbm import PurificationRBM from .neural_state import NeuralStateBase class DensityMatrix(NeuralStateBase): _rbm_am = None _rbm_ph = None ...
true
true
f70c16978f371e597599b34590bfb00c27d46526
1,589
py
Python
venv/lib/python3.8/site-packages/vsts/task_agent/v4_1/models/task_group_definition.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/vsts/task_agent/v4_1/models/task_group_definition.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/vsts/task_agent/v4_1/models/task_group_definition.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
2
2021-05-23T16:46:31.000Z
2021-05-26T23:51:09.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -----------------------------------------------------------------...
37.833333
102
0.512901
from msrest.serialization import Model class TaskGroupDefinition(Model): _attribute_map = { 'display_name': {'key': 'displayName', 'type': 'str'}, 'is_expanded': {'key': 'isExpanded', 'type': 'bool'}, 'name': {'key': 'name', 'type': 'str'}, 'tags': {'key': 'tags', 'type...
true
true
f70c16d72623dff41aea402e5b7efb1b1cab6753
1,101
py
Python
qa/rpc-tests/reindex.py
utopiacoin/utopiacoin1
d1cb408de3dd693f9dcd3ce8b92afa6eb9b8325e
[ "MIT" ]
null
null
null
qa/rpc-tests/reindex.py
utopiacoin/utopiacoin1
d1cb408de3dd693f9dcd3ce8b92afa6eb9b8325e
[ "MIT" ]
null
null
null
qa/rpc-tests/reindex.py
utopiacoin/utopiacoin1
d1cb408de3dd693f9dcd3ce8b92afa6eb9b8325e
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # Copyright (c) 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. # # Test -reindex with CheckBlockIndex # from test_framework import NewcoinTestFramework from newcoinrpc.authp...
31.457143
102
0.705722
from test_framework import NewcoinTestFramework from newcoinrpc.authproxy import AuthServiceProxy, JSONRPCException from util import * import os.path class ReindexTest(NewcoinTestFramework): def setup_chain(self): print("Initializing test directory "+self.options.tmpdir) initialize_chain_clean(se...
false
true
f70c16f14cc1f04dbb6d4ae81ba7699c84f9eca6
2,431
py
Python
apps/core/views.py
RobertArzolaC/base_django
3fc368000b418d387ccb57b30fa223ac916f2895
[ "MIT" ]
null
null
null
apps/core/views.py
RobertArzolaC/base_django
3fc368000b418d387ccb57b30fa223ac916f2895
[ "MIT" ]
7
2020-02-12T00:30:41.000Z
2022-02-10T08:03:46.000Z
apps/core/views.py
RobertArzolaC/base_django
3fc368000b418d387ccb57b30fa223ac916f2895
[ "MIT" ]
2
2020-09-21T23:32:11.000Z
2021-01-10T17:29:24.000Z
from django.contrib.auth.models import User from django.contrib.auth import authenticate, login from rest_framework import generics from rest_framework import permissions from rest_framework.views import status from rest_framework.response import Response from rest_framework_jwt.settings import api_settings from .ser...
33.763889
92
0.653229
from django.contrib.auth.models import User from django.contrib.auth import authenticate, login from rest_framework import generics from rest_framework import permissions from rest_framework.views import status from rest_framework.response import Response from rest_framework_jwt.settings import api_settings from .ser...
true
true
f70c1a0ce799afb0a85a95fec93286da54ddca94
4,890
py
Python
src/primaires/scripting/actions/remplir.py
vlegoff/tsunami
36b3b974f6eefbf15cd5d5f099fc14630e66570b
[ "BSD-3-Clause" ]
14
2015-08-21T19:15:21.000Z
2017-11-26T13:59:17.000Z
src/primaires/scripting/actions/remplir.py
vincent-lg/tsunami
36b3b974f6eefbf15cd5d5f099fc14630e66570b
[ "BSD-3-Clause" ]
20
2015-09-29T20:50:45.000Z
2018-06-21T12:58:30.000Z
src/primaires/scripting/actions/remplir.py
vlegoff/tsunami
36b3b974f6eefbf15cd5d5f099fc14630e66570b
[ "BSD-3-Clause" ]
3
2015-05-02T19:42:03.000Z
2018-09-06T10:55:00.000Z
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # ...
44.054054
79
0.666871
from primaires.scripting.action import Action from primaires.scripting.instruction import ErreurExecution class ClasseAction(Action): @classmethod def init_types(cls): cls.ajouter_types(cls.remplir_objet, "Objet", "Objet") cls.ajouter_types(cls.remplir_proto_nb, "Objet", "str", ...
true
true
f70c1a7906ca430885a53e98cf618a681cf5345c
1,871
py
Python
nova/tests/unit/objects/test_numa.py
gabriel-samfira/nova
5ef07cc04dbf0216452ae358e57d9ddac51f1803
[ "Apache-2.0" ]
null
null
null
nova/tests/unit/objects/test_numa.py
gabriel-samfira/nova
5ef07cc04dbf0216452ae358e57d9ddac51f1803
[ "Apache-2.0" ]
null
null
null
nova/tests/unit/objects/test_numa.py
gabriel-samfira/nova
5ef07cc04dbf0216452ae358e57d9ddac51f1803
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
31.711864
78
0.621058
from nova import objects from nova.tests.unit.objects import test_objects fake_obj_numa = objects.NUMATopology( cells=[ objects.NUMACell( id=0, cpuset=set([1, 2]), memory=512, cpu_usage=2, memory_usage=256), objects.NUMACell( id=1, cpuset=set([3, 4]), memory=51...
true
true
f70c1a9e14e34afc1f891dc6e43eba44f38e5062
6,564
py
Python
tests/shell/test_configadmin.py
svidoso/ipopo
1d4b81207e67890dfccc8f562336c7104f194c17
[ "Apache-2.0" ]
65
2015-04-21T10:41:18.000Z
2022-01-02T16:25:40.000Z
tests/shell/test_configadmin.py
svidoso/ipopo
1d4b81207e67890dfccc8f562336c7104f194c17
[ "Apache-2.0" ]
85
2015-01-20T14:23:52.000Z
2022-02-19T17:08:46.000Z
tests/shell/test_configadmin.py
svidoso/ipopo
1d4b81207e67890dfccc8f562336c7104f194c17
[ "Apache-2.0" ]
32
2015-03-13T07:43:05.000Z
2020-04-24T07:56:53.000Z
#!/usr/bin/env python # -- Content-Encoding: UTF-8 -- """ Tests the ConfigurationAdmin shell commands :author: Thomas Calmant """ # Pelix import pelix.framework import pelix.services import pelix.shell import pelix.shell.beans as beans # Standard library import os try: from StringIO import StringIO except Import...
30.248848
80
0.591865
import pelix.framework import pelix.services import pelix.shell import pelix.shell.beans as beans import os try: from StringIO import StringIO except ImportError: from io import StringIO try: import unittest2 as unittest except ImportError: import unittest __version_info__ = (1, 0, 1) __version__ =...
true
true
f70c1c985b94a376cb5ae57f8f742ff430e60c99
8,056
py
Python
src/models/densenet/model.py
gsc2001/ConvexNet
a17609bd5bca0a02b6330b1ad8035f2b280109f0
[ "MIT" ]
null
null
null
src/models/densenet/model.py
gsc2001/ConvexNet
a17609bd5bca0a02b6330b1ad8035f2b280109f0
[ "MIT" ]
null
null
null
src/models/densenet/model.py
gsc2001/ConvexNet
a17609bd5bca0a02b6330b1ad8035f2b280109f0
[ "MIT" ]
null
null
null
""" Vanilla DenseNet implementation Paper: https://arxiv.org/abs/1608.06993 Implementation taken from: https://github.com/pytorch/vision/blob/main/torchvision/models/densenet.py """ import re from collections import OrderedDict from functools import partial from typing import Any, List, Optional, Tuple import torch im...
38.180095
120
0.620531
import re from collections import OrderedDict from functools import partial from typing import Any, List, Optional, Tuple import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.checkpoint as cp from torch import Tensor class _DenseLayer(nn.Module): def __init__( self, num_in...
true
true
f70c1d6a132dc5c4f214794bc2ddfb198c8735bf
10,736
py
Python
modules/andforensics_connector.py
KimVegetable/carpe
8325b680898970c02e1fcfc1929490bf31b9ea49
[ "Apache-2.0" ]
null
null
null
modules/andforensics_connector.py
KimVegetable/carpe
8325b680898970c02e1fcfc1929490bf31b9ea49
[ "Apache-2.0" ]
null
null
null
modules/andforensics_connector.py
KimVegetable/carpe
8325b680898970c02e1fcfc1929490bf31b9ea49
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """module for android forensics.""" import os import io import subprocess import sqlite3 from datetime import datetime from modules import logger from modules import manager from modules import interface class AndForensicsConnector(interface.ModuleConnector): NAME = 'andforensics_connecto...
59.644444
147
0.454359
import os import io import subprocess import sqlite3 from datetime import datetime from modules import logger from modules import manager from modules import interface class AndForensicsConnector(interface.ModuleConnector): NAME = 'andforensics_connector' DESCRIPTION = 'Module for android' TABLE_NAME = '...
true
true
f70c1db71c0d85aad1438342c2764a0e1cfb70f9
48,153
py
Python
python/ccxt/bitz.py
atommy1966/ccxt
928243ed26a268659723c0965c4c5d6ee128d70a
[ "MIT" ]
1
2020-12-21T04:04:24.000Z
2020-12-21T04:04:24.000Z
python/ccxt/bitz.py
atommy1966/ccxt
928243ed26a268659723c0965c4c5d6ee128d70a
[ "MIT" ]
1
2020-05-08T09:19:46.000Z
2020-09-12T14:55:58.000Z
python/ccxt/bitz.py
atommy1966/ccxt
928243ed26a268659723c0965c4c5d6ee128d70a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange import math from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationE...
41.981691
182
0.415114
from ccxt.base.exchange import Exchange import math from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import PermissionDenied from ccxt.base.errors import ArgumentsRequired from ccxt.base.errors import InsufficientFunds from ccxt.base.errors import Inval...
true
true
f70c1e0a237bb4b5225ab23400b8c3d6fa0b725c
3,648
py
Python
_scripts/nblint.py
dfreeman06/ipyradiant
6298889eb0d28c0dda01c4fc9d422814b9858878
[ "BSD-3-Clause" ]
null
null
null
_scripts/nblint.py
dfreeman06/ipyradiant
6298889eb0d28c0dda01c4fc9d422814b9858878
[ "BSD-3-Clause" ]
null
null
null
_scripts/nblint.py
dfreeman06/ipyradiant
6298889eb0d28c0dda01c4fc9d422814b9858878
[ "BSD-3-Clause" ]
null
null
null
""" linter and formatter of notebooks """ # Copyright (c) 2020 ipyradiant contributors. # Distributed under the terms of the Modified BSD License. import json import shutil import subprocess import sys from hashlib import sha256 from pathlib import Path import black import isort import nbformat from . import projec...
27.847328
86
0.573739
import json import shutil import subprocess import sys from hashlib import sha256 from pathlib import Path import black import isort import nbformat from . import project as P NODE = [shutil.which("node") or shutil.which("node.exe") or shutil.which("node.cmd")] NB_METADATA_KEYS = ["kernelspec", "language_info"] ...
true
true
f70c1e5e6020c7c8e558bc2ed17aaf6cfa5c8b3f
812
py
Python
CraftProtocol/Protocol/v1_12_2/Packet/Play/KeepAliveServerPacket.py
Toranktto/CraftProtocol
a6f4a67756c3868820ab76df5e148d76b020d990
[ "MIT" ]
21
2018-05-12T20:18:02.000Z
2022-02-18T17:33:50.000Z
CraftProtocol/Protocol/v1_12_2/Packet/Play/KeepAliveServerPacket.py
Toranktto/CraftProtocol
a6f4a67756c3868820ab76df5e148d76b020d990
[ "MIT" ]
1
2018-06-23T09:13:39.000Z
2018-06-27T01:22:27.000Z
CraftProtocol/Protocol/v1_12_2/Packet/Play/KeepAliveServerPacket.py
Toranktto/CraftProtocol
a6f4a67756c3868820ab76df5e148d76b020d990
[ "MIT" ]
2
2018-05-19T21:36:00.000Z
2020-10-02T03:23:13.000Z
#!/usr/bin/env python from CraftProtocol.Protocol.Packet.BasePacket import BasePacket from CraftProtocol.Protocol.Packet.PacketDirection import PacketDirection from CraftProtocol.StreamIO import StreamIO class KeepAliveServerPacket(BasePacket): PACKET_ID = 0x0B PACKET_DIRECTION = PacketDirection.SERVERBOUND ...
26.193548
73
0.730296
from CraftProtocol.Protocol.Packet.BasePacket import BasePacket from CraftProtocol.Protocol.Packet.PacketDirection import PacketDirection from CraftProtocol.StreamIO import StreamIO class KeepAliveServerPacket(BasePacket): PACKET_ID = 0x0B PACKET_DIRECTION = PacketDirection.SERVERBOUND def __init__(self...
true
true
f70c1fe0165b3d3a65f17e6891bf1b312cb2442d
7,155
py
Python
src/oci/log_analytics/models/classify_command_descriptor.py
xjuarez/oci-python-sdk
3c1604e4e212008fb6718e2f68cdb5ef71fd5793
[ "Apache-2.0", "BSD-3-Clause" ]
3
2020-09-10T22:09:45.000Z
2021-12-24T17:00:07.000Z
src/oci/log_analytics/models/classify_command_descriptor.py
xjuarez/oci-python-sdk
3c1604e4e212008fb6718e2f68cdb5ef71fd5793
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/log_analytics/models/classify_command_descriptor.py
xjuarez/oci-python-sdk
3c1604e4e212008fb6718e2f68cdb5ef71fd5793
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
40.196629
595
0.672397
from .abstract_command_descriptor import AbstractCommandDescriptor from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class ClassifyCommandDescriptor(AbstractCommandDescriptor): def _...
true
true
f70c229a3106b39a3efca6e2d4e211e7c73f62f0
1,626
py
Python
projects/pub_utils.py
ChameleonCloud/portal
92a06fb926dc36e997b94fb8dcd22b7e0d24d3ee
[ "Apache-2.0" ]
3
2015-08-04T20:53:41.000Z
2020-02-14T22:58:20.000Z
projects/pub_utils.py
ChameleonCloud/portal
92a06fb926dc36e997b94fb8dcd22b7e0d24d3ee
[ "Apache-2.0" ]
103
2015-01-15T14:21:00.000Z
2022-03-31T19:14:20.000Z
projects/pub_utils.py
ChameleonCloud/portal
92a06fb926dc36e997b94fb8dcd22b7e0d24d3ee
[ "Apache-2.0" ]
4
2016-02-22T16:48:20.000Z
2021-01-08T17:13:21.000Z
import datetime import re class PublicationUtils: @staticmethod def get_month(bibtex_entry): month = bibtex_entry.get("month") m = None try: m = int(month) except Exception: pass try: m = datetime.datetime.strptime(month, "%b").month ...
29.563636
75
0.54797
import datetime import re class PublicationUtils: @staticmethod def get_month(bibtex_entry): month = bibtex_entry.get("month") m = None try: m = int(month) except Exception: pass try: m = datetime.datetime.strptime(month, "%b").month ...
true
true
f70c238c07f15da6c86f56503d1173d7e0edad0d
498
py
Python
blog/migrations/0019_user_avatar.py
dijiudu/django_blog-django2.0.3
b18889c4b9053b2a39c734c10a3bed84554d4303
[ "MIT" ]
137
2017-05-05T11:57:11.000Z
2021-01-06T18:56:56.000Z
blog/migrations/0019_user_avatar.py
dijiudu/django_blog-django2.0.3
b18889c4b9053b2a39c734c10a3bed84554d4303
[ "MIT" ]
10
2018-05-20T06:36:10.000Z
2022-03-11T23:19:21.000Z
blog/migrations/0019_user_avatar.py
wangchaocc21/django_blog
3fe8215e627960e933abe9548eda123987e94f13
[ "MIT" ]
24
2017-06-19T18:08:59.000Z
2019-02-02T04:15:13.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-06-25 08:45 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0018_auto_20170625_1616'), ] operations = [ migrations.AddField( ...
23.714286
104
0.620482
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0018_auto_20170625_1616'), ] operations = [ migrations.AddField( model_name='user', name='avatar', field...
true
true
f70c259df5a8437d1f62a29d06994107e133cb19
7,245
py
Python
seamseg/utils/coco_ap.py
gladcolor/seamseg
9e6c7e2828f32b311a7b0c16b279ac194e8aaf94
[ "BSD-3-Clause" ]
2
2021-01-11T08:57:40.000Z
2021-01-11T08:57:44.000Z
seamseg/utils/coco_ap.py
gladcolor/seamseg
9e6c7e2828f32b311a7b0c16b279ac194e8aaf94
[ "BSD-3-Clause" ]
null
null
null
seamseg/utils/coco_ap.py
gladcolor/seamseg
9e6c7e2828f32b311a7b0c16b279ac194e8aaf94
[ "BSD-3-Clause" ]
1
2020-09-28T07:55:50.000Z
2020-09-28T07:55:50.000Z
import json import tempfile import time from collections import defaultdict from os import path, remove import numpy as np import torch import torch.distributed as dist from PIL import Image from pycocotools.coco import COCO as _COCO from pycocotools.cocoeval import COCOeval from pycocotools.mask import encode as mask...
38.537234
118
0.633402
import json import tempfile import time from collections import defaultdict from os import path, remove import numpy as np import torch import torch.distributed as dist from PIL import Image from pycocotools.coco import COCO as _COCO from pycocotools.cocoeval import COCOeval from pycocotools.mask import encode as mask...
true
true
f70c25aac3ff734e0ee87c124fe1d3e6037c8415
364
py
Python
examples/quotes_avro/quotes_avro/pipelines.py
ZuInnoTe/scrapy-contrib-bigexporters
45428fcfc2c1531ac93a66d381f46ef70ccef1fe
[ "MIT" ]
9
2020-10-11T16:48:26.000Z
2022-03-22T22:49:55.000Z
examples/quotes_avro/quotes_avro/pipelines.py
ZuInnoTe/scrapy-contrib-bigexporters
45428fcfc2c1531ac93a66d381f46ef70ccef1fe
[ "MIT" ]
4
2020-10-11T18:23:16.000Z
2022-03-24T16:50:34.000Z
examples/quotes_avro/quotes_avro/pipelines.py
ZuInnoTe/scrapy-contrib-bigexporters
45428fcfc2c1531ac93a66d381f46ef70ccef1fe
[ "MIT" ]
1
2022-03-31T20:00:04.000Z
2022-03-31T20:00:04.000Z
# Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html # useful for handling different item types with a single interface from itemadapter import ItemAdapter class QuotesAvroPipeline: def process_it...
26
66
0.769231
# See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html # useful for handling different item types with a single interface from itemadapter import ItemAdapter class QuotesAvroPipeline: def process_item(self, item, spider): return item
true
true
f70c25e9166e6ebd1af0d494cb03847dc405a4fb
285
py
Python
setup.py
DK1515/cli
f89be9083c4f44306118a3ef27c21e63ab21388c
[ "MIT" ]
1
2018-11-29T23:21:47.000Z
2018-11-29T23:21:47.000Z
setup.py
DK1515/cli
f89be9083c4f44306118a3ef27c21e63ab21388c
[ "MIT" ]
7
2018-11-15T17:45:06.000Z
2018-11-15T17:45:30.000Z
ClickTest/setup.py
DK1515/REST_API_Project_5
708b13d5b81cbb1a5efeef3093186159327b2043
[ "MIT" ]
3
2018-10-23T17:34:03.000Z
2018-11-12T23:14:13.000Z
from setuptools import setup setup( name="myhello", version='0.1', py_modules=['colors'], include_package_data=True, install_requires=[ 'Click', 'colorama', ], entry_points=''' [console_scripts] myhello=hello:cli ''', )
16.764706
30
0.564912
from setuptools import setup setup( name="myhello", version='0.1', py_modules=['colors'], include_package_data=True, install_requires=[ 'Click', 'colorama', ], entry_points=''' [console_scripts] myhello=hello:cli ''', )
true
true
f70c25f3f908dc76375bcf8842ae66d0664b7932
2,421
py
Python
zcrmsdk/src/com/zoho/crm/api/modules/argument.py
zoho/zohocrm-python-sdk-2.0
3a93eb3b57fed4e08f26bd5b311e101cb2995411
[ "Apache-2.0" ]
null
null
null
zcrmsdk/src/com/zoho/crm/api/modules/argument.py
zoho/zohocrm-python-sdk-2.0
3a93eb3b57fed4e08f26bd5b311e101cb2995411
[ "Apache-2.0" ]
null
null
null
zcrmsdk/src/com/zoho/crm/api/modules/argument.py
zoho/zohocrm-python-sdk-2.0
3a93eb3b57fed4e08f26bd5b311e101cb2995411
[ "Apache-2.0" ]
null
null
null
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class Argument(object): def __init__(self): """Creates an instance of Argument""" self.__name = Non...
24.21
100
0.712515
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class Argument(object): def __init__(self): self.__name = None self.__value = None self.__key_mod...
true
true
f70c2728edd3ea8062890acf9c7820743b28fe2a
9,753
py
Python
nssrc/com/citrix/netscaler/nitro/resource/config/bfd/bfdsession.py
guardicore/nitro-python
5346a5086134aead80968f15a41ff527adaa0ec1
[ "Apache-2.0" ]
null
null
null
nssrc/com/citrix/netscaler/nitro/resource/config/bfd/bfdsession.py
guardicore/nitro-python
5346a5086134aead80968f15a41ff527adaa0ec1
[ "Apache-2.0" ]
null
null
null
nssrc/com/citrix/netscaler/nitro/resource/config/bfd/bfdsession.py
guardicore/nitro-python
5346a5086134aead80968f15a41ff527adaa0ec1
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2021 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
26.008
191
0.715985
from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_resource from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_response from nssrc.com.citrix.netscaler.nitro.service.options import options from nssrc.com.citrix.netscaler.nitro.exception.nitro_exception import nitro...
true
true
f70c274faeae977083489369b7de5cf47e642696
2,548
py
Python
api/modules/holidays/views.py
HemabhKamboj/server
4ca2666cd49694245aeee0e658bf5ebce448e50e
[ "MIT" ]
null
null
null
api/modules/holidays/views.py
HemabhKamboj/server
4ca2666cd49694245aeee0e658bf5ebce448e50e
[ "MIT" ]
null
null
null
api/modules/holidays/views.py
HemabhKamboj/server
4ca2666cd49694245aeee0e658bf5ebce448e50e
[ "MIT" ]
null
null
null
import datetime import math import requests_cache from bs4 import BeautifulSoup from rest_framework import status from rest_framework.decorators import api_view from rest_framework.response import Response from api.modules.holidays.constants import HOLIDAYS_PAGE_URL, HINDI_DAY_STRING_MAP, HINDI_MONTH_STRING_MAP from ...
36.927536
106
0.605965
import datetime import math import requests_cache from bs4 import BeautifulSoup from rest_framework import status from rest_framework.decorators import api_view from rest_framework.response import Response from api.modules.holidays.constants import HOLIDAYS_PAGE_URL, HINDI_DAY_STRING_MAP, HINDI_MONTH_STRING_MAP from ...
true
true
f70c286a9902002e58cba1233b064d8d8b626ec2
2,583
py
Python
xarray/backends/pynio_.py
martindurant/xarray
98a05f11c6f38489c82e86c9e9df796e7fb65fd2
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
xarray/backends/pynio_.py
martindurant/xarray
98a05f11c6f38489c82e86c9e9df796e7fb65fd2
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
xarray/backends/pynio_.py
martindurant/xarray
98a05f11c6f38489c82e86c9e9df796e7fb65fd2
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function import functools import numpy as np from .. import Variable from ..core.utils import (FrozenOrderedDict, Frozen, NdimSizeLenMixin, DunderArrayMixin) from ..core import indexing from...
32.2875
79
0.650019
from __future__ import absolute_import from __future__ import division from __future__ import print_function import functools import numpy as np from .. import Variable from ..core.utils import (FrozenOrderedDict, Frozen, NdimSizeLenMixin, DunderArrayMixin) from ..core import indexing from...
true
true
f70c28cf5ae8ad999f86f2c1d054ba9d5b3f343a
3,237
py
Python
Scenario2-fan-out/python/subscribe_2.py
rido-min/IoTHubMQTTBrokerPreviewSamples
ee5e556822c1f3abf7faa5a597f25429022625fe
[ "MIT" ]
null
null
null
Scenario2-fan-out/python/subscribe_2.py
rido-min/IoTHubMQTTBrokerPreviewSamples
ee5e556822c1f3abf7faa5a597f25429022625fe
[ "MIT" ]
null
null
null
Scenario2-fan-out/python/subscribe_2.py
rido-min/IoTHubMQTTBrokerPreviewSamples
ee5e556822c1f3abf7faa5a597f25429022625fe
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. All rights reserved.S # Licensed under the MIT License. See License.txt in the project root for # license information. import os import sys import logging # noqa: F401 import json import time from concurrent.futures import ThreadPoolExecutor from paho_client import PahoClient ""...
29.427273
88
0.574915
import os import sys import logging import json import time from concurrent.futures import ThreadPoolExecutor from paho_client import PahoClient client_1 = PahoClient.create_from_connection_string( os.environ["CS_VEHICLE_1"], clean_session=True ) client_2 = PahoClient.create_from_connection_string( os.envi...
true
true
f70c2904f29d66cf924fa7d4d4333085ff320187
1,786
py
Python
ee/models/explicit_team_membership.py
brave-care/posthog
8edd14a16ad936fb241dcf856925e9f2ea87cba4
[ "MIT" ]
7,409
2020-02-09T23:18:10.000Z
2022-03-31T22:36:25.000Z
ee/models/explicit_team_membership.py
brave-care/posthog
8edd14a16ad936fb241dcf856925e9f2ea87cba4
[ "MIT" ]
5,709
2020-02-09T23:26:13.000Z
2022-03-31T20:20:01.000Z
ee/models/explicit_team_membership.py
brave-care/posthog
8edd14a16ad936fb241dcf856925e9f2ea87cba4
[ "MIT" ]
647
2020-02-13T17:50:55.000Z
2022-03-31T11:24:19.000Z
from typing import TYPE_CHECKING from django.db import models from posthog.models.utils import UUIDModel, sane_repr if TYPE_CHECKING: from posthog.models.organization import OrganizationMembership class ExplicitTeamMembership(UUIDModel): class Level(models.IntegerChoices): """Keep in sync with Orga...
35.019608
118
0.715566
from typing import TYPE_CHECKING from django.db import models from posthog.models.utils import UUIDModel, sane_repr if TYPE_CHECKING: from posthog.models.organization import OrganizationMembership class ExplicitTeamMembership(UUIDModel): class Level(models.IntegerChoices): MEMBER = 1, "member" ...
true
true
f70c29e07b84aee9f07e33726a5727e28f2dadee
1,789
py
Python
print_utils.py
FieryRider/matrix-archive
77c49b9ac56346a2e8136851b71512fb53096cc2
[ "Apache-2.0" ]
null
null
null
print_utils.py
FieryRider/matrix-archive
77c49b9ac56346a2e8136851b71512fb53096cc2
[ "Apache-2.0" ]
null
null
null
print_utils.py
FieryRider/matrix-archive
77c49b9ac56346a2e8136851b71512fb53096cc2
[ "Apache-2.0" ]
1
2021-04-22T06:27:04.000Z
2021-04-22T06:27:04.000Z
import sys class PrintUtils: progress = 0 total_progress = 0 @classmethod def print_progress_bar(cls, iteration, total, prefix = '', suffix = '', decimals = 1, length = 100, fill = '█', print_end = "\r"): """ Call in a loop to create terminal progress bar @params: i...
39.755556
134
0.539966
import sys class PrintUtils: progress = 0 total_progress = 0 @classmethod def print_progress_bar(cls, iteration, total, prefix = '', suffix = '', decimals = 1, length = 100, fill = '█', print_end = "\r"): cls.progress = iteration cls.total_progress = total if prefix != "": ...
true
true
f70c2a289f03467d3edc480afd9ba976b3622b9d
354
py
Python
PythonExercicios/des034.py
leuosilveira/Exercicios-Python_Curso-em-Video
17793a5dde868dd6c9a34604ade4b68582db4563
[ "MIT" ]
null
null
null
PythonExercicios/des034.py
leuosilveira/Exercicios-Python_Curso-em-Video
17793a5dde868dd6c9a34604ade4b68582db4563
[ "MIT" ]
null
null
null
PythonExercicios/des034.py
leuosilveira/Exercicios-Python_Curso-em-Video
17793a5dde868dd6c9a34604ade4b68582db4563
[ "MIT" ]
null
null
null
print('Olá!\nvou te ajudar a calcular o valor do aumento que você receberá.') sal = float(input('Qual o seu salário atual? \n R$')) if sal > 1250.00: print('Seu salário final será de R${:.2f}, pois seu aumento foi de 10%.'.format(sal+sal*0.10)) else: print('Seu salário final será de R${:.2f}, pois seu aumento f...
50.571429
98
0.675141
print('Olá!\nvou te ajudar a calcular o valor do aumento que você receberá.') sal = float(input('Qual o seu salário atual? \n R$')) if sal > 1250.00: print('Seu salário final será de R${:.2f}, pois seu aumento foi de 10%.'.format(sal+sal*0.10)) else: print('Seu salário final será de R${:.2f}, pois seu aumento f...
true
true
f70c2b3d4122d9726b7335d3f84e1321b0abeb30
3,040
py
Python
src/HttpCtrl/http_handler.py
annoviko/robotframework-httpctrl
5514d2d567a8b817df8b3598ab559419e6825acd
[ "BSD-3-Clause" ]
16
2019-03-15T12:29:06.000Z
2022-02-25T21:17:27.000Z
src/HttpCtrl/http_handler.py
annoviko/robotframework-httpctrl
5514d2d567a8b817df8b3598ab559419e6825acd
[ "BSD-3-Clause" ]
29
2019-03-15T12:50:18.000Z
2022-01-03T13:28:34.000Z
src/HttpCtrl/http_handler.py
annoviko/robotframework-httpctrl
5514d2d567a8b817df8b3598ab559419e6825acd
[ "BSD-3-Clause" ]
3
2019-11-22T21:06:48.000Z
2021-06-16T10:00:58.000Z
""" HttpCtrl library provides HTTP/HTTPS client and server API to Robot Framework to make REST API testing easy. Authors: Andrei Novikov Date: 2018-2021 Copyright: The 3-Clause BSD License """ from http.server import SimpleHTTPRequestHandler from robot.api import logger from HttpCtrl.internal_messages...
25.982906
109
0.622368
from http.server import SimpleHTTPRequestHandler from robot.api import logger from HttpCtrl.internal_messages import TerminationRequest, IgnoreRequest from HttpCtrl.request import Request from HttpCtrl.request_storage import RequestStorage from HttpCtrl.response_storage import ResponseStorage class HttpHa...
true
true
f70c2bde40e80afd180cc8ccd64d2e3d06547f1d
677
py
Python
tests/qtest.py
henry232323/henrio
315225094d4d1fdad2142534b8cd640462e8b81f
[ "MIT" ]
6
2017-12-12T00:49:02.000Z
2020-12-03T11:12:40.000Z
tests/qtest.py
henry232323/henrio
315225094d4d1fdad2142534b8cd640462e8b81f
[ "MIT" ]
3
2017-10-04T02:05:31.000Z
2020-10-03T04:28:18.000Z
tests/qtest.py
henry232323/henrio
315225094d4d1fdad2142534b8cd640462e8b81f
[ "MIT" ]
2
2017-10-04T01:59:10.000Z
2017-12-23T21:24:22.000Z
from henrio import * import unittest class QueueTest(unittest.TestCase): def test_queue(self): try: l = get_default_loop() q = HeapQueue(50) print(q) async def d(): return await q.get() async def a(i): await sl...
20.515152
51
0.456425
from henrio import * import unittest class QueueTest(unittest.TestCase): def test_queue(self): try: l = get_default_loop() q = HeapQueue(50) print(q) async def d(): return await q.get() async def a(i): await sl...
true
true
f70c2ca88960421c39d473ad7ec4ca9d39d7ff13
11,031
py
Python
data/utils/sample.py
NielsOerbaek/leaf
db007a6310da41d73c5dec071ffe1453519d028b
[ "BSD-2-Clause" ]
null
null
null
data/utils/sample.py
NielsOerbaek/leaf
db007a6310da41d73c5dec071ffe1453519d028b
[ "BSD-2-Clause" ]
null
null
null
data/utils/sample.py
NielsOerbaek/leaf
db007a6310da41d73c5dec071ffe1453519d028b
[ "BSD-2-Clause" ]
null
null
null
''' samples from all raw data; by default samples in a non-iid manner; namely, randomly selects users from raw data until their cumulative amount of data exceeds the given number of datapoints to sample (specified by --fraction argument); ordering of original data points is not preserved in sampled data ''' import a...
34.908228
91
0.573928
import argparse import json import os import random import time from collections import OrderedDict from constants import DATASETS, SEED_FILES from util import iid_divide parser = argparse.ArgumentParser() parser.add_argument('--name', help='name of dataset to parse; default: sent140;', ...
true
true
f70c2cbe9e3ad8b0d91c44d57ee280780565d023
5,297
py
Python
firststreet/api/historic.py
opleban/fsf_api_access_python
ebe4af99e0f1dd59f7273fa62e6f05953aa8a510
[ "MIT" ]
null
null
null
firststreet/api/historic.py
opleban/fsf_api_access_python
ebe4af99e0f1dd59f7273fa62e6f05953aa8a510
[ "MIT" ]
null
null
null
firststreet/api/historic.py
opleban/fsf_api_access_python
ebe4af99e0f1dd59f7273fa62e6f05953aa8a510
[ "MIT" ]
null
null
null
# Author: Kelvin Lai <kelvin@firststreet.org> # Copyright: This module is owned by First Street Foundation # Standard Imports import logging # Internal Imports from firststreet.api import csv_format from firststreet.api.api import Api from firststreet.errors import InvalidArgument from firststreet.models.historic imp...
41.382813
120
0.666037
import logging from firststreet.api import csv_format from firststreet.api.api import Api from firststreet.errors import InvalidArgument from firststreet.models.historic import HistoricEvent, HistoricSummary class Historic(Api): def get_event(self, search_item, csv=False, output_dir=None, extra_param=None): ...
true
true
f70c2ccaa66136c4e168b5107d277a7a896ae606
72,840
py
Python
intersight/model/virtualization_iwe_host_interface_relationship.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
5
2021-12-16T15:13:32.000Z
2022-03-29T16:09:54.000Z
intersight/model/virtualization_iwe_host_interface_relationship.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
4
2022-01-25T19:05:51.000Z
2022-03-29T20:18:37.000Z
intersight/model/virtualization_iwe_host_interface_relationship.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
2
2020-07-07T15:01:08.000Z
2022-01-31T04:27:35.000Z
""" Cisco Intersight Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan...
62.685026
1,678
0.657606
import re import sys from intersight.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, ) def lazy_...
true
true
f70c2d8d45be6f5330ff2d3db61a1152fce3e388
4,299
py
Python
common-python/bcctools/bcc_ansible/bcc_switch_agent_datasource.py
LaudateCorpus1/atg-commerce-iaas
f1ae31657fc0111a5c019d46a28a3c81aae1acb2
[ "MIT" ]
28
2016-11-07T14:03:25.000Z
2022-02-01T08:46:52.000Z
common-python/bcctools/bcc_ansible/bcc_switch_agent_datasource.py
LaudateCorpus1/atg-commerce-iaas
f1ae31657fc0111a5c019d46a28a3c81aae1acb2
[ "MIT" ]
3
2016-11-09T13:23:03.000Z
2018-04-05T15:49:22.000Z
common-python/bcctools/bcc_ansible/bcc_switch_agent_datasource.py
LaudateCorpus1/atg-commerce-iaas
f1ae31657fc0111a5c019d46a28a3c81aae1acb2
[ "MIT" ]
13
2016-10-27T17:59:38.000Z
2022-02-18T04:38:38.000Z
#!/usr/bin/python # The MIT License (MIT) # # Copyright (c) 2017 Oracle # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to us...
32.816794
115
0.612933
__author__ = "Michael Shanley (Oracle A-Team)" __copyright__ = "Copyright (c) 2017 Oracle" __version__ = "1.0.0.0" __date__ = "@BUILDDATE@" __status__ = "Development" __module__ = "switch_agent_datasource" ANSIBLE_METADATA = {'metadata_version': '1.0', 'status': ['preview'], '...
true
true
f70c2d9f2af9f994a71e25fe38bb042a3b41ce76
86
py
Python
todo/admin.py
Overexm/django_git_merey
85ca0fa1c38e4dee40259a31fcb904897f6d3cbc
[ "MIT" ]
null
null
null
todo/admin.py
Overexm/django_git_merey
85ca0fa1c38e4dee40259a31fcb904897f6d3cbc
[ "MIT" ]
null
null
null
todo/admin.py
Overexm/django_git_merey
85ca0fa1c38e4dee40259a31fcb904897f6d3cbc
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import ToDo admin.site.register(ToDo)
14.333333
32
0.802326
from django.contrib import admin from .models import ToDo admin.site.register(ToDo)
true
true
f70c2ddc8e681bddcb67b9de0718cd3fd68ded9f
33,074
py
Python
python-wamp-client/labby/rpc.py
Simon-Deuring/labgrid-frotend-mle
11dd53167c9fea06c6ad9af07b87f0cae1df5fd0
[ "MIT" ]
null
null
null
python-wamp-client/labby/rpc.py
Simon-Deuring/labgrid-frotend-mle
11dd53167c9fea06c6ad9af07b87f0cae1df5fd0
[ "MIT" ]
19
2021-10-15T08:31:51.000Z
2021-10-19T12:53:46.000Z
python-wamp-client/labby/rpc.py
Simon-Deuring/labgrid-frotend-mle
11dd53167c9fea06c6ad9af07b87f0cae1df5fd0
[ "MIT" ]
null
null
null
""" Generic RPC functions for labby """ # import asyncio import asyncio from cgi import print_exception import os from pathlib import Path from typing import Any, Callable, Dict, Iterable, List, Optional, Type, Union import yaml from attr import attrib, attrs from autobahn.wamp.exception import ApplicationError from ...
38.36891
170
0.635151
import asyncio from cgi import print_exception import os from pathlib import Path from typing import Any, Callable, Dict, Iterable, List, Optional, Type, Union import yaml from attr import attrib, attrs from autobahn.wamp.exception import ApplicationError from labby.console import Console from labby.resource import ...
true
true
f70c2f0326e85540f299fe27470653d4c2fb01bf
1,985
py
Python
data_collection/gazette/spiders/es_vila_velha.py
kaiocp/querido-diario
86004049c6eee305e13066cf3607d30849bb099a
[ "MIT" ]
454
2018-04-07T03:32:57.000Z
2020-08-17T19:56:22.000Z
data_collection/gazette/spiders/es_vila_velha.py
kaiocp/querido-diario
86004049c6eee305e13066cf3607d30849bb099a
[ "MIT" ]
165
2018-04-13T00:36:17.000Z
2020-08-17T23:41:45.000Z
data_collection/gazette/spiders/es_vila_velha.py
kaiocp/querido-diario
86004049c6eee305e13066cf3607d30849bb099a
[ "MIT" ]
183
2018-04-11T15:09:37.000Z
2020-08-15T18:55:11.000Z
from datetime import date import dateparser from scrapy import FormRequest, Request from gazette.items import Gazette from gazette.spiders.base import BaseGazetteSpider class VilaVelhaSpider(BaseGazetteSpider): name = "es_vila_velha" allowed_domains = ["www.vilavelha.es.gov.br"] TERRITORY_ID = "3205200...
36.090909
86
0.63073
from datetime import date import dateparser from scrapy import FormRequest, Request from gazette.items import Gazette from gazette.spiders.base import BaseGazetteSpider class VilaVelhaSpider(BaseGazetteSpider): name = "es_vila_velha" allowed_domains = ["www.vilavelha.es.gov.br"] TERRITORY_ID = "3205200...
true
true
f70c2fd4c461e1403893699683a5364d22263b7f
5,630
py
Python
docs/source/conf.py
DouglasWebster/gdscript-to-restructured
e8a6513bbeaf204a9c0d267f86c41c203581af44
[ "MIT" ]
null
null
null
docs/source/conf.py
DouglasWebster/gdscript-to-restructured
e8a6513bbeaf204a9c0d267f86c41c203581af44
[ "MIT" ]
null
null
null
docs/source/conf.py
DouglasWebster/gdscript-to-restructured
e8a6513bbeaf204a9c0d267f86c41c203581af44
[ "MIT" ]
null
null
null
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
29.631579
129
0.668206
import sphinx_rtd_theme import os import sys project = 'GDScript to reStructured' copyright = '2021, GDScript' author = 'Nathan Lavato' version = '0.1.0' release = version pygments_style = 'sphinx' exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] needs_sphinx = '3.0' sys.path.append(os.path.abspath("...
true
true
f70c3014ecf1637bf94b800311ac7370413a10c1
617
py
Python
tests/plugins/tasks/networking/test_netmiko_file_transfer.py
MatthiasGabriel/nornir
af948f20daee725f9bf257b0e73b688838ebcbc2
[ "Apache-2.0" ]
1
2019-04-10T08:14:59.000Z
2019-04-10T08:14:59.000Z
tests/plugins/tasks/networking/test_netmiko_file_transfer.py
MatthiasGabriel/nornir
af948f20daee725f9bf257b0e73b688838ebcbc2
[ "Apache-2.0" ]
null
null
null
tests/plugins/tasks/networking/test_netmiko_file_transfer.py
MatthiasGabriel/nornir
af948f20daee725f9bf257b0e73b688838ebcbc2
[ "Apache-2.0" ]
null
null
null
import os from nornir.plugins.tasks import networking THIS_DIR = os.path.dirname(os.path.realpath(__file__)) class Test(object): def test_netmiko_file_transfer(self, nornir): source_file = os.path.join(THIS_DIR, "data", "test_file.txt") dest_file = "test_file.txt" result = nornir.filter...
26.826087
69
0.623987
import os from nornir.plugins.tasks import networking THIS_DIR = os.path.dirname(os.path.realpath(__file__)) class Test(object): def test_netmiko_file_transfer(self, nornir): source_file = os.path.join(THIS_DIR, "data", "test_file.txt") dest_file = "test_file.txt" result = nornir.filter...
true
true