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
1c237c9dba8b34e26c598218d45a1584ae314654
77
py
Python
sample_config.py
kocams/Telegram_Itibar_Botu
11387dacedc75660c0b94945241f9bb86d785857
[ "MIT" ]
null
null
null
sample_config.py
kocams/Telegram_Itibar_Botu
11387dacedc75660c0b94945241f9bb86d785857
[ "MIT" ]
null
null
null
sample_config.py
kocams/Telegram_Itibar_Botu
11387dacedc75660c0b94945241f9bb86d785857
[ "MIT" ]
1
2022-02-17T14:47:25.000Z
2022-02-17T14:47:25.000Z
bot_token = "152562675:AAlfAtiD7nrc7DcoVnniakBHcERlQs" owner_id = 1243703097
25.666667
54
0.857143
bot_token = "152562675:AAlfAtiD7nrc7DcoVnniakBHcERlQs" owner_id = 1243703097
true
true
1c237cb71736a6404babaf429f2016736dba25aa
1,968
py
Python
examples/simple/test.py
HannaCun/GoogleNet_Deploy
4db38e97682b3982f2ca8db55b60ed32ef3ea2a5
[ "BSD-3-Clause" ]
16
2020-05-21T10:19:07.000Z
2022-03-24T07:32:22.000Z
examples/simple/test.py
HannaCun/GoogleNet_Deploy
4db38e97682b3982f2ca8db55b60ed32ef3ea2a5
[ "BSD-3-Clause" ]
2
2021-01-24T19:34:54.000Z
2021-10-02T14:37:24.000Z
examples/simple/test.py
HannaCun/GoogleNet_Deploy
4db38e97682b3982f2ca8db55b60ed32ef3ea2a5
[ "BSD-3-Clause" ]
4
2020-02-17T06:47:16.000Z
2020-05-09T04:10:51.000Z
# Copyright 2020 Lorna 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 applicable l...
31.741935
87
0.699695
import json import torch import torchvision.transforms as transforms from PIL import Image from googlenet_pytorch import GoogLeNet input_image = Image.open("img.jpg") preprocess = transforms.Compose([ transforms.Resize(256), transforms.CenterCrop(224), transforms.ToTensor(), transfor...
true
true
1c237e464ee2de86538c848b53dd9c1dcccd52c2
3,133
py
Python
pinyinutils.py
cbd32/flash-card-builder
04afaea19146f710bc3266f43ba0588849ff4e0b
[ "MIT" ]
3
2020-10-19T22:47:08.000Z
2021-08-16T13:38:57.000Z
pinyinutils.py
cbd32/flash-card-builder
04afaea19146f710bc3266f43ba0588849ff4e0b
[ "MIT" ]
1
2016-03-23T09:33:05.000Z
2016-07-23T06:30:01.000Z
pinyinutils.py
the80scalled/flash-card-builder
04afaea19146f710bc3266f43ba0588849ff4e0b
[ "MIT" ]
null
null
null
__author__ = 'Michael' import re import unittest def _get_tone_character(ch, tone): """For ch = 'o' and tone = 3, returns 'ǒ'.""" toneSymbols = "aāáǎàaeēéěèeiīíǐìioōóǒòouūúǔùuüǖǘǚǜü" #ě (also works for a lot of em) toneCharacter = None chIndex = toneSymbols.find(ch) if chIndex == -1: rais...
30.715686
106
0.59751
__author__ = 'Michael' import re import unittest def _get_tone_character(ch, tone): toneSymbols = "aāáǎàaeēéěèeiīíǐìioōóǒòouūúǔùuüǖǘǚǜü" toneCharacter = None chIndex = toneSymbols.find(ch) if chIndex == -1: raise "Couldn't find tone character for {0}!".format(ch) return toneSymbols[chIn...
true
true
1c23804648275ad4aa0e97e9a5dd26188860fc4e
708
py
Python
.history/my_classes/basic/for_loop_20210430202849.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
.history/my_classes/basic/for_loop_20210430202849.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
.history/my_classes/basic/for_loop_20210430202849.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
i = 0 # This is an example of the while loop while i < 5: print(i) i += 1 i = None # 0 # 1 # 2 # 3 # 4 for i in range(5): # This example uses the iterable object 'range' print(i) # 0 # 1 # 2 # 3 ...
15.06383
67
0.275424
i = 0 while i < 5: print(i) i += 1 i = None for i in range(5): print(i) for i in [1, 2, 3, 4]: print(i) for c in '...
true
true
1c2380bee4a1f8f4ba14b3291cac3d61be67c36f
3,512
py
Python
mpikat/core/scpi_client.py
TobiasWinchen/mpikat
46ea86d6861bcfd924daad7058de8a898ee6c6a1
[ "MIT" ]
null
null
null
mpikat/core/scpi_client.py
TobiasWinchen/mpikat
46ea86d6861bcfd924daad7058de8a898ee6c6a1
[ "MIT" ]
null
null
null
mpikat/core/scpi_client.py
TobiasWinchen/mpikat
46ea86d6861bcfd924daad7058de8a898ee6c6a1
[ "MIT" ]
null
null
null
import socket import sys import logging import coloredlogs import errno import time from tornado.gen import coroutine, Return, sleep from optparse import OptionParser logger = logging.getLogger('mpikat.scpi_client') class ScpiFailedRequest(Exception): pass class ScpiClient(object): def __init__(self, ip, por...
37.361702
111
0.586845
import socket import sys import logging import coloredlogs import errno import time from tornado.gen import coroutine, Return, sleep from optparse import OptionParser logger = logging.getLogger('mpikat.scpi_client') class ScpiFailedRequest(Exception): pass class ScpiClient(object): def __init__(self, ip, por...
true
true
1c2381873b5d74badea73421eb7506d181b8dd58
23,411
py
Python
KmerFeatures.py
biodataganache/SIEVE-Ub
c11502a5d52145262c2bf83b1c44cf9b1712019a
[ "BSD-2-Clause" ]
6
2018-10-25T14:22:51.000Z
2022-02-09T02:59:41.000Z
KmerFeatures.py
biodataganache/SIEVE-Ub
c11502a5d52145262c2bf83b1c44cf9b1712019a
[ "BSD-2-Clause" ]
15
2018-10-24T19:33:48.000Z
2020-11-13T03:39:47.000Z
KmerFeatures.py
biodataganache/SIEVE-Ub
c11502a5d52145262c2bf83b1c44cf9b1712019a
[ "BSD-2-Clause" ]
5
2018-10-16T17:46:42.000Z
2020-09-16T14:21:07.000Z
#!/usr/bin/env python """ Standalone program and module to generate SIEVE feature sets from fasta file sequence inputs. """ import os, sys, gzip, random, copy from types import * from Util.Options import * from Util.SIEVEInit import * try: from Bio import SeqIO #from Bio.Alphabet import IUPAC ...
36.636933
171
0.583657
import os, sys, gzip, random, copy from types import * from Util.Options import * from Util.SIEVEInit import * try: from Bio import SeqIO except ImportError: sys.stderr.write("BioPython not installed correctly (see http://biopython.org)\n") sys.exit(-1) OPTION_LIST = ["A program to generate fe...
true
true
1c23824736ead3ec4fb79c7fe0de79e0432f16d0
8,192
py
Python
vcstools/config.py
cplee1/vcstools_chris_duplicate
e929e01d886e6ce8c113af3b02c2590b441daa03
[ "AFL-3.0" ]
5
2020-07-01T13:18:53.000Z
2022-03-04T20:54:14.000Z
vcstools/config.py
cplee1/vcstools_chris_duplicate
e929e01d886e6ce8c113af3b02c2590b441daa03
[ "AFL-3.0" ]
44
2019-10-19T00:13:55.000Z
2022-01-01T04:42:02.000Z
vcstools/config.py
cplee1/vcstools_chris_duplicate
e929e01d886e6ce8c113af3b02c2590b441daa03
[ "AFL-3.0" ]
6
2019-10-29T10:51:51.000Z
2022-03-04T20:54:28.000Z
""" Functions to handle parsing the config file for multiple super computers """ #config data GALAXY_CONFIG = {'base_data_dir' : '/astro/mwavcs/vcs/', 'base_product_dir' : '/group/mwavcs/vcs/', 'group_account' : {'cpuq': '#SBATCH --account=pawsey0348', ...
45.010989
171
0.527344
GALAXY_CONFIG = {'base_data_dir' : '/astro/mwavcs/vcs/', 'base_product_dir' : '/group/mwavcs/vcs/', 'group_account' : {'cpuq': '#SBATCH --account=pawsey0348', 'gpuq': '#SBATCH --account=mwavcs', 'copyq': '#SBA...
true
true
1c23829fb5e89fd2968cb2a03893cd9201234d06
26,686
py
Python
mittab/apps/tab/pairing_views.py
yoitsdave/mit-tab
e0c2bb845cf816291c5db624281d98f54ff4d263
[ "MIT" ]
null
null
null
mittab/apps/tab/pairing_views.py
yoitsdave/mit-tab
e0c2bb845cf816291c5db624281d98f54ff4d263
[ "MIT" ]
null
null
null
mittab/apps/tab/pairing_views.py
yoitsdave/mit-tab
e0c2bb845cf816291c5db624281d98f54ff4d263
[ "MIT" ]
null
null
null
import random import sys import traceback import time import datetime import os import pprint from django.shortcuts import render from django.template import RequestContext from django.http import Http404, HttpResponse, HttpResponseRedirect, JsonResponse from django.contrib.auth.decorators import permission_required f...
44.402662
144
0.591359
import random import sys import traceback import time import datetime import os import pprint from django.shortcuts import render from django.template import RequestContext from django.http import Http404, HttpResponse, HttpResponseRedirect, JsonResponse from django.contrib.auth.decorators import permission_required f...
true
true
1c2383c88ce558405be445963641ea641e0a39e7
1,453
py
Python
hw1/practical_1/uva_code/optimizers.py
ixlan/Deep-learning
246e5285b6fb6508814762fddfd00d54515ccf79
[ "MIT" ]
null
null
null
hw1/practical_1/uva_code/optimizers.py
ixlan/Deep-learning
246e5285b6fb6508814762fddfd00d54515ccf79
[ "MIT" ]
null
null
null
hw1/practical_1/uva_code/optimizers.py
ixlan/Deep-learning
246e5285b6fb6508814762fddfd00d54515ccf79
[ "MIT" ]
null
null
null
""" This module implements various optimization functions for the neural networks. You should fill in code into indicated sections. """ class SGD(object): """ Implements vanilla stochastic gradient descent. """ def __call__(self, w, dw, config = None): """ Implements vanilla stochastic gradient des...
35.439024
92
0.46318
class SGD(object): def __call__(self, w, dw, config = None): if config is None: config = {} config.setdefault('learning_rate', 1e-2)
true
true
1c238416d432917fb8ff4025aecf812f10812597
2,976
py
Python
modules/historyClear.py
YottGG/The-all-in-one-discord-tool
c9a386da08db83f07b9ef35a5cea54dd6248cd1e
[ "FTL", "CNRI-Python", "CECILL-B" ]
null
null
null
modules/historyClear.py
YottGG/The-all-in-one-discord-tool
c9a386da08db83f07b9ef35a5cea54dd6248cd1e
[ "FTL", "CNRI-Python", "CECILL-B" ]
null
null
null
modules/historyClear.py
YottGG/The-all-in-one-discord-tool
c9a386da08db83f07b9ef35a5cea54dd6248cd1e
[ "FTL", "CNRI-Python", "CECILL-B" ]
null
null
null
from colored import fg, attr import requests import time import sys r = fg(241) # Setup color variables r2 = fg(255) b = fg(31) w = fg(15) def progressbar(it, prefix="", size=60, file=sys.stdout): # Setup the progress bar to be used later count = len(it) # Get the lenght of the loop def show(i, ...
33.066667
148
0.515121
from colored import fg, attr import requests import time import sys r = fg(241) r2 = fg(255) b = fg(31) w = fg(15) def progressbar(it, prefix="", size=60, file=sys.stdout): count = len(it) def show(i, user): x = int(size * i / count) file.write(f"{r2} [{b}!{r2}] {r}|{r2}{'#' ...
true
true
1c2384f819b1814c0eccd6ae35bf93fb0bae43fc
369
py
Python
py/template/test_main.py
felixb/advent-of-code-2018
11da1c3e397497f8f51e09bdd1d9701a57a3eb27
[ "MIT" ]
null
null
null
py/template/test_main.py
felixb/advent-of-code-2018
11da1c3e397497f8f51e09bdd1d9701a57a3eb27
[ "MIT" ]
null
null
null
py/template/test_main.py
felixb/advent-of-code-2018
11da1c3e397497f8f51e09bdd1d9701a57a3eb27
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 import unittest from main import run_1, run_2 class Test(unittest.TestCase): def test_1(self): with open('test-1') as f: self.assertEqual(1, run_1(f.read())) def test_2(self): with open('test-1') as f: self.assertEqual(None, run_2(f.read())) ...
17.571429
51
0.601626
import unittest from main import run_1, run_2 class Test(unittest.TestCase): def test_1(self): with open('test-1') as f: self.assertEqual(1, run_1(f.read())) def test_2(self): with open('test-1') as f: self.assertEqual(None, run_2(f.read())) if __name__ == '__mai...
true
true
1c23858cc4a207c18eebf061981600f0ce678033
1,843
py
Python
gql/subscription.py
syfun/python-gql
ea232a866fdeb4c742a046a0f6ecb374cb69154c
[ "MIT" ]
7
2019-12-21T03:34:35.000Z
2020-12-08T13:16:51.000Z
gql/subscription.py
syfun/python-gql
ea232a866fdeb4c742a046a0f6ecb374cb69154c
[ "MIT" ]
2
2020-10-27T18:18:35.000Z
2021-08-11T03:37:44.000Z
gql/subscription.py
syfun/python-gql
ea232a866fdeb4c742a046a0f6ecb374cb69154c
[ "MIT" ]
2
2019-12-21T03:35:02.000Z
2020-12-22T07:22:38.000Z
from dataclasses import dataclass from enum import Enum from typing import Any, Dict, Union # https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md PROTOCOL = 'graphql-ws' class MessageType(Enum): GQL_CONNECTION_INIT = 'connection_init' # Client -> Server GQL_CONNECTION_ACK = '...
32.333333
100
0.66739
from dataclasses import dataclass from enum import Enum from typing import Any, Dict, Union PROTOCOL = 'graphql-ws' class MessageType(Enum): GQL_CONNECTION_INIT = 'connection_init' GQL_CONNECTION_ACK = 'connection_ack' GQL_CONNECTION_ERROR = 'connection_error' GQL_CONNECTION_KEEP_ALIVE =...
true
true
1c23871481812118788b4e08c717647059121871
23,838
py
Python
django/core/management/validation.py
pomarec/django
98514849dce07acfaa224a90a784bba9d97249e5
[ "BSD-3-Clause" ]
1
2015-06-14T07:55:29.000Z
2015-06-14T07:55:29.000Z
django/core/management/validation.py
pomarec/django
98514849dce07acfaa224a90a784bba9d97249e5
[ "BSD-3-Clause" ]
null
null
null
django/core/management/validation.py
pomarec/django
98514849dce07acfaa224a90a784bba9d97249e5
[ "BSD-3-Clause" ]
null
null
null
import collections import sys from django.conf import settings from django.core.management.color import color_style from django.utils.encoding import force_str from django.utils.itercompat import is_iterable from django.utils import six class ModelErrorCollection: def __init__(self, outfile=sys.stdout): ...
63.908847
264
0.554493
import collections import sys from django.conf import settings from django.core.management.color import color_style from django.utils.encoding import force_str from django.utils.itercompat import is_iterable from django.utils import six class ModelErrorCollection: def __init__(self, outfile=sys.stdout): ...
true
true
1c2388c0e81ef2cb06e284b4583ab73059984232
395
py
Python
src/0556.next-greater-element-iii/next-greater-element-iii.py
lyphui/Just-Code
e0c3c3ecb67cb805080ff686e88522b2bffe7741
[ "MIT" ]
782
2019-11-19T08:20:49.000Z
2022-03-25T06:59:09.000Z
src/0556.next-greater-element-iii/next-greater-element-iii.py
Heitao5200/Just-Code
5bb3ee485a103418e693b7ec8e26dc84f3691c79
[ "MIT" ]
1
2021-03-04T12:21:01.000Z
2021-03-05T01:23:54.000Z
src/0556.next-greater-element-iii/next-greater-element-iii.py
Heitao5200/Just-Code
5bb3ee485a103418e693b7ec8e26dc84f3691c79
[ "MIT" ]
155
2019-11-20T08:20:42.000Z
2022-03-19T07:28:09.000Z
class Solution: def nextGreaterElement(self, n: int) -> int: n = list(str(n)) i = j = len(n) - 1 while i and n[i-1] >= n[i]: i -= 1 if not i: return -1 while n[j] <= n[i-1]: j -= 1 n[i-1], n[j] = n[j], n[i-1] n = int(''.join...
28.214286
48
0.367089
class Solution: def nextGreaterElement(self, n: int) -> int: n = list(str(n)) i = j = len(n) - 1 while i and n[i-1] >= n[i]: i -= 1 if not i: return -1 while n[j] <= n[i-1]: j -= 1 n[i-1], n[j] = n[j], n[i-1] n = int(''.join...
true
true
1c23890a54c22e0bdebac689a33638e2eb4c7cdf
162
py
Python
model/type.py
buddyli/android_intership
d4ab90e48472f10623cda9b64b798df924968ab5
[ "Apache-2.0" ]
null
null
null
model/type.py
buddyli/android_intership
d4ab90e48472f10623cda9b64b798df924968ab5
[ "Apache-2.0" ]
null
null
null
model/type.py
buddyli/android_intership
d4ab90e48472f10623cda9b64b798df924968ab5
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python #-*- encoding:utf-8 -*- #Filename:type.py, 类型对象 from pony.orm import * from database import d class Type(db.Entity): __table__ = 'type'
14.727273
23
0.685185
from pony.orm import * from database import d class Type(db.Entity): __table__ = 'type'
true
true
1c23895229493f75095586ce39d360b36682bd1c
3,969
py
Python
test/csv2netcdf-hydroprop-fulltable.py
cybergis/nfie-inunmap
8efb7c08759a3be651afef195d8cecd3f9f9fabd
[ "MIT" ]
21
2016-04-08T01:00:48.000Z
2021-06-26T06:48:43.000Z
test/csv2netcdf-hydroprop-fulltable.py
cybergis/nfie-inunmap
8efb7c08759a3be651afef195d8cecd3f9f9fabd
[ "MIT" ]
9
2016-04-04T05:38:32.000Z
2016-10-27T15:39:05.000Z
test/csv2netcdf-hydroprop-fulltable.py
cybergis/nfie-inunmap
8efb7c08759a3be651afef195d8cecd3f9f9fabd
[ "MIT" ]
9
2016-03-18T15:58:59.000Z
2020-05-17T23:26:27.000Z
# aggregate HUC6 unit level hydraulic property table files (netcdf) to CONUS # Yan Y. Liu <yanliu@illinois.edu> # 10/31/2016 import sys import os import time import getopt import glob import shutil import re import osr import netCDF4 import numpy as np import pandas as pd import xarray as xr # convert hydro property ...
40.5
200
0.623583
import sys import os import time import getopt import glob import shutil import re import osr import netCDF4 import numpy as np import pandas as pd import xarray as xr @profile def merge2netcdf(ddir = None, of = None): od = None wildcard = os.path.join(ddir, '*') dlist = glob.glob(wildcar...
false
true
1c23896e65ed85f868343667c69f4a902b6ad41d
5,063
py
Python
students/K33401/Klishin_Nikita/Ir_1/task_04/server3.py
ShubhamKunal/ITMO_ICT_WebDevelopment_2020-2021
bb91c91a56d21cec2b12ae4cc722eaa652a88420
[ "MIT" ]
4
2020-09-03T15:41:42.000Z
2021-12-24T15:28:20.000Z
students/K33401/Klishin_Nikita/Ir_1/task_04/server3.py
ShubhamKunal/ITMO_ICT_WebDevelopment_2020-2021
bb91c91a56d21cec2b12ae4cc722eaa652a88420
[ "MIT" ]
48
2020-09-13T20:22:42.000Z
2021-04-30T11:13:30.000Z
students/K33401/Klishin_Nikita/Ir_1/task_04/server3.py
ShubhamKunal/ITMO_ICT_WebDevelopment_2020-2021
bb91c91a56d21cec2b12ae4cc722eaa652a88420
[ "MIT" ]
69
2020-09-06T10:32:37.000Z
2021-11-28T18:13:17.000Z
import socket import threading import time import queue class ClientHandler: def __init__(self, client_id, socket, addr, main_mailbox): super().__init__() self.client_id = client_id self.nickname = "Anonim" self.socket = socket self.addr = addr self.mailbox = queue....
31.447205
100
0.590559
import socket import threading import time import queue class ClientHandler: def __init__(self, client_id, socket, addr, main_mailbox): super().__init__() self.client_id = client_id self.nickname = "Anonim" self.socket = socket self.addr = addr self.mailbox = queue....
true
true
1c238b9b5ff31e5a4276b430ebb8344f84676e25
3,349
py
Python
python/croatianbot/Twitter.py
JaderDias/gcloud-twitter-bot
9d219b7e9e293d62fbcc146ff93bed5190c1c6ea
[ "MIT" ]
null
null
null
python/croatianbot/Twitter.py
JaderDias/gcloud-twitter-bot
9d219b7e9e293d62fbcc146ff93bed5190c1c6ea
[ "MIT" ]
null
null
null
python/croatianbot/Twitter.py
JaderDias/gcloud-twitter-bot
9d219b7e9e293d62fbcc146ff93bed5190c1c6ea
[ "MIT" ]
null
null
null
from Logger import logger import base64 import hashlib import json import os import re import requests from requests_oauthlib import OAuth2Session from requests.auth import HTTPBasicAuth def get_token(\ client_id: str, \ client_secret: str, \ refresh_token: str) -> dict: # Replace the foll...
33.49
221
0.678411
from Logger import logger import base64 import hashlib import json import os import re import requests from requests_oauthlib import OAuth2Session from requests.auth import HTTPBasicAuth def get_token(\ client_id: str, \ client_secret: str, \ refresh_token: str) -> dict: redirect_uri ...
true
true
1c238ba0abe4d7d7f5082653701b114b78be9ff3
1,338
py
Python
update_firewall.py
tjwebb/gcp-firewall-dynamic-ip
87a53fd90fd82b0fb979eb09f6d60b9d6c10c6c8
[ "Apache-2.0" ]
2
2019-11-17T03:25:07.000Z
2019-11-17T20:45:21.000Z
update_firewall.py
tjwebb/gcp-firewall-dynamic-ip
87a53fd90fd82b0fb979eb09f6d60b9d6c10c6c8
[ "Apache-2.0" ]
null
null
null
update_firewall.py
tjwebb/gcp-firewall-dynamic-ip
87a53fd90fd82b0fb979eb09f6d60b9d6c10c6c8
[ "Apache-2.0" ]
null
null
null
import sys import re import urllib.request from googleapiclient import discovery from oauth2client.client import GoogleCredentials location = sys.argv[1] project = sys.argv[2] rule = sys.argv[3] # 1. get current ip my_ip = urllib.request.urlopen("https://{location}-{project}.cloudfunctions.net/checkip".format(locatio...
29.733333
155
0.733184
import sys import re import urllib.request from googleapiclient import discovery from oauth2client.client import GoogleCredentials location = sys.argv[1] project = sys.argv[2] rule = sys.argv[3] my_ip = urllib.request.urlopen("https://{location}-{project}.cloudfunctions.net/checkip".format(location=location, project...
true
true
1c238c131d461908617ec9ce5ecacb13be55f18a
759
py
Python
neighbours/forms.py
shee1998/neighborhood
fa7f53ce27fcd3d38641fd795c634e6101bd1c5d
[ "MIT" ]
null
null
null
neighbours/forms.py
shee1998/neighborhood
fa7f53ce27fcd3d38641fd795c634e6101bd1c5d
[ "MIT" ]
null
null
null
neighbours/forms.py
shee1998/neighborhood
fa7f53ce27fcd3d38641fd795c634e6101bd1c5d
[ "MIT" ]
1
2019-09-11T09:15:31.000Z
2019-09-11T09:15:31.000Z
from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User from .models import Neighborhood,Occupants,Business from django import forms class RegistrationForm(UserCreationForm): class Meta: model=User fields= ['username','email','password1','password2'] ...
25.3
75
0.613966
from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User from .models import Neighborhood,Occupants,Business from django import forms class RegistrationForm(UserCreationForm): class Meta: model=User fields= ['username','email','password1','password2'] ...
true
true
1c238c82e2fd260edc1ebfa94136b2bb624f5946
1,250
py
Python
configs/classification/matching_net/cub/matching-net_resnet12_1xb105_cub_5way-5shot.py
BIGWangYuDong/mmfewshot
dac097afc92df176bc2de76b7c90968584865197
[ "Apache-2.0" ]
376
2021-11-23T13:29:57.000Z
2022-03-30T07:22:14.000Z
configs/classification/matching_net/cub/matching-net_resnet12_1xb105_cub_5way-5shot.py
BIGWangYuDong/mmfewshot
dac097afc92df176bc2de76b7c90968584865197
[ "Apache-2.0" ]
51
2021-11-23T14:45:08.000Z
2022-03-30T03:37:15.000Z
configs/classification/matching_net/cub/matching-net_resnet12_1xb105_cub_5way-5shot.py
BIGWangYuDong/mmfewshot
dac097afc92df176bc2de76b7c90968584865197
[ "Apache-2.0" ]
56
2021-11-23T14:02:27.000Z
2022-03-31T09:01:50.000Z
_base_ = [ '../../_base_/meta_test/cub_meta-test_5way-5shot.py', '../../_base_/runtime/iter_based_runtime.py', '../../_base_/schedules/adam_100k_iter.py' ] img_size = 84 img_norm_cfg = dict( mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) train_pipeline = [ dict(type='Load...
30.487805
77
0.6296
_base_ = [ '../../_base_/meta_test/cub_meta-test_5way-5shot.py', '../../_base_/runtime/iter_based_runtime.py', '../../_base_/schedules/adam_100k_iter.py' ] img_size = 84 img_norm_cfg = dict( mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) train_pipeline = [ dict(type='Load...
true
true
1c238da61eb93999361fd54d5ec58c32667427c7
1,339
py
Python
pytorch/libs/support/logging_stdout.py
ishine/asv-subtools
597dcb29a772b8113dbe7ab64f0d4cc1da298707
[ "Apache-2.0" ]
370
2020-05-31T16:28:08.000Z
2022-03-24T07:27:50.000Z
pytorch/libs/support/logging_stdout.py
ts0923/asv-subtools
a678b8f3327de0e99c445a79a9e91e5e0e006b11
[ "Apache-2.0" ]
35
2020-07-01T12:08:31.000Z
2021-12-15T03:18:14.000Z
pytorch/libs/support/logging_stdout.py
ts0923/asv-subtools
a678b8f3327de0e99c445a79a9e91e5e0e006b11
[ "Apache-2.0" ]
119
2020-06-08T11:27:09.000Z
2022-03-31T05:31:53.000Z
# -*- coding:utf-8 -*- # Reference: https://stackoverflow.com/questions/1383254/logging-streamhandler-and-standard-streams/55494220#55494220 import sys, logging, threading def _logging_handle(self, record): self.STREAM_LOCKER = getattr(self, "STREAM_LOCKER", threading.RLock()) if self.stream in (sys.stdout, ...
35.236842
117
0.699776
sys, logging, threading def _logging_handle(self, record): self.STREAM_LOCKER = getattr(self, "STREAM_LOCKER", threading.RLock()) if self.stream in (sys.stdout, sys.stderr) and record.levelname in self.FIX_LEVELS: try: self.STREAM_LOCKER.acquire() self.stream = sys.stdout ...
true
true
1c238de9f79c634131e6fac6178117ed248193ec
737
py
Python
externalservices/atlassian_cloud_jira.py
devopsguys/dataloop-checks
69cec6f1e489d50b51a5b1f53da1ac67ccde16f4
[ "MIT" ]
1
2019-05-02T16:15:18.000Z
2019-05-02T16:15:18.000Z
externalservices/atlassian_cloud_jira.py
devopsguys/dataloop-checks
69cec6f1e489d50b51a5b1f53da1ac67ccde16f4
[ "MIT" ]
null
null
null
externalservices/atlassian_cloud_jira.py
devopsguys/dataloop-checks
69cec6f1e489d50b51a5b1f53da1ac67ccde16f4
[ "MIT" ]
null
null
null
#!/usr/bin/env python # #### External Services Monitoring Scripts # # # Author: Matthew Macdonald-Wallace # (c) DevOpsGuys Ltd 2016 # Licensed under the MIT Software License import sys import json import requests status_url = "https://x67gp49yvrzv.statuspage.io/api/v2/summary.json" status_data = requests.get(status_ur...
23.774194
69
0.687924
tatus_data = requests.get(status_url) status_json = json.loads(status_data.text) exit_code = 3 message = "UNKNOWN" for component in status_json['components']: if component['name'] == 'JIRA Cloud': if component['status'] == 'operational': exit_code = 0 message = "JIRA Cloud is onlin...
false
true
1c238eb209c54ef5d9de97c56f6a816314e622b2
4,431
py
Python
ucsmsdk/mometa/memory/MemoryPersistentMemoryLogicalNamespace.py
Kego/ucsmsdk
244f283a5c295cf746110bb96686d079b19927ce
[ "Apache-2.0" ]
78
2015-11-30T14:10:05.000Z
2022-02-13T00:29:08.000Z
ucsmsdk/mometa/memory/MemoryPersistentMemoryLogicalNamespace.py
Kego/ucsmsdk
244f283a5c295cf746110bb96686d079b19927ce
[ "Apache-2.0" ]
113
2015-11-20T09:42:46.000Z
2022-03-16T16:53:29.000Z
ucsmsdk/mometa/memory/MemoryPersistentMemoryLogicalNamespace.py
Kego/ucsmsdk
244f283a5c295cf746110bb96686d079b19927ce
[ "Apache-2.0" ]
86
2015-12-12T08:22:18.000Z
2022-01-23T03:56:34.000Z
"""This module contains the general information for MemoryPersistentMemoryLogicalNamespace ManagedObject.""" from ...ucsmo import ManagedObject from ...ucscoremeta import MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class MemoryPersistentMemoryLogicalNamespaceConsts: MODE_BLOCK = "block" MODE_RA...
56.088608
281
0.670729
from ...ucsmo import ManagedObject from ...ucscoremeta import MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class MemoryPersistentMemoryLogicalNamespaceConsts: MODE_BLOCK = "block" MODE_RAW = "raw" SOCKET_ID_SOCKET_1 = "socket-1" SOCKET_ID_SOCKET_2 = "socket-2" SOCKET_ID_SOCKET_3 = "s...
true
true
1c238eb6cc7edccac3618006b5d909a798154e52
101,561
py
Python
release/scripts/mgear/shifter/guide.py
yamahigashi/mgear4
d439a69bbdc0ec727cded924a616b14194dfbe00
[ "MIT" ]
72
2020-09-28T20:00:59.000Z
2022-03-25T14:35:14.000Z
release/scripts/mgear/shifter/guide.py
yamahigashi/mgear4
d439a69bbdc0ec727cded924a616b14194dfbe00
[ "MIT" ]
101
2020-09-28T19:53:53.000Z
2022-03-31T01:44:41.000Z
release/scripts/mgear/shifter/guide.py
yamahigashi/mgear4
d439a69bbdc0ec727cded924a616b14194dfbe00
[ "MIT" ]
32
2020-10-09T10:49:45.000Z
2022-03-31T08:27:37.000Z
# Built-in import datetime import getpass import imp import inspect import json import os import shutil import subprocess import sys import traceback from functools import partial # pymel import pymel.core as pm from pymel.core import datatypes # mgear import mgear from mgear.core import attribute, dag, vector, pyqt...
39.227887
79
0.579189
import datetime import getpass import imp import inspect import json import os import shutil import subprocess import sys import traceback from functools import partial import pymel.core as pm from pymel.core import datatypes import mgear from mgear.core import attribute, dag, vector, pyqt, skin, string, fcurve f...
true
true
1c238ef8442e896d6f1da7aad1fd5198a6060efe
29,956
py
Python
api/collections/views.py
aaxelb/osf.io
9bd39aae2c98ce3d3bb50a45bb17739bab424d63
[ "Apache-2.0" ]
null
null
null
api/collections/views.py
aaxelb/osf.io
9bd39aae2c98ce3d3bb50a45bb17739bab424d63
[ "Apache-2.0" ]
5
2017-09-14T18:04:12.000Z
2017-10-03T17:43:55.000Z
api/collections/views.py
aaxelb/osf.io
9bd39aae2c98ce3d3bb50a45bb17739bab424d63
[ "Apache-2.0" ]
1
2019-07-16T00:14:49.000Z
2019-07-16T00:14:49.000Z
from rest_framework import generics, permissions as drf_permissions from rest_framework.exceptions import ValidationError, NotFound, PermissionDenied from framework.auth.oauth_scopes import CoreScopes from api.base import generic_bulk_views as bulk_views from api.base import permissions as base_permissions from api.b...
40.535859
162
0.636233
from rest_framework import generics, permissions as drf_permissions from rest_framework.exceptions import ValidationError, NotFound, PermissionDenied from framework.auth.oauth_scopes import CoreScopes from api.base import generic_bulk_views as bulk_views from api.base import permissions as base_permissions from api.b...
true
true
1c238f27d733cd76bfad52dd3c3c59051363a75c
390
py
Python
ABC/abc151-abc200/abc168/a.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
2
2020-06-12T09:54:23.000Z
2021-05-04T01:34:07.000Z
ABC/abc151-abc200/abc168/a.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
961
2020-06-23T07:26:22.000Z
2022-03-31T21:34:52.000Z
ABC/abc151-abc200/abc168/a.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
null
null
null
# -*- coding: utf-8 -*- def main(): n = str(input()) digit = n[-1] if digit == '3': print('bon') elif digit == '0': print('pon') elif digit == '1': print('pon') elif digit == '6': print('pon') elif digit == '8': print('pon') els...
16.25
27
0.397436
def main(): n = str(input()) digit = n[-1] if digit == '3': print('bon') elif digit == '0': print('pon') elif digit == '1': print('pon') elif digit == '6': print('pon') elif digit == '8': print('pon') else: print('hon')...
true
true
1c238f3c4994d72ae2c1d9837a60de9bce5e820f
3,817
py
Python
gorilla3d/nn/modules/votenet/vote_module.py
Gorilla-Lab-SCUT/gorilla-3d
399ed8616781a0fbc462f655c0e80c258c5a5207
[ "MIT" ]
6
2021-08-30T14:52:05.000Z
2022-02-28T19:37:14.000Z
gorilla3d/nn/modules/votenet/vote_module.py
Gorilla-Lab-SCUT/gorilla-3d
399ed8616781a0fbc462f655c0e80c258c5a5207
[ "MIT" ]
null
null
null
gorilla3d/nn/modules/votenet/vote_module.py
Gorilla-Lab-SCUT/gorilla-3d
399ed8616781a0fbc462f655c0e80c258c5a5207
[ "MIT" ]
3
2021-12-25T02:17:51.000Z
2022-02-23T21:53:16.000Z
# Copyright (c) Gorilla-Lab. All rights reserved. import torch from torch import nn as nn from gorilla.nn.conv import GorillaConv class VoteModule(nn.Module): """Vote module. Generate votes from seed point features. Args: in_channels (int): Number of channels of seed point features. vote_...
40.606383
79
0.548598
import torch from torch import nn as nn from gorilla.nn.conv import GorillaConv class VoteModule(nn.Module): def __init__(self, in_channels, vote_per_seed=1, conv_channels=(16, 16), norm_cfg=dict(type="BN1d"), norm_feats=True):...
true
true
1c238fa7aa53b8d7c6620cb5953b07ec4b142cfd
1,474
py
Python
views.py
LucasHollas/CRUD_Django
a0add0fa382f19ed76b1cc7dac654e5f5e8e4a91
[ "MIT" ]
null
null
null
views.py
LucasHollas/CRUD_Django
a0add0fa382f19ed76b1cc7dac654e5f5e8e4a91
[ "MIT" ]
null
null
null
views.py
LucasHollas/CRUD_Django
a0add0fa382f19ed76b1cc7dac654e5f5e8e4a91
[ "MIT" ]
null
null
null
from django import db from django.core import paginator from django.shortcuts import redirect, render from app.forms import CargosForm from app.models import cargos from django.core.paginator import Paginator def home(request): data = {} search = request.GET.get('search') if search: all = data['db'...
26.8
72
0.640434
from django import db from django.core import paginator from django.shortcuts import redirect, render from app.forms import CargosForm from app.models import cargos from django.core.paginator import Paginator def home(request): data = {} search = request.GET.get('search') if search: all = data['db'...
true
true
1c23900f44ad8134669889e036ab7805f4de6944
1,266
py
Python
scripts/pidof.py
alexanha/psutil
8455119262647e898e0aee0dc52774b5696cf4a4
[ "BSD-3-Clause" ]
7
2017-04-08T13:08:47.000Z
2021-01-28T22:46:51.000Z
scripts/pidof.py
alexanha/psutil
8455119262647e898e0aee0dc52774b5696cf4a4
[ "BSD-3-Clause" ]
null
null
null
scripts/pidof.py
alexanha/psutil
8455119262647e898e0aee0dc52774b5696cf4a4
[ "BSD-3-Clause" ]
4
2019-04-21T14:56:19.000Z
2021-04-14T22:59:37.000Z
#!/usr/bin/env python # Copyright (c) 2009, Giampaolo Rodola', karthikrev. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ A clone of 'pidof' cmdline utility. $ pidof python 1140 1138 1136 1134 1133 1129 1127 1125 1121 1120 1119 """ from...
22.607143
73
0.545024
# Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from __future__ import print_function import psutil import sys def pidof(pgname): pids = [] for proc in psutil.process_iter(): with proc.oneshot(): # search for matches in the proces...
true
true
1c2390c7bce3bcdfcfc7e32900319e8c07211e06
3,161
py
Python
assignment2/cs231n/layer_utils.py
lalithnag/cs231n
ed540c4ed06a6ee01966314e4106b8c44f58546b
[ "MIT" ]
22
2019-07-15T08:26:31.000Z
2022-01-17T06:29:17.000Z
assignment2/cs231n/layer_utils.py
lalithnag/cs231n
ed540c4ed06a6ee01966314e4106b8c44f58546b
[ "MIT" ]
26
2020-03-24T17:18:21.000Z
2022-03-11T23:54:37.000Z
assignment2/cs231n/layer_utils.py
lalithnag/cs231n
ed540c4ed06a6ee01966314e4106b8c44f58546b
[ "MIT" ]
8
2019-07-17T09:13:11.000Z
2021-04-16T11:20:51.000Z
pass from cs231n.layers import * from cs231n.fast_layers import * def affine_relu_forward(x, w, b): """ Convenience layer that performs an affine transform followed by a ReLU Inputs: - x: Input to the affine layer - w, b: Weights for the affine layer Returns a tuple of: - out: Output fro...
29.542056
74
0.686808
pass from cs231n.layers import * from cs231n.fast_layers import * def affine_relu_forward(x, w, b): a, fc_cache = affine_forward(x, w, b) out, relu_cache = relu_forward(a) cache = (fc_cache, relu_cache) return out, cache def affine_relu_backward(dout, cache): fc_cache, relu_cache = cache da ...
true
true
1c239108f410bdc0d9bcd661a62d3f86f8b4e209
16,003
py
Python
tests/components/flux_led/test_config_flow.py
DoctorU/core
5b218d7e1c4164e32d41473977459cbaf23adf42
[ "Apache-2.0" ]
1
2019-03-21T14:20:48.000Z
2019-03-21T14:20:48.000Z
tests/components/flux_led/test_config_flow.py
DoctorU/core
5b218d7e1c4164e32d41473977459cbaf23adf42
[ "Apache-2.0" ]
66
2020-10-15T06:45:11.000Z
2022-03-30T23:05:28.000Z
tests/components/flux_led/test_config_flow.py
DoctorU/core
5b218d7e1c4164e32d41473977459cbaf23adf42
[ "Apache-2.0" ]
null
null
null
"""Define tests for the Flux LED/Magic Home config flow.""" from __future__ import annotations from unittest.mock import patch import pytest from homeassistant import config_entries, setup from homeassistant.components.flux_led.const import ( CONF_CUSTOM_EFFECT_COLORS, CONF_CUSTOM_EFFECT_SPEED_PCT, CONF_...
35.017505
89
0.672124
from __future__ import annotations from unittest.mock import patch import pytest from homeassistant import config_entries, setup from homeassistant.components.flux_led.const import ( CONF_CUSTOM_EFFECT_COLORS, CONF_CUSTOM_EFFECT_SPEED_PCT, CONF_CUSTOM_EFFECT_TRANSITION, DOMAIN, MODE_AUTO, MOD...
true
true
1c2391605832e2a1f072daa24293194c6a2ccc22
26,264
py
Python
pypop/prv.py
numericalalgorithmsgroup/pypop
b8d0756f10bfb8db1466a2691c45ef9ed7c77194
[ "BSD-3-Clause-Clear" ]
12
2019-10-30T17:29:41.000Z
2022-02-21T03:13:37.000Z
pypop/prv.py
numericalalgorithmsgroup/pypop
b8d0756f10bfb8db1466a2691c45ef9ed7c77194
[ "BSD-3-Clause-Clear" ]
37
2019-10-18T11:54:44.000Z
2021-02-25T14:10:41.000Z
pypop/prv.py
numericalalgorithmsgroup/pypop
b8d0756f10bfb8db1466a2691c45ef9ed7c77194
[ "BSD-3-Clause-Clear" ]
6
2019-10-18T12:02:51.000Z
2022-02-21T03:13:50.000Z
#!/usr/bin/env python # SPDX-License-Identifier: BSD-3-Clause-Clear # Copyright (c) 2019, The Numerical Algorithms Group, Ltd. All rights reserved. """\ PRV Trace Loader ---------------- Support for directly loading PRV trace data as Pandas dataframes """ import pandas import numpy from hashlib import sha1 from war...
36.835905
89
0.553343
import pandas import numpy from hashlib import sha1 from warnings import warn from collections import OrderedDict from csv import writer as csvwriter from io import StringIO from pypop.utils.io import zipopen from pypop.utils.pandas import HDFStoreContext from pypop.utils.exceptions import WrongLoaderError from...
true
true
1c2392165640571c1527e3b70ccf6f068dc83ba7
3,906
py
Python
train.py
MC-Zealot/transformer
581409b815326b21f303afafadae27f67e3b6e69
[ "Apache-2.0" ]
null
null
null
train.py
MC-Zealot/transformer
581409b815326b21f303afafadae27f67e3b6e69
[ "Apache-2.0" ]
null
null
null
train.py
MC-Zealot/transformer
581409b815326b21f303afafadae27f67e3b6e69
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- #/usr/bin/python3 ''' Feb. 2019 by kyubyong park. kbpark.linguist@gmail.com. https://www.github.com/kyubyong/transformer ''' import tensorflow as tf from model import Transformer from tqdm import tqdm from data_load import get_batch from utils import save_hparams, save_variable_specs, get_hypot...
36.504673
101
0.650282
import tensorflow as tf from model import Transformer from tqdm import tqdm from data_load import get_batch from utils import save_hparams, save_variable_specs, get_hypotheses, calc_bleu import os from hparams import Hparams import math import logging logging.basicConfig(level=logging.INFO) logging.info("# hparam...
true
true
1c2392602d69069b6ac61ad9ea18a77a48acaa54
510
py
Python
main/templatetags/discord.py
SentF/henix
960636f4ffa053ef26016a37bd895801ce47c099
[ "Unlicense" ]
null
null
null
main/templatetags/discord.py
SentF/henix
960636f4ffa053ef26016a37bd895801ce47c099
[ "Unlicense" ]
null
null
null
main/templatetags/discord.py
SentF/henix
960636f4ffa053ef26016a37bd895801ce47c099
[ "Unlicense" ]
null
null
null
from allauth.socialaccount.models import SocialAccount from django import template from django.core.exceptions import ObjectDoesNotExist from django.templatetags.static import static register = template.Library() @register.filter(name='get_avatar') def get_avatar(value): try: data = SocialAccount.objects...
30
82
0.754902
from allauth.socialaccount.models import SocialAccount from django import template from django.core.exceptions import ObjectDoesNotExist from django.templatetags.static import static register = template.Library() @register.filter(name='get_avatar') def get_avatar(value): try: data = SocialAccount.objects...
true
true
1c239319ac922b5b189d5156c9bdd468a2299743
4,012
py
Python
kubernetes/client/models/v1_config_map_env_source.py
sgwilliams-ebsco/python
35e6406536c96d4769ff7e2a02bf0fdcb902a509
[ "Apache-2.0" ]
1
2021-06-10T23:44:11.000Z
2021-06-10T23:44:11.000Z
kubernetes/client/models/v1_config_map_env_source.py
sgwilliams-ebsco/python
35e6406536c96d4769ff7e2a02bf0fdcb902a509
[ "Apache-2.0" ]
null
null
null
kubernetes/client/models/v1_config_map_env_source.py
sgwilliams-ebsco/python
35e6406536c96d4769ff7e2a02bf0fdcb902a509
[ "Apache-2.0" ]
1
2018-11-06T16:33:43.000Z
2018-11-06T16:33:43.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.12.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re...
25.883871
119
0.559571
from pprint import pformat from six import iteritems import re class V1ConfigMapEnvSource(object): swagger_types = { 'name': 'str', 'optional': 'bool' } attribute_map = { 'name': 'name', 'optional': 'optional' } def __init__(self, name=None, optional=None): ...
true
true
1c2393445adc6a3c90da3e8885d9845a9e535522
4,846
py
Python
mit/6.006/r02/docdist1.py
abrantesasf/algoritmos
37a599d71f41b45ec585577b74aa2b060ad4cf87
[ "MIT" ]
3
2017-02-15T20:55:04.000Z
2018-09-26T18:48:24.000Z
mit/6.006/r02/docdist1.py
abrantesasf/algoritmos
37a599d71f41b45ec585577b74aa2b060ad4cf87
[ "MIT" ]
4
2017-10-07T18:59:20.000Z
2019-10-08T05:43:25.000Z
mit/6.006/r02/docdist1.py
abrantesasf/algoritmos
37a599d71f41b45ec585577b74aa2b060ad4cf87
[ "MIT" ]
2
2018-12-01T20:40:05.000Z
2021-11-26T02:53:06.000Z
#!/usr/bin/python # docdist1.py - initial version of document distance # # Original version by Ronald L. Rivest on February 14, 2007 # Revision by Erik D. Demaine on September 12, 2011 # # Usage: # docdist1.py filename1 filename2 # # This program computes the "distance" between two text files # as the...
32.52349
80
0.612464
import math import sys def read_file(filename): """ Read the text file with the given filename; return a list of the lines of text in the file. """ try: f = open(filename, 'r') return f.readlines() except IOError: p...
false
true
1c23943febacd8682430eaaa2ff2b34be2205b63
1,010
py
Python
source/analysis/setup/train_test_splitter.py
marta18a/sleep_classifiers
75aaae37dafe752909cf56351911e246a4febb4d
[ "MIT" ]
97
2019-02-18T20:19:21.000Z
2022-03-30T05:01:44.000Z
source/analysis/setup/train_test_splitter.py
marta18a/sleep_classifiers
75aaae37dafe752909cf56351911e246a4febb4d
[ "MIT" ]
13
2019-10-29T05:53:11.000Z
2022-03-14T21:38:49.000Z
source/analysis/setup/train_test_splitter.py
marta18a/sleep_classifiers
75aaae37dafe752909cf56351911e246a4febb4d
[ "MIT" ]
49
2019-06-03T23:22:19.000Z
2022-03-30T05:01:40.000Z
import random import numpy as np from source.analysis.setup.data_split import DataSplit class TrainTestSplitter(object): @staticmethod def leave_one_out(subject_ids): splits = [] for index in range(len(subject_ids)): training_set = subject_ids.copy() testing_set = [...
25.897436
88
0.656436
import random import numpy as np from source.analysis.setup.data_split import DataSplit class TrainTestSplitter(object): @staticmethod def leave_one_out(subject_ids): splits = [] for index in range(len(subject_ids)): training_set = subject_ids.copy() testing_set = [...
true
true
1c2394ad7d17d30dbd139145c1a70a3c114749b3
2,882
py
Python
movie_recomendation_system/movie_recomendation.py
varunscyther/DataStructureUsingPython
ee29e37172f224621d8ad2a36dc5de9bce3c886f
[ "MIT" ]
null
null
null
movie_recomendation_system/movie_recomendation.py
varunscyther/DataStructureUsingPython
ee29e37172f224621d8ad2a36dc5de9bce3c886f
[ "MIT" ]
null
null
null
movie_recomendation_system/movie_recomendation.py
varunscyther/DataStructureUsingPython
ee29e37172f224621d8ad2a36dc5de9bce3c886f
[ "MIT" ]
1
2022-03-02T19:34:06.000Z
2022-03-02T19:34:06.000Z
import itertools import statistics def get_highest_rated_movie(list_of_movies, list_of_similar_movies, user_movies_seen_list) : global discussability, similar_movies_adjacency_list, similar_movies_adjacency_graph, rating_dic discussability = {} rating_dic = {} similar_movies_adjacency_graph = [[0 for ...
38.426667
119
0.692922
import itertools import statistics def get_highest_rated_movie(list_of_movies, list_of_similar_movies, user_movies_seen_list) : global discussability, similar_movies_adjacency_list, similar_movies_adjacency_graph, rating_dic discussability = {} rating_dic = {} similar_movies_adjacency_graph = [[0 for ...
true
true
1c2394f3fdaa6a614a0deb524a2fcf19c04f6997
2,010
py
Python
pyecobee/objects/meter_report.py
kstough/Pyecobee
c7299f03ea7a4516d1b215fa9906edf1bf2bda2c
[ "MIT" ]
1
2019-04-30T00:57:48.000Z
2019-04-30T00:57:48.000Z
pyecobee/objects/meter_report.py
kstough/Pyecobee
c7299f03ea7a4516d1b215fa9906edf1bf2bda2c
[ "MIT" ]
null
null
null
pyecobee/objects/meter_report.py
kstough/Pyecobee
c7299f03ea7a4516d1b215fa9906edf1bf2bda2c
[ "MIT" ]
null
null
null
""" This module is home to the MeterReport class """ from pyecobee.ecobee_object import EcobeeObject class MeterReport(EcobeeObject): """ This class has been auto generated by scraping https://www.ecobee.com/home/developer/api/documentation/v1/objects/MeterReport.shtml Attribute names have been gener...
35.892857
106
0.69801
from pyecobee.ecobee_object import EcobeeObject class MeterReport(EcobeeObject): __slots__ = ['_thermostat_identifier', '_meter_list'] attribute_name_map = {'thermostat_identifier': 'thermostatIdentifier', 'thermostatIdentifier': 'thermostat_identifier', 'meter_list': 'meterList', ...
true
true
1c2395080e24a238b6965479c926c69013e69c12
4,477
py
Python
vcli/cmd/backup_command.py
vertica/vertica-accelerator-cli
706925f58a4bfc2876903396db72363f673be76a
[ "Apache-2.0" ]
null
null
null
vcli/cmd/backup_command.py
vertica/vertica-accelerator-cli
706925f58a4bfc2876903396db72363f673be76a
[ "Apache-2.0" ]
null
null
null
vcli/cmd/backup_command.py
vertica/vertica-accelerator-cli
706925f58a4bfc2876903396db72363f673be76a
[ "Apache-2.0" ]
null
null
null
#!/bin/python3 # coding=utf-8 # ------------------------------------------------------------------------------ # Created on October 05 13:00 2021 # # Vertica Vaas Okta Backup command # # Usage: # va backup list --name a # # (c) Copyright 2021 Micro Focus or one of its affiliates. # -----------------------------------...
47.62766
163
0.687514
from argparse import Namespace from vcli.cmd.sub_command import SubCommandImplementation from vcli.util.help_message import HelpMessage from vcli.constant import ( VCLI_CONFIG_DEFAULT, RETURN_CODE_SUCCESS ) from vcli.util.utils import build_api_client, db_name_validate from vcli.models.response_mode...
true
true
1c2395c5cb76cd01afde4559ea196d053f7dd883
5,428
py
Python
source/sphinxext/tab.py
artyom-stv/understanding-json-schema
9ee09ff692ea7f12f041434191890405b4a2041c
[ "BSD-3-Clause" ]
1
2021-03-24T19:53:08.000Z
2021-03-24T19:53:08.000Z
source/sphinxext/tab.py
artyom-stv/understanding-json-schema
9ee09ff692ea7f12f041434191890405b4a2041c
[ "BSD-3-Clause" ]
null
null
null
source/sphinxext/tab.py
artyom-stv/understanding-json-schema
9ee09ff692ea7f12f041434191890405b4a2041c
[ "BSD-3-Clause" ]
null
null
null
from docutils import nodes from docutils import statemachine from docutils.parsers.rst import Directive class AttrDict(dict): def __init__(self, *args, **kwargs): super(AttrDict, self).__init__(*args, **kwargs) self.__dict__ = self def split_content(l): parts = [] part = [] label = N...
24.232143
77
0.60538
from docutils import nodes from docutils import statemachine from docutils.parsers.rst import Directive class AttrDict(dict): def __init__(self, *args, **kwargs): super(AttrDict, self).__init__(*args, **kwargs) self.__dict__ = self def split_content(l): parts = [] part = [] label = N...
true
true
1c2396538652bc3f75b707ec1ef85a2f67a72198
10,533
py
Python
roborl/ddpg/ddpg.py
nicoring/RoBonjwa
7b42265a42c389964ddf3ff535dbfb9370863ac5
[ "MIT" ]
null
null
null
roborl/ddpg/ddpg.py
nicoring/RoBonjwa
7b42265a42c389964ddf3ff535dbfb9370863ac5
[ "MIT" ]
1
2018-03-02T19:39:36.000Z
2018-03-02T19:39:36.000Z
roborl/ddpg/ddpg.py
nicoring/RoBonjwa
7b42265a42c389964ddf3ff535dbfb9370863ac5
[ "MIT" ]
null
null
null
import os import pickle import numpy as np import torch import torch.optim as optim from torch.autograd import Variable from tensorboardX import SummaryWriter from roborl.util.memory import ReplayMemory from roborl.util.exploration import ActionNoiseExploration, ParamNoiseExploration use_cuda = torch.cuda.is_avail...
44.07113
115
0.627077
import os import pickle import numpy as np import torch import torch.optim as optim from torch.autograd import Variable from tensorboardX import SummaryWriter from roborl.util.memory import ReplayMemory from roborl.util.exploration import ActionNoiseExploration, ParamNoiseExploration use_cuda = torch.cuda.is_avail...
true
true
1c2396b23234938569e5a058ca0b6c21ea3a5614
21,446
py
Python
survey/features/Question-steps.py
ericazhou7/uSurvey
1236f33355662957e7e1e769dde1811b910673a5
[ "BSD-3-Clause" ]
5
2016-08-25T12:48:54.000Z
2018-08-16T22:49:43.000Z
survey/features/Question-steps.py
ericazhou7/uSurvey
1236f33355662957e7e1e769dde1811b910673a5
[ "BSD-3-Clause" ]
2
2016-08-11T06:43:56.000Z
2016-12-08T09:11:36.000Z
survey/features/Question-steps.py
ericazhou7/uSurvey
1236f33355662957e7e1e769dde1811b910673a5
[ "BSD-3-Clause" ]
7
2016-09-16T11:03:44.000Z
2020-10-28T22:01:20.000Z
from time import sleep from lettuce import * from rapidsms.contrib.locations.models import Location from survey.features.page_objects.question import BatchQuestionsListPage, AddQuestionPage, ListAllQuestionsPage, CreateNewQuestionPage, CreateNewSubQuestionPage, EditQuestionPage from survey.models import Batch, Question...
35.565506
178
0.747365
from time import sleep from lettuce import * from rapidsms.contrib.locations.models import Location from survey.features.page_objects.question import BatchQuestionsListPage, AddQuestionPage, ListAllQuestionsPage, CreateNewQuestionPage, CreateNewSubQuestionPage, EditQuestionPage from survey.models import Batch, Question...
true
true
1c23970b56622fbc9cfd95e6e58b172604a7b1da
9,491
py
Python
nilearn/glm/tests/test_hemodynamic_models.py
Qin-Ming/nilearn
82f4075d8a8ea9aec25e66bd87ebb79a6be6d32f
[ "BSD-2-Clause" ]
null
null
null
nilearn/glm/tests/test_hemodynamic_models.py
Qin-Ming/nilearn
82f4075d8a8ea9aec25e66bd87ebb79a6be6d32f
[ "BSD-2-Clause" ]
null
null
null
nilearn/glm/tests/test_hemodynamic_models.py
Qin-Ming/nilearn
82f4075d8a8ea9aec25e66bd87ebb79a6be6d32f
[ "BSD-2-Clause" ]
null
null
null
import warnings import numpy as np import pytest from numpy.testing import (assert_almost_equal, assert_array_equal, assert_array_almost_equal, ) from nilearn.glm.first_level.hemodynamic_models import (_hrf_kernel, ...
34.017921
85
0.562322
import warnings import numpy as np import pytest from numpy.testing import (assert_almost_equal, assert_array_equal, assert_array_almost_equal, ) from nilearn.glm.first_level.hemodynamic_models import (_hrf_kernel, ...
true
true
1c239735e643892da106b9184f75a6d5f2cb424f
12,897
py
Python
hacktj_live/settings.py
HackTJ/live
2e29176da78e2a2834e1004c7390d4a74c324142
[ "MIT" ]
2
2021-03-11T22:50:23.000Z
2021-05-13T14:52:25.000Z
hacktj_live/settings.py
HackTJ/live
2e29176da78e2a2834e1004c7390d4a74c324142
[ "MIT" ]
78
2020-08-01T20:06:38.000Z
2022-03-30T23:34:02.000Z
hacktj_live/settings.py
HackTJ/live
2e29176da78e2a2834e1004c7390d4a74c324142
[ "MIT" ]
null
null
null
""" Django settings for hacktj_live project. Generated by 'django-admin startproject' using Django 3.0.8. For more information on this file, see https://docs.djangoproject.com/en/3.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.0/ref/settings/ """ from co...
28.036957
91
0.66248
from collections import OrderedDict from datetime import datetime from subprocess import run as run_cmd import os from dj_database_url import parse as parse_db_url from utils.environment import ( is_in_docker, is_netcat_available, get_current_ip, pg_isready, ) BASE_DIR = os.path.dirname(os.path.dirn...
true
true
1c23976a6f9769277e60615bcfcc46f424a9c2d9
9,560
py
Python
tests/components/august/test_config_flow.py
erogleva/core
994ae09f69afe772150a698953c0d7386a745de2
[ "Apache-2.0" ]
6
2016-11-25T06:36:27.000Z
2021-11-16T11:20:23.000Z
tests/components/august/test_config_flow.py
erogleva/core
994ae09f69afe772150a698953c0d7386a745de2
[ "Apache-2.0" ]
52
2020-07-14T14:12:26.000Z
2022-03-31T06:24:02.000Z
tests/components/august/test_config_flow.py
erogleva/core
994ae09f69afe772150a698953c0d7386a745de2
[ "Apache-2.0" ]
2
2021-03-17T11:01:07.000Z
2021-08-19T15:21:32.000Z
"""Test the August config flow.""" from august.authenticator import ValidationResult from homeassistant import config_entries, setup from homeassistant.components.august.const import ( CONF_ACCESS_TOKEN_CACHE_FILE, CONF_INSTALL_ID, CONF_LOGIN_METHOD, DOMAIN, VERIFICATION_CODE_KEY, ) from homeassist...
35.407407
102
0.660774
from august.authenticator import ValidationResult from homeassistant import config_entries, setup from homeassistant.components.august.const import ( CONF_ACCESS_TOKEN_CACHE_FILE, CONF_INSTALL_ID, CONF_LOGIN_METHOD, DOMAIN, VERIFICATION_CODE_KEY, ) from homeassistant.components.august.exceptions im...
true
true
1c2397803fbbd8eaf95574b275f908c5b6ab7f84
1,857
py
Python
chainer/functions/clipped_relu.py
woodshop/complex-chainer
18c2ef988319d26123915ec846fc08d8837258ff
[ "MIT" ]
null
null
null
chainer/functions/clipped_relu.py
woodshop/complex-chainer
18c2ef988319d26123915ec846fc08d8837258ff
[ "MIT" ]
null
null
null
chainer/functions/clipped_relu.py
woodshop/complex-chainer
18c2ef988319d26123915ec846fc08d8837258ff
[ "MIT" ]
null
null
null
from chainer import cuda from chainer import function from chainer import utils from chainer.utils import type_check import numpy class ClippedReLU(function.Function): """Clipped Rectifier Unit function. Clipped ReLU is written as :math:`ClippedReLU(x, z) = \min(\max(0, x), z)`, where :math:`z(>0)` is a...
29.015625
79
0.599892
from chainer import cuda from chainer import function from chainer import utils from chainer.utils import type_check import numpy class ClippedReLU(function.Function): def __init__(self, z): if not isinstance(z, float): raise TypeError('z must be float value') assert z > 0 ...
true
true
1c23989d934e529a365601df3f48aa76366114b4
2,842
py
Python
corehq/apps/smsbillables/management/commands/bootstrap_gateway_fees.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
471
2015-01-10T02:55:01.000Z
2022-03-29T18:07:18.000Z
corehq/apps/smsbillables/management/commands/bootstrap_gateway_fees.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
14,354
2015-01-01T07:38:23.000Z
2022-03-31T20:55:14.000Z
corehq/apps/smsbillables/management/commands/bootstrap_gateway_fees.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
175
2015-01-06T07:16:47.000Z
2022-03-29T13:27:01.000Z
import re import settings from django.core.management.base import BaseCommand, CommandError from corehq.apps.sms.models import INCOMING, OUTGOING from corehq.apps.sms.util import get_sms_backend_classes from corehq.apps.accounting.models import Currency from corehq.apps.smsbillables.models import ( SmsGatewayFee, ...
38.405405
106
0.735398
import re import settings from django.core.management.base import BaseCommand, CommandError from corehq.apps.sms.models import INCOMING, OUTGOING from corehq.apps.sms.util import get_sms_backend_classes from corehq.apps.accounting.models import Currency from corehq.apps.smsbillables.models import ( SmsGatewayFee, ...
true
true
1c2398fbe3bba48d6b1c4d06c48443a36f99175c
284
py
Python
keep_alive.py
xcloudx12345/tts-bot-discord
b9293211f08dfd9978002e71afc1886c52a18269
[ "MIT" ]
null
null
null
keep_alive.py
xcloudx12345/tts-bot-discord
b9293211f08dfd9978002e71afc1886c52a18269
[ "MIT" ]
null
null
null
keep_alive.py
xcloudx12345/tts-bot-discord
b9293211f08dfd9978002e71afc1886c52a18269
[ "MIT" ]
null
null
null
from flask import Flask from threading import Thread app = Flask('') @app.route('/') def main(): return "I'm alive!" #Change this if you want def run(): app.run(host="0.0.0.0", port=8080) #don't touch this def keep_alive(): server = Thread(target=run) server.start()
18.933333
56
0.65493
from flask import Flask from threading import Thread app = Flask('') @app.route('/') def main(): return "I'm alive!" #Change this if you want def run(): app.run(host="0.0.0.0", port=8080) #don't touch this def keep_alive(): server = Thread(target=run) server.start()
true
true
1c239984b64cb91b61a1dbae341c427f54c906a6
19,195
py
Python
backend/services/team_service.py
khyati18/tasking-manager
8b5281bf859a825dc336d10952e917f377cb5722
[ "BSD-2-Clause" ]
null
null
null
backend/services/team_service.py
khyati18/tasking-manager
8b5281bf859a825dc336d10952e917f377cb5722
[ "BSD-2-Clause" ]
null
null
null
backend/services/team_service.py
khyati18/tasking-manager
8b5281bf859a825dc336d10952e917f377cb5722
[ "BSD-2-Clause" ]
null
null
null
from flask import current_app from sqlalchemy import and_ from backend import db from backend.models.dtos.team_dto import ( TeamDTO, NewTeamDTO, TeamsListDTO, TeamMembersDTO, ProjectTeamDTO, TeamProjectDTO, TeamDetailsDTO, ) from backend.models.dtos.organisation_dto import OrganisationProje...
35.284926
98
0.625059
from flask import current_app from sqlalchemy import and_ from backend import db from backend.models.dtos.team_dto import ( TeamDTO, NewTeamDTO, TeamsListDTO, TeamMembersDTO, ProjectTeamDTO, TeamProjectDTO, TeamDetailsDTO, ) from backend.models.dtos.organisation_dto import OrganisationProje...
true
true
1c239a26a72199b666653bc4aba1267a870b7436
4,746
py
Python
Lib/site-packages/pygments/lexers/promql.py
edupyter/EDUPYTER38
396183cea72987506f1ef647c0272a2577c56218
[ "bzip2-1.0.6" ]
1
2021-12-14T21:23:25.000Z
2021-12-14T21:23:25.000Z
Lib/site-packages/pygments/lexers/promql.py
edupyter/EDUPYTER38
396183cea72987506f1ef647c0272a2577c56218
[ "bzip2-1.0.6" ]
1,242
2019-08-31T16:03:19.000Z
2019-08-31T18:00:46.000Z
Lib/site-packages/pygments/lexers/promql.py
edupyter/EDUPYTER38
396183cea72987506f1ef647c0272a2577c56218
[ "bzip2-1.0.6" ]
1
2019-10-04T01:56:03.000Z
2019-10-04T01:56:03.000Z
""" pygments.lexers.promql ~~~~~~~~~~~~~~~~~~~~~~ Lexer for Prometheus Query Language. :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexer import RegexLexer, bygroups, default, words from pygments.token import ( Co...
25.793478
83
0.370839
from pygments.lexer import RegexLexer, bygroups, default, words from pygments.token import ( Comment, Keyword, Name, Number, Operator, Punctuation, String, Whitespace, ) __all__ = ["PromQLLexer"] class PromQLLexer(RegexLexer): name = "PromQL" url = 'https://prometheus.io/doc...
true
true
1c239b7487a2427d575582b407e6149c47cad9cd
8,795
py
Python
vumi/persist/txredis_manager.py
hnec-vr/vumi
b9c1100176a46774b502d5a0db225930a2d298c7
[ "BSD-3-Clause" ]
null
null
null
vumi/persist/txredis_manager.py
hnec-vr/vumi
b9c1100176a46774b502d5a0db225930a2d298c7
[ "BSD-3-Clause" ]
null
null
null
vumi/persist/txredis_manager.py
hnec-vr/vumi
b9c1100176a46774b502d5a0db225930a2d298c7
[ "BSD-3-Clause" ]
null
null
null
# -*- test-case-name: vumi.persist.tests.test_txredis_manager -*- # txredis is made of silliness. # There are two variants, both of which call themselves version 2.2. One has # everything in txredis.protocol, the other has the client stuff in # txredis.client. try: import txredis.client as txrc txr = txrc exce...
35.18
79
0.626947
try: import txredis.client as txrc txr = txrc except ImportError: import txredis.protocol as txrp txr = txrp from twisted.internet import reactor from twisted.internet.defer import ( inlineCallbacks, DeferredList, succeed, Deferred) from vumi.persist.redis_base import Manager from vumi.persi...
false
true
1c239bb8bad990075fff2b713ba3bddb7d02b3ec
365
py
Python
learn-to-code-with-python/19-Sets/the-difference-method.py
MaciejZurek/python_practicing
0a426f2aed151573e1f8678e0239ff596d92bbde
[ "MIT" ]
null
null
null
learn-to-code-with-python/19-Sets/the-difference-method.py
MaciejZurek/python_practicing
0a426f2aed151573e1f8678e0239ff596d92bbde
[ "MIT" ]
null
null
null
learn-to-code-with-python/19-Sets/the-difference-method.py
MaciejZurek/python_practicing
0a426f2aed151573e1f8678e0239ff596d92bbde
[ "MIT" ]
null
null
null
# difference method returns a set of elements that are not in the given candy_bars = {"Mily Way", "Snickers", "100 Grand"} sweet_things = {"aaa", "bb", "Snickers"} print(candy_bars.difference(sweet_things)) # \ # these two are not equal! print(sweet_things.difference(candy_...
33.181818
71
0.643836
candy_bars = {"Mily Way", "Snickers", "100 Grand"} sweet_things = {"aaa", "bb", "Snickers"} print(candy_bars.difference(sweet_things)) print(sweet_things.difference(candy_bars)) print(candy_bars - sweet_things)
true
true
1c239f776bb880f9ce827b4a7da12d3123827621
2,955
py
Python
python/ql/test/library-tests/web/stdlib/test.py
vadi2/codeql
a806a4f08696d241ab295a286999251b56a6860c
[ "MIT" ]
4,036
2020-04-29T00:09:57.000Z
2022-03-31T14:16:38.000Z
python/ql/test/library-tests/web/stdlib/test.py
vadi2/codeql
a806a4f08696d241ab295a286999251b56a6860c
[ "MIT" ]
2,970
2020-04-28T17:24:18.000Z
2022-03-31T22:40:46.000Z
python/ql/test/library-tests/web/stdlib/test.py
ScriptBox99/github-codeql
2ecf0d3264db8fb4904b2056964da469372a235c
[ "MIT" ]
794
2020-04-29T00:28:25.000Z
2022-03-30T08:21:46.000Z
import sys import os import cgi if sys.version_info[0] == 2: from BaseHTTPServer import BaseHTTPRequestHandler from BaseHTTPServer import HTTPServer if sys.version_info[0] == 3: from http.server import HTTPServer, BaseHTTPRequestHandler class MyHandler(BaseHTTPRequestHandler): def taint_sources(sel...
27.110092
98
0.55533
import sys import os import cgi if sys.version_info[0] == 2: from BaseHTTPServer import BaseHTTPRequestHandler from BaseHTTPServer import HTTPServer if sys.version_info[0] == 3: from http.server import HTTPServer, BaseHTTPRequestHandler class MyHandler(BaseHTTPRequestHandler): def taint_sources(sel...
true
true
1c23a0e380bff5d8ccc2c6e4a386d241080ab6a2
2,019
py
Python
api/server.py
JamesZBL/keykee
cab7a3065277e95409b50df9960c3732e1e5b2f1
[ "Apache-2.0" ]
16
2018-11-05T13:43:43.000Z
2021-09-05T07:53:38.000Z
api/server.py
JamesZBL/keykee
cab7a3065277e95409b50df9960c3732e1e5b2f1
[ "Apache-2.0" ]
3
2019-01-22T05:39:36.000Z
2019-10-16T03:37:34.000Z
api/server.py
JamesZBL/keykee
cab7a3065277e95409b50df9960c3732e1e5b2f1
[ "Apache-2.0" ]
6
2019-02-28T02:25:21.000Z
2021-05-26T06:41:19.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under ...
27.283784
89
0.718673
from flask import Flask, render_template, jsonify from flask_cors import CORS from data.buffered_repo import buffered_repo as repo webapp = Flask(__name__, static_folder='templates', static_url_path='') app = webapp CORS(app) @app.route("/") def index(): return render_template("index.html") @app.route...
true
true
1c23a30dd75193e0381afc15340381890c864284
1,095
py
Python
app/conftest.py
sandeeppradhan92/python_project_template
9cb62144ed0eef27cb93328f409e73cf92948b67
[ "MIT" ]
null
null
null
app/conftest.py
sandeeppradhan92/python_project_template
9cb62144ed0eef27cb93328f409e73cf92948b67
[ "MIT" ]
null
null
null
app/conftest.py
sandeeppradhan92/python_project_template
9cb62144ed0eef27cb93328f409e73cf92948b67
[ "MIT" ]
null
null
null
# file used to cahnge pytest-html config from datetime import datetime from py.xml import html def pytest_html_report_title(report): """modifying the title of html report""" report.title = "Test report (Auto Generated PyTest)" def pytest_html_results_table_row(report, cells): """orienting the data go...
26.707317
72
0.66758
from datetime import datetime from py.xml import html def pytest_html_report_title(report): report.title = "Test report (Auto Generated PyTest)" def pytest_html_results_table_row(report, cells): del cells[1] try: tag = report.tag except AttributeError: tag = "" try: te...
true
true
1c23a3b43af9b7c94f0ff832d62cd121e7625153
302
py
Python
Atividades/PY 01/NEw.py
alverad-katsuro/Python
6ba3cc604fd9cde3ee012fcf17bbf6cd944e8c38
[ "MIT" ]
null
null
null
Atividades/PY 01/NEw.py
alverad-katsuro/Python
6ba3cc604fd9cde3ee012fcf17bbf6cd944e8c38
[ "MIT" ]
null
null
null
Atividades/PY 01/NEw.py
alverad-katsuro/Python
6ba3cc604fd9cde3ee012fcf17bbf6cd944e8c38
[ "MIT" ]
null
null
null
z = "sim" while z == "sim": x = input() if x == "não": break else: list(listaDeInteiros) + int(x) todosSaoPares = True for i in listaDeInteiros: if i % 2 == 0: todosSaoPares = False break if todosSaoPares: print('Todos sao pares') else: print('Tem algum impar')
18.875
35
0.589404
z = "sim" while z == "sim": x = input() if x == "não": break else: list(listaDeInteiros) + int(x) todosSaoPares = True for i in listaDeInteiros: if i % 2 == 0: todosSaoPares = False break if todosSaoPares: print('Todos sao pares') else: print('Tem algum impar')
true
true
1c23a44cf632492e17ac9150e32def419fab9f34
881
py
Python
code_script/templating.py
KimDaeUng/PTR
8341e71c00c694b024c919947aa62f80cb1d4e44
[ "MIT" ]
null
null
null
code_script/templating.py
KimDaeUng/PTR
8341e71c00c694b024c919947aa62f80cb1d4e44
[ "MIT" ]
null
null
null
code_script/templating.py
KimDaeUng/PTR
8341e71c00c694b024c919947aa62f80cb1d4e44
[ "MIT" ]
null
null
null
from arguments import get_args_parser def get_temps(tokenizer): args = get_args_parser() temps = {} with open(args.data_dir + "/" + args.temps, "r") as f: for i in f.readlines(): i = i.strip().split("\t") info = {} info['name'] = i[1].strip() ...
31.464286
88
0.419977
from arguments import get_args_parser def get_temps(tokenizer): args = get_args_parser() temps = {} with open(args.data_dir + "/" + args.temps, "r") as f: for i in f.readlines(): i = i.strip().split("\t") info = {} info['name'] = i[1].strip() ...
true
true
1c23a4a658ad30bc469fb4022a6dce03709ba492
2,269
py
Python
dbms/tests/integration/test_parts_delete_zookeeper/test.py
DAN-AND-DNA/ClickHouse
20511cbfce793ca164b8f6bb14498bac988db0d9
[ "Apache-2.0" ]
1
2019-09-18T06:55:57.000Z
2019-09-18T06:55:57.000Z
dbms/tests/integration/test_parts_delete_zookeeper/test.py
DAN-AND-DNA/ClickHouse
20511cbfce793ca164b8f6bb14498bac988db0d9
[ "Apache-2.0" ]
1
2019-10-13T16:06:13.000Z
2019-10-13T16:06:13.000Z
dbms/tests/integration/test_parts_delete_zookeeper/test.py
DAN-AND-DNA/ClickHouse
20511cbfce793ca164b8f6bb14498bac988db0d9
[ "Apache-2.0" ]
3
2020-02-24T12:57:54.000Z
2021-10-04T13:29:00.000Z
import time import pytest from helpers.network import PartitionManager from helpers.cluster import ClickHouseCluster from helpers.test_tools import assert_eq_with_retry cluster = ClickHouseCluster(__file__) node1 = cluster.add_instance('node1', main_configs=['configs/remote_servers.xml'], with_zookeeper=True) @pyt...
36.596774
106
0.671662
import time import pytest from helpers.network import PartitionManager from helpers.cluster import ClickHouseCluster from helpers.test_tools import assert_eq_with_retry cluster = ClickHouseCluster(__file__) node1 = cluster.add_instance('node1', main_configs=['configs/remote_servers.xml'], with_zookeeper=True) @pyt...
false
true
1c23a4efa7d612870ae0ea807bd33c3937accb39
533
py
Python
venv/lib/python3.6/site-packages/troposphere/ecr.py
mrsaicharan1/Alexa-BestBuy
a22a0157b90d29b946d0f020e5f76744f73a6bff
[ "Apache-2.0" ]
6
2018-05-31T04:40:53.000Z
2022-02-18T18:59:27.000Z
venv/lib/python3.6/site-packages/troposphere/ecr.py
mrsaicharan1/iiita-updates
a22a0157b90d29b946d0f020e5f76744f73a6bff
[ "Apache-2.0" ]
null
null
null
venv/lib/python3.6/site-packages/troposphere/ecr.py
mrsaicharan1/iiita-updates
a22a0157b90d29b946d0f020e5f76744f73a6bff
[ "Apache-2.0" ]
null
null
null
from . import AWSObject, AWSProperty try: from awacs.aws import Policy policytypes = (dict, Policy) except ImportError: policytypes = dict, class LifecyclePolicy(AWSProperty): props = { 'LifecyclePolicyText': (str, False), 'RegistryId': (str, False), } class Repository(AWSObject)...
22.208333
53
0.641651
from . import AWSObject, AWSProperty try: from awacs.aws import Policy policytypes = (dict, Policy) except ImportError: policytypes = dict, class LifecyclePolicy(AWSProperty): props = { 'LifecyclePolicyText': (str, False), 'RegistryId': (str, False), } class Repository(AWSObject)...
true
true
1c23a5a12a2635f0fe329e8822ef2b9277c8f348
2,065
py
Python
django/mysite/mysite/urls.py
tochenwei/mypython.github.io
10e7917b15dee219751e76ed49d9f72c31bc6a27
[ "Apache-2.0" ]
null
null
null
django/mysite/mysite/urls.py
tochenwei/mypython.github.io
10e7917b15dee219751e76ed49d9f72c31bc6a27
[ "Apache-2.0" ]
null
null
null
django/mysite/mysite/urls.py
tochenwei/mypython.github.io
10e7917b15dee219751e76ed49d9f72c31bc6a27
[ "Apache-2.0" ]
null
null
null
#coding:utf-8 """mysite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='ho...
41.3
84
0.666828
from django.conf.urls import url from django.contrib import admin from learn import views as learn_views from learn import test as learn_test urlpatterns = [ url(r'^old/(\d+)/(\d+)/$', learn_views.old_new_redirect), url(r'^new/(\d+)/(\d+)/$', learn_views.new, name='new'), url(r'^insert/', learn...
true
true
1c23a5a2eeb11064ca0cfe354e084fe21ea09a36
1,310
py
Python
tablify.py
briancamp/brlib
16f352ef40f56276a26f8849ba8966eeecbf4564
[ "BSD-3-Clause" ]
null
null
null
tablify.py
briancamp/brlib
16f352ef40f56276a26f8849ba8966eeecbf4564
[ "BSD-3-Clause" ]
null
null
null
tablify.py
briancamp/brlib
16f352ef40f56276a26f8849ba8966eeecbf4564
[ "BSD-3-Clause" ]
null
null
null
def tablify(data, column_names): """Convert a list of lists (data) into a ascii table.""" import prettytable if not data: return('') default_alignment = 'l' alignments = {'left': 'l', 'right': 'r', 'center': 'c'} columns = [] max_row_len = max([len(row) for row in data]) for col...
29.111111
75
0.552672
def tablify(data, column_names): import prettytable if not data: return('') default_alignment = 'l' alignments = {'left': 'l', 'right': 'r', 'center': 'c'} columns = [] max_row_len = max([len(row) for row in data]) for column in column_names: if isinstance(column, str): ...
true
true
1c23a6969469c36612c7c20b41cb92c6739afd9b
2,175
py
Python
api/transaction.py
bajcmartinez/blockchainpy
5acaf517a47b73e16be5ec2892390516fb78d029
[ "MIT" ]
17
2020-09-12T03:27:54.000Z
2022-01-08T21:34:02.000Z
api/transaction.py
livecodestream/blockchainpy
5acaf517a47b73e16be5ec2892390516fb78d029
[ "MIT" ]
1
2020-09-10T15:19:48.000Z
2020-09-11T09:18:17.000Z
api/transaction.py
bajcmartinez/blockchainpy
5acaf517a47b73e16be5ec2892390516fb78d029
[ "MIT" ]
7
2020-12-02T00:52:23.000Z
2022-03-08T22:15:00.000Z
from flask import Blueprint, request from http import HTTPStatus from flasgger import swag_from from api.globals import blockchain from api.schema.transaction import TransactionSchema, TransactionCreatedSchema transaction_api = Blueprint('transaction', __name__) @transaction_api.route('/', methods=['POST']) @swag_fr...
29.391892
111
0.547586
from flask import Blueprint, request from http import HTTPStatus from flasgger import swag_from from api.globals import blockchain from api.schema.transaction import TransactionSchema, TransactionCreatedSchema transaction_api = Blueprint('transaction', __name__) @transaction_api.route('/', methods=['POST']) @swag_fr...
true
true
1c23a6aa7981ce24556624dd296f8251ff3f36d4
377
py
Python
accounts/urls.py
MuthangaShem/hoodwatch
ed7e9562676e03e528da1dc8b756514c16847f28
[ "MIT" ]
null
null
null
accounts/urls.py
MuthangaShem/hoodwatch
ed7e9562676e03e528da1dc8b756514c16847f28
[ "MIT" ]
null
null
null
accounts/urls.py
MuthangaShem/hoodwatch
ed7e9562676e03e528da1dc8b756514c16847f28
[ "MIT" ]
null
null
null
from django.conf.urls import url from django.contrib.auth import views as auth_views from . import views app_name = 'accounts' urlpatterns = [ url(r'login/$', auth_views.LoginView.as_view(template_name='accounts/login.html'), name='login'), url(r'logout/$', auth_views.LogoutView.as_view(), name='logout'), ...
37.7
101
0.721485
from django.conf.urls import url from django.contrib.auth import views as auth_views from . import views app_name = 'accounts' urlpatterns = [ url(r'login/$', auth_views.LoginView.as_view(template_name='accounts/login.html'), name='login'), url(r'logout/$', auth_views.LogoutView.as_view(), name='logout'), ...
true
true
1c23a6f938f5f37cf0be6d6279290d1a9236944f
3,373
py
Python
fbpcp/service/container_aws.py
Benqalu/fbpcp
f3dad8d8e0ff7097696b049cae5fbf6d5c337742
[ "MIT" ]
null
null
null
fbpcp/service/container_aws.py
Benqalu/fbpcp
f3dad8d8e0ff7097696b049cae5fbf6d5c337742
[ "MIT" ]
null
null
null
fbpcp/service/container_aws.py
Benqalu/fbpcp
f3dad8d8e0ff7097696b049cae5fbf6d5c337742
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-strict import logging from typing import Any, Dict, List, Optional, Tuple from fbpcp.entity.container_instance...
31.231481
88
0.642158
import logging from typing import Any, Dict, List, Optional, Tuple from fbpcp.entity.container_instance import ContainerInstance from fbpcp.error.pcp import PcpError from fbpcp.gateway.ecs import ECSGateway from fbpcp.metrics.emitter import MetricsEmitter from fbpcp.service.container import ContainerService ...
true
true
1c23a739d90178338ff0e10fc0dd8139b6a032ba
484
py
Python
tests/unit/test_mini_aws_stack.py
ongzhixian/mini-aws
8e188eeb6a5f597a21260eabc268d979dc4b6a05
[ "MIT" ]
null
null
null
tests/unit/test_mini_aws_stack.py
ongzhixian/mini-aws
8e188eeb6a5f597a21260eabc268d979dc4b6a05
[ "MIT" ]
null
null
null
tests/unit/test_mini_aws_stack.py
ongzhixian/mini-aws
8e188eeb6a5f597a21260eabc268d979dc4b6a05
[ "MIT" ]
null
null
null
import aws_cdk as core import aws_cdk.assertions as assertions from stacks.mini_aws_stack import MiniAwsStack # example tests. To run these tests, uncomment this file along with the example # resource in mini_aws/mini_aws_stack.py def test_sqs_queue_created(): app = core.App() stack = MiniAwsStack(app, "mini-...
30.25
79
0.739669
import aws_cdk as core import aws_cdk.assertions as assertions from stacks.mini_aws_stack import MiniAwsStack def test_sqs_queue_created(): app = core.App() stack = MiniAwsStack(app, "mini-aws") template = assertions.Template.from_stack(stack)
true
true
1c23a7507b16dc1bc34ab58fa51448405b8c8453
1,456
py
Python
utils.py
MahmudulAlam/Recurrently-Semantic-Segmentation
64f988e3e278ef7807cdb2dd48c79eb1bbc66519
[ "MIT" ]
1
2022-02-15T21:18:14.000Z
2022-02-15T21:18:14.000Z
utils.py
MahmudulAlam/Recurrently-Semantic-Segmentation
64f988e3e278ef7807cdb2dd48c79eb1bbc66519
[ "MIT" ]
null
null
null
utils.py
MahmudulAlam/Recurrently-Semantic-Segmentation
64f988e3e278ef7807cdb2dd48c79eb1bbc66519
[ "MIT" ]
null
null
null
import torch def cross_entropy_loss(y_true, y_pred, mask=None, eps=1e-10): y_t = torch.clip(y_true, eps, 1.) y_p = torch.clip(y_pred, eps, 1.) y_t_prime = torch.clip(1. - y_true, eps, 1.) y_p_prime = torch.clip(1. - y_pred, eps, 1.) loss = - torch.xlogy(y_t, y_p) - torch.xlogy(y_t_prime, y_p_pri...
30.333333
73
0.645604
import torch def cross_entropy_loss(y_true, y_pred, mask=None, eps=1e-10): y_t = torch.clip(y_true, eps, 1.) y_p = torch.clip(y_pred, eps, 1.) y_t_prime = torch.clip(1. - y_true, eps, 1.) y_p_prime = torch.clip(1. - y_pred, eps, 1.) loss = - torch.xlogy(y_t, y_p) - torch.xlogy(y_t_prime, y_p_pri...
true
true
1c23a7c756b53b807d9488b7a3be916e28a8de1b
476
py
Python
src/components/image/models.py
svenvandescheur/svenv.nl-new
c448714853d96ad31d26c825d8b35c4890be40a1
[ "MIT" ]
null
null
null
src/components/image/models.py
svenvandescheur/svenv.nl-new
c448714853d96ad31d26c825d8b35c4890be40a1
[ "MIT" ]
null
null
null
src/components/image/models.py
svenvandescheur/svenv.nl-new
c448714853d96ad31d26c825d8b35c4890be40a1
[ "MIT" ]
null
null
null
from cms.models import CMSPlugin from django.db import models from django.utils.translation import ugettext as _ from filer.fields.image import FilerImageField class ImagePlugin(CMSPlugin): """ A simple image plugin allowing custom CSS classes. """ alt_text = models.CharField(_('Alternative text'), ma...
34
88
0.75
from cms.models import CMSPlugin from django.db import models from django.utils.translation import ugettext as _ from filer.fields.image import FilerImageField class ImagePlugin(CMSPlugin): alt_text = models.CharField(_('Alternative text'), max_length=255) image = FilerImageField(verbose_name=_("image")) ...
true
true
1c23a94b18495a1908d2428becfcfb26638c96e9
113,146
py
Python
statsmodels/regression/linear_model.py
NolanMP/statsmodels
ca6b652188be2422061052f7e61dd7bf2da03d52
[ "BSD-3-Clause" ]
1
2017-07-07T17:49:20.000Z
2017-07-07T17:49:20.000Z
statsmodels/regression/linear_model.py
NolanMP/statsmodels
ca6b652188be2422061052f7e61dd7bf2da03d52
[ "BSD-3-Clause" ]
null
null
null
statsmodels/regression/linear_model.py
NolanMP/statsmodels
ca6b652188be2422061052f7e61dd7bf2da03d52
[ "BSD-3-Clause" ]
1
2016-09-23T02:33:54.000Z
2016-09-23T02:33:54.000Z
# TODO: Determine which tests are valid for GLSAR, and under what conditions # TODO: Fix issue with constant and GLS # TODO: GLS: add options Iterative GLS, for iterative fgls if sigma is None # TODO: GLS: default if sigma is none should be two-step GLS # TODO: Check nesting when performing model based tests, lr, wald,...
36.463422
132
0.578023
from statsmodels.compat.python import lrange, lzip from statsmodels.compat.pandas import Appender import numpy as np from scipy.linalg import toeplitz from scipy import stats from scipy import optimize from statsmodels.tools.tools import pinv_extended from statsmodels.tools.decorators import (cache_readonly, ...
true
true
1c23a94c12986c541addc9aa7dec2002d79a8370
9,043
py
Python
multilingual_survey/south_migrations/0002_auto__del_field_surveyquestion_position__del_field_surveyanswer_positi.py
affan2/django-multilingual-survey
25315730465cd2c79c495e397addff2ad940d6bd
[ "MIT" ]
null
null
null
multilingual_survey/south_migrations/0002_auto__del_field_surveyquestion_position__del_field_surveyanswer_positi.py
affan2/django-multilingual-survey
25315730465cd2c79c495e397addff2ad940d6bd
[ "MIT" ]
null
null
null
multilingual_survey/south_migrations/0002_auto__del_field_surveyquestion_position__del_field_surveyanswer_positi.py
affan2/django-multilingual-survey
25315730465cd2c79c495e397addff2ad940d6bd
[ "MIT" ]
1
2020-01-08T09:07:57.000Z
2020-01-08T09:07:57.000Z
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'SurveyQuestion.position' db.delete_column(u'multilingua...
75.358333
218
0.592502
from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.delete_column(u'multilingual_survey_surveyquestion', 'position') db.delete...
true
true
1c23a9fffa99803c43d3161dfb7d1331484c7128
7,645
py
Python
networkx/release.py
MollyDream/networkx
77e73428f188621c72e2d95ad422d02d260b7278
[ "BSD-3-Clause" ]
1
2020-05-13T01:08:42.000Z
2020-05-13T01:08:42.000Z
networkx/release.py
MollyDream/networkx
77e73428f188621c72e2d95ad422d02d260b7278
[ "BSD-3-Clause" ]
1
2019-11-28T21:08:50.000Z
2019-11-28T21:08:50.000Z
networkx/release.py
MollyDream/networkx
77e73428f188621c72e2d95ad422d02d260b7278
[ "BSD-3-Clause" ]
1
2021-01-27T12:09:05.000Z
2021-01-27T12:09:05.000Z
"""Release data for NetworkX. When NetworkX is imported a number of steps are followed to determine the version information. 1) If the release is not a development release (dev=False), then version information is read from version.py, a file containing statically defined version information. This file...
34.129464
105
0.662263
import os import sys import time import datetime basedir = os.path.abspath(os.path.split(__file__)[0]) def write_versionfile(): versionfile = os.path.join(basedir, 'version.py') text = '''""" Version information for NetworkX, created during installation. Do not add this file to the repository. """...
true
true
1c23aadf2310e27dda46b7d2d3a99fcd0eeb6e8f
3,834
py
Python
backend/uchicago/scraper.py
maths22/canigraduate.uchicago.edu
b2a09784ddb94f96f97ef1252ba2482ac32d6a61
[ "MIT" ]
null
null
null
backend/uchicago/scraper.py
maths22/canigraduate.uchicago.edu
b2a09784ddb94f96f97ef1252ba2482ac32d6a61
[ "MIT" ]
4
2021-02-08T20:54:50.000Z
2021-12-13T20:46:19.000Z
backend/uchicago/scraper.py
maths22/canigraduate.uchicago.edu
b2a09784ddb94f96f97ef1252ba2482ac32d6a61
[ "MIT" ]
null
null
null
import collections import pyrebase import json import httplib2 from lib import Term firebase = pyrebase.initialize_app({ 'apiKey': 'AIzaSyCjBDyhwbXcp9kEIA2pMHLDGxmCM4Sn6Eg', 'authDomain': 'canigraduate-43286.firebaseapp.com', 'databaseURL': 'https://canigraduate-43286.firebaseio.com', 'storageBucket':...
43.078652
116
0.559468
import collections import pyrebase import json import httplib2 from lib import Term firebase = pyrebase.initialize_app({ 'apiKey': 'AIzaSyCjBDyhwbXcp9kEIA2pMHLDGxmCM4Sn6Eg', 'authDomain': 'canigraduate-43286.firebaseapp.com', 'databaseURL': 'https://canigraduate-43286.firebaseio.com', 'storageBucket':...
true
true
1c23ab98f06128ce61ec705ee0ddc9f007fd5b24
649
py
Python
var/spack/repos/builtin/packages/py-fisher/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/py-fisher/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
8
2021-11-09T20:28:40.000Z
2022-03-15T03:26:33.000Z
var/spack/repos/builtin/packages/py-fisher/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2019-02-08T20:37:20.000Z
2019-03-31T15:19:26.000Z
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack.package import * class PyFisher(PythonPackage): """Fisher's Exact Test. Simple, fast implementation ...
30.904762
95
0.724191
from spack.package import * class PyFisher(PythonPackage): homepage = "https://github.com/brentp/fishers_exact_test" pypi = "fisher/fisher-0.1.9.tar.gz" version('0.1.9', sha256='d378b3f7e488e2a679c6d0e5ea1bce17bc931c2bfe8ec8424ee47a74f251968d') depends_on('py-setuptools', type='build') dep...
true
true
1c23ad86a615336cf098283a45c750a16a9dff62
2,216
py
Python
encrypted_dns/outbound/https.py
zhenghaven/encrypted-dns
0efefa87309834cd536d59d3e082c084d94ae2fa
[ "Apache-2.0" ]
null
null
null
encrypted_dns/outbound/https.py
zhenghaven/encrypted-dns
0efefa87309834cd536d59d3e082c084d94ae2fa
[ "Apache-2.0" ]
null
null
null
encrypted_dns/outbound/https.py
zhenghaven/encrypted-dns
0efefa87309834cd536d59d3e082c084d94ae2fa
[ "Apache-2.0" ]
null
null
null
import base64 import socket import logging import dns.message import requests class HTTPSOutbound(object): DEFAULT_PORT = 443 NAME = 'HTTPS' name = 'https' def __init__(self, ip, port, timeout, retry, domain, proxies, **kwargs): super().__init__() self.logger = logging.getLogger("en...
31.657143
88
0.601534
import base64 import socket import logging import dns.message import requests class HTTPSOutbound(object): DEFAULT_PORT = 443 NAME = 'HTTPS' name = 'https' def __init__(self, ip, port, timeout, retry, domain, proxies, **kwargs): super().__init__() self.logger = logging.getLogger("en...
true
true
1c23ae039d0a0ff1d6e173140a063fdbb6f814c6
147,229
py
Python
renderer.py
JadenSlashMonkey/MCEdit-Unified
47fa90ed40aa7f5f61f5b545c04827d887aa82a1
[ "0BSD" ]
1
2017-10-08T23:05:25.000Z
2017-10-08T23:05:25.000Z
renderer.py
JadenSlashMonkey/MCEdit-Unified
47fa90ed40aa7f5f61f5b545c04827d887aa82a1
[ "0BSD" ]
null
null
null
renderer.py
JadenSlashMonkey/MCEdit-Unified
47fa90ed40aa7f5f61f5b545c04827d887aa82a1
[ "0BSD" ]
null
null
null
"""Copyright (c) 2010-2012 David Rio Vierra Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WA...
36.633242
153
0.585326
"""Copyright (c) 2010-2012 David Rio Vierra Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WA...
false
true
1c23aea9ac7465a839af0bdf3eb5f3ae4123a093
2,303
py
Python
orio/validators/sort_vector.py
NIEHS/orio
bf996ebcf41d14b945cd5848460b023376b637ad
[ "MIT" ]
6
2017-04-19T08:49:20.000Z
2020-12-18T16:13:28.000Z
orio/validators/sort_vector.py
NIEHS/orio
bf996ebcf41d14b945cd5848460b023376b637ad
[ "MIT" ]
null
null
null
orio/validators/sort_vector.py
NIEHS/orio
bf996ebcf41d14b945cd5848460b023376b637ad
[ "MIT" ]
1
2020-12-18T16:14:45.000Z
2020-12-18T16:14:45.000Z
import os from .base import Validator from .feature_list import FeatureListValidator class SortVectorValidator(Validator): def __init__(self, feature_bed, sort_vector): super().__init__() assert os.path.exists(feature_bed) assert os.path.exists(sort_vector) self.feature_bed_fn...
29.525641
96
0.551455
import os from .base import Validator from .feature_list import FeatureListValidator class SortVectorValidator(Validator): def __init__(self, feature_bed, sort_vector): super().__init__() assert os.path.exists(feature_bed) assert os.path.exists(sort_vector) self.feature_bed_fn...
true
true
1c23aeb37a5857094835194bde70e230563fa1ce
519
py
Python
py/harvest.py
coderanger/farmrpg-ext
bade8519fcd0481b08ecba3f8554fde2de5828ed
[ "Apache-2.0" ]
8
2022-02-04T05:57:47.000Z
2022-03-25T08:02:42.000Z
py/harvest.py
coderanger/farmrpg-ext
bade8519fcd0481b08ecba3f8554fde2de5828ed
[ "Apache-2.0" ]
null
null
null
py/harvest.py
coderanger/farmrpg-ext
bade8519fcd0481b08ecba3f8554fde2de5828ed
[ "Apache-2.0" ]
2
2022-02-07T05:38:33.000Z
2022-02-07T05:54:51.000Z
from collections import Counter import parse_logs harvests = 0 totals = Counter() for row in parse_logs.parse_logs("harvestall"): results = row["results"] seeds = Counter(c["seed"] for c in results["crops"]) drops = {i["item"]: i["quantity"] for i in results["items"]} focus_seeds = seeds.get("Pea Se...
23.590909
64
0.65896
from collections import Counter import parse_logs harvests = 0 totals = Counter() for row in parse_logs.parse_logs("harvestall"): results = row["results"] seeds = Counter(c["seed"] for c in results["crops"]) drops = {i["item"]: i["quantity"] for i in results["items"]} focus_seeds = seeds.get("Pea Se...
true
true
1c23aeb7e2c50546aac546307aa7573a942a9b5d
2,326
py
Python
azure-mgmt-web/azure/mgmt/web/models/sku_description_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
azure-mgmt-web/azure/mgmt/web/models/sku_description_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-mgmt-web/azure/mgmt/web/models/sku_description_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2019-06-17T22:18:23.000Z
2019-06-17T22:18:23.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 ...
40.103448
184
0.602752
from msrest.serialization import Model class SkuDescription(Model): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'tier': {'key': 'tier', 'type': 'str'}, 'size': {'key': 'size', 'type': 'str'}, 'family': {'key': 'family', 'type': 'str'}, 'capacity':...
true
true
1c23aecb462b1c4f5bed9d26f3c4ce6f4e554778
426
py
Python
solutions/python3/866.py
sm2774us/amazon_interview_prep_2021
f580080e4a6b712b0b295bb429bf676eb15668de
[ "MIT" ]
42
2020-08-02T07:03:49.000Z
2022-03-26T07:50:15.000Z
solutions/python3/866.py
ajayv13/leetcode
de02576a9503be6054816b7444ccadcc0c31c59d
[ "MIT" ]
null
null
null
solutions/python3/866.py
ajayv13/leetcode
de02576a9503be6054816b7444ccadcc0c31c59d
[ "MIT" ]
40
2020-02-08T02:50:24.000Z
2022-03-26T15:38:10.000Z
class Solution: def primePalindrome(self, N): def isPrime(x): if x < 2 or x % 2 == 0: return x == 2 for i in range(3, int(x**0.5) + 1, 2): if x % i == 0: return False return True if 8 <= N <= 11: return 11 for x in range(10 ** (len(str(N)) ...
38.727273
56
0.431925
class Solution: def primePalindrome(self, N): def isPrime(x): if x < 2 or x % 2 == 0: return x == 2 for i in range(3, int(x**0.5) + 1, 2): if x % i == 0: return False return True if 8 <= N <= 11: return 11 for x in range(10 ** (len(str(N)) ...
true
true
1c23af4a99cf40876125e7b819a3d375ed00e248
637
py
Python
PythonVirtEnv/Lib/site-packages/plotly/validators/layout/geo/lataxis/_range.py
zuhorski/EPL_Project
2d2417652879cfbe33c44c003ad77b7222590849
[ "MIT" ]
7
2021-09-29T09:46:36.000Z
2022-03-24T08:30:41.000Z
venv/Lib/site-packages/plotly/validators/layout/geo/lataxis/_range.py
wakisalvador/constructed-misdirection
74779e9ec640a11bc08d5d1967c85ac4fa44ea5e
[ "Unlicense" ]
1
2021-09-30T16:56:21.000Z
2021-10-15T09:14:12.000Z
venv/Lib/site-packages/plotly/validators/layout/geo/lataxis/_range.py
wakisalvador/constructed-misdirection
74779e9ec640a11bc08d5d1967c85ac4fa44ea5e
[ "Unlicense" ]
1
2021-09-29T22:34:05.000Z
2021-09-29T22:34:05.000Z
import _plotly_utils.basevalidators class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): def __init__(self, plotly_name="range", parent_name="layout.geo.lataxis", **kwargs): super(RangeValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
33.526316
88
0.536892
import _plotly_utils.basevalidators class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): def __init__(self, plotly_name="range", parent_name="layout.geo.lataxis", **kwargs): super(RangeValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
true
true
1c23b0040bdda44a742fe29998c25afbd18602c8
5,783
py
Python
LIMBR_docker/grid/limbr_process.py
aleccrowell/LIMBR
a41356b92892c89376c436ea5eab3f131fc2c4e3
[ "BSD-3-Clause" ]
3
2018-01-02T17:27:30.000Z
2019-05-20T11:34:14.000Z
LIMBR_docker/grid/limbr_process.py
aleccrowell/LIMBR
a41356b92892c89376c436ea5eab3f131fc2c4e3
[ "BSD-3-Clause" ]
null
null
null
LIMBR_docker/grid/limbr_process.py
aleccrowell/LIMBR
a41356b92892c89376c436ea5eab3f131fc2c4e3
[ "BSD-3-Clause" ]
2
2018-06-02T04:07:27.000Z
2020-06-20T13:23:49.000Z
from LIMBR import simulations, imputation, batch_fx, old_fashioned for i in range(1, 21): #Read Raw Data to_impute = imputation.imputable('twenty_miss_5_NN_'+str(i)+'_with_noise.txt',missingness=0.4,neighbors=5) #Impute and Write Output to_impute.impute_data('twenty_miss_5_NN_'+str(i)+'_imputed.txt') ...
39.340136
121
0.724192
from LIMBR import simulations, imputation, batch_fx, old_fashioned for i in range(1, 21): to_impute = imputation.imputable('twenty_miss_5_NN_'+str(i)+'_with_noise.txt',missingness=0.4,neighbors=5) to_impute.impute_data('twenty_miss_5_NN_'+str(i)+'_imputed.txt') for i in range(1, 21): to_sva...
true
true
1c23b02269f5d14b3cb7c92530f3e701440d6958
18,492
py
Python
mmedit/models/inpaintors/one_stage.py
f74066357/Image_Inpainting
1c89cdadcf420633d29136c8bdcbd280f2546769
[ "Apache-2.0" ]
null
null
null
mmedit/models/inpaintors/one_stage.py
f74066357/Image_Inpainting
1c89cdadcf420633d29136c8bdcbd280f2546769
[ "Apache-2.0" ]
null
null
null
mmedit/models/inpaintors/one_stage.py
f74066357/Image_Inpainting
1c89cdadcf420633d29136c8bdcbd280f2546769
[ "Apache-2.0" ]
null
null
null
#@title one_stage.py (new loss, todo: adding loss functions to ```def generator_loss```) from .vic.loss import CharbonnierLoss, GANLoss, GradientPenaltyLoss, HFENLoss, TVLoss, GradientLoss, ElasticLoss, RelativeL1, L1CosineSim, ClipL1, MaskedL1Loss, MultiscalePixelLoss, FFTloss, OFLoss, L1_regularization, ColorLoss, A...
38.365145
303
0.605235
from .vic.loss import CharbonnierLoss, GANLoss, GradientPenaltyLoss, HFENLoss, TVLoss, GradientLoss, ElasticLoss, RelativeL1, L1CosineSim, ClipL1, MaskedL1Loss, MultiscalePixelLoss, FFTloss, OFLoss, L1_regularization, ColorLoss, AverageLoss, GPLoss, CPLoss, SPL_ComputeWithTrace, SPLoss, Contextual_Loss from .vic.filt...
true
true
1c23b0a7dceba9e969ccb179e7392ac87afc8930
22,450
py
Python
tests/dag_unittest.py
hgl71964/dagbo
de198650268baee324bc495899e34531d10369e2
[ "MIT" ]
null
null
null
tests/dag_unittest.py
hgl71964/dagbo
de198650268baee324bc495899e34531d10369e2
[ "MIT" ]
null
null
null
tests/dag_unittest.py
hgl71964/dagbo
de198650268baee324bc495899e34531d10369e2
[ "MIT" ]
null
null
null
import os import sys import math import warnings import logging import unittest import torch import numpy as np import pandas as pd from torch import Size, Tensor from sklearn.metrics import mean_squared_error from sklearn.preprocessing import StandardScaler, MinMaxScaler import gpytorch from gpytorch.models.exact_gp ...
34.485407
111
0.559465
import os import sys import math import warnings import logging import unittest import torch import numpy as np import pandas as pd from torch import Size, Tensor from sklearn.metrics import mean_squared_error from sklearn.preprocessing import StandardScaler, MinMaxScaler import gpytorch from gpytorch.models.exact_gp ...
true
true
1c23b0baaa5dc04e16dc95f26618b0735d9f8629
8,156
py
Python
contrib/devtools/update-translations.py
marquis-ogre/MyPartyCoin
ddc7dbd6e7e3cfa8ee5f7722d6779c4a2802b563
[ "MIT" ]
null
null
null
contrib/devtools/update-translations.py
marquis-ogre/MyPartyCoin
ddc7dbd6e7e3cfa8ee5f7722d6779c4a2802b563
[ "MIT" ]
null
null
null
contrib/devtools/update-translations.py
marquis-ogre/MyPartyCoin
ddc7dbd6e7e3cfa8ee5f7722d6779c4a2802b563
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2014 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Run this script from the root of the repository to update all translations from transifex. It will do the follo...
38.654028
124
0.634134
from __future__ import division, print_function import subprocess import re import sys import os import io import xml.etree.ElementTree as ET TX = 'tx' SOURCE_LANG = 'mypartycoin_en.ts' LOCALE_DIR = 'src/qt/locale' MIN_NUM_MESSAGES = 10 def check_at_repository_root(): if not os.path.exists('.git'): ...
true
true
1c23b0e05e2420b4931d080bdc756e7c211f0e4b
106
py
Python
webapp/fila_da_creche/apps.py
prefeiturasp/SME-VagasNaCreche-API
20ae8862375124c7459fe6ff2d2d33ed34d136fb
[ "0BSD" ]
null
null
null
webapp/fila_da_creche/apps.py
prefeiturasp/SME-VagasNaCreche-API
20ae8862375124c7459fe6ff2d2d33ed34d136fb
[ "0BSD" ]
9
2020-06-06T00:20:46.000Z
2022-02-10T10:57:35.000Z
webapp/fila_da_creche/apps.py
prefeiturasp/SME-VagasNaCreche-API
20ae8862375124c7459fe6ff2d2d33ed34d136fb
[ "0BSD" ]
1
2020-09-17T14:46:24.000Z
2020-09-17T14:46:24.000Z
from django.apps import AppConfig class FilaDaCrecheConfig(AppConfig): name = 'fila_da_creche'
17.666667
37
0.745283
from django.apps import AppConfig class FilaDaCrecheConfig(AppConfig): name = 'fila_da_creche'
true
true
1c23b2a594e581fd32326d39c6ea7b1021e4000f
27,117
py
Python
libraries/createVectorizedAssembly.py
santacml/Malware-as-Video
12dc3954f2237cb34857a44eadbb5ca76f8e97b5
[ "MIT" ]
1
2019-05-26T22:40:00.000Z
2019-05-26T22:40:00.000Z
libraries/createVectorizedAssembly.py
santacml/Malware-as-Video
12dc3954f2237cb34857a44eadbb5ca76f8e97b5
[ "MIT" ]
null
null
null
libraries/createVectorizedAssembly.py
santacml/Malware-as-Video
12dc3954f2237cb34857a44eadbb5ca76f8e97b5
[ "MIT" ]
1
2019-06-27T20:21:49.000Z
2019-06-27T20:21:49.000Z
from assemblyVectorizor import Vectorizor from postVectorizeDataEditor import * import csv import random import numpy as np # helper functions def runThroughGenerator(gen, steps): for x in range(0, int(steps)): train_x, train_y = next(gen) print("done gen", x) def getOpco...
40.412817
172
0.622451
from assemblyVectorizor import Vectorizor from postVectorizeDataEditor import * import csv import random import numpy as np def runThroughGenerator(gen, steps): for x in range(0, int(steps)): train_x, train_y = next(gen) print("done gen", x) def getOpcodes(fileLines): ...
true
true
1c23b3cd70df1962254986f9ac44fc8ea2424df3
1,334
py
Python
quaestio/authentication/migrations/0001_initial.py
bahrom-matyakubov/quaest-io
fe328a2c23749ede37dd1eb2c3409b005f769c9c
[ "MIT" ]
null
null
null
quaestio/authentication/migrations/0001_initial.py
bahrom-matyakubov/quaest-io
fe328a2c23749ede37dd1eb2c3409b005f769c9c
[ "MIT" ]
null
null
null
quaestio/authentication/migrations/0001_initial.py
bahrom-matyakubov/quaest-io
fe328a2c23749ede37dd1eb2c3409b005f769c9c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-01-07 03:43 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Account',...
37.055556
114
0.582459
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Account', fields=[ ('id', models.AutoField(auto_c...
true
true
1c23b3df21bc2947e95c77e15ee9f316f25ed77a
9,189
py
Python
COVID19--ZEPL.py
lakshika1064/covid19-prediction-using-SIR-model
74c202bf91f97b4011f1fadc61d80aa431834313
[ "MIT" ]
5
2020-06-17T10:10:47.000Z
2020-06-19T21:35:03.000Z
COVID19--ZEPL.py
Nehasingh1300/Covid19-prediction-using-SIR-model
91c7445807e678dfb15c24056b5b7af40ca00afc
[ "MIT" ]
null
null
null
COVID19--ZEPL.py
Nehasingh1300/Covid19-prediction-using-SIR-model
91c7445807e678dfb15c24056b5b7af40ca00afc
[ "MIT" ]
2
2020-06-21T06:07:08.000Z
2020-08-19T18:02:05.000Z
conn = z.getDatasource("snowflake_CP99894apsouth1aws_faa2e8") import pandas as pd import numpy as np from datetime import datetime, timedelta import requests import io from datetime import datetime import scipy import operator from scipy.integrate import solve_ivp from scipy.integrate import odeint warehouse = "PC_ZE...
36.903614
228
0.687779
conn = z.getDatasource("snowflake_CP99894apsouth1aws_faa2e8") import pandas as pd import numpy as np from datetime import datetime, timedelta import requests import io from datetime import datetime import scipy import operator from scipy.integrate import solve_ivp from scipy.integrate import odeint warehouse = "PC_ZE...
true
true
1c23b48d34c7d43a7c1441370e00d4c6e1ea466e
14,411
py
Python
python-modules/twisted/twisted/trial/util.py
stormtheh4ck3r/python-for-android
b9ea9161392f60566b81482b1e25cd77004d5c45
[ "Apache-2.0" ]
267
2015-03-22T15:23:48.000Z
2022-03-05T21:57:34.000Z
python-modules/twisted/twisted/trial/util.py
rockyzhang/zhangyanhit-python-for-android-mips
799dd5ca16f72135f2eab71e144a68842e2aaee0
[ "Apache-2.0" ]
133
2015-03-21T15:13:43.000Z
2021-12-11T23:37:58.000Z
python-modules/twisted/twisted/trial/util.py
rockyzhang/zhangyanhit-python-for-android-mips
799dd5ca16f72135f2eab71e144a68842e2aaee0
[ "Apache-2.0" ]
119
2015-04-28T16:07:10.000Z
2022-03-18T03:49:48.000Z
# -*- test-case-name: twisted.trial.test.test_util -*- # Copyright (c) 2001-2010 Twisted Matrix Laboratories. # See LICENSE for details. # """ A collection of utility functions and classes, used internally by Trial. This code is for Trial's internal use. Do NOT use this code if you are writing tests. It is subject ...
33.436195
80
0.617792
""" A collection of utility functions and classes, used internally by Trial. This code is for Trial's internal use. Do NOT use this code if you are writing tests. It is subject to change at the Trial maintainer's whim. There is nothing here in this module for you to use unless you are maintaining Trial. Any n...
false
true
1c23b4b324d89dfd4a83667f1360584710ac35cd
1,458
py
Python
_zadania/type_float_b.py
DJG-coderslab/2021-12-elearning-pythonana
e072d6cbd231c4b858e92a59af768a069b74ba67
[ "MIT" ]
null
null
null
_zadania/type_float_b.py
DJG-coderslab/2021-12-elearning-pythonana
e072d6cbd231c4b858e92a59af768a069b74ba67
[ "MIT" ]
null
null
null
_zadania/type_float_b.py
DJG-coderslab/2021-12-elearning-pythonana
e072d6cbd231c4b858e92a59af768a069b74ba67
[ "MIT" ]
null
null
null
""" * Assignment: Type Float Altitude * Required: yes * Complexity: easy * Lines of code: 3 lines * Time: 3 min English: 1. Plane altitude is 10.000 ft 2. Data uses imperial (US) system 3. Convert to metric (SI) system 4. Result round to one decimal place 5. Run doctests - all must succeed Polish:...
25.578947
62
0.663237
m = 1 ft = 0.3048 * m altitude = ... altitude_m = ... altitude_ft = ...
true
true
1c23b59426b9d0801ef02eef2e705a59857d46be
2,911
py
Python
generate_augmented_pair_list.py
cbilodeau2/hgraph2graph
cde0630b2de7f63125b3d296450409d45b62f4a8
[ "MIT" ]
2
2020-10-27T17:59:43.000Z
2021-06-30T15:27:58.000Z
generate_augmented_pair_list.py
cbilodeau2/hgraph2graph
cde0630b2de7f63125b3d296450409d45b62f4a8
[ "MIT" ]
null
null
null
generate_augmented_pair_list.py
cbilodeau2/hgraph2graph
cde0630b2de7f63125b3d296450409d45b62f4a8
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd import argparse from rdkit.Chem.Descriptors import ExactMolWt from rdkit import Chem from chemprop.data.scaffold import generate_scaffold from hgraph.pairing import * # SETTINGS: parser = argparse.ArgumentParser() parser.add_argument('--gen_out', type=str, required=True) # Inp...
49.338983
140
0.761937
import numpy as np import pandas as pd import argparse from rdkit.Chem.Descriptors import ExactMolWt from rdkit import Chem from chemprop.data.scaffold import generate_scaffold from hgraph.pairing import * parser = argparse.ArgumentParser() parser.add_argument('--gen_out', type=str, required=True) parser.add_argu...
true
true
1c23b73f1ebe40d76e0d4e06cb679a5312705e5b
343
py
Python
where-to-mock/b.py
AIRONAXSolutions/python-education
a0105c619f55e60c35f0881f642851c9b716f5bb
[ "MIT" ]
408
2015-07-21T10:30:05.000Z
2022-03-31T18:14:05.000Z
where-to-mock/b.py
iraghavr/python-education
87941ea736ac7d630e1a1db9ad07a734a4311490
[ "MIT" ]
4
2016-07-05T09:01:16.000Z
2022-03-03T20:49:20.000Z
where-to-mock/b.py
iraghavr/python-education
87941ea736ac7d630e1a1db9ad07a734a4311490
[ "MIT" ]
60
2015-10-06T17:34:36.000Z
2022-03-10T13:50:46.000Z
from a import burn from a import Toaster print 'In b.py, at import time:', burn print 'In b.py, at import time, Toaster:', Toaster def toast(): print 'In b.py, at runtime:', burn print 'In b.py, at runtime, Toaster:', Toaster print 'In b.py, at runtime, Toaster.burn:', Toaster.burn burn() Toaster....
24.5
60
0.655977
from a import burn from a import Toaster print 'In b.py, at import time:', burn print 'In b.py, at import time, Toaster:', Toaster def toast(): print 'In b.py, at runtime:', burn print 'In b.py, at runtime, Toaster:', Toaster print 'In b.py, at runtime, Toaster.burn:', Toaster.burn burn() Toaster....
false
true
1c23b751e4593238c12f386d607b9cb57efba768
115
py
Python
001 - 050/ex032.py
SocrammBR/Desafios-Python-CursoEmVideo
bd2454a24134500343ece91b936c169d3a66f89e
[ "MIT" ]
null
null
null
001 - 050/ex032.py
SocrammBR/Desafios-Python-CursoEmVideo
bd2454a24134500343ece91b936c169d3a66f89e
[ "MIT" ]
null
null
null
001 - 050/ex032.py
SocrammBR/Desafios-Python-CursoEmVideo
bd2454a24134500343ece91b936c169d3a66f89e
[ "MIT" ]
null
null
null
ano = int(input('Digite o ano: ')) if (ano%4) == 0: print ('Ele é bissexto') else: print ('Ele não é bissexto')
23
34
0.6
ano = int(input('Digite o ano: ')) if (ano%4) == 0: print ('Ele é bissexto') else: print ('Ele não é bissexto')
true
true
1c23b782b59ed935107043f65a828fb3f64f15ad
4,855
py
Python
ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/writesetfieldlearnedinfo_baa8ba69dbabb653f5ceb83cfeb81659.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
20
2019-05-07T01:59:14.000Z
2022-02-11T05:24:47.000Z
ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/writesetfieldlearnedinfo_baa8ba69dbabb653f5ceb83cfeb81659.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
60
2019-04-03T18:59:35.000Z
2022-02-22T12:05:05.000Z
ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/writesetfieldlearnedinfo_baa8ba69dbabb653f5ceb83cfeb81659.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
13
2019-05-20T10:48:31.000Z
2021-10-06T07:45:44.000Z
# MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify,...
37.346154
198
0.677446
from ixnetwork_restpy.base import Base from ixnetwork_restpy.files import Files from typing import List, Any, Union class WriteSetFieldLearnedInfo(Base): __slots__ = () _SDM_NAME = 'writeSetFieldLearnedInfo' _SDM_ATT_MAP = { 'NextTableIds': 'nextTableIds', 'Property':...
true
true
1c23b87444751d5a0b1589190f7ef14dfefd6742
14,235
py
Python
visprotocol/visprotocol/clandinin_data.py
ClandininLab/multistim
9aba24a85317e4cbd81555be45c4df87cfad035c
[ "MIT" ]
null
null
null
visprotocol/visprotocol/clandinin_data.py
ClandininLab/multistim
9aba24a85317e4cbd81555be45c4df87cfad035c
[ "MIT" ]
5
2019-08-07T16:58:50.000Z
2019-08-29T15:11:23.000Z
visprotocol/visprotocol/clandinin_data.py
ClandininLab/multistim
9aba24a85317e4cbd81555be45c4df87cfad035c
[ "MIT" ]
1
2021-12-05T00:26:43.000Z
2021-12-05T00:26:43.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Data file class Data File structure is: yyyy-mm-dd Client Flies Fly_n epoch_runs series_00n (attrs = protocol_parameters) acquisition epochs epoch_001 (attrs = ...
43.267477
148
0.57457
import h5py import os import inspect import yaml from datetime import datetime import numpy as np import visprotocol class Data(): def __init__(self, cfg): self.experiment_file_name = None self.series_count = 1 self.fly_metadata = {} self.current_fly = None self.user_na...
true
true
1c23bc1085dbd37864f16e87894cea94b2e5c512
6,407
py
Python
dockerfiles/SampleVcfToZarr/sample_vcf_to_zarr.py
GvandeSteeg/pipelines
9e10e8edf1397d09a92761bc764acfec6006dd67
[ "MIT" ]
null
null
null
dockerfiles/SampleVcfToZarr/sample_vcf_to_zarr.py
GvandeSteeg/pipelines
9e10e8edf1397d09a92761bc764acfec6006dd67
[ "MIT" ]
null
null
null
dockerfiles/SampleVcfToZarr/sample_vcf_to_zarr.py
GvandeSteeg/pipelines
9e10e8edf1397d09a92761bc764acfec6006dd67
[ "MIT" ]
null
null
null
import sys import allel import zarr import zipfile import os import shutil def zip_zarr(zarr_path, del_orig=False): """ Assembles the entire Zarr directory into an uncompressed zip file name {zarr_path}.zip. Parameters ---------- zarr_path : str Path to zarr folder. del_orig : bool ...
38.365269
97
0.53582
import sys import allel import zarr import zipfile import os import shutil def zip_zarr(zarr_path, del_orig=False): output_zip_path = zarr_path + ".zip" with zipfile.ZipFile(file=output_zip_path, mode="w", compression=zipfile.ZIP_STORED, allowZip64=False) as zh: for curr...
true
true
1c23be3545299e9c38c3499a38112cbf10a8e49f
5,976
py
Python
tests/test_novelsplices.py
acesnik/GeneProtXML
aca3599bb5883ecb3537133547cf775aaf4d365e
[ "MIT" ]
null
null
null
tests/test_novelsplices.py
acesnik/GeneProtXML
aca3599bb5883ecb3537133547cf775aaf4d365e
[ "MIT" ]
null
null
null
tests/test_novelsplices.py
acesnik/GeneProtXML
aca3599bb5883ecb3537133547cf775aaf4d365e
[ "MIT" ]
null
null
null
# test module: test_novelsplices.py # main program: samplespecificdbgenerator.py import unittest import novelsplices import refparse import BedEntry from lxml import etree as et HTML_NS = "http://uniprot.org/uniprot" XSI_NS = "http://www.w3.org/2001/XMLSchema-instance" NAMESPACE_MAP = {None:HTML_NS, "xsi":XSI_NS} UP ...
41.5
161
0.662149
import unittest import novelsplices import refparse import BedEntry from lxml import etree as et HTML_NS = "http://uniprot.org/uniprot" XSI_NS = "http://www.w3.org/2001/XMLSchema-instance" NAMESPACE_MAP = {None:HTML_NS, "xsi":XSI_NS} UP = '{'+HTML_NS+'}' class Test_enter_seqvar(unittest.TestCase): def setUp(s...
true
true
1c23becab0aa966545ae8a243a3e31ed4d2e4619
448
py
Python
models/direction.py
lou1306/jaeger
37b673093981fb73fb1bfb1685925b07614ce57a
[ "MIT" ]
null
null
null
models/direction.py
lou1306/jaeger
37b673093981fb73fb1bfb1685925b07614ce57a
[ "MIT" ]
null
null
null
models/direction.py
lou1306/jaeger
37b673093981fb73fb1bfb1685925b07614ce57a
[ "MIT" ]
null
null
null
from enum import Enum from typing import Tuple, Iterable class Direction(Enum): N = (0, -1) NE = (1, -1) E = (1, 0) SE = (1, 1) S = (0, 1) SW = (-1, 1) W = (-1, 0) NW = (-1, -1) @staticmethod def basic() -> Iterable['Direction']: return (d for d in Direction if not all(...
21.333333
57
0.533482
from enum import Enum from typing import Tuple, Iterable class Direction(Enum): N = (0, -1) NE = (1, -1) E = (1, 0) SE = (1, 1) S = (0, 1) SW = (-1, 1) W = (-1, 0) NW = (-1, -1) @staticmethod def basic() -> Iterable['Direction']: return (d for d in Direction if not all(...
true
true
1c23bf825bf7d196a774ef681bb3ceb418c04ecb
564
py
Python
var/spack/repos/builtin/packages/py-xlrd/package.py
adrianjhpc/spack
0a9e4fcee57911f2db586aa50c8873d9cca8de92
[ "ECL-2.0", "Apache-2.0", "MIT" ]
2
2020-10-15T01:08:42.000Z
2021-10-18T01:28:18.000Z
var/spack/repos/builtin/packages/py-xlrd/package.py
adrianjhpc/spack
0a9e4fcee57911f2db586aa50c8873d9cca8de92
[ "ECL-2.0", "Apache-2.0", "MIT" ]
2
2019-07-30T10:12:28.000Z
2019-12-17T09:02:27.000Z
var/spack/repos/builtin/packages/py-xlrd/package.py
adrianjhpc/spack
0a9e4fcee57911f2db586aa50c8873d9cca8de92
[ "ECL-2.0", "Apache-2.0", "MIT" ]
5
2019-07-30T09:42:14.000Z
2021-01-25T05:39:20.000Z
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyXlrd(PythonPackage): """Library for developers to extract data from Microsoft Excel (tm)...
33.176471
95
0.737589
from spack import * class PyXlrd(PythonPackage): homepage = 'http://www.python-excel.org/' url = "https://pypi.io/packages/source/x/xlrd/xlrd-0.9.4.tar.gz" version('0.9.4', sha256='8e8d3359f39541a6ff937f4030db54864836a06e42988c452db5b6b86d29ea72')
true
true