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
f76ba4fada981aa96d1723ccfc5eb70455e7194b
1,793
py
Python
deploy/ansible/roles/cloud_master/files/api_srv/cloud_common.py
vient/proctf-2019
b7b954fff2396a7a7a83c90ec55d75bce4a3485c
[ "MIT" ]
2
2020-04-22T19:36:16.000Z
2020-09-16T07:45:54.000Z
deploy/ansible/roles/cloud_master/files/api_srv/cloud_common.py
vient/proctf-2019
b7b954fff2396a7a7a83c90ec55d75bce4a3485c
[ "MIT" ]
3
2021-03-31T19:21:51.000Z
2021-06-08T20:31:48.000Z
deploy/ansible/roles/cloud_master/files/api_srv/cloud_common.py
leetchicken/proctf-2019
b7b954fff2396a7a7a83c90ec55d75bce4a3485c
[ "MIT" ]
3
2019-10-26T00:25:03.000Z
2019-11-23T21:10:10.000Z
# Developed by Alexander Bersenev from Hackerdom team, bay@hackerdom.ru """Common functions and consts that are often used by other scripts in this directory""" import subprocess import sys import time import os import shutil # change me before the game ROUTER_HOST = "127.0.0.1" SSH_OPTS = [ "-o", "StrictHostK...
22.987179
83
0.629113
import subprocess import sys import time import os import shutil ROUTER_HOST = "127.0.0.1" SSH_OPTS = [ "-o", "StrictHostKeyChecking=yes", "-o", "CheckHostIP=yes", "-o", "NoHostAuthenticationForLocalhost=yes", "-o", "BatchMode=yes", "-o", "LogLevel=ERROR", "-o", "UserKnownHostsFile=known_hos...
true
true
f76ba536b6bdf71f97a14f4b2f5f27a3ae5f9ec4
26,915
py
Python
tworaven_apps/ta3ta2-api/data_ext_pb2.py
Mital188/TwoRavens
f84751b33fde26cd379d8120b3c6a6b5ed2c315d
[ "Apache-2.0" ]
1
2021-11-05T17:42:47.000Z
2021-11-05T17:42:47.000Z
tworaven_apps/ta3ta2-api/data_ext_pb2.py
Mital188/TwoRavens
f84751b33fde26cd379d8120b3c6a6b5ed2c315d
[ "Apache-2.0" ]
null
null
null
tworaven_apps/ta3ta2-api/data_ext_pb2.py
Mital188/TwoRavens
f84751b33fde26cd379d8120b3c6a6b5ed2c315d
[ "Apache-2.0" ]
2
2019-02-21T18:29:51.000Z
2019-09-02T21:21:26.000Z
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: data_ext.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _refl...
38.838384
2,780
0.747427
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database from google.p...
true
true
f76ba56ad9e02adc44596be4f44e49d0baa433c5
4,567
py
Python
tools/python/post_generation/inject_promo_ids.py
Polas/omim
03558b418b338f506fbf3aa72ddf15187a2005ee
[ "Apache-2.0" ]
1
2020-11-10T01:13:12.000Z
2020-11-10T01:13:12.000Z
tools/python/post_generation/inject_promo_ids.py
Polas/omim
03558b418b338f506fbf3aa72ddf15187a2005ee
[ "Apache-2.0" ]
1
2018-11-26T15:44:46.000Z
2018-11-27T10:55:36.000Z
tools/python/post_generation/inject_promo_ids.py
Polas/omim
03558b418b338f506fbf3aa72ddf15187a2005ee
[ "Apache-2.0" ]
null
null
null
import json import logging import os import re import sys from collections import defaultdict from multiprocessing import Pool from mwm import mwm class PromoIds(object): def __init__(self, countries, cities, mwm_path, types_path, osm2ft_path): self.countries = countries self.cities = cities ...
31.068027
80
0.568645
import json import logging import os import re import sys from collections import defaultdict from multiprocessing import Pool from mwm import mwm class PromoIds(object): def __init__(self, countries, cities, mwm_path, types_path, osm2ft_path): self.countries = countries self.cities = cities ...
true
true
f76ba68b502907d79770f42cc4133bd2682de272
6,202
py
Python
common_utils.py
kunal2812/Programmophone
a037ae4a43b7a059e29c560c84bbaff11df0939f
[ "MIT" ]
1
2021-12-21T09:21:54.000Z
2021-12-21T09:21:54.000Z
common_utils.py
kunal2812/Programmophone
a037ae4a43b7a059e29c560c84bbaff11df0939f
[ "MIT" ]
null
null
null
common_utils.py
kunal2812/Programmophone
a037ae4a43b7a059e29c560c84bbaff11df0939f
[ "MIT" ]
1
2021-12-21T09:21:56.000Z
2021-12-21T09:21:56.000Z
'''This file contains utilities common to all type of files and associated with the editor''' from tkinter import * from threading import * from utils import * def TellPos(command, editor, count, activity_log, code_input): ''' Tells the current position of the cursor ''' pos = "at line " pos = pos...
30.70297
278
0.602548
from tkinter import * from threading import * from utils import * def TellPos(command, editor, count, activity_log, code_input): pos = "at line " pos = pos + editor.index(INSERT) pos = pos.replace('.', ' and column ') Speak(pos) def DeletePosLeft(index, editor, count, activity_log): ind = index.s...
true
true
f76ba6ae4e5590ffb7f73d099247ceb55d00fdee
24,135
py
Python
dolfyn/adv/motion.py
lkilcher/dolfyn-light
416bf6aa8a3455cebf973f416c9e4ba89a801a71
[ "Apache-2.0" ]
null
null
null
dolfyn/adv/motion.py
lkilcher/dolfyn-light
416bf6aa8a3455cebf973f416c9e4ba89a801a71
[ "Apache-2.0" ]
null
null
null
dolfyn/adv/motion.py
lkilcher/dolfyn-light
416bf6aa8a3455cebf973f416c9e4ba89a801a71
[ "Apache-2.0" ]
null
null
null
import numpy as np import scipy.signal as sig from scipy.integrate import cumtrapz from .rotate import inst2earth, _rotate_vel2body import warnings class CalcMotion(object): """ A 'calculator' for computing the velocity of points that are rigidly connected to an ADV-body with an IMU. Parameters ...
37.360681
98
0.591589
import numpy as np import scipy.signal as sig from scipy.integrate import cumtrapz from .rotate import inst2earth, _rotate_vel2body import warnings class CalcMotion(object): def __init__(self, advo, accel_filtfreq=1. / 30, vel_filtfreq=None, to_earth=True): ...
true
true
f76ba733f40bc90d55a2c3e660d7b854992af802
3,361
py
Python
apps/core/templatetags/docutils_extensions/writers.py
dulrich15/spot
5fa57dbb9c0c9a010b4dc153f832b2d130bc8f73
[ "MIT" ]
null
null
null
apps/core/templatetags/docutils_extensions/writers.py
dulrich15/spot
5fa57dbb9c0c9a010b4dc153f832b2d130bc8f73
[ "MIT" ]
null
null
null
apps/core/templatetags/docutils_extensions/writers.py
dulrich15/spot
5fa57dbb9c0c9a010b4dc153f832b2d130bc8f73
[ "MIT" ]
null
null
null
from __future__ import division from __future__ import unicode_literals # look here for improvements... # http://www.arnebrodowski.de/blog/write-your-own-restructuredtext-writer.html import codecs import os import xml.etree.ElementTree as ET from subprocess import Popen, PIPE from django.utils.safestring import mar...
28.008333
78
0.644451
from __future__ import division from __future__ import unicode_literals import codecs import os import xml.etree.ElementTree as ET from subprocess import Popen, PIPE from django.utils.safestring import mark_safe from docutils.core import publish_parts from docutils.writers import latex2e class MyLatexWriter(latex...
true
true
f76ba77c986622fc0bc9de8da7b6fe03c871d39c
969
py
Python
labelous_ti/label_app/urls.py
tpwrules/labelous
9a87e60a34c41066413bd6e913a21aaeff5ed786
[ "MIT" ]
null
null
null
labelous_ti/label_app/urls.py
tpwrules/labelous
9a87e60a34c41066413bd6e913a21aaeff5ed786
[ "MIT" ]
null
null
null
labelous_ti/label_app/urls.py
tpwrules/labelous
9a87e60a34c41066413bd6e913a21aaeff5ed786
[ "MIT" ]
null
null
null
from django.urls import path from . import views import image_mgr.views from django.contrib.auth.decorators import login_required app_name = "label_app" urlpatterns = [ path('', login_required(views.tool), name="label_tool"), path('Images/f/<str:filename>.jpg', image_mgr.views.image_file, name...
37.269231
68
0.716202
from django.urls import path from . import views import image_mgr.views from django.contrib.auth.decorators import login_required app_name = "label_app" urlpatterns = [ path('', login_required(views.tool), name="label_tool"), path('Images/f/<str:filename>.jpg', image_mgr.views.image_file, name...
true
true
f76baa3525617fb3c2b34362dd78319ead816de9
281
py
Python
jp.atcoder/abc230/abc230_e/28080338.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-09T03:06:25.000Z
2022-02-09T03:06:25.000Z
jp.atcoder/abc230/abc230_e/28080338.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-05T22:53:18.000Z
2022-02-09T01:29:30.000Z
jp.atcoder/abc230/abc230_e/28080338.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
null
null
null
import typing def floor_sum(n: int) -> int: s = 0 i = 1 while i <= n: x = n // i j = n // x + 1 s += x * (j - i) i = j return s def main() -> typing.NoReturn: n = int(input()) print(floor_sum(n)) main()
14.789474
31
0.395018
import typing def floor_sum(n: int) -> int: s = 0 i = 1 while i <= n: x = n // i j = n // x + 1 s += x * (j - i) i = j return s def main() -> typing.NoReturn: n = int(input()) print(floor_sum(n)) main()
true
true
f76baa4859b5e5a585739c4db7915863d93065f4
1,331
py
Python
capture_and_uploadImage.py
sagrawal1234/AUTOMATION-NEW
06b98a51416a59e73d26b3c53d7fe116d3ca4413
[ "MIT" ]
null
null
null
capture_and_uploadImage.py
sagrawal1234/AUTOMATION-NEW
06b98a51416a59e73d26b3c53d7fe116d3ca4413
[ "MIT" ]
null
null
null
capture_and_uploadImage.py
sagrawal1234/AUTOMATION-NEW
06b98a51416a59e73d26b3c53d7fe116d3ca4413
[ "MIT" ]
null
null
null
import cv2 import dropbox import time import random start_time = time.time() def take_snapshot(): number = random.randint(0,100) #initializing cv2 videoCaptureObject = cv2.VideoCapture(0) result = True while(result): #read the frames while the camera is on ret,frame =...
27.163265
86
0.642374
import cv2 import dropbox import time import random start_time = time.time() def take_snapshot(): number = random.randint(0,100) videoCaptureObject = cv2.VideoCapture(0) result = True while(result): ret,frame = videoCaptureObject.read() img_name = "img"...
true
true
f76bab24e84cf29a5f241d9df01aaa6042b7ffdc
9,789
py
Python
integration/tests/test_agent.py
MagalixCorp/agent
1369dd949eb03520ed33f1ecec5882bb696b4f34
[ "MIT" ]
null
null
null
integration/tests/test_agent.py
MagalixCorp/agent
1369dd949eb03520ed33f1ecec5882bb696b4f34
[ "MIT" ]
null
null
null
integration/tests/test_agent.py
MagalixCorp/agent
1369dd949eb03520ed33f1ecec5882bb696b4f34
[ "MIT" ]
null
null
null
import requests import os import time import pytest import yaml import uuid URL = os.environ["URL"] EMAIL = os.environ["EMAIL"] PASSWORD = os.environ["PASSWORD"] CLUSTER_NAME = "agent-integration-test-" + uuid.uuid4().hex[:5] NAMESPACE = "agent-integration-test" AGET_IMAGE = os.environ["AGENT_IMAGE"] TEST_CONSTRAINT...
33.871972
136
0.594851
import requests import os import time import pytest import yaml import uuid URL = os.environ["URL"] EMAIL = os.environ["EMAIL"] PASSWORD = os.environ["PASSWORD"] CLUSTER_NAME = "agent-integration-test-" + uuid.uuid4().hex[:5] NAMESPACE = "agent-integration-test" AGET_IMAGE = os.environ["AGENT_IMAGE"] TEST_CONSTRAINT...
true
true
f76bac30ad31ffd1a11e480e9725034bf1bc66fd
3,615
py
Python
nvflare/private/fed/client/client_engine_internal_spec.py
IsaacYangSLA/NVFlare
8c6582894c9a8431f64479bc9f472fefcd71e5a7
[ "Apache-2.0" ]
null
null
null
nvflare/private/fed/client/client_engine_internal_spec.py
IsaacYangSLA/NVFlare
8c6582894c9a8431f64479bc9f472fefcd71e5a7
[ "Apache-2.0" ]
null
null
null
nvflare/private/fed/client/client_engine_internal_spec.py
IsaacYangSLA/NVFlare
8c6582894c9a8431f64479bc9f472fefcd71e5a7
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2021-2022, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
24.931034
99
0.613831
from abc import ABC, abstractmethod from nvflare.apis.client_engine_spec import ClientEngineSpec, TaskAssignment from nvflare.apis.fl_context import FLContext from nvflare.apis.shareable import Shareable from nvflare.apis.workspace import Workspace class ClientEngineInternalSpec(ClientEngineSpec, ABC): def get...
true
true
f76bac7093cf8664626541080c84be45de232a0f
1,127
py
Python
vedacore/modules/bricks/plugin.py
carpedkm/vedatad
55f8dced57f698ee9fc0da9bcf471d171e718d0c
[ "Apache-2.0" ]
36
2021-05-22T04:36:22.000Z
2022-03-17T06:42:54.000Z
vedacore/modules/bricks/plugin.py
carpedkm/vedatad
55f8dced57f698ee9fc0da9bcf471d171e718d0c
[ "Apache-2.0" ]
16
2021-07-26T07:43:53.000Z
2022-03-30T08:48:58.000Z
vedacore/modules/bricks/plugin.py
carpedkm/vedatad
55f8dced57f698ee9fc0da9bcf471d171e718d0c
[ "Apache-2.0" ]
15
2021-07-06T12:51:53.000Z
2022-03-09T14:11:19.000Z
# adapted from https://github.com/open-mmlab/mmcv or # https://github.com/open-mmlab/mmdetection from .conv_module import ConvModule plugin_cfg = { # format: layer_type: (abbreviation, module) 'ConvModule': ('conv_block', ConvModule), } def build_plugin_layer(cfg, postfix='', **kwargs): """Build plugin l...
28.175
66
0.648625
from .conv_module import ConvModule plugin_cfg = { 'ConvModule': ('conv_block', ConvModule), } def build_plugin_layer(cfg, postfix='', **kwargs): assert isinstance(cfg, dict) and 'type' in cfg cfg_ = cfg.copy() layer_type = cfg_.pop('type') if layer_type not in plugin_cfg: raise KeyE...
true
true
f76bade3c1339083f452c2c4cd4fec7c918bbfad
986
py
Python
code/serload.py
MrHaber/68k-nano
87066cffcea6371b3f1ad3f8cebd56c3ffa23dfe
[ "BSD-3-Clause" ]
212
2020-07-10T08:45:09.000Z
2022-03-14T11:17:26.000Z
code/serload.py
MrHaber/68k-nano
87066cffcea6371b3f1ad3f8cebd56c3ffa23dfe
[ "BSD-3-Clause" ]
4
2021-02-28T16:00:52.000Z
2022-01-10T19:30:47.000Z
code/serload.py
MrHaber/68k-nano
87066cffcea6371b3f1ad3f8cebd56c3ffa23dfe
[ "BSD-3-Clause" ]
16
2020-07-18T04:01:02.000Z
2022-03-05T14:17:55.000Z
#!/usr/bin/env python3 # Very basic serial loader. # Does no checking/verification that the upload succeeded # Code is always loaded into the same location in RAM. (APPMEMSTART) # # protocol is: # - host (this script) sends break condition # - target (the board) replies with ASCII U # - host sends entire binary image ...
24.04878
68
0.699797
import serial import sys import time BAUD = 57600 if len(sys.argv) != 3: print('usage: serload.py <binfile> <port>') sys.exit(1) with open(sys.argv[1], 'rb') as infile: ser = serial.Serial(sys.argv[2], BAUD, timeout=1) ser.send_break() ack = ser.read(1) if ack != b'U': raise IOError('device did...
true
true
f76bae9a6fa9e63f32c3d2d80c6d81f70d459c7d
303
py
Python
challenge-2.py
JonathanTTSouza/turtle-graphics
ceaac0fcd97063645ef1fa6beb7b7f106a24d126
[ "MIT" ]
null
null
null
challenge-2.py
JonathanTTSouza/turtle-graphics
ceaac0fcd97063645ef1fa6beb7b7f106a24d126
[ "MIT" ]
null
null
null
challenge-2.py
JonathanTTSouza/turtle-graphics
ceaac0fcd97063645ef1fa6beb7b7f106a24d126
[ "MIT" ]
null
null
null
""" Draws a dashed square """ from turtle import Turtle, Screen timmy = Turtle() timmy.shape("turtle") for _ in range(4): for _ in range(15): timmy.pendown() timmy.forward(10) timmy.penup() timmy.forward(10) timmy.left(90) screen = Screen() screen.exitonclick()
17.823529
33
0.620462
from turtle import Turtle, Screen timmy = Turtle() timmy.shape("turtle") for _ in range(4): for _ in range(15): timmy.pendown() timmy.forward(10) timmy.penup() timmy.forward(10) timmy.left(90) screen = Screen() screen.exitonclick()
true
true
f76baea6d0307d7b9c795a642adefa3dc05103d5
1,787
py
Python
dcgan-generat images/model/Generator.py
OSUPCVLab/PlantDiseaseCNN
aeed18e9e30e53670d3e9a0bd7bd71cc73f01691
[ "MIT" ]
1
2018-09-29T15:37:52.000Z
2018-09-29T15:37:52.000Z
dcgan-generat images/model/Generator.py
OSUPCVLab/PlantDiseaseCNN
aeed18e9e30e53670d3e9a0bd7bd71cc73f01691
[ "MIT" ]
null
null
null
dcgan-generat images/model/Generator.py
OSUPCVLab/PlantDiseaseCNN
aeed18e9e30e53670d3e9a0bd7bd71cc73f01691
[ "MIT" ]
null
null
null
import torch.nn as nn class Generator(nn.Module): def __init__(self, nc, ngf, nz): super(Generator,self).__init__() self.layer1 = nn.Sequential(nn.ConvTranspose2d(nz,ngf*32,kernel_size=4), nn.BatchNorm2d(ngf*32), nn.ReLU()) ...
42.547619
105
0.491326
import torch.nn as nn class Generator(nn.Module): def __init__(self, nc, ngf, nz): super(Generator,self).__init__() self.layer1 = nn.Sequential(nn.ConvTranspose2d(nz,ngf*32,kernel_size=4), nn.BatchNorm2d(ngf*32), nn.ReLU()) ...
true
true
f76baeaa06633a66bc76ef8869a9647f9dea1d03
45,830
py
Python
act/qc/qctests.py
rcjackson/ACT
c57fb55094b142bbbef63e7069d4024049996139
[ "BSD-3-Clause" ]
null
null
null
act/qc/qctests.py
rcjackson/ACT
c57fb55094b142bbbef63e7069d4024049996139
[ "BSD-3-Clause" ]
null
null
null
act/qc/qctests.py
rcjackson/ACT
c57fb55094b142bbbef63e7069d4024049996139
[ "BSD-3-Clause" ]
null
null
null
""" act.qc.qctests ------------------------------ Here we define the methods for performing the tests and putting the results in the ancillary quality control varible. If you add a test to this file you will need to add a method reference in the main qcfilter class definition to make it callable. """ import numpy as...
41.815693
100
0.606415
import numpy as np import pandas as pd import xarray as xr import warnings from act.utils import get_missing_value, convert_units class QCTests: def __init__(self, obj, **kwargs): self._obj = obj def add_missing_value_test(self, var_name, missing_value=None, missing_va...
true
true
f76bb01614c6049f3628438762af2955ac64acec
929
py
Python
app/user/views.py
IdaEdgeware/image-labelling-app-api
44fee99e8ba12a9d9099bf8c79740bdda7f47ec1
[ "MIT" ]
null
null
null
app/user/views.py
IdaEdgeware/image-labelling-app-api
44fee99e8ba12a9d9099bf8c79740bdda7f47ec1
[ "MIT" ]
null
null
null
app/user/views.py
IdaEdgeware/image-labelling-app-api
44fee99e8ba12a9d9099bf8c79740bdda7f47ec1
[ "MIT" ]
null
null
null
from rest_framework import generics, authentication, permissions from rest_framework.authtoken.views import ObtainAuthToken from rest_framework.settings import api_settings from user.serializers import UserSerializer, AuthTokenSerializer class CreateUserView(generics.CreateAPIView): """Create a new user in the s...
33.178571
66
0.786868
from rest_framework import generics, authentication, permissions from rest_framework.authtoken.views import ObtainAuthToken from rest_framework.settings import api_settings from user.serializers import UserSerializer, AuthTokenSerializer class CreateUserView(generics.CreateAPIView): serializer_class = UserSerial...
true
true
f76bb01b2bb54855272f97d037cecfe126446770
1,709
py
Python
mitdeeplearning/lab3.py
aishraghavan/introtodeeplearning
8271b942f44ab0c85f2c3f53cd4fb5b784d02053
[ "MIT" ]
6
2020-06-02T17:19:54.000Z
2021-11-17T10:56:25.000Z
mitdeeplearning/lab3.py
MANISH007700/introtodeeplearning
2cd42e4279cea670ee45b95e1ca92ae899eaf721
[ "MIT" ]
1
2020-04-16T04:32:04.000Z
2022-01-11T20:48:02.000Z
mitdeeplearning/lab3.py
MANISH007700/introtodeeplearning
2cd42e4279cea670ee45b95e1ca92ae899eaf721
[ "MIT" ]
3
2020-09-10T19:10:10.000Z
2021-08-19T13:55:47.000Z
import io import base64 from IPython.display import HTML import gym import numpy as np def play_video(filename): encoded = base64.b64encode(io.open(filename, 'r+b').read()) embedded = HTML(data=''' <video controls> <source src="data:video/mp4;base64,{0}" type="video/mp4" /> </video>...
27.564516
76
0.61849
import io import base64 from IPython.display import HTML import gym import numpy as np def play_video(filename): encoded = base64.b64encode(io.open(filename, 'r+b').read()) embedded = HTML(data=''' <video controls> <source src="data:video/mp4;base64,{0}" type="video/mp4" /> </video>...
true
true
f76bb19dba7fcaa30b04c3134e88c5ccbffa314a
536
py
Python
activeClassifier/phase_config.py
dHonerkamp/ActiveClassifier
052675277153594db64261cd56699a057e633de2
[ "Apache-2.0" ]
null
null
null
activeClassifier/phase_config.py
dHonerkamp/ActiveClassifier
052675277153594db64261cd56699a057e633de2
[ "Apache-2.0" ]
null
null
null
activeClassifier/phase_config.py
dHonerkamp/ActiveClassifier
052675277153594db64261cd56699a057e633de2
[ "Apache-2.0" ]
null
null
null
def get_phases(FLAGS): return [ {'name' : 'Pre', 'num_epochs': FLAGS.pre_train_epochs, 'policy' : FLAGS.pre_train_policy if (FLAGS.pre_train_policy != 'same') else FLAGS.planner, 'incl_uk' : FLAGS.pre_train_uk, 'final_eval': False}, ...
41.230769
107
0.5
def get_phases(FLAGS): return [ {'name' : 'Pre', 'num_epochs': FLAGS.pre_train_epochs, 'policy' : FLAGS.pre_train_policy if (FLAGS.pre_train_policy != 'same') else FLAGS.planner, 'incl_uk' : FLAGS.pre_train_uk, 'final_eval': False}, ...
true
true
f76bb1abafa75d152e76ca08e20d95629fd9b279
6,969
py
Python
pysql/orm/core/constraints.py
jha-hitesh/pysql
ad7c7e4e7e65a97e4dc15cda395678e0c09b02ab
[ "MIT" ]
null
null
null
pysql/orm/core/constraints.py
jha-hitesh/pysql
ad7c7e4e7e65a97e4dc15cda395678e0c09b02ab
[ "MIT" ]
null
null
null
pysql/orm/core/constraints.py
jha-hitesh/pysql
ad7c7e4e7e65a97e4dc15cda395678e0c09b02ab
[ "MIT" ]
null
null
null
from constants.core.constraints import CoreConstraintConstants from exceptions.core.constraints import InvalidConstraintPropertyException from exceptions.core.base import UnSupportedException from orm.core.columns import CoreSQLColumn from orm.core.tables import TableMetaClass class CoreConstraint: """CoreConstra...
41.730539
118
0.655905
from constants.core.constraints import CoreConstraintConstants from exceptions.core.constraints import InvalidConstraintPropertyException from exceptions.core.base import UnSupportedException from orm.core.columns import CoreSQLColumn from orm.core.tables import TableMetaClass class CoreConstraint: __slots__ = Co...
true
true
f76bb20ea99604765a091e282575738d6e182e0d
1,440
py
Python
pycon/finaid/urls.py
tylerdave/PyCon-Website
684c7a92776e61eb2e04951199ce344616c8d814
[ "BSD-3-Clause" ]
null
null
null
pycon/finaid/urls.py
tylerdave/PyCon-Website
684c7a92776e61eb2e04951199ce344616c8d814
[ "BSD-3-Clause" ]
null
null
null
pycon/finaid/urls.py
tylerdave/PyCon-Website
684c7a92776e61eb2e04951199ce344616c8d814
[ "BSD-3-Clause" ]
1
2020-09-30T18:09:16.000Z
2020-09-30T18:09:16.000Z
from django.conf.urls import url from .views import finaid_edit, finaid_email, finaid_message, finaid_review, \ finaid_review_detail, finaid_status, finaid_download_csv, \ receipt_upload, FinaidAcceptView, FinaidDeclineView, \ FinaidProvideInfoView, FinaidWithdrawView, FinaidRequestMoreView urlpatterns =...
51.428571
89
0.702083
from django.conf.urls import url from .views import finaid_edit, finaid_email, finaid_message, finaid_review, \ finaid_review_detail, finaid_status, finaid_download_csv, \ receipt_upload, FinaidAcceptView, FinaidDeclineView, \ FinaidProvideInfoView, FinaidWithdrawView, FinaidRequestMoreView urlpatterns =...
true
true
f76bb283ad270fb7108cf0175145d9dd2850b6a3
374
py
Python
Python/36-lambda-function.py
strawman2511/Learning
21ee7bdad376060503fdc0a739fed2d7bd40f9b9
[ "MIT" ]
1
2022-03-16T23:25:54.000Z
2022-03-16T23:25:54.000Z
Python/36-lambda-function.py
strawman2511/Learning
21ee7bdad376060503fdc0a739fed2d7bd40f9b9
[ "MIT" ]
null
null
null
Python/36-lambda-function.py
strawman2511/Learning
21ee7bdad376060503fdc0a739fed2d7bd40f9b9
[ "MIT" ]
null
null
null
# lambda or also called anonymous function # def double(n) # return n*2 # Now you can write it in one line double = lambda n: n*2 print(double(10)) # With if else find_larger = lambda a, b: a if a > b else b print(find_larger(24, 69)) # With lists names = ["Alan", "Gregory", "Zlatan", "Jonas", "Tom", "Augusti...
17.809524
66
0.657754
double = lambda n: n*2 print(double(10)) find_larger = lambda a, b: a if a > b else b print(find_larger(24, 69)) names = ["Alan", "Gregory", "Zlatan", "Jonas", "Tom", "Augustine"] names.sort(key = lambda x: len(x)) print(names)
true
true
f76bb29b3f70300234231f198d313f4a66e8bb5f
3,498
py
Python
setup.py
mmckerns/diffpy.srxplanar
a80a16e2f3ab2f24c357d8085d2cfe853d7757d8
[ "BSD-3-Clause" ]
null
null
null
setup.py
mmckerns/diffpy.srxplanar
a80a16e2f3ab2f24c357d8085d2cfe853d7757d8
[ "BSD-3-Clause" ]
null
null
null
setup.py
mmckerns/diffpy.srxplanar
a80a16e2f3ab2f24c357d8085d2cfe853d7757d8
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Installation script for diffpy.Structure """srxplanar - 2D diffraction image integration and uncertainty propagation using non splitting pixel algorithm Packages: diffpy.srxplanar """ import os from setuptools import setup, find_packages # versioncfgfile holds version data for git commit ...
36.4375
83
0.620354
import os from setuptools import setup, find_packages MYDIR = os.path.dirname(os.path.abspath(__file__)) versioncfgfile = os.path.join(MYDIR, 'diffpy/srxplanar/version.cfg') def gitinfo(): from subprocess import Popen, PIPE kw = dict(stdout=PIPE, cwd=MYDIR) proc = Popen(['git', 'describe', '--match=v[[...
true
true
f76bb30712a4a71903a7b40142888ef4b1a06aa1
13,412
py
Python
python_modules/dagster/dagster/core/storage/pipeline_run.py
basilvetas/dagster
b08f5534a0b0277dab38cb7b6a46d324e94b8940
[ "Apache-2.0" ]
2
2021-06-21T17:50:26.000Z
2021-06-21T19:14:23.000Z
python_modules/dagster/dagster/core/storage/pipeline_run.py
basilvetas/dagster
b08f5534a0b0277dab38cb7b6a46d324e94b8940
[ "Apache-2.0" ]
null
null
null
python_modules/dagster/dagster/core/storage/pipeline_run.py
basilvetas/dagster
b08f5534a0b0277dab38cb7b6a46d324e94b8940
[ "Apache-2.0" ]
1
2021-08-18T17:21:57.000Z
2021-08-18T17:21:57.000Z
import warnings from collections import namedtuple from enum import Enum from dagster import check from dagster.core.storage.tags import PARENT_RUN_ID_TAG, ROOT_RUN_ID_TAG from dagster.core.utils import make_new_run_id from dagster.serdes import Persistable, whitelist_for_persistence, whitelist_for_serdes from .tags ...
35.860963
107
0.630107
import warnings from collections import namedtuple from enum import Enum from dagster import check from dagster.core.storage.tags import PARENT_RUN_ID_TAG, ROOT_RUN_ID_TAG from dagster.core.utils import make_new_run_id from dagster.serdes import Persistable, whitelist_for_persistence, whitelist_for_serdes from .tags ...
true
true
f76bb327f6e1f6a166072dcbb026fd3ba4050c4a
6,705
py
Python
yolo.py
zubairahmed-ai/keras-yolo3
5ba9ab3c99ee1b5e71b614a5464cb316d35cc9b3
[ "MIT" ]
2
2019-09-17T15:09:23.000Z
2019-09-25T19:22:28.000Z
yolo.py
zubairahmed-ai/keras-yolo3
5ba9ab3c99ee1b5e71b614a5464cb316d35cc9b3
[ "MIT" ]
null
null
null
yolo.py
zubairahmed-ai/keras-yolo3
5ba9ab3c99ee1b5e71b614a5464cb316d35cc9b3
[ "MIT" ]
null
null
null
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Run a YOLO_v3 style detection model on test images. """ import colorsys import os import random import time import cv2 import numpy as np from keras import backend as K from keras.models import load_model from PIL import Image, ImageDraw, ImageFont from timeit import ...
36.440217
179
0.596271
import colorsys import os import random import time import cv2 import numpy as np from keras import backend as K from keras.models import load_model from PIL import Image, ImageDraw, ImageFont from timeit import time from timeit import default_timer as timer from yolo3.model import yolo_eval class YOLO(object): ...
true
true
f76bb35c95ea9d0462040299977d6f729eb6a89c
1,933
py
Python
py/phl/phlsys_arcconfig.py
aevri/phabricator-tools
ef7501bcaee83e98d168d16f64b3f73e744d3336
[ "Apache-2.0" ]
150
2015-01-21T15:52:22.000Z
2021-11-09T05:53:36.000Z
py/phl/phlsys_arcconfig.py
aevri/phabricator-tools
ef7501bcaee83e98d168d16f64b3f73e744d3336
[ "Apache-2.0" ]
72
2015-05-08T04:33:08.000Z
2017-01-27T09:37:36.000Z
py/phl/phlsys_arcconfig.py
aevri/phabricator-tools
ef7501bcaee83e98d168d16f64b3f73e744d3336
[ "Apache-2.0" ]
38
2015-01-30T10:33:47.000Z
2021-11-09T05:53:30.000Z
"""Wrapper to integrate with Arcanist's .arcconfig file.""" # ============================================================================= # CONTENTS # ----------------------------------------------------------------------------- # phlsys_arcconfig # # Public Functions: # find_arcconfig # load # get_arcconfig # ...
30.68254
79
0.546301
from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import os def _parent_dir(path): return os.path.abspath(os.path.join(path, os.pardir)) def find_arcconfig(): path = None nextpath = os.getcwd() while path != nextpath: p...
true
true
f76bb470e2baed7994250324538bc065f2c18e82
503
py
Python
test_package/conanfile.py
Croydon/conan-soil2
15a8c0667f8c4e92786d603829ffdb467039980c
[ "MIT" ]
2
2019-09-01T07:29:23.000Z
2020-02-19T16:33:59.000Z
test_package/conanfile.py
Croydon/conan-soil2
15a8c0667f8c4e92786d603829ffdb467039980c
[ "MIT" ]
1
2020-01-28T13:46:38.000Z
2020-01-28T14:04:46.000Z
test_package/conanfile.py
bincrafters/conan-soil2
15a8c0667f8c4e92786d603829ffdb467039980c
[ "MIT" ]
null
null
null
from conans import ConanFile, CMake import os class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "cmake" requires = "glfw/3.3.4" def build(self): cmake = CMake(self) cmake.configure() cmake.build() def test(self): bin...
26.473684
70
0.624254
from conans import ConanFile, CMake import os class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "cmake" requires = "glfw/3.3.4" def build(self): cmake = CMake(self) cmake.configure() cmake.build() def test(self): bin...
true
true
f76bb4f0a36cd92931896952874a1d5db60728f5
3,803
py
Python
bach/tests/functional/bach/test_df_value_counts.py
objectiv/objectiv-analytics
86ec1508f71c2d61ea7d67479800e4dc417a46e1
[ "Apache-2.0" ]
23
2021-11-10T21:37:42.000Z
2022-03-30T11:46:19.000Z
bach/tests/functional/bach/test_df_value_counts.py
objectiv/objectiv-analytics
86ec1508f71c2d61ea7d67479800e4dc417a46e1
[ "Apache-2.0" ]
163
2021-11-10T10:11:26.000Z
2022-03-31T16:04:27.000Z
bach/tests/functional/bach/test_df_value_counts.py
objectiv/objectiv-analytics
86ec1508f71c2d61ea7d67479800e4dc417a46e1
[ "Apache-2.0" ]
null
null
null
import numpy as np import pytest from tests.functional.bach.test_data_and_utils import assert_equals_data, \ get_df_with_railway_data, get_df_with_test_data def test_value_counts_basic(engine): bt = get_df_with_test_data(engine)[['municipality']] result = bt.value_counts() np.testing.assert_equal( ...
32.228814
101
0.564291
import numpy as np import pytest from tests.functional.bach.test_data_and_utils import assert_equals_data, \ get_df_with_railway_data, get_df_with_test_data def test_value_counts_basic(engine): bt = get_df_with_test_data(engine)[['municipality']] result = bt.value_counts() np.testing.assert_equal( ...
true
true
f76bb59875f03ad113b7bf093c41ed509842b61d
2,147
py
Python
rllib/agents/sac/tests/test_rnnsac.py
kennethlien/ray
2916c2c3d29f2f7e4bf53872d5ac8c5d866b0e45
[ "Apache-2.0" ]
null
null
null
rllib/agents/sac/tests/test_rnnsac.py
kennethlien/ray
2916c2c3d29f2f7e4bf53872d5ac8c5d866b0e45
[ "Apache-2.0" ]
null
null
null
rllib/agents/sac/tests/test_rnnsac.py
kennethlien/ray
2916c2c3d29f2f7e4bf53872d5ac8c5d866b0e45
[ "Apache-2.0" ]
null
null
null
import unittest import ray import ray.rllib.agents.sac as sac from ray.rllib.utils.framework import try_import_tf, try_import_torch from ray.rllib.utils.test_utils import check_compute_single_action, framework_iterator tf1, tf, tfv = try_import_tf() torch, nn = try_import_torch() class TestRNNSAC(unittest.TestCase)...
28.626667
86
0.58966
import unittest import ray import ray.rllib.agents.sac as sac from ray.rllib.utils.framework import try_import_tf, try_import_torch from ray.rllib.utils.test_utils import check_compute_single_action, framework_iterator tf1, tf, tfv = try_import_tf() torch, nn = try_import_torch() class TestRNNSAC(unittest.TestCase)...
true
true
f76bb66f7d5bba6fb9a3074c5b8eedeb620d6b87
3,476
py
Python
bindings/python/ensmallen/datasets/string/actinomycesvulturis.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
5
2021-02-17T00:44:45.000Z
2021-08-09T16:41:47.000Z
bindings/python/ensmallen/datasets/string/actinomycesvulturis.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
18
2021-01-07T16:47:39.000Z
2021-08-12T21:51:32.000Z
bindings/python/ensmallen/datasets/string/actinomycesvulturis.py
AnacletoLAB/ensmallen
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
3
2021-01-14T02:20:59.000Z
2021-08-04T19:09:52.000Z
""" This file offers the methods to automatically retrieve the graph Actinomyces vulturis. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={STRING v11: protein--protein a...
33.104762
223
0.678078
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen import Graph def ActinomycesVulturis( directed: bool = False, preprocess: bool = True, load_nodes: bool = True, verbose: int = 2, cache: bool = True, cache_path: str = "graphs/string...
true
true
f76bb6ac63e98408e0677155e6ff5293d4e384d2
4,021
py
Python
configs/top_down/resnet/aic/res50_aic_384x288.py
ssumin6/buob
4fb4537423a993cd2894f54cb12f5f3b3fb73141
[ "Apache-2.0" ]
5
2022-01-13T15:06:45.000Z
2022-01-28T19:39:54.000Z
configs/top_down/resnet/aic/res50_aic_384x288.py
ssumin6/buob
4fb4537423a993cd2894f54cb12f5f3b3fb73141
[ "Apache-2.0" ]
null
null
null
configs/top_down/resnet/aic/res50_aic_384x288.py
ssumin6/buob
4fb4537423a993cd2894f54cb12f5f3b3fb73141
[ "Apache-2.0" ]
1
2021-06-17T13:56:23.000Z
2021-06-17T13:56:23.000Z
log_level = 'INFO' load_from = None resume_from = None dist_params = dict(backend='nccl') workflow = [('train', 1)] checkpoint_config = dict(interval=10) evaluation = dict(interval=10, metric='mAP', key_indicator='AP') optimizer = dict( type='Adam', lr=5e-4, ) optimizer_config = dict(grad_clip=None) # learning...
28.51773
79
0.63815
log_level = 'INFO' load_from = None resume_from = None dist_params = dict(backend='nccl') workflow = [('train', 1)] checkpoint_config = dict(interval=10) evaluation = dict(interval=10, metric='mAP', key_indicator='AP') optimizer = dict( type='Adam', lr=5e-4, ) optimizer_config = dict(grad_clip=None) lr_config ...
true
true
f76bb6d3417e9cff023b0e77eb5c69935d52994c
581
py
Python
custom_op/example.py
DavidAdamczyk/tensorflow-cmake
8d848fae993a791dd44bc9cdcf9ad91f5795bf52
[ "Apache-2.0" ]
null
null
null
custom_op/example.py
DavidAdamczyk/tensorflow-cmake
8d848fae993a791dd44bc9cdcf9ad91f5795bf52
[ "Apache-2.0" ]
null
null
null
custom_op/example.py
DavidAdamczyk/tensorflow-cmake
8d848fae993a791dd44bc9cdcf9ad91f5795bf52
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # 2018, Patrick Wieschollek <mail@patwie.com> from __future__ import print_function import numpy as np import tensorflow as tf from user_ops import matrix_add np.random.seed(42) tf.set_random_seed(42) matA = np.random.randn(1, 2, 3, 4).astype(np.float32) * 10 matB = np.random.randn(1, 2, 3, 4)....
22.346154
58
0.700516
from __future__ import print_function import numpy as np import tensorflow as tf from user_ops import matrix_add np.random.seed(42) tf.set_random_seed(42) matA = np.random.randn(1, 2, 3, 4).astype(np.float32) * 10 matB = np.random.randn(1, 2, 3, 4).astype(np.float32) * 10 A = tf.placeholder(tf.float32, shape=[None...
true
true
f76bb7484cc909984c42a2def1572c2323ff2629
456
py
Python
tests/benchmark.py
KoNEW/colorgram.py
17052c008c53721449e6d7d463eb7753f0cfef29
[ "MIT" ]
1
2021-06-28T07:21:09.000Z
2021-06-28T07:21:09.000Z
tests/benchmark.py
KoNEW/colorgram.py
17052c008c53721449e6d7d463eb7753f0cfef29
[ "MIT" ]
null
null
null
tests/benchmark.py
KoNEW/colorgram.py
17052c008c53721449e6d7d463eb7753f0cfef29
[ "MIT" ]
1
2022-01-08T09:01:51.000Z
2022-01-08T09:01:51.000Z
import timeit import statistics _setup = ''' from PIL import Image num_colors = 6 img = Image.open('data/test.png') img.load() ''' _code = ''' import colorgram colorgram.extract(img, num_colors) ''' number = 20 repeats = 10 measures = timeit.repeat(setup=_setup, stmt=_code, number=number, repeat=repeats) _mean = sta...
20.727273
81
0.710526
import timeit import statistics _setup = ''' from PIL import Image num_colors = 6 img = Image.open('data/test.png') img.load() ''' _code = ''' import colorgram colorgram.extract(img, num_colors) ''' number = 20 repeats = 10 measures = timeit.repeat(setup=_setup, stmt=_code, number=number, repeat=repeats) _mean = sta...
true
true
f76bb7e85d098061e7a7d7b7c08ac886ec79faff
3,451
py
Python
official/projects/edgetpu/nlp/utils/utils_test.py
62theories/tf-flask
c6954f0f3c4082165c92c77bb06d2fec6e75a8c4
[ "Apache-2.0" ]
82,518
2016-02-05T12:07:23.000Z
2022-03-31T23:09:47.000Z
official/projects/edgetpu/nlp/utils/utils_test.py
62theories/tf-flask
c6954f0f3c4082165c92c77bb06d2fec6e75a8c4
[ "Apache-2.0" ]
9,021
2016-03-08T01:02:05.000Z
2022-03-31T08:06:35.000Z
official/projects/edgetpu/nlp/utils/utils_test.py
62theories/tf-flask
c6954f0f3c4082165c92c77bb06d2fec6e75a8c4
[ "Apache-2.0" ]
54,341
2016-02-06T17:19:55.000Z
2022-03-31T10:27:44.000Z
# Copyright 2021 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...
38.775281
115
0.736598
from absl import flags import tensorflow as tf import yaml from official.projects.edgetpu.nlp.configs import params from official.projects.edgetpu.nlp.modeling import model_builder from official.projects.edgetpu.nlp.utils import utils FLAGS = flags.FLAGS def nested_dict_compare(dict_a, dict_b): for k, v in sort...
true
true
f76bb833c0ed1aeaae4738cc5ea0f8d56679e0f6
8,691
py
Python
tensorflow/python/distribute/collective_util.py
wainshine/tensorflow
dc7a8dc8546c679b9c7b3df7494ce4506bfc1a6d
[ "Apache-2.0" ]
54
2017-06-17T14:07:48.000Z
2022-03-29T02:11:20.000Z
tensorflow/python/distribute/collective_util.py
wainshine/tensorflow
dc7a8dc8546c679b9c7b3df7494ce4506bfc1a6d
[ "Apache-2.0" ]
14
2018-08-11T00:55:13.000Z
2022-03-14T23:24:30.000Z
tensorflow/python/distribute/collective_util.py
wainshine/tensorflow
dc7a8dc8546c679b9c7b3df7494ce4506bfc1a6d
[ "Apache-2.0" ]
11
2018-04-19T22:36:01.000Z
2021-08-02T08:44:43.000Z
# coding=utf-8 # Copyright 2020 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 requ...
37.951965
80
0.728455
import copy import enum from tensorflow.python.util import deprecation from tensorflow.python.util.tf_export import tf_export @tf_export("distribute.experimental.CommunicationImplementation", "distribute.experimental.CollectiveCommunication") class CommunicationImplementation(enum.Enum): AUTO = "AUTO" ...
true
true
f76bb89e169b3503da21967ba41af4be71007d42
9,550
py
Python
src/gps_py3_shim/misc.py
teyrana/gps_py3_shim
0bcd29b7ea1e4a84f18306e9b78997165da1325e
[ "BSD-3-Clause" ]
3
2019-08-08T10:04:19.000Z
2020-02-21T23:01:44.000Z
src/gps_py3_shim/misc.py
teyrana/gps_py3_shim
0bcd29b7ea1e4a84f18306e9b78997165da1325e
[ "BSD-3-Clause" ]
null
null
null
src/gps_py3_shim/misc.py
teyrana/gps_py3_shim
0bcd29b7ea1e4a84f18306e9b78997165da1325e
[ "BSD-3-Clause" ]
null
null
null
# misc.py - miscellaneous geodesy and time functions # # This file is Copyright (c) 2010 by the GPSD project # BSD terms apply: see the file COPYING in the distribution root for details. # This code runs compatibly under Python 2 and 3.x for x >= 2. # Preserve this property! from __future__ import absolute_import, pri...
35.239852
79
0.605969
from __future__ import absolute_import, print_function, division import calendar import io import math import time try: STR_CLASS = basestring except NameError: STR_CLASS = str # that binary data is preserved. In Python 2, this happens naturally with # "strings" and the 'str' and 'bytes' types are...
true
true
f76bb931d2444bf4668f6a964acde4996cb0e358
29,207
py
Python
lib/python/pyflyby/_imports2s.py
maggonravi/pyflyby
317bbb7b025d225204e75fd1e8174e29285c543a
[ "BSD-3-Clause" ]
null
null
null
lib/python/pyflyby/_imports2s.py
maggonravi/pyflyby
317bbb7b025d225204e75fd1e8174e29285c543a
[ "BSD-3-Clause" ]
null
null
null
lib/python/pyflyby/_imports2s.py
maggonravi/pyflyby
317bbb7b025d225204e75fd1e8174e29285c543a
[ "BSD-3-Clause" ]
null
null
null
# pyflyby/_imports2s.py. # Copyright (C) 2011-2017 Karl Chen. # License: MIT http://opensource.org/licenses/MIT from __future__ import absolute_import, division, with_statement import re from pyflyby._file import FileText, Filename from pyflyby._flags import CompilerFlags from pyflyby._ide...
39.683424
87
0.624234
from __future__ import absolute_import, division, with_statement import re from pyflyby._file import FileText, Filename from pyflyby._flags import CompilerFlags from pyflyby._idents import brace_identifiers from pyflyby._importclns import ImportSet, NoSuchImportError from ...
false
true
f76bb9342c8b68c357104ab3323c31f20ef81c8a
1,034
py
Python
kubernetes_asyncio/test/test_v2beta1_pods_metric_status.py
PidgeyBE/kubernetes_asyncio
14d15dc309890253c26b6274a022e84441e05217
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/test/test_v2beta1_pods_metric_status.py
PidgeyBE/kubernetes_asyncio
14d15dc309890253c26b6274a022e84441e05217
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/test/test_v2beta1_pods_metric_status.py
PidgeyBE/kubernetes_asyncio
14d15dc309890253c26b6274a022e84441e05217
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 OpenAPI spec version: v1.13.5 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unittest import kube...
25.85
124
0.743714
from __future__ import absolute_import import unittest import kubernetes_asyncio.client from kubernetes_asyncio.client.models.v2beta1_pods_metric_status import V2beta1PodsMetricStatus from kubernetes_asyncio.client.rest import ApiException class TestV2beta1PodsMetricStatus(unittest.TestCase): def setUp(sel...
true
true
f76bb936b67c4c15f1e3549c1d9136fb54345148
88
py
Python
src/backlight/labelizer/__init__.py
keisuke-umezawa/backlight
db49a966fdb38de693bb8157cec88d98620f9946
[ "MIT" ]
8
2018-11-06T16:48:45.000Z
2021-02-14T18:02:27.000Z
src/backlight/labelizer/__init__.py
keisuke-umezawa/backlight
db49a966fdb38de693bb8157cec88d98620f9946
[ "MIT" ]
36
2018-11-02T23:21:59.000Z
2021-02-08T10:27:29.000Z
src/backlight/labelizer/__init__.py
keisuke-umezawa/backlight
db49a966fdb38de693bb8157cec88d98620f9946
[ "MIT" ]
5
2018-11-07T06:05:24.000Z
2021-11-20T08:57:39.000Z
from backlight.labelizer.utils import load_label, from_dataframe, create_labels # noqa
44
87
0.840909
from backlight.labelizer.utils import load_label, from_dataframe, create_labels
true
true
f76bba7288739c4ffc12815983683c89c7f856b7
2,897
py
Python
test/integration/dash_assets/test_dash_assets.py
ChrisRackauckas/Dash.jl
f7b152e4e90224d8a6684b6854c2dd8b74ddcf1f
[ "MIT" ]
null
null
null
test/integration/dash_assets/test_dash_assets.py
ChrisRackauckas/Dash.jl
f7b152e4e90224d8a6684b6854c2dd8b74ddcf1f
[ "MIT" ]
null
null
null
test/integration/dash_assets/test_dash_assets.py
ChrisRackauckas/Dash.jl
f7b152e4e90224d8a6684b6854c2dd8b74ddcf1f
[ "MIT" ]
null
null
null
import pathlib import os.path import itertools import logging import time import json logger = logging.getLogger(__name__) curr_path = pathlib.Path(__file__).parent.absolute() def jl_test_file_path(filename): return os.path.join(curr_path, "jl_dash_assets", filename) def test_jldada001_assets(dashjl): fp = jl...
33.686047
99
0.639627
import pathlib import os.path import itertools import logging import time import json logger = logging.getLogger(__name__) curr_path = pathlib.Path(__file__).parent.absolute() def jl_test_file_path(filename): return os.path.join(curr_path, "jl_dash_assets", filename) def test_jldada001_assets(dashjl): fp = jl...
true
true
f76bbaca163bb9cf3e8135a00fe976cfce3d16c1
255
py
Python
check-python27/samples/miscellaneous/test_octal_as_named_para.py
DaveKaretnyk/parsing-utils2
40085bbd399fa605f2f2a4708d385a64ffc907de
[ "MIT" ]
null
null
null
check-python27/samples/miscellaneous/test_octal_as_named_para.py
DaveKaretnyk/parsing-utils2
40085bbd399fa605f2f2a4708d385a64ffc907de
[ "MIT" ]
1
2018-01-05T20:15:40.000Z
2018-01-05T20:15:40.000Z
check-python27/samples/miscellaneous/test_octal_as_named_para.py
DaveKaretnyk/parsing-utils2
40085bbd399fa605f2f2a4708d385a64ffc907de
[ "MIT" ]
null
null
null
# Construct taken from Standard Library, anydbm.py. def my_open(file, flag='r', mode=0666): _ = file _ = flag print '' print 'mode: ', mode return 'OK' def test_open(): result = open('some file') print 'result: ', result
15.9375
51
0.592157
def my_open(file, flag='r', mode=0666): _ = file _ = flag print '' print 'mode: ', mode return 'OK' def test_open(): result = open('some file') print 'result: ', result
false
true
f76bbaf66f0c69d4b351e4ee831e9fbb5d8e4251
33,401
py
Python
braintree/error_codes.py
futureironman/braintree_python
26bb8a857bc29322a8bca2e8e0fe6d99cfe6a1ac
[ "MIT" ]
1
2020-11-02T18:06:27.000Z
2020-11-02T18:06:27.000Z
braintree/error_codes.py
futureironman/braintree_python
26bb8a857bc29322a8bca2e8e0fe6d99cfe6a1ac
[ "MIT" ]
null
null
null
braintree/error_codes.py
futureironman/braintree_python
26bb8a857bc29322a8bca2e8e0fe6d99cfe6a1ac
[ "MIT" ]
3
2020-09-24T16:30:54.000Z
2020-11-04T11:39:18.000Z
class ErrorCodes(object): """ A set of constants representing validation errors. Validation error messages can change, but the codes will not. See the source for a list of all errors codes. Codes can be used to check for specific validation errors:: result = Transaction.sale({}) asser...
43.547588
119
0.657046
class ErrorCodes(object): class Address(object): CannotBeBlank = "81801" CompanyIsInvalid = "91821" CompanyIsTooLong = "81802" CountryCodeAlpha2IsNotAccepted = "91814" CountryCodeAlpha3IsNotAccepted = "91816" CountryCodeNumericIsNotAccepted = "91817" CountryN...
true
true
f76bbdc08cce96ac9bb2d4774bc264cc39c9fef6
22,838
py
Python
Server/ChatBot/venv/Lib/site-packages/tensorflow/core/framework/summary_pb2.py
sozuer53/BBC
31bb128cb1e1a19db955fd673d67cf0e92bac3a4
[ "Apache-2.0" ]
3
2018-11-27T06:30:23.000Z
2021-05-30T15:56:32.000Z
Server/ChatBot/venv/Lib/site-packages/tensorflow/core/framework/summary_pb2.py
sozuer53/BBC
31bb128cb1e1a19db955fd673d67cf0e92bac3a4
[ "Apache-2.0" ]
3
2020-09-26T01:09:47.000Z
2022-02-10T02:12:08.000Z
Server/ChatBot/venv/Lib/site-packages/tensorflow/core/framework/summary_pb2.py
sozuer53/BBC
31bb128cb1e1a19db955fd673d67cf0e92bac3a4
[ "Apache-2.0" ]
6
2020-04-13T15:33:30.000Z
2020-06-21T19:26:55.000Z
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: tensorflow/core/framework/summary.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf i...
41.751371
2,021
0.74722
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database from google.p...
true
true
f76bbe13e2be1556c00f254a99f68fcdad856801
95
py
Python
newsletter/apps.py
Will-Hoey/giant-newsletter
cae054e864e66c5d117c4ca434b39596ffadb4e3
[ "MIT" ]
18
2018-11-14T21:52:33.000Z
2022-03-23T08:10:54.000Z
newsletter/apps.py
Will-Hoey/giant-newsletter
cae054e864e66c5d117c4ca434b39596ffadb4e3
[ "MIT" ]
83
2018-09-21T16:08:51.000Z
2022-03-27T20:31:05.000Z
newsletter/apps.py
Will-Hoey/giant-newsletter
cae054e864e66c5d117c4ca434b39596ffadb4e3
[ "MIT" ]
6
2019-09-27T20:50:54.000Z
2020-06-12T14:07:38.000Z
from django.apps import AppConfig class NewsletterConfig(AppConfig): name = "newsletter"
15.833333
34
0.768421
from django.apps import AppConfig class NewsletterConfig(AppConfig): name = "newsletter"
true
true
f76bc03b655b1f1ed6dca2a61c33ed1f3e6688f6
8,582
py
Python
scripts/sanity_resource.py
rombie/contrail-test
a68c71d6f282142501a7e2e889bbb232fdd82dc3
[ "Apache-2.0" ]
null
null
null
scripts/sanity_resource.py
rombie/contrail-test
a68c71d6f282142501a7e2e889bbb232fdd82dc3
[ "Apache-2.0" ]
null
null
null
scripts/sanity_resource.py
rombie/contrail-test
a68c71d6f282142501a7e2e889bbb232fdd82dc3
[ "Apache-2.0" ]
null
null
null
import fixtures import testtools import os import uuid from connections import ContrailConnections from contrail_test_init import * from vn_test import * from vm_test import * from quantum_test import * from vnc_api_test import * from nova_test import * from testresources import OptimisingTestSuite, TestResource clas...
37.313043
105
0.626078
import fixtures import testtools import os import uuid from connections import ContrailConnections from contrail_test_init import * from vn_test import * from vm_test import * from quantum_test import * from vnc_api_test import * from nova_test import * from testresources import OptimisingTestSuite, TestResource clas...
false
true
f76bc05e8552416871079f4271cc3d9c4d749878
26,225
py
Python
codes/decoder.py
kozodoi/BMS-Molecular-Translation
7de42928e36e63964f9f3ed0b5920ec86b8fc27d
[ "MIT" ]
2
2021-06-06T13:38:10.000Z
2021-06-11T06:42:48.000Z
codes/decoder.py
DipakBagal/BMS_Molecular_Translation
881b252a3c30e5b0afce2ce2c5da73d02755394d
[ "MIT" ]
null
null
null
codes/decoder.py
DipakBagal/BMS_Molecular_Translation
881b252a3c30e5b0afce2ce2c5da73d02755394d
[ "MIT" ]
7
2021-06-05T00:27:39.000Z
2021-08-13T19:09:16.000Z
####### RNN DECODER import torch import torch.nn as nn import torch.nn.functional as F class Attention(nn.Module): ''' Attention network for calculate attention value ''' def __init__(self, encoder_dim, decoder_dim, attention_dim): ''' :param encoder_dim: input size of encoder network ...
51.421569
136
0.622993
import torch import torch.nn as nn import torch.nn.functional as F class Attention(nn.Module): def __init__(self, encoder_dim, decoder_dim, attention_dim): super(Attention, self).__init__() self.encoder_att = nn.Linear(encoder_dim, attention_dim) self.decoder_att = nn.Linear(decoder_dim, ...
true
true
f76bc23b3ad0b8a7a64beb2811a0432bc28901f0
650
py
Python
claf/metric/classification.py
GMDennis/claf
d1e064e593127e5d654f000f5506c5ae1caab5ce
[ "MIT" ]
225
2019-02-27T06:22:09.000Z
2022-03-05T23:19:59.000Z
claf/metric/classification.py
GMDennis/claf
d1e064e593127e5d654f000f5506c5ae1caab5ce
[ "MIT" ]
25
2019-03-08T05:04:24.000Z
2021-09-02T07:19:27.000Z
claf/metric/classification.py
GMDennis/claf
d1e064e593127e5d654f000f5506c5ae1caab5ce
[ "MIT" ]
41
2019-02-27T16:09:30.000Z
2022-02-09T15:56:09.000Z
def recall(pycm_obj): return {key: pycm_obj.TPR[key] if pycm_obj.TPR[key] != "None" else 0. for key in pycm_obj.TPR} def precision(pycm_obj): return {key: pycm_obj.PPV[key] if pycm_obj.PPV[key] != "None" else 0. for key in pycm_obj.PPV} def f1(pycm_obj): return {key: pycm_obj.F1[key] if pycm_obj.F1[key...
27.083333
98
0.701538
def recall(pycm_obj): return {key: pycm_obj.TPR[key] if pycm_obj.TPR[key] != "None" else 0. for key in pycm_obj.TPR} def precision(pycm_obj): return {key: pycm_obj.PPV[key] if pycm_obj.PPV[key] != "None" else 0. for key in pycm_obj.PPV} def f1(pycm_obj): return {key: pycm_obj.F1[key] if pycm_obj.F1[key...
true
true
f76bc2d44add5dc8f6554b023a0a5e98b212fe66
5,035
py
Python
cocoa/analysis/analyzer.py
ijcai2022-5500/anego
9a2e5f29f0ec0787ad8ce7822089345053442887
[ "MIT" ]
null
null
null
cocoa/analysis/analyzer.py
ijcai2022-5500/anego
9a2e5f29f0ec0787ad8ce7822089345053442887
[ "MIT" ]
null
null
null
cocoa/analysis/analyzer.py
ijcai2022-5500/anego
9a2e5f29f0ec0787ad8ce7822089345053442887
[ "MIT" ]
1
2022-01-02T02:39:23.000Z
2022-01-02T02:39:23.000Z
"""Functions that analyze dialogues and models. """ import json from collections import defaultdict import numpy as np from cocoa.core.entity import is_entity from cocoa.model.util import entropy, safe_div from cocoa.model.counter import build_vocabulary, count_ngrams from cocoa.model.ngram import MLENgramModel from ...
34.965278
96
0.590864
import json from collections import defaultdict import numpy as np from cocoa.core.entity import is_entity from cocoa.model.util import entropy, safe_div from cocoa.model.counter import build_vocabulary, count_ngrams from cocoa.model.ngram import MLENgramModel from core.tokenizer import tokenize all_vocab = None no_...
true
true
f76bc34bf0b5abcf2e6ebc53b51402b0ecb0f338
13,971
py
Python
vispy/app/backends/_ipynb_vnc.py
robmcmullen/vispy
8d5092fdae4a24fc364ae51c7e34e12d3fd6d0a2
[ "BSD-3-Clause" ]
null
null
null
vispy/app/backends/_ipynb_vnc.py
robmcmullen/vispy
8d5092fdae4a24fc364ae51c7e34e12d3fd6d0a2
[ "BSD-3-Clause" ]
null
null
null
vispy/app/backends/_ipynb_vnc.py
robmcmullen/vispy
8d5092fdae4a24fc364ae51c7e34e12d3fd6d0a2
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2014, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. """ vispy backend for the IPython notebook (vnc approach). We aim to have: * ipynb_static - export visualization to a static notebook * ipynb_vnc - vnc-approach: render in Py...
37.861789
79
0.582492
from __future__ import division from ..base import (BaseApplicationBackend, BaseCanvasBackend, BaseTimerBackend) from .. import Application, Canvas from ...util import logger from ...gloo.util import _screenshot from ...io import _make_png from base64 import b64encode import os.path as op cap...
true
true
f76bc4e72c2f2506b339c76d5733a34265d2e650
155
py
Python
Curso_Python_3_UDEMY/manipulacao_arquivo/desafio.py
DanilooSilva/Cursos_de_Python
8f167a4c6e16f01601e23b6f107578aa1454472d
[ "MIT" ]
null
null
null
Curso_Python_3_UDEMY/manipulacao_arquivo/desafio.py
DanilooSilva/Cursos_de_Python
8f167a4c6e16f01601e23b6f107578aa1454472d
[ "MIT" ]
null
null
null
Curso_Python_3_UDEMY/manipulacao_arquivo/desafio.py
DanilooSilva/Cursos_de_Python
8f167a4c6e16f01601e23b6f107578aa1454472d
[ "MIT" ]
null
null
null
with open('desafio-ibge.csv', encoding='ISO-8859-1') as arquivo: for inf in arquivo: inf = inf.strip().split(',') print(inf[8], inf[3])
38.75
64
0.587097
with open('desafio-ibge.csv', encoding='ISO-8859-1') as arquivo: for inf in arquivo: inf = inf.strip().split(',') print(inf[8], inf[3])
true
true
f76bc53e6327990226f58a7f09a85c2177ef27d2
3,213
py
Python
cowrie/output/xmpp.py
matricali/cowrie
720cbd5065d890d261aa54b54c61b840f24e7ec0
[ "BSD-3-Clause" ]
1
2018-08-11T18:29:07.000Z
2018-08-11T18:29:07.000Z
cowrie/output/xmpp.py
anitazhaochen/cowrie
6f5edd3b77163976208acf932513355a7e424b9b
[ "BSD-3-Clause" ]
null
null
null
cowrie/output/xmpp.py
anitazhaochen/cowrie
6f5edd3b77163976208acf932513355a7e424b9b
[ "BSD-3-Clause" ]
1
2019-12-20T20:07:39.000Z
2019-12-20T20:07:39.000Z
from __future__ import division, absolute_import import json from twisted.words.xish import domish from twisted.python import log from twisted.words.protocols.jabber.jid import JID from twisted.internet import defer from twisted.application import service from twisted.words.protocols.jabber import jid from wokkel.x...
30.028037
84
0.633987
from __future__ import division, absolute_import import json from twisted.words.xish import domish from twisted.python import log from twisted.words.protocols.jabber.jid import JID from twisted.internet import defer from twisted.application import service from twisted.words.protocols.jabber import jid from wokkel.x...
true
true
f76bc56b926313f8cd3cfcac9f6079199fdb56b3
1,226
py
Python
ctsutils/mpl_slider.py
534ttl3/ctsutils
b070bf349d4a112df576404a3948e0de60f24927
[ "MIT" ]
null
null
null
ctsutils/mpl_slider.py
534ttl3/ctsutils
b070bf349d4a112df576404a3948e0de60f24927
[ "MIT" ]
null
null
null
ctsutils/mpl_slider.py
534ttl3/ctsutils
b070bf349d4a112df576404a3948e0de60f24927
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt from matplotlib.widgets import Slider, Button, RadioButtons fig, ax = plt.subplots() plt.subplots_adjust(left=0.25, bottom=0.25) t = np.arange(0.0, 1.0, 0.001) a0 = 5 f0 = 3 delta_f = 5.0 s = a0 * np.sin(2 * np.pi * f0 * t) l, = plt.plot(t, s, lw=2) ax.margins(x=0) a...
23.132075
70
0.66721
import numpy as np import matplotlib.pyplot as plt from matplotlib.widgets import Slider, Button, RadioButtons fig, ax = plt.subplots() plt.subplots_adjust(left=0.25, bottom=0.25) t = np.arange(0.0, 1.0, 0.001) a0 = 5 f0 = 3 delta_f = 5.0 s = a0 * np.sin(2 * np.pi * f0 * t) l, = plt.plot(t, s, lw=2) ax.margins(x=0) a...
true
true
f76bc61d6aa1931301ae5c10510c3c57d1905401
4,175
py
Python
logic_gates.py
AlexS12/logic_gates
4cfdbe7f1bd39d0ca5d326c31696a1c9aa8a7917
[ "MIT" ]
null
null
null
logic_gates.py
AlexS12/logic_gates
4cfdbe7f1bd39d0ca5d326c31696a1c9aa8a7917
[ "MIT" ]
null
null
null
logic_gates.py
AlexS12/logic_gates
4cfdbe7f1bd39d0ca5d326c31696a1c9aa8a7917
[ "MIT" ]
null
null
null
""" Classes example based on: http://interactivepython.org/runestone/static/pythonds/Introduction/ ObjectOrientedProgramminginPythonDefiningClasses.html @author Alex Sáez """ class LogicGate(object): def __init__(self, name): self.name = name self._output = None def connect_output_to(self, o...
22.089947
74
0.560719
class LogicGate(object): def __init__(self, name): self.name = name self._output = None def connect_output_to(self, other, pin=None): if isinstance(other, UnaryGate): other._pin.connect(self) if isinstance(other, BinaryGate): if pin.lower() == 'a': ...
true
true
f76bc658dd592f0186a0e0b57112e3fa129e6d89
6,598
py
Python
sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2019_07_01_preview/models/_iot_hub_client_enums.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2019_07_01_preview/models/_iot_hub_client_enums.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2019_07_01_preview/models/_iot_hub_client_enums.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
36.252747
126
0.711276
from enum import Enum, EnumMeta from six import with_metaclass class _CaseInsensitiveEnumMeta(EnumMeta): def __getitem__(self, name): return super().__getitem__(name.upper()) def __getattr__(cls, name): try: return cls._member_map_[name.upper()] except KeyError: ...
true
true
f76bc67a37e9479fd22d096a7b53d2beea673ee9
5,037
py
Python
scripts/MPI/3_billboard_metrics_test.py
vigliensoni/MLHD
48654c9c76957669f6b9ea12326753777431e33f
[ "MIT" ]
2
2017-10-19T14:49:08.000Z
2017-11-11T17:52:03.000Z
scripts/MPI/3_billboard_metrics_test.py
vigliensoni/MLHD
48654c9c76957669f6b9ea12326753777431e33f
[ "MIT" ]
null
null
null
scripts/MPI/3_billboard_metrics_test.py
vigliensoni/MLHD
48654c9c76957669f6b9ea12326753777431e33f
[ "MIT" ]
null
null
null
#! /opt/sharcnet/python/2.7.3/bin/python # ####################################### # SUBMISSION # ####################################### # sqsub -r 10m -f xeon -q mpi -o extracting_features_for_billboard -n 2 python ./4_SCRIPTS/MPI/3_billboard_metrics_test.py 0 (8 songs) # sqsub -r 90m -f xeon -q mpi -o extracting_f...
36.23741
137
0.659718
# 8117177 3 1200781349,1208145269,1209626674 # 40933029 6 1328120272,1332187536,1342536119,1342536768,1350714616,1365226575 # ... # ################################################################################ from mpi4py import MPI import sys, os import tarfile, gzip import GVM_classes import Feature...
false
true
f76bc6a38aae39941a6f83c60118456d8d47158c
209
py
Python
services/rutaxi.py
studio-mad-tagic/b0mb3r
1aa708f9e60341ff1e90ac6b1412f642bea7df11
[ "MIT" ]
1
2021-06-07T15:37:58.000Z
2021-06-07T15:37:58.000Z
services/rutaxi.py
studio-mad-tagic/b0mb3r
1aa708f9e60341ff1e90ac6b1412f642bea7df11
[ "MIT" ]
null
null
null
services/rutaxi.py
studio-mad-tagic/b0mb3r
1aa708f9e60341ff1e90ac6b1412f642bea7df11
[ "MIT" ]
null
null
null
from service import Service class RuTaxi(Service): def send_sms(self): self.session.post('https://moscow.rutaxi.ru/ajax_keycode.html', data={'1': self.formatted_phone})
26.125
71
0.626794
from service import Service class RuTaxi(Service): def send_sms(self): self.session.post('https://moscow.rutaxi.ru/ajax_keycode.html', data={'1': self.formatted_phone})
true
true
f76bc7e9a56ead63533346321622b211a79d8e98
9,473
py
Python
noisefilter/apps/filter/views.py
itsMagondu/IoTNeuralNetworks
7ba2098866966a55541019028b16301cfcf94b6b
[ "MIT" ]
null
null
null
noisefilter/apps/filter/views.py
itsMagondu/IoTNeuralNetworks
7ba2098866966a55541019028b16301cfcf94b6b
[ "MIT" ]
1
2021-06-11T04:40:55.000Z
2021-06-11T04:40:55.000Z
noisefilter/apps/filter/views.py
itsMagondu/IoTNeuralNetworks
7ba2098866966a55541019028b16301cfcf94b6b
[ "MIT" ]
null
null
null
import numpy as np import time import json from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from django.http import HttpResponseRedirect, HttpResponse, JsonResponse from django.views.generic.base import TemplateView from django.core import serializers from django.shortcuts import render fr...
32.892361
102
0.621028
import numpy as np import time import json from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from django.http import HttpResponseRedirect, HttpResponse, JsonResponse from django.views.generic.base import TemplateView from django.core import serializers from django.shortcuts import render fr...
false
true
f76bc8bdb57cae4bd4b76b25b844f2141296665e
10,731
py
Python
huaweicloud-sdk-apig/huaweicloudsdkapig/v2/model/backend_api_base.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
1
2021-04-16T07:59:28.000Z
2021-04-16T07:59:28.000Z
huaweicloud-sdk-apig/huaweicloudsdkapig/v2/model/backend_api_base.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
null
null
null
huaweicloud-sdk-apig/huaweicloudsdkapig/v2/model/backend_api_base.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
1
2022-01-17T02:24:18.000Z
2022-01-17T02:24:18.000Z
# coding: utf-8 import pprint import re import six class BackendApiBase: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is ...
26.561881
211
0.585593
import pprint import re import six class BackendApiBase: sensitive_list = [] openapi_types = { 'authorizer_id': 'str', 'url_domain': 'str', 'req_protocol': 'str', 'remark': 'str', 'req_method': 'str', 'version': 'str', 'req_uri': 'str', ...
true
true
f76bc9a124404954771c94c8b9db1ba9a35a4239
202
py
Python
deb_dist/mendelmd-1.2.4/debian/python3-mendelmd/usr/lib/python3/dist-packages/databases/forms.py
fossabot/mendelmd
5cafebf5336b8854fe71414b3559428e3e401617
[ "BSD-3-Clause" ]
33
2016-07-22T21:39:09.000Z
2021-06-24T02:57:02.000Z
deb_dist/mendelmd-1.2.4/debian/python3-mendelmd/usr/lib/python3/dist-packages/databases/forms.py
fossabot/mendelmd
5cafebf5336b8854fe71414b3559428e3e401617
[ "BSD-3-Clause" ]
41
2017-06-20T03:10:33.000Z
2021-12-24T23:54:41.000Z
deb_dist/mendelmd-1.2.4/debian/python3-mendelmd/usr/lib/python3/dist-packages/databases/forms.py
fossabot/mendelmd
5cafebf5336b8854fe71414b3559428e3e401617
[ "BSD-3-Clause" ]
8
2017-06-14T21:07:47.000Z
2021-01-12T17:59:49.000Z
from django import forms from .models import Genome1kSample class Genomes1kForm(forms.Form): sample = forms.ModelChoiceField( queryset=Genome1kSample.objects.all().order_by('name'), )
22.444444
63
0.737624
from django import forms from .models import Genome1kSample class Genomes1kForm(forms.Form): sample = forms.ModelChoiceField( queryset=Genome1kSample.objects.all().order_by('name'), )
true
true
f76bca30681db308b4ce6d02e68c30848be27f2e
1,856
py
Python
src/act/db/aCTDBMS.py
bryngemark/aCT
be6d0fec0bd1313cb112c1901f21b3e39ccca305
[ "Apache-2.0" ]
null
null
null
src/act/db/aCTDBMS.py
bryngemark/aCT
be6d0fec0bd1313cb112c1901f21b3e39ccca305
[ "Apache-2.0" ]
8
2019-12-12T14:41:50.000Z
2020-12-04T21:06:44.000Z
src/act/db/aCTDBMS.py
bryngemark/aCT
be6d0fec0bd1313cb112c1901f21b3e39ccca305
[ "Apache-2.0" ]
4
2018-02-05T11:25:20.000Z
2018-07-19T09:53:13.000Z
def getDB(log, config): '''Factory method for getting specific DB implementation''' supported_dbms = {} try: from .aCTDBSqlite import aCTDBSqlite supported_dbms['sqlite'] = aCTDBSqlite except: pass try: from .aCTDBMySQL import aCTDBMySQL supported_dbms['mysq...
30.42623
71
0.636315
def getDB(log, config): supported_dbms = {} try: from .aCTDBSqlite import aCTDBSqlite supported_dbms['sqlite'] = aCTDBSqlite except: pass try: from .aCTDBMySQL import aCTDBMySQL supported_dbms['mysql'] = aCTDBMySQL except: pass try: from ...
true
true
f76bcaca2f8dc03c21b5b9d65b77874d2ae3f293
14,819
py
Python
homeassistant/components/websocket_api.py
da-anda/home-assistant
04de22613c57e98c75315e6323833dc361399b53
[ "Apache-2.0" ]
1
2018-12-01T02:09:25.000Z
2018-12-01T02:09:25.000Z
homeassistant/components/websocket_api.py
da-anda/home-assistant
04de22613c57e98c75315e6323833dc361399b53
[ "Apache-2.0" ]
null
null
null
homeassistant/components/websocket_api.py
da-anda/home-assistant
04de22613c57e98c75315e6323833dc361399b53
[ "Apache-2.0" ]
2
2018-11-09T13:10:17.000Z
2019-01-08T11:44:08.000Z
""" Websocket based API for Home Assistant. For more details about this component, please refer to the documentation at https://home-assistant.io/developers/websocket_api/ """ import asyncio from contextlib import suppress from functools import partial import json import logging from aiohttp import web import voluptu...
29.461233
78
0.603887
import asyncio from contextlib import suppress from functools import partial import json import logging from aiohttp import web import voluptuous as vol from voluptuous.humanize import humanize_error from homeassistant.const import ( MATCH_ALL, EVENT_TIME_CHANGED, EVENT_HOMEASSISTANT_STOP, __version__) from h...
true
true
f76bcd26ddf68d19c5fa1ef0ca27cfd402966164
15,305
py
Python
fastNLP/io/file_utils.py
brxx122/fastNLP
8affc4a3ff75061ccbdecca6247493f346634155
[ "Apache-2.0" ]
null
null
null
fastNLP/io/file_utils.py
brxx122/fastNLP
8affc4a3ff75061ccbdecca6247493f346634155
[ "Apache-2.0" ]
null
null
null
fastNLP/io/file_utils.py
brxx122/fastNLP
8affc4a3ff75061ccbdecca6247493f346634155
[ "Apache-2.0" ]
2
2020-04-21T06:17:59.000Z
2020-05-05T11:22:11.000Z
""" .. todo:: doc """ __all__ = [ "cached_path", "get_filepath", "get_cache_path", "split_filename_suffix", "get_from_cache", ] import os import re import shutil import tempfile from pathlib import Path from urllib.parse import urlparse import requests from requests import HTTPError from tqdm...
32.702991
111
0.608886
__all__ = [ "cached_path", "get_filepath", "get_cache_path", "split_filename_suffix", "get_from_cache", ] import os import re import shutil import tempfile from pathlib import Path from urllib.parse import urlparse import requests from requests import HTTPError from tqdm import tqdm from ..core ...
true
true
f76bce6a6f186e5a6f63bb363aa225f48471a0e1
15,758
py
Python
stretch/_version.py
felipedau/stretch
ed5ccb530c463de95e3bd2180b4b06dbecfb2915
[ "MIT" ]
null
null
null
stretch/_version.py
felipedau/stretch
ed5ccb530c463de95e3bd2180b4b06dbecfb2915
[ "MIT" ]
1
2018-08-09T23:01:09.000Z
2018-08-09T23:01:09.000Z
stretch/_version.py
felipedau/stretch
ed5ccb530c463de95e3bd2180b4b06dbecfb2915
[ "MIT" ]
null
null
null
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
34.182213
79
0.587828
import errno import os import re import subprocess import sys def get_keywords(): git_refnames = "$Format:%d$" git_full = "$Format:%H$" keywords = {"refnames": git_refnames, "full": git_full} return keywords class VersioneerConfig: pass def get_config(): cfg = Ve...
true
true
f76bcea119291a3178b90de2bff7339b07f2ffe7
736
py
Python
molsysmt/item/file_mol2/to_parmed_Structure.py
uibcdf/MolModMTs
4f6b6f671a9fa3e73008d1e9c48686d5f20a6573
[ "MIT" ]
null
null
null
molsysmt/item/file_mol2/to_parmed_Structure.py
uibcdf/MolModMTs
4f6b6f671a9fa3e73008d1e9c48686d5f20a6573
[ "MIT" ]
null
null
null
molsysmt/item/file_mol2/to_parmed_Structure.py
uibcdf/MolModMTs
4f6b6f671a9fa3e73008d1e9c48686d5f20a6573
[ "MIT" ]
null
null
null
from molsysmt._private.digestion import digest_item, digest_atom_indices, digest_structure_indices def to_parmed_Structure(item, atom_indices='all', structure_indices='all', check=True): if check: digest_item(item, 'file:mol2') atom_indices = digest_atom_indices(atom_indices) structure_in...
30.666667
115
0.754076
from molsysmt._private.digestion import digest_item, digest_atom_indices, digest_structure_indices def to_parmed_Structure(item, atom_indices='all', structure_indices='all', check=True): if check: digest_item(item, 'file:mol2') atom_indices = digest_atom_indices(atom_indices) structure_in...
true
true
f76bcfabb46b7db195ccfb745f3bec3ed2d568bc
4,156
py
Python
SpotifyView.py
Thaileaf/SpotifyManager
8e9322a151063fed6f19d8230182693e038ef1fe
[ "MIT" ]
null
null
null
SpotifyView.py
Thaileaf/SpotifyManager
8e9322a151063fed6f19d8230182693e038ef1fe
[ "MIT" ]
null
null
null
SpotifyView.py
Thaileaf/SpotifyManager
8e9322a151063fed6f19d8230182693e038ef1fe
[ "MIT" ]
null
null
null
from PyQt5.QtWidgets import QMainWindow, QDialogButtonBox from PyQt5.QtWidgets import QVBoxLayout from PyQt5.QtWidgets import QGridLayout from PyQt5.QtWidgets import QFormLayout from PyQt5.QtWidgets import QWidget from PyQt5.QtWidgets import QLineEdit from PyQt5.QtWidgets import QLabel from PyQt5.QtWidgets import QDial...
29.899281
104
0.666987
from PyQt5.QtWidgets import QMainWindow, QDialogButtonBox from PyQt5.QtWidgets import QVBoxLayout from PyQt5.QtWidgets import QGridLayout from PyQt5.QtWidgets import QFormLayout from PyQt5.QtWidgets import QWidget from PyQt5.QtWidgets import QLineEdit from PyQt5.QtWidgets import QLabel from PyQt5.QtWidgets import QDial...
true
true
f76bcfb741eba70bf28bdc61542e164e3aa5e863
861
py
Python
test/test_notify.py
nobrin/omron-2jcie-bu01
7570eb55c4f3f371cce999fbff5bd3dfcd34e424
[ "MIT" ]
1
2021-10-20T06:11:50.000Z
2021-10-20T06:11:50.000Z
test/test_notify.py
nobrin/omron-2jcie-bu01
7570eb55c4f3f371cce999fbff5bd3dfcd34e424
[ "MIT" ]
null
null
null
test/test_notify.py
nobrin/omron-2jcie-bu01
7570eb55c4f3f371cce999fbff5bd3dfcd34e424
[ "MIT" ]
1
2021-07-12T15:57:47.000Z
2021-07-12T15:57:47.000Z
#!/usr/bin/env python3 import sys sys.path.insert(0, "../lib-ext") sys.path.insert(0, "..") import unittest from omron_2jcie_bu01 import Omron2JCIE_BU01 class BLENotificationTestCase(unittest.TestCase): ADDRESS = None @classmethod def setUpClass(cls): sensor = Omron2JCIE_BU01.ble() cls.AD...
25.323529
55
0.660859
import sys sys.path.insert(0, "../lib-ext") sys.path.insert(0, "..") import unittest from omron_2jcie_bu01 import Omron2JCIE_BU01 class BLENotificationTestCase(unittest.TestCase): ADDRESS = None @classmethod def setUpClass(cls): sensor = Omron2JCIE_BU01.ble() cls.ADDRESS = sensor.address ...
true
true
f76bcfbdcd70fcaf2aa5feacaa6544f02b0a869e
367
py
Python
Lab02_example_tweepy/other_files/test_location_of_cam.py
robots-make-art-too/autonomous-artistic-agent
1986411894b50c65aa72f1634e56be933bd289a9
[ "MIT" ]
20
2022-01-20T15:26:57.000Z
2022-02-10T21:55:03.000Z
Lab02_example_tweepy/other_files/test_location_of_cam.py
robots-make-art-too/autonomous-artistic-agent
1986411894b50c65aa72f1634e56be933bd289a9
[ "MIT" ]
null
null
null
Lab02_example_tweepy/other_files/test_location_of_cam.py
robots-make-art-too/autonomous-artistic-agent
1986411894b50c65aa72f1634e56be933bd289a9
[ "MIT" ]
11
2022-01-20T20:33:55.000Z
2022-02-16T02:00:51.000Z
import cv2 import time # this is accessing my Ubuntu/Linxux /dev/ folder to check # probably you have different path # I can check the available options by running `ls /dev/video*` at CLI # mine shows video0, video1, video5, video6 right now cap = cv2.VideoCapture('/dev/video5') # allow the camera to warmup time.sleep...
30.583333
70
0.743869
import cv2 import time cap = cv2.VideoCapture('/dev/video5') time.sleep(0.1) ret, frame = cap.read() print(ret, frame)
true
true
f76bcff43ff92ca10faefe82c3f49b7535dc6bbc
3,823
py
Python
composer/workflow/models.py
FingerLiu/service-flow-conductor
68976eb4b470dea8c6dcf28c3ea67a75ce797831
[ "MIT" ]
5
2019-06-19T09:44:17.000Z
2021-09-16T10:59:54.000Z
composer/workflow/models.py
FingerLiu/service-flow-conductor
68976eb4b470dea8c6dcf28c3ea67a75ce797831
[ "MIT" ]
6
2019-12-04T23:29:52.000Z
2022-02-10T11:18:42.000Z
composer/workflow/models.py
FingerLiu/service-flow-conductor
68976eb4b470dea8c6dcf28c3ea67a75ce797831
[ "MIT" ]
null
null
null
from django.db import models # Create your models here. class BaseModel(models.Model): created = models.DateTimeField(auto_now_add=True) updated = models.DateTimeField(auto_now=True) creator = models.IntegerField() updator = models.IntegerField() class Meta: abstract = True class Workfl...
26.006803
81
0.615224
from django.db import models class BaseModel(models.Model): created = models.DateTimeField(auto_now_add=True) updated = models.DateTimeField(auto_now=True) creator = models.IntegerField() updator = models.IntegerField() class Meta: abstract = True class WorkflowGroup(BaseModel): nam...
true
true
f76bd13ba4355d6d57b1cdd5dcbb10affe71419a
568
py
Python
integration-test/398-airport-iata-codes.py
nextzen/vector-datasource
f11700f232a3a6251915579106ff07b2bee25d12
[ "MIT" ]
1
2018-01-03T21:26:27.000Z
2018-01-03T21:26:27.000Z
integration-test/398-airport-iata-codes.py
nextzen/vector-datasource
f11700f232a3a6251915579106ff07b2bee25d12
[ "MIT" ]
null
null
null
integration-test/398-airport-iata-codes.py
nextzen/vector-datasource
f11700f232a3a6251915579106ff07b2bee25d12
[ "MIT" ]
1
2019-06-19T19:14:42.000Z
2019-06-19T19:14:42.000Z
from . import FixtureTest class AirportIataCodes(FixtureTest): def test_sfo(self): # San Francisco International self.load_fixtures(['https://www.openstreetmap.org/way/23718192']) self.assert_has_feature( 13, 1311, 3170, 'pois', {'kind': 'aerodrome', 'iata': 'SFO'}...
28.4
74
0.59507
from . import FixtureTest class AirportIataCodes(FixtureTest): def test_sfo(self): self.load_fixtures(['https://www.openstreetmap.org/way/23718192']) self.assert_has_feature( 13, 1311, 3170, 'pois', {'kind': 'aerodrome', 'iata': 'SFO'}) def test_oak(self): ...
true
true
f76bd1994407ddb00a57072106867b327537e245
11,450
py
Python
.circleci/bin/test-airflow-image.py
ianstanton/ap-airflow
74fd8a6c01ab6876ccaa18a6ffa2667e9447f5f9
[ "Apache-2.0" ]
null
null
null
.circleci/bin/test-airflow-image.py
ianstanton/ap-airflow
74fd8a6c01ab6876ccaa18a6ffa2667e9447f5f9
[ "Apache-2.0" ]
null
null
null
.circleci/bin/test-airflow-image.py
ianstanton/ap-airflow
74fd8a6c01ab6876ccaa18a6ffa2667e9447f5f9
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 """ This file is for configuration testing Airflow images. The Airflow image is started in Docker, configured to access an instance of postgres, which is also running in Docker. Testinfra is used to configuration test the image. In effect, testinfra simplifies and provides syntactic sugar for do...
38.422819
112
0.700524
import os import docker import pytest import subprocess import testinfra from time import sleep from enum import Enum from packaging.version import parse as semantic_version class ImageType(Enum): BASE = "base" ONBUILD = "onbuild" def test_airflow_in_path(webserver): assert webserver.exists('airflow')...
true
true
f76bd1cafe36cba98925736d50b80277a448cfc2
1,071
py
Python
examples/_attic/raspberrypi_gpio/relay_agent.py
hiway/python-zentropi
006f4a6de8b6691477fa1416476cd6cef665c918
[ "Apache-2.0" ]
5
2017-05-28T18:15:38.000Z
2021-07-15T22:31:33.000Z
examples/_attic/raspberrypi_gpio/relay_agent.py
hiway/python-zentropi
006f4a6de8b6691477fa1416476cd6cef665c918
[ "Apache-2.0" ]
null
null
null
examples/_attic/raspberrypi_gpio/relay_agent.py
hiway/python-zentropi
006f4a6de8b6691477fa1416476cd6cef665c918
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 from zentropi import ( Agent, on_event, on_message, on_state, run_agents ) from zentropi.shell import ZentropiShell class Relay(Agent): @on_event('*** started') def setup(self, event): # Define custom states. self.states.power = False @on_message('switch...
28.184211
84
0.606909
from zentropi import ( Agent, on_event, on_message, on_state, run_agents ) from zentropi.shell import ZentropiShell class Relay(Agent): @on_event('*** started') def setup(self, event): self.states.power = False @on_message('switch {power}', parse=True) def switch(s...
true
true
f76bd230290d8a3bad025b1cac6d964de3f8c29b
16,345
py
Python
scripts/cli/manage_cli.py
tfreundo/simple_etl_playground
853c8644b1446b7eb599fb7347e994613b8a2c94
[ "MIT" ]
1
2020-12-11T09:37:51.000Z
2020-12-11T09:37:51.000Z
scripts/cli/manage_cli.py
tfreundo/airflow-dev-env
853c8644b1446b7eb599fb7347e994613b8a2c94
[ "MIT" ]
14
2020-12-06T06:27:33.000Z
2020-12-16T09:21:05.000Z
scripts/cli/manage_cli.py
tfreundo/airflow-dev-env
853c8644b1446b7eb599fb7347e994613b8a2c94
[ "MIT" ]
null
null
null
""" A CLI that allows you to easily manage your airflow-dev-env """ import sys from PyInquirer import style_from_dict, prompt, Separator import subprocess from manage_config import * banner = """ ___ _ _ _ / ___)_ ) ( ) _ _(_)_ __|...
38.824228
194
0.466993
import sys from PyInquirer import style_from_dict, prompt, Separator import subprocess from manage_config import * banner = """ ___ _ _ _ / ___)_ ) ( ) _ _(_)_ __| (__ | | _ _ _ _ ______ _| | __ _ _ ______ __ _...
true
true
f76bd24a92337be68db4c42e31f8395c4a06fc5c
5,686
py
Python
testproj/articles/views.py
gdalmau/drf-yasg
acff90ac26eba01e363bfd3ecc75b71a6a37088a
[ "BSD-3-Clause" ]
65
2020-10-06T15:37:49.000Z
2022-02-24T05:18:28.000Z
testproj/articles/views.py
gdalmau/drf-yasg
acff90ac26eba01e363bfd3ecc75b71a6a37088a
[ "BSD-3-Clause" ]
48
2020-10-07T11:14:40.000Z
2021-02-03T15:07:39.000Z
testproj/articles/views.py
gdalmau/drf-yasg
acff90ac26eba01e363bfd3ecc75b71a6a37088a
[ "BSD-3-Clause" ]
4
2020-10-10T18:03:33.000Z
2020-10-23T07:56:34.000Z
import datetime from django.utils.decorators import method_decorator from django_filters.rest_framework import DjangoFilterBackend from rest_framework import viewsets from rest_framework.filters import OrderingFilter from rest_framework.pagination import LimitOffsetPagination from rest_framework.parsers import FileUpl...
33.845238
90
0.691875
import datetime from django.utils.decorators import method_decorator from django_filters.rest_framework import DjangoFilterBackend from rest_framework import viewsets from rest_framework.filters import OrderingFilter from rest_framework.pagination import LimitOffsetPagination from rest_framework.parsers import FileUpl...
true
true
f76bd294fae0619751a2773d8ea522cec7ed752e
2,748
py
Python
archive/nexus-api-v2/Database/AGILE/Models/__init__.py
cloud-hybrid/delta
402b00ed5aaa32ccef628361e9635879b7ace44f
[ "BSD-3-Clause" ]
null
null
null
archive/nexus-api-v2/Database/AGILE/Models/__init__.py
cloud-hybrid/delta
402b00ed5aaa32ccef628361e9635879b7ace44f
[ "BSD-3-Clause" ]
null
null
null
archive/nexus-api-v2/Database/AGILE/Models/__init__.py
cloud-hybrid/delta
402b00ed5aaa32ccef628361e9635879b7ace44f
[ "BSD-3-Clause" ]
1
2022-01-03T05:33:15.000Z
2022-01-03T05:33:15.000Z
#!/usr/bin/env python3 # -*- Coding: UTF-8 -*- # # -*- System: Linux -*- # # -*- Usage: *.py -*- # # Owner: Jacob B. Sanders # Source: code.cloud-technology.io # License: BSD 2-Clause License """ ... """ # ============================================================================= # Standard Library # ===...
26.171429
79
0.456332
import os import sys import uuid import pkgutil import secrets import datetime import pydantic import sqlalchemy import sqlalchemy.orm import sqlalchemy.dialects import sqlalchemy.dialects.postgresql import Database Stamp = datetime.datetime.utcnow Secret = pydantic.SecretStr Time = sqlalchemy.sql.func Re...
true
true
f76bd3233d7689133d03eeff782a1a85ecc93ce4
3,130
py
Python
vega/algorithms/hpo/bo_hpo.py
qixiuai/vega
3e6588ea4aedb03e3594a549a97ffdb86adb88d1
[ "MIT" ]
null
null
null
vega/algorithms/hpo/bo_hpo.py
qixiuai/vega
3e6588ea4aedb03e3594a549a97ffdb86adb88d1
[ "MIT" ]
null
null
null
vega/algorithms/hpo/bo_hpo.py
qixiuai/vega
3e6588ea4aedb03e3594a549a97ffdb86adb88d1
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved. # This program is free software; you can redistribute it and/or modify # it under the terms of the MIT License. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the ...
34.395604
85
0.634505
import os import logging import copy from vega.algorithms.hpo.common import BO from vega.core.hyperparameter_space import json_to_hps from vega.core.common.class_factory import ClassFactory, ClassType from vega.core.pipeline.hpo_generator import HpoGenerator @ClassFactory.register(ClassType.HPO) class BoHpo(HpoGene...
true
true
f76bd327007f6f8378d4e56d54f1ec484040c1f4
1,284
py
Python
azure-mgmt/tests/test_mgmt_authorization.py
v-Ajnava/azure-sdk-for-python
a1f6f80eb5869c5b710e8bfb66146546697e2a6f
[ "MIT" ]
4
2016-06-17T23:25:29.000Z
2022-03-30T22:37:45.000Z
azure-mgmt/tests/test_mgmt_authorization.py
v-Ajnava/azure-sdk-for-python
a1f6f80eb5869c5b710e8bfb66146546697e2a6f
[ "MIT" ]
2
2016-09-30T21:40:24.000Z
2017-11-10T18:16:18.000Z
azure-mgmt/tests/test_mgmt_authorization.py
v-Ajnava/azure-sdk-for-python
a1f6f80eb5869c5b710e8bfb66146546697e2a6f
[ "MIT" ]
3
2016-05-03T20:49:46.000Z
2017-10-05T21:05:27.000Z
# coding: utf-8 #------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #---------------------------------------------------------------------...
32.1
84
0.584112
 import unittest import azure.mgmt.authorization from testutils.common_recordingtestcase import record from tests.mgmt_testcase import HttpStatusCode, AzureMgmtTestCase class MgmtAuthorizationTest(AzureMgmtTestCase): def setUp(self): super(MgmtAuthorizationTest, self).setUp() self.authorization...
false
true
f76bd4449c39941a0a34d3ae1ef8daf1f9feea36
253
py
Python
markdown_it/helpers/__init__.py
kianmeng/markdown-it-py
32097fb8cf95b7e84ad4348aefe79a4743b225ff
[ "MIT" ]
null
null
null
markdown_it/helpers/__init__.py
kianmeng/markdown-it-py
32097fb8cf95b7e84ad4348aefe79a4743b225ff
[ "MIT" ]
1
2021-05-07T11:49:57.000Z
2021-05-07T11:49:57.000Z
markdown_it/helpers/__init__.py
kianmeng/markdown-it-py
32097fb8cf95b7e84ad4348aefe79a4743b225ff
[ "MIT" ]
1
2021-05-07T11:37:39.000Z
2021-05-07T11:37:39.000Z
"""Functions for parsing Links """ __all__ = ("parseLinkLabel", "parseLinkDestination", "parseLinkTitle") from .parse_link_label import parseLinkLabel from .parse_link_destination import parseLinkDestination from .parse_link_title import parseLinkTitle
36.142857
70
0.833992
__all__ = ("parseLinkLabel", "parseLinkDestination", "parseLinkTitle") from .parse_link_label import parseLinkLabel from .parse_link_destination import parseLinkDestination from .parse_link_title import parseLinkTitle
true
true
f76bd6fd4f3eed2717930c5bfe744ad060bca89a
515
pyde
Python
processing/chapter4/sketch_4_2_Z3/sketch_4_2_Z3.pyde
brickdonut/2019-fall-polytech-cs
b2830795f35e65ff90cf73e0746551c6efdd1f87
[ "MIT" ]
null
null
null
processing/chapter4/sketch_4_2_Z3/sketch_4_2_Z3.pyde
brickdonut/2019-fall-polytech-cs
b2830795f35e65ff90cf73e0746551c6efdd1f87
[ "MIT" ]
null
null
null
processing/chapter4/sketch_4_2_Z3/sketch_4_2_Z3.pyde
brickdonut/2019-fall-polytech-cs
b2830795f35e65ff90cf73e0746551c6efdd1f87
[ "MIT" ]
null
null
null
def setup(): size (600,600) noLoop() def drawMyScene(myColor,x): rotate(PI/4*x) fill(myColor) rect(0,50,150,50) rect(50,0,50,150) def draw(): background(20) smooth() noStroke() pushMatrix() translate(100,0) drawMyScene(180,1) popMatrix() pus...
16.09375
27
0.545631
def setup(): size (600,600) noLoop() def drawMyScene(myColor,x): rotate(PI/4*x) fill(myColor) rect(0,50,150,50) rect(50,0,50,150) def draw(): background(20) smooth() noStroke() pushMatrix() translate(100,0) drawMyScene(180,1) popMatrix() pus...
true
true
f76bd7ad729ca7f477d26cce958d8e36f2146946
180
py
Python
kcc3/hosts.py
riichi/kcc3
7762cd273b1f1d78caafd2a85ed169c4a9403293
[ "MIT" ]
2
2019-09-22T00:11:54.000Z
2019-09-22T10:55:31.000Z
kcc3/hosts.py
m4tx/kcc3
2cc9674d13483ee59fe7cb83e8b9c9e8b213ba47
[ "MIT" ]
5
2021-04-08T20:11:53.000Z
2022-01-19T12:02:31.000Z
kcc3/hosts.py
riichi/kcc3
7762cd273b1f1d78caafd2a85ed169c4a9403293
[ "MIT" ]
null
null
null
from django_hosts import patterns, host host_patterns = patterns( '', host(r'fanpai', 'kcc3.urls', name='root'), host(r'yakuman', 'yakumans.urls', name='yakumans'), )
22.5
55
0.655556
from django_hosts import patterns, host host_patterns = patterns( '', host(r'fanpai', 'kcc3.urls', name='root'), host(r'yakuman', 'yakumans.urls', name='yakumans'), )
true
true
f76bd8e524cdd410d0fef057f0e45e49a527216c
1,980
py
Python
project_tooling/add_header.py
Jasha10/hydra-zen
c229ab37f9ab6be4d1c64cabb646df99d0308027
[ "MIT" ]
65
2021-06-10T00:02:57.000Z
2022-03-26T12:31:54.000Z
project_tooling/add_header.py
Jasha10/hydra-zen
c229ab37f9ab6be4d1c64cabb646df99d0308027
[ "MIT" ]
60
2021-06-08T14:10:17.000Z
2022-03-31T20:51:41.000Z
project_tooling/add_header.py
Jasha10/hydra-zen
c229ab37f9ab6be4d1c64cabb646df99d0308027
[ "MIT" ]
2
2021-07-14T21:06:15.000Z
2021-09-11T20:16:02.000Z
# Copyright (c) 2022 Massachusetts Institute of Technology # Usage: # # python project_tooling/add_header.py # import fileinput import os import os.path as path from pathlib import Path OLD_HEADER = "# Copyright (c) 2021 Massachusetts Institute of Technology" NEW_HEADER = "# Copyright (c) 2021 Massachusetts Institut...
29.552239
110
0.60101
import fileinput import os import os.path as path from pathlib import Path OLD_HEADER = "# Copyright (c) 2021 Massachusetts Institute of Technology" NEW_HEADER = "# Copyright (c) 2021 Massachusetts Institute of Technology\n# SPDX-License-Identifier: MIT" EXCLUDED = {"_version.py", "versioneer.py"} def is_safe_dir(...
true
true
f76bd91d3cfc5ebebdfe6cab5b2c770df0008743
6,467
py
Python
searx/searx/query.py
wgranados/quadbot
863020f6fb77bd18bb630a6808246f6689e28345
[ "MIT" ]
3
2018-10-23T02:37:45.000Z
2019-07-31T18:46:10.000Z
searx/searx/query.py
wlgranados/quadbot
863020f6fb77bd18bb630a6808246f6689e28345
[ "MIT" ]
6
2018-10-03T06:30:58.000Z
2021-03-31T19:13:21.000Z
searx/searx/query.py
wgranados/quadbot
863020f6fb77bd18bb630a6808246f6689e28345
[ "MIT" ]
1
2019-01-31T13:57:13.000Z
2019-01-31T13:57:13.000Z
#!/usr/bin/env python ''' searx is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. searx is distributed in the hope that it will be use...
37.166667
101
0.532395
from searx.languages import language_codes from searx.engines import ( categories, engines, engine_shortcuts ) import re import sys if sys.version_info[0] == 3: unicode = str VALID_LANGUAGE_CODE = re.compile(r'^[a-z]{2,3}(-[a-zA-Z]{2})?$') class RawTextQuery(object): def __init__(self, query, disable...
true
true
f76bd97d2437c69e85a0adbbc2b4ff1b89f2dbcd
7,801
py
Python
codebase/third_party/spos_ofa/ofa/imagenet_classification/networks/mobilenet_v3.py
qdmy/Adelaidet-Quantization
e88cf41c62dc3944d2bd57ffc1d365535b0a1c4b
[ "Apache-2.0" ]
null
null
null
codebase/third_party/spos_ofa/ofa/imagenet_classification/networks/mobilenet_v3.py
qdmy/Adelaidet-Quantization
e88cf41c62dc3944d2bd57ffc1d365535b0a1c4b
[ "Apache-2.0" ]
null
null
null
codebase/third_party/spos_ofa/ofa/imagenet_classification/networks/mobilenet_v3.py
qdmy/Adelaidet-Quantization
e88cf41c62dc3944d2bd57ffc1d365535b0a1c4b
[ "Apache-2.0" ]
null
null
null
# Once for All: Train One Network and Specialize it for Efficient Deployment # Han Cai, Chuang Gan, Tianzhe Wang, Zhekai Zhang, Song Han # International Conference on Learning Representations (ICLR), 2020. import copy import torch.nn as nn from codebase.third_party.spos_ofa.ofa.utils.layers import set_layer_from_conf...
35.621005
147
0.705935
import copy import torch.nn as nn from codebase.third_party.spos_ofa.ofa.utils.layers import set_layer_from_config, MBConvLayer, ConvLayer, IdentityLayer, LinearLayer, ResidualBlock from codebase.third_party.spos_ofa.ofa.utils import MyNetwork, make_divisible, MyGlobalAvgPool2d __all__ = ['MobileNetV3', 'MobileNetV3...
true
true
f76bda123502f789af235e541c6ec307ebdc3c7c
1,278
py
Python
python_modules/libraries/dagster-aws/dagster_aws_tests/s3_tests/test_s3_file_cache.py
flowersw/dagster
0de6baf2bd6a41bfacf0be532b954e23305fb6b4
[ "Apache-2.0" ]
3
2020-09-09T04:10:23.000Z
2021-11-08T02:10:42.000Z
python_modules/libraries/dagster-aws/dagster_aws_tests/s3_tests/test_s3_file_cache.py
flowersw/dagster
0de6baf2bd6a41bfacf0be532b954e23305fb6b4
[ "Apache-2.0" ]
2
2021-05-11T13:36:27.000Z
2021-09-03T01:53:11.000Z
python_modules/libraries/dagster-aws/dagster_aws_tests/s3_tests/test_s3_file_cache.py
flowersw/dagster
0de6baf2bd6a41bfacf0be532b954e23305fb6b4
[ "Apache-2.0" ]
null
null
null
import io from dagster_aws.s3 import S3FakeSession, S3FileCache, S3FileHandle def test_s3_file_cache_file_not_present(): session_fake = S3FakeSession() file_store = S3FileCache( s3_bucket='some-bucket', s3_key='some-key', s3_session=session_fake, overwrite=False ) assert not file_store.has_f...
28.4
92
0.733177
import io from dagster_aws.s3 import S3FakeSession, S3FileCache, S3FileHandle def test_s3_file_cache_file_not_present(): session_fake = S3FakeSession() file_store = S3FileCache( s3_bucket='some-bucket', s3_key='some-key', s3_session=session_fake, overwrite=False ) assert not file_store.has_f...
true
true
f76bda2c5d3c27247ba82f5f4d99306b706b113d
9,048
py
Python
venv1/Lib/site-packages/tensorflow/python/keras/_impl/keras/layers/advanced_activations.py
Soum-Soum/Tensorflow_Face_Finder
fec6c15d2df7012608511ad87f4b55731bf99478
[ "Apache-2.0", "MIT" ]
null
null
null
venv1/Lib/site-packages/tensorflow/python/keras/_impl/keras/layers/advanced_activations.py
Soum-Soum/Tensorflow_Face_Finder
fec6c15d2df7012608511ad87f4b55731bf99478
[ "Apache-2.0", "MIT" ]
1
2021-05-20T00:58:04.000Z
2021-05-20T00:58:04.000Z
venv1/Lib/site-packages/tensorflow/python/keras/_impl/keras/layers/advanced_activations.py
Soum-Soum/Tensorflow_Face_Finder
fec6c15d2df7012608511ad87f4b55731bf99478
[ "Apache-2.0", "MIT" ]
null
null
null
# Copyright 2015 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...
32.430108
88
0.665782
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.keras._impl.keras import activations from tensorflow.python.keras._impl.keras import backend as K from tensorflow.python.keras._impl.keras import constraints from tensorflow.python...
true
true
f76bdb4b2d2afb59760c73f5c603e37816684e54
6,077
py
Python
info/modules/passport/views.py
xnzgt/git_flask_news
2511927efd2ecd05f2e4312a896cbdfaf69da790
[ "MIT" ]
null
null
null
info/modules/passport/views.py
xnzgt/git_flask_news
2511927efd2ecd05f2e4312a896cbdfaf69da790
[ "MIT" ]
null
null
null
info/modules/passport/views.py
xnzgt/git_flask_news
2511927efd2ecd05f2e4312a896cbdfaf69da790
[ "MIT" ]
null
null
null
import random import re from datetime import datetime from flask import request, abort, current_app, make_response, jsonify, session from info import redis_store, constants, db from info.libs.yuntongxun.sms import CCP from info.models import User from info.modules.passport import passport_blu from info.utils.captcha.c...
26.770925
99
0.667764
import random import re from datetime import datetime from flask import request, abort, current_app, make_response, jsonify, session from info import redis_store, constants, db from info.libs.yuntongxun.sms import CCP from info.models import User from info.modules.passport import passport_blu from info.utils.captcha.c...
true
true
f76bdb60235f8b7b014972c2244610c34c36244d
1,309
py
Python
documentstore_migracao/utils/extract_isis.py
joffilyfe/document-store-migracao
b5125b7aedec56f0e8787900bdfd124aaf65e3e3
[ "BSD-2-Clause" ]
null
null
null
documentstore_migracao/utils/extract_isis.py
joffilyfe/document-store-migracao
b5125b7aedec56f0e8787900bdfd124aaf65e3e3
[ "BSD-2-Clause" ]
14
2019-03-13T12:19:12.000Z
2019-03-19T17:37:08.000Z
documentstore_migracao/utils/extract_isis.py
joffilyfe/document-store-migracao
b5125b7aedec56f0e8787900bdfd124aaf65e3e3
[ "BSD-2-Clause" ]
3
2019-03-12T18:55:55.000Z
2019-03-20T18:38:02.000Z
import os import logging import shlex import subprocess from documentstore_migracao import config, exceptions logger = logging.getLogger(__name__) ISIS2JSON_PATH = "%s/documentstore_migracao/utils/isis2json/isis2json.py" % ( config.BASE_PATH ) def create_output_dir(path): output_dir = "/".join(path.split("...
27.270833
82
0.652406
import os import logging import shlex import subprocess from documentstore_migracao import config, exceptions logger = logging.getLogger(__name__) ISIS2JSON_PATH = "%s/documentstore_migracao/utils/isis2json/isis2json.py" % ( config.BASE_PATH ) def create_output_dir(path): output_dir = "/".join(path.split("...
true
true
f76bdb751a59c5b09848c5ef2bf37f29b5cfacc6
697
py
Python
tests/parser/syntax/test_as_uint256.py
upgradvisor/vyper
642884ea938a25793c1b2fac866e8458e63a7b49
[ "Apache-2.0" ]
1,471
2017-12-25T05:47:57.000Z
2019-11-19T07:47:53.000Z
tests/parser/syntax/test_as_uint256.py
upgradvisor/vyper
642884ea938a25793c1b2fac866e8458e63a7b49
[ "Apache-2.0" ]
915
2019-11-21T05:48:16.000Z
2022-03-31T23:51:03.000Z
tests/parser/syntax/test_as_uint256.py
upgradvisor/vyper
642884ea938a25793c1b2fac866e8458e63a7b49
[ "Apache-2.0" ]
321
2017-12-25T16:37:21.000Z
2019-11-15T17:44:06.000Z
import pytest from vyper import compiler from vyper.exceptions import InvalidType, TypeMismatch fail_list = [ ( """ @external def convert2(inp: uint256) -> uint256: return convert(inp, bytes32) """, TypeMismatch, ), ( """ @external def modtest(x: uint256, y: int128) -> uint...
16.209302
54
0.595409
import pytest from vyper import compiler from vyper.exceptions import InvalidType, TypeMismatch fail_list = [ ( """ @external def convert2(inp: uint256) -> uint256: return convert(inp, bytes32) """, TypeMismatch, ), ( """ @external def modtest(x: uint256, y: int128) -> uint...
true
true
f76bdb881911df0563ab3fd22a719f0639933cca
2,549
py
Python
python-modules/pybluez/examples/advanced/l2-unreliable-client.py
vlinhd11/vlinhd11-android-scripting
c90f04eb26a3746f025a6a0beab92bb6aa88c084
[ "Apache-2.0" ]
2,293
2015-01-02T12:46:10.000Z
2022-03-29T09:45:43.000Z
python-modules/pybluez/examples/advanced/l2-unreliable-client.py
weiqiangzheng/sl4a
d3c17dca978cbeee545e12ea240a9dbf2a6999e9
[ "Apache-2.0" ]
315
2015-05-31T11:55:46.000Z
2022-01-12T08:36:37.000Z
python-modules/pybluez/examples/advanced/l2-unreliable-client.py
weiqiangzheng/sl4a
d3c17dca978cbeee545e12ea240a9dbf2a6999e9
[ "Apache-2.0" ]
1,033
2015-01-04T07:48:40.000Z
2022-03-24T09:34:37.000Z
import sys import fcntl import struct import array import bluetooth import _bluetooth as bt # low level bluetooth wrappers. def __get_acl_conn_handle(sock, addr): hci_fd = sock.fileno() reqstr = struct.pack( "6sB17s", bt.str2ba(addr), bt.ACL_LINK, "\0" * 17) request = array.array( "c", reqstr ) fcntl...
33.103896
78
0.691251
import sys import fcntl import struct import array import bluetooth import _bluetooth as bt def __get_acl_conn_handle(sock, addr): hci_fd = sock.fileno() reqstr = struct.pack( "6sB17s", bt.str2ba(addr), bt.ACL_LINK, "\0" * 17) request = array.array( "c", reqstr ) fcntl.ioctl( hci_fd, bt.HCIGETCONNINF...
false
true
f76bdbb777ded421617f63697aa5206f02aeb1cc
715
py
Python
savekerala/mainapp/migrations/0007_locality.py
Tomvictor/save-kerala
1e9aed10deb68a9217a00d5efcf3bd4f2af5069c
[ "MIT" ]
2
2018-08-17T14:54:52.000Z
2018-08-18T14:12:51.000Z
savekerala/mainapp/migrations/0007_locality.py
Tomvictor/save-kerala
1e9aed10deb68a9217a00d5efcf3bd4f2af5069c
[ "MIT" ]
3
2018-08-17T15:27:14.000Z
2018-08-18T05:49:25.000Z
savekerala/mainapp/migrations/0007_locality.py
Tomvictor/save-kerala
1e9aed10deb68a9217a00d5efcf3bd4f2af5069c
[ "MIT" ]
1
2018-08-17T14:55:19.000Z
2018-08-17T14:55:19.000Z
# Generated by Django 2.1 on 2018-08-21 07:47 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mainapp', '0006_auto_20180821_1312'), ] operations = [ migrations.CreateModel( name='Locality', fields=[ ...
29.791667
114
0.581818
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mainapp', '0006_auto_20180821_1312'), ] operations = [ migrations.CreateModel( name='Locality', fields=[ ('id', models.AutoField(auto_created=True, ...
true
true
f76bdbbad8c90699e8f3d4d89453a4298c625128
675
py
Python
counsyl_pyads/__init__.py
rako233/rako-pyads
b218d7ac250a396c9e054586e377c5fb65400b2d
[ "MIT" ]
1
2020-05-12T19:15:47.000Z
2020-05-12T19:15:47.000Z
counsyl_pyads/__init__.py
rako233/rako-pyads
b218d7ac250a396c9e054586e377c5fb65400b2d
[ "MIT" ]
null
null
null
counsyl_pyads/__init__.py
rako233/rako-pyads
b218d7ac250a396c9e054586e377c5fb65400b2d
[ "MIT" ]
null
null
null
from .adsclient import AdsClient from .adsconnection import AdsConnection from .adsdatatypes import AdsDatatype from .adsexception import PyadsException from .adsexception import AdsException from .adsexception import PyadsTypeError from .adsstate import AdsState from .adssymbol import AdsSymbol from .amspacket import ...
23.275862
40
0.755556
from .adsclient import AdsClient from .adsconnection import AdsConnection from .adsdatatypes import AdsDatatype from .adsexception import PyadsException from .adsexception import AdsException from .adsexception import PyadsTypeError from .adsstate import AdsState from .adssymbol import AdsSymbol from .amspacket import ...
true
true
f76bdc4c49259d7e1fe145ec29425f34daead99a
8,500
py
Python
socialregistration/views.py
mikeyk/django-socialregistration
11d967779d9a2d4b0e75ecc8738c707485bf0db2
[ "MIT" ]
2
2016-05-18T16:59:26.000Z
2016-09-22T09:13:15.000Z
socialregistration/views.py
mikeyk/django-socialregistration
11d967779d9a2d4b0e75ecc8738c707485bf0db2
[ "MIT" ]
null
null
null
socialregistration/views.py
mikeyk/django-socialregistration
11d967779d9a2d4b0e75ecc8738c707485bf0db2
[ "MIT" ]
null
null
null
""" Created on 22.09.2009 @author: alen """ import uuid from oauth import oauth from django.conf import settings from django.template import RequestContext from django.core.urlresolvers import reverse from django.shortcuts import render_to_response from django.utils.translation import gettext as _ from django.utils.h...
31.135531
96
0.763765
import uuid from oauth import oauth from django.conf import settings from django.template import RequestContext from django.core.urlresolvers import reverse from django.shortcuts import render_to_response from django.utils.translation import gettext as _ from django.utils.hashcompat import md5_constructor from django....
true
true
f76bdc53293370348449f0c204d8a0b535a23791
15,882
py
Python
mmdet/models/detectors/cascade_rcnn.py
WangY0906/mmdetection-for-study
36b6577e3458c0e068f4523d60ce8c6e7c19febf
[ "Apache-2.0" ]
2
2021-10-16T08:31:32.000Z
2022-03-11T04:27:54.000Z
mmdet/models/detectors/cascade_rcnn.py
xyldmc/siamese-mask-rcnn_mmdetection
999e5bfcbd3c493bf69b8556c40eb26c9feeb459
[ "Apache-2.0" ]
3
2021-11-04T20:39:52.000Z
2022-03-10T20:29:47.000Z
mmdet/models/detectors/cascade_rcnn.py
ducminhkhoi/FAPIS
c89703006a2a5250f4d1c71e0aad958d72526885
[ "Apache-2.0" ]
null
null
null
from __future__ import division import torch import torch.nn as nn from .base import BaseDetector from .test_mixins import RPNTestMixin from .. import builder from ..registry import DETECTORS from mmdet.core import (build_assigner, bbox2roi, bbox2result, build_sampler, merge_aug_masks) @DETE...
42.015873
79
0.527389
from __future__ import division import torch import torch.nn as nn from .base import BaseDetector from .test_mixins import RPNTestMixin from .. import builder from ..registry import DETECTORS from mmdet.core import (build_assigner, bbox2roi, bbox2result, build_sampler, merge_aug_masks) @DETE...
true
true
f76bdcf0b7dd18d292bf8beee536c595663042ef
23,611
py
Python
Lib/traceback.py
cseci/python
82d847087557bcca866dbf6398f1c156e9ff5d3a
[ "0BSD" ]
2,441
2020-07-31T06:45:53.000Z
2022-03-30T15:56:49.000Z
Lib/traceback.py
cseci/python
82d847087557bcca866dbf6398f1c156e9ff5d3a
[ "0BSD" ]
238
2020-10-21T04:54:00.000Z
2022-03-31T21:49:03.000Z
Lib/traceback.py
cseci/python
82d847087557bcca866dbf6398f1c156e9ff5d3a
[ "0BSD" ]
93
2020-08-09T12:00:17.000Z
2022-03-25T07:57:24.000Z
"""Extract, format and print information about Python stack traces.""" import collections import itertools import linecache import sys __all__ = ['extract_stack', 'extract_tb', 'format_exception', 'format_exception_only', 'format_list', 'format_stack', 'format_tb', 'print_exc', 'format_exc', 'pr...
38.205502
87
0.635805
import collections import itertools import linecache import sys __all__ = ['extract_stack', 'extract_tb', 'format_exception', 'format_exception_only', 'format_list', 'format_stack', 'format_tb', 'print_exc', 'format_exc', 'print_exception', 'print_last', 'print_stack', 'print_tb', 'cl...
true
true
f76bddf61fc40ee884d0b30d8037daf44fd5adb0
902
py
Python
multiclass_classification/cost.py
KevinKronk/multiclass-classification
8a938e5dd3418caad24118f75fa11f2aab856b2f
[ "MIT" ]
null
null
null
multiclass_classification/cost.py
KevinKronk/multiclass-classification
8a938e5dd3418caad24118f75fa11f2aab856b2f
[ "MIT" ]
null
null
null
multiclass_classification/cost.py
KevinKronk/multiclass-classification
8a938e5dd3418caad24118f75fa11f2aab856b2f
[ "MIT" ]
null
null
null
import numpy as np from scipy.special import expit def log_cost(theta, x, y_i, hyper_p): """ Logistic regression cost function with regularization. Parameters ---------- theta : array_like Shape (n+1,). Parameter values for function. x : array_like ...
23.128205
69
0.542129
import numpy as np from scipy.special import expit def log_cost(theta, x, y_i, hyper_p): size = y_i.size h = expit(x @ theta.T) first = -y_i * np.log(h) second = -(1 - y_i) * np.log(1 - h) reg = (hyper_p / (2 * size)) * np.sum(np.power(theta, 2)) cost = (np.sum(first + second) / size) + re...
true
true
f76bde5401fb897155e8b8ea94255b137ff4c549
8,139
py
Python
crudbuilder/views.py
xlfds/django-crudbuilder
dd491ae4802a54802d41e62444fa8fab93be1670
[ "Apache-2.0" ]
186
2015-10-28T12:32:31.000Z
2022-03-24T18:39:15.000Z
crudbuilder/views.py
xlfds/django-crudbuilder
dd491ae4802a54802d41e62444fa8fab93be1670
[ "Apache-2.0" ]
72
2016-01-28T09:25:50.000Z
2021-11-24T03:58:59.000Z
crudbuilder/views.py
xlfds/django-crudbuilder
dd491ae4802a54802d41e62444fa8fab93be1670
[ "Apache-2.0" ]
73
2015-11-08T21:46:06.000Z
2022-03-24T10:11:50.000Z
from django.forms.models import modelform_factory from django.views.generic import ( DetailView, CreateView, UpdateView, DeleteView, TemplateView ) from django_tables2 import SingleTableView from crudbuilder.registry import registry from crudbuilder.mixins import ( CrudBuilderMixin, BaseLis...
34.782051
93
0.660032
from django.forms.models import modelform_factory from django.views.generic import ( DetailView, CreateView, UpdateView, DeleteView, TemplateView ) from django_tables2 import SingleTableView from crudbuilder.registry import registry from crudbuilder.mixins import ( CrudBuilderMixin, BaseLis...
true
true
f76bdeefcb27085f458341953d2c0f7da4455793
2,649
py
Python
GameEnvs/ConnectFour/generateData.py
Swapnil8991/RLonASG
d040fb5ac4431198b92544958d70924d5bec92ff
[ "MIT" ]
null
null
null
GameEnvs/ConnectFour/generateData.py
Swapnil8991/RLonASG
d040fb5ac4431198b92544958d70924d5bec92ff
[ "MIT" ]
null
null
null
GameEnvs/ConnectFour/generateData.py
Swapnil8991/RLonASG
d040fb5ac4431198b92544958d70924d5bec92ff
[ "MIT" ]
null
null
null
import numpy as np from C4Board import C4Board from random import seed, choice from os import urandom from time import time from itertools import cycle from sys import argv def getTrainingData(noOfGames, dataGenFlag, inpTrainFile, outTrainFile): turnFlag = 0 gameEndState = 0 tempOutTrainList = [] # stores exp...
29.433333
91
0.648924
import numpy as np from C4Board import C4Board from random import seed, choice from os import urandom from time import time from itertools import cycle from sys import argv def getTrainingData(noOfGames, dataGenFlag, inpTrainFile, outTrainFile): turnFlag = 0 gameEndState = 0 tempOutTrainList = [] boardStates...
true
true
f76be0380498ab9f0098bea80fa02969fa515b9f
38,404
py
Python
lib/sqlalchemy/orm/util.py
everilae/sqlalchemy
4856493efc1f6b7fdecf36e020a95636f600a626
[ "MIT" ]
1
2018-03-31T09:34:25.000Z
2018-03-31T09:34:25.000Z
lib/sqlalchemy/orm/util.py
everilae/sqlalchemy
4856493efc1f6b7fdecf36e020a95636f600a626
[ "MIT" ]
null
null
null
lib/sqlalchemy/orm/util.py
everilae/sqlalchemy
4856493efc1f6b7fdecf36e020a95636f600a626
[ "MIT" ]
null
null
null
# orm/util.py # Copyright (C) 2005-2016 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from .. import sql, util, event, exc as sa_exc, inspection from ..sql import expression...
36.645038
79
0.632538
from .. import sql, util, event, exc as sa_exc, inspection from ..sql import expression, util as sql_util, operators from .interfaces import PropComparator, MapperProperty from . import attributes import re from .base import instance_str, state_str, state_class_str, attribute_str, \ state_attribute_str, object_m...
true
true
f76be06de04fa45fdde0742bfb8e229cc29ca67f
2,961
py
Python
tests/test_jwt.py
rmedaer/libapache2-mod-authnz-jwt
3b795fac41e0ad2128bf828a727b6fdc0a48f361
[ "Apache-2.0" ]
null
null
null
tests/test_jwt.py
rmedaer/libapache2-mod-authnz-jwt
3b795fac41e0ad2128bf828a727b6fdc0a48f361
[ "Apache-2.0" ]
null
null
null
tests/test_jwt.py
rmedaer/libapache2-mod-authnz-jwt
3b795fac41e0ad2128bf828a727b6fdc0a48f361
[ "Apache-2.0" ]
null
null
null
import unittest import requests import jwt import json import sys from contextlib import contextmanager from functools import wraps class TestJWT(unittest.TestCase): HMAC_SECURED_URL = "http://testjwt.local/hmac_secured" RSA_SECURED_URL = "http://testjwt.local/rsa_secured" EC_SECURED_URL = "http://testjwt...
36.109756
98
0.571766
import unittest import requests import jwt import json import sys from contextlib import contextmanager from functools import wraps class TestJWT(unittest.TestCase): HMAC_SECURED_URL = "http://testjwt.local/hmac_secured" RSA_SECURED_URL = "http://testjwt.local/rsa_secured" EC_SECURED_URL = "http://testjwt...
true
true
f76be0db2aa37ec9d0599cb2bf4f9e67b51a2878
1,375
py
Python
Download_pdf.py
andre8oli/MBA_PEIs
ac4c592ab0c2b2c4904afe5dd9b7a242616d2ab3
[ "MIT" ]
null
null
null
Download_pdf.py
andre8oli/MBA_PEIs
ac4c592ab0c2b2c4904afe5dd9b7a242616d2ab3
[ "MIT" ]
null
null
null
Download_pdf.py
andre8oli/MBA_PEIs
ac4c592ab0c2b2c4904afe5dd9b7a242616d2ab3
[ "MIT" ]
null
null
null
import os import requests as rt from pathlib import Path """ Recebe ano como inteiro e COD_ESC como string para determinar o endereço do arquivo e definição do nome para ser salvo. Retorna o nome do arquivo. """ def download_pdf(ano, COD_ESC): ano = str(ano) url = 'http://idesp.edunet.sp.gov.br...
28.061224
79
0.565818
import os import requests as rt from pathlib import Path def download_pdf(ano, COD_ESC): ano = str(ano) url = 'http://idesp.edunet.sp.gov.br/arquivos'+ano + '/'+COD_ESC+'.pdf' end_pdf = ano + '_' + COD_ESC + '.pdf' response = rt.get(url) filename = Path(end_pdf) filename.write_b...
true
true
f76be0dc3bb36fc3b5d2610ce56b37b4d8873c07
29,328
py
Python
src/sage/repl/rich_output/display_manager.py
Blues1998/sage
b5c9cf037cbce672101725f269470135b9b2c5c4
[ "BSL-1.0" ]
null
null
null
src/sage/repl/rich_output/display_manager.py
Blues1998/sage
b5c9cf037cbce672101725f269470135b9b2c5c4
[ "BSL-1.0" ]
null
null
null
src/sage/repl/rich_output/display_manager.py
Blues1998/sage
b5c9cf037cbce672101725f269470135b9b2c5c4
[ "BSL-1.0" ]
null
null
null
# -*- encoding: utf-8 -*- r""" Display Manager This is the heart of the rich output system, the display manager arbitrates between * Backend capabilities: what can be displayed * Backend preferences: what gives good quality on the backend * Sage capabilities: every Sage object can only generate certain representa...
34.914286
109
0.623397
import warnings from sage.structure.sage_object import SageObject from sage.repl.rich_output.output_basic import ( OutputPlainText, OutputAsciiArt, OutputUnicodeArt, OutputLatex, ) from sage.repl.rich_output.preferences import DisplayPreferences class DisplayException(Exception): pass class OutputTypeEx...
true
true