blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 616 | 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 777
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 149
values | src_encoding stringclasses 26
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 3 10.2M | extension stringclasses 188
values | content stringlengths 3 10.2M | authors listlengths 1 1 | author_id stringlengths 1 132 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
33b2bb8b84eb17071d058b586d9e58a79c4d0381 | 4310871d6d0ad59332360a0d6e980e0a41d25fdd | /post/models.py | 5f2f9c6074830b2e4421a97a4f6e695425410881 | [] | no_license | jacegem/drf-test | 21bf7eaa47aeb045c31d2ba8239e587804c27a86 | 00105b6ecd38b68c58f2e5b498e0fb7ad2de099d | refs/heads/master | 2022-12-12T13:18:02.168914 | 2020-08-04T09:08:10 | 2020-08-04T09:08:10 | 146,073,595 | 0 | 0 | null | 2022-12-08T09:34:16 | 2018-08-25T07:01:35 | Python | UTF-8 | Python | false | false | 226 | py | from django.db import models
# Create your models here.
class Post(models.Model):
title = models.TextField()
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
| [
"jacegem@gmail.com"
] | jacegem@gmail.com |
b4ffcc9cb6a580994aad67bfbe13c31cc19e9dcd | 1fb2da0e6f73652f0b0126c82a84562f6a8d3535 | /1339. Maximum Product of Splitted Binary Tree.py | 922322c77269ef31a699fdc1c48c102d65bd542c | [] | no_license | JaylenZhang19/Leetcode | be3456fcb45270c8aad797f965f4c7a1781c0e61 | 178546686aa3ae8f5da1ae845417f86fab9a644d | refs/heads/master | 2023-02-27T06:08:58.818435 | 2021-01-31T20:28:10 | 2021-01-31T20:28:10 | 287,661,146 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,148 | 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 maxProduct(self, root: TreeNode) -> int:
def tree_sum(root):
if no... | [
"noreply@github.com"
] | JaylenZhang19.noreply@github.com |
b2df5778ecbb77f08c4c166f22c2a58fbc7b7cb9 | 1656e9ed393ae7dee4213f15a4722b034a4ad007 | /bin/covertype.py | e3f014e762d0b6067b6e76298b8d194044bea1cb | [] | no_license | schmit/cvm | 0aee9e7f883f4d91296da112ffb4372180c96a4f | 412d365fcc1168cd36d770511a4fb6e9d9dead67 | refs/heads/master | 2021-01-19T07:18:50.745128 | 2015-06-02T22:06:20 | 2015-06-02T22:06:20 | 34,829,209 | 0 | 3 | null | 2015-05-27T06:19:39 | 2015-04-30T02:14:37 | Python | UTF-8 | Python | false | false | 2,002 | py | import sys
from cvm.svm import SVC
from cvm.kreg import KernelLogisticRegression
from pyspark import SparkConf, SparkContext
from pyspark.mllib.regression import LabeledPoint
from sklearn.cross_validation import train_test_split
C = 100.0
gamma = 0.2
nmax = 20000
def parseData(line):
fields = line.strip().spl... | [
"schmit@stanford.edu"
] | schmit@stanford.edu |
d74b81d010878ab408336babf77d0933f59f9409 | 70cdf0741a22c678401a306229003bf036ffe5a6 | /ocbind/bgp/neighbors/neighbor/afi_safis/afi_safi/state/__init__.py | 0b7ba638f7c451cdd9ed8223238611f194d46bc7 | [] | no_license | zsblevins/nanog81-hackathon | 5001e034339d6b0c6452ae2474f06916bcd715cf | 1b64fd207dd69837f947094fbd6d6c1cea3a1070 | refs/heads/main | 2023-03-03T09:39:28.460000 | 2021-02-15T13:41:38 | 2021-02-15T13:41:38 | 336,698,856 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 253,355 | py | # -*- coding: utf-8 -*-
from operator import attrgetter
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType
from pyangbind.lib.yangtypes import RestrictedClassType
from pyangbind.lib.yangtypes import TypedListType
from pyangbind.lib.yangtypes import YANGBool
from pyangbind.lib.yangtypes import YANGListTy... | [
"zblevins@netflix.com"
] | zblevins@netflix.com |
a17831d5874a6c115fece7ba8792b24de71aa6a4 | 4fca17a3dbc3e74ba7e46bd7869eb6d138e4c422 | /_0256_Paint_House.py | f5babbae9c8db5dded7d92c93c6e69642786cb73 | [] | no_license | mingweihe/leetcode | a2cfee0e004627b817a3c0321bb9c74128f8c1a7 | edff905f63ab95cdd40447b27a9c449c9cefec37 | refs/heads/master | 2021-06-19T07:46:46.897952 | 2021-05-02T05:13:17 | 2021-05-02T05:13:17 | 205,740,338 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 504 | py | class Solution(object):
def minCost(self, costs):
"""
:type costs: List[List[int]]
:rtype: int
"""
if not costs: return 0
L = len(costs)
dp = [[0]*3 for _ in xrange(L)]
dp[0][:] = costs[0]
for i in xrange(1, L):
dp[i][0] = min(dp[i-... | [
"hemingwei2017@gmail.com"
] | hemingwei2017@gmail.com |
064eab189e074abca04ac7131a491d054c8c1548 | 52b5773617a1b972a905de4d692540d26ff74926 | /.history/wordPattern_20200907193718.py | 94f8de89d6debfedb77e5fd63958fa166f1d2ec5 | [] | 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 | 778 | py | def word(pattern,str):
# first I'd check if they are the same length if not return false
# loop through both pattern and str
# both are depedant on whether they are alike or not
# check one pattern then check the other pattern
string = str.split(" ")
if len(string) != len(pattern):
... | [
"mary.jereh@gmail.com"
] | mary.jereh@gmail.com |
0aca13c19a83b3c07c24da9f80028c7ec43780d2 | d5aee745fcde18fe1d7ef51a217876898f98f285 | /hypothesis_geojson/__init__.py | f3d2592a873b0e5b177e275acfc21ac1c7f91eb3 | [] | no_license | vincentsarago/hypothesis-geojson | 7cb0843b628e56efc927cf80e168b7e62b45b499 | 459c1da1d958ff1ff361759349cc3e7ac79df31e | refs/heads/master | 2022-10-12T15:38:41.287239 | 2017-06-22T15:58:21 | 2017-06-22T15:58:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,982 | py | # encoding: utf-8
"""
A hypothesis strategy for generating GeoJSON
"""
__version__ = '0.1'
from hypothesis.strategies import (
assume, booleans, composite, dictionaries, floats, integers, lists, none,
one_of, sampled_from, text, tuples)
@composite
def positions(draw, dims=2):
"""
https://tools.ietf.... | [
"perrygeo@gmail.com"
] | perrygeo@gmail.com |
4c3213537b244b2841b5d57101cddf270d55ff1a | f8c4e838bc91fccb9a64db46ab22d64c18a5ad09 | /backend/users/migrations/0002_auto_20200916_1722.py | 3540cb6448d6e22118dda5229487a91758454cae | [] | no_license | crowdbotics-apps/was-20338 | 90c0ada8de62b38ac1d8d46a6f2ed116d296333e | fe1f1f7cf7fc242e14895346e2b00cb7f1b619a3 | refs/heads/master | 2022-12-26T07:36:51.419829 | 2020-09-16T17:22:24 | 2020-09-16T17:22:24 | 296,100,458 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,275 | py | # Generated by Django 2.2.16 on 2020-09-16 17:22
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='user',
name='last_updated',
... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
8b6f60e6497b1255870fb1639c85c2f5f75862b5 | d6185183eea8a99f486f346c8b03b3dc3b71bd54 | /squad/settings.py | 96ead7c10aceefc125291a80b73156b2a0020aea | [] | no_license | dohcgle/squad | 98acbd5461cb48b75a373a135bdd3c0eb8a952f3 | e24606276dcc84550f0e5d0d569cb9d1f111b9c7 | refs/heads/main | 2023-07-05T17:27:37.827912 | 2021-08-24T10:07:02 | 2021-08-24T10:07:02 | 398,609,950 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,508 | py | """
Django settings for squad project.
Generated by 'django-admin startproject' using Django 3.2.6.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
import os
from ... | [
"utn1002@gmail.com"
] | utn1002@gmail.com |
41da585e7d3a44cf529d9557988d7a2673ed7a70 | cac4e677185984c580c8326f6eb79840e1e7ba3a | /passive_scalar.py | b06c37e0b4a1d863455c9400c7a3bae46d4c159a | [
"MIT"
] | permissive | MiroK/peristalsis | 7517a0ca572f0cc7025f9b34146544514edb1883 | 99d70edf3c5282a4d4f345eb477e67b689f7d02c | refs/heads/master | 2023-01-31T01:41:24.212706 | 2020-12-09T16:14:08 | 2020-12-09T16:14:08 | 106,447,129 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 890 | py | from dolfin import *
mesh = RectangleMesh(Point(-1, -1), Point(1, 1), 16, 16)
V = FunctionSpace(mesh, 'DG', 0)
u = TrialFunction(V)
v = TestFunction(V)
dt = Constant(1E-3)
bdries = FacetFunction('size_t', mesh, 0)
CompiledSubDomain('near(x[0], 0)').mark(bdries, 1)
ds = Measure('ds', subdomain_data=bdries)
w = Exp... | [
"miroslav.kuchta@gmail.com"
] | miroslav.kuchta@gmail.com |
d07c8299d3a4821a5b46f2192ee24e7d43d3b544 | 34f1074602e711ad2311afb7e0bcd624013a954e | /websauna/system/core/templatecontext.py | 8539ee125df3e88998f01b2e8f142bbd0bdd341d | [
"MIT",
"Apache-2.0"
] | permissive | tareqalam/websauna | e8363c7dfec7faf2a804d78bf095ed8c2fd74ca0 | d6326efe3a35cb7cc16234b1ea64198e027ff257 | refs/heads/master | 2020-12-26T04:55:45.090210 | 2016-04-01T17:10:55 | 2016-04-01T17:10:55 | 55,261,614 | 0 | 0 | null | 2016-04-01T20:51:47 | 2016-04-01T20:51:46 | null | UTF-8 | Python | false | false | 6,712 | py | """Websauna template filters ."""
import datetime
import json
import arrow
from pyramid.config import Configurator
from pyramid.renderers import render
from pyramid.threadlocal import get_current_request
from pytz import timezone
from jinja2 import contextfilter
from jinja2 import Markup
from arrow import Arrow
from... | [
"mikko@opensourcehacker.com"
] | mikko@opensourcehacker.com |
3c87eaa259a609e1c2861f735a42d5b7dba0ad8f | 85a9ffeccb64f6159adbd164ff98edf4ac315e33 | /pysnmp-with-texts/SUNMANAGEMENTCENTER-TRAP-MIB.py | 4007f36685c5513c67e5885eec8f8d944a642084 | [
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | agustinhenze/mibs.snmplabs.com | 5d7d5d4da84424c5f5a1ed2752f5043ae00019fb | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | refs/heads/master | 2020-12-26T12:41:41.132395 | 2019-08-16T15:51:41 | 2019-08-16T15:53:57 | 237,512,469 | 0 | 0 | Apache-2.0 | 2020-01-31T20:41:36 | 2020-01-31T20:41:35 | null | UTF-8 | Python | false | false | 5,863 | py | #
# PySNMP MIB module SUNMANAGEMENTCENTER-TRAP-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/SUNMANAGEMENTCENTER-TRAP-MIB
# Produced by pysmi-0.3.4 at Wed May 1 15:12:12 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python vers... | [
"dcwangmit01@gmail.com"
] | dcwangmit01@gmail.com |
3c37530a8a37ff8ea3d525de76d5f69a0c2d7d0f | 8658dd76c4599f9dc0c86d86ff3c797622a211e1 | /plot_scripts/plot_metallicity_model.py | 35b07434a8b355a88f1b5c3fb827a84b5be1f329 | [
"BSD-3-Clause"
] | permissive | brittonsmith/yt_p2p | 2fe500883787a17a98ad1e1fd0ec83369c14fcf7 | 6cae651e1f87c073294fd7afeb8e4aef70868535 | refs/heads/main | 2022-12-02T17:07:56.031268 | 2022-11-21T16:24:03 | 2022-11-21T16:24:03 | 148,556,949 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 9,292 | py | import matplotlib as mpl
from matplotlib import pyplot, colors
from matplotlib.ticker import FuncFormatter
import numpy as np
import os
from scipy.interpolate import interp1d
import sys
import yaml
import yt
import ytree
from ytree.data_structures.tree_container import TreeContainer
from yt.extensions.p2p.tree_analysis... | [
"brittonsmith@gmail.com"
] | brittonsmith@gmail.com |
26cfbdf165c756b0f99088d6becfe98541684732 | ab4fd55964e957fbb3b699b49c304525c2f93623 | /luffGameEngine.py | 3a68f85e8b00d7199585e9350ff9f6f7efefca21 | [] | no_license | JonasMelin/gomakuReinforcedAI | 5f77e7d5998046cf0f51257e404da9acbdcc0e50 | 3a734e9083ad46d92753a87d47323262271e9ca5 | refs/heads/master | 2020-05-01T04:11:40.890559 | 2019-03-23T09:04:32 | 2019-03-23T09:04:32 | 177,266,770 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,707 | py | import luffGameBoard
import definitions as defs
import luffPlayer as player
import numpy as np
import sys
import random
# ################################################################
# Class that executes one game of luff with two players.
# It also makes sure to train the loosing player after the game
# so it ge... | [
"you@example.com"
] | you@example.com |
48619c8a64f574f885eefd5f7ed6537007dd210b | 01776becc70eafe6dcbad140eb40a862bc623341 | /LeetCode/Medium/1448.Count Good Nodes in Binary Tree.py | 0999fcbf2a07a66824de6c488bd150de7301abb6 | [] | no_license | AnthonyTsui/AlgoPractice | 8eae4d197080c0a94b0127ed5a95198f5d2f3269 | 59fcb2826fb95a304cf7b4b9a77c2ae710fb5c9a | refs/heads/master | 2022-12-02T18:20:58.104356 | 2020-08-29T23:58:17 | 2020-08-29T23:58:17 | 250,649,377 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,643 | py | # Given a binary tree root, a node X in the tree is named good if in the path from root to X there are no nodes with a value greater than X.
# Return the number of good nodes in the binary tree.
# Example 1:
# Input: root = [3,1,4,3,null,1,5]
# Output: 4
# Explanation: Nodes in blue are good.
# Root Node (3) is alw... | [
"atsui4688@gmail.com"
] | atsui4688@gmail.com |
8d40647bf80756eefb88fac2868b748fc81f0002 | c2fb6846d5b932928854cfd194d95c79c723f04c | /python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE/WK2/10.py | e3e7f226e706e91b4f158678a650191e0547b559 | [
"MIT"
] | permissive | Jimut123/code-backup | ef90ccec9fb6483bb6dae0aa6a1f1cc2b8802d59 | 8d4c16b9e960d352a7775786ea60290b29b30143 | refs/heads/master | 2022-12-07T04:10:59.604922 | 2021-04-28T10:22:19 | 2021-04-28T10:22:19 | 156,666,404 | 9 | 5 | MIT | 2022-12-02T20:27:22 | 2018-11-08T07:22:48 | Jupyter Notebook | UTF-8 | Python | false | false | 236 | py | import math
def project_to_distance(point_x, point_y, distance):
dist_to_origin = math.sqrt(point_x ** 2 + point_y ** 2)
scale = distance / dist_to_origin
print(point_x * scale, point_y * scale)
project_to_distance(2, 7, 4)
| [
"jimutbahanpal@yahoo.com"
] | jimutbahanpal@yahoo.com |
f82f3ecdc70ac9c8fb32dbb072d755f5d2c9b34c | 22addead5f5b0ce51dc10adb87a92868d935f5b4 | /lib/attack/__init__.py | b6bac43fce5914993f9b7f789ec091c1b384d86a | [] | no_license | a1600012888/AdversarialTraining | 6dcb34801f1f498a85c49e7d3a1be225e7d6ff7f | 8893d1d02be571184d42d63a3ab677a7dd4db527 | refs/heads/master | 2020-04-23T15:32:25.689941 | 2019-02-28T08:49:33 | 2019-02-28T08:49:33 | 171,269,134 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 34 | py | from .attack_base import clip_eta
| [
"1600012888@pku.edu.cn"
] | 1600012888@pku.edu.cn |
77d3f581faf56da232be9f6d24d7f351389df5ba | 071416b05026dfc5e21e32c7f1846ab8475acf97 | /data collection/list/linear.py | ca9570d711c9a426913ce69df59ebb54bcb53a61 | [] | no_license | Sreerag07/bankproject | a7acf65b45c9e5c3ccace7ff3d755c33cf8a4fb0 | bb28e7c92cbfa1c1810d20eb4767a479eee5f015 | refs/heads/master | 2023-04-20T01:15:47.496059 | 2021-05-19T08:03:54 | 2021-05-19T08:03:54 | 368,788,580 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 436 | py | # list=[1,2,3,5,55,44,22,66,88]
# def linear(x):
# if x in list:
# print("Number found")
# else:
# print("Not found")
# num=int(input("Enter number"))
# linear(num)
list=[1,2,3,5,55,44,22,66,88]
def linear(x):
flag=0
for i in list:
if i==x:
flag=1
break
... | [
"sgpakkam@gmail.com"
] | sgpakkam@gmail.com |
67ed0372ce9f836440bf09da6ee9d5f3f9dc21b3 | 3d19e1a316de4d6d96471c64332fff7acfaf1308 | /Users/T/TatiRibeiro/aula_1.py | c2ddb2fdca23bfea1d0917516287d1b99b0af90f | [] | no_license | BerilBBJ/scraperwiki-scraper-vault | 4e98837ac3b1cc3a3edb01b8954ed00f341c8fcc | 65ea6a943cc348a9caf3782b900b36446f7e137d | refs/heads/master | 2021-12-02T23:55:58.481210 | 2013-09-30T17:02:59 | 2013-09-30T17:02:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,976 | py | import scraperwiki #permite que a gente salve os nossos resultados
from lxml.html import parse
import re
url_busca = "http://busca.globo.com/Busca/oglobo/?query=hacker"
ps_busca = parse(url_busca).getroot()
print ps_busca
links = ['http://oglobo.globo.com/rio/mat/2011/07/13/pm-anuncia-prisao-do-maior-hacker-do-rio-... | [
"pallih@kaninka.net"
] | pallih@kaninka.net |
686a8d504a940e3d4d41fafd0aa43bfd25d38b6e | 744594f30c5e283f6252909fc68102dd7bc61091 | /2018/06/2018_Day_06a.py | 2826cd644043c57f788b0a6f521ab6ec728bf796 | [
"MIT"
] | permissive | vScourge/Advent_of_Code | 84f40c76e5dc13977876eea6dbea7d05637de686 | 36e4f428129502ddc93c3f8ba7950aed0a7314bb | refs/heads/master | 2022-12-20T22:12:28.646102 | 2022-12-15T22:16:28 | 2022-12-15T22:16:28 | 160,765,438 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,982 | py | """
qLkKleEZHhTtzGtiITowWOJjlLJkKZzRrQqsvV
"""
import string
### CLASSES ###
class Point( ):
def __init__( self, x, y ):
self.x = x
self.y = y
def __repr__( self ):
return '<Point ({0},{1})>'.format( self.x, self.y )
### FUNCTIONS ###
def get_distance( point1, point2 ):
return abs( point1.x - point2... | [
"adam.pletcher@gmail.com"
] | adam.pletcher@gmail.com |
ac030d8cf288f1a3f698d500d88fcf41165925f0 | 161e01f92e3810edff17054851259e54a1432921 | /rapid7vmconsole/models/page_of_vulnerability_reference.py | 67837867755908b3022aa2f5705fcb560c5ddac6 | [
"MIT"
] | permissive | Tofuhippo/vm-console-client-python | f3ffa3257b1928791fef090404377b43c3ff28d5 | 3c856923be1caf22c29a5d309713b8940546b57b | refs/heads/master | 2020-06-26T04:07:37.251955 | 2019-07-29T20:45:40 | 2019-07-29T20:45:40 | 199,524,127 | 0 | 0 | MIT | 2019-07-29T20:42:37 | 2019-07-29T20:42:37 | null | UTF-8 | Python | false | false | 5,343 | py | # coding: utf-8
"""
Python InsightVM API Client
OpenAPI spec version: 3
Contact: support@rapid7.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from rapid7vmconsole.models.link import Link # noqa: F401,E501
from rapid7vmcon... | [
"zachary_youtz@rapid7.com"
] | zachary_youtz@rapid7.com |
124881b58e8c58064f5762aaf8d54c08bfcf0510 | 1577e1cf4e89584a125cffb855ca50a9654c6d55 | /pyobjc/pyobjc/pyobjc-framework-Quartz-2.5.1/PyObjCTest/test_cvpixelbufferiosurface.py | 22793754d5b448d10ac1b350102dde43ac2e9fcd | [
"MIT"
] | permissive | apple-open-source/macos | a4188b5c2ef113d90281d03cd1b14e5ee52ebffb | 2d2b15f13487673de33297e49f00ef94af743a9a | refs/heads/master | 2023-08-01T11:03:26.870408 | 2023-03-27T00:00:00 | 2023-03-27T00:00:00 | 180,595,052 | 124 | 24 | null | 2022-12-27T14:54:09 | 2019-04-10T14:06:23 | null | UTF-8 | Python | false | false | 801 | py | from PyObjCTools.TestSupport import *
import Quartz
try:
unicode
except NameError:
unicode = str
class TestCVPixelBufferIOSurface (TestCase):
@min_os_level('10.6')
def testConstants10_6(self):
self.assertIsInstance(Quartz.kCVPixelBufferIOSurfaceOpenGLTextureCompatibilityKey, unicode)
... | [
"opensource@apple.com"
] | opensource@apple.com |
d8c668e17a24a3982330cd8a47c2885ca42ad470 | a838d4bed14d5df5314000b41f8318c4ebe0974e | /sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/operations/_microsoft_azure_metrics_advisor_restapi_open_ap_iv2_operations.py | 73b02ed9e7b03738104ad78517d59112ce37021c | [
"LicenseRef-scancode-generic-cla",
"MIT",
"LGPL-2.1-or-later"
] | permissive | scbedd/azure-sdk-for-python | ee7cbd6a8725ddd4a6edfde5f40a2a589808daea | cc8bdfceb23e5ae9f78323edc2a4e66e348bb17a | refs/heads/master | 2023-09-01T08:38:56.188954 | 2021-06-17T22:52:28 | 2021-06-17T22:52:28 | 159,568,218 | 2 | 0 | MIT | 2019-08-11T21:16:01 | 2018-11-28T21:34:49 | Python | UTF-8 | Python | false | false | 159,675 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | [
"noreply@github.com"
] | scbedd.noreply@github.com |
e5d1c9e98e3d1c8269b244a6c30d70702cb9594f | 051d6dfc9586d97f5a4d03bac2a5404e3bf704bb | /das_decennial/programs/metrics/accuracy_metrics.py | 8fd900ca3c61fcad10a3e2b0ca82ba72d1264f32 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT",
"LicenseRef-scancode-public-domain",
"CC0-1.0"
] | permissive | p-b-j/uscb-das-container-public | 93c88cb3608abbeb8d73ae2e8f847e531c2a8550 | 7f7ba44055da15d13b191180249e656e1bd398c6 | refs/heads/main | 2023-08-28T20:34:55.291277 | 2021-10-29T15:40:48 | 2021-10-29T15:40:48 | 421,209,836 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 61,572 | py | from operator import add
import numpy as np
import os
import traceback
import datetime
from pyspark.sql.types import Row, DoubleType
import pyspark.sql.functions as F
from pyspark.sql import SparkSession
from programs.queries.querybase import AbstractLinearQuery
from programs.sparse import multiSparse
from das_framew... | [
"pbjones@cs.washington.edu"
] | pbjones@cs.washington.edu |
9663233799fc13cba7c180bdcefd88d7f53a6e49 | d86c5aa92a9763510b539776510ad9795d33ae89 | /September 2020/05-Functions-Advanced/02-Rounding.py | 4e79800dff074852d0650aaa8fe2bd6d7588e2d2 | [
"MIT"
] | permissive | eclipse-ib/Software-University-Professional-Advanced-Module | 42e3bd50ac5f0df8082add29f4113cffb87889e1 | 636385f9e5521840f680644824d725d074b93c9a | refs/heads/main | 2023-02-13T06:02:53.246980 | 2021-01-06T21:12:14 | 2021-01-06T21:12:14 | 306,282,871 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 50 | py | print([round(float(i)) for i in input().split()])
| [
"65770519+eclipse-ib@users.noreply.github.com"
] | 65770519+eclipse-ib@users.noreply.github.com |
ae596f422a520cd6ec2683f826cb62512f0dae77 | aa15dacf191fdd720d6bb321a8451a4a105d8bfe | /src/gui/components/uv_edit/subobj.py | 7c2ba6d56786a329c6e60065d3035273dbae03ae | [
"BSD-3-Clause"
] | permissive | gaconkzk/panda3dstudio | 8e638610f24b3699852057984cf70bc93e4d3e13 | 97f7abdb61f025527a1ff3fabf51519deb2a1a7b | refs/heads/master | 2020-09-16T19:14:35.001137 | 2019-11-21T16:28:05 | 2019-11-21T16:28:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,704 | py | from ...base import *
from ...button import *
from ...panel import *
class SubobjectPanel(Panel):
def __init__(self, stack):
Panel.__init__(self, stack, "subobj", "Subobject level")
self._btns = {}
self._comboboxes = {}
self._checkbuttons = {}
self._colorboxes = {}
... | [
"Epihaius@users.noreply.github.com"
] | Epihaius@users.noreply.github.com |
3338678a6e5401ddb2889318b139e14555ebc8f0 | 3fc7a6ffc39390c8228b30b6d53a3429104bf5f3 | /October/10-21/开启进程的方式.py | 407e9af4fa4c731b71436ea1bf673dfee8725c3f | [] | no_license | liuluyang/miller | a5463c0f9625570de2cf16a9844ed4c7f82dde76 | 786f286749972fb2c3a66e068a3874a00aa0f2ee | refs/heads/master | 2020-09-21T22:20:22.987833 | 2019-11-30T03:20:13 | 2019-11-30T03:20:13 | 224,952,326 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,168 | py | # ! /usr/bin/env python
# -*- coding: utf-8 -*-
# __author__ = "Miller"
# Datetime: 2019/10/21 11:06
import time
import random
from multiprocessing import Process,current_process
def piao(name):
print(" %s piaoing" % name, current_process().name)
time.sleep(random.randint(1,5))
print(" %s piaoend" % name... | [
"1120773382@qq.com"
] | 1120773382@qq.com |
e75242d7167a7de833a1fe3140de8b7395da26b0 | 29da2ca6def1270be13a3096685a8e5d82828dff | /CIM15/IEC61970/Informative/InfWork/CULaborItem.py | b7cad0d6c2668b7c4a981ee5c5fa8f459bd2a509 | [
"MIT"
] | permissive | rimbendhaou/PyCIM | 75eb3bcd3729b2410c03f3d5c66d6f1e05e21df3 | d578bb0bf1af344342bd23344385ed9c06c2d0ee | refs/heads/master | 2022-04-28T01:16:12.673867 | 2020-04-16T02:19:09 | 2020-04-16T02:19:09 | 256,085,381 | 0 | 0 | MIT | 2020-04-16T02:15:20 | 2020-04-16T02:08:14 | null | UTF-8 | Python | false | false | 5,649 | py | # Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish... | [
"rwl@thinker.cable.virginmedia.net"
] | rwl@thinker.cable.virginmedia.net |
a15554d8ecd21cb84034b53ddf6d74de37bb0b31 | fefb1e9b0b736da4e49d7754f8d1dbaf37f2fa6a | /.history/5_2_20210131103131.py | 506487eca9bb724af55badd933a83aa7e54bd497 | [] | no_license | wh-debug/python | 5a78a2227874ebc400d075197de0adab9f55d187 | 1467eeda670f170e6e2d7c0a0550f713f1ee9d75 | refs/heads/master | 2023-03-12T22:08:12.608882 | 2021-02-17T09:49:52 | 2021-02-17T09:49:52 | 334,032,494 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 689 | py | '''
Author: 零到正无穷
Date: 2021-01-31 08:51:29
LastEditTime: 2021-01-31 10:31:29
LastEditors: Please set LastEditors
Description: In User Settings Edit
FilePath: \python\5_2.py
'''
car = 'Audi'
print(car.lower() == 'audi')
print(car.lower())
#todo 学会使用and 和 or
ageold = 22
ageyounger = 23
print((ageold >20) and (ageyounger... | [
"1813763848@qq.com"
] | 1813763848@qq.com |
bbe9a7ce47fdcdcdf57c7c82d374c3b7f8bf16f0 | 55007e68f5db80fd46c684232cd8a838c9e6a3aa | /closets/migrations/0003_auto_20201011_0150.py | 08cf38a483848b750b45c125b56db9c192aa5e4c | [
"BSD-2-Clause"
] | permissive | ProjectFFF/FFF | ac6fa03f226a2584cfb6d97d948b14239891b127 | a563e2bb5aafe18d3fa3143d83b6558921eac8ee | refs/heads/master | 2023-02-14T17:52:11.508543 | 2021-01-11T19:25:00 | 2021-01-11T19:25:00 | 292,290,709 | 8 | 0 | BSD-2-Clause | 2021-01-11T19:22:35 | 2020-09-02T13:27:58 | HTML | UTF-8 | Python | false | false | 394 | py | # Generated by Django 3.1.1 on 2020-10-10 16:50
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('closets', '0002_auto_20201011_0146'),
]
operations = [
migrations.AlterField(
model_name='newcloth',
name='image',
... | [
"jeongiun@naver.com"
] | jeongiun@naver.com |
95edb11bc7c80dcebeec39bd6a17e759c6da5c86 | 8eccc4cab7ba7292c932468163c711d4058e3b90 | /app/many_to_many/migrations/0006_auto_20191219_0716.py | 868bf826487f3f34e306ab5b4eb645152f41c70f | [] | no_license | zehye/django-document-wps12 | 97b1aa4be5a56b949ba59ac92e8d0c5cb3e22f73 | 086fdc581ba3f2db7bc39a6eb906fd97cc61c415 | refs/heads/master | 2022-09-08T12:46:19.110011 | 2019-12-26T09:07:15 | 2019-12-26T09:07:15 | 228,784,564 | 0 | 0 | null | 2022-08-23T17:59:03 | 2019-12-18T07:37:14 | Python | UTF-8 | Python | false | false | 513 | py | # Generated by Django 3.0 on 2019-12-19 07:16
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('many_to_many', '0005_auto_20191219_0710'),
]
operations = [
migrations.RenameField(
model_name='relation',
old_name='to_user',... | [
"zehye.01@gmail.com"
] | zehye.01@gmail.com |
39e0de53cf212b76fd23fb67b5ad8f19a568b661 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_200/3580.py | 5b36e69770a0c75c420d8062e809e6f28a5c6d4b | [] | 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 | 446 | py | import sys
if __name__ == '__main__':
t = int(raw_input())
for i in xrange(1, t + 1):
n = int(raw_input())
for j in xrange(n):
j_str = "%d" % (n - j)
valid = True
for k in xrange(1, len(j_str)):
if j_str[k-1] > j_str[k]:
v... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
99dca5156c5f8d04ad29f3b2ef5b2e6e3ec2d49c | 5c00b0626b4ec2bc428e565c97b4afc355198cc4 | /tests/core/eval/test_comparison_matrix.py | efb18544d68002f359ad597884dd5c7b9b71378e | [
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | andreofner/torchsim | 8cff778a324d4f7dc040f11a12d0dc8cd66375b7 | 81d72b82ec96948c26d292d709f18c9c77a17ba4 | refs/heads/master | 2021-10-24T05:25:33.740521 | 2019-03-22T10:20:00 | 2019-03-22T10:20:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,707 | py | import torch
from torchsim.core.eval.metrics.cluster_agreement import cluster_agreement
from torchsim.core.eval.metrics.comparison_matrix import comparison_matrix, classification_matrix
from torchsim.core.eval.metrics.simple_classifier_svm import SvmClassifier
def test_comparison_matrix():
measures = [torch.Long... | [
"jan.sinkora@goodai.com"
] | jan.sinkora@goodai.com |
ec15e0d32b5a9cacde72429ed190f9c69d18c8c1 | 4b157ab5270ba430a6d7c1594ea41ceea89b7ab2 | /craigslist/utils.py | e367f1c36bd44ef44446f39f138201d1063f88bc | [
"MIT"
] | permissive | estin/pomp-craigslist-example | 6a06e0671b189b45d7f688583c052b3e23efd010 | c019686776ff2235f92ece9cea19874631a561b9 | refs/heads/master | 2021-01-10T12:07:30.035957 | 2017-11-21T19:55:40 | 2017-11-21T19:55:40 | 52,002,919 | 38 | 8 | null | null | null | null | UTF-8 | Python | false | false | 1,997 | py | import os
import socket
import datetime
import msgpack
from aiomeasures import StatsD
HOSTNAME = socket.gethostname()
METRIC_ITEMS_PARSED_KEY = 'crawler.%s.items.parsed' % HOSTNAME
METRIC_ITEMS_IMPORTED_KEY = 'crawler.%s.items.imported' % HOSTNAME
METRIC_REQUESTS_STARTED_KEY = 'crawler.%s.requests.started' % HOSTNA... | [
"tatarkin.evg@gmail.com"
] | tatarkin.evg@gmail.com |
8b4706c3dbc0bdd396c5bb6ceb65681d6f7a231d | 59fb5c359d194b75a28252d8f73deaff6ed04716 | /vspk/v5_0/nujob.py | 16e366879c4b48fd365f85006bd1cd3a0dca427d | [
"BSD-3-Clause"
] | permissive | sciarrilli/vspk-python | 3417d96006d6f595347987a5e3248dcf816ce254 | 0e3e7377ae3399f09fa4f256589beb5c1b058db8 | refs/heads/master | 2020-04-01T18:46:43.206818 | 2018-08-07T02:19:39 | 2018-08-07T02:19:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 36,614 | py | # -*- coding: utf-8 -*-
#
# Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyrigh... | [
"corentin.henry@nokia.com"
] | corentin.henry@nokia.com |
05684f1088381f9b841d18bb43de3027404f5d4b | de2435c4a47f11e16c3f559ea53252f7b66b56fd | /original_data_classify.py | 6025b077c7d3b4bdf5cdf22012c4541e4df47f98 | [] | no_license | bigdatasciencegroup/-CNN- | f697ca2997a201d8b3dd20c74fd23e78d9207771 | 85bdb0201387ed6859c5a00353c3bb0aaeab6852 | refs/heads/master | 2020-08-09T04:05:12.429496 | 2019-06-24T13:22:12 | 2019-06-24T13:22:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,294 | py | import os
import shutil # 复制文件
# 原始目录所在的路径
# 数据集未压缩
original_dataset_dir_cat = 'kaggle_original_data_cat'
original_dataset_dir_dog = 'kaggle_original_data_dog'
# 存储较小数据集的目录
base_dir = 'data'
os.mkdir(base_dir)
# 训练、验证、测试数据集的目录
train_dir = os.path.join(base_dir, 'train')
os.mkdir(train_dir)
validati... | [
"noreply@github.com"
] | bigdatasciencegroup.noreply@github.com |
df76ca3f1ae3439b07b88d5e5a3cb80861054918 | 9ca9cad46f2358717394f39e2cfac2af4a2f5aca | /Week02/Main_HW/Nested Lists/Nested Lists_YYH.py | de36ada16ecd2c10cfa736229333a6a9dff24bd9 | [] | no_license | Artinto/Python_and_AI_Study | ddfd165d1598914e99a125c3019a740a7791f6f6 | 953ff3780287825afe9ed5f9b45017359707d07a | refs/heads/main | 2023-05-05T15:42:25.963855 | 2021-05-24T12:24:31 | 2021-05-24T12:24:31 | 325,218,591 | 1 | 3 | null | null | null | null | UTF-8 | Python | false | false | 476 | py | if __name__ == '__main__':
student=[]
sscore=[]
for _ in range(int(input())):
name = input()
score = float(input())
student.append([name,score])
sscore.append(score)
sscore.sort()
new_score=[]
for i in sscore:
if i... | [
"noreply@github.com"
] | Artinto.noreply@github.com |
c4bad45c1284dbf42aa60a7e8f68c9c830914dd3 | 995514f414eee6bbe9083ec39ecd3027cf9fd7d8 | /3.3/10.py | f4036e7203d8730b0ec427b45c17f7c395720f24 | [] | no_license | j16949/Programming-in-Python-princeton | e02376ebb714264a1329aacad30347e4ae79f909 | 392391b98815cc1ae2b49e1057a10bc5b37e801f | refs/heads/master | 2023-08-08T11:52:04.362780 | 2023-08-01T13:02:41 | 2023-08-01T13:02:41 | 313,943,770 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 19 | py | #参加vector3D.py
| [
"kkwert@sina.com"
] | kkwert@sina.com |
56867b067a6dc74f4eb8305e0f6175541a0e8f37 | 79810ee98887c9ae121385de7643fd1e59ef7bee | /myproject/users/forms.py | 33ddf344b8f32b046de48607dd0ed66172540a9e | [] | no_license | jaishankarg24/4in1Application | 628cd1d96644d1cd552e76b034e5b673499e265e | 4419819bd3fd79d0db7571339ef894758adc6a34 | refs/heads/master | 2023-03-28T08:01:12.662452 | 2021-03-17T08:48:11 | 2021-03-17T08:48:11 | 324,987,459 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 592 | py | from django import forms
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
from users.models import Profile
class UserRegisterForm(UserCreationForm):
email = forms.EmailField()
class Meta:
model = User
fields = ['username', 'email', 'password1'... | [
"jaishankarg24@gmail.com"
] | jaishankarg24@gmail.com |
343c810c48e9f58b00b1e09bd00e61a1c967dbc0 | 3da69696601b2b3ad7bc1285a5f0343c7eafea80 | /lc228.py | ca1c5ada2440e770192f351f22031677a5201107 | [] | no_license | GeorgyZhou/Leetcode-Problem | ee586463a2e4e75c910c095bdc057f1be70b5c1b | d6fac85a94a7188e93d4e202e67b6485562d12bd | refs/heads/master | 2021-06-30T15:58:04.698200 | 2020-12-18T22:55:49 | 2020-12-18T22:55:49 | 66,054,365 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 819 | py | class Solution(object):
def summaryRanges(self, nums):
"""
:type nums: List[int]
:rtype: List[str]
"""
if not nums:
return []
ret = []
count = []
for i in xrange(len(nums)):
if len(count) == 0 or nums[i] == nums[i-1] + 1:
... | [
"michaelchouqj@gmail.com"
] | michaelchouqj@gmail.com |
65ef6612393b77c70edf8f74cc795d91619b8e32 | 4824e3e4833f3db236d44eaf3dea3e5e8e0bfca1 | /sdk/artefacts/default/CentOS_6/get-sdk-2017.2.12-CentOS_6.py | 22808206048e5efa93ee7109c568570f29b91e03 | [] | no_license | neuraghe/NEURAghe | 5c99b6340edd4d2d50ee3ec461df9f39fd6cb138 | dd6cfc808a163e4b4f8d0cb499f009bc977d7984 | refs/heads/master | 2020-08-07T11:59:58.699824 | 2019-10-16T13:55:10 | 2019-10-16T13:55:10 | 213,429,667 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,511 | py | #!/usr/bin/env python
import os
import tarfile
import os.path
import argparse
src="08b13f8b905a29cdbf1d563593a3a00d413ce480"
artefacts=[["https://iis-artifactory.ee.ethz.ch/artifactory/release/CentOS_6/pulp/sdk/mainstream/5865f94aeece9d2be939e8a805f0bb221c40e2f9/0/sdk.tar.bz2", "pkg/sdk/2017.2.12"], ["https://iis-ar... | [
"carreras.marco@gmail.com"
] | carreras.marco@gmail.com |
4749837bc3892b0f93e89ab317e48fb80f852ebf | 021f764e87acc90b79eabaaf03976ef5221b169c | /sms/admin.py | c3c7be2b337a85376b9bedb390df6f948b304397 | [] | no_license | dedayoa/yeastar-sms-bridge | 3fc0ca6fc5cb978d6c7a0ee8f8f954516bd097b1 | 30a407abea78d108eed8d669084ccb4ff2e31dfd | refs/heads/master | 2023-06-11T13:48:18.231804 | 2021-06-28T06:39:24 | 2021-06-28T06:39:24 | 368,727,572 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,842 | py | from django.contrib import admin
# Register your models here.
from .models import SMSMessageStateLog, SMSMessage, InvalidSMSMessage, SMSQueue
from import_export import resources
from import_export.admin import ExportActionModelAdmin
from django.utils.safestring import mark_safe
from django.urls import reverse
class S... | [
"dedayoa@gmail.com"
] | dedayoa@gmail.com |
e00c8dd5a0f017bf44c489775271da5564c0e648 | d3b680c4c45357847271bea0e32bd20bb324ace2 | /plugins/logstash/logstash.py | e7a98492e519e4f615fc54b16a32b664ffaa7cf4 | [
"Apache-2.0"
] | permissive | JacksonHill/alerta-contrib | 4a2af1719734b5aaed2283982ab9890e1dc732ad | 4812fc8ac33481dd82e9a0bd3ca335ac2892b356 | refs/heads/master | 2020-12-24T16:49:23.143080 | 2016-09-13T07:57:04 | 2016-09-13T07:57:04 | 68,082,134 | 0 | 0 | null | 2016-09-13T06:44:30 | 2016-09-13T06:44:30 | null | UTF-8 | Python | false | false | 1,149 | py | import os
import socket
from alerta.app import app
from alerta.plugins import PluginBase
LOG = app.logger
DEFAULT_LOGSTASH_HOST = 'localhost'
DEFAULT_LOGSTASH_PORT = 6379
LOGSTASH_HOST = os.environ.get('LOGSTASH_HOST') or app.config.get('LOGSTASH_HOST', DEFAULT_LOGSTASH_HOST)
LOGSTASH_PORT = os.environ.get('LOGSTAS... | [
"nick.satterly@guardian.co.uk"
] | nick.satterly@guardian.co.uk |
0d1ad6526bb555904b2b3a0071388bac292cfb29 | 04b1803adb6653ecb7cb827c4f4aa616afacf629 | /build/copy_test_data_ios.py | 6a15ca2a7b3571d99856a757daa4de8b667448e6 | [
"BSD-3-Clause"
] | permissive | Samsung/Castanets | 240d9338e097b75b3f669604315b06f7cf129d64 | 4896f732fc747dfdcfcbac3d442f2d2d42df264a | refs/heads/castanets_76_dev | 2023-08-31T09:01:04.744346 | 2021-07-30T04:56:25 | 2021-08-11T05:45:21 | 125,484,161 | 58 | 49 | BSD-3-Clause | 2022-10-16T19:31:26 | 2018-03-16T08:07:37 | null | UTF-8 | Python | false | false | 3,277 | py | #!/usr/bin/env python
# Copyright (c) 2012 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.
"""Copies test data files or directories into a given output directory."""
from __future__ import print_function
import optparse
... | [
"sunny.nam@samsung.com"
] | sunny.nam@samsung.com |
a115e3bd8c3e3fac6866d9849764b2f093467c84 | 710218447b601547057fe45139fc4b318c616ac3 | /todo/todo_list/migrations/0001_initial.py | 1d21c25b7c475f1da30abcbe02995a8e93eb1166 | [] | no_license | nihalgaurav/ToDo-by-Django | d10ba371076e73aa7382a304af92366192e79c4b | 6d52f8dd7a11eb7fc1706491ecbe76466553a56d | refs/heads/master | 2020-04-27T23:26:55.331453 | 2019-03-12T12:43:21 | 2019-03-12T12:43:21 | 174,472,466 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 551 | py | # Generated by Django 2.1.5 on 2019-03-07 09:44
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='list',
fields=[
('id', models.AutoField(aut... | [
"nihalgaurav85@gmail.com"
] | nihalgaurav85@gmail.com |
1a080a2dd67dfa0086aa0d60f21236f9a72b99ec | c71e5115b895065d2abe4120799ffc28fa729086 | /procon-archive/atcoder.jp/abc173/abc173_d/Main.py | c483062071d5fdfff19233efc610659d71b318ad | [] | no_license | ken0105/competitive-programming | eb82f92a7b7ad0db601ea341c1441de6c6165064 | f918f85a0ea6dfbe9cac3ef835f80503bb16a75d | refs/heads/master | 2023-06-05T09:55:25.264731 | 2021-06-29T14:38:20 | 2021-06-29T14:38:20 | 328,328,825 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 366 | py | from collections import deque
if __name__ == '__main__':
n = int(input())
a = list(map(int,input().split()))
a.sort()
ref = deque()
ref.append(a.pop())
ans = 0
while a:
try:
r = a.pop()
ref.append(r)
ref.append(r)
ans += ref.popleft()
... | [
"iwata.kenaaa@gmail.com"
] | iwata.kenaaa@gmail.com |
7ac8cb7c7a01ec578ccb1071812f196113093707 | 7ef25703829eb6e7dd66e49752514e84b1361cec | /transcrypt/development/automated_tests/hello/testlet0.py | 83f8a0fdb32a7308a100731d6771f0ce2b031b8d | [
"Apache-2.0"
] | permissive | marrow-legacy/transplit | be5f776874cff87aa7a64c25a1fc5fb36bf52147 | 9f9f24832a81117908f374d2c3582f4b55786ec5 | refs/heads/master | 2021-06-06T04:17:45.917807 | 2016-03-06T20:21:28 | 2016-03-06T20:21:28 | 53,017,844 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 78 | py | def run (autoTester):
autoTester.check ('hello')
autoTester.check ('world')
| [
"alice@gothcandy.com"
] | alice@gothcandy.com |
b74ecaf8313237b123c476e9fab0d53fbf1b0c8b | 93713f46f16f1e29b725f263da164fed24ebf8a8 | /Library/lib/python3.7/site-packages/pytoml/test.py | 11deec9acff9c66cdb4a91207025f18f35105ec3 | [
"BSD-3-Clause"
] | permissive | holzschu/Carnets | b83d15136d25db640cea023abb5c280b26a9620e | 1ad7ec05fb1e3676ac879585296c513c3ee50ef9 | refs/heads/master | 2023-02-20T12:05:14.980685 | 2023-02-13T15:59:23 | 2023-02-13T15:59:23 | 167,671,526 | 541 | 36 | BSD-3-Clause | 2022-11-29T03:08:22 | 2019-01-26T09:26:46 | Python | UTF-8 | Python | false | false | 1,051 | py | import datetime
from .utils import format_rfc3339
try:
_string_types = (str, unicode)
_int_types = (int, long)
except NameError:
_string_types = str
_int_types = int
def translate_to_test(v):
if isinstance(v, dict):
return { k: translate_to_test(v) for k, v in v.items() }
... | [
"nicolas.holzschuch@inria.fr"
] | nicolas.holzschuch@inria.fr |
23690586850a6e2dd6d1f9b3a60d4676ed518b2b | 2436f9f911149926af8fd7c1cd5c4e0d604987a0 | /puente_quintanavides/acciones/carga_peso_propio_xci.py | bb3b141c6d74282fa1104dd98c616693b0b564bc | [] | no_license | cryptopulgo/XCmodels | d185b93d01f69d52d88d8a5f965c35dc1742da22 | bad6e553d919909086ab9045884594b7d8aafc06 | refs/heads/master | 2022-12-08T21:24:39.152883 | 2020-08-19T13:25:25 | 2020-08-19T13:25:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 314 | py | \mdlr
\materiales
hormLosaSup(pesoUnitarioLosaSup= gammaHA*getThickness)
\mdlr
loads(casos(set_current_load_pattern("G1")))
\sets
\setLosaSup
{
\elementos{\for_each{ \vector3d_uniform_load_global{[0.0,0.0,-pesoUnitarioLosaSup-cargaUnitariaLosaSup]} }}
}
| [
"l.pereztato@gmail.com"
] | l.pereztato@gmail.com |
8b09a59a54994df5b8d1350f0ebefc26a758c389 | 2c3da6e0bddf55d64d650040bbf286c47b31811a | /学习路线/1.python基础/FlightWar/03-面向过程显示飞机.py | b0c61b3fe05ab202eef5f700c8b80c4103b6a21f | [
"MIT"
] | permissive | Bngzifei/PythonNotes | 76bd53db3033a9c51ab4bdd727842cd89607b584 | 01590e1b6c1bc0f04aa2d355fa2553c04cce27f2 | refs/heads/master | 2023-02-04T06:49:00.725463 | 2020-12-15T09:26:40 | 2020-12-15T09:26:40 | 155,154,662 | 1 | 2 | MIT | 2020-09-08T01:30:19 | 2018-10-29T05:02:48 | Python | UTF-8 | Python | false | false | 2,053 | py | import pygame # 动态模块.dll.pyd 静态模块:.py 静态的必须导入模块名.动态的只需要导入包名就行
import sys
from pygame.locals import *
"""
1.创建窗口
2.加载背景图片
3.把背景图片贴到窗口上
4.刷新窗口
Python 中没有常量,只是模拟常量了.
事件监测:监听事件操作,产生相应的效果.是否监听到并处理
vs.code:记得装一下.
"""
# 坐标都是元组
# 1.创建窗口
window = pygame.display.set_mode((512, 768))
# 2.加载背景图片
bg_image = pygame.image.load('r... | [
"bngzifei@gmail.com"
] | bngzifei@gmail.com |
c89760c5e749b9e9ac0a3da322fbbc4250ae052f | a9e3f3ad54ade49c19973707d2beb49f64490efd | /Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py | f4bbbfdbb19fde08a5bfeb224e850b336df9bd05 | [
"AGPL-3.0-only",
"AGPL-3.0-or-later",
"MIT"
] | permissive | luque/better-ways-of-thinking-about-software | 8c3dda94e119f0f96edbfe5ba60ca6ec3f5f625d | 5809eaca7079a15ee56b0b7fcfea425337046c97 | refs/heads/master | 2021-11-24T15:10:09.785252 | 2021-11-22T12:14:34 | 2021-11-22T12:14:34 | 163,850,454 | 3 | 1 | MIT | 2021-11-22T12:12:31 | 2019-01-02T14:21:30 | JavaScript | UTF-8 | Python | false | false | 36,473 | py | """
Unit tests for the Mongo modulestore
"""
import logging
import shutil
from datetime import datetime
from tempfile import mkdtemp
from unittest.mock import patch
from uuid import uuid4
import pymongo
import pytest
# pylint: disable=protected-access
from django.test import TestCase
# pylint: enable=E0611
from opa... | [
"rafael.luque@osoco.es"
] | rafael.luque@osoco.es |
d844564f2d969d97bc1b7e7fcff7135553a60e0a | f4dd8aa4e5476ffde24e27273dd47913c7f9177a | /Dlv2_safe2/tests/parser/duplicates.32.test.py | f0c5d0a246066a05caceeaf419293ef692a6f92a | [
"Apache-2.0"
] | permissive | dave90/Dlv_safe2 | e56071ec1b07c45defda571cb721852e2391abfb | f127f413e3f35d599554e64aaa918bc1629985bc | refs/heads/master | 2020-05-30T10:44:13.473537 | 2015-07-12T12:35:22 | 2015-07-12T12:35:22 | 38,256,201 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 129 | py | input = """
a :- not b.
a :- not c.
b :- not a.
c :- not a.
"""
output = """
a :- not b.
a :- not c.
b :- not a.
c :- not a.
"""
| [
"davide@davide-All-Series"
] | davide@davide-All-Series |
2627edafaa0e2496b078cfdad05e55bbd2bb837b | 59080f5116b9e8f625b5cc849eb14b7ff9d19f3d | /练习/5.sorted.py | acbaa07c71e7ea58f739b08efffc62f141b2b491 | [] | no_license | yyq1609/Python_road | eda2bcd946b480a05ec31cdcb65e35b3f3e739d1 | e9ba2f47c8dd2d00a6e5ddff03c546152efd8f49 | refs/heads/master | 2020-09-11T11:51:35.903284 | 2019-11-11T13:02:21 | 2019-11-11T13:02:21 | 222,054,462 | 1 | 0 | null | 2019-11-16T05:58:13 | 2019-11-16T05:58:12 | null | UTF-8 | Python | false | false | 511 | py | #!/usr/bin/env python
# -*- coding:utf-8 -*-
li = [-1, -2, 4, 3, 1]
info = {'a': 2, 'b': 10, 'c': 5}
l = sorted(li, key=abs, reverse=True)
info = dict(sorted(info.items(), key=lambda k: info[k[0]]))
print(l)
print(info)
# li = [1, 2, 3, 4, 5]
# info = {'a': 1, 'b': 2}
# v = info.fromkeys(li, 'hello')
# print(v, info... | [
"958976577@qq.com"
] | 958976577@qq.com |
5b0c5c88d4ddeefba69ee3a6723bd258fe502d30 | cd3df53a432d35e2fe7b4e4f9bbe62222235a85b | /tests/binding_tests/multipolygon_tests/test_repr.py | f0f850056d672b35adb5d7e2054a3ce48aeadba0 | [
"MIT"
] | permissive | vincentsarago/wagyu | 00ccbe6c9d101724483bde00e10ef512d2c95f9a | f6dce8d119fafa190d07f042ff6c4d5729a4c1e6 | refs/heads/master | 2023-01-20T06:26:27.475502 | 2020-11-21T04:57:01 | 2020-11-21T04:57:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 498 | py | import sys
from _wagyu import Multipolygon
from hypothesis import given
from . import strategies
@given(strategies.multipolygons)
def test_basic(multipolygon: Multipolygon) -> None:
result = repr(multipolygon)
assert result.startswith(Multipolygon.__module__)
assert Multipolygon.__qualname__ in result
... | [
"azatibrakov@gmail.com"
] | azatibrakov@gmail.com |
f8ac9aabe4379f646005a7e756375e455685fe23 | f5dbf8b9fc7a67167a966ad842999c5ec41d2363 | /app/views/my_home/register.py | 43f899867ef3dbc2349c21a6846643ba41c2cd21 | [] | no_license | super0605/cogofly-v1 | 324ead9a50eaeea370bf40e6f37ef1372b8990fe | dee0f5db693eb079718b23099992fba3acf3e2dd | refs/heads/master | 2022-11-27T12:16:30.312089 | 2019-10-11T20:35:09 | 2019-10-11T20:35:09 | 214,522,983 | 0 | 0 | null | 2022-11-22T00:57:28 | 2019-10-11T20:25:01 | JavaScript | UTF-8 | Python | false | false | 5,971 | py | # coding=UTF-8
import uuid
from django.contrib import auth
from django.contrib.auth.models import User
from django.core.mail import EmailMessage
from django.core.urlresolvers import reverse_lazy, reverse
from django.db import IntegrityError
from django.utils import translation
from django.views import gener... | [
"dream.dev1025@gmail.com"
] | dream.dev1025@gmail.com |
c6f9d1f6513611b2c1ce51ef04e9ffe5ab592ed7 | c6431cdf572dd10f0f4d45839e6081124b246f90 | /code/recursion/lc369.py | 4a48bcf09c2d022b4d155040114b156c1c2f9738 | [] | no_license | bendanwwww/myleetcode | 1ec0285ea19a213bc629e0e12fb8748146e26d3d | 427846d2ad1578135ef92fd6549235f104f68998 | refs/heads/master | 2021-09-27T19:36:40.111456 | 2021-09-24T03:11:32 | 2021-09-24T03:11:32 | 232,493,899 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,207 | py | """
用一个 非空 单链表来表示一个非负整数,然后将这个整数加一。
你可以假设这个整数除了 0 本身,没有任何前导的 0。
这个整数的各个数位按照 高位在链表头部、低位在链表尾部 的顺序排列。
示例:
输入: [1,2,3]
输出: [1,2,4]
"""
# Definition for singly-linked list.
class ListNode(object):
def __init__(self, val=0, next=None):
self.val = val
self.next = next
def to_string(self):
nod... | [
"461806307@qq.com"
] | 461806307@qq.com |
714b8fdea517c38f78fe209abd5b44ce93b91e99 | 7869143d5e8bd9612c56fcf73ccc650ed0a82838 | /blog_website/blog_website/settings/pro.py | bda28e20130b91ef4c14f8d8e771bde294299b8f | [] | no_license | baifengbai/blog_website | ed1af89af8c1713f1c2047e907d307e45754d90b | 375d474435176931efd5e9925f3054184eb98ac8 | refs/heads/master | 2020-09-16T06:06:18.570387 | 2019-11-22T09:53:32 | 2019-11-22T09:53:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,650 | py | """
Django settings for blog_website project.
Generated by 'django-admin startproject' using Django 1.11.11.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
impo... | [
"ltfred@163.com"
] | ltfred@163.com |
e7a11c96cc7c49d3066bb780744024e07170a40b | 1625edfe28b4b0979fd32b4a3c5e55249a993fd5 | /baekjoon15663.py | fa5624e7a4e108eb06cab90ca413d9e169aee67e | [] | no_license | beOk91/baekjoon2 | b8bf504c506c6278899d4107ecfe51974ef13f5e | 39569f8effb8e32405a7d74d98bdabcab783ec56 | refs/heads/master | 2023-05-11T20:11:19.015113 | 2020-09-14T23:58:49 | 2020-09-14T23:58:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 810 | py | import sys
def f(limit,arr1,arr2):
if len(arr2)==limit:
result.add(" ".join(str(arr2[i]) for i in range(len(arr2))))
for i in range(len(arr1)):
if visited[i]:
visited[i]=False
f(limit,arr1,arr2+[arr1[i]])
visited[i]=True
n,m=map(int,sys.stdin.readline().strip... | [
"be_ok91@naver.com"
] | be_ok91@naver.com |
daf46d8ec1770da497b2c421eb664b4b9594c3d2 | ea1cf56e6308016768cdabe5ac29b4a8ead8d13d | /datumaro/datumaro/cli/commands/explain.py | 9b5a6432d65f029b96690261c728cb377161038a | [
"MIT"
] | permissive | onepanelio/cvat | b91da885697967050d3d5b643f03bc88c2406c1a | 09df20d1aa695e62587cc8be8c7fda804f9e9e18 | refs/heads/onepanel | 2021-11-19T09:48:23.092627 | 2021-03-15T18:05:35 | 2021-03-15T18:05:35 | 271,093,536 | 2 | 5 | MIT | 2021-03-15T18:05:36 | 2020-06-09T19:38:28 | Python | UTF-8 | Python | false | false | 7,662 | py |
# Copyright (C) 2019 Intel Corporation
#
# SPDX-License-Identifier: MIT
import argparse
import logging as log
import os
import os.path as osp
from datumaro.components.project import Project
from datumaro.util.command_targets import (TargetKinds, target_selector,
ProjectTarget, SourceTarget, ImageTarget, is_proje... | [
"40690625+nmanovic@users.noreply.github.com"
] | 40690625+nmanovic@users.noreply.github.com |
fe12b660a672abfeaea777674dfdfa3fc6edbce4 | 9abd182d02355ddf0b79afd4a35f7127a4a66f7a | /scripts/action-recognition/train_ddp_shortonly_pytorch.py | b49fb3342efc4103227df4df5fb7b68801dc0337 | [
"Apache-2.0"
] | permissive | dmlc/gluon-cv | e1303086419a5733661d0fcb9095c09d4f2382ad | 567775619f3b97d47e7c360748912a4fd883ff52 | refs/heads/master | 2023-07-19T12:02:36.824294 | 2023-01-19T00:37:33 | 2023-01-19T00:37:33 | 122,896,249 | 6,064 | 1,458 | Apache-2.0 | 2023-01-19T00:37:35 | 2018-02-26T01:33:21 | Python | UTF-8 | Python | false | false | 3,990 | py | import os
import argparse
import torch
import torch.nn as nn
import torch.distributed as dist
import torch.optim
from tensorboardX import SummaryWriter
from gluoncv.torch.model_zoo import get_model
from gluoncv.torch.data import build_dataloader
from gluoncv.torch.utils.model_utils import deploy_model, load_model, sa... | [
"noreply@github.com"
] | dmlc.noreply@github.com |
fd69940320899798e984f95de89ba844e1a7655b | 3ca6302ebdc0e47d5d462435ad24a2886cfa5063 | /59.py | 9a81fe3b82938f22f8e1d1d27d3f99173bc0639f | [] | no_license | Sem31/PythonBasics | 3859276820d484025d6c3d8f9efaf131b8626da8 | d9bfd520b67056a3cbb747f7a4b71fe55871c082 | refs/heads/master | 2020-04-24T19:09:48.608293 | 2019-02-23T10:56:26 | 2019-02-23T10:56:26 | 172,203,384 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 159 | py |
#mrhtod overloading in python
def collect(a, b=None):
if b==None:
return a
else:
return a+b
print(collect(2))
print(collect(2,5)) | [
"semprajapat31@gmail.com"
] | semprajapat31@gmail.com |
f5aaae375a6e33c0d0328e2c80899a9501ef5a2a | ad02587a87ec19658d6a53bcf2a2f5e92149e7f4 | /django-stubs/forms/forms.pyi | 8a8723e297c7be78804c3e20a6e1f6076756e86e | [
"BSD-3-Clause"
] | permissive | Naddiseo/django-stubs | 32a944617aea5b0e2dc3b8ad4dfd191b9ca6198b | cff5ab463c911283a9c43a26a38cb7bd4deebbd5 | refs/heads/master | 2020-04-18T05:01:40.832084 | 2019-01-22T17:13:31 | 2019-01-22T17:13:31 | 167,261,510 | 0 | 0 | BSD-3-Clause | 2019-01-23T22:06:15 | 2019-01-23T22:06:15 | null | UTF-8 | Python | false | false | 3,117 | pyi | from collections import OrderedDict
from datetime import date, datetime
from typing import Any, Dict, Iterator, List, Optional, Tuple, Type, Union
from django.core.exceptions import ValidationError
from django.core.files.uploadedfile import SimpleUploadedFile
from django.db.models.query import QuerySet
from django.for... | [
"maxim.kurnikov@gmail.com"
] | maxim.kurnikov@gmail.com |
02aabb8ce63d2fe702e0c4ecbb41e4d37cf047f2 | 90419da201cd4948a27d3612f0b482c68026c96f | /sdk/python/pulumi_azure_nextgen/keyvault/v20180214preview/outputs.py | 615c8dd32f8a6649d3873a5cf616a1cf19bf6fa8 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | test-wiz-sec/pulumi-azure-nextgen | cd4bee5d70cb0d332c04f16bb54e17d016d2adaf | 20a695af0d020b34b0f1c336e1b69702755174cc | refs/heads/master | 2023-06-08T02:35:52.639773 | 2020-11-06T22:39:06 | 2020-11-06T22:39:06 | 312,993,761 | 0 | 0 | Apache-2.0 | 2023-06-02T06:47:28 | 2020-11-15T09:04:00 | null | UTF-8 | Python | false | false | 18,320 | py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | [
"public@paulstack.co.uk"
] | public@paulstack.co.uk |
3ee55a6dcfd063cd71dd21e80ac6c57cf30afeb5 | a550aece79bda789826b463280b91abffbf2d372 | /books/python-3-oop-packt/Chapter8/8_23.1_basic_regex.py | 957ab14dab4b957226b26c608d2691601f747b8b | [
"MIT"
] | permissive | phiratio/learn_python | 20376470eaa292c157fd01f52b3077e3a983cd5a | a32240d4355fb331805d515f96e1d009914e5c47 | refs/heads/master | 2022-11-27T07:07:45.712373 | 2020-12-03T22:04:31 | 2020-12-03T22:04:31 | 189,397,679 | 1 | 0 | MIT | 2022-11-22T04:40:27 | 2019-05-30T10:56:10 | Python | UTF-8 | Python | false | false | 145 | py | import re
search_string = "hello world"
pattern = "hello world"
match = re.match(pattern, search_string)
if match:
print("regex matches")
| [
"phiratio161@gmail.com"
] | phiratio161@gmail.com |
bbb77e019ff503c5d530f757a7a5339b62bb7992 | 32c50dcb596477f124fd201b269b2c7ab3ba5f1f | /build/catkin_tools_prebuild/catkin_generated/generate_cached_setup.py | 636fe73c6dd4ea491e22ec9b160fbbe69be0d983 | [] | no_license | rahul0805/aerial_manipulator_prev | adea38156766ca49979b6332cf6302925cd57bc3 | 19d1dc99cdb6e73943f21faafeb7a5a05de80b6e | refs/heads/master | 2022-12-08T15:49:41.222588 | 2020-09-12T12:10:12 | 2020-09-12T12:10:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,353 | py | # -*- coding: utf-8 -*-
from __future__ import print_function
import argparse
import os
import stat
import sys
# find the import for catkin's python package - either from source space or from an installed underlay
if os.path.exists(os.path.join('/opt/ros/kinetic/share/catkin/cmake', 'catkinConfig.cmake.in')):
sys.... | [
"rahulswayampakula@gmail.com"
] | rahulswayampakula@gmail.com |
937ead90a5d60c7c876515a779f32f19b8aca066 | ebf16dcc0c09f27324c4ed965da7cee38933cf89 | /looking_glass.py | aff99a50b87bdd6f2e11612e26b5b6afb15c1482 | [] | no_license | doubledave/looking_glass | 45e5a4e56c9a2b5b76540695706b5a36233cf87e | da7e7cb2d87eb3e6330c765410b1028a3e3d6682 | refs/heads/master | 2020-12-29T12:00:07.325706 | 2020-02-03T13:48:51 | 2020-02-03T13:48:51 | 238,600,052 | 0 | 0 | null | 2020-02-06T06:41:29 | 2020-02-06T03:32:10 | null | UTF-8 | Python | false | false | 4,805 | py | class LookingGlass:
pass
class App(LookingGlass):
"""
A class for the main app
"""
def __init__(self):
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-v", "--verbose", help="The program will deliver all info that it thinks is helpful."
... | [
"tayjaybabee@gmail.com"
] | tayjaybabee@gmail.com |
c75b8bdef5d4fc0855ff471b209811b8d26d16bb | 3d4a6bd2297ac04b112bc8d24fa1118f692a4e2b | /procon_python/src/atcoder/corporate/B_CODEFESTIVAL2016_qualA.py | 758f7a0597c84131aad005d6a93ccb9a12ffe172 | [] | no_license | WAT36/procon_work | beba626d9b9c1effded8c9b9f56fbc37abd13636 | 2e6bc42e6f25938afe740682ad7b6c21a0838d42 | refs/heads/master | 2021-08-16T11:56:25.048392 | 2021-06-17T14:13:10 | 2021-06-17T14:13:10 | 162,991,707 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 134 | py | n=int(input())
a=list(map(int,input().split()))
ans=0
for i in range(n):
b=a[i]-1
if(i==a[b]-1):
ans+=1
print(ans//2)
| [
"motohari.xanadu@gmail.com"
] | motohari.xanadu@gmail.com |
e7ccabf1b81d2976d57b971794c32b42f061d0b6 | f18aecd7cd1a81b5bd57f75ddd7cc20e7f53d3e5 | /cirq/ops/parallel_gate_operation_test.py | 3f682a3f1ac330f8701a6de81f63f573e175458a | [
"Apache-2.0"
] | permissive | davemc84/Cirq | dfc2eac8b9d477c657e78a4f56e39c0eb827d1bd | 713e016d32be99efb0fd4d3e6dbe6d9ca8421271 | refs/heads/master | 2020-05-18T20:17:04.214482 | 2019-05-01T23:49:39 | 2019-05-01T23:49:38 | 173,470,170 | 0 | 0 | Apache-2.0 | 2019-03-27T16:51:50 | 2019-03-02T16:16:27 | Python | UTF-8 | Python | false | false | 5,878 | py | # Copyright 2018 The Cirq Developers
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | [
"craiggidney+github+cirqbot@google.com"
] | craiggidney+github+cirqbot@google.com |
b698c6d9868087a052879a48c04cf9dda73db63d | aaa85418696016fd883830d41738d5eec9da7c05 | /web_scraper/bs_basics..py | ce2bd1ba856c68e807b1da354ce075e25895b9f9 | [] | no_license | TimothyJao/pythonlearning | 1017a68f4320106f04fdb83b7c88a08eb6026236 | d00757bbf09788b6946b9a37468030e1dd1b592b | refs/heads/master | 2020-06-12T14:18:59.363288 | 2019-08-22T02:08:40 | 2019-08-22T02:08:40 | 194,326,961 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 893 | py | from bs4 import BeautifulSoup
html = """
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" class = "special">
<title>First HTML Page</title>
</head>
<body>
<div id = "first">
<h3 data-example="yes">hi</h3>
<p>more text.</p>
</div>
<ol>
<li class="special">This li... | [
"timothy.i.jao@gmail.com"
] | timothy.i.jao@gmail.com |
777ef8f9de3fe614519065ce38ab2faeb897ba46 | 8591dfcbff3bfc72d52c10159f8fe66a7a195ce1 | /Leetcode_solutions/Spiral Matrix.py | 1c6ad8d8ef2698f7373fb89b076d4643ed6f9fde | [] | no_license | morita657/Algorithms | 5f8fec78762ee98ca4e97de17ecf7cb184b8ebcb | 4272d2e9fa36c89952767bd9752f3ca9f1a48e0c | refs/heads/master | 2021-07-14T21:04:03.395411 | 2020-06-03T12:47:17 | 2020-06-03T12:47:17 | 142,182,034 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 663 | py | class Solution(object):
def spiralOrder(self, matrix):
if not matrix:
return []
R, C = len(matrix), len(matrix[0])
seen = [[False] * C for _ in matrix]
ans = []
dr = [0, 1, 0, -1]
dc = [1, 0, -1, 0]
r = c = di = 0
for _ in range(R * C):
... | [
"morita657@gmail.com"
] | morita657@gmail.com |
4d45701d67e9f2730f743e458644eeb5e4619b5c | 31f893e4477fa8245b2c661f75bcc5284093689b | /benchmarks/bench_compression.py | c3fa1c79975ad2e0253db14bc99806eb409d078b | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | cool-RR/joblib | cc7f6ba8b79bee835d684d3962cec785a15269dd | dfc11fea77a1e3b1830c940dd1fd8d6ffea49c09 | refs/heads/master | 2022-10-21T02:02:42.164717 | 2020-06-11T15:59:59 | 2020-06-11T15:59:59 | 271,653,200 | 1 | 0 | BSD-3-Clause | 2020-06-11T21:50:09 | 2020-06-11T21:50:08 | null | UTF-8 | Python | false | false | 8,562 | py | """Script comparing different pickling strategies."""
from joblib.numpy_pickle import NumpyPickler, NumpyUnpickler
from joblib.numpy_pickle_utils import BinaryZlibFile, BinaryGzipFile
from pickle import _Pickler, _Unpickler, Pickler, Unpickler
import numpy as np
import bz2
import lzma
import time
import io
import sys
... | [
"olivier.grisel@ensta.org"
] | olivier.grisel@ensta.org |
39d1fad9494b9de13df769adb2d5e2905a51f13a | 13f20d5a4c56b488c5200116c62fd6366cef45db | /AlgoExpert/Sorting/selection_sort.py | 0e7cc2cc4449a214589fe1230892c11b495c5a5e | [] | no_license | Pnickolas1/Code-Reps | 72dbbe9e372f50f6f6a4a300c50efd131f53d84c | 055d28847c6cc4740568df841498df232e286091 | refs/heads/master | 2022-06-04T04:25:49.041737 | 2022-03-28T02:07:15 | 2022-03-28T02:07:15 | 126,843,460 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 381 | py |
def swap(i, k, arr):
arr[i], arr[k] = arr[k], arr[i]
def selectionSort(arr):
currentIdx = 0
while currentIdx < len(arr) - 1:
smallestIdx = currentIdx
for i in range(currentIdx + 1, len(arr)):
if arr[smallestIdx] > arr[i]:
smallestIdx = i
swap(currentId... | [
"petertountas1@gmail.com"
] | petertountas1@gmail.com |
6e7fe296aafaa99233ccad140ebada1230bf2c43 | 05b90fbc4fae280f26a3c8a01cdea8ce1e337d18 | /full_text_search/fts/settings.py | f8ec87c7db84989d2d070477a5d6d2596867c920 | [] | no_license | lyyyuna/script_collection | b0cc8319923e7cf513ae64a084720bfc2694342c | 73621cee24f392e4c37b86776260d4607728843c | refs/heads/master | 2021-01-10T07:42:39.751792 | 2020-04-12T11:56:12 | 2020-04-12T11:56:12 | 48,746,558 | 9 | 5 | null | null | null | null | UTF-8 | Python | false | false | 3,235 | py | """
Django settings for fts project.
Generated by 'django-admin startproject' using Django 1.11.12.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import os
#... | [
"lyyyuna@gmail.com"
] | lyyyuna@gmail.com |
a24b5a26199e27308a77f774d9ad6e2a1e1ea815 | 181d68e9e4c89c3526fcecb57e0492ca29c24298 | /mpf/platforms/interfaces/switch_platform_interface.py | 712f36adc66f851a1d87493c4271060c510f2734 | [
"MIT",
"CC-BY-4.0"
] | permissive | ashanhol/mpf | f01b21e0a204f3d6f64b96112246bfeaad5381cf | b52f6f236a7713003cd4f064c8d1f0dab1bcd915 | refs/heads/dev | 2021-01-01T18:25:19.816611 | 2017-07-26T20:21:23 | 2017-07-26T20:21:23 | 97,981,205 | 0 | 0 | null | 2017-07-21T19:41:39 | 2017-07-21T19:41:39 | null | UTF-8 | Python | false | false | 719 | py | """Interface for switches."""
import abc
from typing import Any, TYPE_CHECKING
if TYPE_CHECKING: # pragma: no cover
from mpf.core.platform import SwitchConfig
class SwitchPlatformInterface(metaclass=abc.ABCMeta):
"""Interface for switches in hardware platforms.
SwitchPlatformInterface is an abstract ... | [
"jan-mpf@kantert.net"
] | jan-mpf@kantert.net |
d74ffe56d9b00bbe6134f10fd53c594f9e906dff | b8558ff95a25fac9d79a8d3a2fd3d9cb31924f2b | /classes.py | a87233e111c86baa27a553dae88bacc44bf06e5e | [] | no_license | dimka1993kh/AP_HW_7_12 | 4971083cb45ede3c3c6a3801c512bd6ab67bea54 | 14b311239b94c75c1c74fdbef5239a0bb3d1e77b | refs/heads/master | 2023-03-08T07:13:06.675997 | 2021-02-28T13:45:10 | 2021-02-28T13:45:10 | 343,115,532 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 442 | py | class Stack():
def __init__(self):
self.stack = []
def __str__(self):
return f'{self.stack}'
def isEmpty(self):
# print('self', self)
return self.stack == []
def push(self, input_object: str):
self.stack.append(input_object)
def pop(self):
retu... | [
"dimka1993kh@gmail.com"
] | dimka1993kh@gmail.com |
2a5472e9796436c23ec702e8be017dfb296d623d | 396b3046c70a871b7fe5efe668c7cfc3d02cdc73 | /EE-data-analysis/YKPK/KHJ_Sub/Main_Program/MetricCopy_outlier_deleting/Main/no_zero_value_copy_daily_onelist_binary_khj_ver0.1.py | a57be07f504899d449635a7ff5a37c3a0f84edc6 | [] | no_license | imbornagainer/Python_Project | 01e22532c7504d40534ff6217e91a8f44c53ab17 | 08332af7341846bceb7b410a2f59d7f51bba7d70 | refs/heads/master | 2021-05-12T06:15:40.793504 | 2018-02-26T02:26:45 | 2018-02-26T02:26:45 | 117,215,058 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 25,069 | py | # -*- coding: utf-8 -*-
# Author : hwijinkim , https://github.com/jeonghoonkang
# outlier를 제거하기 위한 class
# last modified by 20171031
# ver 0.2
# 1. 함수에서 직접 outlier log txt 파일명 설정 -> main의 변수에서 수정하도록 변경 (편의를 위하여)
import requests
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.uti... | [
"BePious@DESKTOP-MT17J3L"
] | BePious@DESKTOP-MT17J3L |
3cbbaf666ddfc145d11eb414d086b2947db91e57 | c8b9ecc9c702945f655383bc4492b7341fa4a363 | /social/migrations/0002_alter_post_created_on.py | 5097ab92f03f4475b61d1ba058afb9c834dee105 | [] | no_license | rcoffie/social | f81676523160500a9310143b19d1a91b6cb50086 | 946cb577bb043755d1e0ebcee58181ef9ab3a798 | refs/heads/master | 2023-08-25T19:15:57.102261 | 2021-10-22T14:34:11 | 2021-10-22T14:34:11 | 404,463,372 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 408 | py | # Generated by Django 3.2.5 on 2021-09-11 12:57
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('social', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='post',
name='created_o... | [
"rcoffie22@yahoo.com"
] | rcoffie22@yahoo.com |
dd1c46edcb33ec557b73a5e1fe06454eef49b9fa | c22f8aaae5d7d3942dbbbf80dac247837949941c | /qimg.py | be33b9b410954f6f09012a674aef73aa79087e06 | [] | no_license | caseyjlaw/misc | ba93bf08f03d0462abf43bbcfdfa82ea8006a28b | f7f7cec1fae27b801f84881598e643b1778516db | refs/heads/master | 2021-01-21T23:33:34.370429 | 2015-10-19T20:45:54 | 2015-10-19T20:45:54 | 39,525,738 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,869 | py | import numpy as n
def imgone(u, v, w, data, size, res):
# initial definitions
ndim = n.round(size/res)
uv = n.zeros((ndim,ndim), dtype='complex128')
# append hermition to get real image
u = n.concatenate([u, -u], axis=0)
v = n.concatenate([v, -v], axis=0)
w = n.concatenate([w, -w], axis=0... | [
"caseyjlaw@gmail.com"
] | caseyjlaw@gmail.com |
bee06ed18d3df6041f72b81f03520b9ede0b1457 | 8eff2593ef44b3bdb8dda8678eb051e58b4b5129 | /myenv/lib/python3.5/site-packages/pydocstyle/__main__.py | 05f0902515a9f14077ca851bc1e901a72e639a77 | [
"MIT"
] | permissive | rupeshparab/techscan | 08391c26c7916dd397527e1da8f91b4aa78bc96e | ce2558602ddad31873d7129f25b1cc61895b9939 | refs/heads/master | 2022-12-11T03:33:07.533280 | 2017-09-03T17:48:57 | 2017-09-03T17:48:57 | 102,280,759 | 1 | 1 | MIT | 2022-12-08T00:36:08 | 2017-09-03T17:11:16 | Python | UTF-8 | Python | false | false | 298 | py | #! /usr/bin/env python
"""Static analysis tool for checking docstring conventions and style.
The repository is located at:
http://github.com/PyCQA/pydocstyle
"""
__all__ = ()
def main():
from pydocstyle import cli
cli.main()
if __name__ == '__main__':
main()
| [
"rupeshparab.rp@gmail.com"
] | rupeshparab.rp@gmail.com |
a7ce1845c6327ec027667f364f25b1aacace2e28 | b21c8689805329556fb50b6a4d0e5befdbfc4893 | /petition/urls.py | 4645ebfcdeed8f3debeca3b91b6d37d8bb97dc62 | [
"MIT"
] | permissive | watchdogpolska/django-one-petition | fe7b12326fec99401d6ebd4c1883770598a7853b | 48364462c4649e9264b609f8168842637ca376ec | refs/heads/master | 2021-01-21T13:52:58.911329 | 2017-06-30T02:35:21 | 2017-06-30T02:35:21 | 34,549,133 | 1 | 0 | null | 2015-06-17T10:14:03 | 2015-04-25T00:49:00 | Python | UTF-8 | Python | false | false | 630 | py | from django.conf.urls import patterns, url
from . import views
urlpatterns = patterns('',
url(r'^$', views.SignatureCreate.as_view(), name="create"),
url(r'^new/$', views.SignatureList.as_view(), name='list'),
url(r'^(?P<slug>[\w-]+)/new/$', views.SignatureList.as_view(), name='list'),
url(r'^api/$', ... | [
"naczelnik@jawnosc.tk"
] | naczelnik@jawnosc.tk |
16caeea9f073551e9a9cb0c0b8ab55e15182ce2d | 98420fdd66b8dce46ef88cd34fcace36777fa232 | /obsolete/py/darknet/dg.py | 33595b4b0384540d72574a47e45ca9c0e870e6d5 | [] | no_license | Daiver/jff | f972fe7464f78ba6008a036b697ea3f04b7010a4 | 33d6a781af8d7f6ae60c25e10051977af2fef1b9 | refs/heads/master | 2023-04-07T06:33:41.487938 | 2022-05-03T10:07:32 | 2022-05-03T10:07:32 | 12,180,634 | 1 | 1 | null | 2023-04-03T19:25:00 | 2013-08-17T15:03:14 | C++ | UTF-8 | Python | false | false | 2,497 | py | #import pydht
import dht as pydht
import crawler
import collections
import sys
import time
def activate(dct, query):
key_words = query.lower().split()
score = collections.defaultdict(lambda : 0)
for word in key_words:
dt = None
try:
dt = dct[word]
except KeyError as e:
... | [
"ra22341@ya.ru"
] | ra22341@ya.ru |
df4d49dde3947266e8ebb7f0e868160de63a2c18 | 3ced55b04ec82df5257f0e3b500fba89ddf73a8a | /tests/ea/selection/selector/select/select_1/fixtures/above_average.py | 2a2b19218eb7b0dd0bf639eb5504c38af432ca70 | [
"MIT"
] | permissive | rdguerrerom/stk | 317282d22f5c4c99a1a8452023c490fd2f711357 | 1ac2ecbb5c9940fe49ce04cbf5603fd7538c475a | refs/heads/master | 2023-08-23T21:04:46.854062 | 2021-10-16T14:01:38 | 2021-10-16T14:01:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,666 | py | from __future__ import annotations
import pytest
from pytest_lazyfixture import lazy_fixture
import stk
from .utilities import get_rank_fitness
from ..case_data import CaseData
def get_topology_graph(num_repeating_units):
return stk.polymer.Linear(
building_blocks=(
stk.BuildingBlock('BrCCBr... | [
"noreply@github.com"
] | rdguerrerom.noreply@github.com |
901b94f87bdb8484047fb6f5b79f9725b7293a51 | 074bfaa20da52b46d0ba831dc8e031e82776d510 | /spider/stagetwo/parser/parser_manager.py | 994d4a9b86b858aba898f3ce3b2c2f9d6ff18bdf | [] | no_license | bovenson/mixoj | fc4e94dfbeb8fa49d7d5ffa62acd3f4e0a97ff9d | 4f3b1f8f20928004ee403e20a995f0b5b3c5b560 | refs/heads/master | 2021-04-03T06:18:47.401862 | 2018-03-14T03:34:24 | 2018-03-14T03:34:24 | 124,514,510 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,105 | py | # codding: utf-8
from spider.stagetwo.parser.poj.html_parser_poj import PojHtmlParser
from spider.stagetwo.parser.sgu.html_parser_sgu import SguHtmlParser
from spider.stagetwo.parser.uvalive.html_parser_uvalive import UVALiveHtmlParser
from spider.stagetwo.parser.zoj.html_parser_zoj import ZojHtmlParser
from spider.sta... | [
"szhkai@qq.com"
] | szhkai@qq.com |
16a7d064ca441dff28c5fb842491f4afbc7d4255 | 39de3097fb024c67a00c8d0e57c937d91f8b2cc9 | /Graph Modified/Graph III/1a. Rotten Oranges.py | 820a6835851a2081693290e39625c5437a84c945 | [] | no_license | srajsonu/InterviewBit-Solution-Python | 4f41da54c18b47db19c3c0ad0e5efa165bfd0cd0 | 6099a7b02ad0d71e08f936b7ac35fe035738c26f | refs/heads/master | 2023-03-07T05:49:15.597928 | 2021-02-24T18:20:07 | 2021-02-24T18:20:07 | 249,359,666 | 0 | 2 | null | 2020-10-06T10:54:07 | 2020-03-23T07:09:53 | Python | UTF-8 | Python | false | false | 1,683 | py | class Solution:
def find_root(self, A, parent):
if parent[A] == A:
return A
return self.find_root(parent[A], parent)
def union(self, A, B, parent, height):
C = self.find_root(A, parent)
D = self.find_root(B, parent)
if C == D:
return
if ... | [
"srajsonu02@gmail.com"
] | srajsonu02@gmail.com |
f486e32988e3bf7174ed756de0d4f6220e4c4070 | fc05249c73f910a4d36f471eb91e05256a64cdfe | /satellite/grb2nc.py | 1d9ef581caf151325ce2a962c7d8594c79a5068d | [] | no_license | rsoutelino/sandbox | f51b37619cd7a61a0446d83e2e1c2af58f14802a | 814d215582d8e14514ba93daf1b41f6d118b906c | refs/heads/master | 2023-03-02T12:05:18.703732 | 2023-03-02T01:58:15 | 2023-03-02T01:58:15 | 28,204,889 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 346 | py | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import os
import glob
################################################################################
filelist = glob.glob("*.grb")
filelist.sort()
for File in filelist:
print "Converting %s\n" %(File)
os.system("cdo -f nc copy %s %s.nc" %(File, File[:-4]))
o... | [
"rsoutelino@gmail.com"
] | rsoutelino@gmail.com |
4851b3bf708c9aaaa629a6e78a3d603824faa598 | faa1a9f8bfa60c6f3c1543ddf5c01ea8d6ec5898 | /FlareOn9-2022/07-anode/gen_recover_resource.py | b35fa1d58d7aeea1d41166a3099f73808f4e2edd | [] | no_license | LJP-TW/CTF | afe0873029072da256b591c96a0b2a97df6644b2 | f9c30cf270130120bfe4ddf957299fb60ddf8c27 | refs/heads/master | 2023-05-27T17:08:56.579815 | 2023-05-22T10:33:42 | 2023-05-22T10:33:42 | 123,657,738 | 30 | 5 | null | 2023-05-22T10:32:56 | 2018-03-03T04:08:05 | Smali | UTF-8 | Python | false | false | 3,404 | py | #!/usr/bin/env python3
import re
# https://stackoverflow.com/a/2556252
def rreplace(s, old, new, occurrence):
li = s.rsplit(old, occurrence)
return new.join(li)
def replace(s, old, new, occurrence):
li = s.split(old, occurrence)
return new.join(li)
with open('state_js_log', 'r') as f:
logs = f.re... | [
"accr94238@gmail.com"
] | accr94238@gmail.com |
9a635a5f9fa57be8eb1b0658cb72f55ef12f7fa7 | af669dbef653dd69474f4c0836582bf14262c80f | /price-test/mytest/lib/test_common/gen-py/dups_price_coupon/DupsPriceCoupon-remote | df41540476b24449dcdae21a7fb33629f5c36b3b | [] | no_license | siki320/fishtest | 7a3f91639d8d4cee624adc1d4d05563611b435e9 | 7c3f024192e1c48214b53bc45105bdf9e746a013 | refs/heads/master | 2021-01-19T21:58:36.807126 | 2017-04-19T09:56:37 | 2017-04-19T09:56:37 | 88,729,049 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,211 | #!/usr/bin/env python
#
# Autogenerated by Thrift Compiler (0.9.2)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
# options string: py
#
import sys
import pprint
from urlparse import urlparse
from thrift.transport import TTransport
from thrift.transport import TSocket
from thrift.transport imp... | [
"lisiqi_i@didichuxing.com"
] | lisiqi_i@didichuxing.com | |
a33b0444bbc644d6bbdf5818cfeccd6b14277cbc | 2f308a85c78608743be1ed928ad01a3b5421b4b3 | /google/cloud/recommendationengine_v1beta1/services/user_event_service/async_client.py | bbb39b177b287abad6b788e7570b653b2daeaf67 | [
"Apache-2.0"
] | permissive | renovate-bot/python-recommendations-ai | ace467779a78f12203ebeb3bf210394c2dc33d87 | 4d7b8542ff591bff55722ae8a170470f81100c34 | refs/heads/master | 2023-06-08T13:38:29.740780 | 2021-08-18T13:40:46 | 2021-08-18T13:40:46 | 247,178,188 | 1 | 0 | Apache-2.0 | 2020-03-13T23:24:42 | 2020-03-13T23:24:41 | null | UTF-8 | Python | false | false | 37,131 | py | # -*- coding: utf-8 -*-
# Copyright 2020 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"
] | renovate-bot.noreply@github.com |
67e44c00bd3f30dcf91b1b327b489b9ae1803fcc | cc578cec7c485e2c1060fd075ccc08eb18124345 | /cs15211/FizzBuzz.py | 80605946b31395458cca1de8ce5c642f736b3049 | [
"Apache-2.0"
] | permissive | JulyKikuAkita/PythonPrac | 18e36bfad934a6112f727b4906a5e4b784182354 | 0ba027d9b8bc7c80bc89ce2da3543ce7a49a403c | refs/heads/master | 2021-01-21T16:49:01.482561 | 2019-02-07T06:15:29 | 2019-02-07T06:15:29 | 91,907,704 | 1 | 1 | Apache-2.0 | 2019-02-07T06:15:30 | 2017-05-20T18:12:53 | Python | UTF-8 | Python | false | false | 2,405 | py | __source__ = 'https://leetcode.com/problems/fizz-buzz/'
# Time: O(N)
# Space: O(1)
#
# Description: Leetcode # 412. Fizz Buzz
#
# Write a program that outputs the string representation of numbers from 1 to n.
#
# But for multiples of three it should output "Fizz" instead of the number
# and for the multiples of five o... | [
"b92701105@gmail.com"
] | b92701105@gmail.com |
5dac0cfba23aa88136f57726be80fdae85b6810c | cd486d096d2c92751557f4a97a4ba81a9e6efebd | /16/addons/plugin.video.familyfunflix/default.py | a7b96ab5f2cb298e131f0153aabba4bca7613497 | [] | no_license | bopopescu/firestick-loader-kodi-data | 2f8cb72b9da67854b64aa76f720bdad6d4112926 | e4d7931d8f62c94f586786cd8580108b68d3aa40 | refs/heads/master | 2022-04-28T11:14:10.452251 | 2020-05-01T03:12:13 | 2020-05-01T03:12:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,403 | py |
#########################################
import sys
import httplib
import urllib, urllib2, cookielib, datetime, time, re, os, string
import xbmcplugin, xbmcgui, xbmcaddon, xbmcvfs, xbmc
import zlib,json,HTMLParser
h = HTMLParser.HTMLParser()
qp = urllib.quote_plus
uqp = urllib.unquote_plus
USER_AGENT = 'Mozilla/5... | [
"esc0rtd3w@gmail.com"
] | esc0rtd3w@gmail.com |
fc73730f326b489c5d2f699f9905f8e1c7aa77c7 | 99b6e08ddbbcf09c3b2a89a53c9616ff3fb59d08 | /affineKeyTest.py | 1ae6024828735fadbcbab5a7d82ac5c20865bf8d | [] | no_license | jakibbe/codebreaker | 8c758467875a30f247cc5cd7ccc47e9c2fcae0a1 | 1b642cc49ecee1806ee12709a5e15a796f34cd86 | refs/heads/master | 2021-01-17T14:36:05.782243 | 2013-03-03T22:20:25 | 2013-03-03T22:20:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 427 | py | # This program proves that the keyspace of the affine cipher is limited
# to len(SYMBOLS) ^ 2.
import affineCipher, cryptomath
message = 'Make things as simple as possible, but not simpler.'
for keyA in range(2, len(affineCipher.SYMBOLS) + 5):
key = keyA * len(affineCipher.SYMBOLS) + 1
if cryptomath... | [
"asweigart@gmail.com"
] | asweigart@gmail.com |
49352a3f14cd6d94cc0461a25d8af8ddfb1c0590 | 2e682fd72e3feaa70e3f7bf2a3b83c50d783ec02 | /PyTorch/built-in/cv/classification/Resnet50_Cifar_for_PyTorch/configs/_base_/models/resnext101_32x8d.py | 36dea04ddd1bd5eb7c4348aff824a52efff4e5f1 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-unknown-license-reference",
"GPL-1.0-or-later",
"LicenseRef-scancode-warranty-disclaimer"
] | 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 | 1,056 | py | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# Unless required by applicable law or agreed to in ... | [
"wangjiangben@huawei.com"
] | wangjiangben@huawei.com |
055429d3be23a736d5ee87eddef6d201e5d2ad75 | ef3ac69163c04363f566e0e482ae5eefed66f27c | /325-Algorithms/project4/colony.py | 18d8b96cf6cf99b79920b9a9e979cc900cd984d9 | [
"Unlicense"
] | permissive | neale/CS-program | d173a37e07d2a5c5e30021a9871dfe0b0c32f8e5 | 6fef9c39579143bde0ab5d1ec5fedc7210e55814 | refs/heads/master | 2021-01-11T03:05:41.149213 | 2017-05-31T19:10:13 | 2017-05-31T19:10:13 | 33,842,635 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,365 | py | from ant import Ant
from threading import Lock, Condition
import random
import sys
class Colony:
def __init__(self, graph, num_nodes, num_iterations):
self.graph = graph
self.num_ants = num_ants
self.num_iterations = num_iterations
self.alpha = .1
# condition var
... | [
"nealeratzlaff@gmail.com"
] | nealeratzlaff@gmail.com |
9ea649175498af7a2b0e97a3fa3b4151c5598158 | 99701affb7ae46c42c55484f3301d59f79294a10 | /project/Examples/Examples/PP2E/System/Streams/teststreams.py | 6aa70f5275743f95cd61c08b065f1281ec65edfb | [] | no_license | inteljack/EL6183-Digital-Signal-Processing-Lab-2015-Fall | 1050b9e9bddb335bf42b7debf2abebe51dd9f9e0 | 0f650a97d8fbaa576142e5bb1745f136b027bc73 | refs/heads/master | 2021-01-21T21:48:21.326372 | 2016-04-06T20:05:19 | 2016-04-06T20:05:19 | 42,902,523 | 7 | 1 | null | null | null | null | UTF-8 | Python | false | false | 631 | py | # read numbers till eof and show squares
def interact():
print 'Hello stream world' # print sends to sys.stdout
while 1:
try:
reply = raw_input('Enter a number>') # raw_input reads sys.stdin
except EOFError:
break ... | [
"inteljack2008@gmail.com"
] | inteljack2008@gmail.com |
d54fea6f57a41597a6423652fb1c0507310f9c5d | 5c484d9ecd194ad31555303aff004b739fc6b564 | /workers/persisters/tasks/__init__.py | a9fc9472f24d29cf39e088db759744cbe646e3ba | [] | no_license | bloogrox/hasoffers-kpi | 15b82c9287fc4a62e14e4b637c3d57d03db54233 | 227472f0090856048d1fdb0591ffbb15b575a311 | refs/heads/master | 2021-01-01T17:31:14.448122 | 2017-11-08T16:26:40 | 2017-11-08T16:26:40 | 98,095,120 | 0 | 1 | null | 2017-08-12T11:43:31 | 2017-07-23T12:05:31 | Python | UTF-8 | Python | false | false | 161 | py | from .persist_affiliate_cap import persist_affiliate_cap # noqa
from .persist_goal import persist_goal # noqa
from .persist_offer import persist_offer # noqa
| [
"bloogrox@gmail.com"
] | bloogrox@gmail.com |
06052b50e80296f472e601237dd187b54afd825a | 548c26cc8e68c3116cecaf7e5cd9aadca7608318 | /migration/models.py | a37d2adc09b3be74eb8b7f027da990147c7f8a2d | [] | no_license | Morphnus-IT-Solutions/riba | b69ecebf110b91b699947b904873e9870385e481 | 90ff42dfe9c693265998d3182b0d672667de5123 | refs/heads/master | 2021-01-13T02:18:42.248642 | 2012-09-06T18:20:26 | 2012-09-06T18:20:26 | 4,067,896 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 596 | py | from django.db import models
# Create your models here.
class DuplicateUsers(models.Model):
duplicate = models.PositiveIntegerField()
original = models.PositiveIntegerField()
class AccountUserMap(models.Model):
account = models.ForeignKey('accounts.Account')
user_id = models.PositiveIntegerField()
... | [
"dalal.saumil@gmail.com"
] | dalal.saumil@gmail.com |
f1bcfe2485265dcb757ce92b57c9c56bf90a9b00 | 181bd8080f208751046b087c1178532c3c7df70e | /demos/upload/eigenvalue/PageRank.py | 8219ca31787337b81863031234e87553442e2e64 | [] | no_license | ChaoWang00/cs450-f20-demos | 2b79e6fa8e1a0b8253e6ca2ce608952ebeeb7770 | 8ac45edd8ac0fc7a801b817c94369de30ee755bb | refs/heads/master | 2022-12-26T00:08:05.243805 | 2020-10-05T19:39:06 | 2020-10-05T19:39:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,834 | py | #!/usr/bin/env python
# coding: utf-8
# In[11]:
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
sns.set_context('talk')
# In[12]:
A = np.array([[0.8, 0.6, 0.8],
[0.2, 0.3, 0.0],
[0.0, 0.1, 0.2]])
# In[13]:
v = np.random.rand(3)
v = v / np.linalg.norm(v,1)
... | [
"luke.olson@gmail.com"
] | luke.olson@gmail.com |
70e616e6ae98dde47a25d28671778c853ae44f51 | c168fe819b446640957e5e310ef89fcfe28662b3 | /userbenchmark/functorch/simple_models.py | 5176766d4acbc3db7c8861bbe6aac60094b55e86 | [
"BSD-3-Clause"
] | permissive | pytorch/benchmark | 7b55e8d714de2ea873e03df43811aab3848485dd | df4da9bdff11a2f948d5bd4ac83da7922e6f44f4 | refs/heads/main | 2023-08-29T13:06:09.671728 | 2023-08-28T16:51:55 | 2023-08-28T16:51:55 | 92,541,759 | 685 | 220 | BSD-3-Clause | 2023-09-14T18:10:18 | 2017-05-26T19:21:12 | Python | UTF-8 | Python | false | false | 4,320 | py | import torch
import torch.nn as nn
import torch.nn.functional as F
from functorch import vmap, grad, combine_state_for_ensemble, make_functional_with_buffers
import functools
from .util import BenchmarkCase
class SimpleMLP(nn.Module):
def __init__(self):
super(SimpleMLP, self).__init__()
self.fc1... | [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
89585fb506830e4da0213763bdccf2c325893f60 | fd529ba6ade52cd2a3dab94da01252d7ea90398d | /zerojudge/e948.py | e8c44c64ee0d3761a9410e143551e2cfbf5c5f99 | [] | no_license | fjfhfjfjgishbrk/AE401-Python | 4a984deb0281542c205d72695285b35c7413338f | ee80fa4588b127cff2402fd81e732ede28a66411 | refs/heads/master | 2022-06-13T13:49:39.875567 | 2022-05-28T12:40:51 | 2022-05-28T12:40:51 | 251,178,163 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 435 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri May 15 10:51 2020
@author: fdbfvuie
"""
import sys
n = sys.stdin.readlines()
try:
a = int(n[0].strip())
except:
n = n[0].strip().split("\r")
for i in range(int(n[0].strip())):
g, a, h, w = map(int, n[i + 1].strip().split())
if g == 1:
... | [
"59891511+fjfhfjfjgishbrk@users.noreply.github.com"
] | 59891511+fjfhfjfjgishbrk@users.noreply.github.com |
8e52b6edcad2e02ebadbc084648dd24036620b57 | 8830831a87f35ff2628f379d8230928ec6b5641a | /Santander/code/rank_avg_blend.py | fd306ed22d4b1b66e01e0cce42198a6d90979759 | [] | no_license | nickmcadden/Kaggle | e5882c9d68a81700d8d969328d91c059a0643868 | cbc5347dec90e4bf64d4dbaf28b8ffb362efc64f | refs/heads/master | 2019-07-18T08:09:40.683168 | 2018-01-26T14:35:38 | 2018-01-26T14:35:38 | 40,735,982 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,689 | py | import sys
import pandas as pd
import numpy as np
import scipy as sp
import xgboost as xgb
import data
import argparse
import pickle as pkl
from scipy import stats
from collections import OrderedDict
from sklearn.utils import shuffle
from sklearn.cross_validation import StratifiedShuffleSplit, KFold
from sklearn.ensemb... | [
"nmcadden@globalpersonals.co.uk"
] | nmcadden@globalpersonals.co.uk |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.