blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 281 | content_id stringlengths 40 40 | detected_licenses listlengths 0 57 | license_type stringclasses 2
values | repo_name stringlengths 6 116 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 313
values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 18.2k 668M ⌀ | star_events_count int64 0 102k | fork_events_count int64 0 38.2k | gha_license_id stringclasses 17
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 107
values | src_encoding stringclasses 20
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.02M | extension stringclasses 78
values | content stringlengths 2 6.02M | authors listlengths 1 1 | author stringlengths 0 175 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5814667ab2dc78a084fcc28e328da9c0ea52a717 | 1af743e49691ea957f9dde256bf12454b7d8bf1b | /ta/swagger_server/models/battery_params.py | 11161083bbb0980a637a88041eb23f1222331b94 | [] | no_license | cmu-mars/RoboTest | bfbba0e90e4d6e967a4872c0bf8f243b0bcc34cd | 8654cf78f8ec382ac10c7b9b2dd6fee6a69d5d9b | refs/heads/master | 2021-06-28T16:32:01.796954 | 2020-01-18T03:39:49 | 2020-01-18T03:39:49 | 233,116,142 | 0 | 0 | null | 2021-06-02T00:52:01 | 2020-01-10T19:26:50 | Python | UTF-8 | Python | false | false | 2,212 | py | # coding: utf-8
from __future__ import absolute_import
from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401
from swagger_server.models.base_model_ import Model
from swagger_server import util
class BatteryParams(Model):
"""NOTE: This class is auto generated by the swagg... | [
"suj@email.sc.edu"
] | suj@email.sc.edu |
37918e456f1093d2e322b5cc2db239b82e6e9ef2 | 3cfec03e77dc2e75d74febb502685792c074efca | /train_process.py | 311a69b3c828852eef6f5de1a2493a5538784f27 | [] | no_license | Vinayak-5349/deep_cricket | b26fdbb6b554e0b2370bbd76955ac2deb10635a4 | d935effe0f98eb0237e292400ac2a29f1e9023a8 | refs/heads/master | 2023-03-17T09:32:15.688911 | 2018-12-20T14:00:13 | 2018-12-20T14:00:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,059 | py | import torch
import torch.nn as nn
from torch import optim
import torch.nn.functional as F
import torchvision.models as models
from torchvision import transforms
import glob
import cv2
import numpy as np
from __future__ import print_function, division
import pandas as pd
import time
device = torch.device("cuda" if tor... | [
"gouthamkumarvgk@gmail.com"
] | gouthamkumarvgk@gmail.com |
2f4272b7fb57d5ae830a86778c740c33d3acbb78 | 59b3acec6c6a021528682573e478ced2794c6b03 | /Py4eSpec/02-PDS/myCode/fileOpen.py | 3cab1975d253f82ecbc7468904dcf24f02da2a21 | [] | no_license | charlesluch/Code | f9ed52e5cfb45917baf35277cdf8da68e54332ea | a9d772d73ab40bd01266d7d833dbeab95797bf44 | refs/heads/master | 2021-10-09T01:41:48.815186 | 2018-12-20T02:59:15 | 2018-12-20T02:59:15 | 131,547,087 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 446 | py | # 7.1 Write a program that prompts for a file name, then opens that file and reads through the file, and print the contents of the file in upper case. Use the file words.txt to produce the output below.
# You can download the sample data at http://www.py4e.com/code3/words.txt
# Use words.txt as the file name
fname =... | [
"c_luchetti@hotmail.com"
] | c_luchetti@hotmail.com |
727fc97005633da5105c31d875de048d679cb327 | 17268419060d62dabb6e9b9ca70742f0a5ba1494 | /pp/samples/191_mirror_h.py | 5d5f8caa93016a9121b917401e02a52f9b2ade76 | [
"MIT"
] | permissive | TrendingTechnology/gdsfactory | a19124423b12cbbb4f35b61f33303e9a012f82e5 | c968558dba1bae7a0421bdf49dc192068147b776 | refs/heads/master | 2023-02-22T03:05:16.412440 | 2021-01-24T03:38:00 | 2021-01-24T03:38:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 188 | py | if __name__ == "__main__":
import pp
c = pp.Component()
m1 = c << pp.c.mmi1x2()
m2 = c << pp.c.mmi1x2()
m2.reflect_h(port_name="E1")
m2.movex(10)
pp.show(c)
| [
"noreply@github.com"
] | noreply@github.com |
42cb93ad311b8c7bb7ac5e8bbedb918897b219d6 | 58b709056e6cf578c02681b2c3d709cf6e175de3 | /Prac_09/sort_files_2.py | 119d68c884a2a51d4a617d61bc37ec3e7304ee2e | [] | no_license | imnkywf/CP1404praticals | c70efd9e02772deac3d501f561524f3b0ae25484 | 582ab50b67a21d048652927bbfbcc2af2bf91d49 | refs/heads/master | 2023-04-29T09:57:31.316264 | 2021-05-19T05:58:15 | 2021-05-19T05:58:15 | 353,263,557 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 418 | py | import os
category = []
os.chdir("FilesToSort")
path = "."
files = os.listdir(path)
for filename in files:
extension = filename.split('.')[-1]
print("{} file".format(extension))
if extension not in category:
new_dir = input("What category would you like to sort {} files into? ".format(extension)... | [
"yiwei.fan@my.jcu.edu.au"
] | yiwei.fan@my.jcu.edu.au |
02b92d92f732d2e44906cebf9d57c84e87516241 | a18ff11fca8810be96bdb23e76e6c0e97d2579ee | /contrib/bitrpc/bitrpc.py | 41f3d82888b779542fa54287723aa8858624e7ea | [
"MIT"
] | permissive | cryptocurinfo/sovereigncoin | 66f33cce584540b2d095801a8902224d08638c82 | 118b6705f176051403735116499691d35ce1f103 | refs/heads/master | 2020-03-30T10:35:48.196810 | 2014-10-26T03:51:47 | 2014-10-26T03:51:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,837 | py | from jsonrpc import ServiceProxy
import sys
import string
# ===== BEGIN USER SETTINGS =====
# if you do not set these you will be prompted for a password for every command
rpcuser = ""
rpcpass = ""
# ====== END USER SETTINGS ======
if rpcpass == "":
access = ServiceProxy("http://127.0.0.1:27004")
else:
access = Se... | [
"roger.k.h.3@gmail.com"
] | roger.k.h.3@gmail.com |
8813f6544d2ccea3832683f456c77c7e969252cd | 11d697345808e3630985d70600fd6f2bed1ac7e5 | /slacktheme/models.py | 519400c4f6b64e846e1d9bf5d6e8f82435b917a8 | [] | no_license | openhealthcare/opal-slacktheme | ce97ddac3c490ed19a3ab96dd85a17eec010cff5 | c819e02f9e4a45a554ae5b49d28b95a812a86bca | refs/heads/master | 2021-01-19T22:52:41.572813 | 2017-06-08T13:21:42 | 2017-06-08T13:21:42 | 88,879,256 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 251 | py | """
Models for slacktheme
"""
#
# Warning - even if you don't have any models, please don't delete this file.
# Some parts of Django require you to have something it can import called
# slacktheme.models in order for us to let you be a Django app.
# | [
"david@deadpansincerity.com"
] | david@deadpansincerity.com |
fe1155c8ff3f89a2bfb40b7f2ccfda48fcecb345 | 2b4c966449521584972ad2916a0142964b088728 | /Alteryx_TQL/Code/tsTQL/tsTQL.py | 6783639ec4cac22b602a90e50995ba8302c71a5b | [
"MIT"
] | permissive | sameersatyam/community-tools | 8ae512c87910b541802de1379cf9ede7a439ec89 | 4b8a257371604204b221822715718c5b29cfff18 | refs/heads/master | 2020-06-01T05:22:26.920339 | 2019-06-06T14:44:50 | 2019-06-06T14:44:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,492 | py | import AlteryxPythonSDK as Sdk
import xml.etree.ElementTree as Et
import select
import gzip
import sys
from classes.sshClient import sshClient
class AyxPlugin:
"""
Implements the plugin interface methods, to be utilized by the Alteryx engine to communicate with a plugin.
Prefixed with "pi", the A... | [
"kendrickcheath@gmail.com"
] | kendrickcheath@gmail.com |
ba76c73c721d2e7dce88a5c8b406da79875e6b43 | a995c3ba49df323ae95d1348231a4155f43ae83d | /BuildingManagerCore/models.py | cae8b6ee94f28c387a6ec998411174d773ee921e | [] | no_license | sdosis/BuildingManager | 44e53888e9165d0c1dddc0077703229abaa77af7 | 212c88b812a41fcfbaf5182a1b494807c70aa5ac | refs/heads/master | 2021-04-26T23:18:15.827692 | 2018-03-16T07:50:28 | 2018-03-16T07:50:28 | 123,966,790 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,702 | py | from django.db import models
from django_neomodel import DjangoNode
from neomodel import StructuredNode, StringProperty,RelationshipTo,RelationshipFrom,UniqueIdProperty
# Create your models here.
class Building(models.Model):
address = models.CharField(max_length=100)
def __str__(self):
return self.ad... | [
"spyridon.dosis@gmail.com"
] | spyridon.dosis@gmail.com |
e3e96c55bff7e7233f26119f874a33cbfcf4140e | 8f7302ed3fc44722405461169b6f406fbde1ca4d | /statlas/config/base.py | 3f102a9d57033500ef958f53b6433af1a8dea8c8 | [] | no_license | MonsterSwell/Statlas | c7312d5921c6ec88d11390c8b54412074acf9ebb | a77c9c556ca839386173420de97ec988a0226a6c | refs/heads/master | 2021-01-01T15:35:39.495507 | 2011-06-28T18:39:06 | 2011-06-28T18:39:06 | 1,222,459 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,016 | py | import socket
import os.path, functools
from fluxdeps.helpers import get_secret_key
DEBUG = True
"""
Some helper functions for making life easy
"""
# Helper for translations
# http://docs.djangoproject.com/en/dev/ref/settings/#languages
gettext = lambda s: s
# The actual site root and a helper function to point t... | [
"kilian@kilianvalkhof.com"
] | kilian@kilianvalkhof.com |
0e72a7a1739168e4bdf4ea279ad566cb2856b350 | 7b2d5f751abad4d0747017931cdcf49b9929d9e5 | /api/functions.py | ee539fbf60fcef316519ca45744cfe5e19dd4e64 | [] | no_license | r-i-c-h-a/Recipe_Generator | 412a8eb6b9a4de6c8e58bb979832f04a86c526f9 | 1953f7f1d04fc1909fd6e0180df953170cd9fc19 | refs/heads/master | 2022-09-22T02:42:47.375890 | 2020-05-31T08:52:13 | 2020-05-31T08:52:13 | 268,240,373 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,079 | py | import pandas as pd
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import linear_kernel
from rake_nltk import Rake
import numpy as np
from sklearn.metrics.pairwise import cosine_similarity
from sklearn.feature_extraction.text import CountVectorizer
def return_csv():
df =... | [
"kirthikagurumurthy@gmail.com"
] | kirthikagurumurthy@gmail.com |
07ef2d67568565f349ca85383443d41d67fd187a | 72c4177c189c339a43e0dada7d008b14ba485d87 | /mlclass-ex4/main.py | 169564de1c76f778f19ef925ec569b6d28e61188 | [] | no_license | jeffin143/neuralnetworkdigits | 9383d816f73d22ebd84f94a70ae24c362c01ee79 | 8feadd989760324fb1b1e5209ed757da72ea9471 | refs/heads/master | 2021-09-05T16:00:21.653869 | 2018-01-29T14:10:30 | 2018-01-29T14:10:30 | 119,390,432 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,237 | py | #!/usr/bin/env python
#
# Neural network learning
#
# depends on
#
# displayData.py
# sigmoidGradient.py
# randInitializeWeights.py
# nnCostFunction.py
#
import scipy.io
import random
import time
import numpy as np
import displayData as dd
import nnCostFunction as nncf
import sigmoidGradient as sg
... | [
"noreply@github.com"
] | noreply@github.com |
271916c172d033c6c05adf04acde7f202951f0ef | 480733d1e6f79f906dec32990327a408289a15e4 | /Magisterka/venv/Animation/Animation_test2.py | 34c4e76b02f282792815d5ebfee49ca29bc34438 | [] | no_license | ksia4/Guided_Waves | 6f3b73892ce7f83c3f69a71aeb53f0414433ffca | 7396707ee4838c92583ad9e5fbd1d04e020d365a | refs/heads/master | 2020-03-09T13:54:27.911906 | 2018-09-15T18:12:10 | 2018-09-15T18:12:10 | 128,822,364 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,365 | py | import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from multiprocessing import Process
import time # optional for testing only
import matplotlib.animation as animation
# A. First we define some useful tools:
def wait_fig():
# Block the execution of the code until the figure is closed.
# This... | [
"ksia4@onet.eu"
] | ksia4@onet.eu |
c7061c5f8e05414df5cf2cb7e57ffafa7e7e342a | 9cfea31898f5db9937ffeb34b9b33d2320daae5a | /code/Andre/py/fit_unet_d8g_222_swrap_09.py | 81526826f7ff216c39a745e2e8099bdd1de4e895 | [
"MIT"
] | permissive | tjvananne/kaggle_dsb2017 | 8720953ebba2b29ae3406652352df4b691ce26e4 | 21b9afa60d8c675314f81f04d6d65c3b9f6b7d7e | refs/heads/master | 2021-01-19T13:56:38.720868 | 2017-08-28T12:22:02 | 2017-08-28T12:22:02 | 100,864,262 | 0 | 0 | null | 2017-08-20T13:44:03 | 2017-08-20T13:44:03 | null | UTF-8 | Python | false | false | 19,086 | py | """
Created on Thu Jan 26 17:04:11 2017
@author: Andre Stochniol, andre@stochniol.com
Fit unet style nodule identifier on Luna databaset using 8-grid scheme
Physical resolution 2x2x2mm
Data aggregated, shuffled; wrap augmentation used (swrap)
"""
import numpy as np
from keras.models import load_model,Model
from k... | [
"andre@stochniol.com"
] | andre@stochniol.com |
477013e5b80fbe6433a29b90140bcb738762033d | 0a53386c822a0da605cba397935620d2f919032d | /dfs/number-of-islands.py | 7659c48f20b2b5280443bb6f42eca0437fc2158c | [] | no_license | casprice/leetcode | 6eb893302db891b90efbeece21d64b9906ebe414 | 6cf53450dac3d7dfa70dd0adf001826f70f0d93d | refs/heads/master | 2021-05-20T11:53:44.014003 | 2021-03-02T06:19:01 | 2021-03-02T06:19:01 | 252,284,532 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,494 | py | """
Given an m x n 2d grid map of '1's (land) and '0's (water), return the number of islands.
An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically.
You may assume all four edges of the grid are all surrounded by water.
Example 1:
Input: grid = [
["1","1","1","1","0... | [
"caseyprice217@gmail.com"
] | caseyprice217@gmail.com |
6b06d564d2d0c4a0ab94bf7e6bb3e0a1bdeba2d5 | 25cb12b478069983bc1a95759e8532e477aa060a | /pythonclub/clubapp/views.py | 01245376092594b26ee893b35f5a77564f9123a8 | [] | no_license | loowa103118/itc172 | c5ef06caafef729c7459252700ac5aebab322443 | d1eecf4a8602e6edabb568393249d3370a28ca45 | refs/heads/master | 2021-02-16T17:34:28.275125 | 2020-03-05T20:56:18 | 2020-03-05T20:56:18 | 245,029,503 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 329 | py | from django.shortcuts import render
from .models import Meeting
# Create your views here.
def index (request):
return render(request, 'clubapp/index.html')
def getmeetings(request):
type_list=Meeting.objects.all()
return render(request, 'clubapp/meeting.html', {'type_list': type_list})
... | [
"noreply@github.com"
] | noreply@github.com |
3d6cb95fc47c06f4f11195e9bf3a907133255e25 | 9d2ad070773c6d594143180a1414fce2fb58f724 | /InvertedIndex2/mapper.py | 87465af510d498438a6ca484cfadb8352df42a73 | [] | no_license | ndhuanhuan/Map-Reduce-Recipe | 6387c26a3ac32147358490e0728f817dddb305cb | c100019a0f2f4a3916fd4c4526ae96b27ba49384 | refs/heads/master | 2021-01-10T19:47:59.165228 | 2015-12-03T05:29:42 | 2015-12-03T05:29:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 575 | py | #! /usr/bin/python
import sys
def read_mapper_input(stdin):
for line in stdin:
yield line.rstrip()
def mapper():
for line in read_mapper_input(sys.stdin):
# one line is one document
data = line.strip().split(' ')
line_id = data[0]
tf_dict = dict()
for word in dat... | [
"linkin816@gmail.com"
] | linkin816@gmail.com |
91a7fe6d28615378758879c6f36075f5adedbe01 | b3ba44e47a9632007601a87df9ac5d39adb2bc4a | /PhaseTwo/classify.py | 0e8627690b4ac1384df0955c69d9829b7f447266 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | FredrikBakken/TDT4305_Big-Data-Project | ece04fb81b3a664bfa24b6ce3bea421baa873f7e | 982ead4d4c76da8217b05b8352e7999204a8eb85 | refs/heads/master | 2021-01-25T12:19:25.123121 | 2018-04-24T11:11:55 | 2018-04-24T11:11:55 | 123,464,318 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,646 | py | '''
' Classify.py
'''
import argparse
from pyspark import SparkConf, SparkContext
# Used headings
PLACE_NAME = 4
TWEET_TEXT = 10
# Generate a mapped training set sample (place and tweet)
def generate_training_set(data):
training_sample = data.sample(False, 0.1, 5) # According to specifications in presentatio... | [
"fredda10x@gmail.com"
] | fredda10x@gmail.com |
ba0c3046a3a8852a216474f3af4020d288e50a42 | 84eb5adc8b4278e41e33e13c452c02a7e431474e | /getWifiPassword.py | 1fbe92836f4f823b0b829d4a49713ae054b0ad05 | [] | no_license | zhuixunfreedom/GetWifiPassword | 680b14e188630b3a65b1e34dea057b194f0b284b | 3e31d19c4d9facb465112993e6d2c44765e591e0 | refs/heads/master | 2020-07-26T07:30:48.568488 | 2019-09-15T10:50:25 | 2019-09-15T10:50:25 | 208,577,565 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,834 | py | import pywifi
import time
from pywifi import const
class PoJie:
def __init__(self, name):
self.name = name
wifi = pywifi.PyWiFi() # 抓取网卡接口
self.iface = wifi.interfaces()[0] # 获取网卡
self.iface.disconnect() # 断开所有连接
time.sleep(1)
if self.iface.status() in [const.IFA... | [
"noreply@github.com"
] | noreply@github.com |
53cf62af1ec166ceb31aee038518a14e5a1f77e8 | d0fa2ee7a3e7dda964a7b7a9f6b4e54a0d8f394b | /service.py | a1dfb03bca5c81918027c699374f46fe6c344638 | [] | no_license | swachalit/instance_manager | 891b70748a500f4cf2f44feba1b3f91220fe069d | 22430b68e167f3c503eefbdbd95217826d838daa | refs/heads/master | 2020-03-07T22:16:28.551104 | 2016-11-06T13:01:04 | 2016-11-06T13:01:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,429 | py | # -*- coding: utf-8 -*-
import boto3
import sys
from botocore.exceptions import ClientError
def start_instances(instance_ids):
ec2_conn = boto3.client('ec2')
try:
starting = ec2_conn.start_instances(InstanceIds=instance_ids)
waiter = ec2_conn.get_waiter('instance_running')
waiter.wait(InstanceIds=inst... | [
"lauriku@gmail.com"
] | lauriku@gmail.com |
896b169f6eb92d85606ba89c666380d61e7ab184 | d78ba4c4a3de3e0fc78ee7ac8ac615a2d2f40fd7 | /purepython/stepikcourse/01/06/task012.py | 4544eb20963bdc0911dafb5c4a41a0b8d83c873c | [] | no_license | vngilev/python_study | dd069461de383e50959920cb5201e491e7510f54 | 44a0d3ae60f8148e3b3e93599e3b62748528deaa | refs/heads/master | 2020-04-02T17:36:08.690187 | 2018-11-16T08:06:07 | 2018-11-16T08:06:07 | 154,664,003 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 223 | py | import pdb
class A:
def foo(self):
print("A")
class B(A):
pass
class C(A):
def foo(self):
print("C")
class D:
def foo(self):
print("D")
class E(B, C, D):
pass
pdb.set_trace()
E().foo() | [
"vngilev@yandex.ru"
] | vngilev@yandex.ru |
b66b553c25e7ecba6e29529142ca10f6964daa28 | c710de1d5d9af53140f4ad6ff3ddac509878c00e | /zqxt_tmpl/zqxt_tmpl/urls.py | ce908befded2f8a4c72d07225bac627594add005 | [] | no_license | zspo/Django | 417b5ce9a3b039354adf7a4365bbf1d84edeafe9 | e6b0a0acaaca268ff347975100f18daa0fcb6757 | refs/heads/master | 2020-04-12T18:09:30.647378 | 2018-12-23T10:39:00 | 2018-12-23T10:39:00 | 162,671,037 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 990 | py | """zqxt_tmpl URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-bas... | [
"songpo.zhang@foxmail.com"
] | songpo.zhang@foxmail.com |
2f899fa8e139719fb4ba62ee2665ec2bf83f1719 | f3212e12fc9a8783663a3f9123caa65b891045ae | /c_dcgan.py | 0dbbc95690e1f42466b9f67f14e7a6fccc153203 | [] | no_license | nenoNaninu/DeepPractice | 5995effcf74ef3468c6a575299b209b1ee1f82fc | f82442ca41ae5e3a8e5a4d1068844bd7a4c0100d | refs/heads/master | 2020-05-21T11:34:55.339672 | 2019-05-27T17:26:48 | 2019-05-27T17:26:48 | 186,030,410 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,370 | py | # -*- using:utf-8 -*-
from torchvision.datasets import ImageFolder
from torchvision import transforms
from torch.utils.data import DataLoader
from torch import nn, optim
import torch
from statistics import mean
from tqdm import tqdm
from torchvision.utils import save_image
import os
class ConditionalGenerator(nn.Modu... | [
"neno@neno.dev"
] | neno@neno.dev |
88c59e38f530f63fc4239938144ad7fa4298982c | 3f28a3af1595a540e00e656ff88259b3409ae3e4 | /data/scripts/generate_from_json.py | 8973b900d427240213ea2648dcf9979ca1978469 | [] | no_license | nmarsha3/homecarehelper | 7b84ef5bb45f1f2b1413d3845e4e61b33d83efec | b95fefdbaaf3a108554e3004eb24cc3994791726 | refs/heads/main | 2023-05-11T21:14:07.476495 | 2021-05-16T20:52:44 | 2021-05-16T20:52:44 | 349,526,117 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 199 | py | import sys
import json
names = {}
with open(sys.argv[1]) as f:
names = json.load(f)
outfile = open(sys.argv[2], "w+")
for key in names:
outfile.write(key)
outfile.write("\n")
outfile.close()
| [
"mrauch2@nd.edu"
] | mrauch2@nd.edu |
27d25a48451ddf4fd37788f53f17ab7d7bbbb843 | b71f656374293c5f1238fcb449aa4dde78632861 | /eudplib/eudlib/memiof/byterw.py | c6a45de2f0bcb03d62c384d553512caacbd340cb | [
"MIT"
] | permissive | tobeinged/eudplib | ce1cdc15f7ec6af857b4b64b5c826b3dd95d3e48 | 066c0faa200dc19e70cdb6979daf8f008b8ae957 | refs/heads/master | 2023-05-04T08:49:01.180147 | 2019-03-18T14:30:29 | 2019-03-18T14:30:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,708 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
'''
Copyright (c) 2014 trgk
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, mo... | [
"phu54321@naver.com"
] | phu54321@naver.com |
3f9d44ac09fcb46e8ee4ff49748713005be0c764 | d9d371febea18529e881cc15e49c3716401318f7 | /Artificial Intelligence/Othello/mymod.py | 1aafaf852bec4dca91e31570dbd885ed52dc3b16 | [] | no_license | ryanjhelmlinger/Code-Examples | 691eb0cdc077195d8a8b4a16dc52404c92c92ff9 | a15e1a4414ded21c5a1d143d6a13c430b7323729 | refs/heads/master | 2022-01-24T03:25:44.378473 | 2019-08-26T13:08:03 | 2019-08-26T13:08:03 | 113,651,714 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,955 | py | ##################################################
#
# Torbert, 18 December 2015
#
##################################################
#
from subprocess import Popen
from subprocess import PIPE
from subprocess import TimeoutExpired
#
from time import time
#
##################################################
#
TIME... | [
"noreply@github.com"
] | noreply@github.com |
800409a84e64c224bea3aaf3a75bc133d465f92c | f52f8372b8352a4d85d2611044728d38d2cb8d82 | /train.py | 9ac442d2583ae15e658fc6312a4b65ee2c77cbd2 | [] | no_license | tsmotlp/deepID | 5f21cde275af158fb01526fc67bfb310b1ce2ee8 | a8c53de50d75de7c8cd2f482a7b9b026097422ff | refs/heads/master | 2020-04-13T05:31:50.873682 | 2018-12-25T01:21:15 | 2018-12-25T01:21:15 | 162,994,788 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,113 | py | import argparse
import torch
import torch.utils.data as Data
from torch.autograd import Variable
import os
import cv2
import numpy as np
import random
from torchvision import transforms
from skimage import io as sio
from deepID_1 import deepID_1
from dataset import get_dataset
from vis_tools import Visualizer
import to... | [
"noreply@github.com"
] | noreply@github.com |
f8b189694e1c922379443954f32ab60619f86fd9 | 717e17c69a562e842cbd29b6143a5a87f5e43482 | /review4/manage.py | 61f99e6ff1ff07610293ab33c21b076ac477bb7b | [
"MIT"
] | permissive | JeaDong/WEB | 906f486619e999157395920c94e9ab2dcfc6a555 | 5402c1852bdd11385987864a5e292bf3c8fe17c0 | refs/heads/master | 2022-12-09T15:06:03.476140 | 2018-04-03T06:26:23 | 2018-04-03T06:26:23 | 124,837,509 | 0 | 0 | null | 2022-12-08T00:00:26 | 2018-03-12T05:23:43 | Python | UTF-8 | Python | false | false | 715 | py | #!/usr/bin/env python
import os
from app import create_app, db
from app.models import User, Role, Post
from flask_script import Manager, Shell
from flask_migrate import Migrate,MigrateCommand
''', Mig'''
app = create_app(os.getenv('FLASK_CONFIG') or 'default')
manager = Manager(app)
migrate = Migrate(app, db)
def mak... | [
"704404536@qq.com"
] | 704404536@qq.com |
c7db0c3ed1a90f40d7b254bb89c94c3c62eee791 | 70d3b3be21127984799c79e38bd25f93fe41f59e | /Shipment/migrations/0001_initial.py | d07b8d3c9652dd2bce13d59601f5bb0ceeaa9d77 | [] | no_license | LongCohol/HerokuKMOUWebsite | 693cd8a5e50aa896b943bce8cd1e381908e9e519 | 0e82347615f1b7154ee84e22b33d396cc6c19b73 | refs/heads/master | 2023-06-05T06:33:26.456358 | 2021-06-27T12:14:32 | 2021-06-27T12:14:32 | 380,637,903 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,958 | py | # Generated by Django 3.2 on 2021-06-27 21:12
import Shipment.models
from django.db import migrations, models
import django.utils.timezone
import override_existing
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
na... | [
"controllabbusan@gmail.com"
] | controllabbusan@gmail.com |
cc997c66aa7c0603bbc734ce62e689cd06b97a65 | 1b5d39f9dd5126b6f21e83efe58b7e86ef8d94f2 | /CodeChef/LTIME80B/CARR.py | 22f1cdd88dba474004c0ee9865be462ca2cd7494 | [] | no_license | jai-dewani/Competitive-Programming | dfad61106a648b80cc97c85cc5c8bc5d1cd335d9 | a2006e53b671ba56d4b0a20dd81fd0e21d0b0806 | refs/heads/master | 2021-07-03T16:08:02.466423 | 2020-09-24T16:22:28 | 2020-09-24T16:22:28 | 178,812,685 | 1 | 2 | null | 2019-10-18T14:43:19 | 2019-04-01T07:51:47 | Python | UTF-8 | Python | false | false | 489 | py | from random import randint
mod = 10**9+7
for _ in range(int(input())):
n,m = map(int,input().strip().split())
# n = randint(1,10**10)
# m = randint(1,10**10)
answer = 0
fact = m*pow(m-1,n-1,mod)
# for i in range(n-1):
# fact *= (m-1)
answer += fact
if(n>2):
fact = m*pow(... | [
"jai.dewani.99@gmail.com"
] | jai.dewani.99@gmail.com |
1b5f9af5eea3b44bf9b4bcb7f3e8d9ed2a5ae4dd | 82f91128db634cb9dac106773975ef0440c46a5a | /week-10/dijkstra.py | 6fb56fa489c6af802c44988bde71f07fa2e0ff8c | [] | no_license | kedar-shenoy9/ADA-1BM17CS041 | c7184a50f370fd816b79f80b618d8a7384ed1893 | 5e4c9b488827683bdadcdc37933f8800aa4e3021 | refs/heads/master | 2020-07-01T15:57:45.365483 | 2019-11-27T16:26:28 | 2019-11-27T16:26:28 | 201,218,363 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,119 | py | def dijkstra(g):
n = len(g)
#initialize everythin
visited = [0]
dist = [g[0][i] for i in range(n)]
prev = [0 for i in range(n)]
count = 0
#repeat for all nodes
while count < n-1:
minimum = 999
#find the node with minimum cost to reach it
for i in range(n):
if dist[i] < minimum and i not in visited:
... | [
"mahesh.sadashiv@gmail.com"
] | mahesh.sadashiv@gmail.com |
522e14b8ff56c3c33652d345558e05d1fe24076f | 1d6d048c0697ee1cdd0dc2c063b0db09028a1bee | /KupiProdai/settings.py | f3290aa2402755828cf5cdab3e4902c4814d7689 | [] | no_license | adil2604/Kupi-Prodai_learn | 9db69dd422de19a70c0ef8003961cecf997b3cd7 | 4d587dfe32662a80c057af620f5bba77e83f2045 | refs/heads/master | 2022-04-12T05:07:09.190514 | 2020-02-11T15:36:49 | 2020-02-11T15:36:49 | 209,983,077 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,414 | py | """
Django settings for KupiProdai project.
Generated by 'django-admin startproject' using Django 2.2.5.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os... | [
"adil0@list.ru"
] | adil0@list.ru |
2bc4d6b64e071a8e2289f3883c9da318dc8cc57b | 2835a9ea0bc462d21c81f44655bf2bd18c5e85e1 | /DbHelper.py | 7c1b283ebdcddf9567604ff26f33d3d69f766588 | [] | no_license | Mashka4711/course_work | 0d4734dfd622915fd61a120e7bc2880bd4ef06a4 | a087254b242a3c4530462cd988559fd4236f7725 | refs/heads/master | 2020-05-31T18:17:20.842925 | 2019-06-05T16:32:34 | 2019-06-05T16:32:34 | 190,430,553 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,608 | py | import pymysql
class DbHelper:
def __init__(self):
self.conn = self.get_connection()
def get_connection(self):
return pymysql.connect(host="localhost", user="root",
passwd="root", db="db_clinic", charset="utf8")
def insert_patient_card(self, id, ... | [
"noreply@github.com"
] | noreply@github.com |
b822023d7a01737c76d15074d9a6e3c13364d22e | fb282bd27c52b60f7ef9afd923d2568ccfe4cf5c | /remoteServerPanel/Application/fileTransfer.py | eff7d2dba84c0c17c35c2bbbaae9439a24b71a97 | [] | no_license | serdaltopkaya/serverPanel | 6f70cc30bc69572b2f0c351de48154d7a52b122a | bc3222c8d68284c4cd6d8cde53a1a1ddc89f7d65 | refs/heads/master | 2021-01-19T19:35:26.200663 | 2013-06-16T05:35:09 | 2013-06-16T05:35:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,254 | py | import paramiko
import os
import sys
import edit1
class Server(object):
def __init__(self, username, password, host, port=22):
self.transport = paramiko.Transport((host, port))
self.transport.connect(username=username, password=password)
self.sftp = paramiko.SFTPClient.from_transport(self.... | [
"serdal.topkaya@gmail.com"
] | serdal.topkaya@gmail.com |
dcf9d83ba4bfa75b310253049edaadb0ac26101c | 5c056604ecbfdd6e3d20c6d3b891855767c431b8 | /CIFAR-10/DRE-F-SP+RS/models/ResNet_extract.py | c0f759d4aeba34d997dc7326df08db4232fb134d | [] | no_license | pkulwj1994/cDR-RS | 135d1fc9504304ba0303fe5acc3594ea27531557 | 661d694d6a8dfb44885271bdfd92d6dc150a40f8 | refs/heads/main | 2023-08-30T05:37:07.449304 | 2021-11-16T03:17:42 | 2021-11-16T03:17:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,346 | py | '''
ResNet-based model to map an image from pixel space to a features space.
Need to be pretrained on the dataset.
codes are based on
@article{
zhang2018mixup,
title={mixup: Beyond Empirical Risk Minimization},
author={Hongyi Zhang, Moustapha Cisse, Yann N. Dauphin, David Lopez-Paz},
journal={International Conference ... | [
"dingx92@gmail.com"
] | dingx92@gmail.com |
eee76809dcb3a715af04c8d2cd523e99f898851c | 0761cfe0ac0f1db4d37b3d57f7c293adbf16b2b3 | /MakeTrainingData.py | d4b20b9cdfd83ffcd5bc9056249ded3f580d1401 | [] | no_license | cearlUmass/TwitterHMC | a18ac4d9344fc49b4ecf2306dcfb897a586d7cc7 | 137eddebe9c9eb6ae01351bc66dff35486d69354 | refs/heads/main | 2023-08-08T03:10:20.094061 | 2021-09-08T01:41:50 | 2021-09-08T01:41:50 | 389,268,170 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 482 | py | import pickle
import os
import pprint as pp
def make_training_data(file):
with open(file, 'rb') as follower_Data:
return pickle.load(follower_Data)
if __name__ == '__main__':
for filename in os.listdir('Data/Follower data dump'):
data = make_training_data('Data/Follower data dump/{0}'.format... | [
"cearl@umass.edu"
] | cearl@umass.edu |
b03418c90f05f458148d1710dc8f13bbea4d0205 | dac73c1079d7f5a771fff9b20d4a42a329dbdad5 | /pygration/__version__.py | 2c1be0d9a485afcc95814cfdb6a21339130fc0cc | [
"MIT"
] | permissive | RafaelGSS/py.migration | 0e2de93e7a415980086e0a2d5258953670442dc3 | 327b8539479018bd6e08abc74ff6c72b0d3f0688 | refs/heads/master | 2020-03-27T16:59:02.793346 | 2018-09-05T13:55:03 | 2018-09-05T13:55:03 | 146,821,281 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 351 | py | # 8b d8 Yb dP 88""Yb db dP""b8 88 dP db dP""b8 888888
# 88b d88 YbdP 88__dP dPYb dP `" 88odP dPYb dP `" 88__
# 88YbdP88 8P 88""" dP__Yb Yb 88"Yb dP__Yb Yb "88 88""
# 88 YY 88 dP 88 dP""""Yb YboodP 88 Yb dP""""Yb YboodP 888888
VERSION = (0, 0, 2)
__version_... | [
"rafael.nunu@hotmail.com"
] | rafael.nunu@hotmail.com |
f2d79542f326248beeeccdf981c0d6d9b68c644b | cc56916d3451a2c228fd5a4b649d4b37e4896665 | /dxb/libs/eslib.py | 0314fefce22303495f79e2a95dad6b7236a810c1 | [] | no_license | nyflxy/longan | 57ee63fe24720bfb6b6b1769acc5ba112dc08f18 | 5db84101dc11c4524e38f29f464ca522ec88aff4 | refs/heads/master | 2021-01-11T00:14:31.933873 | 2016-11-28T12:31:13 | 2016-11-28T12:31:13 | 70,554,505 | 0 | 1 | null | 2016-10-13T01:24:10 | 2016-10-11T04:00:19 | JavaScript | UTF-8 | Python | false | false | 15,071 | py | #coding=utf-8
import datetime
import elasticsearch
es = elasticsearch.Elasticsearch()
if __name__ == "__main__":
# 创建
es.index("newbie","link",{"name":"lxy","age":27,"create_date":datetime.datetime.now()},)
print es.search(index="my-index",doc_type="test-type")
print es.count("newbie","link",{
... | [
"niyoufa@tmlsystem.com"
] | niyoufa@tmlsystem.com |
8c3dff6729a6e03970fa298972d23866dabed387 | 8ea28cd0bc3f120faed01b0a2a5cd435a01ef809 | /liclient/__init__.py | 37bf8ec6e9ca51943c83086d42f59b7882242f33 | [
"MIT"
] | permissive | Work4Labs/LinkedIn-Client-Library | 9e02ce941e149f3113da936f96bd8401f74bc5c1 | eb08c78e35d6e37b415a9da9820a7977fd895f81 | refs/heads/master | 2021-01-20T16:41:53.968545 | 2017-07-07T21:21:36 | 2017-07-07T21:21:36 | 23,850,972 | 0 | 0 | null | 2017-07-07T21:21:37 | 2014-09-09T21:30:18 | Python | UTF-8 | Python | false | false | 20,308 | py | #! usr/bin/env python
import datetime
import re
import time
import urllib
import urlparse
import oauth2 as oauth
from httplib2 import HttpLib2ErrorWithResponse
import json
from parsers.lixml import LinkedInXMLParser
from lxml import etree
from lxml.builder import ElementMaker
class LinkedInAPI(object):
def __i... | [
"mvergerdelbove@work4labs.com"
] | mvergerdelbove@work4labs.com |
8bf8fcd3f39efc095e0fe222385967b76bddb28a | 1262804db6b8760ce60f98970ff142b4c69e12a3 | /models/fcn.py | 42e8a2af525be4785c333a6b2b89dfbbe4b667ef | [] | no_license | Defaultin/PSP-Net | 82537c5f21a34e3bde3c88a0084e2700bfad9f31 | 283acb7e2e4803e52a7a77d92faa58b0164de9c7 | refs/heads/master | 2020-09-22T00:17:59.151619 | 2019-11-30T09:09:48 | 2019-11-30T09:09:48 | 224,983,591 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,905 | py | from keras.models import *
from keras.layers import *
from .config import IMAGE_ORDERING
from .model_utils import get_segmentation_model
from .vgg16 import get_vgg_encoder
from .mobilenet import get_mobilenet_encoder
from .basic_models import vanilla_encoder
from .resnet50 import get_resnet50_encoder
# crop o1 wrt o2... | [
"gorynovich0101@gmail.com"
] | gorynovich0101@gmail.com |
edb27b8e4742f4f29adc0b8efd1e48b5aed3f29e | a30e64b8b7813c42e45e85243305e58152eda0de | /django_workshop/wsgi.py | fb54c791f0ca348107316a1c7f131bf2f12bddd6 | [] | no_license | DavideTonin99/django_workshop | ad7532835b201af567457a981177d6fe6f3ff7fa | 4d0d827babe07b87f1d9fdc29e2f5bc8cb6fa5ca | refs/heads/master | 2021-04-27T03:51:29.591838 | 2018-02-27T17:51:38 | 2018-02-27T17:51:38 | 122,720,853 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 408 | py | """
WSGI config for django_workshop 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/1.11/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJA... | [
"davide9935@gmail.com"
] | davide9935@gmail.com |
e4148f0f2cb3c1a939064361f891a0e0ccd8520d | 0fdd74280cb91e19cfd0d3ac2d87587ff991fefe | /helloworldasyncio.py | a787c718331c73dd0b5fc71ebc2e4219f6ba6f27 | [] | no_license | DonAfraidOfTiger/zmq-http-server | c5548d0701fdebc800f8e25f711fd3750e2b1520 | fffb67e3f693f5a2e5fbd76f123b2b62e220c8c3 | refs/heads/master | 2020-03-16T05:25:30.207628 | 2018-05-08T01:50:30 | 2018-05-08T01:50:30 | 132,531,967 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,592 | py | # coding=utf-8
import zmq
from zmq.asyncio import Context, Poller
import asyncio
import zlib
import pickle
context = zmq.asyncio.Context()
socket = context.socket(zmq.STREAM)
socket.bind('tcp://*:5555')
cnt=0
async def worker(name):
while True:
# Wait for next request from client
... | [
"noreply@github.com"
] | noreply@github.com |
e484863b83b18d2756248bd07c84329a4dcdeb44 | 72d888337ee2172f44a92050243e86c02d0d080b | /adventofcode_2015/day06_part1.py | 338591f47b27ed3af2d54dd3af4b0292d399c498 | [
"Unlicense"
] | permissive | vesche/snippets | a87a120c27cd74317bb6169397feb1be6b0c47eb | a619c6fd82bafaf2cd444ab1fc4e3095a27e3a71 | refs/heads/master | 2023-04-08T21:46:30.617356 | 2022-02-17T16:44:33 | 2022-02-17T16:44:33 | 41,107,034 | 7 | 1 | Unlicense | 2023-03-31T14:52:16 | 2015-08-20T16:35:42 | Python | UTF-8 | Python | false | false | 1,255 | py | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
#
# Advent of Code, Day 06 - Part 1
# https://github.com/vesche
#
coords = {}
for x in range(1000):
for y in range(1000):
coords[(x,y)] = "off"
def lights(update, a, b, c, d):
for X in range(int(a), int(c)+1):
for Y in range(int(b), int(d)+1):
... | [
"austinjackson892@gmail.com"
] | austinjackson892@gmail.com |
694e2929e713631f5ceeec1de242dc66c9e42600 | 7aa0c57e728786ea2dd3b04a2ec4d070746f3af6 | /catkin_ws/src/bno_python/src/pwm.py | 3009b69ac7eaa9e352b640e173f7be9b9619de38 | [] | no_license | umblauka/mmWave_mapping | 76feec09f577720437e62facc368446e4b5839d9 | 6d7c90d06669b0f7e3dfe821adac9a731c3c53e1 | refs/heads/master | 2020-05-25T04:49:58.121060 | 2019-05-20T12:31:25 | 2019-05-20T12:31:25 | 187,636,258 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,188 | py | #!usr/bin/env python3
import RPi.GPIO as IO
import time
from simple_pid import PID
import rospy
from sensor_msgs.msg import Imu
import asciichartpy as asc
import os
from pyquaternion import Quaternion
control_input = [0]
first = 1
direction = 1;
def callback(data):
if first == 1:
bearing = data.orientation.z
pid... | [
"11karl.laanemets@gmail.com"
] | 11karl.laanemets@gmail.com |
d2d53550d8562b31f2ef00de641a54b3c591e3fd | 5bb8b4c7faeebd16da16ecbcd4a98aabaf688e8f | /data_tools/walker/src-cikm/build_graph/preprocess_venue_word.py | 3d7fc4f53a23214e5cb8bba6ec763cd94551ca7c | [] | no_license | xiaoqinzhe/vrdetection | 014fc2b61c9b30dd2699fdba41089b18b7f060be | 604a812a21a98d72ba8e23a716eb72153bdaa7c4 | refs/heads/master | 2023-07-04T07:44:12.141404 | 2021-08-01T06:21:17 | 2021-08-01T06:21:17 | 150,063,473 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 942 | py | #coding:utf-8
file_name = '../dataset/paper_title_venue.txt'
venues = set()
word_df = {}
with open(file_name) as file:
for line in file:
paper_id, title, venue = line.strip().split()
words = title.split('-')
for word in words:
if word not in word_df:
word_df[wo... | [
"xiaoqinzhe@qq.com"
] | xiaoqinzhe@qq.com |
3369509fe59e3139cd5150e48548b19e8ef544dd | 782778e2093eb57324b4b0072f7f0f8d298de05a | /python/queue_with_2stacks.py | 8de8f5b026b456cf51f341684c3e852311953fed | [] | no_license | zyuma/algo | 249d4f6d0169cae9e950e69843a126cc7341dc06 | f6dbbad4b3873f08bc5a92cb3d7813b1e544b8fd | refs/heads/master | 2016-09-06T11:37:31.536799 | 2014-04-09T08:45:06 | 2014-04-09T08:45:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,193 | py | class Node:
def __init__(self, x):
self.val = x
self.next = None
class Stack:
def __init__(self):
self.top = None
def push(self, n):
n.next = self.top
self.top = n
def pop(self):
if(self.top == None):
return None
temp = self.top
self.top = self.top.next
return temp
def print_stack(self):
cu... | [
"yuma.tsuboi@gmail.com"
] | yuma.tsuboi@gmail.com |
40c2c6e92aa15b987b3c9d8cf88fb313c1bd848e | e299b7f08640f59f7322265be6626df88629e90e | /reorder_frames.py | 01f27d43da46b4210560f8a60fcab7a0defb48ff | [] | no_license | achntrl/reorder-frames | 3e7f1328222c2b3175e61a88d1f930c3bb1e57f3 | 9a62200d1d5db1b6f208fb68ec2a5f91fe7e1852 | refs/heads/master | 2021-09-02T03:35:51.547903 | 2017-12-30T00:38:06 | 2017-12-30T00:48:41 | 115,757,625 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,543 | py | import numpy as np
import json
from shutil import copy2
import os
from math import isnan, sqrt
from utils import full_size_image_path, new_image_path
def reorder_frames():
""" Cleans frames that shouldn't be include in the video and
reorder the frames. """
with open('matching_data.json', 'r') as f:
... | [
"alexandre.chaintreuil@gmail.com"
] | alexandre.chaintreuil@gmail.com |
f16779f7b11a1e0e672840e1929dec5a51a2c82b | fb285569b73f6bd6724f276757efe8a6ab71d591 | /inference.py | 4c63acce228f70e1f182dbb575ed4692545a2184 | [
"BSD-3-Clause"
] | permissive | zrb250/tacotron2 | d0d6dc0b1ba3a1ec31a7bab42c965096bfba000f | 404f8a4a530776f215259b19aeb24a6e6f4c6da3 | refs/heads/master | 2020-09-10T02:25:48.601636 | 2019-12-05T06:53:00 | 2019-12-05T06:53:00 | 221,625,633 | 1 | 0 | BSD-3-Clause | 2019-11-14T06:15:03 | 2019-11-14T06:15:02 | null | UTF-8 | Python | false | false | 3,783 | py | import matplotlib
matplotlib.use('agg')
import matplotlib.pylab as plt
import sys
sys.path.append('waveglow/')
import numpy as np
import torch
from hparams import create_hparams
from scipy.io.wavfile import write
from train import load_model
from text import text_to_sequence
import os
# from denoiser import Denoiser
... | [
"zhuribing@vipkid.com.cn"
] | zhuribing@vipkid.com.cn |
08378529a99ab4fa465e18b6e34e8649525886dd | 52f3a75f7c88df928d00e3c203b751a860bdf627 | /SimulationScripts/mlSimulator.py | d2179eaef3cc86c8269a9265acd643e6cd11695c | [] | no_license | meiwenPKU/ML-based-Flow-Table-Eviction | 03fe2680d4d12b3eeb02ce4a8f5a519c30649dea | 5027820986b52783a9e8087b5241a7e5e915537c | refs/heads/master | 2020-04-05T09:35:01.054156 | 2019-01-25T18:32:24 | 2019-01-25T18:32:24 | 156,764,434 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,534 | py | '''
This script is used to simulate the scenario where ml model is applied to pick which flow entry should be evicted from the table.
'''
import pandas as pd
import numpy as np
from sklearn.preprocessing import StandardScaler
from sklearn.ensemble import RandomForestClassifier, AdaBoostClassifier
from sklearn.externals... | [
"yhmpku@live.cn"
] | yhmpku@live.cn |
6b1c0c3eb554c65e899485fe8633016f842b2573 | 72bd16274c66d5ad218b15a22e398ff48e1524d6 | /primary/C048.py | 5f448d3bda472787cdd69fc01acc9db9c577f06b | [] | no_license | DearZack/LearnPython | baaa5468c7e8e96665d1c777581ef81635730ca1 | 8baf170b75d9186384f4404cd001e50fc0b70ff2 | refs/heads/master | 2021-01-16T19:37:34.974170 | 2018-01-14T13:24:36 | 2018-01-14T13:24:36 | 100,184,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4 | py | #略 | [
"zack4work@gmail.com"
] | zack4work@gmail.com |
5a0f58aac33d8bad2c16cd0bc92a93704417daad | 4cdc9ba739f90f6ac4bcd6f916ba194ada77d68c | /剑指offer/第五遍/32-2.分行从上到下打印二叉树.py | cac8702eac2082f33f6071a4d95e0ccd60552e50 | [] | no_license | leilalu/algorithm | bee68690daf836cc5807c3112c2c9e6f63bc0a76 | 746d77e9bfbcb3877fefae9a915004b3bfbcc612 | refs/heads/master | 2020-09-30T15:56:28.224945 | 2020-05-30T03:28:39 | 2020-05-30T03:28:39 | 227,313,730 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,022 | py | """
从上到下按层打印二叉树,同一层的节点按从左到右的顺序打印,每一层打印到一行。
例如:
给定二叉树: [3,9,20,null,null,15,7],
3
/ \
9 20
/ \
15 7
返回其层次遍历结果:
[
[3],
[9,20],
[15,7]
]
"""
class Solution:
def levelOrder(self, root):
# 首先判断输入为空的情况
if not root:
return []
res = []
queue =... | [
"244492644@qq.com"
] | 244492644@qq.com |
059d63260d55c64602ebf59de0199850c1cd57bb | 56362ab3daa28f80c6732d392464dd48c7373b7a | /segment_config_api/models/workspaces.py | 29e9190ab11ed87d2eab750693332a44933bd512 | [
"MIT"
] | permissive | isabella232/segment-config-api | 749a34bfb6ed4cacb176b95bf8cb4f5a92ca0412 | 52b6fa41546f593d0ae08b8616bb54f04a84b29a | refs/heads/master | 2023-08-27T18:05:33.231026 | 2021-11-02T16:47:56 | 2021-11-02T16:47:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,908 | py | from segment_config_api.models.base_model import BaseModel
from segment_config_api.models.sources import SourcesModel
from segment_config_api.models.tracking_plans import TrackingPlansModel
from segment_config_api.models.deletion_and_suppression import RegulationsModel, \
SuppressedUsersModel
from segment_config_ap... | [
"hi@michaelerasm.us"
] | hi@michaelerasm.us |
0d7b99ef5458910e5dd77581ccf277ae57f85510 | 64e3864b2b422ca4b24519e278d72e2801b2b892 | /WSTradeEngine/btdemo.py | 737682ab5f549b15bdb5908b15efaed15f9a4907 | [] | no_license | jpgithub/jprepost | fec6863ac9aa79ce94e66f5d2a9760e4ecab4acd | 54aa322bacaf9f278cf38f80073b8f596aa417a4 | refs/heads/master | 2023-06-09T07:53:28.521629 | 2022-04-23T23:41:30 | 2022-04-23T23:41:30 | 6,928,161 | 0 | 0 | null | 2023-05-31T18:08:14 | 2012-11-29T20:39:54 | Python | UTF-8 | Python | false | false | 537 | py | from backtesting import Backtest, Strategy
from backtesting.lib import crossover
from backtesting.test import SMA, GOOG
class SmaCross(Strategy):
def init(self):
price = self.data.Close
self.ma1 = self.I(SMA, price, 10)
self.ma2 = self.I(SMA, price, 20)
def next(self):
if cro... | [
"jqpan00@gmail.com"
] | jqpan00@gmail.com |
19d921d73586dd898f2432195f2c2e8cdc1662c8 | a9003f17bc0ac4c4bc9347c6a1a646b3cf45298b | /LearningLog/fibo.py | 0386b62642776285ec0834346647b7d97d82b841 | [] | no_license | peterluo/LearningPythonDiary | 7ab5ec0988fa1fb5987022247394ce0124e93600 | cbdd976b88e15b5c45c0f667a2181442e7be5acc | refs/heads/master | 2021-01-10T05:33:25.525685 | 2018-05-15T13:52:39 | 2018-05-15T13:52:39 | 8,559,040 | 22 | 29 | null | null | null | null | UTF-8 | Python | false | false | 357 | py | #! /usr/bin/env python
#coding=utf-8
#Fibonacci numbers module
def fib(n):
a, b=0, 1
while b< n:
print b,
a, b=b, a+b
def fib2(n):
result = []
a, b=0, 1
while b< n:
result.append(b)
a, b= b, a+b
return result
if __name__ == '__main__':
import sy... | [
"peterluo2010@gmail.com"
] | peterluo2010@gmail.com |
ac3f0b3550b4fd6ceba4b487c04ea89b68b66f38 | 9f41fb8612193d546715801e958137cf821e4979 | /generate_data_array.py | 2a86aefb098d2e3aba0e0b08a3431343f1011c83 | [] | no_license | wsimkins/NS-F-W | aef8cd5d1168b83be6adf5544ba30e13bf2ae044 | 62eb8073a86db4ee1396b0e50cc5b245e2bca1a8 | refs/heads/master | 2021-05-01T05:19:10.418276 | 2017-03-15T19:44:17 | 2017-03-15T19:44:17 | 79,740,185 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 21,815 | py | #CS122: Group Project - Chess Heatmaps
# for generating heatmaps
#Names: Will Simkins, Natalie Gray, Steven Cooklev
import numpy as np
import re
LETTER_TO_NUM = {"a":1, "b":2, "c":3, "d":4, "e":5, "f":6, "g":7, "h":8}
PIECE_TO_LETTER = {"rook":"R", "knight":"N", "bishop":"B", "queen":"Q", "king":"K", "pawn":"P"}
KN... | [
"wsimkins@cs.uchicago.edu"
] | wsimkins@cs.uchicago.edu |
34291debc85164d7bdf03f1960026837e992523d | ad54a035bb0b0ec73853516e4b62daf3598b601b | /django_fullstack/library_revisited/manage.py | 045355e8b7f85761526cd3505808d46bf113c5a1 | [] | no_license | odionfross/django | ce34c29fdc9f828ca0544826c9ef1b35efd324fb | 759d2ddf9322984dd97a967dd1f08e7ee644d9c9 | refs/heads/master | 2022-12-11T15:29:17.506133 | 2020-09-16T04:22:10 | 2020-09-16T04:22:10 | 295,921,376 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 637 | py | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'library_revisited.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
ra... | [
"https://www.linkedin.com/in/odionfross/"
] | https://www.linkedin.com/in/odionfross/ |
ea6c48d22148088e90850dbf412004e72a4b7fb4 | 63944e6a5694fe55190681915d0df9e041e7944a | /src/settings.py | 072d0fc52eb8d84b1edcd0cbedf511d3ec923dd4 | [] | no_license | vchristodoulou/WSNM-WebService | 2771e154bb499b3f525f602f1418289ed7e55108 | 9b399092437c750b771deda34885171601e8fc36 | refs/heads/master | 2022-12-25T21:18:00.981979 | 2020-10-08T08:43:31 | 2020-10-08T08:46:54 | 299,975,452 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 174 | py | import os
from dotenv import load_dotenv
load_dotenv()
APP_SETTINGS = os.getenv("APP_SETTINGS")
SERVER_IP = os.getenv("SERVER_IP")
SERVER_PORT = os.getenv("SERVER_PORT")
| [
"vchristodoulou1@gmail.com"
] | vchristodoulou1@gmail.com |
cbdcdfa01186aa01782a59fec2f927d1407ab164 | 87ababaa3cf1cb427a59ccca0739193be3386519 | /endopy/utils/mlutils.py | 253da73dd11eeb86aa010c07d56881613d516ffb | [
"MIT"
] | permissive | ikestar99/endopy | f54a6567d218c72ed976faa8aed60107f46bb9ed | f8d330d93ad12fa1654f717fef8a0ce28540a1c9 | refs/heads/main | 2023-07-26T00:19:28.325543 | 2021-09-09T20:59:26 | 2021-09-09T20:59:26 | 349,279,633 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 870 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Apr 8 03:04:49 2021
@author: ike
"""
import numpy as np
import torch
DEVICE = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
# def normalizeProbArray(probArray):
# negMins = -np.min(probArray, axis=0)
# probArray += (negMin... | [
"noreply@github.com"
] | noreply@github.com |
616bc2f9eedb173fae2c4e924b031aca3eaed1e1 | a2ac73af04a07bb070cd85c88778608b561dd3e4 | /addons/account_check_writing/account_voucher.py | d5cb90cc89990e5b9c4c9de82486dc995d9007a3 | [] | no_license | sannareddy/openerp-heimai | c849586d6099cc7548dec8b3f1cc7ba8be49594a | 58255ecbcea7bf9780948287cf4551ed6494832a | refs/heads/master | 2021-01-15T21:34:46.162550 | 2014-05-13T09:20:37 | 2014-05-13T09:20:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 75 | py | /usr/share/pyshared/openerp/addons/account_check_writing/account_voucher.py | [
"549636719@qq.com"
] | 549636719@qq.com |
02c7b63353fb98d8d93122e25b126b28ddccf128 | d97398d74e7c0ac8fa9d0259bf67909c6921d9fa | /Desafio78.py | f41d3f96c20aeac9e63d0427ba3e0616467c4666 | [] | no_license | robertolopesmendonca/Exercicios-Python | 228550690e8e857895de3bd4749a6fdfee5e111a | 8357f033f5a54dbcf54a395755f1254b10d4fc6f | refs/heads/master | 2023-01-05T14:57:58.894445 | 2020-10-18T15:38:00 | 2020-10-18T15:38:00 | 274,805,370 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 894 | py | print("""
078) Faça um programa que leia 5 valores numéricos de guarde-os em uma lista. No final,
mostre qual foi o maior e o menor valor digitado e suas respectivas posições na lista.
""")
maior = 0
menor = 0
listanum = []
for n in range(0, 5):
listanum.append(int(input(f'Entre com o valor para a posição {n}: ')))... | [
"42980513+robertolopesmendonca@users.noreply.github.com"
] | 42980513+robertolopesmendonca@users.noreply.github.com |
835ca7c6367f26216698af5590c4115896ebb101 | 3abcde3ca444d7612e24a0faf9b89af61d9bad6d | /backend/core/process_QTL_scoring.py | dd3f5a8b86566535f8a4e91cc33fd0522df3d444 | [] | no_license | cbib/COBRA | fa43d5600beaf36d3dcab98bc7b8faa940a02aea | 54f43d3d2867b4f228dccc6630416808e258be77 | refs/heads/master | 2022-09-25T00:20:57.688447 | 2021-02-16T21:53:28 | 2021-02-16T21:53:28 | 29,740,646 | 2 | 3 | null | 2022-09-01T22:15:54 | 2015-01-23T16:10:43 | HTML | UTF-8 | Python | false | false | 11,387 | py | #!/usr/bin/env python
# encoding: utf-8
import sys
sys.path.append("..")
sys.path.append(".")
from config import *
from helpers.basics import load_config
from helpers.logger import Logger
from helpers.db_helpers import *
from helpers.path import data_dir
from bson.son import SON
# Script supposed to be run in the ba... | [
"bdartigues@gmail.com"
] | bdartigues@gmail.com |
311729967843c5ec8099011965d0fc07f899187d | f9d564f1aa83eca45872dab7fbaa26dd48210d08 | /huaweicloud-sdk-iotedge/huaweicloudsdkiotedge/v2/model/container_configs_dto.py | 5f77f61d48e99914c232542c25d08d3c747de972 | [
"Apache-2.0"
] | permissive | huaweicloud/huaweicloud-sdk-python-v3 | cde6d849ce5b1de05ac5ebfd6153f27803837d84 | f69344c1dadb79067746ddf9bfde4bddc18d5ecf | refs/heads/master | 2023-09-01T19:29:43.013318 | 2023-08-31T08:28:59 | 2023-08-31T08:28:59 | 262,207,814 | 103 | 44 | NOASSERTION | 2023-06-22T14:50:48 | 2020-05-08T02:28:43 | Python | UTF-8 | Python | false | false | 6,284 | py | # coding: utf-8
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class ContainerConfigsDTO:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribut... | [
"hwcloudsdk@huawei.com"
] | hwcloudsdk@huawei.com |
b686b39238f5f30b0276c7fce01f77cfec98e68b | ed711369a8b390099934f8bc261b4e4a14094f16 | /works/migrations/0001_initial.py | 50f1094aab81627e70920f7c96b649fc3f4407bd | [] | no_license | merlinsbeard/artwork-portfolio | edb434418c86c7f68436950fa4bf58a3be17d3c3 | 1881651263b505310ec78e48da15dc4b48760f2c | refs/heads/master | 2022-12-16T04:56:36.486848 | 2020-04-11T14:37:36 | 2020-04-11T14:37:36 | 79,799,221 | 1 | 0 | null | 2022-12-08T00:39:31 | 2017-01-23T11:42:14 | Python | UTF-8 | Python | false | false | 823 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-17 09:34
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Work',... | [
"bjpaat@dailywarrior.ph"
] | bjpaat@dailywarrior.ph |
db26b2cdc544678e8d28dc70d4b26e50d0d81efa | 6f76defa97ade798a805c93a002847f01e0223af | /683.py | 00e5976ef52b6d9fcc4c6c1f052f4c6a8ad81eca | [] | no_license | Mr-Deason/leetcode | f8b68a11f7766bfd3767c8ec61a6648a4848c075 | e0211f6388f637e5aa81f3233b9a5b0f9f1c1268 | refs/heads/master | 2021-07-13T20:23:13.411943 | 2017-10-17T06:08:25 | 2017-10-17T06:08:25 | 107,225,117 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,303 | py | class Solution(object):
def kEmptySlots(self, flowers, k):
"""
:type flowers: List[int]
:type k: int
:rtype: int
"""
#TLE
ans = -1
n = len(flowers)
import numpy as np
bloom = np.array([flowers[0]])
for day in range(2, n+1):
... | [
"mr.d_style@hotmail.com"
] | mr.d_style@hotmail.com |
f8ca76fd22f085e062460354e8d995add278d7e1 | 589ac0a71099f4ee6857a31986305f0df2c16ede | /Bio/Phylo/NewickIO.py | f0579a6eca4eaf30aceb11ae08827e40072c94c4 | [
"LicenseRef-scancode-biopython"
] | permissive | barendt/biopython | 802aad89005b302b6523a934071796edbd8ac464 | 391bcdbee7f821bff3e12b75c635a06bc1b2dcea | refs/heads/rna | 2021-11-09T19:11:56.345314 | 2010-05-01T02:44:42 | 2010-05-01T02:44:42 | 636,700 | 0 | 0 | NOASSERTION | 2021-11-05T13:10:14 | 2010-04-29T02:35:46 | Python | UTF-8 | Python | false | false | 9,781 | py | # Copyright (C) 2009 by Eric Talevich (eric.talevich@gmail.com)
# Based on Bio.Nexus, copyright 2005-2008 by Frank Kauff & Cymon J. Cox.
# All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this pa... | [
"eric.talevich@gmail.com"
] | eric.talevich@gmail.com |
2eda8ed8809c5294bac47f44d7072943089f4409 | 1496c7886cf599cc2168aba4948b4928018c3639 | /0x06-python-classes/4-square.py | 33f9226b7afa2a62db48cef609de50cf8231cd67 | [] | no_license | RhysMurage/alx-higher_level_programming | 5365e3617bdba54d8093de7f0869f89bf89ccebd | 08c50efb3602ce7d4ff1782351fac8103fd38e12 | refs/heads/main | 2023-03-16T02:01:40.105333 | 2022-09-24T13:51:40 | 2022-09-24T13:51:40 | 497,946,455 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 923 | py | #!/usr/bin/python3
"""Creates a square class"""
class Square():
"""
Define a square
"""
def __init__(self, size=0):
"""
size initialization.
Args:
size: integer value
"""
if type(size) != int:
raise TypeError('size must be an integer')
... | [
"rhysmwangi96@gmail.com"
] | rhysmwangi96@gmail.com |
e5f657f8585b64e8ca97392387cbc8e5ea4a0f7d | 4c9c2940ef3a07e2756fcceddf01acd384ebde01 | /Python/[7 kyu] Ordered count of characters.py | da36015440ad03be1c025a725b9cca4d2ae3af47 | [
"MIT"
] | permissive | KonstantinosAng/CodeWars | 7d3501a605f7ffecb7f0b761b5ffe414e2f1983a | 157818ece648454e882c171a71b4c81245ab0214 | refs/heads/master | 2023-04-11T09:44:27.480064 | 2023-03-26T21:37:07 | 2023-03-26T21:37:07 | 245,296,762 | 6 | 6 | null | null | null | null | UTF-8 | Python | false | false | 578 | py | # see https://www.codewars.com/kata/57a6633153ba33189e000074/solutions/python
def ordered_count(inp):
counts = {}
for letter in inp:
if letter not in counts:
counts[letter] = 1
else:
counts[letter] += 1
return [(key, value) for key, value in counts.items()]
tests =... | [
"kwstantinos.agelopoulos@outlook.com"
] | kwstantinos.agelopoulos@outlook.com |
e928926682f988569eeebca471ebde4c6d562a77 | d075f3ee406a7d79ea507ce82af2f77d542dda9b | /todo_app/trello.py | b0bf8117481df203c5e3e030dbc6d571a7cf7b99 | [] | no_license | kjnvarma/DevOps-Course-Starter | fad5b4f48c00cdbcd8a7388baf5f800256585501 | b0a80ddcce52e24981df45b05fe91d71df31ce34 | refs/heads/master | 2023-05-11T18:10:45.462425 | 2021-05-26T16:08:49 | 2021-05-26T16:08:49 | 302,264,024 | 0 | 0 | null | 2021-05-26T16:08:51 | 2020-10-08T07:29:43 | Python | UTF-8 | Python | false | false | 2,545 | py | import requests
import json
import os
from todo_app.Task import Task
headers = {
"Accept": "application/json"
}
def get_all_tasks():
params = (
('key', os.environ['TRELLO_KEY']),
('token', os.environ['TRELLO_TOKEN']),
)
board_id = os.environ['TRELLO_BOARD_ID']
data = request... | [
"kjnvarma@gmail.com"
] | kjnvarma@gmail.com |
4dcb2f40b532b5bd84a8b6f1c3ec478e443adaf6 | 5be744f908ea25bd5442dfb4cb8a24a0d7941e14 | /timepiece/context_processors.py | 7a51dd0a6549cf8ff01954c75e00c32076b99ad2 | [] | no_license | CalebMuhia/JobsBoard | f986d7c4af939dded0a3e2f8305a444f3502bad3 | 66c40dd5151261bc7e4fb8309a6139d11604f215 | refs/heads/master | 2022-07-07T22:49:06.733313 | 2022-06-23T20:52:20 | 2022-06-23T20:52:20 | 4,616,096 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 434 | py | from django.conf import settings
from timepiece.forms import QuickSearchForm
def timepiece_settings(request):
default_famfamfam_url = settings.STATIC_URL + 'images/icons/'
famfamfam_url = getattr(settings, 'FAMFAMFAM_URL', default_famfamfam_url)
context = {
'FAMFAMFAM_URL': famfamfam_url,
}
... | [
"clbnjoroge@gmail.com"
] | clbnjoroge@gmail.com |
c5378d49721305da88e40db5fe94428711285626 | 47789957e8dd6ba944bd4c04341cf8add431d64f | /shoppingcart/home/migrations/0003_address.py | b5190e37fe901c886c8a352e359b0abcbaae6b90 | [] | no_license | binnib/EshopApp | 8c93c518d09b5dbe9e3e9f357e9a68fa2d2d4585 | 4846b7f48e4224f2a0aee8942e9c758a9f890081 | refs/heads/main | 2023-03-28T17:04:48.063283 | 2021-04-12T05:52:37 | 2021-04-12T05:52:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,059 | py | # Generated by Django 3.0.6 on 2021-03-31 07:08
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('home', '0002_cartitem_total_price'),
]
operations = [
migrations.CreateModel(
name='Address',
... | [
"maheshsharma171226@gmail.com"
] | maheshsharma171226@gmail.com |
558e9b855ff65427de3dea11f5eb47c5c6c56325 | c28c56b2f0bd987b627e9c59537307323470876a | /blotter/views.py | a250ab02ba0769f4d15d07e074059fa643ecc7e6 | [] | no_license | wider/django-crimemap | 4e26f4435b7f770de0f3dfec11e7780a1476ea73 | 93bb908c2f8f4b82e544ebd72baca4530dd2c5db | refs/heads/master | 2016-09-16T10:38:02.346989 | 2008-10-16T01:44:01 | 2008-10-16T01:44:01 | 114,336 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,140 | py | from django.views.generic.list_detail import object_list
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from crime_map.blotter.models import Crime
from crime_map.blotter.forms import DateRangeForm
def by_type(request, crime_type):
crimes = Crime.objects.filter(crime_type... | [
"justinlilly@gmail.com"
] | justinlilly@gmail.com |
d8003e5a564f39faa18cfb54ada2ed74bad26175 | 1df04380fbb799ea658201ff9083db550cd0a090 | /restaurants/urls.py | 79ce86478bcbc4b6b31e7b111e877681bed61f31 | [] | no_license | ivanneychev/try_django | 21739e9f5ed9afb0213d58c719141fb898468a4b | 0d6e1048899850234bed148b0ce8d30f2b1369df | refs/heads/master | 2021-04-27T21:27:52.404794 | 2018-02-21T22:57:02 | 2018-02-21T22:57:02 | 122,401,025 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 799 | py | """picky URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-base... | [
"ivan_tn@abv.bg"
] | ivan_tn@abv.bg |
6f9a19fbcf2f777df543ea2ca0800eafd2406087 | 18d3fa331288470a5872bfe71ef3f610b18c0588 | /jaqs/research/signaldigger/digger.py | 6f58b77e4d8b28f7e3adbdc7677ba66e5d0411ce | [] | no_license | Jerrychen94/sustecher | 6ca1238cf494df0a3435f5602000334e0c4b328f | 52a8b82f35f9a7ac33a2fab4e5f2e6bce5732369 | refs/heads/master | 2023-07-24T12:38:46.086619 | 2021-09-06T09:17:03 | 2021-09-06T09:17:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 25,113 | py | # encoding: utf-8
import os
from collections import OrderedDict
import numpy as np
import pandas as pd
from . import performance as pfm
from . import plotting
import jaqs.util as jutil
TRADE_DAYS_PER_YEAR = 242
class SignalDigger(object):
"""
Attributes
----------
signal_data : pd.DataFrame -... | [
"8342537@qq.com"
] | 8342537@qq.com |
a60cc6b2ee0c67040088e9b8635511a8e481d5ab | 9ebed060fb79f468504030d545501711230fe743 | /venv/bin/rst2html.py | 219c73b8e81865a06af0da1402f0c3a8ba7797db | [] | no_license | CarlosKim94/100daysweb-site | 458ff8f2338abb5c8215893a7af5d8333e81f8e5 | 8e07494e76ed5b58e49a2dec78e5cd7f59adbb2f | refs/heads/master | 2021-06-20T04:16:54.447742 | 2019-06-12T02:41:11 | 2019-06-12T02:41:11 | 191,472,386 | 0 | 0 | null | 2021-03-29T19:48:19 | 2019-06-12T01:04:50 | Python | UTF-8 | Python | false | false | 662 | py | #!/Users/carloskim/Developer/100daysweb/5-static-sites/100daysweb-site/venv/bin/python
# $Id: rst2html.py 4564 2006-05-21 20:44:42Z wiemann $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
A minimal front end to the Docutils Publisher, producing HTML.
"... | [
"carlos.kim94@gmail.com"
] | carlos.kim94@gmail.com |
a4ad9d37d8916e0b9997b849d394f54ae71f9098 | 20b57ed25fcfb6eda1ea262228e0c53838cb61e1 | /registration.py | 442e95986fe800769867b2f88c6bca2dcfdac724 | [] | no_license | Rutuja999/covid_future_forcasting | 6c47864adca448c25a23a5b2c2fadbec68c4a244 | 9816616b9248dd3ab019b89ee02ae47334dbec12 | refs/heads/master | 2023-04-08T14:16:07.364621 | 2021-04-24T08:26:56 | 2021-04-24T08:26:56 | 361,109,015 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,356 | py | import tkinter as tk
# from tkinter import *
from tkinter import messagebox as ms
import sqlite3
from PIL import Image, ImageTk
import re
import random
import os
import cv2
window = tk.Tk()
window.geometry("700x700")
window.title("REGISTRATION FORM")
window.configure(background="grey")
Fullname = tk.StringVar()
addr... | [
"resmmm99@gmail.com"
] | resmmm99@gmail.com |
4264a34b29a88e2d471136659bc04171310f792e | a943f3aa41e7f3b4bf8e10d4121fdfce99a207b9 | /CTCI/Arrays and Strings/One_Away.py | 037b711364cfa37141d5ae6cd1091de57e57c1ef | [] | no_license | noahjpark/Algorithms | 3160ebce01c833de94223fc9fd90432a879cdc02 | fb4159370f96dbe48af44186b9bbe0e577ca1ce7 | refs/heads/master | 2023-06-18T21:00:35.328470 | 2021-07-14T13:40:47 | 2021-07-14T13:40:47 | 218,333,384 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,157 | py | '''
Noah Park
There are three types of edits that can be performed on strings:
insert a character, remove a character, or replace a character.
Given two strings, write a function to check if they are one
edit (or zero edits) away.
'''
def oneAway(str1, str2):
if(len(str1) == len(str2)):
return chec... | [
"noreply@github.com"
] | noreply@github.com |
179481b626143f7f8d7b3e9a868b7138a4363cbd | b3d1761947d0223388bf720e86517ebea2310269 | /thesite/admin.py | 7ffb6ccec56c45035487b700ea1d3c9843280062 | [] | no_license | brica1000/Hrimnir | 4b632c70900a0a88ff8a61731ac4c7e25414e0cc | 05db6189fd72ab9f151e2f500f9e0b3e6b7faa45 | refs/heads/master | 2020-06-12T23:03:19.462437 | 2017-07-22T12:42:41 | 2017-07-22T12:42:41 | 75,422,702 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 485 | py | from django.contrib import admin
from .models import Conglomerate, Product, Cert, Verification
class ProductAdmin(admin.ModelAdmin):
list_display = ('name', 'approved_edit') # Where does this understand the connection with Product?
class ConglomerateAdmin(admin.ModelAdmin):
list_display = ('name', 'approved... | [
"brica1000@msn.com"
] | brica1000@msn.com |
072478a3ee547f9f85be9b2c1e6a1cc17608e576 | 83ea820cb8902128ac5544565f07ef29e1ed8eae | /aiqiyi/lushi.py | 822393fc34b8ef4cbb2f2ce9ba1273f3f7ffaf4c | [] | no_license | LeoEatle/python_leetcode_practice | a48a17ba5d512bb7ecd141ab875d63993cc43d5b | 34b3e508be271aa5f52f8a3c34b0524747358978 | refs/heads/master | 2020-12-24T05:50:02.279914 | 2017-01-14T15:28:48 | 2017-01-14T15:28:48 | 73,447,100 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 633 | py | # coding=utf-8
def bag(n, c, w, v):
res = [[-1 for j in range(c + 1)] for i in range(n + 1)]
for j in range(c + 1):
res[0][j] = 0
for i in range(1, n + 1):
for j in range(1, c + 1):
res[i][j] = res[i - 1][j]
if j >= w[i - 1] and res[i][j] < res[i - 1][j - w[i - 1]] + ... | [
"liuyitao811@hotmail.com"
] | liuyitao811@hotmail.com |
7de2ec3667cf0defb17f51e3619a7db12f4d067a | 6440557df22018c670c39a606037d65ceec6e94a | /myjokes/myjokes/settings.py | 39e5fa2c3633300892fdb96bb881d9301f5e3a1b | [] | no_license | Imran-Gasanov/joke-project | 05dd15e4664b8dbcb13d3ea018f2053ba3d60887 | 327df2ac294d8d682204ed1fc66cacbcbc67a743 | refs/heads/master | 2023-05-05T18:55:09.619192 | 2021-05-28T14:15:32 | 2021-05-28T14:15:32 | 368,822,261 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,778 | py | """
Django settings for myjokes project.
Generated by 'django-admin startproject' using Django 3.2.3.
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/
"""
from pathlib... | [
"imrangasanov1999@gmail.com"
] | imrangasanov1999@gmail.com |
a80cf6d1ddfc46a4bc219908bc8145a82db73edb | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/nouns/_naturalism.py | 8c5e9015f19160ff616ae4d4cd686e3352b59c9f | [
"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 | 442 | py |
#calss header
class _NATURALISM():
def __init__(self,):
self.name = "NATURALISM"
self.definitions = [u'showing people and experiences as they really are, instead of suggesting that they are better than they really are or representing them in a fixed style: ']
self.parents = []
self.childen = []
self.prop... | [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
90b1b6c60dc890fdf2ea41bef43d217f4dc941ad | a72c46e03d6ed9824e56da0f9dce36260bdec992 | /mmcv-0.4.4/tests/test_registry.py | f25d193a8d19f7de00cdd7bb5915206e4989d33b | [
"Apache-2.0"
] | permissive | SirPok/Mask-mmdetection | f1869343dc807cd677f89b88f6e3abc7f73ea01f | 36cb0cc5783546d091de29e22b6fd44aaf3a1cbf | refs/heads/master | 2023-03-04T03:30:41.044719 | 2021-02-17T19:33:41 | 2021-02-17T19:33:41 | 339,834,205 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,266 | py | import pytest
import mmcv
def test_registry():
reg_name = 'cat'
CATS = mmcv.Registry(reg_name)
assert CATS.name == reg_name
assert CATS.module_dict == {}
assert len(CATS) == 0
@CATS.register_module
class BritishShorthair:
pass
assert len(CATS) == 1
assert CATS.get('Briti... | [
"s6030211031@phuket.psu.ac.th"
] | s6030211031@phuket.psu.ac.th |
6c903615d78a14c4d885bcb3dbc9ea600c0e8b51 | 5b1095dbf692f0f92fe0eb8ea4718977349c2138 | /3_MyNoDecreasingSort.py | f7cf3f3632d1c605d8e45fd6049bbf93900623de | [] | no_license | Maoxiaoying/MY_hogwarts_python-2- | d5a9fe8f9740d0dd1d4a6200b770880a694949c1 | b091e1ac735194f4d1ac68538cf45918530b7c0b | refs/heads/master | 2022-05-26T06:38:30.146063 | 2020-05-01T00:37:46 | 2020-05-01T00:37:46 | 258,985,277 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,066 | py | """
作业3:
使用列表推导式写下面这个算法题
给定一个按非递减顺序排序的整数数组 A,返回每个数字的平方组成的新数组,要求也按非递减顺序排序。
"""
#常规做法
#分析:平方后的数组呈先小后大趋势,定义一个i从头开始,一个j从尾开始,取较大值放进B中
from ModuleSort.mysort import bubble_sort #导入sort模块
A=[-4,-1,0,3,10] #定义目标排序列表
B=[] #定义暂存列表
i=0 #i从头开始
j=len(A)-1 #j从尾开始
while(i<=j): #直到i,j交叉结束
if(A... | [
"1151293557@qq.com"
] | 1151293557@qq.com |
a8efa3d067fabf99c931a123bd34c575d677a2ea | 591ae6348e53bf797f21c7e3ed4a26fb975422c2 | /lightdataparser/parsing.py | 3b3a2f480872d98a810eb393918edf4615168416 | [
"MIT"
] | permissive | xenking/lightdataparser | 415d1f7cb27b68c874a96907a5da7e1202adfb6b | 299cc188dcfd40c5b1a7573ada2281e8cbdc065d | refs/heads/master | 2020-05-17T09:11:03.369273 | 2019-05-16T08:26:14 | 2019-05-16T08:26:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,951 | py | """
Функции конвертации и обработки данных
"""
import csv
import re
import json
from typing import Tuple, List
from xml.etree import ElementTree
from functools import singledispatch
from lightdataparser import config
from lightdataparser.datatype import DataNode, CsvObject, JsonObject, XmlObject
@singledispatch
def ... | [
"xenkings@gmail.com"
] | xenkings@gmail.com |
80c838c33d1f7524627c025af19bf3861fc45233 | de419e535b782ce72d8808b31ab51b7e5893013f | /etf50-main.py | 7d437cce04666d3be84c2b664bf6a2b715148fb0 | [] | no_license | wyj0613/StockWeb | 24c57835504011884cc7e8fe27589a10ed612d46 | b8cc79194b3ed50b9d9c7a3a806fd8d091b797d7 | refs/heads/master | 2023-01-31T16:53:16.622827 | 2020-12-16T08:55:45 | 2020-12-16T08:55:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,617 | py | ## For more details, please see the example 9-8 in book of
# "Python Programming" by ChenChunHui.
# JamesYe 2019-9-10 Happy Teacher's Day
# This is main enterance of project.
# visit http://127.0.0.1:5000/, you can see the graphic
from flask import Flask
from flask import render_template
from flask import request
fr... | [
"52725224+Yourdaylight@users.noreply.github.com"
] | 52725224+Yourdaylight@users.noreply.github.com |
287b74a838cf6babd96618f2096a2deafef82b8d | 4625ba2aa432799bc25bacc5b9994c163693ad5b | /_profile.py | d069c2d6a3e75537790f3bdce1f77e43b56ee870 | [] | no_license | echo28OoO/bbs | f0ab0e35e93d1ad170ae000c89a5c3693a084b8f | 5c1824b4ff5275ee26a9451d6b741aa7265728a1 | refs/heads/master | 2023-05-01T08:16:35.013274 | 2019-09-05T16:27:03 | 2019-09-05T16:27:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 794 | py | import app
from routes.index import profile
import cProfile
from pstats import Stats
def profile_request(path, cookie, f):
a = app.configured_app()
pr = cProfile.Profile()
headers = {'Cookie': cookie}
with a.test_request_context(path, headers=headers):
pr.enable()
# r = f()
#... | [
"50176865+siO-X@users.noreply.github.com"
] | 50176865+siO-X@users.noreply.github.com |
bf5dc29023067b377e9be2c8a51b47247ca9a81a | 5da5473ff3026165a47f98744bac82903cf008e0 | /packages/google-cloud-dialogflow-cx/samples/generated_samples/dialogflow_v3_generated_environments_deploy_flow_async.py | ade1585fbfce343c1ef8b1d490219dca511c0ddb | [
"Apache-2.0"
] | permissive | googleapis/google-cloud-python | ed61a5f03a476ab6053870f4da7bc5534e25558b | 93c4e63408c65129422f65217325f4e7d41f7edf | refs/heads/main | 2023-09-04T09:09:07.852632 | 2023-08-31T22:49:26 | 2023-08-31T22:49:26 | 16,316,451 | 2,792 | 917 | Apache-2.0 | 2023-09-14T21:45:18 | 2014-01-28T15:51:47 | Python | UTF-8 | Python | false | false | 1,997 | py | # -*- coding: utf-8 -*-
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | [
"noreply@github.com"
] | noreply@github.com |
f3fb7e68e6ab6946084708c29c3acc4018c11d41 | 5aed34c47e330fbdb04f2bbc8a3bd8dcb02421ba | /3.MilestoneProject-2/BlackJack/package/sub_modules/EvaluateResult.py | 4a910d625ea352e9967ed7db7ff93d546df88fa7 | [] | no_license | rraghu214/Complete-Python-3-Bootcamp | 5535cab7c39211051e99fc88a5ecac792d5067f5 | 2212590a2f8ff7303be8ab79220f33e1b61d89c1 | refs/heads/master | 2022-11-28T14:46:05.634348 | 2020-08-09T10:10:24 | 2020-08-09T10:10:24 | 266,571,998 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,075 | py | #import
class Evaluate():
def __init__(self):
pass
def full_eval(self,p_score,d_score,p_iter,d_iter):
'''
This is used during the initial evaluation of cards.
'''
if p_score == d_score == 21:
return 'PUSH'
elif p_score == 21 and d_score !=21 and p_it... | [
"rraghu214@outlook.com"
] | rraghu214@outlook.com |
79afdf13c61a200d338ede0d864a956c63fabe3f | ce76b3ef70b885d7c354b6ddb8447d111548e0f1 | /little_person_or_time/year/be_long_woman/part_and_thing/same_fact.py | 4a49f93faba8dbcc80ef785b249febee2ff44e24 | [] | no_license | JingkaiTang/github-play | 9bdca4115eee94a7b5e4ae9d3d6052514729ff21 | 51b550425a91a97480714fe9bc63cb5112f6f729 | refs/heads/master | 2021-01-20T20:18:21.249162 | 2016-08-19T07:20:12 | 2016-08-19T07:20:12 | 60,834,519 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 226 | py |
#! /usr/bin/env python
def public_company(str_arg):
life_or_long_week(str_arg)
print('tell_part')
def life_or_long_week(str_arg):
print(str_arg)
if __name__ == '__main__':
public_company('want_next_thing')
| [
"jingkaitang@gmail.com"
] | jingkaitang@gmail.com |
21dc338240315e8019b82bc2685fd02ffe26bea0 | 4589f8036582d6acc2286c773ae0d5997d8d01d8 | /app/tests.py | 66b5c78d92fde4f8fdbe163aef124a0a6e4bf7d9 | [] | no_license | pgossman/chore-manager | c35c13933f6cabf84f7aa34621e296d62cc3ee80 | a63ae4139874f3d4993fb3fc32e0eceb0da8a085 | refs/heads/master | 2023-05-07T03:24:21.054664 | 2021-05-23T22:07:51 | 2021-05-23T22:07:51 | 289,840,963 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,411 | py | from typing import Callable
from django.test import Client, TestCase
from django.contrib.auth.models import User
from django.utils import timezone
from .models import (
Chore,
ChoreAssignment,
ChoreInstance,
DayOfWeek,
PartOfDay,
ChoreStatus,
)
class InstanceProcessTests(TestCase):
USER1... | [
"me@paulgossman.com"
] | me@paulgossman.com |
dce33266677a3e01c6ff99c2c720c7dfc65d296c | d7d7873d0bea9185a252916e3599b33e301d394c | /setup.py | 8f0a378e044d453b35d69a16563e88fab08a6dcc | [] | no_license | KennethJHan/pip_test | b16a3248a50025075cc3db916d07ee9761cc9b9f | 89e957d7059e303e5b640a1f2e514c437b616c10 | refs/heads/main | 2023-01-12T02:00:35.976500 | 2020-11-18T07:36:52 | 2020-11-18T07:36:52 | 313,856,656 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 570 | py | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="gitandpip",
version="0.0.1",
author="kenneth joohyun han",
author_email="kenneth.jh.han@snu.ac.kr",
description="It's pip... with git.",
long_description=long_description,
url="htt... | [
"kenneth.jh.han@gmail.com"
] | kenneth.jh.han@gmail.com |
9a608545f0f62d2b6aee9b76e96f8b7b1d1a2bbb | e3ba772036723637c55a548aa8fd0807151b4130 | /domain/mouse.py | dd8ce49f2e87b3c8acd150aca4bcaed9e17feaf7 | [
"MIT"
] | permissive | hesslink111/neuralnetworknibbles | d711527fcdb98826b89bb3a9630aa1b759872f89 | a902a845eddbb6ed43ab4f8b1f6ae71660cc1e21 | refs/heads/master | 2020-07-01T08:13:30.010892 | 2016-12-14T22:17:08 | 2016-12-14T22:17:08 | 74,090,023 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 687 | py | from domain.position import Position
class Mouse:
"""Domain class for representing a mouse in a game."""
def __init__(self, board, xorshift, position=None):
self.position = position
self.board = board
self.xorshift = xorshift
def randomize_position(self, hideprev=True):
i... | [
"hesslink111@gmail.com"
] | hesslink111@gmail.com |
f982e7aca4bbe4938af7ef1ab99c9793bdb6a151 | f2319ccd8ac62ee27330c28a199dda869ab4ce44 | /string/medium/0093_restore_ip_address.py | 231e6d5d492da5ef56f8462b67375938f3d542d6 | [] | no_license | mike-chesnokov/leetcode | 0159f9620cc2caa2310867df31cf0cc80ebad167 | fad2fefe333d405ac440a3e69ffd510f5a4184d4 | refs/heads/master | 2023-01-22T07:51:14.235744 | 2023-01-15T19:59:36 | 2023-01-15T19:59:36 | 177,213,912 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,519 | py | """
93. Restore IP Addresses
A valid IP address consists of exactly four integers separated by single dots.
Each integer is between 0 and 255 (inclusive) and cannot have leading zeros.
For example, "0.1.2.201" and "192.168.1.1" are valid IP addresses,
but "0.011.255.245", "192.168.1.312" and "192.168@1.1" ar... | [
"mchesnokov@uma.tech"
] | mchesnokov@uma.tech |
fcc6cc291f03c38e6c6f5ca02d7a95e7ee6d6f7d | 5739a5b4fc28447dedbc2de07ad2a086118f9e27 | /mysite/settings.py | b94b560b9d6e1a7b4c080d80e605095bb914b637 | [] | no_license | 2ez4salt/djangoblog | 07357bd2941e6a2e4b1afd0db14f4c55fe493395 | d48e04bbb130f5daa52be2fcbd9ea997e0e5a4fe | refs/heads/master | 2021-05-04T01:32:58.924732 | 2018-02-05T19:50:54 | 2018-02-05T19:50:54 | 120,357,599 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,118 | py | """
Django settings for mysite project.
Generated by 'django-admin startproject' using Django 1.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/
"""
import os
#... | [
"talhaslt@gmail.com"
] | talhaslt@gmail.com |
9f3a4c72756e26bb17b1fe4a87c755b5e04cd441 | ab174d6a1c5effdaab4a49015987c44909680792 | /p4/solve.py | cf24db71cb7964f30b8b21b561e3433d28b73124 | [] | no_license | carrdelling/AdventOfCode2018 | 2b26ed6cae8e48f473243e156d528b17fcb71584 | c42f29d684ca7fb1954c3c1d45031e837d8c818a | refs/heads/master | 2022-01-14T10:01:14.460444 | 2022-01-02T16:35:59 | 2022-01-02T16:35:59 | 160,434,068 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,569 | py | import datetime as dt
from collections import defaultdict, Counter
log = []
with open('input_data') as in_f:
for row in in_f:
timestamp, action = row.strip().split(']')
_time = dt.datetime.strptime(timestamp[1:], "%Y-%m-%d %H:%M")
log.append((_time, action.strip()))
log.sort()
guard_id... | [
"carrdelling@gmail.com"
] | carrdelling@gmail.com |
b5430eddf82635dbf665e9178008d4abf5933bc3 | 1e0ed7e82ed271067510c30c003b9bb672bae000 | /apps/belt1_app/apps.py | 689162a090d07296391d6d3829fc79bf699d4572 | [] | no_license | harshi-agarwal/python_beltexam | 990a3fe5525cc505d98df5388754250ab3542cb6 | 5811d0178661651bcf655e810f6e6a0f98ed905b | refs/heads/master | 2021-01-12T16:04:03.874975 | 2016-10-25T19:18:14 | 2016-10-25T19:18:14 | 71,929,960 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 133 | py | from __future__ import unicode_literals
from django.apps import AppConfig
class Belt1AppConfig(AppConfig):
name = 'belt1_app'
| [
"harshita.agarwal211@gmail.com"
] | harshita.agarwal211@gmail.com |
3aa42dfe75937de11efba3950fb0301198e88b6a | 3d4fcc7cbfafc4aaebea8e08d3a084ed0f0d06a1 | /Programme_2/Creation_donnees/MIDI/bk_xmas4fMidiSimple.py | cc8ced8f4e27729a020952c8b025d1842f14d469 | [] | no_license | XgLsuLzRMy/Composition-Musicale-par-Reseau-de-Neurones | 0421d540efe2d9dc522346810f6237c5f24fa3bf | 518a6485e2ad44e8c7fbae93c94a9dc767454a83 | refs/heads/master | 2021-09-03T20:43:01.218089 | 2018-01-11T20:02:00 | 2018-01-11T20:02:00 | 106,448,584 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 151,641 | py | import midi
pattern=midi.Pattern(format=1, resolution=480, tracks=\
[midi.Track(\
[ midi.NoteOnEvent(tick=1200, channel=0, data=[67, 63]),
midi.NoteOnEvent(tick=230, channel=0, data=[67, 0]),
midi.NoteOnEvent(tick=10, channel=0, data=[67, 58]),
midi.NoteOnEvent(tick=0, channel=0, data=[72, 69]),
midi.Note... | [
"jeremy.catelain@insa-rouen.fr"
] | jeremy.catelain@insa-rouen.fr |
f04b76cbb17426a78874440a2c7113515590e5f8 | 92de9445b33f2c0d596b5fc96c9b8558d205fec1 | /venv/Lib/site-packages/pandas/core/frame.pyi | ffe631cef03f8e776e53cec3880e320bd197bede | [] | no_license | bcstarke/spotify-ETL | 13967444cf2ff5fdc7b01d5b5a263c7ef2977a4f | a1fd6df6e7f4298bf421e17f6af5373ec3deddf9 | refs/heads/master | 2023-04-04T20:52:57.648203 | 2021-04-21T23:33:22 | 2021-04-21T23:33:22 | 353,499,809 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 18,238 | pyi | import sys
import numpy.ma as np
from pandas import datetime
from pandas._typing import Axes, Axis, Dtype as Dtype, FilePathOrBuffer, Level, Renamer, Column, Label, FrameOrSeries, \
ArrayLike, AnyArrayLike, GoogleCredentials, Scalar, ReplaceMethod, ToReplace, ReplaceValue, Frequency, AxisOption, \
Orientation... | [
"bstarke0225@gmail.com"
] | bstarke0225@gmail.com |
b10af2bd41f12df19680a59d837580264ddaf9bf | d60759fa4b28ff211fb47bff89f7875cc776ba64 | /great_lakes/notebooks/total_n_seqs.py | 89a52bf27b03a1311a646634a7c6f200d9d61eec | [] | no_license | CooperStansbury/rotation_project | 8e40c4ca9b296ad78efd58ca0b3fc4d7cc55f1d3 | 6685bb787fb541474f64551dc5fa96b9d89992ea | refs/heads/main | 2023-05-15T10:11:57.507313 | 2021-06-02T17:04:44 | 2021-06-02T17:04:44 | 335,704,476 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,541 | py |
"""
To count the total number of seqs per donor and cell type
"""
# %%
import sys
import os
import pandas
sys.path.append('../')
from get_distance_pairs import file_loader
# %%
ROOT_DIR = '/scratch/indikar_root/indikar1/shared_data/cstansbu_rotation/b_cell_data/'
for _dir in os.listdir(ROOT_DIR):
subdir_pat... | [
"cstansbu@gl-login2.arc-ts.umich.edu"
] | cstansbu@gl-login2.arc-ts.umich.edu |
61aa6ac03dc078f592be45003537818b83f76714 | ecff48edc09a503923d9466262c67f656bcfa559 | /Stanford-Alg/Week 1/InversionCount.py | 38473f0633d87ec1b92077a681e1e1dd9d0e63f3 | [] | no_license | szywind/algorithm | d5c17ef6d73b86611032999ff4c0a9ce34a81ad9 | 98203a697cde769e18a38be1a8eee412546d634c | refs/heads/master | 2021-03-19T13:35:56.693515 | 2017-03-17T17:50:39 | 2017-03-17T17:50:39 | 70,362,823 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,475 | py | '''
Week 1's Programming Assignment
Divide and Conquer
'''
class CountInversion:
def __init__(self, array = []):
self.array = array
def read_data(self, fileName = "IntegerArray.txt"):
with open(fileName, 'r') as fl:
self.array = [int(i.strip()) for i in fl]
def mergeSortAndCoun... | [
"szywind@163.com"
] | szywind@163.com |
228f735a222ca42202717414edd6aa7d3e266659 | bf1d46f0e8e42df1137875d4b72d34cb96f979f6 | /neuralnet/optimizers.py | 117a1385d3afaa9935410c60d38aec160842d339 | [] | no_license | FerdinandEiteneuer/NeuralNet | 6f0ee94d4551db8e9e129d13c137146f210df834 | f486ba328ffc5314ef023bb021293c6aaed20fea | refs/heads/master | 2023-04-07T08:49:15.543940 | 2021-04-10T14:25:55 | 2021-04-10T14:25:55 | 119,675,574 | 0 | 0 | null | 2021-02-03T00:07:32 | 2018-01-31T10:59:33 | Python | UTF-8 | Python | false | false | 4,190 | py | """
Optimizers for gradient descent (SGD and Nadam)
"""
import numpy as np
class SGD:
"""
Stochastic Gradient Descent
"""
def __init__(self, learning_rate=0.01, momentum=0, bias_correction=True):
self.lr = learning_rate
self.beta_1 = momentum
self.bias_correction = bias_correct... | [
"ferdinand.eiteneuer@rwth-aachen.de"
] | ferdinand.eiteneuer@rwth-aachen.de |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.