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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8b7d0a3296d50691cf8a0cffe573214b9f553a5d | f68afe06e4bbf3d523584852063e767e53441b2b | /Toontown/toontown/coghq/CogHQExterior.py | 07ead6fdae6591c90c12eaf8a283850ce41ffca2 | [] | no_license | DankMickey/Toontown-Offline-Squirting-Flower-Modded- | eb18908e7a35a5f7fc95871814207858b94e2600 | 384754c6d97950468bb62ddd8961c564097673a9 | refs/heads/master | 2021-01-19T17:53:36.591832 | 2017-01-15T02:00:04 | 2017-01-15T02:00:04 | 34,639,744 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,228 | py | from direct.directnotify import DirectNotifyGlobal
from toontown.battle import BattlePlace
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from toontown.toonbase import ToontownGlobals
from pandac.PandaModules import *
from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs
f... | [
"jareddarty96@gmail.com"
] | jareddarty96@gmail.com |
31fdae76ee89f60e923d6125f8b0c0979a77f28c | d5b48163d236ca770be8e687f92192e2971397e8 | /d2.py | f4cf2b96e37d9a200f82ba75ba05811c122464ae | [] | no_license | Kunal352000/python_program | 191f5d9c82980eb706e11457c2b5af54b0d2ae95 | 7a1c645f9eab87cc45a593955dcb61b35e2ce434 | refs/heads/main | 2023-07-12T19:06:19.121741 | 2021-08-21T11:58:41 | 2021-08-21T11:58:41 | 376,606,535 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 197 | py | str=input("Enter your string: ").casefold()
dic={}
for ch in str:
if ch in dic:
dic[ch]=dic[ch]+1
else:
dic[ch]=1
for i in dic:
print(i,":",dic[i])
| [
"noreply@github.com"
] | Kunal352000.noreply@github.com |
d8030447090aa7eec30c37b4ae3f45b0fd8aeb50 | 60c4255fb0cf7ed817ff09d8113bf404cde8e12b | /env/lib/python2.7/site-packages/django/conf/locale/sv/formats.py | 98efdf170c00c4b092105bb360b3f70f4e8332e7 | [] | no_license | adamjberg/finna-be-octo-ninja | 83aba13f619d4fbfb5308e48336917f0ada0459d | cf16bfcb3d7bb4e878ba0b99ad701b5cda8be34c | refs/heads/master | 2021-01-10T20:19:20.849476 | 2014-01-11T05:42:23 | 2014-01-11T05:42:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,428 | py | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F Y'
TIME_FORMAT = 'H:i... | [
"ilikecattle@gmail.com"
] | ilikecattle@gmail.com |
327ba90dccd54195e75cd71f17b040212a27108f | f5863cf378bce80d3aa459941dff79ea3c8adf5d | /Leetcode/80.Remove_Duplicates_from_Sorted_Array_II.py | ed2977219a1a145be0cf2b19d26cfb295afc768f | [] | no_license | Taeg92/Problem_solving | 815c13ae7895708948482eeb05411322be00ac12 | 15c0fe0eda4f77d974451777cb01d10882d8aaa9 | refs/heads/master | 2021-11-18T22:03:21.727840 | 2021-09-06T14:21:09 | 2021-09-06T14:21:09 | 235,335,532 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 399 | py | class Solution(object):
def removeDuplicates(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
idx = 0
for num in nums:
if idx < 2 or num != nums[idx-2]:
nums[idx] = num
idx = idx + 1
return idx
nums = [1, 1... | [
"gtg92t@gmail.com"
] | gtg92t@gmail.com |
f567892b375898d2f9e2c1370a515b0984a11f34 | f0987e17aea6668158cd334c1fbacfe6286d3c77 | /NITA/lib/jnpr/toby/tmp/RLI/RLI-27K/RLI-27608/Apps/fw_ms_filter_length.py | f3ef23b3af736df13fa3dd6599bba08b7ddaf50c | [] | no_license | fengyun4623/file | 00bf21f952ea3f95ffc9fe18448b244b26b7fadb | 3966c63d48557b0b94303896eed7a767593a4832 | refs/heads/master | 2023-04-02T05:01:25.066052 | 2020-07-29T16:15:31 | 2020-07-29T16:15:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,259 | py | import sys,time,os,argparse
from grpc.beta import implementations
import firewall_service_pb2,jnx_addr_pb2,authentication_service_pb2
from firewall_service_pb2 import *
from jnx_addr_pb2 import *
from authentication_service_pb2 import *
from grpc.framework.interfaces.face.face import *
parser = argparse.ArgumentParser... | [
"srigupta@juniper.net"
] | srigupta@juniper.net |
8ae65a6c0f57089c39e0396a9ff9bfa5bed30b79 | 16daab90ef28ada0e3efc4d38f8c4d62df30c43f | /Speaker-Verification/dataloader.py | 590e3aacc8790eed435482c97ef137b2577d717b | [] | no_license | AntoniaLovjer/adversarial_robustness_audio | 7ba60a0bdf50ed428eecdbc3a2adbbf583129877 | 34ffecaf73332698fccb0d90d2932dde09cc77a5 | refs/heads/master | 2020-09-22T12:16:54.420697 | 2019-12-02T14:22:38 | 2019-12-02T14:22:38 | 225,189,551 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,195 | py | import os
import re
from glob import glob
import torch
import pandas as pd
WORDS = 'yes no up down left right on off stop go silence unknown'.split()
id2name = {i: name for i, name in enumerate(WORDS)}
name2id = {name: i for i, name in id2name.items()}
def load_data(data_dir):
""" Return 2 lists of tuples:
[(... | [
"google-dl-platform@googlegroups.com"
] | google-dl-platform@googlegroups.com |
8c757e728d9b1d70c2a7f43d7d50e4cad5895c90 | 255e19ddc1bcde0d3d4fe70e01cec9bb724979c9 | /dockerized-gists/7485132/snippet.py | eecd6e2d90eb2489e1c6d00d27db4c3719557144 | [
"MIT"
] | permissive | gistable/gistable | 26c1e909928ec463026811f69b61619b62f14721 | 665d39a2bd82543d5196555f0801ef8fd4a3ee48 | refs/heads/master | 2023-02-17T21:33:55.558398 | 2023-02-11T18:20:10 | 2023-02-11T18:20:10 | 119,861,038 | 76 | 19 | null | 2020-07-26T03:14:55 | 2018-02-01T16:19:24 | Python | UTF-8 | Python | false | false | 1,920 | py | """
The Pool module provides some classes for managing a fixed-size thread-safe pool of functionally identical objects. One use for this is database connections, which tend to take awhile to create.
Pool
class that manages the pool of objects.
Constructor
class used to create new instances of items in the Pool.
For ... | [
"gistshub@gmail.com"
] | gistshub@gmail.com |
cd337e0d2b894589f48c3ec1e73609dc98c7cf3a | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/response/AlipayCommerceKidsRelationQueryResponse.py | 2e7bc0d8e1af57db2e86b5335fa2c3b97ab35b64 | [
"Apache-2.0"
] | permissive | alipay/alipay-sdk-python-all | 8bd20882852ffeb70a6e929038bf88ff1d1eff1c | 1fad300587c9e7e099747305ba9077d4cd7afde9 | refs/heads/master | 2023-08-27T21:35:01.778771 | 2023-08-23T07:12:26 | 2023-08-23T07:12:26 | 133,338,689 | 247 | 70 | Apache-2.0 | 2023-04-25T04:54:02 | 2018-05-14T09:40:54 | Python | UTF-8 | Python | false | false | 1,091 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
from alipay.aop.api.domain.UserInfoVO import UserInfoVO
class AlipayCommerceKidsRelationQueryResponse(AlipayResponse):
def __init__(self):
super(AlipayCommerceKidsRelationQueryResp... | [
"jiandong.jd@antfin.com"
] | jiandong.jd@antfin.com |
6d1f6f15112b1fc0a2a3b86385e1f8c6d9ccc2c6 | c94914207f9a3918d0cd09807a101e81a8e7d9a8 | /Finance/Project Alpha/ProjectAlpha/risk.py | d757e8ef74c1c99631a212d1c47fd4a172fc535c | [] | no_license | matthewmercuri/codedeposit | eb8265d6219284ee75cba2e1abf50f1b0ef17a09 | f51d3b1bdacec96af699bc8feb993f6ed60f772c | refs/heads/main | 2023-06-10T21:27:42.550236 | 2021-07-08T20:57:53 | 2021-07-08T20:57:53 | 373,534,219 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,442 | py | import numpy as np
''' Ideally, we would want to put these metrics in a df
or database with the return series of the portfolio. How
would this translate to when we use these metrics to backtest
a portfolio that trades?
- want to figure out a way where we can just pass the history
to any one method and have a result o... | [
"mercurimatthew@gmail.com"
] | mercurimatthew@gmail.com |
a5cfaddec32dede10839f846563eaef3853c4601 | 4e5141121d8b4015db233cbc71946ec3cfbe5fe6 | /samples/basic/crud/gnmi/models/cisco-ios-xr/Cisco-IOS-XR-ifmgr-cfg/gn-create-xr-ifmgr-cfg-34-ydk.py | a3abe62056bc1ac1ba680e56c1d574ac69b5d763 | [
"Apache-2.0"
] | permissive | itbj/ydk-py-samples | 898c6c9bad9d6f8072892300d42633d82ec38368 | c5834091da0ebedbb11af7bbf780f268aad7040b | refs/heads/master | 2022-11-20T17:44:58.844428 | 2020-07-25T06:18:02 | 2020-07-25T06:18:02 | 282,382,442 | 1 | 0 | null | 2020-07-25T06:04:51 | 2020-07-25T06:04:50 | null | UTF-8 | Python | false | false | 3,721 | py | #!/usr/bin/env python
#
# Copyright 2016 Cisco Systems, Inc.
#
# 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 applicab... | [
"deom119@gmail.com"
] | deom119@gmail.com |
44d1bb63f6fb5cac8e01d44a916c0761f1f59078 | d58bc2475a41e7c36e22947565c099908f84cfd6 | /samples/openapi3/client/petstore/python-experimental/petstore_api/paths/user_logout/get.py | c8a52c7734766188dde2478208cb0fdeff83f8cb | [
"Apache-2.0"
] | permissive | yaronius/openapi-generator | d8390dc2cfd9330d3f05a1f517612d793e332ead | 9f3fac53c1689b82bf4c99b664e10e4a5decfb8e | refs/heads/master | 2022-11-03T02:27:44.670087 | 2022-08-17T12:17:30 | 2022-08-17T12:17:30 | 175,407,506 | 0 | 0 | Apache-2.0 | 2023-09-04T20:41:29 | 2019-03-13T11:30:05 | Java | UTF-8 | Python | false | false | 4,404 | py | # coding: utf-8
"""
Generated by: https://openapi-generator.tech
"""
from dataclasses import dataclass
import re # noqa: F401
import sys # noqa: F401
import typing
import urllib3
import functools # noqa: F401
from petstore_api import api_client, exceptions
import decimal # noqa: F401
from datetime import d... | [
"noreply@github.com"
] | yaronius.noreply@github.com |
6136bbbbebc5bb771fd00b992c25ef41855cd34d | c3d5dcf3c18e0e652d81cdf2edb87bdc0e3f2c72 | /user/models.py | 1978c2d4f31c9d846418bad20d246153683fb04f | [] | no_license | webclinic017/easy_ledger | bc6743e4826d6d67d2d2b7f38476760077b2c7c3 | 9e85a726000cc54fc77d368a48a828a716664c07 | refs/heads/main | 2023-04-10T09:11:15.530056 | 2021-04-23T09:35:14 | 2021-04-23T09:35:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 988 | py | from django.db import models
from django.contrib.auth.models import AbstractUser
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
class User(AbstractUser):
username = models.CharField(max_length=200, blank=True, null=True)
email = models.EmailField(_('email address'), u... | [
"ppark9553@gmail.com"
] | ppark9553@gmail.com |
91fc770e5872a64b5c1af1537736fd0d19afceae | 28024c936d258d56e3c02bfda44204fab8f32964 | /client/dvaclient/constants.py | a156927b6d8fd9bd73732cbd03f6105d087656ee | [
"BSD-3-Clause",
"MIT",
"Apache-2.0"
] | permissive | skgone/DeepVideoAnalytics | c1db730af253a2ec3acb9c7e6cce82d3264b72f2 | 6897dd92feed23af974dbcb7b5f0d2a9377f66b2 | refs/heads/master | 2021-07-01T01:36:07.086632 | 2020-09-20T10:07:26 | 2020-09-20T10:07:26 | 137,233,795 | 0 | 0 | null | 2018-06-13T15:19:50 | 2018-06-13T15:19:49 | null | UTF-8 | Python | false | false | 443 | py | SCHEDULE = 'S'
PROCESS = 'V'
QUERY = 'Q'
DETECTION = 'D'
INDEXING = 'I'
TRAINAPPROX = 'A'
CLASSIFICATION = 'C'
IMAGES = 'I'
VIDEOS = 'V'
INDEX = 'X'
TENSORFLOW = 'T'
CAFFE = 'C'
PYTORCH = 'P'
OPENCV = 'O'
MXNET = 'M'
INDEXER = 'I'
APPROXIMATOR = 'P'
DETECTOR = 'D'
ANALYZER = 'A'
SEGMENTER = 'S'
YOLO = "Y"
TFD = "T"
EXA... | [
"akshayubhat@gmail.com"
] | akshayubhat@gmail.com |
a6c4d1ea49aea7407ef9c59364ed2480517c29ca | b170bd640f7259d641008a974a59ae7111788ca1 | /dcgan.py | 461d9841337d1f2a6656215a573991491876b815 | [] | no_license | kant/chainer-dcgan | b75522fd09a3e4936d68e175318dfedb6e574480 | 20062e3e6c1156857363ea0ed3cfe4abd63b2a8c | refs/heads/master | 2020-04-26T05:37:14.165650 | 2017-09-14T09:17:01 | 2017-09-14T09:17:01 | 173,340,366 | 0 | 0 | null | 2019-03-01T17:14:22 | 2019-03-01T17:14:21 | null | UTF-8 | Python | false | false | 4,667 | py | # -*- coding: utf-8 -*-
from __future__ import print_function
import argparse
import os
import chainer
from chainer import training
from chainer.training import extensions
from net import Discriminator
from net import Generator
from updater import DCGANUpdater
from visualize import out_generated_image
def main():
... | [
"ytkmkw@gmail.com"
] | ytkmkw@gmail.com |
fe77dea5d4d477345bc22432f871ea702b083913 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03106/s992142201.py | 9c7161f9a8277d4dc2ac8882018659d1ef28d852 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 143 | py | a,b,k=map(int,input().split())
Min=min(a,b)
l=[]
for i in range(Min,0,-1):
if a%i==0 and b%i==0:
l.append(i)
#print(l)
print(l[k-1]) | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
e25a8b7a032e5d796003b9abe21a15a6d1a72cc6 | 3141eceaae7509301a125e10c5ba4ec4c24b6412 | /pydruid/db/sqlalchemy.py | 9ac51f822a4441fd3639443b990874982ba159e5 | [
"Apache-2.0"
] | permissive | isabella232/pydruid_DEPRECATED | a6959112709845632d51976661bb7358efc227c7 | 471bc21308f98a7f9d245e2ea76e54892bd0b805 | refs/heads/lyft | 2023-03-11T08:29:49.961290 | 2020-10-09T19:17:20 | 2020-10-09T19:17:20 | 315,906,418 | 0 | 0 | NOASSERTION | 2021-02-23T18:56:22 | 2020-11-25T10:36:33 | null | UTF-8 | Python | false | false | 7,412 | py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from sqlalchemy.engine import default
from sqlalchemy.sql import compiler
from sqlalchemy import types
import pydruid.db
from pydruid.db import exceptions
RESERVED_SCH... | [
"maximebeauchemin@gmail.com"
] | maximebeauchemin@gmail.com |
21641b139d3431097cf789c444bfd4c467e6ebe1 | 20d1bf9505929948f3fc50040e1471baadbe0351 | /keras_frcnn/muscima_annotation_generator.py | 708bb5917465720f3738e2e50da596878874f90b | [
"MIT"
] | permissive | JuanuMusic/MusicObjectDetector | 1d1c57508196fe66f8a3a4acb4ef3ea28f652510 | 0382c36fa4b4ac29d80980204b0710a5af3c0bad | refs/heads/master | 2021-09-02T07:27:06.277597 | 2017-12-31T12:54:44 | 2017-12-31T12:54:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,787 | py | import os
from itertools import groupby
from lxml import etree
from typing import List, Tuple
from lxml.etree import Element, SubElement
def create_annotations_in_plain_format(exported_annotations_file_path: str, objects_appearing_in_cropped_image: List[
Tuple[str, str, Tuple[int, int, int, int]]]):
with ope... | [
"alexander.pacha@gmail.com"
] | alexander.pacha@gmail.com |
f22791718a15c54fba750f4dd80a0d6972ecc52f | 077f29021738c3b577c7c3d9ef5851d76e93cbed | /demo/assignments/days_between.py | bff4dffec1b0f26912c3685b986474e7419edc8c | [] | no_license | srikanthpragada/PYTHON_10_JULY_2020 | fb410d87260eb290ebcc5ac6a88b6d6b01ee15b5 | b7a586cbcd49934d36facb4dd748c54038838334 | refs/heads/master | 2022-12-05T09:05:33.192365 | 2020-08-26T14:27:09 | 2020-08-26T14:27:09 | 279,319,937 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 695 | py | from datetime import datetime, date
file = open("dates.txt", "rt")
dates = []
for line in file:
parts = line.strip().split(",")
try:
if len(parts) == 2:
fd = datetime.strptime(parts[0], "%d-%m-%Y")
sd = datetime.strptime(parts[1], "%d-%m-%Y")
elif len(parts) == 1:
... | [
"srikanthpragada@gmail.com"
] | srikanthpragada@gmail.com |
32369f6c433f82f5061430fab8e40f62b23a08e0 | 7deda84f7a280f5a0ee69b98c6a6e7a2225dab24 | /KBL/migrations/0009_auto_20200514_1542.py | 3b32eeb87339f7dfb830c0485a45742ab4d6c936 | [] | no_license | Cornex-Inc/Coffee | 476e30f29412373fb847b2d518331e6c6b9fdbbf | fcd86f20152e2b0905f223ff0e40b1881db634cf | refs/heads/master | 2023-01-13T01:56:52.755527 | 2020-06-08T02:59:18 | 2020-06-08T02:59:18 | 240,187,025 | 0 | 0 | null | 2023-01-05T23:58:52 | 2020-02-13T05:47:41 | Python | UTF-8 | Python | false | false | 444 | py | # Generated by Django 2.1.15 on 2020-05-14 15:42
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('KBL', '0008_customer_company_date_establishment'),
]
operations = [
migrations.AlterField(
model_name='customer_company',
... | [
"khm4321@naver.com"
] | khm4321@naver.com |
01de42efe5caf477e9a65304c3a50ec28a367993 | 9b8b2b867379d04bdd2568bfd211f456401ce702 | /LogisticandSVM.py | ceaef98d4cbe1b3622d090e09ed77873dda733fb | [] | no_license | bhatnagaranshika02/Machine-Learning-Practice | fb246ba5bac20aae18c58a7f58b529c63fd09bdd | 7790bb624d467c221749c7a16f4e2486668e6dbe | refs/heads/master | 2022-11-19T09:27:52.848116 | 2020-07-20T21:08:16 | 2020-07-20T21:08:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 386 | py | from sklearn import datasets
digits=datasets.load_digits()
X_train,x_test,Y_train,y_test=train_test_split(digits.data,digits.target)
lr = LogisticRegression()
lr.fit(X_train, y_train)
print(lr.score(X_train, y_train))
print(lr.score(X_test, y_test))
# Apply SVM and print scores
svm = SVC()
svm.fit(X_train, y_train)
pr... | [
"bhatnagaranshika02@gmail.com"
] | bhatnagaranshika02@gmail.com |
6c730c4a0976bf8d2ad2c79816467ea1a0eff151 | 090324db0c04d8c30ad6688547cfea47858bf3af | /soko/struct/glue.py | 821c9fd3e606fc467d0a40edc857959287d960d6 | [] | no_license | fidlej/sokobot | b82c4c36d73e224d0d0e1635021ca04485da589e | d3d04753a5043e6a22dafd132fa633d8bc66b9ea | refs/heads/master | 2021-01-21T13:14:29.523501 | 2011-06-12T07:34:14 | 2011-06-12T07:34:14 | 32,650,745 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 901 | py |
from soko.env.env import Env
from soko.struct.expanders.pushexpander import PushExpander
from soko.struct.estimators import sokoestimator
from soko.struct import modeling
class EnvGlue(Env):
def __init__(self, maze):
self.maze = maze
def configure(self, config):
#TODO: allow to use different ... | [
"ivo@danihelka.net"
] | ivo@danihelka.net |
e5abebf008390550a580703fa551688a1b0449eb | 6eec2948c0907b5377de51e61014a48dff3d5ce7 | /cairo2/arcos.py | 4c1d2659d7d0e1656107dd73408a3a525d35e77a | [] | no_license | clcneogeek325/Script_python | 4da937cb2caee93a2e0eb945e77ccac8e88ec4bc | 87607c97fa738b3e64aefbe0e8c4425724ecff73 | refs/heads/master | 2021-01-17T07:44:07.124077 | 2016-06-04T03:26:44 | 2016-06-04T03:26:44 | 15,943,668 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 815 | py | #!/usr/bin/env python
import gtk, pygtk, cairo
pygtk.require('2.0')
class dibujar:
def __init__(self):
self.ventana = gtk.Window(gtk.WINDOW_TOPLEVEL)
self.ventana.set_position(gtk.WIN_POS_CENTER)
self.ventana.set_size_request(400,300)
self.ventana.set_title("Dibujando un circulo")
self.areaDibujo = gtk.Drawi... | [
"clcneogeek@gmail.com"
] | clcneogeek@gmail.com |
8e790772dc1b98f875809de6ee3c8a4febabb32f | a81d21f98dd558416f8731f001cb8151d8309f4f | /interviewbit/test/test_kmp.py | c6f61524a22f6d1a9b02a51773adcef0494da13f | [] | no_license | marquesarthur/programming_problems | 1128c38e65aade27e2435f7987d7ee2b328fda51 | 2f7df25d0d735f726b7012e4aa2417dee50526d9 | refs/heads/master | 2022-01-25T18:19:02.575634 | 2022-01-18T02:07:06 | 2022-01-18T02:07:06 | 32,213,919 | 2 | 0 | null | 2020-10-13T01:29:08 | 2015-03-14T13:44:06 | Python | UTF-8 | Python | false | false | 525 | py | import unittest
from interviewbit.stringm.kmp import KMP
class KMPTest(unittest.TestCase):
def test_base_case(self):
s = KMP()
pattern = "ABCDABD"
str = "ABC ABCDAB ABCDABCDABDE"
ret = [15]
result = s.search(pattern, str)
self.assertEqual(result, ret)
def... | [
"marques.art@gmail.com"
] | marques.art@gmail.com |
a388c7647550a18d118c61a5e81bd0186660777e | c152873f28e62dbbf7100f789364cf5a7e578a38 | /sncosmo/magsystems.py | c593a6f5d5ba4252b6c47ecf478a3b8eef6aea91 | [
"BSD-3-Clause"
] | permissive | barentsen/sncosmo | d537b906e3f61098a731ff5d2fefcc251935a30f | 7276566ef3e2b7fd21beba25cc72dbcedf55e161 | refs/heads/master | 2020-12-24T12:01:00.052524 | 2016-11-06T03:28:08 | 2016-11-06T03:51:53 | 73,101,477 | 0 | 0 | null | 2016-11-07T17:03:28 | 2016-11-07T17:03:28 | null | UTF-8 | Python | false | false | 4,853 | py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import abc
import math
import numpy as np
import astropy.units as u
import astropy.constants as const
from ._registry import Registry
from .bandpasses import get_bandpass
__all__ = ['get_magsystem', 'MagSystem', 'SpectralMagSystem',
'ABMagSy... | [
"kylebarbary@gmail.com"
] | kylebarbary@gmail.com |
386035a852c2dc374f26af267d7ccd3a54c081a1 | 0e338d96c395950090c9252a73fc6dd2169decf0 | /p4ss/sniff_veth0.py | c5e92907b4b9af4fe982b28d76e722391d117e7b | [] | no_license | hotephen/p4-dev | 4281fbecbef406e5dfe48774d5f555235b4dfc1d | 8476734562511cde6663a4910b71dfaeed7bf34b | refs/heads/master | 2023-01-12T04:40:41.786827 | 2022-12-30T05:30:23 | 2022-12-30T05:30:23 | 130,222,370 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,244 | py | #!/usr/bin/env python
import sys
import struct
from scapy.all import sniff, sendp, hexdump, get_if_list, get_if_hwaddr, bind_layers
from scapy.all import Packet, IPOption
from scapy.all import *
from scapy.layers.inet import _IPOption_HDR
from scapy.all import IP, TCP, UDP, Raw, Ether, Padding
from time import sleep... | [
"you@example.com"
] | you@example.com |
74fd5bc6912ca3e02e94ad89eefdbae7bae13d48 | 91bd58191c9a25bc92f5372d5344b808b4f5ce5e | /tf_experiments/plot_keras.py | 93125da3cda7913711ae56da77efd762450c7df8 | [] | no_license | CBMM/Generalization-Puzzles-in-Deep-Networks-1 | c25c29b05b0439cd4cf0b53ce902b1ce5d775b6c | f7fa35fb68a9badab6843689f30b67e59fd379a3 | refs/heads/master | 2023-03-13T01:39:53.479689 | 2021-03-05T00:33:32 | 2021-03-05T00:33:32 | 449,828,772 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,413 | py | import matplotlib.pyplot as plt
import pickle
import os
import numpy as np
from pdb import set_trace as st
def plot_keras(history):
'''
:param history: the dictionary history saved by keras.
:return:
'''
nb_epochs = len(history['acc'],)
# Plots for training and testing process: loss and accu... | [
"brando90@mit.edu"
] | brando90@mit.edu |
990899041c7f51cc4a3c9a3c649736772d803b5f | 0d949e3373deb48b715080fce4ea397d656cd701 | /garfield/deterrence/tests/test_admin.py | 353d770887788d87516d26d2b46256e75be499f0 | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] | permissive | RobSpectre/garfield | f291d6022024a6238839db4a2dee47be1e1501c5 | ab806b7ad9221bd1b17c92daadd0a53a4f261cbe | refs/heads/master | 2022-07-27T05:40:07.533290 | 2021-06-10T17:38:46 | 2021-06-10T17:38:46 | 106,447,706 | 3 | 1 | MIT | 2022-04-22T20:51:54 | 2017-10-10T17:14:21 | Python | UTF-8 | Python | false | false | 723 | py | from django.test import RequestFactory
from django.test import TestCase
from deterrence.admin import DeterrenceMessageInline
class DeterrenceInlineTestCase(TestCase):
def setUp(self):
self.factory = RequestFactory()
self.request = self.factory.get("/stuff")
def test_deterrence_message_inlin... | [
"rob@brooklynhacker.com"
] | rob@brooklynhacker.com |
ad9deeab0d64712cb21fa7a68f0bae20d525d236 | 7ab85ba79a6553659f0b324ecebb4bb39f8a8a1c | /class_method2.py | 03efa5297b7caf919e9d4354c4ec872da162c672 | [] | no_license | subinmun1997/my_python | b75db77a035fa8f531d9872bf33a1818a002206a | 634acc948e7758f5d26084536c506e7da45cd53c | refs/heads/master | 2022-12-28T21:11:40.173378 | 2020-10-16T08:02:18 | 2020-10-16T08:02:18 | 292,875,851 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 287 | py | class Simple:
count = 0
def __init__(self):
Simple.count += 1
@classmethod
def get_count(cls):
return cls.count # cls에 전달되는 것은 Simple 클래스
def main():
print(Simple.get_count())
s = Simple()
print(Simple.get_count())
main() | [
"qzxy812@gmail.com"
] | qzxy812@gmail.com |
67ae26888983b46d5e6b9c5b7eaff0f630ef0073 | 1ca4f7d65ecc85f3607f4e56216875b094219e0d | /144.py | c8e7a5409b60bc2ce3e2667cb4a399e17940ef33 | [] | no_license | ZhangRui111/MyLeetCode | 4c1ac6b309b6c497956a46b1054201c06813c563 | 168fb5a720847721aad426a48a09999b59285794 | refs/heads/master | 2023-06-08T03:09:26.594980 | 2021-07-05T00:30:13 | 2021-07-05T00:30:13 | 381,576,497 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,125 | py | """
tag: 栈;树
144. 二叉树的前序遍历
https://leetcode-cn.com/problems/binary-tree-preorder-traversal/
"""
# 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 Solution1:
""" Recursion """... | [
"zhangruisg111@163.com"
] | zhangruisg111@163.com |
6515831fad7e7e60012980b3868f8fcee9c1ee01 | 3e50ed55208122b2f8b34e7f26f33c9ef70efce5 | /python/pygame_home/full_screen.py | 15f4ea3d3d06f15105b62e1d69837b5d38a8c3fe | [] | no_license | brady-wang/mac_home | b8343da428a4e6696b89d0e6a53ff0dfc87ffd21 | c56a739c31d3c0f62d26d8512fe1a90c036a1f96 | refs/heads/master | 2023-01-14T11:42:02.544322 | 2019-10-02T11:47:27 | 2019-10-02T11:47:27 | 193,177,718 | 0 | 0 | null | 2023-01-04T13:55:31 | 2019-06-22T01:27:10 | PHP | UTF-8 | Python | false | false | 754 | py | # *_*coding:utf-8 *_*
import pygame
from pygame.locals import *
from sys import exit
background_image = 'images/bk.jpg'
pygame.init()
screen = pygame.display.set_mode((640, 480), 0, 32)
background = pygame.image.load(background_image).convert()
Fullscreen = False
while True:
for event in pygame.event.get():
... | [
"brady.wang@qq.com"
] | brady.wang@qq.com |
b58ad3496928f3809ec4c67f94811bbc30c644b9 | 3f53e38076713ab49fd03a54c7c9d3e21de5eb14 | /Pyrado/scripts/training/bob-d_dql.py | 421de7b102c0d48ccc9e952111e4b2879f71b26f | [
"BSD-2-Clause",
"BSD-3-Clause"
] | permissive | arlene-kuehn/SimuRLacra | 4510473789d1c8927c8d5969a9606238523d5dd7 | 15901f70f0538bce19acdda2a0018984f67cc0fe | refs/heads/master | 2023-01-28T13:10:05.607575 | 2020-12-04T14:47:01 | 2020-12-04T14:47:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,718 | py | # Copyright (c) 2020, Fabio Muratore, Honda Research Institute Europe GmbH, and
# Technical University of Darmstadt.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source ... | [
"fabio.muratore@famura.net"
] | fabio.muratore@famura.net |
f1ff9eb781befbc411938d6dca7c4e91b57ac891 | ac5e52a3fc52dde58d208746cddabef2e378119e | /exps-gsn-edf/gsn-edf_ut=3.0_rd=0.65_rw=0.06_rn=4_u=0.075-0.35_p=harmonic-2/sched=RUN_trial=94/params.py | 50a976b4643a17024e6aad70bfb0d7da1bcc731c | [] | no_license | ricardobtxr/experiment-scripts | 1e2abfcd94fb0ef5a56c5d7dffddfe814752eef1 | 7bcebff7ac2f2822423f211f1162cd017a18babb | refs/heads/master | 2023-04-09T02:37:41.466794 | 2021-04-25T03:27:16 | 2021-04-25T03:27:16 | 358,926,457 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 255 | py | {'cpus': 4,
'duration': 30,
'final_util': '3.056548',
'max_util': '3.0',
'periods': 'harmonic-2',
'release_master': False,
'res_distr': '0.65',
'res_nmb': '4',
'res_weight': '0.06',
'scheduler': 'GSN-EDF',
'trial': 94,
'utils': 'uni-medium-3'}
| [
"ricardo.btxr@gmail.com"
] | ricardo.btxr@gmail.com |
c3ec0afea7ee4fa6e33481c3719572532fe791c2 | c7f43c4cc0ee84a5fe246b67f51e30b8d726ebd5 | /keras/keras46_MC_1_fashion.py | 1a2eaf22ee6fd437d4d6962fe544b82cd65f86a1 | [] | no_license | 89Mansions/AI_STUDY | d9f8bdf206f14ba41845a082e731ea844d3d9007 | d87c93355c949c462f96e85e8d0e186b0ce49c76 | refs/heads/master | 2023-07-21T19:11:23.539693 | 2021-08-30T08:18:59 | 2021-08-30T08:18:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,978 | py | # CNN
# fashion_mnist
# from tensorflow.keras.callbacks import ModelCheckpoint
import numpy as np
import matplotlib.pyplot as plt
from tensorflow.keras.datasets import fashion_mnist
#1. DATA
(x_train, y_train), (x_test, y_test) = fashion_mnist.load_data()
print(x_train.shape, y_train.shape) # (60000, 28, 28)--> 흑백 1 ... | [
"hwangkei0212@gmail.com"
] | hwangkei0212@gmail.com |
66cba8cea9deee015eb75c5dcb0821fc6757469a | 1ef536d93c6616f9793e57a9ebc6b44248d50202 | /move_product_out_to_in/customer_code/models/res_partner.py | 7b6b7f6d481a13d3ea17555ec3913e2e3a386849 | [] | no_license | mohamed4185/Express | 157f21f8eba2b76042f4dbe09e4071e4411342ac | 604aa39a68bfb41165549d605d40a27b9251d742 | refs/heads/master | 2022-04-12T17:04:05.407820 | 2020-03-09T14:02:17 | 2020-03-09T14:02:17 | 246,014,712 | 1 | 3 | null | null | null | null | UTF-8 | Python | false | false | 279 | py | # -*- coding: utf-8 -*-
from odoo import api, fields ,models
from odoo.exceptions import ValidationError
import logging
_logger = logging.getLogger(__name__)
class ResPartner(models.Model):
_inherit="res.partner"
customer_code=fields.Char('Code',size=10)
| [
"mohamed.abdelrahman@businessborderlines.com"
] | mohamed.abdelrahman@businessborderlines.com |
7178d7fb0f535f9f31617612709df1b85386f6ef | 8c92787a518bea3d528641311939137f7f37b56c | /grab/spider/error.py | 056eaeef85e057b70d0019b7e1da520f8fcb7d46 | [
"MIT"
] | permissive | brabadu/grab | 8d973d5052bc60d06d67e1ea82814a939dea6877 | 92b1d68ceeece3087e053064520261a7aef3bd02 | refs/heads/master | 2021-01-17T22:16:16.923189 | 2013-10-02T20:28:44 | 2013-10-02T20:28:44 | 13,282,380 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 971 | py | __all__ = ('SpiderError', 'SpiderMisuseError', 'FatalError',
'StopTaskProcessing', 'SpiderInternalError',
'NoTaskHandler', 'NoDataHandler')
class SpiderError(Exception):
"Base class for Spider exceptions"
class SpiderMisuseError(SpiderError):
"Improper usage of Spider framework"
class... | [
"lorien@lorien.name"
] | lorien@lorien.name |
9668b5f349cdc67a5166ee2ddb3178f990d70225 | e82b761f53d6a3ae023ee65a219eea38e66946a0 | /All_In_One/addons/Keyboard-Layout-Editor/__init__.py | 3eaf1adc8f98d6f2aa0df9bec87cf4e5246ec300 | [] | no_license | 2434325680/Learnbgame | f3a050c28df588cbb3b14e1067a58221252e2e40 | 7b796d30dfd22b7706a93e4419ed913d18d29a44 | refs/heads/master | 2023-08-22T23:59:55.711050 | 2021-10-17T07:26:07 | 2021-10-17T07:26:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,510 | py | # addon details
bl_info = {
"name": "Import: KLE Raw JSON format (.json)",
"author": "/u/kdem007 /u/jacopods",
"version": (2, 4),
"blender": (2, 79, 0),
"location": "File > Import-Export > Keyboard Layout Editor Raw (.json) ",
"description": "Import Keyboard Layouts",
"warning": "",
... | [
"root@localhost.localdomain"
] | root@localhost.localdomain |
9a4bc2cd59a6a8bf06f6eca10852f04a5b9a2621 | dde8b97eee29cd6af17082cf84773d50bea7ca42 | /WHAnalysis/Configuration/python/skimming_ett_cff.py | 9894ce4a59888484a2e68d200d588496a4f1e0a8 | [] | no_license | calabria/WHAnalysis | 557cee96fe1dfe221a3a76f99b92f59c0800a8eb | 6cdcc0b73d94261f5ff7822b8bf5e48bc08268ae | refs/heads/master | 2021-01-23T13:36:11.593683 | 2014-04-12T10:39:44 | 2014-04-12T10:39:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 940 | py | import FWCore.ParameterSet.Config as cms
from electronHistos_ett_cff import *
skimmedElectrons = cms.EDFilter("PATElectronSelector",
src = cms.InputTag("electronVariables"),
cut = cms.string('pt > 24. && abs(eta) < 2.1 && ((isEB && userFloat("PFRelIsoDB04") < 0.15) || ... | [
"cesare.calabria23@gmail.com"
] | cesare.calabria23@gmail.com |
6bc04cbe9bef936e8b03f30257dd980642088635 | e70b678712a355a0b51632728c7781b0bdcf29f4 | /Algorithms/Python/Next-Permutation.py | 25484560a873d416844a871ab406890796b55883 | [] | no_license | keyi/Leetcode_Solutions | b3e3c6835ed335d7d4ad53a1b37e59ac15fcf3af | 69e4e969b435ff2796bd7c4b5dad9284a853ab54 | refs/heads/master | 2020-05-21T23:36:20.450053 | 2018-11-11T03:45:28 | 2018-11-11T03:45:28 | 33,714,612 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 600 | py | class Solution(object):
def nextPermutation(self, nums):
"""
:type nums: List[int]
:rtype: void Do not return anything, modify nums in-place instead.
"""
left, right = -1, -1
for i in range(len(nums) - 1):
if nums[i] < nums[i + 1]:
left = ... | [
"yike921012@gmail.com"
] | yike921012@gmail.com |
2c46f60d2fd89cab8c491fad1b4dd269924164bf | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_118/977.py | 29a7741a218216554f1a711e65d07a2ace5e8d80 | [] | 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 | 470 | py | import math
def isPal(n):
if n%1 != 0: return False
sn = str(long(n))
for i in xrange(0, len(sn)):
if (sn[i] != sn[-i-1]): return False
return True
if __name__ == "__main__":
T = int(raw_input())
for c in xrange(1,T+1):
[A, B] = map(lambda x: long(x), raw_input().split())
... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
2da7102a1a8c84e25261aa94efbfe23b159ec9aa | f769e0a8e80f604502a63ae0073b8e95c771bad8 | /blog_app/urls.py | 75de32e6b39b93bb047cf5261111293302901881 | [] | no_license | Justprince234/blog | 6c318f005346086b2df28741e689a032646d1c9f | 25004f3731045384dd423f8e6375a5e609fd5548 | refs/heads/master | 2023-01-23T14:07:36.119180 | 2020-08-06T00:57:07 | 2020-08-06T00:57:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 334 | py | from django.urls import path
from blog_app import views
app_name = 'blog_app'
urlpatterns = [
path('category/<slug:slug>', views.blog_category, name='blog_category'),
path('search/', views.search, name='search'),
path('<slug:slug>/', views.post_detail, name='post_detail'),
path('', views.post_list, n... | [
"princewilljackson@ymail.com"
] | princewilljackson@ymail.com |
79ace01feaaf47a4d80a5259ed902b36c4c7207c | 9028b6983685a3ace074049fccf2b8c503b77de8 | /PyStationB/libraries/GlobalPenalisation/gp/base/chain_rule.py | c6d02e92c609b00f5467ad8833e4b3110a301889 | [
"MIT",
"LicenseRef-scancode-generic-cla"
] | permissive | mebristo/station-b-libraries | 7f5517e5e77e6cdc54c03355804b8c0a4fcae65b | 40bab526af6562653c42dbb32b174524c44ce2ba | refs/heads/main | 2023-09-03T03:54:53.181082 | 2021-10-01T03:21:11 | 2021-10-01T03:21:11 | 412,871,835 | 0 | 0 | MIT | 2021-10-02T17:53:07 | 2021-10-02T17:53:06 | null | UTF-8 | Python | false | false | 3,144 | py | # -------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
# ----------------------------------------------------------------------... | [
"noreply@github.com"
] | mebristo.noreply@github.com |
78d810e3b5a2e9540be39cafd4404716991161ff | 119f87ff16278614dce6571a451c54b839a4bead | /catalyst/utils/meters/ppv_tpr_f1_meter.py | 3fb52f541fa221d5341855724b7597f9e2967f65 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | valyukov/catalyst | 17e6243cd2b0f9c790645647b7946ef05c1b57fa | a1d2638f22ff7bede74410baeb8bc6a7aff036df | refs/heads/master | 2020-08-04T17:01:27.565749 | 2020-02-15T13:33:44 | 2020-02-15T13:33:44 | 212,212,412 | 0 | 0 | Apache-2.0 | 2019-10-01T22:39:05 | 2019-10-01T22:39:05 | null | UTF-8 | Python | false | false | 3,662 | py | from collections import defaultdict
import torch
from . import meter
def f1score(precision_value, recall_value, eps=1e-5):
"""
Calculating F1-score from precision and recall to reduce computation
redundancy.
Args:
precision_value: precision (0-1)
recall_value: recall (0-1)
Return... | [
"scitator@gmail.com"
] | scitator@gmail.com |
59fd2d2296999f253b25fe78c0624d986b164c3f | 7911da973079f325a515cd2ee66f7590a9f32e48 | /great_divice.py | 5edc06a2eac8745bdbb62b1d2d89b3b76c151283 | [] | no_license | Ponkiruthika112/Guvi | 5d2ff3dcf55d6c52c0f09a1e577d8b11632c7a92 | 319e5b4dab5654fabc25ef15c1d528f76d833c15 | refs/heads/master | 2020-04-21T06:05:03.581658 | 2018-08-02T05:53:48 | 2018-08-02T05:53:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 179 | py | n1=int(input("N1 value:"))
n2=int(input("N2 value:"))
maximum=1
for x in range(1,min(n1,n2)+1):
if n1%x==0 and n2%x==0:
if x>maximum:
maximum=x
print("Ans is:",maximum)
| [
"noreply@github.com"
] | Ponkiruthika112.noreply@github.com |
905ef18e702d20a1fcff2e1cadc2674abfa4e3af | 6dae31f10260e39feae9d268e3ebe6d23146575a | /galaxy/bin_eBOSS_ELG/create_stack_list_ELG_all.py | 55cc2990fa24df1a48b2ead2e16fef481eaded1d | [
"CC0-1.0"
] | permissive | JohanComparat/pySU | e55eba92f0660e733468bce618595a03dc25a3d2 | 4169e11414be661dc0c01c774e64fb8ce6242825 | refs/heads/master | 2021-12-25T11:06:04.315554 | 2021-10-11T12:03:22 | 2021-10-11T12:03:22 | 44,340,565 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,530 | py | #! /usr/bin/env python
"""
This script produces the stacks for emission line luminosity limited samples.
"""
import sys
import os
from os.path import join
import glob
import numpy as n
import astropy.io.fits as fits
import SpectraStackingEBOSS as sse
from scipy.interpolate import interp1d
from astropy.cosmology imp... | [
"johan.comparat@gmail.com"
] | johan.comparat@gmail.com |
da2c73030f131e6a6657b73707e086a447727784 | 558e979b7c6d5dc2599453392ed624265a831d0d | /glamazer/favorites/models.py | cdc9a8d82dafb91981adcda84c1f1522fd8fdf14 | [] | no_license | SpeeDly/partytask | af08ca089d518bc0d09dda61e68ce3c1d117ab2b | c9a813bc130c41995140adaa4a19344791b89968 | refs/heads/master | 2021-01-10T15:42:41.761160 | 2016-02-15T13:48:13 | 2016-02-15T13:48:13 | 51,758,449 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 277 | py | from django.db import models
from django.contrib.auth.models import User
from glamazer.listings.models import Listing
class Favorite(models.Model):
user = models.ForeignKey(User)
listing = models.ForeignKey(Listing)
date = models.DateTimeField(auto_now_add=True) | [
"zhuhov@gmail.com"
] | zhuhov@gmail.com |
b109cb8b121bd51d0db13746d6f51a2a11d5ce4e | c9ddbdb5678ba6e1c5c7e64adf2802ca16df778c | /cases/pa2/sample/class_def_attr-107.py | 7f478ef28ce91a5201adf88cbe7f4d1ad105b948 | [] | no_license | Virtlink/ccbench-chocopy | c3f7f6af6349aff6503196f727ef89f210a1eac8 | c7efae43bf32696ee2b2ee781bdfe4f7730dec3f | refs/heads/main | 2023-04-07T15:07:12.464038 | 2022-02-03T15:42:39 | 2022-02-03T15:42:39 | 451,969,776 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 216 | py | class A(object):
x:int = 1
class B(A):
def __init__(self: "B"):
pass
class C(B):
z:bool = True
a:A = None
b:B = None
c:C = None
a = A()
b = B()
c = C()
$Statement
b.x = a.x
c.z = a.x == b.x
| [
"647530+Virtlink@users.noreply.github.com"
] | 647530+Virtlink@users.noreply.github.com |
361eb11c018dc172bfabcdcd14403d0fe324b70b | 4717e299b70d658f607becacd5f202cdba904181 | /scripts/mount-image-partitions.sh | f17ca7525822a6916e1d6b07b2ee4de504e51ea7 | [
"MIT"
] | permissive | deets/yocto-pi-lap-timer | 8ea4840320675cb3c22a73fc25199fb96d379f9b | 857ea7e27ed3df979fbf22129da428430a40426c | refs/heads/master | 2023-01-24T06:36:28.649809 | 2023-01-01T18:13:37 | 2023-01-01T18:13:37 | 245,871,535 | 0 | 0 | MIT | 2023-01-20T22:30:26 | 2020-03-08T19:04:35 | C++ | UTF-8 | Python | false | false | 3,685 | sh | #!/usr/bin/env python3
# -*- mode: python -*-
# Copyright: 2020, Diez B. Roggisch, Berlin . All rights reserved.
import argparse
import json
import logging
import os
import subprocess
import sys
USAGE = """Images containing several partitions are
cumbersome to inspect. You need to figure out partition block ranges,
an... | [
"deets@web.de"
] | deets@web.de |
ed149966b9509c17ce4cb3de3841e639cb2c9a4b | 88ae8695987ada722184307301e221e1ba3cc2fa | /chrome/browser/ui/webui/side_panel/read_anything/DEPS | 0d08619c1aa0d97e9806133820d5e14f04bdfaf3 | [
"BSD-3-Clause"
] | permissive | iridium-browser/iridium-browser | 71d9c5ff76e014e6900b825f67389ab0ccd01329 | 5ee297f53dc7f8e70183031cff62f37b0f19d25f | refs/heads/master | 2023-08-03T16:44:16.844552 | 2023-07-20T15:17:00 | 2023-07-23T16:09:30 | 220,016,632 | 341 | 40 | BSD-3-Clause | 2021-08-13T13:54:45 | 2019-11-06T14:32:31 | null | UTF-8 | Python | false | false | 230 | include_rules = [
"+chrome/common/accessibility",
]
specific_include_rules = {
"read_anything_page_handler\.*": [
"+chrome/browser/ui/views/side_panel/read_anything",
"+chrome/browser/ui/views/frame/browser_view.h",
],
}
| [
"jengelh@inai.de"
] | jengelh@inai.de | |
54f7efa4be54b7bfa4d320fc695d8ebaee3721de | d191a04a3ded41175ea84ae88ebddb4f262b7fb1 | /tree/leaf-similar_trees.py | f3e2de3f3491a207853a3eb9634c2e7fd4401330 | [] | no_license | YLyeliang/now_leet_code_practice | ae4aea945bae72ec08b11e57a8f8a3e81e704a54 | 204d770e095aec43800a9771fe88dd553463d2f7 | refs/heads/master | 2022-06-13T20:22:51.266813 | 2022-05-24T05:29:32 | 2022-05-24T05:29:32 | 205,753,056 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,193 | py | # Consider all the leaves of a binary tree. From left to right order, the values of those leaves form a leaf value sequence.
#
# 3
# 5 1
# 6 2 9 8
# 7 4
# For example, in the given tree above, the leaf value sequence is (6, 7, 4, 9, 8).
#
# Two binary trees are considered leaf-simil... | [
"k87974@163.com"
] | k87974@163.com |
832551fed04256accf01a92952917bc2b13db83a | 772b0df2635b95644ea3eb370103174804024167 | /scripts/exonU.py | ae8f5252c8e3b2a19529d53f4cea5dae88284b92 | [
"MIT"
] | permissive | 4dn-dcic/clodius | ec909bda90a9df13fa1b85472951f6cf149213a5 | aa31b3d90a5a9fec883c20cab31ad4d347cd52cd | refs/heads/develop | 2020-04-17T23:31:32.114043 | 2019-04-02T14:01:46 | 2019-04-02T14:01:46 | 167,038,915 | 0 | 0 | MIT | 2019-03-28T20:10:46 | 2019-01-22T17:43:32 | Python | UTF-8 | Python | false | false | 4,095 | py | from __future__ import print_function
__author__ = "Alaleh Azhir,Peter Kerpedjiev"
#!/usr/bin/python
import collections as col
import sys
import argparse
class GeneInfo:
def __init__(self):
pass
def merge_gene_info(gene_infos, gene_info):
'''
Add a new gene_info. If it's txStart and txEnd overl... | [
"pkerpedjiev@gmail.com"
] | pkerpedjiev@gmail.com |
6d26e7d8a39dea94a32fcdd63dc99c2a597f95bb | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2821/60651/234231.py | f4edee98f21804eb117fe388b3c8b273936dceec | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 490 | py | n=int(input())
list1=input().split()
list1=[int(x) for x in list1]
p1=0
p2=0
while(len(list1)>1):
if list1[0]>=list1[len(list1)-1]:
p1+=list1[0]
del(list1[0])
else:
p1+=list1[len(list1)]
del(list1[len(list1)])
if list1[0]>=list1[len(list1)-1]:
p2+=list1[0]
... | [
"1069583789@qq.com"
] | 1069583789@qq.com |
75a398246bbdcce760ca60cf2878fa345bbdca0c | 099256b28df65fb7c90c077b060dca16b8655235 | /reinforcement_learning/0x00-q_learning/2-epsilon_greedy.py | 2430cee4b9e0d6d3beea190f0e178793a8c3ec3b | [] | no_license | Immaannn2222/holbertonschool-machine_learning | 1cebb9a889b363669bed7645d102dc56ab943c08 | 80bf8d3354702f7fb9f79bbb5ed7e00fc19f788d | refs/heads/master | 2023-08-01T05:35:00.180472 | 2021-09-22T20:28:17 | 2021-09-22T20:28:17 | 317,624,526 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 337 | py | #!/usr/bin/env python3
"""Q-Learning"""
import gym
import numpy as np
def epsilon_greedy(Q, state, epsilon):
"""uses epsilon-greedy to determine the next action"""
p = np.random.uniform(0, 1)
if p < epsilon:
action = np.random.randint(Q.shape[1])
else:
action = np.argmax(Q[state, :])
... | [
"imennaayari@gmail.com"
] | imennaayari@gmail.com |
03677753672e492a352d7591d8b920b07ca19949 | b96f1bad8a74d31d8ff79bc955813bfcd17d7b26 | /560. Subarray Sum Equals K.py | 7388bfa4045464b95f7ef4a1835a360ec064851a | [] | no_license | brianhu0716/LeetCode-Solution | e7177af15e84e833ce8ab05027683ed4ac489643 | 158a4359c90b723545b22c4898047274cc1b80a6 | refs/heads/main | 2023-07-11T05:29:56.783795 | 2021-08-28T12:53:14 | 2021-08-28T12:53:14 | 374,991,658 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,527 | py | # -*- coding: utf-8 -*-
"""
Created on Sun Apr 4 18:21:15 2021
@author: Brian
"""
'''
前綴和(Prefix Sum)的概念,前綴和是指由index = 0至index = i(i < len(nums))所累加成的數字組成的數列,此種概念非常適合解
這類序列中有正有負,又要求必須要連續的題型,以此題為例,目標是要找到和為k的子序列個數,因此我們先建立一個由前綴和為key值,
出現次數為value值的表,每當我們計算一次前綴和後我們同時可以查表中是否有出現當前prefixSum - k的key出現,有的話代表prefixSum - k
對應的次數... | [
"85205343+brianhu0716@users.noreply.github.com"
] | 85205343+brianhu0716@users.noreply.github.com |
c2a8f3da8dd2bd5019bd6fc5e761b3e7657d292d | a439ca43178d38cfe6daaee50ea134ca6c52b502 | /thaniya_server_upload/src/thaniya_server_upload/__init__.py | bc23281f002d4aaf2bd5c044627665570e87f050 | [
"Apache-2.0"
] | permissive | jkpubsrc/Thaniya | 37ca727abdc6f9f605257813889fe3a033995bba | 4ebdf2854e3d7888af7396adffa22628b4ab2267 | refs/heads/master | 2023-03-05T20:58:59.528746 | 2021-02-15T19:31:06 | 2021-02-15T19:31:06 | 331,318,787 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 188 | py |
__version__ = "0.2021.1.20"
from .UploadHttpdCfg import UploadHttpdCfg
from .IAppRuntimeUserMgr import IAppRuntimeUserMgr
from .AppRuntimeUploadHttpd import AppRuntimeUploadHttpd
| [
"pubsrc@binary-overflow.de"
] | pubsrc@binary-overflow.de |
a9ffb5601e405aada062d39d769a9c49544fc474 | 092056c026f3ef162c31bca004a596bbe78948e9 | /w261/wk3/reducer_hw32.py | 10741e7585b2d326ecaeb8047f54c062d1939548 | [] | no_license | sayantansatpati/ml | 4138bbafd216a8ad848a56e4818163649a28b6a9 | 9f1765b716f39a1ef159db98b2813761bbc14b60 | refs/heads/master | 2021-01-19T03:19:42.734130 | 2019-03-12T15:44:15 | 2019-03-12T15:44:15 | 36,243,314 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,235 | py | #!/usr/bin/python
import sys
import re
import heapq
itemset_1_cnt = 0
itemset_2_cnt = 0
itemset_1_last = None
itemset_2_last = None
'''
a1,* 1
a1,* 1
a1,b1 1
a1,b1 1
a1,b2 1
a1,b2 1
a2,* 1
'''
THRESHOLD = 100
# Store Itemsets 2
dict = {}
for line in sys.stdin:
# Remove leading & trailing chars
line = l... | [
"sayantan.satpati.sfbay@gmail.com"
] | sayantan.satpati.sfbay@gmail.com |
dd9892018dc6b2d6514d2081c8fca5562e57d115 | 65fe8e97656d41074e25219268c7b0a78fafb398 | /camera_infer.py | 7e74deaef16d9506c93f9ad054a23474383cb7d8 | [
"Apache-2.0"
] | permissive | Wblossom/Tensorflow-FaceRecognition | c48923f9ed8695380f251b5a81bcccafae33f44b | bc567fb53dc11554bfaf612f3a21045f7ab24876 | refs/heads/master | 2022-12-07T10:07:18.290096 | 2020-08-27T02:35:25 | 2020-08-27T02:35:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,491 | py | import cv2
import numpy as np
import sklearn
import config
from utils import face_preprocess
from PIL import ImageFont, ImageDraw, Image
from utils.utils import feature_compare, load_mtcnn, load_faces, load_mobilefacenet, add_faces
# 人脸识别阈值
VERIFICATION_THRESHOLD = config.VERIFICATION_THRESHOLD
# 检测人脸检测模型
mtcnn_detec... | [
"yeyupiaoling@foxmail.com"
] | yeyupiaoling@foxmail.com |
a5c4298eb129e99af9224110f4761b4b8ed3bd22 | 67117705720a3e3d81253ba48c1826d36737b126 | /Wk10_STRANDS/get_valid1.py | df448f30ab90cf1b517fb5526efd7d00ee5ea597 | [] | no_license | pyliut/Rokos2021 | 41f0f96bc396b6e8a5e268e31a38a4a4b288c370 | 70753ab29afc45766eb502f91b65cc455e6055e1 | refs/heads/main | 2023-08-13T17:29:30.013829 | 2021-09-26T19:01:35 | 2021-09-26T19:01:35 | 382,092,802 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 467 | py | # -*- coding: utf-8 -*-
"""
Created on Tue Aug 10 13:24:32 2021
@author: pyliu
"""
import pandas as pd
def get_valid1(df, adjacent):
df = df.loc[ ( df["origin"].isin(adjacent.keys()) & df["target"].isin(adjacent.keys()) ), :]
df = df[["_id", "status", "origin", "target", "edge_id","date_finish... | [
"noreply@github.com"
] | pyliut.noreply@github.com |
2993c86ec6a80448c6afc224530dff735ad239be | 81d635211686b1bc87af5892bd9e0fb95cc2ddb8 | /adwords api/googleads-python-lib-master/examples/dfp/v201502/custom_targeting_service/get_custom_targeting_keys_by_statement.py | 0812eb4235de6320b09005b1154ac6fbaf2ee011 | [
"Apache-2.0"
] | permissive | analyticsbot/Python-Code---Part-2 | de2f0581258b6c8b8808b4ef2884fe7e323876f0 | 12bdcfdef4472bcedc77ae61707c25a4a09cba8a | refs/heads/master | 2021-06-04T05:10:33.185766 | 2016-08-31T13:45:45 | 2016-08-31T13:45:45 | 66,679,512 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,953 | py | #!/usr/bin/python
#
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | [
"ravi.shankar1788@gmail.com"
] | ravi.shankar1788@gmail.com |
52438bbc1d7accc32306a2504e0b0ac1b2143bf5 | 505343f6ace00d22f8753c1a943a5794a619e698 | /katas/Python/5 kyu/Eight ways to iterate over table 5af5c18786d075cd5e00008b.py | 24fec5621cd28f0bfe275dbea42300fdad8dd66c | [] | no_license | bullet1337/codewars | 7652e50bf768bc47976a9124dd98b93602d4d458 | ba7f13ddd766158b41e036dae5d6b15f7f08761a | refs/heads/master | 2020-03-27T05:04:03.751302 | 2019-04-30T17:45:39 | 2019-04-30T17:45:39 | 145,991,995 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 842 | py | # https://www.codewars.com/kata/5af5c18786d075cd5e00008b
DIRECTION_UP, DIRECTION_LEFT, DIRECTION_DOWN, DIRECTION_RIGHT = range(1,5)
class Table:
def __init__(self, data):
self.data = data
def get_range(self, dir):
if dir == DIRECTION_UP:
return range(len(self.data) - 1, -1... | [
"alichek95@mail.ru"
] | alichek95@mail.ru |
10901ab549fe64751337168cade0014abf98999b | c85b91bfdd7eb2fa5a7d6c6a9b722c8548c83105 | /vscode/extensions/ms-python.python-2020.3.69010/languageServer.0.5.31/Typeshed/stdlib/2/multiprocessing/util.pyi | 76f9424a6774726392f442e22dae101e2e626220 | [
"MIT",
"Apache-2.0"
] | permissive | ryangniadek/.dotfiles | ddf52cece49c33664b56f01b17d476cf0f1fafb1 | be272baf6fb7d7cd4f4db1f6812b710196511ffe | refs/heads/master | 2021-01-14T07:43:12.516127 | 2020-03-22T20:27:22 | 2020-03-22T20:27:22 | 242,632,623 | 0 | 0 | MIT | 2020-09-12T17:28:01 | 2020-02-24T02:50:06 | Python | UTF-8 | Python | false | false | 741 | pyi | from typing import Any
import threading
SUBDEBUG = ... # type: Any
SUBWARNING = ... # type: Any
def sub_debug(msg, *args): ...
def debug(msg, *args): ...
def info(msg, *args): ...
def sub_warning(msg, *args): ...
def get_logger(): ...
def log_to_stderr(level=None): ...
def get_temp_dir(): ...
def regis... | [
"ryan@gniadek.net"
] | ryan@gniadek.net |
646938fdb988b0da4f7455fce4fddf228f6bd0b0 | 254e35ed13abb5670eb664c1b17cb77d6b2d6289 | /LeetCode/python/_229.MajorityElementII.py | f84f099e6907b3b8184ac96ff90db0bcae53f8a1 | [] | no_license | bobby20180331/Algorithms | 475f7b29efcab829bc97b18a088600d406850fc7 | c56967e292b34162438f86bfc4c76925329105dd | refs/heads/master | 2023-04-23T04:36:26.977179 | 2021-02-04T06:47:41 | 2021-02-04T06:47:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,544 | py | #难点在于 linear time and in O(1)
#没思路,查了下,好像用Boyer-Moore Majority Vote algorithm
#这个算法是解决这样一个问题:从一个数组中找出出现半数以上的元素。 这道题是求n/3
'''
每次都找出一对不同的元素,从数组中删掉,直到数组为空或只有一种元素。
不难证明,如果存在元素e出现频率超过半数,那么数组中最后剩下的就只有e。
'''
class Solution(object):
def majorityElement(self, nums):
"""
:type nums: List[int]
:rtyp... | [
"noreply@github.com"
] | bobby20180331.noreply@github.com |
4ca4ef13e503c3348a0195e98d2a84a5902c7db3 | 83ecabbeea8b17a3fd9b8142062f09c76198e232 | /test/test_document_2.py | 34e6255c4f1a7ac910d2259eec0bfd0bc5f5172c | [] | no_license | junetigerlee/python-wso2-apim-publisherclient | 387f581bb48645b35f256159cce0031babd493f0 | 5e1cadeab4eb37ebc93e46b45d6d1f98f4fdfde9 | refs/heads/master | 2021-01-01T16:11:45.362270 | 2017-07-25T06:20:46 | 2017-07-25T06:20:46 | 97,783,584 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,237 | py | # coding: utf-8
"""
WSO2 API Manager - Publisher API
This specifies a **RESTful API** for WSO2 **API Manager** - Publisher. Please see [full swagger definition](https://raw.githubusercontent.com/wso2/carbon-apimgt/v6.0.4/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher/src/main/resources/publisher... | [
"junetigerlee@gmail.com"
] | junetigerlee@gmail.com |
639d0089dc164b752a30ef726417d9d4557180ea | 4fcad69a9b2aec97fa29e0010d82f0f085cdc446 | /tsampi/pypy/lib_python-bak/hypothesis/utils/__init__.py | 44d438c8e378b5f27ebbb6ac0833bbf585e8de04 | [] | no_license | tsampi/tsampi-0 | b64d4457f58314343630b04232c6ecc74c7bfda1 | 5e0183e80718d5668b4b5b96631853942e344b64 | refs/heads/master | 2021-01-19T04:35:05.640785 | 2016-09-12T18:34:25 | 2016-09-12T18:34:25 | 49,612,767 | 1 | 3 | null | 2016-03-25T10:35:41 | 2016-01-14T01:02:18 | Python | UTF-8 | Python | false | false | 800 | py | # coding=utf-8
#
# This file is part of Hypothesis (https://github.com/DRMacIver/hypothesis)
#
# Most of this work is copyright (C) 2013-2015 David R. MacIver
# (david@drmaciver.com), but it contains contributions by others. See
# https://github.com/DRMacIver/hypothesis/blob/master/CONTRIBUTING.rst for a
# full list of... | [
"tim@readevalprint.com"
] | tim@readevalprint.com |
42a59f892a98e74a4c42441549d2d609eed08529 | a1b892c0f5f8c5aa2c67b555b8d1d4b7727a86a4 | /HTML/outage/test.py | feaec475507a72c66bfa111e20a713c1f88284c0 | [] | no_license | Vivekdjango/outage | 60f463ae5294d2b33544a19bda34cc2c22dd42c8 | 20cfbc07e6714f0c8c7e685ea389f1b8ef1bfd53 | refs/heads/master | 2021-01-20T04:18:40.023340 | 2017-04-28T06:46:26 | 2017-04-28T06:46:26 | 89,675,693 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 285 | py | import re
with open('/var/www/html/outage/Vivektest.html','r+') as f:
s=f.read()
d=re.search(r'Downtime</b>:([0-9]+)',s)
j='Downtime</b>:90'
x=d.group()
s=re.sub(x,j,s)
f.seek(0)
f.truncate()
with open('/var/www/html/outage/Vivektest.html','a') as g:
g.write(s)
g.close()
| [
"viveksinha@IC0532-L0.corp.inmobi.com"
] | viveksinha@IC0532-L0.corp.inmobi.com |
97005734ec6b4c93adc78cd19c609fa7f49dac2c | f83ca7d939e8b7688445f336ceedcf871da3ed21 | /sysroot/usr/lib/python3/dist-packages/blinkt.py | 3dae99458928bbdd066f8966ee0d34197bd45404 | [] | no_license | FundamentalFrequency/juce-aarch64-linux-cross-compiler | 1c432d77b8bc7dd11692a9aef34408ed8baddf1f | 3fb7539e4459228231699efbe227e50638b620e4 | refs/heads/main | 2023-03-17T07:49:31.396127 | 2022-07-15T04:52:18 | 2022-07-15T04:52:18 | 496,806,629 | 13 | 4 | null | 2022-10-21T21:07:26 | 2022-05-26T23:57:36 | Python | UTF-8 | Python | false | false | 3,619 | py | import atexit
import time
import RPi.GPIO as GPIO
__version__ = '0.1.2'
DAT = 23
CLK = 24
NUM_PIXELS = 8
BRIGHTNESS = 7
pixels = [[0, 0, 0, BRIGHTNESS]] * NUM_PIXELS
_gpio_setup = False
_clear_on_exit = True
def _exit():
if _clear_on_exit:
clear()
show()
GPIO.cleanup()
def set_brightness... | [
"stonepreston@protonmail.com"
] | stonepreston@protonmail.com |
0aa45401d8b9d7ecc694f70ae64fad64be567afa | c00a2490947ad10582b5d675f070ccb62b70901d | /testing/vivaldi_testing_base.gypi | 17dedd737c47f8dbfc349f283963feba7c8c0596 | [
"BSD-3-Clause"
] | permissive | teotikalki/vivaldi-source | 543d0ab336fb5784eaae1904457598f95f426186 | 22a46f2c969f6a0b7ca239a05575d1ea2738768c | refs/heads/master | 2021-01-23T01:17:34.305328 | 2016-04-29T20:28:18 | 2016-04-29T20:28:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 228 | gypi | {
'type': 'none',
'target_conditions': [
['OS=="win"', {
# Allow running and debugging browser_tests from the testing directory of the MSVS solution view
'product_name':'<(_target_name).exe',
}],
],
}
| [
"jason@theograys.com"
] | jason@theograys.com |
5057692bd4eb3599bc2347781c35514eda74b72f | bdda88c9a9141e9873f871dea6a197a3c413aad4 | /last/wsgi.py | 01e630a2b2f7ee2e8f1bb214003fbde4dfcffb09 | [] | no_license | thienkimlove/python_last | 83e890e30ef3e4dbd7e063b7f11c5ae2b65c9f84 | f6685ed71c30196f40b122b2aefc35271802d092 | refs/heads/master | 2022-12-15T21:57:24.128016 | 2018-08-20T10:57:42 | 2018-08-20T10:57:42 | 120,873,885 | 0 | 0 | null | 2022-12-08T00:54:39 | 2018-02-09T07:42:28 | JavaScript | UTF-8 | Python | false | false | 385 | py | """
WSGI config for last project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS... | [
"quan.dm@teko.vn"
] | quan.dm@teko.vn |
376f29ecfebbf1df2ed02a33676c3f737a6e6b60 | 7022c58c3affc4a31cb261a44cb42ff07088e654 | /modify_video.py | 64aef4b9fc60e71aaf8fbed518e654834661b99e | [
"MIT"
] | permissive | reading-stiener/Audio-to-audio-alignment-research | 9298c47c139240b8b2a4b80bfeffa6db6d278c8a | 8ea2789a760e63b92a3a2f14236a87417236e533 | refs/heads/main | 2023-02-12T14:05:25.948830 | 2020-12-22T05:53:11 | 2020-12-22T05:53:11 | 303,211,401 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,329 | py | from moviepy.editor import VideoFileClip, concatenate_videoclips, vfx
from moviepy.video.fx.speedx import speedx
from pprint import pprint
import os
import json
def modify_video(folder, filename, mod_dict, audio_file=None):
with VideoFileClip(filename, audio=False) as videoclip:
cliplist = []
for c... | [
"apradha1@conncoll.edu"
] | apradha1@conncoll.edu |
0e2abcb6c0c351b66ae5fb542aaaecce8c8f3fbf | b23b3a4cc7d4ebdf08d958af82128ba535b1402f | /Codeforces/T-primes.py | 8fc2cb522a317a237d883dfa154a807a34c8cb13 | [] | no_license | darshantak/Competitive-Programming | 8665cb1f837140275b6664464522ae942fb6ca50 | 1413d3cc9904b534178a5ac3e4dcd48733c9d26f | refs/heads/master | 2021-08-16T00:02:33.507276 | 2020-05-15T13:55:22 | 2020-05-15T13:55:22 | 180,850,371 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,066 | py | import math
def SieveOfEratosthenes(n, prime,primesquare, a):
for i in range(2,n+1):
prime[i] = True
for i in range((n * n + 1)+1):
primesquare[i] = False
prime[1] = False
p = 2
while(p * p <= n):
if (prime[p] == True):
i = p * 2
while(i <= n):
prime[i] = False
i += p
p+=1
j = 0
for... | [
"30834020+darshantak@users.noreply.github.com"
] | 30834020+darshantak@users.noreply.github.com |
3754f58c4dc34461dbba2390774e8247149a0188 | 90c2619937019bb1145edfb2d9d6a7cdea460b57 | /src/538.py | 004d39d2e9e53a8ea9413a35ac09f724706a45d1 | [
"MIT"
] | permissive | zhaoyi3264/leetcode-solutions | 2d289a7e5c74cfe7f8b019c6056ce16485ae057b | 1a3a2d441cdd07a17e80b0ea43b7b266844f530c | refs/heads/main | 2023-06-03T11:35:25.054669 | 2021-06-28T02:58:07 | 2021-06-28T02:58:07 | 349,618,427 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 512 | 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:
s = 0
def update(self, root):
if not root:
return
self.update(root.righ... | [
"zhaoyi3264@gmail.com"
] | zhaoyi3264@gmail.com |
c76ddadc6c35d5df98c2328ccbdfe66c0af64a20 | 8be967439ddf76eaad9e49fb9d8f18d832db5cf4 | /mmd/realtime.py | d2ada934da2d2003fb6abac9d7ea39210fb9fd41 | [
"BSD-3-Clause"
] | permissive | jjgoings/McMurchie-Davidson | b4acda0d0e49f96ec10bee4e8c58c0bf20d77f77 | 8c9d176204498655a358edf41698e59cf970a548 | refs/heads/master | 2023-02-07T21:13:50.285990 | 2023-02-05T04:32:59 | 2023-02-05T04:32:59 | 81,615,513 | 72 | 23 | BSD-3-Clause | 2023-02-05T04:33:00 | 2017-02-10T23:13:26 | Python | UTF-8 | Python | false | false | 7,265 | py | from __future__ import division
from __future__ import print_function
import numpy as np
from scipy.linalg import expm
class RealTime(object):
"""Class for real-time routines"""
def __init__(self,mol,numsteps=1000,stepsize=0.1,field=0.0001,pulse=None):
self.mol = mol
self.field = field
... | [
"jjgoings@gmail.com"
] | jjgoings@gmail.com |
a5da9ca40cc5a5566e5d13d5e2df167a59f0917c | 88b7c57a0d9a7a3b28ebd9d6c12ecbbebc50e8a5 | /beep/wechat_callback/routing.py | 45e3e73b84586df877f05a8f9c0b838cde257889 | [] | no_license | largerbigsuper/beep | 71438a4c2feae1afd6ecd25899e95f441bf2165b | a5d84437d79f065cec168f68210c4344a60d08d1 | refs/heads/master | 2022-09-23T02:09:37.117676 | 2020-01-03T06:21:57 | 2020-01-03T06:21:57 | 209,052,138 | 0 | 0 | null | 2022-09-13T23:03:25 | 2019-09-17T12:47:26 | Python | UTF-8 | Python | false | false | 315 | py | from django.urls import path
from . import consumers_wehub, consumers_live, consumers_wehub_task
websocket_urlpatterns = [
path('ws/wehub/', consumers_wehub.WehubConsumer),
path('ws/wehub_task/', consumers_wehub_task.WehubTaskConsumer),
path('ws/live/<str:room_name>/', consumers_live.LiveConsumer),
] | [
"zaihuazhao@163.com"
] | zaihuazhao@163.com |
57609feaa868e5d5d230added1c8394bdd894701 | ed06ef44c944707276a2fca16d61e7820596f51c | /Python/build-array-where-you-can-find-the-maximum-exactly-k-comparisons.py | 1e62106f0b746ff6dded6ba1d710508c12ac3a25 | [] | no_license | sm2774us/leetcode_interview_prep_2021 | 15842bef80637c6ff43542ed7988ec4b2d03e82c | 33b41bea66c266b733372d9a8b9d2965cd88bf8c | refs/heads/master | 2023-05-29T14:14:49.074939 | 2021-06-12T19:52:07 | 2021-06-12T19:52:07 | 374,725,760 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,002 | py | # Time: O(n * m * k)
# Space: O(m * k)
class Solution(object):
def numOfArrays(self, n, m, k):
"""
:type n: int
:type m: int
:type k: int
:rtype: int
"""
MOD = 10**9 + 7
# dp[l][i][j] = number of ways of constructing array length l with max element i... | [
"sm2774us@gmail.com"
] | sm2774us@gmail.com |
9c32666c1d023909998ab37c378f153017c92d8e | bdd40ea113fdf2f04ef7d61a096a575322928d1d | /Rupesh/DjangoTutorial/ecomarce/analytics/admin.py | ab78365d3c71a629a921a000a91bb6fc59872b46 | [] | no_license | rupesh7399/rupesh | 3eebf924d33790c29636ad59433e10444b74bc2f | 9b746acf37ab357c147cdada1de5458c5fc64f53 | refs/heads/master | 2020-12-22T05:01:29.176696 | 2020-03-03T10:32:36 | 2020-03-03T10:32:36 | 202,111,967 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 152 | py | from django.contrib import admin
from .models import ObjectViewed, UserSession
admin.site.register(ObjectViewed)
admin.site.register(UserSession)
| [
"rupesh7399@gmail.com"
] | rupesh7399@gmail.com |
27c774ca6c97f31bc49ca5a0c1b98c71f35dbc89 | 00df54846f8ee079785e39844329cb764c52dcd4 | /message/views.py | bf0fc4d77a173b5e6b8958456a319309963758f5 | [] | no_license | idber/devops | 1d6dcae3f5bdd173b9f38985552d40bea191f0e0 | e0371c4ae7ae552489ea376ecdb72b8847fc41a8 | refs/heads/master | 2020-04-19T15:29:31.884030 | 2019-01-30T01:45:57 | 2019-01-30T01:45:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 938 | py | from django.shortcuts import render
from message.models import Message
from django.http import Http404
from django.contrib.auth.decorators import login_required
# Create your views here.
@login_required
def log_audit(request):
'''
审计日志
'''
if request.user.is_superuser:
logs = Message.objects.a... | [
"ntuwang@126.com"
] | ntuwang@126.com |
9995f2b5def6c1301c8524c51013d6babad47b8d | 457c673c8c8d704ec150322e4eeee2fde4f827ca | /Python Fundamentals - January 2020/Basic_Syntax_Conditional_Statements_and_Loops_Exercise/03_Leonardo_DICaprio_Oscars.py | 57f953fa07bfb812d762ec8c1cb6bd4b23ec85cf | [] | no_license | xMrShadyx/SoftUni | 13c08d56108bf8b1ff56d17bb2a4b804381e0d4e | ce4adcd6e8425134d138fd8f4b6101d4eb1c520b | refs/heads/master | 2023-08-02T03:10:16.205251 | 2021-06-20T05:52:15 | 2021-06-20T05:52:15 | 276,562,926 | 5 | 1 | null | 2021-09-22T19:35:25 | 2020-07-02T06:07:35 | Python | UTF-8 | Python | false | false | 294 | py | oscar = int(input())
if oscar == 88:
print('Leo finally won the Oscar! Leo is happy')
elif oscar == 86:
print(f'Not even for Wolf of Wall Street?!')
elif oscar < 88 and 86 or oscar <= 88:
print("When will you give Leo an Oscar?")
elif oscar > 88:
print("Leo got one already!")
| [
"daredevil91138@gmail.com"
] | daredevil91138@gmail.com |
ebbe6bda3d528d935983968f89a4a23146afb88b | 7b02a5580ff924dce93b85c8614ae5a1468cd15e | /experiment_brain_parcellation.py | 2dc8bc780bd44e4ad11bbf888998f913c2c10f2b | [] | no_license | dr-alok-tiwari/brain_segmentation | 96638aafd891718666e391dac10492b3d2b38e90 | 0b233a78cad1cff686637c90ef04abeef6d830d3 | refs/heads/master | 2023-08-09T15:24:58.312337 | 2015-01-11T17:07:43 | 2015-01-11T17:07:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,808 | py | __author__ = 'adeb'
from shutil import copy2
import inspect
import PIL
import pickle
from spynet.utils.utilities import analyse_classes
from data_brain_parcellation import DatasetBrainParcellation
from network_brain_parcellation import *
from spynet.models.network import *
from spynet.models.neuron_type import *
from ... | [
"adbrebs@gmail.com"
] | adbrebs@gmail.com |
fa626b028d0775bee0feb369374052f9523ec263 | b44a984ac8cfd183e218d56e1ec5d0d3e72d20fd | /High_Frequency/BFS/Normal/Number of Big Islands/bfs.py | 7700361d8fde7e07bf4ccef36dd2c64d3a73a234 | [] | no_license | atomextranova/leetcode-python | 61381949f2e78805dfdd0fb221f8497b94b7f12b | 5fce59e6b9c4079b49e2cfb2a6d2a61a0d729c56 | refs/heads/master | 2021-07-15T20:32:12.592607 | 2020-09-21T00:10:27 | 2020-09-21T00:10:27 | 207,622,038 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,499 | py | import collections
DIRECTIONS = [(0, -1), (0, 1), (-1, 0), (1, 0)]
class Solution:
"""
@param grid: a 2d boolean array
@param k: an integer
@return: the number of Islands
"""
def numsofIsland(self, grid, k):
# Write your code here
if not grid or not grid[0]:
retur... | [
"atomextranova@gmail.com"
] | atomextranova@gmail.com |
63d0fc53f9cc76b62fdd92fc85ebfca1525ae1a9 | f07c7e3966de00005230ebe31ab0579b92b66872 | /math_utils/convolution.py | 6d414a7c9bd485bd3e9a29deee84ce7215587363 | [
"Apache-2.0"
] | permissive | Algomorph/LevelSetFusion-Python | 30d990228e3d63a40668ade58e7879ae6e581719 | 46625cd185da4413f9afaf201096203ee72d3803 | refs/heads/master | 2021-06-25T11:30:44.672555 | 2020-11-11T14:47:33 | 2020-11-11T14:47:33 | 152,263,399 | 12 | 2 | Apache-2.0 | 2019-05-30T23:12:33 | 2018-10-09T14:15:03 | Python | UTF-8 | Python | false | false | 7,026 | py | # ================================================================
# Created by Gregory Kramida on 9/18/18.
# Copyright (c) 2018 Gregory Kramida
# 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 Licen... | [
"algomorph@gmail.com"
] | algomorph@gmail.com |
7e4b361f79a43152d672caa1c83ae56bd44ff673 | 5a25edcf994a760688dc7c933e8071bf4ff24df3 | /exercises/en/exc_04_11_02.py | a9511ce0f53ab920097e6454be946cf6c9569440 | [
"CC-BY-NC-4.0",
"MIT"
] | permissive | heyMP/spacy-course | 8762990ed6179011680730d9c24d5d34c0a8d954 | 3740c717f0d1090b01c1b0fe23f8e30af3bf0101 | refs/heads/master | 2022-11-07T21:52:15.479840 | 2020-06-25T18:13:44 | 2020-06-25T18:13:44 | 275,202,487 | 1 | 0 | MIT | 2020-06-26T16:39:32 | 2020-06-26T16:39:31 | null | UTF-8 | Python | false | false | 419 | py | TRAINING_DATA = [
(
"Reddit partners with Patreon to help creators build communities",
{"entities": [(0, 6, "WEBSITE"), (21, 28, "WEBSITE")]},
),
("PewDiePie smashes YouTube record", {"entities": [____, (18, 25, "WEBSITE")]}),
(
"Reddit founder Alexis Ohanian gave away two Metall... | [
"ines@ines.io"
] | ines@ines.io |
e5536d37b56d755c780c4e6d352acd6422f843bd | 04a4d89bc7915e0624abf95651e5ad21d9ed6da2 | /base/src/cloudstrype/array.py | 8ecac8685d1afb3f2bf4bec40a582be19bf1dc0f | [] | no_license | btimby/cloudstrype-too | 5af8f8a4fecb60838093aafc6de44cab5bf5da7c | 6bc600de7d181c41a9d7e7cca557025c6aea16f2 | refs/heads/master | 2021-04-29T21:49:14.585978 | 2018-02-15T22:18:14 | 2018-02-15T22:18:14 | 121,624,932 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 835 | py | from __future__ import absolute_import
import os
from .base import sync_wrapper
from .auth import AuthClient
ARRAY_URL = os.environ.get('CLOUDSTRYPE_ARRAY_URL', 'http://array/')
class ArrayClient(AuthClient):
base_url = ARRAY_URL
def __init__(self, *args, **kwargs, replicas=1):
super().__init__(*... | [
"btimby@gmail.com"
] | btimby@gmail.com |
507a8251ec9f391f3544477ad1510d2654cb40f3 | 4c4c589f9047c60eb3d65d5a7fa86ded7c6c1d64 | /populators/create_all.py | 333b163df8a55cfe1deeb691c55c3af5c901374b | [] | no_license | navkal/el | 39a27e92283f922219cebffa3821806fe5cd8a5e | a4739dc33022fb1b4e9a6f71ef40c989896b08f5 | refs/heads/master | 2023-08-09T03:35:06.918760 | 2023-08-04T15:57:12 | 2023-08-04T15:57:12 | 237,359,814 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 932 | py | # Copyright 2019 Energize Andover. All rights reserved.
import argparse
import os
import sys
sys.path.append( '../util' )
import util
# Main program
if __name__ == '__main__':
parser = argparse.ArgumentParser( description='Create all Andover databases' )
parser.add_argument( '-d', dest='debug', action='sto... | [
"navkal@hotmail.com"
] | navkal@hotmail.com |
b0d8569db3fe5071021907875f85cbb80e012dd1 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03646/s658997973.py | aa705f075e79683fc7b7b695a6c8322e03dacc5a | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 187 | py | k = int(input())
n = 50
q, r = divmod(k, n)
A = [n-1]*n
for i in range(n):
A[i] += q
for i in range(r):
A[i] += n+1
for j in range(n):
A[j] -= 1
print(n)
print(*A)
| [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
4115eda73266412d21b877ad0115bc888ce614c4 | f9215dc23bf0ab8ef9730e78413e5844247d270b | /jarbas/core/tests/__init__.py | d5b296cc9396389d1a2b48c6d00078e0e120f390 | [
"MIT"
] | permissive | vitallan/jarbas | 6c873c98663e68e5d8c2192d0648c6870a01a4a1 | 2ffdccfec499c271bec13bf518c847d8d5210d94 | refs/heads/master | 2021-01-13T04:31:09.492131 | 2016-09-26T19:39:55 | 2016-09-26T21:27:52 | 69,503,820 | 1 | 0 | null | 2016-09-28T21:07:35 | 2016-09-28T21:07:35 | null | UTF-8 | Python | false | false | 1,606 | py | from datetime import date, datetime
sample_document_data = dict(
document_id=42,
congressperson_name='Roger That',
congressperson_id=1,
congressperson_document=2,
term=1970,
state='UF',
party='Partido',
term_id=3,
subquota_number=4,
subquota_description='Subquota description',
... | [
"cuducos@gmail.com"
] | cuducos@gmail.com |
0ca467d38b50cb1b3fea439d181379282e495201 | e2cf46746537799f2584fa9bc3307c95f11768e3 | /flashsale/jimay/models/order.py | faa88c71549e4202226cdc4bc94d4af4f50fc0ef | [] | no_license | wahello/xiaolusys | 3c7801543d352a7a1b1825481982cea635ebcdd4 | 7296b9b68167001c91f4b07c1f8d441cc5653578 | refs/heads/master | 2020-03-30T03:39:26.485590 | 2018-08-21T06:23:05 | 2018-08-21T06:23:05 | 150,700,684 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,196 | py | # coding: utf8
from __future__ import absolute_import, unicode_literals
import datetime
import hashlib
from django.db import models, transaction
from django.dispatch import receiver
from django.utils.functional import cached_property
from signals.jimay import signal_jimay_agent_order_ensure, signal_jimay_agent_order_... | [
"xiuqing.mei@xiaolu.so"
] | xiuqing.mei@xiaolu.so |
c9b6c3a1c4baa68286a7c7502f3b5d1a66d14d49 | 94f4bb0f6e43b2eb2f1bdb284a580b76121fa9af | /1109.py | ba76a0936d7d3434232ab867509244588d344dbe | [] | no_license | huosan0123/leetcode-py | f1ec8226bae732369d4e1989b99ab0ba4b4061c4 | 22794e5e80f534c41ff81eb40072acaa1346a75c | refs/heads/master | 2021-01-25T11:48:17.365118 | 2019-09-12T15:45:34 | 2019-09-12T15:45:34 | 93,934,297 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 458 | py | class Solution(object):
def corpFlightBookings(self, bookings, n):
"""
:type bookings: List[List[int]]
:type n: int
:rtype: List[int]
"""
if not bookings:
return []
ans = [0] * n
for b in bookings:
ans[b[0]-1] += b[2]
... | [
"noreply@github.com"
] | huosan0123.noreply@github.com |
2f47ca3bbbcb658c413b278edb19c876e0151737 | d5be2d0dadbe7c89642eadae595b6fb739ba1f63 | /Some_python/Genome_Sequencing_Bioinformatics_II-master/18.LinearSpectrum.py | 29c66e8db5505ea9a5774efd8b3e5647cca2b6db | [] | no_license | TomaszSzyborski/Bioinformatics_Specialization | af738599713cebef9d9fdb0265ec473a125df0d1 | 2ceb9d8595904da7dd5f718e82b786e3993957a8 | refs/heads/master | 2020-12-02T19:47:54.635971 | 2017-07-16T20:31:40 | 2017-07-16T20:31:40 | 96,391,119 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,519 | py | '''
LinearSpectrum(Peptide, AminoAcid, AminoAcidMass)
PrefixMass(0) ? 0
for i ? 1 to |Peptide|
for j ? 1 to 20
if AminoAcid(j) = i-th amino acid in Peptide
PrefixMass(i) ? PrefixMass(i ? 1) + AminoAcidMass(j)
LinearSpectrum ? a list consisting of the single integer 0
... | [
"tomasz.szyborski@gmail.com"
] | tomasz.szyborski@gmail.com |
6c9052cd8ec268fdb89ca4c446426047f5b2e64b | 78d35bb7876a3460d4398e1cb3554b06e36c720a | /sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/aio/operations/_express_route_ports_locations_operations.py | 2cc07c596adf32b9e88c46b7057b896344f9f125 | [
"MIT",
"LicenseRef-scancode-generic-cla",
"LGPL-2.1-or-later"
] | permissive | catchsrinivas/azure-sdk-for-python | e35f59b60318a31b3c940a7a3a07b61b28118aa5 | 596227a7738a5342274486e30489239d539b11d1 | refs/heads/main | 2023-08-27T09:08:07.986249 | 2021-11-11T11:13:35 | 2021-11-11T11:13:35 | 427,045,896 | 0 | 0 | MIT | 2021-11-11T15:14:31 | 2021-11-11T15:14:31 | null | UTF-8 | Python | false | false | 7,901 | 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"
] | catchsrinivas.noreply@github.com |
085d88ce79b4c09829e7c422a1acd0f34b144625 | 7e9248f3b79b2ea6698d873189de0c3422997033 | /backend/tasker_business/models.py | cce19087ab6df3c7583760945bc91ed79d08b103 | [] | no_license | crowdbotics-apps/rpa-19128 | cf2c05d0e5e82b9989b8b9694bd48802655e5b3f | 88e35e7b6249fa167bb3dea3730141cb277a8e09 | refs/heads/master | 2022-11-20T03:08:53.659668 | 2020-07-23T18:18:07 | 2020-07-23T18:18:07 | 282,024,497 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,558 | py | from django.conf import settings
from django.db import models
class Timeslot(models.Model):
"Generated Model"
date = models.DateField()
start_time = models.TimeField()
end_time = models.TimeField()
class TaskerAvailability(models.Model):
"Generated Model"
tasker = models.OneToOneField(
... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
b2873364981f6c89eed840b8be52ebb7fb2cd891 | 81f2d4aa3bfb216e04efec81c7f614603a8fd384 | /irekua/rest/utils/permissions.py | a579360cb99113d2a5632cf58fca0969b2adc678 | [] | no_license | CONABIO-audio/irekua | 44564020c342e8bd49a14707f206962869bc026d | 4531a6dbb8b0a0014567930a134bc4399c2c00d4 | refs/heads/master | 2022-12-10T09:43:05.866848 | 2019-10-17T16:18:21 | 2019-10-17T16:18:21 | 170,434,169 | 0 | 1 | null | 2022-12-08T01:44:04 | 2019-02-13T03:32:55 | Python | UTF-8 | Python | false | false | 1,680 | py | from rest_framework.permissions import BasePermission
from rest.permissions import IsAdmin
from rest.permissions import ReadOnly
class PermissionMapping(object):
DEFAULT_PERMISSION = IsAdmin | ReadOnly
def __init__(self, mapping=None, default=None):
if mapping is None:
mapping = {}
... | [
"santiago.mbal@gmail.com"
] | santiago.mbal@gmail.com |
a900434d73f3b5d48843ddb0b816fc9d3d54df50 | 2a1b8a671aceda6bc446f8ce26400aa84fa444a6 | /Packs/OpenPhish/Integrations/OpenPhish_v2/test_data/api_raw.py | 734dfd9cc498a4640f5a22d562a7bb1755d31082 | [
"MIT"
] | permissive | demisto/content | 6d4722d46f0ff0beea2748e9f7de585bf91a78b4 | 890def5a0e0ae8d6eaa538148249ddbc851dbb6b | refs/heads/master | 2023-09-04T00:02:25.618032 | 2023-09-03T21:56:22 | 2023-09-03T21:56:22 | 60,525,392 | 1,023 | 1,921 | MIT | 2023-09-14T20:55:24 | 2016-06-06T12:17:02 | Python | UTF-8 | Python | false | false | 788 | py | RAW_DATA = 'https://cnannord.com/paypal/firebasecloud/83792/htmjrtfgdsaopjdnbhhdmmdgrhehnndnmmmbvvbnmn' \
'dmnbnnbbmnm/service/paypal\nhttp://payameghdir.ir/cxxc/Owa/\nhttps://fxsearchdesk.net/Client' \
'/tang/step4.html\nhttps://fxsearchdesk.net/Client/tang/step3.html\nhttps://fxsearchdesk.net/' ... | [
"noreply@github.com"
] | demisto.noreply@github.com |
718fe8cfe0779e581eb25d464850b5df0c04d846 | f9f54c110fa422408e95deb077bbe594f8aec960 | /epikjjh/sort/sort.py | 63e3e33e2febd51074e1f7c02c8be30ff3a875ba | [
"MIT"
] | permissive | 15ers/Solve_Naively | 39f9dc0e96aef7d957dde33cd1353dd7671aeb9c | 23ee4a3aedbedb65b9040594b8c9c6d9cff77090 | refs/heads/master | 2021-07-07T23:56:10.231601 | 2020-09-10T08:55:44 | 2020-09-10T08:55:44 | 184,999,228 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,092 | py | def selection_sort(arr: list):
for i in range(len(arr)-1, 0, -1):
max_index = i
for j in range(i):
if max_elem < arr[j]:
max_index = j
arr[i], arr[max_index] = arr[max_index], arr[i]
def insertion_sort(arr: list):
for i in range(1, len(arr)):
for j i... | [
"epikjjh@gmail.com"
] | epikjjh@gmail.com |
6f78f852e6aca7f1c649ae0695b2151e991cabc2 | 2bacd64bd2679bbcc19379947a7285e7ecba35c6 | /1-notebook-examples/keras-udemy-course/cnn_class2/use_pretrained_weights_resnet.py | 48c6bc23ebedeb15802fec8078bb5d46dd73b5ff | [
"MIT"
] | permissive | vicb1/deep-learning | cc6b6d50ae5083c89f22512663d06b777ff8d881 | 23d6ef672ef0b3d13cea6a99984bbc299d620a73 | refs/heads/master | 2022-12-12T15:56:55.565836 | 2020-03-06T01:55:55 | 2020-03-06T01:55:55 | 230,293,726 | 0 | 0 | MIT | 2022-12-08T05:27:43 | 2019-12-26T16:23:18 | Jupyter Notebook | UTF-8 | Python | false | false | 4,849 | py | # https://deeplearningcourses.com/c/advanced-computer-vision
# https://www.udemy.com/advanced-computer-vision
from __future__ import print_function, division
from builtins import range, input
# Note: you may need to update your version of future
# sudo pip install -U future
from keras.layers import Input, Lambda, Den... | [
"vbajenaru@gmail.com"
] | vbajenaru@gmail.com |
b46ff85b0961b21961ea9d2a07ee248a8ad4b92e | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/nouns/_portico.py | 71356c0776ec5f684070f1cc1c5508df8c828aeb | [
"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 | 385 | py |
#calss header
class _PORTICO():
def __init__(self,):
self.name = "PORTICO"
self.definitions = [u'a covered entrance to a building, usually a large and impressive building, that is supported by columns']
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.specie = 'nouns... | [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
23228fca858ae9f4969e14f3cfd351321ad5a08f | bc2ea53e1dbbda6818efae0e30c93498562f850a | /setup.py | 439d3a7315cf802b47906b6e1a22207c6dad985a | [
"BSD-2-Clause"
] | permissive | zmedico/gemato | fa47db3320824fca5ff5e1dfdd04391ff9c081e6 | 2a3c4354ba3c3515a86b81782ab30a34a14faea2 | refs/heads/master | 2021-10-23T13:16:10.822184 | 2019-03-16T07:51:59 | 2019-03-16T07:51:59 | 112,166,687 | 1 | 1 | null | 2017-11-27T08:09:08 | 2017-11-27T08:09:08 | null | UTF-8 | Python | false | false | 1,187 | py | #!/usr/bin/env python
# vim:fileencoding=utf-8
# (C) 2017-2018 Michał Górny <mgorny@gentoo.org>
# Licensed under the terms of 2-clause BSD license
from setuptools import setup
setup(
name='gemato',
version='14.0',
description='Gentoo Manifest Tool -- a stand-alone utility to verify and update Gentoo Mani... | [
"mgorny@gentoo.org"
] | mgorny@gentoo.org |
1a01c08c797dcb23bf43fe33e045c0e7ca633adf | dd59a809da984f59315110aa019eabfbbf1a547d | /submissions/AlexMiller/AlexMiller-stitch_and_average.py | 38ff80363396aa0910870fb9a96217aaaa6f5d93 | [] | no_license | tranhoangkhuongvn/dc-michelin-challenge | f679b55a0d595c56cbc3c82e8673fb1c49bdeb44 | a34e8183f0c04314ee433852d3567c6b88a3aee6 | refs/heads/master | 2020-04-18T10:05:50.661201 | 2016-10-15T20:01:49 | 2016-10-15T20:01:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 889 | py | import pandas as pd
import pdb
import random
prefix = "/media/alex/HD/"
# prefix = "D:/"
prefix2 = "/media/alex/SSD/"
# prefix2 = "C:/"
#Read in the original DC dataset
df = pd.read_csv(prefix+"Documents/Data/Yelp/dc.csv",header=0,encoding="latin1")
#Keep only restaurant name, review date, price rating, average sco... | [
"alex.k.miller@gmail.com"
] | alex.k.miller@gmail.com |
e0b4271157ee723d721cd2ef40b941481e4d51da | f80ef3a3cf859b13e8af8433af549b6b1043bf6e | /pyobjc-framework-Quartz/Examples/Programming with Quartz/BasicDrawing/MyView.py | d13dea356b286df29b777944be4bb3413e728402 | [
"MIT"
] | permissive | ronaldoussoren/pyobjc | 29dc9ca0af838a56105a9ddd62fb38ec415f0b86 | 77b98382e52818690449111cd2e23cd469b53cf5 | refs/heads/master | 2023-09-01T05:15:21.814504 | 2023-06-13T20:00:17 | 2023-06-13T20:00:17 | 243,933,900 | 439 | 49 | null | 2023-06-25T02:49:07 | 2020-02-29T08:43:12 | Python | UTF-8 | Python | false | false | 4,743 | py | import AppDrawing
import Cocoa
import Quartz
import FrameworkTextDrawing
import FrameworkUtilities
import objc
import UIHandling
import PDFHandling
from objc import super
# XXX: Why are these global?
_drawingCommand = UIHandling.kHICommandSimpleRect
_pdfDocument = None
class MyView(Cocoa.NSView):
currentMenuItem... | [
"ronaldoussoren@mac.com"
] | ronaldoussoren@mac.com |
9a3ca5f038df2d91274264f5c5e0e84d04919a94 | 9745e5d8acae70bcdd7011cc1f81c65d3f5eed22 | /Interview Preparation Kit/Stacks and Queues /Min Max Riddle/solutions.py | fa525d9722e71608c301d368bff05d2bbd5b24a6 | [] | no_license | rinleit/hackerrank-solutions | 82d71b562d276ec846ab9a26b3e996c80172f51e | 519a714c5316892dce6bd056b14df5e222078109 | refs/heads/master | 2022-11-10T05:08:11.185284 | 2020-07-02T01:34:35 | 2020-07-02T01:34:35 | 254,403,657 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 744 | py | #!/bin/python3
import os
import sys
# Complete the riddle function below.
def riddle(arr):
maxes=[float("-inf")]*len(arr)
for i in range(0,len(arr)):
# find biggest window for which i is a minimum
right=i
left=i
while right+1<len(arr) and arr[right+1]>=arr[i]:
righ... | [
"rinle.it@gmail.com"
] | rinle.it@gmail.com |
4b5e7e285b8e0c0129a0dff3c8dc00f64d5ef802 | 9df2fb0bc59ab44f026b0a2f5ef50c72b2fb2ceb | /sdk/paloaltonetworks/azure-mgmt-paloaltonetworksngfw/generated_samples/prefix_list_global_rulestack_get_maximum_set_gen.py | c8ef113d486bafe5a4bee4d324a8a7d46b6bcafb | [
"MIT",
"LGPL-2.1-or-later",
"LicenseRef-scancode-generic-cla"
] | permissive | openapi-env-test/azure-sdk-for-python | b334a2b65eeabcf9b7673879a621abb9be43b0f6 | f61090e96094cfd4f43650be1a53425736bd8985 | refs/heads/main | 2023-08-30T14:22:14.300080 | 2023-06-08T02:53:04 | 2023-06-08T02:53:04 | 222,384,897 | 1 | 0 | MIT | 2023-09-08T08:38:48 | 2019-11-18T07:09:24 | Python | UTF-8 | Python | false | false | 1,652 | 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"
] | openapi-env-test.noreply@github.com |
4948b993f20d3fd92127a96ca2711c9fa8bf6de4 | 7dbcbec8cfd75576d1be86270899b6642e0e9d70 | /testhtmlserv.py | b84d1716321ed64ef1a70b2c87ecb3637afdf4c0 | [] | no_license | huangnauh/learnpython | b72f43572cd42b962c11688c65437cca0b081f4f | e25f582a7811aa63de2f533736921529b600bcc8 | refs/heads/master | 2021-01-22T23:25:30.370990 | 2015-03-23T13:51:06 | 2015-03-23T13:51:06 | 23,954,680 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,619 | py | #!E:/python34/python.exe
#coding= utf-8
from http.server import BaseHTTPRequestHandler #BaseHTTPRequestHandler类细分到处理每个协议的方法,这里是‘GET’方法的例子
import urllib.parse
class GetHandler(BaseHTTPRequestHandler):
def do_GET(self): #重写这个方法
parsed_path = urllib.parse.urlparse(self.path)
message_parts = [ #建立... | [
"huanglibo2010@gmail.com"
] | huanglibo2010@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.