hexsha
stringlengths
40
40
size
int64
3
1.03M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
972
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
78
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
3
972
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
⌀
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
3
972
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
78
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
3
1.03M
avg_line_length
float64
1.13
941k
max_line_length
int64
2
941k
alphanum_fraction
float64
0
1
e4c6e091a5e20c2729b93315fc91dba947b11aa0
2,884
py
Python
examples/pygame-button-interrupt.py
pimoroni/displayhatmini-python
f72246fd6be8ce850da4590a1de66547e8165b4b
[ "MIT" ]
6
2021-10-31T21:29:25.000Z
2022-01-12T05:38:00.000Z
examples/pygame-button-interrupt.py
pimoroni/displayhatmini-python
f72246fd6be8ce850da4590a1de66547e8165b4b
[ "MIT" ]
9
2021-11-08T12:15:58.000Z
2022-02-15T18:13:03.000Z
examples/pygame-button-interrupt.py
pimoroni/displayhatmini-python
f72246fd6be8ce850da4590a1de66547e8165b4b
[ "MIT" ]
1
2021-12-23T22:02:19.000Z
2021-12-23T22:02:19.000Z
#!/usr/bin/env python3 import os import sys import signal import pygame import time import math from threading import Lock from displayhatmini import DisplayHATMini print("""Display HAT Mini: Basic Pygame Demo""") if pygame.vernum < (2, 0, 0): print("Need PyGame >= 2.0.0:\n python3 -m pip install pygame --up...
28.27451
91
0.648752
f69f004a7d5a61c8f9e0c32ca344c4b266469aa0
1,006
py
Python
python/web_server.py
VanKichline/IoTtools
24296437d8d7432fda0095a8c23291025132f43c
[ "MIT" ]
null
null
null
python/web_server.py
VanKichline/IoTtools
24296437d8d7432fda0095a8c23291025132f43c
[ "MIT" ]
null
null
null
python/web_server.py
VanKichline/IoTtools
24296437d8d7432fda0095a8c23291025132f43c
[ "MIT" ]
null
null
null
#!/usr/bin/python # Based on: # http://www.acmesystems.it/python_httpd # https://pymotw.com/2/BaseHTTPServer/ from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer import urlparse PORT_NUMBER = 5050 class reqHandler(BaseHTTPRequestHandler): def do_GET(self): parsed_path = urlparse.urlparse(self.path) q ...
24.536585
63
0.754473
c8174707ad83e1dd645d560c322a60ae624ad8d7
1,780
py
Python
check_mk_web_api/web_api_contactgroups.py
robert-r-meyer/check-mk-web-api
59cc2cd78c542b7997b4c2eb42becf194a0ade57
[ "MIT" ]
null
null
null
check_mk_web_api/web_api_contactgroups.py
robert-r-meyer/check-mk-web-api
59cc2cd78c542b7997b4c2eb42becf194a0ade57
[ "MIT" ]
1
2019-03-26T16:48:49.000Z
2019-03-26T16:48:49.000Z
check_mk_web_api/web_api_contactgroups.py
robert-r-meyer/check-mk-web-api
59cc2cd78c542b7997b4c2eb42becf194a0ade57
[ "MIT" ]
1
2019-05-24T14:17:11.000Z
2019-05-24T14:17:11.000Z
from check_mk_web_api.no_none_value_dict import NoNoneValueDict from check_mk_web_api.web_api_base import WebApiBase class WebApiContactGroups(WebApiBase): def get_contactgroup(self, group): """ Gets one contact group # Arguments group (str): name of contact group to get ...
24.054054
66
0.580899
4b9d7fe36ffa82b4c92d7a551578c471a6539b80
878
py
Python
dataent/patches/v4_0/website_sitemap_hierarchy.py
dataent/dataent
c41bd5942ffe5513f4d921c4c0595c84bbc422b4
[ "MIT" ]
null
null
null
dataent/patches/v4_0/website_sitemap_hierarchy.py
dataent/dataent
c41bd5942ffe5513f4d921c4c0595c84bbc422b4
[ "MIT" ]
6
2020-03-24T17:15:56.000Z
2022-02-10T18:41:31.000Z
dataent/patches/v4_0/website_sitemap_hierarchy.py
dataent/dataent
c41bd5942ffe5513f4d921c4c0595c84bbc422b4
[ "MIT" ]
null
null
null
# Copyright (c) 2015, Dataent Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import dataent def execute(): # dataent.db.sql("""update `tabWebsite Route` ws set ref_doctype=(select wsc.ref_doctype # from `tabWebsite Template` wsc where wsc.name=ws.web...
39.909091
97
0.741458
9225c0e33d64915ae6b288c720bb9add7162bc4a
1,233
py
Python
scripts/dataset_single.py
albert-yue/objectnav
95ce9bc2c1d953887275e8d9809a506aeb5682fb
[ "MIT", "Unlicense" ]
15
2021-04-12T04:36:14.000Z
2022-03-20T04:16:36.000Z
scripts/dataset_single.py
albert-yue/objectnav
95ce9bc2c1d953887275e8d9809a506aeb5682fb
[ "MIT", "Unlicense" ]
4
2021-07-12T18:14:08.000Z
2021-11-11T13:44:34.000Z
scripts/dataset_single.py
albert-yue/objectnav
95ce9bc2c1d953887275e8d9809a506aeb5682fb
[ "MIT", "Unlicense" ]
10
2021-06-23T23:14:16.000Z
2022-03-20T07:47:32.000Z
#%% # Extract single episodes into new datasets from pathlib import Path import shutil import gzip import json import numpy as np root_dir = Path('/srv/share/datasets/objectnav/mp3d/v1') seed = 0 np.random.seed(seed) split = 'val' # source new_key = 'test' source = root_dir.joinpath(split) target = root_dir.joinpath(...
30.073171
89
0.690187
3f1e14dcf3dc692bcdccbdb3bc59dc5d688d1b3c
1,887
py
Python
ca_qc_gatineau/people.py
dogooderapp/scrapers-ca
5e852eea93f05f3f397eec318d3094a3b1b0b458
[ "MIT" ]
19
2015-05-26T03:18:50.000Z
2022-01-31T03:27:41.000Z
ca_qc_gatineau/people.py
dogooderapp/scrapers-ca
5e852eea93f05f3f397eec318d3094a3b1b0b458
[ "MIT" ]
119
2015-01-09T06:09:35.000Z
2022-01-20T23:05:05.000Z
ca_qc_gatineau/people.py
dogooderapp/scrapers-ca
5e852eea93f05f3f397eec318d3094a3b1b0b458
[ "MIT" ]
17
2015-11-23T05:00:10.000Z
2021-09-15T16:03:33.000Z
from utils import CanadianScraper, CanadianPerson as Person import re COUNCIL_PAGE = 'http://www.gatineau.ca/portail/default.aspx?p=guichet_municipal%2fconseil_municipal' MAYOR_CONTACT_PAGE = 'http://www.gatineau.ca/portail/default.aspx?p=la_ville/conseil_municipal/maire' class GatineauPersonScraper(CanadianScraper...
43.883721
114
0.627451
bfccccfb2be5ae1c96a1ead8908c44fef18931fe
9,822
py
Python
Public/BasePage.py
sdwfclcyk1/AutoTestCase
63a6a6a4acf2a9dc572bd917b186638eae65aee7
[ "MIT" ]
1
2018-09-28T11:35:07.000Z
2018-09-28T11:35:07.000Z
Public/BasePage.py
sdwfclcyk1/AutoTestCase
63a6a6a4acf2a9dc572bd917b186638eae65aee7
[ "MIT" ]
null
null
null
Public/BasePage.py
sdwfclcyk1/AutoTestCase
63a6a6a4acf2a9dc572bd917b186638eae65aee7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import time import uiautomator2 as u2 from uiautomator2 import UiObjectNotFoundError import re from Public.chromedriver import ChromeDriver from Public.Ports import Ports from Public.ReportPath import ReportPath import warnings # u2.DEBUG = True class BasePage(object): @classm...
34.953737
119
0.557829
5d28200350f927f4d41ac84d4e9a86b120a98977
3,913
py
Python
accounts/views.py
loafbaker/-django_ecommerce1-
363c06c4b4dd90a4d1880a6be012bb19e68297f1
[ "MIT" ]
null
null
null
accounts/views.py
loafbaker/-django_ecommerce1-
363c06c4b4dd90a4d1880a6be012bb19e68297f1
[ "MIT" ]
null
null
null
accounts/views.py
loafbaker/-django_ecommerce1-
363c06c4b4dd90a4d1880a6be012bb19e68297f1
[ "MIT" ]
null
null
null
from django.shortcuts import render, HttpResponseRedirect, Http404 from django.contrib.auth import logout, login, authenticate from django.contrib import messages from django.core.urlresolvers import reverse import re # Create your views here. from .forms import LoginForm, RegistrationForm, UserAddressForm from .model...
34.9375
145
0.648096
1ee408c9c2df4caf1dc1fbde0fdd49a933e2e5c3
4,872
py
Python
src/markdoc/config.py
lrem/markdoc
2d10c3cf51fa22b6dbb235f037652ff124ccb777
[ "Unlicense" ]
1
2015-04-12T11:34:55.000Z
2015-04-12T11:34:55.000Z
src/markdoc/config.py
lrem/markdoc
2d10c3cf51fa22b6dbb235f037652ff124ccb777
[ "Unlicense" ]
null
null
null
src/markdoc/config.py
lrem/markdoc
2d10c3cf51fa22b6dbb235f037652ff124ccb777
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- """Utilities for working with Markdoc configurations.""" import copy import os import os.path as p import yaml import markdoc.exc class ConfigNotFound(markdoc.exc.AbortError): """The configuration file was not found.""" pass class ConfigMeta(type): def __new__(mcls, name, ba...
29.527273
92
0.536535
6527a23ec4168bfc76939ae1d8cf9669fafd04da
8,071
py
Python
adni_eivind.py
EivindArvesen/master_code
b32d62356866daa9011598a6cf1e4740cb60df3c
[ "BSD-3-Clause" ]
2
2020-11-15T07:23:56.000Z
2021-06-21T14:11:34.000Z
adni_eivind.py
EivindArvesen/master_code
b32d62356866daa9011598a6cf1e4740cb60df3c
[ "BSD-3-Clause" ]
null
null
null
adni_eivind.py
EivindArvesen/master_code
b32d62356866daa9011598a6cf1e4740cb60df3c
[ "BSD-3-Clause" ]
3
2017-07-10T20:38:05.000Z
2018-04-22T01:55:12.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Dataset-class for using custom preprocessed ADNI MRI dataset with Pylearn2. A simple general csv dataset wrapper for pylearn2. Can do automatic one-hot encoding based on labels present in a file. Based upon work from Zygmunt Zajac's (zygmunt@fastml.com) CSVDataset clas...
32.155378
103
0.55272
90af8fa64dea974b35199c87dadfef8fcc093e7a
119
py
Python
project/uploads/admin.py
eugenefauntleroy/corgfinal
a2d6f4958d83198ed785fc83da0e9921096de3e1
[ "Apache-2.0" ]
null
null
null
project/uploads/admin.py
eugenefauntleroy/corgfinal
a2d6f4958d83198ed785fc83da0e9921096de3e1
[ "Apache-2.0" ]
null
null
null
project/uploads/admin.py
eugenefauntleroy/corgfinal
a2d6f4958d83198ed785fc83da0e9921096de3e1
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin from .models import Upload # Register your models here. admin.site.register(Upload)
19.833333
32
0.798319
b67614c6f0b5be1add93bdf08b50bdee6905d05c
683
py
Python
HW1/hw1p2b_regular.py
JJCSPR/isye4133
61b2bf48a72b6609a9254bf4fd7673474ee7f629
[ "MIT" ]
1
2019-09-29T20:07:33.000Z
2019-09-29T20:07:33.000Z
HW1/hw1p2b_regular.py
JJCSPR/linearprogamming
61b2bf48a72b6609a9254bf4fd7673474ee7f629
[ "MIT" ]
null
null
null
HW1/hw1p2b_regular.py
JJCSPR/linearprogamming
61b2bf48a72b6609a9254bf4fd7673474ee7f629
[ "MIT" ]
null
null
null
from gurobipy import * try: # Create my model m = Model('hw1a1b_regular') # Create my variables x1 = m.addVar(name="x1",lb = -GRB.INFINITY, ub = 0.0) x2 = m.addVar(name="x2",lb = 0.0) # Set an objective function m.setObjective(x1-x2, GRB.MAXIMIZE) # Add regular constraints m.add...
21.34375
57
0.592972
bc9b11b30d57c104653418148fe339ac1585f367
4,408
py
Python
pmdas/http_ping/pmdahttp_ping.py
fahlmant/openshift-tools
dbb4f16ccde3404c36c23108c45ca7b67138ee12
[ "Apache-2.0" ]
164
2015-07-29T17:35:04.000Z
2021-12-16T16:38:04.000Z
pmdas/http_ping/pmdahttp_ping.py
fahlmant/openshift-tools
dbb4f16ccde3404c36c23108c45ca7b67138ee12
[ "Apache-2.0" ]
3,634
2015-06-09T13:49:15.000Z
2022-03-23T20:55:44.000Z
pmdas/http_ping/pmdahttp_ping.py
fahlmant/openshift-tools
dbb4f16ccde3404c36c23108c45ca7b67138ee12
[ "Apache-2.0" ]
250
2015-06-08T19:53:11.000Z
2022-03-01T04:51:23.000Z
#!/usr/bin/env python2 ''' Performance Metrics Domain Agent exporting an http status code ''' # # Copyright (c) 2014-2015 Red Hat. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either versio...
33.907692
76
0.618875
ace6beed04aa6ed61ba1882b84115667be208e3a
1,789
py
Python
tests/test_action.py
branasingh/stackstorm-servicenow
0e659d493dde4563ddbb49408dffefe6d8e8e00e
[ "Apache-2.0" ]
12
2017-12-18T02:44:13.000Z
2020-09-10T16:44:45.000Z
tests/test_action.py
branasingh/stackstorm-servicenow
0e659d493dde4563ddbb49408dffefe6d8e8e00e
[ "Apache-2.0" ]
12
2017-03-29T19:49:18.000Z
2022-03-23T14:34:33.000Z
tests/test_action.py
branasingh/stackstorm-servicenow
0e659d493dde4563ddbb49408dffefe6d8e8e00e
[ "Apache-2.0" ]
20
2017-03-29T15:38:23.000Z
2022-01-24T19:53:03.000Z
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
35.78
78
0.727781
a9c747e681490e48d43a2c8047e1cf40c5ac62bf
1,057
py
Python
BinarySearchProbs/NoOfSubSequenceSatisfySum.py
Saicharan67/Interview-Coding-Questions
b28cccd41e380f15b833039d687931570908adfb
[ "MIT" ]
12
2021-06-18T16:24:27.000Z
2021-11-04T03:30:00.000Z
BinarySearchProbs/NoOfSubSequenceSatisfySum.py
Saicharan67/Interview-Coding-Questions
b28cccd41e380f15b833039d687931570908adfb
[ "MIT" ]
32
2021-10-01T07:15:00.000Z
2021-11-05T15:35:53.000Z
BinarySearchProbs/NoOfSubSequenceSatisfySum.py
Saicharan67/Interview-Coding-Questions
b28cccd41e380f15b833039d687931570908adfb
[ "MIT" ]
21
2021-09-29T09:16:31.000Z
2021-10-30T10:06:21.000Z
''' Given an array of integers nums and an integer target. Return the number of non-empty subsequences of nums such that the sum of the minimum and maximum element on it is less or equal to target. Since the answer may be too large, return it modulo 109 + 7. Example 1: Input: nums = [3,5,6,7], target = 9 Output: ...
26.425
199
0.545885
455ad371bc21d8768a2501e4ede3040378a61ed6
5,189
py
Python
network/base_model.py
ma3252788/detection_template
0079e8e40c59c1b0c9b868e9a361bd0cc232a583
[ "MIT" ]
3
2021-06-20T03:35:04.000Z
2021-07-18T14:13:14.000Z
network/base_model.py
ma3252788/detection_template
0079e8e40c59c1b0c9b868e9a361bd0cc232a583
[ "MIT" ]
null
null
null
network/base_model.py
ma3252788/detection_template
0079e8e40c59c1b0c9b868e9a361bd0cc232a583
[ "MIT" ]
null
null
null
import os from abc import abstractmethod import cv2 import torch import warnings import sys import ipdb from utils.eval_metrics.eval_map import eval_detection_voc from misc_utils import color_print, progress_bar from options import opt import misc_utils as utils import numpy as np from mscv import load_checkpoint, sa...
32.841772
128
0.546348
93d16a6b11592eaacdb7192f105dd1fed7b101b4
1,724
py
Python
azure-keyvault/azure/keyvault/models/storage_account_item.py
v-Ajnava/azure-sdk-for-python
a1f6f80eb5869c5b710e8bfb66146546697e2a6f
[ "MIT" ]
4
2016-06-17T23:25:29.000Z
2022-03-30T22:37:45.000Z
azure/keyvault/models/storage_account_item.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
54
2016-03-25T17:25:01.000Z
2018-10-22T17:27:54.000Z
azure/keyvault/models/storage_account_item.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "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. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
33.803922
80
0.596868
4d552ce1dbf95959d80071a9295538dbe2e12b1e
168
py
Python
tools/py/resource.py
zepheira/versa
a33558c8bcff11eed0ef212fe9ec7e3d97047732
[ "Apache-2.0" ]
7
2015-03-12T19:13:34.000Z
2021-07-31T10:10:46.000Z
tools/py/resource.py
zepheira/versa
a33558c8bcff11eed0ef212fe9ec7e3d97047732
[ "Apache-2.0" ]
14
2019-04-18T16:26:55.000Z
2022-03-31T16:58:46.000Z
tools/py/resource.py
zepheira/versa
a33558c8bcff11eed0ef212fe9ec7e3d97047732
[ "Apache-2.0" ]
2
2015-11-09T04:14:10.000Z
2019-07-24T06:03:36.000Z
#versa.resource ''' Utilities for creating, managing, etc. resources Recommended to use bibframe.util.resource_id from pybibframe for creating new resource IDs '''
16.8
90
0.779762
e549e534f615fceb5ee89931a6f1aa7a05f9a9f0
3,890
py
Python
powerline/segments/common/vcs.py
PH111P/powerline
f8dfe7e7e3d021cd66bc0e19b19ea4a51949cb9a
[ "MIT" ]
23
2016-12-16T09:03:18.000Z
2022-02-25T19:19:23.000Z
powerline/segments/common/vcs.py
PH111P/powerline
f8dfe7e7e3d021cd66bc0e19b19ea4a51949cb9a
[ "MIT" ]
30
2016-12-20T11:11:42.000Z
2019-11-19T15:23:59.000Z
powerline/segments/common/vcs.py
PH111P/powerline
f8dfe7e7e3d021cd66bc0e19b19ea4a51949cb9a
[ "MIT" ]
4
2016-12-11T18:29:11.000Z
2018-04-22T07:51:28.000Z
from powerline.lib.vcs import guess, tree_status from powerline.segments import Segment, with_docstring from powerline.theme import requires_segment_info, requires_filesystem_watcher @requires_filesystem_watcher @requires_segment_info class VCSInfoSegment(Segment): divider_highlight_group = None @staticmetho...
37.403846
112
0.622365
fd64b49d13097c50d188b3cc4d4cabc80dcad5f8
53,639
py
Python
django/template/defaulttags.py
jedie/django
09f2cdbe1a43e79e31f5ea509b59d4c87db29832
[ "BSD-3-Clause" ]
null
null
null
django/template/defaulttags.py
jedie/django
09f2cdbe1a43e79e31f5ea509b59d4c87db29832
[ "BSD-3-Clause" ]
null
null
null
django/template/defaulttags.py
jedie/django
09f2cdbe1a43e79e31f5ea509b59d4c87db29832
[ "BSD-3-Clause" ]
null
null
null
"""Default tags used by the template system, available to all templates.""" from __future__ import unicode_literals import os import re import sys import warnings from datetime import datetime from itertools import cycle as itertools_cycle, groupby from django.conf import settings from django.utils import six, timezo...
33.970234
119
0.589049
cf908545b0d8884f7397cc51123566826cb1b460
51,648
py
Python
packages/python/plotly/plotly/graph_objs/box/__init__.py
sgn/plotly.py
587075c9f5a57a3dd60b03b2d47d925fbbb9b9b6
[ "MIT" ]
3
2020-02-04T21:39:20.000Z
2020-11-17T19:07:07.000Z
packages/python/plotly/plotly/graph_objs/box/__init__.py
sgn/plotly.py
587075c9f5a57a3dd60b03b2d47d925fbbb9b9b6
[ "MIT" ]
12
2020-06-06T01:22:26.000Z
2022-03-12T00:13:42.000Z
packages/python/plotly/plotly/graph_objs/box/__init__.py
sgn/plotly.py
587075c9f5a57a3dd60b03b2d47d925fbbb9b9b6
[ "MIT" ]
17
2019-11-21T14:11:29.000Z
2019-11-21T15:26:23.000Z
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Unselected(_BaseTraceHierarchyType): # marker # ------ @property def marker(self): """ The 'marker' property is an instance of Marker that may be specified as: ...
35.375342
85
0.55127
66eca1cf3c3166e2393f2fa4d8e9a984e3ee8e5d
2,422
py
Python
saw-remote-api/python/tests/saw/test_llvm_struct.py
Grain/saw-script
81287fb74cbdac3bb3f75b984f1125deb3055e64
[ "BSD-3-Clause" ]
null
null
null
saw-remote-api/python/tests/saw/test_llvm_struct.py
Grain/saw-script
81287fb74cbdac3bb3f75b984f1125deb3055e64
[ "BSD-3-Clause" ]
null
null
null
saw-remote-api/python/tests/saw/test_llvm_struct.py
Grain/saw-script
81287fb74cbdac3bb3f75b984f1125deb3055e64
[ "BSD-3-Clause" ]
null
null
null
from pathlib import Path import unittest from saw_client import * from saw_client.crucible import cry, cry_f from saw_client.llvm import Contract, SetupVal, FreshVar, struct, LLVMType, void, array_ty, i32, alias_ty def ptr_to_fresh(c : Contract, ty : LLVMType, name : Optional[str] = None) -> Tuple[FreshVar, SetupVal]...
35.101449
112
0.651115
aaadb9546d2068757d56b0050ecec81bb1f1b7ea
23,707
py
Python
provisioning/miniprov/test/test_cdf.py
ivan-alekhin/cortx-hare
db542ee8b07fc1683a22088e34102763bd7b55a3
[ "Apache-2.0" ]
null
null
null
provisioning/miniprov/test/test_cdf.py
ivan-alekhin/cortx-hare
db542ee8b07fc1683a22088e34102763bd7b55a3
[ "Apache-2.0" ]
null
null
null
provisioning/miniprov/test/test_cdf.py
ivan-alekhin/cortx-hare
db542ee8b07fc1683a22088e34102763bd7b55a3
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020 Seagate Technology LLC and/or its Affiliates # # 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 appl...
42.638489
110
0.548572
06da14e4fa9c2815de7e4eeeab688b2b2193b026
210
py
Python
findpair.py
quake0day/oj
c09333d1738f8735de0d5d825db6f4b707585670
[ "MIT" ]
null
null
null
findpair.py
quake0day/oj
c09333d1738f8735de0d5d825db6f4b707585670
[ "MIT" ]
null
null
null
findpair.py
quake0day/oj
c09333d1738f8735de0d5d825db6f4b707585670
[ "MIT" ]
null
null
null
s = [1,5, 10, 100] p = [6, 11, 101, 15, 105, 110] def myPair(p, m): s = [0] * m s[0] = (p[0] + p[1] - p[m-1]) / 2 for i in xrange(m-1): s[i+1] = p[i] - s[0] return s print myPair(p, 4)
21
37
0.419048
8d91ec3d3b5063bbea9536545fea23849077eb49
1,772
py
Python
extracting-frames-from-video/extract_frames.py
m0rphed/comp-vis-notes
32a934e97b1084b9886c3703c91566df26eb4ef2
[ "MIT" ]
null
null
null
extracting-frames-from-video/extract_frames.py
m0rphed/comp-vis-notes
32a934e97b1084b9886c3703c91566df26eb4ef2
[ "MIT" ]
3
2019-07-16T18:45:28.000Z
2019-07-25T17:38:47.000Z
extracting-frames-from-video/extract_frames.py
m0rphed/comp-vis-notes
32a934e97b1084b9886c3703c91566df26eb4ef2
[ "MIT" ]
null
null
null
import cv2 from enum import Enum from extracting_by_timecode import extract_frames_by_timecodes from extracting_by_number import extract_frames_by_number from extracting_by_range import extract_frames_by_ranges from extracting_by_range_and_number import extract_frames_by_ranges_and_number class ExtractingFramesType(E...
32.814815
107
0.715576
415ac3f037304c55ddadb730cf56337a6282dd91
6,132
py
Python
2D/Pumping/VAEjacob.py
AnyueJ/VAE_Robustness
c457932a46f8e4e34767fc621bfe5fdec43e37a6
[ "MIT" ]
2
2021-02-26T20:02:33.000Z
2021-11-18T03:24:46.000Z
2D/Pumping/VAEjacob.py
AnyueJ/VAE_Robustness
c457932a46f8e4e34767fc621bfe5fdec43e37a6
[ "MIT" ]
null
null
null
2D/Pumping/VAEjacob.py
AnyueJ/VAE_Robustness
c457932a46f8e4e34767fc621bfe5fdec43e37a6
[ "MIT" ]
null
null
null
import tensorflow as tf import scipy.io as sio import numpy as np import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt import time from matplotlib import pyplot as mp from tensorflow.contrib.slim import fully_connected as fc from tensorflow.python.ops.parallel_for.gradients import jacobian input_di...
40.88
111
0.607795
c6f5fd29d4899c749258d1a94ff3c65723e020aa
1,373
py
Python
egs2/jsut/tts1/local/prep_segments.py
texpomru13/espnet
7ef005e832e2fb033f356c16f54e0f08762fb4b0
[ "Apache-2.0" ]
5,053
2017-12-13T06:21:41.000Z
2022-03-31T13:38:29.000Z
egs2/jsut/tts1/local/prep_segments.py
texpomru13/espnet
7ef005e832e2fb033f356c16f54e0f08762fb4b0
[ "Apache-2.0" ]
3,666
2017-12-14T05:58:50.000Z
2022-03-31T22:11:49.000Z
egs2/jsut/tts1/local/prep_segments.py
texpomru13/espnet
7ef005e832e2fb033f356c16f54e0f08762fb4b0
[ "Apache-2.0" ]
1,709
2017-12-13T01:02:42.000Z
2022-03-31T11:57:45.000Z
#!/usr/bin/env python3 # Copyright 2019 Ryuichi Yamamoto # Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import argparse import os import sys from nnmnkwii.io import hts def get_parser(): parser = argparse.ArgumentParser( description="Prepare segments from HTS-style alignment files", ...
31.204545
88
0.600874
146c7b1c166166856f0cd410d7021c94d438e332
24,437
py
Python
google/cloud/ndb/_gql.py
sandboxxapp/python-ndb
8d3ce5c6cce9055d21400aa9feebc99e66393667
[ "Apache-2.0" ]
null
null
null
google/cloud/ndb/_gql.py
sandboxxapp/python-ndb
8d3ce5c6cce9055d21400aa9feebc99e66393667
[ "Apache-2.0" ]
null
null
null
google/cloud/ndb/_gql.py
sandboxxapp/python-ndb
8d3ce5c6cce9055d21400aa9feebc99e66393667
[ "Apache-2.0" ]
null
null
null
import re from google.cloud.ndb import exceptions from google.cloud.ndb import query as query_module from google.cloud.ndb import model from google.cloud.ndb import _datastore_query class GQL(object): """A GQL parser for NDB queries. GQL is a SQL-like language which supports more object-like semantics i...
31.943791
83
0.560257
40eab4cb392e6ff280b3eb5595eed5579afe487f
1,683
py
Python
LSTM/model.py
ehsangolshani/workload-predictor
517182fd9044b3a8c8f86c313b4b0d314d352c43
[ "Apache-2.0" ]
1
2020-04-03T13:17:16.000Z
2020-04-03T13:17:16.000Z
LSTM/model.py
ehsangolshani/workload-predictor
517182fd9044b3a8c8f86c313b4b0d314d352c43
[ "Apache-2.0" ]
null
null
null
LSTM/model.py
ehsangolshani/workload-predictor
517182fd9044b3a8c8f86c313b4b0d314d352c43
[ "Apache-2.0" ]
null
null
null
import torch from torch import nn class LSTMModel(nn.Module): def __init__(self, input_size, output_size, hidden_dim, num_layers, batch_size, dropout=0.1): super(LSTMModel, self).__init__() self.hidden_dim = hidden_dim self.num_layers = num_layers self.lstm: nn.LSTM = nn.LSTM(inpu...
41.04878
99
0.621509
c7dd051e2afacfa7e6bfedec07ac4e0c2ed856c3
9,370
py
Python
tutorials/eos.py
muhrin/aiida-vasp
641fdc2ccd40bdd041e59af1fa3e1dcf9b037415
[ "MIT" ]
1
2021-06-13T09:13:01.000Z
2021-06-13T09:13:01.000Z
tutorials/eos.py
muhrin/aiida-vasp
641fdc2ccd40bdd041e59af1fa3e1dcf9b037415
[ "MIT" ]
null
null
null
tutorials/eos.py
muhrin/aiida-vasp
641fdc2ccd40bdd041e59af1fa3e1dcf9b037415
[ "MIT" ]
null
null
null
""" The eos workchain ---------------- The workchain will accept a dictionary of structures and extract the total energies for each structure. The data is saved and the energy minimum is calculated and stored. """ # pylint: disable=attribute-defined-outside-init import random import numpy as np from scipy.optimize im...
39.205021
135
0.685806
bf256bde4aa959e2d22fc78c5f10ed9532515592
11,519
py
Python
intersight/model/oauth_authorization_all_of.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
5
2021-12-16T15:13:32.000Z
2022-03-29T16:09:54.000Z
intersight/model/oauth_authorization_all_of.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
4
2022-01-25T19:05:51.000Z
2022-03-29T20:18:37.000Z
intersight/model/oauth_authorization_all_of.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
2
2020-07-07T15:01:08.000Z
2022-01-31T04:27:35.000Z
""" Cisco Intersight Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan...
53.576744
1,678
0.641028
600a7f2a9d183102aaf21ba4ef5e15e355136f10
6,309
py
Python
neutronclient/neutron/v2_0/lb/healthmonitor.py
shwsun/neutronclient
0c8a457da182be28d3d4d0eb33cbaeeb4156b307
[ "Apache-2.0" ]
null
null
null
neutronclient/neutron/v2_0/lb/healthmonitor.py
shwsun/neutronclient
0c8a457da182be28d3d4d0eb33cbaeeb4156b307
[ "Apache-2.0" ]
null
null
null
neutronclient/neutron/v2_0/lb/healthmonitor.py
shwsun/neutronclient
0c8a457da182be28d3d4d0eb33cbaeeb4156b307
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 Mirantis Inc. # All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
38.236364
79
0.614836
04c26cbe4e9cfa2ad3a11c381edccf3b6d95357b
2,340
py
Python
data_loader/dataset_IMT/extract_from_tar.py
luiseduve/kinemats
08c459315eb6ec64b819eb2fdf2b753241960504
[ "Apache-2.0" ]
null
null
null
data_loader/dataset_IMT/extract_from_tar.py
luiseduve/kinemats
08c459315eb6ec64b819eb2fdf2b753241960504
[ "Apache-2.0" ]
null
null
null
data_loader/dataset_IMT/extract_from_tar.py
luiseduve/kinemats
08c459315eb6ec64b819eb2fdf2b753241960504
[ "Apache-2.0" ]
null
null
null
#%% # Add to path from pathlib import Path import sys,os this_path = str(Path().absolute())+"/" print("File Path:", this_path) sys.path.append(os.path.join(Path().absolute(), "src")) # %% # LIBRARIES from data_loader.dataset_videos import DatasetHeadMovIMT from data_loader import utils import pandas as pd # %% ""...
26
106
0.712393
55a03e4cd0e20e34dcd0b76c2cc9d96c98cbe228
1,611
py
Python
bindings/python/examples/plot-voltage.py
jmball/libsmu
d9330b8e3233527da671623ecacc6bbeacd02ed5
[ "BSD-3-Clause" ]
30
2015-03-28T23:19:54.000Z
2022-03-08T14:44:36.000Z
bindings/python/examples/plot-voltage.py
jmball/libsmu
d9330b8e3233527da671623ecacc6bbeacd02ed5
[ "BSD-3-Clause" ]
147
2015-03-06T18:37:11.000Z
2022-03-28T08:26:47.000Z
bindings/python/examples/plot-voltage.py
jmball/libsmu
d9330b8e3233527da671623ecacc6bbeacd02ed5
[ "BSD-3-Clause" ]
26
2015-03-14T06:04:17.000Z
2022-03-12T16:37:48.000Z
#!/usr/bin/env python # # Simple script showing how to write a sine/cosine wave to the attached devices and # plot the resulting voltage output for both channels using matplotlib. from __future__ import print_function from collections import defaultdict import sys from pysmu import Session, Mode import matplotlib.py...
31.588235
83
0.653011
85b1740d94e222333233abc521411b015651d0be
3,412
py
Python
sktime/tests/test_pipeline.py
Mo-Saif/sktime
f3c71977c113d986276fca2bdedf70faaa33f040
[ "BSD-3-Clause" ]
1
2019-09-29T07:11:33.000Z
2019-09-29T07:11:33.000Z
sktime/tests/test_pipeline.py
ClaudiaSanches/sktime
63e7839e80ca6d5fe5fc4f33389ec3bcacd8aa59
[ "BSD-3-Clause" ]
null
null
null
sktime/tests/test_pipeline.py
ClaudiaSanches/sktime
63e7839e80ca6d5fe5fc4f33389ec3bcacd8aa59
[ "BSD-3-Clause" ]
1
2019-05-08T10:42:20.000Z
2019-05-08T10:42:20.000Z
import numpy as np import pandas as pd from sklearn.preprocessing import FunctionTransformer from sklearn.tree import DecisionTreeClassifier from sktime.datasets import load_gunpoint from sktime.pipeline import FeatureUnion from sktime.pipeline import Pipeline from sktime.transformers.compose import RowwiseTransformer...
35.541667
114
0.703693
1ee60941ea521820f4750d452df815bdfe29dba3
6,942
py
Python
siri/siri_model_discovery/siri_line_v2_0.py
grutts/siri
c388c209d1c803be166e767d5aa53a93a34c002d
[ "MIT" ]
null
null
null
siri/siri_model_discovery/siri_line_v2_0.py
grutts/siri
c388c209d1c803be166e767d5aa53a93a34c002d
[ "MIT" ]
null
null
null
siri/siri_model_discovery/siri_line_v2_0.py
grutts/siri
c388c209d1c803be166e767d5aa53a93a34c002d
[ "MIT" ]
null
null
null
from dataclasses import dataclass, field from typing import List, Optional from siri.siri_model.siri_journey_v2_0 import DirectionStructure from siri.siri_model_discovery.siri_stop_point_v2_0 import AnnotatedStopPointStructure from siri.siri_utility.siri_location_v2_0 import LineShapeStructure from siri.siri_utility.si...
27.879518
86
0.556612
d717b5182cbda31d96de1e1f1372163aaab5b2ea
12,869
py
Python
research/object_detection/predictors/heads/class_head.py
fowler-lab-osu/EarVision_TensorFlow_Object_Detection_API
e00707b233feb9103ecf7c95b09a234b0f727d05
[ "Apache-2.0" ]
null
null
null
research/object_detection/predictors/heads/class_head.py
fowler-lab-osu/EarVision_TensorFlow_Object_Detection_API
e00707b233feb9103ecf7c95b09a234b0f727d05
[ "Apache-2.0" ]
null
null
null
research/object_detection/predictors/heads/class_head.py
fowler-lab-osu/EarVision_TensorFlow_Object_Detection_API
e00707b233feb9103ecf7c95b09a234b0f727d05
[ "Apache-2.0" ]
1
2020-07-10T19:17:42.000Z
2020-07-10T19:17:42.000Z
# Copyright 2017 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...
40.596215
80
0.710312
d834d2588e42c842ef1094b8e860510cbe279be4
1,945
py
Python
key.py
AndreaOrru/Yugen
e5bdee4cce24537d37fec9f88836897d04a0cd03
[ "BSD-2-Clause" ]
1
2015-11-27T01:47:11.000Z
2015-11-27T01:47:11.000Z
key.py
AndreaOrru/Yugen
e5bdee4cce24537d37fec9f88836897d04a0cd03
[ "BSD-2-Clause" ]
null
null
null
key.py
AndreaOrru/Yugen
e5bdee4cce24537d37fec9f88836897d04a0cd03
[ "BSD-2-Clause" ]
null
null
null
"""Representation of keypresses.""" import curses from curses import ascii from curses.ascii import isprint class Key: """Class representing a combination of key presses. Attributes: keys: Dictionary that maps key names to codes. """ keys = {k[4:]: eval('curses.'+k) for k in dir(curses) if ...
33.534483
91
0.579434
d6733fd6d58671507dbd44dcc5d03d1f31a1e794
1,233
py
Python
tests/daemon/unit/api/endpoints/partial/test_flow.py
thephenix4/jina
34b433aa6f5f6781117568d422e8c2e9fe8ad6ec
[ "Apache-2.0" ]
5
2021-10-30T06:07:58.000Z
2022-02-20T20:43:02.000Z
tests/daemon/unit/api/endpoints/partial/test_flow.py
thephenix4/jina
34b433aa6f5f6781117568d422e8c2e9fe8ad6ec
[ "Apache-2.0" ]
1
2020-07-15T08:17:47.000Z
2020-07-15T08:17:47.000Z
tests/daemon/unit/api/endpoints/partial/test_flow.py
thephenix4/jina
34b433aa6f5f6781117568d422e8c2e9fe8ad6ec
[ "Apache-2.0" ]
1
2021-10-02T12:17:42.000Z
2021-10-02T12:17:42.000Z
from pathlib import Path from daemon.models import FlowModel from daemon.models.enums import UpdateOperation from jina import Client, Document cur_dir = Path(__file__).parent api = '/flow' def test_flow_api(monkeypatch, partial_flow_client): flow_model = FlowModel() flow_model.uses = f'{cur_dir}/good_flow_d...
28.022727
89
0.669911
32d442b53ad98ffb482d7cd9e25566261fef0008
456
py
Python
demo/open_pcap.py
drewp/python-libpcap
1f7e295735a0cab98aa855fa4cbf97096e5d25ac
[ "BSD-3-Clause" ]
null
null
null
demo/open_pcap.py
drewp/python-libpcap
1f7e295735a0cab98aa855fa4cbf97096e5d25ac
[ "BSD-3-Clause" ]
null
null
null
demo/open_pcap.py
drewp/python-libpcap
1f7e295735a0cab98aa855fa4cbf97096e5d25ac
[ "BSD-3-Clause" ]
null
null
null
# @Author: JanKinCai # @Date: 2019-09-11 17:43:19 # @Last Modified by: jankincai12@gmail.com # @Last Modified time: 2019-09-12 09:27:39 from pylibpcap.open import OpenPcap with OpenPcap("pcap.pcap", filters="port 502") as f: with OpenPcap("pcap2.pcap", mode="a") as f1: for lens, t, buf in f.read(): ...
30.4
52
0.572368
f9d01b2721177035cc67c487e095dd9b9b08c642
7,191
py
Python
company-affiliation/python/old_files/getCrossovers.py
IanOlin/github-research
3e370d65546473d2403c21107ebf73fa806a62c9
[ "MIT" ]
6
2016-04-13T22:46:30.000Z
2020-06-17T16:18:10.000Z
company-affiliation/python/old_files/getCrossovers.py
IanOlin/github-research
3e370d65546473d2403c21107ebf73fa806a62c9
[ "MIT" ]
1
2017-05-12T06:21:24.000Z
2017-05-12T06:21:24.000Z
company-affiliation/python/old_files/getCrossovers.py
IanOlin/github-research
3e370d65546473d2403c21107ebf73fa806a62c9
[ "MIT" ]
3
2017-05-27T08:51:47.000Z
2020-06-17T16:18:11.000Z
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities firefox_capabilities = DesiredCapabilities.FIREFOX firefox_capabilities['marionette'] = True firefox_capabilities['binary'] = '/usr/bin/firefox' # Go here to install dependencies for chrome webdriver: https://christopher.su/2015/selenium-c...
36.318182
310
0.770547
1b40a978c47ed45cf51f8f1e6c193b80939787fd
3,091
py
Python
mender/client/__init__.py
kireevco/mender-backend-cli
7bd5db7dcc82625aa461c0fc9dccbc829c08be15
[ "MIT" ]
5
2016-10-12T11:29:10.000Z
2020-05-11T17:04:15.000Z
mender/client/__init__.py
kireevco/mender-backend-cli
7bd5db7dcc82625aa461c0fc9dccbc829c08be15
[ "MIT" ]
3
2018-03-26T08:53:55.000Z
2021-03-08T13:30:57.000Z
mender/client/__init__.py
kireevco/mender-backend-cli
7bd5db7dcc82625aa461c0fc9dccbc829c08be15
[ "MIT" ]
6
2018-03-23T00:21:01.000Z
2021-03-16T11:48:33.000Z
# The MIT License (MIT) # # Copyright (c) 2016 Maciej Borzecki # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, m...
29.438095
80
0.704626
c22202375f2d71bede6eb83ae8d567860f2f995d
16,846
py
Python
readthedocs/oauth/services/gitlab.py
yarikoptic/readthedocs.org
98a7ff1758d829323e5ef9949f57401f7103ec4e
[ "MIT" ]
null
null
null
readthedocs/oauth/services/gitlab.py
yarikoptic/readthedocs.org
98a7ff1758d829323e5ef9949f57401f7103ec4e
[ "MIT" ]
4
2020-06-05T22:35:21.000Z
2021-12-13T20:10:17.000Z
readthedocs/oauth/services/gitlab.py
yarikoptic/readthedocs.org
98a7ff1758d829323e5ef9949f57401f7103ec4e
[ "MIT" ]
null
null
null
"""OAuth utility functions.""" import json import logging import re from allauth.socialaccount.providers.gitlab.views import GitLabOAuth2Adapter from django.conf import settings from django.urls import reverse from requests.exceptions import RequestException from readthedocs.builds.constants import ( BUILD_STATU...
34.101215
86
0.548617
04fbdb12a81242ec2ea39b08b926adc0bdadc7ae
4,567
py
Python
netbox_client/models/nested_virtual_machine.py
nrfta/python-netbox-client
68ba6dd4d7306513dc1ad38f3ac59122ba4f70a8
[ "MIT" ]
null
null
null
netbox_client/models/nested_virtual_machine.py
nrfta/python-netbox-client
68ba6dd4d7306513dc1ad38f3ac59122ba4f70a8
[ "MIT" ]
null
null
null
netbox_client/models/nested_virtual_machine.py
nrfta/python-netbox-client
68ba6dd4d7306513dc1ad38f3ac59122ba4f70a8
[ "MIT" ]
null
null
null
# coding: utf-8 """ NetBox API API to access NetBox # noqa: E501 OpenAPI spec version: 2.8 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class NestedVirtualMachine(object): """NOTE: This class is auto generated by ...
26.398844
115
0.545654
0941e847422f67f11a444781dd70492483b7472a
198
py
Python
console_a10/macro.py
chuckwoodjohn/py_console_a1.0
825cf47402a4941ff2d72b4430ca94f2742e30ec
[ "BSD-2-Clause" ]
1
2015-12-15T22:38:05.000Z
2015-12-15T22:38:05.000Z
console_a10/macro.py
chuckwoodjohn/py_console_a1.0
825cf47402a4941ff2d72b4430ca94f2742e30ec
[ "BSD-2-Clause" ]
null
null
null
console_a10/macro.py
chuckwoodjohn/py_console_a1.0
825cf47402a4941ff2d72b4430ca94f2742e30ec
[ "BSD-2-Clause" ]
null
null
null
class Macro: def __init__(self, call, func): self.call = call self.func = func def __call__(self, shell, *args, **kwargs): self.func(shell, *args, **kwargs)
24.75
47
0.555556
b627c5785e80c08378e3b966c7612558816085f7
23,226
py
Python
gammapy/estimators/ts_map.py
vikasj78/gammapy
46deb872bbcbf36748df71e659dc3fa592f6dc27
[ "BSD-3-Clause" ]
null
null
null
gammapy/estimators/ts_map.py
vikasj78/gammapy
46deb872bbcbf36748df71e659dc3fa592f6dc27
[ "BSD-3-Clause" ]
null
null
null
gammapy/estimators/ts_map.py
vikasj78/gammapy
46deb872bbcbf36748df71e659dc3fa592f6dc27
[ "BSD-3-Clause" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Functions to compute TS images.""" import functools import logging import warnings import numpy as np import scipy.optimize from astropy.coordinates import Angle from gammapy.datasets.map import MapEvaluator from gammapy.maps import Map, WcsGeom from ga...
31.514247
94
0.592267
f58ab02ee160e9cead042522b01707aa5f5c74d5
2,753
py
Python
basic/string2.py
Jaimenms/google-python-exercises
f3f3115f9d0034c2c7fcc278ff8d6959cb9f20e5
[ "Apache-2.0" ]
null
null
null
basic/string2.py
Jaimenms/google-python-exercises
f3f3115f9d0034c2c7fcc278ff8d6959cb9f20e5
[ "Apache-2.0" ]
null
null
null
basic/string2.py
Jaimenms/google-python-exercises
f3f3115f9d0034c2c7fcc278ff8d6959cb9f20e5
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python2.4 -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ # Additional basic string exercises # D. verbing # Given a string, if its length is ...
29.287234
77
0.645114
6567674400efd2b2b8c40aa75981704bcaf2df20
12,173
py
Python
models/transformer.py
openseg-group/detr
d947cf39ab716aedf7502103fc51b85b9d82822b
[ "Apache-2.0" ]
null
null
null
models/transformer.py
openseg-group/detr
d947cf39ab716aedf7502103fc51b85b9d82822b
[ "Apache-2.0" ]
null
null
null
models/transformer.py
openseg-group/detr
d947cf39ab716aedf7502103fc51b85b9d82822b
[ "Apache-2.0" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ DETR Transformer class. Copy-paste from torch.nn.Transformer with modifications: * positional encodings are passed in MHattention * extra LN at the end of encoder is removed * decoder returns a stack of activations from all decoding...
40.712375
98
0.608478
48e10ef39b348a66fe2dec1e3ef37f08c7a0336c
974
py
Python
mmic_cg/models/proc.py
RlyehAD/mmic_cg
66344f3b85ce9ccfa43d6e6b35a86183cd4b6400
[ "BSD-3-Clause" ]
null
null
null
mmic_cg/models/proc.py
RlyehAD/mmic_cg
66344f3b85ce9ccfa43d6e6b35a86183cd4b6400
[ "BSD-3-Clause" ]
null
null
null
mmic_cg/models/proc.py
RlyehAD/mmic_cg
66344f3b85ce9ccfa43d6e6b35a86183cd4b6400
[ "BSD-3-Clause" ]
null
null
null
""" Populate this file if your component requires its own models """ from cmselemental.models import InputProc, OutputProc from mmelemental.models import Molecule from pydantic import Field from typing import Union, Optional, Dict, Any __all__ = ["InputCoarse", "OutputCoarse"] class InputCoarse(InputProc): """An i...
24.35
72
0.726899
c8df236758525c7ca8ac5c9d15cfcac070a3a756
1,549
py
Python
StockAnalytics-master/StockAnalytics-master/SP500Prediction/Prediction_AggStockPrice/Evaluation_sp500.py
iVibudh/stock-prediction
3900619224bb86e382c782d39138914294199733
[ "MIT" ]
null
null
null
StockAnalytics-master/StockAnalytics-master/SP500Prediction/Prediction_AggStockPrice/Evaluation_sp500.py
iVibudh/stock-prediction
3900619224bb86e382c782d39138914294199733
[ "MIT" ]
null
null
null
StockAnalytics-master/StockAnalytics-master/SP500Prediction/Prediction_AggStockPrice/Evaluation_sp500.py
iVibudh/stock-prediction
3900619224bb86e382c782d39138914294199733
[ "MIT" ]
null
null
null
import pandas as pd import psycopg2 # Connect to database conn = psycopg2.connect(host='localhost', port=5432, database='postgres') # Obtain stock price and predicted stock price of top 20 stock components query = """select * from stock.pred_dy_sp500 as l left join (select * from stock.stockpri...
35.204545
78
0.706262
19872c4176f364630e52b59b9806de374756c176
1,398
py
Python
pylith/feassemble/obsolete/IntegratorElasticityLgDeform.py
Grant-Block/pylith
f6338261b17551eba879da998a5aaf2d91f5f658
[ "MIT" ]
93
2015-01-08T16:41:22.000Z
2022-02-25T13:40:02.000Z
pylith/feassemble/obsolete/IntegratorElasticityLgDeform.py
Grant-Block/pylith
f6338261b17551eba879da998a5aaf2d91f5f658
[ "MIT" ]
277
2015-02-20T16:27:35.000Z
2022-03-30T21:13:09.000Z
pylith/feassemble/obsolete/IntegratorElasticityLgDeform.py
Grant-Block/pylith
f6338261b17551eba879da998a5aaf2d91f5f658
[ "MIT" ]
71
2015-03-24T12:11:08.000Z
2022-03-03T04:26:02.000Z
#!/usr/bin/env python # # ---------------------------------------------------------------------- # # Brad T. Aagaard, U.S. Geological Survey # Charles A. Williams, GNS Science # Matthew G. Knepley, University of Chicago # # This code was developed as part of the Computational Infrastructure # for Geodynamics (http://ge...
27.96
72
0.651645
bd535d3b95f905c06540e1eada89784f32333945
3,104
py
Python
ve/fwrisc_rv32i/tests/cocotb/fwrisc_rv32i_tests/zephyr_tests.py
Kamran-10xe/fwrisc
5c742c60ba620944ba19741c02782fb6b45d514e
[ "Apache-2.0" ]
10
2020-12-23T07:55:03.000Z
2022-03-01T07:20:39.000Z
ve/fwrisc_rv32i/tests/cocotb/fwrisc_rv32i_tests/zephyr_tests.py
Kamran-10xe/fwrisc
5c742c60ba620944ba19741c02782fb6b45d514e
[ "Apache-2.0" ]
1
2021-12-04T06:12:19.000Z
2022-02-18T13:20:55.000Z
ve/fwrisc_rv32i/tests/cocotb/fwrisc_rv32i_tests/zephyr_tests.py
Kamran-10xe/fwrisc
5c742c60ba620944ba19741c02782fb6b45d514e
[ "Apache-2.0" ]
8
2021-02-08T02:25:24.000Z
2022-03-01T05:13:44.000Z
''' Created on Nov 23, 2019 @author: ballance ''' import cocotb from cocotb.bfms import BfmMgr from fwrisc_rv32i_tests.instr_tests import InstrTests from fwrisc_tracer_bfm.fwrisc_tracer_signal_bfm import FwriscTracerSignalBfm from elftools.elf.elffile import ELFFile from elftools.elf.sections import SymbolTableSectio...
28.218182
96
0.558956
d960dd8b7ed3bc743b9df55186d092cf729f9496
3,240
py
Python
Code/branches/Pre-Prospectus/python/Arnoldi/Deterministic/OldDeterm/ArnoldiDtmMain.py
jlconlin/PhDThesis
8e704613721a800ce1c59576e94f40fa6f7cd986
[ "MIT" ]
null
null
null
Code/branches/Pre-Prospectus/python/Arnoldi/Deterministic/OldDeterm/ArnoldiDtmMain.py
jlconlin/PhDThesis
8e704613721a800ce1c59576e94f40fa6f7cd986
[ "MIT" ]
null
null
null
Code/branches/Pre-Prospectus/python/Arnoldi/Deterministic/OldDeterm/ArnoldiDtmMain.py
jlconlin/PhDThesis
8e704613721a800ce1c59576e94f40fa6f7cd986
[ "MIT" ]
null
null
null
#! /usr/local/bin/python2.4 import ArnoldiDtm import numpy import random import Gnuplot __author__ = "$Author: jlconlin $" __version__ = " $Revision: 83 $" __date__ = "$Date: 2007-06-14 15:35:15 -0600 (Thu, 14 Jun 2007) $" __id__ = "$Id: ArnoldiDtmMain.py 83 2007-06-14 21:35:15Z jlconlin $" def main(): ...
29.189189
99
0.614506
8fb74104745e4e194de6e52378c617c2b9ca62ea
5,050
py
Python
m2cgen/assemblers/svm.py
bcampbell-prosper/m2cgen
cc049fe5cd7060c2f0cd5a0331e3aa85fac2a336
[ "MIT" ]
3
2021-06-29T02:43:40.000Z
2022-03-28T07:41:59.000Z
m2cgen/assemblers/svm.py
bcampbell-prosper/m2cgen
cc049fe5cd7060c2f0cd5a0331e3aa85fac2a336
[ "MIT" ]
null
null
null
m2cgen/assemblers/svm.py
bcampbell-prosper/m2cgen
cc049fe5cd7060c2f0cd5a0331e3aa85fac2a336
[ "MIT" ]
3
2021-08-06T07:51:37.000Z
2022-03-28T07:41:42.000Z
from m2cgen import ast from m2cgen.assemblers import utils from m2cgen.assemblers.base import ModelAssembler class SVMModelAssembler(ModelAssembler): def __init__(self, model): super().__init__(model) supported_kernels = { "rbf": self._rbf_kernel, "sigmoid": self._sigmoid...
36.594203
78
0.611485
65f215d3f1021edb21b93c5509bf541af3867e90
439
py
Python
2015/02/fc_2015_02_18.py
mfwarren/FreeCoding
58ac87f35ad2004a3514782556762ee0ed72c39a
[ "MIT" ]
null
null
null
2015/02/fc_2015_02_18.py
mfwarren/FreeCoding
58ac87f35ad2004a3514782556762ee0ed72c39a
[ "MIT" ]
1
2015-04-27T01:43:45.000Z
2015-04-27T01:43:45.000Z
2015/02/fc_2015_02_18.py
mfwarren/FreeCoding
58ac87f35ad2004a3514782556762ee0ed72c39a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # imports go here import platform import logging from logging.handlers import SysLogHandler # # Free Coding session for 2015-02-18 # Written by Matt Warren # address = '/dev/log' if platform.system() == 'Darwin': address = "/var/run/syslog" handler = SysLogHandler(address) logger = logging...
18.291667
42
0.749431
c964da7c34142f6d7e892239ef3da1edcf812d39
925
py
Python
apps/external_apps/microblogging/forms.py
indro/t2c
56482ad4aed150f29353e054db2c97b567243bf8
[ "MIT" ]
3
2015-12-25T14:45:36.000Z
2016-11-28T09:58:03.000Z
apps/external_apps/microblogging/forms.py
indro/t2c
56482ad4aed150f29353e054db2c97b567243bf8
[ "MIT" ]
null
null
null
apps/external_apps/microblogging/forms.py
indro/t2c
56482ad4aed150f29353e054db2c97b567243bf8
[ "MIT" ]
null
null
null
from django import forms from microblogging.models import Tweet, tweet try: from notification import models as notification except ImportError: notification = None class TweetForm(forms.ModelForm): text = forms.CharField(label='', widget=forms.Textarea(attrs={ 'rows': '4', ...
26.428571
66
0.604324
d76b51ee48f57558cf95853d6380c48741721745
2,084
py
Python
datasets/imagenet.py
hyang1990/sparsity_quantization_joint
947acb4df251ba3e47954738c54f143558befdcc
[ "MIT" ]
13
2020-07-21T16:21:26.000Z
2022-01-17T06:29:39.000Z
datasets/imagenet.py
hyang1990/sparsity_quantization_joint
947acb4df251ba3e47954738c54f143558befdcc
[ "MIT" ]
null
null
null
datasets/imagenet.py
hyang1990/sparsity_quantization_joint
947acb4df251ba3e47954738c54f143558befdcc
[ "MIT" ]
3
2020-07-27T06:46:32.000Z
2021-04-15T09:15:29.000Z
import torch from torch.utils.data.sampler import SubsetRandomSampler from torchvision import datasets, transforms import os def get_data_loaders(data_dir, batch_size=128, val_batch_size=128, num_workers=0, nsubset=-1, normalize=None): traindir = os.path.join(data_dir, 'train') valdir = o...
35.931034
95
0.659789
2bbfa692ad344ba0057e6f818e18ac31f6e87960
21,464
py
Python
programs/tfFromTrim06.py
CLARIAH/wp6-missieven
67e7d0123d37cce36be5353801b90010d4ad4be0
[ "MIT" ]
1
2021-04-27T16:22:51.000Z
2021-04-27T16:22:51.000Z
programs/tfFromTrim06.py
CLARIAH/wp6-missieven
67e7d0123d37cce36be5353801b90010d4ad4be0
[ "MIT" ]
null
null
null
programs/tfFromTrim06.py
CLARIAH/wp6-missieven
67e7d0123d37cce36be5353801b90010d4ad4be0
[ "MIT" ]
null
null
null
import sys import collections import re import xml.etree.ElementTree as ET from tf.fabric import Fabric from tf.convert.walker import CV from lib import ( XML_DIR, OUT_DIR, REPO, META_DECL06 as META_DECL, WHITE_RE, ADD_LB_ELEMENTS, A2Z, parseArgs, initTree, getVolumes, ge...
25.43128
86
0.544586
3a345291877b080a5cee102d9995cb364f08f246
8,757
py
Python
azure-mgmt-monitor/azure/mgmt/monitor/models/event_data_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
azure-mgmt-monitor/azure/mgmt/monitor/models/event_data_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-mgmt-monitor/azure/mgmt/monitor/models/event_data_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
null
null
null
# 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 ...
48.115385
95
0.654219
82d75b930d2ac50b80c2bf6810a6f8feb9e6adf7
1,243
gyp
Python
ion/ion.gyp
mdemoret/Snapshot
987b3d45532f3644d35d858e036542d5691953ce
[ "Apache-2.0" ]
null
null
null
ion/ion.gyp
mdemoret/Snapshot
987b3d45532f3644d35d858e036542d5691953ce
[ "Apache-2.0" ]
null
null
null
ion/ion.gyp
mdemoret/Snapshot
987b3d45532f3644d35d858e036542d5691953ce
[ "Apache-2.0" ]
null
null
null
# # Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
30.317073
79
0.663717
ff37143b03aa800f807f8d55fd4264e9d6930ebb
585
py
Python
parser/team08/Tytus_SQLPARSER_G8/Instrucciones/FunctionMathematical/Lcm.py
strickergt128/tytus
93216dd9481ea0775da1d2967dc27be66872537f
[ "MIT" ]
null
null
null
parser/team08/Tytus_SQLPARSER_G8/Instrucciones/FunctionMathematical/Lcm.py
strickergt128/tytus
93216dd9481ea0775da1d2967dc27be66872537f
[ "MIT" ]
null
null
null
parser/team08/Tytus_SQLPARSER_G8/Instrucciones/FunctionMathematical/Lcm.py
strickergt128/tytus
93216dd9481ea0775da1d2967dc27be66872537f
[ "MIT" ]
null
null
null
import math from Instrucciones.TablaSimbolos.Instruccion import Instruccion class Lcm(Instruccion): def __init__(self, valor, tipo, linea, columna): Instruccion.__init__(self,tipo,linea,columna) self.valor = valor def ejecutar(self, tabla, arbol): super().ejecutar(tabla,arbol) ...
27.857143
79
0.666667
80b7fe733d53cbaad50d9b240396a8c173af6b87
5,308
py
Python
labelimg.py
LieCoding/SA_and-GAN
ddf80ba39029638beaa5f48054431ce032e816cc
[ "Apache-2.0" ]
1
2021-03-08T13:44:53.000Z
2021-03-08T13:44:53.000Z
labelimg.py
LieCoding/SA_and_GAN
ddf80ba39029638beaa5f48054431ce032e816cc
[ "Apache-2.0" ]
null
null
null
labelimg.py
LieCoding/SA_and_GAN
ddf80ba39029638beaa5f48054431ce032e816cc
[ "Apache-2.0" ]
null
null
null
''' 用于毕业设计 标定图片 操作说明:单击左键选择点,单击左键两次后会得到两个坐标点,同时再图片中画出椭圆 单击右键保存数据,保存标定好的图片和坐标值 按键esc,退出程序 不改路径的情况下,运行会自动从上一次标定的图片开始标定,通过文件夹里面的文件名来判断实现的 其他说明: color的颜色格式为RGB ,但是在标定的时候显示的是BGR,所以标定时候展示的颜色和保存的颜色会有一些区别,由于不影响标定就没有再去修改 GetAngle_and_Length函数返回了画椭圆的必要参数,由于我标注的是船只,会出现一些比较奇怪的比例,我根据实际...
29.988701
114
0.576112
5059893bffe36f464242f3a7b36cfacf5df0440b
10,786
py
Python
sdk/python/kfp/components/executor.py
hwk42/pipelines
c89ed71cf6339cdcdd957d4dca4b1f32c10db9c9
[ "Apache-2.0" ]
1
2021-08-23T19:09:56.000Z
2021-08-23T19:09:56.000Z
sdk/python/kfp/components/executor.py
hwk42/pipelines
c89ed71cf6339cdcdd957d4dca4b1f32c10db9c9
[ "Apache-2.0" ]
2
2021-06-01T10:02:51.000Z
2021-06-07T07:19:14.000Z
sdk/python/kfp/components/executor.py
hwk42/pipelines
c89ed71cf6339cdcdd957d4dca4b1f32c10db9c9
[ "Apache-2.0" ]
1
2021-10-17T07:27:10.000Z
2021-10-17T07:27:10.000Z
# Copyright 2021 The Kubeflow Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
37.845614
140
0.655665
72a5be19763d77e1291b8d531ce990e795d9a6d5
1,490
py
Python
azurelinuxagent/pa/deprovision/factory.py
longlimsft/WALinuxAgent
abc9c2e396ce8be0e643de5659578a415d9884ce
[ "Apache-2.0" ]
2
2019-05-03T21:59:45.000Z
2021-01-19T07:17:03.000Z
azurelinuxagent/pa/deprovision/factory.py
longlimsft/WALinuxAgent
abc9c2e396ce8be0e643de5659578a415d9884ce
[ "Apache-2.0" ]
null
null
null
azurelinuxagent/pa/deprovision/factory.py
longlimsft/WALinuxAgent
abc9c2e396ce8be0e643de5659578a415d9884ce
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 Microsoft Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
37.25
74
0.736913
a05ca7aa49e73801148bdc1390b5ceb9573ccbda
1,012
py
Python
tests/test_wsgi_performance.py
lidizheng/sonora
844e77de14b5cf457325f0e2b2f01805f351a0aa
[ "Apache-2.0" ]
178
2019-11-14T02:45:40.000Z
2022-03-19T08:41:19.000Z
tests/test_wsgi_performance.py
lidizheng/sonora
844e77de14b5cf457325f0e2b2f01805f351a0aa
[ "Apache-2.0" ]
26
2019-11-03T15:28:19.000Z
2022-01-19T18:03:22.000Z
tests/test_wsgi_performance.py
lidizheng/sonora
844e77de14b5cf457325f0e2b2f01805f351a0aa
[ "Apache-2.0" ]
6
2020-04-20T18:58:06.000Z
2022-01-25T19:46:31.000Z
import pytest import sonora.client from tests import benchmark_pb2, benchmark_pb2_grpc @pytest.mark.parametrize("size", [1, 100, 10000, 1000000]) def test_wsgi_unarycall(wsgi_benchmark, benchmark, size): request = benchmark_pb2.SimpleRequest(response_size=size) def perf(): for _ in range(10): ...
25.948718
67
0.664032
cdef8823a925364e456bb00741cc6611d8b6aa5c
2,601
py
Python
hatsploit/modules/exploit/linux/generic/p2p_password_disclosure.py
enty8080/HatSplo
57ea81c2bc73838cbf7d7062d7e665eda1143d18
[ "MIT" ]
139
2021-02-17T15:52:30.000Z
2022-03-30T14:50:42.000Z
hatsploit/modules/exploit/linux/generic/p2p_password_disclosure.py
enty8080/HatSplo
57ea81c2bc73838cbf7d7062d7e665eda1143d18
[ "MIT" ]
27
2021-03-24T17:14:30.000Z
2022-03-02T18:50:43.000Z
hatsploit/modules/exploit/linux/generic/p2p_password_disclosure.py
enty8080/HatSplo
57ea81c2bc73838cbf7d7062d7e665eda1143d18
[ "MIT" ]
85
2021-02-17T15:39:03.000Z
2022-03-07T09:08:58.000Z
#!/usr/bin/env python3 # # This module requires HatSploit: https://hatsploit.netlify.app # Current source: https://github.com/EntySec/HatSploit # from hatsploit.lib.module import Module from hatsploit.utils.http import HTTPClient from hatsploit.utils.string import StringTools class HatSploitModule(Module, HTTPClien...
29.556818
93
0.57747
ce1c7abf4faacac757d8d002c6c3e4a7d637b96c
4,958
py
Python
Model/Wide_Resnet_AET.py
maple-research-lab/EnAET
45872fc8704b723395e8c5a489a3157a771fc6df
[ "MIT" ]
87
2019-11-22T01:53:50.000Z
2022-03-09T02:07:33.000Z
Model/Wide_Resnet_AET.py
maple-research-lab/EnAET
45872fc8704b723395e8c5a489a3157a771fc6df
[ "MIT" ]
11
2019-11-21T15:18:08.000Z
2022-03-12T00:05:18.000Z
Model/Wide_Resnet_AET.py
wang3702/EnAET
fd0f5f94afea0860da8671753351b09fa058ac42
[ "MIT" ]
9
2019-11-22T01:52:49.000Z
2021-03-28T08:47:05.000Z
# /******************************************************************************* # * Author : Xiao Wang # * Email : wang3702@purdue.edu xiaowang20140001@gmail.com # *******************************************************************************/ import torch import torch.nn as nn from Model.Mixmatch_Wide_Resnet im...
43.876106
113
0.61315
498f7f7790514ae0315f1286646130d60dba9c4b
52,471
py
Python
pandas/tests/frame/methods/test_replace.py
timhunderwood/pandas
0159cba6eb14983ab7eaf38ff138c3c397a6fe3b
[ "BSD-3-Clause" ]
3
2020-07-02T12:59:52.000Z
2020-08-27T20:05:44.000Z
pandas/tests/frame/methods/test_replace.py
MohamedGamal-HIZ/pandas
148f9fd74fc71cb7509c0898883036316efc6f89
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause" ]
1
2016-10-23T21:07:28.000Z
2016-10-23T21:07:28.000Z
pandas/tests/frame/methods/test_replace.py
MohamedGamal-HIZ/pandas
148f9fd74fc71cb7509c0898883036316efc6f89
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause" ]
2
2020-12-11T05:33:38.000Z
2022-01-16T12:42:17.000Z
from datetime import datetime from io import StringIO import re from typing import Dict, List, Union import numpy as np import pytest import pandas as pd from pandas import DataFrame, Index, Series, Timestamp, date_range import pandas._testing as tm @pytest.fixture def mix_ab() -> Dict[str, List[Union[int, str]]]: ...
36.873507
88
0.493301
6855d735c9cbfa7daa61ab38971c45fd4546a34a
1,052
py
Python
nodeconductor/logging/tasks.py
p-p-m/nodeconductor
bc702302ef65c89793452f0fd6ca9a6bec79782f
[ "Apache-2.0" ]
null
null
null
nodeconductor/logging/tasks.py
p-p-m/nodeconductor
bc702302ef65c89793452f0fd6ca9a6bec79782f
[ "Apache-2.0" ]
null
null
null
nodeconductor/logging/tasks.py
p-p-m/nodeconductor
bc702302ef65c89793452f0fd6ca9a6bec79782f
[ "Apache-2.0" ]
null
null
null
import logging from celery import shared_task from nodeconductor.logging.log import event_logger from nodeconductor.logging.models import BaseHook, Alert logger = logging.getLogger(__name__) @shared_task(name='nodeconductor.logging.process_event') def process_event(event): for hook in BaseHook.get_active_hook...
30.057143
87
0.717681
0fc47528762c7fef14009e6c8c7efb2c0345b6fd
2,144
py
Python
filehand/unused_urls.py
Intelectro/filehand
c00580eabb971cb5a54b2cb70427eb9f3b089620
[ "BSD-3-Clause" ]
null
null
null
filehand/unused_urls.py
Intelectro/filehand
c00580eabb971cb5a54b2cb70427eb9f3b089620
[ "BSD-3-Clause" ]
null
null
null
filehand/unused_urls.py
Intelectro/filehand
c00580eabb971cb5a54b2cb70427eb9f3b089620
[ "BSD-3-Clause" ]
null
null
null
''' app: filehandarticles_mgr ''' from django.conf.urls import patterns, url urlpatterns = patterns('filehand.views', url(r'^$', 'index', name='index'), url(r'^newArticle/$', 'newArticle', name='newArticle'), url(r'^articlesMgr_1/(.*)/(.*)$', 'articlesMgr_1', name='articlesMgr_1'), url(r'^art...
48.727273
107
0.649254
448a8be1b3360f101d204f5e881bdd3c8e700b9b
6,699
py
Python
frappe/utils/background_jobs.py
07061999/frappe
6e5b05852d73aea6c14d1821f8541b9397ca3ed6
[ "MIT" ]
null
null
null
frappe/utils/background_jobs.py
07061999/frappe
6e5b05852d73aea6c14d1821f8541b9397ca3ed6
[ "MIT" ]
5
2020-12-04T21:22:53.000Z
2022-03-12T00:44:22.000Z
frappe/utils/background_jobs.py
vigneshbarani/frappefg
fca03c609731c4e37f6b8312150e90d23f2a2862
[ "MIT" ]
1
2021-02-06T10:38:18.000Z
2021-02-06T10:38:18.000Z
from __future__ import unicode_literals, print_function import redis from rq import Connection, Queue, Worker from rq.logutils import setup_loghandlers from frappe.utils import cstr from collections import defaultdict import frappe import os, socket, time from frappe import _ from six import string_types from uuid impo...
27.681818
100
0.736229
0c7b118e6f6819cf4d1ad8f8d9c8320221d64d32
889
py
Python
frux_app_server/migrations/versions/299e2bc265af_favorites.py
camidvorkin/frux-app-server
21098234a7867908250022e3e1c0580417d1ca35
[ "Apache-2.0", "MIT" ]
3
2021-08-03T21:52:01.000Z
2021-09-14T19:39:10.000Z
frux_app_server/migrations/versions/299e2bc265af_favorites.py
camidvorkin/frux-app-server
21098234a7867908250022e3e1c0580417d1ca35
[ "Apache-2.0", "MIT" ]
null
null
null
frux_app_server/migrations/versions/299e2bc265af_favorites.py
camidvorkin/frux-app-server
21098234a7867908250022e3e1c0580417d1ca35
[ "Apache-2.0", "MIT" ]
null
null
null
"""Favorites Revision ID: 299e2bc265af Revises: 24f1df018932 Create Date: 2021-06-25 17:24:27.020289 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '299e2bc265af' down_revision = '24f1df018932' branch_labels = None depends_on = None def upgrade(): # ### ...
25.4
65
0.68054
5a50f9b88c54d88234b1af30aef96f7e80c503a7
1,881
py
Python
tests/test_security_http_base_optional.py
Aryabhata-Rootspring/fastapi
f6237ad05a8468ac19c591181adad38d75372c46
[ "MIT" ]
53,007
2018-12-08T10:05:29.000Z
2022-03-31T23:30:02.000Z
tests/test_security_http_base_optional.py
Aryabhata-Rootspring/fastapi
f6237ad05a8468ac19c591181adad38d75372c46
[ "MIT" ]
4,155
2019-01-05T05:07:49.000Z
2022-03-31T21:25:38.000Z
tests/test_security_http_base_optional.py
Aryabhata-Rootspring/fastapi
f6237ad05a8468ac19c591181adad38d75372c46
[ "MIT" ]
4,092
2018-12-09T16:21:00.000Z
2022-03-31T07:59:45.000Z
from typing import Optional from fastapi import FastAPI, Security from fastapi.security.http import HTTPAuthorizationCredentials, HTTPBase from fastapi.testclient import TestClient app = FastAPI() security = HTTPBase(scheme="Other", auto_error=False) @app.get("/users/me") def read_current_user( credentials: Op...
29.857143
81
0.603402
83ddbac0e56f820948de5b230a466080ff4543ee
2,105
py
Python
overcat_simple_filter.py
Botomatik/JackBot
58651d8b5a5bcead2a2eb79849019cb4f972b7cd
[ "MIT" ]
null
null
null
overcat_simple_filter.py
Botomatik/JackBot
58651d8b5a5bcead2a2eb79849019cb4f972b7cd
[ "MIT" ]
null
null
null
overcat_simple_filter.py
Botomatik/JackBot
58651d8b5a5bcead2a2eb79849019cb4f972b7cd
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- ''' A bot to do some simple over categorization filtering. Now it uses the strategy to loop over all images in all the subcategories. That might be a very good strategy when the parent category is very full, but later on it will become very inefficient. ''' # # (C) Pywikipedi...
29.647887
119
0.667933
edf5b2fb4be810a125154524a3ad816c57d0bd5a
666
py
Python
net_models/models/routing/StaticRoutes.py
ashkalikava/net_models
1a99f6dc743665b47c4c4731bbca2a52176ded3f
[ "MIT" ]
null
null
null
net_models/models/routing/StaticRoutes.py
ashkalikava/net_models
1a99f6dc743665b47c4c4731bbca2a52176ded3f
[ "MIT" ]
null
null
null
net_models/models/routing/StaticRoutes.py
ashkalikava/net_models
1a99f6dc743665b47c4c4731bbca2a52176ded3f
[ "MIT" ]
1
2021-08-09T06:33:28.000Z
2021-08-09T06:33:28.000Z
# Standard Libraries import ipaddress # Third party packages from pydantic import conint from pydantic.typing import Optional # Local package from net_models.fields import VRF_NAME, INTERFACE_NAME from net_models.models import VendorIndependentBaseModel # Local module class StaticRoute(VendorIndependentBaseModel): ...
22.965517
56
0.8003
30636af2d9369f2728eef23d34c8b4942050ec1a
13,839
py
Python
psyneulink/core/components/mechanisms/processing/processingmechanism.py
AlirezaFarnia/PsyNeuLink
c66f8248d1391830e76c97df4b644e12a02c2b73
[ "Apache-2.0" ]
null
null
null
psyneulink/core/components/mechanisms/processing/processingmechanism.py
AlirezaFarnia/PsyNeuLink
c66f8248d1391830e76c97df4b644e12a02c2b73
[ "Apache-2.0" ]
null
null
null
psyneulink/core/components/mechanisms/processing/processingmechanism.py
AlirezaFarnia/PsyNeuLink
c66f8248d1391830e76c97df4b644e12a02c2b73
[ "Apache-2.0" ]
null
null
null
# Princeton University licenses this file to You under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. You may obtain a copy of the License at: # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writin...
42.192073
120
0.658501
d3c4088ae1d3320a42dbb05c9443d0fd5816e07d
33,629
py
Python
TumFoodCam/misc/utils.py
felixSchober/Deep-Food
1cac55e945949cb5a04d742b35c023379a162c34
[ "MIT" ]
6
2018-05-30T09:19:46.000Z
2020-02-13T19:38:17.000Z
TumFoodCam/misc/utils.py
Jorba123/Deep-Food
1cac55e945949cb5a04d742b35c023379a162c34
[ "MIT" ]
null
null
null
TumFoodCam/misc/utils.py
Jorba123/Deep-Food
1cac55e945949cb5a04d742b35c023379a162c34
[ "MIT" ]
3
2018-03-25T07:53:09.000Z
2018-06-13T14:17:35.000Z
import matplotlib # Force matplotlib to not use any Xwindows backend. matplotlib.use('Agg') import getpass import os import errno import cv2 as cv import numpy as np import math from matplotlib import pyplot as plt from math import ceil, sqrt import datetime import sys import random from misc.pretty_tabl...
34.455943
205
0.61438
d61682ee462378558a3e491f9ca0dbf43ea9b651
7,400
py
Python
source/main.py
cinek810/ansible-deploy
479883ed1fef143cad89da8422f164c46c817c20
[ "MIT" ]
1
2022-03-09T07:41:14.000Z
2022-03-09T07:41:14.000Z
source/main.py
cinek810/ansible-deployer
479883ed1fef143cad89da8422f164c46c817c20
[ "MIT" ]
20
2022-03-08T16:34:35.000Z
2022-03-31T08:06:43.000Z
source/main.py
cinek810/ansible-deploy
479883ed1fef143cad89da8422f164c46c817c20
[ "MIT" ]
1
2022-01-21T13:53:31.000Z
2022-01-21T13:53:31.000Z
"""Main module for ansible-deploy""" import os import sys import argparse import datetime import errno import pkg_resources from ansible_deployer.modules.globalvars import SUBCOMMANDS from ansible_deployer.modules.configs.config import Config from ansible_deployer.modules.locking.locking import Locking from ansible_de...
46.835443
100
0.651486
d8f7eff9af46a50f26aeaeed8b753e75ef0aaa9e
9,700
py
Python
stdlibs/py2.py
omnilib/stdlibs
ce2aab5df88e3411f9c0cb99322d31877f1872b7
[ "MIT" ]
null
null
null
stdlibs/py2.py
omnilib/stdlibs
ce2aab5df88e3411f9c0cb99322d31877f1872b7
[ "MIT" ]
1
2022-03-16T03:09:06.000Z
2022-03-16T03:09:06.000Z
stdlibs/py2.py
omnilib/stdlibs
ce2aab5df88e3411f9c0cb99322d31877f1872b7
[ "MIT" ]
null
null
null
# Copyright 2021 John Reese # Licensed under the MIT license # Generated by stdlibs/fetch.py from typing import FrozenSet module_names: FrozenSet[str] = frozenset( [ "AL", "Audio_mac", "BaseHTTPServer", "Bastion", "CD", "CDIO", "CDROM", "CGIHTTPServ...
18.834951
41
0.374639
8279be2dd50341edc64e455825365455eb92a6b9
531
py
Python
TestCase/MantisIssue/mantis0002848.py
cassie01/PumpLibrary
c2a4884a36f4c6c6552fa942143ae5d21c120b41
[ "Apache-2.0" ]
null
null
null
TestCase/MantisIssue/mantis0002848.py
cassie01/PumpLibrary
c2a4884a36f4c6c6552fa942143ae5d21c120b41
[ "Apache-2.0" ]
null
null
null
TestCase/MantisIssue/mantis0002848.py
cassie01/PumpLibrary
c2a4884a36f4c6c6552fa942143ae5d21c120b41
[ "Apache-2.0" ]
null
null
null
from TestCase.check_pump_status import * """ test 0002848:设置无效的参数泵支持运行 软件版本:...\Sprint58\COLLIN\AUTO_TEST\all_tests 测试日期:2019-03-16 """ checkPumpStatus() lvp.set_infusion_parameter(1200, 12 * 60, 2) lvp.start_infusion() time.sleep(1) system_status = lvp.get_system_status() assert system_status == SystemStatus.ERunStat...
25.285714
48
0.792844
661d17a8c6773f682204ed91c0811ec112d4c325
24,135
py
Python
jwql/website/apps/jwql/views.py
jason-neal/jwql
6d47d31aafd90f687bd70fb90369997faace4e18
[ "BSD-3-Clause" ]
null
null
null
jwql/website/apps/jwql/views.py
jason-neal/jwql
6d47d31aafd90f687bd70fb90369997faace4e18
[ "BSD-3-Clause" ]
null
null
null
jwql/website/apps/jwql/views.py
jason-neal/jwql
6d47d31aafd90f687bd70fb90369997faace4e18
[ "BSD-3-Clause" ]
null
null
null
"""Defines the views for the ``jwql`` web app. In Django, "a view function, or view for short, is simply a Python function that takes a Web request and returns a Web response" (from Django documentation). This module defines all of the views that are used to generate the various webpages used for the JWQL application....
31.061776
141
0.670893
abeba213f43ad4ab910f066643e8ff5b46c781d1
1,272
py
Python
src/systa/utils.py
ipronald/systa
0c46c99b9d04cea23d32ec34dd3f8ddadd320625
[ "MIT" ]
null
null
null
src/systa/utils.py
ipronald/systa
0c46c99b9d04cea23d32ec34dd3f8ddadd320625
[ "MIT" ]
null
null
null
src/systa/utils.py
ipronald/systa
0c46c99b9d04cea23d32ec34dd3f8ddadd320625
[ "MIT" ]
null
null
null
import time from typing import Any, Callable, TypeVar from boltons.iterutils import is_collection from boltons.typeutils import make_sentinel AnyCallable = Callable[..., Any] PredicateCallable = Callable[[AnyCallable], bool] DecoratedClass = TypeVar("DecoratedClass") dontcheck = make_sentinel("dontcheck", "dontche...
24.941176
76
0.667453
59c9ac78a3c618b30f18501626a5f64e6e0fcbbb
19,366
py
Python
myenv/lib/python3.6/site-packages/smart_open/tests/test_s3.py
hermesfeet/summarize_text
ce2d42f065f01a4ff5b16df5f0fa12cd3c9eeb3d
[ "Unlicense", "MIT" ]
1
2019-02-22T21:35:48.000Z
2019-02-22T21:35:48.000Z
myenv/lib/python3.6/site-packages/smart_open/tests/test_s3.py
hermesfeet/summarize_text
ce2d42f065f01a4ff5b16df5f0fa12cd3c9eeb3d
[ "Unlicense", "MIT" ]
null
null
null
myenv/lib/python3.6/site-packages/smart_open/tests/test_s3.py
hermesfeet/summarize_text
ce2d42f065f01a4ff5b16df5f0fa12cd3c9eeb3d
[ "Unlicense", "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import logging import gzip import io import os import uuid import unittest import boto3 import botocore.client import boto.s3.bucket import mock import moto import smart_open import smart_open.s3 BUCKET_NAME = 'test-smartopen-{}'.format(uuid.uuid4().hex) # generate random bucket (avoid race...
36.402256
113
0.646907
2a01406436d0a66acb01206313924cdfb93dea73
4,949
py
Python
vega/trainer/callbacks/visual_callback.py
jie311/vega
1bba6100ead802697e691403b951e6652a99ccae
[ "MIT" ]
null
null
null
vega/trainer/callbacks/visual_callback.py
jie311/vega
1bba6100ead802697e691403b951e6652a99ccae
[ "MIT" ]
null
null
null
vega/trainer/callbacks/visual_callback.py
jie311/vega
1bba6100ead802697e691403b951e6652a99ccae
[ "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 ...
35.099291
92
0.629824
bc294475f8f94b7cd51259d075182444c6c62ddc
5,443
py
Python
ML_Nizar/experiment2/inhoud_model_ALTERNATIVE.py
KBNLresearch/Demosaurus
9235e315d9eef9d8d64f94a90ab4fc8220670ef2
[ "Apache-2.0" ]
1
2020-06-25T16:39:35.000Z
2020-06-25T16:39:35.000Z
ML_Nizar/experiment2/inhoud_model_ALTERNATIVE.py
KBNLresearch/Demosaurus
9235e315d9eef9d8d64f94a90ab4fc8220670ef2
[ "Apache-2.0" ]
6
2020-03-06T12:31:38.000Z
2021-09-20T15:08:17.000Z
ML_Nizar/experiment2/inhoud_model_ALTERNATIVE.py
KBNLresearch/Demosaurus
9235e315d9eef9d8d64f94a90ab4fc8220670ef2
[ "Apache-2.0" ]
null
null
null
from gensim.summarization import keywords import sqlite3 import pandas as pd from pprint import pprint import gensim import numpy as np import csv import ast import math ### PART 1: MAKE AUTHOR EMBEDDINGS OF CONTENT BASED ON 75% OF DATA def get_content_data(): con = sqlite3.connect('C:/Users/nizar/Downloads/demos...
44.252033
447
0.71817
37ed2f288ed59e77b3b2d79965b2f48d5aec2a54
5,046
py
Python
office/centos/docker/ops/loggrove/build.py
auho/docker
3e33d8a7b24327c4e6e76195e35acd723d59666c
[ "MIT" ]
null
null
null
office/centos/docker/ops/loggrove/build.py
auho/docker
3e33d8a7b24327c4e6e76195e35acd723d59666c
[ "MIT" ]
null
null
null
office/centos/docker/ops/loggrove/build.py
auho/docker
3e33d8a7b24327c4e6e76195e35acd723d59666c
[ "MIT" ]
null
null
null
# Created by zhouwang on 2018/6/9. import os from settings import MYSQL_DB import subprocess import random import string import hashlib import time NEW_SUPERADMIN = False def tools(): print('Step1: Install Tools') command = 'yum install -y openldap openldap-devel' print('-->', command) status = os.sy...
31.936709
129
0.570551
1d43c61c06e5bfb390c455001b94baf16f3a96d4
1,017
py
Python
data/scripts/classes/block.py
DivyanshByte/2D-Minecraft
263118044596c358a729d61d5f4fda9fce8def86
[ "MIT" ]
16
2021-07-23T16:21:04.000Z
2022-01-08T14:29:59.000Z
data/scripts/classes/block.py
DivyanshByte/2D-Minecraft
263118044596c358a729d61d5f4fda9fce8def86
[ "MIT" ]
null
null
null
data/scripts/classes/block.py
DivyanshByte/2D-Minecraft
263118044596c358a729d61d5f4fda9fce8def86
[ "MIT" ]
4
2021-08-06T06:44:03.000Z
2021-11-21T16:42:16.000Z
import pygame import os from ...variables import * pygame.init() pygame.display.set_mode() imgs_dir = 'data/imgs/blocks' block_imgs = {} for img in os.listdir(imgs_dir): loaded_img = pygame.image.load(imgs_dir + '/' + img).convert_alpha() loaded_img = pygame.transform.scale(loaded_img, (TILE_SIZE, TILE_SIZ...
23.113636
82
0.677483
5008436aace1b8e47f6ebc012139e6ecd92acc23
5,668
py
Python
src/cfnlint/rules/resources/Configuration.py
joenye/cfn-python-lint
837aac504c58fca4a8ca0211bc57ec920c772bb4
[ "MIT-0" ]
null
null
null
src/cfnlint/rules/resources/Configuration.py
joenye/cfn-python-lint
837aac504c58fca4a8ca0211bc57ec920c772bb4
[ "MIT-0" ]
null
null
null
src/cfnlint/rules/resources/Configuration.py
joenye/cfn-python-lint
837aac504c58fca4a8ca0211bc57ec920c772bb4
[ "MIT-0" ]
null
null
null
""" Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: MIT-0 """ import six from cfnlint.rules import CloudFormationLintRule from cfnlint.rules import RuleMatch import cfnlint.helpers class Configuration(CloudFormationLintRule): """Check Base Resource Configuration""" ...
45.709677
136
0.507586
fda29b960c291d4b62ee73417596ced578ef202a
1,276
py
Python
bms_sender/generic_libs/bms_input_handler.py
clean-code-craft-tcq-1/stream-bms-data-Aruna1396
bf7c185966faeb8ff9ac98fe91e99d4f8152fef3
[ "MIT" ]
null
null
null
bms_sender/generic_libs/bms_input_handler.py
clean-code-craft-tcq-1/stream-bms-data-Aruna1396
bf7c185966faeb8ff9ac98fe91e99d4f8152fef3
[ "MIT" ]
null
null
null
bms_sender/generic_libs/bms_input_handler.py
clean-code-craft-tcq-1/stream-bms-data-Aruna1396
bf7c185966faeb8ff9ac98fe91e99d4f8152fef3
[ "MIT" ]
null
null
null
INPUT_TYPES = ['local_database'] OUTPUT_TYPES = ['console'] DEFAULT_READING_NUM = 15 DEFAULT_SPEED = 1 BMS_PARAMETERS = ['charging_temperature', 'SOC', 'charge_rate'] BMS_CHECK = ['0', 'None'] def is_within_supported_types(bms_input, bms_output): return (bms_input in INPUT_TYPES) and (bms_output in OUTPUT_TYPE...
31.9
119
0.680251
478fc38412b6d68da2bbb98fd66574468f432e86
3,011
py
Python
src/transformers/models/openai/__init__.py
liminghao1630/transformers
207594be81b8e5a8589c8b11c3b236924555d806
[ "Apache-2.0" ]
50,404
2019-09-26T09:55:55.000Z
2022-03-31T23:07:49.000Z
src/transformers/models/openai/__init__.py
liminghao1630/transformers
207594be81b8e5a8589c8b11c3b236924555d806
[ "Apache-2.0" ]
13,179
2019-09-26T10:10:57.000Z
2022-03-31T23:17:08.000Z
src/transformers/models/openai/__init__.py
liminghao1630/transformers
207594be81b8e5a8589c8b11c3b236924555d806
[ "Apache-2.0" ]
13,337
2019-09-26T10:49:38.000Z
2022-03-31T23:06:17.000Z
# flake8: noqa # There's no way to ignore "F401 '...' imported but unused" warnings in this # module, but to preserve other warnings. So, don't check this module at all. # Copyright 2020 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
34.215909
99
0.722351
440f1b16c456056b586d6878a21c5715f5d10574
5,152
py
Python
question/views.py
JCTec/CourseTaker
30428993813bd77013b61b9508c0dd57a7d0673a
[ "MIT" ]
null
null
null
question/views.py
JCTec/CourseTaker
30428993813bd77013b61b9508c0dd57a7d0673a
[ "MIT" ]
6
2020-02-28T22:24:48.000Z
2021-06-10T19:48:52.000Z
question/views.py
JCTec/CourseTaker
30428993813bd77013b61b9508c0dd57a7d0673a
[ "MIT" ]
null
null
null
from django.views.decorators.csrf import csrf_exempt from rest_framework.status import ( HTTP_400_BAD_REQUEST, HTTP_404_NOT_FOUND, HTTP_200_OK ) from rest_framework.response import Response from rest_framework.views import APIView from django.shortcuts import get_object_or_404 from django.db.models import Q...
29.272727
100
0.672748
818029fd71d75982243349b0e5c4c0e91cd90dfd
2,766
py
Python
homework-12345/homework3/test_dropout.py
easilylazy/pattern-recognition
2b95689bb3f34e4821a0211b19b76164aa6e615f
[ "MIT" ]
2
2021-03-07T14:40:23.000Z
2021-03-08T08:51:01.000Z
homework-12345/homework3/test_dropout.py
easilylazy/pattern-recognition
2b95689bb3f34e4821a0211b19b76164aa6e615f
[ "MIT" ]
null
null
null
homework-12345/homework3/test_dropout.py
easilylazy/pattern-recognition
2b95689bb3f34e4821a0211b19b76164aa6e615f
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt import tensorflow.compat.v1 as tf from datetime import datetime tf.disable_eager_execution() from network import Network from solver import train, test from plot import plot_loss_and_acc (x_train, y_train), (x_test, y_test) = tf.keras.datasets.mnist.load_data() def ...
29.425532
107
0.75235
81d70f0b5c6575868d4b515b20863aec78fa85b2
1,174
py
Python
Problem 4_1.py
rghvat/-TitlePython-Programming-A-Concise-Introduction
70019b068b44fa961d4a398b5836d2ebba00ea12
[ "BSD-3-Clause" ]
null
null
null
Problem 4_1.py
rghvat/-TitlePython-Programming-A-Concise-Introduction
70019b068b44fa961d4a398b5836d2ebba00ea12
[ "BSD-3-Clause" ]
null
null
null
Problem 4_1.py
rghvat/-TitlePython-Programming-A-Concise-Introduction
70019b068b44fa961d4a398b5836d2ebba00ea12
[ "BSD-3-Clause" ]
null
null
null
""" Problem 4_1: Write a function that will sort an alphabetic list (or list of words) into alphabetical order. Make it sort independently of whether the letters are capital or lowercase. First print out the wordlist, then sort and print out the sorted list. Here is my run on the list firstline below (note that the w...
40.482759
79
0.635434
03682aca5a6c80e47408a7026c8d29918ab114bc
4,109
py
Python
models_jittor/sequencer.py
liuruiyang98/Jittor-MLP
b86656b65cf5f18ba9eb760d1f7565ed95e7e96e
[ "MIT" ]
49
2021-10-06T11:22:19.000Z
2022-03-25T03:01:10.000Z
models_jittor/sequencer.py
liuruiyang98/Jittor-MLP
b86656b65cf5f18ba9eb760d1f7565ed95e7e96e
[ "MIT" ]
2
2021-11-08T08:06:35.000Z
2022-02-18T09:23:07.000Z
models_jittor/sequencer.py
liuruiyang98/Jittor-MLP
b86656b65cf5f18ba9eb760d1f7565ed95e7e96e
[ "MIT" ]
7
2021-10-10T03:25:27.000Z
2022-03-08T10:44:15.000Z
import jittor as jt from jittor import nn from .einops_my.layers.jittor import Reduce sequencer_settings = { 'S': [[4, 3, 8, 3], [192, 384, 384, 384], [48, 96, 96, 96], 3], 'M': [[4, 3, 14, 3], [192, 384, 384, 384], [48, 96, 96, 96], 3], 'L': [[8, 8, 16, 4], [192, 384, 384, 384], [48, 96, 96, 96], 3] } ...
36.6875
146
0.57873
65174380626282ceddeff858a1ec098171d82967
1,272
py
Python
tensor2tensor/utils/hparams_lib_test.py
kpe/tensor2tensor
453c473030c354a3d9a4c27b12bcec8942334bf4
[ "Apache-2.0" ]
34
2018-12-19T01:00:57.000Z
2021-03-26T09:36:37.000Z
tensor2tensor/utils/hparams_lib_test.py
kpe/tensor2tensor
453c473030c354a3d9a4c27b12bcec8942334bf4
[ "Apache-2.0" ]
11
2018-12-25T03:37:59.000Z
2021-08-25T14:43:58.000Z
tensor2tensor/utils/hparams_lib_test.py
kpe/tensor2tensor
453c473030c354a3d9a4c27b12bcec8942334bf4
[ "Apache-2.0" ]
9
2018-12-27T08:00:44.000Z
2020-06-08T03:05:14.000Z
# coding=utf-8 # Copyright 2019 The Tensor2Tensor Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
28.266667
74
0.747642
ba7a70487421614b5c3ebcef21f136b2beea08e6
1,628
py
Python
2/2-1. FrozenLake.py
Wonjuseo/Project101
8c49601e34f56035acd198a09428fa71f6606ca7
[ "Apache-2.0" ]
8
2017-04-22T01:56:17.000Z
2021-02-21T11:12:46.000Z
2/2-1. FrozenLake.py
Wonjuseo/Project101
8c49601e34f56035acd198a09428fa71f6606ca7
[ "Apache-2.0" ]
null
null
null
2/2-1. FrozenLake.py
Wonjuseo/Project101
8c49601e34f56035acd198a09428fa71f6606ca7
[ "Apache-2.0" ]
1
2017-08-19T09:59:40.000Z
2017-08-19T09:59:40.000Z
import gym import numpy as np import matplotlib.pyplot as plt from gym.envs.registration import register import random as pr def rargmax(vector): # random argmax m = np.max(vector) indices = np.nonzero(vector == m)[0] return pr.choice(indices) # Reward Update Q # Algorithm # For each s,a initialize ta...
25.84127
63
0.681818
879bcf81d8136ff4bb1f90a9312ff5c7812fdfb8
4,298
py
Python
youtube_dl/extractor/redtube.py
NessDan/youtube-dl
62280188e6fa692f1dd1253eb21eb4b7a5e5fc20
[ "Unlicense" ]
24
2017-03-17T10:27:12.000Z
2022-02-16T05:55:50.000Z
youtube_dl/extractor/redtube.py
travis-south/youtube-dl
dc89f968330fe9b2f0e56b07febc8cd57005f2c0
[ "Unlicense" ]
7
2017-07-26T08:15:27.000Z
2018-09-20T12:56:53.000Z
youtube_dl/extractor/redtube.py
travis-south/youtube-dl
dc89f968330fe9b2f0e56b07febc8cd57005f2c0
[ "Unlicense" ]
3
2017-03-17T10:27:13.000Z
2019-01-28T01:19:17.000Z
from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import compat_str from ..utils import ( ExtractorError, int_or_none, str_to_int, unified_strdate, ) class RedTubeIE(InfoExtractor): _VALID_URL = r'https?://(?:(?:www\.)?redtube\.com/|embed\.redtube\...
37.051724
102
0.515821
7cec3126f08de9613a813f888ca8606503846dba
4,257
py
Python
kubernetes/client/apis/apiextensions_api.py
jashandeep-sohi/kubernetes-python
e057f273069de445a2d5a250ac5fe37d79671f3b
[ "Apache-2.0" ]
1
2020-05-08T12:41:04.000Z
2020-05-08T12:41:04.000Z
kubernetes/client/apis/apiextensions_api.py
jashandeep-sohi/kubernetes-python
e057f273069de445a2d5a250ac5fe37d79671f3b
[ "Apache-2.0" ]
null
null
null
kubernetes/client/apis/apiextensions_api.py
jashandeep-sohi/kubernetes-python
e057f273069de445a2d5a250ac5fe37d79671f3b
[ "Apache-2.0" ]
2
2021-07-09T08:49:05.000Z
2021-08-03T18:08:36.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.10.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import sys import os i...
34.056
119
0.564247
717d6bb79eb52627c5940e4a01c24205b6fcb3ca
70,898
py
Python
proplot/gridspec.py
lukelbd/panplot
6cb47b9d5e719dfe34dfe1770538cf475b4abac8
[ "MIT" ]
1
2018-11-12T05:51:14.000Z
2018-11-12T05:51:14.000Z
proplot/gridspec.py
lukelbd/panplot
6cb47b9d5e719dfe34dfe1770538cf475b4abac8
[ "MIT" ]
null
null
null
proplot/gridspec.py
lukelbd/panplot
6cb47b9d5e719dfe34dfe1770538cf475b4abac8
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ The gridspec and subplot grid classes used throughout proplot. """ import inspect import itertools import re from collections.abc import MutableSequence from numbers import Integral import matplotlib.axes as maxes import matplotlib.gridspec as mgridspec import matplotlib.transforms as mtrans...
43.791229
117
0.603783
b527d835473e5401d6277e1652ca365a496ea824
4,077
py
Python
qa/rpc-tests/test_script_address2.py
aissty/rockcoin
75e15231d3b8cbf7532741f26f6f0e5a13c223e7
[ "MIT" ]
null
null
null
qa/rpc-tests/test_script_address2.py
aissty/rockcoin
75e15231d3b8cbf7532741f26f6f0e5a13c223e7
[ "MIT" ]
null
null
null
qa/rpc-tests/test_script_address2.py
aissty/rockcoin
75e15231d3b8cbf7532741f26f6f0e5a13c223e7
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test new RockCoin multisig prefix functionality. # from test_framework.test_framework import Bitcoin...
40.366337
93
0.649497