blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 288 | content_id stringlengths 40 40 | detected_licenses listlengths 0 112 | license_type stringclasses 2
values | repo_name stringlengths 5 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 684
values | visit_date timestamp[us]date 2015-08-06 10:31:46 2023-09-06 10:44:38 | revision_date timestamp[us]date 1970-01-01 02:38:32 2037-05-03 13:00:00 | committer_date timestamp[us]date 1970-01-01 02:38:32 2023-09-06 01:08:06 | github_id int64 4.92k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22
values | gha_event_created_at timestamp[us]date 2012-06-04 01:52:49 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[us]date 2008-05-22 07:58:19 2023-08-21 12:35:19 ⌀ | gha_language stringclasses 147
values | src_encoding stringclasses 25
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 128 12.7k | extension stringclasses 142
values | content stringlengths 128 8.19k | authors listlengths 1 1 | author_id stringlengths 1 132 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
212ff7bb2d292acfcdecc48ba1e36050aa9e18ed | 7b02411227428bb746e7622736dc006ee24ca925 | /fhirclient/models/practitioner.py | a031183a9a28ca6bf7c19c5f0c4696218a018c6b | [] | no_license | NCATS-Tangerine/CPKG | 81c74abaec8de75ad769724e84d893dec117cf97 | 92b6079d61bdb975a0a4bc08879f56b686ff08ef | refs/heads/master | 2022-12-10T17:55:52.586808 | 2019-08-20T20:19:56 | 2019-08-20T20:19:56 | 202,387,355 | 0 | 0 | null | 2022-12-08T06:01:57 | 2019-08-14T16:29:04 | Python | UTF-8 | Python | false | false | 3,478 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 4.1.0-0931132380 (http://hl7.org/fhir/StructureDefinition/Practitioner) on 2019-08-06.
# 2019, SMART Health IT.
import sys
from dataclasses import dataclass
from typing import ClassVar, Optional, List
from .fhirabstractbase import empty_list
from ... | [
"solbrig@jhu.edu"
] | solbrig@jhu.edu |
b767dc6912417be37cab9363e2fe281e20c8e20d | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/nouns/_lookouts.py | 435d7553390587072a7651b0c3278816d229a48a | [
"MIT"
] | permissive | cash2one/xai | de7adad1758f50dd6786bf0111e71a903f039b64 | e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6 | refs/heads/master | 2021-01-19T12:33:54.964379 | 2017-01-28T02:00:50 | 2017-01-28T02:00:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 245 | py |
from xai.brain.wordbase.nouns._lookout import _LOOKOUT
#calss header
class _LOOKOUTS(_LOOKOUT, ):
def __init__(self,):
_LOOKOUT.__init__(self)
self.name = "LOOKOUTS"
self.specie = 'nouns'
self.basic = "lookout"
self.jsondata = {}
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
bb918660688b08138dfff3f921550e5811812b22 | 6ed01f4503fc9de234a561c945adff7cf4b1c81b | /dcsTools/logTools/LogAnalizer.py | b87902b91912124b60bb08ef9caa08a1222ab954 | [] | no_license | ostwald/python-lib | b851943c913a68424a05ce3c7b42878ff9519f68 | 9acd97ffaa2f57b3e9e632e1b75016549beb29e5 | refs/heads/master | 2021-10-28T06:33:34.156095 | 2021-10-21T23:54:49 | 2021-10-21T23:54:49 | 69,060,616 | 0 | 1 | null | 2018-06-21T16:05:30 | 2016-09-23T21:04:46 | Roff | UTF-8 | Python | false | false | 2,332 | py | """
tool for analyzing catalina.out log files
e.g., "C:/Documents and Settings/ostwald/My Documents/DCS/Log Analysis/Catalina Logs/dcc-log.txt"
parses the log file and returns a list of Request objects
"""
import string
import sys
import os
import re
from time import strptime, strftime, gmtime, localtime, asctime... | [
"ostwald@ucar.edu"
] | ostwald@ucar.edu |
71d201020a8661345685b3fe0dcde8ba8c88b1f4 | 49ba5356bdc5df7dd9803b56fe507c5164a90716 | /plus-one/test_solution.py | 574ad18d65637674d36fc84b6ad97ac231f5ded6 | [] | no_license | uxlsl/leetcode_practice | d80ad481c9d8ee71cce0f3c66e98446ced149635 | d8ed762d1005975f0de4f07760c9671195621c88 | refs/heads/master | 2021-04-25T18:12:28.136504 | 2020-03-11T07:54:15 | 2020-03-11T07:54:15 | 121,472,384 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 243 | py | from solution import Solution
def test_solution():
s = Solution()
assert s.plusOne([1]) == [2]
assert s.plusOne([1, 2, 3]) == [1, 2, 4]
assert s.plusOne([1, 2, 9]) == [1, 3, 0]
assert s.plusOne([9, 9, 9]) == [1, 0, 0, 0]
| [
"songlin.lin@yundata.com"
] | songlin.lin@yundata.com |
d4dcf28a56df6392227f886cba49f02edc0a4425 | 9152c6f5b692694c4cb95725319fc8dd21d30455 | /tests/test_sharepoint_group.py | 35ff7ddb18dd00b39d3d1f90d47262fff460b3cf | [
"MIT"
] | permissive | VISIN9/Office365-REST-Python-Client | cf3de86a6bdd2461ff5814dbfa02d4d4185917d5 | 91c07d427a76197f6eb143c6253bdc832cbb889d | refs/heads/master | 2021-05-25T08:43:35.530546 | 2020-04-06T20:24:53 | 2020-04-06T20:24:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,336 | py | from tests.sharepoint_case import SPTestCase
class TestSharePointGroup(SPTestCase):
@classmethod
def setUpClass(cls):
super(TestSharePointGroup, cls).setUpClass()
cls.target_user_name = "i:0#.f|membership|mdoe@mediadev8.onmicrosoft.com"
target_group_name = "Communication site Visitors... | [
"vvgrem@gmail.com"
] | vvgrem@gmail.com |
edee59048bf7db2a486cc4da27fba9608ec32e7a | 909ae0ab0f4fe78de433c3d72b34b84848303ee8 | /lending-club/venv/bin/jupyter-kernel | d0fe4631191e2897d3d90fd697e3b7c5e8f6b55c | [] | no_license | jakekasan/data-science | f5cf2a7c0ead56e04a3549b930ca974495faae49 | 4bf589c268c517525abf3170c24cf42e0ae872cf | refs/heads/master | 2021-09-17T21:18:51.278247 | 2018-07-05T07:31:51 | 2018-07-05T07:31:51 | 114,106,343 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 280 | #!/Users/jakubkasan/coding/data-science/lending-club/venv/bin/python3.6
# -*- coding: utf-8 -*-
import re
import sys
from jupyter_client.kernelapp import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main())
| [
"jake.kasan@gmail.com"
] | jake.kasan@gmail.com | |
3278d42f28e4adebbe01bf582c688739941488df | 8e95e79840005f6c34dfb978e8fe6e0ec4f7f643 | /9_Introduction to PySpark_/33_Test vs Train.py | 658938186f8e89f8ce821abc3d047cec0a15515f | [] | no_license | Naysla/Machine_Learning | a0593cac41ef1561f14bec55780570b82fc37720 | e75d5cd2894ccb005228ab3da87dde9025385a08 | refs/heads/master | 2023-02-01T17:19:32.413609 | 2020-12-22T20:36:45 | 2020-12-22T20:36:45 | 323,708,628 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,086 | py | #Test vs Train
#After you've cleaned your data and gotten it ready for modeling, one of the most important steps is to split the data into a test set and a train set. After that, don't touch your test data until you think you have a good model! As you're building models and forming hypotheses, you can test them on your... | [
"60472499+Naysla@users.noreply.github.com"
] | 60472499+Naysla@users.noreply.github.com |
92694715d35c931f58ea9fdacff0c277bec3d3a8 | 5ffed81ced523b6e417b4e48d20380b6f16f8f42 | /exam/football_souvenirs.py | 867e2341fa443122f3abe1f9ea0b7f84ec5776db | [] | no_license | Nikoletazl/Basics-Python | 0f3f095bd51f9546c681e3cdd268232de88749ab | 17aef1b95814f13a02053681aae3e617e56f2fe6 | refs/heads/main | 2023-08-14T15:48:48.450249 | 2021-10-08T15:02:35 | 2021-10-08T15:02:35 | 415,027,622 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,959 | py | team = input()
souvenirs = input()
count_souvenirs = int(input())
if souvenirs == "flags":
if team == "Argentina":
price = count_souvenirs * 3.25
print(f'Pepi bought {count_souvenirs} {souvenirs} of {team} for {price:.2f} lv.')
elif team == "Brazil":
price = count_souvenirs * 4.2... | [
"noreply@github.com"
] | Nikoletazl.noreply@github.com |
132631fbc191c0d961db1e6783c48e19d8e8fd46 | 72d7cfbdd02f77300edb0f5e4104a1a147048ade | /djangoproject/myproject/users/migrations/0001_initial.py | e5e66726f68bb3366e771d7f04511d21d385f875 | [] | no_license | simrangrover5/batch430 | 33f3e59b7d2c70f87d796cc869855975ffef976a | ec841051d3a84cd56515aeff3b9d328cebea3705 | refs/heads/master | 2020-12-18T09:21:12.518412 | 2020-02-11T12:40:48 | 2020-02-11T12:40:48 | 235,325,192 | 1 | 3 | null | null | null | null | UTF-8 | Python | false | false | 608 | py | # Generated by Django 3.0.1 on 2020-01-27 11:30
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Adduser',
fields=[
('username', models.Char... | [
"simrangrover5@gmail.com"
] | simrangrover5@gmail.com |
5ef8097cf66e2db0fa6b7d8d2d11a22a0d3f97e1 | ce75bce747bf60b364bc2e516824fc69c64a7eec | /opengever/maintenance/scripts/archive/04_fix_ai_refnums.py | ede9e2ca2e686c1b7c72846ef4c543e7a57ffdfb | [] | no_license | 4teamwork/opengever.maintenance | c94e470af31f891d0969877533e5acd37369f70f | f2b9866fb6cce1d24e29b084b757eec857119479 | refs/heads/master | 2023-07-28T17:57:09.619138 | 2023-07-14T13:08:20 | 2023-07-14T13:08:20 | 14,493,557 | 2 | 0 | null | 2023-08-31T09:07:21 | 2013-11-18T13:46:30 | Python | UTF-8 | Python | false | false | 6,511 | py | from Acquisition import aq_inner
from Acquisition import aq_parent
from opengever.base.adapters import CHILD_REF_KEY
from opengever.base.adapters import DOSSIER_KEY
from opengever.base.adapters import PREFIX_REF_KEY
from opengever.base.adapters import REPOSITORY_FOLDER_KEY
from opengever.base.interfaces import IReferen... | [
"david.erni@4teamwork.ch"
] | david.erni@4teamwork.ch |
ad5d1b7bda9bd683170c32f6da305b9a691513ef | 9e988c0dfbea15cd23a3de860cb0c88c3dcdbd97 | /sdBs/AllRun/ec_14270-1828/sdB_ec_14270-1828_lc.py | bdc07f94a156888a89f067ad64026758d3d61ea9 | [] | no_license | tboudreaux/SummerSTScICode | 73b2e5839b10c0bf733808f4316d34be91c5a3bd | 4dd1ffbb09e0a599257d21872f9d62b5420028b0 | refs/heads/master | 2021-01-20T18:07:44.723496 | 2016-08-08T16:49:53 | 2016-08-08T16:49:53 | 65,221,159 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 350 | py | from gPhoton.gAperture import gAperture
def main():
gAperture(band="NUV", skypos=[217.450125,-18.693147], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_ec_14270-1828/sdB_ec_14270-1828_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)
if __... | [
"thomas@boudreauxmail.com"
] | thomas@boudreauxmail.com |
7fc60fb3e6e5e97749994890220137591cb4ec56 | 51f6443116ef09aa91cca0ac91387c1ce9cb445a | /Curso_Python_3_UDEMY/banco_dados/incluir_contato.py | 79c073a92c51debf70d449c7b8897597efd60f36 | [
"MIT"
] | permissive | DanilooSilva/Cursos_de_Python | f449f75bc586f7cb5a7e43000583a83fff942e53 | 8f167a4c6e16f01601e23b6f107578aa1454472d | refs/heads/main | 2023-07-30T02:11:27.002831 | 2021-10-01T21:52:15 | 2021-10-01T21:52:15 | 331,683,041 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 442 | py | from mysql.connector.errors import ProgrammingError
from db import nova_conexao
sql = 'INSERT INTO contatos (nome, tel) VALUES (%s, %s)'
args = ('Danilo', '94955-2951')
with nova_conexao() as conexao:
try:
cursor = conexao.cursor()
cursor.execute(sql, args)
conexao.commit()
except Prog... | [
"dno.gomesps@gmail.com"
] | dno.gomesps@gmail.com |
acb65fbacc27a8ad5009c305ffa87265cef993a0 | be6d5ac1b415335cc7a27cf44e3afa041ef299e3 | /1_3.py | 764d33752a0c10e1a5835a028ea67466c05963df | [
"MIT"
] | permissive | JeffreyAsuncion/PCEP_training_2020_12 | 4746a28f399c499e1bc2c3bf848ce0b05ad903bd | 7477fb57a526ca0efdd156811aa72fae6129b062 | refs/heads/main | 2023-02-05T07:52:13.374651 | 2020-12-20T16:50:24 | 2020-12-20T16:50:24 | 319,857,046 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 200 | py | print(2**3)
print(2**3.)
print(2.**3)
print(2.**3.)
print(5//2)
print(2**2**3)
print(2*4)
print(2**4)
print(2.*4)
print(2**4.)
print(2/4)
print(2//4)
print(-2/4)
print(-2//4)
print(2%4)
print(2%-4) | [
"jeffrey.l.asuncion@gmail.com"
] | jeffrey.l.asuncion@gmail.com |
4cc163174dd2cd27ea349f42f6823c5afed30126 | fd41984178ffba0846fa7ab1f67c1a0843a5e3ff | /py2与py3的区别和测试/1.作业-文件的封装/dealFile.py | 43f453b28ac890199b9c17686a9fc1aff0e8e72b | [] | no_license | LasterSmithKim/Python-Base | 23f17472ee80f7224e96a4185775c9cd05ac7a98 | 27756126d999ddabf53b6bdc7114903a297464a0 | refs/heads/master | 2020-03-28T08:00:11.156911 | 2018-11-28T09:54:51 | 2018-11-28T09:54:51 | 147,939,778 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,170 | py | import csv
import sys
import importlib
importlib.reload(sys)
from pdfminer.pdfparser import PDFParser,PDFDocument
from pdfminer.pdfinterp import PDFResourceManager,PDFPageInterpreter
from pdfminer.converter import PDFPageAggregator
from pdfminer.layout import LTTextBoxHorizontal,LAParams
from pdfminer.pdfinterp import... | [
"kingone@yeah.net"
] | kingone@yeah.net |
39605e2d34194fa84b99d370e31e678f2bba6463 | 67929a76934c8c6bdacd573e2bc5ad6c0254d69c | /pyfusion/pyfusion/conf/utils.py | 73bb7d253a04345383db0865cd7f7937bf7ccef3 | [] | no_license | SyntaxVoid/PyFusionDIIID | bc284b8480a8c4fc7881585c4fdd76ecc61162e4 | 4d19abed536f7b4d0322636828254ed3dd7a9b4c | refs/heads/master | 2020-05-29T08:41:16.970539 | 2017-06-19T21:26:16 | 2017-06-19T21:26:16 | 69,825,057 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,471 | py | """ Useful functions for manipulating config files."""
from ConfigParser import NoSectionError
import pyfusion
def CannotImportFromConfigError(Exception):
"""Failed to import a module, class or method from config setting."""
def import_from_str(string_value):
# TODO: make shortcuts for loading from withi... | [
"j.gresl12@gmail.com"
] | j.gresl12@gmail.com |
ee66a6bd15526f6ff00f62a9ee1641bd9236a49f | 66e06eec0d72dd0f1fbbf2985bbbda858591bffc | /2016/007-Mathsjam/CircleInTriangle.py | 5c15fba7fb64885b75eff5dac15c497aec504ad1 | [] | no_license | kobylin/Lab | b35cd5eba8087946d475202e4d36ef7329bb74a5 | 35a33d84e0de6c891c34aa2806052b5f695f527d | refs/heads/master | 2021-08-30T07:12:52.955872 | 2017-12-16T16:14:27 | 2017-12-16T16:14:27 | 114,474,224 | 0 | 0 | null | 2017-12-16T16:21:33 | 2017-12-16T16:21:33 | null | UTF-8 | Python | false | false | 1,004 | py | from sympy import Point,Line,Circle,intersection,Triangle,N
from svg import Svg
C = Point(0,8)
D = Point(0,2)
xaxis = Line(Point(0,0),Point(1,0))
CircleD = Circle(D,2)
tangentE = CircleD.tangent_lines(C)[0]
E = intersection(tangentE,CircleD)[0]
A = intersection(tangentE, xaxis)[0]
CircleD = Circle(D,2)
svg = Svg()
sv... | [
"janchrister.nilsson@gmail.com"
] | janchrister.nilsson@gmail.com |
2823a48cbeebcac8a5b49aeb6306ea0ebabe21e0 | 01f535557c2275a0c0cd91687d52c644e8176d00 | /src/vtra/analysis/flow_assignment/industry_flows.py | f08d77411f7d216c3c28a8190c7613a014fea9c4 | [] | no_license | mmc00/oia-transport-archive | a8eaf72751a2c11b2cc2dc475e6eed2421d75381 | f89cb686704fe76c1665697b35d14caccf37f3a1 | refs/heads/master | 2022-03-28T17:44:41.915217 | 2020-01-09T16:22:10 | 2020-01-09T16:22:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,444 | py | """Summarise hazard data
Get OD data and process it
Author: Raghav Pant
Date: April 20, 2018
"""
import configparser
import csv
import glob
import os
import fiona
import fiona.crs
import rasterio
from sqlalchemy import create_engine
import subprocess as sp
import psycopg2
import osgeo.ogr as ogr
import pandas as p... | [
"tomalrussell@gmail.com"
] | tomalrussell@gmail.com |
4ca5452f0df11cd0388491948693a1c50cf6a03e | 6be1990abf99c85ef886b49dcea1824aabb648d3 | /weixinofneolocal/weixinofneolocal/libs/PIL/GbrImagePlugin.py | ff0f60f5d130760331d401418d04076713c432fc | [] | no_license | neoguojing/cloudServer | b53ae205efe52cf0aea28dbb9e6c16c20caf991f | 7c19101789b0c46474269e4c8fe00e92203e9cd7 | refs/heads/master | 2020-12-04T23:02:23.551479 | 2017-09-22T03:08:35 | 2017-09-22T03:08:35 | 67,382,984 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,635 | py | #
# The Python Imaging Library
# $Id$
#
# load a GIMP brush file
#
# History:
# 96-03-14 fl Created
#
# Copyright (c) Secret Labs AB 1997.
# Copyright (c) Fredrik Lundh 1996.
#
# See the README file for information on usage and redistribution.
#
import Image, ImageFile
def i32(c):
return ord(c[3]) + (or... | [
"guojing_neo@163.com"
] | guojing_neo@163.com |
c2afa2f4ed3d27b5eb256f45fbb043bb45179a34 | e167dfb535b72f56ea3c30c498f2a74324e9e04c | /app/common/model_utils.py | 7b0f98496899cb726bdd5a7ea11ccb8adc155300 | [
"MIT"
] | permissive | wlmsoft/Alpha-Gobang-Zero | ebde341af3ac6ecd9b6a71fdb0decedce078d2e8 | f836aee7147aa2aeb47dd8b370f94950b833718d | refs/heads/master | 2023-07-23T20:40:51.448213 | 2021-09-02T14:42:25 | 2021-09-02T14:42:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 327 | py | # coding:utf-8
import torch
from alphazero import PolicyValueNet
def testModel(model: str):
""" 测试模型是否可用
Parameters
----------
model: str
模型路径
"""
try:
model = torch.load(model)
return isinstance(model, PolicyValueNet)
except:
return False
| [
"1319158137@qq.com"
] | 1319158137@qq.com |
bd15811b1f2fa433f9fbce560c2bb146a9882c43 | 2e682fd72e3feaa70e3f7bf2a3b83c50d783ec02 | /PyTorch/built-in/nlp/Bert-text-classification_for_PyTorch/transformers/src/transformers/models/convnext/feature_extraction_convnext.py | 860bda96b6d2ca7b488d2f710a55318ee5e5e41c | [
"GPL-1.0-or-later",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | Ascend/ModelZoo-PyTorch | 4c89414b9e2582cef9926d4670108a090c839d2d | 92acc188d3a0f634de58463b6676e70df83ef808 | refs/heads/master | 2023-07-19T12:40:00.512853 | 2023-07-17T02:48:18 | 2023-07-17T02:48:18 | 483,502,469 | 23 | 6 | Apache-2.0 | 2022-10-15T09:29:12 | 2022-04-20T04:11:18 | Python | UTF-8 | Python | false | false | 7,348 | py | # coding=utf-8
# Copyright 2022 The HuggingFace Inc. team. 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 r... | [
"dongwenbo6@huawei.com"
] | dongwenbo6@huawei.com |
34fbcbb5b07243310281ddcea4e59205032d636b | 153da69b35f032f5b83a06f17008ba41a1b336b4 | /src/demo/__init__.py | da984a42f90721752b48b31d39530ff3bf6f8ff9 | [
"MIT"
] | permissive | TrendingTechnology/hspylib | 6400cadf9dfe6ab5733712dcfeccf8022d61c589 | c79a2c17e89fe21d00ccd9c1646a03407cd61839 | refs/heads/master | 2023-06-20T15:47:35.962661 | 2021-07-19T22:12:18 | 2021-07-19T23:45:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 148 | py | # _*_ coding: utf-8 _*_
#
# HSPyLib v0.11.1
#
# Package: demo
"""Package initialization."""
__all__ = [
'calculator',
'cli',
'phonebook'
]
| [
"yorevs@gmail.com"
] | yorevs@gmail.com |
30b2b633485473169ebe3f7392c7b57e23c0e4d2 | da7a165522daea7c346693c5f32850017c482967 | /leetcode/60questions/347_top_k_frequent_elements.py | b13499eff1c603b9085c6ed2ac07a357fad804ac | [] | no_license | SShayashi/ABC | 19f8750919208c5ff8935638dbaab941c255f914 | 3cbfee0c5251c1bb0df6306166d8d4b33bf7bb2c | refs/heads/master | 2021-05-04T21:06:10.720367 | 2020-07-11T13:59:16 | 2020-07-11T13:59:29 | 119,886,572 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 939 | py | from typing import List
class Solution:
def topKFrequent(self, nums: List[int], k: int) -> List[int]:
d = {}
for num in nums:
d[num] = d[num] + 1 if d.get(num, 0) else 1
tmp = list(d.items())
tmp.sort(key=lambda x: x[1], reverse=True)
ans = []
for i in ... | [
"sshayashi0208@gmail.com"
] | sshayashi0208@gmail.com |
ff99da7f9a431c6ffe09cca96a217b4f38518c7a | 52b5773617a1b972a905de4d692540d26ff74926 | /.history/merge_20200722101228.py | fc5063ed0117fd9fbf7a41674a7bab7060ccc3e0 | [] | no_license | MaryanneNjeri/pythonModules | 56f54bf098ae58ea069bf33f11ae94fa8eedcabc | f4e56b1e4dda2349267af634a46f6b9df6686020 | refs/heads/master | 2022-12-16T02:59:19.896129 | 2020-09-11T12:05:22 | 2020-09-11T12:05:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 477 | py | items = []
def mergeSort(data):
if len(data) > 1:
mid = len(data) // 2
leftArr = data[:mid]
rightArr= data[mid:]
# now to perform the merge
i = 0
j = 0
k = 0
while i < len(leftArr) and j < len(rightArr):
if leftArr[i] < rightArr[j]:
... | [
"mary.jereh@gmail.com"
] | mary.jereh@gmail.com |
bde3cdffacb74c379934c3b976da5ac53db144a3 | 51e93332b5b0221bb1b34d4b53f761d9d53e1b9c | /app/core/migrations/0001_initial.py | a88ea9f86995282d556a7ffaa56cd09c1bfd0e23 | [
"MIT"
] | permissive | MaistrenkoAnton/TDD | 286d0cb0d24c796f045eeac4d03f29ac3bf0ab5a | 20049d08f22aeeb626a7975bbee3dc5c95c76449 | refs/heads/master | 2020-06-02T03:32:20.396472 | 2019-08-05T12:24:57 | 2019-08-05T12:24:57 | 191,021,446 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,707 | py | # Generated by Django 2.1.9 on 2019-06-09 19:47
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0009_alter_user_last_name_max_length'),
]
operations = [
migrations.CreateModel(
name='User',
... | [
"it2015maistrenko@gmail.com"
] | it2015maistrenko@gmail.com |
710826787f7469b5c8d8e68f530a894b8067623e | f24f8a5cf1580470cf616705a220027feac9b177 | /awesome/api/awesome/celery.py | ecb47c15ebd34979cbb44196e89352deda7f603a | [] | no_license | tvtrong/restapi | 4f5eb4ad545ed9dd7847f63994957fdc76fc3eba | c3da498108df1e7950ea2cc003dd75f0fe5a1b60 | refs/heads/master | 2022-12-25T19:39:45.627411 | 2020-10-10T12:39:33 | 2020-10-10T12:39:33 | 302,898,797 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 245 | py | import os
from celery import Celery
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "awesome.settings")
celery_app = Celery("awesome")
celery_app.config_from_object("django.conf:settings", namespace="CELERY")
celery_app.autodiscover_tasks()
| [
"phongtaitieu@gmail.com"
] | phongtaitieu@gmail.com |
746774617ed9e37b03bbc24665b63b4a592bf514 | baf3996414315ffb60470c40c7ad797bf4e6897f | /02_ai/1_ml/4_ml_mastery/code/chapter_09/shuffle_split.py | 300dc2268fc15665661c5450849e0a375e9836d3 | [
"MIT"
] | permissive | thiago-allue/portfolio | 8fbbecca7ce232567aebe97c19944f444508b7f4 | 0acd8253dc7c5150fef9b2d46eead3db83ca42de | refs/heads/main | 2023-03-15T22:10:21.109707 | 2022-09-14T17:04:35 | 2022-09-14T17:04:35 | 207,919,073 | 0 | 0 | null | 2019-11-13T18:18:23 | 2019-09-11T22:40:46 | Python | UTF-8 | Python | false | false | 733 | py | # Evaluate using Shuffle Split Cross Validation
from pandas import read_csv
from sklearn.model_selection import ShuffleSplit
from sklearn.model_selection import cross_val_score
from sklearn.linear_model import LogisticRegression
filename = 'pima-indians-diabetes.data.csv'
names = ['preg', 'plas', 'pres', 'skin', 'test'... | [
"thiago.allue@yahoo.com"
] | thiago.allue@yahoo.com |
c62c24e115cdf1835d84b2b7bb4b7def2fbadcf6 | 5da5473ff3026165a47f98744bac82903cf008e0 | /packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_stop_migration_job_async.py | a4bc8f0f5878cfe73e659344426766b46ce49d17 | [
"Apache-2.0"
] | permissive | googleapis/google-cloud-python | ed61a5f03a476ab6053870f4da7bc5534e25558b | 93c4e63408c65129422f65217325f4e7d41f7edf | refs/heads/main | 2023-09-04T09:09:07.852632 | 2023-08-31T22:49:26 | 2023-08-31T22:49:26 | 16,316,451 | 2,792 | 917 | Apache-2.0 | 2023-09-14T21:45:18 | 2014-01-28T15:51:47 | Python | UTF-8 | Python | false | false | 1,959 | py | # -*- coding: utf-8 -*-
# Copyright 2023 Google LLC
#
# 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... | [
"noreply@github.com"
] | googleapis.noreply@github.com |
32899d3e754390786ab649a1de26f959c3d28b8e | ebd6f68d47e192da7f81c528312358cfe8052c8d | /swig/Examples/test-suite/python/overload_template_runme.py | 014ec71cbb0db5035821e801e8ec2cb7a7342c9d | [
"LicenseRef-scancode-swig",
"GPL-3.0-or-later",
"LicenseRef-scancode-unknown-license-reference",
"GPL-3.0-only",
"Apache-2.0"
] | permissive | inishchith/DeepSpeech | 965ad34d69eb4d150ddf996d30d02a1b29c97d25 | dcb7c716bc794d7690d96ed40179ed1996968a41 | refs/heads/master | 2021-01-16T16:16:05.282278 | 2020-05-19T08:00:33 | 2020-05-19T08:00:33 | 243,180,319 | 1 | 0 | Apache-2.0 | 2020-02-26T05:54:51 | 2020-02-26T05:54:50 | null | UTF-8 | Python | false | false | 3,596 | py | from overload_template import *
f = foo()
a = maximum(3, 4)
b = maximum(3.4, 5.2)
# mix 1
if (mix1("hi") != 101):
raise RuntimeError, ("mix1(const char*)")
if (mix1(1.0, 1.0) != 102):
raise RuntimeError, ("mix1(double, const double &)")
if (mix1(1.0) != 103):
raise RuntimeError, ("mix1(double)")
# mix ... | [
"inishchith@gmail.com"
] | inishchith@gmail.com |
ff962c602c1f68d63c7883569742a8670659f422 | e6b45b6cc01a921c3cc510f1a5fff3074dd6b2dd | /example_update1/PoissonFEMWithRobinBC_example.py | 3ff8c61a39419d78d70757f91ba1ecd69df871af | [] | no_license | yoczhang/FEALPyExamples | 3bd339bd5f4576630f767a758da9590a1c068410 | 44d9acbecb528374bc67bba50c62711384228d39 | refs/heads/master | 2023-07-24T21:35:50.633572 | 2023-07-05T02:28:13 | 2023-07-05T02:28:13 | 208,667,003 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,646 | py | #!/usr/bin/env python3
#
import sys
import numpy as np
from scipy.sparse.linalg import spsolve
import matplotlib.pyplot as plt
import pyamg
from fealpy.functionspace import LagrangeFiniteElementSpace
from fealpy.boundarycondition import RobinBC
from fealpy.tools.show import showmultirate
p = int(sys.argv[1])
n ... | [
"yoczhang@126.com"
] | yoczhang@126.com |
cea744c519951b1d792842fa074670506fc24208 | 760e1c14d056dd75958d367242c2a50e829ac4f0 | /bit/338_counting_bits.py | 81ff431da8a2934e28c5d1339ee654906a25b2a5 | [] | no_license | lawtech0902/py_imooc_algorithm | 8e85265b716f376ff1c53d0afd550470679224fb | 74550d68cd3fd2cfcc92e1bf6579ac3b8f31aa75 | refs/heads/master | 2021-04-26T22:54:42.176596 | 2018-09-23T15:45:22 | 2018-09-23T15:45:22 | 123,894,744 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,266 | py | # _*_ coding: utf-8 _*_
"""
__author__ = 'lawtech'
__date__ = '2018/9/3 下午4:25'
给定一个非负整数 num。对于 0 ≤ i ≤ num 范围中的每个数字 i ,计算其二进制数中的 1 的数目并将它们作为数组返回。
示例 1:
输入: 2
输出: [0,1,1]
示例 2:
输入: 5
输出: [0,1,1,2,1,2]
进阶:
给出时间复杂度为O(n*sizeof(integer))的解答非常容易。但你可以在线性时间O(n)内用一趟扫描做到吗?
要求算法的空间复杂度为O(n)。
你能进一步完善解法吗?要求在C++或任何其他语言中不使用任何内置函... | [
"584563542@qq.com"
] | 584563542@qq.com |
dc12825f1785f0eceb733db879c05efe907c1ac8 | e912af291e1457c61606642f1c7700e678c77a27 | /python/532_k-diff_pairs_in_an_array.py | b3078a0372260afbe3f7744d4defba6a128add92 | [] | no_license | MakrisHuang/LeetCode | 325be680f8f67b0f34527914c6bd0a5a9e62e9c9 | 7609fbd164e3dbedc11308fdc24b57b5097ade81 | refs/heads/master | 2022-08-13T12:13:35.003830 | 2022-07-31T23:03:03 | 2022-07-31T23:03:03 | 128,767,837 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 282 | py | class Solution:
def findPairs(self, nums: List[int], k: int) -> int:
if k > 0:
return len(set(nums) & set(n + k for n in nums))
elif k == 0:
return sum(v > 1 for v in collections.Counter(nums).values())
else:
return 0
| [
"vallwesture@gmail.com"
] | vallwesture@gmail.com |
3b7afc565fc2ff0482cafb249736d156f6f05efc | 59166105545cdd87626d15bf42e60a9ee1ef2413 | /test/test_ice_hockey_league.py | c6490a78cce2303eb5bfa685c644b362d39686a4 | [] | no_license | mosoriob/dbpedia_api_client | 8c594fc115ce75235315e890d55fbf6bd555fa85 | 8d6f0d04a3a30a82ce0e9277e4c9ce00ecd0c0cc | refs/heads/master | 2022-11-20T01:42:33.481024 | 2020-05-12T23:22:54 | 2020-05-12T23:22:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,309 | py | # coding: utf-8
"""
DBpedia
This is the API of the DBpedia Ontology # noqa: E501
The version of the OpenAPI document: v0.0.1
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import datetime
import dbpedia
from dbpedia.models.ice_hockey_leagu... | [
"maxiosorio@gmail.com"
] | maxiosorio@gmail.com |
ccd797d9bd113bf5dbade1cb215f77a6a5b3b320 | 9d40c348e256bd74455521a7a11d8a4ab5d0d9f0 | /setup.py | b88fc0a1a902044454101d52320b623ab903dd99 | [] | no_license | tianon/etest | acf5bd2f06cf9a5024353cfc8128c3e968b889c2 | 01f24e46caaa3c75c48c43e59a8c03da81e06e3b | refs/heads/master | 2021-01-17T20:11:43.244552 | 2015-05-03T15:10:06 | 2015-05-03T15:10:33 | 36,564,139 | 0 | 0 | null | 2015-05-30T15:38:31 | 2015-05-30T15:38:31 | null | UTF-8 | Python | false | false | 2,447 | py | # Copyright (C) 2014 by Alex Brandt <alunduil@alunduil.com>
#
# etest is freely distributable under the terms of an MIT-style license.
# See COPYING or http://www.opensource.org/licenses/mit-license.php.
import os
from setuptools import setup, find_packages
from codecs import open
with open(os.path.join('etest', 'in... | [
"alunduil@alunduil.com"
] | alunduil@alunduil.com |
449664c6a652f208251835430b04392c9f31857d | 457d07994582657539a52d2fe8b7c24557ecc1fb | /service10/migrations/0003_auto_20190201_0630.py | 0bcec6dd58bbb0c6baf0b78d282f64a82370ca3c | [] | no_license | ohsehwan/django_admin_nanum | 952c91452697f1ee7718449ceceaf4e434c3da27 | 0478389d3a44592fd2ee6f025f2b4a66c1a2176e | refs/heads/master | 2022-12-23T01:18:58.124355 | 2019-06-21T07:42:49 | 2019-06-21T07:42:49 | 168,487,820 | 3 | 1 | null | 2022-12-08T01:02:50 | 2019-01-31T08:11:59 | JavaScript | UTF-8 | Python | false | false | 597 | py | # Generated by Django 2.1.5 on 2019-02-01 06:30
import ckeditor.fields
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('service10', '0002_mentor'),
]
operations = [
migrations.CreateModel(
name='article',
fields=[... | [
"dxman@naver.com"
] | dxman@naver.com |
55f57819c1d4758954960879bf878e26885de0ae | e992b76761d2cc95e55d8c21f78f9636b0f74aae | /caches/__init__.py | 1611d10b35c4da8ec7150bb0321420534a499a69 | [
"MIT"
] | permissive | Jaymon/caches | 7d61bed61ef8d3dc8a328ee037c14a4fc994e98f | 3e2aa5fcf51e8de80bea46eb117b73fb1f398e53 | refs/heads/master | 2023-07-20T23:13:55.461196 | 2023-07-12T20:33:49 | 2023-07-12T20:33:49 | 12,884,773 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,162 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, division, print_function, absolute_import
import logging
from caches.compat import *
from caches.core import (
Cache,
DictCache,
SetCache,
SortedSetCache,
SentinelCache,
)
from .interface import get_interfaces, get_interface, set_inte... | [
"jay@marcyes.com"
] | jay@marcyes.com |
5edeb038cd1f87c8aac071184fd2fef2036abf0b | 781e2692049e87a4256320c76e82a19be257a05d | /all_data/cs61a/untarred backup/122.py | 887a81dc01674a92d8b5e6f55aff075abf43e9b7 | [] | no_license | itsolutionscorp/AutoStyle-Clustering | 54bde86fe6dbad35b568b38cfcb14c5ffaab51b0 | be0e2f635a7558f56c61bc0b36c6146b01d1e6e6 | refs/heads/master | 2020-12-11T07:27:19.291038 | 2016-03-16T03:18:00 | 2016-03-16T03:18:42 | 59,454,921 | 4 | 0 | null | 2016-05-23T05:40:56 | 2016-05-23T05:40:56 | null | UTF-8 | Python | false | false | 1,076 | py | def num_common_letters(goal_word, guess):
"""Returns the number of letters in goal_word that are also in guess.
As per the rules of the game, goal_word cannot have any repeated
letters, but guess is allowed to have repeated letters.
goal_word and guess are assumed to be of the same length.
goal... | [
"rrc@berkeley.edu"
] | rrc@berkeley.edu |
cea269f71a06be2e88bab6c122be7e5ec8d08c22 | 8a6c1d9ff5f469774ca4651d46f212474b3435bf | /base/base_driver.py | 8d5ef05be8b058f89c05bfb1479b57f4c18c3888 | [] | no_license | yuanyue888666/test_jinkens_001 | 67a68378dc518e3033a4563f0530adeb530a8646 | b553d0348d967cdb6e25c7d1a46746b75f6d9512 | refs/heads/master | 2020-04-27T15:46:15.202764 | 2019-03-08T03:42:47 | 2019-03-08T03:42:47 | 174,459,619 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 657 | py |
from appium import webdriver
def init_driver():
"""
只要调用,就可以打开对应的应用程序
:return:
"""
# server 启动参数
desired_caps = {}
# 设备信息
desired_caps['platformName'] = 'Android'
desired_caps['platformVersion'] = '5.1'
desired_caps['deviceName'] = '192.168.56.101:5555'
# app的信息
desire... | [
"johndoe@example.com"
] | johndoe@example.com |
9808dd7f6cb3c4f34d801fa34e4fda3e2717b5d7 | a15b050e661c31880acc72465421f3ba4906ef06 | /0x06-python-classes/101-square.py | ffd6008dce8087b7476ce7b4b8aa8ac3e838cdf3 | [] | no_license | zacwoll/holbertonschool-higher_level_programming | 0c483195f50a55fe0bfae5cff03c0c86719d8063 | 9c7dda67dc5681fd96b90d6f05ee9748a37ed8b8 | refs/heads/master | 2022-12-22T04:54:13.815410 | 2020-09-25T16:03:41 | 2020-09-25T16:03:41 | 259,412,215 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,844 | py | #!/usr/bin/python3
"""Represent a Square Object with a __repr__ toString"""
class Square:
"""A Square"""
def __init__(self, size=0, position=(0, 0)):
"""Init"""
self.__size = size
self.__position = position
def __repr__(self):
"""Square toString"""
to_str = ''
... | [
"zacwoll@gmail.com"
] | zacwoll@gmail.com |
4c19051a43c291779e8c00d44bd6b787249af569 | 20b2d61c0959023cb51be92fafe54877aecb9887 | /pabi_utils/models/ir_attachment.py | 574f5bb0a1d036cefea059529c50c697e945ffb3 | [] | no_license | BTCTON/pb2_addons | 6841a23554054f859b0c4acafb4e91bd0c3a14e4 | a5bfd90c202cea894690c96d74a74fa96eb79468 | refs/heads/master | 2021-09-07T16:55:41.195667 | 2018-02-26T11:27:01 | 2018-02-26T11:27:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,864 | py | # -*- coding: utf-8 -*-
import logging
import os
from openerp import models, fields, api
_logger = logging.getLogger(__name__)
class IrAttachment(models.Model):
_inherit = 'ir.attachment'
@api.model
def name_search(self, name, args=None, operator='ilike', limit=80):
if self._context.get('domain_... | [
"kittiu@gmail.com"
] | kittiu@gmail.com |
485e5433667081aaf4dc508002d827c07367437d | 6bc485e593a24354e8ec6ad1284809c5748b7995 | /workon/contrib/admin2/templatetags/workon_admin_forms.py | 5e50c0aa768171d3c1ca93e280ff13d4969dbcbe | [
"BSD-3-Clause"
] | permissive | dalou/django-workon | fba87b6951540d7f059c8fcb79cd556573f56907 | ef63c0a81c00ef560ed693e435cf3825f5170126 | refs/heads/master | 2021-01-20T11:09:49.314839 | 2018-12-29T16:56:08 | 2018-12-29T16:56:08 | 50,340,299 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,936 | py | from django import template
from ..config import get_config
register = template.Library()
def get_form_size(fieldset):
default_label_class = get_config('form_size').split(':')
# Try fieldset definition at first
size_by_fieldset = get_fieldset_size(fieldset)
if size_by_fieldset:
return size_b... | [
"autrusseau.damien@gmail.com"
] | autrusseau.damien@gmail.com |
e7fe710c9c2d6ebda3fbd6abeb440116a6fe2d4b | 90c6262664d013d47e9a3a9194aa7a366d1cabc4 | /tests/storage/cases/test_KT1EyeTPvtVgJHhrUaVSNQo75AKQZSGwu9aM.py | 4057d7a5c0281d83115c8389161a41dd451ce6df | [
"MIT"
] | permissive | tqtezos/pytezos | 3942fdab7aa7851e9ea81350fa360180229ec082 | a4ac0b022d35d4c9f3062609d8ce09d584b5faa8 | refs/heads/master | 2021-07-10T12:24:24.069256 | 2020-04-04T12:46:24 | 2020-04-04T12:46:24 | 227,664,211 | 1 | 0 | MIT | 2020-12-30T16:44:56 | 2019-12-12T17:47:53 | Python | UTF-8 | Python | false | false | 1,130 | py | from unittest import TestCase
from tests import get_data
from pytezos.michelson.converter import build_schema, decode_micheline, encode_micheline, micheline_to_michelson
class StorageTestKT1EyeTPvtVgJHhrUaVSNQo75AKQZSGwu9aM(TestCase):
@classmethod
def setUpClass(cls):
cls.maxDiff = None
cls.... | [
"mz@baking-bad.org"
] | mz@baking-bad.org |
6f50d5f2a0f722718cb1480dd3c12c423f57a9ac | 5f13ce6fb06d86f99ddcc0d8aa16cc4817ec4b03 | /api.py | 9c029c70498dce7666c1bcb59689c55d50bada12 | [] | no_license | news-ai/news-processing | 1b59f17c24da9f48d35c09db64c98fca18471bb6 | 1b874e186f8b9d8510dd3b47a672a7c08f98e082 | refs/heads/master | 2021-03-19T16:42:57.783382 | 2016-06-11T18:26:31 | 2016-06-11T18:26:31 | 58,774,781 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,493 | py | # Stdlib imports
import logging
# Third-party app imports
from flask import Flask, request, jsonify
from flask.ext.cors import CORS
from flask_restful import Resource, Api, reqparse
from raven.contrib.flask import Sentry
# Imports from app
from middleware.config import (
SENTRY_USER,
SENTRY_PASSWORD,
SENT... | [
"me@abhiagarwal.com"
] | me@abhiagarwal.com |
b4118ccd20e3a44af5e0864ac2e03dd8488f8d35 | a6d62bb9f4cb00fea89ff10e27b516890dc8a49a | /utils/generic_utils.py | 57536f8847a50c7ab234709d48cbf404620729cc | [
"MIT"
] | permissive | WeberJulian/Wav2Vec-Wrapper | dca6be0edd25f67b9a3e2719dc5bee8b0bbdfb4f | 84519cd51a4f3d9cb61de99c5712640f3cf5213d | refs/heads/main | 2023-06-11T15:26:53.754106 | 2021-07-06T17:13:38 | 2021-07-06T17:13:38 | 383,545,362 | 0 | 0 | MIT | 2021-07-06T17:14:03 | 2021-07-06T17:14:03 | null | UTF-8 | Python | false | false | 2,816 | py | import os
import re
import yaml
import json
import torch
import numpy as np
from datasets import load_metric
wer_metric = load_metric("wer")
def calculate_wer(pred_ids, labels, processor, debug=False):
labels[labels == -100] = processor.tokenizer.pad_token_id
pred_string = processor.batch_decode(pred_ids)
... | [
"edresson1@gmail.com"
] | edresson1@gmail.com |
47e279735f840d1e03f6ec23975d5337aa5da6bc | 376e4114a1ef612ae5d0d2a53a74076870562067 | /2017/R1CA/Pancake.py | 91a0621901dc3c2ad74766f7eec04f93645d6b25 | [] | no_license | jacegem/google-codejam-py | 1890e895c56ceb6c4cbcaa4c5cae213f1cb2dd6a | 4e3300021c7f54c339da92afc0974d5076d60499 | refs/heads/master | 2021-06-06T07:45:53.946239 | 2021-04-10T03:30:49 | 2021-04-10T03:30:49 | 89,255,303 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 445 | py |
class Pancake:
def __init__(self, r, h, top, surface):
self.r = r
self.h = h
self.top = top
self.surface = surface
self.used = False
self.top_surface = top + surface
def set_used(self, used):
self.used = used
def is_used(self):
return self.u... | [
"jacegem@gmail.com"
] | jacegem@gmail.com |
0c951d03079b7356ec0f67cbf8d87e34b58a4537 | 1edf4c50123a6001b30cff3ad098d566f058ed8f | /utility/dataSplit.py | d7b3bfe61f47b3d43122e90d8c00effdac2fb8d1 | [] | no_license | HaohanWang/geneExpressionRepresentation | be19fa9c89b55063f22614bf6938249275264369 | 5e6881f7e5f3c3a04325437a4894387219e852b8 | refs/heads/master | 2021-01-10T17:44:36.209021 | 2016-05-03T05:44:19 | 2016-05-03T05:44:19 | 50,133,394 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,246 | py | import numpy as np
# ids = [line.strip() for line in open('../data/ids.txt')]
#
# text = [line.strip() for line in open('../data/ppi_ids.txt')]
#
# ppi = {}
#
# for line in text:
# items = line.split()
# id1 = items[0]
# id2 = items[1]
# ppi[(id1, id2)] = 0
#
# count = 0
#
# p = []
# n = []
# np.random... | [
"haohanw@andrew.cmu.edu"
] | haohanw@andrew.cmu.edu |
30665cc9a04c96f8151128447b3694303cff9e74 | 293b7305b86628aa92e23ea10f799b4848661aa5 | /implugin/flashmsg/tests/test_models.py | 6cc1793d411b7303753914717ef8ebcdde503af4 | [] | no_license | socek/impaf-flashmsg | 2ce751c54ff8d9e95f38a691b3579320e3ace546 | 4af4355934f6edf512893f7e9dacfe188179ea62 | refs/heads/master | 2020-04-08T20:58:21.124723 | 2015-08-14T18:05:55 | 2015-08-14T18:05:55 | 38,713,760 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 655 | py | from mock import sentinel
from impaf.testing import PyTestCase
from ..models import FlashMessage
class TestFlasMessage(PyTestCase):
_object_cls = FlashMessage
def test_to_dict(self):
obj = self.object(sentinel.message, sentinel.msgtype)
assert obj.to_dict() == {
'message': senti... | [
"msocek@gmail.com"
] | msocek@gmail.com |
1ce69a1233f5a517348185955b4ec1e46eafffd4 | c7aea375046d194a5bd3c9fda615519f4374b790 | /lab3/text_recognizer/networks/line_lstm_ctc.py | 35205b418d4502e5425aa5d9522fd2821741b094 | [] | no_license | venuraja79/fsdl-text-recognizer-project | 195b16bff453df5acda65181e96f65cb98172b54 | 1b9d20f0de2dd5aa59af490b086f985411c60e20 | refs/heads/master | 2020-06-30T22:09:45.433461 | 2019-08-07T08:53:05 | 2019-08-07T08:53:05 | 200,964,049 | 0 | 1 | null | 2019-08-07T03:20:26 | 2019-08-07T03:20:24 | null | UTF-8 | Python | false | false | 2,406 | py | """LSTM with CTC for handwritten text recognition within a line."""
import tensorflow.keras.backend as K
from tensorflow.python.client import device_lib # pylint: disable=no-name-in-module
from tensorflow.keras.layers import Dense, Input, Reshape, TimeDistributed, Lambda, LSTM, CuDNNLSTM
from tensorflow.keras.models i... | [
"sergeykarayev@gmail.com"
] | sergeykarayev@gmail.com |
f49719da2036ba7ff1dc02db5fb0434c2acd830a | f23a0561ed2e1f5192a2933ba3205bbc84e0172c | /ruidun_system/internet_operate/viewsets/get_monitoring_viewset.py | f7d1a4efbee6c85c9b9e2e159797e78386e57bc5 | [] | no_license | TingxieLi/django-restframework | a179a794760830cedcf60c0069cb7c8d4c7127cd | 3645bc3a396727af208db924c6fdee38abc0f894 | refs/heads/master | 2020-12-05T13:13:29.937243 | 2019-07-18T03:33:23 | 2019-07-18T03:33:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 267 | py | from rest_framework import viewsets
class GetMonitoringViewSet(viewsets.ReadOnlyModelViewSet):
def retrieve(self, request, *args, **kwargs):
# 获取视频内容,视频应该是实时传输的,这里应该怎么返回数据?
pass
| [
"851864721@qq.com"
] | 851864721@qq.com |
08f94cf25a949eefbaca4cf0a9b2fc8d254be62e | f295b56e9af284092233a724af041a91b35a9f6a | /binary-tree-level-order-traversal/binary-tree-level-order-traversal.py | eb00973a0045f605df9fbf717059748d2f4e83a2 | [] | no_license | saviaga/Coding_E | 7ebdf03b5eca775903ee4b863b56e26190b40029 | dd21bb3b9d8905263416b206877f1a3d9416ee3f | refs/heads/main | 2023-05-02T19:42:07.267054 | 2021-05-21T17:41:52 | 2021-05-21T17:41:52 | 334,220,320 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 794 | py | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def levelOrder(self, root: TreeNode) -> List[List[int]]:
if root is None:
return
... | [
"saviaga@gmail.com"
] | saviaga@gmail.com |
4ce02e446ce4895df060625959a73f6d4a1e7ff2 | 1deda52f84b25e52a70dd26afa31c1e40a8391ac | /tools/improved-bertscore-for-image-captioning-evaluation/match_cand_refs.py | e691f1f139291d3f3ce03d32227a38703e6144ae | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | jlcsilva/syncap | 7ae7b7974b1c3eeb6507006a325725a67c765c7b | c8191de4e77b6ea9109f124b9f398d9f2c7d7662 | refs/heads/master | 2023-04-10T23:16:39.902339 | 2021-04-23T06:03:24 | 2021-04-23T06:03:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 906 | py | import json
import argparse
from collections import defaultdict
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--refs_file')
parser.add_argument('--cand_file')
parser.add_argument('--output_fn')
args = parser.parse_args()
# Refs
j = json.load(open(args.r... | [
"emanuele@di.ku.dk"
] | emanuele@di.ku.dk |
79d14202170a7d08135e126bbb7479e3da932f84 | 09f0505f3ac1dccaf301c1e363423f38768cc3cc | /r_DailyProgrammer/Easy/C266/unittests/unittest.py | 07fde993ddb932a70f2021b847e679aadef121e2 | [] | no_license | Awesome-Austin/PythonPractice | 02212292b92814016d062f0fec1c990ebde21fe7 | 9a717f91d41122be6393f9fcd1a648c5e62314b3 | refs/heads/master | 2023-06-21T11:43:59.366064 | 2021-07-29T23:33:00 | 2021-07-29T23:33:00 | 270,854,302 | 0 | 0 | null | 2020-08-11T20:47:10 | 2020-06-08T23:24:09 | Python | UTF-8 | Python | false | false | 259 | py | #! python3
import unittest
from r_DailyProgrammer.Easy.C266.unittests.test_values import TEST_VALUES
class MyTestCase(unittest.TestCase):
def test_something(self):
self.assertEqual(True, False)
if __name__ == '__main__':
unittest.main()
| [
"{ID}+{username}@users.noreply.github.com"
] | {ID}+{username}@users.noreply.github.com |
7e177a8d82713addc215fa1037b0a74cbfaafb7d | b9be3d951bfab350191092540edc6e353283d621 | /.direnv/python-3.4.3/bin/rst2xml.py | 94a9206c1126cc30a738a855d3950f2aca899539 | [] | no_license | bekkblando/django-social | 7ebd82f66c82ffa6918621e5ee7142bfa5f712d8 | fe47d1babb94170e5403af9ce0f3c672c3045a0d | refs/heads/master | 2020-12-11T01:40:01.429628 | 2015-08-18T14:24:33 | 2015-08-18T14:24:33 | 38,706,690 | 0 | 0 | null | 2015-07-07T18:25:26 | 2015-07-07T18:25:25 | null | UTF-8 | Python | false | false | 668 | py | #!/Users/BekkBlando/Documents/github/djangosocial/.direnv/python-3.4.3/bin/python3.4
# $Id: rst2xml.py 4564 2006-05-21 20:44:42Z wiemann $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
A minimal front end to the Docutils Publisher, producing Docutils X... | [
"bekkblando@gmail.com"
] | bekkblando@gmail.com |
52aee0fd09b24edae3d34ee70ae4d681a2aa67da | 3291359d8867e7b5ca9e8befb83629810938f903 | /timetable_v3/timetable_v3/urls.py | eb0c1bca0f82d83d2d60c6e88d1f7d126e417997 | [] | no_license | A-miin/timetable_v3 | f9e4610800acb83f3477dcffd2b0ce1c75d2c1d0 | 1de0885f04beec83657672275deff22b71af2de3 | refs/heads/master | 2023-06-09T18:51:44.298534 | 2021-07-02T15:01:54 | 2021-07-02T15:01:54 | 341,462,656 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,035 | py | """timetable_v3 URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-... | [
"zulaykaisaeva@gmail.com"
] | zulaykaisaeva@gmail.com |
2ad7d7451c252323a7b922b7ce42a3e1f7a03c10 | 1ec29bec73904435980eedc26b3f1e07fafb8784 | /shmakovpn/tests/add_method_to_class/test_add_method_to_class.py | cbf04d3fd1befc3caed91a88242ef0ba4f9491ed | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | shmakovpn/shmakovpn_tools | 4f799c803f4ebdff0e82253ec161d5977e6036cb | 85090c9489b0b9fa13b6c42c91459efe9b966a3b | refs/heads/master | 2023-06-08T17:32:34.591391 | 2021-06-17T05:22:38 | 2021-06-17T05:22:38 | 284,875,102 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,118 | py | """
The simple example that explains the impossibility of adding a method to builtin type.
Author: shmakovpn <shmakovpn@yandex.ru>
Date: 2020-10-01
"""
import unittest
class TestAddMethodToClass(unittest.TestCase):
"""
It is possible to add a method to a class outside of the class
"""
... | [
"shmakovpn@yandex.ru"
] | shmakovpn@yandex.ru |
66d3b0de7469b1683d10d96d96d69ab4acea07d3 | 56b36ddf920b5f43e922cb84e8f420f1ad91a889 | /Hackerrank/Hackkerrank-Designer PDF Viewer.py | 1c85d2e8aa255eccd12daed1cbc4d104ce1bd3ca | [] | no_license | chithien0909/Competitive-Programming | 9ede2072e85d696ccf143118b17638bef9fdc07c | 1262024a99b34547a3556c54427b86b243594e3c | refs/heads/master | 2022-07-23T16:47:16.566430 | 2020-05-12T08:44:30 | 2020-05-12T08:44:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 564 | py | #!/bin/python3
import math
import os
import random
import re
import sys
# Complete the designerPdfViewer function below.
def designerPdfViewer(h, word):
# word = nhan
# arr = [1,3,2,1]
arr=[]
for letter in word:
index = ord(letter) - 97
arr.append(h[index])
return max(arr) * len(a... | [
"ntle1@pipeline.sbcc.edu"
] | ntle1@pipeline.sbcc.edu |
07c43020b2c4de524585a2995ba0ad589f42ef70 | 8fd92c0a65c9b3e3912b6e8ef043656ee225880a | /datetime_examples.py | e6023b44234c3f6cfb1b822db2448812f1685d86 | [] | no_license | waiteb15/py3forsci3day | 9fbcbb59f1c14f3d91cb2599d7ca8b4d6ac628c4 | fc664042618f0910d40e85677a2438eef5cce2b7 | refs/heads/master | 2020-04-25T11:24:18.697218 | 2019-02-28T23:40:52 | 2019-02-28T23:40:52 | 172,743,315 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 988 | py | #!/usr/bin/env python
from datetime import date, datetime, timedelta, time
today = date.today()
print(today, today.year)
james_bd = date(2014, 8, 1)
print(james_bd)
delta = today - james_bd
print(delta)
years = int(delta.days // 365.25)
print(f"James is {years} years old")
event = datetime(2019,... | [
"waiteb15@gmail.com"
] | waiteb15@gmail.com |
10ebe15e221446bab08a4d897fc101f9d8a8b95f | a5aabe2e4057d78e687a57a6b560516a7cdb5836 | /unsserv/common/rpc/protocol.py | 688b39a308b01db7dacf58311fc8aea432c875c7 | [
"MIT"
] | permissive | aratz-lasa/py-unsserv | 0ffc09ddab65a11ce917d0faa8b1b5dff091e563 | 6f332385e55d05953186b9a8b7848bca4b878e18 | refs/heads/master | 2022-12-14T21:10:12.397834 | 2020-05-03T11:29:49 | 2020-05-03T11:29:49 | 228,329,158 | 5 | 0 | MIT | 2022-12-08T07:00:55 | 2019-12-16T07:35:20 | Python | UTF-8 | Python | false | false | 2,808 | py | import asyncio
from abc import ABC, abstractmethod
from dataclasses import is_dataclass, asdict
from enum import IntEnum
from typing import Any, Tuple, Sequence, Dict, Callable
from unsserv.common.rpc.rpc import RPCRegister, RPC
from unsserv.common.rpc.structs import Message
from unsserv.common.structs import Node
Co... | [
"aratzml@opendeusto.es"
] | aratzml@opendeusto.es |
17ae1f4270a5e2ebf48e65265aafc3399ecba836 | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /E9FwvGyad5CDbiH4C_14.py | 47f2553b08320fb3dbcb4e7c16ad17e66bc52e21 | [] | no_license | daniel-reich/ubiquitous-fiesta | 26e80f0082f8589e51d359ce7953117a3da7d38c | 9af2700dbe59284f5697e612491499841a6c126f | refs/heads/master | 2023-04-05T06:40:37.328213 | 2021-04-06T20:17:44 | 2021-04-06T20:17:44 | 355,318,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 157 | py |
def block(lst):
lista = [list(i) for i in list(zip(*lst)) if 2 in i]
q = 0
for i in lista:
q += len(i) - (i.index(2) + 1)
return q
| [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
f4823491f0f44b3d340a720dbc47cf29a5a8e325 | 55540f3e86f1d5d86ef6b5d295a63518e274efe3 | /toolchain/riscv/MSYS/riscv64-unknown-elf/lib/rv32imfdc_zba_zbb/ilp32d/libstdc++.a-gdb.py | 8e9d75e886ed14abcb55b187bbbe376b0ca67b81 | [
"Apache-2.0"
] | permissive | bouffalolab/bl_iot_sdk | bc5eaf036b70f8c65dd389439062b169f8d09daa | b90664de0bd4c1897a9f1f5d9e360a9631d38b34 | refs/heads/master | 2023-08-31T03:38:03.369853 | 2023-08-16T08:50:33 | 2023-08-18T09:13:27 | 307,347,250 | 244 | 101 | Apache-2.0 | 2023-08-28T06:29:02 | 2020-10-26T11:16:30 | C | UTF-8 | Python | false | false | 2,772 | py | # -*- python -*-
# Copyright (C) 2009-2020 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later versio... | [
"jczhang@bouffalolab.com"
] | jczhang@bouffalolab.com |
0d1bfe45270d76b88c774d848ede4a38ee8cb120 | 60364a7089bc359494a4a42ba6d79c2fd0b84185 | /django_extended/emailing/backend.py | ced758319243991dd06e01a4e9d2d45cbf3c16e2 | [
"BSD-3-Clause"
] | permissive | dalou/django-extended | 4936c77535bc4421a9f003da58a49629bc7996df | a7ba952ea7089cfb319b4615ae098579c9ab14f9 | refs/heads/master | 2021-10-27T09:33:28.615992 | 2015-12-14T14:55:33 | 2015-12-14T14:55:33 | 46,408,921 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,698 | py | from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.core.mail.backends.base import BaseEmailBackend
from django.core.mail.message import sanitize_address, DEFAULT_ATTACHMENT_MIME_TYPE
from django.core.mail.backends.smtp import EmailBackend
from .models import *
class D... | [
"autrusseau.damien@gmail.com"
] | autrusseau.damien@gmail.com |
f51a2ebb6f85f0f5d06ee9ac9dd3373d5880f1d0 | d17724b2ce056b435f57b16fb0cbea32e44a29c6 | /Gun4PY/ftp-bruteforce.py | 0f673dce18e4b54b0c7f64d8571451b8a5f6f497 | [] | no_license | UgurCIL/Examples | 27264d89131b4aaff46f91705a03779c4e825ad6 | c1722a519836a24c8a946380e6cbcd6da963f0c5 | refs/heads/master | 2020-04-24T15:28:17.288204 | 2019-02-22T13:30:35 | 2019-02-22T13:30:35 | 172,069,050 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,018 | py | import sys
from ftplib import FTP
def checkAnonymous(dstIP):
try:
ftp = FTP(dstIP)
ftp.login()
print "[*] Anonymous giris acik"
print "[*] Kullanici Adi : anonymous"
print "[*] Parola : anonymous"
ftp.close()
except:
pass
def ftpLogin(dstIP, user, passw):
try:... | [
"root@localhost.localdomain"
] | root@localhost.localdomain |
d14bf3bde060c5cda07a825296dee074f729f51f | 5db0fab37c2b8a618d85d3b60fab9f806c416474 | /src/python/pants/backend/go/util_rules/build_pkg_test.py | be4d1f7e5dab9561e76f8e82e785b6d2d8bc7090 | [
"Apache-2.0"
] | permissive | pantsbuild/pants | 4988d1ac5474ec95f94ce2218aeb759401e4b011 | 98cbda8545f0d58c586ed2daa76fefd729d5e0d5 | refs/heads/main | 2023-09-05T03:44:17.646899 | 2023-09-01T19:52:09 | 2023-09-01T19:52:09 | 7,209,075 | 2,708 | 593 | Apache-2.0 | 2023-09-14T19:33:33 | 2012-12-17T17:39:04 | Python | UTF-8 | Python | false | false | 6,371 | py | # Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
import os.path
from textwrap import dedent
import pytest
from pants.backend.go import target_type_rules
from pants.backend.go.target_types import GoMo... | [
"noreply@github.com"
] | pantsbuild.noreply@github.com |
f6bc336f85c826b416c7a82c6d5707a2e558c142 | cad999eacee16dc0e001a57f50b5d8b0f4d4ebf6 | /p202.py | a2cc8d0b585a2940e0c568ce938cd4db057be5f3 | [] | no_license | divyanarra0/pythonprogram | 8694a41ba3b39eb44a94a693eac3f7f5f18b588b | 10d8f59a472ccd4548771bad29be84a1a44854d8 | refs/heads/master | 2020-03-27T10:32:21.664657 | 2019-05-14T07:31:00 | 2019-05-14T07:31:00 | 146,427,260 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 723 | py | def isVowel(c):
c = c.lower()
if (c == 'a' or c == 'e' or
c == 'i' or c == 'o' or c == 'u'):
return True
return False
# Function to return first X vowels
def firstXvowels(s, x):
# String to store first X vowels
result = ""
for i in range(0, len(s), 1):
... | [
"noreply@github.com"
] | divyanarra0.noreply@github.com |
751cf05a4a081982c332d1d32c6bfbd742ac75f9 | 40ca01569e9c8ed6d2312447fac604229bdeace3 | /fabfile.py | bb0342de308a2dc2d08064b855fa24d83163edb7 | [
"MIT"
] | permissive | deniskrumko/izyan-poker | c393c9c4cb401d3180a97075fde59ff2e371a77d | ce70c9c8f761409adad289809e5220237b312407 | refs/heads/master | 2021-06-14T08:59:03.364660 | 2020-02-11T06:48:00 | 2020-02-11T06:48:00 | 200,377,031 | 7 | 2 | MIT | 2021-06-10T18:43:43 | 2019-08-03T13:11:06 | Python | UTF-8 | Python | true | false | 3,424 | py | from fabric.api import task, local
def print_msg(msg, error=False):
"""Print message in console."""
def green_msg(msg):
"""Make message green color in console."""
return '\033[92m{0}\033[00m'.format(msg)
def red_msg(msg):
"""Make message red color in console."""
return '\... | [
"dkrumko@gmail.com"
] | dkrumko@gmail.com |
4fd52351a670070b2a03c71c3135823c46cdb129 | 4526ed71f39d70111c3787ec90b4932a183c452c | /2016/Pyquen_WToMuNu_TuneZ2_8160GeV_pythia6_reverse_cfi.py | f47777dec69a0a32fa2aa7721bb9c36a5c2f145d | [] | no_license | CMS-HIN-dilepton/MCRequest | 773f414739efc529dc957a044232478b1c4f1c03 | ff49d22fde2c4a006fe7fa02d4cf53d794f91888 | refs/heads/master | 2021-05-02T12:16:51.891664 | 2020-06-20T18:35:52 | 2020-06-20T18:35:52 | 45,127,457 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,712 | py | import FWCore.ParameterSet.Config as cms
from Configuration.Generator.PythiaUEZ2Settings_cfi import *
generator = cms.EDFilter("PyquenGeneratorFilter",
comEnergy = cms.double(8160.0),
aBeamTarget = cms.double(208.0),
protonSide = cms.untracked... | [
"emilien.chapon@cern.ch"
] | emilien.chapon@cern.ch |
b05505c9b445af3674a860fe8d4fd78dda734376 | b9cd1b9758e58f00335900fd120e1d47c23600ce | /tests/test_pipeline_chipseq.py | 543d39616238213767af72ed8a467fa36a735e65 | [
"Apache-2.0"
] | permissive | Multiscale-Genomics/mg-process-fastq | 4fb7fef68526237f06312a3f137df031a448731c | 50c7115c0c1a6af48dc34f275e469d1b9eb02999 | refs/heads/master | 2020-04-12T06:46:01.100270 | 2018-11-19T16:05:03 | 2018-11-19T16:05:03 | 64,320,140 | 2 | 4 | Apache-2.0 | 2018-11-16T16:54:54 | 2016-07-27T15:29:25 | Python | UTF-8 | Python | false | false | 7,060 | py | """
.. See the NOTICE file distributed with this work for additional information
regarding copyright ownership.
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.... | [
"mark.mcdowall@gmail.com"
] | mark.mcdowall@gmail.com |
c4e2b115dbe1fb2ca6e5626b223b88a4f3dde73e | b0e67fbd4c42aba24f7d4bccb99e9aa037c0b7d5 | /lda/train_LDA.py | 39ade7589cc4a9b7f6176b106691125a03142547 | [] | no_license | gombru/SocialMediaWeakLabeling | f979aea8218be115758ff8e1e9a945a701ac99b9 | 518437903ba7370a4098303a41196a08f1d6a58e | refs/heads/master | 2022-02-26T17:49:08.997335 | 2022-02-10T12:54:57 | 2022-02-10T12:54:57 | 84,461,511 | 15 | 4 | null | null | null | null | UTF-8 | Python | false | false | 5,004 | py | # Trains and saves an LDA model with the given text files.
from nltk.tokenize import RegexpTokenizer
from stop_words import get_stop_words
from nltk.stem.porter import PorterStemmer
from gensim import corpora, models
import glob
import string
import random
import numpy as np
whitelist = string.letters + string.digit... | [
"raulgombru@gmail.com"
] | raulgombru@gmail.com |
09b194ff61b3e409331b5fb117555aaaa998c26a | 52b5773617a1b972a905de4d692540d26ff74926 | /.history/find_max_20200722114432.py | 63139ffb63e0f85ee0899b804e0ff82130382654 | [] | no_license | MaryanneNjeri/pythonModules | 56f54bf098ae58ea069bf33f11ae94fa8eedcabc | f4e56b1e4dda2349267af634a46f6b9df6686020 | refs/heads/master | 2022-12-16T02:59:19.896129 | 2020-09-11T12:05:22 | 2020-09-11T12:05:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 190 | py | items = [6,20,8,19,56,23,87,41,49,53]
def find_max(items):
# Breaking condition
if len(items) == 1:
return items[0]
op1 = items[0]
op2 = find_max(items[1:])
| [
"mary.jereh@gmail.com"
] | mary.jereh@gmail.com |
907769470c06a9adb96a73b04f9ea62d43e0d19c | 0ee4debe412b996de7f5a592800515ae7104c5a5 | /scripts/artifacts/fitbitHeart.py | 6710cc413d11222ce7d902507ea13b4b8ec52313 | [
"MIT"
] | permissive | kibaffo33/ALEAPP | af7eebd9d4ab078c57c4108ebab0c80c89df8630 | ca50b7d665dccb846ff601b7b797d754eb8100d9 | refs/heads/master | 2022-06-15T03:55:37.407875 | 2022-06-13T20:39:47 | 2022-06-13T20:39:47 | 243,058,738 | 1 | 0 | null | 2020-02-25T17:29:43 | 2020-02-25T17:29:36 | null | UTF-8 | Python | false | false | 1,477 | py | import sqlite3
import textwrap
from scripts.artifact_report import ArtifactHtmlReport
from scripts.ilapfuncs import logfunc, tsv, timeline, is_platform_windows, open_sqlite_db_readonly
def get_fitbitHeart(files_found, report_folder, seeker, wrap_text):
file_found = str(files_found[0])
db = open_sqlite_db... | [
"abrignoni@gmail.com"
] | abrignoni@gmail.com |
9d3f1e1eaaf40864ef9e266b4fd7d25f9d328b21 | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /mYGipMffRTYxYmv5i_3.py | 1c5ebcf46c86f6f779f84e38b73917754d45490f | [] | no_license | daniel-reich/ubiquitous-fiesta | 26e80f0082f8589e51d359ce7953117a3da7d38c | 9af2700dbe59284f5697e612491499841a6c126f | refs/heads/master | 2023-04-05T06:40:37.328213 | 2021-04-06T20:17:44 | 2021-04-06T20:17:44 | 355,318,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,929 | py |
import itertools
def simple_equation(a,b,c):
numbers = [a,b,c]
for eachcombo in itertools.permutations(numbers,2):
first_num = eachcombo[0]
second_num = eachcombo[1]
if c != first_num and c != second_num:
if first_num + second_num == c:
return '{}+{}={}'.form... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
f71f89c4c19d7d8045d9c586cb80e5b3176cf92f | ec53949dafa4b6ad675d679b05ed7c83fef2c69a | /DataStructuresAndAlgo/SortAlgo/QuickSort/QuickSort.py | ec6d49ec37082d18b789ab13db62a63fe2db4d61 | [] | no_license | tpotjj/Python | 9a5a20a53cd7a6ec14386c1db8ce155e0fc9ab8a | ca73c116ada4d05c0c565508163557744c86fc76 | refs/heads/master | 2023-07-11T16:37:10.039522 | 2021-08-14T11:17:55 | 2021-08-14T11:17:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 610 | py | def partition(CustomList, low, high):
i = low -1
pivot = CustomList[high]
for j in range(low, high):
if CustomList[j] <= pivot:
i += 1
CustomList[i], CustomList[j] = CustomList[j], CustomList[i]
CustomList[i+1], CustomList[high] = CustomList[high], CustomList[i+1]
ret... | [
"joris97jansen@gmail.com"
] | joris97jansen@gmail.com |
f155e40ab83b0e0703d0bfe760ae2c41de4fcdb7 | e5e9ee9e4db2e400e7f87647501ee412c13d76e5 | /python/python-base/turtle/fun.py | 5cab82c491cf1fee60b9d184422b03d78cfa699e | [] | no_license | beingveera/whole-python | 524441eec44379c36cb1cfeccdbc65bf1c15d2f6 | 3f2b3cb7528afb9605ab6f9d4d2efc856a247af5 | refs/heads/main | 2023-05-15T06:28:03.058105 | 2021-06-05T09:37:47 | 2021-06-05T09:37:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 147 | py | import turtle as t
t.fd(1000)
t.setposition(200,-490)
t.clear()
t.speed(0.1)
t.circle(-50)
t.tracer(1,3)
t.color('blue')
t.pensize(10)
t.circle(20) | [
"sharma.lokesh.222001@gmail.com"
] | sharma.lokesh.222001@gmail.com |
dcec9dfe44d580ff70c968b38dcb5e9e06fac39d | eb57e632fb351db1975ad0e15bd480759bbc153b | /sysinf/urls.py | 3c44a5f757052a14c4ca9c32626da21663101d8a | [
"MIT"
] | permissive | raikel/dnfas | 163ebc59fc6d4a12c044de33136cdce7ed7ddf0e | 567bcc6656c75ee5167bd248045ec24e37de07b8 | refs/heads/master | 2021-06-27T02:22:30.508109 | 2020-03-25T20:11:04 | 2020-03-25T20:11:04 | 224,517,088 | 0 | 0 | MIT | 2021-03-19T22:52:15 | 2019-11-27T21:07:07 | Python | UTF-8 | Python | false | false | 167 | py | from django.urls import path
from .views import SystemStatsView
app_name = 'sysinf'
urlpatterns = [
path('system/', SystemStatsView.as_view(), name='system')
]
| [
"raikelbl@gmail.com"
] | raikelbl@gmail.com |
8348e16c6785697fe7de5e82d5b2cccf17d8a39d | 56231e5b77a8b743e84e43d28691da36b89a0cca | /platform-tools/systrace/catapult/telemetry/telemetry/testing/run_tests_unittest.py | 8728813fb8ee52fb77629c0039869526582c60cf | [
"MIT",
"LicenseRef-scancode-proprietary-license",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | cricketclubucd/davisdragons | ee3aa6ad72197c2218660843e03d58c562b965aa | 99d5877377b80d1b20c78cc3c4c6f26795f29b14 | refs/heads/master | 2023-01-30T05:37:45.923195 | 2021-01-27T06:30:25 | 2021-01-27T06:30:25 | 96,661,120 | 2 | 2 | MIT | 2023-01-23T18:42:26 | 2017-07-09T04:32:10 | HTML | UTF-8 | Python | false | false | 3,762 | py | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import unittest
from telemetry.core import util
from telemetry.testing import run_tests
class MockArgs(object):
def __init__(self):
self.positional_... | [
"jena.suraj.k@gmail.com"
] | jena.suraj.k@gmail.com |
bb1db72e1417f503a51c53cab45015887b5df63a | 8ba041911be24ba453d6df60ddf47e7d2aedfde5 | /model.py | ff354766fccfa1efd6fe85425ef183d0be6f6c83 | [] | no_license | dmcdekker/testing-1 | 9c0beda3fbdb9d37a812e903800f4c976cd0bbae | ee6cbab6aec40adde9971005d9c79862fb3bfe7a | refs/heads/master | 2020-03-15T14:07:38.046358 | 2018-05-04T19:58:29 | 2018-05-04T19:58:29 | 132,183,530 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 935 | py | from flask.ext.sqlalchemy import SQLAlchemy
db = SQLAlchemy()
class Game(db.Model):
"""Board game."""
__tablename__ = "games"
game_id = db.Column(db.Integer, primary_key=True, autoincrement=True)
name = db.Column(db.String(20), nullable=False, unique=True)
description = db.Column(db.String(100))... | [
"no-reply@hackbrightacademy.com"
] | no-reply@hackbrightacademy.com |
0b1cde1c5f80af4837b8282ef80c77174dc1c5e7 | 12f18662719d04d2404396b9059b60525528f557 | /findsportsordermanagement-master/purchaseorder/migrations/0018_purchaseorder_internal_notes.py | 45c5291a9d14c87910376425849d88f1c857c904 | [] | no_license | ujjalgoswami/ordermanagementcustomdashboard | 0bf4a5770d1913b257a43858d778e630e671a342 | acd18510b0934601d30bd717ea4b3fbb61ecfb5c | refs/heads/master | 2021-02-04T10:04:27.380674 | 2020-02-28T01:37:35 | 2020-02-28T01:37:35 | 243,653,613 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 400 | py | # Generated by Django 2.2.4 on 2019-12-10 15:08
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('purchaseorder', '0017_orderline_reorder'),
]
operations = [
migrations.AddField(
model_name='purchaseorder',
name='i... | [
"ujjalgoswami92@gmail.com"
] | ujjalgoswami92@gmail.com |
667a27f91a5feffa45b0df3b9f4c79d54a94be94 | af93b3909f86ab2d310a8fa81c9357d87fdd8a64 | /begginer/5. cas/zadatak5.py | f27bd47d532b65caf07d06877073feb078f9bbcb | [] | no_license | BiljanaPavlovic/pajton-kurs | 8cf15d443c9cca38f627e44d764106ef0cc5cd98 | 93092e6e945b33116ca65796570462edccfcbcb0 | refs/heads/master | 2021-05-24T14:09:57.536994 | 2020-08-02T15:00:12 | 2020-08-02T15:00:12 | 253,597,402 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 199 | py | unos=input("Unesite stranice a i b:")
stranice=unos.split(" ")
obim=2*float(stranice[0])+2*float(stranice[1])
povrsina=float(stranice[0])*float(stranice[1])
print("O= ",obim)
print("P=",povrsina)
| [
"zabiljanupavlovic@gmail.com"
] | zabiljanupavlovic@gmail.com |
99e4e4ca7bb40a4fc37e65d4d6c65b0a7d078685 | b9d75e3e37d08262321b0dc726639fc25f152caa | /utils.py | cc49eb7b6a45ee027cefe48ead6e43e9a20dab51 | [] | no_license | G-Wang/pytorch_FFTNet | a2712763ae7ee2fff9d002c931593987d6e25060 | b96486f6823e762e71c2e299739b925081e5bacf | refs/heads/master | 2020-04-08T22:14:18.563719 | 2018-08-31T07:38:21 | 2018-08-31T07:38:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,463 | py | import numpy as np
import torch
from torch.nn import functional as F
from scipy.special import expn
from torchaudio.transforms import MuLawEncoding, MuLawExpanding
def encoder(quantization_channels):
return MuLawEncoding(quantization_channels)
def decoder(quantization_channels):
return MuLawExpanding(quanti... | [
"ya70201@gmail.com"
] | ya70201@gmail.com |
7943c82bfb5eef6a125f551f9bf92c8ed87f9028 | 7da0e8d03548ec83ec717a076add2199e543e3dd | /InvenTree/part/urls.py | 75d5041b9c89cb54a2d092a2a95eaf92b5418bb4 | [
"MIT"
] | permissive | Devarshi87/InvenTree | 7b90cbf14699861436ab127b9b7638cee81e30c4 | 2191b7f71972d4c3ba7322cc93936801a168ab3c | refs/heads/master | 2020-05-15T04:25:03.289794 | 2019-04-18T12:42:36 | 2019-04-18T12:42:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,522 | py | from django.conf.urls import url, include
from . import views
supplier_part_detail_urls = [
url(r'edit/?', views.SupplierPartEdit.as_view(), name='supplier-part-edit'),
url(r'delete/?', views.SupplierPartDelete.as_view(), name='supplier-part-delete'),
url('^.*$', views.SupplierPartDetail.as_view(), name=... | [
"oliver.henry.walters@gmail.com"
] | oliver.henry.walters@gmail.com |
48fdd9fa5aba23d7bfbf4bd119d4bcc4a83a85a2 | 35d62f3ccf1c422b13b313c4e519a5ce335e934d | /leetcode/jewelsAndStones.py | cc1e31157da05da0b2095b9c498ceeb4b90ee203 | [] | no_license | malaybiswal/python | 357a074889299effe6a5fa2f1cd9c50ca35652d0 | 684d24d719b785725e736671faf2681232ecc394 | refs/heads/master | 2020-05-17T22:25:43.043929 | 2019-05-08T23:41:19 | 2019-05-08T23:41:19 | 183,999,871 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 223 | py | #https://leetcode.com/problems/jewels-and-stones/
def numJewelsInStones(J, S):
c=0
for x in J:
for y in S:
if(x==y):
c+=1
return c
x="zz"
y="ZZZ"
print(numJewelsInStones(x,y)) | [
"malay.biswal@rackspace.com"
] | malay.biswal@rackspace.com |
516e7adfdc21f38790c5bfe5706d14864c96eaab | 3cd8bdcda9d0e549df184a5d9085ed8f5a86145d | /defining_classes/to_do_list/project/task.py | ad5910ea22a5b8855a43873b237cf5c1d554e494 | [] | no_license | ivklisurova/SoftUni_Python_OOP | bbec8a5d0d8c2c3f536dd2a92e9187aa39121692 | 59e2080b4eb0826a62a020ea3368a0bac6f644be | refs/heads/master | 2022-11-29T00:09:40.488544 | 2020-08-05T19:55:27 | 2020-08-05T19:55:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 962 | py | class Task:
def __init__(self, name, due_date):
self.name = name
self.due_date = due_date
self.comments = []
self.completed = False
def change_name(self, new_name: str):
if new_name == self.name:
return 'Name cannot be the same.'
self.name = new_name
... | [
"55747390+ivklisurova@users.noreply.github.com"
] | 55747390+ivklisurova@users.noreply.github.com |
e7b3c28e67c42c208b0778ca9b4afdfddfd18a79 | 706518f154812af56f8fc91a71cd65d9667d9ed0 | /python/paddle/fluid/tests/unittests/test_device.py | 08697a080445e606f17bdde83384eef391713721 | [
"Apache-2.0"
] | permissive | andreazanetti/Paddle | 3ea464703d67963134ffc6828f364412adb03fce | a259076dd01801e2e619237da02235a4856a96bb | refs/heads/develop | 2023-04-25T08:30:43.751734 | 2021-05-05T01:31:44 | 2021-05-05T01:31:44 | 263,870,069 | 0 | 2 | Apache-2.0 | 2020-07-07T10:45:08 | 2020-05-14T09:22:07 | null | UTF-8 | Python | false | false | 3,379 | py | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | [
"noreply@github.com"
] | andreazanetti.noreply@github.com |
67056ff3f3511beb22ed46e346b3d52b30d40eed | cc1cd104b4b383e7807e75e2fb0a8e84e5fcf7df | /api_server/openpose_wrapper/openpose_server/app.py | 491381120447d9b6e7f8461f4eb89313c620e8c9 | [] | no_license | Sam1224/OutfitApp-AWS | b9884d40945d2076f2135c0d2d75cf938161af9f | 6c1b4d1e5c328c5d22b8f055d41a57ec2e9b921e | refs/heads/master | 2022-04-24T11:50:24.506423 | 2020-04-29T11:03:43 | 2020-04-29T11:03:43 | 257,340,558 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,164 | py | # coding=utf-8
import os
import sys
import argparse
import json
from PIL import Image
import cv2
import numpy as np
import itertools
# flask
import flask
#from flask import Flask, render_template, request, jsonify
# openpose python API
sys.path.append('../openpose_gpu/build/python');
from openpose import pyopenpose a... | [
"y034112@gmail.com"
] | y034112@gmail.com |
920d2263cbeb1e5be4d7cfac31f5ccec2fafdc5a | 1f0831db24ae2772d4944faf05289599bb37aca7 | /data_crawling/08/api/setup.py | 4d6fe9c915145a8327f8ea7ba8e946c9660fc6d8 | [] | no_license | smaystr/rails_reactor | 2123f39ae97f38acb647363979fe4a09b896670e | 69c8aac5860527768b4a8b7bce027b9dea6b1989 | refs/heads/master | 2022-08-19T05:35:21.535933 | 2019-08-28T12:46:22 | 2019-08-28T12:46:22 | 189,264,026 | 1 | 0 | null | 2022-07-29T22:34:56 | 2019-05-29T16:47:08 | Jupyter Notebook | UTF-8 | Python | false | false | 660 | py | from setuptools import setup
with open('requirements.txt') as f:
requirements = f.read().splitlines()
setup(
name="sergey_milantiev_crawler_master",
version="0.0.0",
install_requires=requirements,
packages=["app"],
author="sergey.milantiev@gmail.com",
url="",
download_url="",
descr... | [
"smaystr@gmail.com"
] | smaystr@gmail.com |
881b2796e754eccb435d9f1824561012eb3f9263 | 8308fa0e5f998e0aa6741af5720d6da99497060d | /estoque/admin.py | deb9bd5b8513f6c1109d2812a086ec45998d55fe | [] | no_license | gbpjr/sistema-estoque | 7aae11c657c555b98a329cdafde704504ef8b23a | 701471e593fa758a1da1b66fa279da4dd3d979e7 | refs/heads/master | 2020-04-23T08:37:35.123431 | 2019-02-24T21:43:14 | 2019-02-24T21:43:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 207 | py | from django.contrib import admin
from .models import Local, Tipo, Fabricante, Componente
admin.site.register(Local)
admin.site.register(Tipo)
admin.site.register(Fabricante)
admin.site.register(Componente)
| [
"="
] | = |
eadbd701bc7fafb29b726f2330b241a74aad34d8 | 9cdfe7992090fb91696eec8d0a8ae15ee12efffe | /recursion/prob1221.py | 75de61d8cb82f1561f811ecae781765b333d2848 | [] | no_license | binchen15/leet-python | e62aab19f0c48fd2f20858a6a0d0508706ae21cc | e00cf94c5b86c8cca27e3bee69ad21e727b7679b | refs/heads/master | 2022-09-01T06:56:38.471879 | 2022-08-28T05:15:42 | 2022-08-28T05:15:42 | 243,564,799 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 528 | py | # 1221 Split string into Balanced Strings
class Solution(object):
def balancedStringSplit(self, s):
"""
:type s: str
:rtype: int
"""
m = len(s)
if m == 2:
return 1
i = 2
while i < m:
if self.isBalanced(s[:i]):
#... | [
"binchen.devops@gmail.com"
] | binchen.devops@gmail.com |
31b90af5e2d762ee6482a7c0202484d4b2a0cff5 | 1d928c3f90d4a0a9a3919a804597aa0a4aab19a3 | /python/spaCy/2016/4/test_only_punct.py | 12c9580880eb988530171fcf1973e0dc5ca361fa | [
"MIT"
] | permissive | rosoareslv/SED99 | d8b2ff5811e7f0ffc59be066a5a0349a92cbb845 | a062c118f12b93172e31e8ca115ce3f871b64461 | refs/heads/main | 2023-02-22T21:59:02.703005 | 2021-01-28T19:40:51 | 2021-01-28T19:40:51 | 306,497,459 | 1 | 1 | null | 2020-11-24T20:56:18 | 2020-10-23T01:18:07 | null | UTF-8 | Python | false | false | 191 | py | from __future__ import unicode_literals
def test_only_pre1(en_tokenizer):
assert len(en_tokenizer("(")) == 1
def test_only_pre2(en_tokenizer):
assert len(en_tokenizer("((")) == 2
| [
"rodrigosoaresilva@gmail.com"
] | rodrigosoaresilva@gmail.com |
47c3be1644c3b304105e0c662dc9f38ee860d001 | 9ecb6a1d3a71e7f87f3784af6b808f23a2abe348 | /drlhp/show_prefs.py | 4227c4f161eda839c7a5c5661322f9b2b12658a5 | [] | no_license | HumanCompatibleAI/interactive-behaviour-design | 13ae305b39d29595e8fd5907f8d9e9fa6c2efc16 | 226db7a55d64ce15edfb8d7b3352c7bf7b81b533 | refs/heads/master | 2020-05-02T16:54:02.232639 | 2019-08-08T14:29:11 | 2019-08-08T14:29:11 | 178,082,205 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,945 | py | #!/usr/bin/env python3
"""
Display examples of the specified preference database
(with the less-preferred segment on the left,
and the more-preferred segment on the right)
(skipping over equally-preferred segments)
"""
import argparse
import pickle
from multiprocessing import freeze_support
import numpy as np
from u... | [
"matthew.rahtz@gmail.com"
] | matthew.rahtz@gmail.com |
b5644533f4814bf76a438d3f873511d94ae32cb7 | ffedbe2d957677d65cb873d96482f1c94e74b988 | /regs/depth/paragraph.py | 4c7ad12fb53030d7ebe97823604eec9398cee496 | [] | no_license | cmc333333/Depth-Parser | b7602c158b6cb75179af90b78af93f28e547a3d2 | 4332b8c51e8e7d44b68985b3845b300d251af536 | refs/heads/master | 2020-05-20T12:09:03.662019 | 2013-04-16T20:37:56 | 2013-04-16T20:37:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,421 | py | import itertools
import re
from regs.depth import tree
from regs.search import segments
from regs.utils import roman_nums
import string
p_levels = [
list(string.ascii_lowercase),
[str(i) for i in range(1,51)],
list(itertools.islice(roman_nums(), 0, 50)),
list(string.ascii_uppercase),
# Technicall... | [
"cm.lubinski@gmail.com"
] | cm.lubinski@gmail.com |
4af2ccbccc3801bfd03ba5d348228bde9e7d5e13 | fd133e8252dc4ddb8221007f806da336639e9029 | /924_minimize_malware_speed.py | 9ebceeb1693f0f22ca3036256554fcb1d0d201ee | [] | no_license | nikrasiya/Graph-2 | ea331e8470a73eef2f70cbb71f28023f704f1ba2 | 4689f2e0d1a0847ab519715d7659939dad89e001 | refs/heads/master | 2021-05-17T16:21:17.539763 | 2020-04-06T13:18:31 | 2020-04-06T13:18:31 | 250,869,007 | 0 | 0 | null | 2020-03-28T18:44:58 | 2020-03-28T18:44:58 | null | UTF-8 | Python | false | false | 4,082 | py | from typing import List
from collections import defaultdict, Counter
class Solution:
def minMalwareSpread(self, graph: List[List[int]], initial: List[int]) -> int:
"""
https://leetcode.com/problems/minimize-malware-spread/
Time Complexity - O(V*E)
'V' -> vertices
... | [
"you@example.com"
] | you@example.com |
77ebbe0d48ff860ba8eab641e85ade6503ca77d9 | f2ab8ccda7203dd37d61facb9978cf74b781c7f1 | /tests/models.py | 2a33a19a5a6c499db6c4c5ca9168a18891a56d61 | [
"MIT"
] | permissive | Apkawa/easy-thumbnails-admin | 1991137224dcd117520b2c114d4012daf803776e | 9d7a38f215cdac53a663b00f1d4ff3a3c2a54eb4 | refs/heads/master | 2021-01-01T15:47:34.334792 | 2017-11-23T10:38:09 | 2017-11-23T10:38:09 | 97,703,157 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 252 | py | from django.db import models
from easy_thumbnails.fields import ThumbnailerImageField
def upload_to(instance, filename):
return 'example/{}'.format(filename)
class Example(models.Model):
image = ThumbnailerImageField(upload_to=upload_to)
| [
"apkawa@gmail.com"
] | apkawa@gmail.com |
139ecc75596912c669b4ed0216a1514922c50a4c | 605611de5eae63ce4eef388a287a3ef18b52eae7 | /CovidCrowd/settings.py | 95d5f1e4b28e5afba1ede23609cd8a48a22b35cd | [] | no_license | RahulAttarde/CovidCrowd | e6b2e45c222f03112c157403c2d6630d888599d8 | 55740e1ea72cd434aed0a627f6fffb16024a6f17 | refs/heads/master | 2021-04-23T00:02:46.726288 | 2020-03-25T02:45:35 | 2020-03-25T02:45:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,879 | py | """
Django settings for CovidCrowd project.
Generated by 'django-admin startproject' using Django 3.0.3.
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/
"""
import os... | [
"arun@arunmozhi.in"
] | arun@arunmozhi.in |
e1752708a0af5efe19acf9209a0dd0734303fa0d | 840b98f14f181f7dbd693f2ee4b3c46e5be59305 | /demos/demo_pycloudmessenger/POM2/NeuralNetworks/pom2_NN_worker_pycloudmessenger.py | 672126432edb472a87502a57beff578247d9307a | [
"Apache-2.0"
] | permissive | Musketeer-H2020/MMLL-Robust | 4ef6b2ff5dff18d4d2b2a403a89d9455ba861e2b | ccc0a7674a04ae0d00bedc38893b33184c5f68c6 | refs/heads/main | 2023-09-01T18:47:46.065297 | 2021-09-28T15:34:12 | 2021-09-28T15:34:12 | 386,264,004 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,614 | py | # -*- coding: utf-8 -*-
'''
@author: Marcos Fernandez Diaz
November 2020
Example of use: python pom2_NN_worker_pycloudmessenger.py --user <user> --password <password> --task_name <task_name> --id <id>
Parameters:
- user: String with the name of the user. If the user does not exist in the pycloudmessenger... | [
"rober.diaz@gmail.com"
] | rober.diaz@gmail.com |
f327656c3c6c957763b8883c4183d103b33e956c | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/verbs/_linking.py | 619af3537e5435c213053702bea9f7364b783fca | [
"MIT"
] | permissive | cash2one/xai | de7adad1758f50dd6786bf0111e71a903f039b64 | e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6 | refs/heads/master | 2021-01-19T12:33:54.964379 | 2017-01-28T02:00:50 | 2017-01-28T02:00:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 228 | py |
from xai.brain.wordbase.verbs._link import _LINK
#calss header
class _LINKING(_LINK, ):
def __init__(self,):
_LINK.__init__(self)
self.name = "LINKING"
self.specie = 'verbs'
self.basic = "link"
self.jsondata = {}
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
e2e0a5e05ade4bf1b990a627802943af3a19626d | f5c7d50973d47abd555502470b300b3c70af9fa5 | /voting/asgi.py | 856ae28db6db7b31736db9f3585a818ef2de5cc0 | [
"MIT"
] | permissive | jess-monter/voting_back | 62b67fafcfa8a9b7feebbca463c5055efdff7d98 | de54218f01095f5090d490cabf32a86b1e608925 | refs/heads/main | 2023-04-06T16:00:45.066076 | 2021-04-14T07:51:10 | 2021-04-14T07:51:10 | 336,810,613 | 0 | 0 | MIT | 2021-04-14T07:51:11 | 2021-02-07T14:46:05 | Python | UTF-8 | Python | false | false | 756 | py | """
ASGI config for voting project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault("DJANGO_SETTIN... | [
"="
] | = |
78430575c8a6091691a2baff513bfbe12212aa04 | e8805bf7c79da1b63d36c3535b8f5ba7d97b6b56 | /tests/test_auditor/test_auditor_bookmark.py | 05eaeea64b067419856d25819c257ca50d667dd1 | [
"MIT"
] | permissive | wbuchwalter/polyaxon | 9ad681e37065e8aa05741fb7d63b170e4c1fdfe6 | a01396ea86a74082c457bfbc2c91d283b6ff6fba | refs/heads/master | 2020-03-23T08:34:42.248328 | 2018-07-17T18:29:06 | 2018-07-17T18:29:06 | 141,334,939 | 0 | 0 | MIT | 2018-07-17T19:35:22 | 2018-07-17T19:35:21 | null | UTF-8 | Python | false | false | 2,819 | py | # pylint:disable=ungrouped-imports
from unittest.mock import patch
import pytest
import activitylogs
import auditor
import tracker
from event_manager.events import bookmark as bookmarks_events
from tests.utils import BaseTest
@pytest.mark.auditor_mark
class AuditorBookmarksTest(BaseTest):
"""Testing subscribe... | [
"mouradmourafiq@gmail.com"
] | mouradmourafiq@gmail.com |
c7d144b8335a423d324ebdc6e7a74ee5f11d99ad | 665455c521cc7cf76c5436337ed545de90976af4 | /cohesity_management_sdk/models/node_port.py | 0160cdc36722ac0df6ecf9ed7e2a96895d226b7a | [
"Apache-2.0"
] | permissive | hsantoyo2/management-sdk-python | d226273bc8eedcf9220ea4999a6f0b9a1a30d99c | 0093194d125fc6746f55b8499da1270c64f473fc | refs/heads/master | 2023-03-01T06:09:39.644085 | 2021-01-15T08:23:16 | 2021-01-15T08:23:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,851 | py | # -*- coding: utf-8 -*-
# Copyright 2020 Cohesity Inc.
class NodePort(object):
"""Implementation of the 'NodePort' model.
VmInfo specifies information of a NodePort per service and port
combination within an application instance.
Attributes:
is_ui_port (bool): TODO: type description here.
... | [
"ashish@cohesity.com"
] | ashish@cohesity.com |
8cc261eb0ecfb093323305bc3cc656d8b5205b78 | a6c13fb257563d99c45f79b2fee5c2f2f76251ef | /apps/common/factories.py | 197597ddc5ded9aea5a8f9bfe7315a01f742e943 | [] | no_license | sipanmargaryan/addproduct | 9999cdf9b611ea4f103ed9e58e24c8fc8fe0e3fb | 9232c31956f154f3c4349fe3942a331559213c70 | refs/heads/master | 2022-11-05T19:23:37.209482 | 2020-06-26T14:44:45 | 2020-06-26T14:44:45 | 275,178,682 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 800 | py | import factory
from django.utils import timezone
import common.models
class ArticleFactory(factory.DjangoModelFactory):
title = factory.Sequence(lambda n: 'help text title-{}'.format(n))
description = factory.Sequence(lambda n: 'help text description-{}'.format(n))
class Meta:
model = common.mo... | [
"sipanm19@gmail.com"
] | sipanm19@gmail.com |
d765931611ffb0b15f7c1c88acfd00e0ac6f9f19 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_145/669.py | bd702b9e219525f76c3fa85711b680bca73aa591 | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 688 | py | #!/usr/bin/env python
import sys
import struct
import ctypes
def binary(num):
return ''.join(bin(ord(c)).replace('0b', '').rjust(8, '0') for c in struct.pack('!f', num))
T = int(sys.stdin.readline())
for case in range(0, T):
part = sys.stdin.readline()
up, down = part.split("/")
up = int(... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
559e9d1a9a1c37ba4f8aae45a6b1828a164fe7ce | b685036280331fa50fcd87f269521342ec1b437b | /src/tests/demo_5.py | c5de86e214fd5babcc1639e86f60c6ee47de9df4 | [] | no_license | chenqing666/myML_DM_Test | f875cb5b2a92e81bc3de2a0070c0185b7eacac89 | 5ac38f7872d94ca7cedd4f5057bb93732b5edbad | refs/heads/master | 2022-02-26T01:52:06.293025 | 2019-09-20T06:35:25 | 2019-09-20T06:35:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 175 | py |
def fib(times):
n = 0
a,b = 0, 1
while n < times:
yield b
a, b = b, a + b
n += 1
return "done"
g = fib(2)
next(g)
next(g)
# next(g) | [
"976185561@qq.com"
] | 976185561@qq.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.